HTML Elements

An HTML element usually consists of a start tag, content and an end tag.


HTML Element Examples:

<h1>My Heading</h1>
<p>My Paragraph.</p>

HTML elements with no content are called empty elements. Empty elements do not have an end tag, such as the <br> element.

Nested Elements

All HTML documents consist of nested HTML elements. See the following example.


<!DOCTYPE html>

<h1>My Heading</h1>
<p>My Paragraph.</p>


The <html> element defines the whole document. It has a start tag <html> and an end tag </html>. Inside the <html> element is the <body> element. The <body> element defines the document body. Inside the <body> element is two other HTML elements: <h1> and <p>.

HTML tags are not case sensitive. The HTML5 standard does not require lowercase tags, but W3C recommends lowercase in HTML.