Permitted content #
zero or more style elements, followed by flow content
The content of this document is also available as multiple HTML files.
Copyright © 2010 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C liability, trademark and document use rules apply.
This non-normative reference describes the HTML markup language and provides details to help producers of HTML content create documents that conform to the language. It is intended to complement the normative conformance criteria defined in the HTML5: A vocabulary and associated APIs for HTML and XHTML specification [HTML5]. By design, this reference does not describe related APIs in detail, nor attempt to explain how implementations that are consumers of HTML content are meant to process documents (those areas are covered by the HTML5 specification itself), nor attempt to also be a tutorial or “how to” authoring guide.
This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at http://www.w3.org/TR/.
This document is the 24 June 2010 Working Draft of
HTML: The Markup Language.
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 was published by the W3C HTML Working Group, part of the HTML Activity in the W3C Interaction Domain.
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:
Publication as a Working Draft does not imply endorsement by the W3C Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.
This document was produced by a group operating under the 5 February 2004 W3C Patent Policy. This document is informative only. W3C maintains a public list of any patent disclosures made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains Essential Claim(s) must disclose the information in accordance with section 6 of the W3C Patent Policy.
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 (Edition for Web Authors) subset [HTML5AUTHOR] of the normative HTML5: A vocabulary and associated APIs for HTML and XHTML full specification [HTML5].
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: A vocabulary and associated APIs for HTML and XHTML full specification [HTML5].
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 [XML] and in the Namespaces in XML 1.0 specification [XMLNS]; 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.
A conformant document in the HTML syntax must consist of the following parts, in the following order:
Documents in the HTML syntax must match the syntax described in the HTML syntax section of this reference.
A conformant document in the XML syntax must be a namespace-well-formed XML document, as defined in the Namespaces in XML 1.0 specification [XMLNS], 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 [XML] and in the Namespaces in XML 1.0 specification [XMLNS]).
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.
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>
An unquoted attribute value is specified by providing the following parts in exactly the following order:
=
"
characterIn addition to the general requirements given above for attribute values, an unquoted attribute value has the following restrictions:
"
",
"'
",
">
",
"=
",
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 given above 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 given above 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 and strings in the values of particular attributes 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.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} \begin{document} \title{E} \maketitle The base of the natural logarithms, approximately 2.71828. \end{document}]]> </annotation>
The complete set of HTML elements is the set of elements described in the following sections.
The a element represents a hyperlink.
transparent (either phrasing content or flow content)
any element that can contain phrasing elements, any element that can contain flow elements
If the contents of an a element are empty, the element represents an empty hyperlink.
Although previous versions of HTML restricted the a element to only containing phrasing content, the a element is now transparent; and so is now also allowed to contain flow content if its parent element is 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; };
The abbr element represents an abbreviation or acronym.
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.
any element that can contain flow elements
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)
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
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
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 flow content
a src attribute, or zero or more source elements followed by phrasing content
any element that can contain phrasing elements, any element that can contain flow elements
[NamedConstructor=Audio(), NamedConstructor=Audio(in DOMString src)] interface HTMLAudioElement : HTMLMediaElement {};
The b element represents a span of text offset from its surrounding content without conveying any extra importance; for example, keywords in a document abstract, product names in a review, or other spans of text whose typical typographic presentation is bold text.
any element that can contain phrasing elements
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)
common attributes & href★ & target or target★
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 bdo element provides a means to specify a direction override of the Unicode BiDi algorithm.
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).
common attributes & onafterprint & onbeforeprint & onbeforeunload & onhashchange & onmessage & onoffline & ononline & onpopstate & onredo & onresize & onstorage & onundo & 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 { attribute Function onafterprint; attribute Function onbeforeprint; attribute Function onbeforeunload; attribute Function onblur; attribute Function onerror; attribute Function onfocus; attribute Function onhashchange; attribute Function onload; attribute Function onmessage; attribute Function onoffline; attribute Function ononline; attribute Function onpopstate; attribute Function onpagehide; attribute Function onpageshow; attribute Function onredo; attribute Function onresize; attribute Function onstorage; attribute Function onundo; 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.
transparent (either phrasing content or flow content)
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(in optional DOMString type, in any... args); object getContext(in DOMString contextId); };
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.
any element that can contain phrasing elements
Uses HTMLElement.
The code element represents a fragment of computer code.
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; };
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; };
See the following sections:
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)
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; };
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)
common 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; };
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; };
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
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 dt 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.
transparent (either phrasing content or flow content)
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.
an optional summary element, followed by flow content
any element that can contain flow elements
interface HTMLDetailsElement : HTMLElement { attribute boolean open; };
The dfn element represents the defining instance of a term.
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
any element that can contain flow elements
interface HTMLDivElement : HTMLElement {};
The dl element represents a description list.
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.
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 fieldset
element represents a
set of form controls grouped under a common name.
an optional legend element, followed by flow content
common attributes & name & disabled & form
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(in 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
any element that can contain flow elements
Uses HTMLElement.
The form element represents a user-submittable form.
common attributes & action & method & enctype & name & accept-charset & novalidate & target & autocomplete
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 method; attribute DOMString name; attribute boolean noValidate; attribute DOMString target; readonly attribute HTMLFormControlsCollection elements; readonly attribute long length; caller getter any item(in unsigned long index); caller getter any namedItem(in DOMString name); void submit(); void reset(); boolean checkValidity(); void dispatchFormInput(); void dispatchFormChange(); };
any element that can contain flow elements, hgroup
interface HTMLHeadingElement : HTMLElement {};
any element that can contain flow elements, hgroup
interface HTMLHeadingElement : HTMLElement {};
any element that can contain flow elements, hgroup
interface HTMLHeadingElement : HTMLElement {};
any element that can contain flow elements, hgroup
interface HTMLHeadingElement : HTMLElement {};
any element that can contain flow elements, hgroup
interface HTMLHeadingElement : HTMLElement {};
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.
any element that can contain flow elements
Uses HTMLElement.
The hgroup element represents a group of headings.
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
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 in an alternate voice or mood, or otherwise offset from the normal prose (content whose typical typographic presentation is italicized).
any element that can contain phrasing elements
Some examples of spans that might use the i element include a taxonomic designation, a technical term, an idiomatic phrase from another language, a thought, a ship name, or some other prose whose typical typographic presentation is italicized.
Uses HTMLElement.
The iframe element introduces a new nested browsing context.
iframe
.iframe
element's browsing context is to be rendered
in a manner that makes it appear to be part of the
containing document (seamlessly included in the parent
document).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)
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(in unsigned long width), NamedConstructor=Image(in unsigned long width, in unsigned long height)] interface HTMLImageElement : HTMLElement { attribute DOMString alt; attribute DOMString src; 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; };
See the following sections:
An input element with no type attribute specified represents the same thing as a input element with its type attribute set to "text".
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)
common attributes & name & disabled & form & type & maxlength & readonly & size & value & autocomplete & autofocus & list & 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 boolean disabled; readonly attribute HTMLFormElement form; readonly attribute files; attribute DOMString formAction; attribute DOMString formEnctype; attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute DOMString 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 valueAsDate; attribute double valueAsNumber; readonly attribute HTMLOptionElement selectedOption; attribute DOMString width; void stepUp(in optional long n); void stepDown(in optional long n); readonly attribute boolean willValidate; readonly attribute ValidityState validity; readonly attribute DOMString validationMessage; boolean checkValidity(); void setCustomValidity(in DOMString error); readonly attribute NodeList labels; void select(); attribute unsigned long selectionStart; attribute unsigned long selectionEnd; void setSelectionRange(in unsigned long start, in unsigned long end); };
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)
common 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 boolean disabled; readonly attribute HTMLFormElement form; readonly attribute files; attribute DOMString formAction; attribute DOMString formEnctype; attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute DOMString 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 valueAsDate; attribute double valueAsNumber; readonly attribute HTMLOptionElement selectedOption; attribute DOMString width; void stepUp(in optional long n); void stepDown(in optional long n); readonly attribute boolean willValidate; readonly attribute ValidityState validity; readonly attribute DOMString validationMessage; boolean checkValidity(); void setCustomValidity(in DOMString error); readonly attribute NodeList labels; void select(); attribute unsigned long selectionStart; attribute unsigned long selectionEnd; void setSelectionRange(in unsigned long start, in unsigned long end); };
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 boolean disabled; readonly attribute HTMLFormElement form; readonly attribute files; attribute DOMString formAction; attribute DOMString formEnctype; attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute DOMString 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 valueAsDate; attribute double valueAsNumber; readonly attribute HTMLOptionElement selectedOption; attribute DOMString width; void stepUp(in optional long n); void stepDown(in optional long n); readonly attribute boolean willValidate; readonly attribute ValidityState validity; readonly attribute DOMString validationMessage; boolean checkValidity(); void setCustomValidity(in DOMString error); readonly attribute NodeList labels; void select(); attribute unsigned long selectionStart; attribute unsigned long selectionEnd; void setSelectionRange(in unsigned long start, in unsigned long end); };
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 boolean disabled; readonly attribute HTMLFormElement form; readonly attribute files; attribute DOMString formAction; attribute DOMString formEnctype; attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute DOMString 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 valueAsDate; attribute double valueAsNumber; readonly attribute HTMLOptionElement selectedOption; attribute DOMString width; void stepUp(in optional long n); void stepDown(in optional long n); readonly attribute boolean willValidate; readonly attribute ValidityState validity; readonly attribute DOMString validationMessage; boolean checkValidity(); void setCustomValidity(in DOMString error); readonly attribute NodeList labels; void select(); attribute unsigned long selectionStart; attribute unsigned long selectionEnd; void setSelectionRange(in unsigned long start, in unsigned long end); };
The input element
with a type attribute whose
value is "submit
" represents a button for
submitting a form.
empty (void element)
common attributes & name & disabled & form & type★ & value & formaction & autofocus & formenctype & formmethod & formtarget & formnovalidate
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 boolean disabled; readonly attribute HTMLFormElement form; readonly attribute files; attribute DOMString formAction; attribute DOMString formEnctype; attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute DOMString 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 valueAsDate; attribute double valueAsNumber; readonly attribute HTMLOptionElement selectedOption; attribute DOMString width; void stepUp(in optional long n); void stepDown(in optional long n); readonly attribute boolean willValidate; readonly attribute ValidityState validity; readonly attribute DOMString validationMessage; boolean checkValidity(); void setCustomValidity(in DOMString error); readonly attribute NodeList labels; void select(); attribute unsigned long selectionStart; attribute unsigned long selectionEnd; void setSelectionRange(in unsigned long start, in unsigned long end); };
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 boolean disabled; readonly attribute HTMLFormElement form; readonly attribute files; attribute DOMString formAction; attribute DOMString formEnctype; attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute DOMString 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 valueAsDate; attribute double valueAsNumber; readonly attribute HTMLOptionElement selectedOption; attribute DOMString width; void stepUp(in optional long n); void stepDown(in optional long n); readonly attribute boolean willValidate; readonly attribute ValidityState validity; readonly attribute DOMString validationMessage; boolean checkValidity(); void setCustomValidity(in DOMString error); readonly attribute NodeList labels; void select(); attribute unsigned long selectionStart; attribute unsigned long selectionEnd; void setSelectionRange(in unsigned long start, in unsigned long end); };
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 boolean disabled; readonly attribute HTMLFormElement form; readonly attribute files; attribute DOMString formAction; attribute DOMString formEnctype; attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute DOMString 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 valueAsDate; attribute double valueAsNumber; readonly attribute HTMLOptionElement selectedOption; attribute DOMString width; void stepUp(in optional long n); void stepDown(in optional long n); readonly attribute boolean willValidate; readonly attribute ValidityState validity; readonly attribute DOMString validationMessage; boolean checkValidity(); void setCustomValidity(in DOMString error); readonly attribute NodeList labels; void select(); attribute unsigned long selectionStart; attribute unsigned long selectionEnd; void setSelectionRange(in unsigned long start, in unsigned long end); };
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)
common attributes & name & disabled & form & type★ & alt★ & src & formaction & autofocus & formenctype & formmethod & formtarget & formnovalidate & height & width
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 boolean disabled; readonly attribute HTMLFormElement form; readonly attribute files; attribute DOMString formAction; attribute DOMString formEnctype; attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute DOMString 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 valueAsDate; attribute double valueAsNumber; readonly attribute HTMLOptionElement selectedOption; attribute DOMString width; void stepUp(in optional long n); void stepDown(in optional long n); readonly attribute boolean willValidate; readonly attribute ValidityState validity; readonly attribute DOMString validationMessage; boolean checkValidity(); void setCustomValidity(in DOMString error); readonly attribute NodeList labels; void select(); attribute unsigned long selectionStart; attribute unsigned long selectionEnd; void setSelectionRange(in unsigned long start, in unsigned long end); };
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)
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 boolean disabled; readonly attribute HTMLFormElement form; readonly attribute files; attribute DOMString formAction; attribute DOMString formEnctype; attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute DOMString 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 valueAsDate; attribute double valueAsNumber; readonly attribute HTMLOptionElement selectedOption; attribute DOMString width; void stepUp(in optional long n); void stepDown(in optional long n); readonly attribute boolean willValidate; readonly attribute ValidityState validity; readonly attribute DOMString validationMessage; boolean checkValidity(); void setCustomValidity(in DOMString error); readonly attribute NodeList labels; void select(); attribute unsigned long selectionStart; attribute unsigned long selectionEnd; void setSelectionRange(in unsigned long start, in unsigned long end); };
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)
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 boolean disabled; readonly attribute HTMLFormElement form; readonly attribute files; attribute DOMString formAction; attribute DOMString formEnctype; attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute DOMString 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 valueAsDate; attribute double valueAsNumber; readonly attribute HTMLOptionElement selectedOption; attribute DOMString width; void stepUp(in optional long n); void stepDown(in optional long n); readonly attribute boolean willValidate; readonly attribute ValidityState validity; readonly attribute DOMString validationMessage; boolean checkValidity(); void setCustomValidity(in DOMString error); readonly attribute NodeList labels; void select(); attribute unsigned long selectionStart; attribute unsigned long selectionEnd; void setSelectionRange(in unsigned long start, in unsigned long end); };
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)
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 boolean disabled; readonly attribute HTMLFormElement form; readonly attribute files; attribute DOMString formAction; attribute DOMString formEnctype; attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute DOMString 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 valueAsDate; attribute double valueAsNumber; readonly attribute HTMLOptionElement selectedOption; attribute DOMString width; void stepUp(in optional long n); void stepDown(in optional long n); readonly attribute boolean willValidate; readonly attribute ValidityState validity; readonly attribute DOMString validationMessage; boolean checkValidity(); void setCustomValidity(in DOMString error); readonly attribute NodeList labels; void select(); attribute unsigned long selectionStart; attribute unsigned long selectionEnd; void setSelectionRange(in unsigned long start, in unsigned long end); };
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)
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 boolean disabled; readonly attribute HTMLFormElement form; readonly attribute files; attribute DOMString formAction; attribute DOMString formEnctype; attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute DOMString 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 valueAsDate; attribute double valueAsNumber; readonly attribute HTMLOptionElement selectedOption; attribute DOMString width; void stepUp(in optional long n); void stepDown(in optional long n); readonly attribute boolean willValidate; readonly attribute ValidityState validity; readonly attribute DOMString validationMessage; boolean checkValidity(); void setCustomValidity(in DOMString error); readonly attribute NodeList labels; void select(); attribute unsigned long selectionStart; attribute unsigned long selectionEnd; void setSelectionRange(in unsigned long start, in unsigned long end); };
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)
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 boolean disabled; readonly attribute HTMLFormElement form; readonly attribute files; attribute DOMString formAction; attribute DOMString formEnctype; attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute DOMString 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 valueAsDate; attribute double valueAsNumber; readonly attribute HTMLOptionElement selectedOption; attribute DOMString width; void stepUp(in optional long n); void stepDown(in optional long n); readonly attribute boolean willValidate; readonly attribute ValidityState validity; readonly attribute DOMString validationMessage; boolean checkValidity(); void setCustomValidity(in DOMString error); readonly attribute NodeList labels; void select(); attribute unsigned long selectionStart; attribute unsigned long selectionEnd; void setSelectionRange(in unsigned long start, in unsigned long end); };
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)
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 boolean disabled; readonly attribute HTMLFormElement form; readonly attribute files; attribute DOMString formAction; attribute DOMString formEnctype; attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute DOMString 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 valueAsDate; attribute double valueAsNumber; readonly attribute HTMLOptionElement selectedOption; attribute DOMString width; void stepUp(in optional long n); void stepDown(in optional long n); readonly attribute boolean willValidate; readonly attribute ValidityState validity; readonly attribute DOMString validationMessage; boolean checkValidity(); void setCustomValidity(in DOMString error); readonly attribute NodeList labels; void select(); attribute unsigned long selectionStart; attribute unsigned long selectionEnd; void setSelectionRange(in unsigned long start, in unsigned long end); };
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)
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 boolean disabled; readonly attribute HTMLFormElement form; readonly attribute files; attribute DOMString formAction; attribute DOMString formEnctype; attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute DOMString 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 valueAsDate; attribute double valueAsNumber; readonly attribute HTMLOptionElement selectedOption; attribute DOMString width; void stepUp(in optional long n); void stepDown(in optional long n); readonly attribute boolean willValidate; readonly attribute ValidityState validity; readonly attribute DOMString validationMessage; boolean checkValidity(); void setCustomValidity(in DOMString error); readonly attribute NodeList labels; void select(); attribute unsigned long selectionStart; attribute unsigned long selectionEnd; void setSelectionRange(in unsigned long start, in unsigned long end); };
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)
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 boolean disabled; readonly attribute HTMLFormElement form; readonly attribute files; attribute DOMString formAction; attribute DOMString formEnctype; attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute DOMString 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 valueAsDate; attribute double valueAsNumber; readonly attribute HTMLOptionElement selectedOption; attribute DOMString width; void stepUp(in optional long n); void stepDown(in optional long n); readonly attribute boolean willValidate; readonly attribute ValidityState validity; readonly attribute DOMString validationMessage; boolean checkValidity(); void setCustomValidity(in DOMString error); readonly attribute NodeList labels; void select(); attribute unsigned long selectionStart; attribute unsigned long selectionEnd; void setSelectionRange(in unsigned long start, in unsigned long end); };
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)
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 boolean disabled; readonly attribute HTMLFormElement form; readonly attribute files; attribute DOMString formAction; attribute DOMString formEnctype; attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute DOMString 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 valueAsDate; attribute double valueAsNumber; readonly attribute HTMLOptionElement selectedOption; attribute DOMString width; void stepUp(in optional long n); void stepDown(in optional long n); readonly attribute boolean willValidate; readonly attribute ValidityState validity; readonly attribute DOMString validationMessage; boolean checkValidity(); void setCustomValidity(in DOMString error); readonly attribute NodeList labels; void select(); attribute unsigned long selectionStart; attribute unsigned long selectionEnd; void setSelectionRange(in unsigned long start, in unsigned long end); };
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)
common 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 boolean disabled; readonly attribute HTMLFormElement form; readonly attribute files; attribute DOMString formAction; attribute DOMString formEnctype; attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute DOMString 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 valueAsDate; attribute double valueAsNumber; readonly attribute HTMLOptionElement selectedOption; attribute DOMString width; void stepUp(in optional long n); void stepDown(in optional long n); readonly attribute boolean willValidate; readonly attribute ValidityState validity; readonly attribute DOMString validationMessage; boolean checkValidity(); void setCustomValidity(in DOMString error); readonly attribute NodeList labels; void select(); attribute unsigned long selectionStart; attribute unsigned long selectionEnd; void setSelectionRange(in unsigned long start, in unsigned long end); };
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)
common 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 boolean disabled; readonly attribute HTMLFormElement form; readonly attribute files; attribute DOMString formAction; attribute DOMString formEnctype; attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute DOMString 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 valueAsDate; attribute double valueAsNumber; readonly attribute HTMLOptionElement selectedOption; attribute DOMString width; void stepUp(in optional long n); void stepDown(in optional long n); readonly attribute boolean willValidate; readonly attribute ValidityState validity; readonly attribute DOMString validationMessage; boolean checkValidity(); void setCustomValidity(in DOMString error); readonly attribute NodeList labels; void select(); attribute unsigned long selectionStart; attribute unsigned long selectionEnd; void setSelectionRange(in unsigned long start, in unsigned long end); };
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)
common 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 boolean disabled; readonly attribute HTMLFormElement form; readonly attribute files; attribute DOMString formAction; attribute DOMString formEnctype; attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute DOMString 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 valueAsDate; attribute double valueAsNumber; readonly attribute HTMLOptionElement selectedOption; attribute DOMString width; void stepUp(in optional long n); void stepDown(in optional long n); readonly attribute boolean willValidate; readonly attribute ValidityState validity; readonly attribute DOMString validationMessage; boolean checkValidity(); void setCustomValidity(in DOMString error); readonly attribute NodeList labels; void select(); attribute unsigned long selectionStart; attribute unsigned long selectionEnd; void setSelectionRange(in unsigned long start, in unsigned long end); };
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)
common attributes & name & disabled & form & type★ & autocomplete & autofocus & list & 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 boolean disabled; readonly attribute HTMLFormElement form; readonly attribute files; attribute DOMString formAction; attribute DOMString formEnctype; attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute DOMString 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 valueAsDate; attribute double valueAsNumber; readonly attribute HTMLOptionElement selectedOption; attribute DOMString width; void stepUp(in optional long n); void stepDown(in optional long n); readonly attribute boolean willValidate; readonly attribute ValidityState validity; readonly attribute DOMString validationMessage; boolean checkValidity(); void setCustomValidity(in DOMString error); readonly attribute NodeList labels; void select(); attribute unsigned long selectionStart; attribute unsigned long selectionEnd; void setSelectionRange(in unsigned long start, in unsigned long end); };
The ins element represents a range of text that has been inserted (added) to a document.
transparent (either phrasing content or flow content)
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.
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(in DOMString error); readonly attribute NodeList labels; };
The label element represents a caption for a form control.
common attributes & for & form
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.
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)
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; };
transparent (either phrasing content or flow content)
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.
any element that can contain phrasing elements
Uses HTMLElement.
The meta element with a name attribute represents document metadata in the form of name/value pairs.
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
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)
core attributes & event-handler attributes & xml attributes & http-equiv="refresh"★ & content★
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)
core attributes & event-handler attributes & xml attributes & http-equiv="default-style"★ & content★
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 "content-language
" represents a pragma
directive that specifies a document-wide default language.
Warning: Using the meta element to specify the document-wide default language is obsolete. Consider specifying the language on the root element instead.
empty (void element)
core attributes & event-handler attributes & xml attributes & http-equiv="content-language"★ & content★
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 charset attribute represents a character encoding declaration.
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
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)
core attributes & event-handler attributes & xml attributes & http-equiv="content-type"★ & content★
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.
any element that can contain phrasing elements
interface HTMLMeterElement : HTMLElement { attribute float value; attribute float min; attribute float max; attribute float low; attribute float high; attribute float optimum; readonly attribute HTMLFormElement form; readonly attribute NodeList labels; };
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)
noscript
element
must not be used in a document in the XML syntax.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
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 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(in DOMString error); };
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.
any element that can contain flow elements
interface HTMLOListElement : HTMLElement { attribute boolean reversed; attribute long start; };
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.
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(in DOMString text), NamedConstructor=Option(in DOMString text, in DOMString value), NamedConstructor=Option(in DOMString text, in DOMString value, in boolean defaultSelected), NamedConstructor=Option(in DOMString text, in DOMString value, in boolean defaultSelected, in 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.
common attributes & name & form & for
any element that can contain phrasing elements
interface HTMLOutputElement : HTMLElement { [PutForwards=value] readonly attribute DOMSettableTokenList ; 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(in 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 {};
empty (void element)
common 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.
any element that can contain flow elements
interface HTMLPreElement : HTMLElement {};
The progress element represents the completion progress of a task.
any element that can contain phrasing elements
interface HTMLProgressElement : HTMLElement { attribute float value; attribute float max; readonly attribute float position; readonly attribute HTMLFormElement form; readonly attribute NodeList labels; };
The q element represents phrasing content quoted from another source.
any element that can contain phrasing elements
Uses HTMLElement.
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
any element that can contain phrasing elements
Uses HTMLElement.
The samp element represents (sample) output from a program or computing system.
any element that can contain phrasing elements
Uses HTMLElement.
The script element enables dynamic script and data blocks to be included in documents.
common attributes & type & language
common attributes & src★ & defer & async & type & charset & language
<!--
" 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
"*/
"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
any element that can contain flow elements
Uses HTMLElement.
The select element represents a control for selecting among a list of options.
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 unsigned long size; readonly attribute DOMString type; readonly attribute HTMLOptionsCollection options; attribute unsigned long length; caller getter any item(in unsigned long index); caller getter any namedItem(in DOMString name); void add(in HTMLElement element, in optional HTMLElement before); void add(in HTMLElement element, in long before); void remove(in long index); 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(in DOMString error); readonly attribute NodeList labels; };
The small element represents so-called “small print” such as legal disclaimers and caveats.
any element that can contain phrasing elements
Uses HTMLElement.
The source element enables multiple media sources to be specified for audio and video elements.
empty (void element)
common 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.
any element that can contain phrasing elements
interface HTMLSpanElement : HTMLElement {};
The strong element represents a span of text with strong importance.
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
"-->
".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 ;
The sub element represents subscript.
any element that can contain phrasing elements
Uses HTMLElement.
Uses HTMLElement.
The sup element represents superscript.
any element that can contain phrasing elements
Uses HTMLElement.
4.07. 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.