> For the complete documentation index, see [llms.txt](https://codingzonebd.gitbook.io/html-elements/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://codingzonebd.gitbook.io/html-elements/what-is-an-html-element.md).

# What is an HTML Element?

An HTML element is defined by a start tag, some content, and an end tag:

{% 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&amp;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 %}
