HTML (Hypertext Markup Language) uses tags to structure content on the web. HTML tags are keywords enclosed in angle brackets () that provide instructions to the web browser on how to display content. There are several types of HTML tags, each serving a specific purpose. Here are some of the main types:
Structural Tags:
-
html:
-
head:
-
title:
-
body:
Represents the root of an HTML document.
Contains meta-information about the HTML document.
Defines the title of the HTML document, displayed in the browser’s title bar or tab.
Contains the content of the HTML document, such as text, images, links, etc.
Text Formatting Tags:
-
p:
-
h1 or h6:
-
strong or b:
-
em or i:
Defines a paragraph
Defines header tags with decreasing levels of importance
Represent strong importance (bold).
Represents emphasized text (italic).
List Tags:
-
ul:
-
ol:
-
li:
Defines an unordered list.
Defines an ordered list.
Represents alist item.
Link Tags:
-
a:
Defines a hyperlink. It is used to create links to other web pages, files, or locations within the same page.
Form Tags:
-
form:
-
input:
-
select:
-
textarea:
Defines an HTML form for user input.
Represents an input field, such as a text box or button.
Creates a drop-down list.
Defines a multiline text input field.
Table Tags:
-
table:
-
tr:
-
th:
-
td:
Defines an HTML Table.
Represent a table row.
represent a table header cell.
Represent a table data cell.
Semantic Tags (introduced in HTML5):
-
article:
-
section:
-
header:
-
footer:
Represent a self-contained piece of content.
Represent a section of content.
Defines a header for a document or section.
Defines a footer for a ddocument or section.
Media Tags (introduced in HTML5):
-
audio:
-
video:
Embeds audio content.
Embeds video content.