Video tutorialTrack course · freeCodeCamp
Speed
Transcript & captions
6/6
An element is written with a start tag, some content, and an end tag: <p>content</p>. Elements can be nested inside each other, but they must be closed in the reverse order they were opened.
htmlhtml
<div>
<h2>Title</h2>
<p>Some <strong>bold</strong> text.</p>
</div>Some elements are empty — they have no content and no closing tag, like <br>, <hr>, <img> and <input>.
Try it yourself
Knowledge check
0/1 answeredWhich of these is an empty element?