• Tutorial List

HTML Tags & Elements

Last updated Jul 08, 2020
HTML Tags & Elements

What are HTML Tags?

An HTML tag is a text inside the angle <...> brackets. The HTML tags are used to make the structure of a Web page.

HTML tags example

  • <body>
  • <h1>
  • <p>

HTML ending tags

Each HTML tag has an endpoint. The endpoint defines the end of the tag, and an HTML end tag is used to define the endpoint.

Every ending tag has the forward slash / before the same tag name. See the following example –

  • Start Tag
    • <body>
  • Ending Tag
    • </body>

Types of HTML tags

  • In HTML there are two types of tags –
    1. Paired Tags
    2. Unpaired Tags

HTML Paired Tags or Container Tags

The HTML Paired tags are those tags whose has the closing/ending tag is. These tags look like containers, so you can call these container tags.

  • Paired Tags Examples:
    • <h1> </h1>
    • <p> </p>
    • <div> </div>
    • <body> </body>

HTML Unpaired Tags

The HTML Unpaired tags are those tags, whose do not have the closing tag. Those tags don’t need to close, they close on their own.

Both works as same –

  • Unpaired Tags Examples:
    • <br>
    • <hr>
  • You can also write the Unpaired tags like the following:
    • <br/>
    • <hr/>

What are HTML Elements?

The entire thing from start-tag to end-tag or endpoint is called HTML element. HTML tags define the start and end of an element. HTML has different tags to create different elements.

Difference between html tags and elements

Ask Questions

Your email address will not be published. Required fields are marked *