HTML Elements
An HTML element is the start tag, the content, and the end tag.
| Start tag | Content | End tag |
|---|---|---|
<h1> | My Heading | </h1> |
<p> | A paragraph | </p> |
Elements can be nested: an element can contain other elements.
Examplehtml
Empty elements
Some elements have no content and no end tag, such as <br> (line break) and <hr> (horizontal line).
Examplehtml
Quick check
Which of these is an empty element?
Finish the quick check (and any code exercise) to complete this lesson, or mark it done yourself.
Tip: use the left and right arrow keys to move between lessons.