# What is an HTML Element?

{% code overflow="wrap" lineNumbers="true" %}

```html
<tagname> Content goes here... </tagname>
```

{% endcode %}

The HTML **element** is everything from the start tag to the end tag:

{% code overflow="wrap" lineNumbers="true" %}

```html
<h1>My First Heading</h1>
<p>My first paragraph.</p>
```

{% endcode %}

### HTML Page Structure

Below is a visualization of an HTML page structure:

<figure><img src="https://1737958340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVjGFBuDKR1b3eJbq0zoO%2Fuploads%2FGIimMcjtaMAh5kqV48We%2Fimage.png?alt=media&#x26;token=356da9cc-d29c-4226-9f1e-61cdc0fade83" alt=""><figcaption></figcaption></figure>

## HTML Elements

{% code overflow="wrap" lineNumbers="true" %}

```html
<tagname>Content goes here...</tagname>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
<p>This is a <br> paragraph with a line break.</p>
```

{% endcode %}

### Nested HTML Elements

{% code overflow="wrap" lineNumbers="true" %}

```markup
<!DOCTYPE html>
<html>
<body>

<h1>My First Heading</h1>
<p>My first paragraph.</p>

</body>
</html>
```

{% endcode %}

**The&#x20;**<mark style="color:red;">**\<!DOCTYPE>**</mark>**&#x20;Declaration**

**The \<!DOCTYPE> declaration represents the document type, and helps browsers to display web pages correctly.**&#x20;

**It must only appear once, at the top of the page (before any HTML tags).**

**The \<!DOCTYPE> declaration is not case-sensitive.**

**The \<!DOCTYPE> declaration for HTML5 is:**

{% code overflow="wrap" lineNumbers="true" %}

```html
<!DOCTYPE html>
```

{% endcode %}

**HTML Headings**

{% code overflow="wrap" lineNumbers="true" %}

```markup
<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>
```

{% endcode %}

**HTML Paragraphs**

{% code overflow="wrap" lineNumbers="true" %}

```markup
<p>This is a paragraph.</p>
```

{% endcode %}


---

# 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://codingzonebd.gitbook.io/html-elements/what-is-an-html-element.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.
