Complete List of HTML Tags
HTML (HyperText Markup Language) is the foundation of every website. It uses tags to structure and present content on the web. Whether you're a beginner or an experienced developer, having a solid understanding of HTML tags is crucial. Here is the list of all HTML tags, along with their descriptions, to help you master web development.
1. Document Structure Tags
Tag |
Description |
<!DOCTYPE> |
Declares the document type and HTML version to the browser. |
<html> |
The root element that wraps all content on the webpage. |
<head> |
Contains metadata, such as the title, character set, and links to external resources. |
<title> |
Sets the title of the webpage, displayed in the browser tab. |
<body> |
Holds the visible content of the webpage, such as text, images, and links. |
2. Text Formatting and Semantic Tags
Tag |
Description |
<h1> to <h6> |
Defines headings, with <h1> as the most important and <h6> as the least. |
<p> |
Represents a paragraph of text. |
<br> |
Inserts a single line break within text. |
<hr> |
Creates a horizontal line to separate content. |
<strong> |
Indicates strong importance, usually displayed in bold. |
<em> |
Emphasizes text, typically displayed in italics. |
<u> |
Underlines text for emphasis or styling. |
<s> |
Displays text with a strikethrough effect. |
<sup> |
Renders text as superscript (e.g., for exponents). |
<sub> |
Renders text as subscript (e.g., for chemical formulas). |
3. Links and Media Tags
Tag |
Description |
<a> |
Creates a hyperlink to another webpage or resource. |
<img> |
Embeds an image into the document. |
<map> |
Defines an image map with clickable areas. |
<area> |
Specifies a clickable region within an image map. |
<audio> |
Embeds audio files, such as music or podcasts. |
<video> |
Embeds video content into the webpage. |
<source> |
Specifies multiple media sources for <audio> and <video> elements. |
<track> |
Adds subtitles or captions to media elements. |
<embed> |
Inserts external content, such as plugins or interactive elements. |
<iframe> |
Embeds another webpage within the current page. |
4. List and Description Tags
Tag |
Description |
<ul> |
Defines an unordered (bulleted) list. |
<ol> |
Defines an ordered (numbered) list. |
<li> |
Represents an item within a list. |
<dl> |
Creates a description list. |
<dt> |
Defines a term in a description list. |
<dd> |
Provides the description or definition of the term in a <dl> . |
5. Table Tags
Tag |
Description |
<table> |
Defines a table to organize data into rows and columns. |
<tr> |
Represents a row in a table. |
<th> |
Defines a header cell in a table. |
<td> |
Represents a standard data cell in a table. |
<caption> |
Adds a title or description to a table. |
<thead> |
Groups header content in a table. |
<tbody> |
Groups the main content of a table. |
<tfoot> |
Groups footer content in a table. |
6. Form and Input Tags
Tag |
Description |
<form> |
Creates a form to collect user input. |
<input> |
Defines an input field, such as text, password, or checkbox. |
<textarea> |
Creates a multi-line text input field. |
<button> |
Defines a clickable button. |
<label> |
Associates a label with a form element for better accessibility. |
<select> |
Creates a dropdown list for user selection. |
<option> |
Represents an item in a dropdown list. |
<fieldset> |
Groups related form elements together. |
<legend> |
Adds a caption to a <fieldset> . |
7. Semantic and Structural Tags
Tag |
Description |
<header> |
Represents the introductory content or navigation links for a section or page. |
<footer> |
Defines the footer of a section or page, often containing copyright information. |
<nav> |
Contains navigation links for the webpage. |
<section> |
Defines a standalone section of content. |
<article> |
Represents self-contained content, such as a blog post or news article. |
<aside> |
Contains content that is tangentially related to the main content, like a sidebar. |
<main> |
Represents the primary content of the document. |
<figure> |
Encapsulates media content, such as images or diagrams. |
<figcaption> |
Adds a caption or description to a <figure> . |
8. Metadata and Resource Tags
Tag |
Description |
<meta> |
Provides metadata about the document, such as character encoding or viewport settings. |
<link> |
Links external resources, such as stylesheets or icons, to the document. |
<style> |
Embeds CSS styles directly within the HTML document. |
<base> |
Specifies the base URL for all relative URLs in the document. |
9. Interactive and Scripting Tags
Tag |
Description |
<details> |
Creates a collapsible section of content. |
<summary> |
Provides a summary or label for a <details> element. |
<dialog> |
Defines a dialog box or modal window. |
<script> |
Embeds or references JavaScript code. |
<noscript> |
Provides fallback content for users who have disabled JavaScript. |
10. Deprecated Tags (Avoid Using)
Tag |
Description |
<center> |
Centers text horizontally (use CSS instead). |
<font> |
Defines font size, color, and type (use CSS instead). |
<strike> |
Displays text with a strikethrough (use <s> or CSS instead). |
Done.!
HTML tags are the building blocks of the web. By mastering these tags, you can create well-structured, accessible, and visually appealing websites. This comprehensive and updated list ensures you have all the tools you need to excel in web development. Bookmark this guide for quick reference and share it with fellow developers!