Thumbnail image of HTML5 in which types of html are discussed

What are the Different types of tags used in HTML?

Hypertext Markup language or HTML is used to create and organize web pages.

The essential building block of HTML is HTML tags. Every tag has a specific function in the creation of a web page.

There are different types of tags used in HTML.

Different types of tags used in HTML

1. Structural Tag:

  • HTML:   The root element in which the entire HTML document is written.
  • Head:    It is used to link CSS files or Scripts. It also contains metadata such as page title and character encoding.
  • Body:    This element contains all textual content of a page.
  • Header: It contains the logos of the website or navigation links that help visitors to find what they are looking for.
  • Nav:        It contains navigation links like Home, Portfolio, About Us, etc. 
  • Main:      The main content of the web page will be written here.
  • Section:  Groups the related content together.
  • Article:   It defines a self-contained article or piece of content.
  • Aside:     It contains the footer information and often includes copyright notices and contact details.

2. Text Formatting Tags:

  • H1 to H6: Used for heading. Content written in h1 is largest in size and content written in h6 is smaller in size.
  • P:               Defines a paragraph of text.
  • br:             Used to give a single line space in a web page.
  • Strong:     It is used to display text as Bold.
  •  em:           It is used to display Italic.
  • Mark:        Used to highlight text for reference.
  • &nbsp:      It is used to give one-word space between two elements.

3. List Tags:

  • UL:  It is used to create an unordered list e.g. bullet points.
  • OL:   It is used to create an ordered list e.g. numeric values.
  • LI:   Defines individual list items.

4. Link Tags:

  • a:   It is used to create a hyperlink to another link or resource.

5. Image Tags:

  • Img:   Img tag is used to display images on a web page.

6. Table Tags:

  • Table:  It is used when a programmer needs a tabular structure for data. 
  • tr :       It is used in the Table tag to represent the table row.
  • td :       It is used in the tr tag to represent a column.
  • th :      It is used in the table tag to describe the heading in the table.

7. Form Tags:

  • Form:  It is used to Create a form for the user so that he can input his information. Usually used on the login page or signup page.
  • Input: It is used inside the Form tag to define various input elements such as text fields, and checkboxes.
  • label:   It is used to label a form element.
  • Button: It is used to create a button e.g. save login submit.

8. Media Tags:

There are two media tags.

  • Audio:  It is used to add audio files to content.
  • video:   it is used to add video files to content.

9. Semantic Tags:

  • These types of tags are used to focus on the meaning of content.
  • Some examples of semantic tags are <time> , <address> , <blockquote> , <figure> , <figcaption>.

10. Attributes Tags:

  • It is used to provide a piece of additional information about elements.
  • Alt: It is an attribute tag used in the image tag.
  • Src: It is also an attribute tag used to describe the location of the image.

These are just a few examples HTML offers a wide range of tags for various content formatting and structural needs.

Thank you for reading this article.

Different Types of Tags used In HTML.

Leave a Comment

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