01. Elements and Tags

Introduction

Elements and tags are what make up HTML as a language. This lesson is a brief introduction into what they are and how they are used.

Learning Outcomes

By the end of this lesson, you should be able to:

  • Explain what HTML tags are
  • Explain what HTML elements are

Elements and Tags

Every website is composed of HTML Elements. An HTML element is defined by a start tag, some content, and an end tag.

Each tag represents the HTML element on the page. Most tags come in pairs – an opening tag (before the text) and a closing tag (after the text).

An example of this is the p tag.

<p>This is a paragraph</p>
Code language: HTML, XML (xml)

These tags are configured with certain styles when you use them by default.

For the p tag above, it adds a little bit of space above and below your paragraph.

Here is another tag, this one’s the strong tag.

<strong>This is BOLD text.</strong>
Code language: HTML, XML (xml)

It makes the text inside of the tags bold like this.

There are a number of HTML tags to learn, but don’t bother trying to memorize them all at first. As you continue using them, they will eventually ‘stick’.

Here are some of the most common tags and what they do:

<div></div>div
<br>line break
<p></p>paragraph
<em></em>emphasis (italics)
<strong></strong>strong (bold)
<hr>horizontal rule (divider)
<a></a>anchor (link)
<img>image
<audio></audio>audio
<video></video>video

One last thing – HTML tags are not case-sensitive, so you can type them however you want.



Hey, thanks for reading! If you have any questions, you can leave me a comment and I always try to reply.

If you have any suggestions on how I can improve this article, please let me know!

This website is not monetized in any way. It purely exists to help others on their web-building journey. However, if you have the means to donate toward my server costs, I have a ko-fi account where I accept tips.