Permitted contents #
zero or more style elements, followed by flow content
The content of this document is also available as multiple HTML files.
This specification describes the fifth major version of the HTML language and provides the details necessary for producers of HTML content to create documents that conform to the language, as well as describing a speculative integration of ARIA attributes into the language. By design, it does not define related APIs nor attempt to specify how consumers of HTML content are meant to process documents.
This document is the 24 April 2012 Editor’s Draft of
HTML 5: The Markup Language (ARIA Edition).
If you’d like to comment on this document, the preferred
means for commenting is to submit your comments through the
HTML Working Group bugzilla database, with the Component field set to HTML5: The Markup Language
.
Alternatively, you can send comments by e-mail to
public-html-comments@w3.org
(archived).
This document is a working draft — all parts of it remain subject to significant change or removal, and some parts are currently incomplete; in particular, many elements currently lack complete documentation in the following subsections:
This document is a non-normative reference that provides details to help producers of HTML content create conformant documents, and to help others check the conformance of existing documents. It has the following design goals:
The first two of the above design goals make this reference similar in scope to the [HTML5 for Web Authors] subset of the normative [HTML5] full specification.
Certain purposes are intentionally out of scope for this reference document; specifically, it:
For implementation conformance criteria for HTML consumers and detailed information on related APIs, instead see the [HTML5] full specification.
Finally, because this document is intended for use strictly as a reference, it does not attempt to also be a tutorial or “how to” authoring guide.
The following is a list of terms that are used in other sections of this reference.
A-Z
and the corresponding characters in the range
a-z
are considered to also match.This reference does not itself normatively define any requirements.
This section defines the term document, and provides additional details related to the definition of that term. It is divided into the following parts:
The term document is used in this reference to mean an instance of the HTML language.
The HTML language is the language described in this reference; it is an abstract language that applications can potentially represent in memory in any number of possible ways, and that can be transmitted using any number of possible concrete syntaxes.
This reference describes two particular concrete syntaxes for the HTML language: One syntax, which is referred to throughout this reference as the HTML syntax, and another syntax, which is referred to throughout this reference as the XML syntax. Web browsers typically implement two separate parsers for processing documents: an HTML parser which is invoked when processing documents in the HTML syntax, and an XML parser which is invoked when processing documents in the XML syntax.
The HTML syntax is the syntax described in the HTML syntax section of this reference.
The XML syntax is defined by rules in the [XML] specification and in the [Namespaces In XML] specification; any syntax-level requirements for documents in the XML syntax described in this reference are intended to be the same as those defined in the XML specification.
The
HTML namespace
is defined as http://www.w3.org/1999/xhtml
.
The HTML namespace is the
namespace both for
documents in the HTML syntax
and for
documents in the XML syntax.
Documents that are served with the
text/html
MIME type
must
match the descriptions in this
reference for characteristics of
documents in the HTML syntax.
Documents that have an
HTML namespace
declaration and that are served with an XML MIME type
such as
text/xml
,
application/xml
, or
application/xhtml+xml
must
match the descriptions in this
reference for characteristics of
documents in the XML syntax.
There are two types of conformant documents:
A conformant document in the HTML syntax must consist of the following parts, in the following order:
The start tag and end tag of the html element can be omitted—as well as, possibly, the start tags and end tags of certain descendants of the html element—in which case the start tag and end tag are considered to be implied.
Documents in the HTML syntax must match the syntax described in the HTML syntax section of this reference.
In documents in the HTML syntax, the start tags and end tags of the html element and particular descendants of the html element can be omitted. In cases where tag omission of those particular elements occurs, the document can still be considered, conceptually, to contain the elements—but with their start tags and end tags implied.
The following is an example of a document with implied start tags and end tags for the html, head, and body elements. Note that it is nevertheless a complete, valid document.
<!DOCTYPE html> <title>A relatively minimal HTML document</title> <p>Hello World!</p>
The DOM tree constructed from that example by a conformant UA would look like this:
html
HTML
HEAD
TITLE
#text
: A relatively minimal HTML document
#text
: ↩
BODY
P
#text
: Hello World!
Note that the DOM tree includes the html, head, and body elements whose start tags and end tags are implied in the document.
A conformant document in the XML syntax must be a namespace-well-formed XML document, as defined in the [Namespaces in XML] specification, and its root element must be an html element.
Documents in the XML syntax must not make use of any features of the HTML syntax that do not follow XML well-formedness constraints (for example, documents in the XML syntax must not use unquoted attribute value syntax and must not omit tags).
In documents in the HTML syntax:
In documents in the XML syntax:
This section describes the HTML syntax in detail. In places, it also notes differences between the the HTML syntax and the XML syntax, but it does not describe the XML syntax in detail (the XML syntax is instead defined by rules in the [XML] specification and in the [Namespaces in XML] specification).
This section is divided into the following parts:
A doctype (sometimes capitalized as “DOCTYPE”) is an special instruction which, for legacy reasons that have to do with processing modes in browsers, is a required part of any document in the HTML syntax; it must match the characteristics of one of the following three formats:
A normal doctype consists of the following parts, in exactly the following order:
<!DOCTYPE
".HTML
".>
"
character.The following is an example of a conformant normal doctype.
<!DOCTYPE html>
A deprecated doctype consists of the following parts, in exactly the following order:
<!DOCTYPE
".HTML
".PUBLIC
"."
"
character or a
"'
"
character."
"
character or a
"'
"
character)."
"
character or a
"'
"
character."
"
character or a
"'
"
character).>
"
character.A permitted-public-ID-system-ID-combination is any combination of a public ID (the first quoted string in the doctype) and system ID (the second quoted string, if any, in the doctype) such that the combination corresponds to one of the six deprecated doctypes in the following list of deprecated doctypes:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN"> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
A legacy-tool-compatible doctype consists of the following parts, in exactly the following order:
<!DOCTYPE
".HTML
".SYSTEM
"."
"
character or a
"'
"
character.about:legacy-compat
"."
"
character or a
"'
"
character).>
"
character.The following is examples of a conformant legacy-tool-compatible doctype.
<!doctype HTML system "about:legacy-compat">
A character encoding declaration is a mechanism for specifying the character encoding used to store or transmit a document.
The following restrictions apply to character encoding declarations:
If the document does not start with a
U+FEFF BYTE ORDER MARK (BOM) character, and if its
encoding is not explicitly given by a
Content-Type
HTTP header, then the character
encoding used
must
be an
ASCII-compatible character encoding,
and, in addition, if that encoding isn't US-ASCII itself, then
the encoding
must
be specified using a
meta
element with a
charset
attribute or a meta
element
in the
encoding declaration
state.
If the document contains a meta
element with a
charset
attribute or a meta
element in the
encoding declaration state,
then the character encoding used
must
be an
ASCII-compatible character encoding.
An ASCII-compatible character encoding is one that is a superset of US-ASCII (specifically, ANSI_X3.4-1968) for bytes in the set 0x09, 0x0A, 0x0C, 0x0D, 0x20 - 0x22, 0x26, 0x27, 0x2C - 0x3F, 0x41 - 0x5A, and 0x61 - 0x7A.
Documents should not use UTF-32, JIS_C6226-1983, JIS_X0212-1990, HZ-GB-2312, JOHAB (Windows code page 1361), encodings based on ISO-2022, or encodings based on EBCDIC.
Documents must not use CESU-8, UTF-7, BOCU-1, or SCSU encodings.
In a document in the XML syntax, the XML declaration, as defined in the XML specification [XML] should be used to provide character-encoding information, if necessary.
An element’s content model defines the element’s structure: What contents (if any) the element can contain, as well as what attributes (if any) the element can have. The HTML elements section of this reference describes the content models for all of elements that are part of the HTML language. An element must not contain contents or attributes that are not part of its content model.
The contents of an element are any elements, character data, and comments that it contains. Attributes and their values are not considered to be the “contents” of an element.
The
text content
of an element is the value of the textContent
IDL
attribute of the element, as defined in
[DOM4].
A void element is an element whose content model never allows it to have contents under any circumstances. Void elements can have attributes.
The following is a complete list of the void elements in HTML:
The following list describes syntax rules for the the HTML syntax. Rules for the the XML syntax are defined in the XML specification [XML].
0–9
,
a–z
,
and
A–Z
.<
"
character./
"
character, which may be present only if the element is a
void element.>
"
character.<
"
character./
"
character>
"
character.If an element has both a start tag and an end tag, its end tag must be contained within the contents of the same element in which its start tag is contained. An end tag that is not contained within the same contents as its start tag is said to be a misnested tag.
In the following example, the
"</i>
"
end tag
is a
misnested tag,
because it is not contained
within the
contents
of the
b
element that contains its corresponding
"<i>
"
start tag.
<b>foo <i>bar</b> baz</i>
attributes for an element are expressed inside the element’s start tag. Attributes have a name and a value.
There must never be two or more attributes on the same start tag whose names are a case-insensitive match for each other.
The following list describes syntax rules for attributes in documents in the HTML syntax. Syntax rules for attributes in documents in the XML syntax. are defined in the XML specification [XML].
"
",
"'
",
">
",
"/
",
"=
",
the control characters,
and any characters that are not defined by Unicode.Name
production defined in
the XML specification [XML]
and that contain no
":
"
characters, and whose first three characters are not a
case-insensitive match
for the string "xml
".In the the HTML syntax, attributes can be specified in four different ways:
Certain attributes may be specified by providing just the attribute name, with no value.
In the following example, the
disabled
attribute is given with the empty attribute
syntax:
<input disabled>
Note that empty attribute syntax is exactly equivalent to specifying the empty string as the value for the attribute, as in the following example.
<input disabled="">
An unquoted attribute value is specified by providing the following parts in exactly the following order:
=
"
characterIn addition to the general requirements for attribute values, an unquoted attribute value has the following restrictions:
"
",
"'
",
"=
",
">
",
"<
",
or
"`
",
charactersIn the following example, the
value
attribute is given with the unquoted attribute value
syntax:
<input value=yes>
If the value of an attribute using the unquoted
attribute syntax is followed by a
"/
"
character, then there
must
be at least one
space character
after the value and before the
"/
"
character.
A single-quoted attribute value is specified by providing the following parts in exactly the following order:
=
"
character'
"
character'
"
character.In addition to the general requirements for attribute values, a single-quoted attribute value has the following restriction:
'
"
charactersIn the following example, the
type
attribute
is given with the single-quoted attribute value
syntax:
<input type='checkbox'>
A double-quoted attribute value is specified by providing the following parts in exactly the following order:
=
"
character"
"
character"
"
characterIn addition to the general requirements for attribute values, a double-quoted attribute value has the following restriction:
"
"
charactersIn the following example, the
title
attribute is
given with the double-quoted attribute value syntax:
<code title="U+003C LESS-THAN SIGN"><</code>
text in element contents (including in comments) and attribute values must consist of Unicode characters, with the following restrictions:
character data contains text, in some cases in combination with character references, along with certain additional restrictions. There are three types of character data that can occur in documents:
Certain elements contain normal character data. Normal character data can contain the following:
Normal character data has the following restrictions:
<
"
charactersIn documents in the HTML syntax, the title and textarea elements can contain replaceable character data. Replaceable character data can contain the following:
<
"
characters
Replaceable character data has the following restrictions:
</
"
followed by characters that are a
case-insensitive match
for the tag name of the element containing the
replaceable character data (for example,
"</title
" or
"</textarea
"),
followed by a
space character,
">
",
or
"/
".Replaceable character data, as described in this reference, is a feature of the HTML syntax that is not available in the XML syntax. Documents in the XML syntax must not contain replaceable character data as described in this reference; instead they must conform to all syntax constraints described in the XML specification [XML].
In documents in the HTML syntax, the script, and style elements can contain non-replaceable character data. Non-replaceable character data can contain the following:
<
"
characters
Non-replaceable character data has the following restrictions:
</
",
followed by characters that are a
case-insensitive match
for the tag name of the element containing the
replaceable character data (for example,
"</script
"
or
"</style
",
followed by a
space character,
">
",
or
"/
".Non-replaceable character data, as described in this reference, is a feature of the HTML syntax that is not available in the XML syntax. Documents in the XML syntax must not contain non-replaceable character data as described in this reference; instead they must conform to all syntax constraints defined in the XML specification [XML].
character references are a form of markup for representing single individual characters. There are three types of character references:
Named character references consist of the following parts in exactly the following order:
&
"
character.;
"
character.For further information about named character references, see [XML Entities].
The following is an example of a named character
reference for the character
"†
"
(U+2020 DAGGER).
†
Decimal numerical character references consist of the following parts, in exactly the following order.
&
"
character.#
"
character.0–9
,
representing a base-ten integer that itself is a Unicode
code point that is not
U+0000,
U+000D,
in the range U+0080–U+009F,
or in the range 0xD8000–0xDFFF (surrogates).;
"
character.The following is an example of a decimal numeric
character reference for the character
"†
"
(U+2020 DAGGER).
†
Hexadecimal numeric character references consist of the following parts, in exactly the following order.
&
"
character.#
"
character.x
"
character
or a
"X
"
character.0–9
,
a–f
,
and
A–F
,
representing a base-sixteen integer that itself is a
Unicode code point that is not
U+0000,
U+000D,
in the range U+0080–U+009F,
or in the range 0xD800–0xDFFF (surrogates).;
"
character.The following is an example of a hexadecimal numeric
character reference for the character
"†
"
(U+2020 DAGGER).
†
Character references are not themselves text, and no part of a character reference is text.
An
ambiguous ampersand
is an
"&
"
character that is followed by some
text
other than a
space character,
a
"<
",
character, or another
"&
"
character.
SVG and MathML elements are elements from the SVG and MathML namespaces. SVG and MathML elements can be used both in documents in the HTML syntax and in documents in the XML syntax. Syntax rules for SVG and MathML elements in documents in the XML syntax are defined in the XML specification [XML]. The following list describes additional syntax rules that specifically apply to SVG and MathML elements in documents in the HTML syntax.
/
"
character before the closing
">
"
character are said to be
marked as self-closing.CDATA sections in SVG and MathML contents in documents in the HTML syntax consist of the following parts, in exactly the following order:
<![CDATA[
"]]>
“]]>
"CDATA sections are allowed only in the contents of elements from the SVG and MathML namespaces.
The following shows an example of a CDATA section.
<annotation encoding="text/latex"> <![CDATA[\documentclass{article} \usepackage{amsmath} \begin{document} The absolute value of $x$: \[ \left|x\right|= \begin{cases}-x& \text{if $x<0$}\\ x& \text{otherwise}\end{cases} \] \end{document}]]> </annotation>
This section provides an index of HTML elements organized into groups according to function.
The complete set of HTML elements is the set of elements described in the following sections.
The a element represents a hyperlink.
global attributes & href & target & rel & hreflang & media & type & common.attrs.aria or notAllowed
_blank
",
"_self
",
"_parent
",
or
"_top
".
An a element must have both a start tag and an end tag.
any element that can contain phrasing elements, any element that can contain flow elements
Although previous versions of HTML restricted the a element to only containing phrasing content (essentially, what was in previous versions referred to as “inline” content), the a element is now transparent; that is, an instance of the a element is now allowed to also contain flow content (essentially, what was in previous versions referred to as “block” content)—if the parent element of that instance of the a element is an element that is allowed to contain flow content.
interface HTMLAnchorElement : HTMLElement { stringifier attribute DOMString href; attribute DOMString target; attribute DOMString rel; readonly attribute DOMTokenList relList; attribute DOMString media; attribute DOMString hreflang; attribute DOMString type; attribute DOMString text; // URL decomposition IDL attributes attribute DOMString protocol; attribute DOMString host; attribute DOMString hostname; attribute DOMString port; attribute DOMString pathname; attribute DOMString search; attribute DOMString hash; };
A hyperlink intended to be useful in output for all media
types except the print
media type.
<a href="./page2.html" rel=next media="not print">next</a>
The name attribute is obsolete.
<a name="section5"/>
<a>prev</a>
A hyperlink that will cause its target to be opened in a new browsing context.
<a href="http://help.example.com" target="_blank">Help</a>
The value of the href attribute contains a space character.
some <a href="http://example.com/Archive/Public Data/">public</a> data is also available
A hyperlink that represents multiple link types.
<a href="../toc.html" rel="index up">up</a>
A hyperlink that contains a paragraph.
<a href="javascript:void(0);" onmouseover="return anno('Note: This paragraph is informative only.') onmouseout="return anno_bye();"> <p>The following is introductory information…</p> </a>
The abbr element represents an abbreviation or acronym.
An abbr element must have both a start tag and an end tag.
any element that can contain phrasing elements
The title attribute on the abbr element represents the expansion of the abbreviation or acronym.
Uses HTMLElement.
The address element represents contact information.
An address element must have both a start tag and an end tag.
any element that can contain flow elements
If an address element applies to a body element, then it represents contact information for the document as a whole. If an address element applies to a section of a document, then it represents contact information for that section only.
Uses HTMLElement.
The area element represents either a hyperlink with some text and a corresponding area on an image map, or a dead area on an image map.
empty (void element)
global attributes & alt★ & href★ & target & rel & media & hreflang & type & shape.rect & coords.rect★ or shape.circle★ & coords.circle★ or shape.poly★ & coords.poly★ or shape.default
_blank
",
"_self
",
"_parent
",
or
"_top
".
The area element is a void element. An area element must have a start tag but must not have an end tag.
any element that can contain phrasing elements
interface HTMLAreaElement : HTMLElement { attribute DOMString alt; attribute DOMString coords; attribute DOMString shape; stringifier attribute DOMString href; attribute DOMString target; attribute DOMString rel; readonly attribute DOMTokenList relList; attribute DOMString media; attribute DOMString hreflang; attribute DOMString type; // URL decomposition IDL attributes attribute DOMString protocol; attribute DOMString host; attribute DOMString hostname; attribute DOMString port; attribute DOMString pathname; attribute DOMString search; attribute DOMString hash; };
The article element represents a section of content that forms an independent part of a document or site; for example, a magazine or newspaper article, or a blog entry.
zero or more style elements, followed by flow content
global attributes & common.attrs.aria.implicit.region or common.attrs.aria.landmark.article or common.attrs.aria.landmark.main or common.attrs.aria.landmark.document or common.attrs.aria.landmark.application
An article element must have both a start tag and an end tag.
any element that can contain flow elements
Uses HTMLElement.
The aside element represents content that is tangentially related to the content that forms the main textual flow of a document.
zero or more style elements, followed by flow content
An aside element must have both a start tag and an end tag.
any element that can contain flow elements
In printed documents, the type of tangential content that the aside element represents is sometimes formatted as a sidebar or annotation or footnote.
Uses HTMLElement.
An audio element represents an audio stream.
Transparent, with the following specific structure:
a src attribute, or zero or more source elements followed by zero or more track elements, followed by flow content
a src attribute, or zero or more source elements followed by zero or more track elements, followed by phrasing content
global attributes & autoplay & preload & controls & loop & mediagroup & muted & src
An audio element must have both a start tag and an end tag.
any element that can contain phrasing elements, any element that can contain flow elements
[NamedConstructor=Audio(), NamedConstructor=Audio(DOMString src)] interface HTMLAudioElement : HTMLMediaElement {};
The b element represents a span of text offset from its surrounding content without conveying any extra emphasis or importance, and for which the conventional typographic presentation is bold text; for example, keywords in a document abstract, or product names in a review.
A b element must have both a start tag and an end tag.
any element that can contain phrasing elements
Although previous versions of HTML defined the b element only in presentational terms, the element has now been given the specific semantic purpose of representing text “offset from its surrounding content without conveying any extra emphasis or importance, and for which the conventional typographic presentation is bold text”.
Uses HTMLElement.
The base element specifies a document-wide base URL for the purposes of resolving relative URLs, and a document-wide default browsing context name for the purposes of following hyperlinks.
empty (void element)
global attributes & href★ & target or target★
_blank
",
"_self
",
"_parent
",
or
"_top
".
The base element is a void element. A base element must have a start tag but must not have an end tag.
interface HTMLBaseElement : HTMLElement { attribute DOMString href; attribute DOMString target; };
The bdi element represents a span of text that is isolated from its surroundings for the purposes of bidirectional text formatting [BIDI].
A bdi element must have both a start tag and an end tag.
any element that can contain phrasing elements
Uses HTMLElement.
The bdo element represents an explicit text directionality formatting control for its children; it provides a means to specify a direction override of the Unicode BiDi algorithm [BIDI].
A bdo element must have both a start tag and an end tag.
any element that can contain phrasing elements
Uses HTMLElement.
The blockquote element represents a section that is quoted from another source.
A blockquote element must have both a start tag and an end tag.
any element that can contain flow elements
interface HTMLQuoteElement : HTMLElement { attribute DOMString cite; };
The body element represents the body of a document (as opposed to the document’s metadata).
global attributes & common.attrs.aria.landmark.application or common.attrs.aria.landmark.document or notAllowed & onafterprint & onbeforeprint & onbeforeunload & onblur & onerror & onfocus & onhashchange & onload & onmessage & onoffline & ononline & onpopstate & onresize & onstorage & onunload
A body element’s start tag may be omitted if the first thing inside the body element is not a space character or a comment, except if the first thing inside the body element is a script or style element.
A body element’s end tag may be omitted if the body element is not immediately followed by a comment and the element is either not empty or its start tag has not been omitted.
interface HTMLBodyElement : HTMLElement { [TreatNonCallableAsNull] attribute Function? onafterprint; [TreatNonCallableAsNull] attribute Function? onbeforeprint; [TreatNonCallableAsNull] attribute Function? onbeforeunload; [TreatNonCallableAsNull] attribute Function? onblur; [TreatNonCallableAsNull] attribute Function? onerror; [TreatNonCallableAsNull] attribute Function? onfocus; [TreatNonCallableAsNull] attribute Function? onhashchange; [TreatNonCallableAsNull] attribute Function? onload; [TreatNonCallableAsNull] attribute Function? onmessage; [TreatNonCallableAsNull] attribute Function? onoffline; [TreatNonCallableAsNull] attribute Function? ononline; [TreatNonCallableAsNull] attribute Function? onpopstate; [TreatNonCallableAsNull] attribute Function? onpagehide; [TreatNonCallableAsNull] attribute Function? onpageshow; [TreatNonCallableAsNull] attribute Function? onresize; [TreatNonCallableAsNull] attribute Function? onscroll; [TreatNonCallableAsNull] attribute Function? onstorage; [TreatNonCallableAsNull] attribute Function? onunload; };
The br element represents a line break.
empty (void element)
The br element is a void element. A br element must have a start tag but must not have an end tag.
any element that can contain phrasing elements
interface HTMLBRElement : HTMLElement {};
The canvas element represents a resolution-dependent bitmap canvas, which can be used for dynamically rendering of images such as game graphics, graphs, or other images.
A canvas element must have both a start tag and an end tag.
any element that can contain phrasing elements, any element that can contain flow elements
interface HTMLCanvasElement : HTMLElement { attribute unsigned long width; attribute unsigned long height; DOMString toDataURL(optional DOMString type, any... args); void toBlob(FileCallback? _callback, optional DOMString type, any... args); object? getContext(DOMString contextId, any... args); };
The cite element represents the cited title of a work; for example, the title of a book mentioned within the main text flow of a document.
A cite element must have both a start tag and an end tag.
any element that can contain phrasing elements
Although previous versions of HTML implied that the cite element can be used to mark up the name of a person, that usage is no longer considered conforming. The cite element now solely represents the cited title of a work; for example, the title of a book, paper, essay, poem, score, song, script, film, TV show, game, sculpture, painting, theater production, play, opera, musical, exhibition, legal case report, or other such work.
Uses HTMLElement.
The code element represents a fragment of computer code.
A code element must have both a start tag and an end tag.
any element that can contain phrasing elements
Uses HTMLElement.
The col element represents one or more columns in the column group represented by its colgroup parent.
empty (void element)
The col element is a void element. A col element must have a start tag but must not have an end tag.
interface HTMLTableColElement : HTMLElement { attribute unsigned long span; };
The colgroup element represents a group of one or more columns in the table that is its parent.
A colgroup element's start tag may be omitted if the first thing inside the colgroup element is a col element, and if the element is not immediately preceded by another colgroup element whose end tag has been omitted.
A colgroup element’s end tag may be omitted if the colgroup element is not immediately followed by a space character or a comment.
interface HTMLTableColElement : HTMLElement { attribute unsigned long span; };
The command element is a multipurpose element for representing commands.
A command element with no type attribute specified represents the same thing as a command element with its type attribute set to "command".
The
command
element
with a type attribute whose
value is "command
" represents a command with an
associated action.
empty (void element)
global attributes & type & label & icon & disabled
The command element is a void element. A command element must have a start tag but must not have an end tag.
any element that can contain metadata elements, any element that can contain phrasing elements
interface HTMLCommandElement : HTMLElement { attribute DOMString type; attribute DOMString label; attribute DOMString icon; attribute boolean disabled; attribute boolean checked; attribute DOMString radiogroup; readonly attribute HTMLElement? command; };
The
command
element
with a type attribute whose
value is "radio
" represents
a selection of one item from a list of items.
empty (void element)
global attributes & type★ & radiogroup★ & checked & label & icon & disabled
The command element is a void element. A command element must have a start tag but must not have an end tag.
any element that can contain metadata elements, any element that can contain phrasing elements
interface HTMLCommandElement : HTMLElement { attribute DOMString type; attribute DOMString label; attribute DOMString icon; attribute boolean disabled; attribute boolean checked; attribute DOMString radiogroup; readonly attribute HTMLElement? command; };
The
command
element
with a type attribute whose
value is "checkbox
" represents a state or option
that can be toggled.
empty (void element)
The command element is a void element. A command element must have a start tag but must not have an end tag.
any element that can contain metadata elements, any element that can contain phrasing elements
interface HTMLCommandElement : HTMLElement { attribute DOMString type; attribute DOMString label; attribute DOMString icon; attribute boolean disabled; attribute boolean checked; attribute DOMString radiogroup; readonly attribute HTMLElement? command; };
The datalist element represents a set of option elements that represent predefined options for other controls.
zero or more option elements, intermixed with phrasing content
A datalist element must have both a start tag and an end tag.
any element that can contain phrasing elements
interface HTMLDataListElement : HTMLElement { readonly attribute HTMLCollection options; };
The dd element represents a description or value.
A dd element must have a start tag.
A dd element’s end tag may be omitted if the dd element is immediately followed by another dd element or a dd element, or if there is no more content in the parent element.
The dd element represents the description or value part of a term-description (name-value) grouping in a description list.
Uses HTMLElement.
The del element represents a range of text that has been deleted from a document.
T
and
Z
in the date/time syntax
must
always be
uppercaseExamples:
1990-12-31T23:59:60Z
1996-12-19T16:39:57-08:00
Example:
1996-12-19
A del element must have both a start tag and an end tag.
any element that can contain phrasing elements, any element that can contain flow elements
interface HTMLModElement : HTMLElement { attribute DOMString cite; attribute DOMString dateTime; };
The details element represents a control from which the user can obtain additional information or controls on-demand.
one summary element, followed by flow content
A details element must have both a start tag and an end tag.
any element that can contain flow elements
interface HTMLDetailsElement : HTMLElement { attribute boolean open; };
The dfn element represents the defining instance of a term.
A dfn element must have both a start tag and an end tag.
any element that can contain phrasing elements
Uses HTMLElement.
The div element is a generic container for flow content that by itself does not represent anything.
zero or more style elements, followed by flow content
A div element must have both a start tag and an end tag.
any element that can contain flow elements
interface HTMLDivElement : HTMLElement {};
The dl element represents a description list.
A dl element must have both a start tag and an end tag.
any element that can contain flow elements
The dl element represents a description list, which consists of zero or more term-description (name-value) groupings; each grouping associates one or more terms/names (the contents of dt elements) with one or more descriptions/values (the contents of dd elements).
interface HTMLDListElement : HTMLElement {};
The dt element represents a term or name.
A dt element must have a start tag.
A dt element’s end tag may be omitted if the dt element is immediately followed by another dt element or a dd element.
The dt element represents the term or name part of a term-description (name-value) grouping in a description list.
Uses HTMLElement.
The em element represents a span of text with emphatic stress.
An em element must have both a start tag and an end tag.
any element that can contain phrasing elements
Uses HTMLElement.
The embed element represents an integration point for external content.
empty (void element)
The embed element is a void element. An embed element must have a start tag but must not have an end tag.
any element that can contain phrasing elements
The embed element represents an integration point for external content — typically, non-HTML content such as an application or some other type of interactive content which involves use of a third-party plugin as a handler (rather than being natively supported by the UA).
interface HTMLEmbedElement : HTMLElement { attribute DOMString src; attribute DOMString type; attribute DOMString width; attribute DOMString height; legacycaller any (any... arguments); };
The fieldset element represents a set of form controls grouped under a common name.
an optional legend element, followed by flow content
A fieldset element must have both a start tag and an end tag.
any element that can contain flow elements
interface HTMLFieldSetElement : HTMLElement { attribute boolean disabled; readonly attribute HTMLFormElement? form; attribute DOMString name; readonly attribute DOMString type; readonly attribute HTMLFormControlsCollection elements; readonly attribute boolean willValidate; readonly attribute ValidityState validity; readonly attribute DOMString validationMessage; boolean checkValidity(); void setCustomValidity(DOMString error); };
The figure element represents a unit of content, optionally with a caption, that is self-contained, that is typically referenced as a single unit from the main flow of the document, and that can be moved away from the main flow of the document without affecting the document’s meaning.
one figcaption element, followed by flow content or flow content followed by an optional figcaption element
A figure element must have both a start tag and an end tag.
any element that can contain flow elements
Uses HTMLElement.
The form element represents a user-submittable form.
global attributes & action & method & enctype & name & accept-charset & common.attrs.aria or common.attrs.aria.implicit.region & novalidate & target & autocomplete
_blank
",
"_self
",
"_parent
",
or
"_top
".
A form element must have both a start tag and an end tag.
any element that can contain flow elements
[OverrideBuiltins] interface HTMLFormElement : HTMLElement { attribute DOMString acceptCharset; attribute DOMString action; attribute DOMString autocomplete; attribute DOMString enctype; attribute DOMString encoding; attribute DOMString method; attribute DOMString name; attribute boolean noValidate; attribute DOMString target; readonly attribute HTMLFormControlsCollection elements; readonly attribute long length; getter Element (unsigned long index); getter object (DOMString name); void submit(); void reset(); boolean checkValidity(); };
The h1 through h6 elements are headings for the sections with which they are associated.
An h1 element must have both a start tag and an end tag.
any element that can contain flow elements, hgroup
interface HTMLHeadingElement : HTMLElement {};
The h1 through h6 elements are headings for the sections with which they are associated.
An h2 element must have both a start tag and an end tag.
any element that can contain flow elements, hgroup
interface HTMLHeadingElement : HTMLElement {};
The h1 through h6 elements are headings for the sections with which they are associated.
An h3 element must have both a start tag and an end tag.
any element that can contain flow elements, hgroup
interface HTMLHeadingElement : HTMLElement {};
The h1 through h6 elements are headings for the sections with which they are associated.
An h4 element must have both a start tag and an end tag.
any element that can contain flow elements, hgroup
interface HTMLHeadingElement : HTMLElement {};
The h1 through h6 elements are headings for the sections with which they are associated.
An h5 element must have both a start tag and an end tag.
any element that can contain flow elements, hgroup
interface HTMLHeadingElement : HTMLElement {};
The h1 through h6 elements are headings for the sections with which they are associated.
An h6 element must have both a start tag and an end tag.
any element that can contain flow elements, hgroup
interface HTMLHeadingElement : HTMLElement {};
The head element collects the document’s metadata.
one title element, intermixed with an optional base element, intermixed with metadata elements
A head element’s start tag may be omitted if the first thing inside the head element is an element.
A head element’s end tag may be omitted if the head element is not immediately followed by a space character or a comment.
interface HTMLHeadElement : HTMLElement {};
The header element represents the header of a section.
A header element must have both a start tag and an end tag.
any element that can contain flow elements
Uses HTMLElement.
The hgroup element represents a group of headings.
A hgroup element must have both a start tag and an end tag.
any element that can contain flow elements
Uses HTMLElement.
The hr element represents a paragraph-level thematic break.
empty (void element)
The hr element is a void element. An hr element must have a start tag but must not have an end tag.
any element that can contain flow elements
Although previous versions of HTML defined the hr element only in presentational terms, the element has now been given the specific semantic purpose of representing a “paragraph-level thematic break”.
Some examples of thematic breaks that can be marked up using the hr element include a scene change in a story, or a transition to another topic within a section of a reference book.
interface HTMLHRElement : HTMLElement {};
The html element represents the root of a document.
An html element’s start tag may be omitted if the first thing inside the html element is not a comment.
An html element’s end tag may be omitted if the html element is not immediately followed by a comment and the element contains a body element that is either not empty or whose start tag has not been omitted.
interface HTMLHtmlElement : HTMLElement {};
The i element represents a span of text offset from its surrounding content without conveying any extra emphasis or importance, and for which the conventional typographic presentation is italic text; for example, a taxonomic designation, a technical term, an idiomatic phrase from another language, a thought, or a ship name.
An i element must have both a start tag and an end tag.
any element that can contain phrasing elements
Although previous versions of HTML defined the i element only in presentational terms, the element has now been given the specific semantic purpose of representing text “offset from its surrounding content without conveying any extra emphasis or importance, and for which the conventional typographic presentation is italic text”.
Uses HTMLElement.
The iframe element introduces a new nested browsing context.
global attributes & src & srcdoc & name & width & height & sandbox & seamless & common.attrs.aria or common.attrs.aria.implicit.region
allow-forms
: re-enables formsallow-scripts
: re-enables scriptsallow-top-navigation
: re-enables links
within the content of the
iframe
to navigate to its
top-level browsing context
allow-same-origin
: re-enables
same-origin treatment of the content hosted by the
iframe
and the content which hosts the
iframe
(instead of forcing the
iframe
into a unique origin)An iframe element must have both a start tag and an end tag.
any element that can contain phrasing elements
interface HTMLIFrameElement : HTMLElement { attribute DOMString src; attribute DOMString srcdoc; attribute DOMString name; [PutForwards=value] readonly attribute DOMSettableTokenList sandbox; attribute boolean seamless; attribute DOMString width; attribute DOMString height; readonly attribute Document? contentDocument; readonly attribute WindowProxy? contentWindow; };
The img element represents an image.
empty (void element)
global attributes & src★ & alt & height & width & usemap & ismap & border & common.attrs.aria
0
".The img element is a void element. An img element must have a start tag but must not have an end tag.
any element that can contain phrasing elements
[NamedConstructor=Image(), NamedConstructor=Image(unsigned long width), NamedConstructor=Image(unsigned long width, unsigned long height)] interface HTMLImageElement : HTMLElement { attribute DOMString alt; attribute DOMString src; attribute DOMString crossOrigin; attribute DOMString useMap; attribute boolean isMap; attribute unsigned long width; attribute unsigned long height; readonly attribute unsigned long naturalWidth; readonly attribute unsigned long naturalHeight; readonly attribute boolean complete; };
The input element is a multipurpose element for representing input controls.
An input element with no type attribute specified represents the same thing as an input element with its type attribute set to "text".
Several new input element types have been added, and several new attributes are now allowed on the element.
The
input
element
with a type attribute whose
value is "text
" represents
a one-line plain text edit control for the
input
element’s value.
empty (void element)
global attributes & name & disabled & form & type & maxlength & readonly & size & value & common.attrs.aria or notAllowed & autocomplete & autofocus & list & pattern & required & placeholder & dirname
The input element is a void element. An input element must have a start tag but must not have an end tag.
any element that can contain phrasing elements
interface HTMLInputElement : HTMLElement { attribute DOMString accept; attribute DOMString alt; attribute DOMString autocomplete; attribute boolean autofocus; attribute boolean defaultChecked; attribute boolean checked; attribute DOMString dirName; attribute boolean disabled; readonly attribute HTMLFormElement? form; readonly attribute FileList? files; attribute DOMString formAction; attribute DOMString formEnctype; attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute unsigned long height; attribute boolean indeterminate; readonly attribute HTMLElement? list; attribute DOMString max; attribute long maxLength; attribute DOMString min; attribute boolean multiple; attribute DOMString name; attribute DOMString pattern; attribute DOMString placeholder; attribute boolean readOnly; attribute boolean required; attribute unsigned long size; attribute DOMString src; attribute DOMString step; attribute DOMString type; attribute DOMString defaultValue; attribute DOMString value; attribute Date? valueAsDate; attribute double valueAsNumber; attribute unsigned long width; void stepUp(optional long n); void stepDown(optional long n); readonly attribute boolean willValidate; readonly attribute ValidityState validity; readonly attribute DOMString validationMessage; boolean checkValidity(); void setCustomValidity(DOMString error); readonly attribute NodeList labels; void select(); attribute unsigned long selectionStart; attribute unsigned long selectionEnd; attribute DOMString selectionDirection; void setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction); };
The
input
element
with a type attribute whose
value is "password
" represents
a one-line plain-text edit control for entering a password.
empty (void element)
global attributes & name & disabled & form & type★ & maxlength & readonly & size & value & autocomplete & autofocus & pattern & required & placeholder
The input element is a void element. An input element must have a start tag but must not have an end tag.
any element that can contain phrasing elements
interface HTMLInputElement : HTMLElement { attribute DOMString accept; attribute DOMString alt; attribute DOMString autocomplete; attribute boolean autofocus; attribute boolean defaultChecked; attribute boolean checked; attribute DOMString dirName; attribute boolean disabled; readonly attribute HTMLFormElement? form; readonly attribute FileList? files; attribute DOMString formAction; attribute DOMString formEnctype; attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute unsigned long height; attribute boolean indeterminate; readonly attribute HTMLElement? list; attribute DOMString max; attribute long maxLength; attribute DOMString min; attribute boolean multiple; attribute DOMString name; attribute DOMString pattern; attribute DOMString placeholder; attribute boolean readOnly; attribute boolean required; attribute unsigned long size; attribute DOMString src; attribute DOMString step; attribute DOMString type; attribute DOMString defaultValue; attribute DOMString value; attribute Date? valueAsDate; attribute double valueAsNumber; attribute unsigned long width; void stepUp(optional long n); void stepDown(optional long n); readonly attribute boolean willValidate; readonly attribute ValidityState validity; readonly attribute DOMString validationMessage; boolean checkValidity(); void setCustomValidity(DOMString error); readonly attribute NodeList labels; void select(); attribute unsigned long selectionStart; attribute unsigned long selectionEnd; attribute DOMString selectionDirection; void setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction); };
The
input
element
with a type attribute whose
value is "checkbox
" represents
a state or option that can be toggled.
empty (void element)
The input element is a void element. An input element must have a start tag but must not have an end tag.
any element that can contain phrasing elements
interface HTMLInputElement : HTMLElement { attribute DOMString accept; attribute DOMString alt; attribute DOMString autocomplete; attribute boolean autofocus; attribute boolean defaultChecked; attribute boolean checked; attribute DOMString dirName; attribute boolean disabled; readonly attribute HTMLFormElement? form; readonly attribute FileList? files; attribute DOMString formAction; attribute DOMString formEnctype; attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute unsigned long height; attribute boolean indeterminate; readonly attribute HTMLElement? list; attribute DOMString max; attribute long maxLength; attribute DOMString min; attribute boolean multiple; attribute DOMString name; attribute DOMString pattern; attribute DOMString placeholder; attribute boolean readOnly; attribute boolean required; attribute unsigned long size; attribute DOMString src; attribute DOMString step; attribute DOMString type; attribute DOMString defaultValue; attribute DOMString value; attribute Date? valueAsDate; attribute double valueAsNumber; attribute unsigned long width; void stepUp(optional long n); void stepDown(optional long n); readonly attribute boolean willValidate; readonly attribute ValidityState validity; readonly attribute DOMString validationMessage; boolean checkValidity(); void setCustomValidity(DOMString error); readonly attribute NodeList labels; void select(); attribute unsigned long selectionStart; attribute unsigned long selectionEnd; attribute DOMString selectionDirection; void setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction); };
The
input
element
with a type attribute whose
value is "radio
" represents
a selection of one item from a list of items (a radio
button).
empty (void element)
The input element is a void element. An input element must have a start tag but must not have an end tag.
any element that can contain phrasing elements
interface HTMLInputElement : HTMLElement { attribute DOMString accept; attribute DOMString alt; attribute DOMString autocomplete; attribute boolean autofocus; attribute boolean defaultChecked; attribute boolean checked; attribute DOMString dirName; attribute boolean disabled; readonly attribute HTMLFormElement? form; readonly attribute FileList? files; attribute DOMString formAction; attribute DOMString formEnctype; attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute unsigned long height; attribute boolean indeterminate; readonly attribute HTMLElement? list; attribute DOMString max; attribute long maxLength; attribute DOMString min; attribute boolean multiple; attribute DOMString name; attribute DOMString pattern; attribute DOMString placeholder; attribute boolean readOnly; attribute boolean required; attribute unsigned long size; attribute DOMString src; attribute DOMString step; attribute DOMString type; attribute DOMString defaultValue; attribute DOMString value; attribute Date? valueAsDate; attribute double valueAsNumber; attribute unsigned long width; void stepUp(optional long n); void stepDown(optional long n); readonly attribute boolean willValidate; readonly attribute ValidityState validity; readonly attribute DOMString validationMessage; boolean checkValidity(); void setCustomValidity(DOMString error); readonly attribute NodeList labels; void select(); attribute unsigned long selectionStart; attribute unsigned long selectionEnd; attribute DOMString selectionDirection; void setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction); };
The
input
element
with a type attribute whose
value is "submit
" represents a button for
submitting a form.
empty (void element)
global attributes & name & disabled & form & type★ & value & formaction & autofocus & formenctype & formmethod & formtarget & formnovalidate
_blank
",
"_self
",
"_parent
",
or
"_top
".
The input element is a void element. An input element must have a start tag but must not have an end tag.
any element that can contain phrasing elements
interface HTMLInputElement : HTMLElement { attribute DOMString accept; attribute DOMString alt; attribute DOMString autocomplete; attribute boolean autofocus; attribute boolean defaultChecked; attribute boolean checked; attribute DOMString dirName; attribute boolean disabled; readonly attribute HTMLFormElement? form; readonly attribute FileList? files; attribute DOMString formAction; attribute DOMString formEnctype; attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute unsigned long height; attribute boolean indeterminate; readonly attribute HTMLElement? list; attribute DOMString max; attribute long maxLength; attribute DOMString min; attribute boolean multiple; attribute DOMString name; attribute DOMString pattern; attribute DOMString placeholder; attribute boolean readOnly; attribute boolean required; attribute unsigned long size; attribute DOMString src; attribute DOMString step; attribute DOMString type; attribute DOMString defaultValue; attribute DOMString value; attribute Date? valueAsDate; attribute double valueAsNumber; attribute unsigned long width; void stepUp(optional long n); void stepDown(optional long n); readonly attribute boolean willValidate; readonly attribute ValidityState validity; readonly attribute DOMString validationMessage; boolean checkValidity(); void setCustomValidity(DOMString error); readonly attribute NodeList labels; void select(); attribute unsigned long selectionStart; attribute unsigned long selectionEnd; attribute DOMString selectionDirection; void setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction); };
The
input
element
with a type attribute whose
value is "reset
" represents a button for
resetting a form.
empty (void element)
The input element is a void element. An input element must have a start tag but must not have an end tag.
any element that can contain phrasing elements
interface HTMLInputElement : HTMLElement { attribute DOMString accept; attribute DOMString alt; attribute DOMString autocomplete; attribute boolean autofocus; attribute boolean defaultChecked; attribute boolean checked; attribute DOMString dirName; attribute boolean disabled; readonly attribute HTMLFormElement? form; readonly attribute FileList? files; attribute DOMString formAction; attribute DOMString formEnctype; attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute unsigned long height; attribute boolean indeterminate; readonly attribute HTMLElement? list; attribute DOMString max; attribute long maxLength; attribute DOMString min; attribute boolean multiple; attribute DOMString name; attribute DOMString pattern; attribute DOMString placeholder; attribute boolean readOnly; attribute boolean required; attribute unsigned long size; attribute DOMString src; attribute DOMString step; attribute DOMString type; attribute DOMString defaultValue; attribute DOMString value; attribute Date? valueAsDate; attribute double valueAsNumber; attribute unsigned long width; void stepUp(optional long n); void stepDown(optional long n); readonly attribute boolean willValidate; readonly attribute ValidityState validity; readonly attribute DOMString validationMessage; boolean checkValidity(); void setCustomValidity(DOMString error); readonly attribute NodeList labels; void select(); attribute unsigned long selectionStart; attribute unsigned long selectionEnd; attribute DOMString selectionDirection; void setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction); };
The
input
element
with a type attribute whose
value is "file
"
represents a list of file items, each consisting of a file
name, a file type, and a file body (the contents of the
file).
empty (void element)
The input element is a void element. An input element must have a start tag but must not have an end tag.
any element that can contain phrasing elements
interface HTMLInputElement : HTMLElement { attribute DOMString accept; attribute DOMString alt; attribute DOMString autocomplete; attribute boolean autofocus; attribute boolean defaultChecked; attribute boolean checked; attribute DOMString dirName; attribute boolean disabled; readonly attribute HTMLFormElement? form; readonly attribute FileList? files; attribute DOMString formAction; attribute DOMString formEnctype; attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute unsigned long height; attribute boolean indeterminate; readonly attribute HTMLElement? list; attribute DOMString max; attribute long maxLength; attribute DOMString min; attribute boolean multiple; attribute DOMString name; attribute DOMString pattern; attribute DOMString placeholder; attribute boolean readOnly; attribute boolean required; attribute unsigned long size; attribute DOMString src; attribute DOMString step; attribute DOMString type; attribute DOMString defaultValue; attribute DOMString value; attribute Date? valueAsDate; attribute double valueAsNumber; attribute unsigned long width; void stepUp(optional long n); void stepDown(optional long n); readonly attribute boolean willValidate; readonly attribute ValidityState validity; readonly attribute DOMString validationMessage; boolean checkValidity(); void setCustomValidity(DOMString error); readonly attribute NodeList labels; void select(); attribute unsigned long selectionStart; attribute unsigned long selectionEnd; attribute DOMString selectionDirection; void setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction); };
The
input
element
with a type attribute whose
value is "image
"
represents either an image from which the UA enables a user
to interactively select a pair of coordinates and submit the
form, or alternatively a button from which the user can submit
the form.
empty (void element)
global attributes & name & disabled & form & type★ & alt★ & src & common.attrs.aria or notAllowed & formaction & autofocus & formenctype & formmethod & formtarget & formnovalidate & height & width
_blank
",
"_self
",
"_parent
",
or
"_top
".
The input element is a void element. An input element must have a start tag but must not have an end tag.
any element that can contain phrasing elements
interface HTMLInputElement : HTMLElement { attribute DOMString accept; attribute DOMString alt; attribute DOMString autocomplete; attribute boolean autofocus; attribute boolean defaultChecked; attribute boolean checked; attribute DOMString dirName; attribute boolean disabled; readonly attribute HTMLFormElement? form; readonly attribute FileList? files; attribute DOMString formAction; attribute DOMString formEnctype; attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute unsigned long height; attribute boolean indeterminate; readonly attribute HTMLElement? list; attribute DOMString max; attribute long maxLength; attribute DOMString min; attribute boolean multiple; attribute DOMString name; attribute DOMString pattern; attribute DOMString placeholder; attribute boolean readOnly; attribute boolean required; attribute unsigned long size; attribute DOMString src; attribute DOMString step; attribute DOMString type; attribute DOMString defaultValue; attribute DOMString value; attribute Date? valueAsDate; attribute double valueAsNumber; attribute unsigned long width; void stepUp(optional long n); void stepDown(optional long n); readonly attribute boolean willValidate; readonly attribute ValidityState validity; readonly attribute DOMString validationMessage; boolean checkValidity(); void setCustomValidity(DOMString error); readonly attribute NodeList labels; void select(); attribute unsigned long selectionStart; attribute unsigned long selectionEnd; attribute DOMString selectionDirection; void setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction); };
The
input
element
with a type attribute whose
value is "datetime
" represents
a control for setting the element’s value to a string
representing a global date and time (with timezone
information).
empty (void element)
global attributes & name & disabled & form & type★ & autocomplete & autofocus & list & min & max & step.float & readonly & required & value
T
and
Z
in the date/time syntax
must
always be
uppercaseExamples:
1990-12-31T23:59:60Z
1996-12-19T16:39:57-08:00
T
and
Z
in the date/time syntax
must
always be
uppercaseExamples:
1990-12-31T23:59:60Z
1996-12-19T16:39:57-08:00
T
and
Z
in the date/time syntax
must
always be
uppercaseExamples:
1990-12-31T23:59:60Z
1996-12-19T16:39:57-08:00
The input element is a void element. An input element must have a start tag but must not have an end tag.
any element that can contain phrasing elements
interface HTMLInputElement : HTMLElement { attribute DOMString accept; attribute DOMString alt; attribute DOMString autocomplete; attribute boolean autofocus; attribute boolean defaultChecked; attribute boolean checked; attribute DOMString dirName; attribute boolean disabled; readonly attribute HTMLFormElement? form; readonly attribute FileList? files; attribute DOMString formAction; attribute DOMString formEnctype; attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute unsigned long height; attribute boolean indeterminate; readonly attribute HTMLElement? list; attribute DOMString max; attribute long maxLength; attribute DOMString min; attribute boolean multiple; attribute DOMString name; attribute DOMString pattern; attribute DOMString placeholder; attribute boolean readOnly; attribute boolean required; attribute unsigned long size; attribute DOMString src; attribute DOMString step; attribute DOMString type; attribute DOMString defaultValue; attribute DOMString value; attribute Date? valueAsDate; attribute double valueAsNumber; attribute unsigned long width; void stepUp(optional long n); void stepDown(optional long n); readonly attribute boolean willValidate; readonly attribute ValidityState validity; readonly attribute DOMString validationMessage; boolean checkValidity(); void setCustomValidity(DOMString error); readonly attribute NodeList labels; void select(); attribute unsigned long selectionStart; attribute unsigned long selectionEnd; attribute DOMString selectionDirection; void setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction); };
The
input
element
with a type attribute whose
value is "datetime-local
" represents
a control for setting the element’s value to a string
representing a local date and time (with no timezone
information).
empty (void element)
global attributes & name & disabled & form & type★ & autocomplete & autofocus & list & min & max & step.float & readonly & required & value
Example:
1985-04-12T23:20:50.52
1996-12-19T16:39:57
Example:
1985-04-12T23:20:50.52
1996-12-19T16:39:57
Example:
1985-04-12T23:20:50.52
1996-12-19T16:39:57
The input element is a void element. An input element must have a start tag but must not have an end tag.
any element that can contain phrasing elements
interface HTMLInputElement : HTMLElement { attribute DOMString accept; attribute DOMString alt; attribute DOMString autocomplete; attribute boolean autofocus; attribute boolean defaultChecked; attribute boolean checked; attribute DOMString dirName; attribute boolean disabled; readonly attribute HTMLFormElement? form; readonly attribute FileList? files; attribute DOMString formAction; attribute DOMString formEnctype; attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute unsigned long height; attribute boolean indeterminate; readonly attribute HTMLElement? list; attribute DOMString max; attribute long maxLength; attribute DOMString min; attribute boolean multiple; attribute DOMString name; attribute DOMString pattern; attribute DOMString placeholder; attribute boolean readOnly; attribute boolean required; attribute unsigned long size; attribute DOMString src; attribute DOMString step; attribute DOMString type; attribute DOMString defaultValue; attribute DOMString value; attribute Date? valueAsDate; attribute double valueAsNumber; attribute unsigned long width; void stepUp(optional long n); void stepDown(optional long n); readonly attribute boolean willValidate; readonly attribute ValidityState validity; readonly attribute DOMString validationMessage; boolean checkValidity(); void setCustomValidity(DOMString error); readonly attribute NodeList labels; void select(); attribute unsigned long selectionStart; attribute unsigned long selectionEnd; attribute DOMString selectionDirection; void setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction); };
The
input
element
with a type attribute whose
value is "date
" represents
a control for setting the element’s value to a string
representing a date.
empty (void element)
global attributes & name & disabled & form & type★ & autocomplete & autofocus & list & min & max & step.integer & readonly & required & value
Example:
1996-12-19
Example:
1996-12-19
Example:
1996-12-19
The input element is a void element. An input element must have a start tag but must not have an end tag.
any element that can contain phrasing elements
interface HTMLInputElement : HTMLElement { attribute DOMString accept; attribute DOMString alt; attribute DOMString autocomplete; attribute boolean autofocus; attribute boolean defaultChecked; attribute boolean checked; attribute DOMString dirName; attribute boolean disabled; readonly attribute HTMLFormElement? form; readonly attribute FileList? files; attribute DOMString formAction; attribute DOMString formEnctype; attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute unsigned long height; attribute boolean indeterminate; readonly attribute HTMLElement? list; attribute DOMString max; attribute long maxLength; attribute DOMString min; attribute boolean multiple; attribute DOMString name; attribute DOMString pattern; attribute DOMString placeholder; attribute boolean readOnly; attribute boolean required; attribute unsigned long size; attribute DOMString src; attribute DOMString step; attribute DOMString type; attribute DOMString defaultValue; attribute DOMString value; attribute Date? valueAsDate; attribute double valueAsNumber; attribute unsigned long width; void stepUp(optional long n); void stepDown(optional long n); readonly attribute boolean willValidate; readonly attribute ValidityState validity; readonly attribute DOMString validationMessage; boolean checkValidity(); void setCustomValidity(DOMString error); readonly attribute NodeList labels; void select(); attribute unsigned long selectionStart; attribute unsigned long selectionEnd; attribute DOMString selectionDirection; void setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction); };
The
input
element
with a type attribute whose
value is "month
" represents
a control for setting the element’s value to a string
representing a month.
empty (void element)
global attributes & name & disabled & form & type★ & autocomplete & autofocus & list & min & max & step.integer & readonly & required & value
-
".Example:
1996-12
-
".Example:
1996-12
-
".Example:
1996-12
The input element is a void element. An input element must have a start tag but must not have an end tag.
any element that can contain phrasing elements
interface HTMLInputElement : HTMLElement { attribute DOMString accept; attribute DOMString alt; attribute DOMString autocomplete; attribute boolean autofocus; attribute boolean defaultChecked; attribute boolean checked; attribute DOMString dirName; attribute boolean disabled; readonly attribute HTMLFormElement? form; readonly attribute FileList? files; attribute DOMString formAction; attribute DOMString formEnctype; attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute unsigned long height; attribute boolean indeterminate; readonly attribute HTMLElement? list; attribute DOMString max; attribute long maxLength; attribute DOMString min; attribute boolean multiple; attribute DOMString name; attribute DOMString pattern; attribute DOMString placeholder; attribute boolean readOnly; attribute boolean required; attribute unsigned long size; attribute DOMString src; attribute DOMString step; attribute DOMString type; attribute DOMString defaultValue; attribute DOMString value; attribute Date? valueAsDate; attribute double valueAsNumber; attribute unsigned long width; void stepUp(optional long n); void stepDown(optional long n); readonly attribute boolean willValidate; readonly attribute ValidityState validity; readonly attribute DOMString validationMessage; boolean checkValidity(); void setCustomValidity(DOMString error); readonly attribute NodeList labels; void select(); attribute unsigned long selectionStart; attribute unsigned long selectionEnd; attribute DOMString selectionDirection; void setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction); };
The
input
element
with a type attribute whose
value is "time
" represents
a control for setting the element’s value to a string
representing a time (with no timezone information).
empty (void element)
global attributes & name & disabled & form & type★ & autocomplete & autofocus & list & min & max & step.float & readonly & required & value
Examples:
23:20:50.52
17:39:57
Examples:
23:20:50.52
17:39:57
Examples:
23:20:50.52
17:39:57
The input element is a void element. An input element must have a start tag but must not have an end tag.
any element that can contain phrasing elements
interface HTMLInputElement : HTMLElement { attribute DOMString accept; attribute DOMString alt; attribute DOMString autocomplete; attribute boolean autofocus; attribute boolean defaultChecked; attribute boolean checked; attribute DOMString dirName; attribute boolean disabled; readonly attribute HTMLFormElement? form; readonly attribute FileList? files; attribute DOMString formAction; attribute DOMString formEnctype; attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute unsigned long height; attribute boolean indeterminate; readonly attribute HTMLElement? list; attribute DOMString max; attribute long maxLength; attribute DOMString min; attribute boolean multiple; attribute DOMString name; attribute DOMString pattern; attribute DOMString placeholder; attribute boolean readOnly; attribute boolean required; attribute unsigned long size; attribute DOMString src; attribute DOMString step; attribute DOMString type; attribute DOMString defaultValue; attribute DOMString value; attribute Date? valueAsDate; attribute double valueAsNumber; attribute unsigned long width; void stepUp(optional long n); void stepDown(optional long n); readonly attribute boolean willValidate; readonly attribute ValidityState validity; readonly attribute DOMString validationMessage; boolean checkValidity(); void setCustomValidity(DOMString error); readonly attribute NodeList labels; void select(); attribute unsigned long selectionStart; attribute unsigned long selectionEnd; attribute DOMString selectionDirection; void setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction); };
The
input
element
with a type attribute whose
value is "week
" represents
a control for setting the element’s value to a string
representing a week.
empty (void element)
global attributes & name & disabled & form & type★ & autocomplete & autofocus & list & min & max & step.integer & readonly & required & value
-W
".52
or
53
,
depending on the particular year.Example:
1996-W16
-W
".52
or
53
,
depending on the particular year.Example:
1996-W16
-W
".52
or
53
,
depending on the particular year.Example:
1996-W16
The input element is a void element. An input element must have a start tag but must not have an end tag.
any element that can contain phrasing elements
interface HTMLInputElement : HTMLElement { attribute DOMString accept; attribute DOMString alt; attribute DOMString autocomplete; attribute boolean autofocus; attribute boolean defaultChecked; attribute boolean checked; attribute DOMString dirName; attribute boolean disabled; readonly attribute HTMLFormElement? form; readonly attribute FileList? files; attribute DOMString formAction; attribute DOMString formEnctype; attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute unsigned long height; attribute boolean indeterminate; readonly attribute HTMLElement? list; attribute DOMString max; attribute long maxLength; attribute DOMString min; attribute boolean multiple; attribute DOMString name; attribute DOMString pattern; attribute DOMString placeholder; attribute boolean readOnly; attribute boolean required; attribute unsigned long size; attribute DOMString src; attribute DOMString step; attribute DOMString type; attribute DOMString defaultValue; attribute DOMString value; attribute Date? valueAsDate; attribute double valueAsNumber; attribute unsigned long width; void stepUp(optional long n); void stepDown(optional long n); readonly attribute boolean willValidate; readonly attribute ValidityState validity; readonly attribute DOMString validationMessage; boolean checkValidity(); void setCustomValidity(DOMString error); readonly attribute NodeList labels; void select(); attribute unsigned long selectionStart; attribute unsigned long selectionEnd; attribute DOMString selectionDirection; void setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction); };
The
input
element
with a type attribute whose
value is "number
" represents
a precise control for setting the element’s value to a
string representing a number.
empty (void element)
global attributes & name & disabled & form & type★ & autocomplete & autofocus & list & min & max & step.float & readonly & required & placeholder & value
The input element is a void element. An input element must have a start tag but must not have an end tag.
any element that can contain phrasing elements
interface HTMLInputElement : HTMLElement { attribute DOMString accept; attribute DOMString alt; attribute DOMString autocomplete; attribute boolean autofocus; attribute boolean defaultChecked; attribute boolean checked; attribute DOMString dirName; attribute boolean disabled; readonly attribute HTMLFormElement? form; readonly attribute FileList? files; attribute DOMString formAction; attribute DOMString formEnctype; attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute unsigned long height; attribute boolean indeterminate; readonly attribute HTMLElement? list; attribute DOMString max; attribute long maxLength; attribute DOMString min; attribute boolean multiple; attribute DOMString name; attribute DOMString pattern; attribute DOMString placeholder; attribute boolean readOnly; attribute boolean required; attribute unsigned long size; attribute DOMString src; attribute DOMString step; attribute DOMString type; attribute DOMString defaultValue; attribute DOMString value; attribute Date? valueAsDate; attribute double valueAsNumber; attribute unsigned long width; void stepUp(optional long n); void stepDown(optional long n); readonly attribute boolean willValidate; readonly attribute ValidityState validity; readonly attribute DOMString validationMessage; boolean checkValidity(); void setCustomValidity(DOMString error); readonly attribute NodeList labels; void select(); attribute unsigned long selectionStart; attribute unsigned long selectionEnd; attribute DOMString selectionDirection; void setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction); };
The
input
element
with a type attribute whose
value is "range
" represents
an imprecise control for setting the element’s value to a
string representing a number.
empty (void element)
global attributes & name & disabled & form & type★ & autocomplete & autofocus & list & min & max & step.float & value
The input element is a void element. An input element must have a start tag but must not have an end tag.
any element that can contain phrasing elements
interface HTMLInputElement : HTMLElement { attribute DOMString accept; attribute DOMString alt; attribute DOMString autocomplete; attribute boolean autofocus; attribute boolean defaultChecked; attribute boolean checked; attribute DOMString dirName; attribute boolean disabled; readonly attribute HTMLFormElement? form; readonly attribute FileList? files; attribute DOMString formAction; attribute DOMString formEnctype; attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute unsigned long height; attribute boolean indeterminate; readonly attribute HTMLElement? list; attribute DOMString max; attribute long maxLength; attribute DOMString min; attribute boolean multiple; attribute DOMString name; attribute DOMString pattern; attribute DOMString placeholder; attribute boolean readOnly; attribute boolean required; attribute unsigned long size; attribute DOMString src; attribute DOMString step; attribute DOMString type; attribute DOMString defaultValue; attribute DOMString value; attribute Date? valueAsDate; attribute double valueAsNumber; attribute unsigned long width; void stepUp(optional long n); void stepDown(optional long n); readonly attribute boolean willValidate; readonly attribute ValidityState validity; readonly attribute DOMString validationMessage; boolean checkValidity(); void setCustomValidity(DOMString error); readonly attribute NodeList labels; void select(); attribute unsigned long selectionStart; attribute unsigned long selectionEnd; attribute DOMString selectionDirection; void setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction); };
The
input
element
with a type attribute whose
value is "email
" represents
a control for editing a list of e-mail addresses given in the
element’s value.
empty (void element)
global attributes & name & disabled & form & type★ & autocomplete & autofocus & list & maxlength & pattern & readonly & required & size & placeholder & multiple★ & value.multiple or value.single
1*( atext / "." ) "@" ldh-str 1*( "." ldh-str )
…where atext is as defined in [RFC 5322], and ldh-str is as defined in [RFC 1034].
That is, any string which matches the following regular expression:
/^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/
Examples:
foo-bar.baz@example.com
The input element is a void element. An input element must have a start tag but must not have an end tag.
any element that can contain phrasing elements
interface HTMLInputElement : HTMLElement { attribute DOMString accept; attribute DOMString alt; attribute DOMString autocomplete; attribute boolean autofocus; attribute boolean defaultChecked; attribute boolean checked; attribute DOMString dirName; attribute boolean disabled; readonly attribute HTMLFormElement? form; readonly attribute FileList? files; attribute DOMString formAction; attribute DOMString formEnctype; attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute unsigned long height; attribute boolean indeterminate; readonly attribute HTMLElement? list; attribute DOMString max; attribute long maxLength; attribute DOMString min; attribute boolean multiple; attribute DOMString name; attribute DOMString pattern; attribute DOMString placeholder; attribute boolean readOnly; attribute boolean required; attribute unsigned long size; attribute DOMString src; attribute DOMString step; attribute DOMString type; attribute DOMString defaultValue; attribute DOMString value; attribute Date? valueAsDate; attribute double valueAsNumber; attribute unsigned long width; void stepUp(optional long n); void stepDown(optional long n); readonly attribute boolean willValidate; readonly attribute ValidityState validity; readonly attribute DOMString validationMessage; boolean checkValidity(); void setCustomValidity(DOMString error); readonly attribute NodeList labels; void select(); attribute unsigned long selectionStart; attribute unsigned long selectionEnd; attribute DOMString selectionDirection; void setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction); };
The
input
element
with a type attribute whose
value is "url
" represents
a control for editing an absolute URL given in the element’s
value.
empty (void element)
global attributes & name & disabled & form & type★ & autocomplete & autofocus & list & maxlength & pattern & readonly & required & size & placeholder & value
The input element is a void element. An input element must have a start tag but must not have an end tag.
any element that can contain phrasing elements
interface HTMLInputElement : HTMLElement { attribute DOMString accept; attribute DOMString alt; attribute DOMString autocomplete; attribute boolean autofocus; attribute boolean defaultChecked; attribute boolean checked; attribute DOMString dirName; attribute boolean disabled; readonly attribute HTMLFormElement? form; readonly attribute FileList? files; attribute DOMString formAction; attribute DOMString formEnctype; attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute unsigned long height; attribute boolean indeterminate; readonly attribute HTMLElement? list; attribute DOMString max; attribute long maxLength; attribute DOMString min; attribute boolean multiple; attribute DOMString name; attribute DOMString pattern; attribute DOMString placeholder; attribute boolean readOnly; attribute boolean required; attribute unsigned long size; attribute DOMString src; attribute DOMString step; attribute DOMString type; attribute DOMString defaultValue; attribute DOMString value; attribute Date? valueAsDate; attribute double valueAsNumber; attribute unsigned long width; void stepUp(optional long n); void stepDown(optional long n); readonly attribute boolean willValidate; readonly attribute ValidityState validity; readonly attribute DOMString validationMessage; boolean checkValidity(); void setCustomValidity(DOMString error); readonly attribute NodeList labels; void select(); attribute unsigned long selectionStart; attribute unsigned long selectionEnd; attribute DOMString selectionDirection; void setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction); };
The
input
element
with a type attribute whose
value is "search
" represents
a one-line plain-text edit control for entering one or more
search terms.
empty (void element)
global attributes & name & disabled & form & type★ & autocomplete & autofocus & list & maxlength & pattern & readonly & required & size & placeholder & dirname & value
The input element is a void element. An input element must have a start tag but must not have an end tag.
any element that can contain phrasing elements
interface HTMLInputElement : HTMLElement { attribute DOMString accept; attribute DOMString alt; attribute DOMString autocomplete; attribute boolean autofocus; attribute boolean defaultChecked; attribute boolean checked; attribute DOMString dirName; attribute boolean disabled; readonly attribute HTMLFormElement? form; readonly attribute FileList? files; attribute DOMString formAction; attribute DOMString formEnctype; attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute unsigned long height; attribute boolean indeterminate; readonly attribute HTMLElement? list; attribute DOMString max; attribute long maxLength; attribute DOMString min; attribute boolean multiple; attribute DOMString name; attribute DOMString pattern; attribute DOMString placeholder; attribute boolean readOnly; attribute boolean required; attribute unsigned long size; attribute DOMString src; attribute DOMString step; attribute DOMString type; attribute DOMString defaultValue; attribute DOMString value; attribute Date? valueAsDate; attribute double valueAsNumber; attribute unsigned long width; void stepUp(optional long n); void stepDown(optional long n); readonly attribute boolean willValidate; readonly attribute ValidityState validity; readonly attribute DOMString validationMessage; boolean checkValidity(); void setCustomValidity(DOMString error); readonly attribute NodeList labels; void select(); attribute unsigned long selectionStart; attribute unsigned long selectionEnd; attribute DOMString selectionDirection; void setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction); };
The
input
element
with a type attribute whose
value is "tel
" represents a one-line plain-text
edit control for entering a telephone number.
empty (void element)
global attributes & name & disabled & form & type★ & autocomplete & autofocus & list & maxlength & pattern & readonly & required & size & placeholder & value
The input element is a void element. An input element must have a start tag but must not have an end tag.
any element that can contain phrasing elements
interface HTMLInputElement : HTMLElement { attribute DOMString accept; attribute DOMString alt; attribute DOMString autocomplete; attribute boolean autofocus; attribute boolean defaultChecked; attribute boolean checked; attribute DOMString dirName; attribute boolean disabled; readonly attribute HTMLFormElement? form; readonly attribute FileList? files; attribute DOMString formAction; attribute DOMString formEnctype; attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute unsigned long height; attribute boolean indeterminate; readonly attribute HTMLElement? list; attribute DOMString max; attribute long maxLength; attribute DOMString min; attribute boolean multiple; attribute DOMString name; attribute DOMString pattern; attribute DOMString placeholder; attribute boolean readOnly; attribute boolean required; attribute unsigned long size; attribute DOMString src; attribute DOMString step; attribute DOMString type; attribute DOMString defaultValue; attribute DOMString value; attribute Date? valueAsDate; attribute double valueAsNumber; attribute unsigned long width; void stepUp(optional long n); void stepDown(optional long n); readonly attribute boolean willValidate; readonly attribute ValidityState validity; readonly attribute DOMString validationMessage; boolean checkValidity(); void setCustomValidity(DOMString error); readonly attribute NodeList labels; void select(); attribute unsigned long selectionStart; attribute unsigned long selectionEnd; attribute DOMString selectionDirection; void setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction); };
The
input
element
with a type attribute whose
value is "color
" represents
a color-well control, for setting the element’s value to a
string representing a simple color.
empty (void element)
global attributes & name & disabled & form & type★ & autocomplete & autofocus & list & value
#
"
character.0–9
,
a–f
,
and
A–F
.Color keywords (for example, strings such as “red” or “green”) are not allowed.
The input element is a void element. An input element must have a start tag but must not have an end tag.
any element that can contain phrasing elements
interface HTMLInputElement : HTMLElement { attribute DOMString accept; attribute DOMString alt; attribute DOMString autocomplete; attribute boolean autofocus; attribute boolean defaultChecked; attribute boolean checked; attribute DOMString dirName; attribute boolean disabled; readonly attribute HTMLFormElement? form; readonly attribute FileList? files; attribute DOMString formAction; attribute DOMString formEnctype; attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute unsigned long height; attribute boolean indeterminate; readonly attribute HTMLElement? list; attribute DOMString max; attribute long maxLength; attribute DOMString min; attribute boolean multiple; attribute DOMString name; attribute DOMString pattern; attribute DOMString placeholder; attribute boolean readOnly; attribute boolean required; attribute unsigned long size; attribute DOMString src; attribute DOMString step; attribute DOMString type; attribute DOMString defaultValue; attribute DOMString value; attribute Date? valueAsDate; attribute double valueAsNumber; attribute unsigned long width; void stepUp(optional long n); void stepDown(optional long n); readonly attribute boolean willValidate; readonly attribute ValidityState validity; readonly attribute DOMString validationMessage; boolean checkValidity(); void setCustomValidity(DOMString error); readonly attribute NodeList labels; void select(); attribute unsigned long selectionStart; attribute unsigned long selectionEnd; attribute DOMString selectionDirection; void setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction); };
The ins element represents a range of text that has been inserted (added) to a document.
T
and
Z
in the date/time syntax
must
always be
uppercaseExamples:
1990-12-31T23:59:60Z
1996-12-19T16:39:57-08:00
Example:
1996-12-19
An ins element must have both a start tag and an end tag.
any element that can contain phrasing elements, any element that can contain flow elements
interface HTMLModElement : HTMLElement { attribute DOMString cite; attribute DOMString dateTime; };
The kbd element represents user input.
A kbd element must have both a start tag and an end tag.
any element that can contain phrasing elements
The kbd element typically represents keyboard input, though it may also represent other input, such as voice commands.
Uses HTMLElement.
The keygen element represents a control for generating a public-private key pair and for submitting the public key from that key pair.
empty (void element)
The keygen element is a void element. A keygen element must have a start tag but must not have an end tag.
any element that can contain phrasing elements
interface HTMLKeygenElement : HTMLElement { attribute boolean autofocus; attribute DOMString challenge; attribute boolean disabled; readonly attribute HTMLFormElement? form; attribute DOMString keytype; attribute DOMString name; readonly attribute DOMString type; readonly attribute boolean willValidate; readonly attribute ValidityState validity; readonly attribute DOMString validationMessage; boolean checkValidity(); void setCustomValidity(DOMString error); readonly attribute NodeList labels; };
The label element represents a caption for a form control.
A label element must have both a start tag and an end tag.
any element that can contain phrasing elements
interface HTMLLabelElement : HTMLElement { readonly attribute HTMLFormElement? form; attribute DOMString htmlFor; readonly attribute HTMLElement? control; };
The legend element represents a title or explanatory caption for the rest of the contents of the legend element’s parent element.
A legend element must have both a start tag and an end tag.
interface HTMLLegendElement : HTMLElement { readonly attribute HTMLFormElement? form; };
The li element represents a list item.
An li element must have a start tag.
An li element’s end tag may be omitted if the li element is immediately followed by another li element or if there is no more content in the parent element.
interface HTMLLIElement : HTMLElement { attribute long value; };
The link element represents metadata that expresses inter-document relationships.
empty (void element)
any
"0
"
character and that are separated by a single
"x
"
character.The link element is a void element. A link element must have a start tag but must not have an end tag.
any element that can contain metadata elements, noscript
interface HTMLLIElement : HTMLElement { attribute long value; };
The map element, in conjunction with any area element descendants, defines an image map.
A map element must have both a start tag and an end tag.
any element that can contain phrasing elements, any element that can contain flow elements
interface HTMLMapElement : HTMLElement { attribute DOMString name; readonly attribute HTMLCollection areas; readonly attribute HTMLCollection images; };
The mark element represents a run of text in one document marked or highlighted for reference purposes, due to its relevance in another context.
A mark element must have both a start tag and an end tag.
any element that can contain phrasing elements
Uses HTMLElement.
The meta element is a multipurpose element for representing metadata.
The details of the meta element are described in the following sections:
Although previous versions of HTML allowed the http-equiv attribute on the meta element to have any number of possible values, the http-equiv attribute is now restricted to only the specific values described in this reference. Also, the new charset attribute is now allowed.
The meta element with a name attribute represents document metadata in the form of name/value pairs.
empty (void element)
global attributes & name★ & content★
application-name
",
the value of the
content
attribute
must
be a string representing the name of the Web application
that the page represents.author
",
the value of the
content
attribute
must
be a string that gives the name of one of the authors of
the document.description
",
the value of the
content
attribute
must
be a string that describes the page.generator
",
the value of the
content
attribute
must
be a string that identifies the software
used to generate the document.keywords
",
the value of the
content
attribute
must
be a
set of comma-separated strings,
each of which is a keyword relevant to the document.The meta element is a void element. A meta element must have a start tag but must not have an end tag.
any element that can contain metadata elements
interface HTMLMetaElement : HTMLElement { attribute DOMString name; attribute DOMString httpEquiv; attribute DOMString content; };
The
meta
element
with a http-equiv attribute
whose value is "refresh
" represents a pragma
directive that specifies either a number of seconds after
which to reload the current page,
or a number of seconds after which to load a different page in
place of the current page, and the URL for the replacement
page.
empty (void element)
;
"
character.url=
".The meta element is a void element. A meta element must have a start tag but must not have an end tag.
any element that can contain metadata elements, noscript
interface HTMLMetaElement : HTMLElement { attribute DOMString name; attribute DOMString httpEquiv; attribute DOMString content; };
The
meta
element
with a http-equiv attribute
whose value is "default-style
" represents a pragma
directive that specifies the document’s preferred stylesheet.
empty (void element)
The meta element is a void element. A meta element must have a start tag but must not have an end tag.
any element that can contain metadata elements, noscript
interface HTMLMetaElement : HTMLElement { attribute DOMString name; attribute DOMString httpEquiv; attribute DOMString content; };
The meta element with a charset attribute represents a character encoding declaration.
empty (void element)
UTF-8
".Name
or Alias
field
labeled as “preferred MIME name”;
or, if none of the Alias
fields are so labeled, a
case-insensitive match
for a Name
field in the registry.The meta element is a void element. A meta element must have a start tag but must not have an end tag.
any element that can contain metadata elements
interface HTMLMetaElement : HTMLElement { attribute DOMString name; attribute DOMString httpEquiv; attribute DOMString content; };
A meta element with a http-equiv attribute whose value is "content-type" and which has an accompanying content attribute and value represents a character encoding declaration.
empty (void element)
text/html;
".charset=
".UTF-8
".The meta element is a void element. A meta element must have a start tag but must not have an end tag.
any element that can contain metadata elements
A meta element with a http-equiv attribute whose value is "content-type" and which has an accompanying content attribute and value is said to be in the encoding declaration state.
interface HTMLMetaElement : HTMLElement { attribute DOMString name; attribute DOMString httpEquiv; attribute DOMString content; };
The meter element represents a scalar gauge providing a measurement within a known range, or a fractional value.
A meter element must have both a start tag and an end tag.
any element that can contain phrasing elements
The noscript element is used to present different markup to user agents that don’t support scripting, by affecting how the document is parsed.
zero or more of: one link element, or one meta.http-equiv.default-style element, or one meta.http-equiv.refresh element, or one style element
transparent (either phrasing content or flow content)
A noscript element must have both a start tag and an end tag.
any element that can contain metadata elements, any element that can contain phrasing elements, any element that can contain flow elements
Uses HTMLElement.
The object element represents external content.
Transparent, with the following specific structure:
zero or more param elements, followed by flow content
zero or more param elements, followed by phrasing content
global attributes & data★ & type or type★ & height & width & usemap & name & form & common.attrs.aria
An object element must have both a start tag and an end tag.
any element that can contain phrasing elements, any element that can contain flow elements
The object element represents external content, which, depending on the type of the content, will either be treated as an image, as a nested browsing context, or as external content to be processed by a plugin.
interface HTMLObjectElement : HTMLElement { attribute DOMString data; attribute DOMString type; attribute boolean typeMustMatch; attribute DOMString name; attribute DOMString useMap; readonly attribute HTMLFormElement? form; attribute DOMString width; attribute DOMString height; readonly attribute Document? contentDocument; readonly attribute WindowProxy? contentWindow; readonly attribute boolean willValidate; readonly attribute ValidityState validity; readonly attribute DOMString validationMessage; boolean checkValidity(); void setCustomValidity(DOMString error); legacycaller any (any... arguments); };
The ol element represents a list (or sequence) of items; that is, a list in which the items are intentionally ordered, such that changing the order would change the meaning of the list.
global attributes & start & reversed & type & common.attrs.aria or common.attrs.aria.implicit.region
An ol element must have both a start tag and an end tag.
any element that can contain flow elements
interface HTMLOListElement : HTMLElement { attribute boolean reversed; attribute long start; attribute DOMString type; };
The optgroup element represents a group of option elements with a common label.
An optgroup element must have a start tag.
An optgroup element’s end tag may be omitted if the optgroup element is immediately followed by another optgroup element, or if there is no more content in the parent element.
interface HTMLOptGroupElement : HTMLElement { attribute boolean disabled; attribute DOMString label; };
The option element represents an option in a select control, or an option in a labelled set of options grouped together in an optgroup, or an option among the list of suggestions in a datalist.
global attributes & disabled & selected & label & value
An option element must have a start tag.
An option element’s end tag may be omitted if the option element is immediately followed by another option element, or if it is immediately followed by an optgroup element, or if there is no more content in the parent element.
[NamedConstructor=Option(), NamedConstructor=Option(DOMString text), NamedConstructor=Option(DOMString text, DOMString value), NamedConstructor=Option(DOMString text, DOMString value, boolean defaultSelected), NamedConstructor=Option(DOMString text, DOMString value, boolean defaultSelected, boolean selected)] interface HTMLOptionElement : HTMLElement { attribute boolean disabled; readonly attribute HTMLFormElement? form; attribute DOMString label; attribute boolean defaultSelected; attribute boolean selected; attribute DOMString value; attribute DOMString text; readonly attribute long index; };
The output element represents the result of a calculation.
An output element must have both a start tag and an end tag.
any element that can contain phrasing elements
interface HTMLOutputElement : HTMLElement { [PutForwards=value] readonly attribute DOMSettableTokenList htmlFor; readonly attribute HTMLFormElement? form; attribute DOMString name; readonly attribute DOMString type; attribute DOMString defaultValue; attribute DOMString value; readonly attribute boolean willValidate; readonly attribute ValidityState validity; readonly attribute DOMString validationMessage; boolean checkValidity(); void setCustomValidity(DOMString error); readonly attribute NodeList labels; };
The p element represents a paragraph.
A p element must have a start tag.
A p element’s end tag may be omitted if the p element is immediately followed by an address, article, aside, blockquote, dir, div, dl, fieldset, footer, form, h1, h2, h3, h4, h5, h6, header, hr, menu, nav, ol, p, pre, section, table, or ul element, or if there is no more content in the parent element and the parent element is not an a element.
any element that can contain flow elements
interface HTMLParagraphElement : HTMLElement {};
The param element defines parameters for plugins invoked by object elements.
empty (void element)
global attributes & name★ & value★
The param element is a void element. A param element must have a start tag but must not have an end tag.
interface HTMLParamElement : HTMLElement { attribute DOMString name; attribute DOMString value; };
The pre element represents a block of preformatted text, in which structure is represented by typographic conventions rather than by elements.
A pre element must have both a start tag and an end tag.
any element that can contain flow elements
interface HTMLPreElement : HTMLElement {};
The progress element represents the completion progress of a task.
A progress element must have both a start tag and an end tag.
any element that can contain phrasing elements
The q element represents phrasing content quoted from another source.
A q element must have both a start tag and an end tag.
any element that can contain phrasing elements
interface HTMLQuoteElement : HTMLElement { attribute DOMString cite; };
The rp element can be used to provide parentheses around a ruby text component of a ruby annotation, to be shown by UAs that don’t support ruby annotations.
An rp element must have a start tag.
An rp element’s end tag may be omitted if the rp element is immediately followed by an rt or rp element, or if there is no more content in the parent element.
Uses HTMLElement.
The rt element marks the ruby text component of a ruby annotation.
An rt element must have a start tag.
An rt element’s end tag may be omitted if the rt element is immediately followed by an rt or rp element, or if there is no more content in the parent element.
Uses HTMLElement.
The ruby element allows spans of phrasing content to be marked with ruby annotations.
one or more of: phrasing content followed by one rt element, or one rp element, followed by one rt element, followed by one rp element
A ruby element must have both a start tag and an end tag.
any element that can contain phrasing elements
Uses HTMLElement.
The s element represents contents that are no longer accurate or no longer relevant and that therefore has been “struck” from the document.
An s element must have both a start tag and an end tag.
any element that can contain phrasing elements
Although previous versions of HTML defined the s element only in presentational terms, the element has now been given the specific semantic purpose of representing contents that are no longer accurate or no longer relevant.
Uses HTMLElement.
The samp element represents (sample) output from a program or computing system.
A samp element must have both a start tag and an end tag.
any element that can contain phrasing elements
Uses HTMLElement.
The script element enables dynamic script and data blocks to be included in documents.
global attributes & type & language
global attributes & src & defer & async & type & charset & language
Name
or Alias
field
labeled as “preferred MIME name”;
or, if none of the Alias
fields are so labeled, a
case-insensitive match
for a Name
field in the registry.<!--
" without a matching later occurrence
of the character sequence "-->
".//
",
optionally preceded by one more more
space (U+0020) characters or tab (U+0009) characters,
followed by any
number of characters that are not a newline, and ending with
a newline/*
",
optionally preceded by one more more space (U+0020)
characters or tab (U+0009) characters, and that end with
the character sequence
"*/
"A script element must have both a start tag and an end tag.
any element that can contain metadata elements, any element that can contain phrasing elements
interface HTMLScriptElement : HTMLElement { attribute DOMString src; attribute boolean async; attribute boolean defer; attribute DOMString type; attribute DOMString charset; attribute DOMString text; };
The section element represents a section of a document, typically with a title or heading.
zero or more style elements, followed by flow content
A section element must have both a start tag and an end tag.
any element that can contain flow elements
Uses HTMLElement.
The select element represents a control for selecting among a list of options.
A select element must have both a start tag and an end tag.
any element that can contain phrasing elements
interface HTMLSelectElement : HTMLElement { attribute boolean autofocus; attribute boolean disabled; readonly attribute HTMLFormElement? form; attribute boolean multiple; attribute DOMString name; attribute boolean required; attribute unsigned long size; readonly attribute DOMString type; readonly attribute HTMLOptionsCollection options; attribute unsigned long length; getter Element item(unsigned long index); object namedItem(DOMString name); void add((HTMLOptionElement or HTMLOptGroupElement) element, optional (HTMLElement or long)? before = null); void remove(long index); setter creator void (unsigned long index, HTMLOptionElement option); readonly attribute HTMLCollection selectedOptions; attribute long selectedIndex; attribute DOMString value; readonly attribute boolean willValidate; readonly attribute ValidityState validity; readonly attribute DOMString validationMessage; boolean checkValidity(); void setCustomValidity(DOMString error); readonly attribute NodeList labels; };
The small element represents so-called “fine print” or “small print”, such as legal disclaimers and caveats.
A small element must have both a start tag and an end tag.
any element that can contain phrasing elements
Although previous versions of HTML defined the small element only in presentational terms, the element has now been given the specific semantic purpose of representing those parts of documents that are often referred to as “the fine print” or “the small print”.
Uses HTMLElement.
The source element enables multiple media sources to be specified for audio and video elements.
empty (void element)
global attributes & src★ & type & media
The source element is a void element. A source element must have a start tag but must not have an end tag.
Each separate media source specified within a source element is a complete set of media data — for example, a complete video file, or a complete audio file).
interface HTMLSourceElement : HTMLElement { attribute DOMString src; attribute DOMString type; attribute DOMString media; };
The span element is a generic wrapper for phrasing content that by itself does not represent anything.
A span element must have both a start tag and an end tag.
any element that can contain phrasing elements
interface HTMLSpanElement : HTMLElement {};
The strong element represents a span of text with strong importance.
A strong element must have both a start tag and an end tag.
any element that can contain phrasing elements
Uses HTMLElement.
The style element allows style information to be embedded in documents.
<!--
"
without a matching later occurrence
of the character sequence
"-->
".A style element must have both a start tag and an end tag.
any element that can contain metadata elements, div, noscript, section, article, aside
interface HTMLStyleElement : HTMLElement { attribute boolean disabled; attribute DOMString media; attribute DOMString type; attribute boolean scoped; }; HTMLStyleElement implements LinkStyle;
The sub element represents subscript.
A sub element must have both a start tag and an end tag.
any element that can contain phrasing elements
Uses HTMLElement.
The summary element represents a summary, caption, or legend for a details element.
A summary element must have both a start tag and an end tag.
Uses HTMLElement.
The sup element represents superscript.
A sup element must have both a start tag and an end tag.
any element that can contain phrasing elements
Uses HTMLElement.
The table element represents a table; that is, data with more than one dimension.
an optional caption element, followed by zero or more colgroup elements, followed by an optional thead element, followed by one tfoot element, followed by zero or more tbody elements, or one or more tr elements or zero or more tbody elements, or one or more tr elements followed by an optional tfoot element
A table element must have both a start tag and an end tag.
any element that can contain flow elements
interface HTMLTableElement : HTMLElement { attribute HTMLTableCaptionElement? caption; HTMLElement createCaption(); void deleteCaption(); attribute HTMLTableSectionElement? tHead; HTMLElement createTHead(); void deleteTHead(); attribute HTMLTableSectionElement? tFoot; HTMLElement createTFoot(); void deleteTFoot(); readonly attribute HTMLCollection tBodies; HTMLElement createTBody(); readonly attribute HTMLCollection rows; HTMLElement insertRow(optional long index); void deleteRow(long index); attribute DOMString border; };
The tbody element represents a block of rows that consist of a body of data for its parent table element.
A tbody element's start tag may be omitted if the first thing inside the tbody element is a tr element, and if the element is not immediately preceded by a tbody thead, or tfoot element whose end tag has been omitted.
A tbody element’s end tag may be omitted if the tbody element is immediately followed by a tbody or tfoot element, or if there is no more content in the parent element.
interface HTMLTableSectionElement : HTMLElement { readonly attribute HTMLCollection rows; HTMLElement insertRow(optional long index); void deleteRow(long index); };
The td element represents a data cell in a table.
A td element must have a start tag.
A td element’s end tag may be omitted if the td element is immediately followed by a td or th element, or if there is no more content in the parent element.
interface HTMLTableDataCellElement : HTMLTableCellElement {};
The textarea element represents a multi-line plain-text edit control for the element’s raw value.
global attributes & name & disabled & form & readonly & maxlength & autofocus & required & placeholder & dirname & rows & wrap.hard★ & cols★ or wrap.soft & cols
A textarea element must have both a start tag and an end tag.
any element that can contain phrasing elements
interface HTMLTextAreaElement : HTMLElement { attribute boolean autofocus; attribute unsigned long cols; attribute DOMString dirName; attribute boolean disabled; readonly attribute HTMLFormElement? form; attribute long maxLength; attribute DOMString name; attribute DOMString placeholder; attribute boolean readOnly; attribute boolean required; attribute unsigned long rows; attribute DOMString wrap; readonly attribute DOMString type; attribute DOMString defaultValue; attribute DOMString value; readonly attribute unsigned long textLength; readonly attribute boolean willValidate; readonly attribute ValidityState validity; readonly attribute DOMString validationMessage; boolean checkValidity(); void setCustomValidity(DOMString error); readonly attribute NodeList labels; void select(); attribute unsigned long selectionStart; attribute unsigned long selectionEnd; attribute DOMString selectionDirection; void setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction); };
The tfoot element represents the block of rows that consist of the column summaries (footers) for its parent table element.
A tfoot element must have a start tag.
A tfoot element’s end tag may be omitted if the tfoot element is immediately followed by a tbody element, or if there is no more content in the parent element.
interface HTMLTableSectionElement : HTMLElement { readonly attribute HTMLCollection rows; HTMLElement insertRow(optional long index); void deleteRow(long index); };
The th element represents a header cell in a table.
A th element must have a start tag.
A th element’s end tag may be omitted if the th element is immediately followed by a td or th element, or if there is no more content in the parent element.
interface HTMLTableHeaderCellElement : HTMLTableCellElement { attribute DOMString scope; };
The thead element represents the block of rows that consist of the column labels (headings) for its parent table element.
A thead element must have a start tag.
A
thead
element’s
end tag
may be omitted if the
thead
element is immediately followed by a
tbody
or
tfoot
element.
interface HTMLTableSectionElement : HTMLElement { readonly attribute HTMLCollection rows; HTMLElement insertRow(optional long index); void deleteRow(long index); };
The time element represents a date and/or time.
Example:
1996-12-19
T
and
Z
in the date/time syntax
must
always be
uppercaseExamples:
1990-12-31T23:59:60Z
1996-12-19T16:39:57-08:00
A time element must have both a start tag and an end tag.
any element that can contain phrasing elements
If the datetime (any) attribute is not specified, then the date or time represented is given by the contents of the element, and the character data in those contents must conform to the date-or-time datatype.
interface HTMLTimeElement : HTMLElement { attribute DOMString datetime (any); };
The title element represents the document’s title or name.
A title element must have both a start tag and an end tag.
interface HTMLTitleElement : HTMLElement { attribute DOMString text; };
The tr element represents a row of cells in a table.
A tr element must have a start tag.
A tr element’s end tag may be omitted if the tr element is immediately followed by another tr element, or if there is no more content in the parent element.
interface HTMLTableRowElement : HTMLElement { readonly attribute long rowIndex; readonly attribute long sectionRowIndex; readonly attribute HTMLCollection cells; HTMLElement insertCell(optional long index); void deleteCell(long index); };
The track element enables supplementary media tracks such as subtitle tracks and caption tracks to be specified for audio and video elements.
empty (void element)
The track element is a void element. A track element must have a start tag but must not have an end tag.
interface HTMLTrackElement : HTMLElement { attribute DOMString kind; attribute DOMString src; attribute DOMString srclang; attribute DOMString label; attribute boolean default; const unsigned short NONE = 0; const unsigned short LOADING = 1; const unsigned short LOADED = 2; const unsigned short ERROR = 3; readonly attribute unsigned short readyState; readonly attribute TextTrack track; };
The u element represents a span of text offset from its surrounding content without conveying any extra emphasis or importance, and for which the conventional typographic presentation is underlining; for example, a span of text in Chinese that is a proper name (a Chinese proper name mark), or span of text that is known to be misspelled.
A u element must have both a start tag and an end tag.
any element that can contain phrasing elements
Although previous versions of HTML defined the u element only in presentational terms, the element has now been given the specific semantic purpose of representing text “offset from its surrounding content without conveying any extra emphasis or importance, and for which the conventional typographic presentation is underlining”.
Uses HTMLElement.
The ul element represents an unordered list of items; that is, a list in which changing the order of the items would not change the meaning of list.
A ul element must have both a start tag and an end tag.
any element that can contain flow elements
interface HTMLUListElement : HTMLElement {};
The var element represents either a variable in a mathematical expression or programming context, or placeholder text that the reader is meant to mentally replace with some other literal value.
A var element must have both a start tag and an end tag.
any element that can contain phrasing elements
Uses HTMLElement.
The video element represents a video or movie.
Transparent, with the following specific structure:
a src attribute, or zero or more source elements followed by zero or more track elements, followed by flow content
a src attribute, or zero or more source elements followed by zero or more track elements, followed by phrasing content
global attributes & autoplay & preload & controls & loop & poster & height & width & mediagroup & muted & src
A video element must have both a start tag and an end tag.
any element that can contain phrasing elements, any element that can contain flow elements
interface HTMLVideoElement : HTMLMediaElement { attribute unsigned long width; attribute unsigned long height; readonly attribute unsigned long videoWidth; readonly attribute unsigned long videoHeight; attribute DOMString poster; };
The wbr element represents a line-break opportunity.
empty (void element)
The wbr element is a void element. A wbr element must have a start tag but must not have an end tag.
any element that can contain phrasing elements
Uses HTMLElement.
This section describes content models that are referenced by a number of different element descriptions in the Content model subsections of the per-element documentation in the HTML elements section.
phrasing elements or a or p or hr or pre or ul or ol or dl or div or h1 or h2 or h3 or h4 or h5 or h6 or hgroup or address or blockquote or ins or del or object or map or noscript or section or nav or article or aside or header or footer or video or audio or figure or table or form or fieldset or menu or canvas or details
link or style or meta.name or meta.http-equiv.refresh or meta.http-equiv.default-style or meta.charset or meta.http-equiv.content-type or script or noscript or command
a or em or strong or small or mark or abbr or dfn or i or b or s or u or code or var or samp or kbd or sup or sub or q or cite or span or bdo or bdi or br or wbr or ins or del or img or embed or object or iframe or map or area or script or noscript or ruby or video or audio or input or textarea or select or button or label or output or datalist or keygen or progress or command or canvas or time or meter
This section describes attributes that are common to all elements in the HTML language.
accesskey & class & contenteditable & contextmenu & dir & draggable & dropzone & hidden & id & lang & spellcheck & style & tabindex & title
An unordered set of unique space-separated tokens, each of which is a case-insensitive match for one of the following:
copy
Indicates that dropping an accepted item on the element will result in a copy of the dragged data.
move
Indicates that dropping an accepted item on the element will result in the dragged data being moved to the new location.
link
Indicates that dropping an accepted item on the element will result in a link to the original data.
string:
".
Indicates that Plain Unicode string items, of the type
indicated by the part of of the keyword after the
"string:
"
string, can be dropped on this element.
file:
".
Indicates that File items, of the type
indicated by the part of of the keyword after the
"file:
"
string, can be dropped on this element.
The value must not have more than one of the three tokens
"copy
",
"move
",
or
"link
".
If none are specified, the element represents a
copy
dropzone.
Previous versions of HTML placed greater restrictions on the content of ID values (for example, they did not permit ID values to begin with a number).
onabort & onblur & oncanplay & oncanplaythrough & onchange & onclick & oncontextmenu & ondblclick & ondrag & ondragend & ondragenter & ondragleave & ondragover & ondragstart & ondrop & ondurationchange & onemptied & onended & onerror & onfocus & oninput & oninvalid & onkeydown & onkeypress & onkeyup & onload & onloadeddata & onloadedmetadata & onloadstart & onmousedown & onmousemove & onmouseout & onmouseover & onmouseup & onmousewheel & onpause & onplay & onplaying & onprogress & onratechange & onreadystatechange & onreset & onscroll & onseeked & onseeking & onselect & onshow & onstalled & onsubmit & onsuspend & ontimeupdate & onvolumechange & onwaiting
duration
on the
video or audio element has been updated.defaultPlaybackRate
or the DOM attribute playbackRate
on the video or audio element has been updated.seeking
changed to false
(a seek operation on the
video or audio element ended).seeking
changed to true
, and the seek operation on
the video or audio elements is taking long enough that the
UA has time to fire the seeking
event.volume
or the DOM attribute muted
on the video or audio element has been changed.xml:space
attribute should only be used with
documents in the XML syntax;
it
must
not be used in
documents in the HTML syntax.xml:base
attribute should only be used with
documents in the XML syntax;
it
must
not be used in
documents in the HTML syntax.This section describes data types (microsyntaxes) that are referenced by attribute descriptions in the HTML elements, and Global attributes sections.
The Attributes section of this document describes additional restrictions on strings in attribute values — in particular, restrictions for the following cases:
,
"
(comma) character. Each string itself
must
not begin or end with any
space characters,
and each string itself
must
not contain any
",
"
(comma) characters._blank
",
"_self
",
"_parent
",
or
"_top
".
Previous versions of HTML placed greater restrictions on the content of ID values (for example, they did not permit ID values to begin with a number).
id
attribute of an element of type
type
anywhere in the document.#
"
character, followed by a string which
exactly matches the value of the
name
attribute of an element of type
type
anywhere in the document.0—9
,
optionally prefixed with a
"-
"
character.0—9
.-
"
character.0—9
"..
"
character0—9
"e
"
character or
"E
"
character-
"
character or
"+
"
character0—9
".-
"
characterT
and
Z
in the date/time syntax
must
always be
uppercaseExamples:
1990-12-31T23:59:60Z
1996-12-19T16:39:57-08:00
Example:
1996-12-19
The empty string is a valid IRI reference, so the empty string is allowed anywhere this reference lists the “URL” datatype as being allowed.
Example:
http://example.org/hello
The empty string is a valid URL, so the empty string is allowed anywhere this reference lists the “URL potentially surrounded by spaces” datatype as being allowed.
Examples:
/hello
#canvas
http://example.org/
any
"0
"
character and that are separated by a single
"x
"
character.Name
or Alias
field
labeled as “preferred MIME name”;
or, if none of the Alias
fields are so labeled, a
case-insensitive match
for a Name
field in the registry.text/html;
".charset=
".UTF-8
".;
"
character.url=
".An unordered set of unique space-separated tokens, each of which is a case-insensitive match for one of the following:
copy
Indicates that dropping an accepted item on the element will result in a copy of the dragged data.
move
Indicates that dropping an accepted item on the element will result in the dragged data being moved to the new location.
link
Indicates that dropping an accepted item on the element will result in a link to the original data.
string:
".
Indicates that Plain Unicode string items, of the type
indicated by the part of of the keyword after the
"string:
"
string, can be dropped on this element.
file:
".
Indicates that File items, of the type
indicated by the part of of the keyword after the
"file:
"
string, can be dropped on this element.
The value must not have more than one of the three tokens
"copy
",
"move
",
or
"link
".
If none are specified, the element represents a
copy
dropzone.
0
".FunctionBody
production
[ECMA 262].allow-forms
"allow-scripts
"allow-top-navigation
"allow-same-origin
"Because an unordered set of unique space-separated tokens can contain zero tokens, this datatype also allows the following:
Example:
1985-04-12T23:20:50.52
1996-12-19T16:39:57
Example:
1996-12-19
-
".Example:
1996-12
-W
".52
or
53
,
depending on the particular year.Example:
1996-W16
1*( atext / "." ) "@" ldh-str 1*( "." ldh-str )
…where atext is as defined in [RFC 5322], and ldh-str is as defined in [RFC 1034].
That is, any string which matches the following regular expression:
/^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/
Examples:
foo-bar.baz@example.com
#
"
character.0–9
,
a–f
,
and
A–F
.Color keywords (for example, strings such as “red” or “green”) are not allowed.
This section provides information about ARIA attributes.
alert
"
intermixed with an optional aria-expanded element
alertdialog
"
intermixed with an optional aria-expanded element
application
"
intermixed with an optional aria-expanded element
article
"
intermixed with an optional aria-expanded element
checkbox
"
intermixed with aria-checked
combobox
"
intermixed with an optional aria-activedescendant element,
intermixed with aria-expanded
complementary
"
intermixed with an optional aria-expanded element
contentinfo
"
intermixed with an optional aria-expanded element
definition
"
intermixed with an optional aria-expanded element
dialog
"
intermixed with an optional aria-expanded element
directory
"
intermixed with an optional aria-expanded element
document
"
intermixed with an optional aria-expanded element
grid
"
intermixed with an optional aria-level element,
intermixed with an optional aria-multiselectable element,
intermixed with an optional aria-readonly element,
intermixed with an optional aria-activedescendant element,
intermixed with an optional aria-expanded element
gridcell
"
intermixed with an optional aria-level element,
intermixed with an optional aria-readonly element,
intermixed with an optional aria-selected element,
intermixed with an optional aria-expanded element
group
"
intermixed with an optional aria-activedescendant element,
intermixed with an optional aria-expanded element
img
"
intermixed with an optional aria-expanded element
list
"
intermixed with an optional aria-expanded element
listbox
"
intermixed with an optional aria-multiselectable element,
intermixed with an optional aria-activedescendant element,
intermixed with an optional aria-expanded element
listitem
"
intermixed with an optional aria-posinset element,
intermixed with an optional aria-setsize element,
intermixed with an optional aria-level element,
intermixed with an optional aria-expanded element
log
"
intermixed with an optional aria-expanded element
main
"
intermixed with an optional aria-expanded element
marquee
"
intermixed with an optional aria-expanded element
math
"
intermixed with an optional aria-expanded element
note
"
intermixed with an optional aria-expanded element
option
"
intermixed with an optional aria-checked element,
intermixed with an optional aria-selected element
presentation
"
intermixed with an optional aria-expanded element
progressbar
"
intermixed with an optional aria-valuemax element,
intermixed with an optional aria-valuemin element,
intermixed with an optional aria-valuenow element,
intermixed with an optional aria-valuetext element
radio
"
intermixed with one aria-checked element,
intermixed with an optional aria-selected element
radiogroup
"
intermixed with an optional aria-activedescendant element,
intermixed with an optional aria-expanded element
region
"
intermixed with an optional aria-expanded element
row
"
intermixed with an optional aria-level element,
intermixed with an optional aria-selected element,
intermixed with an optional aria-activedescendant element,
intermixed with an optional aria-expanded element
search
"
intermixed with an optional aria-expanded element
separator
"
intermixed with an optional aria-expanded element
slider
"
intermixed with one aria-valuemax element,
intermixed with one aria-valuemin element,
intermixed with one aria-valuenow element,
intermixed with aria-valuetext
status
"
intermixed with an optional aria-activedescendant element,
intermixed with an optional aria-expanded element
tab
"
intermixed with an optional aria-selected element,
intermixed with an optional aria-expanded element
tabpanel
"
intermixed with an optional aria-expanded element
textbox
"
intermixed with an optional aria-autocomplete element,
intermixed with an optional aria-multiline element,
intermixed with an optional aria-readonly element
timer
"
intermixed with an optional aria-activedescendant element,
intermixed with an optional aria-expanded element
toolbar
"
intermixed with an optional aria-activedescendant element,
intermixed with an optional aria-expanded element
tooltip
"
intermixed with an optional aria-expanded element
tree
"
intermixed with an optional aria-multiselectable element,
intermixed with an optional aria-activedescendant element,
intermixed with an optional aria-expanded element
treegrid
"
intermixed with an optional aria-activedescendant element,
intermixed with an optional aria-expanded element,
intermixed with an optional aria-level element,
intermixed with an optional aria-multiselectable element,
intermixed with an optional aria-readonly element
treeitem
"
intermixed with an optional aria-checked element,
intermixed with an optional aria-expanded element,
intermixed with an optional aria-level element,
intermixed with an optional aria-posinset element,
intermixed with an optional aria-selected element,
intermixed with an optional aria-setsize element
The semantics of the following attributes are normatively defined in the ARIA specification.
This document incorporates a modified version of a CSS stylesheet from the WebKit source repository, distributed with the following copyright notice and license statement:
Copyright (C) 2000 Lars Knoll (knoll@kde.org) Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
This document incorporates modified and verbatim content from the document HTML5, distributed with the following copyright notice and license statement:
Copyright © 2010 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C liability, trademark and document use rules apply.
ABNF (specification)
absolute URL potentially surrounded by spaces
ambiguous ampersand
application cache manifest
ASCII-compatible character encoding
attribute names
attribute values
attributes
BCP 47 (specification)
browsing context
browsing-context name
browsing-context name or keyword
case-insensitive match
CDATA end delimiter
CDATA sections in SVG and MathML contents
CDATA start delimiter
character data
character encoding declaration
character encoding name
character references
Character Sets (specification)
circle coordinates
comments
common.attrs.aria
common.attrs.aria.implicit.group
common.attrs.aria.implicit.listitem
common.attrs.aria.implicit.region
common.attrs.aria.implicit.th
common.attrs.aria.landmark.application
common.attrs.aria.landmark.article
common.attrs.aria.landmark.banner
common.attrs.aria.landmark.complementary
common.attrs.aria.landmark.contentinfo
common.attrs.aria.landmark.document
common.attrs.aria.landmark.main
common.attrs.aria.landmark.note
common.attrs.aria.landmark.search
contents
CSS (specification)
date
date
date and time
date or time
decimal numeric character reference
default-style name
defined metadata name
description list
document in the HTML syntax
document in the XML syntax
DOM (specification)
double-quoted attribute value
double-quoted attribute-value syntax
dropzone value
e-mail address
ECMA 262 (specification)
empty attribute syntax
encoding declaration state
end tags
fallback content
floating-point number
flow content
functionbody
hash-name reference
hexadecimal numeric character reference
HTML elements
HTML language
HTML namespace
HTML parser
HTML syntax
HTML5 (specification)
HTML5 for Web Authors (specification)
ID reference
integer
language tag
list of character-encoding names
list of e-mail addresses
list of ID references
list of key labels
list of MIME types
local date and time
marked as self-closing
Media Queries (specification)
media-query list
media source
meta-charset string
MIME type
month
must
named character reference
namespace-well-formed
Namespaces in XML (specification)
non-empty string
non-empty URL potentially surrounded by spaces
non-negative floating-point number
non-negative integer
non-replaceable character data
normal character data
omitted
ordered set of unique space-separated tokens
pattern
permitted-public-ID-system-ID-combination
phrasing content
polygon coordinates
positive floating-point number
positive integer
rectangle coordinates
refresh value
registered metadata name
replaceable character data
resolve a URL
RFC 1034 (specification)
RFC 2046 (specification)
RFC 3339 (specification)
RFC 3987 (specification)
RFC 5322 (specification)
root element
sandbox “allow” keywords list
set of comma-separated strings
set of space-separated tokens
single-quoted attribute value
single-quoted attribute-value syntax
space
start tags
string
string without line breaks
SVG and MathML elements
tag names
tags
text
time
top-level browsing context
transparent
unordered set of unique space-separated tokens
unquoted attribute value
unquoted attribute-value syntax
URL
URL potentially surrounded by spaces
void element
week
XML (specification)
XML declaration
XML Entities (specification)
XML parser
XML syntax
XMLBase (specification)
Comments # T
comments consist of the following parts, in exactly the following order:
<!--
"-->
"The text part of comments has the following restrictions:
>
" character->
"--
"-
" characterThe following is an example of a comment.