HTML tags reference
Here is a list of all HTML tags supported by the HTML5 standard, along with their descriptions, and if they require a closing tag. Unsupported tags are listed separately.
Page info tags
These tags are used to define the document type and add other information that may be useful to the browser or search engine. They generally do not affect the look and feel of the content.
HTML Tag | Close Tag | Description |
---|---|---|
<!--...--> | ✓ | Denotes a comment |
<!DOCTYPE> | Specifies the document type | |
<base> | Acts as the base URI for all relative URIs in the document | |
<head> | ✓ | Surrounds the document's metadata |
<link> | Used to specify an external resource, such as a stylesheet | |
<meta> | Specifies meta data related to the document | |
<style> | ✓ | Used to specify the document's styles |
<title> | ✓ | The document's title |
Page layout and classifier tags
These tags are used to define how the page looks like as a whole, or to classify content into different sections.
HTML Tag | Close Tag | Description |
---|---|---|
<article> | ✓ | Specifies an article |
<aside> | ✓ | Aside content separated from the main content |
<body> | ✓ | The document's body |
<div> | ✓ | Specifies a section |
<footer> | ✓ | The document's footer |
<header> | ✓ | The document's header |
<hr> | Used as a separator in the content | |
<html> | ✓ | The main HTML document |
<main> | ✓ | The main content of a document |
<nav> | ✓ | Navigation bar |
<section> | ✓ | A section within the document |
Tags used to style elements
The below tags are used to define how a particular piece of content will look.
HTML Tag | Close Tag | Description |
---|---|---|
<abbr> | ✓ | Abbreviation or an acronym |
<address> | ✓ | Contact information |
<b> | ✓ | Bold text |
<bdi> | ✓ | Isolates text that may go in a different direction |
<bdo> | ✓ | Overrides the current text direction |
<blockquote> | ✓ | Section quoted from another source |
<br> | A single line break | |
<caption> | ✓ | A table caption |
<cite> | ✓ | Title of a work |
<code> | ✓ | A piece of computer code |
<col> | Column properties for each column within a <colgroup> element | |
<colgroup> | ✓ | Group of one or more columns in a table for formatting |
<data> | ✓ | Machine-readable translation of a given content |
<dd> | ✓ | Description of a term in a description list |
<del> | ✓ | Deleted text |
<details> | ✓ | Additional details that can be hidden |
<dfn> | ✓ | A term that is going to be defined within the content |
<dl> | ✓ | A description list |
<dt> | ✓ | A term in a description list |
<em> | ✓ | Emphasized text |
<figcaption> | ✓ | Caption for a <figure> element |
<h1> | ✓ | Biggest HTML heading |
<h2> | ✓ | Level 2 HTML heading |
<h3> | ✓ | Level 3 HTML heading |
<h4> | ✓ | Level 4 HTML heading |
<h5> | ✓ | Level 5 HTML heading |
<h6> | ✓ | Level 6 HTML heading |
<i> | ✓ | Alternative text |
<ins> | ✓ | Text that has been inserted into a document |
<kbd> | ✓ | Keyboard input |
<li> | ✓ | A list item |
<mark> | ✓ | Marked/highlighted text |
<meter> | ✓ | A gauge |
<noscript> | ✓ | Alternative content if client-side scripts are not supported |
<ol> | ✓ | An ordered list |
<output> | ✓ | The result of a calculation |
<p> | ✓ | A paragraph |
<pre> | ✓ | Preformatted text |
<progress> | ✓ | Progress of a task |
<q> | ✓ | A short quotation |
<rp> | ✓ | Alternative for browsers that do not support ruby annotations |
<rt> | ✓ | Explanation of characters |
<ruby> | ✓ | Defines a ruby annotation |
<s> | ✓ | Text that is no longer correct |
<samp> | ✓ | Sample output from a computer program |
<small> | ✓ | Specifies smaller text |
<span> | ✓ | Specifies a section in a document |
<strong> | ✓ | Specifies important text |
<sub> | ✓ | Subscripted text |
<summary> | ✓ | Visible heading for a <details> element |
<sup> | ✓ | Superscripted text |
<table> | ✓ | Specifies a table |
<tbody> | ✓ | Groups the body content in a table |
<td> | ✓ | Defines a cell in a table |
<template> | ✓ | Container for content that should be hidden when the page loads |
<tfoot> | ✓ | Groups footer content in a table |
<th> | ✓ | A header cell in a table |
<thead> | ✓ | Groups the header content in a table |
<time> | ✓ | Specifies a specific time |
<tr> | ✓ | A row in a table |
<u> | ✓ | Text that is unarticulated and styled differently from normal text |
<ul> | ✓ | An unordered list |
<var> | ✓ | A variable |
<wbr> | ✓ | Specifies a possible line-break |
Forms and input tags
These tags are used to display and collect forms and other user input.
HTML Tag | Close Tag | Description |
---|---|---|
<button> | ✓ | Clickable button |
<datalist> | ✓ | List of pre-defined options for input controls |
<dialog> | ✓ | A dialog box or window |
<fieldset> | ✓ | Groups related elements in a form |
<form> | ✓ | HTML form for user input |
<input> | An input control | |
<label> | ✓ | Label for an <input> element |
<legend> | ✓ | Caption for a <fieldset> element |
<optgroup> | ✓ | Group of related options in a drop-down list |
<option> | ✓ | An option in a drop-down list |
<select> | ✓ | Drop-down list |
<textarea> | ✓ | A multiline input text area |
Interact with external resources
These tags are used to load or link to external resources. The <a> tag for example, is the primary way of navigating to another page or section for web pages.
HTML Tag | Close Tag | Description |
---|---|---|
<a> | ✓ | A hyperlink |
<embed> | Container for an external application | |
<iframe> | ✓ | Inline frame |
<object> | ✓ | Container for an external application |
<param> | Parameter for an object | |
<script> | ✓ | Loads a client-side script |
Photo, audio, and video content tags
These tags are used to load or display multimedia content, such as photos, and videos.
HTML Tag | Close Tag | Description |
---|---|---|
<area> | Area inside an image map | |
<audio> | ✓ | Embedded sound content |
<canvas> | ✓ | Used for drawing graphics |
<figure> | ✓ | Self-contained visual content |
<img> | Specifies an image | |
<map> | ✓ | Used to create an image map |
<picture> | ✓ | Container for multiple image resources |
<source> | Media resources for <video> and <audio> elements | |
<svg> | ✓ | Container for SVG graphics |
<track> | Tracks for <video> and <audio> elements | |
<video> | ✓ | Embedded video content |
HTML tags unsupported by HTML5
These tags are either deprecated or unsupported by the HTML5 standard, and should not be used.
HTML Tag | Close Tag | Purpose | Description | Alternative |
---|---|---|---|---|
<acronym> | ✓ | Layout | Used to specify an acronym | <abbr> |
<applet> | ✓ | Layout | An embedded applet | <embed> or <object> |
<basefont> | Style | Sets a default font, color, and size for all text | CSS | |
<big> | ✓ | Style | Specifies big text | CSS |
<center> | ✓ | Layout | Centers any content it surrounds | CSS |
<dir> | ✓ | Layout | A directory list | <ul> |
<font> | ✓ | Style | Defines font, color, and size for text | CSS |
<frame> | Layout | Specifies a window in a frameset | <iframe> or <div> | |
<frameset> | ✓ | Layout | Specifies a set of frames | <iframe> or <div> |
<noframes> | ✓ | Layout | Alternate content if frames are not supported | |
<strike> | ✓ | Style | Strikethrough text | <del> or <s> or CSS |
<tt> | ✓ | Style | Teletype text | <code> or CSS |