HTML Tag Explainer

A quick reference guide for standard HTML tags.

Document Structure

<html>

The root element of an HTML page.

<head>

Contains machine-readable information (metadata) about the document.

<title>

Specifies a title for the HTML page (which is shown in the browser's title bar or tab).

<base>

Specifies the base URL/target for all relative URLs in a document.

<link>

Defines the relationship between the current document and an external resource (most often used to link to stylesheets).

<meta>

Defines metadata about an HTML document, such as character set, page description, keywords, author, and viewport settings.

<style>

Contains style information (CSS) for a document.

<script>

Used to embed a client-side script (JavaScript).

<noscript>

Defines an alternate content for users that have disabled scripts in their browser or have a browser that doesn't support script.

<body>

Defines the document's body, which contains all the contents of an HTML document.

Sectioning & Headings

<address>

Defines contact information for the author/owner of a document or an article.

<article>

Specifies independent, self-contained content.

<aside>

Defines some content aside from the content it is placed in (like a sidebar).

<footer>

Defines a footer for a document or section.

<header>

Represents a container for introductory content or a set of navigational links.

<h1> to <h6>

Define HTML headings, from most important (h1) to least important (h6).

<main>

Specifies the main content of a document.

<nav>

Defines a set of navigation links.

<section>

Defines a section in a document.

Text Content

<blockquote>

Defines a section that is quoted from another source.

<div>

Defines a division or a section, often used as a container for other HTML elements.

<p>

Defines a paragraph.

<pre>

Defines preformatted text, preserving spaces and line breaks.

<hr>

Represents a thematic break between paragraph-level elements (e.g., a horizontal rule).

Inline Text Semantics

<a>

Defines a hyperlink.

<b>

Defines bold text without any extra importance, such as keywords.

<i>

Defines a part of text in an alternate voice or mood (often italicized).

<u>

Defines text that should be stylistically different from normal text, such as a misspelled word.

<span>

An inline container used to mark up a part of a text, or a part of a document.

<strong>

Defines text with strong importance, indicating that its contents have a higher degree of seriousness or urgency.

<em>

Defines emphasized text.

<code>

Defines a piece of computer code.

<br>

Inserts a single line break.

<mark>

Defines marked or highlighted text for reference purposes.

<sub>

Defines subscripted text.

<sup>

Defines superscripted text.

<time>

Defines a specific time (or datetime).

<abbr>

Defines an abbreviation or an acronym.

<cite>

Defines the title of a creative work (e.g., a book, a poem, a song, a movie).

<dfn>

Specifies a term that is going to be defined within the content.

<q>

Defines a short inline quotation.

<small>

Defines smaller text (like copyright and other side-comments).

<wbr>

Defines a word-break opportunity, where a long word can be broken if needed.

Lists

<ul>

Defines an unordered (bulleted) list.

<ol>

Defines an ordered (numbered) list.

<li>

Defines a list item.

<dl>

Defines a description list.

<dt>

Defines a term/name in a description list.

<dd>

Describes a term/name in a description list.

Tables

<table>

Defines an HTML table.

<caption>

Defines a table caption.

<th>

Defines a header cell in a table.

<tr>

Defines a row in a table.

<td>

Defines a standard cell in a table.

<thead>

Groups the header content in a table.

<tbody>

Groups the body content in a table.

<tfoot>

Groups the footer content in a table.

<col>

Specifies column properties for each column within a <colgroup> element.

<colgroup>

Specifies a group of one or more columns in a table for formatting.

Forms

<form>

Used to create an HTML form for user input.

<input>

Specifies an input field where the user can enter data.

<textarea>

Defines a multi-line text input control.

<button>

Defines a clickable button.

<label>

Defines a label for several form elements.

<select>

Creates a drop-down list.

<option>

Defines an option in a drop-down list.

<fieldset>

Groups related elements in a form.

<legend>

Defines a caption for the <fieldset> element.

<datalist>

Specifies a list of pre-defined options for an <input> element.

<optgroup>

Groups related options in a drop-down list.

<output>

Represents the result of a calculation or user action.

<progress>

Represents the progress of a task.

<meter>

Defines a scalar measurement within a known range (a gauge).

Images & Media

<img>

Embeds an image in an HTML page.

<video>

Embeds video content.

<audio>

Embeds sound content.

<figure>

Specifies self-contained content, like illustrations, diagrams, photos, code listings, etc.

<figcaption>

Defines a caption for a <figure> element.

<picture>

Provides multiple image resources for a <img> element to adapt to different devices or screen sizes.

<source>

Defines multiple media resources for <picture>, <audio>, or <video> elements.

<svg>

Defines a container for SVG graphics.

<canvas>

Used to draw graphics, on the fly, via scripting (usually JavaScript).

<map>

Defines a client-side image-map.

<area>

Defines an area inside an image-map.

Interactive Elements

<details>

Defines additional details that the user can view or hide.

<summary>

Defines a visible heading for a <details> element.

<dialog>

Defines a dialog box or window.

Web Components

<template>

A mechanism for holding client-side content that is not to be rendered when a page is loaded but may subsequently be instantiated during runtime using JavaScript.

<slot>

A placeholder inside a web component that you can fill with your own markup.

ToolStack - Free Privacy-Focused Online Tools