Introduction
HTML (HyperText Markup Language) defines the structure and content of webpages. We use HTML elements to create all of the paragraphs, headings, lists, images, and links that make up a typical webpage. In this lesson, we will explore how HTML elements work.
Lesson overview
This section contains a general overview of topics that you will learn in this lesson.
- Explain what HTML Tags are.
- Explain what HTML elements are.
Void Elements
Some HTML elements do not have a closing tag. These elements just have a single tag, like: <br>
or <img>
. They are known as void elements because they are void of any content, there is nothing inside of them. No closing tag means they can’t wrap content like other tags do.
You might also see these referred to as self closing tags. But those are just void elements with a forward slash(/) at the end like: <br />
or <img />
. You’re likely to see self-closing tags used often for historical reasons. Browsers will be able to render them just fine, but the latest version of the HTML specification discourages their use and considers them invalid.
Assignment
- Watch Kevin Powell’s Introduction to HTML Video.
Knowledge check
This section contains questions for you to check your understanding of this lesson on your own. If you’re having trouble answering a question, click it and review the material it links to.
Additional resources
This section contains helpful links to related content. It isn’t required, so consider it supplemental.