Permitted contents #
zero or more style elements, followed by flow content
The content of this document is also available as multiple HTML files.
Copyright © 2011 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, as well as information in related deliverables published by the HTML Working Group and from other sources. 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 13 January 2011 Working Draft of
HTML: The Markup Language Reference.
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 for Web Authors] subset of the normative [HTML5] full specification.
Certain purposes are intentionally out of scope for this reference document; specifically, it:
For implementation conformance criteria for HTML consumers and detailed information on related APIs, instead see the [HTML5] full specification.
Finally, because this document is intended for use strictly as a reference, it does not attempt to also be a tutorial or “how to” authoring guide.
The following is a list of terms that are used in other sections of this reference.
A-Z
and the corresponding characters in the range
a-z
are considered to also match.This reference does not itself normatively define any requirements.
This section defines the term document, and provides additional details related to the definition of that term. It is divided into the following parts:
The term document is used in this reference to mean an instance of the HTML language.
The HTML language is the language described in this reference; it is an abstract language that applications can potentially represent in memory in any number of possible ways, and that can be transmitted using any number of possible concrete syntaxes.
This reference describes two particular concrete syntaxes for the HTML language: One syntax, which is referred to throughout this reference as the HTML syntax, and another syntax, which is referred to throughout this reference as the XML syntax. Web browsers typically implement two separate parsers for processing documents: an HTML parser which is invoked when processing documents in the HTML syntax, and an XML parser which is invoked when processing documents in the XML syntax.
The HTML syntax is the syntax described in the HTML syntax section of this reference.
The XML syntax is defined by rules in the [XML] specification and in the [Namespaces In XML] specification; any syntax-level requirements for documents in the XML syntax described in this reference are intended to be the same as those defined in the XML specification.
The
HTML namespace
is defined as http://www.w3.org/1999/xhtml
.
The HTML namespace is the
namespace both for
documents in the HTML syntax
and for
documents in the XML syntax.
Documents that are served with the
text/html
MIME type
must
match the descriptions in this
reference for characteristics of
documents in the HTML syntax.
Documents that have an
HTML namespace
declaration and that are served with an XML MIME type
such as
text/xml
,
application/xml
, or
application/xhtml+xml
must
match the descriptions in this
reference for characteristics of
documents in the XML syntax.
There are two types of conformant documents:
A conformant document in the HTML syntax must consist of the following parts, in the following order:
The start tag and end tag of the html element can be omitted—as well as, possibly, the start tags and end tags of certain descendants of the html element—in which case the start tag and end tag are considered to be implied.
Documents in the HTML syntax must match the syntax described in the HTML syntax section of this reference.
In documents in the HTML syntax, the start tags and end tags of the html element and particular descendants of the html element can be omitted. In cases where tag omission of those particular elements occurs, the document can still be considered, conceptually, to contain the elements—but with their start tags and end tags implied.
The following is an example of a document with implied start tags and end tags for the html, head, and body elements. Note that it is nevertheless a complete, valid document.
<!DOCTYPE html> <title>A relatively minimal HTML document</title> <p>Hello World!</p>
The DOM tree constructed from that example by a conformant UA would look like this:
html
HTML
HEAD
TITLE
#text
: A relatively minimal HTML document
#text
: ↩
BODY
P
#text
: Hello World!
Note that the DOM tree includes the html, head, and body elements whose start tags and end tags are implied in the document.
A conformant document in the XML syntax must be a namespace-well-formed XML document, as defined in the [Namespaces in XML] specification, and its root element must be an html element.
Documents in the XML syntax must not make use of any features of the HTML syntax that do not follow XML well-formedness constraints (for example, documents in the XML syntax must not use unquoted attribute value syntax and must not omit tags).
In documents in the HTML syntax:
In documents in the XML syntax:
This section describes the HTML syntax in detail. In places, it also notes differences between the the HTML syntax and the XML syntax, but it does not describe the XML syntax in detail (the XML syntax is instead defined by rules in the [XML] specification and in the [Namespaces in XML] specification).
This section is divided into the following parts:
A doctype (sometimes capitalized as “DOCTYPE”) is an special instruction which, for legacy reasons that have to do with processing modes in browsers, is a required part of any document in the HTML syntax; it must match the characteristics of one of the following three formats:
A normal doctype consists of the following parts, in exactly the following order:
<!DOCTYPE
".HTML
".>
"
character.The following is an example of a conformant normal doctype.
<!DOCTYPE html>
A deprecated doctype consists of the following parts, in exactly the following order:
<!DOCTYPE
".HTML
".PUBLIC
"."
"
character or a
"'
"
character."
"
character or a
"'
"
character)."
"
character or a
"'
"
character."
"
character or a
"'
"
character).>
"
character.A permitted-public-ID-system-ID-combination is any combination of a public ID (the first quoted string in the doctype) and system ID (the second quoted string, if any, in the doctype) such that the combination corresponds to one of the six deprecated doctypes in the following list of deprecated doctypes:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN"> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
A legacy-tool-compatible doctype consists of the following parts, in exactly the following order:
<!DOCTYPE
".HTML
".SYSTEM
"."
"
character or a
"'
"
character.about:legacy-compat
"."
"
character or a
"'
"
character).>
"
character.The following is examples of a conformant legacy-tool-compatible doctype.
<!doctype HTML system "about:legacy-compat">
A character encoding declaration is a mechanism for specifying the character encoding used to store or transmit a document.
The following restrictions apply to character encoding declarations:
If the document does not start with a
U+FEFF BYTE ORDER MARK (BOM) character, and if its
encoding is not explicitly given by a
Content-Type
HTTP header, then the character
encoding used
must
be an
ASCII-compatible character encoding,
and, in addition, if that encoding isn't US-ASCII itself, then
the encoding
must
be specified using a
meta
element with a
charset
attribute or a meta
element
in the
encoding declaration
state.
If the document contains a meta
element with a
charset
attribute or a meta
element in the
encoding declaration state,
then the character encoding used
must
be an
ASCII-compatible character encoding.
An ASCII-compatible character encoding is one that is a superset of US-ASCII (specifically, ANSI_X3.4-1968) for bytes in the set 0x09, 0x0A, 0x0C, 0x0D, 0x20 - 0x22, 0x26, 0x27, 0x2C - 0x3F, 0x41 - 0x5A, and 0x61 - 0x7A.
Documents should not use UTF-32, JIS_C6226-1983, JIS_X0212-1990, HZ-GB-2312, JOHAB (Windows code page 1361), encodings based on ISO-2022, or encodings based on EBCDIC.
Documents must not use CESU-8, UTF-7, BOCU-1, or SCSU encodings.
In a document in the XML syntax, the XML declaration, as defined in the XML specification [XML] should be used to provide character-encoding information, if necessary.
An element’s content model defines the element’s structure: What contents (if any) the element can contain, as well as what attributes (if any) the element can have. The HTML elements section of this reference describes the content models for all of elements that are part of the HTML language. An element must not contain contents or attributes that are not part of its content model.
The contents of an element are any elements, character data, and comments that it contains. Attributes and their values are not considered to be the “contents” of an element.
The text content of an element is as defined in Document Object Model (DOM) Level 3 Core [DOM Core].
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.For further information about named character references, see [XML Entities].
The following is an example of a named character
reference for the character
"†
"
(U+2020 DAGGER).
†
Decimal numerical character references consist of the following parts, in exactly the following order.
&
"
character.#
"
character.0–9
,
representing a base-ten integer that itself is a Unicode
code point that is not
U+0000,
U+000D,
in the range U+0080–U+009F,
or in the range 0xD8000–0xDFFF (surrogates).;
"
character.The following is an example of a decimal numeric
character reference for the character
"†
"
(U+2020 DAGGER).
†
Hexadecimal numeric character references consist of the following parts, in exactly the following order.
&
"
character.#
"
character.x
"
character
or a
"X
"
character.0–9
,
a–f
,
and
A–F
,
representing a base-sixteen integer that itself is a
Unicode code point that is not
U+0000,
U+000D,
in the range U+0080–U+009F,
or in the range 0xD800–0xDFFF (surrogates).;
"
character.The following is an example of a hexadecimal numeric
character reference for the character
"†
"
(U+2020 DAGGER).
†
Character references are not themselves text, and no part of a character reference is text.
An
ambiguous ampersand
is an
"&
"
character that is followed by some
text
other than a
space character,
a
"<
",
character, or another
"&
"
character.
SVG and MathML elements are elements from the SVG and MathML namespaces. SVG and MathML elements can be used both in documents in the HTML syntax and in documents in the XML syntax. Syntax rules for SVG and MathML elements in documents in the XML syntax are defined in the XML specification [XML]. The following list describes additional syntax rules that specifically apply to SVG and MathML elements in documents in the HTML syntax.
/
"
character before the closing
">
"
character are said to be
marked as self-closing.CDATA sections in SVG and MathML contents in documents in the HTML syntax consist of the following parts, in exactly the following order:
<![CDATA[
"]]>
“]]>
"CDATA sections are allowed only in the contents of elements from the SVG and MathML namespaces.
The following shows an example of a CDATA section.
<annotation encoding="text/latex"> <![CDATA[\documentclass{article} \begin{document} \title{E} \maketitle The base of the natural logarithms, approximately 2.71828. \end{document}]]> </annotation>
This section provides an index of HTML elements organized into groups according to function.
The complete set of HTML elements is the set of elements described in the following sections.
The a element represents a hyperlink.
Previous versions of HTML placed greater restrictions on the content of ID values (for example, they did not permit ID values to begin with a number).
_blank
",
"_self
",
"_parent
",
or
"_top
".
An a element must have both a start tag and an end tag.
any element that can contain phrasing elements, any element that can contain flow elements
Although previous versions of HTML restricted the a element to only containing phrasing content (essentially, what was in previous versions referred to as “inline” content), the a element is now transparent; that is, an instance of the a element is now allowed to also contain flow content (essentially, what was in previous versions referred to as “block” content)—if the parent element of that instance of the a element is an element that is allowed to contain flow content.
interface HTMLAnchorElement : HTMLElement { stringifier attribute DOMString href; attribute DOMString target; attribute DOMString rel; readonly attribute DOMTokenList relList; attribute DOMString media; attribute DOMString hreflang; attribute DOMString type; attribute DOMString text; // URL decomposition IDL attributes attribute DOMString protocol; attribute DOMString host; attribute DOMString hostname; attribute DOMString port; attribute DOMString pathname; attribute DOMString search; attribute DOMString hash; };
A hyperlink intended to be useful in output for all media
types except the print
media type.
<a href="./page2.html" rel=next media="not print">next</a>
The name attribute is obsolete.
<a name="section5"/>
<a>prev</a>
A hyperlink that will cause its target to be opened in a new browsing context.
<a href="http://help.example.com" target="_blank">Help</a>
The value of the href attribute contains a space character.
some <a href="http://example.com/Archive/Public Data/">public</a> data is also available
A hyperlink that represents multiple link types.
<a href="../toc.html" rel="index up">up</a>
A hyperlink that contains a paragraph.
<a href="javascript:void(0);" onmouseover="return anno('Note: This paragraph is informative only.') onmouseout="return anno_bye();"> <p>The following is introductory information…</p> </a>
The abbr element represents an abbreviation or acronym.
An abbr element must have both a start tag and an end tag.
any element that can contain phrasing elements
The title attribute on the abbr element represents the expansion of the abbreviation or acronym.
Uses HTMLElement.
The address element represents contact information.
An address element must have both a start tag and an end tag.
any element that can contain flow elements
If an address element applies to a body element, then it represents contact information for the document as a whole. If an address element applies to a section of a document, then it represents contact information for that section only.
Uses HTMLElement.
The area element represents either a hyperlink with some text and a corresponding area on an image map, or a dead area on an image map.
empty (void element)
global attributes & alt★ & href★ & target & rel & media & hreflang & type & shape="rect" & coords★ or shape="circle"★ & coords★ or shape="poly"★ & coords★ or shape="default"
_blank
",
"_self
",
"_parent
",
or
"_top
".
The area element is a void element. An area element must have a start tag but must not have an end tag.
any element that can contain phrasing elements
interface HTMLAreaElement : HTMLElement { attribute DOMString alt; attribute DOMString coords; attribute DOMString shape; stringifier attribute DOMString href; attribute DOMString target; attribute DOMString rel; readonly attribute DOMTokenList relList; attribute DOMString media; attribute DOMString hreflang; attribute DOMString type; // URL decomposition IDL attributes attribute DOMString protocol; attribute DOMString host; attribute DOMString hostname; attribute DOMString port; attribute DOMString pathname; attribute DOMString search; attribute DOMString hash; };
The article element represents a section of content that forms an independent part of a document or site; for example, a magazine or newspaper article, or a blog entry.
zero or more style elements, followed by flow content
An article element must have both a start tag and an end tag.
any element that can contain flow elements
Uses HTMLElement.
The aside element represents content that is tangentially related to the content that forms the main textual flow of a document.
zero or more style elements, followed by flow content
An aside element must have both a start tag and an end tag.
any element that can contain flow elements
In printed documents, the type of tangential content that the aside element represents is sometimes formatted as a sidebar or annotation or footnote.
Uses HTMLElement.
An audio element represents an audio stream.
Transparent, with the following specific structure:
a src attribute, or one or more source elements followed by zero or more track elements, followed by flow content
a src attribute, or one or more source elements followed by zero or more track elements, followed by phrasing content
An audio element must have both a start tag and an end tag.
any element that can contain phrasing elements, any element that can contain flow elements
[NamedConstructor=Audio(), NamedConstructor=Audio(in DOMString src)] interface HTMLAudioElement : HTMLMediaElement {};
The b element represents a span of text offset from its surrounding content without conveying any extra emphasis or importance, and for which the conventional typographic presentation is bold text; for example, keywords in a document abstract, or product names in a review.
A b element must have both a start tag and an end tag.
any element that can contain phrasing elements
Although previous versions of HTML defined the b element only in presentational terms, the element has now been given the specific semantic purpose of representing text “offset from its surrounding content without conveying any extra emphasis or importance, and for which the conventional typographic presentation is bold text”.
Uses HTMLElement.
The base element specifies a document-wide base URL for the purposes of resolving relative URLs, and a document-wide default browsing context name for the purposes of following hyperlinks.
empty (void element)
global attributes & href★ & target or target★
_blank
",
"_self
",
"_parent
",
or
"_top
".
The base element is a void element. A base element must have a start tag but must not have an end tag.
interface HTMLBaseElement : HTMLElement { attribute DOMString href; attribute DOMString target; };
The bdi element represents a span of text that is isolated from its surroundings for the purposes of bidirectional text formatting [BIDI].
A bdi element must have both a start tag and an end tag.
any element that can contain phrasing elements
Uses HTMLElement.
The bdo element represents an explicit text directionality formatting control for its children; it provides a means to specify a direction override of the Unicode BiDi algorithm [BIDI].
A bdo element must have both a start tag and an end tag.
any element that can contain phrasing elements
Uses HTMLElement.
The blockquote element represents a section that is quoted from another source.
A blockquote element must have both a start tag and an end tag.
any element that can contain flow elements
interface HTMLQuoteElement : HTMLElement { attribute DOMString cite; };
The body element represents the body of a document (as opposed to the document’s metadata).
global attributes & onafterprint & onbeforeprint & onbeforeunload & onblur & onerror & onfocus & onhashchange & onload & 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 onscroll; 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.
A canvas element must have both a start tag and an end tag.
any element that can contain phrasing elements, any element that can contain flow elements
interface HTMLCanvasElement : HTMLElement { attribute unsigned long width; attribute unsigned long height; DOMString toDataURL(in optional DOMString type, in any... args); object getContext(in DOMString contextId, in any... args); };
The cite element represents the cited title of a work; for example, the title of a book mentioned within the main text flow of a document.
A cite element must have both a start tag and an end tag.
any element that can contain phrasing elements
Although previous versions of HTML implied that the cite element can be used to mark up the name of a person, that usage is no longer considered conforming. The cite element now solely represents the cited title of a work; for example, the title of a book, paper, essay, poem, score, song, script, film, TV show, game, sculpture, painting, theater production, play, opera, musical, exhibition, legal case report, or other such work.
Uses HTMLElement.
The code element represents a fragment of computer code.
A code element must have both a start tag and an end tag.
any element that can contain phrasing elements
Uses HTMLElement.
The col element represents one or more columns in the column group represented by its colgroup parent.
empty (void element)
The col element is a void element. A col element must have a start tag but must not have an end tag.
interface HTMLTableColElement : HTMLElement { attribute unsigned long span; };
The colgroup element represents a group of one or more columns in the table that is its parent.
A colgroup element's start tag may be omitted if the first thing inside the colgroup element is a col element, and if the element is not immediately preceded by another colgroup element whose end tag has been omitted.
A colgroup element’s end tag may be omitted if the colgroup element is not immediately followed by a space character or a comment.
interface HTMLTableColElement : HTMLElement { attribute unsigned long span; };
The command element is a multipurpose element for representing commands.
A command element with no type attribute specified represents the same thing as a command element with its type attribute set to "command".
The
command
element
with a type attribute whose
value is "command
" represents a command with an
associated action.
empty (void element)
global attributes & type & label & icon & disabled
The command element is a void element. A command element must have a start tag but must not have an end tag.
any element that can contain metadata elements, any element that can contain phrasing elements
interface HTMLCommandElement : HTMLElement { attribute DOMString type; attribute DOMString label; attribute DOMString icon; attribute boolean disabled; attribute boolean checked; attribute DOMString radiogroup; };
The
command
element
with a type attribute whose
value is "radio
" represents
a selection of one item from a list of items.
empty (void element)
global attributes & type★ & radiogroup★ & checked & label & icon & disabled
The command element is a void element. A command element must have a start tag but must not have an end tag.
any element that can contain metadata elements, any element that can contain phrasing elements
interface HTMLCommandElement : HTMLElement { attribute DOMString type; attribute DOMString label; attribute DOMString icon; attribute boolean disabled; attribute boolean checked; attribute DOMString radiogroup; };
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
A datalist element must have both a start tag and an end tag.
any element that can contain phrasing elements
interface HTMLDataListElement : HTMLElement { readonly attribute HTMLCollection options; };
The dd element represents a description or value.
A dd element must have a start tag.
A dd element’s end tag may be omitted if the dd element is immediately followed by another dd element or a dd element, or if there is no more content in the parent element.
The dd element represents the description or value part of a term-description (name-value) grouping in a description list.
Uses HTMLElement.
The del element represents a range of text that has been deleted from a document.
T
and
Z
in the date/time syntax
must
always be
uppercaseExamples:
1990-12-31T23:59:60Z
1996-12-19T16:39:57-08:00
Example:
1996-12-19
A del element must have both a start tag and an end tag.
any element that can contain phrasing elements, any element that can contain flow elements
interface HTMLModElement : HTMLElement { attribute DOMString cite; attribute DOMString dateTime; };
The details element represents a control from which the user can obtain additional information or controls on-demand.
an optional summary element, followed by flow content
A details element must have both a start tag and an end tag.
any element that can contain flow elements
interface HTMLDetailsElement : HTMLElement { attribute boolean open; };
The dfn element represents the defining instance of a term.
A dfn element must have both a start tag and an end tag.
any element that can contain phrasing elements
Uses HTMLElement.
The div element is a generic container for flow content that by itself does not represent anything.
zero or more style elements, followed by flow content
A div element must have both a start tag and an end tag.
any element that can contain flow elements
interface HTMLDivElement : HTMLElement {};
The dl element represents a description list.
A dl element must have both a start tag and an end tag.
any element that can contain flow elements
The dl element represents a description list, which consists of zero or more term-description (name-value) groupings; each grouping associates one or more terms/names (the contents of dt elements) with one or more descriptions/values (the contents of dd elements).
interface HTMLDListElement : HTMLElement {};
The dt element represents a term or name.
A dt element must have a start tag.
A dt element’s end tag may be omitted if the dt element is immediately followed by another dt element or a dd element.
The dt element represents the term or name part of a term-description (name-value) grouping in a description list.
Uses HTMLElement.
The em element represents a span of text with emphatic stress.
An em element must have both a start tag and an end tag.
any element that can contain phrasing elements
Uses HTMLElement.
The embed element represents an integration point for external content.
empty (void element)
The embed element is a void element. An embed element must have a start tag but must not have an end tag.
any element that can contain phrasing elements
The embed element represents an integration point for external content — typically, non-HTML content such as an application or some other type of interactive content which involves use of a third-party plugin as a handler (rather than being natively supported by the UA).
interface HTMLEmbedElement : HTMLElement { attribute DOMString src; attribute DOMString type; attribute DOMString width; attribute DOMString height; };
The fieldset element represents a set of form controls grouped under a common name.
an optional legend element, followed by flow content
global attributes & name & disabled & form
A fieldset element must have both a start tag and an end tag.
any element that can contain flow elements
interface HTMLFieldSetElement : HTMLElement { attribute boolean disabled; readonly attribute HTMLFormElement form; attribute DOMString name; readonly attribute DOMString type; readonly attribute HTMLFormControlsCollection elements; readonly attribute boolean willValidate; readonly attribute ValidityState validity; readonly attribute DOMString validationMessage; boolean checkValidity(); void setCustomValidity(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
A figure element must have both a start tag and an end tag.
any element that can contain flow elements
Uses HTMLElement.
The form element represents a user-submittable form.
global attributes & action & method & enctype & name & accept-charset & novalidate & target & autocomplete
_blank
",
"_self
",
"_parent
",
or
"_top
".
A form element must have both a start tag and an end tag.
any element that can contain flow elements
[OverrideBuiltins] interface HTMLFormElement : HTMLElement { attribute DOMString acceptCharset; attribute DOMString action; attribute DOMString autocomplete; attribute DOMString enctype; attribute DOMString encoding; attribute DOMString method; attribute DOMString name; attribute boolean noValidate; attribute DOMString target; readonly attribute HTMLFormControlsCollection elements; readonly attribute long length; caller getter any (in unsigned long index); caller getter any (in DOMString name); void submit(); void reset(); boolean checkValidity(); void dispatchFormInput(); void dispatchFormChange(); };
The h1 through h6 elements are headings for the sections with which they are associated.
An h1 element must have both a start tag and an end tag.
any element that can contain flow elements, hgroup
interface HTMLHeadingElement : HTMLElement {};
The h1 through h6 elements are headings for the sections with which they are associated.
An h2 element must have both a start tag and an end tag.
any element that can contain flow elements, hgroup
interface HTMLHeadingElement : HTMLElement {};
The h1 through h6 elements are headings for the sections with which they are associated.
An h3 element must have both a start tag and an end tag.
any element that can contain flow elements, hgroup
interface HTMLHeadingElement : HTMLElement {};
The h1 through h6 elements are headings for the sections with which they are associated.
An h4 element must have both a start tag and an end tag.
any element that can contain flow elements, hgroup
interface HTMLHeadingElement : HTMLElement {};
The h1 through h6 elements are headings for the sections with which they are associated.
An h5 element must have both a start tag and an end tag.
any element that can contain flow elements, hgroup
interface HTMLHeadingElement : HTMLElement {};
The h1 through h6 elements are headings for the sections with which they are associated.
An h6 element must have both a start tag and an end tag.
any element that can contain flow elements, hgroup
interface HTMLHeadingElement : HTMLElement {};
The head element collects the document’s metadata.
one title element, intermixed with an optional base element, intermixed with metadata elements
A head element’s start tag may be omitted if the first thing inside the head element is an element.
A head element’s end tag may be omitted if the head element is not immediately followed by a space character or a comment.
interface HTMLHeadElement : HTMLElement {};
The header element represents the header of a section.
A header element must have both a start tag and an end tag.
any element that can contain flow elements
Uses HTMLElement.
The hgroup element represents a group of headings.
A hgroup element must have both a start tag and an end tag.
any element that can contain flow elements
Uses HTMLElement.
The hr element represents a paragraph-level thematic break.
empty (void element)
The hr element is a void element. An hr element must have a start tag but must not have an end tag.
any element that can contain flow elements
Although previous versions of HTML defined the hr element only in presentational terms, the element has now been given the specific semantic purpose of representing a “paragraph-level thematic break”.
Some examples of thematic breaks that can be marked up using the hr element include a scene change in a story, or a transition to another topic within a section of a reference book.
interface HTMLHRElement : HTMLElement {};
The html element represents the root of a document.
An html element’s start tag may be omitted if the first thing inside the html element is not a comment.
An html element’s end tag may be omitted if the html element is not immediately followed by a comment and the element contains a body element that is either not empty or whose start tag has not been omitted.
interface HTMLHtmlElement : HTMLElement {};
The i element represents a span of text offset from its surrounding content without conveying any extra emphasis or importance, and for which the conventional typographic presentation is italic text; for example, a taxonomic designation, a technical term, an idiomatic phrase from another language, a thought, or a ship name.
An i element must have both a start tag and an end tag.
any element that can contain phrasing elements
Although previous versions of HTML defined the i element only in presentational terms, the element has now been given the specific semantic purpose of representing text “offset from its surrounding content without conveying any extra emphasis or importance, and for which the conventional typographic presentation is italic text”.
Uses HTMLElement.
The iframe element introduces a new nested browsing context.
allow-forms
: re-enables formsallow-scripts
: re-enables scriptsallow-top-navigation
: re-enables links
within the content of the
iframe
to navigate to its
top-level browsing context
allow-same-origin
: re-enables
same-origin treatment of the content hosted by the
iframe
and the content which hosts the
iframe
(instead of forcing the
iframe
into a unique origin)An iframe element must have both a start tag and an end tag.
any element that can contain phrasing elements
interface HTMLIFrameElement : HTMLElement { attribute DOMString src; attribute DOMString srcdoc; attribute DOMString name; [PutForwards=value] readonly attribute DOMSettableTokenList sandbox; attribute boolean seamless; attribute DOMString width; attribute DOMString height; readonly attribute Document contentDocument; readonly attribute WindowProxy contentWindow; };
The img element represents an image.
empty (void element)
0
".The img element is a void element. An img element must have a start tag but must not have an end tag.
any element that can contain phrasing elements
[NamedConstructor=Image(), NamedConstructor=Image(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; };
The input element is a multipurpose element for representing input controls.
An input element with no type attribute specified represents the same thing as an input element with its type attribute set to "text".
Several new input element types have been added, and several new attributes are now allowed on the element.
The
input
element
with a type attribute whose
value is "text
" represents
a one-line plain text edit control for the
input
element’s value.
empty (void element)
global attributes & name & disabled & form & type & maxlength & readonly & size & value & 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 DOMString dirName; attribute boolean disabled; readonly attribute HTMLFormElement form; readonly attribute FileList files; attribute DOMString formAction; attribute DOMString formEnctype; attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute 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 Date 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)
global attributes & name & disabled & form & type★ & maxlength & readonly & size & value & autocomplete & autofocus & pattern & required & placeholder
The input element is a void element. An input element must have a start tag but must not have an end tag.
any element that can contain phrasing elements
interface HTMLInputElement : HTMLElement { attribute DOMString accept; attribute DOMString alt; attribute DOMString autocomplete; attribute boolean autofocus; attribute boolean defaultChecked; attribute boolean checked; attribute DOMString dirName; attribute boolean disabled; readonly attribute HTMLFormElement form; readonly attribute FileList files; attribute DOMString formAction; attribute DOMString formEnctype; attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute 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 Date 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 DOMString dirName; attribute boolean disabled; readonly attribute HTMLFormElement form; readonly attribute FileList files; attribute DOMString formAction; attribute DOMString formEnctype; attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute 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 Date 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 DOMString dirName; attribute boolean disabled; readonly attribute HTMLFormElement form; readonly attribute FileList files; attribute DOMString formAction; attribute DOMString formEnctype; attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute 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 Date 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)
global attributes & name & disabled & form & type★ & value & formaction & autofocus & formenctype & formmethod & formtarget & formnovalidate
_blank
",
"_self
",
"_parent
",
or
"_top
".
The input element is a void element. An input element must have a start tag but must not have an end tag.
any element that can contain phrasing elements
interface HTMLInputElement : HTMLElement { attribute DOMString accept; attribute DOMString alt; attribute DOMString autocomplete; attribute boolean autofocus; attribute boolean defaultChecked; attribute boolean checked; attribute DOMString dirName; attribute boolean disabled; readonly attribute HTMLFormElement form; readonly attribute FileList files; attribute DOMString formAction; attribute DOMString formEnctype; attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute 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 Date 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 DOMString dirName; attribute boolean disabled; readonly attribute HTMLFormElement form; readonly attribute FileList files; attribute DOMString formAction; attribute DOMString formEnctype; attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute 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 Date 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 DOMString dirName; attribute boolean disabled; readonly attribute HTMLFormElement form; readonly attribute FileList files; attribute DOMString formAction; attribute DOMString formEnctype; attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute 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 Date 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)
global attributes & name & disabled & form & type★ & alt★ & src & formaction & autofocus & formenctype & formmethod & formtarget & formnovalidate & height & width
_blank
",
"_self
",
"_parent
",
or
"_top
".
The input element is a void element. An input element must have a start tag but must not have an end tag.
any element that can contain phrasing elements
interface HTMLInputElement : HTMLElement { attribute DOMString accept; attribute DOMString alt; attribute DOMString autocomplete; attribute boolean autofocus; attribute boolean defaultChecked; attribute boolean checked; attribute DOMString dirName; attribute boolean disabled; readonly attribute HTMLFormElement form; readonly attribute FileList files; attribute DOMString formAction; attribute DOMString formEnctype; attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute 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 Date 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)
global attributes & name & disabled & form & type★ & autocomplete & autofocus & list & min & max & step (float) & readonly & required & value
T
and
Z
in the date/time syntax
must
always be
uppercaseExamples:
1990-12-31T23:59:60Z
1996-12-19T16:39:57-08:00
T
and
Z
in the date/time syntax
must
always be
uppercaseExamples:
1990-12-31T23:59:60Z
1996-12-19T16:39:57-08:00
T
and
Z
in the date/time syntax
must
always be
uppercaseExamples:
1990-12-31T23:59:60Z
1996-12-19T16:39:57-08:00
The input element is a void element. An input element must have a start tag but must not have an end tag.
any element that can contain phrasing elements
interface HTMLInputElement : HTMLElement { attribute DOMString accept; attribute DOMString alt; attribute DOMString autocomplete; attribute boolean autofocus; attribute boolean defaultChecked; attribute boolean checked; attribute DOMString dirName; attribute boolean disabled; readonly attribute HTMLFormElement form; readonly attribute FileList files; attribute DOMString formAction; attribute DOMString formEnctype; attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute 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 Date 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)
global attributes & name & disabled & form & type★ & autocomplete & autofocus & list & min & max & step (float) & readonly & required & value
Example:
1985-04-12T23:20:50.52
1996-12-19T16:39:57
Example:
1985-04-12T23:20:50.52
1996-12-19T16:39:57
Example:
1985-04-12T23:20:50.52
1996-12-19T16:39:57
The input element is a void element. An input element must have a start tag but must not have an end tag.
any element that can contain phrasing elements
interface HTMLInputElement : HTMLElement { attribute DOMString accept; attribute DOMString alt; attribute DOMString autocomplete; attribute boolean autofocus; attribute boolean defaultChecked; attribute boolean checked; attribute DOMString dirName; attribute boolean disabled; readonly attribute HTMLFormElement form; readonly attribute FileList files; attribute DOMString formAction; attribute DOMString formEnctype; attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute 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 Date 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)
global attributes & name & disabled & form & type★ & autocomplete & autofocus & list & min & max & step (integer) & readonly & required & value
Example:
1996-12-19
Example:
1996-12-19
Example:
1996-12-19
The input element is a void element. An input element must have a start tag but must not have an end tag.
any element that can contain phrasing elements
interface HTMLInputElement : HTMLElement { attribute DOMString accept; attribute DOMString alt; attribute DOMString autocomplete; attribute boolean autofocus; attribute boolean defaultChecked; attribute boolean checked; attribute DOMString dirName; attribute boolean disabled; readonly attribute HTMLFormElement form; readonly attribute FileList files; attribute DOMString formAction; attribute DOMString formEnctype; attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute 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 Date 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)
global attributes & name & disabled & form & type★ & autocomplete & autofocus & list & min & max & step (integer) & readonly & required & value
-
".Example:
1996-12
-
".Example:
1996-12
-
".Example:
1996-12
The input element is a void element. An input element must have a start tag but must not have an end tag.
any element that can contain phrasing elements
interface HTMLInputElement : HTMLElement { attribute DOMString accept; attribute DOMString alt; attribute DOMString autocomplete; attribute boolean autofocus; attribute boolean defaultChecked; attribute boolean checked; attribute DOMString dirName; attribute boolean disabled; readonly attribute HTMLFormElement form; readonly attribute FileList files; attribute DOMString formAction; attribute DOMString formEnctype; attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute 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 Date 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)
global attributes & name & disabled & form & type★ & autocomplete & autofocus & list & min & max & step (float) & readonly & required & value
Examples:
23:20:50.52
17:39:57
Examples:
23:20:50.52
17:39:57
Examples:
23:20:50.52
17:39:57
The input element is a void element. An input element must have a start tag but must not have an end tag.
any element that can contain phrasing elements
interface HTMLInputElement : HTMLElement { attribute DOMString accept; attribute DOMString alt; attribute DOMString autocomplete; attribute boolean autofocus; attribute boolean defaultChecked; attribute boolean checked; attribute DOMString dirName; attribute boolean disabled; readonly attribute HTMLFormElement form; readonly attribute FileList files; attribute DOMString formAction; attribute DOMString formEnctype; attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute 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 Date 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)
global attributes & name & disabled & form & type★ & autocomplete & autofocus & list & min & max & step (integer) & readonly & required & value
-W
".52
or
53
,
depending on the particular year.Example:
1996-W16
-W
".52
or
53
,
depending on the particular year.Example:
1996-W16
-W
".52
or
53
,
depending on the particular year.Example:
1996-W16
The input element is a void element. An input element must have a start tag but must not have an end tag.
any element that can contain phrasing elements
interface HTMLInputElement : HTMLElement { attribute DOMString accept; attribute DOMString alt; attribute DOMString autocomplete; attribute boolean autofocus; attribute boolean defaultChecked; attribute boolean checked; attribute DOMString dirName; attribute boolean disabled; readonly attribute HTMLFormElement form; readonly attribute FileList files; attribute DOMString formAction; attribute DOMString formEnctype; attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute 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 Date 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)
global attributes & name & disabled & form & type★ & autocomplete & autofocus & list & min & max & step (float) & readonly & required & value
The input element is a void element. An input element must have a start tag but must not have an end tag.
any element that can contain phrasing elements
interface HTMLInputElement : HTMLElement { attribute DOMString accept; attribute DOMString alt; attribute DOMString autocomplete; attribute boolean autofocus; attribute boolean defaultChecked; attribute boolean checked; attribute DOMString dirName; attribute boolean disabled; readonly attribute HTMLFormElement form; readonly attribute FileList files; attribute DOMString formAction; attribute DOMString formEnctype; attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute 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 Date 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)
global attributes & name & disabled & form & type★ & autocomplete & autofocus & list & min & max & step (float) & value
The input element is a void element. An input element must have a start tag but must not have an end tag.
any element that can contain phrasing elements
interface HTMLInputElement : HTMLElement { attribute DOMString accept; attribute DOMString alt; attribute DOMString autocomplete; attribute boolean autofocus; attribute boolean defaultChecked; attribute boolean checked; attribute DOMString dirName; attribute boolean disabled; readonly attribute HTMLFormElement form; readonly attribute FileList files; attribute DOMString formAction; attribute DOMString formEnctype; attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute 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 Date 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)
global attributes & name & disabled & form & type★ & autocomplete & autofocus & list & maxlength & pattern & readonly & required & size & placeholder & multiple★ & value (multiple addresses) or value (single address)
1*( atext / "." ) "@" ldh-str 1*( "." ldh-str )
…where atext is as defined in [RFC 5322], and ldh-str is as defined in [RFC 1034].
Examples:
foo-bar.baz@example.com
The input element is a void element. An input element must have a start tag but must not have an end tag.
any element that can contain phrasing elements
interface HTMLInputElement : HTMLElement { attribute DOMString accept; attribute DOMString alt; attribute DOMString autocomplete; attribute boolean autofocus; attribute boolean defaultChecked; attribute boolean checked; attribute DOMString dirName; attribute boolean disabled; readonly attribute HTMLFormElement form; readonly attribute FileList files; attribute DOMString formAction; attribute DOMString formEnctype; attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute 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 Date 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)
global attributes & name & disabled & form & type★ & autocomplete & autofocus & list & maxlength & pattern & readonly & required & size & placeholder & value
The input element is a void element. An input element must have a start tag but must not have an end tag.
any element that can contain phrasing elements
interface HTMLInputElement : HTMLElement { attribute DOMString accept; attribute DOMString alt; attribute DOMString autocomplete; attribute boolean autofocus; attribute boolean defaultChecked; attribute boolean checked; attribute DOMString dirName; attribute boolean disabled; readonly attribute HTMLFormElement form; readonly attribute FileList files; attribute DOMString formAction; attribute DOMString formEnctype; attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute 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 Date 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)
global attributes & name & disabled & form & type★ & autocomplete & autofocus & list & maxlength & pattern & readonly & required & size & placeholder & value
The input element is a void element. An input element must have a start tag but must not have an end tag.
any element that can contain phrasing elements
interface HTMLInputElement : HTMLElement { attribute DOMString accept; attribute DOMString alt; attribute DOMString autocomplete; attribute boolean autofocus; attribute boolean defaultChecked; attribute boolean checked; attribute DOMString dirName; attribute boolean disabled; readonly attribute HTMLFormElement form; readonly attribute FileList files; attribute DOMString formAction; attribute DOMString formEnctype; attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute 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 Date 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)
global attributes & name & disabled & form & type★ & autocomplete & autofocus & list & maxlength & pattern & readonly & required & size & placeholder & value
The input element is a void element. An input element must have a start tag but must not have an end tag.
any element that can contain phrasing elements
interface HTMLInputElement : HTMLElement { attribute DOMString accept; attribute DOMString alt; attribute DOMString autocomplete; attribute boolean autofocus; attribute boolean defaultChecked; attribute boolean checked; attribute DOMString dirName; attribute boolean disabled; readonly attribute HTMLFormElement form; readonly attribute FileList files; attribute DOMString formAction; attribute DOMString formEnctype; attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute 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 Date 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)
global attributes & name & disabled & form & type★ & autocomplete & autofocus & list & value
#
"
character.0–9
,
a–f
,
and
A–F
.Color keywords (for example, strings such as “red” or “green”) are not allowed.
The input element is a void element. An input element must have a start tag but must not have an end tag.
any element that can contain phrasing elements
interface HTMLInputElement : HTMLElement { attribute DOMString accept; attribute DOMString alt; attribute DOMString autocomplete; attribute boolean autofocus; attribute boolean defaultChecked; attribute boolean checked; attribute DOMString dirName; attribute boolean disabled; readonly attribute HTMLFormElement form; readonly attribute FileList files; attribute DOMString formAction; attribute DOMString formEnctype; attribute DOMString formMethod; attribute boolean formNoValidate; attribute DOMString formTarget; attribute 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 Date 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.
T
and
Z
in the date/time syntax
must
always be
uppercaseExamples:
1990-12-31T23:59:60Z
1996-12-19T16:39:57-08:00
Example:
1996-12-19
An ins element must have both a start tag and an end tag.
any element that can contain phrasing elements, any element that can contain flow elements
interface HTMLModElement : HTMLElement { attribute DOMString cite; attribute DOMString dateTime; };
The kbd element represents user input.
A kbd element must have both a start tag and an end tag.
any element that can contain phrasing elements
The kbd element typically represents keyboard input, though it may also represent other input, such as voice commands.
Uses HTMLElement.
The keygen element represents a control for generating a public-private key pair and for submitting the public key from that key pair.
empty (void element)
The keygen element is a void element. A keygen element must have a start tag but must not have an end tag.
any element that can contain phrasing elements
interface HTMLKeygenElement : HTMLElement { attribute boolean autofocus; attribute DOMString challenge; attribute boolean disabled; readonly attribute HTMLFormElement form; attribute DOMString keytype; attribute DOMString name; readonly attribute DOMString type; readonly attribute boolean willValidate; readonly attribute ValidityState validity; readonly attribute DOMString validationMessage; boolean checkValidity(); void setCustomValidity(in DOMString error); readonly attribute NodeList labels; };
The label element represents a caption for a form control.
global attributes & for & form
A label element must have both a start tag and an end tag.
any element that can contain phrasing elements
interface HTMLLabelElement : HTMLElement { readonly attribute HTMLFormElement form; attribute DOMString htmlFor; readonly attribute HTMLElement control; };
The legend element represents a title or explanatory caption for the rest of the contents of the legend element’s parent element.
A legend element must have both a start tag and an end tag.
interface HTMLLegendElement : HTMLElement { readonly attribute HTMLFormElement form; };
The li element represents a list item.
An li element must have a start tag.
An li element’s end tag may be omitted if the li element is immediately followed by another li element or if there is no more content in the parent element.
interface HTMLLIElement : HTMLElement { attribute long value; };
The link element represents metadata that expresses inter-document relationships.
empty (void element)
any
"0
"
character and that are separated by a single
"x
"
character.The link element is a void element. A link element must have a start tag but must not have an end tag.
any element that can contain metadata elements, noscript
interface HTMLLIElement : HTMLElement { attribute long value; };
The map element, in conjunction with any area element descendants, defines an image map.
A map element must have both a start tag and an end tag.
any element that can contain phrasing elements, any element that can contain flow elements
interface HTMLMapElement : HTMLElement { attribute DOMString name; readonly attribute HTMLCollection areas; readonly attribute HTMLCollection images; };
The mark element represents a run of text in one document marked or highlighted for reference purposes, due to its relevance in another context.
A mark element must have both a start tag and an end tag.
any element that can contain phrasing elements
Uses HTMLElement.
The meta element is a multipurpose element for representing metadata.
The details of the meta element are described in the following sections:
Although previous versions of HTML allowed the http-equiv attribute on the meta element to have any number of possible values, the http-equiv attribute is now restricted to only the specific values described in this reference. Also, the new charset attribute is now allowed.
The meta element with a name attribute represents document metadata in the form of name/value pairs.
empty (void element)
global attributes & name★ & content★
application-name
",
the value of the
content
attribute
must
be a string representing the name of the Web application
that the page represents.author
",
the value of the
content
attribute
must
be a string that gives the name of one of the authors of
the document.description
",
the value of the
content
attribute
must
be a string that describes the page.generator
",
the value of the
content
attribute
must
be a string that identifies the software
used to generate the document.keywords
",
the value of the
content
attribute
must
be a
set of comma-separated strings,
each of which is a keyword relevant to the document.The meta element is a void element. A meta element must have a start tag but must not have an end tag.
any element that can contain metadata elements
interface HTMLMetaElement : HTMLElement { attribute DOMString name; attribute DOMString httpEquiv; attribute DOMString content; };
The
meta
element
with a http-equiv attribute
whose value is "refresh
" represents a pragma
directive that specifies either a number of seconds after
which to reload the current page,
or a number of seconds after which to load a different page in
place of the current page, and the URL for the replacement
page.
empty (void element)
global attributes & http-equiv="refresh"★ & content★
;
"
character.url=
".The meta element is a void element. A meta element must have a start tag but must not have an end tag.
any element that can contain metadata elements, noscript
interface HTMLMetaElement : HTMLElement { attribute DOMString name; attribute DOMString httpEquiv; attribute DOMString content; };
The
meta
element
with a http-equiv attribute
whose value is "default-style
" represents a pragma
directive that specifies the document’s preferred stylesheet.
empty (void element)
global 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.
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)
global 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)
UTF-8
".Name
or Alias
field
labeled as “preferred MIME name”;
or, if none of the Alias
fields are so labeled, a
case-insensitive match
for a Name
field in the registry.The meta element is a void element. A meta element must have a start tag but must not have an end tag.
any element that can contain metadata elements
interface HTMLMetaElement : HTMLElement { attribute DOMString name; attribute DOMString httpEquiv; attribute DOMString content; };
A meta element with a http-equiv attribute whose value is "content-type" and which has an accompanying content attribute and value represents a character encoding declaration.
empty (void element)
global attributes & http-equiv="content-type"★ & content★
text/html;
".charset=
".UTF-8
".The meta element is a void element. A meta element must have a start tag but must not have an end tag.
any element that can contain metadata elements
A meta element with a http-equiv attribute whose value is "content-type" and which has an accompanying content attribute and value is said to be in the encoding declaration state.
interface HTMLMetaElement : HTMLElement { attribute DOMString name; attribute DOMString httpEquiv; attribute DOMString content; };
The meter element represents a scalar gauge providing a measurement within a known range, or a fractional value.
A meter element must have both a start tag and an end tag.
any element that can contain phrasing elements
interface HTMLMeterElement : HTMLElement { attribute double value; attribute double min; attribute double max; attribute double low; attribute double high; attribute double 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)
A noscript element must have both a start tag and an end tag.
any element that can contain metadata elements, any element that can contain phrasing elements, any element that can contain flow elements
Uses HTMLElement.
The object element represents external content.
Transparent, with the following specific structure:
zero or more param elements, followed by flow content
zero or more param elements, followed by phrasing content
An object element must have both a start tag and an end tag.
any element that can contain phrasing elements, any element that can contain flow elements
The object element represents external content, which, depending on the type of the content, will either be treated as an image, as a nested browsing context, or as external content to be processed by a plugin.
interface HTMLObjectElement : HTMLElement { attribute DOMString data; attribute DOMString type; attribute 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.
global attributes & start & reversed & type
An ol element must have both a start tag and an end tag.
any element that can contain flow elements
interface HTMLOListElement : HTMLElement { attribute boolean reversed; attribute long start; attribute DOMString type; };
The optgroup element represents a group of option elements with a common label.
An optgroup element must have a start tag.
An optgroup element’s end tag may be omitted if the optgroup element is immediately followed by another optgroup element, or if there is no more content in the parent element.
interface HTMLOptGroupElement : HTMLElement { attribute boolean disabled; attribute DOMString label; };
The option element represents an option in a select control, or an option in a labelled set of options grouped together in an optgroup, or an option among the list of suggestions in a datalist.
global attributes & disabled & selected & label & value
An option element must have a start tag.
An option element’s end tag may be omitted if the option element is immediately followed by another option element, or if it is immediately followed by an optgroup element, or if there is no more content in the parent element.
[NamedConstructor=Option(), NamedConstructor=Option(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.
global attributes & name & form & for
An output element must have both a start tag and an end tag.
any element that can contain phrasing elements
interface HTMLOutputElement : HTMLElement { [PutForwards=value] readonly attribute DOMSettableTokenList htmlFor; readonly attribute HTMLFormElement form; attribute DOMString name; readonly attribute DOMString type; attribute DOMString defaultValue; attribute DOMString value; readonly attribute boolean willValidate; readonly attribute ValidityState validity; readonly attribute DOMString validationMessage; boolean checkValidity(); void setCustomValidity(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 {};
The param element defines parameters for plugins invoked by object elements.
empty (void element)
global attributes & name★ & value★
The param element is a void element. A param element must have a start tag but must not have an end tag.
interface HTMLParamElement : HTMLElement { attribute DOMString name; attribute DOMString value; };
The pre element represents a block of preformatted text, in which structure is represented by typographic conventions rather than by elements.
A pre element must have both a start tag and an end tag.
any element that can contain flow elements
interface HTMLPreElement : HTMLElement {};
The progress element represents the completion progress of a task.
A progress element must have both a start tag and an end tag.
any element that can contain phrasing elements
interface HTMLProgressElement : HTMLElement { attribute double value; attribute double max; readonly attribute double position; readonly attribute HTMLFormElement form; readonly attribute NodeList labels; };
The q element represents phrasing content quoted from another source.
A q element must have both a start tag and an end tag.
any element that can contain phrasing elements
Uses HTMLElement.
4.7. 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.