Skip to main content
Practice

Tags

Tags are the basic building blocks of an HTML document. HTML tags consist of a start tag (<tag>) and an end tag (</tag>), and the content to which the tag is applied is placed in between.

Structure of an HTML Tag
<tag>Content applied by the tag</tag>

The start tag is represented as <tagname> (e.g., <html>) with angle brackets, and the end tag is represented as </tagname> (e.g., </html>) with a slash (/) before the tag name.

Start Tag / End Tag Example
<html>
Hello World!
</html>

An element is the combination of a start tag, content, and an end tag wrapped together.

Elements are the most basic building blocks of a webpage and define the content of the webpage such as text, images, videos, and input fields.

Text Element Example
<p>Hello there</p>

Practice

Try typing the highlighted parts of the code as you follow along.