Web Analytics

HTML Elements

Beginner ~5 min read

What is an HTML Element?

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

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

Examples:

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

Nested Elements

HTML elements can be nested (this means that elements can contain other elements).

In the example below, the <body> element contains both an <h1> and a <p> element.

HTML
CSS
JS

Empty Elements

Some HTML elements have no content (like the <br> element). These are called empty elements. Empty elements do not have an end tag!

Quick Quiz

Which character is used to indicate an end tag?

A
*
B
/
C
<
D
^