Common HTML Tags and Their Meanings
Basic Structure Tags
<!DOCTYPE html>
: Declares the document as an HTML5 document.
<html>
: The root element of an HTML page.
<head>
: Contains metadata about the document.
<title>
: Sets the title of the webpage.
<body>
: Contains the visible content.
<div>
: Generic container for grouping.
<style>
: Embeds CSS styles.
Text Content Tags
<h1>
to <h6>
: Headings (importance levels).
<p>
: Represents a paragraph.
<span>
: Inline container for text.
<b>
: Bolds text.
<i>
: Italicizes text.
<u>
: Underlines text.
<br>
: Inserts a line break.
Lists
<ul>
: Unordered list (bullet points).
<ol>
: Ordered list (numbered).
<li>
: List item.
<dl>
: Description list.
<dt>
: Term in a description list.
<dd>
: Description in a description list.
Links and Images
<a>
: Creates a hyperlink.
<img>
: Embeds an image.
Tables
<table>
: Creates a table.
<tr>
: Defines a table row.
<th>
: Defines a table header cell.
<td>
: Defines a table data cell.
<caption>
: Provides a caption for the table.
Forms
<form>
: Creates a form for user input.
<input>
: Various types of input fields.
<label>
: Provides a label for an input field.
<button>
: Creates a clickable button.
<select>
: Creates a dropdown list.
<option>
: Defines an option in a dropdown.
<textarea>
: Multi-line text input area.
Semantic Structure Tags (HTML5)
<header>
: Header content of a page/section.
<nav>
: Section of navigation links.
<main>
: Main content of the document.
<article>
: Self-contained piece of content.
<section>
: Thematic grouping of content.
<aside>
: Tangentially related content.
<footer>
: Footer content of a page/section.
Media Tags
<audio>
: Embeds audio content.
<video>
: Embeds video content.
<source>
: Specifies media resources for <audio>
and <video>
.
<track>
: Provides subtitles, captions, or other text tracks for media.
Embedded Content
<iframe>
: Embeds another HTML document within the current page.
<object>
: Embeds external content (e.g., Flash, PDF).
<embed>
: Embeds external content (deprecated).
Scripting and Data
<script>
: Embeds or references JavaScript code.
<noscript>
: Provides alternative content for browsers without JavaScript.
<canvas>
: Drawing area for graphics (via JavaScript).
<svg>
: Embeds scalable vector graphics.
<template>
: Defines a template for client-side content rendering.
Other Elements
<address>
: Contact information.
<blockquote>
: Quoted section.
<cite>
: Title of a creative work.
<details>
: Disclosure widget (show/hide content).
<summary>
: Heading for disclosed content (within <details>
).
<mark>
: Highlights text.
<time>
: Represents a date and/or time.
<progress>
: Represents progress of a task.
<meter>
: Represents a scalar measurement.