1. Index
    1. Elements
    2. Element content categories
    3. Attributes
    4. Element interfaces
    5. All interfaces
    6. Events
    7. HTTP headers
    8. MIME types

Index

The following sections only cover conforming elements and features.

Elements

This section is non-normative.

List of elements
Element Description Categories Parents† Children Attributes Interface
a Hyperlink flow ; phrasing *; interactive ; palpable phrasing transparent * globals ; href ; target ; download ; ping ; rel ; hreflang ; type ; referrerpolicy HTMLAnchorElement
abbr Abbreviation flow ; phrasing ; palpable phrasing phrasing globals HTMLElement
address Contact information for a page or article element flow ; palpable flow flow * globals HTMLElement
area Hyperlink or dead area on an image map flow ; phrasing phrasing * empty globals ; alt ; coords ; shape ; href ; target ; download ; ping ; rel ; referrerpolicy HTMLAreaElement
article Self-contained syndicatable or reusable composition flow ; sectioning ; palpable flow flow globals HTMLElement
aside Sidebar for tangentially related content flow ; sectioning ; palpable flow flow globals HTMLElement
audio Audio player flow ; phrasing ; embedded ; interactive ; palpable * phrasing source *; track *; transparent * globals ; src ; crossorigin ; preload ; autoplay ; loop ; muted ; controls HTMLAudioElement
b Keywords flow ; phrasing ; palpable phrasing phrasing globals HTMLElement
base Base URL and default target navigable for hyperlinks and forms metadata head empty globals ; href ; target HTMLBaseElement
bdi Text directionality isolation flow ; phrasing ; palpable phrasing phrasing globals HTMLElement
bdo Text directionality formatting flow ; phrasing ; palpable phrasing phrasing globals HTMLElement
blockquote A section quoted from another source flow ; palpable flow flow globals ; cite HTMLQuoteElement
body Document body none html flow globals ; onafterprint ; onbeforeprint ; onbeforeunload ; onhashchange ; onlanguagechange ; onmessage ; onmessageerror ; onoffline ; ononline ; onpageswap ; onpagehide ; onpagereveal ; onpageshow ; onpopstate ; onrejectionhandled ; onstorage ; onunhandledrejection ; onunload HTMLBodyElement
br Line break, e.g. in poem or postal address flow ; phrasing phrasing empty globals HTMLBRElement
button Button control flow ; phrasing ; interactive ; listed ; labelable ; submittable ; form-associated ; palpable phrasing phrasing * globals ; command ; commandfor ; disabled ; form ; formaction ; formenctype ; formmethod ; formnovalidate ; formtarget ; name ; popovertarget ; popovertargetaction ; type ; value HTMLButtonElement
canvas Scriptable bitmap canvas flow ; phrasing ; embedded ; palpable phrasing transparent globals ; width ; height HTMLCanvasElement
caption Table caption none table flow * globals HTMLTableCaptionElement
cite Title of a work flow ; phrasing ; palpable phrasing phrasing globals HTMLElement
code Computer code flow ; phrasing ; palpable phrasing phrasing globals HTMLElement
col Table column none colgroup empty globals ; span HTMLTableColElement
colgroup Group of columns in a table none table col *; template * globals ; span HTMLTableColElement
data Machine-readable equivalent flow ; phrasing ; palpable phrasing phrasing globals ; value HTMLDataElement
datalist Container for options for combo box control flow ; phrasing phrasing phrasing *; option *; script-supporting elements * globals HTMLDataListElement
dd Content for corresponding dt element(s) none dl ; div * flow globals HTMLElement
del A removal from the document flow ; phrasing *; palpable phrasing transparent globals ; cite ; datetime HTMLModElement
details Disclosure control for hiding details flow ; interactive ; palpable flow summary *; flow globals ; name ; open HTMLDetailsElement
dfn Defining instance flow ; phrasing ; palpable phrasing phrasing * globals HTMLElement
dialog Dialog box or window flow flow flow globals ; open HTMLDialogElement
div Generic flow container, or container for name-value groups in dl elements flow ; palpable ; select element inner content elements ; optgroup element inner content elements ; option element inner content elements flow ; dl ; select element inner content elements ; optgroup element inner content elements ; option element inner content elements flow select element inner content elements *; optgroup element inner content elements *; option element inner content elements * globals HTMLDivElement
dl Association list consisting of zero or more name-value groups flow ; palpable flow dt *; dd *; div *; script-supporting elements globals HTMLDListElement
dt Legend for corresponding dd element(s) none dl ; div * flow * globals HTMLElement
em Stress emphasis flow ; phrasing ; palpable phrasing phrasing globals HTMLElement
embed Plugin flow ; phrasing ; embedded ; interactive ; palpable phrasing empty globals ; src ; type ; width ; height ; any* HTMLEmbedElement
fieldset Group of form controls flow ; listed ; form-associated ; palpable flow legend *; flow globals ; disabled ; form ; name HTMLFieldSetElement
figcaption Caption for figure none figure flow globals HTMLElement
figure Figure with optional caption flow ; palpable flow figcaption *; flow globals HTMLElement
footer Footer for a page or section flow ; palpable flow flow * globals HTMLElement
form User-submittable form flow ; palpable flow flow * globals ; accept-charset ; action ; autocomplete ; enctype ; method ; name ; novalidate ; rel ; target HTMLFormElement
h1 , h2 , h3 , h4 , h5 , h6 Heading flow ; heading ; palpable legend ; summary ; flow phrasing globals HTMLHeadingElement
head Container for document metadata none html metadata content * globals HTMLHeadElement
header Introductory or navigational aids for a page or section flow ; palpable flow flow * globals HTMLElement
hgroup Heading container flow ; palpable legend ; summary ; flow h1 ; h2 ; h3 ; h4 ; h5 ; h6 ; p ; script-supporting elements globals HTMLElement
hr Thematic break flow ; select element inner content elements flow ; select element inner content elements empty globals HTMLHRElement
html Root element none none* head *; body * globals HTMLHtmlElement
i Alternate voice flow ; phrasing ; palpable phrasing phrasing globals HTMLElement
iframe Child navigable flow ; phrasing ; embedded ; interactive ; palpable phrasing empty globals ; src ; srcdoc ; name ; sandbox ; allow ; allowfullscreen ; width ; height ; referrerpolicy ; loading HTMLIFrameElement
img Image flow ; phrasing ; embedded ; interactive *; form-associated ; palpable phrasing ; picture empty globals ; alt ; src ; srcset ; sizes ; crossorigin ; usemap ; ismap ; width ; height ; referrerpolicy ; decoding ; loading ; fetchpriority HTMLImageElement
input Form control flow ; phrasing ; interactive *; listed ; labelable ; submittable ; resettable ; form-associated ; palpable * phrasing empty globals ; accept ; alpha ; alt ; autocomplete ; checked ; colorspace ; dirname ; disabled ; form ; formaction ; formenctype ; formmethod ; formnovalidate ; formtarget ; height ; list ; max ; maxlength ; min ; minlength ; multiple ; name ; pattern ; placeholder ; popovertarget ; popovertargetaction ; readonly ; required ; size ; src ; step ; type ; value ; width HTMLInputElement
ins An addition to the document flow ; phrasing *; palpable phrasing transparent globals ; cite ; datetime HTMLModElement
kbd User input flow ; phrasing ; palpable phrasing phrasing globals HTMLElement
label Caption for a form control flow ; phrasing ; interactive ; palpable phrasing phrasing * globals ; for HTMLLabelElement
legend Caption for fieldset none fieldset ; optgroup phrasing *; heading content globals HTMLLegendElement
li List item none ol ; ul ; menu * flow globals ; value * HTMLLIElement
link Link metadata metadata ; flow *; phrasing * head ; noscript *; phrasing * empty globals ; href ; crossorigin ; rel ; as ; media ; hreflang ; type ; sizes ; imagesrcset ; imagesizes ; referrerpolicy ; integrity ; blocking ; color ; disabled ; fetchpriority HTMLLinkElement
main Container for the dominant contents of the document flow ; palpable flow * flow globals HTMLElement
map Image map flow ; phrasing *; palpable phrasing transparent ; area * globals ; name HTMLMapElement
mark Highlight flow ; phrasing ; palpable phrasing phrasing globals HTMLElement
MathML math MathML root flow ; phrasing ; embedded ; palpable phrasing per [MATHML] per [MATHML] Element
menu Menu of commands flow ; palpable * flow li ; script-supporting elements globals HTMLMenuElement
meta Text metadata metadata ; flow *; phrasing * head ; noscript *; phrasing * empty globals ; name ; http-equiv ; content ; charset ; media HTMLMetaElement
meter Gauge flow ; phrasing ; labelable ; palpable phrasing phrasing * globals ; value ; min ; max ; low ; high ; optimum HTMLMeterElement
nav Section with navigational links flow ; sectioning ; palpable flow flow globals HTMLElement
noscript Fallback content for script metadata ; flow ; phrasing ; select element inner content elements ; optgroup element inner content elements head *; phrasing * varies* globals HTMLElement
object Image, child navigable , or plugin flow ; phrasing ; embedded ; interactive *; listed ; form-associated ; palpable phrasing transparent globals ; data ; type ; name ; form ; width ; height HTMLObjectElement
ol Ordered list flow ; palpable * flow li ; script-supporting elements globals ; reversed ; start ; type HTMLOListElement
optgroup Group of options in a list box select element inner content elements select ; div * optgroup element inner content elements ; legend * globals ; disabled ; label HTMLOptGroupElement
option Option in a list box or combo box control select element inner content elements ; optgroup element inner content elements select ; datalist ; optgroup ; div * text *; option element inner content elements * globals ; disabled ; label ; selected ; value HTMLOptionElement
output Calculated output value flow ; phrasing ; listed ; labelable ; resettable ; form-associated ; palpable phrasing phrasing globals ; for ; form ; name HTMLOutputElement
p Paragraph flow ; palpable flow phrasing globals HTMLParagraphElement
picture Image flow ; phrasing ; embedded ; palpable phrasing source *; one img ; script-supporting elements globals HTMLPictureElement
pre Block of preformatted text flow ; palpable flow phrasing globals HTMLPreElement
progress Progress bar flow ; phrasing ; labelable ; palpable phrasing phrasing * globals ; value ; max HTMLProgressElement
q Quotation flow ; phrasing ; palpable phrasing phrasing globals ; cite HTMLQuoteElement
rp Parenthesis for ruby annotation text none ruby text globals HTMLElement
rt Ruby annotation text none ruby phrasing globals HTMLElement
ruby Ruby annotation(s) flow ; phrasing ; palpable phrasing phrasing ; rt ; rp * globals HTMLElement
s Inaccurate text flow ; phrasing ; palpable phrasing phrasing globals HTMLElement
samp Computer output flow ; phrasing ; palpable phrasing phrasing globals HTMLElement
script Embedded script metadata ; flow ; phrasing ; script-supporting head ; phrasing ; script-supporting script, data, or script documentation* globals ; src ; type ; nomodule ; async ; defer ; crossorigin ; integrity ; referrerpolicy ; blocking ; fetchpriority HTMLScriptElement
search Container for search controls flow ; palpable flow flow globals HTMLElement
section Generic document or application section flow ; sectioning ; palpable flow flow globals HTMLElement
select List box control flow ; phrasing ; interactive ; listed ; labelable ; submittable ; resettable ; form-associated ; palpable phrasing select element inner content elements ; button * globals ; autocomplete ; disabled ; form ; multiple ; name ; required ; size HTMLSelectElement
selectedcontent Mirrors content from an option none button empty globals HTMLSelectedContentElement
slot Shadow tree slot flow ; phrasing phrasing transparent globals ; name HTMLSlotElement
small Side comment flow ; phrasing ; palpable phrasing phrasing globals HTMLElement
source Image source for img or media source for video or audio none picture ; video ; audio empty globals ; type ; media ; src ; srcset ; sizes ; width ; height HTMLSourceElement
span Generic phrasing container flow ; phrasing ; palpable phrasing ; option element inner content elements * phrasing globals HTMLSpanElement
strong Importance flow ; phrasing ; palpable phrasing phrasing globals HTMLElement
style Embedded styling information metadata head ; noscript * text* globals ; media ; blocking HTMLStyleElement
sub Subscript flow ; phrasing ; palpable phrasing phrasing globals HTMLElement
summary Caption for details none details phrasing ; heading content globals HTMLElement
sup Superscript flow ; phrasing ; palpable phrasing phrasing globals HTMLElement
SVG svg SVG root flow ; phrasing ; embedded ; palpable phrasing per [SVG] per [SVG] SVGSVGElement
table Table flow ; palpable flow caption *; colgroup *; thead *; tbody *; tfoot *; tr *; script-supporting elements globals HTMLTableElement
tbody Group of rows in a table none table tr ; script-supporting elements globals HTMLTableSectionElement
td Table cell none tr flow globals ; colspan ; rowspan ; headers HTMLTableCellElement
template Template metadata ; flow ; phrasing ; script-supporting metadata ; phrasing ; script-supporting ; colgroup * empty globals ; shadowrootmode ; shadowrootdelegatesfocus ; shadowrootclonable ; shadowrootserializable ; shadowrootcustomelementregistry HTMLTemplateElement
textarea Multiline text controls flow ; phrasing ; interactive ; listed ; labelable ; submittable ; resettable ; form-associated ; palpable phrasing text globals ; autocomplete ; cols ; dirname ; disabled ; form ; maxlength ; minlength ; name ; placeholder ; readonly ; required ; rows ; wrap HTMLTextAreaElement
tfoot Group of footer rows in a table none table tr ; script-supporting elements globals HTMLTableSectionElement
th Table header cell interactive * tr flow * globals ; colspan ; rowspan ; headers ; scope ; abbr HTMLTableCellElement
thead Group of heading rows in a table none table tr ; script-supporting elements globals HTMLTableSectionElement
time Machine-readable equivalent of date- or time-related data flow ; phrasing ; palpable phrasing phrasing globals ; datetime HTMLTimeElement
title Document title metadata head text * globals HTMLTitleElement
tr Table row none table ; thead ; tbody ; tfoot th *; td ; script-supporting elements globals HTMLTableRowElement
track Timed text track none audio ; video empty globals ; default ; kind ; label ; src ; srclang HTMLTrackElement
u Unarticulated annotation flow ; phrasing ; palpable phrasing phrasing globals HTMLElement
ul List flow ; palpable * flow li ; script-supporting elements globals HTMLUListElement
var Variable flow ; phrasing ; palpable phrasing phrasing globals HTMLElement
video Video player flow ; phrasing ; embedded ; interactive ; palpable phrasing source *; track *; transparent * globals ; src ; crossorigin ; poster ; preload ; autoplay ; playsinline ; loop ; muted ; controls ; width ; height HTMLVideoElement
wbr Line breaking opportunity flow ; phrasing phrasing empty globals HTMLElement
autonomous custom elements Author-defined elements flow ; phrasing ; palpable flow ; phrasing transparent globals ; any, as decided by the element's author Supplied by the element's author (inherits from HTMLElement )

