DIFFERENT TYPES OF TAGS USED IN HTML

html tags

Web pages are created by the hypertext markup language commonly known as HTML.

HTML tags are the basic component of HTML. Each of them has its own role in creating the web page.

Tags play a key role in creating Web pages and have their own purpose.

Different types of tags used in HTML

1. Structural Tag:

  • HTML:   The main element that wraps the entire HTML document.
  • 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:      This is where the main content of the web page will be written. It is also the most important part of the page.
  • Section:  This helps categorize the related content in a category so that it will be easy to locate when needed.
  • Article:   It defines a self-contained article or piece of content.
  • Aside:     It holds the footer information and often includes copyright notices and contact details.

2. Text Formatting Tags

  • H1 to H6: These are used for heading. The size of the content written in h1 is largest and the size of the content written in h6 is comparatively smaller in size.
  • P:               Defines a paragraph of text.
  • br:             It is used to provide a single line space in a web page.
  • Strong:     It is used to display text in Bold form.
  •  em:           It is used to display text in Italic form.
  • Mark:        Used to highlight text for reference.
  • &nbsp:     It is used to provide an asterisk space, that is, one world space between two other elements.

3. List Tags

  • UL:  It is used to create a Bullet list for instance.
  • 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 page or resource.

5. Image Tags

  • Img:   Img tag on the other hand is used to display images on web pages.

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 applied under the TABLE tag and in the form of text which is meant to describe the table heading.

7. Farm Tags

  • Form: This is useful for creating a form whereby the user can enter his details. This type is usually placed on the login page or the page that handles registration.
  • Input: It is used inside the Form tag to define various input elements such as text fields, and checkboxes.
  • label:   It is employed where you would wish to append a label to a particular form element.
  • Button: It is used to create a button e.g. save login submit.

8. Media Tags

There are two media tags.

  • Audio: They are used at the points where the audio files are to be included.
  • video:   it is used to add videos to the content of the post or web page

9. Semantic Tags

  • These are the types of tags that are used when the content of the material is stressed.
  • There are various types of semantic tags and some among them are time, address, blockquote, figure, and figcation.

10. Attribute tags

  • It is used to provide a piece of additional information about elements.
  • Alt: It is the type of attribute tag used in the image tag
  • Src: It also refers to a location attribute tag used to describe the position 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.

By Sparkify Solutions.

Leave a Comment

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

Scroll to Top