| Name | Character | Glyph |
|---|---|---|
zacute; | U+0017A | ź |
zcaron; | U+0017E | ž |
zcy; | U+00437 | з |
zdot; | U+0017C | ż |
zeetrf; | U+02128 | ℨ |
zeta; | U+003B6 | ζ |
zfr; | U+1D537 | |
zhcy; | U+00436 | ж |
zigrarr; | U+021DD | ⇝ |
zopf; | U+1D56B | |
zscr; | U+1D4CF | |
zwj; | U+0200D | |
zwnj; | U+0200C | |
The glyphs displayed above are non-normative. Refer to the Unicode specifications for formal definitions of the characters listed above.
This section only describes the rules for XML
resources. Rules for text/html resources are discussed
in the section above entitled "The HTML syntax".
The syntax for using HTML with XML, whether in XHTML documents or embedded in other XML documents, is defined in the XML and Namespaces in XML specifications. [XML] [XMLNS]
This specification does not define any syntax-level requirements beyond those defined for XML proper.
XML documents may contain a DOCTYPE if desired, but
this is not required to conform to this specification. This
specification does not define a public or system identifier, nor
provide a format DTD.
According to the XML specification, XML processors
are not guaranteed to process the external DTD subset referenced in
the DOCTYPE. This means, for example, that using entity references
for characters in XHTML documents is unsafe if they are defined in
an external file (except for <, >, &, " and ').
This section describes the relationship between XML and the DOM, with a particular emphasis on how this interacts with HTML.
An XML parser, for the purposes of this specification,
is a construct that follows the rules given in the XML specification
to map a string of bytes or characters into a Document
object.
An XML parser is either associated with a
Document object when it is created, or creates one
implicitly.
This Document must then be populated with DOM nodes
that represent the tree structure of the input passed to the parser,
as defined by the XML specification, the Namespaces in XML
specification, and the DOM Core specification. DOM mutation events
must not fire for the operations that the XML parser
performs on the Document's tree, but the user agent
must act as if elements and attributes were individually appended
and set respectively so as to trigger rules in this specification
regarding what happens when an element in inserted into a document
or has its attributes set. [XML] [XMLNS] [DOMCORE]
[DOMEVENTS]
Between the time an element's start tag is parsed and the time either the element's end tag is parsed on the parser detects a well-formedness error, the user agent must act as if the element was in a stack of open elements.
This is used by the object element to
avoid instantiating plugins before the param element
children have been parsed.
This specification provides the following additional information that user agents should use when retrieving an external entity: the public identifiers given in the following list all correspond to the URL given by this link.
-//W3C//DTD XHTML 1.0 Transitional//EN-//W3C//DTD XHTML 1.1//EN-//W3C//DTD XHTML 1.0 Strict//EN-//W3C//DTD XHTML 1.0 Frameset//EN-//W3C//DTD XHTML Basic 1.0//EN-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN-//W3C//DTD MathML 2.0//EN-//WAPFORUM//DTD XHTML Mobile 1.0//ENFurthermore, user agents should attempt to retrieve the above external entity's content when one of the above public identifiers is used, and should not attempt to retrieve any other external entity's content.
This is not strictly a violation of the XML specification, but it does contradict the spirit of the XML specification's requirements. This is motivated by a desire for user agents to all handle entities in an interoperable fashion without requiring any network access for handling external subsets. [XML]
When an XML parser creates a
script element, it must be marked as being
"parser-inserted". If the parser was originally
created for the XML fragment parsing algorithm, then
the element must be marked as "already started"
also. When the element's end tag is parsed, the user agent must
run the script
element. If this causes there to be a pending parsing-blocking
script, then the user agent must run the following steps:
Block this instance of the XML parser, such that the event loop will not run tasks that invoke it.
Spin the event loop until there is no style sheet blocking scripts and the pending parsing-blocking script's "ready to be parser-executed" flag is set.
Unblock this instance of the XML parser, such that tasks that invoke it can again be run.
There is no longer a pending parsing-blocking script.
Since the document.write() API is not
available for XML documents, much of the complexity in
the HTML parser is not needed in the XML
parser.
Certain algorithms in this specification spoon-feed the parser characters one string at a time. In such cases, the XML parser must act as it would have if faced with a single string consisting of the concatenation of all those characters.
When an XML parser reaches the end of its input, it must stop parsing, following the same rules as the HTML parser.
For the purposes of conformance checkers, if a resource is determined to be in the XHTML syntax, then it is an XML document.
The XML fragment serialization algorithm for a
Document or Element node either returns a
fragment of XML that represents that node or raises an
exception.
For Documents, the algorithm must return a string in
the form of a document
entity, if none of the error cases below apply.
For Elements, the algorithm must return a string in
the form of an internal general parsed
entity, if none of the error cases below apply.
In both cases, the string returned must be XML
namespace-well-formed and must be an isomorphic serialization of all
of that node's child nodes, in tree order. User agents
may adjust prefixes and namespace declarations in the serialization
(and indeed might be forced to do so in some cases to obtain
namespace-well-formed XML). User agents may use a combination of
regular text, character references, and CDATA sections to represent
text nodes in the DOM (and indeed
might be forced to use representations that don't match the DOM's,
e.g. if a CDATASection node contains the string "]]>").
For Elements, if any of the elements in the
serialization are in no namespace, the default namespace in scope
for those elements must be explicitly declared as the empty
string. (This doesn't
apply in the Document case.) [XML] [XMLNS]
For the purposes of this section, an internal general parsed entity is considered XML namespace-well-formed if a document consisting of an element with no namespace declarations whose contents are the internal general parsed entity would itself be XML namespace-well-formed.
If any of the following error cases are found in the DOM subtree
being serialized, then the algorithm must raise an
INVALID_STATE_ERR exception instead of returning a
string:
Document node with no child element nodes.DocumentType node that has an external subset
public identifier that contains characters that are not matched by
the XML PubidChar production. [XML]DocumentType node that has an external subset
system identifier that contains both a U+0022 QUOTATION MARK (")
and a U+0027 APOSTROPHE (') or that contains characters that are
not matched by the XML Char production. [XML]Name production. [XML]Attr node with no namespace whose local name is
the lowercase string "xmlns". [XMLNS]Element node with two or more attributes with
the same local name and namespace.Attr node, Text node,
CDATASection node, Comment node, or
ProcessingInstruction node whose data contains
characters that are not matched by the XML Char production. [XML]Comment node whose data contains two adjacent
U+002D HYPHEN-MINUS characters (-) or ends with such a
character.ProcessingInstruction node whose target name is
an ASCII case-insensitive match for the string "xml".ProcessingInstruction node whose target name
contains a U+003A COLON (:).ProcessingInstruction node whose data contains
the string "?>".These are the only ways to make a DOM
unserializable. The DOM enforces all the other XML constraints; for
example, trying to append two elements to a Document
node will raise a HIERARCHY_REQUEST_ERR exception.
The XML fragment parsing algorithm for either returns
a Document or raises a SYNTAX_ERR
exception. Given a string input and an optional
context element context, the algorithm is as
follows:
Create a new XML parser.
If there is a context element, feed the parser just created the string corresponding to the start tag of that element, declaring all the namespace prefixes that are in scope on that element in the DOM, as well as declaring the default namespace (if any) that is in scope on that element in the DOM.
A namespace prefix is in scope if the DOM Core lookupNamespaceURI() method on the element would
return a non-null value for that prefix.
The default namespace is the namespace for which the DOM Core
isDefaultNamespace() method on the element
would return true.
If there is a context element,
no DOCTYPE is passed to the parser, and
therefore no external subset is referenced, and therefore no
entities will be recognized.
Feed the parser just created the string input.
If there is a context element, feed the parser just created the string corresponding to the end tag of that element.
If there is an XML well-formedness or XML namespace
well-formedness error, then raise a SYNTAX_ERR
exception and abort these steps.
If there is a context element, then return
the child nodes of the root element of the resulting
Document, in tree order.
Otherwise, return the children of the Document
object, in tree order.
User agents are not required to present HTML documents in any particular way. However, this section provides a set of suggestions for rendering HTML documents that, if followed, are likely to lead to a user experience that closely resembles the experience intended by the documents' authors. So as to avoid confusion regarding the normativity of this section, RFC2119 terms have not been used. Instead, the term "expected" is used to indicate behavior that will lead to this experience.
In general, user agents are expected to support CSS, and many of the suggestions in this section are expressed in CSS terms. User agents that use other presentation mechanisms can derive their expected behavior by translating from the CSS rules given in this section.
In the absence of style-layer rules to the contrary (e.g. author style sheets), user agents are expected to render an element so that it conveys to the user the meaning that the element represents, as described by this specification.
The suggestions in this section generally assume a visual output medium with a resolution of 96dpi or greater, but HTML is intended to apply to multiple media (it is a media-independent language). User agents are encouraged to adapt the suggestions in this section to their target media.
An element is being rendered if it is in a
Document, either its parent node is itself
being rendered or it is the Document node,
and it is not explicitly excluded from the rendering using either:
Just being off-screen does not mean the element is
not being rendered. The presence of the hidden attribute normally means the
element is not being rendered, though this might be
overriden by the style sheets.
The CSS rules given in these subsections are, except where otherwise specified, expected to be used as part of the user-agent level style sheet defaults for all documents that contain HTML elements.
Some rules are intended for the author-level zero-specificity presentational hints part of the CSS cascade; these are explicitly called out as presentational hints.
Some of the rules regarding left and right margins are given here as appropriate for elements whose 'direction' property is 'ltr', and are expected to be flipped around on elements whose 'direction' property is 'rtl'. These are marked "LTR-specific".
When the text below says that an attribute attribute on an element element maps to the pixel length property (or properties) properties, it means that if element has an attribute attribute set, and parsing that attribute's value using the rules for parsing non-negative integers doesn't generate an error, then the user agent is expected to use the parsed value as a pixel length for a presentational hint for properties.
When the text below says that an attribute attribute on an element element maps to the dimension property (or properties) properties, it means that if element has an attribute attribute set, and parsing that attribute's value using the rules for parsing dimension values doesn't generate an error, then the user agent is expected to use the parsed dimension as the value for a presentational hint for properties, with the value given as a pixel length if the dimension was an integer, and with the value given as a percentage if the dimension was a percentage.
@namespace url(http://www.w3.org/1999/xhtml);
[hidden], area, base, basefont, command, datalist, head,
input[type=hidden], link, menu[type=context], meta, noembed, noframes,
param, rp, script, source, style, title {
display: none;
}
address, article, aside, blockquote, body, center, dd, dir, div, dl,
dt, figure, figcaption, footer, form, h1, h2, h3, h4, h5, h6, header,
hgroup, hr, html, legend, listing, menu, nav, ol, p, plaintext, pre,
section, summary, ul, xmp { display: block; }
table { display: table; }
caption { display: table-caption; }
colgroup { display: table-column-group; }
col { display: table-column; }
thead { display: table-header-group; }
tbody { display: table-row-group; }
tfoot { display: table-footer-group; }
tr { display: table-row; }
td, th { display: table-cell; }
li { display: list-item; }
ruby { display: ruby; }
rt { display: ruby-text; }
For the purposes of the CSS table model, the col
element is expected to be treated as if it was present as many times
as its span attribute specifies.
For the purposes of the CSS table model, the
colgroup element, if it contains no col
element, is expected to be treated as if it had as many such
children as its span
attribute specifies.
For the purposes of the CSS table model, the colspan and rowspan attributes on
td and th elements are expected to provide the
special knowledge regarding cells spanning rows and
columns.
For the purposes of the CSS ruby model, runs of descendants of
ruby elements that are not rt or
rp elements are expected to be wrapped in anonymous
boxes whose 'display' property has the value 'ruby-base'.
User agents that do not support correct ruby rendering are
expected to render parentheses around the text of rt
elements in the absence of rp elements.
The br element is expected to render as if its
contents were a single U+000A LINE FEED (LF) character and its
'white-space' property was 'pre'. User agents are expected to
support the 'clear' property on inline elements (in order to render
br elements with clear attributes) in the manner
described in the non-normative note to this effect in CSS2.1.
The user agent is expected to hide noscript elements
for whom scripting is enabled,
irrespective of CSS rules.
In HTML documents, the user agent is expected to
hide form elements that are children of
table, thead, tbody,
tfoot, or tr elements, irrespective of CSS
rules.
@namespace url(http://www.w3.org/1999/xhtml);
blockquote, dir, dl, figure, listing, menu, ol, p, plaintext,
pre, ul, xmp {
margin-top: 1em; margin-bottom: 1em;
}
dir dir, dir dl, dir menu, dir ol, dir ul,
dl dir, dl dl, dl menu, dl ol, dl ul,
menu dir, menu dl, menu menu, menu ol, menu ul,
ol dir, ol dl, ol menu, ol ol, ol ul,
ul dir, ul dl, ul menu, ul ol, ul ul {
margin-top: 0; margin-bottom: 0;
}
h1 { margin-top: 0.67em; margin-bottom; 0.67em; }
h2 { margin-top: 0.83em; margin-bottom; 0.83em; }
h3 { margin-top: 1.00em; margin-bottom; 1.00em; }
h4 { margin-top: 1.33em; margin-bottom; 1.33em; }
h5 { margin-top: 1.67em; margin-bottom; 1.67em; }
h6 { margin-top: 2.33em; margin-bottom; 2.33em; }
dd { margin-left: 40px; } /* LTR-specific: use 'margin-right' for rtl elements */
dir, menu, ol, ul { padding-left: 40px; } /* LTR-specific: use 'padding-right' for rtl elements */
blockquote, figure { margin-left: 40px; margin-right: 40px; }
table { border-spacing: 2px; border-collapse: separate; }
td, th { padding: 1px; }
The article, aside, nav,
and section elements are expected to affect the margins
of h1 elements, based on the nesting depth. If x is a selector that matches elements that are either
article, aside, nav, or
section elements, then the following rules capture what
is expected:
@namespace url(http://www.w3.org/1999/xhtml);
x h1 { margin-top: 0.83em; margin-bottom: 0.83em; }
x x h1 { margin-top: 1.00em; margin-bottom: 1.00em; }
x x x h1 { margin-top: 1.33em; margin-bottom: 1.33em; }
x x x x h1 { margin-top: 1.67em; margin-bottom: 1.67em; }
x x x x x h1 { margin-top: 2.33em; margin-bottom: 2.33em; }
For each property in the table below, given a body
element, the first attribute that exists maps to the pixel
length property on the body element. If none of
the attributes for a property are found, or if the value of the
attribute that was found cannot be parsed successfully, then a
default value of 8px is expected to be used for that property
instead.
| Property | Source |
|---|---|
| 'margin-top' | body element's marginheight attribute
|
The body element's container frame element's marginheight attribute
| |
body element's topmargin attribute
| |
| 'margin-right' | body element's marginwidth attribute
|
The body element's container frame element's marginwidth attribute
| |
body element's rightmargin attribute
| |
| 'margin-bottom' | body element's marginheight attribute
|
The body element's container frame element's marginheight attribute
| |
body element's topmargin attribute
| |
| 'margin-left' | body element's marginwidth attribute
|
The body element's container frame element's marginwidth attribute
| |
body element's rightmargin attribute
|
If the body element's Document's
browsing context is a nested browsing
context, and the browsing context container of
that nested browsing context is a frame or
iframe element, then the container frame
element of the body element is that
frame or iframe element. Otherwise, there
is no container frame element.
The above requirements imply that a page can
change the margins of another page (including one from another
origin) using, for example, an
iframe. This is potentially a security risk, as it
might in some cases allow an attack to contrive a situation in which
a page is rendered not as the author intended, possibly for the
purposes of phishing or otherwise misleading the user.
If the Document has a root element, and
the Document's browsing context is a
nested browsing context, and the browsing context
container of that nested browsing context is a
frame or iframe element, and that element
has a scrolling
attribute, then the user agent is expected to compare the value of
the attribute in an ASCII case-insensitive manner to
the values in the first column of the following table, and if one of
them matches, then the user agent is expected to treat that
attribute as a presentational
hint for the aforementioned root element's 'overflow'
property, setting it to the value given in the corresponding cell on
the same row in the second column:
| Attribute value | 'overflow' value |
|---|---|
on
| 'scroll' |
scroll
| 'scroll' |
yes
| 'scroll' |
off
| 'hidden' |
noscroll
| 'hidden' |
no
| 'hidden' |
auto
| 'auto' |
The table element's cellspacing attribute
maps to the pixel length property 'border-spacing' on the
element.
The table element's cellpadding attribute maps to the pixel length
properties 'padding-top', 'padding-right', 'padding-bottom',
and 'padding-left' of any td and th
elements that have corresponding cells in the table corresponding to the
table element.
The table element's hspace attribute maps to the dimension properties
'margin-left' and 'margin-right' on the table
element.
The table element's vspace attribute maps to the dimension properties
'margin-top' and 'margin-bottom' on the table
element.
The table element's height attribute maps to the
dimension property 'height' on the table
element.
The table element's width attribute maps to the
dimension property 'width' on the table
element.
The col element's width attribute maps to the
dimension property 'width' on the col
element.
The tr element's height attribute maps to the
dimension property 'height' on the tr
element.
The td and th elements' height attributes map to the dimension property 'height'
on the element.
The td and th elements' width attributes map to the dimension property 'width'
on the element.
In quirks mode, the following rules are also expected to apply:
@namespace url(http://www.w3.org/1999/xhtml);
form { margin-bottom: 1em; }
When a Document is in quirks mode,
margins on HTML elements at the top or bottom of
body, td, or th elements are
expected to be collapsed to zero.
@namespace url(http://www.w3.org/1999/xhtml);
thead, tbody, tfoot, table > tr { vertical-align: middle; }
tr, td, th { vertical-align: inherit; }
sub { vertical-align: sub; }
sup { vertical-align: super; }
th { text-align: center; }
The following rules are also expected to apply, as presentational hints:
@namespace url(http://www.w3.org/1999/xhtml);
table[align=left] { float: left; }
table[align=right] { float: right; }
table[align=center], table[align=abscenter],
table[align=absmiddle], table[align=middle] {
margin-left: auto; margin-right: auto;
}
caption[align=bottom] { caption-side: bottom; }
p[align=left], h1[align=left], h2[align=left], h3[align=left],
h4[align=left], h5[align=left], h6[align=left] {
text-align: left;
}
p[align=right], h1[align=right], h2[align=right], h3[align=right],
h4[align=right], h5[align=right], h6[align=right] {
text-align: right;
}
p[align=center], h1[align=center], h2[align=center], h3[align=center],
h4[align=center], h5[align=center], h6[align=center] {
text-align: center;
}
p[align=justify], h1[align=justify], h2[align=justify], h3[align=justify],
h4[align=justify], h5[align=justify], h6[align=justify] {
text-align: justify;
}
col[valign=top], thead[valign=top], tbody[valign=top],
tfoot[valign=top], tr[valign=top], td[valign=top], th[valign=top] {
vertical-align: top;
}
col[valign=middle], thead[valign=middle], tbody[valign=middle],
tfoot[valign=middle], tr[valign=middle], td[valign=middle], th[valign=middle] {
vertical-align: middle;
}
col[valign=bottom], thead[valign=bottom], tbody[valign=bottom],
tfoot[valign=bottom], tr[valign=bottom], td[valign=bottom], th[valign=bottom] {
vertical-align: bottom;
}
col[valign=baseline], thead[valign=baseline], tbody[valign=baseline],
tfoot[valign=baseline], tr[valign=baseline], td[valign=baseline], th[valign=baseline] {
vertical-align: baseline;
}
The center element, the caption element
unless specified otherwise below, and the div,
thead, tbody, tfoot,
tr, td, and th elements when
they have an align attribute
whose value is an ASCII case-insensitive match for the
string "center", are expected to center text
within themselves, as if they had their 'text-align' property set to
'center' in a presentational
hint, and to align descendants to the
center.
The div, caption, thead,
tbody, tfoot, tr,
td, and th elements, when they have an
align attribute whose value is an
ASCII case-insensitive match for the string "left", are expected to left-align text within
themselves, as if they had their 'text-align' property set to 'left'
in a presentational hint,
and to align descendants to the left.
The div, caption, thead,
tbody, tfoot, tr,
td, and th elements, when they have an
align attribute whose value is an
ASCII case-insensitive match for the string "right", are expected to right-align text within
themselves, as if they had their 'text-align' property set to
'right' in a presentational
hint, and to align descendants to the right.
The div, caption, thead,
tbody, tfoot, tr,
td, and th elements, when they have an
align attribute whose value is an
ASCII case-insensitive match for the string "justify", are expected to full-justify text within
themselves, as if they had their 'text-align' property set to
'justify' in a presentational
hint, and to align descendants to the left.
When a user agent is to align descendants of a node,
the user agent is expected to align only those descendants that have
both their 'margin-left' and 'margin-right' properties computing to
a value other than 'auto', that are over-constrained and that have
one of those two margins with a used value forced to a greater
value, and that do not themselves have an applicable align attribute. When multiple elements
are to align a particular
descendant, the most deeply nested such element is expected to
override the others.
@namespace url(http://www.w3.org/1999/xhtml);
address, cite, dfn, em, i, var { font-style: italic; }
b, strong, th { font-weight: bold; }
code, kbd, listing, plaintext, pre, samp, tt, xmp { font-family: monospace; }
h1 { font-size: 2.00em; font-weight: bold; }
h2 { font-size: 1.50em; font-weight: bold; }
h3 { font-size: 1.17em; font-weight: bold; }
h4 { font-size: 1.00em; font-weight: bold; }
h5 { font-size: 0.83em; font-weight: bold; }
h6 { font-size: 0.67em; font-weight: bold; }
big { font-size: larger; }
small, sub, sup { font-size: smaller; }
sub, sup { line-height: normal; }
:link { color: blue; }
:visited { color: purple; }
mark { background: yellow; color: black; }
table, td, th { border-color: gray; }
thead, tbody, tfoot, tr { border-color: inherit; }
table[rules=none], table[rules=groups], table[rules=rows],
table[rules=cols], table[rules=all], table[frame=void],
table[frame=above], table[frame=below], table[frame=hsides],
table[frame=lhs], table[frame=rhs], table[frame=vsides],
table[frame=box], table[frame=border],
table[rules=none] > tr > td, table[rules=none] > tr > th,
table[rules=groups] > tr > td, table[rules=groups] > tr > th,
table[rules=rows] > tr > td, table[rules=rows] > tr > th,
table[rules=cols] > tr > td, table[rules=cols] > tr > th,
table[rules=all] > tr > td, table[rules=all] > tr > th,
table[rules=none] > thead > tr > td, table[rules=none] > thead > tr > th,
table[rules=groups] > thead > tr > td, table[rules=groups] > thead > tr > th,
table[rules=rows] > thead > tr > td, table[rules=rows] > thead > tr > th,
table[rules=cols] > thead > tr > td, table[rules=cols] > thead > tr > th,
table[rules=all] > thead > tr > td, table[rules=all] > thead > tr > th,
table[rules=none] > tbody > tr > td, table[rules=none] > tbody > tr > th,
table[rules=groups] > tbody > tr > td, table[rules=groups] > tbody > tr > th,
table[rules=rows] > tbody > tr > td, table[rules=rows] > tbody > tr > th,
table[rules=cols] > tbody > tr > td, table[rules=cols] > tbody > tr > th,
table[rules=all] > tbody > tr > td, table[rules=all] > tbody > tr > th,
table[rules=none] > tfoot > tr > td, table[rules=none] > tfoot > tr > th,
table[rules=groups] > tfoot > tr > td, table[rules=groups] > tfoot > tr > th,
table[rules=rows] > tfoot > tr > td, table[rules=rows] > tfoot > tr > th,
table[rules=cols] > tfoot > tr > td, table[rules=cols] > tfoot > tr > th,
table[rules=all] > tfoot > tr > td, table[rules=all] > tfoot > tr > th {
border-color: black;
}
The initial value for the 'color' property is expected to be black. The initial value for the 'background-color' property is expected to be 'transparent'. The canvas's background is expected to be white.
The article, aside, nav,
and section elements are expected to affect the font
size of h1 elements, based on the nesting depth. If
x is a selector that matches elements that are
either article, aside, nav,
or section elements, then the following rules capture
what is expected:
@namespace url(http://www.w3.org/1999/xhtml);
x h1 { font-size: 1.50em; }
x x h1 { font-size: 1.17em; }
x x x h1 { font-size: 1.00em; }
x x x x h1 { font-size: 0.83em; }
x x x x x h1 { font-size: 0.67em; }
When a body, table, thead,
tbody, tfoot, tr,
td, or th element has a background attribute set to a
non-empty value, the new value is expected to be resolved relative to the element, and
if this is successful, the user agent is expected to treat the
attribute as a presentational
hint setting the element's 'background-image' property to the
resulting absolute URL.
When a body, table, thead,
tbody, tfoot, tr,
td, or th element has a bgcolor attribute set, the new value is expected to
be parsed using the rules for parsing a legacy color
value, and if that does not return an error, the user agent
is expected to treat the attribute as a presentational hint setting the element's
'background-color' property to the resulting color.
When a body element has a text attribute, its value is expected
to be parsed using the rules for parsing a legacy color
value, and if that does not return an error, the user
agent is expected to treat the attribute as a presentational hint setting the
element's 'color' property to the resulting color.
When a body element has a link attribute, its value is expected
to be parsed using the rules for parsing a legacy color
value, and if that does not return an error, the user agent
is expected to treat the attribute as a presentational hint setting the 'color' property of
any element in the Document matching the ':link'
pseudo-class to the resulting color.
When a body element has a vlink attribute, its value is
expected to be parsed using the rules for parsing a legacy
color value, and if that does not return an error, the user
agent is expected to treat the attribute as a presentational hint setting the
'color' property of any element in the Document
matching the ':visited' pseudo-class to the resulting color.
When a body element has a alink attribute, its value is
expected to be parsed using the rules for parsing a legacy
color value, and if that does not return an error, the user
agent is expected to treat the attribute as a presentational hint setting the
'color' property of any element in the Document
matching the ':active' pseudo-class and either the ':link'
pseudo-class or the ':visited' pseudo-class to the resulting
color.
When a table element has a bordercolor attribute, its
value is expected to be parsed using the rules for parsing a
legacy color value, and if that does not return an error, the
user agent is expected to treat the attribute as a presentational hint setting the
element's 'border-top-color', 'border-right-color',
'border-bottom-color', and 'border-right-color' properties to the
resulting color.
When a font element has a color attribute, its value is
expected to be parsed using the rules for parsing a legacy
color value, and if that does not return an error, the user
agent is expected to treat the attribute as a presentational hint setting the
element's 'color' property to the resulting color.
When a font element has a face attribute, the user agent is
expected to treat the attribute as a presentational hint setting the element's
'font-family' property to the attribute's value.
When a font element has a size attribute, the user agent is
expected to use the following steps to treat the attribute as a
presentational hint
setting the element's 'font-size' property:
Let input be the attribute's value.
Let position be a pointer into input, initially pointing at the start of the string.
If position is past the end of input, there is no presentational hint. Abort these steps.
If the character at position is a U+002B PLUS SIGN character (+), then let mode be relative-plus, and advance position to the next character. Otherwise, if the character at position is a U+002D HYPHEN-MINUS character (-), then let mode be relative-minus, and advance position to the next character. Otherwise, let mode be absolute.
Collect a sequence of characters in the range U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9), and let the resulting sequence be digits.
If digits is the empty string, there is no presentational hint. Abort these steps.
Interpret digits as a base-ten integer. Let value be the resulting number.
If mode is relative-plus, then increment value by 3. If mode is relative-minus, then let value be the result of subtracting value from 3.
If value is greater than 7, let it be 7.
If value is less than 1, let it be 1.
Set 'font-size' to the keyword corresponding to the value of value according to the following table:
| value | 'font-size' keyword | Notes |
|---|---|---|
| 1 | xx-small | |
| 2 | small | |
| 3 | medium | |
| 4 | large | |
| 5 | x-large | |
| 6 | xx-large | |
| 7 | xxx-large | see below |
The 'xxx-large' value is a non-CSS value used here to indicate a font size one "step" larger than 'xx-large'.
@namespace url(http://www.w3.org/1999/xhtml);
:link, :visited, ins, u { text-decoration: underline; }
abbr[title], acronym[title] { text-decoration: dotted underline; }
del, s, strike { text-decoration: line-through; }
blink { text-decoration: blink; }
q:before { content: open-quote; }
q:after { content: close-quote; }
nobr { white-space: nowrap; }
listing, plaintext, pre, xmp { white-space: pre; }
ol { list-style-type: decimal; }
dir, menu, ul {
list-style-type: disc;
}
dir dl, dir menu, dir ul,
menu dl, menu menu, menu ul,
ol dl, ol menu, ol ul,
ul dl, ul menu, ul ul {
list-style-type: circle;
}
dir dir dl, dir dir menu, dir dir ul,
dir menu dl, dir menu menu, dir menu ul,
dir ol dl, dir ol menu, dir ol ul,
dir ul dl, dir ul menu, dir ul ul,
menu dir dl, menu dir menu, menu dir ul,
menu menu dl, menu menu menu, menu menu ul,
menu ol dl, menu ol menu, menu ol ul,
menu ul dl, menu ul menu, menu ul ul,
ol dir dl, ol dir menu, ol dir ul,
ol menu dl, ol menu menu, ol menu ul,
ol ol dl, ol ol menu, ol ol ul,
ol ul dl, ol ul menu, ol ul ul,
ul dir dl, ul dir menu, ul dir ul,
ul menu dl, ul menu menu, ul menu ul,
ul ol dl, ul ol menu, ul ol ul,
ul ul dl, ul ul menu, ul ul ul {
list-style-type: square;
}
table { border-style: outset; }
td, th { border-style: inset; }
[dir=ltr] { direction: ltr; unicode-bidi: embed; }
[dir=rtl] { direction: rtl; unicode-bidi: embed; }
bdo[dir=ltr], bdo[dir=rtl] { unicode-bidi: bidi-override; }
In addition, rules setting the 'quotes' property appropriately for the locales and languages understood by the user are expected to be present.
The following rules are also expected to apply, as presentational hints:
@namespace url(http://www.w3.org/1999/xhtml);
td[nowrap], th[nowrap] { white-space: nowrap; }
pre[wrap] { white-space: pre-wrap; }
br[clear=left] { clear: left; }
br[clear=right] { clear: right; }
br[clear=all], br[clear=both] { clear: both; }
ol[type=1], li[type=1] { list-style-type: decimal; }
ol[type=a], li[type=a] { list-style-type: lower-alpha; } /* case-sensitive */
ol[type=A], li[type=A] { list-style-type: upper-alpha; } /* case-sensitive */
ol[type=i], li[type=i] { list-style-type: lower-roman; } /* case-sensitive */
ol[type=I], li[type=I] { list-style-type: upper-roman; } /* case-sensitive */
ul[type=disc], li[type=disc] { list-style-type: disc; }
ul[type=circle], li[type=circle] { list-style-type: circle; }
ul[type=square], li[type=square] { list-style-type: square; }
table[rules=none], table[rules=groups], table[rules=rows],
table[rules=cols], table[rules=all] {
border-style: none;
border-collapse: collapse;
}
table[frame=void] { border-style: hidden hidden hidden hidden; }
table[frame=above] { border-style: solid hidden hidden hidden; }
table[frame=below] { border-style: hidden hidden solid hidden; }
table[frame=hsides] { border-style: solid hidden solid hidden; }
table[frame=lhs] { border-style: hidden hidden hidden solid; }
table[frame=rhs] { border-style: hidden solid hidden hidden; }
table[frame=vsides] { border-style: hidden solid hidden solid; }
table[frame=box],
table[frame=border] { border-style: solid solid solid solid; }
table[rules=none] > tr > td, table[rules=none] > tr > th,
table[rules=none] > thead > tr > td, table[rules=none] > thead > tr > th,
table[rules=none] > tbody > tr > td, table[rules=none] > tbody > tr > th,
table[rules=none] > tfoot > tr > td, table[rules=none] > tfoot > tr > th,
table[rules=groups] > tr > td, table[rules=groups] > tr > th,
table[rules=groups] > thead > tr > td, table[rules=groups] > thead > tr > th,
table[rules=groups] > tbody > tr > td, table[rules=groups] > tbody > tr > th,
table[rules=groups] > tfoot > tr > td, table[rules=groups] > tfoot > tr > th,
table[rules=rows] > tr > td, table[rules=rows] > tr > th,
table[rules=rows] > thead > tr > td, table[rules=rows] > thead > tr > th,
table[rules=rows] > tbody > tr > td, table[rules=rows] > tbody > tr > th,
table[rules=rows] > tfoot > tr > td, table[rules=rows] > tfoot > tr > th {
border-style: none;
}
table[rules=groups] > colgroup, table[rules=groups] > thead,
table[rules=groups] > tbody, table[rules=groups] > tfoot {
border-style: solid;
}
table[rules=rows] > tr, table[rules=rows] > thead > tr,
table[rules=rows] > tbody > tr, table[rules=rows] > tfoot > tr {
border-style: solid;
}
table[rules=cols] > tr > td, table[rules=cols] > tr > th,
table[rules=cols] > thead > tr > td, table[rules=cols] > thead > tr > th,
table[rules=cols] > tbody > tr > td, table[rules=cols] > tbody > tr > th,
table[rules=cols] > tfoot > tr > td, table[rules=cols] > tfoot > tr > th {
border-style: none solid none solid;
}
table[rules=all] > tr > td, table[rules=all] > tr > th,
table[rules=all] > thead > tr > td, table[rules=all] > thead > tr > th,
table[rules=all] > tbody > tr > td, table[rules=all] > tbody > tr > th,
table[rules=all] > tfoot > tr > td, table[rules=all] > tfoot > tr > th {
border-style: solid;
}
table[border] > tr > td, table[border] > tr > th,
table[border] > thead > tr > td, table[border] > thead > tr > th,
table[border] > tbody > tr > td, table[border] > tbody > tr > th,
table[border] > tfoot > tr > td, table[border] > tfoot > tr > th {
border-width: 1px;
}
For the purpose of the
four rules marked "case-sensitive" above, user agents are expected
to use case-sensitive matching of attribute values rather than
case-insensitive matching as is normally required for the type attribute.
When rendering li elements, user agents are expected
to use the ordinal value of the li element to render
the counter in the list item marker.
The table element's border attribute maps to the pixel length
properties 'border-top-width', 'border-right-width',
'border-bottom-width', 'border-left-width' on the element. If the
attribute is present but parsing the attribute's value using the
rules for parsing non-negative integers generates an
error, a default value of 1px is expected to be used for that
property instead.
The wbr element is expected to override the
'white-space' property and always provide a line-breaking
opportunity.
The following rules are also expected to be in play, resetting certain properties to block inheritance by default.
@namespace url(http://www.w3.org/1999/xhtml);
table, input, select, option, optgroup, button, textarea, keygen {
text-indent: initial;
}
In quirks mode, the following rules are also expected to apply:
@namespace url(http://www.w3.org/1999/xhtml);
table {
font-weight: initial;
font-style: initial;
font-variant: initial;
font-size: initial;
line-height: initial;
white-space: initial;
text-align: initial;
}
input { box-sizing: border-box; }
hr element@namespace url(http://www.w3.org/1999/xhtml);
hr { color: gray; border-style: inset; border-width: 1px; }
The following rules are also expected to apply, as presentational hints:
@namespace url(http://www.w3.org/1999/xhtml);
hr[align=left] { margin-left: 0; margin-right: auto; }
hr[align=right] { margin-left: auto; margin-right: 0; }
hr[align=center] { margin-left: auto; margin-right: auto; }
hr[color], hr[noshade] { border-style: solid; }
If an hr element has either a color attribute or a noshade attribute, and furthermore
also has a size attribute, and
parsing that attribute's value using the rules for parsing
non-negative integers doesn't generate an error, then the
user agent is expected to use the parsed value divided by two as a
pixel length for presentational hints for the properties
'border-top-width', 'border-right-width', 'border-bottom-width', and
'border-left-width' on the element.
Otherwise, if an hr element has neither a color attribute nor a noshade attribute, but does have a
size attribute, and parsing that
attribute's value using the rules for parsing non-negative
integers doesn't generate an error, then: if the parsed value
is one, then the user agent is expected to use the attribute as a
presentational hint
setting the element's 'border-bottom-width' to 0; otherwise, if the
parsed value is greater than one, then the user agent is expected to
use the parsed value minus two as a pixel length for
presentational hints for the 'height' property on the
element.
The width attribute on an
hr element maps to the dimension property
'width' on the element.
When an hr element has a color attribute, its value is expected
to be parsed using the rules for parsing a legacy color
value, and if that does not return an error, the user agent
is expected to treat the attribute as a presentational hint setting the element's 'color'
property to the resulting color.
fieldset element@namespace url(http://www.w3.org/1999/xhtml);
fieldset {
margin-left: 2px; margin-right: 2px;
border: groove 2px ThreeDFace;
padding: 0.35em 0.625em 0.75em;
}
The fieldset element is expected to establish a new
block formatting context.
The first legend element child of a
fieldset element, if any, is expected to be rendered
over the top border edge of the fieldset element. If
the legend element in question has an align attribute, and its value is
an ASCII case-insensitive match for one of the strings
in the first column of the following table, then the
legend is expected to be rendered horizontally aligned
over the border edge in the position given in the corresponding cell
on the same row in the second column. If the attribute is absent or
has a value that doesn't match any of the cases in the table, then
the position is expected to be on the right if the 'direction'
property on this element has a computed value of 'rtl', and on the
left otherwise.
| Attribute value | Alignment position |
|---|---|
left
| On the left |
right
| On the right |
center
| In the middle |
The embed, iframe, and
video elements are expected to be treated as replaced
elements.
A canvas element that represents
embedded content is expected to be treated as a
replaced element. Other canvas elements are expected to
be treated as ordinary elements in the rendering model.
An object element that represents an
image, plugin, or nested browsing context is expected
to be treated as a replaced element. Other object
elements are expected to be treated as ordinary elements in the
rendering model.
An applet element that represents a
plugin is expected to be treated as a replaced
element. Other applet elements are expected to be
treated as ordinary elements in the rendering model.
The audio element, when it is exposing a user interface, is
expected to be treated as a replaced element about one line high, as
wide as is necessary to expose the user agent's user interface
features. When an audio element is not exposing a user
interface, the user agent is expected to hide it,
irrespective of CSS rules.
Whether a video element is exposing a user interface is not
expected to affect the size of the rendering; controls are expected
to be overlaid with the page content without causing any layout
changes, and are expected to disappear when the user does not need
them.
When a video element represents a poster frame or
frame of video, the poster frame or frame of video is expected to be
rendered at the largest size that maintains the aspect ratio of that
poster frame or frame of video without being taller or wider than
the video element itself, and is expected to be
centered in the video element.
Resizing video and canvas
elements does not interrupt video playback or clear the canvas.
The following CSS rules are expected to apply:
@namespace url(http://www.w3.org/1999/xhtml);
iframe { border: 2px inset; }
When an img element or an input element
when its type attribute is in
the Image Button state
represents an image, it is expected to be treated as a
replaced element.
When an img element or an input element
when its type attribute is in
the Image Button state
does not represent an image, but the
element already has intrinsic dimensions (e.g. from the
dimension attributes or CSS rules), and either the user
agent has reason to believe that the image will become available
and be rendered in due course or the Document is in
quirks mode, the element is expected to be treated as a
replaced element whose content is the text that the element
represents, if any, optionally alongside an icon indicating that the
image is being obtained. For input elements, the text
is expected to appear button-like to indicate that the element is a
button.
When an img element represents some
text and the user agent does not expect this to change, the element
is expected to be treated as an inline element whose content is the
text, optionally with an icon indicating that an image is
missing.
When an img element represents nothing
and the user agent does not expect this to change, the element is
expected to not be rendered at all.
When an img element might be a key part of the
content, but neither the image nor any kind of alternative text is
available, and the user agent does not expect this to change, the
element is expected to be treated as an inline element whose content
is an icon indicating that an image is missing.
When an input element whose type attribute is in the Image Button state does not
represent an image and the user
agent does not expect this to change, the element is expected to be
treated as a replaced element consisting of a button whose content
is the element's alternative text. The intrinsic dimensions of the
button are expected to be about one line in height and whatever
width is necessary to render the text on one line.
The icons mentioned above are expected to be relatively small so as not to disrupt most text but be easily clickable. In a visual environment, for instance, icons could be 16 pixels by 16 pixels square, or 1em by 1em if the images are scalable. In an audio environment, the icon could be a short bleep. The icons are intended to indicate to the user that they can be used to get to whatever options the UA provides for images, and, where appropriate, are expected to provide access to the context menu that would have come up if the user interacted with the actual image.
The following CSS rules are expected to apply when the
Document is in quirks mode:
@namespace url(http://www.w3.org/1999/xhtml);
img[align=left] { margin-right: 3px; }
img[align=right] { margin-left: 3px; }
The following CSS rules are expected to apply as presentational hints:
@namespace url(http://www.w3.org/1999/xhtml);
iframe[frameborder=0], iframe[frameborder=no] { border: none; }
applet[align=left], embed[align=left], iframe[align=left],
img[align=left], input[type=image][align=left], object[align=left] {
float: left;
}
applet[align=right], embed[align=right], iframe[align=right],
img[align=right], input[type=image][align=right], object[align=right] {
float: right;
}
applet[align=top], embed[align=top], iframe[align=top],
img[align=top], input[type=image][align=top], object[align=top] {
vertical-align: top;
}
applet[align=bottom], embed[align=bottom], iframe[align=bottom],
img[align=bottom], input[type=image][align=bottom], object[align=bottom],
applet[align=baseline], embed[align=baseline], iframe[align=baseline],
img[align=baseline], input[type=image][align=baseline], object[align=baseline] {
vertical-align: baseline;
}
applet[align=texttop], embed[align=texttop], iframe[align=texttop],
img[align=texttop], input[type=image][align=texttop], object[align=texttop] {
vertical-align: text-top;
}
applet[align=absmiddle], embed[align=absmiddle], iframe[align=absmiddle],
img[align=absmiddle], input[type=image][align=absmiddle], object[align=absmiddle],
applet[align=abscenter], embed[align=abscenter], iframe[align=abscenter],
img[align=abscenter], input[type=image][align=abscenter], object[align=abscenter] {
vertical-align: middle;
}
applet[align=bottom], embed[align=bottom], iframe[align=bottom],
img[align=bottom], input[type=image][align=bottom],
object[align=bottom] {
vertical-align: bottom;
}
When an applet, embed,
iframe, img, or object
element, or an input element whose type attribute is in the Image Button state, has an
align attribute whose value is
an ASCII case-insensitive match for the string "center" or the string "middle", the user agent is expected to act as if the
element's 'vertical-align' property was set to a value that aligns
the vertical middle of the element with the parent element's
baseline.
The hspace attribute of
applet, embed, iframe,
img, or object elements, and
input elements with a type attribute in the Image Button state, maps to the dimension
properties 'margin-left' and 'margin-right' on the
element.
The vspace attribute of
applet, embed, iframe,
img, or object elements, and
input elements with a type attribute in the Image Button state, maps to the dimension
properties 'margin-top' and 'margin-bottom' on the
element.
When an img element, object element, or
input element with a type attribute in the Image Button state is contained
within a hyperlink and has a border attribute whose value, when
parsed using the rules for parsing non-negative
integers, is found to be a number greater than zero, the user
agent is expected to use the parsed value for eight
presentational hints: four setting the parsed value as
a pixel length for the element's 'border-top-width',
'border-right-width', 'border-bottom-width', and 'border-left-width'
properties, and four setting the element's 'border-top-style',
'border-right-style', 'border-bottom-style', and 'border-left-style'
properties to the value 'solid'.
The width
and height attributes on
applet, embed, iframe,
img, object or video
elements, and input elements with a type attribute in the Image Button state, map to the dimension
properties 'width' and 'height' on the element
respectively.
Shapes on an image map are expected to act, for the
purpose of the CSS cascade, as elements independent of the original
area element that happen to match the same style rules
but inherit from the img or object
element.
For the purposes of the rendering, only the 'cursor' property is expected to have any effect on the shape.
Thus, for example, if an area
element has a style attribute that
sets the 'cursor' property to 'help', then when the user designates
that shape, the cursor would change to a Help cursor.
Similarly, if an area element had a
CSS rule that set its 'cursor' property to 'inherit' (or if no rule
setting the 'cursor' property matched the element at all), the
shape's cursor would be inherited from the img or
object element of the image map, not from
the parent of the area element.
When a menu element's type attribute is in the toolbar state, the element is
expected to be treated as a replaced element with a height about two
lines high and a width derived from the contents of the element.
The element is expected to have, by default, the appearance of a toolbar on the user agent's platform. It is expected to contain the menu that is built from the element.
A number of elements have their rendering defined in terms of the 'binding' property. [BECSS]
The CSS snippets below set the 'binding' property to a
user-agent-defined value, represented below by keywords like button. The rules then described for
these bindings are only expected to apply if the element's 'binding'
property has not been overridden (e.g. by the author) to have
another value.
Exactly how the bindings are implemented is not specified by this specification. User agents are encouraged to make their bindings set the 'appearance' CSS property appropriately to achieve platform-native appearances for widgets, and are expected to implement any relevant animations, etc, that are appropriate for the platform. [CSSUI]
button element@namespace url(http://www.w3.org/1999/xhtml);
button { binding: button; }
When the button binding applies to a
button element, the element is expected to render as an
'inline-block' box rendered as a button whose contents are the
contents of the element.
details element@namespace url(http://www.w3.org/1999/xhtml);
details { binding: details; }
When the details binding applies to a
details element, the element is expected to render as a
'block' box with its 'padding-left' property set to '40px' for
left-to-right elements (LTR-specific) and with its
'padding-right' property set to '40px' for right-to-left
elements. The element's shadow tree is expected to take the
element's first child summary element, if any, and
place it in a first 'block' box container, and then take the
element's remaining descendants, if any, and place them in a second
'block' box container.
The first container is expected to contain at least one line box,
and that line box is expected to contain a disclosure widget
(typically a triangle), horizontally positioned within the left
padding of the details element. That widget is expected
to allow the user to request that the details be shown or
hidden.
The second container is expected to have its 'overflow' property
set to 'hidden'. When the details element does not have
an open attribute, this
second container is expected to be removed from the rendering.
input element as a text entry widget@namespace url(http://www.w3.org/1999/xhtml);
input { binding: input-textfield; }
input[type=password] { binding: input-password; }
/* later rules override this for other values of type="" */
When the input-textfield binding applies to an
input element whose type attribute is in the Text, Search, Telephone, URL, or E-mail state, the element is
expected to render as an 'inline-block' box rendered as a text
field.
When the input-password binding applies, to an
input element whose type attribute is in the Password state, the element
is expected to render as an 'inline-block' box rendered as a text
field whose contents are obscured.
If an input element whose type attribute is in one of the above
states has a size attribute,
and parsing that attribute's value using the rules for parsing
non-negative integers doesn't generate an error, then the
user agent is expected to use the attribute as a presentational hint for the
'width' property on the element, with the value obtained from
applying the converting a character width to pixels
algorithm to the value of the attribute.
If an input element whose type attribute is in one of the above
states does not have a size attribute, then the user agent
is expected to act as if it had a user-agent-level style sheet rule
setting the 'width' property on the element to the value obtained
from applying the converting a character width to
pixels algorithm to the number 20.
The converting a character width to pixels algorithm returns (size-1)×avg + max, where size is the character width to convert, avg is the average character width of the primary font for the element for which the algorithm is being run, in pixels, and max is the maximum character width of that same font, also in pixels. (The element's 'letter-spacing' property does not affect the result.)
input element as domain-specific widgets@namespace url(http://www.w3.org/1999/xhtml);
input[type=datetime] { binding: input-datetime; }
input[type=date] { binding: input-date; }
input[type=month] { binding: input-month; }
input[type=week] { binding: input-week; }
input[type=time] { binding: input-time; }
input[type=datetime-local] { binding: input-datetime-local; }
input[type=number] { binding: input-number; }
When the input-datetime binding applies to an
input element whose type attribute is in the Date and Time state, the
element is expected to render as an 'inline-block' box depicting a
Date and Time control.
When the input-date binding applies to an
input element whose type attribute is in the Date state, the element is
expected to render as an 'inline-block' box depicting a Date
control.
When the input-month binding applies to an
input element whose type attribute is in the Month state, the element is
expected to render as an 'inline-block' box depicting a Month
control.
When the input-week binding applies to an
input element whose type attribute is in the Week state, the element is
expected to render as an 'inline-block' box depicting a Week
control.
When the input-time binding applies to an
input element whose type attribute is in the Time state, the element is
expected to render as an 'inline-block' box depicting a Time
control.
When the input-datetime-local binding applies to an
input element whose type attribute is in the Local Date and Time
state, the element is expected to render as an 'inline-block' box
depicting a Local Date and Time control.
When the input-number binding applies to an
input element whose type attribute is in the Number state, the element is
expected to render as an 'inline-block' box depicting a Number
control.
These controls are all expected to be about one line high, and about as wide as necessary to show the widest possible value.
input element as a range control@namespace url(http://www.w3.org/1999/xhtml);
input[type=range] { binding: input-range; }
When the input-range binding applies to an
input element whose type attribute is in the Range state, the element is
expected to render as an 'inline-block' box depicting a slider
control.
When the control is wider than it is tall (or square), the control is expected to be a horizontal slider, with the lowest value on the right if the 'direction' property on this element has a computed value of 'rtl', and on the left otherwise. When the control is taller than it is wide, it is expected to be a vertical slider, with the lowest value on the bottom.
Predefined suggested values (provided by the list attribute) are expected to be
shown as tick marks on the slider, which the slider can snap to.
input element as a color well@namespace url(http://www.w3.org/1999/xhtml);
input[type=color] { binding: input-color; }
When the input-color binding applies to an
input element whose type attribute is in the Color state, the element is
expected to render as an 'inline-block' box depicting a color well,
which, when activated, provides the user with a color picker (e.g. a
color wheel or color palette) from which the color can be
changed.
Predefined suggested values (provided by the list attribute) are expected to be
shown in the color picker interface, not on the color well
itself.
input element as a check box and radio button widgets@namespace url(http://www.w3.org/1999/xhtml);
input[type=checkbox] { binding: input-checkbox; }
input[type=radio] { binding: input-radio; }
When the input-checkbox binding applies to an
input element whose type attribute is in the Checkbox state, the element
is expected to render as an 'inline-block' box containing a single
check box control, with no label.
When the input-radio binding applies to an
input element whose type attribute is in the Radio Button state, the element
is expected to render as an 'inline-block' box containing a single
radio button control, with no label.
input element as a file upload control@namespace url(http://www.w3.org/1999/xhtml);
input[type=file] { binding: input-file; }
When the input-file binding applies to an
input element whose type attribute is in the File Upload state, the element
is expected to render as an 'inline-block' box containing a span of
text giving the filename(s) of the selected files, if
any, followed by a button that, when activated, provides the user
with a file picker from which the selection can be changed.
input element as a button@namespace url(http://www.w3.org/1999/xhtml);
input[type=submit], input[type=reset], input[type=button] {
binding: input-button;
}
When the input-button binding applies to an
input element whose type attribute is in the Submit Button, Reset Button, or Button state, the element is
expected to render as an 'inline-block' box rendered as a button,
about one line high, containing the contents of the element's value attribute, if any, or text
derived from the element's type
attribute in a user-agent-defined (and probably locale-specific)
fashion, if not.
marquee element@namespace url(http://www.w3.org/1999/xhtml);
marquee {
binding: marquee;
}
When the marquee binding applies to a
marquee element, while the element is turned on, the element is expected
to render in an animated fashion according to its attributes as
follows:
behavior attribute is in the
scroll stateSlide the contents of the element in the direction described by
the direction
attribute as defined below, such that it begins off the start side
of the marquee, and ends flush with the inner end
side.
For example, if the direction attribute is left (the default),
then the contents would start such that their left edge are off
the side of the right edge of the marquee's content
area, and the contents would then slide up to the point where the
left edge of the contents are flush with the left inner edge of
the marquee's content area.
Once the animation has ended, the user agent is expected to increment the marquee current loop index. If the element is still turned on after this, then the user agent is expected to restart the animation.
behavior attribute is in the
slide stateSlide the contents of the element in the direction described by
the direction
attribute as defined below, such that it begins off the start side
of the marquee, and ends off the end side of the
marquee.
For example, if the direction attribute is left (the default),
then the contents would start such that their left edge are off
the side of the right edge of the marquee's content
area, and the contents would then slide up to the point where the
right edge of the contents are flush with the left inner
edge of the marquee's content area.
Once the animation has ended, the user agent is expected to increment the marquee current loop index. If the element is still turned on after this, then the user agent is expected to restart the animation.
behavior attribute is in the
alternate
stateWhen the marquee current loop index is even (or
zero), slide the contents of the element in the direction
described by the direction attribute as
defined below, such that it begins flush with the start side of
the marquee, and ends flush with the end side of the
marquee.
When the marquee current loop index is odd, slide
the contents of the element in the opposite direction than that
described by the direction attribute as
defined below, such that it begins flush with the end side of the
marquee, and ends flush with the start side of the
marquee.
For example, if the direction attribute is left (the default),
then the contents would with their right edge flush with the right
inner edge of the marquee's content area, and the
contents would then slide up to the point where the left
edge of the contents are flush with the left inner edge of the
marquee's content area.
Once the animation has ended, the user agent is expected to increment the marquee current loop index. If the element is still turned on after this, then the user agent is expected to continue the animation.
The direction
attribute has the meanings described in the following table:
direction attribute state
| Direction of animation | Start edge | End edge | Opposite direction |
|---|---|---|---|---|
| left | ← Right to left | Right | Left | → Left to Right |
| right | → Left to Right | Left | Right | ← Right to left |
| up | ↑ Up (Bottom to Top) | Bottom | Top | ↓ Down (Top to Bottom) |
| down | ↓ Down (Top to Bottom) | Top | Bottom | ↑ Up (Bottom to Top) |
In any case, the animation should proceed such that there is a delay given by the marquee scroll interval between each frame, and such that the content moves at most the distance given by the marquee scroll distance with each frame.
When a marquee element has a bgcolor attribute set, the value
is expected to be parsed using the rules for parsing a legacy
color value, and if that does not return an error, the user
agent is expected to treat the attribute as a presentational hint setting the
element's 'background-color' property to the resulting color.
The width and height attributes on a
marquee element map to the dimension properties 'width' and
'height' on the element respectively.
The intrinsic height of a marquee element with its
direction attribute in
the up or down states is 200 CSS
pixels.
The vspace attribute of
a marquee element maps to the dimension properties 'margin-top' and
'margin-bottom' on the element. The hspace attribute of a
marquee element maps to the dimension properties 'margin-left' and
'margin-right' on the element.
The 'overflow' property on the marquee element is
expected to be ignored; overflow is expected to always be
hidden.
meter element@namespace url(http://www.w3.org/1999/xhtml);
meter {
binding: meter;
}
When the meter binding applies to a
meter element, the element is expected to render as an
'inline-block' box with a 'height' of '1em' and a 'width' of '5em',
a 'vertical-align' of '-0.2em', and with its contents depicting a
gauge.
When the element is wider than it is tall (or square), the depiction is expected to be of a horizontal gauge, with the minimum value on the right if the 'direction' property on this element has a computed value of 'rtl', and on the left otherwise. When the element is taller than it is wide, it is expected to depict a vertical gauge, with the minimum value on the bottom.
User agents are expected to use a presentation consistent with platform conventions for gauges, if any.
Requirements for what must be depicted in the gauge
are included in the definition of the meter
element.
progress element@namespace url(http://www.w3.org/1999/xhtml);
progress {
binding: progress;
}
When the progress binding applies to a
progress element, the element is expected to render as
an 'inline-block' box with a 'height' of '1em' and a 'width' of
'10em', a 'vertical-align' of '-0.2em', and with its contents
depicting a horizontal progress bar, with the start on the right and
the end on the left if the 'direction' property on this element has
a computed value of 'rtl', and with the start on the left and the
end on the right otherwise.
User agents are expected to use a presentation consistent with platform conventions for progress bars. In particular, user agents are expected to use different presentations for determinate and indeterminate progress bars. User agents are also expected to vary the presentation based on the dimensions of the element.
For example, on some platforms for showing indeterminate progress there is an asynchronous progress indicator with square dimensions, which could be used when the element is square, and an indeterminate progress bar, which could be used when the element is wide.
Requirements for how to determine if the progress
bar is determinate or indeterminate, and what progress a determinate
progress bar is to show, are included in the definition of the
progress element.
select element@namespace url(http://www.w3.org/1999/xhtml);
select {
binding: select;
}
When the select binding applies to a
select element whose multiple attribute is present,
the element is expected to render as a multi-select list box.
When the select binding applies to a
select element whose multiple attribute is absent,
and the element's size
attribute specifies a value greater than 1, the element is
expected to render as a single-select list box.
When the element renders as a list box, it is expected to render
as an 'inline-block' box whose 'height' is the height necessary to
contain as many rows for items as specified by the element's size attribute, or four rows if the
attribute is absent, and whose 'width' is the width of the
select's labels plus the width of a
scrollbar.
When the select binding applies to a
select element whose multiple attribute is absent,
and the element's size
attribute is either absent or specifies either no value (an error),
or a value less than or equal to 1, the element is expected to
render as a one-line drop down box whose width is the width of
the select's labels.
In either case (list box or drop-down box), the element's items
are expected to be the element's list of options, with the
element's optgroup element children providing headers
for groups of options where applicable.
The width of the select's labels is the
wider of the width necessary to render the widest
optgroup, and the width necessary to render the widest
option element in the element's list of options (including
its indent, if any).
An optgroup element is expected to be rendered by
displaying the element's label attribute.
An option element is expected to be rendered by
displaying the element's label, indented under its
optgroup element if it has one.
textarea element@namespace url(http://www.w3.org/1999/xhtml);
textarea { binding: textarea; }
When the textarea binding applies to a
textarea element, the element is expected to render as
an 'inline-block' box rendered as a multiline text field.
If the element has a cols
attribute, and parsing that attribute's value using the rules
for parsing non-negative integers doesn't generate an error,
then the user agent is expected to use the attribute as a presentational hint for the
'width' property on the element, with the value being the
textarea effective width (as defined below). Otherwise,
the user agent is expected to act as if it had a user-agent-level
style sheet rule setting the 'width' property on the element to the
textarea effective width.
The textarea effective width of a
textarea element is size×avg + sbw, where size is the
element's character
width, avg is the average character width
of the primary font of the element, in CSS pixels, and sbw is the width of a scroll bar, in CSS pixels. (The
element's 'letter-spacing' property does not affect the result.)
If the element has a rows
attribute, and parsing that attribute's value using the rules
for parsing non-negative integers doesn't generate an error,
then the user agent is expected to use the attribute as a presentational hint for the
'height' property on the element, with the value being the
textarea effective height (as defined
below). Otherwise, the user agent is expected to act as if it had a
user-agent-level style sheet rule setting the 'height' property on
the element to the textarea effective height.
The textarea effective height of a
textarea element is the height in CSS pixels of the
number of lines specified the element's character height, plus the
height of a scrollbar in CSS pixels.
For historical reasons, if the element has a wrap attribute whose value is an
ASCII case-insensitive match for the string "off", then the user agent is
expected to not wrap the rendered value; otherwise, the value of the
control is expected to be wrapped to the width of the control.
keygen element@namespace url(http://www.w3.org/1999/xhtml);
keygen { binding: keygen; }
When the keygen binding applies to a
keygen element, the element is expected to render as an
'inline-block' box containing a user interface to configure the key
pair to be generated.
time element@namespace url(http://www.w3.org/1999/xhtml);
time:empty { binding: time; }
When the time binding applies to a
time element, the element is expected to render as if
it contained text conveying the date (if known), time (if known), and time-zone offset (if known)
represented by the element, in the fashion most convenient for the
user.
When an html element's second child element is a
frameset element, the user agent is expected to render
the frameset element as described below across the
surface of the view, instead of applying the usual CSS
rendering rules.
When rendering a frameset on a surface, the user
agent is expected to use the following layout algorithm:
The cols and rows variables are lists of zero or more pairs consisting of a number and a unit, the unit being one of percentage, relative, and absolute.
Use the rules for parsing a list of dimensions to
parse the value of the element's cols attribute, if there is
one. Let cols be the result, or an empty list
if there is no such attribute.
Use the rules for parsing a list of dimensions to
parse the value of the element's rows attribute, if there is
one. Let rows be the result, or an empty list
if there is no such attribute.
For any of the entries in cols or rows that have the number zero and the unit relative, change the entry's number to one.
If cols has no entries, then add a single entry consisting of the value 1 and the unit relative to cols.
If rows has no entries, then add a single entry consisting of the value 1 and the unit relative to rows.
Invoke the algorithm defined below to convert a list of
dimensions to a list of pixel values using cols as the input list, and the width of the
surface that the frameset is being rendered into, in
CSS pixels, as the input dimension. Let sized
cols be the resulting list.
Invoke the algorithm defined below to convert a list of
dimensions to a list of pixel values using rows as the input list, and the height of the
surface that the frameset is being rendered into, in
CSS pixels, as the input dimension. Let sized
rows be the resulting list.
Split the surface into a grid of w×h rectangles, where w is the number of entries in sized cols and h is the number of entries in sized rows.
Size the columns so that each column in the grid is as many CSS pixels wide as the corresponding entry in the sized cols list.
Size the rows so that each row in the grid is as many CSS pixels high as the corresponding entry in the sized rows list.
Let children be the list of
frame and frameset elements that are
children of the frameset element for which the
algorithm was invoked.
For each row of the grid of rectangles created in the previous step, from top to bottom, run these substeps:
For each rectangle in the row, from left to right, run these substeps:
If there are any elements left in children, take the first element in the list, and assign it to the rectangle.
If this is a frameset element, then recurse
the entire frameset layout algorithm for that
frameset element, with the rectangle as the
surface.
Otherwise, it is a frame element; create a
nested browsing context sized to fit the
rectangle.
If there are any elements left in children, remove the first element from children.
If the frameset element has a border,
draw an outer set of borders around the rectangles, using the
element's frame border color.
For each rectangle, if there is an element assigned to that rectangle, and that element has a border, draw an inner set of borders around that rectangle, using the element's frame border color.
For each (visible) border that does not abut a rectangle that
is assigned a frame element with a noresize attribute (including
rectangles in further nested frameset elements), the
user agent is expected to allow the user to move the border,
resizing the rectangles within, keeping the proportions of any
nested frameset grids.
A frameset or frame element has
a border if the following algorithm returns true:
If the element has a frameborder attribute
whose value is not the empty string and whose first character is
either a U+0031 DIGIT ONE (1) character, a U+0079 LATIN SMALL
LETTER Y character (y), or a U+0059 LATIN CAPITAL LETTER Y
character (Y), then return true.
Otherwise, if the element has a frameborder attribute,
return false.
Otherwise, if the element has a parent element that is a
frameset element, then return true if that
element has a border, and false if it does
not.
Otherwise, return true.
The frame border color of a frameset or
frame element is the color obtained from the
following algorithm:
If the element has a bordercolor attribute, and
applying the rules for parsing a legacy color value
to that attribute's value does not result in an error, then
return the color so obtained.
Otherwise, if the element has a parent element that is a
frameset element, then the frame border
color of that element.
Otherwise, return gray.
The algorithm to convert a list of dimensions to a list of pixel values consists of the following steps:
Let input list be the list of numbers and units passed to the algorithm.
Let output list be a list of numbers the same length as input list, all zero.
Entries in output list correspond to the entries in input list that have the same position.
Let input dimension be the size passed to the algorithm.
Let count percentage be the number of entries in input list whose unit is percentage.
Let total percentage be the sum of all the numbers in input list whose unit is percentage.
Let count relative be the number of entries in input list whose unit is relative.
Let total relative be the sum of all the numbers in input list whose unit is relative.
Let count absolute be the number of entries in input list whose unit is absolute.
Let total absolute be the sum of all the numbers in input list whose unit is absolute.
Let remaining space be the value of input dimension.
If total absolute is greater than remaining space, then for each entry in input list whose unit is absolute, set the corresponding value in output list to the number of the entry in input list multiplied by remaining space and divided by total absolute. Then, set remaining space to zero.
Otherwise, for each entry in input list whose unit is absolute, set the corresponding value in output list to the number of the entry in input list. Then, decrement remaining space by total absolute.
If total percentage multiplied by the input dimension and divided by 100 is greater than remaining space, then for each entry in input list whose unit is percentage, set the corresponding value in output list to the number of the entry in input list multiplied by remaining space and divided by total percentage. Then, set remaining space to zero.
Otherwise, for each entry in input list whose unit is percentage, set the corresponding value in output list to the number of the entry in input list multiplied by the input dimension and divided by 100. Then, decrement remaining space by total percentage multiplied by the input dimension and divided by 100.
For each entry in input list whose unit is relative, set the corresponding value in output list to the number of the entry in input list multiplied by remaining space and divided by total relative.
Return output list.
User agents working with integer values for frame widths (as opposed to user agents that can lay frames out with subpixel accuracy) are expected to distribute the remainder first to the last entry whose unit is relative, then equally (not proportionally) to each entry whose unit is percentage, then equally (not proportionally) to each entry whose unit is absolute, and finally, failing all else, to the last entry.
User agents are expected to allow the user to control aspects of hyperlink activation and form submission, such as which browsing context is to be used for the subsequent navigation.
User agents are expected to allow users to discover the destination of hyperlinks and of forms before triggering their navigation.
User agents are expected to inform the user of whether a hyperlink includes hyperlink auditing, and to let them know at a minimum which domains will be contacted as part of such auditing.
User agents are expected to allow users to navigate
browsing contexts to the
resources indicated by the cite attributes on q,
blockquote, section, article,
ins, and del elements.
User agents are expected to surface hyperlinks created by link
elements in their user interface.
While link elements that create hyperlinks will match the ':link' or
':visited' pseudo-classes, will react to clicks if visible, and so
forth, this does not extend to any browser interface constructs that
expose those same links. Activating a link through the browser's
interface, rather than in the page itself, does not trigger click events and the like.
title attributeGiven an element (e.g. the element designated by the mouse
cursor), if the element, or one of its ancestors, has a title attribute, and the nearest such
attribute has a value that is not the empty string, it is expected
that the user agent will expose the contents of that attribute as a
tooltip.
User agents are encouraged to make it possible to view tooltips without the use of a pointing device, since not all users are able to use pointing devices.
U+000A LINE FEED (LF) characters are expected to cause line breaks in the tooltip.
The current text editing caret (the one at the caret position in a focused editing host) is expected to act like an inline replaced element with the vertical dimensions of the caret and with zero width for the purposes of the CSS rendering model.
This means that even an empty block can have the caret inside it, and that when the caret is in such an element, it prevents margins from collapsing through the element.
User agents are expected to allow the user to request the
opportunity to obtain a physical form (or a
representation of a physical form) of a Document. For
example, selecting the option to print a page or convert it to PDF
format.
When the user actually obtains a physical form (or a representation of a
physical form) of a Document, the user agent is
expected to create a new view with the print media, render the
result, and the discard the view.
Features listed in this section will trigger warnings in conformance checkers.
Authors should not specify an http-equiv attribute in the
Content
Language state on a meta element. The lang attribute should be used instead.
Authors should not specify a border attribute on an
img element. If the attribute is present, its value
must be the string "0". CSS should be used
instead.
Authors should not specify a language attribute on a
script element. If the attribute is present, its value
must be an ASCII case-insensitive match for the string
"JavaScript" and either the type attribute must be omitted or
its value must be an ASCII case-insensitive match for
the string "text/javascript". The attribute
should be entirely omitted instead (with the value "JavaScript", it has no effect), or replaced with use
of the type attribute.
Authors should not specify the name attribute on a
elements. If the attribute is present, its value must not be the
empty string and must neither be equal to the value of any of the
IDs in the element's home
subtree other than the element's own ID, if any, nor be equal to the value of
any of the other name attributes on
a elements in the element's home
subtree. If this attribute is present and the element has an
ID, then the attribute's value must
be equal to the element's ID. In
earlier versions of the language, this attribute was intended as a
way to specify possible targets for fragment identifiers in URLs. The id
attribute should be used instead.
In the HTML syntax, specifying a DOCTYPE that is an obsolete permitted DOCTYPE will also trigger a warning.
The summary
attribute, defined in the table section, will also
trigger a warning.
To ease the transition from HTML4 Transitional documents to the language defined in this specification, and to discourage certain features that are only allowed in very few circumstances, conformance checkers are required to warn the user when the following features are used in a document. These are generally old obsolete features that have no effect, and are allowed only to distinguish between likely mistakes (regular conformance errors) and mere vestigial markup or unusual and discouraged practices (these warnings).
The following features must be categorized as described above:
The presence of an obsolete permitted DOCTYPE in an HTML document.
The presence of a meta element with an http-equiv attribute in the
Content
Language state.
The presence of a border attribute on an
img element if its value is the string "0".
The presence of a language attribute on a
script element if its value is an ASCII
case-insensitive match for the string "JavaScript" and if there is no type attribute or there is and its
value is an ASCII case-insensitive match for the
string "text/javascript".
The presence of a name
attribute on an a element, if its value is not the
empty string.
Conformance checkers must distinguish between pages that have no conformance errors and have none of these obsolete features, and pages that have no conformance errors but do have some of these obsolete features.
For example, a validator could report some pages as "Valid HTML" and others as "Valid HTML with warnings".
Elements in the following list are entirely obsolete, and must not be used by authors:
appletacronymUse abbr instead.
bgsoundUse audio instead.
dirUse ul instead.
frameframesetnoframesEither use iframe and CSS instead, or use server-side includes to generate complete pages with the various invariant parts merged in.
isindexUse an explicit form and text field combination instead.
listingxmpnextidUse GUIDs instead.
noembedplaintextUse the "text/plain" MIME type instead.
rbProviding the ruby base directly inside the ruby element is sufficient; the rb element is unnecessary. Omit it altogether.
basefontbigblinkcenterfontmarqueemulticolnobrsspacerstrikettuwbrUse appropriate elements and/or CSS instead.
For the s and strike elements, if
they are marking up a removal from the element, consider using the
del element instead.
Where the tt element would have been used for
marking up keyboard input, consider the kbd element;
for variables, consider the var element; for computer
code, consider the code element; and for computer
output, consider the samp element.
Similarly, if the u element is being used to
indicate emphasis, consider using the em element; if
it is being used for marking up keywords, consider the
b element; and if it is being used for highlighting
text for reference purposes, consider the mark
element.
See also the text-level semantics usage summary for more suggestions with examples.
The following attributes are obsolete (though the elements are still part of the language), and must not be used by authors:
charset on a elementscharset on link elementsUse an HTTP Content-Type header on the linked resource instead.
coords on a elementsshape on a elementsmethods on a elementsmethods on link elementsUse the HTTP OPTIONS feature instead.
name on a elements (except as noted in the previous section)name on embed elementsname on img elementsUse the id attribute instead.
rev on a elementsrev on link elementsUse the rel
attribute instead, with an opposite term. (For example, instead of
rev="made", use rel="author".)
urn on a elementsurn on link elementsSpecify the preferred persistent identifier using the href attribute instead.
nohref on area elementsOmitting the href
attribute is sufficient; the nohref attribute is
unnecessary. Omit it altogether.
profile on head elementsWhen used for declaring which meta terms are
used in the document, unnecessary; omit it altogether, and register the names.
When used for triggering specific user agent behaviors: use
a link element instead.
version on html elementsUnnecessary. Omit it altogether.
usemap on input elementslongdesc on iframe elementslongdesc on img elementsUse a regular a element to link to the description.
target on link elementsUnnecessary. Omit it altogether.
scheme on meta elementsUse only one scheme per field, or make the scheme declaration part of the value.
archive on object elementsclassid on object elementscode on object elementscodebase on object elementscodetype on object elementsUse the data and type attributes to invoke plugins. To set parameters with these names
in particular, the param element can be used.
declare on object elementsRepeat the object element completely each time the resource is to be reused.
standby on object elementsOptimize the linked resource so that it loads quickly or, at least, incrementally.
type on param elementsvaluetype on param elementsUse the name and value attributes without declaring
value types.
language on script elements (except as noted in the previous section)Use the type attribute
instead.
event on script elementsfor on script elementsUse DOM Events mechanisms to register event listeners. [DOMEVENTS]
datapagesize on table elementsUnnecessary. Omit it altogether.
abbr on td and th elementsUse text that begins in an unambiguous and terse manner, and include any more elaborate text after that.
axis on td and th elementsdatasrc on a, applet, button, div, frame, iframe, img, input, label, legend, marquee, object, option, select, span, table, and textarea elementsdatafld on a, applet, button, div, fieldset, frame, iframe, img, input, label, legend, marquee, object, param, select, span, and textarea elementsdataformatas on button, div, input, label, legend, marquee, object, option, select, span, tableUse script and a mechanism such as XMLHttpRequest to populate the page dynamically. [XHR]
alink on body elementsbgcolor on body elementslink on body elementstext on body elementsvlink on body elementsclear on br elementsalign on caption elementsalign on col elementschar on col elementscharoff on col elementsvalign on col elementswidth on col elementsalign on div elementscompact on dl elementsalign on embed elementsalign on hr elementscolor on hr elementsnoshade on hr elementssize on hr elementswidth on hr elementsalign on h1—h6 elementsalign on iframe elementsframeborder on iframe elementsmarginheight on iframe elementsmarginwidth on iframe elementsscrolling on iframe elementsalign on input elementsalign on img elementsborder on img elements (except as noted in the previous section)hspace on img elementsvspace on img elementsalign on legend elementstype on li elementscompact on menu elementsalign on object elementsborder on object elementshspace on object elementsvspace on object elementscompact on ol elementstype on ol elementsalign on p elementswidth on pre elementsalign on table elementsbgcolor on table elementsborder on table elementscellpadding on table elementscellspacing on table elementsframe on table elementsrules on table elementswidth on table elementsalign on tbody, thead, and tfoot elementschar on tbody, thead, and tfoot elementscharoff on tbody, thead, and tfoot elementsvalign on tbody, thead, and tfoot elementsalign on td and th elementsbgcolor on td and th elementschar on td and th elementscharoff on td and th elementsheight on td and th elementsnowrap on td and th elementsvalign on td and th elementswidth on td and th elementsalign on tr elementsbgcolor on tr elementschar on tr elementscharoff on tr elementsvalign on tr elementscompact on ul elementstype on ul elementsbackground on body, table, thead, tbody, tfoot, tr, td, and th elementsUse CSS instead.
applet elementThe applet element is a Java-specific variant of the
embed element. The applet element is now
obsoleted so that all extension frameworks (Java, .NET, Flash, etc)
are handled in a consistent manner.
When the element is still in the
stack of open elements of an HTML parser
or XML parser, and when the element is not in a
Document, and when the element's document is not
fully active, and when the element's
Document's browsing context had its
sandboxed plugins browsing context flag when that
Document was created, and when the element's
Document was parsed from a resource whose sniffed type as determined
during navigation is
text/html-sandboxed, and when the element has an
ancestor media element, and when the element has an
ancestor object element that is not showing
its fallback content, and when no Java Language runtime
plugin is available, and when one is available
but it is disabled, the element represents its
contents.
Otherwise, the user agent should instantiate a Java Language
runtime plugin, and should pass the names and values of
all the attributes on the element, in the order they were added to
the element, with the attributes added by the parser being ordered
in source order, and then a parameter named "PARAM" whose value is
null, and then all the names and values of parameters given by
param elements that are children of the
applet element, in tree order, to the
plugin used. If the plugin supports a
scriptable interface, the HTMLAppletElement object
representing the element should expose that interface. The
applet element represents the
plugin.
The applet element is unaffected by the
CSS 'display' property. The Java Language runtime is instantiated
even if the element is hidden with a 'display:none' CSS style.
The applet element must implement the
HTMLAppletElement interface.
interface HTMLAppletElement : HTMLElement { attribute DOMString align; attribute DOMString alt; attribute DOMString archive; attribute DOMString code; attribute DOMString codeBase; attribute DOMString height; attribute unsigned long hspace; attribute DOMString name; attribute DOMString _object; // the underscore is not part of the identifier attribute unsigned long vspace; attribute DOMString width; };
The align, alt, archive, code, height, hspace, name, object, vspace, and width IDL attributes
must reflect the respective content attributes of the
same name.
The codeBase
IDL attribute must reflect the codebase content attribute.
marquee elementThe marquee element is a presentational element that
animates content. CSS transitions and animations are a more
appropriate mechanism.
The task source for tasks mentioned in this section is the DOM manipulation task source.
The marquee element must implement the
HTMLMarqueeElement interface.
interface HTMLMarqueeElement : HTMLElement { attribute DOMString behavior; attribute DOMString bgColor; attribute DOMString direction; attribute DOMString height; attribute unsigned long hspace; attribute long loop; attribute unsigned long scrollAmount; attribute unsigned long scrollDelay; attribute DOMString trueSpeed; attribute unsigned long vspace; attribute DOMString width; attribute Function onbounce; attribute Function onfinish; attribute Function onstart; void start(); void stop(); };
A marquee element can be turned on or turned off. When it is created, it
is turned on.
When the start() method is
called, the marquee element must be turned on.
When the stop()
method is called, the marquee element must be turned off.
When a marquee element is created, the user agent
must queue a task to fire a simple event
named start at the element.
The behavior content
attribute on marquee elements is an enumerated
attribute with the following keywords (all
non-conforming):
| Keyword | State |
|---|---|
scroll
| scroll |
slide
| slide |
alternate
| alternate |
The missing value default is the scroll state.
The direction content
attribute on marquee elements is an enumerated
attribute with the following keywords (all
non-conforming):
| Keyword | State |
|---|---|
left
| left |
right
| right |
up
| up |
down
| down |
The missing value default is the left state.
The truespeed content
attribute on marquee elements is an enumerated
attribute with the following keywords (all
non-conforming):
| Keyword | State |
|---|---|
true
| true |
false
| false |
The missing value default is the false state.
A marquee element has a marquee scroll
interval, which is obtained as follows:
If the element has a scrolldelay attribute, and
parsing its value using the rules for parsing non-negative
integers does not return an error, then let delay be the parsed value. Otherwise, let delay be 85.
If the element does not have a truespeed attribute, or if it
does but that attribute is in the false state, and the
delay value is less than 60, then let delay be 60 instead.
The marquee scroll interval is delay, interpreted in milliseconds.
A marquee element has a marquee scroll
distance, which, if the element has a scrollamount attribute, and
parsing its value using the rules for parsing non-negative
integers does not return an error, is the parsed value
interpreted in CSS pixels, and otherwise is 6 CSS pixels.
A marquee element has a marquee loop
count, which, if the element has a loop attribute, and parsing its
value using the rules for parsing integers does not
return an error or a number less than 1, is the parsed value, and
otherwise is −1.
The loop IDL
attribute, on getting, must return the element's marquee loop
count; and on setting, if the new value is different than the
element's marquee loop count and either greater than
zero or equal to −1, must set the element's loop content attribute (adding it
if necessary) to the valid integer that represents the
new value. (Other values are ignored.)
A marquee element also has a marquee current
loop index, which is zero when the element is created.
The rendering layer will occasionally increment the marquee current loop index, which must cause the following steps to be run:
If the marquee loop count is −1, then abort these steps.
Increment the marquee current loop index by one.
If the marquee current loop index is now equal to
or greater than the element's marquee loop count,
turn off the
marquee element and queue a task to
fire a simple event named finish at the marquee
element.
Otherwise, if the behavior attribute is in the
alternate
state, then queue a task to fire a simple
event named bounce at
the marquee element.
Otherwise, queue a task to fire a simple
event named start at the
marquee element.
The following are the event handlers (and their
corresponding event handler
event types) that must be supported, as content and IDL
attributes, by marquee elements:
| Event handler | Event handler event type |
|---|---|
onbounce | bounce
|
onfinish | finish
|
onstart | start
|
The behavior, direction, height, hspace, vspace, and width IDL attributes
must reflect the respective content attributes of the
same name.
The bgColor
IDL attribute must reflect the bgcolor content attribute.
The scrollAmount
IDL attribute must reflect the scrollamount content
attribute. The default value is 6.
The scrollDelay IDL
attribute must reflect the scrolldelay content
attribute. The default value is 85.
The trueSpeed IDL
attribute must reflect the truespeed content
attribute.
The frameset element acts as the
body element in documents that use frames.
The frameset element must implement the
HTMLFrameSetElement interface.
interface HTMLFrameSetElement : HTMLElement { attribute DOMString cols; attribute DOMString rows; 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 onpagehide; attribute Function onpageshow; attribute Function onpopstate; attribute Function onredo; attribute Function onresize; attribute Function onstorage; attribute Function onundo; attribute Function onunload; };
The cols and
rows IDL
attributes of the frameset element must
reflect the respective content attributes of the same
name.
The frameset element must support the following
event handler content attributes exposing the
event handlers of the Window object:
onafterprintonbeforeprintonbeforeunloadonbluronerroronfocusonhashchangeonloadonmessageonofflineononlineonpagehideonpageshowonpopstateonredoonresizeonstorageonundoonunloadThe DOM interface also exposes event handler IDL
attributes that mirror those on the Window
element.
The onblur, onerror, onfocus, and onload event handler IDL
attributes of the Window object, exposed on the
frameset element, shadow the generic event
handler IDL attributes with the same names normally supported
by HTML elements.
The frame element defines a nested
browsing context similar to the iframe element,
but rendered within a frameset element.
When the browsing context is created, if a src attribute is present, the user
agent must resolve the value of
that attribute, relative to the element, and if that is successful,
must then navigate the element's browsing context to
the resulting absolute URL, with replacement
enabled, and with the frame element's
document's browsing context as the source
browsing context.
Whenever the src attribute
is set, the user agent must resolve the value of that attribute, relative to the
element, and if that is successful, the nested browsing
context must be navigated to
the resulting absolute URL, with the
frame element's document's browsing
context as the source browsing context.
When the browsing context is created, if a name attribute is present, the
browsing context name must be set to the value of this
attribute; otherwise, the browsing context name must be
set to the empty string.
Whenever the name attribute
is set, the nested browsing context's name must be changed to the new
value. If the attribute is removed, the browsing context
name must be set to the empty string.
When content loads in a frame, after any load events are fired within the content
itself, the user agent must queue a task to fire
a simple event named load at
the frame element. When content fails to load (e.g. due
to a network error), then the user agent must queue a
task to fire a simple event named error at the element instead.
The task source for the tasks above is the DOM manipulation task source.
When there is an active parser in the
frame, and when anything in the frame is
delaying the load event of
the frame's browsing context's
active document, the frame must
delay the load event of its document.
The frame element must implement the
HTMLFrameElement interface.
interface HTMLFrameElement : HTMLElement { attribute DOMString frameBorder; attribute DOMString longDesc; attribute DOMString marginHeight; attribute DOMString marginWidth; attribute DOMString name; attribute boolean noResize; attribute DOMString scrolling; attribute DOMString src; readonly attribute Document contentDocument; };
The name, scrolling, and src IDL attributes of the
frame element must reflect the respective
content attributes of the same name.
The frameBorder IDL
attribute of the frame element must
reflect the element's frameborder content
attribute.
The longDesc
IDL attribute of the frame element must
reflect the element's longdesc content attribute.
The marginHeight IDL
attribute of the frame element must
reflect the element's marginheight content
attribute.
The marginWidth IDL
attribute of the frame element must
reflect the element's marginwidth content
attribute.
The noResize
IDL attribute of the frame element must
reflect the element's noresize content attribute.
The contentDocument
IDL attribute of the frame element must return the
Document object of the active document of
the frame element's nested browsing
context.
User agents must treat acronym elements in a manner
equivalent to abbr elements.
[Supplemental] interface HTMLAnchorElement { attribute DOMString coords; attribute DOMString charset; attribute DOMString name; attribute DOMString rev; attribute DOMString shape; };
The coords, charset, name, rev, and shape IDL attributes of the
a element must reflect the respective
content attributes of the same name.
[Supplemental] interface HTMLAreaElement { attribute boolean noHref; };
The noHref IDL
attribute of the area element must reflect
the element's nohref content
attribute.
The basefont element must implement the
HTMLBaseFontElement interface.
interface HTMLBaseFontElement : HTMLElement { attribute DOMString color; attribute DOMString face; attribute long size; };
The color,
face, and size IDL attributes of
the basefont element must reflect the
respective content attributes of the same name.
[Supplemental] interface HTMLBodyElement { attribute DOMString text; attribute DOMString bgColor; attribute DOMString background; attribute DOMString link; attribute DOMString vLink; attribute DOMString aLink; };
The text IDL
attribute of the body element must reflect
the element's text content
attribute.
The bgColor IDL
attribute of the body element must reflect
the element's bgcolor content
attribute.
The background IDL
attribute of the body element must reflect
the element's background
content attribute. (The background content is not
defined to contain a URL, despite rules regarding its
handling in the rendering section above.)
The link IDL
attribute of the body element must reflect
the element's link content
attribute.
The aLink IDL
attribute of the body element must reflect
the element's alink content
attribute.
The vLink IDL
attribute of the body element must reflect
the element's vlink content
attribute.
[Supplemental] interface HTMLBRElement { attribute DOMString clear; };
The clear IDL
attribute of the br element must reflect
the content attribute of the same name.
[Supplemental] interface HTMLTableCaptionElement { attribute DOMString align; };
The align IDL
attribute of the caption element must
reflect the content attribute of the same name.
[Supplemental] interface HTMLTableColElement { attribute DOMString align; attribute DOMString ch; attribute DOMString chOff; attribute DOMString vAlign; attribute DOMString width; };
The align and width IDL attributes of
the col element must reflect the
respective content attributes of the same name.
The ch IDL attribute
of the col element must reflect the
element's char content
attribute.
The chOff IDL
attribute of the col element must reflect
the element's charoff content
attribute.
The vAlign IDL
attribute of the col element must reflect
the element's valign content
attribute.
User agents must treat dir elements in a manner
equivalent to ul elements.
The dir element must implement the
HTMLDirectoryElement interface.
interface HTMLDirectoryElement : HTMLElement { attribute boolean compact; };
The compact IDL
attribute of the dir element must reflect
the content attribute of the same name.
[Supplemental] interface HTMLDivElement { attribute DOMString align; };
The align IDL
attribute of the div element must reflect
the content attribute of the same name.
[Supplemental] interface HTMLDListElement { attribute boolean compact; };
The compact IDL
attribute of the dl element must reflect
the content attribute of the same name.
[Supplemental] interface HTMLEmbedElement { attribute DOMString align; attribute DOMString name; };
The name and align IDL attributes of
the embed element must reflect the
respective content attributes of the same name.
The font element must implement the
HTMLFontElement interface.
interface HTMLFontElement : HTMLElement { attribute DOMString color; attribute DOMString face; attribute DOMString size; };
The color,
face, and size IDL attributes of
the font element must reflect the
respective content attributes of the same name.
[Supplemental] interface HTMLHeadingElement { attribute DOMString align; };
The align IDL
attribute of the h1–h6 elements must
reflect the content attribute of the same name.
[Supplemental] interface HTMLHeadElement { attribute DOMString profile; };
User agents should ignore the profile content attribute on
head elements.
When the attribute would be used as a list of URLs identifying metadata profiles, the user agent should instead always assume that all known profiles apply to all pages, and should therefore apply the conventions of all known metadata profiles to the document, ignoring the value of the attribute.
When the attribute's value would be handled as a list of URLs to be dereferenced, the user agent must use the following steps:
Split on
spaces the value of the profile attribute.
For each token that is successfully resolved, fetch the resulting absolute URL and apply the appropriate processing.
The profile IDL
attribute of the head element must reflect
the content attribute of the same name, as if the attribute's value
was just a string. (In other words, the value is not resolved in any way on getting.)
[Supplemental] interface HTMLHRElement { attribute DOMString align; attribute DOMString color; attribute boolean noShade; attribute DOMString size; attribute DOMString width; };
The align, color, size, and width IDL attributes of the
hr element must reflect the respective
content attributes of the same name.
The noShade IDL
attribute of the hr element must reflect
the element's noshade
content attribute.
[Supplemental] interface HTMLHtmlElement { attribute DOMString version; };
The version IDL
attribute of the html element must reflect
the content attribute of the same name.
[Supplemental] interface HTMLIFrameElement { attribute DOMString align; attribute DOMString frameBorder; attribute DOMString longDesc; attribute DOMString marginHeight; attribute DOMString marginWidth; attribute DOMString scrolling; };
The align and
scrolling IDL
attributes of the iframe element must
reflect the respective content attributes of the same
name.
The frameBorder IDL
attribute of the iframe element must
reflect the element's frameborder content
attribute.
The longDesc
IDL attribute of the iframe element must
reflect the element's longdesc content attribute.
The marginHeight IDL
attribute of the iframe element must
reflect the element's marginheight content
attribute.
The marginWidth IDL
attribute of the iframe element must
reflect the element's marginwidth content
attribute.
[Supplemental] interface HTMLImageElement { attribute DOMString name; attribute DOMString align; attribute DOMString border; attribute unsigned long hspace; attribute DOMString longDesc; attribute unsigned long vspace; };
The name, align, border, hspace, and vspace IDL attributes of
the img element must reflect the
respective content attributes of the same name.
The longDesc IDL
attribute of the img element must reflect
the element's longdesc content
attribute.
[Supplemental] interface HTMLInputElement { attribute DOMString align; attribute DOMString useMap; };
The align IDL
attribute of the input element must reflect
the content attribute of the same name.
The useMap IDL
attribute of the input element must
reflect the element's usemap content attribute.
[Supplemental] interface HTMLLegendElement { attribute DOMString align; };
The align IDL
attribute of the legend element must reflect
the content attribute of the same name.
[Supplemental] interface HTMLLIElement { attribute DOMString type; };
The type IDL
attribute of the li element must reflect
the content attribute of the same name.
[Supplemental] interface HTMLLinkElement { attribute DOMString charset; attribute DOMString rev; attribute DOMString target; };
The charset,
rev, and target IDL attributes of
the link element must reflect the
respective content attributes of the same name.
User agents must treat listing elements in a manner
equivalent to pre elements.
[Supplemental] interface HTMLMenuElement { attribute boolean compact; };
The compact IDL
attribute of the menu element must reflect
the content attribute of the same name.
[Supplemental] interface HTMLMetaElement { attribute DOMString scheme; };
User agents may treat the scheme content attribute on the
meta element as an extension of the element's name content attribute when processing
a meta element with a name attribute whose value is one that
the user agent recognizes as supporting the scheme attribute.
User agents are encouraged to ignore the scheme attribute and instead process
the value given to the metadata name as if it had been specified for
each expected value of the scheme attribute.
For example, if the user agent acts on meta
elements with name attributes
having the value "eGMS.subject.keyword", and knows that the scheme attribute is used with this
metadata name, then it could take the scheme attribute into account,
acting as if it was an extension of the name attribute. Thus the following
two meta elements could be treated as two elements
giving values for two different metadata names, one consisting of a
combination of "eGMS.subject.keyword" and "LGCL", and the other
consisting of a combination of "eGMS.subject.keyword" and
"ORLY":
<!-- this markup is invalid --> <meta name="eGMS.subject.keyword" scheme="LGCL" content="Abandoned vehicles"> <meta name="eGMS.subject.keyword" scheme="ORLY" content="Mah car: kthxbye">
The recommended processing of this markup, however, would be equivalent to the following:
<meta name="eGMS.subject.keyword" content="Abandoned vehicles"> <meta name="eGMS.subject.keyword" content="Mah car: kthxbye">
The scheme IDL
attribute of the meta element must reflect
the content attribute of the same name.
[Supplemental] interface HTMLObjectElement { attribute DOMString align; attribute DOMString archive; attribute DOMString border; attribute DOMString code; attribute DOMString codeBase; attribute DOMString codeType; attribute boolean declare; attribute unsigned long hspace; attribute DOMString standby; attribute unsigned long vspace; };
The align, archive, border, code, declare, hspace, standby, and vspace IDL attributes
of the object element must reflect the
respective content attributes of the same name.
The codeBase IDL
attribute of the object element must reflect
the element's codebase content
attribute.
The codeType IDL
attribute of the object element must reflect
the element's codetype content
attribute.
[Supplemental] interface HTMLOListElement { attribute boolean compact; attribute DOMString type; };
The compact and
type IDL attributes of
the ol element must reflect the respective
content attributes of the same name.
[Supplemental] interface HTMLParagraphElement { attribute DOMString align; };
The align IDL
attribute of the p element must reflect
the content attribute of the same name.
[Supplemental] interface HTMLParamElement { attribute DOMString type; attribute DOMString valueType; };
The type IDL
attribute of the param element must
reflect the content attribute of the same name.
The valueType
IDL attribute of the param element must
reflect the element's valuetype content attribute.
User agents must treat plaintext elements in a
manner equivalent to pre elements.
[Supplemental] interface HTMLPreElement { attribute unsigned long width; };
The width IDL
attribute of the pre element must reflect
the content attribute of the same name.
[Supplemental] interface HTMLScriptElement { attribute DOMString event; attribute DOMString htmlFor; };
The event and
htmlFor IDL
attributes of the script element must return the empty
string on getting, and do nothing on setting.
[Supplemental] interface HTMLTableElement { attribute DOMString align; attribute DOMString bgColor; attribute DOMString border; attribute DOMString cellPadding; attribute DOMString cellSpacing; attribute DOMString frame; attribute DOMString rules; attribute DOMString width; };
The align, border, frame, rules, and width, IDL attributes of
the table element must reflect the
respective content attributes of the same name.
The bgColor IDL
attribute of the table element must reflect
the element's bgcolor content
attribute.
The cellPadding IDL
attribute of the table element must reflect
the element's cellpadding content
attribute.
The cellSpacing IDL
attribute of the table element must reflect
the element's cellspacing content
attribute.
[Supplemental] interface HTMLTableSectionElement { attribute DOMString align; attribute DOMString ch; attribute DOMString chOff; attribute DOMString vAlign; };
The align IDL
attribute of the tbody, thead, and
tfoot elements must reflect the content
attribute of the same name.
The ch IDL attribute
of the tbody, thead, and
tfoot elements must reflect the elements'
char content attributes.
The chOff IDL
attribute of the tbody, thead, and
tfoot elements must reflect the elements'
charoff content attributes.
The vAlign IDL
attribute of the tbody, thead, and
tfoot element must reflect the elements'
valign content
attributes.
[Supplemental] interface HTMLTableCellElement { attribute DOMString abbr; attribute DOMString align; attribute DOMString axis; attribute DOMString bgColor; attribute DOMString ch; attribute DOMString chOff; attribute DOMString height; attribute boolean noWrap; attribute DOMString vAlign; attribute DOMString width; };
The abbr, align, axis, height, and width IDL attributes of
the td and th elements must
reflect the respective content attributes of the same
name.
The bgColor IDL
attribute of the td and th elements must
reflect the elements' bgcolor content attributes.
The ch IDL
attribute of the td and th elements must
reflect the elements' char content attributes.
The chOff IDL
attribute of the td and th elements must
reflect the elements' charoff content attributes.
The noWrap IDL
attribute of the td and th elements must
reflect the elements' nowrap content attributes.
The vAlign IDL
attribute of the td and th element must
reflect the elements' valign content attributes.
[Supplemental] interface HTMLTableRowElement { attribute DOMString align; attribute DOMString bgColor; attribute DOMString ch; attribute DOMString chOff; attribute DOMString vAlign; };
The align IDL
attribute of the tr element must reflect
the content attribute of the same name.
The bgColor IDL
attribute of the tr element must reflect
the element's bgcolor content
attribute.
The ch IDL attribute of
the tr element must reflect the element's
char content attribute.
The chOff IDL
attribute of the tr element must reflect
the element's charoff content
attribute.
The vAlign IDL
attribute of the tr element must reflect
the element's valign content
attribute.
[Supplemental] interface HTMLUListElement { attribute boolean compact; attribute DOMString type; };
The compact and
type IDL attributes of
the ul element must reflect the respective
content attributes of the same name.
User agents must treat xmp elements in a manner
equivalent to pre elements.
The bgsound, isindex,
multicol, nextid, rb, and
spacer elements must use the
HTMLUnknownElement interface.
[Supplemental] interface HTMLDocument { attribute DOMString fgColor; attribute DOMString bgColor; attribute DOMString linkColor; attribute DOMString vlinkColor; attribute DOMString alinkColor; readonly attribute HTMLCollection anchors; readonly attribute HTMLCollection applets; void clear(); readonly attribute HTMLAllCollection all; };
The attributes of the Document object listed in the
first column of the following table must reflect the
content attribute on the body element with the name
given in the corresponding cell in the second column on the same
row, if the body element is a body element
(as opposed to a frameset element). When there is no
body element or if it is a
frameset element, the attributes must instead return
the empty string on getting and do nothing on setting.
| IDL attribute | Content attribute |
|---|---|
fgColor
| text
|
bgColor
| bgcolor
|
linkColor
| link
|
vLinkColor
| vlink
|
aLinkColor
| alink
|
The anchors
attribute must return an HTMLCollection rooted at the
Document node, whose filter matches only a
elements with name
attributes.
The applets
attribute must return an HTMLCollection rooted at the
Document node, whose filter matches only
applet elements.
The clear()
method must do nothing.
The all
attribute must return an HTMLAllCollection rooted at the
Document node, whose filter matches all elements.
The object returned for all
has several unusual behaviors:
The user agent must act as if the ToBoolean() operator in
JavaScript converts the object returned for all to the false value.
The user agent must act as if, for the purposes of the == and != operators in
JavaScript, the object returned for all is equal to the undefined value.
The user agent must act such that the typeof operator in JavaScript returns the string
undefined when applied to the object returned
for all.
These requirements are a willful
violation of the JavaScript specification current at the time
of writing (ECMAScript edition 3). The JavaScript specification
requires that the ToBoolean() operator convert all objects to the
true value, and does not have provisions for objects acting as if
they were undefined for the purposes of
certain operators. This violation is motivated by a desire for
compatibility with two classes of legacy content: one that uses the
presence of document.all as a
way to detect legacy user agents, and one that only supports those
legacy user agents and uses the document.all object without testing
for its presence first. [ECMA262]