When you look at HTML overviews (e.g., take the HTML elements index or my free ebook listing all HTML elements and attributes), you get a quick sense of what HTML elements mean (i.e., their semantics).
But when you have a closer look, you may actually need more than “heading” or “hyperlink” to understand what an element represents.
To provide a comprehensive semantics overview, here are the HTML spec’s first paragraphs for all the 113 HTML elements (that is, not including MathML and SVG):
-
a - If the
aelement has anhrefattribute, then it represents a hyperlink (a hypertext anchor) labeled by its contents. If theaelement has nohrefattribute, then the element represents a placeholder for where a link might otherwise have been placed, if it had been relevant, consisting of just the element’s contents. -
abbr - The
abbrelement represents an abbreviation or acronym, optionally with its expansion. Thetitleattribute may be used to provide an expansion of the abbreviation. The attribute, if specified, must contain an expansion of the abbreviation, and nothing else. -
address - The
addresselement represents the contact information for its nearestarticleorbodyelement ancestor. If that is thebodyelement, then the contact information applies to the document as a whole. -
area - The
areaelement represents either a hyperlink with some text and a corresponding area on an image map, or a dead area on an image map. -
article - The
articleelement represents a complete, or self-contained, composition in a document, page, application, or site and that is, in principle, independently distributable or reusable, e.g. in syndication. This could be a forum post, a magazine or newspaper article, a blog entry, a user-submitted comment, an interactive widget or gadget, or any other independent item of content. -
aside - The
asideelement represents a section of a page that consists of content that is tangentially related to the content around theasideelement, and which could be considered separate from that content. Such sections are often represented as sidebars in printed typography. -
audio - An
audioelement represents a sound or audio stream. -
b - The
belement represents a span of text to which attention is being drawn for utilitarian purposes without conveying any extra importance and with no implication of an alternate voice or mood, such as key words in a document abstract, product names in a review, actionable words in interactive text-driven software, or an article lede. -
base - The
baseelement allows authors to specify the document base URL for the purposes of parsing URLs, and the name of the default navigable for the purposes of following hyperlinks. The element does not represent any content beyond this information. -
bdi - The
bdielement represents a span of text that is to be isolated from its surroundings for the purposes of bidirectional text formatting. -
bdo - The
bdoelement represents explicit text directionality formatting control for its children. It allows authors to override the Unicode bidirectional algorithm by explicitly specifying a direction override. -
blockquote - The
blockquoteelement represents a section that is quoted from another source. -
body - The
bodyelement represents the contents of the document. -
br - The
brelement represents a line break. -
button - The
buttonelement represents a button labeled by its contents. -
canvas - The
buttonelement represents a button labeled by its contents. -
caption - The
captionelement represents the title of thetablethat is its parent, if it has a parent and that is atableelement. -
cite - The
citeelement represents the title of a work (e.g. a book, a paper, an essay, a poem, a score, a song, a script, a film, a TV show, a game, a sculpture, a painting, a theatre production, a play, an opera, a musical, an exhibition, a legal case report, a computer program, etc.). This can be a work that is being quoted or referenced in detail (i.e., a citation), or it can just be a work that is mentioned in passing. A person’s name is not the title of a work—even if people call that person a piece of work—and the element must therefore not be used to mark up people’s names. -
code - The
codeelement represents a fragment of computer code. This could be an XML element name, a filename, a computer program, or any other string that a computer would recognize. -
col - If a
colelement has a parent and that is acolgroupelement that itself has a parent that is atableelement, then thecolelement represents one or more columns in the column group represented by thatcolgroup. -
colgroup - The
colgroupelement represents a group of one or more columns in thetablethat is its parent, if it has a parent and that is atableelement. -
data - The
dataelement represents its contents, along with a machine-readable form of those contents in thevalueattribute. -
datalist - The
datalistelement represents a set ofoptionelements that represent predefined options for other controls. In the rendering, thedatalistelement represents nothing and it, along with its children, should be hidden. -
dd - The
ddelement represents the description, definition, or value, part of a term-description group in a description list (dlelement). -
del - The
delelement represents a removal from the document. -
details - The
detailselement represents a disclosure widget from which the user can obtain additional information or controls. -
dfn - The
dfnelement represents the defining instance of a term. The paragraph, description list group, or section that is the nearest ancestor of thedfnelement must also contain the definition(s) for the term given by thedfnelement. -
dialog - The
dialogelement represents a transitory part of an application, in the form of a small window (“dialog box”), which the user interacts with to perform a task or gather information. Once the user is done, the dialog can be automatically closed by the application, or manually closed by the user. -
div - The
divelement has no special meaning at all. It represents its children. It can be used with theclass,lang, andtitleattributes to mark up semantics common to a group of consecutive elements. It can also be used in adlelement, wrapping groups ofdtandddelements. -
dl - The
dlelement represents an association list consisting of zero or more name-value groups (a description list). A name-value group consists of one or more names (dtelements, possibly as children of adivelement child) followed by one or more values (ddelements, possibly as children of adivelement child), ignoring any nodes other thandtandddelement children, anddtandddelements that are children ofdivelement children. Within a singledlelement, there should not be more than onedtelement for each name. -
dt - The
dtelement represents the term, or name, part of a term-description group in a description list (dlelement). -
em - The
emelement represents stress emphasis of its contents. -
embed - The
embedelement provides an integration point for an external application or interactive content. -
fieldset - The
fieldsetelement represents a set of form controls (or other content) grouped together, optionally with a caption. The caption is given by the firstlegendelement that is a child of thefieldsetelement, if any. The remainder of the descendants form the group. -
figcaption - The
figcaptionelement represents a caption or legend for the rest of the contents of thefigcaptionelement’s parentfigureelement, if any. -
figure - The
figureelement represents some flow content, optionally with a caption, that is self-contained (like a complete sentence) and is typically referenced as a single unit from the main flow of the document. -
footer - The
footerelement represents a footer for its nearest ancestor sectioning content element, or for the body element if there is no such ancestor. A footer typically contains information about its section such as who wrote it, links to related documents, copyright data, and the like. When thefooterelement contains entire sections, they represent appendices, indices, long colophons, verbose license agreements, and other such content. -
form - The
formelement represents a hyperlink that can be manipulated through a collection of form-associated elements, some of which can represent editable values that can be submitted to a server for processing. -
h1 - [This element represents a heading for its section.]
-
h2 - [This element represents a heading for its section.]
-
h3 - [This element represents a heading for its section.]
-
h4 - [This element represents a heading for its section.]
-
h5 - [This element represents a heading for its section.]
-
h6 - [This element represents a heading for its section.]
-
head - The
headelement represents a collection of metadata for theDocument. -
header - The
headerelement represents a group of introductory or navigational aids. -
hgroup - The
hgroupelement represents a heading and related content. The element may be used to group anh1–h6element with one or morepelements containing content representing a subheading, alternative title, or tagline. -
hr - The
hrelement represents a paragraph-level thematic break, e.g., a scene change in a story, or a transition to another topic within a section of a reference book; alternatively, it represents a separator between a set of options of aselectelement. -
html - The
htmlelement represents the root of an HTML document. -
i - The
ielement represents a span of text in an alternate voice or mood, or otherwise offset from the normal prose in a manner indicating a different quality of text, such as a taxonomic designation, a technical term, an idiomatic phrase from another language, transliteration, a thought, or a ship name in Western texts. -
iframe - The
iframeelement represents its content navigable. -
img - An
imgelement represents an image. -
input - The
inputelement represents a typed data field, usually with a form control to allow the user to edit the data. -
ins - The
inselement represents an addition to the document. -
kbd - The
kbdelement represents user input (typically keyboard input, although it may also be used to represent other input, such as voice commands). -
label - The
labelelement represents a caption in a user interface. The caption can be associated with a specific form control, known as thelabelelement’s labeled control, either using theforattribute, or by putting the form control inside thelabelelement itself. -
legend - The
legendelement represents a caption for the rest of the contents of thelegendelement’s parentfieldsetelement, if any. Otherwise, if thelegendhas a parentoptgroupelement, then thelegendrepresents theoptgroup’s label. -
li - The
lielement represents a list item. If its parent element is anol,ul, ormenuelement, then the element is an item of the parent element’s list, as defined for those elements. Otherwise, the list item has no defined list-related relationship to any otherlielement. -
link - The
linkelement allows authors to link their document to other resources. -
main - The
mainelement represents the dominant contents of the document. -
map - The
mapelement, in conjunction with animgelement and anyareaelement descendants, defines an image map. The element represents its children. -
mark - The
markelement represents a run of text in one document marked or highlighted for reference purposes, due to its relevance in another context. When used in a quotation or other block of text referred to from the prose, it indicates a highlight that was not originally present but which has been added to bring the reader’s attention to a part of the text that might not have been considered important by the original author when the block was originally written, but which is now under previously unexpected scrutiny. When used in the main prose of a document, it indicates a part of the document that has been highlighted due to its likely relevance to the user’s current activity. -
menu - The
menuelement represents a toolbar consisting of its contents, in the form of an unordered list of items (represented bylielements), each of which represents a command that the user can perform or activate. -
meta - The
metaelement represents various kinds of metadata that cannot be expressed using thetitle,base,link,style, andscriptelements. -
meter - The
meterelement represents a scalar measurement within a known range, or a fractional value; for example disk usage, the relevance of a query result, or the fraction of a voting population to have selected a particular candidate. -
nav - The
navelement represents a section of a page that links to other pages or to parts within the page- a section with navigation links.
-
noscript - The
noscriptelement represents nothing if scripting is enabled, and represents its children if scripting is disabled. It is used to present different markup to user agents that support scripting and those that don’t support scripting, by affecting how the document is parsed. -
object - The
objectelement can represent an external resource, which, depending on the type of the resource, will either be treated as an image or as a child navigable. -
ol - The
olelement represents a list of items, where the items have been intentionally ordered, such that changing the order would change the meaning of the document. -
optgroup - The
optgroupelement represents a group of option elements with a common label. -
option - The
optionelement represents an option in aselectelement or as part of a list of suggestions in adatalistelement. -
output - The
outputelement represents the result of a calculation performed by the application, or the result of a user action. -
p - The
pelement represents a paragraph. -
picture - The
pictureelement is a container which provides multiple sources to its containedimgelement to allow authors to declaratively control or give hints to the user agent about which image resource to use, based on the screen pixel density, viewport size, image format, and other factors. It represents its children. -
pre - The
preelement represents a block of preformatted text, in which structure is represented by typographic conventions rather than by elements. -
progress - The
progresselement represents the completion progress of a task. The progress is either indeterminate, indicating that progress is being made but that it is not clear how much more work remains to be done before the task is complete (e.g. because the task is waiting for a remote host to respond), or the progress is a number in the range zero to a maximum, giving the fraction of work that has so far been completed. -
q - The
qelement represents some phrasing content quoted from another source. -
rp - The
rpelement can be used to provide parentheses or other content around a ruby text component of a ruby annotation, to be shown by user agents that don’t support ruby annotations. -
rt - The
rtelement marks the ruby text component of a ruby annotation. When it is the child of arubyelement, it doesn’t represent anything itself, but the ruby element uses it as part of determining what it represents. -
ruby - The
rubyelement allows one or more spans of phrasing content to be marked with ruby annotations. Ruby annotations are short runs of text presented alongside base text, primarily used in East Asian typography as a guide for pronunciation or to include other annotations. In Japanese, this form of typography is also known as furigana. -
s - The
selement represents contents that are no longer accurate or no longer relevant. -
samp - The
sampelement represents sample or quoted output from another program or computing system. -
script - The
scriptelement allows authors to include dynamic script, instructions to the user agent, and data blocks in their documents. The element does not represent content for the user. -
search - The
searchelement represents a part of a document or application that contains a set of form controls or other content related to performing a search or filtering operation. This could be a search of the web site or application; a way of searching or filtering search results on the current web page; or a global or Internet-wide search function. -
section - The
sectionelement represents a generic section of a document or application. A section, in this context, is a thematic grouping of content, typically with a heading. -
select - The
selectelement represents a control for selecting amongst a set of options. -
selectedcontent - The
selectedcontentelement reflects the contents of aselectelement’s currently selectedoptionelement.selectedcontentelements can be used to declaratively show the selectedoptionelement’s contents within theselectelement’s first childbuttonelement. -
slot - The
slotelement defines a slot. It is typically used in a shadow tree. Aslotelement represents its assigned nodes, if any, and its contents otherwise. -
small - The
smallelement represents side comments such as small print. -
source - The
sourceelement allows authors to specify multiple alternative source sets forimgelements or multiple alternative media resources for media elements. It does not represent anything on its own. -
span - The
spanelement doesn’t mean anything on its own, but can be useful when used together with the global attributes, e.g.class,lang, ordir. It represents its children. -
strong - The
strongelement represents strong importance, seriousness, or urgency for its contents. -
style - The
styleelement allows authors to embed CSS style sheets in their documents. Thestyleelement is one of several inputs to the styling processing model. The element does not represent content for the user. -
sub -
[…]thesubelement represents a subscript. -
summary - The
summaryelement represents a summary, caption, or legend for the rest of the contents of thesummaryelement’s parentdetailselement, if any. -
sup - The
supelement represents a superscript[…]. -
table - The
tableelement represents data with more than one dimension, in the form of a table. -
tbody - The
tbodyelement represents a block of rows that consist of a body of data for the parenttableelement, if thetbodyelement has a parent and it is a table. -
td - The
tdelement represents a data cell in a table. -
template - The
templateelement is used to declare fragments of HTML that can be cloned and inserted in the document by script. In a rendering, thetemplateelement represents nothing. -
textarea - The
textareaelement represents a multiline plain text edit control for the element’s raw value. The contents of the control represent the control’s default value. -
tfoot - The
tfootelement represents the block of rows that consist of the column summaries (footers) for the parenttableelement, if thetfootelement has a parent and it is atable. -
th - The
thelement represents a header cell in a table. -
thead - The
theadelement represents the block of rows that consist of the column labels (headers) and any ancillary non-header cells for the parenttableelement, if thetheadelement has a parent and it is atable. -
time - The
timeelement represents its contents, along with a machine-readable form of those contents in thedatetimeattribute. The kind of content is limited to various kinds of dates, times, time-zone offsets, and durations, as described below. -
title - The
titleelement represents the document’s title or name. Authors should use titles that identify their documents even when they are used out of context, for example in a user’s history or bookmarks, or in search results. The document’s title is often different from its first heading, since the first heading does not have to stand alone when taken out of context. -
tr - The
trelement represents a row of cells in a table. -
track - The
trackelement allows authors to specify explicit external timed text tracks for media elements. It does not represent anything on its own. -
u - The
uelement represents a span of text with an unarticulated, though explicitly rendered, non-textual annotation, such as labeling the text as being a proper name in Chinese text (a Chinese proper name mark), or labeling the text as being misspelt. -
ul - The
ulelement represents a list of items, where the order of the items is not important—that is, where changing the order would not materially change the meaning of the document. -
var - The
varelement represents a variable. This could be an actual variable in a mathematical expression or programming context, an identifier representing a constant, a symbol identifying a physical quantity, a function parameter, or just be a term used as a placeholder in prose. -
video - A
videoelement is used for playing videos or movies, and audio files with captions. -
wbr - The
wbrelement represents a line break opportunity.
Still brief, but significantly more useful, no? HTML is a journey.
All definitions as per the HTML Living Standard, unchanged, licensed under CC BY 4.0.
Top comments (0)