# The Basics

Hyper-Text Markup Language (HTML) is one of the main languages of the web. The main one, even.

HTML is what Web Browsers (like Google Chrome, or Safari) use to build and display web pages to us. HTML is stored in files and are composed of a number of "tags". These tags tell the browser what to do with the information inside the tags, and what sort of information it is. According to the [HTML Specification](https://www.w3.org/TR/html52/), a basic "valid" HTML document might look something like this:

```
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <meta http-equiv="X-UA-Compatible" content="ie=edge" />
  <title>Document</title>
</head>
<body>
  
</body>
</html>
```

This will display a blank page, which isn't too exciting, but there is still a bit going on here which we will explore more in the following pages. For now, the important thing to take note of is the tags. A tag is essentially anything wrapped in angled brackets (`<>`).

There are two types of tags. Normal Tags, and Self Closing Tags.

A normal tag is one in which there is an opening and closing tag, like this

```
<title>Document</title>
```

{% hint style="info" %}
This Tag tells the browser what the title of our page is, which then gets displayed on the tab in the browser
{% endhint %}

This is a `title` tag, as we can see from the name in between the angled brackets. The first part (`<title>`) opens the tag, and the second part (`</title>`) closes the tag. Everything in between is the content (in this case, the word `Document`)

The other kind of tag is Self Closing tags. These are ones which fulfil whatever their role is without content, and so simply exclude it. The do not have a closing tag, because they self terminate, like so:

```
<meta charset="UTF-8" />
```

{% hint style="info" %}
This Tag tells the browser what our character-set encoding is, so that it can display our text correctly.
{% endhint %}

We will explore more about tags and their role in web development in the coming pages.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://learning.pavey.dev/html/the-basics.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