An asterisk (*) in a cell indicates that the actual rules are more complicated than indicated in the table above.

† Categories in the "Parents" column refer to parents that list the given categories in their content model, not to elements that themselves are in those categories. For example, the a element's "Parents" column says "phrasing", so any element whose content model contains the "phrasing" category could be a parent of an a element. Since the "flow" category includes all the "phrasing" elements, that means the th element could be a parent to an a element.

Element content categories

This section is non-normative.

List of element content categories
Category Elements Elements with exceptions
Metadata content base ; link ; meta ; noscript ; script ; style ; template ; title
Flow content a ; abbr ; address ; article ; aside ; audio ; b ; bdi ; bdo ; blockquote ; br ; button ; canvas ; cite ; code ; data ; datalist ; del ; details ; dfn ; dialog ; div ; dl ; em ; embed ; fieldset ; figure ; footer ; form ; h1 ; h2 ; h3 ; h4 ; h5 ; h6 ; header ; hgroup ; hr ; i ; iframe ; img ; input ; ins ; kbd ; label ; map ; mark ; MathML math ; menu ; meter ; nav ; noscript ; object ; ol ; output ; p ; picture ; pre ; progress ; q ; ruby ; s ; samp ; script ; search ; section ; select ; slot ; small ; span ; strong ; sub ; sup ; SVG svg ; table ; template ; textarea ; time ; u ; ul ; var ; video ; wbr ; autonomous custom elements ; Text area (if it is a descendant of a map element); link (if it is allowed in the body ); main (if it is a hierarchically correct main element ); meta (if the itemprop attribute is present)
Sectioning content article ; aside ; nav ; section
Heading content h1 ; h2 ; h3 ; h4 ; h5 ; h6 ; hgroup
Phrasing content a ; abbr ; audio ; b ; bdi ; bdo ; br ; button ; canvas ; cite ; code ; data ; datalist ; del ; dfn ; em ; embed ; i ; iframe ; img ; input ; ins ; kbd ; label ; map ; mark ; MathML math ; meter ; noscript ; object ; output ; picture ; progress ; q ; ruby ; s ; samp ; script ; select ; selectedcontent ; slot ; small ; span ; strong ; sub ; sup ; SVG svg ; template ; textarea ; time ; u ; var ; video ; wbr ; autonomous custom elements ; Text area (if it is a descendant of a map element); link (if it is allowed in the body ); meta (if the itemprop attribute is present)
Embedded content audio ; canvas ; embed ; iframe ; img ; MathML math ; object ; picture ; SVG svg ; video
Interactive content button ; details ; embed ; iframe ; label ; select ; textarea a (if the href attribute is present); audio (if the controls attribute is present); img (if the usemap attribute is present); input (if the type attribute is not in the Hidden state); video (if the controls attribute is present)
Form-associated elements button ; fieldset ; input ; label ; object ; output ; select ; textarea ; img ; form-associated custom elements
Listed elements button ; fieldset ; input ; object ; output ; select ; textarea ; form-associated custom elements
Submittable elements button ; input ; select ; textarea ; form-associated custom elements
Resettable elements input ; output ; select ; textarea ; form-associated custom elements
Autocapitalize-and-autocorrect inheriting elements button ; fieldset ; input ; output ; select ; textarea
Labelable elements button ; input ; meter ; output ; progress ; select ; textarea ; form-associated custom elements
Palpable content a ; abbr ; address ; article ; aside ; b ; bdi ; bdo ; blockquote ; button ; canvas ; cite ; code ; data ; del ; details ; dfn ; div ; em ; embed ; fieldset ; figure ; footer ; form ; h1 ; h2 ; h3 ; h4 ; h5 ; h6 ; header ; hgroup ; i ; iframe ; img ; ins ; kbd ; label ; main ; map ; mark ; MathML math ; meter ; nav ; object ; output ; p ; picture ; pre ; progress ; q ; ruby ; s ; samp ; search ; section ; select ; small ; span ; strong ; sub ; sup ; SVG svg ; table ; textarea ; time ; u ; var ; video ; autonomous custom elements audio (if the controls attribute is present); dl (if the element's children include at least one name-value group); input (if the type attribute is not in the Hidden state); menu (if the element's children include at least one li element); ol (if the element's children include at least one li element); ul (if the element's children include at least one li element); Text that is not inter-element whitespace
Script-supporting elements script ; template
select element inner content elements option ; optgroup ; hr ; script-supporting elements ; noscript ; div
optgroup element inner content elements option ; script-supporting elements ; noscript ; div
option element inner content elements div phrasing content except for datalist , object , interactive content , or elements with tabindex

Attributes

This section is non-normative.

List of attributes (excluding event handler content attributes)
Attribute Element(s) Description Value
abbr th Alternative label to use for the header cell when referencing the cell in other contexts Text *
accept input Hint for expected file type in file upload controls Set of comma-separated tokens * consisting of valid MIME type strings with no parameters or audio/* , video/* , or image/*
accept-charset form Character encodings to use for form submission ASCII case-insensitive match for " UTF-8 "
accesskey HTML elements Keyboard shortcut to activate or focus element Ordered set of unique space-separated tokens , none of which are identical to another, each consisting of one code point in length
action form URL to use for form submission Valid non-empty URL potentially surrounded by spaces
allow iframe Permissions policy to be applied to the iframe 's contents Serialized permissions policy
allowfullscreen iframe Whether to allow the iframe 's contents to use requestFullscreen() Boolean attribute
alpha input Allow the color's alpha component to be set