Most commonly used tags in HTML
Most commonly used tags in HTML refer to HTML elements frequently utilized for structuring web content. These include <div> for division, <p> for paragraphs, <a> for hyperlinks, <img> for images, and others essential for building web pages, forming the basis of web development.
HTML contains lots of predefined tags. Some of them are described below.
Document structure tag
The <html> tag is essential, encapsulating the entire HTML document and serving as the root element for content organization.
Structure Tag | Syntax | Description |
---|---|---|
<html> |
<html> Statements... </html> |
The root of the HTML document specifies it as HTML. |
<head> |
<head> Statements... </head> |
Contains head elements such as title, style, and meta tags in the HTML file. |
<title> |
<title> Statements... </title> |
Defines the title of an HTML document. |
<body> |
<body> Statements... </body> |
Defines the body of an HTML document, containing content like images, tables, and lists. |
Commonly used tags in HTML
HTML Tag | Syntax | Description |
---|---|---|
<div> |
<div>...</div> |
Defines a division or section in an HTML document. |
<p> |
<p>...</p> |
Defines a paragraph. |
<a> |
<a href="...">...</a> |
Defines a hyperlink. |
<img> |
<img src="..." alt="..."> |
Embeds an image. |
<ul> |
<ul><li>...</li></ul> |
Defines an unordered list. |
<ol> |
<ol><li>...</li></ol> |
Defines an ordered list. |
<li> |
<li>...</li> |
Defines a list item. |
<table> |
<table>...</table> |
Defines a table. |
<tr> |
<tr>...</tr> |
Defines a table row. |
<th> |
<th>...</th> |
Defines a table header cell. |
<td> |
<td>...</td> |
Defines a table data cell. |
<form> |
<form>...</form> |
Defines an HTML form for user input. |
<input> |
<input type="..."> |
Defines an input control within a form. |
<button> |
<button>...</button> |
Defines a clickable button. |
<h1> –<h6> |
<h1>...</h1> |
Define headings of different levels. |
<span> |
<span>...</span> |
Defines a generic inline container. |
<label> |
<label for="...">...</label> |
Defines a label for an input element. |
<iframe> |
<iframe src="..."></iframe> |
Embeds an inline frame for external content. |
Examples of Commonly used tags in HTML
Example 1: This example shows the implementation Document structure tag with an example
HTML
< html > < head > < title >Title of your web page</ title > </ head > < body > HTML web page contents </ body > </ html > |
Output:
Example 2: In this example we starts with <!DOCTYPE html>, setting HTML5 type. <html lang=”en”> defines English language. <head> contains metadata. <title> sets browser tab title. <body> contains visible content including common HTML tags like <div>, <h1>, <p>, <a>, and <img>.
HTML
<!DOCTYPE html> < html lang = "en" > < head > < meta charset = "UTF-8" /> < meta name = "viewport" content=" width = device -width, initial-scale = 1 .0" /> < title >Most commonly used tags in HTML</ title > </ head > < body > < div > < h1 >Welcome to Our Website!</ h1 > < p > We are glad to have you here. Explore our content and feel free to reach out if you have any questions. </ p > < img src = "https://media.w3wiki.net/wp-content/uploads/20240308152622/BeginnerLogo.png" alt = "About Us" /> </ a > < p > Learn more < a href = about us </ a >. </ p > </ div > </ body > </ html > |
Output:
HTML is the foundation of web pages and is used for webpage development by structuring websites and web apps. You can learn HTML from the ground up by following this HTML Tutorial and HTML Examples.
Supported Browsers: