No subject


Mon Jan 28 08:41:14 PST 2013


+  scripts in the SVG resource, the SVG file would appear to be in a lone=
 top-level browsing context
+  with no parent.</p>
+
+  <hr><p>If a hostile page embeds victim content, the threat=
 is that the embedding page could obtain
+  information from the content that it would not otherwise have access t=
o. The API does expose some
+  information: the existence of the media, its type, its duration, its s=
ize, and the performance
+  characteristics of its host. Such information is already potentially p=
roblematic, but in practice
+  the same information can more or less be obtained using the <code&g=
t;<a href=3D#the-img-element>img</a></code> element, an=
d so it
+  has been deemed acceptable.</p>
+
+  <p>However, significantly more sensitive information could be ob=
tained if the user agent further
+  exposes metadata within the content such as subtitles or chapter title=
s. Such information is
+  therefore only exposed if the video resource passes a CORS <a href=3D=
#resource-sharing-check>resource sharing check</a>.
+  The <code title=3Dattr-media-crossorigin><a href=3D#attr-medi=
a-crossorigin>crossorigin</a></code> attribute allows auth=
ors to control
+  how this check is performed. <a href=3D#refsCORS>[CORS]</a&gt=
;</p>
+
+  <p class=3Dexample>Without this restriction, an attacker could t=
rick a user running within a
+  corporate network into visiting a site that attempts to load a video f=
rom a previously leaked
+  location on the corporation's intranet. If such a video included confi=
dential plans for a new
+  product, then being able to read the subtitles would present a serious=
 confidentiality breach.</p>
+
+  </div>
+<!--REMOVE-TOPIC:Security-->
+
+
+  <h5 id=3Dbest-practices-for-authors-using-media-elements><spa=
n class=3Dsecno>4.7.10.18 </span>Best practices for authors usin=
g media elements</h5>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <p>Playing audio and video resources on small devices such as se=
t-top boxes or mobile phones is
+  often constrained by limited hardware resources in the device. For exa=
mple, a device might only
+  support three simultaneous videos. For this reason, it is a good pract=
ice to release resources
+  held by <a href=3D#media-element title=3D"media element"&=
gt;media elements</a> when they are done playing, either by
+  being very careful about removing all references to the element and al=
lowing it to be garbage
+  collected, or, even better, by removing the element's <code title=3D=
attr-media-src><a href=3D#attr-media-src>src</a></code&=
gt;
+  attribute and any <code><a href=3D#the-source-element>sour=
ce</a></code> element descendants, and invoking the element's=
 <code title=3Ddom-media-load><a href=3D#dom-media-load>load(=
)</a></code> method.</p>
+
+  <p>Similarly, when the playback rate is not exactly 1.0, hardwar=
e, software, or format limitations
+  can cause video frames to be dropped and audio to be choppy or muted.&=
lt;/p>
+
+
+  <div class=3Dimpl>
+
+  <h5 id=3Dbest-practices-for-implementors-of-media-elements><s=
pan class=3Dsecno>4.7.10.19 </span>Best practices for implemento=
rs of media elements</h5>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <p>How accurately various aspects of the <a href=3D#media-ele=
ment>media element</a> API are implemented is
+  considered a quality-of-implementation issue.</p>
+
+  <p>For example, when implementing the <code title=3Dattr-medi=
a-buffered>buffered</code> attribute,
+  how precise an implementation reports the ranges that have been buffer=
ed depends on how carefully
+  the user agent inspects the data. Since the API reports ranges as time=
s, but the data is obtained
+  in byte streams, a user agent receiving a variable-bit-rate stream mig=
ht only be able to determine
+  precise times by actually decoding all of the data. User agents aren't=
 required to do this,
+  however; they can instead return estimates (e.g. based on the average =
bit rate seen so far) which
+  get revised as more information becomes available.</p>
+
+  <p>As a general rule, user agents are urged to be conservative r=
ather than optimistic. For
+  example, it would be bad to report that everything had been buffered w=
hen it had not.</p>
+
+  <p>Another quality-of-implementation issue would be playing a vi=
deo backwards when the codec is
+  designed only for forward playback (e.g. there aren't many key frames,=
 and they are far apart, and
+  the intervening frames only have deltas from the previous frame). User=
 agents could do a poor job,
+  e.g. only showing key frames; however, better implementations would do=
 more work and thus do a
+  better job, e.g. actually decoding parts of the video forwards, storin=
g the complete frames, and
+  then playing the frames backwards.</p>
+
+  <p>Similarly, while implementations are allowed to drop buffered=
 data at any time (there is no
+  requirement that a user agent keep all the media data obtained for the=
 lifetime of the media
+  element), it is again a quality of implementation issue: user agents w=
ith sufficient resources to
+  keep all the data around are encouraged to do so, as this allows for a=
 better user experience. For
+  example, if the user is watching a live stream, a user agent could all=
ow the user only to view the
+  live video; however, a better user agent would buffer everything and a=
llow the user to seek
+  through the earlier material, pause it, play it forwards and backwards=
, etc.</p>
+
+  <p>When multiple tracks are synchronised with a <code><=
a href=3D#mediacontroller>MediaController</a></code>, it i=
s possible for
+  scripts to add and remove media elements from the <code><a hr=
ef=3D#mediacontroller>MediaController</a></code>'s list of
+  <a href=3D#slaved-media-elements>slaved media elements</a>=
, even while these tracks are playing. How smoothly the media
+  plays back in such situations is another quality-of-implementation iss=
ue.</p>
+
+  <hr><p>When a <a href=3D#media-element>media element=
</a> that is paused is <a href=3D#remove-an-element-from-a-docum=
ent title=3D"remove an element from a
+  document">removed from a document</a> and not reinserted=
 before the next time the <a href=3D#event-loop>event
+  loop</a> spins, implementations that are resource constrained ar=
e encouraged to take that
+  opportunity to release all hardware resources (like video planes, netw=
orking resources, and data
+  buffers) used by the <a href=3D#media-element>media element</=
a>. (User agents still have to keep track of the
+  playback position and so forth, though, in case playback is later rest=
arted.)</p>
+
+  </div>
+ =20
+
+
+  <h4 id=3Dthe-map-element><span class=3Dsecno>4.7.11 </s=
pan>The <dfn><code>map</code></dfn> element&lt=
;/h4>
+
+  <dl class=3Delement><dt><a href=3D#element-dfn-categori=
es title=3Delement-dfn-categories>Categories</a>:</dt>
+   <dd><a href=3D#flow-content>Flow content</a>.</d=
d>
+   <dd><a href=3D#phrasing-content>Phrasing content</a&gt=
;.</dd>
+   <dd><a href=3D#palpable-content>Palpable content</a&gt=
;.</dd>
+   <dt><a href=3D#element-dfn-contexts title=3Delement-dfn-cont=
exts>Contexts in which this element can be used</a>:</dt>
+   <dd>Where <a href=3D#phrasing-content>phrasing content&lt=
;/a> is expected.</dd>
+   <dt><a href=3D#element-dfn-content-model title=3Delement-dfn=
-content-model>Content model</a>:</dt>
+   <dd><a href=3D#transparent>Transparent</a>.</dd&=
gt;
+   <dt><a href=3D#element-dfn-tag-omission title=3Delement-dfn-=
tag-omission>Tag omission in text/html</a>:</dt>
+   <dd>Neither tag is omissible.</dd>
+   <dt><a href=3D#element-dfn-attributes title=3Delement-dfn-at=
tributes>Content attributes</a>:</dt>
+   <dd><a href=3D#global-attributes>Global attributes</a&=
gt;</dd>
+   <dd><code title=3Dattr-map-name><a href=3D#attr-map-na=
me>name</a></code> — Name of <a href=3D#image=
-map>image map</a> to reference from the <code title=3Dattr-h=
yperlink-usemap><a href=3D#attr-hyperlink-usemap>usemap</a&gt=
;</code> attribute</dd>
+   <dt><a href=3D#element-dfn-dom title=3Delement-dfn-dom>DO=
M interface</a>:</dt><!--TOPIC:DOM APIs-->
+   <dd>
+<pre class=3Didl>interface <dfn id=3Dhtmlmapelement>HTMLMapE=
lement</dfn> : <a href=3D#htmlelement>HTMLElement</a> {
+           attribute DOMString <a href=3D#dom-map-name title=3Ddom-ma=
p-name>name</a>;
+  readonly attribute <a href=3D#htmlcollection>HTMLCollection</=
a> <a href=3D#dom-map-areas title=3Ddom-map-areas>areas</a&gt=
;;
+  readonly attribute <a href=3D#htmlcollection>HTMLCollection</=
a> <a href=3D#dom-map-images title=3Ddom-map-images>images</a=
>;
+};</pre>
+   </dd>
+  </dl><!--TOPIC:HTML--><p>The <code><a href=3D=
#the-map-element>map</a></code> element, in conjunction wi=
th an <code><a href=3D#the-img-element>img</a></code=
> element and any
+  <code><a href=3D#the-area-element>area</a></code&=
gt; element descendants, defines an <a href=3D#image-map>image map&=
lt;/a>. The element
+  <a href=3D#represents>represents</a> its children.</p&g=
t;
+
+  <p>The <dfn id=3Dattr-map-name title=3Dattr-map-name><c=
ode>name</code></dfn> attribute gives the map a name so th=
at
+  it can be referenced. The attribute must be present and must have a no=
n-empty value with no <a href=3D#space-character title=3D"space c=
haracter">space characters</a>. The value of the <code t=
itle=3Dattr-map-name><a href=3D#attr-map-name>name</a><=
/code> attribute must not be a <a href=3D#compatibility-caseless ti=
tle=3D"compatibility
+  caseless">compatibility-caseless</a> match for the value=
 of the <code title=3Dattr-map-name><a href=3D#attr-map-name>=
name</a></code> attribute of another <code><a href=3D=
#the-map-element>map</a></code> element in the same
+  document. If the <code title=3Dattr-id><a href=3D#the-id-attr=
ibute>id</a></code> attribute is also specified, both attr=
ibutes must
+  have the same value.</p>
+
+<!--TOPIC:DOM APIs-->
+  <dl class=3Ddomintro><dt><var title=3D"">m=
ap</var> . <code title=3Ddom-map-areas><a href=3D#dom-map-=
areas>areas</a></code></dt>
+
+   <dd>
+
+    <p>Returns an <code><a href=3D#htmlcollection>HTML=
Collection</a></code> of the <code><a href=3D#the-ar=
ea-element>area</a></code> elements in the
+    <code><a href=3D#the-map-element>map</a></code&=
gt;.</p>
+
+   </dd>
+
+   <dt><var title=3D"">map</var> . <code =
title=3Ddom-map-images><a href=3D#dom-map-images>images</a&gt=
;</code></dt>
+
+   <dd>
+
+    <p>Returns an <code><a href=3D#htmlcollection>HTML=
Collection</a></code> of the <code><a href=3D#the-im=
g-element>img</a></code> and <code><a href=3D#the=
-object-element>object</a></code>
+    elements that use the <code><a href=3D#the-map-element>m=
ap</a></code>.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-map-areas title=3Ddom-map-areas><c=
ode>areas</code></dfn> attribute must return an
+  <code><a href=3D#htmlcollection>HTMLCollection</a>&l=
t;/code> rooted at the <code><a href=3D#the-map-element>ma=
p</a></code> element, whose filter matches only
+  <code><a href=3D#the-area-element>area</a></code&=
gt; elements.</p>
+
+  <p>The <dfn id=3Ddom-map-images title=3Ddom-map-images>&lt=
;code>images</code></dfn> attribute must return an
+  <code><a href=3D#htmlcollection>HTMLCollection</a>&l=
t;/code> rooted at the <code><a href=3D#document>Document&=
lt;/a></code> node, whose filter matches only
+  <code><a href=3D#the-img-element>img</a></code&gt=
; and <code><a href=3D#the-object-element>object</a>&lt=
;/code> elements that are associated with this <code><a href=3D=
#the-map-element>map</a></code>
+  element according to the <a href=3D#image-map>image map</a&gt=
; processing model.</p>
+
+  <p>The IDL attribute <dfn id=3Ddom-map-name title=3Ddom-map-n=
ame><code>name</code></dfn> must <a href=3D#refle=
ct>reflect</a>
+  the content attribute of the same name.</p>
+
+  </div>
+<!--TOPIC:HTML-->
+
+  <div class=3Dexample>
+
+   <p>Image maps can be defined in conjunction with other content =
on the page, to ease maintenance.
+   This example is of a page with an image map at the top of the page an=
d a corresponding set of
+   text links at the bottom.</p>
+
+   <pre><!DOCTYPE HTML>
+<TITLE>Babies™: Toys</TITLE>
+<HEADER>
+ <H1>Toys</H1>
+ <IMG SRC=3D"/images/menu.gif"
+      ALT=3D"Babies™ navigation menu. Select a department=
 to go to its page."
+      USEMAP=3D"#NAV">
+</HEADER>
+ ...
+<FOOTER>
+ <MAP NAME=3D"NAV">
+  <P>
+   <A HREF=3D"/clothes/">Clothes</A&g=
t;
+   <AREA ALT=3D"Clothes" COORDS=3D"0,0,100,50&quot=
; HREF=3D"/clothes/"> |
+   <A HREF=3D"/toys/">Toys</A>
+   <AREA ALT=3D"Toys" COORDS=3D"0,0,100,50" H=
REF=3D"/toys/"> |
+   <A HREF=3D"/food/">Food</A>
+   <AREA ALT=3D"Food" COORDS=3D"0,0,100,50" H=
REF=3D"/food/"> |
+   <A HREF=3D"/books/">Books</A>
+   <AREA ALT=3D"Books" COORDS=3D"0,0,100,50" =
HREF=3D"/books/">
+ </MAP>
+</FOOTER></pre>
+
+  </div>
+
+
+
+  <h4 id=3Dthe-area-element><span class=3Dsecno>4.7.12 </=
span>The <dfn><code>area</code></dfn> element&=
lt;/h4>
+
+  <dl class=3Delement><dt><a href=3D#element-dfn-categori=
es title=3Delement-dfn-categories>Categories</a>:</dt>
+   <dd><a href=3D#flow-content>Flow content</a>.</d=
d>
+   <dd><a href=3D#phrasing-content>Phrasing content</a&gt=
;.</dd>
+   <dt><a href=3D#element-dfn-contexts title=3Delement-dfn-cont=
exts>Contexts in which this element can be used</a>:</dt>
+   <dd>Where <a href=3D#phrasing-content>phrasing content&lt=
;/a> is expected, but only if there is a <code><a href=3D#the=
-map-element>map</a></code> element ancestor or a <code=
><a href=3D#the-template-element>template</a></code>=
 element ancestor.</dd>
+   <dt><a href=3D#element-dfn-content-model title=3Delement-dfn=
-content-model>Content model</a>:</dt>
+   <dd>Empty.</dd>
+   <dt><a href=3D#element-dfn-tag-omission title=3Delement-dfn-=
tag-omission>Tag omission in text/html</a>:</dt>
+   <dd>No <a href=3D#syntax-end-tag title=3Dsyntax-end-tag>e=
nd tag</a>.</dd>
+   <dt><a href=3D#element-dfn-attributes title=3Delement-dfn-at=
tributes>Content attributes</a>:</dt>
+   <dd><a href=3D#global-attributes>Global attributes</a&=
gt;</dd>
+   <dd><code title=3Dattr-area-alt><a href=3D#attr-area-a=
lt>alt</a></code> — Replacement text for use whe=
n images are not available</dd>
+   <dd><code title=3Dattr-area-coords><a href=3D#attr-are=
a-coords>coords</a></code> — Coordinates for the=
 shape to be created in an <a href=3D#image-map>image map</a>=
</dd>
+   <dd><code title=3Dattr-area-shape><a href=3D#attr-area=
-shape>shape</a></code> — The kind of shape to b=
e created in an <a href=3D#image-map>image map</a></dd>
+   <dd><code title=3Dattr-hyperlink-href><a href=3D#attr-=
hyperlink-href>href</a></code> — Address of the =
<a href=3D#hyperlink>hyperlink</a></dd>
+   <dd><code title=3Dattr-hyperlink-target><a href=3D#att=
r-hyperlink-target>target</a></code> — <a hre=
f=3D#browsing-context>Browsing context</a> for <a href=3D#hyp=
erlink>hyperlink</a> <a href=3D#navigate title=3Dnavigate>=
navigation</a></dd>
+   <dd><code title=3Dattr-hyperlink-download><a href=3D#a=
ttr-hyperlink-download>download</a></code> — Whe=
ther to download the resource instead of navigating to it, and its file n=
ame if so</dd>
+   <dd><code title=3Dattr-hyperlink-ping><a href=3D#ping&=
gt;ping</a></code> — <a href=3D#url title=3DURL&=
gt;URLs</a> to ping</dd>
+   <dd><code title=3Dattr-hyperlink-rel><a href=3D#attr-h=
yperlink-rel>rel</a></code> — Relationship betwe=
en the document containing the hyperlink and the destination resource<=
/dd>
+   <dd><code title=3Dattr-hyperlink-hreflang><a href=3D#a=
ttr-hyperlink-hreflang>hreflang</a></code> — Lan=
guage of the linked resource</dd>
+   <dd><code title=3Dattr-hyperlink-type><a href=3D#attr-=
hyperlink-type>type</a></code> — Hint for the ty=
pe of the referenced resource</dd>
+   <dt><a href=3D#element-dfn-dom title=3Delement-dfn-dom>DO=
M interface</a>:</dt><!--TOPIC:DOM APIs-->
+   <dd>
+<pre class=3Didl>interface <dfn id=3Dhtmlareaelement>HTMLAre=
aElement</dfn> : <a href=3D#htmlelement>HTMLElement</a>=
 {
+           attribute DOMString <a href=3D#dom-area-alt title=3Ddom-ar=
ea-alt>alt</a>;
+           attribute DOMString <a href=3D#dom-area-coords title=3Ddom=
-area-coords>coords</a>;
+           attribute DOMString <a href=3D#dom-area-shape title=3Ddom-=
area-shape>shape</a>;
+           attribute DOMString <a href=3D#dom-area-target title=3Ddom=
-area-target>target</a>;
+           attribute DOMString <a href=3D#dom-area-download title=3Dd=
om-area-download>download</a>;
+           attribute DOMString <a href=3D#dom-area-ping title=3Ddom-a=
rea-ping>ping</a>;
+           attribute DOMString <a href=3D#dom-area-rel title=3Ddom-ar=
ea-rel>rel</a>;
+  readonly attribute <a href=3D#domtokenlist>DOMTokenList</a&gt=
; <a href=3D#dom-area-rellist title=3Ddom-area-relList>relList</=
a>;
+           attribute DOMString <a href=3D#dom-area-hreflang title=3Dd=
om-area-hreflang>hreflang</a>;
+           attribute DOMString <a href=3D#dom-area-type title=3Ddom-a=
rea-type>type</a>;
+
+  // <a href=3D"#HTMLAreaElement-partial">also has obsol=
ete members</a>
+};
+<a href=3D#htmlareaelement>HTMLAreaElement</a> implements &l=
t;a href=3D#urlutils>URLUtils</a>;</pre>
+   </dd>
+  </dl><!--TOPIC:HTML--><p>The <code><a href=3D=
#the-area-element>area</a></code> element <a href=3D#re=
presents>represents</a> either a hyperlink with some text and a
+  corresponding area on an <a href=3D#image-map>image map</a&gt=
;, or a dead area on an image map.</p>
+
+  <p>An <code><a href=3D#the-area-element>area</a&g=
t;</code> element with a parent node must have a <code><a =
href=3D#the-map-element>map</a></code> element ancestor
+  or a <code><a href=3D#the-template-element>template</a&=
gt;</code> element ancestor.</p>
+
+  <p>If the <code><a href=3D#the-area-element>area<=
/a></code> element has an <code title=3Dattr-hyperlink-href&g=
t;<a href=3D#attr-hyperlink-href>href</a></code>
+  attribute, then the <code><a href=3D#the-area-element>area=
</a></code> element represents a <a href=3D#hyperlink>h=
yperlink</a>. In this case,
+  the <dfn id=3Dattr-area-alt title=3Dattr-area-alt><code>al=
t</code></dfn> attribute must be present. It specifies the
+  text of the hyperlink. Its value must be text that, when presented wit=
h the texts specified for
+  the other hyperlinks of the <a href=3D#image-map>image map</a=
>, and with the alternative text of the image,
+  but without the image itself, provides the user with the same kind of =
choice as the hyperlink
+  would when used without its text but with its shape applied to the ima=
ge. The <code title=3Dattr-area-alt><a href=3D#attr-area-alt>=
alt</a></code> attribute may be left blank if there is anothe=
r <code><a href=3D#the-area-element>area</a></code&g=
t;
+  element in the same <a href=3D#image-map>image map</a> tha=
t points to the same resource and has a non-blank
+  <code title=3Dattr-area-alt><a href=3D#attr-area-alt>alt&l=
t;/a></code> attribute.</p>
+
+  <p>If the <code><a href=3D#the-area-element>area<=
/a></code> element has no <code title=3Dattr-hyperlink-href&g=
t;<a href=3D#attr-hyperlink-href>href</a></code>
+  attribute, then the area represented by the element cannot be selected=
, and the <code title=3Dattr-area-alt><a href=3D#attr-area-alt&g=
t;alt</a></code> attribute must be omitted.</p>
+
+  <p>In both cases, the <code title=3Dattr-area-shape><a =
href=3D#attr-area-shape>shape</a></code> and <code titl=
e=3Dattr-area-coords><a href=3D#attr-area-coords>coords</a&gt=
;</code> attributes specify the area.</p>
+
+  <p>The <dfn id=3Dattr-area-shape title=3Dattr-area-shape>&=
lt;code>shape</code></dfn> attribute is an <a href=3D#e=
numerated-attribute>enumerated
+  attribute</a>. The following table lists the keywords defined fo=
r this attribute. The states
+  given in the first cell of the rows with keywords give the states to w=
hich those keywords map.
+  <span class=3Dimpl>Some of the keywords are non-conforming, as n=
oted in the last
+  column.</span></p>
+
+  <table><thead><tr><th>State
+     <th>Keywords
+     <th class=3Dimpl>Notes
+   <tbody><tr><td rowspan=3D2><a href=3D#attr-area-=
shape-circle title=3Dattr-area-shape-circle>Circle state</a>
+     <td><dfn id=3Dattr-area-shape-keyword-circle title=3Dattr-=
area-shape-keyword-circle><code>circle</code></dfn>
+     <td class=3Dimpl>
+    <tr><td class=3Dimpl><dfn id=3Dattr-area-shape-keywor=
d-circ title=3Dattr-area-shape-keyword-circ><code>circ</code&=
gt;</dfn>
+     <td class=3Dimpl>Non-conforming
+    <tr><td><a href=3D#attr-area-shape-default title=3Dat=
tr-area-shape-default>Default state</a>
+     <td><dfn id=3Dattr-area-shape-keyword-default title=3Dattr=
-area-shape-keyword-default><code>default</code></dfn&g=
t;
+     <td class=3Dimpl>
+    <tr><td rowspan=3D2><a href=3D#attr-area-shape-poly t=
itle=3Dattr-area-shape-poly>Polygon state</a>
+     <td><dfn id=3Dattr-area-shape-keyword-poly title=3Dattr-ar=
ea-shape-keyword-poly><code>poly</code></dfn>
+     <td class=3Dimpl>
+    <tr><td class=3Dimpl><dfn id=3Dattr-area-shape-keywor=
d-polygon title=3Dattr-area-shape-keyword-polygon><code>polygon&=
lt;/code></dfn>
+     <td class=3Dimpl>Non-conforming
+    <tr><td rowspan=3D2><a href=3D#attr-area-shape-rect t=
itle=3Dattr-area-shape-rect>Rectangle state</a>
+     <td><dfn id=3Dattr-area-shape-keyword-rect title=3Dattr-ar=
ea-shape-keyword-rect><code>rect</code></dfn>
+     <td class=3Dimpl>
+    <tr><td class=3Dimpl><dfn id=3Dattr-area-shape-keywor=
d-rectangle title=3Dattr-area-shape-keyword-rectangle><code>rect=
angle</code></dfn>
+     <td class=3Dimpl>Non-conforming
+  </table><p>The attribute may be omitted. The <i>miss=
ing value default</i> is the <a href=3D#attr-area-shape-rect tit=
le=3Dattr-area-shape-rect>rectangle</a> state.</p>
+
+  <p>The <dfn id=3Dattr-area-coords title=3Dattr-area-coords&gt=
;<code>coords</code></dfn> attribute must, if specified=
,
+  contain a <a href=3D#valid-list-of-integers>valid list of intege=
rs</a>. This attribute gives the coordinates for the shape
+  described by the <code title=3Dattr-area-shape><a href=3D#att=
r-area-shape>shape</a></code> attribute. <span class=3D=
impl>The
+  processing for this attribute is described as part of the <a href=3D=
#image-map>image map</a> processing
+  model.</span></p>
+
+  <!-- v2: It was suggested by John S. Urban that coords should suppo=
rt percentages as well as
+  pixels, so that one could use the same image map for images of various=
 sizes. -->
+
+  <p>In the <dfn id=3Dattr-area-shape-circle title=3Dattr-area-=
shape-circle>circle state</dfn>, <code><a href=3D#the-a=
rea-element>area</a></code> elements must
+  have a <code title=3Dattr-area-coords><a href=3D#attr-area-co=
ords>coords</a></code> attribute present, with three integ=
ers, the
+  last of which must be non-negative. The first integer must be the dist=
ance in CSS pixels from the
+  left edge of the image to the center of the circle, the second integer=
 must be the distance in CSS
+  pixels from the top edge of the image to the center of the circle, and=
 the third integer must be
+  the radius of the circle, again in CSS pixels.</p>
+
+  <p>In the <dfn id=3Dattr-area-shape-default title=3Dattr-area=
-shape-default>default state</dfn> state, <code><a href=
=3D#the-area-element>area</a></code>
+  elements must not have a <code title=3Dattr-area-coords><a hr=
ef=3D#attr-area-coords>coords</a></code> attribute. (The a=
rea is the
+  whole image.)</p>
+
+  <p>In the <dfn id=3Dattr-area-shape-poly title=3Dattr-area-sh=
ape-poly>polygon state</dfn>, <code><a href=3D#the-area=
-element>area</a></code> elements must
+  have a <code title=3Dattr-area-coords><a href=3D#attr-area-co=
ords>coords</a></code> attribute with at least six integer=
s, and the
+  number of integers must be even. Each pair of integers must represent =
a coordinate given as the
+  distances from the left and the top of the image in CSS pixels respect=
ively, and all the
+  coordinates together must represent the points of the polygon, in orde=
r.</p>
+
+  <p>In the <dfn id=3Dattr-area-shape-rect title=3Dattr-area-sh=
ape-rect>rectangle state</dfn>, <code><a href=3D#the-ar=
ea-element>area</a></code> elements must
+  have a <code title=3Dattr-area-coords><a href=3D#attr-area-co=
ords>coords</a></code> attribute with exactly four integer=
s, the
+  first of which must be less than the third, and the second of which mu=
st be less than the fourth.
+  The four points must represent, respectively, the distance from the le=
ft edge of the image to the
+  left side of the rectangle, the distance from the top edge to the top =
side, the distance from the
+  left edge to the right side, and the distance from the top edge to the=
 bottom side, all in CSS
+  pixels.</p>
+
+  <div class=3Dimpl>
+
+  <p>When user agents allow users to <a href=3D#following-hyper=
links title=3D"following hyperlinks">follow hyperlinks</a=
> or
+  <a href=3D#downloading-hyperlinks title=3D"downloading hyperli=
nks">download hyperlinks</a> created using the
+  <code><a href=3D#the-area-element>area</a></code&=
gt; element, as described in the next section, the <code title=3Dattr-=
hyperlink-href><a href=3D#attr-hyperlink-href>href</a><=
/code>, <code title=3Dattr-hyperlink-target><a href=3D#attr-h=
yperlink-target>target</a></code>, <code title=3Dattr-h=
yperlink-download><a href=3D#attr-hyperlink-download>download&lt=
;/a></code>, and <code title=3Dattr-hyperlink-ping><a h=
ref=3D#ping>ping</a></code>
+  attributes decide how the link is followed. The <code title=3Dattr-=
hyperlink-rel><a href=3D#attr-hyperlink-rel>rel</a></co=
de>, <code title=3Dattr-hyperlink-hreflang><a href=3D#attr-hy=
perlink-hreflang>hreflang</a></code>, and <code title=3D=
attr-hyperlink-type><a href=3D#attr-hyperlink-type>type</a&gt=
;</code>
+  attributes may be used to indicate to the user the likely nature of th=
e target resource before the
+  user follows the link.</p>
+
+  </div>
+
+  <p>The <code title=3Dattr-hyperlink-target><a href=3D#a=
ttr-hyperlink-target>target</a></code>, <code title=3Da=
ttr-hyperlink-download><a href=3D#attr-hyperlink-download>downlo=
ad</a></code>, <code title=3Dattr-hyperlink-ping><a =
href=3D#ping>ping</a></code>,
+  <code title=3Dattr-hyperlink-rel><a href=3D#attr-hyperlink-re=
l>rel</a></code>, <code title=3Dattr-hyperlink-hreflang=
><a href=3D#attr-hyperlink-hreflang>hreflang</a></code&=
gt;, and <code title=3Dattr-hyperlink-type><a href=3D#attr-hyper=
link-type>type</a></code>
+  attributes must be omitted if the <code title=3Dattr-hyperlink-href=
><a href=3D#attr-hyperlink-href>href</a></code> attr=
ibute is not
+  present.</p>
+
+  <p>If the <code title=3Dattr-itemprop><a href=3D#names:=
-the-itemprop-attribute>itemprop</a></code> attribute is s=
pecified on an
+  <code><a href=3D#the-area-element>area</a></code&=
gt; element, then the <code title=3Dattr-hyperlink-href><a href=3D=
#attr-hyperlink-href>href</a></code> attribute must
+  also be specified.</p>
+
+  <div class=3Dimpl>
+
+  <p>The <a href=3D#activation-behavior>activation behavior&=
lt;/a> of <code><a href=3D#the-area-element>area</a>=
</code> elements is to run the following
+  steps:</p>
+
+  <ol><!-- c.f. <a>'s similar section --><li>&lt=
;p>If the <code><a href=3D#the-area-element>area</a>=
</code> element's <code><a href=3D#document>Document&lt=
;/a></code> is not <a href=3D#fully-active>fully active&lt=
;/a>,
+   then abort these steps.</li>
+
+   <li>
+
+    <p>If the <code><a href=3D#the-area-element>area&l=
t;/a></code> element has a <code title=3Dattr-hyperlink-downl=
oad><a href=3D#attr-hyperlink-download>download</a></co=
de>
+    attribute and the algorithm is not <a href=3D#allowed-to-show-a-p=
opup>allowed to show a popup</a>, or the element's <code titl=
e=3Dattr-hyperlink-target><a href=3D#attr-hyperlink-target>targe=
t</a></code> attribute is present and applying <a href=3D#=
the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name&g=
t;the rules
+    for choosing a browsing context given a browsing context name</a&=
gt;, using the value of the
+    <code title=3Dattr-hyperlink-target><a href=3D#attr-hyperli=
nk-target>target</a></code> attribute as the browsing cont=
ext name, would
+    result in there not being a chosen browsing context, then run these =
substeps:</p>
+
+    <ol><!--CLEANUP--><li><p>If there is an <=
a href=3D#entry-settings-object>entry settings object</a>, throw=
 an <code><a href=3D#invalidaccesserror>InvalidAccessError&lt=
;/a></code>
+     exception.</li>
+
+     <li><p>Abort these steps without following the hyperlin=
k.</li>
+
+    </ol></li>
+
+   <li><p>Otherwise, the user agent must <a href=3D#follo=
wing-hyperlinks title=3D"following hyperlinks">follow the
+   hyperlink</a> or <a href=3D#downloading-hyperlinks title=3D&=
quot;downloading hyperlinks">download the hyperlink</a> cre=
ated by
+   the <code><a href=3D#the-area-element>area</a></=
code> element, if any, and as determined by the <code title=3Dattr-=
hyperlink-download><a href=3D#attr-hyperlink-download>download&l=
t;/a></code> attribute and any expressed user
+   preference.</li>
+
+  </ol><p>The IDL attributes <dfn id=3Ddom-area-alt title=
=3Ddom-area-alt><code>alt</code></dfn>, <dfn id=3D=
dom-area-coords title=3Ddom-area-coords><code>coords</code&gt=
;</dfn>, <dfn id=3Ddom-area-target title=3Ddom-area-target>&l=
t;code>target</code></dfn>, <dfn id=3Ddom-area-download=
 title=3Ddom-area-download><code>download</code></dfn&g=
t;, <dfn id=3Ddom-area-ping title=3Ddom-area-ping><code>ping&=
lt;/code></dfn>, <dfn id=3Ddom-area-rel title=3Ddom-area-rel&=
gt;<code>rel</code></dfn>,
+  <dfn id=3Ddom-area-hreflang title=3Ddom-area-hreflang><code&g=
t;hreflang</code></dfn>, and <dfn id=3Ddom-area-type title=
=3Ddom-area-type><code>type</code></dfn>, each must =
<a href=3D#reflect>reflect</a> the respective
+  content attributes of the same name.</p>
+
+  <p>The IDL attribute <dfn id=3Ddom-area-shape title=3Ddom-are=
a-shape><code>shape</code></dfn> must
+  <a href=3D#reflect>reflect</a> the <code title=3Dattr-a=
rea-shape><a href=3D#attr-area-shape>shape</a></code&gt=
; content attribute.</p>
+
+  <p>The IDL attribute <dfn id=3Ddom-area-rellist title=3Ddom-a=
rea-rellist><code>relList</code></dfn> must
+  <a href=3D#reflect>reflect</a> the <code title=3Dattr-h=
yperlink-rel><a href=3D#attr-hyperlink-rel>rel</a></cod=
e> content attribute.</p>
+
+  <hr><!-- concept-uu --><p>The <code><a href=
=3D#the-area-element>area</a></code> element also supports=
 the <code><a href=3D#urlutils>URLUtils</a></code&gt=
; interface. <a href=3D#refsURL>[URL]</a></p>
+
+  <p>When the element is created, and whenever the element's <c=
ode title=3Dattr-hyperlink-href><a href=3D#attr-hyperlink-href>h=
ref</a></code> content attribute is set, changed, or removed,=
 the user
+  agent must invoke the element's <code><a href=3D#urlutils>=
URLUtils</a></code> interface's <a href=3D#concept-uu-set-=
the-input title=3Dconcept-uu-set-the-input>set the input</a> alg=
orithm with the value of the <code title=3Dattr-hyperlink-href><=
a href=3D#attr-hyperlink-href>href</a></code> content attr=
ibute, if any, or the empty string otherwise,
+  as the given value.</p>
+
+  <p>The element's <code><a href=3D#urlutils>URLUtils&=
lt;/a></code> interface's <a href=3D#concept-uu-get-the-base =
title=3Dconcept-uu-get-the-base>get the
+  base</a> algorithm must simply return <a href=3D"#the-el=
ement's-base-url">the element's base URL</a>.</p>
+
+  <p>The element's <code><a href=3D#urlutils>URLUtils&=
lt;/a></code> interface's <a href=3D#concept-uu-query-encodin=
g title=3Dconcept-uu-query-encoding>query
+  encoding</a> is the <a href=3D"#document's-character-enc=
oding">document's character encoding</a>.</p>
+
+  <p>When the element's <code><a href=3D#urlutils>URLU=
tils</a></code> interface invokes its <a href=3D#concept-u=
u-update title=3Dconcept-uu-update>update steps</a> with a strin=
g <var title=3D"">value</var>, the user
+  agent must set the element's <code title=3Dattr-hyperlink-href>&=
lt;a href=3D#attr-hyperlink-href>href</a></code> content a=
ttribute to
+  the string <var title=3D"">value</var>.</p&gt=
;
+
+  </div>
+
+
+
+  <h4 id=3Dimage-maps><span class=3Dsecno>4.7.13 </span&g=
t;Image maps</h4>
+
+  <!-- TESTS
+  http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%2=
0html%3E%0A%3Cimg%20src%3D%22http%3A//hixie.ch/resources/images/smallcats=
%22%20usemap%3D%23a%20onclick%3Dw%28%27img%27%29%3E%0A%3Cmap%20name%3Da%3=
E%0A%20%3Carea%20onclick%3Dw%28%271%27%29%20coords%3D%270%25%200%25%20100=
%25%20100%25%27%20href%3Djavascript%3A%3E%0A%3C/map%3E
+  http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%2=
0html%3E%0A%3Cbody%20onfocus%3D%22w%28document.activeElement.tagName%29%2=
2%3E%0A%3Cimg%20src%3D%22http%3A//hixie.ch/resources/images/smallcats%22%=
20usemap%3D%23a%20onclick%3Dw%28%27img%27%29%20onfocus%3D%22w%28document.=
activeElement.tagName%29%22%3E%0A%3Cimg%20src%3D%22http%3A//hixie.ch/reso=
urces/images/sample%22%20usemap%3D%23a%20onclick%3Dw%28%27img%27%29%20onf=
ocus%3D%22w%28document.activeElement.tagName%29%22%3E%0A%3Cmap%20name%3Da=
%20onfocus%3D%22w%28document.activeElement.tagName%29%22%3E%0A%20%3Carea%=
20onclick%3Dw%28%271%27%29%20coords%3D%270%200%2050%2050%27%20href%3Djava=
script%3A%20onfocus%3D%22w%28document.activeElement.tagName%29%22%3E%0A%3=
C/map%3E%0A%3Cscript%3E%0A%20var%20x%20%3D%20document.getElementsByTagNam=
e%28%27img%27%29%5B0%5D%3B%0A%20x.parentNode.appendChild%28x%29%3B%0A%20d=
ocument.getElementsByTagName%28%27area%27%29%5B0%5D.focus%28%29%3B%0A%3C/=
script%3E
+  http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%2=
0html%3Ex%3Cmap%3E%3Carea%20shape%3Dpolyg%20coords%3D%221%2C2%203%22%3E%3=
C/map%3E%0A%3Cscript%3Ex%20%3D%20document.getElementsByTagName%28%27area%=
27%29%5B0%5D%3B%20w%28x.shape%20+%20%27%20%27%20+%20x.coords%29%3C/script=
%3E
+  http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%2=
0html%3E%0D%0A%3Cp%3E%3Cimg%20src%3D%22http%3A//hixie.ch/resources/images=
/astrophy/128%22%20usemap%3D%23a%3E%0D%0A%3Cmap%20name%3Da%3E%3Carea%20sh=
ape%3Dcirc%20coords%3D%2220%2C20%2C10%25%22%20href%3D%23%3E%3Carea%20shap=
e%3Dcirc%20coords%3D%2220%2C20%2C10%22%20href%3D%23%3E%3C/map%3E%0D%0A%3C=
script%3Edocument.write%28document.getElementsByTagName%28%27area%27%29%5=
B0%5D.coords%29%3C/script%3E
+  -->
+
+  <div class=3Dimpl>
+
+  <h5 id=3Dauthoring><span class=3Dsecno>4.7.13.1 </span&=
gt;Authoring</h5>
+
+  </div>
+
+  <p>An <dfn id=3Dimage-map>image map</dfn> allows geo=
metric areas on an image to be associated with <a href=3D#hyperlink ti=
tle=3Dhyperlink>hyperlinks</a>.</p>
+
+  <p>An image, in the form of an <code><a href=3D#the-img=
-element>img</a></code> element or an <code><a hr=
ef=3D#the-object-element>object</a></code> element
+  representing an image, may be associated with an image map (in the for=
m of a <code><a href=3D#the-map-element>map</a></cod=
e>
+  element) by specifying a <dfn id=3Dattr-hyperlink-usemap title=3Dat=
tr-hyperlink-usemap><code>usemap</code></dfn> attrib=
ute on
+  the <code><a href=3D#the-img-element>img</a></cod=
e> or <code><a href=3D#the-object-element>object</a>=
</code> element. The <code title=3Dattr-hyperlink-usemap><=
a href=3D#attr-hyperlink-usemap>usemap</a></code> attribut=
e, if specified, must be a <a href=3D#valid-hash-name-reference>val=
id
+  hash-name reference</a> to a <code><a href=3D#the-map-e=
lement>map</a></code> element.</p>
+
+  <div class=3Dexample>
+
+   <p>Consider an image that looks as follows:</p>
+
+   <p><img src=3Dhttp://images.whatwg.org/sample-usemap.png wid=
th=3D600 alt=3D"A line with four shapes in it, equally spaced: a red=
 hollow box, a green circle, a blue triangle, and a yellow four-pointed s=
tar." height=3D150></p>
+
+   <p>If we wanted just the colored areas to be clickable, we coul=
d do it as follows:</p>
+
+   <pre><p>
+ Please select a shape:
+ <img src=3D"shapes.png" usemap=3D"#shapes"
+      alt=3D"Four shapes are available: a red hollow box, a green c=
ircle, a blue triangle, and a yellow four-pointed star.">
+ <map name=3D"shapes">
+  <area shape=3Drect coords=3D"50,50,100,100"> &=
amp;lt;!-- the hole in the red box -->
+  <area shape=3Drect coords=3D"25,25,125,125" href=3D&q=
uot;red.html" alt=3D"Red box.">
+  <area shape=3Dcircle coords=3D"200,75,50" href=3D&quo=
t;green.html" alt=3D"Green circle.">
+  <area shape=3Dpoly coords=3D"325,25,262,125,388,125" =
href=3D"blue.html" alt=3D"Blue triangle.">
+  <area shape=3Dpoly coords=3D"450,25,435,60,400,75,435,90,4=
50,125,465,90,500,75,465,60"
+        href=3D"yellow.html" alt=3D"Yellow star."&am=
p;gt;
+ </map>
+</p></pre>
+
+  </div>
+
+  <div class=3Dimpl>
+
+  <h5 id=3Dprocessing-model-0><span class=3Dsecno>4.7.13.2 &=
lt;/span>Processing model</h5>
+
+  <p>If an <code><a href=3D#the-img-element>img</a&=
gt;</code> element or an <code><a href=3D#the-object-eleme=
nt>object</a></code> element representing an image has a
+  <code title=3Dattr-hyperlink-usemap><a href=3D#attr-hyperlink=
-usemap>usemap</a></code> attribute specified, user agents=
 must process it
+  as follows:</p>
+
+  <ol><li><p>First, <a href=3D#rules-for-parsing-a-=
hash-name-reference>rules for parsing a hash-name reference</a> =
to a <code><a href=3D#the-map-element>map</a></code&=
gt; element
+   must be followed. This will return either an element (the <var tit=
le=3D"">map</var>) or
+   null.</li>
+
+   <li><p>If that returned null, then abort these steps. The=
 image is not associated with an image
+   map after all.</li>
+
+   <li><p>Otherwise, the user agent must collect all the &lt=
;code><a href=3D#the-area-element>area</a></code> el=
ements that are
+   descendants of the <var title=3D"">map</var>. L=
et those be the <var title=3D"">areas</var>.</li=
>
+
+  </ol><p>Having obtained the list of <code><a href=
=3D#the-area-element>area</a></code> elements that form th=
e image map (the <var title=3D"">areas</var>), inte=
ractive user agents must process the list in one of two ways.</p>
+
+  <p>If the user agent intends to show the text that the <code&=
gt;<a href=3D#the-img-element>img</a></code> element re=
presents, then
+  it must use the following steps.</p>
+
+  <p class=3Dnote>In user agents that do not support images, or th=
at have images disabled,
+  <code><a href=3D#the-object-element>object</a></c=
ode> elements cannot represent images, and thus this section never app=
lies (the
+  <a href=3D#fallback-content>fallback content</a> is shown =
instead). The following steps therefore only apply to
+  <code><a href=3D#the-img-element>img</a></code&gt=
; elements.</p>
+
+  <ol><li><p>Remove all the <code><a href=3D#=
the-area-element>area</a></code> elements in <var title=
=3D"">areas</var> that have no <code title=3Dattr-h=
yperlink-href><a href=3D#attr-hyperlink-href>href</a></=
code> attribute.</li>
+
+   <li><p>Remove all the <code><a href=3D#the-area-=
element>area</a></code> elements in <var title=3D"=
">areas</var> that have no <code title=3Dattr-area-alt&g=
t;<a href=3D#attr-area-alt>alt</a></code> attribute, or=
 whose <code title=3Dattr-area-alt><a href=3D#attr-area-alt>a=
lt</a></code>
+   attribute's value is the empty string, <em>if</em> there =
is another <code><a href=3D#the-area-element>area</a>&l=
t;/code> element in
+   <var title=3D"">areas</var> with the same value=
 in the <code title=3Dattr-hyperlink-href><a href=3D#attr-hyperl=
ink-href>href</a></code> attribute and with a non-empty &l=
t;code title=3Dattr-area-alt><a href=3D#attr-area-alt>alt</a&=
gt;</code> attribute.</li>
+
+   <li><p>Each remaining <code><a href=3D#the-area-=
element>area</a></code> element in <var title=3D"&=
quot;>areas</var> represents a
+   <a href=3D#hyperlink>hyperlink</a>. Those hyperlinks shou=
ld all be made available to the user in a manner
+   associated with the text of the <code><a href=3D#the-img-ele=
ment>img</a></code>.</p>
+
+   <p>In this context, user agents may represent <code><a=
 href=3D#the-area-element>area</a></code> and <code>=
<a href=3D#the-img-element>img</a></code> elements
+   with no specified <code title=3D"">alt</code> a=
ttributes, or whose <code title=3D"">alt</code>
+   attributes are the empty string or some other non-visible text, in a =
user-agent-defined fashion
+   intended to indicate the lack of suitable author-provided text.</l=
i>
+
+  </ol><p>If the user agent intends to show the image and al=
low interaction with the image to select
+  hyperlinks, then the image must be associated with a set of layered sh=
apes, taken from the
+  <code><a href=3D#the-area-element>area</a></code&=
gt; elements in <var title=3D"">areas</var>, in rev=
erse tree order (so the last
+  specified <code><a href=3D#the-area-element>area</a>=
</code> element in the <var title=3D"">map</var&=
gt; is the bottom-most shape, and
+  the first element in the <var title=3D"">map</var&g=
t;, in tree order, is the top-most shape).</p>
+
+  <p>Each <code><a href=3D#the-area-element>area</a=
></code> element in <var title=3D"">areas</va=
r> must be processed as follows to
+  obtain a shape to layer onto the image:</p>
+
+  <ol><li><p>Find the state that the element's <cod=
e title=3Dattr-area-shape><a href=3D#attr-area-shape>shape</a=
></code> attribute
+   represents.</li>
+
+   <li><p>Use the <a href=3D#rules-for-parsing-a-list-of-=
integers>rules for parsing a list of integers</a> to parse the e=
lement's <code title=3Dattr-area-coords><a href=3D#attr-area-coo=
rds>coords</a></code> attribute, if it is present, and let=
 the result be the
+   <var title=3D"">coords</var> list. If the attri=
bute is absent, let the <var title=3D"">coords</var&gt=
;
+   list be the empty list.</li>
+
+   <li>
+
+    <p>If the number of items in the <var title=3D""&=
gt;coords</var> list is less than the minimum number
+    given for the <code><a href=3D#the-area-element>area<=
/a></code> element's current state, as per the following table, =
then the
+    shape is empty; abort these steps.</p>
+
+    <table><thead><tr><th>State
+       <th>Minimum number of items
+     <tbody><tr><td><a href=3D#attr-area-shape-circ=
le title=3Dattr-area-shape-circle>Circle state</a>
+       <td>3
+      <tr><td><a href=3D#attr-area-shape-default title=3D=
attr-area-shape-default>Default state</a>
+       <td>0
+      <tr><td><a href=3D#attr-area-shape-poly title=3Datt=
r-area-shape-poly>Polygon state</a>
+       <td>6
+      <tr><td><a href=3D#attr-area-shape-rect title=3Datt=
r-area-shape-rect>Rectangle state</a>
+       <td>4
+    </table></li>
+
+   <li>
+
+    <p>Check for excess items in the <var title=3D""&=
gt;coords</var> list as per the entry in the
+    following list corresponding to the <code title=3Dattr-area-shape=
><a href=3D#attr-area-shape>shape</a></code> attribu=
te's
+    state:</p>
+
+    <dl class=3Dswitch><dt><a href=3D#attr-area-shape-cir=
cle title=3Dattr-area-shape-circle>Circle state</a></dt>
+     <dd>Drop any items in the list beyond the third.</dd>
+     <dt><a href=3D#attr-area-shape-default title=3Dattr-area-s=
hape-default>Default state</a></dt>
+     <dd>Drop all items in the list.</dd>
+     <dt><a href=3D#attr-area-shape-poly title=3Dattr-area-shap=
e-poly>Polygon state</a></dt>
+     <dd>Drop the last item if there's an odd number of items.<=
/dd>
+     <dt><a href=3D#attr-area-shape-rect title=3Dattr-area-shap=
e-rect>Rectangle state</a></dt>
+     <dd>Drop any items in the list beyond the fourth.</dd>
+    </dl></li>
+
+   <li><p>If the <code title=3Dattr-area-shape><a h=
ref=3D#attr-area-shape>shape</a></code> attribute represen=
ts the <a href=3D#attr-area-shape-rect title=3Dattr-area-shape-rect&gt=
;rectangle state</a>, and the first number in the list is
+   numerically less than the third number in the list, then swap those t=
wo numbers around.</li>
+
+   <li><p>If the <code title=3Dattr-area-shape><a h=
ref=3D#attr-area-shape>shape</a></code> attribute represen=
ts the <a href=3D#attr-area-shape-rect title=3Dattr-area-shape-rect&gt=
;rectangle state</a>, and the second number in the list is
+   numerically less than the fourth number in the list, then swap those =
two numbers around.</li>
+
+   <li><p>If the <code title=3Dattr-area-shape><a h=
ref=3D#attr-area-shape>shape</a></code> attribute represen=
ts the <a href=3D#attr-area-shape-circle title=3Dattr-area-shape-circl=
e>circle state</a>, and the third number in the list is less tha=
n
+   or equal to zero, then the shape is empty; abort these steps.</li&=
gt;
+
+   <li><p>Now, the shape represented by the element is the o=
ne described for the entry in the list
+   below corresponding to the state of the <code title=3Dattr-area-sh=
ape><a href=3D#attr-area-shape>shape</a></code> attr=
ibute:</p>
+
+    <dl class=3Dswitch><dt><a href=3D#attr-area-shape-cir=
cle title=3Dattr-area-shape-circle>Circle state</a></dt>
+     <dd>
+
+      <p>Let <var title=3D"">x</var> be the =
first number in <var title=3D"">coords</var>, <v=
ar title=3D"">y</var> be the second number, and <va=
r title=3D"">r</var> be the third number.</p>
+
+      <p>The shape is a circle whose center is <var title=3D&qu=
ot;">x</var> CSS pixels from the left edge
+      of the image and <var title=3D"">y</var> CSS=
 pixels from the top edge of the image, and whose
+      radius is <var title=3D"">r</var> pixels.&lt=
;/p>
+
+     </dd>
+
+     <dt><a href=3D#attr-area-shape-default title=3Dattr-area-s=
hape-default>Default state</a></dt>
+     <dd>
+
+      <p>The shape is a rectangle that exactly covers the entire i=
mage.</p>
+
+     </dd>
+
+     <dt><a href=3D#attr-area-shape-poly title=3Dattr-area-shap=
e-poly>Polygon state</a></dt>
+     <dd>
+
+      <p>Let <var title=3D"">x<sub title=3D&quo=
t;"><var title=3D"">i</var></sub><=
/var> be the <span title=3D"">(2<var title=3D"=
">i</var>)</span>th entry in <var title=3D"&q=
uot;>coords</var>, and <var title=3D"">y<sub =
title=3D""><var title=3D"">i</var><=
/sub></var> be the <span title=3D"">(2<var ti=
tle=3D"">i</var>+1)</span>th entry in <var ti=
tle=3D"">coords</var> (the first entry in <var titl=
e=3D"">coords</var> being the one with index 0).</p=
>
+
+      <p>Let <var title=3D"">the coordinates</v=
ar> be (<var title=3D"">x<sub title=3D""&=
gt;<var title=3D"">i</var></sub></var>,=
 <var title=3D"">y<sub title=3D""><var=
 title=3D"">i</var></sub></var>),
+      interpreted in CSS pixels measured from the top left of the image,=
 for all integer values of
+      <var title=3D"">i</var> from 0 to <span t=
itle=3D"">(<var title=3D"">N</var>/2)-=
1</span>, where <var title=3D"">N</var> is th=
e number of items in <var title=3D"">coords</var>.&=
lt;/p>
+
+      <p>The shape is a polygon whose vertices are given by <va=
r title=3D"">the coordinates</var>, and
+      whose interior is established using the even-odd rule. <a href=3D=
#refsGRAPHICS>[GRAPHICS]</a></p>
+
+      <!--
+        browsers implement the even-odd rule / even winding rule:
+        http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOC=
TYPE%20html%3E%0A%3Cimg%20usemap%3D%22%23x%22%20src%3D%22/resources/image=
s/sample%22%3E%0A%3Cmap%20name%3D%22x%22%3E%0A%20%20%3Carea%20shape%3Dpol=
ygon%20coords%3D%220%2C0%200%2C100%20100%2C100%20100%2C2%201%2C2%202%2C1%=
202%2C99%2099%2C99%2099%2C0%22%20href%3Da%3E%0A%3C/map%3E%0A
+       -->
+
+     </dd>
+
+     <dt><a href=3D#attr-area-shape-rect title=3Dattr-area-shap=
e-rect>Rectangle state</a></dt>
+
+     <dd>
+
+      <p>Let <var title=3D"">x<sub title=3D&quo=
t;">1</sub></var> be the first number in <var titl=
e=3D"">coords</var>, <var title=3D"">y=
<sub title=3D"">1</sub></var> be the second n=
umber, <var title=3D"">x<sub title=3D"">2=
</sub></var> be the third number, and <var title=3D"&=
quot;>y<sub title=3D"">2</sub></var> be th=
e fourth number.</p>
+
+      <p>The shape is a rectangle whose top-left corner is given b=
y the coordinate (<var title=3D"">x<sub title=3D"=
">1</sub></var>, <var title=3D"">y&lt=
;sub title=3D"">1</sub></var>) and whose
+      bottom right corner is given by the coordinate (<var title=3D&q=
uot;">x<sub title=3D"">2</sub></var>,
+      <var title=3D"">y<sub title=3D"">2=
</sub></var>), those coordinates being interpreted as CSS pix=
els
+      from the top left corner of the image.</p>
+
+     </dd>
+
+    </dl><p>For historical reasons, the coordinates must be =
interpreted relative to the
+    <em>displayed</em> image after any stretching caused by =
the CSS 'width' and 'height' properties
+    (or, for non-CSS browsers, the image element's <code title=3D&quo=
t;">width</code> and <code title=3D"">heigh=
t</code> attributes — CSS browsers map those attributes t=
o the
+    aforementioned CSS properties).</p>
+
+    <p class=3Dnote>Browser zoom features and transforms applied u=
sing CSS or SVG do not affect the
+    coordinates.</p>
+
+   </li>
+
+  </ol><p>Pointing device interaction with an image associat=
ed with a set of layered shapes per the above
+  algorithm must result in the relevant user interaction events being fi=
rst fired to the top-most
+  shape covering the point that the pointing device indicated, if any, o=
r to the image element
+  itself, if there is no shape covering that point. User agents may also=
 allow individual
+  <code><a href=3D#the-area-element>area</a></code&=
gt; elements representing <a href=3D#hyperlink title=3Dhyperlink>hy=
perlinks</a> to be selected
+  and activated (e.g. using a keyboard).</p>
+
+  <p class=3Dnote>Because a <code><a href=3D#the-map-elem=
ent>map</a></code> element (and its <code><a href=
=3D#the-area-element>area</a></code> elements) can be
+  associated with multiple <code><a href=3D#the-img-element>=
img</a></code> and <code><a href=3D#the-object-eleme=
nt>object</a></code> elements, it is possible for an
+  <code><a href=3D#the-area-element>area</a></code&=
gt; element to correspond to multiple focusable areas of the document.&lt=
;/p>
+
+  <p>Image maps are <a href=3D#live>live</a>; if the D=
OM is mutated, then the user agent must act as if it
+  had rerun the algorithms for image maps.</p>
+
+  </div>
+
+
+
+  <h4 id=3Dmathml><span class=3Dsecno>4.7.14 </span>Ma=
thML</h4>
+
+  <p>The <dfn id=3Dmath><code>math</code></df=
n> element from the <a href=3D#mathml-namespace>MathML namespace=
</a> falls into the
+  <a href=3D#embedded-content>embedded content</a>, <a hr=
ef=3D#phrasing-content>phrasing content</a>, and <a href=3D#f=
low-content>flow content</a>
+  categories for the purposes of the content models in this specificatio=
n.</p>
+
+  <div class=3Dimpl>
+
+  <!-- apparently we get to define error handling, so: -->
+
+  <p>User agents must handle text other than <a href=3D#inter-e=
lement-whitespace>inter-element whitespace</a> found in MathML
+  elements whose content models do not allow straight text by pretending=
 for the purposes of MathML
+  content models, layout, and rendering that that text is actually wrapp=
ed in an <code title=3D"">mtext</code> element in t=
he <a href=3D#mathml-namespace>MathML namespace</a>. (Such te=
xt is not, however,
+  conforming.)</p>
+
+  <p>User agents must act as if any MathML element whose contents =
does not match the element's
+  content model was replaced, for the purposes of MathML layout and rend=
ering, by an <code title=3D"">merror</code> element=
 in the <a href=3D#mathml-namespace>MathML namespace</a> cont=
aining some appropriate
+  error message.</p>
+
+  <p>To enable authors to use MathML tools that only accept MathML=
 in its XML form, interactive HTML
+  user agents are encouraged to provide a way to export any MathML fragm=
ent as an XML
+  namespace-well-formed XML fragment.</p>
+
+  </div>
+
+  <p>The semantics of MathML elements are defined by the MathML sp=
ecification and <a href=3D#other-applicable-specifications>other
+  applicable specifications</a>. <a href=3D#refsMATHML>[MATH=
ML]</a></p>
+
+  <div class=3Dexample>
+
+   <p>Here is an example of the use of MathML in an HTML document:=
</p>
+
+   <pre><!DOCTYPE html>
+<html>
+ <head>
+  <title>The quadratic formula</title>
+ </head>
+ <body>
+  <h1>The quadratic formula</h1>
+  <p>
+   <math>
+    <mi>x</mi>
+    <mo>=3D</mo>
+    <mfrac>
+     <mrow>
+      <mo form=3D"prefix">−</mo=
> <mi>b</mi>
+      <mo>±</mo>
+      <msqrt>
+       <msup> <mi>b</mi> &=
lt;mn>2</mn> </msup>
+       <mo>−</mo>
+       <mn>4</mn> <mo>⁢=
</mo> <mi>a</mi> <mo&amp=
;gt;⁢</mo> <mi>c</mi>
+      </msqrt>
+     </mrow>
+     <mrow>
+      <mn>2</mn> <mo>⁢&=
amp;lt;/mo> <mi>a</mi>
+     </mrow>
+    </mfrac>
+   </math>
+  </p>
+ </body>
+</html></pre>
+
+  </div>
+
+
+
+  <h4 id=3Dsvg-0><span class=3Dsecno>4.7.15 </span>SVG=
</h4>
+
+  <p>The <dfn id=3Dsvg><code>svg</code></dfn&=
gt; element from the <a href=3D#svg-namespace>SVG namespace</a&g=
t; falls into the
+  <a href=3D#embedded-content>embedded content</a>, <a hr=
ef=3D#phrasing-content>phrasing content</a>, and <a href=3D#f=
low-content>flow content</a>
+  categories for the purposes of the content models in this specificatio=
n.</p>
+
+  <div class=3Dimpl>
+
+  <p>To enable authors to use SVG tools that only accept SVG in it=
s XML form, interactive HTML user
+  agents are encouraged to provide a way to export any SVG fragment as a=
n XML namespace-well-formed
+  XML fragment.</p>
+
+  </div>
+
+  <p>When the SVG <code title=3D"">foreignObject&l=
t;/code> element contains elements from the <a href=3D#html-namespa=
ce-0>HTML
+  namespace</a>, such elements must all be <a href=3D#flow-cont=
ent>flow content</a>. <a href=3D#refsSVG>[SVG]</a>&l=
t;/p>
+
+  <p>The content model for <code title=3D"">title&=
lt;/code> elements in the <a href=3D#svg-namespace>SVG namespace=
</a>
+  inside <a href=3D#html-documents>HTML documents</a> is &lt=
;a href=3D#phrasing-content>phrasing content</a>. (This further =
constrains the
+  requirements given in the SVG specification.)</p>
+
+  <p>The semantics of SVG elements are defined by the SVG specific=
ation and <a href=3D#other-applicable-specifications>other applicab=
le
+  specifications</a>. <a href=3D#refsSVG>[SVG]</a><=
/p>
+
+  <p>The SVG specification includes requirements regarding the han=
dling of elements in the DOM that
+  are not in the SVG namespace, that are in SVG fragments, and that are =
not included in a <code title=3D"">foreignObject</code=
> element. <em>This</em> specification does not define any=
 processing
+  for elements in SVG fragments that are not in the HTML namespace; they=
 are considered neither
+  conforming nor non-conforming from the perspective of this specificati=
on.</p>
+
+
+
+  <h4 id=3Ddimension-attributes><span class=3Dsecno>4.7.16 &=
lt;/span><dfn>Dimension attributes</dfn></h4>
+
+  <p><span class=3Dimpl><strong>Author requirements&lt=
;/strong>:</span> The <dfn id=3Dattr-dim-width title=3Dattr-d=
im-width><code>width</code></dfn> and <dfn id=3Da=
ttr-dim-height title=3Dattr-dim-height><code>height</code>=
</dfn> attributes on <code><a href=3D#the-img-element>i=
mg</a></code>,
+  <code><a href=3D#the-iframe-element>iframe</a></c=
ode>, <code><a href=3D#the-embed-element>embed</a>&l=
t;/code>, <code><a href=3D#the-object-element>object</a=
></code>, <code><a href=3D#the-video-element>video&l=
t;/a></code>, and, when their
+  <code title=3Dattr-input-type><a href=3D#attr-input-type>t=
ype</a></code> attribute is in the <a href=3D"#image-=
button-state-(type=3Dimage)" title=3Dattr-input-type-image>Image =
Button</a> state, <code><a href=3D#the-input-element>in=
put</a></code> elements may be
+  specified to give the dimensions of the visual content of the element =
(the width and height
+  respectively, relative to the nominal direction of the output medium),=
 in CSS pixels. The
+  attributes, if specified, must have values that are <a href=3D#vali=
d-non-negative-integer title=3D"valid non-negative integer">=
valid
+  non-negative integers</a>.</p>
+
+  <p>The specified dimensions given may differ from the dimensions=
 specified in the resource itself,
+  since the resource may have a resolution that differs from the CSS pix=
el resolution. (On screens,
+  CSS pixels have a resolution of 96ppi, but in general the CSS pixel re=
solution depends on the
+  reading distance.) If both attributes are specified, then one of the f=
ollowing statements must be
+  true:</p>
+
+  <ul><li><span title=3D""><var title=3D&=
quot;">specified width</var> - 0.5 ≤
+             <var title=3D"">specified height</var&gt=
; * <var title=3D"">target ratio</var> ≤
+             <var title=3D"">specified width</var>=
 + 0.5</span></li>
+
+   <li><span title=3D""><var title=3D"&quo=
t;>specified height</var> - 0.5 ≤
+             <var title=3D"">specified width</var>=
 / <var title=3D"">target ratio</var> ≤
+             <var title=3D"">specified height</var&gt=
; + 0.5</span></li>
+
+   <li><span title=3D""><var title=3D"&quo=
t;>specified height</var> =3D <var title=3D"">sp=
ecified width</var> =3D 0</span></li>
+
+  </ul><p>The <var title=3D"">target ratio&l=
t;/var> is the ratio of the intrinsic width to the intrinsic
+  height in the resource. The <var title=3D"">specified =
width</var> and <var title=3D"">specified
+  height</var> are the values of the <code title=3Dattr-dim-wid=
th><a href=3D#attr-dim-width>width</a></code> and &l=
t;code title=3Dattr-dim-height><a href=3D#attr-dim-height>height=
</a></code> attributes respectively.</p>
+
+  <p>The two attributes must be omitted if the resource in questio=
n does not have both an intrinsic
+  width and an intrinsic height.</p>
+
+  <p>If the two attributes are both zero, it indicates that the el=
ement is not intended for the user
+  (e.g. it might be a part of a service to count page views).</p>
+
+  <p class=3Dnote>The dimension attributes are not intended to be =
used to stretch the image.</p>
+
+  <div class=3Dimpl>
+
+  <p><strong>User agent requirements</strong>: User ag=
ents are expected to use these attributes <a href=3D#dimRendering>a=
s hints for the rendering</a>.</p>
+
+  <p>The <dfn id=3Ddom-dim-width title=3Ddom-dim-width><c=
ode>width</code></dfn> and <dfn id=3Ddom-dim-height tit=
le=3Ddom-dim-height><code>height</code></dfn> IDL at=
tributes on the <code><a href=3D#the-iframe-element>iframe&lt=
;/a></code>,
+  <code><a href=3D#the-embed-element>embed</a></cod=
e>, <code><a href=3D#the-object-element>object</a>&l=
t;/code>, and <code><a href=3D#the-video-element>video<=
/a></code> elements must <a href=3D#reflect>reflect</a&=
gt;
+  the respective content attributes of the same name.</p>
+
+  <p class=3Dnote>For <code><a href=3D#the-iframe-element=
>iframe</a></code>, <code><a href=3D#the-embed-el=
ement>embed</a></code>, and <code><a href=3D#the-=
object-element>object</a></code> the IDL
+  attributes are <code>DOMString</code>; for <code>&lt=
;a href=3D#the-video-element>video</a></code> the IDL attr=
ibutes are
+  <code>unsigned long</code>.</p>
+
+  <p class=3Dnote>The corresponding IDL attributes for <code ti=
tle=3Ddom-img-height><a href=3D#dom-img-height>img</a><=
/code> and
+  <code title=3Ddom-input-height><a href=3D#dom-input-height&gt=
;input</a></code> elements are defined in those respective el=
ements'
+  sections, as they are slightly more specific to those elements' other =
behaviors.</p>
+
+  </div>
+
+
+
+  <h3 id=3Dlinks><span class=3Dsecno>4.8 </span>Links&=
lt;/h3>
+
+  <h4 id=3Dintroduction-1><span class=3Dsecno>4.8.1 </spa=
n>Introduction</h4>
+
+  <p>Links are a conceptual construct, created by <code><=
a href=3D#the-a-element>a</a></code>, <code><a hr=
ef=3D#the-area-element>area</a></code>, and
+  <code><a href=3D#the-link-element>link</a></code&=
gt; elements, that <a href=3D#represents title=3Drepresents>represe=
nt</a> a connection between
+  two resources, one of which is the current <code><a href=3D#d=
ocument>Document</a></code>. There are two kinds of links =
in
+  HTML:</p>
+
+  <dl><dt><dfn id=3Dexternal-resource-link title=3D"=
external resource link">Links to external resources</dfn>&l=
t;/dt>
+
+   <dd><p>These are links to resources that are to be used t=
o augment the current document,
+   generally automatically processed by the user agent.</dd>
+
+   <dt><dfn id=3Dhyperlink title=3Dhyperlink>Hyperlinks</=
dfn></dt>
+
+   <dd><p>These are links to other resources that are genera=
lly exposed to the user by the user
+   agent so that the user can cause the user agent to <a href=3D#navi=
gate>navigate</a> to those resources, e.g.
+   to visit them in a browser or download them.</dd>
+
+  </dl><p>For <code><a href=3D#the-link-element>=
link</a></code> elements with an <code title=3Dattr-link-h=
ref><a href=3D#attr-link-href>href</a></code> attrib=
ute and a
+  <code title=3Dattr-link-rel><a href=3D#attr-link-rel>rel&l=
t;/a></code> attribute, links must be created for the keywords o=
f the
+  <code title=3Dattr-link-rel><a href=3D#attr-link-rel>rel&l=
t;/a></code> attribute, as defined for those keywords in the &lt=
;a href=3D#linkTypes>link types</a> section.</p>
+
+  <p>Similarly, for <code><a href=3D#the-a-element>a&l=
t;/a></code> and <code><a href=3D#the-area-element>a=
rea</a></code> elements with an <code title=3Dattr-hyperli=
nk-href><a href=3D#attr-hyperlink-href>href</a></code&g=
t; attribute and a <code title=3Dattr-hyperlink-rel><a href=3D#a=
ttr-hyperlink-rel>rel</a></code> attribute, links must be =
created for the keywords of the
+  <code title=3Dattr-hyperlink-rel><a href=3D#attr-hyperlink-re=
l>rel</a></code> attribute as defined for those keywords i=
n the <a href=3D#linkTypes>link types</a> section. Unlike &lt=
;code><a href=3D#the-link-element>link</a></code> el=
ements, however,
+  <code><a href=3D#the-a-element>a</a></code> an=
d <code><a href=3D#the-area-element>area</a></code&g=
t; element with an <code title=3Dattr-hyperlink-href><a href=3D#=
attr-hyperlink-href>href</a></code>
+  attribute that either do not have a <code title=3Dattr-hyperlink-re=
l><a href=3D#attr-hyperlink-rel>rel</a></code> attri=
bute, or
+  whose <code title=3Dattr-hyperlink-rel><a href=3D#attr-hyperl=
ink-rel>rel</a></code> attribute has no keywords that are =
defined as
+  specifying <a href=3D#hyperlink title=3Dhyperlink>hyperlinks<=
/a>, must also create a <a href=3D#hyperlink>hyperlink</a>=
.
+  This implied hyperlink has no special meaning (it has no <a href=3D=
#linkTypes>link type</a>)
+  beyond linking the element's document to the resource given by the ele=
ment's <code title=3Dattr-hyperlink-href><a href=3D#attr-hyperli=
nk-href>href</a></code> attribute.</p>
+
+  <p>A <a href=3D#hyperlink>hyperlink</a> can have one=
 or more <dfn id=3Dhyperlink-annotation title=3D"hyperlink annota=
tion">hyperlink
+  annotations</dfn> that modify the processing semantics of that h=
yperlink.</p>
+
+
+  <h4 id=3Dlinks-created-by-a-and-area-elements><span class=3Ds=
ecno>4.8.2 </span>Links created by <code><a href=3D#the=
-a-element>a</a></code> and <code><a href=3D#the-=
area-element>area</a></code> elements</h4>
+
+  <p>The <dfn id=3Dattr-hyperlink-href title=3Dattr-hyperlink-h=
ref><code>href</code></dfn> attribute on <code&gt=
;<a href=3D#the-a-element>a</a></code> and
+  <code><a href=3D#the-area-element>area</a></code&=
gt; elements must have a value that is a <a href=3D#valid-url-potentia=
lly-surrounded-by-spaces>valid URL potentially surrounded by
+  spaces</a>.</p>
+
+  <p class=3Dnote>The <code title=3Dattr-hyperlink-href><=
a href=3D#attr-hyperlink-href>href</a></code> attribute on=
 <code><a href=3D#the-a-element>a</a></code> and
+  <code><a href=3D#the-area-element>area</a></code&=
gt; elements is not required; when those elements do not have <code ti=
tle=3Dattr-hyperlink-href><a href=3D#attr-hyperlink-href>href&lt=
;/a></code> attributes they do not create hyperlinks.</p>
+
+  <p>The <dfn id=3Dattr-hyperlink-target title=3Dattr-hyperlink=
-target><code>target</code></dfn> attribute, if pres=
ent, must be
+  a <a href=3D#valid-browsing-context-name-or-keyword>valid browsi=
ng context name or keyword</a>. It gives the name of the <a href=
=3D#browsing-context>browsing
+  context</a> that will be used. <span class=3Dimpl>User age=
nts use this name when
+  <a href=3D#following-hyperlinks>following hyperlinks</a>.&=
lt;/span></p>
+
+  <p>When an <code><a href=3D#the-a-element>a</a&gt=
;</code> or <code><a href=3D#the-area-element>area</=
a></code> element's <a href=3D#activation-behavior>activat=
ion behavior</a> is
+  invoked, the user agent may allow the user to indicate a preference re=
garding whether the
+  hyperlink is to be used for <a href=3D#navigate title=3Dnavigate&gt=
;navigation</a> or whether the resource it
+  specifies is to be downloaded.</p>
+
+  <p>In the absence of a user preference, the default should be na=
vigation if the element has no
+  <code title=3Dattr-hyperlink-download><a href=3D#attr-hyperli=
nk-download>download</a></code> attribute, and should be t=
o download the
+  specified resource if it does.</p>
+
+  <p>Whether determined by the user's preferences or via the prese=
nce or absence of the attribute,
+  if the decision is to use the hyperlink for <a href=3D#navigate tit=
le=3Dnavigate>navigation</a> then the user
+  agent must <a href=3D#following-hyperlinks title=3D"following =
hyperlinks">follow the hyperlink</a>, and if the decision i=
s
+  to use the hyperlink to download a resource, the user agent must <a=
 href=3D#downloading-hyperlinks title=3D"downloading
+  hyperlinks">download the hyperlink</a>. These terms are =
defined in subsequent sections
+  below.</p>
+
+  <p>The <dfn id=3Dattr-hyperlink-download title=3Dattr-hyperli=
nk-download><code>download</code></dfn> attribute, i=
f present,
+  indicates that the author intends the hyperlink to be used for downloa=
ding a resource. The
+  attribute may have a value; the value, if any, specifies the default f=
ile name that the author
+  recommends for use in labeling the resource in a local file system. Th=
ere are no restrictions on
+  allowed values, but authors are cautioned that most file systems have =
limitations with regard to
+  what punctuation is supported in file names, and user agents are likel=
y to adjust file names
+  accordingly.</p>
+
+
+  <p>The <dfn id=3Dping title=3Dattr-hyperlink-ping><code=
>ping</code></dfn> attribute, if present,
+  gives the URLs of the resources that are interested in being notified =
if the user follows the
+  hyperlink. The value must be a <a href=3D#set-of-space-separated-to=
kens>set of space-separated tokens</a>, each of which must be a
+  <a href=3D#valid-non-empty-url>valid non-empty URL</a>. &l=
t;span class=3Dimpl>The value is used by the user agent for
+  <a href=3D#hyperlink-auditing>hyperlink auditing</a>.</=
span></p>
+
+  <p>The <dfn id=3Dattr-hyperlink-rel title=3Dattr-hyperlink-re=
l><code>rel</code></dfn> attribute on <code>&l=
t;a href=3D#the-a-element>a</a></code> and
+  <code><a href=3D#the-area-element>area</a></code&=
gt; elements controls what kinds of links the elements create. The attrib=
ute's value
+  must be a <a href=3D#set-of-space-separated-tokens>set of space-=
separated tokens</a>. The <a href=3D#linkTypes>allowed keywor=
ds
+  and their meanings</a> are defined below.</p>
+
+  <p>The <code title=3Dattr-hyperlink-rel><a href=3D#attr=
-hyperlink-rel>rel</a></code> attribute has no default val=
ue. If the
+  attribute is omitted or if none of the values in the attribute are rec=
ognized by the user agent,
+  then the document has no particular relationship with the destination =
resource other than there
+  being a hyperlink between the two.</p>
+
+  <p>The <dfn id=3Dattr-hyperlink-hreflang title=3Dattr-hyperli=
nk-hreflang><code>hreflang</code></dfn> attribute on
+  <code><a href=3D#the-a-element>a</a></code> an=
d <code><a href=3D#the-area-element>area</a></code&g=
t; elements that create <a href=3D#hyperlink title=3Dhyperlink>hype=
rlinks</a>, if present, gives the language of the linked resource. =
It is
+  purely advisory. The value must be a valid BCP 47 language tag. <a =
href=3D#refsBCP47>[BCP47]</a>
+  <span class=3Dimpl>User agents must not consider this attribute =
authoritative — upon
+  fetching the resource, user agents must use only language information =
associated with the resource
+  to determine its language, not metadata included in the link to the re=
source.</span></p>
+
+  <p>The <dfn id=3Dattr-hyperlink-type title=3Dattr-hyperlink-t=
ype><code>type</code></dfn> attribute, if present, g=
ives the
+  <a href=3D#mime-type>MIME type</a> of the linked resource.=
 It is purely advisory. The value must be a
+  <a href=3D#valid-mime-type>valid MIME type</a>. <span c=
lass=3Dimpl>User agents must not consider the <code title=3Dattr-hy=
perlink-type><a href=3D#attr-hyperlink-type>type</a></c=
ode> attribute authoritative — upon fetching the
+  resource, user agents must not use metadata included in the link to th=
e resource to determine its
+  type.</span></p>
+
+
+  <div class=3Dimpl>
+
+  <h4 id=3Dfollowing-hyperlinks-0><span class=3Dsecno>4.8.3 =
</span>Following hyperlinks</h4>
+
+  <p>When a user <dfn id=3Dfollowing-hyperlinks title=3D"f=
ollowing hyperlinks">follows a hyperlink</dfn> created by a=
n element
+  <var title=3D"">subject</var>, the user agent mu=
st run the following steps:</p>
+
+  <ol><li><p>Let <var title=3D"">repla=
ce</var> be false.</li>
+
+   <li><p>Let <var title=3D"">source</var=
> be the <a href=3D#browsing-context>browsing context</a> =
that contains the
+   <code><a href=3D#document>Document</a></code>=
 object with which <var title=3D"">subject</var> in=
 question is
+   associated.</li>
+
+   <li>
+
+    <p>If the user indicated a specific <a href=3D#browsing-con=
text>browsing context</a> when following the hyperlink,
+    or if the user agent is configured to follow hyperlinks by navigatin=
g a particular browsing
+    context, then let <var title=3D"">target</var>=
 be that <a href=3D#browsing-context>browsing context</a>.&lt=
;/p>
+
+    <p>Otherwise, if <var title=3D"">subject</v=
ar> is an <code><a href=3D#the-a-element>a</a></c=
ode> or <code><a href=3D#the-area-element>area</a>&l=
t;/code> element
+    that has a <code title=3Dattr-hyperlink-target><a href=3D#a=
ttr-hyperlink-target>target</a></code> attribute, then let=
 <var title=3D"">target</var> be the <a href=3D#=
browsing-context>browsing context</a> that is chosen by applying=
 <a href=3D#the-rules-for-choosing-a-browsing-context-given-a-browsing=
-context-name>the
+    rules for choosing a browsing context given a browsing context name&=
lt;/a>, using the value of
+    the <code title=3Dattr-hyperlink-target><a href=3D#attr-hyp=
erlink-target>target</a></code> attribute as the browsing =
context name. If
+    these rules result in the creation of a new <a href=3D#browsing-c=
ontext>browsing context</a>, set <var title=3D""&gt=
;replace</var> to true.</p>
+
+    <p>Otherwise, if the hyperlink is a <a href=3D#rel-sidebar-=
hyperlink title=3Drel-sidebar-hyperlink>sidebar
+    hyperlink</a>, the user agent implements a feature that can be=
 considered a <a href=3D#secondary-browsing-context>secondary
+    browsing context</a>, and the user agent intends to use this f=
eature in this instance, let
+    <var title=3D"">target</var> be such a <a h=
ref=3D#secondary-browsing-context>secondary browsing context</a>=
.</p>
+
+    <p>Otherwise, if <var title=3D"">target</va=
r> is an <code><a href=3D#the-a-element>a</a></co=
de> or <code><a href=3D#the-area-element>area</a>&lt=
;/code> element
+    with no <code title=3Dattr-hyperlink-target><a href=3D#attr=
-hyperlink-target>target</a></code> attribute, but the
+    <code><a href=3D#document>Document</a></code&gt=
; contains a <code><a href=3D#the-base-element>base</a>=
</code> element with a <code title=3Dattr-base-target><a h=
ref=3D#attr-base-target>target</a></code> attribute, then =
let <var title=3D"">target</var> be the
+    <a href=3D#browsing-context>browsing context</a> that is=
 chosen by applying <a href=3D#the-rules-for-choosing-a-browsing-conte=
xt-given-a-browsing-context-name>the rules for choosing a browsing
+    context given a browsing context name</a>, using the value of =
the <code title=3Dattr-base-target><a href=3D#attr-base-target&g=
t;target</a></code> attribute of the first such <code>&=
lt;a href=3D#the-base-element>base</a></code> element as
+    the browsing context name. If these rules result in the creation of =
a new <a href=3D#browsing-context>browsing
+    context</a>, set <var title=3D"">replace</v=
ar> to true.</p> <!-- c.f. concept-fs-target -->
+
+    <p>Otherwise, let <var title=3D"">target</v=
ar> be the <a href=3D#browsing-context>browsing context</a&gt=
; that <var title=3D"">subject</var> itself is in.&=
lt;/p>
+
+   </li>
+
+   <li><p><a href=3D#resolve-a-url title=3D"resolve =
a url">Resolve</a> the <a href=3D#url>URL</a> g=
iven by the <code title=3Dattr-hyperlink-href><a href=3D#attr-hy=
perlink-href>href</a></code> attribute of that element, re=
lative to that
+   element.</li>
+
+   <li>
+
+    <p>If that is successful, let <var title=3D"">=
URL</var> be the <a href=3D#resulting-absolute-url>resulting =
absolute
+    URL</a>.</p>
+
+    <p>Otherwise, if <a href=3D#resolve-a-url title=3D"res=
olve a url">resolving</a> the <a href=3D#url>URL</=
a> failed, the
+    user agent may report the error to the user in a user-agent-specific=
 manner, may <a href=3D#queue-a-task>queue a
+    task</a> to <a href=3D#navigate>navigate</a><!-=
-DONAV hyperlink--> the <var title=3D"">target</var=
>
+    <a href=3D#browsing-context>browsing context</a> to an e=
rror page to report the error, or may ignore the error and
+    do nothing. In any case, the user agent must then abort these steps.=
</p>
+
+   </li>
+
+   <li><p>In the case of server-side image maps, append the =
<var><a href=3D#hyperlink-suffix>hyperlink suffix</a>&l=
t;/var> to <var title=3D"">URL</var>.</li>
+
+   <li>
+
+    <p><a href=3D#queue-a-task>Queue a task</a> to &lt=
;a href=3D#navigate>navigate</a><!--DONAV hyperlink--> the=
 <var title=3D"">target</var> <a href=3D#browsin=
g-context>browsing context</a> to <var title=3D""&g=
t;URL</var>. If <var title=3D"">replace</var>=
 is true, the navigation must be performed with <a href=3D#replacement=
-enabled>replacement
+    enabled</a>. The <a href=3D#source-browsing-context>sour=
ce browsing context</a> must be <var title=3D"">sou=
rce</var>.</p>
+
+   </li>
+
+  </ol><p>The <a href=3D#task-source>task source</a=
> for the tasks mentioned above is the <a href=3D#dom-manipulation-=
task-source>DOM manipulation task
+  source</a>.</p>
+
+  </div>
+
+
+<!--DOWNLOAD-->
+
+  <h4 id=3Ddownloading-resources><span class=3Dsecno>4.8.4 &=
lt;/span>Downloading resources</h4>
+
+  <p>In some cases, resources are intended for later use rather th=
an immediate viewing. To indicate
+  that a resource is intended to be downloaded for use later, rather tha=
n immediately used, the
+  <code title=3Dattr-hyperlink-download><a href=3D#attr-hyperli=
nk-download>download</a></code> attribute can be specified=
 on the
+  <code><a href=3D#the-a-element>a</a></code> or=
 <code><a href=3D#the-area-element>area</a></code&gt=
; element that creates the <a href=3D#hyperlink>hyperlink</a>=
 to that
+  resource.</p>
+
+  <p>The attribute can furthermore be given a value, to specify th=
e file name that user agents are
+  to use when storing the resource in a file system. This value can be o=
verridden by the <code title=3Dhttp-content-disposition>Content-Dis=
position</code> HTTP header's filename parameters. <a href=3D#re=
fsRFC6266>[RFC6266]</a></p>
+
+  <p>In cross-origin situations, the <code title=3Dattr-hyperli=
nk-download><a href=3D#attr-hyperlink-download>download</a&gt=
;</code> attribute
+  has to be combined with the <code title=3Dhttp-content-disposition&=
gt;Content-Disposition</code> HTTP
+  header, specifically with the <code title=3D"">attachm=
ent</code> disposition type, to avoid the user
+  being warned of possibly nefarious activity. (This is to protect users=
 from being made to download
+  sensitive personal or confidential information without their full unde=
rstanding.)</p>
+
+  <div class=3Dimpl>
+
+  <hr><p>When a user <dfn id=3Ddownloading-hyperlinks tit=
le=3D"downloading hyperlinks">downloads a hyperlink</dfn&=
gt; created by an
+  element, the user agent must run the following steps:</p>
+
+  <ol><li><p><a href=3D#resolve-a-url title=3D&quot=
;resolve a url">Resolve</a> the <a href=3D#url>URL&lt=
;/a> given by the <code title=3Dattr-hyperlink-href><a href=3D=
#attr-hyperlink-href>href</a></code> attribute of that ele=
ment, relative to that
+   element.</li>
+
+   <li><p>If <a href=3D#resolve-a-url title=3D"resol=
ve a url">resolving</a> the <a href=3D#url>URL</a&=
gt; fails, the user agent
+   may report the error to the user in a user-agent-specific manner, may
+   <a href=3D#navigate>navigate</a><!--DONAV download err=
or--> to an error page to report the error, or may
+   ignore the error and do nothing. In either case, the user agent must =
abort these steps.</p>
+
+   <li><p>Otherwise, let <var title=3D"">URL=
</var> be the resulting <a href=3D#absolute-url>absolute
+   URL</a>.</li>
+
+   <li><p>In the case of server-side image maps, append the =
<var><a href=3D#hyperlink-suffix>hyperlink suffix</a>&l=
t;/var> to <var title=3D"">URL</var>.</li>
+
+   <li><p>Return to whatever algorithm invoked these steps a=
nd continue
+   these steps asynchronously.</li>
+
+   <li><p><a href=3D#fetch>Fetch</a><!--FETCH=
--> <var title=3D"">URL</var> and handle the res=
ulting resource
+   <a href=3D#as-a-download>as a download</a>.</li> &l=
t;!-- http-origin privacy sensitive -->
+
+  </ol><p>When a user agent is to handle a resource obtained=
 from a <a href=3D#fetch>fetch</a> algorithm <dfn id=3Das-=
a-download>as
+  a download</dfn>, it should provide the user with a way to save =
the resource for later use, if a
+  resource is successfully obtained; or otherwise should report any prob=
lems downloading the file to
+  the user.</p>
+
+  <p>If the user agent needs a file name for a resource being hand=
led <a href=3D#as-a-download>as a download</a>, it
+  should select one using the following algorithm.</p>
+
+  <p class=3Dwarning>This algorithm is intended to mitigate securi=
ty dangers involved in downloading
+  files from untrusted sites, and user agents are strongly urged to foll=
ow it.</p> <!-- but it's
+  optional, since it's not really an interoperability issue -->
+
+  <ol><li><p>Let <var title=3D"">filen=
ame</var> be the void value.</li>
+
+   <!-- Content-Disposition: attachment; filename=3D"" is a=
lways honoured, even cross-origin -->
+   <li><p>If the resource has a <code title=3Dhttp-conten=
t-disposition>Content-Disposition</code>
+   header, that header specifies the <code title=3D"">at=
tachment</code> disposition type, and the
+   header includes file name information, then let <var title=3D&quot=
;">filename</var> have the value
+   specified by the header, and jump to the step labeled <i>saniti=
ze</i> below. <a href=3D#refsRFC6266>[RFC6266]</a></=
li>
+
+   <li><p>Let <var title=3D"">interface orig=
in</var> be the <a href=3D#origin>origin</a> of the
+   <code><a href=3D#document>Document</a></code>=
 in which the <a href=3D#downloading-hyperlinks title=3D"download=
ing hyperlinks">download</a> or
+   <a href=3D#navigate>navigate</a> action resulting in the =
download was initiated, if any.</li>
+
+   <li><p>Let <var title=3D"">resource origi=
n</var> be the <a href=3D#origin>origin</a> of the URL =
of the
+   resource being downloaded, unless that URL's <a href=3D#concept-ur=
l-scheme title=3Dconcept-url-scheme>scheme</a>
+   component is <code title=3D"">data</code>, in w=
hich case let <var title=3D"">resource origin</var>=
 be
+   the same as the <var title=3D"">interface origin</=
var>, if any.</li>
+
+   <li><p>If there is no <var title=3D"">int=
erface origin</var>, then let <var title=3D"">trust=
ed
+   operation</var> be true. Otherwise, let <var title=3D"&=
quot;>trusted operation</var> be true if <var title=3D"&=
quot;>resource origin</var> is the <a href=3D#same-origin>=
same origin</a> as <var title=3D"">interface
+   origin</var>, and false otherwise.</li>
+
+   <!-- Content-Disposition: *; filename=3D"" overrides dow=
nload=3D"" for same-origin -->
+   <li><p>If <var title=3D"">trusted operati=
on</var> is true and the resource has a <code title=3Dhttp-conte=
nt-disposition>Content-Disposition</code> header and that header=
 includes file
+   name information, then let <var title=3D"">filename&l=
t;/var> have the value specified by the header,
+   and jump to the step labeled <i>sanitize</i> below. <a=
 href=3D#refsRFC6266>[RFC6266]</a></li>
+
+   <li><p>If the download was not initiated from a <a hre=
f=3D#hyperlink>hyperlink</a> created by an
+   <code><a href=3D#the-a-element>a</a></code> o=
r <code><a href=3D#the-area-element>area</a></code&g=
t; element, or if the element of the <a href=3D#hyperlink>hyperlink=
</a> from
+   which it was initiated did not have a <code title=3Dattr-hyperlink=
-download><a href=3D#attr-hyperlink-download>download</a>&=
lt;/code>
+   attribute when the download was initiated, or if there was such an at=
tribute but its value when
+   the download was initiated was the empty string, then jump to the ste=
p labeled <i>no proposed
+   file name</i>.</li>
+
+   <li><p>Let <var title=3D"">proposed filen=
ame</var> have the value of the <code title=3Dattr-hyperlink-dow=
nload><a href=3D#attr-hyperlink-download>download</a></=
code> attribute of the element of the
+   <a href=3D#hyperlink>hyperlink</a> that initiated the dow=
nload at the time the download was
+   initiated.</li>
+
+   <!-- download=3D"" works for all links when same-origin =
-->
+   <!-- it is not used cross-origin, though, even for explicit user g=
estures -->
+   <!-- (except... see next step) -->
+   <li><p>If <var title=3D"">trusted operati=
on</var> is true, let <var title=3D"">filename</=
var> have
+   the value of <var title=3D"">proposed filename</va=
r>, and jump to the step labeled <i>sanitize</i>
+   below.</li>
+
+   <!-- Content-Disposition: attachment with no filename=3D"&quo=
t; allows download=3D"" cross-origin -->
+   <li><p>If the resource has a <code title=3Dhttp-conten=
t-disposition>Content-Disposition</code>
+   header and that header specifies the <code title=3D""&gt=
;attachment</code> disposition type, let <var title=3D"&quo=
t;>filename</var> have the value of <var title=3D""=
>proposed filename</var>, and jump to the
+   step labeled <i>sanitize</i> below. <a href=3D#refsRFC=
6266>[RFC6266]</a></li>
+
+   <!-- fallback for same-origin resources or explicit downloads: use=
 the resource's file name -->
+   <li><p><i>No proposed file name</i>: If <v=
ar title=3D"">trusted operation</var> is true, or if t=
he
+   user indicated a preference for having the resource in question downl=
oaded, let <var title=3D"">filename</var> have a va=
lue derived from the <a href=3D#url>URL</a> of the resource i=
n a
+   user-agent-defined manner, and jump to the step labeled <i>sani=
tize</i> below.</li>
+
+   <!-- no C-D: a header on cross-origin raises red flags -->
+   <li>
+
+    <p>Act in a user-agent-defined manner to safeguard the user fr=
om a potentially hostile
+    cross-origin download. If the download is not to be aborted, then le=
t <var title=3D"">filename</var> be set to the user=
's preferred file name or to a file name selected by
+    the user agent, and jump to the step labeled <i>sanitize</i=
> below.</p>
+
+    <div class=3Dwarning>
+
+     <p>If the algorithm reaches this step, then a download was be=
gun from a different origin than
+     the resource being downloaded, and the origin did not mark the file=
 as suitable for
+     downloading, and the download was not initiated by the user. This c=
ould be because a <code title=3Dattr-hyperlink-download><a href=3D=
#attr-hyperlink-download>download</a></code> attribute was=
 used to trigger the download, or
+     because the resource in question is not of a type that the user age=
nt supports.</p>
+
+     <p>This could be dangerous, because, for instance, a hostile =
server could be trying to get a
+     user to unknowingly download private information and then re-upload=
 it to the hostile server,
+     by tricking the user into thinking the data is from the hostile ser=
ver.</p>
+
+     <p>Thus, it is in the user's interests that the user be someh=
ow notified that the resource in
+     question comes from quite a different source, and to prevent confus=
ion, any suggested file name
+     from the potentially hostile <var title=3D"">interf=
ace origin</var> should be ignored.</p>
+
+    </div>
+
+   </li>
+
+   <li><p><i>Sanitize</i>: Optionally, allow the=
 user to influence <var title=3D"">filename</var>. =
For
+   example, a user agent could prompt the user for a file name, potentia=
lly providing the value of
+   <var title=3D"">filename</var> as determined ab=
ove as a default value.</li>
+
+   <li>
+
+    <p>Adjust <var title=3D"">filename</var>=
 to be suitable for the local file system.</p>
+
+    <p class=3Dexample>For example, this could involve removing ch=
aracters that are not legal in
+    file names, or trimming leading and trailing whitespace.</p>
+
+   </li>
+
+   <li><p>If the platform conventions do not in any way use =
<a href=3D#concept-extension title=3Dconcept-extension>extensions&l=
t;/a> to determine the types of file on the file system,
+   then return <var title=3D"">filename</var> as t=
he file name and abort these steps.</li>
+
+   <li><p>Let <var title=3D"">claimed type&l=
t;/var> be the type given by the resource's <a href=3D#content-type=
 title=3DContent-Type>Content-Type metadata</a>, if any is known=
. Let <var title=3D"">named
+   type</var> be the type given by <var title=3D""&gt=
;filename</var>'s <a href=3D#concept-extension title=3Dconcept-e=
xtension>extension</a>, if any is known. For the purposes of thi=
s step, a
+   <i>type</i> is a mapping of a <a href=3D#mime-type>=
MIME type</a> to an <a href=3D#concept-extension title=3Dconcept=
-extension>extension</a>.</li>
+
+   <li><p>If <var title=3D"">named type</=
var> is consistent with the user's preferences (e.g. because
+   the value of <var title=3D"">filename</var> was=
 determined by prompting the user), then return <var title=3D"&qu=
ot;>filename</var> as the file name and abort these steps.</l=
i>
+
+   <li><p>If <var title=3D"">claimed type&lt=
;/var> and <var title=3D"">named type</var> are =
the same type
+   (i.e. the type given by the resource's <a href=3D#content-type tit=
le=3DContent-Type>Content-Type metadata</a> is
+   consistent with the type given by <var title=3D"">fil=
ename</var>'s <a href=3D#concept-extension title=3Dconcept-exten=
sion>extension</a>), then return <var title=3D""&gt=
;filename</var> as the file
+   name and abort these steps.</li>
+
+   <li>
+
+    <p>If the <var title=3D"">claimed type</var=
> is known, then alter <var title=3D"">filename</va=
r> to
+    add an <a href=3D#concept-extension title=3Dconcept-extension>=
extension</a> corresponding to <var title=3D"">clai=
med
+    type</var>.</p>
+
+    <p>Otherwise, if <var title=3D"">named type&lt=
;/var> is known to be potentially dangerous (e.g. it
+    will be treated by the platform conventions as a native executable, =
shell script, HTML
+    application, or executable-macro-capable document) then optionally a=
lter <var title=3D"">filename</var> to add a known-=
safe <a href=3D#concept-extension title=3Dconcept-extension>extensi=
on</a>
+    (e.g. "<code title=3D"">.txt</code>"=
).</p>
+
+    <p class=3Dnote>This last step would make it impossible to dow=
nload executables, which might not
+    be desirable. As always, implementors are forced to balance security=
 and usability in this
+    matter.</p>
+
+   </li>
+
+   <li><p>Return <var title=3D"">filename&lt=
;/var> as the file name.</li>
+
+  </ol><p>For the purposes of this algorithm, a file <dfn=
 id=3Dconcept-extension title=3Dconcept-extension>extension</dfn&gt=
;
+  consists of any part of the file name that platform conventions dictat=
e will be used for
+  identifying the type of the file. For example, many operating systems =
use the part of the file
+  name following the last dot ("<code title=3D"">.&=
lt;/code>") in the file name to determine the type of
+  the file, and from that the manner in which the file is to be opened o=
r executed.</p>
+
+  <p>User agents should ignore any directory or path information p=
rovided by the resource itself,
+  its <a href=3D#url>URL</a>, and any <code title=3Dattr-=
hyperlink-download><a href=3D#attr-hyperlink-download>download&l=
t;/a></code> attribute, in
+  deciding where to store the resulting file in the user's file system.&=
lt;/p>
+
+  </div>
+
+
+<!--PING-->
+
+  <div class=3Dimpl>
+
+  <h5 id=3Dhyperlink-auditing><span class=3Dsecno>4.8.4.1 &l=
t;/span><dfn>Hyperlink auditing</dfn></h5>
+
+  <p>If a <a href=3D#hyperlink>hyperlink</a> created b=
y an <code><a href=3D#the-a-element>a</a></code> =
or <code><a href=3D#the-area-element>area</a></code&=
gt; element has a
+  <code title=3Dattr-hyperlink-ping><a href=3D#ping>ping<=
/a></code> attribute, and the user follows the hyperlink, and
+  the value of the element's <code title=3Dattr-hyperlink-href>&lt=
;a href=3D#attr-hyperlink-href>href</a></code> attribute c=
an be <a href=3D#resolve-a-url title=3D"resolve a url">re=
solved</a>, relative to the element, without failure, then the user
+  agent must take the <code title=3Dattr-hyperlink-ping><a href=
=3D#ping>ping</a></code> attribute's value, <a href=3D#=
split-a-string-on-spaces title=3D"split a string on spaces">=
split that string on spaces</a>, <a href=3D#resolve-a-url title=3D=
"resolve a
+  url">resolve</a> each resulting token relative to the el=
ement, and then each of the resulting
+  <a href=3D#absolute-url title=3D"absolute URL">absolut=
e URLs</a> should be <a href=3D#fetch title=3Dfetch>fetched&l=
t;/a><!--FETCH--> from the <a href=3D#origin>origin</a&=
gt; of the <code><a href=3D#document>Document</a></c=
ode>
+  containing the <a href=3D#hyperlink>hyperlink</a> <!-- =
not http-origin privacy sensitive --> (as described
+  below). (Tokens that fail to resolve are ignored.) This may be done in=
 parallel with the primary
+  request, and is independent of the result of that request.</p>
+
+  <p>User agents should allow the user to adjust this behavior, fo=
r example in conjunction with a
+  setting that disables the sending of HTTP <code title=3Dhttp-refere=
r>Referer</code> (sic) headers.
+  Based on the user's preferences, UAs may either <a href=3D#ignore&g=
t;ignore</a> the <code title=3Dattr-hyperlink-ping><a href=
=3D#ping>ping</a></code> attribute altogether, or selectiv=
ely ignore URLs in the
+  list (e.g. ignoring any third-party URLs).</p>
+
+  <p>For URLs that are HTTP URLs, the requests must be performed u=
sing the POST method, with an
+  entity body with the <a href=3D#mime-type>MIME type</a> &l=
t;code><a href=3D#text/ping>text/ping</a></code> con=
sisting of the
+  four-character string "<code title=3D"">PING</=
code>". All relevant cookie and HTTP authentication
+  headers must be included in the request. Which other headers are requi=
red depends on the URLs
+  involved.</p>
+
+  <dl class=3Dswitch><dt>If both the <a href=3D"#the=
-document's-address" title=3D"the document's address">a=
ddress</a> of the <code><a href=3D#document>Document&lt=
;/a></code>
+   object containing the hyperlink being audited and the ping URL have t=
he <a href=3D#same-origin>same
+   origin</a></dt>
+
+   <dd>The request must include a <code title=3Dhttp-ping-from&=
gt;<a href=3D#ping-from>Ping-From</a></code> HTTP heade=
r with, as
+   its value, the <a href=3D"#the-document's-address" title=
=3D"the document's address">address</a> of the documen=
t containing the
+   hyperlink, and a <code title=3Dhttp-ping-to><a href=3D#ping-=
to>Ping-To</a></code> HTTP header with, as its value, the
+   address of the <a href=3D#absolute-url>absolute URL</a> o=
f the target of the hyperlink. The request must not
+   include a <code title=3Dhttp-referer>Referer</code> (sic)=
 HTTP header. <!-- because otherwise it
+   would look like a trustable same-origin POST --></dd>
+
+   <dt>Otherwise, if the origins are different, but the document c=
ontaining the hyperlink being
+   audited was not retrieved over an encrypted connection</dt>
+
+   <dd>The request must include a <code title=3Dhttp-referer&gt=
;Referer</code> (sic) HTTP header with,
+   as its value, the <a href=3D"#the-document's-address" ti=
tle=3D"the document's address">address</a> of the docu=
ment containing
+   the hyperlink, a <code title=3Dhttp-ping-from><a href=3D#pin=
g-from>Ping-From</a></code> HTTP header with the same valu=
e,
+   and a <code title=3Dhttp-ping-to><a href=3D#ping-to>Ping-=
To</a></code> HTTP header with, as its value, the address of
+   the target of the hyperlink.</dd>
+
+   <dt>Otherwise, the origins are different and the document conta=
ining the hyperlink being audited
+   was retrieved over an encrypted connection</dt>
+
+   <dd>The request must include a <code title=3Dhttp-ping-to&gt=
;<a href=3D#ping-to>Ping-To</a></code> HTTP header with=
, as its
+   value, the address of the target of the hyperlink. The request must n=
either include a <code title=3Dhttp-referer>Referer</code> (s=
ic) HTTP header nor include a <code title=3Dhttp-ping-from><a hr=
ef=3D#ping-from>Ping-From</a></code> HTTP header.</dd&g=
t;
+
+  </dl><p class=3Dnote>To save bandwidth, implementors might=
 also wish to consider omitting optional
+  headers such as <code>Accept</code> from these requests.&l=
t;/p>
+
+  <p>User agents must, unless otherwise specified by the user, hon=
or the HTTP headers (including, in
+  particular, redirects and HTTP cookie headers), but must ignore any en=
tity bodies returned in the
+  responses. User agents may close the connection prematurely once they =
start receiving an entity
+  body. <a href=3D#refsCOOKIES>[COOKIES]</a></p>
+
+  <p>When the <code title=3Dattr-hyperlink-ping><a href=3D=
#ping>ping</a></code> attribute is present, user agents sh=
ould
+  clearly indicate to the user that following the hyperlink will also ca=
use secondary requests to be
+  sent in the background, possibly including listing the actual target U=
RLs.</p>
+
+  <p class=3Dexample>For example, a visual user agent could includ=
e the hostnames of the target ping
+  URLs along with the hyperlink's actual URL in a status bar or tooltip.=
</p>
+
+  </div>
+
+  <div class=3Dnote>
+
+   <p>The <code title=3Dattr-hyperlink-ping><a href=3D#pi=
ng>ping</a></code> attribute is redundant with pre-existin=
g
+   technologies like HTTP redirects and JavaScript in allowing Web pages=
 to track which off-site
+   links are most popular or allowing advertisers to track click-through=
 rates.</p>
+
+   <p>However, the <code title=3Dattr-hyperlink-ping><a h=
ref=3D#ping>ping</a></code> attribute provides these advan=
tages
+   to the user over those alternatives:</p>
+
+   <ul><li>It allows the user to see the final target URL un=
obscured.</li>
+
+    <li>It allows the UA to inform the user about the out-of-band =
notifications.</li>
+
+    <li>It allows the user to disable the notifications without lo=
sing the underlying link
+    functionality.</li>
+
+    <li>It allows the UA to optimize the use of available network =
bandwidth so that the target page
+    loads faster.</li>
+
+   </ul><p>Thus, while it is possible to track users without=
 this feature, authors are encouraged to use
+   the <code title=3Dattr-hyperlink-ping><a href=3D#ping>pin=
g</a></code> attribute so that the user agent can make the
+   user experience more transparent.</p>
+
+  </div>
+
+  <!-- resolving ping urls happens at audit time, so base URL changes=
 affect the values of ping
+  attributes -->
+
+
+
+  <h4 id=3DlinkTypes><span class=3Dsecno>4.8.5 </span>=
Link types</h4>
+
+  <p>The following table summarizes the link types that are define=
d by this specification. This
+  table is non-normative; the actual definitions for the link types are =
given in the next few
+  sections.</p>
+
+  <p>In this section, the term <i>referenced document</i&=
gt; refers to the resource identified by the
+  element representing the link, and the term <i>current document&=
lt;/i> refers to the resource within
+  which the element representing the link finds itself.</p>
+
+  <div class=3Dimpl>
+
+  <p>To determine which link types apply to a <code><a hr=
ef=3D#the-link-element>link</a></code>, <code><a =
href=3D#the-a-element>a</a></code>, or
+  <code><a href=3D#the-area-element>area</a></code&=
gt; element, the element's <code title=3D"">rel</code&=
gt; attribute must be <a href=3D#split-a-string-on-spaces title=3D&quo=
t;split a string on spaces">split on spaces</a>. The result=
ing tokens are the link types
+  that apply to that element.</p>
+
+  </div>
+
+  <p>Except where otherwise specified, a keyword must not be speci=
fied more than once per <code title=3Dattr-hyperlink-rel><a href=
=3D#attr-hyperlink-rel>rel</a></code> attribute.</p>
+
+  <p>Link types are always <a href=3D#ascii-case-insensitive&gt=
;ASCII case-insensitive</a><span class=3Dimpl>, and must be
+  compared as such</span>.</p>
+
+  <p class=3Dexample>Thus, <code title=3D"">rel=3D=
"next"</code> is the same as <code title=3D"&quot=
;>rel=3D"NEXT"</code>.</p>
+
+  <table><thead><tr><th rowspan=3D2>Link type&lt=
;/th>
+     <th colspan=3D2>Effect on...</th>
+     <th rowspan=3D2>Brief description</th>
+    <tr><th><code><a href=3D#the-link-element>li=
nk</a></code></th>
+     <th><code><a href=3D#the-a-element>a</a>&lt=
;/code> and <code><a href=3D#the-area-element>area</a&g=
t;</code></th>
+    <tbody><tr><td><code title=3Drel-alternate>&=
lt;a href=3D#rel-alternate>alternate</a></code></td>=
 <!-- second most used <link rel> value -->
+     <td><a href=3D#hyperlink>Hyperlink</a></td>
+     <td><a href=3D#hyperlink>Hyperlink</a></td>
+     <td>Gives alternate representations of the current document.&=
lt;/td>
+    <tr><td><code title=3Drel-author><a href=3D#lin=
k-type-author>author</a></code></td>
+     <td><a href=3D#hyperlink>Hyperlink</a></td>
+     <td><a href=3D#hyperlink>Hyperlink</a></td>
+     <td>Gives a link to the author of the current document or art=
icle.</td>
+    <tr><td><code title=3Drel-bookmark><a href=3D#l=
ink-type-bookmark>bookmark</a></code></td> <!-- f=
ourth most used <a rel> value -->
+     <td><em>not allowed</em></td>
+     <td><a href=3D#hyperlink>Hyperlink</a></td>
+     <td>Gives the permalink for the nearest ancestor section.<=
/td>
+    </tr><!-- <code title=3D"rel-contact">conta=
ct</code></td> is not here because it's XFN (8th most used &l=
t;a rel> value) --><!-- fifth and sixth most used <a rel> =
value (sixth is "external nofollow") --><tr><td>=
<code title=3Drel-external><a href=3D#link-type-external>exte=
rnal</a></code></td>
+     <td><em>not allowed</em></td>
+     <td><a href=3D#hyperlink>Hyperlink</a></td>
+     <td>Indicates that the referenced document is not part of the=
 same site as the current document.</td>
+    <tr><td><code title=3Drel-help><a href=3D#link-=
type-help>help</a></code></td>
+     <td><a href=3D#hyperlink>Hyperlink</a></td>
+     <td><a href=3D#hyperlink>Hyperlink</a></td>
+     <td>Provides a link to context-sensitive help.</td>
+    <tr><td><code title=3Drel-icon><a href=3D#rel-i=
con>icon</a></code></td> <!-- link rel=3D"sh=
ortcut icon" and its ilk are the fourth, sixth, and ninth most used =
values -->
+     <td><a href=3D#external-resource-link title=3D"extern=
al resource link">External Resource</a></td>
+     <td><em>not allowed</em></td>
+     <td>Imports an icon to represent the current document.</td=
>
+    <tr><td><code title=3Drel-license><a href=3D#li=
nk-type-license>license</a></code></td> <!-- seve=
nth most used <a rel> value -->
+     <td><a href=3D#hyperlink>Hyperlink</a></td>
+     <td><a href=3D#hyperlink>Hyperlink</a></td>
+     <td>Indicates that the main content of the current document i=
s covered by the copyright license described by the referenced document.&=
lt;/td>
+    <tr><td><code title=3Drel-next><a href=3D#link-=
type-next>next</a></code></td>
+     <td><a href=3D#hyperlink>Hyperlink</a></td>
+     <td><a href=3D#hyperlink>Hyperlink</a></td>
+     <td>Indicates that the current document is a part of a series=
, and that the next document in the series is the referenced document.&lt=
;/td>
+    <tr><td><code title=3Drel-nofollow><a href=3D#l=
ink-type-nofollow>nofollow</a></code></td> <!-- m=
ost used <a rel> value (and sixth most used is "external nofol=
low") -->
+     <td><em>not allowed</em></td>
+     <td><a href=3D#hyperlink-annotation title=3D"hyperlin=
k annotation">Annotation</a></td>
+     <td>Indicates that the current document's original author or =
publisher does not endorse the referenced document.</td>
+    <tr><td><code title=3Drel-noreferrer><a href=3D=
#link-type-noreferrer>noreferrer</a></code></td>
+     <td><em>not allowed</em></td>
+     <td><a href=3D#hyperlink-annotation title=3D"hyperlin=
k annotation">Annotation</a></td>
+     <td>Requires that the user agent not send an HTTP <code ti=
tle=3Dhttp-referer>Referer</code> (sic) header if the user follo=
ws the hyperlink.</td>
+    <tr><td><code title=3Drel-pingback><a href=3D#l=
ink-type-pingback>pingback</a></code></td>
+     <td><a href=3D#external-resource-link title=3D"extern=
al resource link">External Resource</a></td>
+     <td><em>not allowed</em></td>
+     <td>Gives the address of the pingback server that handles pin=
gbacks to the current document.</td>
+    <tr><td><code title=3Drel-prefetch><a href=3D#l=
ink-type-prefetch>prefetch</a></code></td>
+     <td><a href=3D#external-resource-link title=3D"extern=
al resource link">External Resource</a></td>
+     <td><a href=3D#external-resource-link title=3D"extern=
al resource link">External Resource</a></td>
+     <td>Specifies that the target resource should be preemptively=
 cached.</td>
+    <tr><td><code title=3Drel-prev><a href=3D#link-=
type-prev>prev</a></code></td> <!-- prev is used =
more than previous -->
+     <td><a href=3D#hyperlink>Hyperlink</a></td>
+     <td><a href=3D#hyperlink>Hyperlink</a></td>
+     <td>Indicates that the current document is a part of a series=
, and that the previous document in the series is the referenced document=
.</td>
+    <tr><td><code title=3Drel-search><a href=3D#lin=
k-type-search>search</a></code></td> <!-- used qu=
ite a bit -->
+     <td><a href=3D#hyperlink>Hyperlink</a></td>
+     <td><a href=3D#hyperlink>Hyperlink</a></td>
+     <td>Gives a link to a resource that can be used to search thr=
ough the current document and its related pages.</td>
+    <tr><td><code title=3Drel-sidebar><a href=3D#li=
nk-type-sidebar>sidebar</a></code></td> <!-- used=
 quite a bit -->
+     <td><a href=3D#hyperlink>Hyperlink</a></td>
+     <td><a href=3D#hyperlink>Hyperlink</a></td>
+     <td>Specifies that the referenced document, if retrieved, is =
intended to be shown in the browser's sidebar (if it has one).</td>
+    <tr><td><code title=3Drel-stylesheet><a href=3D=
#link-type-stylesheet>stylesheet</a></code></td> &lt=
;!-- most commonly used <link rel> value, variants came in 7th, 8th=
, 12th, 17th... -->
+     <td><a href=3D#external-resource-link title=3D"extern=
al resource link">External Resource</a></td>
+     <td><em>not allowed</em></td>
+     <td>Imports a stylesheet.</td>
+    <tr><td><code title=3Drel-tag><a href=3D#link-t=
ype-tag>tag</a></code></td> <!-- second and third=
 most used <a rel> value (third is technically "category tag&q=
uot;). -->
+     <td><em>not allowed</em></td>
+     <td><a href=3D#hyperlink>Hyperlink</a></td>
+     <td>Gives a tag (identified by the given address) that applie=
s to the current document.</td>
+    </table><div class=3Dimpl>
+
+  <p>Some of the types described below list synonyms for these val=
ues. These <!--<span
+  class=3D"impl">-->are to be handled as specified by us=
er agents, but<!--</span>--> must not be used
+  in documents.</p>
+
+  </div>
+
+  <!-- v2 ideas:
+   * rel=3D"related" // see also
+   * http://microformats.org/wiki/rel-enclosure
+  -->
+
+
+  <h5 id=3Drel-alternate><span class=3Dsecno>4.8.5.1 </sp=
an>Link type "<dfn title=3Drel-alternate><code>altern=
ate</code></dfn>"</h5>
+
+  <p>The <code title=3Drel-alternate><a href=3D#rel-alter=
nate>alternate</a></code> keyword may be used with <cod=
e><a href=3D#the-link-element>link</a></code>,
+  <code><a href=3D#the-a-element>a</a></code>, a=
nd <code><a href=3D#the-area-element>area</a></code&=
gt; elements.</p>
+
+  <p>The meaning of this keyword depends on the values of the othe=
r attributes.</p>
+
+  <dl class=3Dswitch><dt>If the element is a <code>&lt=
;a href=3D#the-link-element>link</a></code> element and th=
e <code title=3Dattr-link-rel><a href=3D#attr-link-rel>rel&lt=
;/a></code>
+   attribute also contains the keyword <code title=3Drel-stylesheet&g=
t;<a href=3D#link-type-stylesheet>stylesheet</a></code>=
</dt>
+
+   <dd>
+
+    <p>The <code title=3Drel-alternate><a href=3D#rel-alt=
ernate>alternate</a></code> keyword modifies the meaning o=
f the <code title=3Drel-stylesheet><a href=3D#link-type-styleshe=
et>stylesheet</a></code> keyword in the way described for =
that keyword. The
+    <code title=3Drel-alternate><a href=3D#rel-alternate>alt=
ernate</a></code> keyword does not create a link of its own.&=
lt;/p>
+
+   </dd>
+
+
+   <dt>If the <code title=3Drel-alternate><a href=3D#rel-=
alternate>alternate</a></code> keyword is used with the &l=
t;code title=3Dattr-hyperlink-type><a href=3D#attr-hyperlink-type&g=
t;type</a></code> attribute set to the value <code title=3D=
"">application/rss+xml</code> or the value <code ti=
tle=3D"">application/atom+xml</code></dt>
+
+   <dd>
+
+    <p>The keyword creates a <a href=3D#hyperlink>hyperlink&=
lt;/a> referencing a syndication feed (though not
+    necessarily syndicating exactly the same content as the current page=
).</p>
+
+    <div class=3Dimpl>
+
+    <p>The first <code><a href=3D#the-link-element>lin=
k</a></code>, <code><a href=3D#the-a-element>a&lt=
;/a></code>, or <code><a href=3D#the-area-element>ar=
ea</a></code> element in the document (in
+    tree order) with the <code title=3Drel-alternate><a href=3D=
#rel-alternate>alternate</a></code> keyword used with the =
<code title=3Dattr-hyperlink-type><a href=3D#attr-hyperlink-type=
>type</a></code> attribute set to the value <code title=
=3D"">application/rss+xml</code> or the value <code=
 title=3D"">application/atom+xml</code> must
+    be treated as the default syndication feed for the purposes of feed =
autodiscovery.</p>
+
+    <div class=3Dexample>
+     <p>The following <code><a href=3D#the-link-element&g=
t;link</a></code> element gives the syndication
+     feed for the current page:</p>
+     <pre><link rel=3D"alternate" type=3D"ap=
plication/atom+xml" href=3D"data.xml"></pre>
+     <p>The following extract offers various different syndication
+     feeds:</p>
+     <pre><p>You can access the planets database usi=
ng Atom feeds:</p>
+<ul>
+ <li><a href=3D"recently-visited-planets.xml&q=
uot; rel=3D"alternate" type=3D"application/atom+xml"&=
amp;gt;Recently Visited Planets</a></li>
+ <li><a href=3D"known-bad-planets.xml" re=
l=3D"alternate" type=3D"application/atom+xml">=
Known Bad Planets</a></li>
+ <li><a href=3D"unexplored-planets.xml" r=
el=3D"alternate" type=3D"application/atom+xml"&gt=
;Unexplored Planets</a></li>
+</ul></pre>
+    </div>
+
+    </div>
+
+   </dd>
+
+
+   <dt>Otherwise</dt>
+
+   <dd>
+
+    <p>The keyword creates a <a href=3D#hyperlink>hyperlink&=
lt;/a> referencing an alternate representation of the
+    current document.</p>
+
+    <p>The nature of the referenced document is given by the <c=
ode title=3Dattr-hyperlink-hreflang><a href=3D#attr-hyperlink-hrefl=
ang>hreflang</a></code>, and <code title=3Dattr-hyperli=
nk-type><a href=3D#attr-hyperlink-type>type</a></code&g=
t; attributes.</p>
+
+    <p>If the <code title=3Drel-alternate><a href=3D#rel-=
alternate>alternate</a></code> keyword is used with the &l=
t;code title=3Dattr-hyperlink-hreflang><a href=3D#attr-hyperlink-hr=
eflang>hreflang</a></code> attribute, and that attribute's=
 value differs
+    from the <a href=3D#root-element>root element</a>'s <=
a href=3D#language>language</a>, it indicates that the reference=
d
+    document is a translation.</p>
+
+    <p>If the <code title=3Drel-alternate><a href=3D#rel-=
alternate>alternate</a></code> keyword is used with the &l=
t;code title=3Dattr-hyperlink-type><a href=3D#attr-hyperlink-type&g=
t;type</a></code> attribute, it indicates that the referenced=
 document is
+    a reformulation of the current document in the specified format.<=
/p>
+
+    <p>The <code title=3Dattr-hyperlink-hreflang><a href=3D=
#attr-hyperlink-hreflang>hreflang</a></code> and <code =
title=3Dattr-hyperlink-type><a href=3D#attr-hyperlink-type>type&=
lt;/a></code> attributes can be combined when specified with the=
 <code title=3Drel-alternate><a href=3D#rel-alternate>alterna=
te</a></code> keyword.</p>
+
+    <div class=3Dexample>
+
+     <p>For example, the following link is a French translation th=
at uses the PDF format:</p>
+
+     <pre><link rel=3Dalternate type=3Dapplication/pdf href=
lang=3Dfr href=3Dmanual-fr></pre>
+
+    </div>
+
+    <p>This relationship is transitive — that is, if a d=
ocument links to two other documents
+    with the link type "<code title=3Drel-alternate><a hre=
f=3D#rel-alternate>alternate</a></code>", then, in ad=
dition to implying
+    that those documents are alternative representations of the first do=
cument, it is also implying
+    that those two documents are alternative representations of each oth=
er.</p>
+
+   </dd>
+
+  </dl><h5 id=3Dlink-type-author><span class=3Dsecno>4=
.8.5.2 </span>Link type "<dfn title=3Drel-author><cod=
e>author</code></dfn>"</h5>
+
+  <p>The <code title=3Drel-author><a href=3D#link-type-au=
thor>author</a></code> keyword may be used with <code&g=
t;<a href=3D#the-link-element>link</a></code>,
+  <code><a href=3D#the-a-element>a</a></code>, a=
nd <code><a href=3D#the-area-element>area</a></code&=
gt; elements. This keyword creates a <a href=3D#hyperlink>hyperlink=
</a>.</p>
+
+  <p>For <code><a href=3D#the-a-element>a</a>&lt=
;/code> and <code><a href=3D#the-area-element>area</a&g=
t;</code> elements, the <code title=3Drel-author><a href=3D=
#link-type-author>author</a></code>
+  keyword indicates that the referenced document provides further inform=
ation about the author of
+  the nearest <code><a href=3D#the-article-element>article&l=
t;/a></code> element ancestor of the element defining the hyperl=
ink, if there
+  is one, or of the page as a whole, otherwise.</p>
+
+  <p>For <code><a href=3D#the-link-element>link</a&=
gt;</code> elements, the <code title=3Drel-author><a href=3D=
#link-type-author>author</a></code> keyword indicates
+  that the referenced document provides further information about the au=
thor for the page as a
+  whole.</p>
+
+  <p class=3Dnote>The "referenced document" can be, and =
often is, a <code title=3D"">mailto:</code>
+  URL giving the e-mail address of the author. <a href=3D#refsMAILTO&=
gt;[MAILTO]</a></p>
+
+  <div class=3Dimpl>
+
+  <p><strong>Synonyms</strong>: For historical reasons=
, user agents must also treat
+  <code><a href=3D#the-link-element>link</a></code&=
gt;, <code><a href=3D#the-a-element>a</a></code>,=
 and <code><a href=3D#the-area-element>area</a></cod=
e> elements that have a <code title=3D"">rev</code&=
gt; attribute with the value "<code>made</code>" as=
 having the <code title=3Drel-author><a href=3D#link-type-author=
>author</a></code> keyword specified as a link relationshi=
p.</p>
+
+  </div>
+
+
+  <h5 id=3Dlink-type-bookmark><span class=3Dsecno>4.8.5.3 &l=
t;/span>Link type "<dfn title=3Drel-bookmark><code>bo=
okmark</code></dfn>"</h5>
+
+  <p>The <code title=3Drel-bookmark><a href=3D#link-type-=
bookmark>bookmark</a></code> keyword may be used with <=
code><a href=3D#the-a-element>a</a></code> and
+  <code><a href=3D#the-area-element>area</a></code&=
gt; elements. This keyword creates a <a href=3D#hyperlink>hyperlink=
</a>.</p>
+
+  <p>The <code title=3Drel-bookmark><a href=3D#link-type-=
bookmark>bookmark</a></code> keyword gives a permalink for=
 the nearest
+  ancestor <code><a href=3D#the-article-element>article</=
a></code> element of the linking element in question, or of <=
a href=3D#associatedSection>the section the linking element is most cl=
osely associated with</a>, if
+  there are no ancestor <code><a href=3D#the-article-element&gt=
;article</a></code> elements.</p>
+
+  <div class=3Dexample>
+
+   <p>The following snippet has three permalinks. A user agent cou=
ld determine which permalink
+   applies to which part of the spec by looking at where the permalinks =
are given.</p>
+
+   <pre> ...
+ <body>
+  <h1>Example of permalinks</h1>
+  <div id=3D"a">
+   <h2>First example</h2>
+   <p><a href=3D"a.html" rel=3D"book=
mark">This</a> permalink applies to
+   only the content from the first H2 to the second H2. The DIV isn't
+   exactly that section, but it roughly corresponds to it.</p&amp=
;gt;
+  </div>
+  <h2>Second example</h2>
+  <article id=3D"b">
+   <p><a href=3D"b.html" rel=3D"book=
mark">This</a> permalink applies to
+   the outer ARTICLE element (which could be, e.g., a blog post).&lt=
;/p>
+   <article id=3D"c">
+    <p><a href=3D"c.html" rel=3D"boo=
kmark">This</a> permalink applies to
+    the inner ARTICLE element (which could be, e.g., a blog comment).&am=
p;lt;/p>
+   </article>
+  </article>
+ </body>
+ ...</pre>
+
+  </div>
+
+
+  <h5 id=3Dlink-type-external><span class=3Dsecno>4.8.5.4 &l=
t;/span>Link type "<dfn title=3Drel-external><code>ex=
ternal</code></dfn>"</h5>
+  <!-- fifth and sixth most used <a rel> value (sixth is "=
external nofollow") -->
+
+  <p>The <code title=3Drel-external><a href=3D#link-type-=
external>external</a></code> keyword may be used with <=
code><a href=3D#the-a-element>a</a></code> and
+  <code><a href=3D#the-area-element>area</a></code&=
gt; elements. This keyword creates a <a href=3D#hyperlink>hyperlink=
</a>.</p>
+
+  <p>The <code title=3Drel-external><a href=3D#link-type-=
external>external</a></code> keyword indicates that the li=
nk is leading to a
+  document that is not part of the site that the current document forms =
a part of.</p>
+
+
+  <h5 id=3Dlink-type-help><span class=3Dsecno>4.8.5.5 </s=
pan>Link type "<dfn title=3Drel-help><code>help</c=
ode></dfn>"</h5>
+
+  <p>The <code title=3Drel-help><a href=3D#link-type-help=
>help</a></code> keyword may be used with <code><=
a href=3D#the-link-element>link</a></code>,
+  <code><a href=3D#the-a-element>a</a></code>, a=
nd <code><a href=3D#the-area-element>area</a></code&=
gt; elements. This keyword creates a <a href=3D#hyperlink>hyperlink=
</a>.</p>
+
+  <p>For <code><a href=3D#the-a-element>a</a>&lt=
;/code> and <code><a href=3D#the-area-element>area</a&g=
t;</code> elements, the <code title=3Drel-help><a href=3D#=
link-type-help>help</a></code>
+  keyword indicates that the referenced document provides further help i=
nformation for the parent of
+  the element defining the hyperlink, and its children.</p>
+
+  <div class=3Dexample>
+
+   <p>In the following example, the form control has associated co=
ntext-sensitive help. The user
+   agent could use this information, for example, displaying the referen=
ced document if the user
+   presses the "Help" or "F1" key.</p>
+
+   <pre> <p><label> Topic: <inp=
ut name=3Dtopic> <a href=3D"help/topic.html" rel=3D=
"help">(Help)</a></label>&am=
p;lt;/p></pre>
+
+  </div>
+
+  <p>For <code><a href=3D#the-link-element>link</a&=
gt;</code> elements, the <code title=3Drel-help><a href=3D=
#link-type-help>help</a></code> keyword indicates that
+  the referenced document provides help for the page as a whole.</p&g=
t;
+
+  <p>For <code><a href=3D#the-a-element>a</a>&lt=
;/code> and <code><a href=3D#the-area-element>area</a&g=
t;</code> elements, on some browsers, the <code title=3Drel-help=
><a href=3D#link-type-help>help</a></code> keyword c=
auses the link to use a different cursor.</p>
+
+
+  <h5 id=3Drel-icon><span class=3Dsecno>4.8.5.6 </span&gt=
;Link type "<dfn title=3Drel-icon><code>icon</code&gt=
;</dfn>"</h5>
+
+  <p>The <code title=3Drel-icon><a href=3D#rel-icon>ic=
on</a></code> keyword may be used with <code><a href=
=3D#the-link-element>link</a></code> elements.
+  This keyword creates an <a href=3D#external-resource-link title=3D&=
quot;external resource link">external resource link</a>.&lt=
;/p>
+
+  <div class=3Dimpl>
+
+  <p>The specified resource is an icon representing the page or si=
te, and should be used by the user
+  agent when representing the page in the user interface.</p>
+
+  </div>
+
+  <p>Icons could be auditory icons, visual icons, or other kinds o=
f icons. <span class=3Dimpl>If
+  multiple icons are provided, the user agent must select the most appro=
priate icon according to the
+  <code title=3Dattr-link-type><a href=3D#attr-link-type>typ=
e</a></code>, <code title=3Dattr-link-media><a href=3D=
#attr-link-media>media</a></code>, and <code title=3Dat=
tr-link-sizes><a href=3D#attr-link-sizes>sizes</a></cod=
e> attributes. If there are multiple equally appropriate icons,
+  user agents must use the last one declared in <a href=3D#tree-order=
>tree order</a> at the time that the user
+  agent collected the list of icons. If the user agent tries to use an i=
con but that icon is
+  determined, upon closer examination, to in fact be inappropriate (e.g.=
 because it uses an
+  unsupported format), then the user agent must try the next-most-approp=
riate icon as determined by
+  the attributes.</span></p>
+
+  <div class=3Dimpl>
+
+  <p class=3Dnote>User agents are not required to update icons whe=
n the list of icons changes, but
+  are encouraged to do so.</p>
+
+  <p>There is no default type for resources given by the <code =
title=3Drel-icon><a href=3D#rel-icon>icon</a></code>=
 keyword.
+  However, for the purposes of <a href=3D#concept-link-type-sniffing&=
gt;determining the type of the
+  resource</a>, user agents must expect the resource to be an imag=
e.</p>
+
+  </div>
+
+  <p>The <dfn id=3Dattr-link-sizes title=3Dattr-link-sizes>&=
lt;code>sizes</code></dfn> attribute gives the sizes of ic=
ons
+  for visual media. Its value, if present, is merely advisory. User agen=
ts may use the value to
+  decide which icon(s) to use if multiple icons are available.</p>
+
+  <p>If specified, the attribute must have a value that is an <=
a href=3D#unordered-set-of-unique-space-separated-tokens>unordered set=
 of unique
+  space-separated tokens</a> which are <a href=3D#ascii-case-in=
sensitive>ASCII case-insensitive</a>. Each value must be
+  either an <a href=3D#ascii-case-insensitive>ASCII case-insensiti=
ve</a> match for the string "<code title=3Dattr-link-sizes-=
any><a href=3D#attr-link-sizes-any>any</a></code>&qu=
ot;, or a value that consists of two <a href=3D#valid-non-negative-int=
eger title=3D"valid
+  non-negative integer">valid non-negative integers</a> th=
at do not have a leading U+0030 DIGIT
+  ZERO (0) character and that are separated by a single U+0078 LATIN SMA=
LL LETTER X or U+0058 LATIN
+  CAPITAL LETTER X character.</p>
+
+  <p>The keywords represent icon sizes.</p>
+
+  <div class=3Dimpl>
+
+  <p>To parse and process the attribute's value, the user agent mu=
st first <a href=3D#split-a-string-on-spaces title=3D"split a
+  string on spaces">split the attribute's value on spaces</a&=
gt;, and must then parse each resulting
+  keyword to determine what it represents.</p>
+
+  </div>
+
+  <p>The <dfn id=3Dattr-link-sizes-any title=3Dattr-link-sizes-=
any><code>any</code></dfn> keyword represents that t=
he
+  resource contains a scalable icon, e.g. as provided by an SVG image.&l=
t;/p>
+
+  <div class=3Dimpl>
+
+  <p>Other keywords must be further parsed as follows to determine=
 what they represent:</p>
+
+  <ul><li><p>If the keyword doesn't contain exactly on=
e U+0078 LATIN SMALL LETTER X or U+0058 LATIN
+   CAPITAL LETTER X character, then this keyword doesn't represent anyth=
ing. Abort these steps for
+   that keyword.</li>
+
+   <li><p>Let <var title=3D"">width string&l=
t;/var> be the string before the "<code title=3D""&g=
t;x</code>" or
+   "<code title=3D"">X</code>".</li&g=
t;
+
+   <li><p>Let <var title=3D"">height string&=
lt;/var> be the string after the "<code title=3D""&g=
t;x</code>" or
+   "<code title=3D"">X</code>".</li&g=
t;
+
+   <li><p>If either <var title=3D"">width st=
ring</var> or <var title=3D"">height string</var=
> start with
+   a U+0030 DIGIT ZERO (0) character or contain any characters other tha=
n <a href=3D#ascii-digits>ASCII digits</a>,
+   then this keyword doesn't represent anything. Abort these steps for t=
hat keyword.</li>
+
+   <li><p>Apply the <a href=3D#rules-for-parsing-non-nega=
tive-integers>rules for parsing non-negative integers</a> to &lt=
;var title=3D"">width
+   string</var> to obtain <var title=3D"">width&lt=
;/var>.</li>
+
+   <li><p>Apply the <a href=3D#rules-for-parsing-non-nega=
tive-integers>rules for parsing non-negative integers</a> to &lt=
;var title=3D"">height
+   string</var> to obtain <var title=3D"">height&l=
t;/var>.</li>
+
+   <li><p>The keyword represents that the resource contains =
a bitmap icon with a width of <var title=3D"">width</v=
ar> device pixels and a height of <var title=3D"">heig=
ht</var> device
+   pixels.</li>
+
+  </ul></div>
+
+  <p>The keywords specified on the <code title=3Dattr-link-size=
s><a href=3D#attr-link-sizes>sizes</a></code> attrib=
ute must not
+  represent icon sizes that are not actually available in the linked res=
ource.</p>
+
+  <div class=3Dimpl>
+
+  <p>In the absence of a <code><a href=3D#the-link-elemen=
t>link</a></code> with the <code title=3Drel-icon>&l=
t;a href=3D#rel-icon>icon</a></code> keyword, for
+  <code><a href=3D#document>Document</a></code>s=
 obtained over HTTP or HTTPS, user agents may instead attempt to
+  <a href=3D#fetch>fetch</a><!--FETCH--> and use an ic=
on with the <a href=3D#absolute-url>absolute URL</a> obtained=
 by
+  resolving the <a href=3D#url>URL</a> "<code title=3D=
"">/favicon.ico</code>" against <a href=3D&quo=
t;#the-document's-address">the document's
+  address</a>, as if the page had declared that icon using the &lt=
;code title=3Drel-icon><a href=3D#rel-icon>icon</a></co=
de>
+  keyword.</p>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>The following snippet shows the top part of an application w=
ith several icons.</p>
+
+   <pre><!DOCTYPE HTML>
+<html>
+ <head>
+  <title>lsForums — Inbox</title>
+  <link rel=3Dicon href=3Dfavicon.png sizes=3D"16x16" t=
ype=3D"image/png">
+  <link rel=3Dicon href=3Dwindows.ico sizes=3D"32x32 48x48&q=
uot; type=3D"image/vnd.microsoft.icon">
+  <link rel=3Dicon href=3Dmac.icns sizes=3D"128x128 512x512 =
8192x8192 32768x32768">
+  <link rel=3Dicon href=3Diphone.png sizes=3D"57x57" ty=
pe=3D"image/png">
+  <link rel=3Dicon href=3Dgnome.svg sizes=3D"any" type=3D=
"image/svg+xml">
+  <link rel=3Dstylesheet href=3Dlsforums.css>
+  <script src=3Dlsforums.js></script>
+  <meta name=3Dapplication-name content=3D"lsForums"&am=
p;gt;
+ </head>
+ <body>
+  ...</pre>
+
+  </div>
+
+  <p>For historical reasons, the <code title=3Drel-icon><=
a href=3D#rel-icon>icon</a></code> keyword may be preceded=
 by the
+  keyword "<code title=3D"">shortcut</code>&q=
uot;. If the "<code title=3D"">shortcut</code>=
" keyword is
+  present, it must be come immediately before the <code title=3Drel-i=
con><a href=3D#rel-icon>icon</a></code> keyword and =
the
+  two keywords must be separated by only a single U+0020 SPACE character=
.</p>
+
+
+  <h5 id=3Dlink-type-license><span class=3Dsecno>4.8.5.7 &lt=
;/span>Link type "<dfn title=3Drel-license><code>lice=
nse</code></dfn>"</h5>
+
+  <p>The <code title=3Drel-license><a href=3D#link-type-l=
icense>license</a></code> keyword may be used with <cod=
e><a href=3D#the-link-element>link</a></code>,
+  <code><a href=3D#the-a-element>a</a></code>, a=
nd <code><a href=3D#the-area-element>area</a></code&=
gt; elements. This keyword creates a <a href=3D#hyperlink>hyperlink=
</a>.</p>
+
+  <p>The <code title=3Drel-license><a href=3D#link-type-l=
icense>license</a></code> keyword indicates that the refer=
enced document
+  provides the copyright license terms under which the main content of t=
he current document is
+  provided.</p>
+
+  <p>This specification does not specify how to distinguish betwee=
n the main content of a document
+  and content that is not deemed to be part of that main content. The di=
stinction should be made
+  clear to the user.</p>
+
+  <div class=3Dexample>
+
+   <p>Consider a photo sharing site. A page on that site might des=
cribe and show a photograph, and
+   the page might be marked up as follows:</p>
+
+   <pre><!DOCTYPE HTML>
+<html>
+ <head>
+  <title>Exampl Pictures: Kissat</title>
+  <link rel=3D"stylesheet" href=3D"/style/default&=
quot;>
+ </head>
+ <body>
+  <h1>Kissat</h1>
+  <nav>
+   <a href=3D"../">Return to photo index<=
/a>
+  </nav>
+  <figure>
+   <img src=3D"/pix/39627052_fd8dcd98b5.jpg">
+   <figcaption>Kissat</figcaption>
+  </figure>
+  <p>One of them has six toes!</p>
+  <p><small><a rel=3D"license&qu=
ot; href=3D"http://www.opensource.org/licenses/mit-license.php"=
>MIT Licensed</a></small></p&am=
p;gt;
+  <footer>
+   <a href=3D"/">Home</a> | &l=
t;a href=3D"../">Photo index</a>
+   <p><small>© copyright 2009 Examp=
l Pictures. All Rights Reserved.</small></p>
+  </footer>
+ </body>
+</html></pre>
+
+   <p>In this case the <code title=3Drel-license><a href=3D=
#link-type-license>license</a></code> applies to just the =
photo (the main
+   content of the document), not the whole document. In particular not t=
he design of the page
+   itself, which is covered by the copyright given at the bottom of the =
document. This could be made
+   clearer in the styling (e.g. making the license link prominently posi=
tioned near the photograph,
+   while having the page copyright in light small text at the foot of th=
e page.</p>
+
+  </div>
+
+  <div class=3Dimpl>
+
+  <p><strong>Synonyms</strong>: For historical reasons=
, user agents must also treat the keyword
+  "<code title=3D"">copyright</code>" li=
ke the <code title=3Drel-license><a href=3D#link-type-license&gt=
;license</a></code> keyword.</p>
+
+  </div>
+
+
+  <h5 id=3Dlink-type-nofollow><span class=3Dsecno>4.8.5.8 &l=
t;/span>Link type "<dfn title=3Drel-nofollow><code>no=
follow</code></dfn>"</h5>
+
+  <p>The <code title=3Drel-nofollow><a href=3D#link-type-=
nofollow>nofollow</a></code> keyword may be used with <=
code><a href=3D#the-a-element>a</a></code> and
+  <code><a href=3D#the-area-element>area</a></code&=
gt; elements. This keyword does not create a <a href=3D#hyperlink>h=
yperlink</a>, but <a href=3D#hyperlink-annotation title=3D"=
hyperlink annotation">annotates</a> any other hyperlinks cr=
eated by the element (the
+  implied hyperlink, if no other keywords create one).</p>
+
+  <p>The <code title=3Drel-nofollow><a href=3D#link-type-=
nofollow>nofollow</a></code> keyword indicates that the li=
nk is not endorsed
+  by the original author or publisher of the page, or that the link to t=
he referenced document was
+  included primarily because of a commercial relationship between people=
 affiliated with the two
+  pages.</p>
+
+
+  <h5 id=3Dlink-type-noreferrer><span class=3Dsecno>4.8.5.9 =
</span>Link type "<dfn title=3Drel-noreferrer><code&g=
t;noreferrer</code></dfn>"</h5>
+
+  <p>The <code title=3Drel-noreferrer><a href=3D#link-typ=
e-noreferrer>noreferrer</a></code> keyword may be used wit=
h <code><a href=3D#the-a-element>a</a></code> and
+  <code><a href=3D#the-area-element>area</a></code&=
gt; elements. This keyword does not create a <a href=3D#hyperlink>h=
yperlink</a>, but <a href=3D#hyperlink-annotation title=3D"=
hyperlink annotation">annotates</a> any other hyperlinks cr=
eated by the element (the
+  implied hyperlink, if no other keywords create one).</p>
+
+  <p>It indicates that no referrer information is to be leaked whe=
n following the link.</p>
+
+  <div class=3Dimpl>
+
+  <p>If a user agent follows a link defined by an <code><=
a href=3D#the-a-element>a</a></code> or <code><a =
href=3D#the-area-element>area</a></code> element that
+  has the <code title=3Drel-noreferrer><a href=3D#link-type-nor=
eferrer>noreferrer</a></code> keyword, the user agent must=
 not include a
+  <code title=3Dhttp-referer>Referer</code> (sic) HTTP heade=
r (<a href=3D#concept-http-equivalent-headers title=3Dconcept-http-equ=
ivalent-headers>or equivalent</a> for other protocols) in the
+  request.</p>
+
+  <p>This keyword also <a href=3D#noopener>causes the <co=
de title=3Ddom-opener>opener</code>
+  attribute to remain null</a> if the hyperlink creates a new <=
a href=3D#browsing-context>browsing context</a>.</p>
+
+  </div>
+
+  <!-- v2: Would be nice to apply this to other elements too, e.g. le=
tting <img> or CSS or <video>
+  hide the referrer -->
+
+
+  <h5 id=3Dlink-type-pingback><span class=3Dsecno>4.8.5.10 &=
lt;/span>Link type "<dfn title=3Drel-pingback><code>p=
ingback</code></dfn>"</h5>
+
+  <p>The <code title=3Drel-pingback><a href=3D#link-type-=
pingback>pingback</a></code> keyword may be used with <=
code><a href=3D#the-link-element>link</a></code>
+  elements. This keyword creates an <a href=3D#external-resource-link=
 title=3D"external resource link">external resource
+  link</a>.</p>
+
+  <p>For the semantics of the <code title=3Drel-pingback>&lt=
;a href=3D#link-type-pingback>pingback</a></code> keyword,=
 see the Pingback
+  1.0 specification. <a href=3D#refsPINGBACK>[PINGBACK]</a>&=
lt;/p>
+
+
+  <h5 id=3Dlink-type-prefetch><span class=3Dsecno>4.8.5.11 &=
lt;/span>Link type "<dfn title=3Drel-prefetch><code>p=
refetch</code></dfn>"</h5>
+
+  <p>The <code title=3Drel-prefetch><a href=3D#link-type-=
prefetch>prefetch</a></code> keyword may be used with <=
code><a href=3D#the-link-element>link</a></code>,
+  <code><a href=3D#the-a-element>a</a></code>, a=
nd <code><a href=3D#the-area-element>area</a></code&=
gt; elements. This keyword creates an <a href=3D#external-resource-lin=
k title=3D"external
+  resource link">external resource link</a>.</p>
+
+  <p>The <code title=3Drel-prefetch><a href=3D#link-type-=
prefetch>prefetch</a></code> keyword indicates that preemp=
tively fetching and
+  caching the specified resource is likely to be beneficial, as it is hi=
ghly likely that the user
+  will require this resource.</p>
+
+  <p>There is no default type for resources given by the <code =
title=3Drel-prefetch><a href=3D#link-type-prefetch>prefetch</=
a></code>
+  keyword.</p>
+
+
+  <h5 id=3Dlink-type-search><span class=3Dsecno>4.8.5.12 &lt=
;/span>Link type "<dfn title=3Drel-search><code>searc=
h</code></dfn>"</h5>
+
+  <p>The <code title=3Drel-search><a href=3D#link-type-se=
arch>search</a></code> keyword may be used with <code&g=
t;<a href=3D#the-link-element>link</a></code>,
+  <code><a href=3D#the-a-element>a</a></code>, a=
nd <code><a href=3D#the-area-element>area</a></code&=
gt; elements. This keyword creates a <a href=3D#hyperlink>hyperlink=
</a>.</p>
+
+  <p>The <code title=3Drel-search><a href=3D#link-type-se=
arch>search</a></code> keyword indicates that the referenc=
ed document
+  provides an interface specifically for searching the document and its =
related resources.</p>
+
+  <p class=3Dnote>OpenSearch description documents can be used wit=
h <code><a href=3D#the-link-element>link</a></code&g=
t; elements and
+  the <code title=3Drel-search><a href=3D#link-type-search>s=
earch</a></code> link type to enable user agents to autodisco=
ver search
+  interfaces. <a href=3D#refsOPENSEARCH>[OPENSEARCH]</a><=
/p>
+
+
+  <h5 id=3Dlink-type-sidebar><span class=3Dsecno>4.8.5.13 &l=
t;/span>Link type "<dfn title=3Drel-sidebar><code>sid=
ebar</code></dfn>"</h5>
+
+  <p>The <code title=3Drel-sidebar><a href=3D#link-type-s=
idebar>sidebar</a></code> keyword may be used with <cod=
e><a href=3D#the-link-element>link</a></code>,
+  <code><a href=3D#the-a-element>a</a></code>, a=
nd <code><a href=3D#the-area-element>area</a></code&=
gt; elements. This keyword creates a <a href=3D#hyperlink>hyperlink=
</a>.</p>
+
+  <p>The <code title=3Drel-sidebar><a href=3D#link-type-s=
idebar>sidebar</a></code> keyword indicates that the refer=
enced document, if
+  retrieved, is intended to be shown in a <a href=3D#secondary-browsi=
ng-context>secondary browsing context</a> (if possible),
+  instead of in the current <a href=3D#browsing-context>browsing c=
ontext</a>.</p>
+
+  <p>A <a href=3D#hyperlink>hyperlink</a> with the &lt=
;code title=3Drel-sidebar><a href=3D#link-type-sidebar>sidebar&l=
t;/a></code> keyword specified is
+  a <dfn id=3Drel-sidebar-hyperlink title=3Drel-sidebar-hyperlink>=
sidebar hyperlink</dfn>.</p>
+
+
+  <h5 id=3Dlink-type-stylesheet><span class=3Dsecno>4.8.5.14=
 </span>Link type "<dfn title=3Drel-stylesheet><code&=
gt;stylesheet</code></dfn>"</h5>
+
+  <p>The <code title=3Drel-stylesheet><a href=3D#link-typ=
e-stylesheet>stylesheet</a></code> keyword may be used wit=
h <code><a href=3D#the-link-element>link</a></code&g=
t;
+  elements. This keyword creates an <a href=3D#external-resource-link=
 title=3D"external resource link">external resource
+  link</a> that contributes to the <a href=3D#styling>stylin=
g processing model</a>.</p>
+
+  <p>The specified resource is a resource that describes how to pr=
esent the document. Exactly how
+  the resource is to be processed depends on the actual type of the reso=
urce.</p>
+
+  <p>If the <code title=3Drel-alternate><a href=3D#rel-al=
ternate>alternate</a></code> keyword is also specified on =
the
+  <code><a href=3D#the-link-element>link</a></code&=
gt; element, then <dfn id=3Dthe-link-is-an-alternative-stylesheet>t=
he link is an alternative stylesheet</dfn>; in this case,
+  the <code title=3Dattr-title><a href=3D#attr-title>title&l=
t;/a></code> attribute must be specified on the <code><=
a href=3D#the-link-element>link</a></code>
+  element, with a non-empty value.</p>
+
+  <p>The default type for resources given by the <code title=3D=
rel-stylesheet><a href=3D#link-type-stylesheet>stylesheet</a&=
gt;</code>
+  keyword is <code title=3D"">text/css</code>.<=
/p>
+
+  <div class=3Dimpl>
+
+  <p>The appropriate times to <a href=3D#concept-link-obtain ti=
tle=3Dconcept-link-obtain>obtain</a> the resource are:
+
+  <ul><li><p>When the <a href=3D#external-resource-=
link title=3D"external resource link">external resource link=
</a>'s
+   <code><a href=3D#the-link-element>link</a></code=
> element is <a href=3D#insert-an-element-into-a-document title=3D&=
quot;insert an element into a document">inserted into a
+   document</a>.</li>
+
+   <li><p>When the <a href=3D#external-resource-link titl=
e=3D"external resource link">external resource link</a&gt=
; is created on
+   a <code><a href=3D#the-link-element>link</a></co=
de> element that is already <a href=3D#in-a-document>in a <co=
de>Document</code></a>.</li>
+
+   <li><p>When the <code title=3Dattr-link-href><a =
href=3D#attr-link-href>href</a></code> attribute of the &l=
t;code><a href=3D#the-link-element>link</a></code>
+   element of an <a href=3D#external-resource-link title=3D"exte=
rnal resource link">external resource link</a> that is alre=
ady
+   <a href=3D#in-a-document>in a <code>Document</code>=
</a> is changed.</li>
+   <!-- http://software.hixie.ch/utilities/js/live-dom-viewer/saved/2=
588 -->
+
+  </ul><p><strong>Quirk</strong>: If the documen=
t has been set to <a href=3D#quirks-mode>quirks mode</a>, has=
 the
+  <a href=3D#same-origin>same origin</a> as the <a href=3D=
#url>URL</a> of the external resource<!-- CVE-2010-0654 --&gt=
;,
+  and the <a href=3D#content-type title=3DContent-Type>Content-Typ=
e metadata</a> of the external resource is not a
+  supported style sheet type, the user agent must instead assume it to b=
e <code title=3D"">text/css</code>.</p>
+
+  </div>
+
+
+  <h5 id=3Dlink-type-tag><span class=3Dsecno>4.8.5.15 </s=
pan>Link type "<dfn title=3Drel-tag><code>tag</cod=
e></dfn>"</h5>
+
+  <p>The <code title=3Drel-tag><a href=3D#link-type-tag&g=
t;tag</a></code> keyword may be used with <code><a h=
ref=3D#the-a-element>a</a></code> and
+  <code><a href=3D#the-area-element>area</a></code&=
gt; elements. This keyword creates a <a href=3D#hyperlink>hyperlink=
</a>.</p>
+
+  <p>The <code title=3Drel-tag><a href=3D#link-type-tag&g=
t;tag</a></code> keyword indicates that the <em>tag<=
/em> that the
+  referenced document represents applies to the current document.</p&=
gt;
+
+  <p class=3Dnote>Since it indicates that the tag <em>applie=
s to the current document</em>, it would
+  be inappropriate to use this keyword in the markup of a <a href=3D#=
tag-cloud>tag cloud</a>, which
+  lists the popular tags across a set of pages.</p>
+
+  <div class=3Dexample>
+
+   <p>This document is about some gems, and so it is <i>tagg=
ed</i> with "<code title=3D"">http://en.wikipe=
dia.org/wiki/Gemstone</code>" to unambiguously categorise it a=
s applying
+   to the "jewel" kind of gems, and not to, say, the towns in =
the US, the Ruby package format, or
+   the Swiss locomotive class:</p>
+
+   <pre><!DOCTYPE HTML>
+<html>
+ <head>
+  <title>My Precious</title>
+ </head>
+ <body>
+  <header><h1>My precious</h1>=
 <p>Summer 2012</p></header>
+  <p>Recently I managed to dispose of a red gem that had b=
een
+  bothering me. I now have a much nicer blue sapphire.</p>
+  <p>The red gem had been found in a bauxite stone while I=
 was digging
+  out the office level, but nobody was willing to haul it away. The
+  same red gem stayed there for literally years.</p>
+  <footer>
+   Tags: <a rel=3Dtag href=3D"http://en.wikipedia.org/wiki/G=
emstone">Gemstone</a>
+  </footer>
+ </body>
+</html></pre>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>In <em>this</em> document, there are two article=
s. The "<code title=3Drel-tag><a href=3D#link-type-tag>t=
ag</a></code>"
+   link, however, applies to the whole page (and would do so wherever it=
 was placed, including if it
+   was within the <code><a href=3D#the-article-element>artic=
le</a></code> elements).</p>
+
+   <pre><!DOCTYPE HTML>
+<html>
+ <head>
+  <title>Gem 4/4</title>
+ </head>
+ <body>
+  <article>
+   <h1>801: Steinbock</h1>
+   <p>The number 801 Gem 4/4 electro-diesel has an ibex an=
d was rebuilt in 2002.</p>
+  </article>
+  <article>
+   <h1>802: Murmeltier</h1>
+   <figure>
+    <img src=3D"http://upload.wikimedia.org/wikipedia/common=
s/b/b0/Trains_de_la_Bernina_en_hiver_2.jpg"
+         alt=3D"The 802 was red with pantographs and tall vents on =
the side.">
+    <figcaption>The 802 in the 1980s, above Lago Bianco.&a=
mp;lt;/figcaption>
+   </figure>
+   <p>The number 802 Gem 4/4 electro-diesel has a marmot a=
nd was rebuilt in 2003.</p>
+  </article>
+  <p class=3D"topic"><a rel=3Dtag href=3D=
"http://en.wikipedia.org/wiki/Rhaetian_Railway_Gem_4/4">=
Gem 4/4</a></p>
+ </body>
+</html></pre>
+
+  </div>
+
+
+
+  <h5 id=3Dsequential-link-types><span class=3Dsecno>4.8.5.1=
6 </span>Sequential link types</h5>
+
+  <p>Some documents form part of a sequence of documents.</p&gt=
;
+
+  <p>A sequence of documents is one where each document can have a=
 <em>previous sibling</em> and a
+  <em>next sibling</em>. A document with no previous sibling=
 is the start of its sequence, a
+  document with no next sibling is the end of its sequence.</p>
+
+  <p>A document may be part of multiple sequences.</p>
+
+
+  <h6 id=3Dlink-type-next><span class=3Dsecno>4.8.5.16.1 &lt=
;/span>Link type "<dfn title=3Drel-next><code>next&lt=
;/code></dfn>"</h6>
+
+  <p>The <code title=3Drel-next><a href=3D#link-type-next=
>next</a></code> keyword may be used with <code><=
a href=3D#the-link-element>link</a></code>,
+  <code><a href=3D#the-a-element>a</a></code>, a=
nd <code><a href=3D#the-area-element>area</a></code&=
gt; elements. This keyword creates a <a href=3D#hyperlink>hyperlink=
</a>.</p>
+
+  <p>The <code title=3Drel-next><a href=3D#link-type-next=
>next</a></code> keyword indicates that the document is pa=
rt of a
+  sequence, and that the link is leading to the document that is the nex=
t logical document in the
+  sequence.</p>
+
+
+  <h6 id=3Dlink-type-prev><span class=3Dsecno>4.8.5.16.2 &lt=
;/span>Link type "<dfn title=3Drel-prev><code>prev&lt=
;/code></dfn>"</h6>
+
+  <p>The <code title=3Drel-prev><a href=3D#link-type-prev=
>prev</a></code> keyword may be used with <code><=
a href=3D#the-link-element>link</a></code>,
+  <code><a href=3D#the-a-element>a</a></code>, a=
nd <code><a href=3D#the-area-element>area</a></code&=
gt; elements. This keyword creates a <a href=3D#hyperlink>hyperlink=
</a>.</p>
+
+  <p>The <code title=3Drel-prev><a href=3D#link-type-prev=
>prev</a></code> keyword indicates that the document is pa=
rt of a
+  sequence, and that the link is leading to the document that is the pre=
vious logical document in
+  the sequence.</p>
+
+  <div class=3Dimpl>
+
+  <p><strong>Synonyms</strong>: For historical reasons=
, user agents must also treat the keyword
+  "<code title=3D"">previous</code>" lik=
e the <code title=3Drel-prev><a href=3D#link-type-prev>prev&l=
t;/a></code> keyword.</p>
+
+  </div>
+
+
+  <h5 id=3Dother-link-types><span class=3Dsecno>4.8.5.17 &lt=
;/span>Other link types</h5>
+
+  <p><dfn id=3Dconcept-rel-extensions title=3Dconcept-rel-exten=
sions>Extensions to the predefined set of link types</dfn> may b=
e
+  registered in the <a href=3Dhttp://microformats.org/wiki/existing-r=
el-values#HTML5_link_type_extensions>microformats
+  wiki existing-rel-values page</a>. <a href=3D#refsMFREL>[M=
FREL]</a></p>
+
+  <p>Anyone is free to edit the <span title=3D"">m=
icroformats wiki existing-rel-values page</span> at
+  any time to add a type. Extension types must be specified with the fol=
lowing information:</p>
+
+  <dl><dt>Keyword</dt>
+
+   <dd>
+
+    <p>The actual value being defined. The value should not be con=
fusingly similar to any other
+    defined value (e.g. differing only in case).</p>
+
+    <p>If the value contains a U+003A COLON character (:), it must=
 also be an <a href=3D#absolute-url>absolute
+    URL</a>.</p>
+
+   </dd>
+
+
+   <dt>Effect on... <code><a href=3D#the-link-element>=
link</a></code></dt>
+
+   <dd>
+
+    <p>One of the following:</p>
+
+    <dl><dt>Not allowed</dt>
+
+     <dd>The keyword must not be specified on <code><a hr=
ef=3D#the-link-element>link</a></code> elements.</dd&gt=
;
+
+     <dt>Hyperlink</dt>
+
+     <dd>The keyword may be specified on a <code><a href=3D=
#the-link-element>link</a></code> element; it creates a
+     <a href=3D#hyperlink>hyperlink</a>.</dd>
+
+     <dt>External Resource</dt>
+
+     <dd>The keyword may be specified on a <code><a href=3D=
#the-link-element>link</a></code> element; it creates an &=
lt;a href=3D#external-resource-link>external
+     resource link</a>.</dd>
+
+    </dl></dd>
+
+
+   <dt>Effect on... <code><a href=3D#the-a-element>a&l=
t;/a></code> and <code><a href=3D#the-area-element>a=
rea</a></code></dt>
+
+   <dd>
+
+    <p>One of the following:</p>
+
+    <dl><dt>Not allowed</dt>
+
+     <dd>The keyword must not be specified on <code><a hr=
ef=3D#the-a-element>a</a></code> and <code><a hre=
f=3D#the-area-element>area</a></code> elements.</dd>
+
+     <dt>Hyperlink</dt>
+
+     <dd>The keyword may be specified on <code><a href=3D=
#the-a-element>a</a></code> and <code><a href=3D#=
the-area-element>area</a></code> elements; it creates a
+     <a href=3D#hyperlink>hyperlink</a>.</dd>
+
+     <dt>External Resource</dt>
+
+     <dd>The keyword may be specified on <code><a href=3D=
#the-a-element>a</a></code> and <code><a href=3D#=
the-area-element>area</a></code> elements; it creates
+     an <a href=3D#external-resource-link>external resource link&l=
t;/a>.</dd>
+
+     <dt>Hyperlink Annotation</dt>
+
+     <dd>The keyword may be specified on <code><a href=3D=
#the-a-element>a</a></code> and <code><a href=3D#=
the-area-element>area</a></code> elements; it <a href=3D=
#hyperlink-annotation title=3D"hyperlink annotation">annotat=
es</a> other <a href=3D#hyperlink title=3Dhyperlink>hyperlink=
s</a>
+     created by the element.</dd>
+
+    </dl></dd>
+
+
+   <dt>Brief description</dt>
+
+   <dd><p>A short non-normative description of what the keyw=
ord's meaning is.</dd>
+
+
+   <dt>Specification</dt>
+
+   <dd><p>A link to a more detailed description of the keywo=
rd's semantics and requirements. It
+   could be another page on the Wiki, or a link to an external page.<=
/dd>
+
+
+   <dt>Synonyms</dt>
+
+   <dd><p>A list of other keyword values that have exactly t=
he same processing requirements. Authors
+   should not use the values defined to be synonyms, they are only inten=
ded to allow user agents to
+   support legacy content. Anyone may remove synonyms that are not used =
in practice; only names that
+   need to be processed as synonyms for compatibility with legacy conten=
t are to be registered in
+   this way.</dd>
+
+
+   <dt>Status</dt>
+
+   <dd>
+
+    <p>One of the following:</p>
+
+    <dl><dt>Proposed</dt>
+
+     <dd>The keyword has not received wide peer review and approva=
l. Someone has proposed it and is,
+     or soon will be, using it.</dd>
+
+     <dt>Ratified</dt>
+
+     <dd>The keyword has received wide peer review and approval. I=
t has a specification that
+     unambiguously defines how to handle pages that use the keyword, inc=
luding when they use it in
+     incorrect ways.</dd>
+
+     <dt>Discontinued</dt>
+
+     <dd>The keyword has received wide peer review and it has been=
 found wanting. Existing pages are
+     using this keyword, but new pages should avoid it. The "brief =
description" and "specification"
+     entries will give details of what authors should use instead, if an=
ything.</dd>
+
+    </dl><p>If a keyword is found to be redundant with exist=
ing values, it should be removed and listed
+    as a synonym for the existing value.</p>
+
+    <p>If a keyword is registered in the "proposed" stat=
e for a period of a month or more without
+    being used or specified, then it may be removed from the registry.&l=
t;/p>
+
+    <p>If a keyword is added with the "proposed" status =
and found to be redundant with existing
+    values, it should be removed and listed as a synonym for the existin=
g value. If a keyword is
+    added with the "proposed" status and found to be harmful, =
then it should be changed to
+    "discontinued" status.</p>
+
+    <p>Anyone can change the status at any time, but should only d=
o so in accordance with the
+    definitions above.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>Conformance checkers must use the information given on the &l=
t;span title=3D"">microformats wiki
+  existing-rel-values page</span> to establish if a value is allow=
ed or not: values defined in this
+  specification or marked as "proposed" or "ratified&quot=
; must be accepted when used on the elements for
+  which they apply as described in the "Effect on..." field, w=
hereas values marked as "discontinued"
+  or not listed in either this specification or on the aforementioned pa=
ge must be rejected as
+  invalid. Conformance checkers may cache this information (e.g. for per=
formance reasons or to avoid
+  the use of unreliable network connectivity).</p>
+
+  <p>When an author uses a new type not defined by either this spe=
cification or the Wiki page,
+  conformance checkers should offer to add the value to the Wiki, with t=
he details described above,
+  with the "proposed" status.</p>
+
+  </div>
+
+  <p>Types defined as extensions in the <a href=3Dhttp://microf=
ormats.org/wiki/existing-rel-values#HTML5_link_type_extensions>microfo=
rmats
+  wiki existing-rel-values page</a> with the status "proposed=
" or "ratified" may be used with the
+  <code title=3D"">rel</code> attribute on <cod=
e><a href=3D#the-link-element>link</a></code>, <c=
ode><a href=3D#the-a-element>a</a></code>, and <c=
ode><a href=3D#the-area-element>area</a></code>
+  elements in accordance to the "Effect on..." field. <a hr=
ef=3D#refsMFREL>[MFREL]</a></p>
+
+
+
+
+  <h3 id=3Dtabular-data><span class=3Dsecno>4.9 </span&gt=
;Tabular data</h3>
+
+
+  <h4 id=3Dthe-table-element><span class=3Dsecno>4.9.1 </=
span>The <dfn><code>table</code></dfn> element=
</h4>
+
+  <dl class=3Delement><dt><a href=3D#element-dfn-categori=
es title=3Delement-dfn-categories>Categories</a>:</dt>
+   <dd><a href=3D#flow-content>Flow content</a>.</d=
d>
+   <dd><a href=3D#palpable-content>Palpable content</a&gt=
;.</dd>
+   <dt><a href=3D#element-dfn-contexts title=3Delement-dfn-cont=
exts>Contexts in which this element can be used</a>:</dt>
+   <dd>Where <a href=3D#flow-content>flow content</a> =
is expected.</dd>
+   <dt><a href=3D#element-dfn-content-model title=3Delement-dfn=
-content-model>Content model</a>:</dt>
+   <dd>In this order: optionally a <code><a href=3D#the-c=
aption-element>caption</a></code> element,
+   followed by zero or more <code><a href=3D#the-colgroup-eleme=
nt>colgroup</a></code> elements, followed
+   optionally by a <code><a href=3D#the-thead-element>thead&=
lt;/a></code> element, followed optionally by
+   a <code><a href=3D#the-tfoot-element>tfoot</a></=
code> element, followed by either zero or more
+   <code><a href=3D#the-tbody-element>tbody</a></co=
de> elements or one or more <code><a href=3D#the-tr-element&g=
t;tr</a></code>
+   elements, followed optionally by a <code><a href=3D#the-tfoo=
t-element>tfoot</a></code> element (but
+   there can only be one <code><a href=3D#the-tfoot-element>=
tfoot</a></code> element child in
+   total), optionally intermixed with one or more <a href=3D#script-s=
upporting-elements>script-supporting elements</a>.</dd>
+   <dt><a href=3D#element-dfn-tag-omission title=3Delement-dfn-=
tag-omission>Tag omission in text/html</a>:</dt>
+   <dd>Neither tag is omissible.</dd>
+   <dt><a href=3D#element-dfn-attributes title=3Delement-dfn-at=
tributes>Content attributes</a>:</dt>
+   <dd><a href=3D#global-attributes>Global attributes</a&=
gt;</dd>
+   <dd><code title=3Dattr-table-sortable><a href=3D#attr-=
table-sortable>sortable</a></code></dd>
+   <dt><a href=3D#element-dfn-dom title=3Delement-dfn-dom>DO=
M interface</a>:</dt><!--TOPIC:DOM APIs-->
+   <dd>
+<pre class=3Didl>interface <dfn id=3Dhtmltableelement>HTMLTa=
bleElement</dfn> : <a href=3D#htmlelement>HTMLElement</a&g=
t; {
+           attribute <a href=3D#htmltablecaptionelement>HTMLTableC=
aptionElement</a>? <a href=3D#dom-table-caption title=3Ddom-tabl=
e-caption>caption</a>;
+  <a href=3D#htmlelement>HTMLElement</a> <a href=3D#dom-t=
able-createcaption title=3Ddom-table-createCaption>createCaption</a=
>();
+  void <a href=3D#dom-table-deletecaption title=3Ddom-table-deleteCap=
tion>deleteCaption</a>();
+           attribute <a href=3D#htmltablesectionelement>HTMLTableS=
ectionElement</a>? <a href=3D#dom-table-thead title=3Ddom-table-=
tHead>tHead</a>;
+  <a href=3D#htmlelement>HTMLElement</a> <a href=3D#dom-t=
able-createthead title=3Ddom-table-createTHead>createTHead</a>()=
;
+  void <a href=3D#dom-table-deletethead title=3Ddom-table-deleteTHead=
>deleteTHead</a>();
+           attribute <a href=3D#htmltablesectionelement>HTMLTableS=
ectionElement</a>? <a href=3D#dom-table-tfoot title=3Ddom-table-=
tFoot>tFoot</a>;
+  <a href=3D#htmlelement>HTMLElement</a> <a href=3D#dom-t=
able-createtfoot title=3Ddom-table-createTFoot>createTFoot</a>()=
;
+  void <a href=3D#dom-table-deletetfoot title=3Ddom-table-deleteTFoot=
>deleteTFoot</a>();
+  readonly attribute <a href=3D#htmlcollection>HTMLCollection</=
a> <a href=3D#dom-table-tbodies title=3Ddom-table-tBodies>tBodie=
s</a>;
+  <a href=3D#htmlelement>HTMLElement</a> <a href=3D#dom-t=
able-createtbody title=3Ddom-table-createTBody>createTBody</a>()=
;
+  readonly attribute <a href=3D#htmlcollection>HTMLCollection</=
a> <a href=3D#dom-table-rows title=3Ddom-table-rows>rows</a&g=
t;;
+  <a href=3D#htmlelement>HTMLElement</a> <a href=3D#dom-t=
able-insertrow title=3Ddom-table-insertRow>insertRow</a>(optiona=
l long index =3D -1);
+  void <a href=3D#dom-table-deleterow title=3Ddom-table-deleteRow>=
deleteRow</a>(long index);
+           attribute boolean <a href=3D#dom-table-sortable title=3Ddo=
m-table-sortable>sortable</a>;
+  void <a href=3D#dom-table-stopsorting title=3Ddom-table-stopSorting=
>stopSorting</a>();
+
+  // <a href=3D"#HTMLTableElement-partial">also has obso=
lete members</a>
+};</pre>
+   </dd>
+  </dl><!--TOPIC:HTML--><p>The <code><a href=3D=
#the-table-element>table</a></code> element <a href=3D#=
represents>represents</a> data with more than one dimension, in
+  the form of a <a href=3D#concept-table title=3Dconcept-table>tab=
le</a>.</p>
+
+  <p><span class=3Dimpl>The <code><a href=3D#the-ta=
ble-element>table</a></code> element takes part in the &lt=
;a href=3D#table-model>table
+  model</a>.</span> Tables have rows, columns, and cells giv=
en by their descendants. The rows and
+  columns form a grid; a table's cells must completely cover that grid w=
ithout overlap.</p>
+
+  <div class=3Dimpl>
+
+  <p class=3Dnote>Precise rules for determining whether this confo=
rmance requirement is met are
+  described in the description of the <a href=3D#table-model>table=
 model</a>.</p>
+
+  </div>
+
+  <p>Authors are encouraged to provide information describing how =
to interpret complex tables.
+  Guidance on how to <a href=3D#table-descriptions-techniques>prov=
ide such information</a> is given
+  below.</p>
+
+  <p>Tables must not be used as layout aids. Historically, some We=
b authors have misused tables in
+  HTML as a way to control their page layout. This usage is non-conformi=
ng, because tools attempting
+  to extract tabular data from such documents would obtain very confusin=
g results. In particular,
+  users of accessibility tools like screen readers are likely to find it=
 very difficult to navigate
+  pages with tables used for layout.</p>
+
+  <p class=3Dnote>There are a variety of alternatives to using HTM=
L tables for layout, primarily
+  using CSS positioning and the CSS table model. <a href=3D#refsCSS&g=
t;[CSS]</a></p>
+
+  <div class=3Dimpl>
+
+  <hr><p>Tables can be complicated to understand and navigat=
e. To help users with this, user agents
+  should clearly delineate cells in a table from each other, unless the =
user agent has classified
+  the table as a (non-conforming) layout table.</p>
+
+  </div>
+
+  <p class=3Dnote>Authors <span class=3Dimpl>and implementor=
s</span> are encouraged to consider
+  using some of the <a href=3D#table-layout-techniques>table desig=
n techniques</a> described below
+  to make tables easier to navigate for users.</p>
+
+  <div class=3Dimpl>
+
+  <p>User agents, especially those that do table analysis on arbit=
rary content, are encouraged to
+  find heuristics to determine which tables actually contain data and wh=
ich are merely being used
+  for layout. This specification does not define a precise heuristic, bu=
t the following are
+  suggested as possible indicators:</p>
+
+  <table><thead><tr><th>Feature
+     <th>Indication
+   <tbody><tr><td>The use of the <code title=3Dattr=
-aria-role><a href=3D#attr-aria-role>role</a></code>=
 attribute with the value <code title=3Dattr-aria-role-presentation&gt=
;presentation</code>
+     <td>Probably a layout table
+    <tr><td>The use of the non-conforming <code title=3Da=
ttr-table-border><a href=3D#attr-table-border>border</a>&l=
t;/code> attribute with the non-conforming value 0
+     <td>Probably a layout table
+    <tr><td>The use of the non-conforming <code title=3Da=
ttr-table-cellspacing><a href=3D#attr-table-cellspacing>cellspac=
ing</a></code> and
+     <code title=3Dattr-table-cellpadding><a href=3D#attr-table=
-cellpadding>cellpadding</a></code> attributes with the va=
lue 0
+     <td>Probably a layout table
+   <tbody><tr><td>The use of <code><a href=3D=
#the-caption-element>caption</a></code>, <code><a=
 href=3D#the-thead-element>thead</a></code>, or <code&g=
t;<a href=3D#the-th-element>th</a></code> elements     =
  =20
+     <td>Probably a non-layout table
+    <tr><td>The use of the <code title=3Dattr-tdth-header=
s><a href=3D#attr-tdth-headers>headers</a></code> an=
d <code title=3Dattr-th-scope><a href=3D#attr-th-scope>scope&=
lt;/a></code> attributes
+     <td>Probably a non-layout table
+    <tr><td>The use of the non-conforming <code title=3Da=
ttr-table-border><a href=3D#attr-table-border>border</a>&l=
t;/code> attribute with a value other than 0
+     <td>Probably a non-layout table
+    <tr><td>Explicit visible borders set using CSS
+     <td>Probably a non-layout table
+   <tbody><tr><td>The use of the <code title=3Dattr=
-table-summary><a href=3D#attr-table-summary>summary</a>&l=
t;/code> attribute
+     <td>Not a good indicator (both layout and non-layout tables h=
ave historically been given this attribute)
+  </table><p class=3Dnote>It is quite possible that the abov=
e suggestions are wrong. Implementors are urged
+  to provide feedback elaborating on their experiences with trying to cr=
eate a layout table
+  detection heuristic.</p>
+
+  <p>If a <code><a href=3D#the-table-element>table<=
/a></code> element has a (non-conforming) <code title=3Dattr-=
table-summary><a href=3D#attr-table-summary>summary</a>&lt=
;/code> attribute, and the user agent has not classified the
+  table as a layout table, the user agent may report the contents of tha=
t attribute to the user.</p>
+
+  </div>
+
+  <hr><p>The <code title=3Dattr-table-sortable><a h=
ref=3D#attr-table-sortable>sortable</a></code> attribute i=
s used in the <a href=3D#table-sorting-model>table
+  sorting model</a>.</p>
+
+  <hr><!--TOPIC:DOM APIs--><dl class=3Ddomintro><dt=
><var title=3D"">table</var> . <code title=3D=
dom-table-caption><a href=3D#dom-table-caption>caption</a>=
</code> [ =3D <var title=3D"">value</var> ]&l=
t;/dt>
+   <dd>
+
+    <p>Returns the table's <code><a href=3D#the-caption-e=
lement>caption</a></code> element.</p>
+
+    <p>Can be set, to replace the <code><a href=3D#the-ca=
ption-element>caption</a></code> element. If the new value=
 is not a
+    <code><a href=3D#the-caption-element>caption</a>&l=
t;/code> element, throws a <code><a href=3D#hierarchyrequeste=
rror>HierarchyRequestError</a></code> exception.</p>
+
+   </dd>
+
+   <dt><var title=3D"">caption</var> =3D &lt=
;var title=3D"">table</var> . <code title=3Ddom-tab=
le-createCaption><a href=3D#dom-table-createcaption>createCaptio=
n</a></code>()</dt>
+   <dd>
+
+    <p>Ensures the table has a <code><a href=3D#the-capti=
on-element>caption</a></code> element, and returns it.<=
/p>
+
+   </dd>
+
+   <dt><var title=3D"">table</var> . <cod=
e title=3Ddom-table-deleteCaption><a href=3D#dom-table-deletecaptio=
n>deleteCaption</a></code>()</dt>
+   <dd>
+
+    <p>Ensures the table does not have a <code><a href=3D=
#the-caption-element>caption</a></code> element.</p>
+
+   </dd>
+
+   <dt><var title=3D"">table</var> . <cod=
e title=3Ddom-table-tHead><a href=3D#dom-table-thead>tHead</a=
></code> [ =3D <var title=3D"">value</var>=
 ]</dt>
+   <dd>
+
+    <p>Returns the table's <code><a href=3D#the-thead-ele=
ment>thead</a></code> element.</p>
+
+    <p>Can be set, to replace the <code><a href=3D#the-th=
ead-element>thead</a></code> element. If the new value is =
not a
+    <code><a href=3D#the-thead-element>thead</a></c=
ode> element, throws a <code><a href=3D#hierarchyrequesterror=
>HierarchyRequestError</a></code> exception.</p>
+
+   </dd>
+
+   <dt><var title=3D"">thead</var> =3D <v=
ar title=3D"">table</var> . <code title=3Ddom-table=
-createTHead><a href=3D#dom-table-createthead>createTHead</a&=
gt;</code>()</dt>
+   <dd>
+
+    <p>Ensures the table has a <code><a href=3D#the-thead=
-element>thead</a></code> element, and returns it.</p&g=
t;
+
+   </dd>
+
+   <dt><var title=3D"">table</var> . <cod=
e title=3Ddom-table-deleteTHead><a href=3D#dom-table-deletethead&gt=
;deleteTHead</a></code>()</dt>
+   <dd>
+
+    <p>Ensures the table does not have a <code><a href=3D=
#the-thead-element>thead</a></code> element.</p>
+
+   </dd>
+
+   <dt><var title=3D"">table</var> . <cod=
e title=3Ddom-table-tFoot><a href=3D#dom-table-tfoot>tFoot</a=
></code> [ =3D <var title=3D"">value</var>=
 ]</dt>
+   <dd>
+
+    <p>Returns the table's <code><a href=3D#the-tfoot-ele=
ment>tfoot</a></code> element.</p>
+
+    <p>Can be set, to replace the <code><a href=3D#the-tf=
oot-element>tfoot</a></code> element. If the new value is =
not a
+    <code><a href=3D#the-tfoot-element>tfoot</a></c=
ode> element, throws a <code><a href=3D#hierarchyrequesterror=
>HierarchyRequestError</a></code> exception.</p>
+
+   </dd>
+
+   <dt><var title=3D"">tfoot</var> =3D <v=
ar title=3D"">table</var> . <code title=3Ddom-table=
-createTFoot><a href=3D#dom-table-createtfoot>createTFoot</a&=
gt;</code>()</dt>
+   <dd>
+
+    <p>Ensures the table has a <code><a href=3D#the-tfoot=
-element>tfoot</a></code> element, and returns it.</p&g=
t;
+
+   </dd>
+
+   <dt><var title=3D"">table</var> . <cod=
e title=3Ddom-table-deleteTFoot><a href=3D#dom-table-deletetfoot&gt=
;deleteTFoot</a></code>()</dt>
+   <dd>
+
+    <p>Ensures the table does not have a <code><a href=3D=
#the-tfoot-element>tfoot</a></code> element.</p>
+
+   </dd>
+
+   <dt><var title=3D"">table</var> . <cod=
e title=3Ddom-table-tBodies><a href=3D#dom-table-tbodies>tBodies=
</a></code></dt>
+   <dd>
+
+    <p>Returns an <code><a href=3D#htmlcollection>HTML=
Collection</a></code> of the <code><a href=3D#the-tb=
ody-element>tbody</a></code> elements of the table.</p&=
gt;
+
+   </dd>
+
+   <dt><var title=3D"">tbody</var> =3D <v=
ar title=3D"">table</var> . <code title=3Ddom-table=
-createTBody><a href=3D#dom-table-createtbody>createTBody</a&=
gt;</code>()</dt>
+   <dd>
+
+    <p>Creates a <code><a href=3D#the-tbody-element>tb=
ody</a></code> element, inserts it into the table, and return=
s it.</p>
+
+   </dd>
+
+   <dt><var title=3D"">table</var> . <cod=
e title=3Ddom-table-rows><a href=3D#dom-table-rows>rows</a&gt=
;</code></dt>
+   <dd>
+
+    <p>Returns an <code><a href=3D#htmlcollection>HTML=
Collection</a></code> of the <code><a href=3D#the-tr=
-element>tr</a></code> elements of the table.</p>
+
+   </dd>
+
+   <dt><var title=3D"">tr</var> =3D <var =
title=3D"">table</var> . <code title=3Ddom-table-in=
sertRow><a href=3D#dom-table-insertrow>insertRow</a></c=
ode>( [ <var title=3D"">index</var> ] )</dt&g=
t;
+   <dd>
+
+    <p>Creates a <code><a href=3D#the-tr-element>tr&lt=
;/a></code> element, along with a <code><a href=3D#the-=
tbody-element>tbody</a></code> if required, inserts them
+    into the table at the position given by the argument, and returns th=
e <code><a href=3D#the-tr-element>tr</a></code>.&=
lt;/p>
+
+    <p>The position is relative to the rows in the table. The inde=
x −1, which is the default
+    if the argument is omitted, is equivalent to inserting at the end of=
 the table.</p>
+
+    <p>If the given position is less than −1 or greater =
than the number of rows, throws an
+    <code><a href=3D#indexsizeerror>IndexSizeError</a>=
</code> exception.</p>
+
+   </dd>
+
+   <dt><var title=3D"">table</var> . <cod=
e title=3Ddom-table-deleteRow><a href=3D#dom-table-deleterow>del=
eteRow</a></code>(<var title=3D"">index</v=
ar>)</dt>
+   <dd>
+
+    <p>Removes the <code><a href=3D#the-tr-element>tr&=
lt;/a></code> element with the given position in the table.</=
p>
+
+    <p>The position is relative to the rows in the table. The inde=
x −1 is equivalent to
+    deleting the last row of the table.</p>
+
+    <p>If the given position is less than −1 or greater =
than the index of the last row, or if
+    there are no rows, throws an <code><a href=3D#indexsizeerro=
r>IndexSizeError</a></code> exception.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-table-caption title=3Ddom-table-caption&=
gt;<code>caption</code></dfn> IDL attribute must return=
, on
+  getting, the first <code><a href=3D#the-caption-element>ca=
ption</a></code> element child of the <code><a href=3D=
#the-table-element>table</a></code> element, if any,
+  or null otherwise. On setting, if the new value is a <code><a=
 href=3D#the-caption-element>caption</a></code> element, t=
he first
+  <code><a href=3D#the-caption-element>caption</a><=
/code> element child of the <code><a href=3D#the-table-elemen=
t>table</a></code> element, if any, must be removed, and
+  the new value must be inserted as the first node of the <code>&l=
t;a href=3D#the-table-element>table</a></code> element. If=
 the new
+  value is not a <code><a href=3D#the-caption-element>captio=
n</a></code> element, then a <code><a href=3D#hierar=
chyrequesterror>HierarchyRequestError</a></code> DOM
+  exception must be thrown instead.</p>
+
+  <p>The <dfn id=3Ddom-table-createcaption title=3Ddom-table-cr=
eateCaption><code>createCaption()</code></dfn> metho=
d must return
+  the first <code><a href=3D#the-caption-element>caption<=
/a></code> element child of the <code><a href=3D#the-ta=
ble-element>table</a></code> element, if any; otherwise
+  a new <code><a href=3D#the-caption-element>caption</a&g=
t;</code> element must be created, inserted as the first node of th=
e
+  <code><a href=3D#the-table-element>table</a></cod=
e> element, and then returned.</p>
+
+  <p>The <dfn id=3Ddom-table-deletecaption title=3Ddom-table-de=
leteCaption><code>deleteCaption()</code></dfn> metho=
d must remove
+  the first <code><a href=3D#the-caption-element>caption<=
/a></code> element child of the <code><a href=3D#the-ta=
ble-element>table</a></code> element, if any.</p>
+
+  <p>The <dfn id=3Ddom-table-thead title=3Ddom-table-tHead>&=
lt;code>tHead</code></dfn> IDL attribute must return, on
+  getting, the first <code><a href=3D#the-thead-element>thea=
d</a></code> element child of the <code><a href=3D#t=
he-table-element>table</a></code> element, if any, or
+  null otherwise. On setting, if the new value is a <code><a hr=
ef=3D#the-thead-element>thead</a></code> element, the firs=
t
+  <code><a href=3D#the-thead-element>thead</a></cod=
e> element child of the <code><a href=3D#the-table-element&gt=
;table</a></code> element, if any, must be removed, and
+  the new value must be inserted immediately before the first element in=
 the <code><a href=3D#the-table-element>table</a></c=
ode>
+  element that is neither a <code><a href=3D#the-caption-elemen=
t>caption</a></code> element nor a <code><a href=3D=
#the-colgroup-element>colgroup</a></code> element, if
+  any, or at the end of the table if there are no such elements. If the =
new value is not a
+  <code><a href=3D#the-thead-element>thead</a></cod=
e> element, then a <code><a href=3D#hierarchyrequesterror>=
HierarchyRequestError</a></code> DOM exception must be thrown
+  instead.</p>
+
+  <p>The <dfn id=3Ddom-table-createthead title=3Ddom-table-crea=
teTHead><code>createTHead()</code></dfn> method must=
 return the
+  first <code><a href=3D#the-thead-element>thead</a>&l=
t;/code> element child of the <code><a href=3D#the-table-elem=
ent>table</a></code> element, if any; otherwise a new
+  <code><a href=3D#the-thead-element>thead</a></cod=
e> element must be created and inserted immediately before the first e=
lement in
+  the <code><a href=3D#the-table-element>table</a><=
/code> element that is neither a <code><a href=3D#the-caption=
-element>caption</a></code> element nor a
+  <code><a href=3D#the-colgroup-element>colgroup</a>&l=
t;/code> element, if any, or at the end of the table if there are no s=
uch elements,
+  and then that new element must be returned.</p>
+
+  <p>The <dfn id=3Ddom-table-deletethead title=3Ddom-table-dele=
teTHead><code>deleteTHead()</code></dfn> method must=
 remove the
+  first <code><a href=3D#the-thead-element>thead</a>&l=
t;/code> element child of the <code><a href=3D#the-table-elem=
ent>table</a></code> element, if any.</p>
+
+  <p>The <dfn id=3Ddom-table-tfoot title=3Ddom-table-tFoot>&=
lt;code>tFoot</code></dfn> IDL attribute must return, on
+  getting, the first <code><a href=3D#the-tfoot-element>tfoo=
t</a></code> element child of the <code><a href=3D#t=
he-table-element>table</a></code> element, if any, or
+  null otherwise. On setting, if the new value is a <code><a hr=
ef=3D#the-tfoot-element>tfoot</a></code> element, the firs=
t
+  <code><a href=3D#the-tfoot-element>tfoot</a></cod=
e> element child of the <code><a href=3D#the-table-element&gt=
;table</a></code> element, if any, must be removed, and
+  the new value must be inserted immediately before the first element in=
 the <code><a href=3D#the-table-element>table</a></c=
ode>
+  element that is neither a <code><a href=3D#the-caption-elemen=
t>caption</a></code> element, a <code><a href=3D#=
the-colgroup-element>colgroup</a></code> element, nor a
+  <code><a href=3D#the-thead-element>thead</a></cod=
e> element, if any, or at the end of the table if there are no such el=
ements. If
+  the new value is not a <code><a href=3D#the-tfoot-element>=
tfoot</a></code> element, then a <code><a href=3D#hi=
erarchyrequesterror>HierarchyRequestError</a></code> DOM
+  exception must be thrown instead.</p>
+
+  <p>The <dfn id=3Ddom-table-createtfoot title=3Ddom-table-crea=
teTFoot><code>createTFoot()</code></dfn> method must=
 return the
+  first <code><a href=3D#the-tfoot-element>tfoot</a>&l=
t;/code> element child of the <code><a href=3D#the-table-elem=
ent>table</a></code> element, if any; otherwise a new
+  <code><a href=3D#the-tfoot-element>tfoot</a></cod=
e> element must be created and inserted immediately before the first e=
lement in
+  the <code><a href=3D#the-table-element>table</a><=
/code> element that is neither a <code><a href=3D#the-caption=
-element>caption</a></code> element, a
+  <code><a href=3D#the-colgroup-element>colgroup</a>&l=
t;/code> element, nor a <code><a href=3D#the-thead-element&gt=
;thead</a></code> element, if any, or at the end of the
+  table if there are no such elements, and then that new element must be=
 returned.</p>
+
+  <p>The <dfn id=3Ddom-table-deletetfoot title=3Ddom-table-dele=
teTFoot><code>deleteTFoot()</code></dfn> method must=
 remove the
+  first <code><a href=3D#the-tfoot-element>tfoot</a>&l=
t;/code> element child of the <code><a href=3D#the-table-elem=
ent>table</a></code> element, if any.</p>
+
+  <p>The <dfn id=3Ddom-table-tbodies title=3Ddom-table-tBodies&=
gt;<code>tBodies</code></dfn> attribute must return an
+  <code><a href=3D#htmlcollection>HTMLCollection</a>&l=
t;/code> rooted at the <code><a href=3D#the-table-element>=
table</a></code> node, whose filter matches only
+  <code><a href=3D#the-tbody-element>tbody</a></cod=
e> elements that are children of the <code><a href=3D#the-tab=
le-element>table</a></code> element.</p>
+
+  <p>The <dfn id=3Ddom-table-createtbody title=3Ddom-table-crea=
teTBody><code>createTBody()</code></dfn> method must=
 create a
+  new <code><a href=3D#the-tbody-element>tbody</a><=
/code> element, insert it immediately after the last <code><a=
 href=3D#the-tbody-element>tbody</a></code> element
+  child in the <code><a href=3D#the-table-element>table</=
a></code> element, if any, or at the end of the <code><=
a href=3D#the-table-element>table</a></code> element
+  if the <code><a href=3D#the-table-element>table</a>&=
lt;/code> element has no <code><a href=3D#the-tbody-element&g=
t;tbody</a></code> element children, and then must return
+  the new <code><a href=3D#the-tbody-element>tbody</a>=
</code> element.</p>
+
+  <p>The <dfn id=3Ddom-table-rows title=3Ddom-table-rows>&lt=
;code>rows</code></dfn> attribute must return an
+  <code><a href=3D#htmlcollection>HTMLCollection</a>&l=
t;/code> rooted at the <code><a href=3D#the-table-element>=
table</a></code> node, whose filter matches only
+  <code><a href=3D#the-tr-element>tr</a></code> =
elements that are either children of the <code><a href=3D#the-ta=
ble-element>table</a></code> element, or children
+  of <code><a href=3D#the-thead-element>thead</a></=
code>, <code><a href=3D#the-tbody-element>tbody</a>&=
lt;/code>, or <code><a href=3D#the-tfoot-element>tfoot<=
/a></code> elements that are themselves
+  children of the <code><a href=3D#the-table-element>table&l=
t;/a></code> element. The elements in the collection must be ord=
ered such
+  that those elements whose parent is a <code><a href=3D#the-th=
ead-element>thead</a></code> are included first, in tree o=
rder,
+  followed by those elements whose parent is either a <code><a =
href=3D#the-table-element>table</a></code> or <code>=
<a href=3D#the-tbody-element>tbody</a></code>
+  element, again in tree order, followed finally by those elements whose=
 parent is a
+  <code><a href=3D#the-tfoot-element>tfoot</a></cod=
e> element, still in tree order.</p>
+
+  <p>The behavior of the <dfn id=3Ddom-table-insertrow title=3D=
dom-table-insertRow><code>insertRow(<var title=3D""=
>index</var>)</code></dfn> method depends on the sta=
te of the table. When it is called,
+  the method must act as required by the first item in the following lis=
t of conditions that
+  describes the state of the table and the <var title=3D""&=
gt;index</var> argument:</p>
+
+  <dl class=3Dswitch><dt>If <var title=3D"">=
index</var> is less than −1 or greater than the number of=
 elements in
+   <code title=3Ddom-table-rows><a href=3D#dom-table-rows>ro=
ws</a></code> collection:</dt>
+
+   <dd>The method must throw an <code><a href=3D#indexsiz=
eerror>IndexSizeError</a></code> exception.</dd>
+
+   <dt>If the <code title=3Ddom-table-rows><a href=3D#dom=
-table-rows>rows</a></code> collection has zero elements i=
n it, and the
+   <code><a href=3D#the-table-element>table</a></co=
de> has no <code><a href=3D#the-tbody-element>tbody</a&=
gt;</code> elements in it:</dt>
+
+   <dd>The method must create a <code><a href=3D#the-tbod=
y-element>tbody</a></code> element, then create a <code=
><a href=3D#the-tr-element>tr</a></code> element,
+   then append the <code><a href=3D#the-tr-element>tr</a&=
gt;</code> element to the <code><a href=3D#the-tbody-eleme=
nt>tbody</a></code> element, then append the
+   <code><a href=3D#the-tbody-element>tbody</a></co=
de> element to the <code><a href=3D#the-table-element>tabl=
e</a></code> element, and finally return the
+   <code><a href=3D#the-tr-element>tr</a></code>=
 element.</dd>
+
+   <dt>If the <code title=3Ddom-table-rows><a href=3D#dom=
-table-rows>rows</a></code> collection has zero elements i=
n it:</dt>
+
+   <dd>The method must create a <code><a href=3D#the-tr-e=
lement>tr</a></code> element, append it to the last <co=
de><a href=3D#the-tbody-element>tbody</a></code>
+   element in the table, and return the <code><a href=3D#the-tr=
-element>tr</a></code> element.</dd>
+
+   <dt>If <var title=3D"">index</var> is &am=
p;minus;1 or equal to the number of items in <code title=3Ddom-table-r=
ows><a href=3D#dom-table-rows>rows</a></code> collec=
tion:</dt>
+
+   <dd>The method must create a <code><a href=3D#the-tr-e=
lement>tr</a></code> element, and append it to the parent =
of the last
+   <code><a href=3D#the-tr-element>tr</a></code>=
 element in the <code title=3Ddom-table-rows><a href=3D#dom-tabl=
e-rows>rows</a></code> collection. Then, the
+   newly created <code><a href=3D#the-tr-element>tr</a&gt=
;</code> element must be returned.</dd>
+
+   <dt>Otherwise:</dt>
+
+   <dd>The method must create a <code><a href=3D#the-tr-e=
lement>tr</a></code> element, insert it immediately before=
 the <var title=3D"">index</var>th <code><=
a href=3D#the-tr-element>tr</a></code> element in the <=
code title=3Ddom-table-rows><a href=3D#dom-table-rows>rows</a=
></code>
+   collection, in the same parent, and finally must return the newly cre=
ated <code><a href=3D#the-tr-element>tr</a></code&gt=
;
+   element.</dd>
+
+  </dl><p>When the <dfn id=3Ddom-table-deleterow title=3D=
dom-table-deleteRow><code>deleteRow(<var title=3D""=
>index</var>)</code></dfn> method is called, the use=
r agent must run the following
+  steps:</p>
+
+  <ol><li><p>If <var title=3D"">index&=
lt;/var> is equal to −1, then <var title=3D""&g=
t;index</var> must be
+   set to the number of items in the <code title=3Ddom-table-rows>=
<a href=3D#dom-table-rows>rows</a></code> collection, m=
inus
+   one.</li>
+
+   <li><p>Now, if <var title=3D"">index</=
var> is less than zero, or greater than or equal to the
+   number of elements in the <code title=3Ddom-table-rows><a hr=
ef=3D#dom-table-rows>rows</a></code> collection, the metho=
d must
+   instead throw an <code><a href=3D#indexsizeerror>IndexSiz=
eError</a></code> exception, and these steps must be aborted.=
</li>
+
+   <li><p>Otherwise, the method must remove the <var titl=
e=3D"">index</var>th element in the <code title=3Dd=
om-table-rows><a href=3D#dom-table-rows>rows</a></code&=
gt; collection from its parent.</p>
+
+  </ol><p>The <code title=3Ddom-table-stopSorting><=
a href=3D#dom-table-stopsorting>stopSorting()</a></code> m=
ethod is used in the <a href=3D#table-sorting-model>table
+  sorting model</a>.</p>
+
+  <p>The IDL attribute <dfn id=3Ddom-table-sortable title=3Ddom=
-table-sortable><code>sortable</code></dfn> must
+  <a href=3D#reflect>reflect</a> the <code title=3Dattr-t=
able-sortable><a href=3D#attr-table-sortable>sortable</a>&=
lt;/code> content attribute.</p>
+
+  </div>
+<!--TOPIC:HTML-->
+
+  <div class=3Dexample>
+
+   <p>Here is an example of a table being used to mark up a Sudoku=
 puzzle. Observe the lack of
+   headers, which are not necessary in such a table.</p>
+
+   <pre><section>
+ <style scoped>
+  table { border-collapse: collapse; border: solid thick; }
+  colgroup, tbody { border: solid medium; }
+  td { border: solid thin; height: 1.4em; width: 1.4em; text-align: cent=
er; padding: 0; }
+ </style>
+ <h1>Today's Sudoku</h1>
+ <table>
+  <colgroup><col><col><=
col>
+  <colgroup><col><col><=
col>
+  <colgroup><col><col><=
col>
+  <tbody>
+   <tr> <td> 1 <td>   <=
td> 3 <td> 6 <td>   <td>=
 4 <td> 7 <td>   <td> 9
+   <tr> <td>   <td> 2 <=
td>   <td>   <td> 9 <td>=
   <td>   <td> 1 <td>
+   <tr> <td> 7 <td>   <=
td>   <td>   <td>   <td>=
   <td>   <td>   <td> 6
+  <tbody>
+   <tr> <td> 2 <td>   <=
td> 4 <td>   <td> 3 <td>=
   <td> 9 <td>   <td> 8
+   <tr> <td>   <td>   <=
td>   <td>   <td>   <td>=
   <td>   <td>   <td>
+   <tr> <td> 5 <td>   <=
td>   <td> 9 <td>   <td>=
 7 <td>   <td>   <td> 1
+  <tbody>
+   <tr> <td> 6 <td>   <=
td>   <td>   <td> 5 <td>=
   <td>   <td>   <td> 2
+   <tr> <td>   <td>   <=
td>   <td>   <td> 7 <td>=
   <td>   <td>   <td>
+   <tr> <td> 9 <td>   <=
td>   <td> 8 <td>   <td>=
 2 <td>   <td>   <td> 5
+ </table>
+</section></pre>
+
+  </div>
+
+
+
+
+  <h5 id=3Dtable-descriptions-techniques><span class=3Dsecno&gt=
;4.9.1.1 </span>Techniques for describing tables</h5>
+
+  <p id=3Dtable-descriptions>For tables that consist of more than =
just a grid of cells with headers
+  in the first row and headers in the first column, and for any table in=
 general where the reader
+  might have difficulty understanding the content, authors should includ=
e explanatory information
+  introducing the table. This information is useful for all users, but i=
s especially useful for
+  users who cannot see the table, e.g. users of screen readers.</p&gt=
;
+
+  <p>Such explanatory information should introduce the purpose of =
the table, outline its basic cell
+  structure, highlight any trends or patterns, and generally teach the u=
ser how to use the
+  table.</p>
+
+  <!-- Describing the conclusions of the data in a table is useful to=
 everyone; explaining how to
+  read the table, if not obvious from the headers alone, is useful to ev=
eryone; describing the
+  structure of the table, if it is easy to grasp visually, might not be =
useful to everyone, but it
+  might also not be useful to users who can quickly navigate the table w=
ith an accessibility tool.
+  -->
+
+  <p>For instance, the following table:</p>
+
+  <table><caption>Characteristics with positive and negative=
 sides</caption>
+   <thead><tr><th id=3Dn> Negative
+     <th> Characteristic
+     <th> Positive
+   <tbody><tr><td headers=3D"n r1"> Sad
+     <th id=3Dr1> Mood
+     <td> Happy
+    <tr><td headers=3D"n r2"> Failing
+     <th id=3Dr2> Grade
+     <td> Passing
+  </table><p>...might benefit from a description explaining =
the way the table is laid out, something like
+  "Characteristics are given in the second column, with the negativ=
e side in the left column and the
+  positive side in the right column".</p>
+
+  <p>There are a variety of ways to include this information, such=
 as:</p>
+
+  <dl><dt>In prose, surrounding the table</dt>
+
+   <dd>
+    <div class=3Dexample><pre><p>In the follow=
ing table, characteristics are given in the second
+column, with the negative side in the left column and the positive
+side in the right column.</p>
+<table>
+ <caption>Characteristics with positive and negative sides=
</caption>
+ <thead>
+  <tr>
+   <th id=3D"n"> Negative
+   <th> Characteristic
+   <th> Positive
+ <tbody>
+  <tr>
+   <td headers=3D"n r1"> Sad
+   <th id=3D"r1"> Mood
+   <td> Happy
+  <tr>
+   <td headers=3D"n r2"> Failing
+   <th id=3D"r2"> Grade
+   <td> Passing
+</table></pre></div>
+   </dd>
+
+   <dt>In the table's <code><a href=3D#the-caption-elemen=
t>caption</a></code></dt>
+
+   <dd>
+    <div class=3Dexample><pre><table>
+ <caption>
+  <strong>Characteristics with positive and negative sides=
.</strong>
+  <p>Characteristics are given in the second column, with =
the
+  negative side in the left column and the positive side in the right
+  column.</p>
+ </caption>
+ <thead>
+  <tr>
+   <th id=3D"n"> Negative
+   <th> Characteristic
+   <th> Positive
+ <tbody>
+  <tr>
+   <td headers=3D"n r1"> Sad
+   <th id=3D"r1"> Mood
+   <td> Happy
+  <tr>
+   <td headers=3D"n r2"> Failing
+   <th id=3D"r2"> Grade
+   <td> Passing
+</table></pre></div>
+   </dd>
+
+   <dt>In the table's <code><a href=3D#the-caption-elemen=
t>caption</a></code>, in a <code><a href=3D#the-d=
etails-element>details</a></code> element</dt>
+
+   <dd>
+    <div class=3Dexample><pre><table>
+ <caption>
+  <strong>Characteristics with positive and negative sides=
.</strong>
+  <details>
+   <summary>Help</summary>
+   <p>Characteristics are given in the second column, with=
 the
+   negative side in the left column and the positive side in the right
+   column.</p>
+  </details>
+ </caption>
+ <thead>
+  <tr>
+   <th id=3D"n"> Negative
+   <th> Characteristic
+   <th> Positive
+ <tbody>
+  <tr>
+   <td headers=3D"n r1"> Sad
+   <th id=3D"r1"> Mood
+   <td> Happy
+  <tr>
+   <td headers=3D"n r2"> Failing
+   <th id=3D"r2"> Grade
+   <td> Passing
+</table></pre></div>
+   </dd>
+
+   <dt>Next to the table, in the same <code><a href=3D#th=
e-figure-element>figure</a></code></dt>
+
+   <dd>
+    <div class=3Dexample><pre><figure>
+ <figcaption>Characteristics with positive and negative si=
des</figcaption>
+ <p>Characteristics are given in the second column, with t=
he
+ negative side in the left column and the positive side in the right
+ column.</p>
+ <table>
+  <thead>
+   <tr>
+    <th id=3D"n"> Negative
+    <th> Characteristic
+    <th> Positive
+  <tbody>
+   <tr>
+    <td headers=3D"n r1"> Sad
+    <th id=3D"r1"> Mood
+    <td> Happy
+   <tr>
+    <td headers=3D"n r2"> Failing
+    <th id=3D"r2"> Grade
+    <td> Passing
+ </table>
+</figure></pre></div>
+   </dd>
+
+   <dt>Next to the table, in a <code><a href=3D#the-figur=
e-element>figure</a></code>'s <code><a href=3D#th=
e-figcaption-element>figcaption</a></code></dt>
+
+   <dd>
+    <div class=3Dexample><pre><figure>
+ <figcaption>
+  <strong>Characteristics with positive and negative sides=
</strong>
+  <p>Characteristics are given in the second column, with =
the
+  negative side in the left column and the positive side in the right
+  column.</p>
+ </figcaption>
+ <table>
+  <thead>
+   <tr>
+    <th id=3D"n"> Negative
+    <th> Characteristic
+    <th> Positive
+  <tbody>
+   <tr>
+    <td headers=3D"n r1"> Sad
+    <th id=3D"r1"> Mood
+    <td> Happy
+   <tr>
+    <td headers=3D"n r2"> Failing
+    <th id=3D"r2"> Grade
+    <td> Passing
+ </table>
+</figure></pre></div>
+   </dd>
+
+  </dl><p>Authors may also use other techniques, or combinat=
ions of the above techniques, as
+  appropriate.</p>
+
+  <p>The best option, of course, rather than writing a description=
 explaining the way the table is
+  laid out, is to adjust the table such that no explanation is needed.&l=
t;/p>
+
+  <div class=3Dexample>
+
+   <p>In the case of the table used in the examples above, a simpl=
e rearrangement of the table so
+   that the headers are on the top and left sides removes the need for a=
n explanation as well as
+   removing the need for the use of <code title=3Dattr-tdth-headers&g=
t;<a href=3D#attr-tdth-headers>headers</a></code> attri=
butes:</p>
+
+   <pre><table>
+ <caption>Characteristics with positive and negative sides=
</caption>
+ <thead>
+  <tr>
+   <th> Characteristic
+   <th> Negative
+   <th> Positive
+ <tbody>
+  <tr>
+   <th> Mood
+   <td> Sad
+   <td> Happy
+  <tr>
+   <th> Grade
+   <td> Failing
+   <td> Passing
+</table></pre>
+
+  </div>
+
+
+  <h5 id=3Dtable-layout-techniques><span class=3Dsecno>4.9.1=
.2 </span>Techniques for table design</h5>
+
+  <p>Good table design is key to making tables more readable and u=
sable.</p>
+
+  <p>In visual media, providing column and row borders and alterna=
ting row backgrounds can be very
+  effective to make complicated tables more readable.</p>
+
+  <p>For tables with large volumes of numeric content, using monos=
paced fonts can help users see
+  patterns, especially in situations where a user agent does not render =
the borders. (Unfortunately,
+  for historical reasons, not rendering borders on tables is a common de=
fault.)</p>
+
+  <p>In speech media, table cells can be distinguished by reportin=
g the corresponding headers before
+  reading the cell's contents, and by allowing users to navigate the tab=
le in a grid fashion, rather
+  than serializing the entire contents of the table in source order.<=
/p>
+
+  <p>Authors are encouraged to use CSS to achieve these effects.&l=
t;/p>
+
+  <div class=3Dimpl>
+
+  <p>User agents are encouraged to render tables using these techn=
iques whenever the page does not
+  use CSS and the table is not classified as a layout table.</p>
+
+  </div>
+
+
+
+
+  <h4 id=3Dthe-caption-element><span class=3Dsecno>4.9.2 &lt=
;/span>The <dfn><code>caption</code></dfn> ele=
ment</h4>
+
+  <dl class=3Delement><dt><a href=3D#element-dfn-categori=
es title=3Delement-dfn-categories>Categories</a>:</dt>
+   <dd>None.</dd>
+   <dt><a href=3D#element-dfn-contexts title=3Delement-dfn-cont=
exts>Contexts in which this element can be used</a>:</dt>
+   <dd>As the first element child of a <code><a href=3D#t=
he-table-element>table</a></code> element.</dd>
+   <dt><a href=3D#element-dfn-content-model title=3Delement-dfn=
-content-model>Content model</a>:</dt>
+   <dd><a href=3D#flow-content>Flow content</a>, but w=
ith no descendant <code><a href=3D#the-table-element>table&lt=
;/a></code> elements.</dd>
+   <dt><a href=3D#element-dfn-tag-omission title=3Delement-dfn-=
tag-omission>Tag omission in text/html</a>:</dt>
+   <dd>Neither tag is omissible.</dd>
+   <dt><a href=3D#element-dfn-attributes title=3Delement-dfn-at=
tributes>Content attributes</a>:</dt>
+   <dd><a href=3D#global-attributes>Global attributes</a&=
gt;</dd>
+   <dt><a href=3D#element-dfn-dom title=3Delement-dfn-dom>DO=
M interface</a>:</dt><!--TOPIC:DOM APIs-->
+   <dd>
+<pre class=3Didl>interface <dfn id=3Dhtmltablecaptionelement&gt=
;HTMLTableCaptionElement</dfn> : <a href=3D#htmlelement>HTMLE=
lement</a> {
+  // <a href=3D"#HTMLTableCaptionElement-partial">also h=
as obsolete members</a>
+};</pre>
+   </dd>
+  </dl><!--TOPIC:HTML--><p>The <code><a href=3D=
#the-caption-element>caption</a></code> element <a href=
=3D#represents>represents</a> the title of the <code><a=
 href=3D#the-table-element>table</a></code>
+  that is its parent, if it has a parent and that is a <code><a=
 href=3D#the-table-element>table</a></code> element.</p=
>
+
+  <div class=3Dimpl>
+
+  <p>The <code><a href=3D#the-caption-element>caption&=
lt;/a></code> element takes part in the <a href=3D#table-mode=
l>table model</a>.</p>
+
+  </div>
+
+  <p>When a <code><a href=3D#the-table-element>table&l=
t;/a></code> element is the only content in a <code><a =
href=3D#the-figure-element>figure</a></code> element other
+  than the <code><a href=3D#the-figcaption-element>figcaptio=
n</a></code>, the <code><a href=3D#the-caption-eleme=
nt>caption</a></code> element should be omitted in favor o=
f
+  the <code><a href=3D#the-figcaption-element>figcaption<=
/a></code>.</p>
+
+  <p>A caption can introduce context for a table, making it signif=
icantly easier to understand.</p>
+
+  <div class=3Dexample>
+
+   <p>Consider, for instance, the following table:</p>
+
+   <table class=3Ddice-example><tr><th>   <th> 1=
 <th> 2 <th> 3 <th> 4 <th> 5 <th> 6
+    <tr><th> 1 <td> 2 <td> 3 <td> 4 <td=
> 5 <td> 6 <td> 7
+    <tr><th> 2 <td> 3 <td> 4 <td> 5 <td=
> 6 <td> 7 <td> 8
+    <tr><th> 3 <td> 4 <td> 5 <td> 6 <td=
> 7 <td> 8 <td> 9
+    <tr><th> 4 <td> 5 <td> 6 <td> 7 <td=
> 8 <td> 9 <td> 10
+    <tr><th> 5 <td> 6 <td> 7 <td> 8 <td=
> 9 <td> 10 <td> 11
+    <tr><th> 6 <td> 7 <td> 8 <td> 9 <td=
> 10 <td> 11 <td> 12
+   </table><p>In the abstract, this table is not clear. Howe=
ver, with a caption giving the table's number
+   (for reference in the main prose) and explaining its use, it makes mo=
re sense:</p>
+
+   <pre><caption>
+<p>Table 1.
+<p>This table shows the total score obtained from rolling =
two
+six-sided dice. The first row represents the value of the first die,
+the first column the value of the second die. The total is given in
+the cell that corresponds to the values of the two dice.
+</caption></pre>
+
+   <p>This provides the user with more context:</p>
+
+   <table class=3Ddice-example><caption>
+     <p>Table 1.
+     <p>This table shows the total score obtained from rolling two
+     six-sided dice. The first row represents the value of the first
+     die, the first column the value of the second die. The total is
+     given in the cell that corresponds to the values of the two dice.
+    </caption>
+    <tr><th>   <th> 1 <th> 2 <th> 3 <th=
> 4 <th> 5 <th> 6
+    <tr><th> 1 <td> 2 <td> 3 <td> 4 <td=
> 5 <td> 6 <td> 7
+    <tr><th> 2 <td> 3 <td> 4 <td> 5 <td=
> 6 <td> 7 <td> 8
+    <tr><th> 3 <td> 4 <td> 5 <td> 6 <td=
> 7 <td> 8 <td> 9
+    <tr><th> 4 <td> 5 <td> 6 <td> 7 <td=
> 8 <td> 9 <td> 10
+    <tr><th> 5 <td> 6 <td> 7 <td> 8 <td=
> 9 <td> 10 <td> 11
+    <tr><th> 6 <td> 7 <td> 8 <td> 9 <td=
> 10 <td> 11 <td> 12
+   </table></div>
+
+
+
+
+  <h4 id=3Dthe-colgroup-element><span class=3Dsecno>4.9.3 &l=
t;/span>The <dfn><code>colgroup</code></dfn> e=
lement</h4>
+
+  <dl class=3Delement><dt><a href=3D#element-dfn-categori=
es title=3Delement-dfn-categories>Categories</a>:</dt>
+   <dd>None.</dd>
+   <dt><a href=3D#element-dfn-contexts title=3Delement-dfn-cont=
exts>Contexts in which this element can be used</a>:</dt>
+   <dd>As a child of a <code><a href=3D#the-table-element=
>table</a></code> element, after any
+   <code><a href=3D#the-caption-element>caption</a>&lt=
;/code> elements and before any <code><a href=3D#the-thead-el=
ement>thead</a></code>,
+   <code><a href=3D#the-tbody-element>tbody</a></co=
de>, <code><a href=3D#the-tfoot-element>tfoot</a>&lt=
;/code>, and <code><a href=3D#the-tr-element>tr</a>&=
lt;/code>
+   elements.</dd>
+   <dt><a href=3D#element-dfn-content-model title=3Delement-dfn=
-content-model>Content model</a>:</dt>
+   <dd>If the <code title=3Dattr-colgroup-span><a href=3D=
#attr-colgroup-span>span</a></code> attribute is present: =
Empty.</dd>
+   <dd>If the <code title=3Dattr-colgroup-span><a href=3D=
#attr-colgroup-span>span</a></code> attribute is absent: Z=
ero or more <code><a href=3D#the-col-element>col</a>&lt=
;/code> and <code><a href=3D#the-template-element>template=
</a></code> elements.</dd>
+   <dt><a href=3D#element-dfn-tag-omission title=3Delement-dfn-=
tag-omission>Tag omission in text/html</a>:</dt>
+   <dd>A <code><a href=3D#the-colgroup-element>colgrou=
p</a></code> element's <a href=3D#syntax-start-tag title=3D=
syntax-start-tag>start tag</a> can be
+   omitted if the first thing inside the <code><a href=3D#the-c=
olgroup-element>colgroup</a></code> element is a <code&=
gt;<a href=3D#the-col-element>col</a></code> element,
+   and if the element is not immediately preceded by another <code&gt=
;<a href=3D#the-colgroup-element>colgroup</a></code> el=
ement whose
+   <a href=3D#syntax-end-tag title=3Dsyntax-end-tag>end tag</a&=
gt; has been omitted. (It can't be omitted if the element
+   is empty.)</dd>
+   <dd>A <code><a href=3D#the-colgroup-element>colgrou=
p</a></code> element's <a href=3D#syntax-end-tag title=3Ds=
yntax-end-tag>end tag</a> can be omitted if
+   the <code><a href=3D#the-colgroup-element>colgroup</a&=
gt;</code> element is not immediately followed by a <a href=3D#s=
pace-character>space character</a> or
+   a <a href=3D#syntax-comments title=3Dsyntax-comments>comment&lt=
;/a>.</dd>
+   <dt><a href=3D#element-dfn-attributes title=3Delement-dfn-at=
tributes>Content attributes</a>:</dt>
+   <dd><a href=3D#global-attributes>Global attributes</a&=
gt;</dd>
+   <dd><code title=3Dattr-colgroup-span><a href=3D#attr-c=
olgroup-span>span</a></code> — Number of columns=
 spanned by the element</dd>
+   <dt><a href=3D#element-dfn-dom title=3Delement-dfn-dom>DO=
M interface</a>:</dt><!--TOPIC:DOM APIs-->
+   <dd>
+<pre class=3Didl>interface <dfn id=3Dhtmltablecolelement>HTM=
LTableColElement</dfn> : <a href=3D#htmlelement>HTMLElement&l=
t;/a> {
+           attribute unsigned long <a href=3D#dom-colgroup-span title=
=3Ddom-colgroup-span>span</a>;
+
+  // <a href=3D"#HTMLTableColElement-partial">also has o=
bsolete members</a>
+};</pre>
+   </dd>
+  </dl><!--TOPIC:HTML--><p>The <code><a href=3D=
#the-colgroup-element>colgroup</a></code> element <a hr=
ef=3D#represents>represents</a> a <a href=3D#concept-column-g=
roup title=3Dconcept-column-group>group</a> of one or more <a=
 href=3D#concept-column title=3Dconcept-column>columns</a> in th=
e <code><a href=3D#the-table-element>table</a></code=
> that is its parent, if it has a
+  parent and that is a <code><a href=3D#the-table-element>ta=
ble</a></code> element.</p>
+
+  <p>If the <code><a href=3D#the-colgroup-element>colg=
roup</a></code> element contains no <code><a href=3D=
#the-col-element>col</a></code> elements, then the element
+  may have a <dfn id=3Dattr-colgroup-span title=3Dattr-colgroup-span&=
gt;<code>span</code></dfn> content attribute specified,
+  whose value must be a <a href=3D#valid-non-negative-integer>vali=
d non-negative integer</a> greater than zero.</p>
+
+  <div class=3Dimpl>
+
+  <p>The <code><a href=3D#the-colgroup-element>colgrou=
p</a></code> element and its <code title=3Dattr-colgroup-s=
pan><a href=3D#attr-colgroup-span>span</a></code>
+  attribute take part in the <a href=3D#table-model>table model&lt=
;/a>.</p>
+
+  <p>The <dfn id=3Ddom-colgroup-span title=3Ddom-colgroup-span&=
gt;<code>span</code></dfn> IDL attribute must
+  <a href=3D#reflect>reflect</a> the content attribute of th=
e same name. The value must be <a href=3D#limited-to-only-non-negative=
-numbers-greater-than-zero>limited to
+  only non-negative numbers greater than zero</a>.</p>
+
+  </div>
+
+
+  <h4 id=3Dthe-col-element><span class=3Dsecno>4.9.4 </sp=
an>The <dfn><code>col</code></dfn> element<=
/h4>
+
+  <dl class=3Delement><dt><a href=3D#element-dfn-categori=
es title=3Delement-dfn-categories>Categories</a>:</dt>
+   <dd>None.</dd>
+   <dt><a href=3D#element-dfn-contexts title=3Delement-dfn-cont=
exts>Contexts in which this element can be used</a>:</dt>
+   <dd>As a child of a <code><a href=3D#the-colgroup-elem=
ent>colgroup</a></code> element that doesn't have
+   a <code title=3Dattr-col-span><a href=3D#attr-col-span>sp=
an</a></code> attribute.</dd>
+   <dt><a href=3D#element-dfn-content-model title=3Delement-dfn=
-content-model>Content model</a>:</dt>
+   <dd>Empty.</dd>
+   <dt><a href=3D#element-dfn-tag-omission title=3Delement-dfn-=
tag-omission>Tag omission in text/html</a>:</dt>
+   <dd>No <a href=3D#syntax-end-tag title=3Dsyntax-end-tag>e=
nd tag</a>.</dd>
+   <dt><a href=3D#element-dfn-attributes title=3Delement-dfn-at=
tributes>Content attributes</a>:</dt>
+   <dd><a href=3D#global-attributes>Global attributes</a&=
gt;</dd>
+   <dd><code title=3Dattr-col-span><a href=3D#attr-col-sp=
an>span</a></code> — Number of columns spanned b=
y the element</dd>
+   <!-- v2: char, to specify the decimal character used in numeric da=
ta cells in the column (not header cells) -->
+   <dt><a href=3D#element-dfn-dom title=3Delement-dfn-dom>DO=
M interface</a>:</dt><!--TOPIC:DOM APIs-->
+   <dd>
+    <p><code><a href=3D#htmltablecolelement>HTMLTableC=
olElement</a></code>, same as for
+    <code><a href=3D#the-colgroup-element>colgroup</a>=
</code> elements. This interface defines one member,
+    <code title=3Ddom-col-span><a href=3D#dom-col-span>span&=
lt;/a></code>.</p>
+   </dd>
+  </dl><!--TOPIC:HTML--><p>If a <code><a href=
=3D#the-col-element>col</a></code> element has a parent an=
d that is a <code><a href=3D#the-colgroup-element>colgroup&lt=
;/a></code> element that
+  itself has a parent that is a <code><a href=3D#the-table-elem=
ent>table</a></code> element, then the <code><a h=
ref=3D#the-col-element>col</a></code> element
+  <a href=3D#represents>represents</a> one or more <a hre=
f=3D#concept-column title=3Dconcept-column>columns</a> in the &l=
t;a href=3D#concept-column-group title=3Dconcept-column-group>column g=
roup</a> represented by that <code><a href=3D#the-colgroup=
-element>colgroup</a></code>.</p>
+
+  <p>The element may have a <dfn id=3Dattr-col-span title=3Datt=
r-col-span><code>span</code></dfn> content attribute
+  specified, whose value must be a <a href=3D#valid-non-negative-inte=
ger>valid non-negative integer</a> greater than zero.</p>
+
+  <div class=3Dimpl>
+
+  <p>The <code><a href=3D#the-col-element>col</a&gt=
;</code> element and its <code title=3Dattr-col-span><a hr=
ef=3D#attr-col-span>span</a></code> attribute take
+  part in the <a href=3D#table-model>table model</a>.</p&=
gt;
+
+  <p>The <dfn id=3Ddom-col-span title=3Ddom-col-span><cod=
e>span</code></dfn> IDL attribute must <a href=3D#refle=
ct>reflect</a>
+  the content attribute of the same name. The value must be <a href=3D=
#limited-to-only-non-negative-numbers-greater-than-zero>limited to onl=
y non-negative
+  numbers greater than zero</a>.</p>
+
+  </div>
+
+
+  <h4 id=3Dthe-tbody-element><span class=3Dsecno>4.9.5 </=
span>The <dfn><code>tbody</code></dfn> element=
</h4>
+
+  <dl class=3Delement><dt><a href=3D#element-dfn-categori=
es title=3Delement-dfn-categories>Categories</a>:</dt>
+   <dd>None.</dd>
+   <dt><a href=3D#element-dfn-contexts title=3Delement-dfn-cont=
exts>Contexts in which this element can be used</a>:</dt>
+   <dd>As a child of a <code><a href=3D#the-table-element=
>table</a></code> element, after any
+   <code><a href=3D#the-caption-element>caption</a>&lt=
;/code>, <code><a href=3D#the-colgroup-element>colgroup&lt=
;/a></code>, and
+   <code><a href=3D#the-thead-element>thead</a></co=
de> elements, but only if there are no
+   <code><a href=3D#the-tr-element>tr</a></code>=
 elements that are children of the
+   <code><a href=3D#the-table-element>table</a></co=
de> element.</dd>
+   <dt><a href=3D#element-dfn-content-model title=3Delement-dfn=
-content-model>Content model</a>:</dt>
+   <dd>Zero or more <code><a href=3D#the-tr-element>tr=
</a></code> and <a href=3D#script-supporting-elements titl=
e=3D"script-supporting elements">script-supporting</a>=
 elements</dd>
+   <dt><a href=3D#element-dfn-tag-omission title=3Delement-dfn-=
tag-omission>Tag omission in text/html</a>:</dt>
+   <dd>A <code><a href=3D#the-tbody-element>tbody</=
a></code> element's <a href=3D#syntax-start-tag title=3Dsynta=
x-start-tag>start tag</a> can be omitted
+   if the first thing inside the <code><a href=3D#the-tbody-ele=
ment>tbody</a></code> element is a <code><a href=3D=
#the-tr-element>tr</a></code> element, and if the
+   element is not immediately preceded by a <code><a href=3D#th=
e-tbody-element>tbody</a></code>, <code><a href=3D=
#the-thead-element>thead</a></code>, or
+   <code><a href=3D#the-tfoot-element>tfoot</a></co=
de> element whose <a href=3D#syntax-end-tag title=3Dsyntax-end-tag&=
gt;end tag</a> has been omitted. (It
+   can't be omitted if the element is empty.)</dd>
+   <dd>A <code><a href=3D#the-tbody-element>tbody</=
a></code> element's <a href=3D#syntax-end-tag title=3Dsyntax-=
end-tag>end tag</a> can be omitted if
+   the <code><a href=3D#the-tbody-element>tbody</a>&lt=
;/code> element is immediately followed by a <code><a href=3D=
#the-tbody-element>tbody</a></code> or
+   <code><a href=3D#the-tfoot-element>tfoot</a></co=
de> element, or if there is no more content in the parent element.<=
/dd>
+   <dt><a href=3D#element-dfn-attributes title=3Delement-dfn-at=
tributes>Content attributes</a>:</dt>
+   <dd><a href=3D#global-attributes>Global attributes</a&=
gt;</dd>
+   <dt><a href=3D#element-dfn-dom title=3Delement-dfn-dom>DO=
M interface</a>:</dt><!--TOPIC:DOM APIs-->
+   <dd>
+    <pre class=3Didl>interface <dfn id=3Dhtmltablesectionelemen=
t>HTMLTableSectionElement</dfn> : <a href=3D#htmlelement>H=
TMLElement</a> {
+  readonly attribute <a href=3D#htmlcollection>HTMLCollection</=
a> <a href=3D#dom-tbody-rows title=3Ddom-tbody-rows>rows</a&g=
t;;
+  <a href=3D#htmlelement>HTMLElement</a> <a href=3D#dom-t=
body-insertrow title=3Ddom-tbody-insertRow>insertRow</a>(optiona=
l long index =3D -1);
+  void <a href=3D#dom-tbody-deleterow title=3Ddom-tbody-deleteRow>=
deleteRow</a>(long index);
+
+  // <a href=3D"#HTMLTableSectionElement-partial">also h=
as obsolete members</a>
+};</pre>
+    <p>The <code><a href=3D#htmltablesectionelement>HT=
MLTableSectionElement</a></code> interface is also
+    used for <code><a href=3D#the-thead-element>thead</a&=
gt;</code> and <code><a href=3D#the-tfoot-element>tfoot=
</a></code> elements.</p>
+   </dd>
+  </dl><!--TOPIC:HTML--><p>The <code><a href=3D=
#the-tbody-element>tbody</a></code> element <a href=3D#=
represents>represents</a> a <a href=3D#concept-row-group titl=
e=3Dconcept-row-group>block</a> of <a href=3D#concept-row tit=
le=3Dconcept-row>rows</a> that consist of a
+  body of data for the parent <code><a href=3D#the-table-elemen=
t>table</a></code> element, if the <code><a href=3D=
#the-tbody-element>tbody</a></code> element has a
+  parent and it is a <code><a href=3D#the-table-element>tabl=
e</a></code>.</p>
+
+  <div class=3Dimpl>
+
+  <p>The <code><a href=3D#the-tbody-element>tbody</=
a></code> element takes part in the <a href=3D#table-model&gt=
;table model</a>.</p>
+
+  </div>
+
+<!--TOPIC:DOM APIs-->
+  <dl class=3Ddomintro><dt><var title=3D"">t=
body</var> . <code title=3Ddom-tbody-rows><a href=3D#dom-t=
body-rows>rows</a></code></dt>
+   <dd>
+
+    <p>Returns an <code><a href=3D#htmlcollection>HTML=
Collection</a></code> of the <code><a href=3D#the-tr=
-element>tr</a></code> elements of the table
+    section.</p>
+
+   </dd>
+
+   <dt><var title=3D"">tr</var> =3D <var =
title=3D"">tbody</var> . <code title=3Ddom-tbody-in=
sertRow><a href=3D#dom-tbody-insertrow>insertRow</a></c=
ode>( [ <var title=3D"">index</var> ] )</dt&g=
t;
+   <dd>
+
+    <p>Creates a <code><a href=3D#the-tr-element>tr&lt=
;/a></code> element, inserts it into the table section at the po=
sition given by
+    the argument, and returns the <code><a href=3D#the-tr-eleme=
nt>tr</a></code>.</p>
+
+    <p>The position is relative to the rows in the table section. =
The index −1, which is the
+    default if the argument is omitted, is equivalent to inserting at th=
e end of the table
+    section.</p>
+
+    <p>If the given position is less than −1 or greater =
than the number of rows, throws an
+    <code><a href=3D#indexsizeerror>IndexSizeError</a>=
</code> exception.</p>
+
+   </dd>
+
+   <dt><var title=3D"">tbody</var> . <cod=
e title=3Ddom-tbody-deleteRow><a href=3D#dom-tbody-deleterow>del=
eteRow</a></code>(<var title=3D"">index</v=
ar>)</dt>
+   <dd>
+
+    <p>Removes the <code><a href=3D#the-tr-element>tr&=
lt;/a></code> element with the given position in the table secti=
on.</p>
+
+    <p>The position is relative to the rows in the table section. =
The index −1 is equivalent
+    to deleting the last row of the table section.</p>
+
+    <p>If the given position is less than −1 or greater =
than the index of the last row, or if
+    there are no rows, throws an <code><a href=3D#indexsizeerro=
r>IndexSizeError</a></code> exception.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-tbody-rows title=3Ddom-tbody-rows>&lt=
;code>rows</code></dfn> attribute must return an
+  <code><a href=3D#htmlcollection>HTMLCollection</a>&l=
t;/code> rooted at the element, whose filter matches only <code>=
<a href=3D#the-tr-element>tr</a></code>
+  elements that are children of the element.</p>
+
+  <p>The <dfn id=3Ddom-tbody-insertrow title=3Ddom-tbody-insert=
Row><code>insertRow(<var title=3D"">index</va=
r>)</code></dfn>
+  method must, when invoked on an element <var title=3D""&g=
t;table section</var>, act as follows:</p>
+
+  <p>If <var title=3D"">index</var> is less =
than −1 or greater than the number of elements in
+  the <code title=3Ddom-tbody-rows><a href=3D#dom-tbody-rows&gt=
;rows</a></code> collection, the method must throw an
+  <code><a href=3D#indexsizeerror>IndexSizeError</a>&l=
t;/code> exception.</p>
+
+  <p>If <var title=3D"">index</var> is &=
minus;1 or equal to the number of items in the <code title=3Ddom-tbody=
-rows><a href=3D#dom-tbody-rows>rows</a></code> coll=
ection, the method must create a <code><a href=3D#the-tr-element=
>tr</a></code> element,
+  append it to the element <var title=3D"">table section=
</var>, and return the newly created
+  <code><a href=3D#the-tr-element>tr</a></code> =
element.</p>
+
+  <p>Otherwise, the method must create a <code><a href=3D=
#the-tr-element>tr</a></code> element, insert it as a chil=
d of the <var title=3D"">table section</var> elemen=
t, immediately before the <var title=3D"">index</var&g=
t;th
+  <code><a href=3D#the-tr-element>tr</a></code> =
element in the <code title=3Ddom-tbody-rows><a href=3D#dom-tbody=
-rows>rows</a></code> collection, and finally
+  must return the newly created <code><a href=3D#the-tr-element=
>tr</a></code> element.</p>
+
+  <p>The <dfn id=3Ddom-tbody-deleterow title=3Ddom-tbody-delete=
Row><code>deleteRow(<var title=3D"">index</va=
r>)</code></dfn>
+  method must remove the <var title=3D"">index</var&g=
t;th element in the <code title=3Ddom-tbody-rows><a href=3D#dom-=
tbody-rows>rows</a></code> collection from its parent. If =
<var title=3D"">index</var> is
+  less than zero or greater than or equal to the number of elements in t=
he <code title=3Ddom-tbody-rows><a href=3D#dom-tbody-rows>row=
s</a></code> collection, the method must instead throw an
+  <code><a href=3D#indexsizeerror>IndexSizeError</a>&l=
t;/code> exception.</p>
+
+  </div>
+<!--TOPIC:HTML-->
+
+
+  <h4 id=3Dthe-thead-element><span class=3Dsecno>4.9.6 </=
span>The <dfn><code>thead</code></dfn> element=
</h4>
+
+  <dl class=3Delement><dt><a href=3D#element-dfn-categori=
es title=3Delement-dfn-categories>Categories</a>:</dt>
+   <dd>None.</dd>
+   <dt><a href=3D#element-dfn-contexts title=3Delement-dfn-cont=
exts>Contexts in which this element can be used</a>:</dt>
+   <dd>As a child of a <code><a href=3D#the-table-element=
>table</a></code> element, after any
+   <code><a href=3D#the-caption-element>caption</a>&lt=
;/code>, and <code><a href=3D#the-colgroup-element>colgrou=
p</a></code>
+   elements and before any <code><a href=3D#the-tbody-element&g=
t;tbody</a></code>, <code><a href=3D#the-tfoot-eleme=
nt>tfoot</a></code>, and
+   <code><a href=3D#the-tr-element>tr</a></code>=
 elements, but only if there are no other
+   <code><a href=3D#the-thead-element>thead</a></co=
de> elements that are children of the
+   <code><a href=3D#the-table-element>table</a></co=
de> element.</dd>
+   <dt><a href=3D#element-dfn-content-model title=3Delement-dfn=
-content-model>Content model</a>:</dt>
+   <dd>Zero or more <code><a href=3D#the-tr-element>tr=
</a></code> and <a href=3D#script-supporting-elements titl=
e=3D"script-supporting elements">script-supporting</a>=
 elements</dd>
+   <dt><a href=3D#element-dfn-tag-omission title=3Delement-dfn-=
tag-omission>Tag omission in text/html</a>:</dt>
+   <dd>A <code><a href=3D#the-thead-element>thead</=
a></code> element's <a href=3D#syntax-end-tag title=3Dsyntax-=
end-tag>end tag</a> can be omitted if
+   the <code><a href=3D#the-thead-element>thead</a>&lt=
;/code> element is immediately followed by a <code><a href=3D=
#the-tbody-element>tbody</a></code> or
+   <code><a href=3D#the-tfoot-element>tfoot</a></co=
de> element.</dd>
+   <dt><a href=3D#element-dfn-attributes title=3Delement-dfn-at=
tributes>Content attributes</a>:</dt>
+   <dd><a href=3D#global-attributes>Global attributes</a&=
gt;</dd>
+   <dt><a href=3D#element-dfn-dom title=3Delement-dfn-dom>DO=
M interface</a>:</dt><!--TOPIC:DOM APIs-->
+   <dd><code><a href=3D#htmltablesectionelement>HTMLTa=
bleSectionElement</a></code>, as defined for
+   <code><a href=3D#the-tbody-element>tbody</a></co=
de> elements.</dd>
+  </dl><!--TOPIC:HTML--><p>The <code><a href=3D=
#the-thead-element>thead</a></code> element <a href=3D#=
represents>represents</a> the <a href=3D#concept-row-group ti=
tle=3Dconcept-row-group>block</a> of <a href=3D#concept-row t=
itle=3Dconcept-row>rows</a> that consist of
+  the column labels (headers) for the parent <code><a href=3D#t=
he-table-element>table</a></code> element, if the <code=
><a href=3D#the-thead-element>thead</a></code>
+  element has a parent and it is a <code><a href=3D#the-table-e=
lement>table</a></code>.</p>
+
+  <div class=3Dimpl>
+
+  <p>The <code><a href=3D#the-thead-element>thead</=
a></code> element takes part in the <a href=3D#table-model&gt=
;table model</a>.</p>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>This example shows a <code><a href=3D#the-thead-ele=
ment>thead</a></code> element being used. Notice the use o=
f both
+   <code><a href=3D#the-th-element>th</a></code>=
 and <code><a href=3D#the-td-element>td</a></code&gt=
; elements in the <code><a href=3D#the-thead-element>thead&lt=
;/a></code> element: the first row is
+   the headers, and the second row is an explanation of how to fill in t=
he table.</p>
+
+   <pre><table>
+ <caption> School auction sign-up sheet </caption&a=
mp;gt;
+<strong> <thead>
+  <tr>
+   <th><label for=3De1>Name</label&am=
p;gt;
+   <th><label for=3De2>Product</label=
>
+   <th><label for=3De3>Picture</label=
>
+   <th><label for=3De4>Price</label&a=
mp;gt;
+  <tr>
+   <td>Your name here
+   <td>What are you selling?
+   <td>Link to a picture
+   <td>Your reserve price
+</strong> <tbody>
+  <tr>
+   <td>Ms Danus
+   <td>Doughnuts
+   <td><img src=3D"http://example.com/mydoughn=
uts.png" title=3D"Doughnuts from Ms Danus">
+   <td>$45
+  <tr>
+   <td><input id=3De1 type=3Dtext name=3Dwho requir=
ed form=3Df>
+   <td><input id=3De2 type=3Dtext name=3Dwhat requi=
red form=3Df>
+   <td><input id=3De3 type=3Durl name=3Dpic form=3D=
f>
+   <td><input id=3De4 type=3Dnumber step=3D0.01 min=
=3D0 value=3D0 required form=3Df>
+</table>
+<form id=3Df action=3D"/auction.cgi">
+ <input type=3Dbutton name=3Dadd value=3D"Submit"&g=
t;
+</form></pre>
+
+  </div>
+
+
+  <h4 id=3Dthe-tfoot-element><span class=3Dsecno>4.9.7 </=
span>The <dfn><code>tfoot</code></dfn> element=
</h4>
+
+  <dl class=3Delement><dt><a href=3D#element-dfn-categori=
es title=3Delement-dfn-categories>Categories</a>:</dt>
+   <dd>None.</dd>
+   <dt><a href=3D#element-dfn-contexts title=3Delement-dfn-cont=
exts>Contexts in which this element can be used</a>:</dt>
+   <dd>As a child of a <code><a href=3D#the-table-element=
>table</a></code> element, after any
+   <code><a href=3D#the-caption-element>caption</a>&lt=
;/code>, <code><a href=3D#the-colgroup-element>colgroup&lt=
;/a></code>, and <code><a href=3D#the-thead-element>=
thead</a></code>
+   elements and before any <code><a href=3D#the-tbody-element&g=
t;tbody</a></code> and <code><a href=3D#the-tr-eleme=
nt>tr</a></code>
+   elements, but only if there are no other <code><a href=3D#th=
e-tfoot-element>tfoot</a></code>
+   elements that are children of the <code><a href=3D#the-table=
-element>table</a></code> element.</dd>
+   <dd>As a child of a <code><a href=3D#the-table-element=
>table</a></code> element, after any
+   <code><a href=3D#the-caption-element>caption</a>&lt=
;/code>, <code><a href=3D#the-colgroup-element>colgroup&lt=
;/a></code>, <code><a href=3D#the-thead-element>thea=
d</a></code>,
+   <code><a href=3D#the-tbody-element>tbody</a></co=
de>, and <code><a href=3D#the-tr-element>tr</a></=
code> elements, but only if there
+   are no other <code><a href=3D#the-tfoot-element>tfoot<=
/a></code> elements that are children of the
+   <code><a href=3D#the-table-element>table</a></co=
de> element.</dd>
+   <dt><a href=3D#element-dfn-content-model title=3Delement-dfn=
-content-model>Content model</a>:</dt>
+   <dd>Zero or more <code><a href=3D#the-tr-element>tr=
</a></code> and <a href=3D#script-supporting-elements titl=
e=3D"script-supporting elements">script-supporting</a>=
 elements</dd>
+   <dt><a href=3D#element-dfn-tag-omission title=3Delement-dfn-=
tag-omission>Tag omission in text/html</a>:</dt>
+   <dd>A <code><a href=3D#the-tfoot-element>tfoot</=
a></code> element's <a href=3D#syntax-end-tag title=3Dsyntax-=
end-tag>end tag</a> can be omitted if
+   the <code><a href=3D#the-tfoot-element>tfoot</a>&lt=
;/code> element is immediately followed by a <code><a href=3D=
#the-tbody-element>tbody</a></code> element, or if
+   there is no more content in the parent element.</dd>
+   <dt><a href=3D#element-dfn-attributes title=3Delement-dfn-at=
tributes>Content attributes</a>:</dt>
+   <dd><a href=3D#global-attributes>Global attributes</a&=
gt;</dd>
+   <dt><a href=3D#element-dfn-dom title=3Delement-dfn-dom>DO=
M interface</a>:</dt><!--TOPIC:DOM APIs-->
+   <dd><code><a href=3D#htmltablesectionelement>HTMLTa=
bleSectionElement</a></code>, as defined for
+   <code><a href=3D#the-tbody-element>tbody</a></co=
de> elements.</dd>
+  </dl><!--TOPIC:HTML--><p>The <code><a href=3D=
#the-tfoot-element>tfoot</a></code> element <a href=3D#=
represents>represents</a> the <a href=3D#concept-row-group ti=
tle=3Dconcept-row-group>block</a> of <a href=3D#concept-row t=
itle=3Dconcept-row>rows</a> that consist of
+  the column summaries (footers) for the parent <code><a href=3D=
#the-table-element>table</a></code> element, if the
+  <code><a href=3D#the-tfoot-element>tfoot</a></cod=
e> element has a parent and it is a <code><a href=3D#the-tabl=
e-element>table</a></code>.</p>
+
+  <div class=3Dimpl>
+
+  <p>The <code><a href=3D#the-tfoot-element>tfoot</=
a></code> element takes part in the <a href=3D#table-model&gt=
;table
+  model</a>.</p>
+
+  </div>
+
+
+  <h4 id=3Dthe-tr-element><span class=3Dsecno>4.9.8 </spa=
n>The <dfn><code>tr</code></dfn> element</h=
4>
+
+  <dl class=3Delement><dt><a href=3D#element-dfn-categori=
es title=3Delement-dfn-categories>Categories</a>:</dt>
+   <dd>None.</dd>
+   <dt><a href=3D#element-dfn-contexts title=3Delement-dfn-cont=
exts>Contexts in which this element can be used</a>:</dt>
+   <dd>As a child of a <code><a href=3D#the-thead-element=
>thead</a></code> element.</dd>
+   <dd>As a child of a <code><a href=3D#the-tbody-element=
>tbody</a></code> element.</dd>
+   <dd>As a child of a <code><a href=3D#the-tfoot-element=
>tfoot</a></code> element.</dd>
+   <dd>As a child of a <code><a href=3D#the-table-element=
>table</a></code> element, after any
+   <code><a href=3D#the-caption-element>caption</a>&lt=
;/code>, <code><a href=3D#the-colgroup-element>colgroup&lt=
;/a></code>, and <code><a href=3D#the-thead-element>=
thead</a></code>
+   elements, but only if there are no <code><a href=3D#the-tbod=
y-element>tbody</a></code> elements that
+   are children of the <code><a href=3D#the-table-element>ta=
ble</a></code> element.</dd>
+   <dt><a href=3D#element-dfn-content-model title=3Delement-dfn=
-content-model>Content model</a>:</dt>
+   <dd>Zero or more <code><a href=3D#the-td-element>td=
</a></code>, <code><a href=3D#the-th-element>th&l=
t;/a></code>, and <a href=3D#script-supporting-elements title=
=3D"script-supporting elements">script-supporting</a> =
elements</dd>
+   <dt><a href=3D#element-dfn-tag-omission title=3Delement-dfn-=
tag-omission>Tag omission in text/html</a>:</dt>
+   <dd>A <code><a href=3D#the-tr-element>tr</a>&=
lt;/code> element's <a href=3D#syntax-end-tag title=3Dsyntax-end-ta=
g>end tag</a> can be omitted if the
+   <code><a href=3D#the-tr-element>tr</a></code>=
 element is immediately followed by another <code><a href=3D#the=
-tr-element>tr</a></code> element, or if there is
+   no more content in the parent element.</dd>
+   <dt><a href=3D#element-dfn-attributes title=3Delement-dfn-at=
tributes>Content attributes</a>:</dt>
+   <dd><a href=3D#global-attributes>Global attributes</a&=
gt;</dd>
+   <dt><a href=3D#element-dfn-dom title=3Delement-dfn-dom>DO=
M interface</a>:</dt><!--TOPIC:DOM APIs-->
+   <dd>
+    <pre class=3Didl>interface <dfn id=3Dhtmltablerowelement&gt=
;HTMLTableRowElement</dfn> : <a href=3D#htmlelement>HTMLEleme=
nt</a> {
+  readonly attribute long <a href=3D#dom-tr-rowindex title=3Ddom-tr-r=
owIndex>rowIndex</a>;
+  readonly attribute long <a href=3D#dom-tr-sectionrowindex title=3Dd=
om-tr-sectionRowIndex>sectionRowIndex</a>;
+  readonly attribute <a href=3D#htmlcollection>HTMLCollection</=
a> <a href=3D#dom-tr-cells title=3Ddom-tr-cells>cells</a>;
+  <a href=3D#htmlelement>HTMLElement</a> <a href=3D#dom-t=
r-insertcell title=3Ddom-tr-insertCell>insertCell</a>(optional l=
ong index =3D -1);
+  void <a href=3D#dom-tr-deletecell title=3Ddom-tr-deleteCell>dele=
teCell</a>(long index);
+
+  // <a href=3D"#HTMLTableRowElement-partial">also has o=
bsolete members</a>
+};</pre>
+   </dd>
+  </dl><!--TOPIC:HTML--><p>The <code><a href=3D=
#the-tr-element>tr</a></code> element <a href=3D#repres=
ents>represents</a> a <a href=3D#concept-row title=3Dconcept-=
row>row</a> of
+  <a href=3D#concept-cell title=3Dconcept-cell>cells</a> in =
a <a href=3D#concept-table title=3Dconcept-table>table</a>.&l=
t;/p>
+
+  <div class=3Dimpl>
+
+  <p>The <code><a href=3D#the-tr-element>tr</a>&=
lt;/code> element takes part in the <a href=3D#table-model>table=
 model</a>.</p>
+
+  </div>
+
+<!--TOPIC:DOM APIs-->
+  <dl class=3Ddomintro><dt><var title=3D"">t=
r</var> . <code title=3Ddom-tr-rowIndex><a href=3D#dom-tr-=
rowindex>rowIndex</a></code></dt>
+
+   <dd>
+
+    <p>Returns the position of the row in the table's <code tit=
le=3Ddom-table-rows><a href=3D#dom-table-rows>rows</a><=
/code>
+    list.</p>
+
+    <p>Returns −1 if the element isn't in a table.</p=
>
+
+   </dd>
+
+   <dt><var title=3D"">tr</var> . <code t=
itle=3Ddom-tr-sectionRowIndex><a href=3D#dom-tr-sectionrowindex>=
sectionRowIndex</a></code></dt>
+
+   <dd>
+
+    <p>Returns the position of the row in the table section's <=
code title=3Ddom-tbody-rows><a href=3D#dom-tbody-rows>rows</a=
></code> list.</p>
+
+    <p>Returns −1 if the element isn't in a table sectio=
n.</p>
+
+   </dd>
+
+   <dt><var title=3D"">tr</var> . <code t=
itle=3Ddom-tr-cells><a href=3D#dom-tr-cells>cells</a></=
code></dt>
+   <dd>
+
+    <p>Returns an <code><a href=3D#htmlcollection>HTML=
Collection</a></code> of the <code><a href=3D#the-td=
-element>td</a></code> and <code><a href=3D#the-t=
h-element>th</a></code> elements of
+    the row.</p>
+
+   </dd>
+
+   <dt><var title=3D"">cell</var> =3D <va=
r title=3D"">tr</var> . <code title=3Ddom-tr-insert=
Cell><a href=3D#dom-tr-insertcell>insertCell</a></code&=
gt;( [ <var title=3D"">index</var> ] )</dt>
+
+   <dd>
+
+    <p>Creates a <code><a href=3D#the-td-element>td&lt=
;/a></code> element, inserts it into the table row at the positi=
on given by the
+    argument, and returns the <code><a href=3D#the-td-element&g=
t;td</a></code>.</p>
+
+    <p>The position is relative to the cells in the row. The index=
 −1, which is the default
+    if the argument is omitted, is equivalent to inserting at the end of=
 the row.</p>
+
+    <p>If the given position is less than −1 or greater =
than the number of cells, throws an
+    <code><a href=3D#indexsizeerror>IndexSizeError</a>=
</code> exception.</p>
+
+   </dd>
+
+   <dt><var title=3D"">tr</var> . <code t=
itle=3Ddom-tr-deleteCell><a href=3D#dom-tr-deletecell>deleteCell=
</a></code>(<var title=3D"">index</var>=
)</dt>
+   <dd>
+
+    <p>Removes the <code><a href=3D#the-td-element>td&=
lt;/a></code> or <code><a href=3D#the-th-element>th&=
lt;/a></code> element with the given position in the
+    row.</p>
+
+    <p>The position is relative to the cells in the row. The index=
 −1 is equivalent to
+    deleting the last cell of the row.</p>
+
+    <p>If the given position is less than −1 or greater =
than the index of the last cell, or
+    if there are no cells, throws an <code><a href=3D#indexsize=
error>IndexSizeError</a></code> exception.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-tr-rowindex title=3Ddom-tr-rowIndex>&=
lt;code>rowIndex</code></dfn> attribute must, if the eleme=
nt has
+  a parent <code><a href=3D#the-table-element>table</a&gt=
;</code> element, or a parent <code><a href=3D#the-tbody-e=
lement>tbody</a></code>, <code><a href=3D#the-the=
ad-element>thead</a></code>, or
+  <code><a href=3D#the-tfoot-element>tfoot</a></cod=
e> element and a <em>grandparent</em> <code><a hr=
ef=3D#the-table-element>table</a></code> element, return t=
he index
+  of the <code><a href=3D#the-tr-element>tr</a></co=
de> element in that <code><a href=3D#the-table-element>tab=
le</a></code> element's <code title=3Ddom-table-rows>&l=
t;a href=3D#dom-table-rows>rows</a></code> collection. If =
there is no such <code><a href=3D#the-table-element>table<=
/a></code> element,
+  then the attribute must return −1.</p>
+
+  <p>The <dfn id=3Ddom-tr-sectionrowindex title=3Ddom-tr-sectio=
nRowIndex><code>sectionRowIndex</code></dfn> attribu=
te must, if
+  the element has a parent <code><a href=3D#the-table-element&g=
t;table</a></code>, <code><a href=3D#the-tbody-eleme=
nt>tbody</a></code>, <code><a href=3D#the-thead-e=
lement>thead</a></code>, or
+  <code><a href=3D#the-tfoot-element>tfoot</a></cod=
e> element, return the index of the <code><a href=3D#the-tr-e=
lement>tr</a></code> element in the parent
+  element's <code title=3D"">rows</code> collectio=
n (for tables, that's the <code title=3Ddom-table-rows><a href=3D=
#dom-table-rows>HTMLTableElement.rows</a></code> collectio=
n; for table sections, that's the
+  <code title=3Ddom-tbody-rows><a href=3D#dom-tbody-rows>HTM=
LTableRowElement.rows</a></code> collection). If there is no =
such
+  parent element, then the attribute must return −1.</p>
+
+  <p>The <dfn id=3Ddom-tr-cells title=3Ddom-tr-cells><cod=
e>cells</code></dfn> attribute must return an
+  <code><a href=3D#htmlcollection>HTMLCollection</a>&l=
t;/code> rooted at the <code><a href=3D#the-tr-element>tr&=
lt;/a></code> element, whose filter matches only
+  <code><a href=3D#the-td-element>td</a></code> =
and <code><a href=3D#the-th-element>th</a></code>=
 elements that are children of the <code><a href=3D#the-tr-eleme=
nt>tr</a></code> element.</p>
+
+  <p>The <dfn id=3Ddom-tr-insertcell title=3Ddom-tr-insertCell&=
gt;<code>insertCell(<var title=3D"">index</var&g=
t;)</code></dfn>
+  method must act as follows:</p>
+
+  <p>If <var title=3D"">index</var> is less =
than −1 or greater than the number of elements in
+  the <code title=3Ddom-tr-cells><a href=3D#dom-tr-cells>cel=
ls</a></code> collection, the method must throw an
+  <code><a href=3D#indexsizeerror>IndexSizeError</a>&l=
t;/code> exception.</p>
+
+  <p>If <var title=3D"">index</var> is equal=
 to −1 or equal to the number of items in <code title=3Ddom-=
tr-cells><a href=3D#dom-tr-cells>cells</a></code> co=
llection, the method must create a <code><a href=3D#the-td-eleme=
nt>td</a></code> element,
+  append it to the <code><a href=3D#the-tr-element>tr</a&=
gt;</code> element, and return the newly created <code><a =
href=3D#the-td-element>td</a></code>
+  element.</p>
+
+  <p>Otherwise, the method must create a <code><a href=3D=
#the-td-element>td</a></code> element, insert it as a chil=
d of the
+  <code><a href=3D#the-tr-element>tr</a></code> =
element, immediately before the <var title=3D"">index<=
/var>th <code><a href=3D#the-td-element>td</a></c=
ode> or
+  <code><a href=3D#the-th-element>th</a></code> =
element in the <code title=3Ddom-tr-cells><a href=3D#dom-tr-cell=
s>cells</a></code> collection, and finally
+  must return the newly created <code><a href=3D#the-td-element=
>td</a></code> element.</p>
+
+  <p>The <dfn id=3Ddom-tr-deletecell title=3Ddom-tr-deleteCell&=
gt;<code>deleteCell(<var title=3D"">index</var&g=
t;)</code></dfn>
+  method must remove the <var title=3D"">index</var&g=
t;th element in the <code title=3Ddom-tr-cells><a href=3D#dom-tr=
-cells>cells</a></code> collection from its parent. If &lt=
;var title=3D"">index</var> is less
+  than zero or greater than or equal to the number of elements in the &l=
t;code title=3Ddom-tr-cells><a href=3D#dom-tr-cells>cells</a&=
gt;</code> collection, the method must instead throw an
+  <code><a href=3D#indexsizeerror>IndexSizeError</a>&l=
t;/code> exception.</p>
+
+  </div>
+<!--TOPIC:HTML-->
+
+
+  <h4 id=3Dthe-td-element><span class=3Dsecno>4.9.9 </spa=
n>The <dfn><code>td</code></dfn> element</h=
4>
+
+  <dl class=3Delement><dt><a href=3D#element-dfn-categori=
es title=3Delement-dfn-categories>Categories</a>:</dt>
+   <dd><a href=3D#sectioning-root>Sectioning root</a>.=
</dd>
+   <dt><a href=3D#element-dfn-contexts title=3Delement-dfn-cont=
exts>Contexts in which this element can be used</a>:</dt>
+   <dd>As a child of a <code><a href=3D#the-tr-element&gt=
;tr</a></code> element.</dd>
+   <dt><a href=3D#element-dfn-content-model title=3Delement-dfn=
-content-model>Content model</a>:</dt>
+   <dd><a href=3D#flow-content>Flow content</a>.</d=
d>
+   <dt><a href=3D#element-dfn-tag-omission title=3Delement-dfn-=
tag-omission>Tag omission in text/html</a>:</dt>
+   <dd>A <code><a href=3D#the-td-element>td</a>&=
lt;/code> element's <a href=3D#syntax-end-tag title=3Dsyntax-end-ta=
g>end tag</a> can be omitted if the
+   <code><a href=3D#the-td-element>td</a></code>=
 element is immediately followed by a <code><a href=3D#the-td-el=
ement>td</a></code> or <code><a href=3D#the-th-el=
ement>th</a></code> element,
+   or if there is no more content in the parent element.</dd>
+   <dt><a href=3D#element-dfn-attributes title=3Delement-dfn-at=
tributes>Content attributes</a>:</dt>
+   <dd><a href=3D#global-attributes>Global attributes</a&=
gt;</dd>
+   <dd><code title=3Dattr-tdth-colspan><a href=3D#attr-td=
th-colspan>colspan</a></code> — Number of column=
s that the cell is to span</dd>
+   <dd><code title=3Dattr-tdth-rowspan><a href=3D#attr-td=
th-rowspan>rowspan</a></code> — Number of rows t=
hat the cell is to span</dd>
+   <dd><code title=3Dattr-tdth-headers><a href=3D#attr-td=
th-headers>headers</a></code> — The header cells=
 for this cell</dd>
+   <!-- v2 char, to specify the decimal character used in numeric cel=
ls -->
+   <dt><a href=3D#element-dfn-dom title=3Delement-dfn-dom>DO=
M interface</a>:</dt><!--TOPIC:DOM APIs-->
+   <dd>
+    <pre class=3Didl>interface <dfn id=3Dhtmltabledatacelleleme=
nt>HTMLTableDataCellElement</dfn> : <a href=3D#htmltablecelle=
lement>HTMLTableCellElement</a> {
+  // <a href=3D"#HTMLTableDataCellElement-partial">also =
has obsolete members</a>
+};</pre>
+   </dd>
+  </dl><!--TOPIC:HTML--><p>The <code><a href=3D=
#the-td-element>td</a></code> element <a href=3D#repres=
ents>represents</a> a data <a href=3D#concept-cell title=3Dco=
ncept-cell>cell</a> in a table.</p>
+
+  <div class=3Dimpl>
+
+  <p>The <code><a href=3D#the-td-element>td</a>&=
lt;/code> element and its <code title=3Dattr-tdth-colspan><a =
href=3D#attr-tdth-colspan>colspan</a></code>, <code tit=
le=3Dattr-tdth-rowspan><a href=3D#attr-tdth-rowspan>rowspan</=
a></code>, and <code title=3Dattr-tdth-headers><a href=3D=
#attr-tdth-headers>headers</a></code>
+  attributes take part in the <a href=3D#table-model>table model&l=
t;/a>.</p>
+
+  <p>User agents, especially in non-visual environments or where d=
isplaying the table as a 2D grid
+  is impractical, may give the user context for the cell when rendering =
the contents of a cell; for
+  instance, giving its position in the <a href=3D#table-model>tabl=
e model</a>, or listing the cell's header cells
+  (as determined by the <a href=3D#algorithm-for-assigning-header-cel=
ls>algorithm for assigning header cells</a>). When a cell's head=
er
+  cells are being listed, user agents may use the value of <code titl=
e=3Dattr-th-abbr><a href=3D#attr-th-abbr>abbr</a></code=
>
+  attributes on those header cells, if any, instead of the contents of t=
he header cells
+  themselves.</p>
+
+  </div>
+
+
+  <h4 id=3Dthe-th-element><span class=3Dsecno>4.9.10 </sp=
an>The <dfn><code>th</code></dfn> element</=
h4>
+
+  <dl class=3Delement><dt><a href=3D#element-dfn-categori=
es title=3Delement-dfn-categories>Categories</a>:</dt>
+   <dd>If the <code><a href=3D#the-th-element>th</a=
></code> element is a <a href=3D#sorting-interface-th-element=
>sorting interface <code>th</code> element</a>: <=
a href=3D#interactive-content>Interactive content</a>.</dd&gt=
;
+   <dd>Otherwise: None.</dd>
+   <dt><a href=3D#element-dfn-contexts title=3Delement-dfn-cont=
exts>Contexts in which this element can be used</a>:</dt>
+   <dd>As a child of a <code><a href=3D#the-tr-element&gt=
;tr</a></code> element.</dd>
+   <dt><a href=3D#element-dfn-content-model title=3Delement-dfn=
-content-model>Content model</a>:</dt>
+   <dd><a href=3D#flow-content>Flow content</a>, but w=
ith no <code><a href=3D#the-header-element>header</a>&l=
t;/code>, <code><a href=3D#the-footer-element>footer</a=
></code>, <a href=3D#sectioning-content>sectioning content=
</a>, or <a href=3D#heading-content>heading content</a>=
 descendants, and if the <code><a href=3D#the-th-element>th&l=
t;/a></code> element is a <a href=3D#sorting-interface-th-ele=
ment>sorting interface <code>th</code> element</a>, =
no <a href=3D#interactive-content>interactive content</a> des=
cendants.</dd>
+   <!-- EDITING NOTE: If you remove 'heading content' from the list a=
bove, make sure to fix the definition of 'sectioning root' to include &lt=
;th> -->
+   <dt><a href=3D#element-dfn-tag-omission title=3Delement-dfn-=
tag-omission>Tag omission in text/html</a>:</dt>
+   <dd>A <code><a href=3D#the-th-element>th</a>&=
lt;/code> element's <a href=3D#syntax-end-tag title=3Dsyntax-end-ta=
g>end tag</a> can be omitted if the
+   <code><a href=3D#the-th-element>th</a></code>=
 element is immediately followed by a <code><a href=3D#the-td-el=
ement>td</a></code> or <code><a href=3D#the-th-el=
ement>th</a></code> element,
+   or if there is no more content in the parent element.</dd>
+   <dt><a href=3D#element-dfn-attributes title=3Delement-dfn-at=
tributes>Content attributes</a>:</dt>
+   <dd><a href=3D#global-attributes>Global attributes</a&=
gt;</dd>
+   <dd><code title=3Dattr-tdth-colspan><a href=3D#attr-td=
th-colspan>colspan</a></code> — Number of column=
s that the cell is to span</dd>
+   <dd><code title=3Dattr-tdth-rowspan><a href=3D#attr-td=
th-rowspan>rowspan</a></code> — Number of rows t=
hat the cell is to span</dd>
+   <dd><code title=3Dattr-tdth-headers><a href=3D#attr-td=
th-headers>headers</a></code> — The header cells=
 for this cell</dd>
+   <dd><code title=3Dattr-th-scope><a href=3D#attr-th-sco=
pe>scope</a></code> — Specifies which cells the =
header cell applies to</dd>
+   <dd><code title=3Dattr-th-abbr><a href=3D#attr-th-abbr=
>abbr</a></code> — Alternative label to use for =
the header cell when referencing the cell in other contexts</dd>
+   <dd><code title=3Dattr-th-sorted><a href=3D#attr-th-so=
rted>sorted</a></code> — <a href=3D#column-so=
rt-direction>Column sort direction</a> and <a href=3D#column-=
key-ordinality title=3D"column key ordinality">ordinality&lt=
;/a></dd>
+   <dt><a href=3D#element-dfn-dom title=3Delement-dfn-dom>DO=
M interface</a>:</dt><!--TOPIC:DOM APIs-->
+   <dd>
+    <pre class=3Didl>interface <dfn id=3Dhtmltableheadercellele=
ment>HTMLTableHeaderCellElement</dfn> : <a href=3D#htmltablec=
ellelement>HTMLTableCellElement</a> {
+           attribute DOMString <a href=3D#dom-th-scope title=3Ddom-th=
-scope>scope</a>;
+           attribute DOMString <a href=3D#dom-th-abbr title=3Ddom-th-=
abbr>abbr</a>;
+           attribute DOMString <a href=3D#dom-th-sorted title=3Ddom-t=
h-sorted>sorted</a>;
+  void <a href=3D#dom-th-sort title=3Ddom-th-sort>sort</a>()=
;
+};</pre>
+   </dd>
+  </dl><!--TOPIC:HTML--><p>The <code><a href=3D=
#the-th-element>th</a></code> element <a href=3D#repres=
ents>represents</a> a header <a href=3D#concept-cell title=3D=
concept-cell>cell</a> in a table.</p>
+
+  <p>The <code><a href=3D#the-th-element>th</a>&=
lt;/code> element may have a <dfn id=3Dattr-th-scope title=3Dattr-t=
h-scope><code>scope</code></dfn>
+  content attribute specified. The <code title=3Dattr-th-scope>&lt=
;a href=3D#attr-th-scope>scope</a></code> attribute is an
+  <a href=3D#enumerated-attribute>enumerated attribute</a> w=
ith five states, four of which have explicit keywords:</p>
+
+  <dl><dt>The <dfn id=3Dattr-th-scope-row title=3Dattr-th=
-scope-row><code>row</code></dfn> keyword, which map=
s to the
+   <i>row</i> state</dt>
+
+   <dd>The <i>row</i> state means the header cell appl=
ies to some of the subsequent cells in the
+   same row(s).</dd>
+
+   <dt>The <dfn id=3Dattr-th-scope-col title=3Dattr-th-scope-co=
l><code>col</code></dfn> keyword, which maps to the
+   <i>column</i> state</dt>
+
+   <dd>The <i>column</i> state means the header cell a=
pplies to some of the subsequent cells in the
+   same column(s).</dd>
+
+   <dt>The <dfn id=3Dattr-th-scope-rowgroup title=3Dattr-th-sco=
pe-rowgroup><code>rowgroup</code></dfn> keyword, whi=
ch maps to
+   the <i>row group</i> state</dt>
+
+   <dd>The <i>row group</i> state means the header cel=
l applies to all the remaining cells in the
+   row group. A <code><a href=3D#the-th-element>th</a>=
</code> element's <code title=3Dattr-th-scope><a href=3D#a=
ttr-th-scope>scope</a></code> attribute must
+   not be in the <a href=3D#attr-th-scope-rowgroup title=3Dattr-th-sc=
ope-rowgroup>row group</a> state if the element is not
+   anchored in a <a href=3D#concept-row-group title=3Dconcept-row-gro=
up>row group</a>.</dd>
+
+   <dt>The <dfn id=3Dattr-th-scope-colgroup title=3Dattr-th-sco=
pe-colgroup><code>colgroup</code></dfn> keyword, whi=
ch maps to
+   the <i>column group</i> state</dt>
+
+   <dd>The <i>column group</i> state means the header =
cell applies to all the remaining cells in the
+   column group. A <code><a href=3D#the-th-element>th</a&=
gt;</code> element's <code title=3Dattr-th-scope><a href=3D=
#attr-th-scope>scope</a></code> attribute must
+   not be in the <a href=3D#attr-th-scope-colgroup title=3Dattr-th-sc=
ope-colgroup>column group</a> state if the element is
+   not anchored in a <a href=3D#concept-column-group title=3Dconcept-=
column-group>column group</a>.</dd>
+
+   <dt>The <dfn id=3Dattr-th-scope-auto title=3Dattr-th-scope-a=
uto>auto</dfn> state</dt>
+
+   <dd>The <i>auto</i> state makes the header cell app=
ly to a set of cells selected based on
+   context.</dd>
+
+  </dl><p>The <code title=3Dattr-th-scope><a href=3D=
#attr-th-scope>scope</a></code> attribute's <i>missi=
ng value default</i> is the
+  <i>auto</i> state.</p>
+
+  <p>The <code><a href=3D#the-th-element>th</a>&=
lt;/code> element may have an <dfn id=3Dattr-th-abbr title=3Dattr-t=
h-abbr><code>abbr</code></dfn>
+  content attribute specified. Its value must be an alternative label fo=
r the header cell, to be
+  used when referencing the cell in other contexts (e.g. when describing=
 the header cells that apply
+  to a data cell). It is typically an abbreviated form of the full heade=
r cell, but can also be an
+  expansion, or merely a different phrasing.</p>
+
+  <p>The <code title=3Dattr-th-sorted><a href=3D#attr-th-=
sorted>sorted</a></code> attribute is used in the <a hr=
ef=3D#table-sorting-model>table
+  sorting model</a>.</p>
+
+  <div class=3Dimpl>
+
+  <p>The <code><a href=3D#the-th-element>th</a>&=
lt;/code> element and its <code title=3Dattr-tdth-colspan><a =
href=3D#attr-tdth-colspan>colspan</a></code>, <code tit=
le=3Dattr-tdth-rowspan><a href=3D#attr-tdth-rowspan>rowspan</=
a></code>, <code title=3Dattr-tdth-headers><a href=3D#a=
ttr-tdth-headers>headers</a></code>, and
+  <code title=3Dattr-th-scope><a href=3D#attr-th-scope>scope=
</a></code> attributes take part in the <a href=3D#table-m=
odel>table model</a>.</p>
+
+  <p>The <code title=3Ddom-th-sort><a href=3D#dom-th-sort=
>sort()</a></code> method is used in the <a href=3D#tab=
le-sorting-model>table sorting
+  model</a>.</p>
+
+  <p>The <dfn id=3Ddom-th-scope title=3Ddom-th-scope><cod=
e>scope</code></dfn> IDL attribute must <a href=3D#refl=
ect>reflect</a>
+  the content attribute of the same name, <a href=3D#limited-to-only-=
known-values>limited to only known values</a>.</p>
+
+  <p>The <dfn id=3Ddom-th-abbr title=3Ddom-th-abbr><code&=
gt;abbr</code></dfn> and <dfn id=3Ddom-th-sorted title=3Dd=
om-th-sorted><code>sorted</code></dfn> IDL attribute=
s must <a href=3D#reflect>reflect</a> the
+  content attributes of the same name.</p>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>The following example shows how the <code title=3Dattr-th=
-scope><a href=3D#attr-th-scope>scope</a></code> att=
ribute's <code title=3Dattr-th-scope-rowgroup><a href=3D#attr-th=
-scope-rowgroup>rowgroup</a></code> value affects which da=
ta cells a header cell
+   applies to.</p>
+
+   <p>Here is a markup fragment showing a table:</p>
+
+   <pre><table>
+ <thead>
+  <tr> <th> ID <th> Measuremen=
t <th> Average <th> Maximum
+ <tbody>
+  <tr> <td> <th scope=3Drowgroup&=
gt; Cats <td> <td>
+  <tr> <td> 93 <th scope=3Drow&gt=
; Legs <td> 3.5 <td> 4
+  <tr> <td> 10 <th scope=3Drow&gt=
; Tails <td> 1 <td> 1
+ <tbody>
+  <tr> <td> <th scope=3Drowgroup&=
gt; English speakers <td> <td>
+  <tr> <td> 32 <th scope=3Drow&gt=
; Legs <td> 2.67 <td> 4
+  <tr> <td> 35 <th scope=3Drow&gt=
; Tails <td> 0.33 <td> 1
+</table></pre>
+
+   <p>This would result in the following table:</p>
+
+   <table><thead><tr><th> ID <th> Measurem=
ent <th> Average <th> Maximum
+    <tbody><tr><td> <th scope=3Drowgroup> Cats &=
lt;td> <td>
+     <tr><td> 93 <th scope=3Drow> Legs <td> 3.5 =
<td> 4
+     <tr><td> 10 <th scope=3Drow> Tails <td> 1 &=
lt;td> 1
+    <tbody><tr><td> <th scope=3Drowgroup> Englis=
h speakers <td> <td>
+     <tr><td> 32 <th scope=3Drow> Legs <td> 2.67=
 <td> 4
+     <tr><td> 35 <th scope=3Drow> Tails <td> 0.3=
3 <td> 1
+   </table><p>The headers in the first row all apply directl=
y down to the rows in their column.</p>
+
+   <p>The headers with the explicit <code title=3Dattr-th-scope=
><a href=3D#attr-th-scope>scope</a></code> attribute=
s apply to all
+   the cells in their row group other than the cells in the first column=
.</p>
+
+   <p>The remaining headers apply just to the cells to the right o=
f them.</p>
+
+   <!-- image source: http://software.hixie.ch/utilities/js/live-dom-=
viewer/saved/151 -->
+   <img src=3Dhttp://images.whatwg.org/table-scope-diagram.png width=3D=
459 alt=3D"" height=3D256><!-- (alt is empty because the =
diagram is completely described by the previous paragraphs) --></di=
v>
+
+
+
+  <h4 id=3Dattributes-common-to-td-and-th-elements><span class=3D=
secno>4.9.11 </span>Attributes common to <code><a href=3D=
#the-td-element>td</a></code> and <code><a href=3D=
#the-th-element>th</a></code> elements</h4>
+
+  <p>The <code><a href=3D#the-td-element>td</a>&=
lt;/code> and <code><a href=3D#the-th-element>th</a>=
</code> elements may have a <dfn id=3Dattr-tdth-colspan title=3D=
attr-tdth-colspan><code>colspan</code></dfn> content=
 attribute specified, whose value must
+  be a <a href=3D#valid-non-negative-integer>valid non-negative in=
teger</a> greater than zero.</p>
+
+  <p>The <code><a href=3D#the-td-element>td</a>&=
lt;/code> and <code><a href=3D#the-th-element>th</a>=
</code> elements may also have a <dfn id=3Dattr-tdth-rowspan tit=
le=3Dattr-tdth-rowspan><code>rowspan</code></dfn> co=
ntent attribute specified, whose value must
+  be a <a href=3D#valid-non-negative-integer>valid non-negative in=
teger</a>. For this attribute, the value zero means that the
+  cell is to span all the remaining rows in the row group.</p> &lt=
;!-- only in no-quirks and
+  limited-quirks mode though, for back compat! -->
+
+  <p>These attributes give the number of columns and rows respecti=
vely that the cell is to span.
+  These attributes must not be used to overlap cells<span class=3Dimp=
l>, as described in the
+  description of the <a href=3D#table-model>table model</a>&=
lt;/span>.</p> <!-- conformance criteria for determining
+  when this is violated are given in the processing model -->
+
+  <hr><p>The <code><a href=3D#the-td-element>td&=
lt;/a></code> and <code><a href=3D#the-th-element>th=
</a></code> element may have a <dfn id=3Dattr-tdth-headers=
 title=3Dattr-tdth-headers><code>headers</code></dfn&gt=
; content attribute specified. The <code title=3Dattr-tdth-headers>=
<a href=3D#attr-tdth-headers>headers</a></code> attribu=
te, if specified, must contain a string consisting
+  of an <a href=3D#unordered-set-of-unique-space-separated-tokens>=
unordered set of unique space-separated tokens</a> that are
+  <a href=3D#case-sensitive>case-sensitive</a>, each of whic=
h must have the value of an <a href=3D#concept-id title=3Dconcept-id&g=
t;ID</a> of a <code><a href=3D#the-th-element>th</a&=
gt;</code> element taking part in the same <a href=3D#concept-ta=
ble title=3Dconcept-table>table</a> as the <code><a hre=
f=3D#the-td-element>td</a></code> or <code><a hre=
f=3D#the-th-element>th</a></code> element<span class=3D=
impl> (as defined by the <a href=3D#table-model>table model</=
a>)</span>.</p>
+
+  <p>A <code><a href=3D#the-th-element>th</a>&lt=
;/code> element with <a href=3D#concept-id title=3Dconcept-id>ID=
</a> <var title=3D"">id</var> is
+  said to be <i>directly targeted</i> by all <code>&lt=
;a href=3D#the-td-element>td</a></code> and <code>&l=
t;a href=3D#the-th-element>th</a></code> elements in the
+  same <a href=3D#concept-table title=3Dconcept-table>table</a&=
gt; that have <code title=3Dattr-tdth-headers><a href=3D#attr-td=
th-headers>headers</a></code> attributes whose values incl=
ude as one of their tokens
+  the <a href=3D#concept-id title=3Dconcept-id>ID</a> <va=
r title=3D"">id</var>. A <code><a href=3D#the=
-th-element>th</a></code> element <var title=3D"&q=
uot;>A</var> is said to be <i>targeted</i> by a <=
code><a href=3D#the-th-element>th</a></code> or <=
code><a href=3D#the-td-element>td</a></code> element
+  <var title=3D"">B</var> if either <var title=3D=
"">A</var> is <i>directly targeted</i> by =
<var title=3D"">B</var> or if there exists an eleme=
nt <var title=3D"">C</var> that is itself
+  <i>targeted</i> by the element <var title=3D"&quot=
;>B</var> and <var title=3D"">A</var> is &=
lt;i>directly
+  targeted</i> by <var title=3D"">C</var>.&l=
t;/p>
+
+  <p>A <code><a href=3D#the-th-element>th</a>&lt=
;/code> element must not be <i>targeted</i> by itself.<=
/p>
+
+  <div class=3Dimpl>
+
+  <p>The <code title=3Dattr-tdth-colspan><a href=3D#attr-=
tdth-colspan>colspan</a></code>, <code title=3Dattr-tdt=
h-rowspan><a href=3D#attr-tdth-rowspan>rowspan</a></cod=
e>, and <code title=3Dattr-tdth-headers><a href=3D#attr-tdth-=
headers>headers</a></code>
+  attributes take part in the <a href=3D#table-model>table model&l=
t;/a>.</p>
+
+  </div>
+
+  <hr><p>The <code><a href=3D#the-td-element>td&=
lt;/a></code> and <code><a href=3D#the-th-element>th=
</a></code> elements implement interfaces that inherit from t=
he
+  <code><a href=3D#htmltablecellelement>HTMLTableCellElement=
</a></code> interface:</p>
+
+  <pre class=3Didl>interface <dfn id=3Dhtmltablecellelement>=
HTMLTableCellElement</dfn> : <a href=3D#htmlelement>HTMLEleme=
nt</a> {
+           attribute unsigned long <a href=3D#dom-tdth-colspan title=3D=
dom-tdth-colSpan>colSpan</a>;
+           attribute unsigned long <a href=3D#dom-tdth-rowspan title=3D=
dom-tdth-rowSpan>rowSpan</a>;
+  [PutForwards=3D<span title=3Ddom-DOMSettableTokenList-value>valu=
e</span>] readonly attribute <a href=3D#domsettabletokenlist>=
DOMSettableTokenList</a> <a href=3D#dom-tdth-headers title=3Ddom=
-tdth-headers>headers</a>;
+  readonly attribute long <a href=3D#dom-tdth-cellindex title=3Ddom-t=
dth-cellIndex>cellIndex</a>;
+
+  // <a href=3D"#HTMLTableCellElement-partial">also has =
obsolete members</a>
+};</pre>
+
+<!--TOPIC:DOM APIs-->
+  <dl class=3Ddomintro><dt><var title=3D"">c=
ell</var> . <code title=3Ddom-tdth-cellIndex><a href=3D#do=
m-tdth-cellindex>cellIndex</a></code></dt>
+
+   <dd>
+
+    <p>Returns the position of the cell in the row's <code titl=
e=3Ddom-tr-cells><a href=3D#dom-tr-cells>cells</a></cod=
e> list.
+    This does not necessarily correspond to the <var title=3D"&q=
uot;>x</var>-position of the cell in the
+    table, since earlier cells might cover multiple rows or columns.<=
/p>
+
+    <p>Returns −1 if the element isn't in a row.</p&g=
t;
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-tdth-colspan title=3Ddom-tdth-colSpan&gt=
;<code>colSpan</code></dfn> IDL attribute must
+  <a href=3D#reflect>reflect</a> the <code title=3Dattr-t=
dth-colspan><a href=3D#attr-tdth-colspan>colspan</a></c=
ode> content attribute. Its
+  default value is 1.</p>
+
+  <!--
+   http://software.hixie.ch/utilities/js/live-dom-viewer/saved/1699
+   http://software.hixie.ch/utilities/js/live-dom-viewer/saved/1700
+  -->
+
+  <p>The <dfn id=3Ddom-tdth-rowspan title=3Ddom-tdth-rowSpan&gt=
;<code>rowSpan</code></dfn> IDL attribute must
+  <a href=3D#reflect>reflect</a> the <code title=3Dattr-t=
dth-rowspan><a href=3D#attr-tdth-rowspan>rowspan</a></c=
ode> content attribute. Its
+  default value is 1.</p>
+
+  <p>The <dfn id=3Ddom-tdth-headers title=3Ddom-tdth-headers&gt=
;<code>headers</code></dfn> IDL attribute must
+  <a href=3D#reflect>reflect</a> the content attribute of th=
e same name.</p>
+
+  <p>The <dfn id=3Ddom-tdth-cellindex title=3Ddom-tdth-cellInde=
x><code>cellIndex</code></dfn> IDL attribute must, i=
f the
+  element has a parent <code><a href=3D#the-tr-element>tr&lt=
;/a></code> element, return the index of the cell's element in t=
he parent
+  element's <code title=3Ddom-tr-cells><a href=3D#dom-tr-cells&=
gt;cells</a></code> collection. If there is no such parent el=
ement,
+  then the attribute must return −1.</p>
+
+  </div>
+<!--TOPIC:HTML-->
+
+
+  <div class=3Dimpl>
+
+  <h4 id=3Dprocessing-model-1><span class=3Dsecno>4.9.12 &lt=
;/span>Processing model</h4>
+
+  <p>The various table elements and their content attributes toget=
her define the <dfn id=3Dtable-model>table
+  model</dfn>.</p>
+
+  <p>A <dfn id=3Dconcept-table title=3Dconcept-table>table&l=
t;/dfn> consists of cells aligned on a two-dimensional grid of
+  <dfn id=3Dconcept-slots title=3Dconcept-slots>slots</dfn> =
with coordinates (<var title=3D"">x</var>, <var =
title=3D"">y</var>). The grid is finite, and is either=
 empty or has one or more slots. If the grid
+  has one or more slots, then the <var title=3D"">x</=
var> coordinates are always in the range <span title=3D""=
>0 ≤ <var title=3D"">x</va=
r> < <var title=3D"">x<sub=
 title=3D"">width</sub></var></span>, and =
the <var title=3D"">y</var> coordinates are always =
in the
+  range <span title=3D"">0 ≤ &l=
t;var title=3D"">y</var> < &l=
t;var title=3D"">y<sub title=3D"">height<=
/sub></var></span>. If one or both of <var title=3D&quo=
t;">x<sub title=3D"">width</sub></var&gt=
; and <var title=3D"">y<sub title=3D"">he=
ight</sub></var> are zero, then the
+  table is empty (has no slots). Tables correspond to <code><a =
href=3D#the-table-element>table</a></code> elements.</p=
>
+
+  <p>A <dfn id=3Dconcept-cell title=3Dconcept-cell>cell</=
dfn> is a set of slots anchored at a slot (<var title=3D"&quot=
;>cell<sub title=3D"">x</sub></var>, <v=
ar title=3D"">cell<sub title=3D"">y</sub&=
gt;</var>), and with
+  a particular <var title=3D"">width</var> and &lt=
;var title=3D"">height</var> such that the cell covers
+  all the slots with coordinates (<var title=3D"">x</=
var>, <var title=3D"">y</var>) where <span ti=
tle=3D""><var title=3D"">cell<sub title=3D=
"">x</sub></var> ≤ <=
var title=3D"">x</var> < <=
var title=3D"">cell<sub title=3D"">x</sub=
></var>+<var title=3D"">width</var></sp=
an> and <span title=3D""><var title=3D""&=
gt;cell<sub title=3D"">y</sub></var>&nbsp=
;≤ <var title=3D"">y</var>&nbsp=
;< <var title=3D"">cell<sub title=3D&q=
uot;">y</sub></var>+<var title=3D"">h=
eight</var></span>. Cells can either be <em>data cells&=
lt;/em>
+  or <em>header cells</em>. Data cells correspond to <cod=
e><a href=3D#the-td-element>td</a></code> elements, =
and header cells
+  correspond to <code><a href=3D#the-th-element>th</a>=
</code> elements. Cells of both types can have zero or more associa=
ted
+  header cells.</p>
+
+  <p>It is possible, in certain error cases, for two cells to occu=
py the same slot.</p>
+
+  <p>A <dfn id=3Dconcept-row title=3Dconcept-row>row</dfn=
> is a complete set of slots from <span title=3D"">&lt=
;var title=3D"">x</var>=3D0</span> to <span t=
itle=3D""><var title=3D"">x</var>=3D&l=
t;var title=3D"">x<sub title=3D"">width</=
sub></var>-1</span>, for a particular value of <var tit=
le=3D"">y</var>. Rows usually
+  correspond to <code><a href=3D#the-tr-element>tr</a>=
</code> elements, though a <a href=3D#concept-row-group title=3D=
concept-row-group>row group</a>
+  can have some implied <a href=3D#concept-row title=3Dconcept-row&gt=
;rows</a> at the end in some cases involving
+  <a href=3D#concept-cell title=3Dconcept-cell>cells</a> spa=
nning multiple rows.</p>
+
+  <p>A <dfn id=3Dconcept-column title=3Dconcept-column>colum=
n</dfn> is a complete set of slots from <span title=3D"&quo=
t;><var title=3D"">y</var>=3D0</span> to &=
lt;span title=3D""><var title=3D"">y</var=
>=3D<var title=3D"">y<sub title=3D"">h=
eight</sub></var>-1</span>, for a particular value of &=
lt;var title=3D"">x</var>. Columns can
+  correspond to <code><a href=3D#the-col-element>col</a&g=
t;</code> elements. In the absence of <code><a href=3D#the=
-col-element>col</a></code> elements, columns are
+  implied.</p>
+
+  <p>A <dfn id=3Dconcept-row-group title=3Dconcept-row-group&gt=
;row group</dfn> is a set of <a href=3D#concept-row title=3Dconc=
ept-row>rows</a> anchored at a slot (0, <var title=3D"&q=
uot;>group<sub title=3D"">y</sub></var>) w=
ith a particular <var title=3D"">height</var> such =
that the row group
+  covers all the slots with coordinates (<var title=3D""&gt=
;x</var>, <var title=3D"">y</var>) where <=
span title=3D"">0 ≤ <var title=3D=
"">x</var> < <var title=3D=
"">x<sub title=3D"">width</sub></va=
r></span> and <span title=3D""><var title=3D&=
quot;">group<sub title=3D"">y</sub></var=
> ≤ <var title=3D"">y</var=
> < <var title=3D"">group<=
sub title=3D"">y</sub></var>+<var title=3D&qu=
ot;">height</var></span>. Row groups correspond to
+  <code><a href=3D#the-tbody-element>tbody</a></cod=
e>, <code><a href=3D#the-thead-element>thead</a><=
/code>, and <code><a href=3D#the-tfoot-element>tfoot</a=
></code> elements. Not every row is
+  necessarily in a row group.</p>
+
+  <p>A <dfn id=3Dconcept-column-group title=3Dconcept-column-gr=
oup>column group</dfn> is a set of <a href=3D#concept-column =
title=3Dconcept-column>columns</a> anchored at a slot (<var t=
itle=3D"">group<sub title=3D"">x</sub>=
</var>, 0) with a particular <var title=3D"">width&=
lt;/var> such that the column group
+  covers all the slots with coordinates (<var title=3D""&gt=
;x</var>, <var title=3D"">y</var>) where <=
span title=3D""><var title=3D"">group<sub=
 title=3D"">x</sub></var> ≤&=
nbsp;<var title=3D"">x</var> <&=
nbsp;<var title=3D"">group<sub title=3D""&gt=
;x</sub></var>+<var title=3D"">width</var&=
gt;</span> and <span title=3D"">0 ≤=
 <var title=3D"">y</var> <=
 <var title=3D"">y<sub title=3D""&g=
t;height</sub></var></span>. Column
+  groups correspond to <code><a href=3D#the-colgroup-element&gt=
;colgroup</a></code> elements. Not every column is necessaril=
y in a column
+  group.</p>
+
+  <p><a href=3D#concept-row-group title=3Dconcept-row-group>=
Row groups</a> cannot overlap each other. Similarly, <a href=3D#=
concept-column-group title=3Dconcept-column-group>column groups</a&=
gt; cannot overlap each other.</p>
+
+  <p>A <a href=3D#concept-cell title=3Dconcept-cell>cell<=
/a> cannot cover slots that are from two or more <a href=3D#concept=
-row-group title=3Dconcept-row-group>row groups</a>. It is, howe=
ver, possible for a cell to be in multiple
+  <a href=3D#concept-column-group title=3Dconcept-column-group>col=
umn groups</a>. All the slots that form part of one cell
+  are part of zero or one <a href=3D#concept-row-group title=3Dconcep=
t-row-group>row groups</a> and zero or more <a href=3D#concep=
t-column-group title=3Dconcept-column-group>column groups</a>.&l=
t;/p>
+
+  <p>In addition to <a href=3D#concept-cell title=3Dconcept-cel=
l>cells</a>, <a href=3D#concept-column title=3Dconcept-column=
>columns</a>, <a href=3D#concept-row title=3Dconcept-row>r=
ows</a>, <a href=3D#concept-row-group title=3Dconcept-row-group&=
gt;row groups</a>, and <a href=3D#concept-column-group title=3Dc=
oncept-column-group>column
+  groups</a>, <a href=3D#concept-table title=3Dconcept-table&gt=
;tables</a> can have a <code><a href=3D#the-caption-elemen=
t>caption</a></code> element
+  associated with them. This gives the table a heading, or legend.</p=
>
+
+  <p>A <dfn id=3Dtable-model-error>table model error</dfn=
> is an error with the data represented by <code><a href=3D#t=
he-table-element>table</a></code>
+  elements and their descendants. Documents must not have table model er=
rors.</p>
+
+
+  <h5 id=3Dforming-a-table><span class=3Dsecno>4.9.12.1 <=
/span>Forming a table</h5>
+
+  <p>To determine which elements correspond to which slots in a &l=
t;a href=3D#concept-table title=3Dconcept-table>table</a> associ=
ated with a <code><a href=3D#the-table-element>table</a&gt=
;</code> element, to determine the
+  dimensions of the table (<var title=3D"">x<sub titl=
e=3D"">width</sub></var> and <var title=3D&qu=
ot;">y<sub title=3D"">height</sub></var&=
gt;), and to determine if there are any <a href=3D#table-model-error t=
itle=3D"table model
+  error">table model errors</a>, user agents must use the =
following algorithm:</p>
+
+  <ol><li>
+    <p>Let <var title=3D"">x<sub title=3D"=
">width</sub></var> be zero.</p>
+   </li>
+
+   <li>
+    <p>Let <var title=3D"">y<sub title=3D"=
">height</sub></var> be zero.</p>
+   </li>
+
+   <li>
+
+    <p>Let <var title=3D"">pending <code>&lt=
;a href=3D#the-tfoot-element>tfoot</a></code> elements<=
/var> be a list of <code><a href=3D#the-tfoot-element>tfoo=
t</a></code>
+    elements, initially empty.</p>
+
+   </li>
+
+   <li>
+
+    <p>Let <var title=3D"">the table</var> b=
e the <a href=3D#concept-table title=3Dconcept-table>table</a&gt=
; represented
+    by the <code><a href=3D#the-table-element>table</a&gt=
;</code> element. The <var title=3D"">x<sub titl=
e=3D"">width</sub></var> and <var title=3D&qu=
ot;">y<sub title=3D"">height</sub></var&=
gt; variables give <var title=3D"">the table</var>'=
s
+    dimensions. <var title=3D"">The table</var> is=
 initially empty.</p>
+
+   </li>
+
+   <li>
+
+    <!-- this step is here just so that we can be sure to have a firs=
t element in the next step, so
+    that we can set up the "advance" exception-handling thingy=
 below; otherwise it'd be more
+    complicated. it's not a perf optimization per se. -->
+
+    <p>If the <code><a href=3D#the-table-element>table=
</a></code> element has no children elements, then return &lt=
;var title=3D"">the
+    table</var> (which will be empty), and abort these steps.</=
p>
+
+   </li>
+
+   <li>
+
+    <p>Associate the first <code><a href=3D#the-caption-e=
lement>caption</a></code> element child of the <code&gt=
;<a href=3D#the-table-element>table</a></code> element =
with
+    <var title=3D"">the table</var>. If there are =
no such children, then it has no associated
+    <code><a href=3D#the-caption-element>caption</a>&l=
t;/code> element.</p>
+
+   </li>
+
+   <li>
+
+    <p>Let the <var title=3D"">current element<=
/var> be the first element child of the
+    <code><a href=3D#the-table-element>table</a></c=
ode> element.</p>
+
+    <p>If a step in this algorithm ever requires the <var title=
=3D"">current element</var> to be <dfn id=3Dconcept=
-table-advance title=3Dconcept-table-advance>advanced to the next chil=
d of the <code>table</code></dfn> when
+    there is no such next child, then the user agent must jump to the st=
ep labeled <i>end</i>, near
+    the end of this algorithm.</p>
+
+   </li>
+
+   <li>
+
+    <p>While the <var title=3D"">current element&l=
t;/var> is not one of the following elements, <a href=3D#concept-ta=
ble-advance title=3Dconcept-table-advance>advance</a> the <va=
r title=3D"">current element</var> to the next
+    child of the <code><a href=3D#the-table-element>table&lt=
;/a></code>:</p>
+
+    <ul class=3Dbrief><li><code><a href=3D#the-colg=
roup-element>colgroup</a></code></li>
+     <li><code><a href=3D#the-thead-element>thead</=
a></code></li>
+     <li><code><a href=3D#the-tbody-element>tbody</=
a></code></li>
+     <li><code><a href=3D#the-tfoot-element>tfoot</=
a></code></li>
+     <li><code><a href=3D#the-tr-element>tr</a>&=
lt;/code></li>
+    </ul></li>
+
+   <li>
+
+    <p>If the <var title=3D"">current element</=
var> is a <code><a href=3D#the-colgroup-element>colgroup&l=
t;/a></code>, follow these
+    substeps:</p>
+
+    <ol><li>
+
+      <p><i>Column groups</i>: Process the <var tit=
le=3D"">current element</var> according to the
+      appropriate case below:</p>
+
+      <dl class=3Dswitch><dt>If the <var title=3D"&q=
uot;>current element</var> has any <code><a href=3D#the=
-col-element>col</a></code> element children</dt>
+
+       <dd>
+
+        <p>Follow these steps:</p>
+
+        <ol><li>
+
+          <p>Let <var title=3D"">x<sub title=3D=
"">start</sub></var> have the value of <span =
title=3D""><var title=3D"">x<sub title=3D=
"">width</sub></var></span>.</p>
+
+         </li>
+
+         <li>
+
+          <p>Let the <var title=3D"">current colum=
n</var> be the first <code><a href=3D#the-col-element>c=
ol</a></code> element child
+          of the <code><a href=3D#the-colgroup-element>colgr=
oup</a></code> element.</p>
+
+         </li>
+
+         <li>
+
+          <p><i>Columns</i>: If the <var title=3D&q=
uot;">current column</var> <code><a href=3D#the-co=
l-element>col</a></code> element has
+          a <code title=3Dattr-col-span><a href=3D#attr-col-spa=
n>span</a></code> attribute, then parse its value using th=
e
+          <a href=3D#rules-for-parsing-non-negative-integers>rules=
 for parsing non-negative integers</a>.</p>
+
+          <p>If the result of parsing the value is not an error or=
 zero, then let <var title=3D"">span</var> be that =
value.</p>
+
+          <p>Otherwise, if the <code><a href=3D#the-col-e=
lement>col</a></code> element has no <code title=3Dattr=
-col-span><a href=3D#attr-col-span>span</a></code> a=
ttribute, or if trying to parse the attribute's value
+          resulted in an error or zero, then let <var title=3D"&=
quot;>span</var> be 1.</p>
+
+         </li>
+
+         <li>
+
+          <p>Increase <var title=3D"">x<sub tit=
le=3D"">width</sub></var> by <var title=3D&qu=
ot;">span</var>.</p>
+
+         </li>
+
+         <li>
+
+          <p>Let the last <var title=3D"">span<=
/var> <a href=3D#concept-column title=3Dconcept-column>columns&l=
t;/a> in
+          <var title=3D"">the table</var> correspo=
nd to the <var title=3D"">current column</var>
+          <code><a href=3D#the-col-element>col</a><=
/code> element.</p>
+
+         </li>
+
+         <li>
+
+          <p>If <var title=3D"">current column<=
/var> is not the last <code><a href=3D#the-col-element>col=
</a></code> element child of
+          the <code><a href=3D#the-colgroup-element>colgroup=
</a></code> element, then let the <var title=3D"&quot=
;>current column</var> be the
+          next <code><a href=3D#the-col-element>col</a&gt=
;</code> element child of the <code><a href=3D#the-colgrou=
p-element>colgroup</a></code> element, and return to
+          the step labeled <i>columns</i>.</p>
+
+         </li>
+
+         <li>
+
+          <p>Let all the last <a href=3D#concept-column title=3D=
concept-column>columns</a> in <var title=3D"">th=
e
+          table</var> from <span title=3D"">x=3D&l=
t;var title=3D"">x<sub title=3D"">start</=
sub></var></span> to
+          <span title=3D"">x=3D<var title=3D"&qu=
ot;>x<sub title=3D"">width</sub></var>-1&l=
t;/span> form a new <a href=3D#concept-column-group title=3Dconcept=
-column-group>column group</a>, anchored at the slot (<var ti=
tle=3D"">x<sub title=3D"">start</sub>&=
lt;/var>, 0), with width <span title=3D""><var titl=
e=3D"">x<sub title=3D"">width</sub>&lt=
;/var>-<var title=3D"">x<sub title=3D""&g=
t;start</sub></var></span>, corresponding to the <co=
de><a href=3D#the-colgroup-element>colgroup</a></code&g=
t; element.</p>
+
+         </li>
+
+        </ol></dd>
+
+
+       <dt>If the <var title=3D"">current element&=
lt;/var> has no <code><a href=3D#the-col-element>col</a=
></code> element children</dt>
+
+       <dd>
+
+        <ol><li>
+
+          <p>If the <code><a href=3D#the-colgroup-element=
>colgroup</a></code> element has a <code title=3Dattr-c=
olgroup-span><a href=3D#attr-colgroup-span>span</a></co=
de>
+          attribute, then parse its value using the <a href=3D#rules-=
for-parsing-non-negative-integers>rules for parsing non-negative
+          integers</a>.</p>
+
+          <p>If the result of parsing the value is not an error or=
 zero, then let <var title=3D"">span</var> be that =
value.</p>
+
+          <p>Otherwise, if the <code><a href=3D#the-colgr=
oup-element>colgroup</a></code> element has no <code ti=
tle=3Dattr-colgroup-span><a href=3D#attr-colgroup-span>span</=
a></code> attribute, or if trying to parse the attribute's
+          value resulted in an error or zero, then let <var title=3D&=
quot;">span</var> be 1.</p>
+
+         </li>
+
+         <li>
+
+          <p>Increase <var title=3D"">x<sub tit=
le=3D"">width</sub></var> by <var title=3D&qu=
ot;">span</var>.</p>
+
+         </li>
+
+         <li>
+
+          <p>Let the last <var title=3D"">span<=
/var> <a href=3D#concept-column title=3Dconcept-column>columns&l=
t;/a> in
+          <var title=3D"">the table</var> form a n=
ew <a href=3D#concept-column-group title=3Dconcept-column-group>col=
umn
+          group</a>, anchored at the slot (<span title=3D"=
"><var title=3D"">x<sub title=3D""&g=
t;width</sub></var>-<var title=3D"">span</=
var></span>, 0), with width <var title=3D"">span=
</var>, corresponding to the <code><a href=3D#the-colgroup=
-element>colgroup</a></code> element.</p>
+
+         </li>
+
+        </ol></dd>
+
+      </dl></li>
+
+     <li>
+
+      <p><a href=3D#concept-table-advance title=3Dconcept-table=
-advance>Advance</a> the <var title=3D"">current=
 element</var>
+      to the next child of the <code><a href=3D#the-table-eleme=
nt>table</a></code>.</p>
+
+     </li>
+
+     <li>
+
+      <p>While the <var title=3D"">current element=
</var> is not one of the following elements, <a href=3D#concept-=
table-advance title=3Dconcept-table-advance>advance</a> the <=
var title=3D"">current element</var> to the
+      next child of the <code><a href=3D#the-table-element>t=
able</a></code>:</p>
+
+      <ul class=3Dbrief><li><code><a href=3D#the-co=
lgroup-element>colgroup</a></code></li>
+       <li><code><a href=3D#the-thead-element>thead&lt=
;/a></code></li>
+       <li><code><a href=3D#the-tbody-element>tbody&lt=
;/a></code></li>
+       <li><code><a href=3D#the-tfoot-element>tfoot&lt=
;/a></code></li>
+       <li><code><a href=3D#the-tr-element>tr</a&gt=
;</code></li>
+      </ul></li>
+
+     <li>
+
+      <p>If the <var title=3D"">current element&lt=
;/var> is a <code><a href=3D#the-colgroup-element>colgroup=
</a></code> element, jump to the
+      step labeled <i>column groups</i> above.</p>
+
+     </li>
+
+    </ol></li>
+
+   <li>
+
+    <p>Let <var title=3D"">y<sub title=3D"=
">current</sub></var> be zero.</p>
+
+   </li>
+
+   <li>
+
+    <p>Let the <var title=3D"">list of downward-gr=
owing cells</var> be an empty list.</p>
+
+   </li>
+
+   <li>
+
+    <p><i>Rows</i>: While the <var title=3D"&q=
uot;>current element</var> is not one of the following
+    elements, <a href=3D#concept-table-advance title=3Dconcept-table-=
advance>advance</a> the <var title=3D"">current
+    element</var> to the next child of the <code><a href=3D=
#the-table-element>table</a></code>:</p>
+
+    <ul class=3Dbrief><li><code><a href=3D#the-thea=
d-element>thead</a></code></li>
+     <li><code><a href=3D#the-tbody-element>tbody</=
a></code></li>
+     <li><code><a href=3D#the-tfoot-element>tfoot</=
a></code></li>
+     <li><code><a href=3D#the-tr-element>tr</a>&=
lt;/code></li>
+    </ul></li>
+
+   <li>
+
+    <p>If the <var title=3D"">current element</=
var> is a <code><a href=3D#the-tr-element>tr</a><=
/code>, then run the <a href=3D#algorithm-for-processing-rows>al=
gorithm
+    for processing rows</a>, <a href=3D#concept-table-advance t=
itle=3Dconcept-table-advance>advance</a> the <var title=3D&qu=
ot;">current element</var> to the next child of the <cod=
e><a href=3D#the-table-element>table</a></code>, and=
 return to the
+    step labeled <i>rows</i>.</p>
+
+   </li>
+
+   <li>
+
+    <p>Run the <a href=3D#algorithm-for-ending-a-row-group>a=
lgorithm for ending a row group</a>.</p>
+
+   </li>
+
+   <li>
+
+    <p>If the <var title=3D"">current element</=
var> is a <code><a href=3D#the-tfoot-element>tfoot</a&g=
t;</code>, then add that element to
+    the list of <var title=3D"">pending <code><=
a href=3D#the-tfoot-element>tfoot</a></code> elements</=
var>, <a href=3D#concept-table-advance title=3Dconcept-table-advanc=
e>advance</a> the <var title=3D"">current elemen=
t</var> to the next
+    child of the <code><a href=3D#the-table-element>table&lt=
;/a></code>, and return to the step labeled <i>rows</i&=
gt;.</p>
+
+   </li>
+
+   <li>
+
+    <p>The <var title=3D"">current element</var=
> is either a <code><a href=3D#the-thead-element>thead<=
/a></code> or a
+    <code><a href=3D#the-tbody-element>tbody</a></c=
ode>.</p>
+
+    <p>Run the <a href=3D#algorithm-for-processing-row-groups&g=
t;algorithm for processing row groups</a>.</p>
+
+   </li>
+
+   <li>
+
+    <p><a href=3D#concept-table-advance title=3Dconcept-table-a=
dvance>Advance</a> the <var title=3D"">current e=
lement</var> to
+    the next child of the <code><a href=3D#the-table-element&gt=
;table</a></code>.</p>
+
+   </li>
+
+   <li>
+
+    <p>Return to the step labeled <i>rows</i>.</p&g=
t;
+
+   </li>
+
+   <li>
+
+    <p><i>End</i>: For each <code><a href=3D#=
the-tfoot-element>tfoot</a></code> element in the list of =
<var title=3D"">pending
+    <code><a href=3D#the-tfoot-element>tfoot</a></c=
ode> elements</var>, in tree order, run the <a href=3D#algori=
thm-for-processing-row-groups>algorithm for processing row
+    groups</a>.</p>
+
+   </li>
+
+   <li>
+
+    <p>If there exists a <a href=3D#concept-row title=3Dconcept=
-row>row</a> or <a href=3D#concept-column title=3Dconcept-col=
umn>column</a> in <var title=3D"">the table</=
var> containing only <a href=3D#concept-slots title=3Dconcept-slots=
>slots</a> that do not have a <a href=3D#concept-cell title=3D=
concept-cell>cell</a>
+    anchored to them, then this is a <a href=3D#table-model-error>=
table model error</a>.</p>
+
+   </li>
+
+   <li>
+
+    <p>Return <var title=3D"">the table</var&gt=
;.</p>
+
+   </li>
+
+  </ol><p>The <dfn id=3Dalgorithm-for-processing-row-grou=
ps>algorithm for processing row groups</dfn>, which is invoked b=
y the set of steps above
+  for processing <code><a href=3D#the-thead-element>thead&lt=
;/a></code>, <code><a href=3D#the-tbody-element>tbod=
y</a></code>, and <code><a href=3D#the-tfoot-element=
>tfoot</a></code> elements, is:</p>
+
+  <ol><li>
+
+    <p>Let <var title=3D"">y<sub title=3D"=
">start</sub></var> have the value of <var title=3D=
"">y<sub title=3D"">height</sub></v=
ar>.</p>
+
+   </li>
+
+   <li>
+
+    <p>For each <code><a href=3D#the-tr-element>tr<=
/a></code> element that is a child of the element being processe=
d, in tree
+    order, run the <a href=3D#algorithm-for-processing-rows>algori=
thm for processing rows</a>.</p>
+
+   </li>
+
+   <li>
+
+    <!-- if we added any rows, make them part of a row group -->
+    <p>If <span title=3D""><var title=3D"&=
quot;>y<sub title=3D"">height</sub></var>&=
amp;nbsp;> <var title=3D"">y<sub title=
=3D"">start</sub></var></span>, then let a=
ll the last <a href=3D#concept-row title=3Dconcept-row>rows</a&g=
t; in <var title=3D"">the table</var> from <span=
 title=3D"">y=3D<var title=3D"">y<sub tit=
le=3D"">start</sub></var></span> to <sp=
an title=3D"">y=3D<var title=3D"">y<sub t=
itle=3D"">height</sub></var>-1</span> form=
 a new <a href=3D#concept-row-group title=3Dconcept-row-group>row
+    group</a>, anchored at the slot with coordinate (0, <var ti=
tle=3D"">y<sub title=3D"">start</sub>&=
lt;/var>), with height <span title=3D""><var title=3D=
"">y<sub title=3D"">height</sub></v=
ar>-<var title=3D"">y<sub title=3D"">s=
tart</sub></var></span>, corresponding
+    to the element being processed.</p>
+
+   </li>
+
+   <li>
+
+    <p>Run the <a href=3D#algorithm-for-ending-a-row-group>a=
lgorithm for ending a row group</a>.</p>
+
+   </li>
+
+  </ol><p>The <dfn id=3Dalgorithm-for-ending-a-row-group&=
gt;algorithm for ending a row group</dfn>, which is invoked by the =
set of steps above
+  when starting and ending a block of rows, is:</p>
+
+  <ol><li>
+
+    <p>While <var title=3D"">y<sub title=3D&quo=
t;">current</sub></var> is less than <var title=3D=
"">y<sub title=3D"">height</sub></v=
ar>, follow these steps:</p>
+
+    <ol><li>
+
+      <p>Run the <a href=3D#algorithm-for-growing-downward-grow=
ing-cells>algorithm for growing downward-growing cells</a>.</=
p>
+
+     </li>
+
+     <li>
+
+      <p>Increase <var title=3D"">y<sub title=3D=
"">current</sub></var> by 1.</p>
+
+     </li>
+
+    </ol></li>
+
+   <li>
+
+    <p>Empty the <var title=3D"">list of downward-=
growing cells</var>.</p>
+
+   </li>
+
+  </ol><p>The <dfn id=3Dalgorithm-for-processing-rows>=
algorithm for processing rows</dfn>, which is invoked by the set of=
 steps above for
+  processing <code><a href=3D#the-tr-element>tr</a>&lt=
;/code> elements, is:</p>
+
+  <ol><li>
+
+    <p>If <var title=3D"">y<sub title=3D"&=
quot;>height</sub></var> is equal to <var title=3D&quot=
;">y<sub title=3D"">current</sub></var&g=
t;, then increase <var title=3D"">y<sub title=3D"=
">height</sub></var> by
+    1. (<var title=3D"">y<sub title=3D""&gt=
;current</sub></var> is never <em>greater</em> th=
an <var title=3D"">y<sub title=3D"">heigh=
t</sub></var>.)</p>
+
+   </li>
+
+   <li>
+
+    <p>Let <var title=3D"">x<sub title=3D"=
">current</sub></var> be 0.</p>
+
+   </li>
+
+   <li>
+
+    <p>Run the <a href=3D#algorithm-for-growing-downward-growin=
g-cells>algorithm for growing downward-growing cells</a>.</p&=
gt;
+
+   </li>
+
+   <li>
+
+    <p>If the <code><a href=3D#the-tr-element>tr</a=
></code> element being processed has no <code><a href=3D=
#the-td-element>td</a></code> or <code><a href=3D=
#the-th-element>th</a></code>
+    element children, then increase <var title=3D"">y&lt=
;sub title=3D"">current</sub></var> by 1, abort
+    this set of steps, and return to the algorithm above.</p>
+
+   </li>
+
+   <li>
+
+    <p>Let <var title=3D"">current cell</var&gt=
; be the first <code><a href=3D#the-td-element>td</a>&l=
t;/code> or <code><a href=3D#the-th-element>th</a>&l=
t;/code> element child
+    in the <code><a href=3D#the-tr-element>tr</a></=
code> element being processed.</p>
+
+   </li>
+
+   <li>
+
+    <p><i>Cells</i>: While <var title=3D"&quot=
;>x<sub title=3D"">current</sub></var> is =
less than <var title=3D"">x<sub title=3D""&g=
t;width</sub></var> and the slot with coordinate (<var tit=
le=3D"">x<sub title=3D"">current</sub>=
</var>, <var title=3D"">y<sub title=3D"&quo=
t;>current</sub></var>) already has a
+    cell assigned to it, increase <var title=3D"">x<s=
ub title=3D"">current</sub></var> by 1.</p&gt=
;
+
+   </li>
+
+   <li>
+
+    <p>If <var title=3D"">x<sub title=3D"&=
quot;>current</sub></var> is equal to <var title=3D&quo=
t;">x<sub title=3D"">width</sub></var&gt=
;, increase <var title=3D"">x<sub title=3D""=
>width</sub></var> by 1. (<var title=3D"">=
x<sub title=3D"">current</sub></var> is never=
 <em>greater</em> than <var title=3D"">x<s=
ub title=3D"">width</sub></var>.)</p>
+
+   </li>
+
+   <li>
+
+    <p>If the <var title=3D"">current cell</var=
> has a <code title=3Dattr-tdth-colspan><a href=3D#attr-tdth-=
colspan>colspan</a></code>
+    attribute, then <a href=3D#rules-for-parsing-non-negative-integer=
s title=3D"rules for parsing non-negative integers">parse th=
at attribute's
+    value</a>, and let <var title=3D"">colspan<=
/var> be the result.</p>
+
+    <p>If parsing that value failed, or returned zero, or if the a=
ttribute is absent, then let <var title=3D"">colspan</=
var> be 1, instead.</p>
+
+   </li>
+
+   <li>
+
+    <p>If the <var title=3D"">current cell</var=
> has a <code title=3Dattr-tdth-rowspan><a href=3D#attr-tdth-=
rowspan>rowspan</a></code>
+    attribute, then <a href=3D#rules-for-parsing-non-negative-integer=
s title=3D"rules for parsing non-negative integers">parse th=
at attribute's
+    value</a>, and let <var title=3D"">rowspan<=
/var> be the result.</p>
+
+    <p>If parsing that value failed or if the attribute is absent,=
 then let <var title=3D"">rowspan</var> be 1, inste=
ad.</p>
+
+   </li>
+
+   <li>
+
+    <p>If <var title=3D"">rowspan</var> is z=
ero and the <code><a href=3D#the-table-element>table</a&gt=
;</code> element's
+    <code><a href=3D#document>Document</a></code&gt=
; is not set to <a href=3D#quirks-mode>quirks mode</a>, then =
let <var title=3D"">cell grows
+    downward</var> be true, and set <var title=3D""&g=
t;rowspan</var> to 1. Otherwise, let <var title=3D""&g=
t;cell grows downward</var> be false.</p>
+
+   </li>
+
+   <li>
+
+    <p>If <span title=3D""><var title=3D"&=
quot;>x<sub title=3D"">width</sub></var>&a=
mp;nbsp;< <var title=3D"">x<sub title=3D=
"">current</sub></var>+<var title=3D"&qu=
ot;>colspan</var></span>, then let <var title=3D"&=
quot;>x<sub title=3D"">width</sub></var> b=
e <span title=3D""><var title=3D"">x<s=
ub title=3D"">current</sub></var>+<var title=3D=
"">colspan</var></span>.</p>
+
+   </li>
+
+   <li>
+
+    <p>If <span title=3D""><var title=3D"&=
quot;>y<sub title=3D"">height</sub></var>&=
amp;nbsp;< <var title=3D"">y<sub title=
=3D"">current</sub></var>+<var title=3D"=
">rowspan</var></span>, then let <var title=3D&quo=
t;">y<sub title=3D"">height</sub></var&g=
t; be <span title=3D""><var title=3D"">y&=
lt;sub title=3D"">current</sub></var>+<var ti=
tle=3D"">rowspan</var></span>.</p>
+
+   </li>
+
+   <li>
+
+    <p>Let the slots with coordinates (<var title=3D"&quot=
;>x</var>, <var title=3D"">y</var>) such t=
hat <span title=3D""><var title=3D"">x&lt=
;sub title=3D"">current</sub></var> &am=
p;le; <var title=3D"">x</var> &am=
p;lt; <var title=3D"">x<sub title=3D"&qu=
ot;>current</sub></var>+<var title=3D"">co=
lspan</var></span> and <span title=3D""><v=
ar title=3D"">y<sub title=3D"">current</s=
ub></var> ≤ <var title=3D"&quot=
;>y</var> < <var title=3D"&quot=
;>y<sub title=3D"">current</sub></var>+&lt=
;var title=3D"">rowspan</var></span> be covered =
by a
+    new <a href=3D#concept-cell title=3Dconcept-cell>cell</a&gt=
; <var title=3D"">c</var>, anchored at (<var tit=
le=3D"">x<sub title=3D"">current</sub>=
</var>, <var title=3D"">y<sub title=3D"&quo=
t;>current</sub></var>),
+    which has width <var title=3D"">colspan</var> =
and height <var title=3D"">rowspan</var>,
+    corresponding to the <var title=3D"">current cell&lt=
;/var> element.</p>
+
+    <p>If the <var title=3D"">current cell</var=
> element is a <code><a href=3D#the-th-element>th</a&gt=
;</code> element, let this new
+    cell <var title=3D"">c</var> be a header cell;=
 otherwise, let it be a data cell.</p>
+
+    <p>To establish which header cells apply to the <var title=3D=
"">current cell</var> element, use
+    the <a href=3D#algorithm-for-assigning-header-cells>algorithm =
for assigning header cells</a> described in the next section.</p=
>
+
+    <p>If any of the slots involved already had a <a href=3D#co=
ncept-cell title=3Dconcept-cell>cell</a> covering
+    them, then this is a <a href=3D#table-model-error>table model =
error</a>. Those slots now have two cells
+    overlapping.</p>
+
+   </li>
+
+   <li>
+
+    <p>If <var title=3D"">cell grows downward</=
var> is true, then add the tuple {<var title=3D"">c&lt=
;/var>, <var title=3D"">x<sub title=3D""&=
gt;current</sub></var>, <var title=3D"">colsp=
an</var>}
+    to the <var title=3D"">list of downward-growing cell=
s</var>.</p>
+
+   </li>
+
+   <li>
+
+    <p>Increase <var title=3D"">x<sub title=3D&=
quot;">current</sub></var> by <var title=3D"&=
quot;>colspan</var>.</p>
+
+   </li>
+
+   <li>
+
+    <p>If <var title=3D"">current cell</var>=
 is the last <code><a href=3D#the-td-element>td</a><=
/code> or <code><a href=3D#the-th-element>th</a><=
/code> element child in
+    the <code><a href=3D#the-tr-element>tr</a></cod=
e> element being processed, then increase <var title=3D""=
>y<sub title=3D"">current</sub></var> by 1=
, abort this set of steps, and return to the algorithm
+    above.</p>
+
+   </li>
+
+   <li>
+
+    <p>Let <var title=3D"">current cell</var&gt=
; be the next <code><a href=3D#the-td-element>td</a>&lt=
;/code> or <code><a href=3D#the-th-element>th</a>&lt=
;/code> element child
+    in the <code><a href=3D#the-tr-element>tr</a></=
code> element being processed.</p>
+
+   </li>
+
+   <li>
+
+    <p>Return to the step labeled <i>cells</i>.</p&=
gt;
+
+   </li>
+
+  </ol><p>When the algorithms above require the user agent t=
o run the <dfn id=3Dalgorithm-for-growing-downward-growing-cells>al=
gorithm for growing
+  downward-growing cells</dfn>, the user agent must, for each {&lt=
;var title=3D"">cell</var>, <var title=3D"&quo=
t;>cell<sub title=3D"">x</sub></var>, <=
var title=3D"">width</var>} tuple in the <var title=
=3D"">list of downward-growing cells</var>, if any, ex=
tend the <a href=3D#concept-cell title=3Dconcept-cell>cell</a&gt=
; <var title=3D"">cell</var> so that it also covers=
 the slots with
+  coordinates (<var title=3D"">x</var>, <var ti=
tle=3D"">y<sub title=3D"">current</sub&gt=
;</var>), where <span title=3D""><var title=3D&q=
uot;">cell<sub title=3D"">x</sub></var&g=
t; ≤ <var title=3D"">x</var&g=
t; < <var title=3D"">cell<sub=
 title=3D"">x</sub></var>+<var title=3D"=
">width</var></span>.</p>
+
+
+
+
+  <h5 id=3Dheader-and-data-cell-semantics><span class=3Dsecno&g=
t;4.9.12.2 </span>Forming relationships between data cells and head=
er cells</h5>
+
+  <p>Each cell can be assigned zero or more header cells. The <=
dfn id=3Dalgorithm-for-assigning-header-cells>algorithm for assigning =
header
+  cells</dfn> to a cell <var title=3D"">principal =
cell</var> is as follows.</p>
+
+  <ol><!-- INITIALIZATION --><li>
+
+    <p>Let <var title=3D"">header list</var>=
 be an empty list of cells.</p>
+
+   </li>
+
+   <li>
+
+    <p>Let (<var title=3D"">principal<sub title=
=3D"">x</sub></var>, <var title=3D"&quot=
;>principal<sub title=3D"">y</sub></var>) =
be the coordinate of the slot to which the <var title=3D""&g=
t;principal
+    cell</var> is anchored.</p>
+
+   </li>
+
+   <li>
+
+    <dl class=3Dswitch><dt>If the <var title=3D"&quo=
t;>principal cell</var> has a <code title=3Dattr-tdth-headers=
><a href=3D#attr-tdth-headers>headers</a></code> att=
ribute specified</dt>
+
+     <dd>
+
+      <!-- HEADERS=3D"" -->
+
+      <ol><li>
+
+        <p>Take the value of the <var title=3D"">p=
rincipal cell</var>'s <code title=3Dattr-tdth-headers><a h=
ref=3D#attr-tdth-headers>headers</a></code> attribute and =
<a href=3D#split-a-string-on-spaces title=3D"split a string on
+        spaces">split it on spaces</a>, letting <var ti=
tle=3D"">id list</var> be the list of tokens
+        obtained.</p>
+
+       </li>
+
+       <li>
+
+        <!-- support headers=3D"" to <td> for legacy =
compat -->
+        <!-- note that it's not conforming though -->
+        <p>For each token in the <var title=3D"">i=
d list</var>, if the
+        first element in the <code><a href=3D#document>Docum=
ent</a></code> with an <a href=3D#concept-id title=3Dconce=
pt-id>ID</a> equal to
+        the token is a cell in the same <a href=3D#concept-table titl=
e=3Dconcept-table>table</a>, and that cell is not the
+        <var title=3D"">principal cell</var>, then=
 add that cell to <var title=3D"">header list</var>=
.</p>
+
+       </li>
+
+      </ol></dd>
+
+
+     <dt>If <var title=3D"">principal cell</var=
> does not have a <code title=3Dattr-tdth-headers><a href=3D#=
attr-tdth-headers>headers</a></code> attribute specified&l=
t;/dt>
+
+     <dd>
+
+      <ol><li>
+
+        <p>Let <var title=3D"">principal<sub ti=
tle=3D"">width</sub></var> be the width of the &=
lt;var title=3D"">principal cell</var>.</p>
+
+       </li>
+
+       <li>
+
+        <p>Let <var title=3D"">principal<sub ti=
tle=3D"">height</sub></var> be the height of the=
 <var title=3D"">principal cell</var>.</p>
+
+       </li>
+
+
+       <!-- HORIZONTAL -->
+
+       <li>
+
+        <p>For each value of <var title=3D"">y<=
/var> from <var title=3D"">principal<sub title=3D&q=
uot;">y</sub></var> to <span title=3D""&=
gt;<var title=3D"">principal<sub title=3D""&=
gt;y</sub></var>+<var title=3D"">principal&lt=
;sub title=3D"">height</sub></var>-1</span&gt=
;, run
+        the <a href=3D#internal-algorithm-for-scanning-and-assigning-=
header-cells>internal algorithm for scanning and assigning header cell=
s</a>, with the <var title=3D"">principal cell</=
var>, the <var title=3D"">header list</var>, the=
 initial coordinate
+        (<var title=3D"">principal<sub title=3D"=
">x</sub></var>,<var title=3D"">y<=
/var>), and the
+        increments <span title=3D"">Δ<var t=
itle=3D"">x</var>=3D−1</span> and <=
span title=3D"">Δ<var title=3D"">y=
</var>=3D0</span>.</p>
+
+       </li>
+
+
+       <!-- VERTICAL -->
+
+       <li>
+
+        <p>For each value of <var title=3D"">x<=
/var> from <var title=3D"">principal<sub title=3D&q=
uot;">x</sub></var> to <span title=3D""&=
gt;<var title=3D"">principal<sub title=3D""&=
gt;x</sub></var>+<var title=3D"">principal&lt=
;sub title=3D"">width</sub></var>-1</span>=
, run
+        the <a href=3D#internal-algorithm-for-scanning-and-assigning-=
header-cells>internal algorithm for scanning and assigning header cell=
s</a>, with the <var title=3D"">principal cell</=
var>, the <var title=3D"">header list</var>, the=
 initial coordinate
+        (<var title=3D"">x</var>,<var title=3D&=
quot;">principal<sub title=3D"">y</sub><=
/var>), and the
+        increments <span title=3D"">Δ<var t=
itle=3D"">x</var>=3D0</span> and <span title=3D=
"">Δ<var title=3D"">y</var>=3D=
−1</span>.</p>
+
+       </li>
+
+
+       <!-- ROW GROUP HEADERS -->
+
+       <li>
+
+        <p>If the <var title=3D"">principal cell&l=
t;/var> is anchored in a <a href=3D#concept-row-group title=3Dconce=
pt-row-group>row group</a>, then add all header cells that are &=
lt;a href=3D#row-group-header title=3D"row group header">row=
 group headers</a> and are anchored in the same row group
+        with an <var title=3D"">x</var>-coordinate=
 less than or equal to <span title=3D""><var title=3D&=
quot;">principal<sub title=3D"">x</sub><=
/var>+<var title=3D"">principal<sub title=3D"&=
quot;>width</sub></var>-1</span> and a <var title=
=3D"">y</var>-coordinate less than or
+        equal to <span title=3D""><var title=3D"=
">principal<sub title=3D"">y</sub></var&=
gt;+<var title=3D"">principal<sub title=3D""=
>height</sub></var>-1</span> to <var title=3D&quo=
t;">header
+        list</var>.</p>
+
+        <!-- this might introduce principal accidentally; fixed below=
 -->
+
+       </li>
+
+
+       <!-- COLUMN GROUP HEADERS -->
+
+       <li>
+
+        <p>If the <var title=3D"">principal cell&l=
t;/var> is anchored in a <a href=3D#concept-column-group title=3Dco=
ncept-column-group>column group</a>, then add all header cells t=
hat are <a href=3D#column-group-header title=3D"column group head=
er">column group headers</a> and are anchored in the same c=
olumn
+        group with an <var title=3D"">x</var>-coor=
dinate less than or equal to <span title=3D""><var tit=
le=3D"">principal<sub title=3D"">x</sub&g=
t;</var>+<var title=3D"">principal<sub title=3D&=
quot;">width</sub></var>-1</span> and a <var=
 title=3D"">y</var>-coordinate less than or
+        equal to <span title=3D""><var title=3D"=
">principal<sub title=3D"">y</sub></var&=
gt;+<var title=3D"">principal<sub title=3D""=
>height</sub></var>-1</span> to <var title=3D&quo=
t;">header
+        list</var>.</p>
+
+        <!-- this might introduce principal accidentally; fixed below=
 -->
+
+       </li>
+
+      </ol></dd>
+
+    </dl></li>
+
+
+   <!--CLEANING UP-->
+
+   <li>
+
+    <p>Remove all the <a href=3D#empty-cell title=3D"empty=
 cell">empty cells</a> from the <var title=3D"&quot=
;>header
+    list</var>.</p>
+
+   </li>
+
+   <li>
+
+    <p>Remove any duplicates from the <var title=3D""=
>header list</var>.</p>
+
+   </li>
+
+   <li>
+
+    <p>Remove <var title=3D"">principal cell</v=
ar> from the <var title=3D"">header list</var> i=
f it is
+    there.</p> <!-- see "might introduce principal acciden=
tally" above -->
+
+   </li>
+
+   <li>
+
+    <p>Assign the headers in the <var title=3D"">h=
eader list</var> to the <var title=3D"">principal
+    cell</var>.</p>
+
+   </li>
+
+  </ol><p>The <dfn id=3Dinternal-algorithm-for-scanning-a=
nd-assigning-header-cells>internal algorithm for scanning and assignin=
g header cells</dfn>, given a <var title=3D"">princ=
ipal cell</var>, a <var title=3D"">header list</=
var>, an initial coordinate (<var title=3D"">initial&l=
t;sub title=3D"">x</sub></var>, <var title=3D=
"">initial<sub title=3D"">y</sub></=
var>),
+  and Δ<var title=3D"">x</var> and &=
Delta;<var title=3D"">y</var> increments, is as fol=
lows:</p>
+
+  <ol><li>
+
+    <p>Let <var title=3D"">x</var> equal &lt=
;var title=3D"">initial<sub title=3D"">x<=
/sub></var>.</p>
+
+   </li>
+
+   <li>
+
+    <p>Let <var title=3D"">y</var> equal &lt=
;var title=3D"">initial<sub title=3D"">y<=
/sub></var>.</p>
+
+   </li>
+
+   <li>
+
+    <p>Let <var title=3D"">opaque headers</var&=
gt; be an empty list of cells.</p>
+
+   </li>
+
+   <li>
+
+    <dl class=3Dswitch><dt>If <var title=3D""&g=
t;principal cell</var> is a header cell</dt>
+
+     <dd><p>Let <var title=3D"">in header bl=
ock</var> be true, and let <var title=3D"">headers =
from
+     current header block</var> be a list of cells containing just=
 the <var title=3D"">principal
+     cell</var>.</dd>
+
+     <dt>Otherwise</dt>
+
+     <dd><p>Let <var title=3D"">in header bl=
ock</var> be false and let <var title=3D"">headers =
from
+     current header block</var> be an empty list of cells.</p&g=
t;
+
+    </dl></li>
+
+   <li>
+
+    <p><i>Loop</i>: Increment <var title=3D"&q=
uot;>x</var> by Δ<var title=3D"">x<=
/var>; increment <var title=3D"">y</var> by &amp=
;Delta;<var title=3D"">y</var>.</p>
+
+    <p class=3Dnote>For each invocation of this algorithm, one of =
Δ<var title=3D"">x</var> and
+    Δ<var title=3D"">y</var> will be &am=
p;minus;1, and the other will be 0.</p>
+
+   </li>
+
+   <li>
+
+    <p>If either <var title=3D"">x</var> or =
<var title=3D"">y</var> is less than 0, then abort =
this
+    internal algorithm.</p>
+
+   </li>
+
+   <li>
+
+    <p>If there is no cell covering slot (<var title=3D"&q=
uot;>x</var>, <var title=3D"">y</var>), or=
 if there
+    is more than one cell covering slot (<var title=3D""&gt=
;x</var>, <var title=3D"">y</var>), return to
+    the substep labeled <i>loop</i>.</p>
+
+   </li>
+
+   <li>
+
+    <p>Let <var title=3D"">current cell</var&gt=
; be the cell covering slot (<var title=3D"">x</var&gt=
;, <var title=3D"">y</var>).</p>
+
+   </li>
+
+   <li>
+
+    <dl class=3Dswitch><dt>If <var title=3D""&g=
t;current cell</var> is a header cell</dt>
+
+     <dd>
+
+      <ol><li><p>Set <var title=3D"">i=
n header block</var> to true.</li>
+
+       <li><p>Add <var title=3D"">current ce=
ll</var> to <var title=3D"">headers from current he=
ader
+       block</var>.</li>
+
+       <li><p>Let <var title=3D"">blocked&lt=
;/var> be false.</li>
+
+       <li>
+
+        <dl class=3Dswitch><dt>If Δ<var title=3D=
"">x</var> is 0</dt>
+
+         <dd>
+
+          <p>If there are any cells in the <var title=3D"&=
quot;>opaque headers</var> list anchored with the
+          same <var title=3D"">x</var>-coordinate =
as the <var title=3D"">current cell</var>, and with
+          the same width as <var title=3D"">current cell=
</var>, then let <var title=3D"">blocked</var&gt=
;
+          be true.</p>
+
+          <p>If the <var title=3D"">current cell&l=
t;/var> is not a <a href=3D#column-header>column header</a&gt=
;, then let
+          <var title=3D"">blocked</var> be true.&l=
t;/p>
+
+         </dd>
+
+         <dt>If Δ<var title=3D"">y</v=
ar> is 0</dt>
+
+         <dd>
+
+          <p>If there are any cells in the <var title=3D"&=
quot;>opaque headers</var> list anchored with the
+          same <var title=3D"">y</var>-coordinate =
as the <var title=3D"">current cell</var>, and with
+          the same height as <var title=3D"">current cel=
l</var>, then let <var title=3D"">blocked</var&g=
t;
+          be true.</p>
+
+          <p>If the <var title=3D"">current cell&l=
t;/var> is not a <a href=3D#row-header>row header</a>, the=
n let <var title=3D"">blocked</var> be true.</p&=
gt;
+
+         </dd>
+
+        </dl></li>
+
+       <li><p>If <var title=3D"">blocked<=
/var> is false, then add the <var title=3D"">current c=
ell</var>
+       to the <var title=3D"">headers list</var>.&=
lt;/li>
+
+      </ol></dd>
+
+     <dt>If <var title=3D"">current cell</var&g=
t; is a data cell and <var title=3D"">in header block<=
/var> is true</dt>
+
+     <dd><p>Set <var title=3D"">in header bl=
ock</var> to false. Add all the cells in <var title=3D"&quo=
t;>headers from current header block</var> to the <var title=3D=
"">opaque headers</var>
+     list, and empty the <var title=3D"">headers from cu=
rrent header block</var> list.</p>
+
+    </dl></li>
+
+   <li>
+
+    <p>Return to the step labeled <i>loop</i>.</p&g=
t;
+
+   </li>
+
+  </ol><p>A header cell anchored at the slot with coordinate=
 (<var title=3D"">x</var>, <var title=3D"&q=
uot;>y</var>) with width <var title=3D"">width&l=
t;/var> and height <var title=3D"">height</var> =
is
+  said to be a <dfn id=3Dcolumn-header>column header</dfn> i=
f any of the following conditions are true:</p>
+
+  <ul><li>The cell's <code title=3Dattr-th-scope><a=
 href=3D#attr-th-scope>scope</a></code> attribute is in th=
e <a href=3D#attr-th-scope-col title=3Dattr-th-scope-col>column<=
/a> state, or</li>
+
+   <li>The cell's <code title=3Dattr-th-scope><a href=3D#=
attr-th-scope>scope</a></code> attribute is in the <a h=
ref=3D#attr-th-scope-auto title=3Dattr-th-scope-auto>auto</a> st=
ate, and there are no data cells in any of the cells
+   covering slots with <var title=3D"">y</var>-coo=
rdinates <var title=3D"">y</var> .. <span title=3D=
""><var title=3D"">y</var>+<var tit=
le=3D"">height</var>-1</span>.</li>
+
+  </ul><p>A header cell anchored at the slot with coordinate=
 (<var title=3D"">x</var>, <var title=3D"&q=
uot;>y</var>) with width <var title=3D"">width&l=
t;/var> and height <var title=3D"">height</var> =
is
+  said to be a <dfn id=3Drow-header>row header</dfn> if any =
of the following conditions are true:</p>
+
+  <ul><li>The cell's <code title=3Dattr-th-scope><a=
 href=3D#attr-th-scope>scope</a></code> attribute is in th=
e <a href=3D#attr-th-scope-row title=3Dattr-th-scope-row>row</a&=
gt; state, or</li>
+
+   <li>The cell's <code title=3Dattr-th-scope><a href=3D#=
attr-th-scope>scope</a></code> attribute is in the <a h=
ref=3D#attr-th-scope-auto title=3Dattr-th-scope-auto>auto</a> st=
ate, the cell is not a <a href=3D#column-header>column header</a=
>, and
+   there are no data cells in any of the cells covering slots with <v=
ar title=3D"">x</var>-coordinates
+   <var title=3D"">x</var> .. <span title=3D&qu=
ot;"><var title=3D"">x</var>+<var title=3D=
"">width</var>-1</span>.</li>
+
+  </ul><p>A header cell is said to be a <dfn id=3Dcolumn-=
group-header>column group header</dfn> if its <code title=3Da=
ttr-th-scope><a href=3D#attr-th-scope>scope</a></code&g=
t; attribute is in the <a href=3D#attr-th-scope-colgroup title=3Dattr-=
th-scope-colgroup>column
+  group</a> state.</p>
+
+  <p>A header cell is said to be a <dfn id=3Drow-group-header&g=
t;row group header</dfn> if its <code title=3Dattr-th-scope>&=
lt;a href=3D#attr-th-scope>scope</a></code> attribute is i=
n the <a href=3D#attr-th-scope-rowgroup title=3Dattr-th-scope-rowgroup=
>row
+  group</a> state.</p>
+
+  <p>A cell is said to be an <dfn id=3Dempty-cell>empty cell=
</dfn> if it contains no elements and its text content,
+  if any, consists only of <a href=3D#white_space>White_Space</=
a> characters.</p>
+
+  </div>
+
+
+  <h4 id=3Dtable-sorting-model><span class=3Dsecno>4.9.13 &l=
t;/span><dfn>Table sorting model</dfn></h4>
+
+  <p>The <dfn id=3Dattr-table-sortable title=3Dattr-table-sorta=
ble><code>sortable</code></dfn> attribute on
+  <code><a href=3D#the-table-element>table</a></cod=
e> elements is a <a href=3D#boolean-attribute>boolean attribute&=
lt;/a>. When present, it indicates that
+  the user agent is to <a href=3D#sortable-ui>allow the user to so=
rt</a> the <code><a href=3D#the-table-element>table<=
/a></code>.</p>
+
+  <p>To make a column sortable in a <code><a href=3D#the-=
table-element>table</a></code> with a <code><a hr=
ef=3D#the-thead-element>thead</a></code>, the column needs
+  to have <code><a href=3D#the-th-element>th</a></c=
ode> element that does not <a href=3D#attr-tdth-colspan title=3Datt=
r-tdth-colspan>span multiple
+  columns</a> in a <code><a href=3D#the-thead-element>=
thead</a></code> above any rows that it is to sort.</p>
+
+  <p>To make a column sortable in a <code><a href=3D#the-=
table-element>table</a></code> without a <code><a=
 href=3D#the-thead-element>thead</a></code>, the column
+  needs to have <code><a href=3D#the-th-element>th</a>=
</code> element that does not <a href=3D#attr-tdth-colspan title=
=3Dattr-tdth-colspan>span multiple
+  columns</a> in the first <code><a href=3D#the-tr-elemen=
t>tr</a></code> element of the <code><a href=3D#t=
he-table-element>table</a></code>, where that
+  <code><a href=3D#the-tr-element>tr</a></code> =
element is not in a <code><a href=3D#the-tfoot-element>tfoot&=
lt;/a></code>.</p>
+
+  <p>When the user selects a column by which to sort, the user age=
nt sets the <code><a href=3D#the-th-element>th</a></=
code>
+  element's <dfn id=3Dattr-th-sorted title=3Dattr-th-sorted><co=
de>sorted</code></dfn> attribute. This attribute can also
+  be set manually, to indicate that the table should be automatically so=
rted, even when scripts
+  modify the page on when the page is loaded.</p>
+
+  <p>The <code title=3Dattr-th-sorted><a href=3D#attr-th-=
sorted>sorted</a></code> attribute, if specified, must hav=
e a value that
+  is a <a href=3D#set-of-space-separated-tokens>set of space-separ=
ated tokens</a> consisting of optionally a token whose value is an
+  <a href=3D#ascii-case-insensitive>ASCII case-insensitive</a&g=
t; match for the string "<dfn id=3Dattr-th-sorted-reversed title=3D=
attr-th-sorted-reversed><code>reversed</code></dfn>&=
quot;, and optionally a token whose value
+  is a <a href=3D#valid-non-negative-integer>valid non-negative in=
teger</a> greater than zero, in either order.</p>
+
+  <p class=3Dnote>In other words, ignoring spaces and case, the &l=
t;code title=3Dattr-th-sorted><a href=3D#attr-th-sorted>sorted&l=
t;/a></code> attribute's value can be empty, "<code titl=
e=3D"">reversed</code>", "<code title=3D&=
quot;">1</code>", "<code title=3D""&=
gt;reversed 1</code>", or
+  "<code title=3D"">1 reversed</code>", =
where "1" is any number equal to or greater than 1.</p>
+
+  <p>While one or more <code><a href=3D#the-th-element&gt=
;th</a></code> elements in the table have a <code title=3D=
attr-th-sorted><a href=3D#attr-th-sorted>sorted</a></co=
de> attribute, the user agent will keep the table's data rows
+  sorted. The value of the attribute controls how the column is used in =
determining the sort order.
+  The <code title=3Dattr-th-sorted-reversed><a href=3D#attr-th-=
sorted-reversed>reversed</a></code> keyword means that the=
 <dfn id=3Dcolumn-sort-direction>column sort
+  direction</dfn> is <i>reversed</i>, rather than <=
i>normal</i>, which is the default if the keyword
+  is omitted. The number, if present, indicates the <dfn id=3Dcolumn-=
key-ordinality>column key ordinality</dfn>; if the number
+  is omitted, the column is the primary key, as if the value 1 had been =
specified.</p>
+
+  <p class=3Dnote>Thus, <code title=3D"">sorted=3D=
"1"</code> indicates the table's primary key, <code ti=
tle=3D"">sorted=3D"2"</code> its secondary k=
ey, and so forth.</p>
+
+  <hr><p>A <dfn id=3Dsorting-capable-th-element>sortin=
g-capable <code>th</code> element</dfn> is a <code&g=
t;<a href=3D#the-th-element>th</a></code> element that =
matches
+  all the following conditions simultaneously:</p>
+
+  <ul><li><p>It corresponds to a <a href=3D#concept=
-cell title=3Dconcept-cell>cell</a> whose <i>width</i&g=
t; is 1.
+   (Specifically, a <i>header cell</i>, since this is a <=
code><a href=3D#the-th-element>th</a></code> element=
.)</li>
+
+   <li><p>There is no <a href=3D#concept-cell title=3Dcon=
cept-cell>cell</a> that corresponds to another
+   <a href=3D#sorting-capable-th-element>sorting-capable <code&=
gt;th</code> element</a> that covers slots in the same <a =
href=3D#concept-column title=3Dconcept-column>column</a> but on =
a higher (earlier) <a href=3D#concept-row title=3Dconcept-row>row&l=
t;/a>.</li> <!-- only matters if there's a <thead> --&g=
t;
+
+   <li>
+
+    <p>If the <a href=3D#concept-cell title=3Dconcept-cell>c=
ell</a>'s <a href=3D#concept-table title=3Dconcept-table>tabl=
e</a> has
+    a <a href=3D#concept-row-group title=3Dconcept-row-group>row g=
roup</a> corresponding to a <code><a href=3D#the-thead-ele=
ment>thead</a></code>
+    element, the <a href=3D#concept-cell title=3Dconcept-cell>cell=
</a> is in a <a href=3D#concept-row-group title=3Dconcept-row-gr=
oup>row
+    group</a> that corresponds to the <em>first</em> &=
lt;code><a href=3D#the-thead-element>thead</a></code&gt=
; element of the <a href=3D#concept-cell title=3Dconcept-cell>cell&=
lt;/a>'s <a href=3D#concept-table title=3Dconcept-table>table&lt=
;/a>.</p>
+
+    <p>Otherwise: the <a href=3D#concept-cell title=3Dconcept-c=
ell>cell</a> is not in a <a href=3D#concept-row-group title=3D=
concept-row-group>row group</a> corresponding to a <code>&=
lt;a href=3D#the-tfoot-element>tfoot</a></code> element, a=
nd
+    the <a href=3D#concept-cell title=3Dconcept-cell>cell</a&gt=
; is in the first <a href=3D#concept-row title=3Dconcept-row>row&lt=
;/a>
+    of the <a href=3D#concept-table title=3Dconcept-table>table&lt=
;/a>.</p>
+
+   </li>
+
+  </ul><p class=3Dnote>In other words, each <a href=3D#co=
ncept-column title=3Dconcept-column>column</a> can have one
+  <a href=3D#sorting-capable-th-element>sorting-capable <code&g=
t;th</code> element</a>; this will be the highest <code&gt=
;<a href=3D#the-th-element>th</a></code> in
+  a <code><a href=3D#the-thead-element>thead</a></c=
ode> that spans no other columns, or, if there is no <code><a=
 href=3D#the-thead-element>thead</a></code>, the
+  <code><a href=3D#the-th-element>th</a></code> =
in the first row (that is not in a <code><a href=3D#the-tfoot-el=
ement>tfoot</a></code>), assuming it spans no
+  columns.</p>
+
+  <p>The <dfn id=3Dsorting-capable-th-elements-of-the-table-ele=
ment>sorting-capable <code>th</code> elements of the <c=
ode>table</code> element</dfn> <var title=3D"&quot=
;>table</var> are the <a href=3D#sorting-capable-th-element t=
itle=3D"sorting-capable th element">sorting-capable
+  <code>th</code> elements</a> whose <a href=3D#con=
cept-cell title=3Dconcept-cell>cell</a>'s <a href=3D#concept-=
table title=3Dconcept-table>table</a> is <var title=3D"&=
quot;>table</var>.</p>
+
+  <p>A <code><a href=3D#the-table-element>table</a&=
gt;</code> element <var title=3D"">table</var&gt=
; is a <dfn id=3Dsorting-capable-table-element>sorting-capable
+  <code>table</code> element</dfn> if there are one or=
 more <a href=3D#sorting-capable-th-elements-of-the-table-element>s=
orting-capable <code>th</code>
+  elements of the <code>table</code> element</a> <v=
ar title=3D"">table</var>.</p>
+
+  <p>A <code><a href=3D#the-th-element>th</a>&lt=
;/code> element is a <dfn id=3Dsorting-enabled-th-element>sortin=
g-enabled <code>th</code> element</dfn> if it is a
+  <a href=3D#sorting-capable-th-element>sorting-capable <code&g=
t;th</code> element</a> and it has a <code title=3Dattr-th=
-sorted><a href=3D#attr-th-sorted>sorted</a></code> =
attribute.</p>
+
+  <p>The <dfn id=3Dsorting-enabled-th-elements-of-the-table-ele=
ment>sorting-enabled <code>th</code> elements of the <c=
ode>table</code> element</dfn> <var title=3D"&quot=
;>table</var> are the <a href=3D#sorting-enabled-th-element t=
itle=3D"sorting-enabled th element">sorting-enabled
+  <code>th</code> elements</a> whose <a href=3D#con=
cept-cell title=3Dconcept-cell>cell</a>'s <a href=3D#concept-=
table title=3Dconcept-table>table</a> is <var title=3D"&=
quot;>table</var>.</p>
+
+  <p>A <code><a href=3D#the-table-element>table</a&=
gt;</code> element <var title=3D"">table</var&gt=
; is a <dfn id=3Dsorting-enabled-table-element>sorting-enabled
+  <code>table</code> element</dfn> if there are one or=
 more <a href=3D#sorting-capable-th-elements-of-the-table-element>s=
orting-capable <code>th</code>
+  elements of the <code>table</code> element</a> <v=
ar title=3D"">table</var>, and at least one of
+  them is a <a href=3D#sorting-enabled-th-element>sorting-enabled =
<code>th</code> element</a> (i.e. at least one has a &l=
t;code title=3Dattr-th-sorted><a href=3D#attr-th-sorted>sorted&l=
t;/a></code> attribute).</p>
+
+  <p>A <code><a href=3D#the-table-element>table</a&=
gt;</code> element is a <dfn id=3Dtable-element-with-a-user-agen=
t-exposed-sorting-interface><code>table</code> element wit=
h a user-agent exposed
+  sorting interface</dfn> if it is a <a href=3D#sorting-capable=
-table-element>sorting-capable <code>table</code> element&=
lt;/a> and has
+  a <code title=3Dattr-table-sortable><a href=3D#attr-table-sor=
table>sortable</a></code> attribute specified.</p>
+
+  <p>A <dfn id=3Dsorting-interface-th-element>sorting interf=
ace <code>th</code> element</dfn> is a <a href=3D#so=
rting-capable-th-element>sorting-capable
+  <code>th</code> element</a> whose <a href=3D#conc=
ept-cell title=3Dconcept-cell>cell</a>'s <a href=3D#concept-t=
able title=3Dconcept-table>table</a> is a <a href=3D#table-el=
ement-with-a-user-agent-exposed-sorting-interface><code>table&lt=
;/code> element with a user-agent exposed
+  sorting interface</a>.</p>
+
+  <hr><p>Each <code><a href=3D#the-table-element&gt=
;table</a></code> element has a <dfn id=3Dcurrently-sortin=
g-flag>currently-sorting flag</dfn>, which must initially
+  be false.</p>
+
+  <hr><p>The <code title=3Dattr-th-sorted><a href=3D=
#attr-th-sorted>sorted</a></code> attribute must not be sp=
ecified on
+  <code><a href=3D#the-th-element>th</a></code> =
elements that are not <a href=3D#sorting-capable-th-element title=3D&q=
uot;sorting-capable th element">sorting-capable
+  <code>th</code> elements</a>. The <code title=3Da=
ttr-table-sortable><a href=3D#attr-table-sortable>sortable</a=
></code> attribute
+  must not be specified on <code><a href=3D#the-table-element&g=
t;table</a></code> elements that are not <a href=3D#sortin=
g-capable-table-element title=3D"sorting-capable
+  table element">sorting-capable <code>table</code> =
elements</a>.</p>
+
+  <div class=3Dimpl>
+
+  <p>To determine a <code><a href=3D#the-th-element>th=
</a></code> element's <code title=3Dattr-th-sorted><=
a href=3D#attr-th-sorted>sorted</a></code> attribute's
+  <a href=3D#column-sort-direction>column sort direction</a>=
 and <a href=3D#column-key-ordinality>column key ordinality</a&g=
t;, user agents must use
+  the following algorithm:</p>
+
+  <ol><li><p>Let <var title=3D"">direc=
tion</var> be <i>normal</i>.</p>
+
+   <li><p>Let <var title=3D"">have explicit =
direction</var> be false.</p>
+
+   <li><p>Let <var title=3D"">ordinality<=
/var> be 1.</p>
+
+   <li><p>Let <var title=3D"">have explicit =
ordinality</var> be false.</p>
+
+   <li><p>Let <var title=3D"">tokens</var=
> be the result of <a href=3D#split-a-string-on-spaces title=3D&quo=
t;split a string on
+   spaces">splitting the attribute's value on spaces</a>.&=
lt;/li>
+
+   <li>
+
+    <p>For each token <var title=3D"">token</va=
r> in <var title=3D"">tokens</var>, run the appr=
opriate
+    steps from the following list:</p>
+
+    <dl class=3Dswitch><dt>If <var title=3D""&g=
t;have explicit direction</var> is false and <var title=3D"=
">token</var> is an
+     <a href=3D#ascii-case-insensitive>ASCII case-insensitive</=
a> match for the string "<code title=3Dattr-th-sorted-reversed=
><a href=3D#attr-th-sorted-reversed>reversed</a></code&=
gt;"</dt>
+
+     <dd>
+
+      <p>Let <var title=3D"">direction</var>=
 be <i>reversed</i> and <var title=3D"">have =
explicit
+      direction</var> be true.</p>
+
+     </dd>
+
+
+     <dt>If <var title=3D"">have explicit ordinali=
ty</var> is false</dt>
+
+     <dd>
+
+      <p><a href=3D#rules-for-parsing-integers title=3D"ru=
les for parsing integers">Parse <var title=3D"">t=
oken</var> as an
+      integer</a>. If this resulted in an error or the value zero,=
 then ignore the token.
+      Otherwise, set <var title=3D"">ordinality</var&=
gt; to the parsed value, and set <var title=3D"">have
+      explicit ordinality</var> to true.</p>
+
+     </dd>
+
+
+     <dt>Otherwise</dt>
+
+     <dd><p>Ignore the token.</dd>
+
+    </dl></li>
+
+   <li><p>The <a href=3D#column-sort-direction>column =
sort direction</a> is the value of <var title=3D"">=
direction</var>, and
+   the <a href=3D#column-key-ordinality>column key ordinality</=
a> is the value of <var title=3D"">ordinality</var&=
gt;.</li>
+
+  </ol></div>
+
+  <p>A <code><a href=3D#the-table-element>table</a&=
gt;</code> must not have two <code><a href=3D#the-th-eleme=
nt>th</a></code> elements whose <code title=3Dattr-th-s=
orted><a href=3D#attr-th-sorted>sorted</a></code> at=
tribute have the same <a href=3D#column-key-ordinality>column key
+  ordinality</a>.</p>
+
+  <div class=3Dimpl>
+
+  <hr><p>The <dfn id=3Dtable-sorting-algorithm>table s=
orting algorithm</dfn>, which is applied to a <code><a hre=
f=3D#the-table-element>table</a></code>, is as
+  follows:</p>
+
+  <ol><li><p>Let <var title=3D"">table=
</var> be the <code><a href=3D#the-table-element>table&=
lt;/a></code> element being sorted.</li>
+
+   <li><p>If <var title=3D"">table</var&g=
t;'s <a href=3D#currently-sorting-flag>currently-sorting flag</a=
> is true, then abort
+   these steps.</li>
+
+   <li><p>Set <var title=3D"">table</var&=
gt;'s <a href=3D#currently-sorting-flag>currently-sorting flag</=
a> to true.</li>
+
+   <li><p><a href=3D#fire-a-simple-event>Fire a simple=
 event</a> named <code title=3Devent-sort>sort</code> t=
hat is
+   cancelable at <var title=3D"">table</var>.</=
li>
+
+   <li><p>If the event fired in the previous step was cancel=
ed, then jump to the step labeled
+   <i>end</i> below.</li>
+
+   <li>
+
+    <p>If <var title=3D"">table</var> is not=
 now a <a href=3D#sorting-enabled-table-element>sorting-enabled &lt=
;code>table</code>
+    element</a>, then jump to the step labeled <i>end</i&=
gt; below.</p>
+
+    <p class=3Dnote>Even if <var title=3D"">table&=
lt;/var> was a <a href=3D#sorting-enabled-table-element>sorting-=
enabled <code>table</code>
+    element</a> when the algorithm was invoked, the DOM might have=
 been entirely changed by the
+    event handlers for the <code title=3Devent-sort>sort</code&=
gt; event, so this has to be verified at
+    this stage, not earlier.</p>
+
+   </li>
+
+   <li><p>Let <var title=3D"">key heading ce=
lls</var> be the <a href=3D#sorting-enabled-th-elements-of-the-t=
able-element>sorting-enabled <code>th</code>
+   elements of the <code>table</code> element</a> <=
var title=3D"">table</var>.</li>
+
+   <li><p>Sort <var title=3D"">key heading c=
ells</var> in ascending order of the <a href=3D#column-key-ordin=
ality>column key
+   ordinality</a> of their <code title=3Dattr-th-sorted><=
a href=3D#attr-th-sorted>sorted</a></code> attributes, wit=
h those
+   having the same <a href=3D#column-key-ordinality>column key ord=
inality</a> being sorted in <a href=3D#tree-order>tree order&=
lt;/a>.</p>
+
+   <li>
+
+    <p>Let <var title=3D"">row collection cursor&l=
t;/var> be a pointer to an element, initially pointing
+    at the first child of <var title=3D"">table</var&=
gt; that is after <var title=3D"">table</var>'s fir=
st
+    <code><a href=3D#the-thead-element>thead</a></c=
ode>, if any, and that is either a <code><a href=3D#the-tbody=
-element>tbody</a></code> or a <code><a href=3D#t=
he-tr-element>tr</a></code>
+    element, assuming there is one. If there is no such child, then jump=
 to the step labeled
+    <i>end</i> below.</p>
+
+   </li>
+
+   <li><p>If <var title=3D"">table</var&g=
t; has no <a href=3D#concept-row-group title=3Dconcept-row-group>ro=
w group</a>
+   corresponding to a <code><a href=3D#the-thead-element>the=
ad</a></code> element, then set <var title=3D""&=
gt;ignore first group</var> to
+   true. Otherwise, set it to false.</li>
+
+   <li><p><i>Row loop</i>: Let <var title=3D&=
quot;">rows</var> be an empty list of <code><a hre=
f=3D#the-tr-element>tr</a></code>
+   elements.</li>
+
+   <li>
+
+    <p>Run the appropriate steps from the following list:</p&gt=
;
+
+    <dl class=3Dswitch><dt>If <var title=3D""&g=
t;row collection cursor</var> points to a <code><a href=3D=
#the-tr-element>tr</a></code> element
+
+     <dd>
+
+      <ol><li><p><i>Collect</i>: Append th=
e element pointed to by <var title=3D"">row collection
+       cursor</var> to <var title=3D"">rows</va=
r>.</li>
+
+       <li><p>If there are no <code><a href=3D#the-=
tr-element>tr</a></code> or <code><a href=3D#the-=
tbody-element>tbody</a></code> children of <var title=3D=
"">table</var> that are later siblings of the element =
pointed to by <var title=3D"">row
+       collection cursor</var>, or if the next such child is a &lt=
;code><a href=3D#the-tbody-element>tbody</a></code> =
element, then jump
+       to the step labeled <i>group</i> below.</li>
+
+       <li><p>Let <var title=3D"">row collec=
tion cursor</var> point to the next <code><a href=3D#the-t=
r-element>tr</a></code> child
+       of <var title=3D"">table</var> that is a la=
ter sibling of the element pointed to by <var title=3D"">=
row collection cursor</var>.</li>
+
+       <li><p>Return to the step labeled <i>collect&lt=
;/i> above.</li>
+
+      </ol></dd>
+
+
+     <dt>If <var title=3D"">row collection cursor&=
lt;/var> points to a <code><a href=3D#the-tbody-element>tb=
ody</a></code> element
+
+     <dd>
+
+      <ol><li><p>Place all the <code><a href=3D=
#the-tr-element>tr</a></code> element children of the elem=
ent pointed to by <var title=3D"">row collection cursor&l=
t;/var> into <var title=3D"">rows</var>, in <=
a href=3D#tree-order>tree
+       order</a>.</li>
+
+       <li><p>If <var title=3D"">rows</va=
r> is empty, jump to the step labeled <i>increment loop</i&gt=
;
+       below.</li>
+
+      </ol></dd>
+
+    </dl></li>
+
+   <li><p><i>Group</i>: Let <var title=3D&quo=
t;">groups</var> be an empty list of groups of <code>=
<a href=3D#the-tr-element>tr</a></code>
+   elements.</li>
+
+   <li><p>Let <var title=3D"">group</var&=
gt; be an empty group of <code><a href=3D#the-tr-element>tr&l=
t;/a></code> elements.</li>
+
+   <li><p>Let <var title=3D"">group cursor&l=
t;/var> be a pointer to an element, initially pointing at the
+   first <code><a href=3D#the-tr-element>tr</a></co=
de> element in <var title=3D"">rows</var>.</l=
i>
+
+   <li><p><i>Start group</i>: Let <var title=3D=
"">pending rows in group</var> be 1.</li>
+
+   <li><p><i>Group loop</i>: Append the <code=
><a href=3D#the-tr-element>tr</a></code> element poi=
nted to by <var title=3D"">group
+   cursor</var> to <var title=3D"">group</var&g=
t;.</li>
+
+   <li><p>If there are any <a href=3D#concept-cell title=3D=
concept-cell>cells</a> whose highest <a href=3D#concept-row t=
itle=3Dconcept-row>row</a>'s element is the one pointed to by &l=
t;var title=3D"">group
+   cursor</var>, then let <var title=3D"">tallest =
height</var> be the number of rows covered by the
+   tallest such <a href=3D#concept-cell title=3Dconcept-cell>cell&=
lt;/a>.</li>
+
+   <li><p>If <var title=3D"">tallest height&=
lt;/var> is greater than <var title=3D"">pending rows =
in
+   group</var> then set <var title=3D"">pending ro=
ws in group</var> to <var title=3D"">tallest
+   height</var>.</li>
+
+   <li><p>Decrement <var title=3D"">pending =
rows in group</var> by one.</li>
+
+   <li><p>Let <var title=3D"">group cursor&l=
t;/var> point to the next <code><a href=3D#the-tr-element>=
tr</a></code> element in <var title=3D"">rows=
</var>, if any; otherwise, let it be null.</li>
+
+   <li><p>If <var title=3D"">group cursor&lt=
;/var> is not null and <var title=3D"">pending rows in
+   group</var> is not zero, return to the step labeled <i>gr=
oup loop</i>.</li>
+
+   <li><p>Append a new group to <var title=3D""=
>groups</var> consisting of the <code><a href=3D#the-tr=
-element>tr</a></code>
+   elements in <var title=3D"">group</var>.</li=
>
+
+   <li><p>Empty <var title=3D"">group</va=
r>.</li>
+
+   <li><p>If <var title=3D"">group cursor&lt=
;/var> is not null, then return to the step labeled <i>start
+   group</i>.</li>
+
+   <li><p>If <var title=3D"">ignore first gr=
oup</var> is true, then drop the first group in <var title=3D&qu=
ot;">groups</var> and set <var title=3D"">i=
gnore first group</var> to false.</li>
+
+   <li><p><i>Drop leading header groups</i>: If =
<var title=3D"">groups</var> is now empty, jump to =
the
+   step labeled <i>increment loop</i> below.</li>
+
+   <!-- if you insert steps here, update the next step -->
+
+   <li><p>If the first group of <var title=3D""=
>groups</var> consists of <code><a href=3D#the-tr-eleme=
nt>tr</a></code> elements
+   whose element children are all <code><a href=3D#the-th-eleme=
nt>th</a></code> elements, then drop the first group in &l=
t;var title=3D"">groups</var> and return to the previo=
us step (labeled <i>drop leading header
+   groups</i>).</li>
+
+   <li><p>Let <var title=3D"">insertion poin=
t</var> be a placeholder in a DOM tree, which can be used
+   to reinsert nodes at a specific point in the DOM. Insert <var titl=
e=3D"">insertion point</var> into
+   the parent of the first <code><a href=3D#the-tr-element>t=
r</a></code> element of the first group in <var title=3D&q=
uot;">groups</var>,
+   immediately before that <code><a href=3D#the-tr-element>t=
r</a></code> element.</li>
+
+   <li>
+
+    <p>Sort the groups in <var title=3D"">groups&l=
t;/var>, using the following algorithm to decide the
+    relative order of any two groups <var title=3D"">a&l=
t;/var> and <var title=3D"">b</var> (the algorit=
hm
+    either returns that <var title=3D"">a</var> co=
mes before <var title=3D"">b</var>, or that <var=
 title=3D"">b</var> comes before <var title=3D&quot=
;">a</var>):</p>
+
+    <ol><li><p>Let <var title=3D"">key=
 index</var> be an index into <var title=3D"">key h=
eading
+     cells</var>, initially denoting the first element in the list=
.</li>
+
+     <li><p>Let <var title=3D"">direction&lt=
;/var> be a sort direction, initially <i>ascending</i>. It=
s
+     other possible value is <i>descending</i>. When <var=
 title=3D"">direction</var> is
+     <i>toggled</i>, that means that if its value is <i&g=
t;ascending</i>, it must be changed to
+     <i>descending</i>, and when its value is <i>desce=
nding</i>, it must be changed to
+     <i>ascending</i>.</li>
+
+     <li><p><i>Column loop</i>: Let <var titl=
e=3D"">th</var> be the <var title=3D""&gt=
;key index</var>th
+     <code><a href=3D#the-th-element>th</a></code&g=
t; in <var title=3D"">key heading cells</var>.</=
li>
+
+     <li><p>If <var title=3D"">th</var&gt=
;'s <code title=3Dattr-th-sorted><a href=3D#attr-th-sorted>so=
rted</a></code> attribute's
+     <a href=3D#column-sort-direction>column sort direction</a&=
gt; is <i>reversed</i>, then toggle <var title=3D"&qu=
ot;>direction</var>.</li>
+
+     <li><p>Let <var title=3D"">tentative or=
der</var> be the result of <a href=3D#comparing-two-row-groups-u=
sing-the-th-element>comparing two row groups
+     using the <code>th</code> element</a> <var tit=
le=3D"">th</var>, with <var title=3D""&gt=
;a</var> and
+     <var title=3D"">b</var> as the rows.</li&g=
t;
+
+     <li><p>If <var title=3D"">tentative ord=
er</var> is not "equal", then jump to the step labeled
+     <i>return</i> below.</li>
+
+     <li><p>Increment <var title=3D"">key in=
dex</var>.</li>
+
+     <li><p>If <var title=3D"">key index<=
/var> still denotes a <code><a href=3D#the-th-element>th&l=
t;/a></code> element in <var title=3D"">key head=
ing cells</var>, then jump back to the step above labeled <i>=
column
+     loop</i>.</li>
+
+     <li><p>If <var title=3D"">a</var>=
's <code><a href=3D#the-tr-element>tr</a></code> =
elements precede <var title=3D"">b</var>'s in
+     <a href=3D#tree-order>tree order</a>, then let <var =
title=3D"">tentative order</var> be "a before b&q=
uot;.
+     Otherwise, let <var title=3D"">tentative order</=
var> be "b before a".</li>
+
+     <li><p><i>Return</i>: Return the relative o=
rder given by the matching option from the following
+     list:</p>
+
+      <dl class=3Dswitch><dt>If <var title=3D""=
>direction</var> is <i>ascending</i> and <var tit=
le=3D"">tentative
+       order</var> is "a before b"</dt>
+
+       <dd>Return that <var title=3D"">a</var&g=
t; comes before <var title=3D"">b</var>.</dd>
+
+
+       <dt>If <var title=3D"">direction</var&gt=
; is <i>ascending</i> and <var title=3D"">ten=
tative
+       order</var> is "b before a"</dt>
+
+       <dd>Return that <var title=3D"">b</var&g=
t; comes before <var title=3D"">a</var>.</dd>
+
+
+       <dt>If <var title=3D"">direction</var&gt=
; is <i>descending</i> and <var title=3D"">te=
ntative
+       order</var> is "a before b"</dt>
+
+       <dd>Return that <var title=3D"">b</var&g=
t; comes before <var title=3D"">a</var>.</dd>
+
+
+       <dt>If <var title=3D"">direction</var&gt=
; is <i>descending</i> and <var title=3D"">te=
ntative
+       order</var> is "b before a"</dt>
+
+       <dd>Return that <var title=3D"">a</var&g=
t; comes before <var title=3D"">b</var>.</dd>
+
+      </dl></li>
+
+    </ol><p>When the user agent is required to <dfn id=3D=
comparing-two-row-groups-using-the-th-element title=3D"comparing two=
 row groups using the th
+    element">compare two row groups using the <code>th<=
/code> element</dfn> <var title=3D"">th</var&=
gt;,
+    with <var title=3D"">a</var> and <var title=
=3D"">b</var> being the two row groups respectively, t=
he
+    user agent must run the following steps:</p>
+
+    <ol><li><p>Let <var title=3D"">x&l=
t;/var> be the <var title=3D"">x</var>-coordinat=
e of the slots that
+     <code><a href=3D#the-th-element>th</a></code&g=
t; covers in its <a href=3D#concept-table title=3Dconcept-table>tab=
le</a>.</li>
+
+     <li>
+
+      <p>Let <var title=3D"">cell<sub title=3D&=
quot;">a</sub></var> be the element corresponding to =
the <a href=3D#concept-cell title=3Dconcept-cell>cell</a> in =
the first <a href=3D#concept-row title=3Dconcept-row>row</a> =
of group
+      <var title=3D"">a</var> that covers the slot=
 in that <a href=3D#concept-row title=3Dconcept-row>row</a> w=
hose
+      <var title=3D"">x</var>-coordinate is <va=
r title=3D"">x</var>.</p>
+
+      <p>Let <var title=3D"">cell<sub title=3D&=
quot;">b</sub></var> be the element corresponding to =
the <a href=3D#concept-cell title=3Dconcept-cell>cell</a> in =
the first <a href=3D#concept-row title=3Dconcept-row>row</a> =
of group
+      <var title=3D"">b</var> that covers the slot=
 in that <a href=3D#concept-row title=3Dconcept-row>row</a> w=
hose
+      <var title=3D"">x</var>-coordinate is <va=
r title=3D"">x</var>.</p>
+
+      <!-- there can't be two cells that cover the slot, unusually, b=
ecause the only way that can
+      happen is if there's a cell that's extended into this row from abo=
ve, and the groups, by
+      virtue of the way they are created above, never have cells that ex=
tend into them from above.
+      -->
+
+      <p>In either case, if there's no <a href=3D#concept-cell =
title=3Dconcept-cell>cell</a> that actually covers
+      the slot, then use the value <i>null</i> instead.</=
p>
+
+     </li>
+
+     <li>
+
+      <p>Let <var title=3D"">type<sub title=3D&=
quot;">a</sub></var> and <var title=3D""=
>value<sub title=3D"">a</sub></var> be
+      the <a href=3D#type-and-value-of-the-cell>type and value of =
the cell</a> <var title=3D"">cell<sub title=3D&q=
uot;">a</sub></var>, as defined
+      below.</p>
+
+      <p>Let <var title=3D"">type<sub title=3D&=
quot;">b</sub></var> and <var title=3D""=
>value<sub title=3D"">b</sub></var> be
+      the <a href=3D#type-and-value-of-the-cell>type and value of =
the cell</a> <var title=3D"">cell<sub title=3D&q=
uot;">b</sub></var>, as defined
+      below.</p>
+
+      <p>The <dfn id=3Dtype-and-value-of-the-cell>type and v=
alue of the cell</dfn> <var title=3D"">cell</var=
> are computed as follows.</p>
+
+      <ol><li><p>If <var title=3D"">ce=
ll</var> is <i>null</i>, then the type is "string&=
quot; and the value is
+       the empty string; abort these steps.</li>
+
+       <li><p>If, ignoring <a href=3D#inter-element-white=
space>inter-element whitespace</a> and nodes other than
+       <a href=3D#element>Element</a> and <a href=3D#text=
>Text</a> nodes, <var title=3D"">cell</var&gt=
; has only one child
+       and that child is a <code><a href=3D#the-data-element&gt=
;data</a></code> element, then the value is the value of that
+       <code><a href=3D#the-data-element>data</a></=
code> element's <code title=3Dattr-data-value><a href=3D#attr=
-data-value>value</a></code> attribute, if there is
+       one, or the empty string otherwise; the type is "string&quot=
;.</p>
+
+       <li><p>If, ignoring <a href=3D#inter-element-white=
space>inter-element whitespace</a> and nodes other than
+       <a href=3D#element>Element</a> and <a href=3D#text=
>Text</a> nodes, <var title=3D"">cell</var&gt=
; has only one child
+       and that child is a <code><a href=3D#the-progress-elemen=
t>progress</a></code> element, then the value is the value=
 of that
+       <code><a href=3D#the-progress-element>progress</a&=
gt;</code> element's <code title=3Dattr-progress-value><a =
href=3D#attr-progress-value>value</a></code> attribute, if
+       there is one, or the empty string otherwise; the type is "st=
ring".</p>
+
+       <li><p>If, ignoring <a href=3D#inter-element-white=
space>inter-element whitespace</a> and nodes other than
+       <a href=3D#element>Element</a> and <a href=3D#text=
>Text</a> nodes, <var title=3D"">cell</var&gt=
; has only one child
+       and that child is a <code><a href=3D#the-meter-element&g=
t;meter</a></code> element, then the value is the value of th=
at
+       <code><a href=3D#the-meter-element>meter</a>&lt=
;/code> element's <code title=3Dattr-meter-value><a href=3D#a=
ttr-meter-value>value</a></code> attribute, if there is
+       one, or the empty string otherwise; the type is "string&quot=
;.</p>
+
+       <li>
+
+        <p>If, ignoring <a href=3D#inter-element-whitespace>=
inter-element whitespace</a> and nodes other than
+        <a href=3D#element>Element</a> and <a href=3D#tex=
t>Text</a> nodes, <var title=3D"">cell</var&g=
t; has only one
+        child and that child is a <code><a href=3D#the-time-ele=
ment>time</a></code> element, then the value is the
+        <a href=3D"#machine-readable-equivalent-of-the-element's=
-contents">machine-readable equivalent of the element's contents&=
lt;/a>, if any, and the type is
+        the kind of value that is thus obtained
+       (a <a href=3D#concept-month title=3Dconcept-month>month<=
/a>,
+        a <a href=3D#concept-date title=3Dconcept-date>date</a&=
gt;,
+        a <a href=3D#concept-yearless-date title=3Dconcept-yearless-d=
ate>yearless date</a>,
+        a <a href=3D#concept-time title=3Dconcept-time>time</a&=
gt;,
+        a <a href=3D#concept-datetime-local title=3Dconcept-datetime-=
local>local date and time</a>,
+        a <a href=3D#concept-timezone title=3Dconcept-timezone>tim=
e-zone offset</a>,
+        a <a href=3D#concept-datetime title=3Dconcept-datetime>glo=
bal date and time</a>,
+        a <a href=3D#concept-week title=3Dconcept-week>week</a&=
gt;,
+        a year, or
+        a <a href=3D#concept-duration title=3Dconcept-duration>dur=
ation</a>);
+        abort these steps after completing this one.</p>
+
+        <p>If there is no machine-readable equivalent, then the ty=
pe is "string" and the value is
+        the empty string.</p>
+
+        <p>If the type is
+        a <a href=3D#concept-month title=3Dconcept-month>month<=
/a>,
+        a <a href=3D#concept-date title=3Dconcept-date>date</a&=
gt;,
+        a <a href=3D#concept-week title=3Dconcept-week>week</a&=
gt;, or
+        a year,
+        then change the value to be the instant in time (with no time zo=
ne) that describes the
+        earliest moment that the value represents, and change the type t=
o be
+        a <a href=3D#concept-datetime-local title=3Dconcept-datetime-=
local>local date and time</a>.</p>
+
+        <p class=3Dexample>For example, if the cell was
+        <code><td><time>2011-11&lt=
;/time></code> then for sorting purposes the value is
+        interpreted as "2011-11-01T00:00:00.000" and the type =
is treated as a <a href=3D#concept-datetime-local title=3Dconcept-date=
time-local>local date and time</a> rather than a <a href=3D#c=
oncept-month title=3Dconcept-month>month</a>.</p>
+
+        <p class=3Dexample>Similarly, if the cell was <code>=
<td><time
+        datetime=3D"2014">MMXIV</time>&lt=
;/code> then for sorting purposes the value is interpreted as
+        "2014-01-01T00:00:00.000" and the type is treated as a=
 <a href=3D#concept-datetime-local title=3Dconcept-datetime-local>l=
ocal date and time</a> rather than a year.</p>
+
+       </li>
+
+       <li><p>The value is the element's <code><a h=
ref=3D#textcontent>textContent</a></code>. The type is &qu=
ot;string".</li>
+
+      </ol></li>
+
+     <li>
+
+      <p>If <var title=3D"">type<sub title=3D&q=
uot;">a</sub></var> and <var title=3D""&=
gt;type<sub title=3D"">b</sub></var> are not
+      equal, then: return "a before b" if <var title=3D&quo=
t;">type<sub title=3D"">a</sub></var>=
 is earlier in the
+      following list than <var title=3D"">type<sub ti=
tle=3D"">b</sub></var>, otherwise, return "=
b before a";
+      then, abort these steps.</p>
+
+      <ol class=3Dbrief><li><a href=3D#concept-time title=
=3Dconcept-time>time</a></li>
+       <li><a href=3D#concept-yearless-date title=3Dconcept-yea=
rless-date>yearless date</a></li>
+       <li><a href=3D#concept-datetime-local title=3Dconcept-da=
tetime-local>local date and time</a></li>
+       <li><a href=3D#concept-datetime title=3Dconcept-datetime=
>global date and time</a></li>
+       <li><a href=3D#concept-timezone title=3Dconcept-timezone=
>time-zone offset</a></li>
+       <li><a href=3D#concept-duration title=3Dconcept-duration=
>duration</a></li>
+       <li>"string"</li>
+      </ol></li>
+
+     <li><p>If <var title=3D"">value<sub =
title=3D"">a</sub></var> and <var title=3D&qu=
ot;">value<sub title=3D"">b</sub></var&g=
t; are
+     equal, then return "equal" and abort these steps.</li&=
gt;
+
+     <li>
+
+      <p>If <var title=3D"">type<sub title=3D&q=
uot;">a</sub></var> and <var title=3D""&=
gt;type<sub title=3D"">b</sub></var> are not
+      "string", then: if <var title=3D"">value=
<sub title=3D"">a</sub></var> is earlier than=
 <var title=3D"">value<sub title=3D"">b&l=
t;/sub></var> then return "a before b" and abort these=
 steps, otherwise,
+      return "b before a" and abort these steps.</p>
+
+      <p>Values sort in their natural order, with the following ad=
ditional constraints:</p>
+
+      <p>For <a href=3D#concept-time title=3Dconcept-time>ti=
me</a> values, 00:00:00.000 is the earliest value and
+      23:59:59.999 is the latest value.</p>
+
+      <p>For <a href=3D#concept-yearless-date title=3Dconcept-y=
earless-date>yearless date</a> values, 01-01 is the earliest
+      value and 12-31 is the latest value; 02-28 is earlier than 02-29 w=
hich is earlier than
+      03-01.</p>
+
+      <p>Values that are <a href=3D#concept-datetime-local titl=
e=3Dconcept-datetime-local>local date and time</a> compare as
+      if they were in the same time zone.</p>
+
+      <!-- no ambiguity for <span title=3D"concept-datetime&q=
uot;>global date and time</span> -->
+
+      <p>For <a href=3D#concept-timezone title=3Dconcept-timezo=
ne>time-zone offset</a> values, -23:59 is the earliest
+      value and +23:59 is the latest value.</p>
+
+      <!-- MONTHS: <span title=3D"concept-duration">d=
uration</span> is unambiguous until we add months -->
+
+     </li>
+
+     <!-- At this point we know that they are both strings and they'r=
e not equal. -->
+
+     <li>
+
+      <p>Let <var title=3D"">components<sub tit=
le=3D"">a</sub></var> be the result of <a hre=
f=3D#parsing-the-sort-key>parsing the sort
+      key</a> <var title=3D"">value<sub title=3D=
"">a</sub></var>.</p>
+
+      <p>Let <var title=3D"">components<sub tit=
le=3D"">b</sub></var> be the result of <a hre=
f=3D#parsing-the-sort-key>parsing the sort
+      key</a> <var title=3D"">value<sub title=3D=
"">b</sub></var>.</p>
+
+      <p>As described below, <var title=3D"">compo=
nents<sub title=3D"">a</sub></var> and <va=
r title=3D"">components<sub title=3D"">b<=
/sub></var> are tuples consisting of a list of <var title=3D&=
quot;">n</var>
+      <i>numbers</i>, a list of <var title=3D""=
>n</var> <i>number strings</i>, a list of <var ti=
tle=3D"">n</var>+1 <i>non-numeric strings</i&=
gt;, and a list of 2<var title=3D"">n</var>+1 <i=
>raw
+      strings</i>, for any non-negative integer value of <var t=
itle=3D"">n</var> (zero or more).</p>
+
+     </li>
+
+     <li>
+
+      <p>Let <var title=3D"">order</var> be =
the result of a <a href=3D#locale-specific-string-comparison>locale=
-specific string
+      comparison</a> of <var title=3D"">components=
<sub title=3D"">a</sub></var>'s first <i&g=
t;non-numeric
+      string</i> and <var title=3D"">components&lt=
;sub title=3D"">b</sub></var>'s first <i>n=
on-numeric string</i>,
+      in the context of <var title=3D"">th</var>.&=
lt;/p>
+
+      <p>If <var title=3D"">order</var> is n=
ot "equal" then return <var title=3D"">order&lt=
;/var> and abort
+      these steps.</p>
+
+     </li>
+
+     <li>
+
+      <p>If <var title=3D"">components<sub titl=
e=3D"">a</sub></var> and <var title=3D"&=
quot;>components<sub title=3D"">b</sub></var&=
gt; both have exactly one <i>number</i>, then run these
+      substeps:</p>
+
+      <ol><li>
+
+        <p>If <var title=3D"">components<sub ti=
tle=3D"">a</sub></var>'s <i>number</i&g=
t; is less than <var title=3D"">components<sub title=3D=
"">b</sub></var>'s <i>number</i>, re=
turn "a before b".</p>
+
+        <p>If <var title=3D"">components<sub ti=
tle=3D"">b</sub></var>'s <i>number</i&g=
t; is less than <var title=3D"">components<sub title=3D=
"">a</sub></var>'s <i>number</i>, re=
turn "b before a".</p>
+
+       </li>
+
+       <li>
+
+        <p>Let <var title=3D"">order</var> b=
e the result of a <a href=3D#locale-specific-string-comparison>loca=
le-specific string
+        comparison</a> of <var title=3D"">componen=
ts<sub title=3D"">a</sub></var>'s second <=
i>non-numeric
+        string</i> and <var title=3D"">components&=
lt;sub title=3D"">b</sub></var>'s second <i&g=
t;non-numeric
+        string</i>, in the context of <var title=3D""=
>th</var>.</p>
+
+        <p>If <var title=3D"">order</var> is=
 not "equal" then return <var title=3D"">order&=
lt;/var> and
+        abort these steps.</p>
+
+       </li>
+
+       <li>
+
+        <p>Let <var title=3D"">order</var> b=
e the result of a <a href=3D#locale-specific-string-comparison>loca=
le-specific string
+        comparison</a> of <var title=3D"">componen=
ts<sub title=3D"">a</sub></var>'s <i>nu=
mber string</i> and
+        <var title=3D"">components<sub title=3D"=
">b</sub></var>'s <i>number string</i>, i=
n the context of <var title=3D"">th</var>.</p&gt=
;
+
+        <p>If <var title=3D"">order</var> is=
 not "equal" then return <var title=3D"">order&=
lt;/var> and
+        abort these steps.</p>
+
+       </li>
+
+      </ol><p>Otherwise, run these substeps:</p>
+
+      <ol><li>
+
+        <p>If <var title=3D"">components<sub ti=
tle=3D"">a</sub></var> has zero <i>numbers=
</i> but <var title=3D"">components<sub title=3D=
"">b</sub></var> has more than zero <i>num=
bers</i>, return "a before
+        b".</p>
+
+        <p>If <var title=3D"">components<sub ti=
tle=3D"">b</sub></var> has zero <i>numbers=
</i> but <var title=3D"">components<sub title=3D=
"">a</sub></var> has more than zero <i>num=
bers</i>, return "b before
+        a".</p>
+
+       </li>
+
+       <li>
+
+        <!-- either an=3Dbn=3D0, an=3D1 bn>1, bn=3D1 an>1, or a=
n and bn > 1. -->
+
+        <p>If <var title=3D"">components<sub ti=
tle=3D"">a</sub></var> has one <i>number&l=
t;/i>, return "a before
+        b".</p>
+
+        <p>If <var title=3D"">components<sub ti=
tle=3D"">b</sub></var> has one <i>number&l=
t;/i>, return "b before
+        a".</p>
+
+       </li>
+
+       <li>
+
+        <!-- either an=3Dbn=3D0, or an and bn > 1. -->
+
+        <p>If <var title=3D"">components<sub ti=
tle=3D"">a</sub></var> and <var title=3D&quot=
;">components<sub title=3D"">b</sub></va=
r> have more than one <i>number</i>, run these substeps:&l=
t;/p>
+
+        <ol><li><p>Let <var title=3D""&gt=
;count</var> be the smaller of the number of <i>numbers</i=
> in <var title=3D"">components<sub title=3D"&=
quot;>a</sub></var> and the number of <i>numbers<=
/i> in <var title=3D"">components<sub title=3D&quot=
;">b</sub></var>.</li>
+
+         <li><p>For each <i>number</i> in <va=
r title=3D"">components<sub title=3D"">a<=
/sub></var> and <var title=3D"">components<su=
b title=3D"">b</sub></var> from the first to the=
 <var title=3D"">count</var>th, in
+         order: if <var title=3D"">components<sub tit=
le=3D"">a</sub></var>'s <i>number</i&gt=
; is less than <var title=3D"">components<sub title=3D=
"">b</sub></var>'s <i>number</i>, th=
en return "a before b" and abort
+         these steps; otherwise, if <var title=3D"">comp=
onents<sub title=3D"">b</sub></var>'s <i&g=
t;number</i> is
+         less than <var title=3D"">components<sub tit=
le=3D"">a</sub></var>'s <i>number</i&gt=
;, return "b before a"
+         and abort these steps.</li>
+
+         <li>
+
+          <p>If <var title=3D"">components<sub =
title=3D"">a</sub></var> has fewer <i>numb=
ers</i> than <var title=3D"">components<sub titl=
e=3D"">b</sub></var>, return "a before b&qu=
ot; and abort these steps.</p>
+
+          <p>If <var title=3D"">components<sub =
title=3D"">b</sub></var> has fewer <i>numb=
ers</i> than <var title=3D"">components<sub titl=
e=3D"">a</sub></var>, return "b before a&qu=
ot; and abort these steps.</p>
+
+         </li>
+
+         <!-- at this point, we know /a/ and /b/ have the same number=
 of components -->
+
+         <li><p>Let <var title=3D"">index&lt=
;/var> be zero.</li>
+
+         <li>
+
+          <p><i>String loop</i>: Let <var title=3D&=
quot;">order</var> be the result of a <a href=3D#locale-=
specific-string-comparison>locale-specific
+          string comparison</a> of <var title=3D""&gt=
;components<sub title=3D"">a</sub></var>'s &l=
t;var title=3D"">index</var>th <i>number string&=
lt;/i> and <var title=3D"">components<sub title=3D&=
quot;">b</sub></var>'s <var title=3D""&g=
t;index</var>th <i>number string</i>,
+          in the context of <var title=3D"">th</var&g=
t;.</p>
+
+          <p>If <var title=3D"">order</var> =
is not "equal" then return <var title=3D"">orde=
r</var> and
+          abort these steps.</p>
+
+         </li>
+
+         <li>
+
+          <p>Increment <var title=3D"">index</v=
ar>.</p>
+
+         </li>
+
+         <li>
+
+          <p>Let <var title=3D"">order</var>=
 be the result of a <a href=3D#locale-specific-string-comparison>lo=
cale-specific string
+          comparison</a> of <var title=3D"">compon=
ents<sub title=3D"">a</sub></var>'s <var t=
itle=3D"">index</var>th <i>separator string</=
i> and <var title=3D"">components<sub title=3D&quot=
;">b</sub></var>'s <var title=3D"">in=
dex</var>th <i>separator
+          string</i>, in the context of <var title=3D"&quo=
t;>th</var>.</p>
+
+          <p>If <var title=3D"">order</var> =
is not "equal" then return <var title=3D"">orde=
r</var> and
+          abort these steps.</p>
+
+         </li>
+
+         <li>
+
+          <p>If <var title=3D"">index</var> =
is less than the number of <i>numbers</i> in <var title=3D=
"">components<sub title=3D"">a</sub>&l=
t;/var> and <var title=3D"">components<sub title=3D=
"">b</sub></var>, return
+          to the step labeled <i>string loop</i>.</p>
+
+         </li>
+
+        </ol></li>
+
+      </ol></li>
+
+     <li>
+
+      <!-- at this point, we know /a/ and /b/ have the same number of=
 components -->
+
+      <p>Let <var title=3D"">index</var> be =
zero.</p>
+
+     </li>
+
+     <li>
+
+      <p><i>Final loop:</i> Let <var title=3D"=
">order</var> be the result of a <a href=3D#raw-string-c=
omparison>raw string
+      comparison</a> of <var title=3D"">components=
<sub title=3D"">a</sub></var>'s <var title=
=3D"">n</var>th
+      <i>raw string</i> and <var title=3D"">=
components<sub title=3D"">b</sub></var>'s &lt=
;var title=3D"">n</var>th
+      <i>raw string</i>.</p>
+
+      <p>If <var title=3D"">order</var> is n=
ot "equal" then return <var title=3D"">order&lt=
;/var> and abort
+      these steps.</p>
+
+     </li>
+
+     <li>
+
+      <p>Increment <var title=3D"">index</var&g=
t;.</p>
+
+     </li>
+
+     <li>
+
+      <p>If <var title=3D"">index</var> is l=
ess than the number of <i>raw strings</i> in <var title=3D=
"">components<sub title=3D"">a</sub>&l=
t;/var> and <var title=3D"">components<sub title=3D=
"">b</sub></var>, return
+      to the step labeled <i>final loop</i>.</p>
+
+     </li>
+
+     <li>
+
+      <p>Return "equal".</p>
+
+     </li>
+
+    </ol></li>
+
+
+   <li><p>Let <var title=3D"">new order</=
var> be a list of <code><a href=3D#the-tr-element>tr</a=
></code> elements consisting of the
+   <code><a href=3D#the-tr-element>tr</a></code>=
 elements of all the groups in the newly ordered <var title=3D"&q=
uot;>groups</var>, with
+   the <code><a href=3D#the-tr-element>tr</a></code=
> elements being in the same order as the groups to which they belong =
are in
+   <var title=3D"">groups</var>, and the <code&=
gt;<a href=3D#the-tr-element>tr</a></code> elements wit=
hin each such group themselves
+   being ordered in <a href=3D#tree-order>tree order</a>.&lt=
;/li>
+
+   <li><p><a href=3D#concept-node-remove title=3Dconcept-=
node-remove>Remove</a> all the <code><a href=3D#the-tr-=
element>tr</a></code> elements in <var title=3D"&q=
uot;>new order</var> from their parents, in <a href=3D#tree-o=
rder>tree order</a>.</li>
+
+   <li><p><a href=3D#concept-node-insert title=3Dconcept-=
node-insert>Insert</a> all the <code><a href=3D#the-tr-=
element>tr</a></code> elements in <var title=3D"&q=
uot;>new order</var> into the DOM at the location of <var tit=
le=3D"">insertion point</var>, in
+   the order these elements are found in <var title=3D""&gt=
;new order</var>.</li>
+
+   <!-- done with this set of rows -->
+
+   <li><p>Remove <var title=3D"">insertion p=
oint</var> from the DOM.</li>
+
+   <li><p><i>Increment loop</i>: If there are no=
 <code><a href=3D#the-tr-element>tr</a></code> or=
 <code><a href=3D#the-tbody-element>tbody</a></code&=
gt; children of
+   <var title=3D"">table</var> that are later sibl=
ings of the element pointed to by <var title=3D"">row
+   collection cursor</var>, then jump to the step labeled <i&gt=
;end</i> below.</li>
+
+   <li><p>Let <var title=3D"">row collection=
 cursor</var> point to the next <code><a href=3D#the-tr-el=
ement>tr</a></code> or
+   <code><a href=3D#the-tbody-element>tbody</a></co=
de> child of <var title=3D"">table</var> that is=
 a later sibling of the element
+   pointed to by <var title=3D"">row collection cursor&l=
t;/var>.</li>
+
+   <li><p>Return to the step labeled <i>row loop</i=
> above.</li>
+
+   <li><p><i>End</i>: Set <var title=3D"=
">table</var>'s <a href=3D#currently-sorting-flag>cur=
rently-sorting flag</a> to
+   false.</li>
+
+  </ol><p>When a user agent is to <dfn id=3Dparsing-the-s=
ort-key title=3D"parsing the sort key">parse the sort key&lt=
;/dfn> <var title=3D"">value</var>, it must run =
the following steps. These return a tuple consisting of a list
+  of <var title=3D"">n</var> <i>numbers</=
i>, a list of <var title=3D"">n</var> <i>n=
umber strings</i>, a
+  list of <var title=3D"">n</var>+1 <i>non-n=
umeric strings</i>, and a list of 2<var title=3D"">=
n</var>+1
+  <i>raw strings</i>, respectively, for any non-negative int=
eger value of <var title=3D"">n</var> (zero or
+  more).</p>
+
+  <ol><li>
+    <p>Let <var title=3D"">raw strings</var>=
 be a list of strings initially containing just one entry, an empty strin=
g.</p>
+   </li>
+
+   <li>
+    <p>Let <var title=3D"">negatives prejudiced&lt=
;/var> be false.</p>
+    <p>Let <var title=3D"">decimals prejudiced<=
/var> be false.</p>
+    <p>Let <var title=3D"">exponents prejudiced&lt=
;/var> be false.</p>
+   </li>
+
+   <li>
+    <p>Let <var title=3D"">buffer</var> be t=
he empty string.</p>
+    <p>Let <var title=3D"">index</var> be ze=
ro.</p>
+    <p>Let <var title=3D"">mode</var> be &qu=
ot;<a href=3D#sort-parser-mode:-separator title=3D"sort parser mo=
de: separator">separator</a>".</p>
+
+    <p>When a subsequent step in this algorithm says to <dfn id=
=3Dsort-parser-push-the-buffer title=3D"sort parser push the
+    buffer">push the buffer</dfn>, the user agent must run=
 the following substeps:</p>
+
+    <ol><li><p>Add an entry to <var title=3D"&=
quot;>raw strings</var> that consists of the value of <var ti=
tle=3D"">buffer</var>.</li>
+
+     <li><p>Add an entry to <var title=3D"">=
raw strings</var> that is the empty string.</li>
+
+     <li><p>Decrement <var title=3D"">index&=
lt;/var> by one.</li>
+
+     <li><p>Set <var title=3D"">mode</var=
> to "<a href=3D#sort-parser-mode:-separator title=3D"sor=
t parser mode: separator">separator</a>".</li>
+
+    </ol></li>
+
+   <li>
+    <p>Let <var title=3D"">checkpoint buffer</v=
ar> be the empty string.</p> <!-- actual value doesn't matter=
; it won't be used -->
+    <p>Let <var title=3D"">checkpoint index</va=
r> be zero.</p> <!-- actual value doesn't matter; it won't be=
 used -->
+
+    <p>When a subsequent step in this algorithm says to <dfn id=
=3Dsort-parser-checkpoint title=3D"sort parser
+    checkpoint">checkpoint</dfn>, the user agent must run =
the following substeps:</p>
+
+    <ol><li><p>Set the <var title=3D""&gt=
;checkpoint buffer</var> to the value of <var title=3D"&quo=
t;>buffer</var>.</p>
+     <li><p>Set the <var title=3D"">checkpoi=
nt index</var> to the value of <var title=3D"">inde=
x</var>.</p>
+    </ol><p>When a subsequent step in this algorithm says to=
 <dfn id=3Dsort-parser-push-the-checkpoint title=3D"sort parser p=
ush the
+    checkpoint">push the checkpoint</dfn>, the user agent =
must run the following substeps:</p>
+
+    <ol><li><p>Add an entry to <var title=3D"&=
quot;>raw strings</var> that consists of the value of <var ti=
tle=3D"">checkpoint buffer</var>.</li>
+
+     <li><p>Add an entry to <var title=3D"">=
raw strings</var> that is the empty string.</li>
+
+     <li><p>Decrement <var title=3D"">index&=
lt;/var> by one.</li>
+
+     <li><p>Set <var title=3D"">mode</var=
> to "<a href=3D#sort-parser-mode:-separator title=3D"sor=
t parser mode: separator">separator</a>".</li>
+
+    </ol></li>
+
+   <li>
+
+    <p>Run through the following steps repeatedly until the condit=
ion in the last step is met.</p>
+
+    <ol><li>
+
+      <p><i>Top of loop</i>: If <var title=3D"=
">index</var> is equal to or greater than the number of
+      characters in <var title=3D"">value</var>, l=
et <var title=3D"">c</var> be EOF. Otherwise, let &=
lt;var title=3D"">c</var> be the <var title=3D&quot=
;">index</var>th character in <var title=3D""&=
gt;value</var>.</p>
+
+     </li>
+
+     <li>
+
+      <p>Run the appropriate steps from the following list:</p&=
gt;
+
+      <dl class=3Dswitch><dt>If <var title=3D"sort p=
arser mode">mode</var> is "<dfn id=3Dsort-parser-mo=
de:-separator title=3D"sort parser mode: separator">separato=
r</dfn>"</dt>
+       <dd>
+        <p>Run the appropriate substeps from the following list:&l=
t;/p>
+        <dl class=3Dswitch><dt>If <var title=3D"&quo=
t;>c</var> is a <a href=3D#space-character>space character=
</a></dt>
+         <dd>
+          <p>Set <var title=3D"">negatives prejudi=
ced</var> to false.</p>
+          <p>Set <var title=3D"">decimals prejudic=
ed</var> to false.</p>
+          <p>Set <var title=3D"">exponents prejudi=
ced</var> to false.</p>
+          <p>Append <var title=3D"">c</var> =
to the last entry in <var title=3D"">raw strings</var&=
gt;.</p>
+         </dd>
+         <dt>If <var title=3D"">c</var> is a=
 U+002D HYPHEN-MINUS character (-) and <var title=3D"">ne=
gatives prejudiced</var> is false</dt>
+         <dd>
+          <p>Set <var title=3D"">buffer</var&gt=
; to the value of <var title=3D"">c</var>.</p&gt=
;
+          <p>Set <var title=3D"sort parser mode">m=
ode</var> to "<a href=3D#sort-parser-mode:-negative title=3D=
"sort parser mode: negative">negative</a>".</p=
>
+         </dd>
+         <dt>If <var title=3D"">c</var> is a=
 U+002E FULL STOP character (.) and <var title=3D"">decim=
als prejudiced</var> is false</dt>
+         <dd>
+          <p>Set <var title=3D"">buffer</var&gt=
; to the value of <var title=3D"">c</var>.</p&gt=
;
+          <p>Set <var title=3D"sort parser mode">m=
ode</var> to "<a href=3D#sort-parser-mode:-leading-decimal =
title=3D"sort parser mode: leading-decimal">leading-decimal&=
lt;/a>".</p>
+         </dd>
+         <dt>If <var title=3D"">c</var> is a=
n <a href=3D#ascii-digits title=3D"ASCII digits">ASCII di=
git</a></dt>
+         <dd>
+          <p>Set <var title=3D"">buffer</var&gt=
; to the value of <var title=3D"">c</var>.</p&gt=
;
+          <p>Set <var title=3D"sort parser mode">m=
ode</var> to "<a href=3D#sort-parser-mode:-integral title=3D=
"sort parser mode: integral">integral</a>".</p=
>
+         </dd>
+         <dt>If <var title=3D"">c</var> is a=
n <a href=3D#uppercase-ascii-letters title=3D"uppercase ASCII let=
ters">uppercase ASCII letter</a> or a <a href=3D#lowerca=
se-ascii-letters title=3D"lowercase ASCII letters">lowercase=
 ASCII letter</a></dt>
+         <dd>
+          <p>Set <var title=3D"">exponents prejudi=
ced</var> to true.</p>
+          <p>Append <var title=3D"">c</var> =
to the last entry in <var title=3D"">raw strings</var&=
gt;.</p>
+         </dd>
+         <dt>If <var title=3D"">c</var> is E=
OF</dt>
+         <dd>
+          <p>Do nothing.</p>
+         </dd>
+         <dt>Otherwise</dt>
+         <dd>
+          <p>Append <var title=3D"">c</var> =
to the last entry in <var title=3D"">raw strings</var&=
gt;.</p>
+         </dd>
+        </dl></dd>
+       <dt>If <var title=3D"sort parser mode">mode=
</var> is "<dfn id=3Dsort-parser-mode:-negative title=3D&qu=
ot;sort parser mode: negative">negative</dfn>"</dt&=
gt;
+       <dd>
+        <p>Run the appropriate substeps from the following list:&l=
t;/p>
+        <dl class=3Dswitch><dt>If <var title=3D"&quo=
t;>c</var> is a U+002D HYPHEN-MINUS character (-)</dt>
+         <dd>
+          <p>Set <var title=3D"">negatives prejudi=
ced</var> to true.</p>
+          <p>Append <var title=3D"">buffer</var=
> to the last entry in <var title=3D"">raw strings<=
/var>.</p>
+          <p>Append <var title=3D"">c</var> =
to the last entry in <var title=3D"">raw strings</var&=
gt;.</p>
+          <p>Set <var title=3D"sort parser mode">m=
ode</var> to "<a href=3D#sort-parser-mode:-separator title=3D=
"sort parser mode: separator">separator</a>".<=
/p>
+         </dd>
+         <dt>If <var title=3D"">c</var> is a=
 U+002E FULL STOP character (.) and <var title=3D"">decim=
als prejudiced</var> is false</dt>
+         <dd>
+          <p>Append <var title=3D"">c</var> =
to <var title=3D"">buffer</var>.</p>
+          <p>Set <var title=3D"sort parser mode">m=
ode</var> to "<a href=3D#sort-parser-mode:-leading-decimal =
title=3D"sort parser mode: leading-decimal">leading-decimal&=
lt;/a>".</p>
+         </dd>
+         <dt>If <var title=3D"">c</var> is a=
n <a href=3D#ascii-digits title=3D"ASCII digits">ASCII di=
git</a></dt>
+         <dd>
+          <p>Append <var title=3D"">c</var> =
to <var title=3D"">buffer</var>.</p>
+          <p>Set <var title=3D"sort parser mode">m=
ode</var> to "<a href=3D#sort-parser-mode:-integral title=3D=
"sort parser mode: integral">integral</a>".</p=
>
+         </dd>
+         <dt>Otherwise</dt>
+         <dd>
+          <p>Append <var title=3D"">buffer</var=
> to the last entry in <var title=3D"">raw strings<=
/var>.</p>
+          <p>Decrement <var title=3D"">index</v=
ar> by one.</p>
+          <p>Set <var title=3D"sort parser mode">m=
ode</var> to "<a href=3D#sort-parser-mode:-separator title=3D=
"sort parser mode: separator">separator</a>".<=
/p>
+         </dd>
+        </dl></dd>
+       <dt>If <var title=3D"sort parser mode">mode=
</var> is "<dfn id=3Dsort-parser-mode:-integral title=3D&qu=
ot;sort parser mode: integral">integral</dfn>"</dt&=
gt;
+       <dd>
+        <p>Run the appropriate substeps from the following list:&l=
t;/p>
+        <dl class=3Dswitch><dt>If <var title=3D"&quo=
t;>c</var> is a U+002D HYPHEN-MINUS character (-)</dt>
+         <dd>
+          <p>Set <var title=3D"">negatives prejudi=
ced</var> to true.</p>
+          <p><a href=3D#sort-parser-push-the-buffer title=3D&qu=
ot;sort parser push the buffer">Push the buffer</a>.</p&=
gt;
+         </dd>
+         <dt>If <var title=3D"">c</var> is a=
 U+002E FULL STOP character (.) and <var title=3D"">decim=
als prejudiced</var> is false</dt>
+         <dd>
+          <p><a href=3D#sort-parser-checkpoint title=3D"so=
rt parser checkpoint">Checkpoint</a>.</p>
+          <p>Append <var title=3D"">c</var> =
to <var title=3D"">buffer</var>.</p>
+          <p>Set <var title=3D"sort parser mode">m=
ode</var> to "<a href=3D#sort-parser-mode:-decimal title=3D=
"sort parser mode: decimal">decimal</a>".</p&g=
t;
+         </dd>
+         <dt>If <var title=3D"">c</var> is a=
n <a href=3D#ascii-digits title=3D"ASCII digits">ASCII di=
git</a></dt>
+         <dd>
+          <p>Append <var title=3D"">c</var> =
to the last entry in <var title=3D"">raw strings</var&=
gt;.</p>
+         </dd>
+         <dt>If <var title=3D"">c</var> is a=
 U+0045 LATIN CAPITAL LETTER E character or a U+0065 LATIN SMALL LETTER E=
 character and <var title=3D"">exponents prejudiced</v=
ar> is false</dt>
+         <dd>
+          <p><a href=3D#sort-parser-checkpoint title=3D"so=
rt parser checkpoint">Checkpoint</a>.</p>
+          <p>Append <var title=3D"">c</var> =
to <var title=3D"">buffer</var>.</p>
+          <p>Set <var title=3D"sort parser mode">m=
ode</var> to "<a href=3D#sort-parser-mode:-exponent title=3D=
"sort parser mode: exponent">exponent</a>".</p=
>
+         </dd>
+         <dt>Otherwise</dt>
+         <dd>
+          <p><a href=3D#sort-parser-push-the-buffer title=3D&qu=
ot;sort parser push the buffer">Push the buffer</a>.</p&=
gt;
+         </dd>
+        </dl></dd>
+       <dt>If <var title=3D"sort parser mode">mode=
</var> is "<dfn id=3Dsort-parser-mode:-leading-decimal titl=
e=3D"sort parser mode: leading-decimal">leading-decimal</=
dfn>"</dt>
+       <dd>
+        <p>Run the appropriate substeps from the following list:&l=
t;/p>
+        <dl class=3Dswitch><dt>If <var title=3D"&quo=
t;>c</var> is an <a href=3D#ascii-digits title=3D"ASCII =
digits">ASCII digit</a></dt>
+         <dd>
+          <p>Append <var title=3D"">c</var> =
to <var title=3D"">buffer</var>.</p>
+          <p>Set <var title=3D"sort parser mode">m=
ode</var> to "<a href=3D#sort-parser-mode:-decimal title=3D=
"sort parser mode: decimal">decimal</a>".</p&g=
t;
+         </dd>
+         <dt>Otherwise</dt>
+         <dd>
+          <p>Append <var title=3D"">buffer</var=
> to the last entry in <var title=3D"">raw strings<=
/var>.</p>
+          <p>Decrement <var title=3D"">index</v=
ar> by one.</p>
+          <p>Set <var title=3D"sort parser mode">m=
ode</var> to "<a href=3D#sort-parser-mode:-separator title=3D=
"sort parser mode: separator">separator</a>".<=
/p>
+         </dd>
+        </dl></dd>
+       <dt>If <var title=3D"sort parser mode">mode=
</var> is "<dfn id=3Dsort-parser-mode:-decimal title=3D&quo=
t;sort parser mode: decimal">decimal</dfn>"</dt>
+       <dd>
+        <p>Run the appropriate substeps from the following list:&l=
t;/p>
+        <dl class=3Dswitch><dt>If <var title=3D"&quo=
t;>c</var> is a U+002D HYPHEN-MINUS character (-)</dt>
+         <dd>
+          <p>Set <var title=3D"">negatives prejudi=
ced</var> to true.</p>
+          <p><a href=3D#sort-parser-push-the-buffer title=3D&qu=
ot;sort parser push the buffer">Push the buffer</a>.</p&=
gt;
+         </dd>
+         <dt>If <var title=3D"">c</var> is a=
 U+002E FULL STOP character (.) and any of the characters in <var titl=
e=3D"">value</var> past the <var title=3D"&quo=
t;>index</var>th character are <a href=3D#ascii-digits>ASC=
II digits</a></dt>
+         <dd>
+          <p>Set <var title=3D"">decimals prejudic=
ed</var> to true.</p>
+          <p><a href=3D#sort-parser-push-the-checkpoint title=3D=
"sort parser push the checkpoint">Push the checkpoint</a&=
gt;.</p>
+         </dd>
+         <dt>If <var title=3D"">c</var> is a=
 U+002E FULL STOP character (.) and none of the characters in <var tit=
le=3D"">value</var> past the <var title=3D"&qu=
ot;>index</var>th character are <a href=3D#ascii-digits>AS=
CII digits</a></dt>
+         <dd>
+          <p><a href=3D#sort-parser-push-the-buffer title=3D&qu=
ot;sort parser push the buffer">Push the buffer</a>.</p&=
gt;
+         </dd>
+         <dt>If <var title=3D"">c</var> is a=
n <a href=3D#ascii-digits title=3D"ASCII digits">ASCII di=
git</a></dt>
+         <dd>
+          <p>Append <var title=3D"">c</var> =
to <var title=3D"">buffer</var>.</p>
+         </dd>
+         <dt>If <var title=3D"">c</var> is a=
 U+0045 LATIN CAPITAL LETTER E character or a U+0065 LATIN SMALL LETTER E=
 character and <var title=3D"">exponents prejudiced</v=
ar> is false</dt>
+         <dd>
+          <p><a href=3D#sort-parser-checkpoint title=3D"so=
rt parser checkpoint">Checkpoint</a>.</p>
+          <p>Append <var title=3D"">c</var> =
to <var title=3D"">buffer</var>.</p>
+          <p>Set <var title=3D"sort parser mode">m=
ode</var> to "<a href=3D#sort-parser-mode:-exponent title=3D=
"sort parser mode: exponent">exponent</a>".</p=
>
+         </dd>
+         <dt>Otherwise</dt>
+         <dd>
+          <p><a href=3D#sort-parser-push-the-buffer title=3D&qu=
ot;sort parser push the buffer">Push the buffer</a>.</p&=
gt;
+         </dd>
+        </dl></dd>
+       <dt>If <var title=3D"sort parser mode">mode=
</var> is "<dfn id=3Dsort-parser-mode:-exponent title=3D&qu=
ot;sort parser mode: exponent">exponent</dfn>"</dt&=
gt;
+       <dd>
+        <p>Run the appropriate substeps from the following list:&l=
t;/p>
+        <dl class=3Dswitch><dt>If <var title=3D"&quo=
t;>c</var> is a U+002D HYPHEN-MINUS character (-) and <var ti=
tle=3D"">negatives prejudiced</var> is false</dt&gt=
;
+         <dd>
+          <p>Append <var title=3D"">c</var> =
to <var title=3D"">buffer</var>.</p>
+          <p>Set <var title=3D"sort parser mode">m=
ode</var> to "<a href=3D#sort-parser-mode:-exponent-negativ=
e title=3D"sort parser mode: exponent-negative">exponent-neg=
ative</a>".</p>
+         </dd>
+         <dt>If <var title=3D"">c</var> is a=
 U+002E FULL STOP character (.)</dt>
+         <dd>
+          <p>Set <var title=3D"">decimals prejudic=
ed</var> to true.</p>
+          <p><a href=3D#sort-parser-push-the-checkpoint title=3D=
"sort parser push the checkpoint">Push the checkpoint</a&=
gt;.</p>
+         </dd>
+         <dt>If <var title=3D"">c</var> is a=
n <a href=3D#ascii-digits title=3D"ASCII digits">ASCII di=
git</a></dt>
+         <dd>
+          <p>Append <var title=3D"">c</var> =
to <var title=3D"">buffer</var>.</p>
+          <p>Set <var title=3D"sort parser mode">m=
ode</var> to "<a href=3D#sort-parser-mode:-exponent-number =
title=3D"sort parser mode: exponent-number">exponent-number&=
lt;/a>".</p>
+         </dd>
+         <dt>If <var title=3D"">c</var> is a=
 U+0045 LATIN CAPITAL LETTER E character or a U+0065 LATIN SMALL LETTER E=
 character</dt>
+         <dd>
+          <p>Set <var title=3D"">exponents prejudi=
ced</var> to true.</p>
+          <p><a href=3D#sort-parser-push-the-checkpoint title=3D=
"sort parser push the checkpoint">Push the checkpoint</a&=
gt;.</p>
+         </dd>
+         <dt>Otherwise</dt>
+         <dd>
+          <p><a href=3D#sort-parser-push-the-checkpoint title=3D=
"sort parser push the checkpoint">Push the checkpoint</a&=
gt;.</p>
+         </dd>
+        </dl></dd>
+       <dt>If <var title=3D"sort parser mode">mode=
</var> is "<dfn id=3Dsort-parser-mode:-exponent-negative ti=
tle=3D"sort parser mode: exponent-negative">exponent-negativ=
e</dfn>"</dt>
+       <dd>
+        <p>Run the appropriate substeps from the following list:&l=
t;/p>
+        <dl class=3Dswitch><dt>If <var title=3D"&quo=
t;>c</var> is a U+002D HYPHEN-MINUS character (-)</dt>
+         <dd>
+          <p>Set <var title=3D"">negatives prejudi=
ced</var> to true.</p>
+          <p><a href=3D#sort-parser-push-the-checkpoint title=3D=
"sort parser push the checkpoint">Push the checkpoint</a&=
gt;.</p>
+         </dd>
+         <dt>If <var title=3D"">c</var> is a=
 U+002E FULL STOP character (.)</dt>
+         <dd>
+          <p>Set <var title=3D"">decimals prejudic=
ed</var> to true.</p>
+          <p><a href=3D#sort-parser-push-the-checkpoint title=3D=
"sort parser push the checkpoint">Push the checkpoint</a&=
gt;.</p>
+         </dd>
+         <dt>If <var title=3D"">c</var> is a=
n <a href=3D#ascii-digits title=3D"ASCII digits">ASCII di=
git</a></dt>
+         <dd>
+          <p>Append <var title=3D"">c</var> =
to <var title=3D"">buffer</var>.</p>
+          <p>Set <var title=3D"sort parser mode">m=
ode</var> to "<a href=3D#sort-parser-mode:-exponent-negativ=
e-number title=3D"sort parser mode: exponent-negative-number"&g=
t;exponent-negative-number</a>".</p>
+         </dd>
+         <dt>If <var title=3D"">c</var> is a=
 U+0045 LATIN CAPITAL LETTER E character or a U+0065 LATIN SMALL LETTER E=
 character</dt>
+         <dd>
+          <p>Set <var title=3D"">exponents prejudi=
ced</var> to true.</p>
+          <p><a href=3D#sort-parser-push-the-checkpoint title=3D=
"sort parser push the checkpoint">Push the checkpoint</a&=
gt;.</p>
+         </dd>
+         <dt>Otherwise</dt>
+         <dd>
+          <p><a href=3D#sort-parser-push-the-checkpoint title=3D=
"sort parser push the checkpoint">Push the checkpoint</a&=
gt;.</p>
+         </dd>
+        </dl></dd>
+       <dt>If <var title=3D"sort parser mode">mode=
</var> is "<dfn id=3Dsort-parser-mode:-exponent-number titl=
e=3D"sort parser mode: exponent-number">exponent-number</=
dfn>"</dt>
+       <dd>
+        <p>Run the appropriate substeps from the following list:&l=
t;/p>
+        <dl class=3Dswitch><dt>If <var title=3D"&quo=
t;>c</var> is a U+002D HYPHEN-MINUS character (-)</dt>
+         <dd>
+          <p>Set <var title=3D"">negatives prejudi=
ced</var> to true.</p>
+          <p><a href=3D#sort-parser-push-the-buffer title=3D&qu=
ot;sort parser push the buffer">Push the buffer</a>.</p&=
gt;
+         </dd>
+         <dt>If <var title=3D"">c</var> is a=
 U+002E FULL STOP character (.)</dt>
+         <dd>
+          <p>Set <var title=3D"">decimals prejudic=
ed</var> to true.</p>
+          <p><a href=3D#sort-parser-push-the-checkpoint title=3D=
"sort parser push the checkpoint">Push the checkpoint</a&=
gt;.</p>
+         </dd>
+         <dt>If <var title=3D"">c</var> is a=
n <a href=3D#ascii-digits title=3D"ASCII digits">ASCII di=
git</a></dt>
+         <dd>
+          <p>Append <var title=3D"">c</var> =
to <var title=3D"">buffer</var>.</p>
+         </dd>
+         <dt>If <var title=3D"">c</var> is a=
 U+0045 LATIN CAPITAL LETTER E character or a U+0065 LATIN SMALL LETTER E=
 character</dt>
+         <dd>
+          <p>Set <var title=3D"">exponents prejudi=
ced</var> to true.</p>
+          <p><a href=3D#sort-parser-push-the-checkpoint title=3D=
"sort parser push the checkpoint">Push the checkpoint</a&=
gt;.</p>
+         </dd>
+         <dt>Otherwise</dt>
+         <dd>
+          <p><a href=3D#sort-parser-push-the-buffer title=3D&qu=
ot;sort parser push the buffer">Push the buffer</a>.</p&=
gt;
+         </dd>
+        </dl></dd>
+       <dt>If <var title=3D"sort parser mode">mode=
</var> is "<dfn id=3Dsort-parser-mode:-exponent-negative-nu=
mber title=3D"sort parser mode: exponent-negative-number">ex=
ponent-negative-number</dfn>"</dt>
+       <dd>
+        <p>Run the appropriate substeps from the following list:&l=
t;/p>
+        <dl class=3Dswitch><dt>If <var title=3D"&quo=
t;>c</var> is a U+002D HYPHEN-MINUS character (-)</dt>
+         <dd>
+          <p>Set <var title=3D"">negatives prejudi=
ced</var> to true.</p>
+          <p><a href=3D#sort-parser-push-the-checkpoint title=3D=
"sort parser push the checkpoint">Push the checkpoint</a&=
gt;.</p>
+         </dd>
+         <dt>If <var title=3D"">c</var> is a=
 U+002E FULL STOP character (.)</dt>
+         <dd>
+          <p>Set <var title=3D"">decimals prejudic=
ed</var> to true.</p>
+          <p><a href=3D#sort-parser-push-the-checkpoint title=3D=
"sort parser push the checkpoint">Push the checkpoint</a&=
gt;.</p>
+         </dd>
+         <dt>If <var title=3D"">c</var> is a=
n <a href=3D#ascii-digits title=3D"ASCII digits">ASCII di=
git</a></dt>
+         <dd>
+          <p>Append <var title=3D"">c</var> =
to <var title=3D"">buffer</var>.</p>
+         </dd>
+         <dt>If <var title=3D"">c</var> is a=
 U+0045 LATIN CAPITAL LETTER E character or a U+0065 LATIN SMALL LETTER E=
 character</dt>
+         <dd>
+          <p>Set <var title=3D"">exponents prejudi=
ced</var> to true.</p>
+          <p><a href=3D#sort-parser-push-the-checkpoint title=3D=
"sort parser push the checkpoint">Push the checkpoint</a&=
gt;.</p>
+         </dd>
+         <dt>Otherwise</dt>
+         <dd>
+          <p><a href=3D#sort-parser-push-the-buffer title=3D&qu=
ot;sort parser push the buffer">Push the buffer</a>.</p&=
gt;
+         </dd>
+        </dl></dd>
+      </dl></li>
+
+     <li>
+
+      <p>Increment <var title=3D"">index</var&g=
t; by one.</p>
+
+     </li>
+
+     <li>
+
+      <p>If <var title=3D"">index</var> is g=
reater than the number of characters in <var title=3D"">v=
alue</var>, stop repeating these substeps and continue along the ov=
erall steps.
+      Otherwise, return to the step labeled <i>top of loop</i&g=
t;.</p>
+
+     </li>
+
+    </ol></li>
+
+   <li>
+    <p>Let <var title=3D"">numbers</var> be =
an empty list.</p>
+    <p>Let <var title=3D"">number strings</var&=
gt; be an empty list.</p>
+    <p>Let <var title=3D"">non-numeric strings<=
/var> be an empty list.</p>
+   </li>
+
+   <li>
+
+    <p>For each even-numbered entry in <var title=3D"&quot=
;>raw strings</var>, in order, starting from the
+    first entry (numbered 0), append an entry to <var title=3D"&=
quot;>non-numeric strings</var> that
+    consists of the result of <a href=3D#trimming-and-collapsing>t=
rimming and collapsing</a> the value of the entry.</p>
+
+   </li>
+
+   <li>
+
+    <p>If <var title=3D"">raw strings</var> =
has more than one entry, then, for each odd-numbered entry
+    in <var title=3D"">raw strings</var>, in order=
, starting from the second entry (numbered 1),
+    append an entry to <var title=3D"">number strings&lt=
;/var> that consists of the value of the entry,
+    and append an entry to <var title=3D"">number string=
s</var> that consists of the result of parsing
+    the value of the entry using the <a href=3D#rules-for-parsing-flo=
ating-point-number-values>rules for parsing floating-point number
+    values</a>.</p>
+
+   </li>
+
+   <li>
+
+    <p>Return <var title=3D"">numbers</var>,=
 <var title=3D"">number strings</var>, <var titl=
e=3D"">non-numeric strings</var>, and <var title=3D=
"">raw strings</var> respectively.</p>
+
+   </li>
+
+  </ol><p>When the user agent is required by the step above =
to perform a <dfn id=3Dlocale-specific-string-comparison>locale-spe=
cific string
+  comparison</dfn> of two strings <var title=3D"">=
a</var> and <var title=3D"">b</var> in the co=
ntext of
+  an element <var title=3D"">e</var>, the user age=
nt must apply the Unicode Collation Algorithm, using
+  the Default Unicode Collation Element Table as customized for the <=
a href=3D#language>language</a> of the
+  element <var title=3D"">e</var> in the Common Lo=
cale Data Repository, to the strings <var title=3D"">a&lt=
;/var> and <var title=3D"">b</var>, ignoring cas=
e. If the result of this algorithm places
+  <var title=3D"">a</var> first, then return &quot=
;a before b"; if it places <var title=3D"">b</var=
> first,
+  then return "b before a"; otherwise, if they compare as equa=
l, then return "equal". <a href=3D#refsUCA>[UCA]</a&gt=
; <a href=3D#refsCLDR>[CLDR]</a></p>
+
+  <p>When the user agent is required by the step above to perform =
a <dfn id=3Draw-string-comparison>raw string comparison</dfn>
+  of two strings <var title=3D"">a</var> and <v=
ar title=3D"">b</var>, the user agent must apply the
+  Unicode Collation Algorithm, using the Default Unicode Collation Eleme=
nt Table without
+  customizations, to the strings <var title=3D"">a</v=
ar> and <var title=3D"">b</var>. If the result o=
f
+  this algorithm places <var title=3D"">a</var> fi=
rst, then return "a before b"; if it places <var title=3D&qu=
ot;">b</var> first, then return "b before a"; oth=
erwise, if they compare as equal, then return
+  "equal". <a href=3D#refsUCA>[UCA]</a></p>
+
+  <p>Where the steps above refer to <dfn id=3Dtrimming-and-coll=
apsing>trimming and collapsing</dfn> a string <var title=3D&q=
uot;">value</var>, it means running the following algorithm=
:</p>
+
+  <ol><li><p><a href=3D#strip-leading-and-trailing-=
whitespace>Strip leading and trailing whitespace</a> from <va=
r title=3D"">value</var>.</li>
+
+   <li><p>Replace any sequence of one or more <a href=3D#=
space-character title=3D"space character">space characters&l=
t;/a>
+   in <var title=3D"">value</var> with a single U+=
0020 SPACE character.</li>
+
+  </ol><hr><p>When any of the descendants of a <a h=
ref=3D#sorting-enabled-table-element>sorting-enabled <code>table=
</code> element</a> change
+  in any way (including attributes changing), and when a <code>&lt=
;a href=3D#the-table-element>table</a></code> element beco=
mes a
+  <a href=3D#sorting-enabled-table-element>sorting-enabled <cod=
e>table</code> element</a>, the <code><a href=3D#=
the-table-element>table</a></code> element is said to
+  become <dfn id=3Da-table-with-a-pending-sort>a table with a pend=
ing sort</dfn>.</p>
+
+  <p>When the user agent is to <dfn id=3Dsort-the-tables-with-p=
ending-sorts>sort the tables with pending sorts</dfn>, which hap=
pens during
+  the <a href=3D#perform-a-microtask-checkpoint>perform a microtas=
k checkpoint</a> algorithm, the user agent must run the following
+  algorithm:</p>
+
+  <ol><li><p>Let <var title=3D"">table=
s</var> be a list of each <code><a href=3D#the-table-eleme=
nt>table</a></code> in the <a href=3D#unit-of-related-s=
imilar-origin-browsing-contexts>unit of
+   related similar-origin browsing contexts</a> that is <a href=
=3D#a-table-with-a-pending-sort>a table with a pending sort</a>,
+   in the order that they became such, with those that become such at th=
e same time being listed in
+   <a href=3D#tree-order>tree order</a>.</p>
+
+   <li><p>Let all the <code><a href=3D#the-table-el=
ement>table</a></code> elements in <var title=3D"&=
quot;>tables</var> no longer be <a href=3D#a-table-with-a-pen=
ding-sort title=3D"a table with a pending sort">tables with =
a pending sort</a>.</li>
+
+   <li><p>Apply the <a href=3D#table-sorting-algorithm&gt=
;table sorting algorithm</a> to each <code><a href=3D#the-=
table-element>table</a></code> in <var title=3D"&q=
uot;>tables</var>, in order.</li>
+
+  </ol><hr><p>When the user agent is to <dfn id=3Ds=
et-the-sort-key>set the sort key</dfn> to a <code><a hr=
ef=3D#the-th-element>th</a></code> element <var title=3D=
"">target</var>, it must run the following algorithm:&=
lt;/p>
+
+  <ol><li><p>Let <var title=3D"">table=
</var> be the <code><a href=3D#the-table-element>table&=
lt;/a></code> of the <a href=3D#concept-table title=3Dconcept=
-table>table</a> of which <var title=3D"">target=
</var> is a header cell.</li>
+
+   <li><p>If <code><a href=3D#the-th-element>th&=
lt;/a></code> is a <a href=3D#sorting-enabled-th-element>s=
orting-enabled <code>th</code> element</a> whose
+   <a href=3D#column-key-ordinality>column key ordinality</a&gt=
; is 1, then: if its <a href=3D#column-sort-direction>column sort d=
irection</a> is
+   <i>normal</i>, set that element's <code title=3Dattr-t=
h-sorted><a href=3D#attr-th-sorted>sorted</a></code>=
 attribute to the
+   string "<code title=3D"">reversed</code>&q=
uot;, otherwise, set it to the empty string; then, abort these
+   steps.</li>
+
+   <li><p>Let <var title=3D"">current header=
s</var> be the <a href=3D#sorting-enabled-th-elements-of-the-tab=
le-element>sorting-enabled <code>th</code>
+   elements of the <code>table</code> element</a> <=
var title=3D"">table</var>, excluding <var title=3D=
"">target</var>.</li>
+
+   <li><p>Sort <var title=3D"">current heade=
rs</var> by their <code title=3Dattr-th-sorted><a href=3D#=
attr-th-sorted>sorted</a></code> attributes' <a href=3D=
#column-key-ordinality>column key ordinality</a>, in ascending
+   order, with elements that have the same <a href=3D#column-key-ordi=
nality>column key ordinality</a> being sorted in
+   <a href=3D#tree-order>tree order</a>.</li>
+
+   <li><p>Let <var title=3D"">level</var&=
gt; be 2.</li>
+
+   <li>
+
+    <p>For each <code><a href=3D#the-th-element>th<=
/a></code> element <var title=3D"">th</var&gt=
; in <var title=3D"">current
+    headers</var>, in order, run the following substeps:</p>
+
+    <ol><li><p>If <var title=3D"">th&l=
t;/var>'s <code title=3Dattr-th-sorted><a href=3D#attr-th-sor=
ted>sorted</a></code> attribute's
+     <a href=3D#column-sort-direction>column sort direction</a&=
gt; is <i>normal</i>, then set <var title=3D""&g=
t;th</var>'s <code title=3Dattr-th-sorted><a href=3D#attr-=
th-sorted>sorted</a></code> attribute to a <a href=3D#v=
alid-integer>valid integer</a> whose value is
+     <var title=3D"">level</var>. Otherwise, set i=
t to the concatenation of the string "<code title=3D""&=
gt;reversed</code>", a U+0020 SPACE character, and a <a hre=
f=3D#valid-integer>valid integer</a> whose
+     value is <var title=3D"">level</var>.</p&g=
t;
+
+     <li><p>Increment <var title=3D"">level&=
lt;/var> by 1.</li>
+
+    </ol></li>
+
+   <li><p>Set <var title=3D"">target</var=
>'s <code title=3Dattr-th-sorted><a href=3D#attr-th-sorted&gt=
;sorted</a></code> attribute to
+   the empty string.</li>
+
+  </ol><hr><p>The <a href=3D#activation-behavior&gt=
;activation behavior</a> of a <a href=3D#sorting-interface-th-el=
ement>sorting interface <code>th</code>
+  element</a> is to <a href=3D#set-the-sort-key>set the sort=
 key</a> to the <code><a href=3D#the-th-element>th</=
a></code> element.</p>
+
+  <p class=3Dnote>The <code><a href=3D#the-table-element&=
gt;table</a></code> will be sorted the next time the user age=
nt <a href=3D#perform-a-microtask-checkpoint title=3D"perform a m=
icrotask checkpoint">performs a microtask checkpoint</a>.&l=
t;/p>
+
+  </div>
+
+  <dl class=3Ddomintro><dt><var title=3D"">t=
h</var> . <code title=3Ddom-th-sort><a href=3D#dom-th-sort=
>sort</a></code>()</dt>
+
+   <dd>
+
+    <p>Act as if the user had indicated that this was to be the ne=
w primary sort column.</p>
+
+    <p>The <code><a href=3D#the-table-element>table&lt=
;/a></code> won't actually be sorted until the script terminates=
.</p>
+
+   </dd>
+
+
+   <dt><var title=3D"">table</var> . <cod=
e title=3Ddom-table-stopSorting><a href=3D#dom-table-stopsorting&gt=
;stopSorting</a></code>()</dt>
+
+   <dd>
+
+    <p>Removes all the <code title=3Dattr-th-sorted><a hr=
ef=3D#attr-th-sorted>sorted</a></code> attributes that are=
 causing the
+    table to automatically sort its contents, if any.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>The <code><a href=3D#the-th-element>th</a>&=
lt;/code> element's <dfn id=3Ddom-th-sort title=3Ddom-th-sort>&l=
t;code>sort()</code></dfn> method, when
+  invoked, must run the following steps:</p>
+
+  <ol><li><p>If the <code><a href=3D#the-th-e=
lement>th</a></code> element is not a <a href=3D#sortin=
g-capable-th-element>sorting-capable <code>th</code>
+   element</a>, then abort these steps.</li>
+
+   <li>
+
+    <p><a href=3D#set-the-sort-key>Set the sort key</a&gt=
; to the <code><a href=3D#the-th-element>th</a></cod=
e> element.</p>
+
+    <p class=3Dnote>The <code><a href=3D#the-table-elemen=
t>table</a></code> will be sorted the next time the user a=
gent <a href=3D#perform-a-microtask-checkpoint title=3D"perform a=
 microtask checkpoint">performs a microtask checkpoint</a>.=
</p>
+
+   </li>
+
+  </ol><p>The <code><a href=3D#the-table-element&gt=
;table</a></code> element's <dfn id=3Ddom-table-stopsortin=
g title=3Ddom-table-stopSorting><code>stopSorting()</code>=
</dfn> method, when invoked, must remove
+  the <code title=3Dattr-th-sorted><a href=3D#attr-th-sorted&gt=
;sorted</a></code> attribute of all the <a href=3D#sorting=
-enabled-th-elements-of-the-table-element>sorting-enabled
+  <code>th</code> elements of the table element</a> on=
 which the method was invoked.</p>
+
+  </div>
+
+
+  <h4 id=3Dexamples><span class=3Dsecno>4.9.14 </span>=
Examples</h4>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <p>The following shows how might one mark up the bottom part of =
table 45 of the <cite>Smithsonian
+  physical tables, Volume 71</cite>:</p>
+
+   <!-- Smithsonian physical tables, Volume 71: By Smithsonian Instit=
ution, Frederick Eugene Fowle; page 76 -->
+   <!-- from the reprint of the seventh revised edition; publication =
2539, published 1921 -->
+  <pre><table>
+ <caption>Specification values: <b>Steel&amp=
;lt;/b>, <b>Castings</b>,
+ Ann. A.S.T.M. A27-16, Class B;* P max. 0.06; S max. 0.05.</capti=
on>
+ <thead>
+  <tr>
+   <th rowspan=3D2>Grade.</th>
+   <th rowspan=3D2>Yield Point.</th>
+   <th colspan=3D2>Ultimate tensile strength</th&am=
p;gt;
+   <th rowspan=3D2>Per cent elong. 50.8mm or 2 in.<=
/th>
+   <th rowspan=3D2>Per cent reduct. area.</th&g=
t;
+  </tr>
+  <tr>
+   <th>kg/mm<sup>2</sup>&l=
t;/th>
+   <th>lb/in<sup>2</sup>&l=
t;/th>
+  </tr>
+ </thead>
+ <tbody>
+  <tr>
+   <td>Hard</td>
+   <td>0.45 ultimate</td>
+   <td>56.2</td>
+   <td>80,000</td>
+   <td>15</td>
+   <td>20</td>
+  </tr>
+  <tr>
+   <td>Medium</td>
+   <td>0.45 ultimate</td>
+   <td>49.2</td>
+   <td>70,000</td>
+   <td>18</td>
+   <td>25</td>
+  </tr>
+  <tr>
+   <td>Soft</td>
+   <td>0.45 ultimate</td>
+   <td>42.2</td>
+   <td>60,000</td>
+   <td>22</td>
+   <td>30</td>
+  </tr>
+ </tbody>
+</table></pre>
+
+  <p>This table could look like this:</p>
+
+  <table id=3Dtable-example-1><caption>Specification values:=
 <b>Steel</b>, <b>Castings</b>,
+   Ann. A.S.T.M. A27-16, Class B;* P max. 0.06; S max. 0.05.</caption=
>
+   <thead><tr><th rowspan=3D2>Grade.</th>
+     <th rowspan=3D2>Yield Point.</th>
+     <th colspan=3D2>Ultimate tensile strength</th>
+     <th rowspan=3D2>Per cent elong. 50.8 mm or =
2 in.</th>
+     <th rowspan=3D2>Per cent reduct. area.</th>
+    <tr><th>kg/mm<sup>2</sup></th>
+     <th>lb/in<sup>2</sup></th>
+    <tbody><tr><td>Hard</td>
+     <td>0.45 ultimate</td>
+     <td>56.2</td>
+     <td>80,000</td>
+     <td>15</td>
+     <td>20</td>
+    <tr><td>Medium</td>
+     <td>0.45 ultimate</td>
+     <td>49.2</td>
+     <td>70,000</td>
+     <td>18</td>
+     <td>25</td>
+    <tr><td>Soft</td>
+     <td>0.45 ultimate</td>
+     <td>42.2</td>
+     <td>60,000</td>
+     <td>22</td>
+     <td>30</td>
+    </table><hr><p>The following shows how one might m=
ark up the gross margin table on page 46 of Apple, Inc's
+  10-K filing for fiscal year 2008:</p>
+
+  <pre><table>
+ <thead>
+  <tr>
+   <th>
+   <th>2008
+   <th>2007
+   <th>2006
+ <tbody>
+  <tr>
+   <th>Net sales
+   <td>$ 32,479
+   <td>$ 24,006
+   <td>$ 19,315
+  <tr>
+   <th>Cost of sales
+   <td>  21,334
+   <td>  15,852
+   <td>  13,717
+ <tbody>
+  <tr>
+   <th>Gross margin
+   <td>$ 11,145
+   <td>$  8,154
+   <td>$  5,598
+ <tfoot>
+  <tr>
+   <th>Gross margin percentage
+   <td>34.3%
+   <td>34.0%
+   <td>29.0%
+</table></pre>
+
+  <p>This table could look like this:</p>
+
+  <table class=3D"apple-table-examples e1"><thead>=
<tr><th>
+     <th>2008
+     <th>2007
+     <th>2006
+   <tbody><tr><th>Net sales
+     <td>$ 32,479
+     <td>$ 24,006
+     <td>$ 19,315
+    <tr><th>Cost of sales
+     <td>  21,334
+     <td>  15,852
+     <td>  13,717
+   <tbody><tr><th>Gross margin
+     <td>$ 11,145
+     <td>$  8,154
+     <td>$  5,598
+   <tfoot><tr><th>Gross margin percentage
+     <td>34.3%
+     <td>34.0%
+     <td>29.0%
+  </table><hr><p>The following shows how one might mar=
k up the operating expenses table from lower on the same
+  page of that document:</p>
+
+  <pre><table>
+ <colgroup> <col>
+ <colgroup> <col> <col> &l=
t;col>
+ <thead>
+  <tr> <th> <th>2008 <t=
h>2007 <th>2006
+ <tbody>
+  <tr> <th scope=3Drowgroup> Research and de=
velopment
+       <td> $ 1,109 <td> $ 782 <td&am=
p;gt; $ 712
+  <tr> <th scope=3Drow> Percentage of net sa=
les
+       <td> 3.4% <td> 3.3% <td&gt=
; 3.7%
+ <tbody>
+  <tr> <th scope=3Drowgroup> Selling, genera=
l, and administrative
+       <td> $ 3,761 <td> $ 2,963 <td&=
amp;gt; $ 2,433
+  <tr> <th scope=3Drow> Percentage of net sa=
les
+       <td> 11.6% <td> 12.3% <td&=
gt; 12.6%
+</table></pre>
+
+  <p>This table could look like this:</p>
+
+  <table class=3D"apple-table-examples e2"><thead>=
<tr><th> <th>2008 <th>2007 <th>2006
+   <tbody><tr><th scope=3Drowgroup> Research and devel=
opment
+         <td> $ 1,109 <td> $ 782 <td> $ 712
+    <tr><th scope=3Drow> Percentage of net sales
+         <td> 3.4% <td> 3.3% <td> 3.7%
+   <tbody><tr><th scope=3Drowgroup> Selling, general, =
and administrative
+         <td> $ 3,761 <td> $ 2,963 <td> $ 2,433
+    <tr><th scope=3Drow> Percentage of net sales
+         <td> 11.6% <td> 12.3% <td> 12.6%
+  </table><h3 id=3Dforms><span class=3Dsecno>4.10 <=
/span>Forms</h3>
+
+  <h4 id=3Dintroduction-2><span class=3Dsecno>4.10.1 </sp=
an>Introduction</h4>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <p>A form is a component of a Web page that has form controls, s=
uch as text fields, buttons,
+  checkboxes, range controls, or color pickers. A user can interact with=
 such a form, providing data
+  that can then be sent to the server for further processing (e.g. retur=
ning the results of a search
+  or calculation). No client-side scripting is needed in many cases, tho=
ugh an API is available so
+  that scripts can augment the user experience or use forms for purposes=
 other than submitting data
+  to a server.</p>
+
+  <p>Writing a form consists of several steps, which can be perfor=
med in any order: writing the user
+  interface, implementing the server-side processing, and configuring th=
e user interface to
+  communicate with the server.</p>
+
+
+  <h5 id=3D"writing-a-form's-user-interface"><span cl=
ass=3Dsecno>4.10.1.1 </span>Writing a form's user interface</=
h5>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <p>For the purposes of this brief introduction, we will create a=
 pizza ordering form.</p>
+
+  <p>Any form starts with a <code><a href=3D#the-form-ele=
ment>form</a></code> element, inside which are placed the =
controls. Most
+  controls are represented by the <code><a href=3D#the-input-el=
ement>input</a></code> element, which by default provides =
a one-line
+  text field. To label a control, the <code><a href=3D#the-labe=
l-element>label</a></code> element is used; the label text=
 and the
+  control itself go inside the <code><a href=3D#the-label-eleme=
nt>label</a></code> element. Each part of a form is consid=
ered a
+  <a href=3D#paragraph>paragraph</a>, and is typically separ=
ated from other parts using <code><a href=3D#the-p-element>p&=
lt;/a></code> elements.
+  Putting this together, here is how one might ask for the customer's na=
me:</p>
+
+  <pre><strong><form>
+ <p><label>Customer name: <input&=
gt;</label></p>
+</form></strong></pre>
+
+  <p>To let the user select the size of the pizza, we can use a se=
t of radio buttons. Radio buttons
+  also use the <code><a href=3D#the-input-element>input</=
a></code> element, this time with a <code title=3Dattr-input-=
type><a href=3D#attr-input-type>type</a></code> attr=
ibute with the value <code title=3Dattr-input-type-radio><a href=
=3D"#radio-button-state-(type=3Dradio)">radio</a></=
code>. To make the radio buttons work as a group, they are
+  given a common name using the <code title=3Dattr-fe-name><a h=
ref=3D#attr-fe-name>name</a></code> attribute. To group a =
batch
+  of controls together, such as, in this case, the radio buttons, one ca=
n use the
+  <code><a href=3D#the-fieldset-element>fieldset</a>&l=
t;/code> element. The title of such a group of controls is given by th=
e first element
+  in the <code><a href=3D#the-fieldset-element>fieldset</=
a></code>, which has to be a <code><a href=3D#the-legen=
d-element>legend</a></code> element.</p>
+
+  <pre><form>
+ <p><label>Customer name: <input&=
gt;</label></p>
+<strong> <fieldset>
+  <legend> Pizza Size </legend>
+  <p><label> <input type=3Dradio name=
=3Dsize> Small </label></p>
+  <p><label> <input type=3Dradio name=
=3Dsize> Medium </label></p>
+  <p><label> <input type=3Dradio name=
=3Dsize> Large </label></p>
+ </fieldset></strong>
+</form></pre>
+
+  <p class=3Dnote>Changes from the previous step are highlighted.&=
lt;/p>
+
+  <p>To pick toppings, we can use checkboxes. These use the <co=
de><a href=3D#the-input-element>input</a></code> ele=
ment with a <code title=3Dattr-input-type><a href=3D#attr-input-=
type>type</a></code> attribute with the value <code tit=
le=3Dattr-input-type-checkbox><a href=3D"#checkbox-state-(type=
=3Dcheckbox)">checkbox</a></code>:</p>
+
+  <pre><form>
+ <p><label>Customer name: <input&=
gt;</label></p>
+ <fieldset>
+  <legend> Pizza Size </legend>
+  <p><label> <input type=3Dradio name=
=3Dsize> Small </label></p>
+  <p><label> <input type=3Dradio name=
=3Dsize> Medium </label></p>
+  <p><label> <input type=3Dradio name=
=3Dsize> Large </label></p>
+ </fieldset>
+<strong> <fieldset>
+  <legend> Pizza Toppings </legend>
+  <p><label> <input type=3Dcheckbox&a=
mp;gt; Bacon </label></p>
+  <p><label> <input type=3Dcheckbox&a=
mp;gt; Extra Cheese </label></p>
+  <p><label> <input type=3Dcheckbox&a=
mp;gt; Onion </label></p>
+  <p><label> <input type=3Dcheckbox&a=
mp;gt; Mushroom </label></p>
+ </fieldset></strong>
+</form></pre>
+
+  <p>The pizzeria for which this form is being written is always m=
aking mistakes, so it needs a way
+  to contact the customer. For this purpose, we can use form controls sp=
ecifically for telephone
+  numbers (<code><a href=3D#the-input-element>input</a&gt=
;</code> elements with their <code title=3Dattr-input-type>&l=
t;a href=3D#attr-input-type>type</a></code>
+  attribute set to <code title=3Dattr-input-type-tel><a href=3D=
"#telephone-state-(type=3Dtel)">tel</a></code>) =
and e-mail addresses
+  (<code><a href=3D#the-input-element>input</a></co=
de> elements with their <code title=3Dattr-input-type><a href=
=3D#attr-input-type>type</a></code> attribute set to
+  <code title=3Dattr-input-type-email><a href=3D"#e-mail-s=
tate-(type=3Demail)">email</a></code>):</p>
+
+  <pre><form>
+ <p><label>Customer name: <input&=
gt;</label></p>
+<strong> <p><label>Telephone: <=
input type=3Dtel></label></p>
+ <p><label>E-mail address: <input typ=
e=3Demail></label></p></strong>
+ <fieldset>
+  <legend> Pizza Size </legend>
+  <p><label> <input type=3Dradio name=
=3Dsize> Small </label></p>
+  <p><label> <input type=3Dradio name=
=3Dsize> Medium </label></p>
+  <p><label> <input type=3Dradio name=
=3Dsize> Large </label></p>
+ </fieldset>
+ <fieldset>
+  <legend> Pizza Toppings </legend>
+  <p><label> <input type=3Dcheckbox&a=
mp;gt; Bacon </label></p>
+  <p><label> <input type=3Dcheckbox&a=
mp;gt; Extra Cheese </label></p>
+  <p><label> <input type=3Dcheckbox&a=
mp;gt; Onion </label></p>
+  <p><label> <input type=3Dcheckbox&a=
mp;gt; Mushroom </label></p>
+ </fieldset>
+</form></pre>
+
+  <p>We can use an <code><a href=3D#the-input-element>=
input</a></code> element with its <code title=3Dattr-input=
-type><a href=3D#attr-input-type>type</a></code>
+  attribute set to <code title=3Dattr-input-type-time><a href=3D=
"#time-state-(type=3Dtime)">time</a></code> to a=
sk for a delivery time. Many
+  of these form controls have attributes to control exactly what values =
can be specified; in this
+  case, three attributes of particular interest are <code title=3Datt=
r-input-min><a href=3D#attr-input-min>min</a></code>=
, <code title=3Dattr-input-max><a href=3D#attr-input-max>max&=
lt;/a></code>, and <code title=3Dattr-input-step><a hre=
f=3D#attr-input-step>step</a></code>. These set the
+  minimum time, the maximum time, and the interval between allowed value=
s (in seconds). This
+  pizzeria only delivers between 11am and 9pm, and doesn't promise anyth=
ing better than 15 minute
+  increments, which we can mark up as follows:</p>
+
+  <pre><form>
+ <p><label>Customer name: <input&=
gt;</label></p>
+ <p><label>Telephone: <input type=3Dt=
el></label></p>
+ <p><label>E-mail address: <input typ=
e=3Demail></label></p>
+ <fieldset>
+  <legend> Pizza Size </legend>
+  <p><label> <input type=3Dradio name=
=3Dsize> Small </label></p>
+  <p><label> <input type=3Dradio name=
=3Dsize> Medium </label></p>
+  <p><label> <input type=3Dradio name=
=3Dsize> Large </label></p>
+ </fieldset>
+ <fieldset>
+  <legend> Pizza Toppings </legend>
+  <p><label> <input type=3Dcheckbox&a=
mp;gt; Bacon </label></p>
+  <p><label> <input type=3Dcheckbox&a=
mp;gt; Extra Cheese </label></p>
+  <p><label> <input type=3Dcheckbox&a=
mp;gt; Onion </label></p>
+  <p><label> <input type=3Dcheckbox&a=
mp;gt; Mushroom </label></p>
+ </fieldset>
+<strong> <p><label>Preferred delivery =
time: <input type=3Dtime min=3D"11:00" max=3D"21:00=
" step=3D"900"></label></p&amp=
;gt;</strong>
+</form></pre>
+
+  <p>The <code><a href=3D#the-textarea-element>textare=
a</a></code> element can be used to provide a free-form text =
field. In this
+  instance, we are going to use it to provide a space for the customer t=
o give delivery
+  instructions:</p>
+
+  <pre><form>
+ <p><label>Customer name: <input&=
gt;</label></p>
+ <p><label>Telephone: <input type=3Dt=
el></label></p>
+ <p><label>E-mail address: <input typ=
e=3Demail></label></p>
+ <fieldset>
+  <legend> Pizza Size </legend>
+  <p><label> <input type=3Dradio name=
=3Dsize> Small </label></p>
+  <p><label> <input type=3Dradio name=
=3Dsize> Medium </label></p>
+  <p><label> <input type=3Dradio name=
=3Dsize> Large </label></p>
+ </fieldset>
+ <fieldset>
+  <legend> Pizza Toppings </legend>
+  <p><label> <input type=3Dcheckbox&a=
mp;gt; Bacon </label></p>
+  <p><label> <input type=3Dcheckbox&a=
mp;gt; Extra Cheese </label></p>
+  <p><label> <input type=3Dcheckbox&a=
mp;gt; Onion </label></p>
+  <p><label> <input type=3Dcheckbox&a=
mp;gt; Mushroom </label></p>
+ </fieldset>
+ <p><label>Preferred delivery time: <=
input type=3Dtime min=3D"11:00" max=3D"21:00" step=3D=
"900"></label></p>
+<strong> <p><label>Delivery instructio=
ns: <textarea></textarea></label&g=
t;</p></strong>
+</form></pre>
+
+  <p>Finally, to make the form submittable we use the <code>=
<a href=3D#the-button-element>button</a></code> element=
:</p>
+
+  <pre><form>
+ <p><label>Customer name: <input&=
gt;</label></p>
+ <p><label>Telephone: <input type=3Dt=
el></label></p>
+ <p><label>E-mail address: <input typ=
e=3Demail></label></p>
+ <fieldset>
+  <legend> Pizza Size </legend>
+  <p><label> <input type=3Dradio name=
=3Dsize> Small </label></p>
+  <p><label> <input type=3Dradio name=
=3Dsize> Medium </label></p>
+  <p><label> <input type=3Dradio name=
=3Dsize> Large </label></p>
+ </fieldset>
+ <fieldset>
+  <legend> Pizza Toppings </legend>
+  <p><label> <input type=3Dcheckbox&a=
mp;gt; Bacon </label></p>
+  <p><label> <input type=3Dcheckbox&a=
mp;gt; Extra Cheese </label></p>
+  <p><label> <input type=3Dcheckbox&a=
mp;gt; Onion </label></p>
+  <p><label> <input type=3Dcheckbox&a=
mp;gt; Mushroom </label></p>
+ </fieldset>
+ <p><label>Preferred delivery time: <=
input type=3Dtime min=3D"11:00" max=3D"21:00" step=3D=
"900"></label></p>
+ <p><label>Delivery instructions: <te=
xtarea></textarea></label></p&a=
mp;gt;
+<strong> <p><button>Submit order&l=
t;/button></p></strong>
+</form></pre>
+
+
+  <h5 id=3Dimplementing-the-server-side-processing-for-a-form><=
span class=3Dsecno>4.10.1.2 </span>Implementing the server-side =
processing for a form</h5>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <p>The exact details for writing a server-side processor are out=
 of scope for this specification.
+  For the purposes of this introduction, we will assume that the script =
at <code title=3D"">https://pizza.example.com/order.cgi&l=
t;/code> is configured to accept submissions using the
+  <code title=3Dattr-fs-enctype-urlencoded><a href=3D#attr-fs-e=
nctype-urlencoded>application/x-www-form-urlencoded</a></code=
> format,
+  expecting the following parameters sent in an HTTP POST body:</p&gt=
;
+
+  <dl><dt><code title=3D"">custname</code=
></dt>
+   <dd>Customer's name</dd>
+
+   <dt><code title=3D"">custtel</code></d=
t>
+   <dd>Customer's telephone number</dd>
+
+   <dt><code title=3D"">custemail</code><=
/dt>
+   <dd>Customer's e-mail address</dd>
+
+   <dt><code title=3D"">size</code></dt&g=
t;
+   <dd>The pizza size, either <code title=3D"">sma=
ll</code>, <code title=3D"">medium</code>, or=
 <code title=3D"">large</code></dd>
+
+   <dt><code title=3D"">topping</code></d=
t>
+   <dd>A topping, specified once for each selected topping, with t=
he allowed values being <code title=3D"">bacon</code&g=
t;, <code title=3D"">cheese</code>, <code title=3D=
"">onion</code>, and <code title=3D"">=
mushroom</code></dd>
+
+   <dt><code title=3D"">delivery</code></=
dt>
+   <dd>The requested delivery time</dd>
+
+   <dt><code title=3D"">comments</code></=
dt>
+   <dd>The delivery instructions</dd>
+
+  </dl><h5 id=3Dconfiguring-a-form-to-communicate-with-a-server=
><span class=3Dsecno>4.10.1.3 </span>Configuring a form to=
 communicate with a server</h5>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <p>Form submissions are exposed to servers in a variety of ways,=
 most commonly as HTTP GET or POST
+  requests. To specify the exact method used, the <code title=3Dattr-=
fs-method><a href=3D#attr-fs-method>method</a></code&gt=
;
+  attribute is specified on the <code><a href=3D#the-form-eleme=
nt>form</a></code> element. This doesn't specify how the f=
orm data is
+  encoded, though; to specify that, you use the <code title=3Dattr-fs=
-enctype><a href=3D#attr-fs-enctype>enctype</a></code&g=
t;
+  attribute. You also have to specify the <a href=3D#url>URL</a=
> of the service that will handle the
+  submitted data, using the <code title=3Dattr-fs-action><a hre=
f=3D#attr-fs-action>action</a></code> attribute.</p>
+
+  <p>For each form control you want submitted, you then have to gi=
ve a name that will be used to
+  refer to the data in the submission. We already specified the name for=
 the group of radio buttons;
+  the same attribute (<code title=3Dattr-fe-name><a href=3D#att=
r-fe-name>name</a></code>) also specifies the submission n=
ame.
+  Radio buttons can be distinguished from each other in the submission b=
y giving them different
+  values, using the <code title=3Dattr-input-value><a href=3D#a=
ttr-input-value>value</a></code> attribute.</p>
+
+  <p>Multiple controls can have the same name; for example, here w=
e give all the checkboxes the same
+  name, and the server distinguishes which checkbox was checked by seein=
g which values are submitted
+  with that name — like the radio buttons, they are also given=
 unique values with the <code title=3Dattr-input-value><a href=3D=
#attr-input-value>value</a></code> attribute.</p>
+
+  <p>Given the settings in the previous section, this all becomes:=
</p>
+
+  <pre><form<strong> method=3D"post"
+      enctype=3D"application/x-www-form-urlencoded"
+      action=3D"https://pizza.example.com/order.cgi"</stron=
g>>
+ <p><label>Customer name: <input<s=
trong> name=3D"custname"</strong>></labe=
l></p>
+ <p><label>Telephone: <input type=3Dt=
el<strong> name=3D"custtel"</strong>>&lt=
;/label></p>
+ <p><label>E-mail address: <input typ=
e=3Demail<strong> name=3D"custemail"</strong>&g=
t;</label></p>
+ <fieldset>
+  <legend> Pizza Size </legend>
+  <p><label> <input type=3Dradio name=
=3Dsize<strong> value=3D"small"</strong>> Sm=
all </label></p>
+  <p><label> <input type=3Dradio name=
=3Dsize<strong> value=3D"medium"</strong>> M=
edium </label></p>
+  <p><label> <input type=3Dradio name=
=3Dsize<strong> value=3D"large"</strong>> La=
rge </label></p>
+ </fieldset>
+ <fieldset>
+  <legend> Pizza Toppings </legend>
+  <p><label> <input type=3Dcheckbox&l=
t;strong> name=3D"topping" value=3D"bacon"</str=
ong>> Bacon </label></p>
+  <p><label> <input type=3Dcheckbox&l=
t;strong> name=3D"topping" value=3D"cheese"</st=
rong>> Extra Cheese </label></p>
+  <p><label> <input type=3Dcheckbox&l=
t;strong> name=3D"topping" value=3D"onion"</str=
ong>> Onion </label></p>
+  <p><label> <input type=3Dcheckbox&l=
t;strong> name=3D"topping" value=3D"mushroom"</=
strong>> Mushroom </label></p>
+ </fieldset>
+ <p><label>Preferred delivery time: <=
input type=3Dtime min=3D"11:00" max=3D"21:00" step=3D=
"900"<strong> name=3D"delivery"</strong>&=
amp;gt;</label></p>
+ <p><label>Delivery instructions: <te=
xtarea<strong> name=3D"comments"</strong>>&a=
mp;lt;/textarea></label></p>
+ <p><button>Submit order</button&=
gt;</p>
+</form></pre>
+
+  <p class=3Dnote>There is no particular significance to the way s=
ome of the attributes have their
+  values quoted and others don't. The HTML syntax allows a variety of eq=
ually valid ways to specify
+  attributes, as discussed <a href=3D#syntax-attributes title=3Dsynta=
x-attributes>in the syntax section</a>.</p>
+
+  <p>For example, if the customer entered "Denise Lawrence&qu=
ot; as their name, "555-321-8642" as their
+  telephone number, did not specify an e-mail address, asked for a mediu=
m-sized pizza, selected the
+  Extra Cheese and Mushroom toppings, entered a delivery time of 7pm, an=
d left the delivery
+  instructions text field blank, the user agent would submit the followi=
ng to the online Web
+  service:</p>
+
+  <pre>custname=3DDenise+Lawrence&custtel=3D555-321-8624&a=
mp;amp;custemail=3D&size=3Dmedium&topping=3Dcheese&am=
p;topping=3Dmushroom&delivery=3D19%3A00&comments=3D</p=
re>
+
+
+  <h5 id=3Dclient-side-form-validation><span class=3Dsecno>4=
.10.1.4 </span>Client-side form validation</h5>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <p>Forms can be annotated in such a way that the user agent will=
 check the user's input before the
+  form is submitted. The server still has to verify the input is valid (=
since hostile users can
+  easily bypass the form validation), but it allows the user to avoid th=
e wait incurred by having
+  the server be the sole checker of the user's input.</p>
+
+  <p>The simplest annotation is the <code title=3Dattr-input-re=
quired><a href=3D#attr-input-required>required</a></cod=
e> attribute,
+  which can be specified on <code><a href=3D#the-input-element&=
gt;input</a></code> elements to indicate that the form is not=
 to be
+  submitted until a value is given. By adding this attribute to the cust=
omer name, pizza size, and
+  delivery time fields, we allow the user agent to notify the user when =
the user submits the form
+  without filling in those fields:</p>
+
+  <pre><form method=3D"post"
+      enctype=3D"application/x-www-form-urlencoded"
+      action=3D"https://pizza.example.com/order.cgi">
+ <p><label>Customer name: <input name=
=3D"custname"<strong> required</strong>>&amp=
;lt;/label></p>
+ <p><label>Telephone: <input type=3Dt=
el name=3D"custtel"></label></p&amp=
;gt;
+ <p><label>E-mail address: <input typ=
e=3Demail name=3D"custemail"></label>&=
lt;/p>
+ <fieldset>
+  <legend> Pizza Size </legend>
+  <p><label> <input type=3Dradio name=
=3Dsize<strong> required</strong> value=3D"small"&a=
mp;gt; Small </label></p>
+  <p><label> <input type=3Dradio name=
=3Dsize<strong> required</strong> value=3D"medium"&=
amp;gt; Medium </label></p>
+  <p><label> <input type=3Dradio name=
=3Dsize<strong> required</strong> value=3D"large"&a=
mp;gt; Large </label></p>
+ </fieldset>
+ <fieldset>
+  <legend> Pizza Toppings </legend>
+  <p><label> <input type=3Dcheckbox n=
ame=3D"topping" value=3D"bacon"> Bacon &lt=
;/label></p>
+  <p><label> <input type=3Dcheckbox n=
ame=3D"topping" value=3D"cheese"> Extra Cheese=
 </label></p>
+  <p><label> <input type=3Dcheckbox n=
ame=3D"topping" value=3D"onion"> Onion &lt=
;/label></p>
+  <p><label> <input type=3Dcheckbox n=
ame=3D"topping" value=3D"mushroom"> Mushroom &=
amp;lt;/label></p>
+ </fieldset>
+ <p><label>Preferred delivery time: <=
input type=3Dtime min=3D"11:00" max=3D"21:00" step=3D=
"900" name=3D"delivery"<strong> required</st=
rong>></label></p>
+ <p><label>Delivery instructions: <te=
xtarea name=3D"comments"></textarea>&l=
t;/label></p>
+ <p><button>Submit order</button&=
gt;</p>
+</form></pre>
+
+  <p>It is also possible to limit the length of the input, using t=
he <code title=3Dattr-fe-maxlength><a href=3D#attr-fe-maxlength&=
gt;maxlength</a></code> attribute. By adding this to the <=
code><a href=3D#the-textarea-element>textarea</a></code=
>
+  element, we can limit users to 1000 characters, preventing them from w=
riting huge essays to the
+  busy delivery drivers instead of staying focused and to the point:<=
/p>
+
+  <pre><form method=3D"post"
+      enctype=3D"application/x-www-form-urlencoded"
+      action=3D"https://pizza.example.com/order.cgi">
+ <p><label>Customer name: <input name=
=3D"custname" required></label></p&=
amp;gt;
+ <p><label>Telephone: <input type=3Dt=
el name=3D"custtel"></label></p&amp=
;gt;
+ <p><label>E-mail address: <input typ=
e=3Demail name=3D"custemail"></label>&=
lt;/p>
+ <fieldset>
+  <legend> Pizza Size </legend>
+  <p><label> <input type=3Dradio name=
=3Dsize required value=3D"small"> Small </label&a=
mp;gt;</p>
+  <p><label> <input type=3Dradio name=
=3Dsize required value=3D"medium"> Medium </label=
></p>
+  <p><label> <input type=3Dradio name=
=3Dsize required value=3D"large"> Large </label&a=
mp;gt;</p>
+ </fieldset>
+ <fieldset>
+  <legend> Pizza Toppings </legend>
+  <p><label> <input type=3Dcheckbox n=
ame=3D"topping" value=3D"bacon"> Bacon &lt=
;/label></p>
+  <p><label> <input type=3Dcheckbox n=
ame=3D"topping" value=3D"cheese"> Extra Cheese=
 </label></p>
+  <p><label> <input type=3Dcheckbox n=
ame=3D"topping" value=3D"onion"> Onion &lt=
;/label></p>
+  <p><label> <input type=3Dcheckbox n=
ame=3D"topping" value=3D"mushroom"> Mushroom &=
amp;lt;/label></p>
+ </fieldset>
+ <p><label>Preferred delivery time: <=
input type=3Dtime min=3D"11:00" max=3D"21:00" step=3D=
"900" name=3D"delivery" required></labe=
l></p>
+ <p><label>Delivery instructions: <te=
xtarea name=3D"comments"<strong> maxlength=3D1000</str=
ong>></textarea></label></p&=
amp;gt;
+ <p><button>Submit order</button&=
gt;</p>
+</form></pre>
+
+  <p class=3Dnote>When a form is submitted, <code title=3Devent=
-invalid>invalid</code> events are
+  fired at each form control that is invalid, and then at the <code&g=
t;<a href=3D#the-form-element>form</a></code> element i=
tself. This
+  can be useful for displaying a summary of the problems with the form, =
since typically the browser
+  itself will only report one problem at a time.</p>
+
+
+
+  <h5 id=3Denabling-client-side-automatic-filling-of-form-controls&gt=
;<span class=3Dsecno>4.10.1.5 </span>Enabling client-side aut=
omatic filling of form controls</h5>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <p>Some browsers attempt to aid the user by automatically fillin=
g form controls rather than having
+  the user reenter their information each time. For example, a field ask=
ing for the user's telephone
+  number can be automatically filled with the user's phone number.</p=
>
+
+  <p>To help the user agent with this, we can tell it what the fie=
ld is using the <code title=3Dattr-fe-autocomplete><a href=3D#at=
tr-fe-autocomplete>autocomplete</a></code> attribute. In t=
he case of this form, we have
+  three fields that can be usefully annotated in this way: the informati=
on about who the pizza is to
+  be delivered to. Adding this information looks like this:</p>
+
+  <pre><form method=3D"post"
+      enctype=3D"application/x-www-form-urlencoded"
+      action=3D"https://pizza.example.com/order.cgi">
+ <p><label>Customer name: <input name=
=3D"custname" required <strong>autocomplete=3D"shipp=
ing name"</strong>></label></p&amp=
;gt;
+ <p><label>Telephone: <input type=3Dt=
el name=3D"custtel" <strong>autocomplete=3D"shipping=
 tel"</strong>></label></p>
+ <p><label>E-mail address: <input typ=
e=3Demail name=3D"custemail" <strong>autocomplete=3D&quot=
;shipping email"</strong>></label>&lt=
;/p>
+ <fieldset>
+  <legend> Pizza Size </legend>
+  <p><label> <input type=3Dradio name=
=3Dsize required value=3D"small"> Small </label&a=
mp;gt;</p>
+  <p><label> <input type=3Dradio name=
=3Dsize required value=3D"medium"> Medium </label=
></p>
+  <p><label> <input type=3Dradio name=
=3Dsize required value=3D"large"> Large </label&a=
mp;gt;</p>
+ </fieldset>
+ <fieldset>
+  <legend> Pizza Toppings </legend>
+  <p><label> <input type=3Dcheckbox n=
ame=3D"topping" value=3D"bacon"> Bacon &lt=
;/label></p>
+  <p><label> <input type=3Dcheckbox n=
ame=3D"topping" value=3D"cheese"> Extra Cheese=
 </label></p>
+  <p><label> <input type=3Dcheckbox n=
ame=3D"topping" value=3D"onion"> Onion &lt=
;/label></p>
+  <p><label> <input type=3Dcheckbox n=
ame=3D"topping" value=3D"mushroom"> Mushroom &=
amp;lt;/label></p>
+ </fieldset>
+ <p><label>Preferred delivery time: <=
input type=3Dtime min=3D"11:00" max=3D"21:00" step=3D=
"900" name=3D"delivery" required></labe=
l></p>
+ <p><label>Delivery instructions: <te=
xtarea name=3D"comments" maxlength=3D1000></texta=
rea></label></p>
+ <p><button>Submit order</button&=
gt;</p>
+</form></pre>
+
+
+  <h5 id=3Dimproving-the-user-experience-on-mobile-devices><spa=
n class=3Dsecno>4.10.1.6 </span>Improving the user experience on=
 mobile devices</h5>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <p>Some devices, in particular those with on-screen keyboards an=
d those in locales with languages
+  with many characters (e.g. Japanese), can provide the user with multip=
le input modalities. For
+  example, when typing in a credit card number the user may wish to only=
 see keys for digits 0-9,
+  while when typing in their name they may wish to see a form field that=
 by default capitalises each
+  word.</p>
+
+  <p>Using the <code title=3Dattr-fe-inputmode><a href=3D=
#attr-fe-inputmode>inputmode</a></code> attribute we can s=
elect appropriate
+  input modalities:</p>
+
+  <pre><form method=3D"post"
+      enctype=3D"application/x-www-form-urlencoded"
+      action=3D"https://pizza.example.com/order.cgi">
+ <p><label>Customer name: <input name=
=3D"custname" required autocomplete=3D"shipping name"=
 <strong>inputmode=3D"latin-name"</strong>>&=
amp;lt;/label></p>
+ <p><label>Telephone: <input type=3Dt=
el name=3D"custtel" autocomplete=3D"shipping tel"&amp=
;gt;</label></p>
+ <p><label>E-mail address: <input typ=
e=3Demail name=3D"custemail" autocomplete=3D"shipping emai=
l"></label></p>
+ <fieldset>
+  <legend> Pizza Size </legend>
+  <p><label> <input type=3Dradio name=
=3Dsize required value=3D"small"> Small </label&a=
mp;gt;</p>
+  <p><label> <input type=3Dradio name=
=3Dsize required value=3D"medium"> Medium </label=
></p>
+  <p><label> <input type=3Dradio name=
=3Dsize required value=3D"large"> Large </label&a=
mp;gt;</p>
+ </fieldset>
+ <fieldset>
+  <legend> Pizza Toppings </legend>
+  <p><label> <input type=3Dcheckbox n=
ame=3D"topping" value=3D"bacon"> Bacon &lt=
;/label></p>
+  <p><label> <input type=3Dcheckbox n=
ame=3D"topping" value=3D"cheese"> Extra Cheese=
 </label></p>
+  <p><label> <input type=3Dcheckbox n=
ame=3D"topping" value=3D"onion"> Onion &lt=
;/label></p>
+  <p><label> <input type=3Dcheckbox n=
ame=3D"topping" value=3D"mushroom"> Mushroom &=
amp;lt;/label></p>
+ </fieldset>
+ <p><label>Preferred delivery time: <=
input type=3Dtime min=3D"11:00" max=3D"21:00" step=3D=
"900" name=3D"delivery" required></labe=
l></p>
+ <p><label>Delivery instructions: <te=
xtarea name=3D"comments" maxlength=3D1000 <strong>inputmo=
de=3D"latin-prose"</strong>></textarea&=
gt;</label></p>
+ <p><button>Submit order</button&=
gt;</p>
+</form></pre>
+
+
+
+  <h5 id=3Dthe-difference-between-the-field-type,-the-autofill-field-=
name,-and-the-input-modality><span class=3Dsecno>4.10.1.7 </s=
pan>The difference between the field type, the autofill field name, an=
d the input modality</h5>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <p>The <code title=3Dattr-input-type><a href=3D#attr-in=
put-type>type</a></code>, <code title=3Dattr-fe-autocom=
plete><a href=3D#attr-fe-autocomplete>autocomplete</a><=
/code>, and <code title=3Dattr-fe-inputmode><a href=3D#attr-f=
e-inputmode>inputmode</a></code> attributes can seem confu=
singly similar. For instance,
+  in all three cases, the string "<code title=3D"">=
email</code>" is a valid value. This section
+  attempts to illustrate the difference between the three attributes and=
 provides advice suggesting
+  how to use them.</p>
+
+  <p>The <code title=3Dattr-input-type><a href=3D#attr-in=
put-type>type</a></code> attribute on <code><a hr=
ef=3D#the-input-element>input</a></code> elements decides
+  what kind of control the user agent will use to expose the field. Choo=
sing between different
+  values of this attribute is the same choice as choosing whether to use=
 an <code><a href=3D#the-input-element>input</a></co=
de>
+  element, a <code><a href=3D#the-textarea-element>textarea&=
lt;/a></code> element, a <code><a href=3D#the-select-el=
ement>select</a></code> element, a <code><a href=3D=
#the-keygen-element>keygen</a></code>
+  element, etc.</p>
+
+  <p>The <code title=3Dattr-fe-autocomplete><a href=3D#at=
tr-fe-autocomplete>autocomplete</a></code> attribute, in c=
ontrast, describes
+  what the value that the user will enter actually represents. Choosing =
between different values of
+  this attribute is the same choice as choosing what the label for the e=
lement will be.</p>
+
+  <p>First, consider telephone numbers. If a page is asking for a =
telephone number from the user,
+  the right form control to use is <code title=3Dattr-input-type-tel&=
gt;<a href=3D"#telephone-state-(type=3Dtel)"><inpu=
t type=3Dtel></a></code>.
+  However, which <code title=3Dattr-fe-autocomplete><a href=3D#=
attr-fe-autocomplete>autocomplete</a></code> value to use =
depends on
+  which phone number the page is asking for, whether they expect a telep=
hone number in the
+  international format or just the local format, and so forth.</p>
+
+  <p>For example, a page that forms part of a checkout process on =
an e-commerce site for a customer
+  buying a gift to be shipped to a friend might need both the buyer's te=
lephone number (in case of
+  payment issues) and the friend's telephone number (in case of delivery=
 issues). If the site
+  expects international phone numbers (with the country code prefix), th=
is could thus look like
+  this:</p>
+
+  <pre><p><label>Your phone number: &a=
mp;lt;input type=3Dtel name=3Dcusttel autocomplete=3D"billing tel&qu=
ot;></label>
+<p><label>Recipient's phone number: <=
input type=3Dtel name=3Dshiptel autocomplete=3D"shipping tel"&a=
mp;gt;</label>
+<p>Please enter complete phone numbers including the count=
ry code prefix, as in "+1 555 123 4567".</pre>
+
+  <p>But if the site only supports British customers and recipient=
s, it might instead look like this
+  (notice the use of <code title=3Dattr-fe-autocomplete-tel-national&=
gt;<a href=3D#attr-fe-autocomplete-tel-national>tel-national</a&=
gt;</code> rather than
+  <code title=3Dattr-fe-autocomplete-tel><a href=3D#attr-fe-aut=
ocomplete-tel>tel</a></code>):</p>
+
+  <pre><p><label>Your phone number: &a=
mp;lt;input type=3Dtel name=3Dcusttel autocomplete=3D"billing tel-na=
tional"></label>
+<p><label>Recipient's phone number: <=
input type=3Dtel name=3Dshiptel autocomplete=3D"shipping tel-nationa=
l"></label>
+<p>Please enter complete UK phone numbers, as in "(01=
632) 960 123".</pre>
+
+  <p>Now, consider a person's preferred languages. The right <c=
ode title=3Dattr-fe-autocomplete><a href=3D#attr-fe-autocomplete&gt=
;autocomplete</a></code> value is <code title=3Dattr-fe-au=
tocomplete-language><a href=3D#attr-fe-autocomplete-language>lan=
guage</a></code>. However, there could be a number of
+  different form controls used for the purpose: a free text field (<c=
ode title=3Dattr-input-type-text><a href=3D"#text-(type=3Dtext=
)-state-and-search-state-(type=3Dsearch)"><input type=3Dte=
xt></a></code>), a drop-down list (<code title=3Dse=
lect><a href=3D#the-select-element><select></a&=
gt;</code>), radio buttons (<code title=3Dattr-input-type-radio&=
gt;<a href=3D"#radio-button-state-(type=3Dradio)">&lt=
;input
+  type=3Dradio></a></code>), etc. It only depends on =
what kind of interface is desired.</p>
+
+  <p>The <code title=3Dattr-fe-inputmode><a href=3D#attr-=
fe-inputmode>inputmode</a></code> decides what kind of inp=
ut modality (e.g.
+  keyboard) to use, when the control is a free-form text field.</p&gt=
;
+
+  <p>Consider names. If a page just wants one name from the user, =
then the relevant control is <code title=3Dattr-input-type-text>&lt=
;a href=3D"#text-(type=3Dtext)-state-and-search-state-(type=3Dsearch=
)"><input type=3Dtext></a></code>. If t=
he page is asking for the user's
+  full name, then the relevant <code title=3Dattr-fe-autocomplete>=
<a href=3D#attr-fe-autocomplete>autocomplete</a></code>=
 value is <code title=3Dattr-fe-autocomplete-name><a href=3D#att=
r-fe-autocomplete-name>name</a></code>. But if the user is=
 Japanese, and the page is asking
+  for the user's Japanese name and the user's romanized name, then it wo=
uld be helpful to the user
+  if the first field defaulted to a Japanese input modality, while the s=
econd defaulted to a Latin
+  input modality (ideally with automatic capitalization of each word). T=
his is where the <code title=3Dattr-fe-inputmode><a href=3D#attr=
-fe-inputmode>inputmode</a></code> attribute can help:<=
/p>
+
+  <pre><p><label>Japanese name: &l=
t;input name=3D"j" type=3D"text" autocomplete=3D&quot=
;section-jp name" inputmode=3D"kana"></label=
>
+<label>Romanized name: <input name=3D"e" =
type=3D"text" autocomplete=3D"section-en name" inputm=
ode=3D"latin-name"></label></pre>
+
+  <p>In this example, the "<code title=3Dattr-fe-autocompl=
ete-section>section-*</code>" keywords in
+  the <code title=3Dattr-fe-autocomplete><a href=3D#attr-fe-aut=
ocomplete>autocomplete</a></code> attributes' values tell =
the user agent
+  that the two fields expect <em>different</em> names. Witho=
ut them, the user agent could
+  automatically fill the second field with the value given in the first =
field when the user gave a
+  value to the first field.</p>
+
+  <p class=3Dnote>The "<code title=3D"">-jp&l=
t;/code>" and "<code title=3D"">-en</code=
>" parts of the
+  keywords are opaque to the user agent; the user agent cannot guess, fr=
om those, that the two names
+  are expected to be in Japanese and English respectively.</p>
+
+
+  <h5 id=3Dinput-author-notes><span class=3Dsecno>4.10.1.8 &=
lt;/span>Date, time, and number formats</h5>
+  <!-- ID referenced from other parts of the spec -->
+
+  <p><i>This section is non-normative.</i></p>
+
+  <p>In this pizza delivery example, the times are specified in th=
e format "HH:MM": two digits for
+  the hour, in 24-hour format, and two digits for the time. (Seconds cou=
ld also be specified, though
+  they are not necessary in this example.)</p>
+
+  <p>In some locales, however, times are often expressed different=
ly when presented to users. For
+  example, in the United States, it is still common to use the 12-hour c=
lock with an am/pm
+  indicator, as in "2pm". In France, it is common to separate =
the hours from the minutes using an
+  "h" character, as in "14h00".</p>
+
+  <p>Similar issues exist with dates, with the added complication =
that even the order of the
+  components is not always consistent — for example, in Cyprus=
 the first of February 2003
+  would typically be written "1/2/03", while that same date in=
 Japan would typically be written as
+  "2003年02月01日" — a=
nd even with numbers, where locales differ, for
+  example, in what punctuation is used as the decimal separator and the =
thousands separator.</p>
+
+  <p>It is therefore important to distinguish the time, date, and =
number formats used in HTML and in
+  form submissions, which are always the formats defined in this specifi=
cation (and based on the
+  well-established ISO 8601 standard for computer-readable date and time=
 formats), from the time,
+  date, and number formats presented to the user by the browser and acce=
pted as input from the user
+  by the browser.</p>
+
+  <p>The format used "on the wire", i.e. in HTML markup =
and in form submissions, is intended to be
+  computer-readable and consistent irrespective of the user's locale. Da=
tes, for instance, are
+  always written in the format "YYYY-MM-DD", as in "2003-=
02-01". Users are not expected to ever see
+  this format.</p>
+
+  <p>The time, date, or number given by the page in the wire forma=
t is then translated to the user's
+  preferred presentation (based on user preferences or on the locale of =
the page itself), before
+  being displayed to the user. Similarly, after the user inputs a time, =
date, or number using their
+  preferred format, the user agent converts it back to the wire format b=
efore putting it in the DOM
+  or submitting it.</p>
+
+  <p>This allows scripts in pages and on servers to process times,=
 dates, and numbers in a
+  consistent manner without needing to support dozens of different forma=
ts, while still supporting
+  the users' needs.</p>
+
+  <div class=3Dimpl>
+  <p class=3Dnote>See also the <a href=3D#input-impl-notes>i=
mplementation notes</a> regarding
+  localization of form controls.</p>
+  </div>
+
+
+  <h4 id=3Dcategories><span class=3Dsecno>4.10.2 </span&g=
t;Categories</h4>
+
+  <p>Mostly for historical reasons, elements in this section fall =
into several overlapping (but
+  subtly different) categories in addition to the usual ones like <a =
href=3D#flow-content>flow content</a>,
+  <a href=3D#phrasing-content>phrasing content</a>, and <=
a href=3D#interactive-content>interactive content</a>.</p>
+
+  <p>A number of the elements are <dfn id=3Dform-associated-ele=
ment title=3D"form-associated element">form-associated
+  elements</dfn>, which means they can have a <a href=3D#form-o=
wner>form owner</a>.
+
+  <!-- when updating this also update the category index -->
+  <ul class=3D"brief category-list"><li><code&g=
t;<a href=3D#the-button-element>button</a></code></l=
i>
+   <li><code><a href=3D#the-fieldset-element>fieldset&=
lt;/a></code></li>
+   <li><code><a href=3D#the-input-element>input</a&=
gt;</code></li>
+   <li><code><a href=3D#the-keygen-element>keygen</=
a></code></li>
+   <li><code><a href=3D#the-label-element>label</a&=
gt;</code></li>
+   <li><code><a href=3D#the-object-element>object</=
a></code></li>
+   <li><code><a href=3D#the-output-element>output</=
a></code></li>
+   <li><code><a href=3D#the-select-element>select</=
a></code></li>
+   <li><code><a href=3D#the-textarea-element>textarea&=
lt;/a></code></li>
+   <li><code><a href=3D#the-img-element>img</a>&=
lt;/code></li>
+  </ul><p>The <a href=3D#form-associated-element title=3D=
"form-associated element">form-associated elements</a>=
 fall into several
+  subcategories:</p>
+
+  <dl><dt><dfn id=3Dcategory-listed title=3Dcategory-list=
ed>Listed elements</dfn></dt>
+
+   <dd>
+
+    <p>Denotes elements that are listed in the <code title=3Ddo=
m-form-elements><a href=3D#dom-form-elements><var title=3D&qu=
ot;">form</var>.elements</a></code> and <cod=
e title=3Ddom-fieldset-elements><a href=3D#dom-fieldset-elements&gt=
;<var title=3D"">fieldset</var>.elements</a>&=
lt;/code> APIs.</p>
+
+    <!-- when updating this also update the category index -->
+    <ul class=3D"brief category-list"><li><code=
><a href=3D#the-button-element>button</a></code><=
/li>
+     <li><code><a href=3D#the-fieldset-element>fieldse=
t</a></code></li>
+     <li><code><a href=3D#the-input-element>input</=
a></code></li>
+     <li><code><a href=3D#the-keygen-element>keygen&lt=
;/a></code></li>
+     <li><code><a href=3D#the-object-element>object&lt=
;/a></code></li>
+     <li><code><a href=3D#the-output-element>output&lt=
;/a></code></li>
+     <li><code><a href=3D#the-select-element>select&lt=
;/a></code></li>
+     <li><code><a href=3D#the-textarea-element>textare=
a</a></code></li>
+    </ul></dd>
+
+   <dt><dfn id=3Dcategory-submit title=3Dcategory-submit>Sub=
mittable elements</dfn></dt>
+
+   <dd>
+
+    <p>Denotes elements that can be used for <a href=3D#constru=
cting-form-data-set>constructing the
+    form data set</a> when a <code><a href=3D#the-form-el=
ement>form</a></code> element is <a href=3D#concept-for=
m-submit title=3Dconcept-form-submit>submitted</a>.</p>
+
+    <!-- when updating this also update the category index -->
+    <ul class=3D"brief category-list"><li><code=
><a href=3D#the-button-element>button</a></code><=
/li>
+     <li><code><a href=3D#the-input-element>input</=
a></code></li>
+     <li><code><a href=3D#the-keygen-element>keygen&lt=
;/a></code></li>
+     <li><code><a href=3D#the-object-element>object&lt=
;/a></code></li>
+     <li><code><a href=3D#the-select-element>select&lt=
;/a></code></li>
+     <li><code><a href=3D#the-textarea-element>textare=
a</a></code></li>
+    </ul><p>Some <a href=3D#category-submit title=3Dcateg=
ory-submit>submittable elements</a> can be, depending on their
+    attributes, <dfn id=3Dconcept-button title=3Dconcept-button>bu=
ttons</dfn>. The prose below defines when an element
+    is a button. Some buttons are specifically <dfn id=3Dconcept-subm=
it-button title=3Dconcept-submit-button>submit
+    buttons</dfn>.</p>
+
+   </dd>
+
+   <dt><dfn id=3Dcategory-reset title=3Dcategory-reset>Reset=
table elements</dfn></dt>
+
+   <dd>
+
+    <p>Denotes elements that can be affected when a <code>&l=
t;a href=3D#the-form-element>form</a></code> element is &l=
t;a href=3D#concept-form-reset title=3Dconcept-form-reset>reset</a&=
gt;.</p>
+
+    <!-- when updating this also update the category index -->
+    <ul class=3D"brief category-list"><li><code=
><a href=3D#the-input-element>input</a></code></l=
i>
+     <li><code><a href=3D#the-keygen-element>keygen&lt=
;/a></code></li>
+     <li><code><a href=3D#the-output-element>output&lt=
;/a></code></li>
+     <li><code><a href=3D#the-select-element>select&lt=
;/a></code></li>
+     <li><code><a href=3D#the-textarea-element>textare=
a</a></code></li>
+    </ul></dd>
+
+   <dt><dfn id=3Dcategory-form-attr title=3Dcategory-form-attr&=
gt;Reassociateable elements</dfn></dt>
+
+   <dd>
+
+    <p>Denotes elements that have a <code title=3Dattr-fae-form=
><a href=3D#attr-fae-form>form</a></code> content at=
tribute, and a
+    matching <code title=3Ddom-fae-form><a href=3D#dom-fae-form=
>form</a></code> IDL attribute, that allow authors to spec=
ify an
+    explicit <a href=3D#form-owner>form owner</a>.</p>
+
+    <!-- when updating this also update the category index -->
+    <ul class=3D"brief category-list"><li><code=
><a href=3D#the-button-element>button</a></code><=
/li>
+     <li><code><a href=3D#the-fieldset-element>fieldse=
t</a></code></li>
+     <li><code><a href=3D#the-input-element>input</=
a></code></li>
+     <li><code><a href=3D#the-keygen-element>keygen&lt=
;/a></code></li>
+     <li><code><a href=3D#the-label-element>label</=
a></code></li>
+     <li><code><a href=3D#the-object-element>object&lt=
;/a></code></li>
+     <li><code><a href=3D#the-output-element>output&lt=
;/a></code></li>
+     <li><code><a href=3D#the-select-element>select&lt=
;/a></code></li>
+     <li><code><a href=3D#the-textarea-element>textare=
a</a></code></li>
+    </ul></dd>
+
+  </dl><p>Some elements, not all of them <a href=3D#form-=
associated-element title=3D"form-associated element">form-as=
sociated</a>,
+  are categorized as <dfn id=3Dcategory-label title=3Dcategory-label&=
gt;labelable elements</dfn>. These are elements that
+  can be associated with a <code><a href=3D#the-label-element&g=
t;label</a></code> element.
+
+  <!-- when updating this also update the category index -->
+  <ul class=3D"brief category-list"><li><code&g=
t;<a href=3D#the-button-element>button</a></code></l=
i>
+   <li><code><a href=3D#the-input-element>input</a&=
gt;</code> (if the <code title=3Dattr-input-type><a href=3D=
#attr-input-type>type</a></code> attribute is <em>no=
t</em> in the <a href=3D"#hidden-state-(type=3Dhidden)&quot=
; title=3Dattr-input-type-hidden>Hidden</a> state)</li>
+   <li><code><a href=3D#the-keygen-element>keygen</=
a></code></li>
+   <li><code><a href=3D#the-meter-element>meter</a&=
gt;</code></li>
+   <li><code><a href=3D#the-output-element>output</=
a></code></li>
+   <li><code><a href=3D#the-progress-element>progress&=
lt;/a></code></li>
+   <li><code><a href=3D#the-select-element>select</=
a></code></li>
+   <li><code><a href=3D#the-textarea-element>textarea&=
lt;/a></code></li>
+  </ul><h4 id=3Dthe-form-element><span class=3Dsecno>4=
.10.3 </span>The <dfn><code>form</code></dfn&g=
t; element</h4>
+
+  <dl class=3Delement><dt><a href=3D#element-dfn-categori=
es title=3Delement-dfn-categories>Categories</a>:</dt>
+   <dd><a href=3D#flow-content>Flow content</a>.</d=
d>
+   <dd><a href=3D#palpable-content>Palpable content</a&gt=
;.</dd>
+   <dt><a href=3D#element-dfn-contexts title=3Delement-dfn-cont=
exts>Contexts in which this element can be used</a>:</dt>
+   <dd>Where <a href=3D#flow-content>flow content</a> =
is expected.</dd>
+   <dt><a href=3D#element-dfn-content-model title=3Delement-dfn=
-content-model>Content model</a>:</dt>
+   <dd><a href=3D#flow-content>Flow content</a>, but w=
ith no <code><a href=3D#the-form-element>form</a></c=
ode> element descendants.</dd>
+   <dt><a href=3D#element-dfn-tag-omission title=3Delement-dfn-=
tag-omission>Tag omission in text/html</a>:</dt>
+   <dd>Neither tag is omissible.</dd>
+   <dt><a href=3D#element-dfn-attributes title=3Delement-dfn-at=
tributes>Content attributes</a>:</dt>
+   <dd><a href=3D#global-attributes>Global attributes</a&=
gt;</dd>
+   <dd><code title=3Dattr-form-accept-charset><a href=3D#=
attr-form-accept-charset>accept-charset</a></code> &md=
ash; Character encodings to use for <a href=3D#form-submission>form=
 submission</a></dd>
+   <dd><code title=3Dattr-fs-action><a href=3D#attr-fs-ac=
tion>action</a></code> — <a href=3D#url>UR=
L</a> to use for <a href=3D#form-submission>form submission&l=
t;/a></dd>
+   <dd><code title=3Dattr-form-autocomplete><a href=3D#at=
tr-form-autocomplete>autocomplete</a></code> — D=
efault setting for autofill feature for controls in the form</dd>
+   <dd><code title=3Dattr-fs-enctype><a href=3D#attr-fs-e=
nctype>enctype</a></code> — Form data set encodi=
ng type to use for <a href=3D#form-submission>form submission</a=
></dd>
+   <dd><code title=3Dattr-fs-method><a href=3D#attr-fs-me=
thod>method</a></code> — HTTP method to use for =
<a href=3D#form-submission>form submission</a></dd>
+   <dd><code title=3Dattr-form-name><a href=3D#attr-form-=
name>name</a></code> — Name of form to use in th=
e <code title=3Ddom-document-forms><a href=3D#dom-document-forms=
>document.forms</a></code> API</dd>
+   <dd><code title=3Dattr-fs-novalidate><a href=3D#attr-f=
s-novalidate>novalidate</a></code> — Bypass form=
 control validation for <a href=3D#form-submission>form submission&=
lt;/a></dd>
+   <dd><code title=3Dattr-fs-target><a href=3D#attr-fs-ta=
rget>target</a></code> — <a href=3D#browsing-=
context>Browsing context</a> for <a href=3D#form-submission&g=
t;form submission</a></dd>
+   <dt><a href=3D#element-dfn-dom title=3Delement-dfn-dom>DO=
M interface</a>:</dt><!--TOPIC:DOM APIs-->
+   <dd>
+<pre class=3Didl>[OverrideBuiltins]
+interface <dfn id=3Dhtmlformelement>HTMLFormElement</dfn> : =
<a href=3D#htmlelement>HTMLElement</a> {
+           attribute DOMString <a href=3D#dom-form-acceptcharset titl=
e=3Ddom-form-acceptCharset>acceptCharset</a>;
+           attribute DOMString <a href=3D#dom-fs-action title=3Ddom-f=
s-action>action</a>;
+           attribute DOMString <a href=3D#dom-form-autocomplete title=
=3Ddom-form-autocomplete>autocomplete</a>;
+           attribute DOMString <a href=3D#dom-fs-enctype title=3Ddom-=
fs-enctype>enctype</a>;
+           attribute DOMString <a href=3D#dom-fs-encoding title=3Ddom=
-fs-encoding>encoding</a>;<!-- historical artefact -->
+           attribute DOMString <a href=3D#dom-fs-method title=3Ddom-f=
s-method>method</a>;
+           attribute DOMString <a href=3D#dom-form-name title=3Ddom-f=
orm-name>name</a>;
+           attribute boolean <a href=3D#dom-fs-novalidate title=3Ddom=
-fs-noValidate>noValidate</a>;
+           attribute DOMString <a href=3D#dom-fs-target title=3Ddom-f=
s-target>target</a>;
+
+  readonly attribute <a href=3D#htmlformcontrolscollection>HTMLFor=
mControlsCollection</a> <a href=3D#dom-form-elements title=3Ddom=
-form-elements>elements</a>;
+  readonly attribute long <a href=3D#dom-form-length title=3Ddom-form=
-length>length</a>;
+  <a href=3D#dom-form-item title=3Ddom-form-item>getter</a> =
<a href=3D#element>Element</a> (unsigned long index);
+  <a href=3D#dom-form-nameditem title=3Ddom-form-namedItem>getter&=
lt;/a> (<a href=3D#radionodelist>RadioNodeList</a> or <=
a href=3D#element>Element</a>) (DOMString name);
+
+  void <a href=3D#dom-form-submit title=3Ddom-form-submit>submit&l=
t;/a>();
+  void <a href=3D#dom-form-reset title=3Ddom-form-reset>reset</=
a>();
+  boolean <a href=3D#dom-form-checkvalidity title=3Ddom-form-checkVal=
idity>checkValidity</a>();
+  boolean <a href=3D#dom-form-reportvalidity title=3Ddom-form-reportV=
alidity>reportValidity</a>();
+};</pre>
+   </dd>
+  </dl><!--TOPIC:HTML--><p>The <code><a href=3D=
#the-form-element>form</a></code> element <a href=3D#re=
presents>represents</a> a collection of <a href=3D#form-assoc=
iated-element title=3D"form-associated element">form-associa=
ted elements</a>, some of which can represent
+  editable values that can be submitted to a server for processing.</=
p>
+
+  <p>The <dfn id=3Dattr-form-accept-charset title=3Dattr-form-a=
ccept-charset><code>accept-charset</code></dfn> attr=
ibute gives the
+  character encodings that are to be used for the submission. If specifi=
ed, the value must be an
+  <a href=3D#ordered-set-of-unique-space-separated-tokens>ordered =
set of unique space-separated tokens</a> that are <a href=3D#asc=
ii-case-insensitive>ASCII
+  case-insensitive</a>, and each token must be an <a href=3D#as=
cii-case-insensitive>ASCII case-insensitive</a> match for
+  one of the <a href=3D#encoding-label title=3D"encoding label&q=
uot;>labels</a> of an <a href=3D#ascii-compatible-character-e=
ncoding>ASCII-compatible character
+  encoding</a>. <a href=3D#refsENCODING>[ENCODING]</a>=
</p>
+
+  <p>The <dfn id=3Dattr-form-name title=3Dattr-form-name>&lt=
;code>name</code></dfn> attribute represents the
+  <code><a href=3D#the-form-element>form</a></code&=
gt;'s name within the <code title=3Ddom-document-forms><a href=3D=
#dom-document-forms>forms</a></code> collection. The
+  value must not be the empty string, and the value must be unique among=
st the <code><a href=3D#the-form-element>form</a></c=
ode>
+  elements in the <code title=3Ddom-document-forms><a href=3D#d=
om-document-forms>forms</a></code> collection that it is i=
n, if
+  any.</p>
+
+  <p>The <dfn id=3Dattr-form-autocomplete title=3Dattr-form-aut=
ocomplete><code>autocomplete</code></dfn> attribute =
is an
+  <a href=3D#enumerated-attribute>enumerated attribute</a>. =
The attribute has two states. The <code title=3Dattr-form-autocomplete=
-on>on</code> keyword maps to the <dfn id=3Dattr-form-autocom=
plete-on-state title=3Dattr-form-autocomplete-on-state>on</dfn> =
state, and the <code title=3Dattr-form-autocomplete-off>off</cod=
e> keyword maps to the <dfn id=3Dattr-form-autocomplete-off-state t=
itle=3Dattr-form-autocomplete-off-state>off</dfn> state. The att=
ribute may also be omitted. The
+  <i>missing value default</i> is the <a href=3D#attr-for=
m-autocomplete-on-state title=3Dattr-form-autocomplete-on-state>on<=
/a> state.
+  The <a href=3D#attr-form-autocomplete-off-state title=3Dattr-form-a=
utocomplete-off-state>off</a> state indicates that by default,
+  form controls in the form will have their <a href=3D#autofill-field=
-name>autofill field name</a> set to "<code title=3Dattr=
-fe-autocomplete-off><a href=3D#attr-fe-autocomplete-off>off<=
/a></code>"; the <a href=3D#attr-form-autocomplete-on-st=
ate title=3Dattr-form-autocomplete-on-state>on</a> state indicat=
es that by default, form controls
+  in the form will have their <a href=3D#autofill-field-name>autof=
ill field name</a> set to "<code title=3Dattr-fe-autocomple=
te-on><a href=3D#attr-fe-autocomplete-on>on</a></code&g=
t;".</p>
+
+  <p>The <code title=3Dattr-fs-action><a href=3D#attr-fs-=
action>action</a></code>, <code title=3Dattr-fs-enctype=
><a href=3D#attr-fs-enctype>enctype</a></code>,
+  <code title=3Dattr-fs-method><a href=3D#attr-fs-method>met=
hod</a></code>, <code title=3Dattr-fs-novalidate><a =
href=3D#attr-fs-novalidate>novalidate</a></code>,
+  and <code title=3Dattr-fs-target><a href=3D#attr-fs-target&gt=
;target</a></code> attributes are <a href=3D#attributes-fo=
r-form-submission>attributes for form
+  submission</a>.</p>
+
+<!--TOPIC:DOM APIs-->
+  <dl class=3Ddomintro><dt><var title=3D"">f=
orm</var> . <code title=3Ddom-form-elements><a href=3D#dom=
-form-elements>elements</a></code></dt>
+
+   <dd>
+
+    <p>Returns an <code><a href=3D#htmlcollection>HTML=
Collection</a></code> of the form controls in the form (exclu=
ding image
+    buttons for historical reasons).</p>
+
+   </dd>
+
+   <dt><var title=3D"">form</var> . <code=
 title=3Ddom-form-length><a href=3D#dom-form-length>length</a=
></code></dt>
+
+   <dd>
+
+    <p>Returns the number of form controls in the form (excluding =
image buttons for historical
+    reasons).</p>
+
+   </dd>
+
+   <dt><var title=3D"">form</var>[<var ti=
tle=3D"">index</var>]</dt>
+
+   <dd>
+
+    <p>Returns the <var title=3D"">index</var&g=
t;th element in the form (excluding image buttons for
+    historical reasons).</p>
+
+   </dd>
+
+   <dt><var title=3D"">form</var>[<var ti=
tle=3D"">name</var>]</dt>
+
+   <dd>
+
+    <p>Returns the form control (or, if there are several, a <c=
ode><a href=3D#radionodelist>RadioNodeList</a></code&gt=
; of the form
+    controls) in the form with the given <a href=3D#concept-id title=3D=
concept-id>ID</a> or <code title=3Dattr-fe-name><a href=
=3D#attr-fe-name>name</a></code> (excluding image buttons =
for historical reasons); or, if there
+    are none, returns the <code><a href=3D#the-img-element>i=
mg</a></code> element with the given ID.</p>
+
+    <p>Once an element has been referenced using a particular name=
, that name will continue being
+    available as a way to reference that element in this method, even if=
 the element's actual <a href=3D#concept-id title=3Dconcept-id>ID&l=
t;/a> or <code title=3Dattr-fe-name><a href=3D#attr-fe-name&g=
t;name</a></code> changes, for as long as
+    the element remains in the <code><a href=3D#document>Doc=
ument</a></code>.</p>
+
+    <p>If there are multiple matching items, then a <code>&l=
t;a href=3D#radionodelist>RadioNodeList</a></code> object =
containing all
+    those elements is returned.</p>
+
+   </dd>
+
+   <dt><var title=3D"">form</var> . <code=
 title=3Ddom-form-submit><a href=3D#dom-form-submit>submit</a=
></code>()</dt>
+
+   <dd>
+
+    <p>Submits the form.</p>
+
+   </dd>
+
+   <dt><var title=3D"">form</var> . <code=
 title=3Ddom-form-reset><a href=3D#dom-form-reset>reset</a&gt=
;</code>()</dt>
+
+   <dd>
+
+    <p>Resets the form.</p>
+
+   </dd>
+
+   <dt><var title=3D"">form</var> . <code=
 title=3Ddom-form-checkValidity><a href=3D#dom-form-checkvalidity&g=
t;checkValidity</a></code>()</dt>
+
+   <dd>
+
+    <p>Returns true if the form's controls are all valid; otherwis=
e, returns false.</p>
+
+   </dd>
+
+   <dt><var title=3D"">form</var> . <code=
 title=3Ddom-form-reportValidity><a href=3D#dom-form-reportvalidity=
>reportValidity</a></code>()</dt>
+
+   <dd>
+
+    <p>Returns true if the form's controls are all valid; otherwis=
e, returns false and informs the user.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-form-autocomplete title=3Ddom-form-autoc=
omplete><code>autocomplete</code></dfn> IDL attribut=
e must
+  <a href=3D#reflect>reflect</a> the content attribute of th=
e same name, <a href=3D#limited-to-only-known-values>limited to onl=
y known
+  values</a>.</p>
+
+  <p>The <dfn id=3Ddom-form-name title=3Ddom-form-name><c=
ode>name</code></dfn> IDL attribute must <a href=3D#ref=
lect>reflect</a>
+  the content attribute of the same name.</p>
+
+  <p>The <dfn id=3Ddom-form-acceptcharset title=3Ddom-form-acce=
ptCharset><code>acceptCharset</code></dfn> IDL attri=
bute must
+  <a href=3D#reflect>reflect</a> the <code title=3Dattr-f=
orm-accept-charset><a href=3D#attr-form-accept-charset>accept-ch=
arset</a></code> content
+  attribute.</p>
+
+  <hr><p>The <dfn id=3Ddom-form-elements title=3Ddom-form=
-elements><code>elements</code></dfn> IDL attribute =
must return an
+  <code><a href=3D#htmlformcontrolscollection>HTMLFormContro=
lsCollection</a></code> rooted at the <code><a href=3D=
#document>Document</a></code> node while the
+  <code><a href=3D#the-form-element>form</a></code&=
gt; element is <a href=3D#in-a-document>in a <code>Document&l=
t;/code></a> and rooted at the
+  <code><a href=3D#the-form-element>form</a></code&=
gt; element itself when it is not, whose filter matches <a href=3D#cat=
egory-listed title=3Dcategory-listed>listed elements</a> whose &=
lt;a href=3D#form-owner>form owner</a> is the
+  <code><a href=3D#the-form-element>form</a></code&=
gt; element, with the exception of <code><a href=3D#the-input-el=
ement>input</a></code> elements whose <code title=3Datt=
r-input-type><a href=3D#attr-input-type>type</a></code&=
gt; attribute is in the <a href=3D"#image-button-state-(type=3Dim=
age)" title=3Dattr-input-type-image>Image
+  Button</a> state, which must, for historical reasons, be exclude=
d from this particular
+  collection.</p>
+
+  <p>The <dfn id=3Ddom-form-length title=3Ddom-form-length>&=
lt;code>length</code></dfn> IDL attribute must return the =
number
+  of nodes <a href=3D#represented-by-the-collection title=3D"rep=
resented by the collection">represented</a> by the <code=
 title=3Ddom-form-elements><a href=3D#dom-form-elements>elements=
</a></code> collection.</p>
+
+  <p>The <a href=3D#supported-property-indices>supported pro=
perty indices</a> at any instant are the indices supported by the
+  object returned by the <code title=3Ddom-form-elements><a hre=
f=3D#dom-form-elements>elements</a></code> attribute at th=
at
+  instant.</p>
+
+  <p>When a <code><a href=3D#the-form-element>form<=
/a></code> element is <dfn id=3Ddom-form-item title=3Ddom-for=
m-item>indexed for indexed property
+  retrieval</dfn>, the user agent must return the value returned b=
y the <code title=3Ddom-HTMLFormControlsCollection-item>item</co=
de> method on the <code title=3Ddom-form-elements><a href=3D#=
dom-form-elements>elements</a></code> collection, when inv=
oked with the given index as its
+  argument.</p>
+
+  <hr><!-- Welcome to crazy town. Population: The Web. -->&l=
t;p>Each <code><a href=3D#the-form-element>form</a>&=
lt;/code> element has a mapping of names to elements called the <df=
n id=3Dpast-names-map>past names
+  map</dfn>. It is used to persist names of controls even when the=
y change names.</p>
+
+  <p>The <a href=3D#supported-property-names>supported prope=
rty names</a> consist of the names obtained from the following
+  algorithm, in the order obtained from this algorithm:</p>
+
+  <ol><li><p>Let <var title=3D"">sourc=
ed names</var> be an initially empty ordered list of tuples
+   consisting of a string, an element, a source, where the source is eit=
her <i>id</i>, <i>name</i>,
+   or <i>past</i>, and, if the source is <i>past</i=
>, an age.</li>
+
+   <li>
+
+    <p>For each <a href=3D#category-listed title=3Dcategory-lis=
ted>listed element</a> <var title=3D"">candidate=
</var>
+    whose <a href=3D#form-owner>form owner</a> is the <co=
de><a href=3D#the-form-element>form</a></code> eleme=
nt, with the exception of any
+    <code><a href=3D#the-input-element>input</a></c=
ode> elements whose <code title=3Dattr-input-type><a href=3D#=
attr-input-type>type</a></code> attribute is in the
+    <a href=3D"#image-button-state-(type=3Dimage)" title=3D=
attr-input-type-image>Image Button</a> state, run these substeps=
:</p>
+
+    <ol><li><p>If <var title=3D"">cand=
idate</var> has an <code title=3Dattr-id><a href=3D#the-id=
-attribute>id</a></code> attribute, add
+     an entry to <var title=3D"">sourced names</var&g=
t; with that <code title=3Dattr-id><a href=3D#the-id-attribute&g=
t;id</a></code>
+     attribute's value as the string, <var title=3D"">ca=
ndidate</var> as the element, and <i>id</i> as
+     the source.</li>
+
+     <li><p>If <var title=3D"">candidate<=
/var> has a <code title=3Dattr-fe-name><a href=3D#attr-fe-nam=
e>name</a></code> attribute,
+     add an entry to <var title=3D"">sourced names</v=
ar> with that <code title=3Dattr-fe-name><a href=3D#attr-fe-n=
ame>name</a></code> attribute's value as the string, <v=
ar title=3D"">candidate</var>
+     as the element, and <i>name</i> as the source.</li&g=
t;
+
+    </ol></li>
+
+   <li>
+
+    <p>For each <code><a href=3D#the-img-element>img&l=
t;/a></code> element <var title=3D"">candidate&l=
t;/var> whose <a href=3D#form-owner>form owner</a>
+    is the <code><a href=3D#the-form-element>form</a>&=
lt;/code> element, run these substeps:</p>
+
+    <ol><!-- this is the same as the above list, except 'name' =
xrefs to something differnet --><li><p>If <var title=3D=
"">candidate</var> has an <code title=3Dattr-id>=
<a href=3D#the-id-attribute>id</a></code> attribute, ad=
d
+     an entry to <var title=3D"">sourced names</var&g=
t; with that <code title=3Dattr-id><a href=3D#the-id-attribute&g=
t;id</a></code>
+     attribute's value as the string, <var title=3D"">ca=
ndidate</var> as the element, and <i>id</i> as
+     the source.</li>
+
+     <li><p>If <var title=3D"">candidate<=
/var> has a <code title=3Dattr-img-name><a href=3D#attr-img-n=
ame>name</a></code> attribute,
+     add an entry to <var title=3D"">sourced names</v=
ar> with that <code title=3Dattr-img-name><a href=3D#attr-img=
-name>name</a></code> attribute's value as the string, &lt=
;var title=3D"">candidate</var>
+     as the element, and <i>name</i> as the source.</li&g=
t;
+
+    </ol></li>
+
+   <li>
+
+    <p>For each entry <var title=3D"">past entry&l=
t;/var> in the <a href=3D#past-names-map>past names map</a&gt=
; add an entry
+    to <var title=3D"">sourced names</var> with th=
e <var title=3D"">past entry</var>'s name as the
+    string, <var title=3D"">past entry</var>'s ele=
ment as the element, <i>past</i> as the source, and
+    the length of time <var title=3D"">past entry</va=
r> has been in the <a href=3D#past-names-map>past names map</=
a> as
+    the age.</p>
+
+   </li>
+
+   <li><p>Sort <var title=3D"">sourced names=
</var> by <a href=3D#tree-order>tree order</a> of the e=
lement entry of
+   each tuple, sorting entries with the same element by putting entries =
whose source is <i>id</i>
+   first, then entries whose source is <i>name</i>, and fina=
lly entries whose source is <i>past</i>,
+   and sorting entries with the same element and source by their age, ol=
dest first.</li>
+
+   <li><p>Remove any entries in <var title=3D""=
>sourced names</var> that have the empty string as
+   their name.</li>
+
+   <li><p>Remove any entries in <var title=3D""=
>sourced names</var> that have the same name as an
+   earlier entry in the map.</li>
+
+   <li><p>Return the list of names from <var title=3D&quo=
t;">sourced names</var>, maintaining their
+   relative order.</li>
+
+  </ol><p>The properties exposed in this way must not be enu=
merable.</p>
+
+  <p>When a <code><a href=3D#the-form-element>form<=
/a></code> element is <dfn id=3Ddom-form-nameditem title=3Ddo=
m-form-namedItem>indexed for named property
+  retrieval</dfn>, the user agent must run the following steps:&lt=
;/p>
+
+  <ol><li><p>Let <var title=3D"">candi=
dates</var> be a <a href=3D#live>live</a> <code>&=
lt;a href=3D#radionodelist>RadioNodeList</a></code>
+   object containing all the <a href=3D#category-listed title=3Dcateg=
ory-listed>listed elements</a> whose <a href=3D#form-owner&gt=
;form
+   owner</a> is the <code><a href=3D#the-form-element>=
form</a></code> element that have either an <code title=3D=
attr-id><a href=3D#the-id-attribute>id</a></code>
+   attribute or a <code title=3Dattr-fe-name><a href=3D#attr-fe=
-name>name</a></code> attribute equal to <var title=3D&=
quot;">name</var>, with the exception of <code><a =
href=3D#the-input-element>input</a></code> elements whose =
<code title=3Dattr-input-type><a href=3D#attr-input-type>type=
</a></code> attribute is in the <a href=3D"#image-but=
ton-state-(type=3Dimage)" title=3Dattr-input-type-image>Image
+   Button</a> state, in <a href=3D#tree-order>tree order<=
/a>.</li>
+
+   <!-- we return RadioNodeList here for consistency -->
+   <li><p>If <var title=3D"">candidates</=
var> is empty, let <var title=3D"">candidates</var&=
gt; be a
+   <a href=3D#live>live</a> <code><a href=3D#radion=
odelist>RadioNodeList</a></code> object containing all the=
 <code><a href=3D#the-img-element>img</a></code> =
elements
+   that are descendants of the <code><a href=3D#the-form-elemen=
t>form</a></code> element and that have either an <code=
 title=3Dattr-id><a href=3D#the-id-attribute>id</a></co=
de> attribute or a <code title=3Dattr-img-name><a href=3D#att=
r-img-name>name</a></code> attribute equal
+   to <var title=3D"">name</var>, in <a href=3D=
#tree-order>tree order</a>.</li>
+
+   <li><p>If <var title=3D"">candidates</=
var> is empty, <var title=3D"">name</var> is the=
 name of one of
+   the entries in the <code><a href=3D#the-form-element>form=
</a></code> element's <a href=3D#past-names-map>past na=
mes map</a>: return the object
+   associated with <var title=3D"">name</var> in t=
hat map.</li>
+
+   <li><p>If <var title=3D"">candidates</=
var> contains more than one node, return <var title=3D""&=
gt;candidates</var> and abort these steps.</li>
+
+   <li><p>Otherwise, <var title=3D"">candida=
tes</var> contains exactly one node. Add a mapping from
+   <var title=3D"">name</var> to the node in <v=
ar title=3D"">candidates</var> in the <code><=
a href=3D#the-form-element>form</a></code>
+   element's <a href=3D#past-names-map>past names map</a>, r=
eplacing the previous entry with the same name, if
+   any.</li>
+
+   <li><p>Return the node in <var title=3D""&gt=
;candidates</var>.</li>
+
+  </ol><p>If an element listed in a <code><a href=3D=
#the-form-element>form</a></code> element's <a href=3D#=
past-names-map>past names map</a> changes
+  <a href=3D#form-owner>form owner</a>, then its entries mus=
t be removed from that map.</p>
+
+  <!--
+    This ridiculous setup is intended to do as much of the right thing w=
hile still supporting code
+    written to work in IE7. IE versions prior to IE8 do not update the n=
ames on the <form> element
+    collection to match new names when elements are renamed, and there a=
re enough pages that rename
+    elements and then access them by their old name that we have to supp=
ort this.
+
+    But we still want to expose them using the new names, so as far as p=
ossible we pretend the
+    legacy names aren't there except if there's no other element actuall=
y named that way.
+
+    Removing the element did remove the legacy name in IE7:
+    http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%2=
0html%3E...%3Cform%20action%3D%22%2F%22%3E%3Cinput%20name%3Dsubmit%3E%3C%=
2Fform%3E%0A%3Cscript%3E%0A%20w(document.forms%5B0%5D.submit)%3B%0A%20w(d=
ocument.forms%5B0%5D.removeChild(document.getElementsByTagName('input')%5=
B0%5D))%3B%0A%20w(document.forms%5B0%5D.length)%3B%0A%20try%20%7B%20docum=
ent.forms%5B0%5D.submit()%3B%20%7D%20catch%20(e)%20%20%7B%20w(e.message)%=
20%7D%0A%3C%2Fscript%3E
+
+    There's no interop on what happens when the name was originally a du=
plicate name, so we don't
+    persist such accesses - at the time of writing, Safari returned the =
first element, Firefox
+    returned null (as we do), and IE7 returned the original collection:
+    http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%2=
0html%3E...%3Cform%20action%3D%22%2F%22%3E%3Cinput%20name%3Da%20id%3Dfirs=
t%3E%3Cinput%20name%3Da%20id%3Dsecond%3E%3C%2Fform%3E%0A%3Cscript%3E%0A%2=
0w%28document.forms[0].a%29%3B%0A%20document.getElementsByTagName%28%27in=
put%27%29[0].name%20%3D%20%27b%27%3B%0A%20document.getElementsByTagName%2=
8%27input%27%29[1].name%20%3D%20%27b%27%3B%0A%20w%28document.forms[0].len=
gth%29%3B%0A%20w%28document.forms[0].a.id%29%3B%0A%3C%2Fscript%3E
+
+    In addition, the <img> fallback nonsense is similarly here for=
 legacy reasons. As is the
+    exclusion of <input type=3Dimage>.
+
+    Also, check these out:
+    http://software.hixie.ch/utilities/js/live-dom-viewer/saved/1220
+    http://software.hixie.ch/utilities/js/live-dom-viewer/saved/2388
+
+  -->
+
+  <!-- Now leaving crazy town. -->
+
+  <hr><p>The <dfn id=3Ddom-form-submit title=3Ddom-form-s=
ubmit><code>submit()</code></dfn> method, when invok=
ed, must <a href=3D#concept-form-submit title=3Dconcept-form-submit&gt=
;submit</a> the <code><a href=3D#the-form-element>form&=
lt;/a></code> element from the <code><a href=3D#the-for=
m-element>form</a></code>
+  element itself, with the <var title=3D"">submitted fro=
m <code title=3Ddom-form-submit><a href=3D#dom-form-submit>su=
bmit()</a></code> method</var> flag set.</p>
+
+  <p>The <dfn id=3Ddom-form-reset title=3Ddom-form-reset>&lt=
;code>reset()</code></dfn> method, when invoked, must run =
the
+  following steps:</p>
+
+  <ol><li><p>If the <code><a href=3D#the-form=
-element>form</a></code> element is marked as <i>&lt=
;a href=3D#locked-for-reset>locked for reset</a></i>, then=
 abort these
+   steps.</li>
+
+   <li><p>Mark the <code><a href=3D#the-form-elemen=
t>form</a></code> element as <dfn id=3Dlocked-for-reset=
>locked for reset</dfn>.</li>
+
+   <li><p><a href=3D#concept-form-reset title=3Dconcept-f=
orm-reset>Reset</a> the <code><a href=3D#the-form-eleme=
nt>form</a></code> element.</li>
+
+   <li><p>Unmark the <code><a href=3D#the-form-elem=
ent>form</a></code> element as <i><a href=3D#lock=
ed-for-reset>locked for reset</a></i>.</li>
+
+  </ol><p>If the <dfn id=3Ddom-form-checkvalidity title=3D=
dom-form-checkValidity><code>checkValidity()</code></df=
n> method is
+  invoked, the user agent must <a href=3D#statically-validate-the-con=
straints>statically validate the constraints</a> of the
+  <code><a href=3D#the-form-element>form</a></code&=
gt; element, and return true if the constraint validation return a <i&=
gt;positive</i>
+  result, and false if it returned a <i>negative</i> result.=
</p>
+
+  <p>If the <dfn id=3Ddom-form-reportvalidity title=3Ddom-form-=
reportValidity><code>reportValidity()</code></dfn> m=
ethod is
+  invoked, the user agent must <a href=3D#interactively-validate-the-=
constraints>interactively validate the constraints</a> of the
+  <code><a href=3D#the-form-element>form</a></code&=
gt; element, and return true if the constraint validation return a <i&=
gt;positive</i>
+  result, and false if it returned a <i>negative</i> result.=
</p>
+
+  </div>
+<!--TOPIC:HTML-->
+
+  <div class=3Dexample>
+
+   <p>This example shows two search forms:</p>
+
+   <pre><form action=3D"http://www.google.com/search&q=
uot; method=3D"get">
+ <label>Google: <input type=3D"search" na=
me=3D"q"></label> <input type=3D&qu=
ot;submit" value=3D"Search...">
+</form>
+<form action=3D"http://www.bing.com/search" method=3D&q=
uot;get">
+ <label>Bing: <input type=3D"search" name=
=3D"q"></label> <input type=3D&quot=
;submit" value=3D"Search...">
+</form></pre>
+
+  </div>
+
+
+
+  <h4 id=3Dthe-label-element><span class=3Dsecno>4.10.4 <=
/span>The <dfn><code>label</code></dfn> elemen=
t</h4>
+
+  <dl class=3Delement><dt><a href=3D#element-dfn-categori=
es title=3Delement-dfn-categories>Categories</a>:</dt>
+   <dd><a href=3D#flow-content>Flow content</a>.</d=
d>
+   <dd><a href=3D#phrasing-content>Phrasing content</a&gt=
;.</dd>
+   <dd><a href=3D#interactive-content>Interactive content&lt=
;/a>.</dd>
+   <dd><a href=3D#category-form-attr title=3Dcategory-form-attr=
>Reassociateable</a> <a href=3D#form-associated-element>fo=
rm-associated element</a>.</dd>
+   <dd><a href=3D#palpable-content>Palpable content</a&gt=
;.</dd>
+   <dt><a href=3D#element-dfn-contexts title=3Delement-dfn-cont=
exts>Contexts in which this element can be used</a>:</dt>
+   <dd>Where <a href=3D#phrasing-content>phrasing content&lt=
;/a> is expected.</dd>
+   <dt><a href=3D#element-dfn-content-model title=3Delement-dfn=
-content-model>Content model</a>:</dt>
+   <dd><a href=3D#phrasing-content>Phrasing content</a&gt=
;, but with no descendant <a href=3D#category-label title=3Dcategory-l=
abel>labelable elements</a> unless it is the element's <a hre=
f=3D#labeled-control>labeled control</a>, and no descendant <=
code><a href=3D#the-label-element>label</a></code> e=
lements.</dd>
+   <dt><a href=3D#element-dfn-tag-omission title=3Delement-dfn-=
tag-omission>Tag omission in text/html</a>:</dt>
+   <dd>Neither tag is omissible.</dd>
+   <dt><a href=3D#element-dfn-attributes title=3Delement-dfn-at=
tributes>Content attributes</a>:</dt>
+   <dd><a href=3D#global-attributes>Global attributes</a&=
gt;</dd>
+   <dd><code title=3Dattr-fae-form><a href=3D#attr-fae-fo=
rm>form</a></code> — Associates the control with=
 a <code><a href=3D#the-form-element>form</a></code&=
gt; element</dd>
+   <dd><code title=3Dattr-label-for><a href=3D#attr-label=
-for>for</a></code> — Associate the label with f=
orm control</dd>
+   <dt><a href=3D#element-dfn-dom title=3Delement-dfn-dom>DO=
M interface</a>:</dt><!--TOPIC:DOM APIs-->
+   <dd>
+<pre class=3Didl>interface <dfn id=3Dhtmllabelelement>HTMLLa=
belElement</dfn> : <a href=3D#htmlelement>HTMLElement</a&g=
t; {
+  readonly attribute <a href=3D#htmlformelement>HTMLFormElement&lt=
;/a>? <a href=3D#dom-fae-form title=3Ddom-fae-form>form</a&gt=
;;
+           attribute DOMString <a href=3D#dom-label-htmlfor title=3Dd=
om-label-htmlFor>htmlFor</a>;
+  readonly attribute <a href=3D#htmlelement>HTMLElement</a>?=
 <a href=3D#dom-label-control title=3Ddom-label-control>control<=
/a>;
+};</pre>
+   </dd>
+  </dl><!--TOPIC:HTML--><p>The <code><a href=3D=
#the-label-element>label</a></code> element <a href=3D#=
represents>represents</a> a caption in a user interface. The
+  caption can be associated with a specific form control<span class=3D=
impl>, known as the
+  <code><a href=3D#the-label-element>label</a></cod=
e> element's <dfn id=3Dlabeled-control>labeled control</dfn&g=
t;</span>, either using the <code title=3Dattr-label-for><=
a href=3D#attr-label-for>for</a></code> attribute, or by p=
utting the form control inside the
+  <code><a href=3D#the-label-element>label</a></cod=
e> element itself.</p>
+
+  <div class=3Dimpl>
+
+  <p>Except where otherwise specified by the following rules, a &l=
t;code><a href=3D#the-label-element>label</a></code>=
 element has no
+  <a href=3D#labeled-control>labeled control</a>.</p>
+
+  </div>
+
+  <p>The <dfn id=3Dattr-label-for title=3Dattr-label-for>&lt=
;code>for</code></dfn> attribute may be specified to indic=
ate a
+  form control with which the caption is to be associated. If the attrib=
ute is specified, the
+  attribute's value must be the <a href=3D#concept-id title=3Dconcept=
-id>ID</a> of a <a href=3D#category-label title=3Dcategory-la=
bel>labelable element</a> in the same <code><a href=3D#=
document>Document</a></code> as the
+  <code><a href=3D#the-label-element>label</a></cod=
e> element. <span class=3Dimpl>If the attribute is specified and=
 there is an
+  element in the <code><a href=3D#document>Document</a&gt=
;</code> whose <a href=3D#concept-id title=3Dconcept-id>ID&lt=
;/a> is equal to the
+  value of the <code title=3Dattr-label-for><a href=3D#attr-lab=
el-for>for</a></code> attribute, and the first such elemen=
t is a
+  <a href=3D#category-label title=3Dcategory-label>labelable eleme=
nt</a>, then that element is the <code><a href=3D#the-labe=
l-element>label</a></code>
+  element's <a href=3D#labeled-control>labeled control</a>.&=
lt;/span></p>
+
+  <div class=3Dimpl>
+
+  <p>If the <code title=3Dattr-label-for><a href=3D#attr-=
label-for>for</a></code> attribute is not specified, but t=
he
+  <code><a href=3D#the-label-element>label</a></cod=
e> element has a <a href=3D#category-label title=3Dcategory-label&g=
t;labelable element</a> descendant,
+  then the first such descendant in <a href=3D#tree-order>tree ord=
er</a> is the <code><a href=3D#the-label-element>label&=
lt;/a></code> element's
+  <a href=3D#labeled-control>labeled control</a>.</p>
+
+  <p>The <code><a href=3D#the-label-element>label</=
a></code> element's exact default presentation and behavior, in =
particular what
+  its <a href=3D#activation-behavior>activation behavior</a>=
 might be, if anything, should match the platform's label
+  behavior. The <a href=3D#activation-behavior>activation behavior=
</a> of a <code><a href=3D#the-label-element>label</=
a></code> element for events targeted
+  at <a href=3D#interactive-content>interactive content</a> =
descendants of a <code><a href=3D#the-label-element>label<=
/a></code> element, and any
+  descendants of those <a href=3D#interactive-content>interactive =
content</a> descendants, must be to do nothing.</p>
+
+  <!-- activation behaviour need not be dependent on whether the
+  labeled control is being rendered:
+   http://software.hixie.ch/utilities/js/live-dom-viewer/saved/371
+  -->
+
+  <div class=3Dexample>
+
+   <p>For example, on platforms where clicking a checkbox label ch=
ecks the checkbox, clicking the
+   <code><a href=3D#the-label-element>label</a></co=
de> in the following snippet could trigger the user agent to <a hre=
f=3D#run-synthetic-click-activation-steps>run synthetic
+   click activation steps</a> on the <code><a href=3D#the=
-input-element>input</a></code> element, as if the element=
 itself had
+   been triggered by the user:</p>
+
+   <pre><label><input type=3Dcheckbox name=3D=
lost> Lost</label></pre>
+
+   <p>On other platforms, the behavior might be just to focus the =
control, or do nothing.</p>
+
+  </div>
+
+  </div>
+
+  <p>The <code title=3Dattr-fae-form><a href=3D#attr-fae-=
form>form</a></code> attribute is used to explicitly assoc=
iate the
+  <code><a href=3D#the-label-element>label</a></cod=
e> element with its <a href=3D#form-owner>form owner</a>.&=
lt;/p>
+
+  <div class=3Dexample>
+
+   <p>The following example shows three form controls each with a =
label, two of which have small
+   text showing the right format for users to use.</p>
+
+   <pre><p><label>Full name: <i=
nput name=3Dfn> <small>Format: First Last</sm=
all></label></p>
+<p><label>Age: <input name=3Dage type=
=3Dnumber min=3D0></label></p>
+<p><label>Post code: <input name=3Dpc=
> <small>Format: AB12 3CD</small>&=
lt;/label></p></pre>
+
+  </div>
+
+<!--TOPIC:DOM APIs-->
+  <dl class=3Ddomintro><dt><var title=3D"">l=
abel</var> . <code title=3Ddom-label-control><a href=3D#do=
m-label-control>control</a></code></dt>
+
+   <dd>
+
+    <p>Returns the form control that is associated with this eleme=
nt.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-label-htmlfor title=3Ddom-label-htmlFor&=
gt;<code>htmlFor</code></dfn> IDL attribute must
+  <a href=3D#reflect>reflect</a> the <code title=3Dattr-l=
abel-for><a href=3D#attr-label-for>for</a></code> co=
ntent attribute.</p>
+
+  <p>The <dfn id=3Ddom-label-control title=3Ddom-label-control&=
gt;<code>control</code></dfn> IDL attribute must return=
 the
+  <code><a href=3D#the-label-element>label</a></cod=
e> element's <a href=3D#labeled-control>labeled control</a&gt=
;, if any, or null if there isn't one.</p>
+
+  <p>The <code title=3Ddom-fae-form><a href=3D#dom-fae-fo=
rm>form</a></code> IDL attribute is part of the element's =
forms
+  API.</p>
+
+  </div>
+
+  <hr><dl class=3Ddomintro><dt><var title=3D"&=
quot;>control</var> . <code title=3Ddom-lfe-labels><a h=
ref=3D#dom-lfe-labels>labels</a></code></dt>
+
+   <dd>
+
+    <p>Returns a <code><a href=3D#nodelist>NodeList&lt=
;/a></code> of all the <code><a href=3D#the-label-eleme=
nt>label</a></code> elements that the form control
+    is associated with.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p><a href=3D#category-label title=3Dcategory-label>Labela=
ble elements</a> have a <code><a href=3D#nodelist>NodeL=
ist</a></code> object
+  associated with them that represents the list of <code><a hre=
f=3D#the-label-element>label</a></code> elements, in <a=
 href=3D#tree-order>tree
+  order</a>, whose <a href=3D#labeled-control>labeled contro=
l</a> is the element in question. The <dfn id=3Ddom-lfe-labels t=
itle=3Ddom-lfe-labels><code>labels</code></dfn> IDL =
attribute of <a href=3D#category-label title=3Dcategory-label>label=
able elements</a>, on getting, must return that
+  <code><a href=3D#nodelist>NodeList</a></code> =
object.</p>
+
+  </div>
+<!--TOPIC:HTML-->
+
+
+  <h4 id=3Dthe-input-element><span class=3Dsecno>4.10.5 <=
/span>The <dfn><code>input</code></dfn> elemen=
t</h4>
+
+  <dl class=3Delement><dt><a href=3D#element-dfn-categori=
es title=3Delement-dfn-categories>Categories</a>:</dt>
+   <dd><a href=3D#flow-content>Flow content</a>.</d=
d>
+   <dd><a href=3D#phrasing-content>Phrasing content</a&gt=
;.</dd>
+   <dd>If the <code title=3Dattr-input-type><a href=3D#at=
tr-input-type>type</a></code> attribute is <em>not&l=
t;/em> in the <a href=3D"#hidden-state-(type=3Dhidden)" t=
itle=3Dattr-input-type-hidden>Hidden</a> state: <a href=3D#in=
teractive-content>Interactive content</a>.</dd>
+   <dd>If the <code title=3Dattr-input-type><a href=3D#at=
tr-input-type>type</a></code> attribute is <em>not&l=
t;/em> in the <a href=3D"#hidden-state-(type=3Dhidden)" t=
itle=3Dattr-input-type-hidden>Hidden</a> state: <a href=3D#ca=
tegory-listed title=3Dcategory-listed>Listed</a>, <a href=3D#=
category-label title=3Dcategory-label>labelable</a>, <a href=3D=
#category-submit title=3Dcategory-submit>submittable</a>, <a =
href=3D#category-reset title=3Dcategory-reset>resettable</a>, an=
d <a href=3D#category-form-attr title=3Dcategory-form-attr>reassoci=
ateable</a> <a href=3D#form-associated-element>form-associate=
d element</a>.</dd>
+   <dd>If the <code title=3Dattr-input-type><a href=3D#at=
tr-input-type>type</a></code> attribute is in the <a hr=
ef=3D"#hidden-state-(type=3Dhidden)" title=3Dattr-input-type-hi=
dden>Hidden</a> state: <a href=3D#category-listed title=3Dcat=
egory-listed>Listed</a>, <a href=3D#category-submit title=3Dc=
ategory-submit>submittable</a>, <a href=3D#category-reset tit=
le=3Dcategory-reset>resettable</a>, and <a href=3D#category-f=
orm-attr title=3Dcategory-form-attr>reassociateable</a> <a hr=
ef=3D#form-associated-element>form-associated element</a>.</d=
d>
+   <dd>If the <code title=3Dattr-input-type><a href=3D#at=
tr-input-type>type</a></code> attribute is <em>not&l=
t;/em> in the <a href=3D"#hidden-state-(type=3Dhidden)" t=
itle=3Dattr-input-type-hidden>Hidden</a> state: <a href=3D#pa=
lpable-content>Palpable content</a>.</dd>
+   <dt><a href=3D#element-dfn-contexts title=3Delement-dfn-cont=
exts>Contexts in which this element can be used</a>:</dt>
+   <dd>Where <a href=3D#phrasing-content>phrasing content&lt=
;/a> is expected.</dd>
+   <dt><a href=3D#element-dfn-content-model title=3Delement-dfn=
-content-model>Content model</a>:</dt>
+   <dd>Empty.</dd>
+   <dt><a href=3D#element-dfn-tag-omission title=3Delement-dfn-=
tag-omission>Tag omission in text/html</a>:</dt>
+   <dd>No <a href=3D#syntax-end-tag title=3Dsyntax-end-tag>e=
nd tag</a>.</dd>
+   <dt><a href=3D#element-dfn-attributes title=3Delement-dfn-at=
tributes>Content attributes</a>:</dt>
+   <dd><a href=3D#global-attributes>Global attributes</a&=
gt;</dd>
+   <dd><code title=3Dattr-input-accept><a href=3D#attr-in=
put-accept>accept</a></code> — Hint for expected=
 file type in <a href=3D"#file-upload-state-(type=3Dfile)" t=
itle=3Dattr-input-type-file>file upload controls</a></dd>
+   <dd><code title=3Dattr-input-alt><a href=3D#attr-input=
-alt>alt</a></code> — Replacement text for use w=
hen images are not available</dd>
+   <dd><code title=3Dattr-fe-autocomplete><a href=3D#attr=
-fe-autocomplete>autocomplete</a></code> — Hint =
for form autofill feature</dd>
+   <dd><code title=3Dattr-fe-autofocus><a href=3D#attr-fe=
-autofocus>autofocus</a></code> — Automatically =
focus the form control when the page is loaded</dd>
+   <dd><code title=3Dattr-input-checked><a href=3D#attr-i=
nput-checked>checked</a></code> — Whether the co=
mmand or control is checked</dd>
+   <dd><code title=3Dattr-fe-dirname><a href=3D#attr-fe-d=
irname>dirname</a></code> — Name of form field t=
o use for sending the element's <a href=3D#the-directionality title=3D=
"the directionality">directionality</a> in <a href=3D=
#form-submission>form submission</a></dd>
+   <dd><code title=3Dattr-fe-disabled><a href=3D#attr-fe-=
disabled>disabled</a></code> — Whether the form =
control is disabled</dd>
+   <dd><code title=3Dattr-fae-form><a href=3D#attr-fae-fo=
rm>form</a></code> — Associates the control with=
 a <code><a href=3D#the-form-element>form</a></code&=
gt; element</dd>
+   <dd><code title=3Dattr-fs-formaction><a href=3D#attr-f=
s-formaction>formaction</a></code> — <a href=3D=
#url>URL</a> to use for <a href=3D#form-submission>form su=
bmission</a></dd>
+   <dd><code title=3Dattr-fs-formenctype><a href=3D#attr-=
fs-formenctype>formenctype</a></code> — Form dat=
a set encoding type to use for <a href=3D#form-submission>form subm=
ission</a></dd>
+   <dd><code title=3Dattr-fs-formmethod><a href=3D#attr-f=
s-formmethod>formmethod</a></code> — HTTP method=
 to use for <a href=3D#form-submission>form submission</a>&lt=
;/dd>
+   <dd><code title=3Dattr-fs-formnovalidate><a href=3D#at=
tr-fs-formnovalidate>formnovalidate</a></code> —=
 Bypass form control validation for <a href=3D#form-submission>form=
 submission</a></dd>
+   <dd><code title=3Dattr-fs-formtarget><a href=3D#attr-f=
s-formtarget>formtarget</a></code> — <a href=3D=
#browsing-context>Browsing context</a> for <a href=3D#form-su=
bmission>form submission</a></dd>
+   <dd><code title=3Dattr-dim-height><a href=3D#attr-dim-=
height>height</a></code> — Vertical dimension&lt=
;/dd>
+   <dd><code title=3Dattr-fe-inputmode><a href=3D#attr-fe=
-inputmode>inputmode</a></code> — Hint for selec=
ting an input modality</dd>
+   <dd><code title=3Dattr-input-list><a href=3D#attr-inpu=
t-list>list</a></code> — List of autocomplete op=
tions</dd>
+   <dd><code title=3Dattr-input-max><a href=3D#attr-input=
-max>max</a></code> — Maximum value</dd>
+   <dd><code title=3Dattr-input-maxlength><a href=3D#attr=
-input-maxlength>maxlength</a></code> — Maximum =
length of value</dd>
+   <dd><code title=3Dattr-input-min><a href=3D#attr-input=
-min>min</a></code> — Minimum value</dd>
+   <dd><code title=3Dattr-input-minlength><a href=3D#attr=
-input-minlength>minlength</a></code> — Minimum =
length of value</dd>
+   <dd><code title=3Dattr-input-multiple><a href=3D#attr-=
input-multiple>multiple</a></code> — Whether to =
allow multiple values</dd>
+   <dd><code title=3Dattr-fe-name><a href=3D#attr-fe-name=
>name</a></code> — Name of form control to use f=
or <a href=3D#form-submission>form submission</a> and in the =
<code title=3Ddom-form-elements><a href=3D#dom-form-elements>=
form.elements</a></code> API</dd>
+   <dd><code title=3Dattr-input-pattern><a href=3D#attr-i=
nput-pattern>pattern</a></code> — Pattern to be =
matched by the form control's value</dd>
+   <dd><code title=3Dattr-input-placeholder><a href=3D#at=
tr-input-placeholder>placeholder</a></code> — Us=
er-visible label to be placed within the form control</dd>
+   <dd><code title=3Dattr-input-readonly><a href=3D#attr-=
input-readonly>readonly</a></code> — Whether to =
allow the value to be edited by the user</dd>
+   <dd><code title=3Dattr-input-required><a href=3D#attr-=
input-required>required</a></code> — Whether the=
 control is required for <a href=3D#form-submission>form submission=
</a></dd>
+   <dd><code title=3Dattr-input-size><a href=3D#attr-inpu=
t-size>size</a></code> — Size of the control<=
/dd>
+   <dd><code title=3Dattr-input-src><a href=3D#attr-input=
-src>src</a></code> — Address of the resource&lt=
;/dd>
+   <dd><code title=3Dattr-input-step><a href=3D#attr-inpu=
t-step>step</a></code> — Granularity to be match=
ed by the form control's value</dd>
+   <dd><code title=3Dattr-input-type><a href=3D#attr-inpu=
t-type>type</a></code> — Type of form control&lt=
;/dd>
+   <dd><code title=3Dattr-input-value><a href=3D#attr-inp=
ut-value>value</a></code> — Value of the form co=
ntrol</dd>
+   <dd><code title=3Dattr-dim-width><a href=3D#attr-dim-w=
idth>width</a></code> — Horizontal dimension<=
/dd>
+   <dt><a href=3D#element-dfn-dom title=3Delement-dfn-dom>DO=
M interface</a>:</dt><!--TOPIC:DOM APIs-->
+   <dd>
+<pre class=3Didl>interface <dfn id=3Dhtmlinputelement>HTMLIn=
putElement</dfn> : <a href=3D#htmlelement>HTMLElement</a&g=
t; {
+           attribute DOMString <a href=3D#dom-input-accept title=3Ddo=
m-input-accept>accept</a>;
+           attribute DOMString <a href=3D#dom-input-alt title=3Ddom-i=
nput-alt>alt</a>;
+           attribute DOMString <a href=3D#dom-fe-autocomplete title=3D=
dom-fe-autocomplete>autocomplete</a>;
+           attribute boolean <a href=3D#dom-fe-autofocus title=3Ddom-=
fe-autofocus>autofocus</a>;
+           attribute boolean <a href=3D#dom-input-defaultchecked titl=
e=3Ddom-input-defaultChecked>defaultChecked</a>;
+           attribute boolean <a href=3D#dom-input-checked title=3Ddom=
-input-checked>checked</a>;
+           attribute DOMString <a href=3D#dom-input-dirname title=3Dd=
om-input-dirName>dirName</a>;
+           attribute boolean <a href=3D#dom-fe-disabled title=3Ddom-f=
e-disabled>disabled</a>;
+  readonly attribute <a href=3D#htmlformelement>HTMLFormElement&lt=
;/a>? <a href=3D#dom-fae-form title=3Ddom-fae-form>form</a&gt=
;;
+  readonly attribute <a href=3D#filelist>FileList</a>? <a=
 href=3D#dom-input-files title=3Ddom-input-files>files</a>;
+           attribute DOMString <a href=3D#dom-fs-formaction title=3Dd=
om-fs-formAction>formAction</a>;
+           attribute DOMString <a href=3D#dom-fs-formenctype title=3D=
dom-fs-formEnctype>formEnctype</a>;
+           attribute DOMString <a href=3D#dom-fs-formmethod title=3Dd=
om-fs-formMethod>formMethod</a>;
+           attribute boolean <a href=3D#dom-fs-formnovalidate title=3D=
dom-fs-formNoValidate>formNoValidate</a>;
+           attribute DOMString <a href=3D#dom-fs-formtarget title=3Dd=
om-fs-formTarget>formTarget</a>;
+           attribute unsigned long <a href=3D#dom-input-height title=3D=
dom-input-height>height</a>;
+           attribute boolean <a href=3D#dom-input-indeterminate title=
=3Ddom-input-indeterminate>indeterminate</a>;
+           attribute DOMString <a href=3D#dom-input-inputmode title=3D=
dom-input-inputMode>inputMode</a>;
+  readonly attribute <a href=3D#htmlelement>HTMLElement</a>?=
 <a href=3D#dom-input-list title=3Ddom-input-list>list</a>;
+           attribute DOMString <a href=3D#dom-input-max title=3Ddom-i=
nput-max>max</a>;
+           attribute long <a href=3D#dom-input-maxlength title=3Ddom-=
input-maxLength>maxLength</a>;
+           attribute DOMString <a href=3D#dom-input-min title=3Ddom-i=
nput-min>min</a>;
+           attribute long <a href=3D#dom-input-minlength title=3Ddom-=
input-minLength>minLength</a>;
+           attribute boolean <a href=3D#dom-input-multiple title=3Ddo=
m-input-multiple>multiple</a>;
+           attribute DOMString <a href=3D#dom-fe-name title=3Ddom-fe-=
name>name</a>;
+           attribute DOMString <a href=3D#dom-input-pattern title=3Dd=
om-input-pattern>pattern</a>;
+           attribute DOMString <a href=3D#dom-input-placeholder title=
=3Ddom-input-placeholder>placeholder</a>;
+           attribute boolean <a href=3D#dom-input-readonly title=3Ddo=
m-input-readOnly>readOnly</a>;
+           attribute boolean <a href=3D#dom-input-required title=3Ddo=
m-input-required>required</a>;
+           attribute unsigned long <a href=3D#dom-input-size title=3D=
dom-input-size>size</a>;
+           attribute DOMString <a href=3D#dom-input-src title=3Ddom-i=
nput-src>src</a>;
+           attribute DOMString <a href=3D#dom-input-step title=3Ddom-=
input-step>step</a>;
+           attribute DOMString <a href=3D#dom-input-type title=3Ddom-=
input-type>type</a>;
+           attribute DOMString <a href=3D#dom-input-defaultvalue titl=
e=3Ddom-input-defaultValue>defaultValue</a>;
+  [TreatNullAs=3DEmptyString] attribute DOMString <a href=3D#dom-inpu=
t-value title=3Ddom-input-value>value</a>;
+           attribute <span>Date</span>? <a href=3D#dom-in=
put-valueasdate title=3Ddom-input-valueAsDate>valueAsDate</a>;
+           attribute unrestricted double <a href=3D#dom-input-valueas=
number title=3Ddom-input-valueAsNumber>valueAsNumber</a>;
+           attribute unsigned long <a href=3D#dom-input-width title=3D=
dom-input-width>width</a>;
+
+  void <a href=3D#dom-input-stepup title=3Ddom-input-stepUp>stepUp=
</a>(optional long n =3D 1);
+  void <a href=3D#dom-input-stepdown title=3Ddom-input-stepDown>st=
epDown</a>(optional long n =3D 1);
+
+  readonly attribute boolean <a href=3D#dom-cva-willvalidate title=3D=
dom-cva-willValidate>willValidate</a>;
+  readonly attribute <a href=3D#validitystate>ValidityState</a&=
gt; <a href=3D#dom-cva-validity title=3Ddom-cva-validity>validity&l=
t;/a>;
+  readonly attribute DOMString <a href=3D#dom-cva-validationmessage t=
itle=3Ddom-cva-validationMessage>validationMessage</a>;
+  boolean <a href=3D#dom-cva-checkvalidity title=3Ddom-cva-checkValid=
ity>checkValidity</a>();
+  boolean <a href=3D#dom-cva-reportvalidity title=3Ddom-cva-reportVal=
idity>reportValidity</a>();
+  void <a href=3D#dom-cva-setcustomvalidity title=3Ddom-cva-setCustom=
Validity>setCustomValidity</a>(DOMString error);
+
+  readonly attribute <a href=3D#nodelist>NodeList</a> <a =
href=3D#dom-lfe-labels title=3Ddom-lfe-labels>labels</a>;
+
+  void <a href=3D#dom-textarea/input-select title=3Ddom-textarea/inpu=
t-select>select</a>();
+           attribute unsigned long <a href=3D#dom-textarea/input-sele=
ctionstart title=3Ddom-textarea/input-selectionStart>selectionStart&lt=
;/a>;
+           attribute unsigned long <a href=3D#dom-textarea/input-sele=
ctionend title=3Ddom-textarea/input-selectionEnd>selectionEnd</a&gt=
;;
+           attribute DOMString <a href=3D#dom-textarea/input-selectio=
ndirection title=3Ddom-textarea/input-selectionDirection>selectionDire=
ction</a>;
+  void <a href=3D#dom-textarea/input-setrangetext title=3Ddom-textare=
a/input-setRangeText>setRangeText</a>(DOMString replacement);
+  void <a href=3D#dom-textarea/input-setrangetext title=3Ddom-textare=
a/input-setRangeText>setRangeText</a>(DOMString replacement, uns=
igned long start, unsigned long end, optional <a href=3D#selectionmode=
>SelectionMode</a> selectionMode =3D "preserve");
+  void <a href=3D#dom-textarea/input-setselectionrange title=3Ddom-te=
xtarea/input-setSelectionRange>setSelectionRange</a>(unsigned lo=
ng start, unsigned long end, optional DOMString direction);
+
+  // <a href=3D"#HTMLInputElement-partial">also has obso=
lete members</a>
+};</pre>
+   </dd>
+  </dl><!--TOPIC:HTML--><p>The <code><a href=3D=
#the-input-element>input</a></code> element <a href=3D#=
represents>represents</a> a typed data field, usually with a for=
m
+  control to allow the user to edit the data.</p>
+
+  <p>The <dfn id=3Dattr-input-type title=3Dattr-input-type>&=
lt;code>type</code></dfn> attribute controls the data type=
 (and
+  associated control) of the element. It is an <a href=3D#enumerated-=
attribute>enumerated attribute</a>. The following
+  table lists the keywords and states for the attribute — the =
keywords in the left column map
+  to the states in the cell in the second column on the same row as the =
keyword.</p>
+
+  <table id=3Dattr-input-type-keywords><thead><tr><=
th> Keyword
+     <th> State
+     <th> Data type
+     <th> Control type
+   <tbody><tr><td> <dfn id=3Dattr-input-type-hidden=
-keyword title=3Dattr-input-type-hidden-keyword><code>hidden<=
/code></dfn>
+     <td> <a href=3D"#hidden-state-(type=3Dhidden)" t=
itle=3Dattr-input-type-hidden>Hidden</a>
+     <td> An arbitrary string
+     <td> n/a
+    <tr><td> <dfn id=3Dattr-input-type-text-keyword title=
=3Dattr-input-type-text-keyword><code>text</code></dfn&=
gt;
+     <td> <a href=3D"#text-(type=3Dtext)-state-and-search-=
state-(type=3Dsearch)" title=3Dattr-input-type-text>Text</a&gt=
;
+     <td> Text with no line breaks
+     <td> A text field
+    <tr><td> <dfn id=3Dattr-input-type-search-keyword tit=
le=3Dattr-input-type-search-keyword><code>search</code>&lt=
;/dfn>
+     <td> <a href=3D"#text-(type=3Dtext)-state-and-search-=
state-(type=3Dsearch)" title=3Dattr-input-type-search>Search</=
a>
+     <td> Text with no line breaks
+     <td> Search field
+    <tr><td> <dfn id=3Dattr-input-type-tel-keyword title=3D=
attr-input-type-tel-keyword><code>tel</code></dfn>
+     <td> <a href=3D"#telephone-state-(type=3Dtel)" t=
itle=3Dattr-input-type-tel>Telephone</a>
+     <td> Text with no line breaks
+     <td> A text field
+    <tr><td> <dfn id=3Dattr-input-type-url-keyword title=3D=
attr-input-type-url-keyword><code>url</code></dfn>
+     <td> <a href=3D"#url-state-(type=3Durl)" title=3D=
attr-input-type-url>URL</a>
+     <td> An absolute URL
+     <td> A text field
+    <tr><td> <dfn id=3Dattr-input-type-email-keyword titl=
e=3Dattr-input-type-email-keyword><code>email</code></d=
fn>
+     <td> <a href=3D"#e-mail-state-(type=3Demail)" ti=
tle=3Dattr-input-type-email>E-mail</a>
+     <td> An e-mail address or list of e-mail addresses
+     <td> A text field
+    <tr><td> <dfn id=3Dattr-input-type-password-keyword t=
itle=3Dattr-input-type-password-keyword><code>password</code&=
gt;</dfn>
+     <td> <a href=3D"#password-state-(type=3Dpassword)&quo=
t; title=3Dattr-input-type-password>Password</a>
+     <td> Text with no line breaks (sensitive information)
+     <td> A text field that obscures data entry
+    <tr><td> <dfn id=3Dattr-input-type-datetime-keyword t=
itle=3Dattr-input-type-datetime-keyword><code>datetime</code&=
gt;</dfn>
+     <td> <a href=3D"#date-and-time-state-(type=3Ddatetime=
)" title=3Dattr-input-type-datetime>Date and Time</a>
+     <td> A date and time (year, month, day, hour, minute, second,=
 fraction of a second) with the time zone set to UTC
+     <td> A date and time control
+    <tr><td> <dfn id=3Dattr-input-type-date-keyword title=
=3Dattr-input-type-date-keyword><code>date</code></dfn&=
gt;
+     <td> <a href=3D"#date-state-(type=3Ddate)" title=
=3Dattr-input-type-date>Date</a>
+     <td> A date (year, month, day) with no time zone
+     <td> A date control
+    <tr><td> <dfn id=3Dattr-input-type-month-keyword titl=
e=3Dattr-input-type-month-keyword><code>month</code></d=
fn>
+     <td> <a href=3D"#month-state-(type=3Dmonth)" tit=
le=3Dattr-input-type-month>Month</a>
+     <td> A date consisting of a year and a month with no time zon=
e
+     <td> A month control
+    <tr><td> <dfn id=3Dattr-input-type-week-keyword title=
=3Dattr-input-type-week-keyword><code>week</code></dfn&=
gt;
+     <td> <a href=3D"#week-state-(type=3Dweek)" title=
=3Dattr-input-type-week>Week</a>
+     <td> A date consisting of a week-year number and a week numbe=
r with no time zone
+     <td> A week control
+    <tr><td> <dfn id=3Dattr-input-type-time-keyword title=
=3Dattr-input-type-time-keyword><code>time</code></dfn&=
gt;
+     <td> <a href=3D"#time-state-(type=3Dtime)" title=
=3Dattr-input-type-time>Time</a>
+     <td> A time (hour, minute, seconds, fractional seconds) with =
no time zone
+     <td> A time control
+    <tr><td> <dfn id=3Dattr-input-type-datetime-local-key=
word title=3Dattr-input-type-datetime-local-keyword><code>dateti=
me-local</code></dfn>
+     <td> <a href=3D"#local-date-and-time-state-(type=3Dda=
tetime-local)" title=3Dattr-input-type-datetime-local>Local Date =
and Time</a>
+     <td> A date and time (year, month, day, hour, minute, second,=
 fraction of a second) with no time zone
+     <td> A date and time control
+    <tr><td> <dfn id=3Dattr-input-type-number-keyword tit=
le=3Dattr-input-type-number-keyword><code>number</code>&lt=
;/dfn>
+     <td> <a href=3D"#number-state-(type=3Dnumber)" t=
itle=3Dattr-input-type-number>Number</a>
+     <td> A numerical value
+     <td> A text field or spinner control
+    <tr><td> <dfn id=3Dattr-input-type-range-keyword titl=
e=3Dattr-input-type-range-keyword><code>range</code></d=
fn>
+     <td> <a href=3D"#range-state-(type=3Drange)" tit=
le=3Dattr-input-type-range>Range</a>
+     <td> A numerical value, with the extra semantic that the exac=
t value is not important
+     <td> A slider control or similar
+    <tr><td> <dfn id=3Dattr-input-type-color-keyword titl=
e=3Dattr-input-type-color-keyword><code>color</code></d=
fn>
+     <td> <a href=3D"#color-state-(type=3Dcolor)" tit=
le=3Dattr-input-type-color>Color</a>
+     <td> An sRGB color with 8-bit red, green, and blue components
+     <td> A color well
+    <tr><td> <dfn id=3Dattr-input-type-checkbox-keyword t=
itle=3Dattr-input-type-checkbox-keyword><code>checkbox</code&=
gt;</dfn>
+     <td> <a href=3D"#checkbox-state-(type=3Dcheckbox)&quo=
t; title=3Dattr-input-type-checkbox>Checkbox</a>
+     <td> A set of zero or more values from a predefined list
+     <td> A checkbox
+    <tr><td> <dfn id=3Dattr-input-type-radio-keyword titl=
e=3Dattr-input-type-radio-keyword><code>radio</code></d=
fn>
+     <td> <a href=3D"#radio-button-state-(type=3Dradio)&qu=
ot; title=3Dattr-input-type-radio>Radio Button</a>
+     <td> An enumerated value
+     <td> A radio button
+    <tr><td> <dfn id=3Dattr-input-type-file-keyword title=
=3Dattr-input-type-file-keyword><code>file</code></dfn&=
gt;
+     <td> <a href=3D"#file-upload-state-(type=3Dfile)&quot=
; title=3Dattr-input-type-file>File Upload</a>
+     <td> Zero or more files each with a <a href=3D#mime-type&g=
t;MIME type</a> and optionally a file name
+     <td> A label and a button
+    <tr><td> <dfn id=3Dattr-input-type-submit-keyword tit=
le=3Dattr-input-type-submit-keyword><code>submit</code>&lt=
;/dfn>
+     <td> <a href=3D"#submit-button-state-(type=3Dsubmit)&=
quot; title=3Dattr-input-type-submit>Submit Button</a>
+     <td> An enumerated value, with the extra semantic that it mus=
t be the last value selected and initiates form submission
+     <td> A button
+    <tr><td> <dfn id=3Dattr-input-type-image-keyword titl=
e=3Dattr-input-type-image-keyword><code>image</code></d=
fn>
+     <td> <a href=3D"#image-button-state-(type=3Dimage)&qu=
ot; title=3Dattr-input-type-image>Image Button</a>
+     <td> A coordinate, relative to a particular image's size, wit=
h the extra semantic that it must
+     be the last value selected and initiates form submission
+     <td> Either a clickable image, or a button
+    <tr><td> <dfn id=3Dattr-input-type-reset-keyword titl=
e=3Dattr-input-type-reset-keyword><code>reset</code></d=
fn>
+     <td> <a href=3D"#reset-button-state-(type=3Dreset)&qu=
ot; title=3Dattr-input-type-reset>Reset Button</a>
+     <td> n/a
+     <td> A button
+    <tr><td> <dfn id=3Dattr-input-type-button-keyword tit=
le=3Dattr-input-type-button-keyword><code>button</code>&lt=
;/dfn>
+     <td> <a href=3D"#button-state-(type=3Dbutton)" t=
itle=3Dattr-input-type-button>Button</a>
+     <td> n/a
+     <td> A button
+  </table><p>The <i>missing value default</i> is=
 the <a href=3D"#text-(type=3Dtext)-state-and-search-state-(type=3D=
search)" title=3Dattr-input-type-text>Text</a> state.</p=
>
+
+  <p>Which of the <code title=3Dattr-input-accept><a href=
=3D#attr-input-accept>accept</a></code>, <code title=3D=
attr-input-alt><a href=3D#attr-input-alt>alt</a></code&=
gt;, <code title=3Dattr-fe-autocomplete><a href=3D#attr-fe-autoc=
omplete>autocomplete</a></code>, <code title=3Dattr-inp=
ut-checked><a href=3D#attr-input-checked>checked</a></c=
ode>, <code title=3Dattr-fe-dirname><a href=3D#attr-fe-dirnam=
e>dirname</a></code>, <code title=3Dattr-fs-formaction&=
gt;<a href=3D#attr-fs-formaction>formaction</a></code>,=
 <code title=3Dattr-fs-formenctype><a href=3D#attr-fs-formenctyp=
e>formenctype</a></code>, <code title=3Dattr-fs-formmet=
hod><a href=3D#attr-fs-formmethod>formmethod</a></code&=
gt;, <code title=3Dattr-fs-formnovalidate><a href=3D#attr-fs-for=
mnovalidate>formnovalidate</a></code>, <code title=3Dat=
tr-fs-formtarget><a href=3D#attr-fs-formtarget>formtarget</a&=
gt;</code>, <code title=3Dattr-dim-height><a href=3D#attr-=
dim-height>height</a></code>, <code title=3Dattr-fe-inp=
utmode><a href=3D#attr-fe-inputmode>inputmode</a></code=
>, <code title=3Dattr-input-list><a href=3D#attr-input-list&g=
t;list</a></code>, <code title=3Dattr-input-max><a h=
ref=3D#attr-input-max>max</a></code>, <code title=3Datt=
r-input-maxlength><a href=3D#attr-input-maxlength>maxlength</=
a></code>, <code title=3Dattr-input-min><a href=3D#attr=
-input-min>min</a></code>, <code title=3Dattr-input-min=
length><a href=3D#attr-input-minlength>minlength</a></c=
ode>, <code title=3Dattr-input-multiple><a href=3D#attr-input=
-multiple>multiple</a></code>, <code title=3Dattr-input=
-pattern><a href=3D#attr-input-pattern>pattern</a></cod=
e>, <code title=3Dattr-input-placeholder><a href=3D#attr-inpu=
t-placeholder>placeholder</a></code>, <code title=3Datt=
r-input-readonly><a href=3D#attr-input-readonly>readonly</a&g=
t;</code>, <code title=3Dattr-input-required><a href=3D#at=
tr-input-required>required</a></code>,
+  <code title=3Dattr-input-size><a href=3D#attr-input-size>s=
ize</a></code>, <code title=3Dattr-input-src><a href=
=3D#attr-input-src>src</a></code>, <code title=3Dattr-i=
nput-step><a href=3D#attr-input-step>step</a></code>=
, and <code title=3Dattr-dim-width><a href=3D#attr-dim-width>=
width</a></code> content
+  attributes, the <code title=3Ddom-input-checked><a href=3D#do=
m-input-checked>checked</a></code>, <code title=3Ddom-i=
nput-files><a href=3D#dom-input-files>files</a></code&g=
t;, <code title=3Ddom-input-valueAsDate><a href=3D#dom-input-val=
ueasdate>valueAsDate</a></code>,
+  <code title=3Ddom-input-valueAsNumber><a href=3D#dom-input-va=
lueasnumber>valueAsNumber</a></code>, and <code title=3D=
dom-input-list><a href=3D#dom-input-list>list</a></code=
> IDL attributes, the <code title=3Ddom-textarea/input-select>&l=
t;a href=3D#dom-textarea/input-select>select()</a></code> =
method, the <code title=3Ddom-textarea/input-selectionStart><a h=
ref=3D#dom-textarea/input-selectionstart>selectionStart</a></=
code>, <code title=3Ddom-textarea/input-selectionEnd><a href=3D=
#dom-textarea/input-selectionend>selectionEnd</a></code>, =
and <code title=3Ddom-textarea/input-selectionDirection><a href=3D=
#dom-textarea/input-selectiondirection>selectionDirection</a>&lt=
;/code>, IDL attributes, the <code title=3Ddom-textarea/input-setRa=
ngeText><a href=3D#dom-textarea/input-setrangetext>setRangeText(=
)</a></code> and <code title=3Ddom-textarea/input-setSelec=
tionRange><a href=3D#dom-textarea/input-setselectionrange>setSel=
ectionRange()</a></code> methods, the <code title=3Ddom-in=
put-stepUp><a href=3D#dom-input-stepup>stepUp()</a></co=
de> and <code title=3Ddom-input-stepDown><a href=3D#dom-input=
-stepdown>stepDown()</a></code>
+  methods, and the <code title=3Devent-input-input><a href=3D#e=
vent-input-input>input</a></code> and <code title=3Deve=
nt-input-change><a href=3D#event-input-change>change</a>&l=
t;/code> events <dfn id=3Dconcept-input-apply title=3Dconcept-input=
-apply>apply</dfn> to an <code><a href=3D#the-input-ele=
ment>input</a></code> element depends on
+  the state of its <code title=3Dattr-input-type><a href=3D#att=
r-input-type>type</a></code> attribute. The subsections th=
at define
+  each type also clearly define in normative "bookkeeping" sec=
tions which of these feature apply,
+  and which <dfn id=3Ddo-not-apply>do not apply</dfn>, to ea=
ch type. The behavior of these features depends on whether
+  they apply or not, as defined in their various sections.</p>
+
+  <p>The following table <span class=3Dimpl>is non-normative=
 and</span> summarizes which of those
+  content attributes, IDL attributes, methods, and events <a href=3D#=
concept-input-apply title=3Dconcept-input-apply>apply</a> to eac=
h state:</p>
+
+  <table class=3Dapplies id=3Dinput-type-attr-summary><thead&gt=
;<tr><th>
+     <th> <span title=3D""><a href=3D"#hid=
den-state-(type=3Dhidden)" title=3Dattr-input-type-hidden>Hidden&=
lt;/a></span>
+     <th> <span title=3D""><a href=3D"#tex=
t-(type=3Dtext)-state-and-search-state-(type=3Dsearch)" title=3Dattr=
-input-type-text>Text</a>,</span>
+          <span title=3D""><a href=3D"#text-(typ=
e=3Dtext)-state-and-search-state-(type=3Dsearch)" title=3Dattr-input=
-type-search>Search</a></span>
+     <th> <span title=3D""><a href=3D"#url=
-state-(type=3Durl)" title=3Dattr-input-type-url>URL</a>,&l=
t;/span>
+          <span title=3D""><a href=3D"#telephone=
-state-(type=3Dtel)" title=3Dattr-input-type-tel>Telephone</a&=
gt;</span>
+     <th> <span title=3D""><a href=3D"#e-m=
ail-state-(type=3Demail)" title=3Dattr-input-type-email>E-mail&lt=
;/a></span>
+     <th> <span title=3D""><a href=3D"#pas=
sword-state-(type=3Dpassword)" title=3Dattr-input-type-password>P=
assword</a></span>
+     <th> <span title=3D""><a href=3D"#dat=
e-and-time-state-(type=3Ddatetime)" title=3Dattr-input-type-datetime=
>Date and Time</a>,</span>
+          <span title=3D""><a href=3D"#date-stat=
e-(type=3Ddate)" title=3Dattr-input-type-date>Date</a>,<=
/span>
+          <span title=3D""><a href=3D"#month-sta=
te-(type=3Dmonth)" title=3Dattr-input-type-month>Month</a>,=
</span>
+          <span title=3D""><a href=3D"#week-stat=
e-(type=3Dweek)" title=3Dattr-input-type-week>Week</a>,<=
/span>
+          <span title=3D""><a href=3D"#time-stat=
e-(type=3Dtime)" title=3Dattr-input-type-time>Time</a></=
span>
+     <th> <span title=3D""><a href=3D"#loc=
al-date-and-time-state-(type=3Ddatetime-local)" title=3Dattr-input-t=
ype-datetime-local>Local Date and Time</a></span>
+     <th> <span title=3D""><a href=3D"#num=
ber-state-(type=3Dnumber)" title=3Dattr-input-type-number>Number&=
lt;/a></span>
+     <th> <span title=3D""><a href=3D"#ran=
ge-state-(type=3Drange)" title=3Dattr-input-type-range>Range</=
a></span>
+     <th> <span title=3D""><a href=3D"#col=
or-state-(type=3Dcolor)" title=3Dattr-input-type-color>Color</=
a></span>
+     <th> <span title=3D""><a href=3D"#che=
ckbox-state-(type=3Dcheckbox)" title=3Dattr-input-type-checkbox>C=
heckbox</a>,</span>
+          <span title=3D""><a href=3D"#radio-but=
ton-state-(type=3Dradio)" title=3Dattr-input-type-radio>Radio But=
ton</a></span>
+     <th> <span title=3D""><a href=3D"#fil=
e-upload-state-(type=3Dfile)" title=3Dattr-input-type-file>File U=
pload</a></span>
+     <th> <span title=3D""><a href=3D"#sub=
mit-button-state-(type=3Dsubmit)" title=3Dattr-input-type-submit>=
Submit Button</a></span>
+     <th> <span title=3D""><a href=3D"#ima=
ge-button-state-(type=3Dimage)" title=3Dattr-input-type-image>Ima=
ge Button</a></span>
+     <th> <span title=3D""><a href=3D"#res=
et-button-state-(type=3Dreset)" title=3Dattr-input-type-reset>Res=
et Button</a>,</span>
+          <span title=3D""><a href=3D"#button-st=
ate-(type=3Dbutton)" title=3Dattr-input-type-button>Button</a&=
gt;</span>
+
+   <tbody><tr><th scope=3Drowgroup colspan=3D16>Conten=
t attributes
+
+    <tr><th> <code title=3Dattr-input-accept><a hre=
f=3D#attr-input-accept>accept</a></code>
+     <td class=3Dno> · <!-- Hidden -->
+     <td class=3Dno> · <!-- Text -->
+<!-- <td class=3D"no"> ·      Search --&gt=
;
+     <td class=3Dno> · <!-- URL, Telephone -->
+     <td class=3Dno> · <!-- E-mail -->
+     <td class=3Dno> · <!-- Password -->
+     <td class=3Dno> · <!-- Date and Time -->
+<!-- <td class=3D"no"> ·      Date -->
+<!-- <td class=3D"no"> ·      Month -->
+<!-- <td class=3D"no"> ·      Week -->
+<!-- <td class=3D"no"> ·      Time -->
+     <td class=3Dno> · <!-- Local Date and Time --&g=
t;
+     <td class=3Dno> · <!-- Number -->
+     <td class=3Dno> · <!-- Range -->
+     <td class=3Dno> · <!-- Color -->
+     <td class=3Dno> · <!-- Checkbox -->
+<!-- <td class=3D"no"> ·      Radio Button=
 -->
+     <td class=3Dyes> Yes     <!-- File Upload -->
+     <td class=3Dno> · <!-- Submit Button -->
+     <td class=3Dno> · <!-- Image Button -->
+     <td class=3Dno> · <!-- Reset Button -->
+<!-- <td class=3D"no"> ·      Button --&gt=
;
+
+    <tr><th> <code title=3Dattr-input-alt><a href=3D=
#attr-input-alt>alt</a></code>
+     <td class=3Dno> · <!-- Hidden -->
+     <td class=3Dno> · <!-- Text -->
+<!-- <td class=3D"no"> ·      Search --&gt=
;
+     <td class=3Dno> · <!-- URL, Telephone -->
+     <td class=3Dno> · <!-- E-mail -->
+     <td class=3Dno> · <!-- Password -->
+     <td class=3Dno> · <!-- Date and Time -->
+<!-- <td class=3D"no"> ·      Date -->
+<!-- <td class=3D"no"> ·      Month -->
+<!-- <td class=3D"no"> ·      Week -->
+<!-- <td class=3D"no"> ·      Time -->
+     <td class=3Dno> · <!-- Local Date and Time --&g=
t;
+     <td class=3Dno> · <!-- Number -->
+     <td class=3Dno> · <!-- Range -->
+     <td class=3Dno> · <!-- Color -->
+     <td class=3Dno> · <!-- Checkbox -->
+<!-- <td class=3D"no"> ·      Radio Button=
 -->
+     <td class=3Dno> · <!-- File Upload -->
+     <td class=3Dno> · <!-- Submit Button -->
+     <td class=3Dyes> Yes     <!-- Image Button -->
+     <td class=3Dno> · <!-- Reset Button -->
+<!-- <td class=3D"no"> ·      Button --&gt=
;
+
+    <tr><th> <code title=3Dattr-fe-autocomplete><a =
href=3D#attr-fe-autocomplete>autocomplete</a></code>
+     <td class=3Dno> · <!-- Hidden -->
+     <td class=3Dyes> Yes     <!-- Text -->
+<!-- <td class=3D"yes"> Yes          Search -->
+     <td class=3Dyes> Yes     <!-- URL, Telephone -->
+     <td class=3Dyes> Yes     <!-- E-mail -->
+     <td class=3Dyes> Yes     <!-- Password -->
+     <td class=3Dyes> Yes     <!-- Date and Time -->
+<!-- <td class=3D"yes"> Yes          Date -->
+<!-- <td class=3D"yes"> Yes          Month -->
+<!-- <td class=3D"yes"> Yes          Week -->
+<!-- <td class=3D"yes"> Yes          Time -->
+     <td class=3Dyes> Yes     <!-- Local Date and Time -->
+     <td class=3Dyes> Yes     <!-- Number -->
+     <td class=3Dyes> Yes     <!-- Range -->
+     <td class=3Dyes> Yes     <!-- Color -->
+     <td class=3Dno> · <!-- Checkbox -->
+<!-- <td class=3D"no"> ·      Radio Button=
 -->
+     <td class=3Dno> · <!-- File Upload -->
+     <td class=3Dno> · <!-- Submit Button -->
+     <td class=3Dno> · <!-- Image Button -->
+     <td class=3Dno> · <!-- Reset Button -->
+<!-- <td class=3D"no"> ·      Button --&gt=
;
+
+    <tr><th> <code title=3Dattr-input-checked><a hr=
ef=3D#attr-input-checked>checked</a></code>
+     <td class=3Dno> · <!-- Hidden -->
+     <td class=3Dno> · <!-- Text -->
+<!-- <td class=3D"no"> ·      Search --&gt=
;
+     <td class=3Dno> · <!-- URL, Telephone -->
+     <td class=3Dno> · <!-- E-mail -->
+     <td class=3Dno> · <!-- Password -->
+     <td class=3Dno> · <!-- Date and Time -->
+<!-- <td class=3D"no"> ·      Date -->
+<!-- <td class=3D"no"> ·      Month -->
+<!-- <td class=3D"no"> ·      Week -->
+<!-- <td class=3D"no"> ·      Time -->
+     <td class=3Dno> · <!-- Local Date and Time --&g=
t;
+     <td class=3Dno> · <!-- Number -->
+     <td class=3Dno> · <!-- Range -->
+     <td class=3Dno> · <!-- Color -->
+     <td class=3Dyes> Yes     <!-- Checkbox -->
+<!-- <td class=3D"yes"> Yes          Radio Button --&=
gt;
+     <td class=3Dno> · <!-- File Upload -->
+     <td class=3Dno> · <!-- Submit Button -->
+     <td class=3Dno> · <!-- Image Button -->
+     <td class=3Dno> · <!-- Reset Button -->
+<!-- <td class=3D"no"> ·      Button --&gt=
;
+
+    <tr><th> <code title=3Dattr-fe-dirname><a href=3D=
#attr-fe-dirname>dirname</a></code>
+     <td class=3Dno> · <!-- Hidden -->
+     <td class=3Dyes> Yes     <!-- Text -->
+<!-- <td class=3D"yes"> Yes          Search -->
+     <td class=3Dno> · <!-- URL, Telephone -->
+     <td class=3Dno> · <!-- E-mail -->
+     <td class=3Dno> · <!-- Password -->
+     <td class=3Dno> · <!-- Date and Time -->
+<!-- <td class=3D"no"> ·      Date -->
+<!-- <td class=3D"no"> ·      Month -->
+<!-- <td class=3D"no"> ·      Week -->
+<!-- <td class=3D"no"> ·      Time -->
+     <td class=3Dno> · <!-- Local Date and Time --&g=
t;
+     <td class=3Dno> · <!-- Number -->
+     <td class=3Dno> · <!-- Range -->
+     <td class=3Dno> · <!-- Color -->
+     <td class=3Dno> · <!-- Checkbox -->
+<!-- <td class=3D"no"> ·      Radio Button=
 -->
+     <td class=3Dno> · <!-- File Upload -->
+     <td class=3Dno> · <!-- Submit Button -->
+     <td class=3Dno> · <!-- Image Button -->
+     <td class=3Dno> · <!-- Reset Button -->
+<!-- <td class=3D"no"> ·      Button --&gt=
;
+
+    <tr><th> <code title=3Dattr-fs-formaction><a hr=
ef=3D#attr-fs-formaction>formaction</a></code>
+     <td class=3Dno> · <!-- Hidden -->
+     <td class=3Dno> · <!-- Text -->
+<!-- <td class=3D"no"> ·      Search --&gt=
;
+     <td class=3Dno> · <!-- URL, Telephone -->
+     <td class=3Dno> · <!-- E-mail -->
+     <td class=3Dno> · <!-- Password -->
+     <td class=3Dno> · <!-- Date and Time -->
+<!-- <td class=3D"no"> ·      Date -->
+<!-- <td class=3D"no"> ·      Month -->
+<!-- <td class=3D"no"> ·      Week -->
+<!-- <td class=3D"no"> ·      Time -->
+     <td class=3Dno> · <!-- Local Date and Time --&g=
t;
+     <td class=3Dno> · <!-- Number -->
+     <td class=3Dno> · <!-- Range -->
+     <td class=3Dno> · <!-- Color -->
+     <td class=3Dno> · <!-- Checkbox -->
+<!-- <td class=3D"no"> ·      Radio Button=
 -->
+     <td class=3Dno> · <!-- File Upload -->
+     <td class=3Dyes> Yes     <!-- Submit Button -->
+     <td class=3Dyes> Yes     <!-- Image Button -->
+     <td class=3Dno> · <!-- Reset Button -->
+<!-- <td class=3D"no"> ·      Button --&gt=
;
+
+    <tr><th> <code title=3Dattr-fs-formenctype><a h=
ref=3D#attr-fs-formenctype>formenctype</a></code>
+     <td class=3Dno> · <!-- Hidden -->
+     <td class=3Dno> · <!-- Text -->
+<!-- <td class=3D"no"> ·      Search --&gt=
;
+     <td class=3Dno> · <!-- URL, Telephone -->
+     <td class=3Dno> · <!-- E-mail -->
+     <td class=3Dno> · <!-- Password -->
+     <td class=3Dno> · <!-- Date and Time -->
+<!-- <td class=3D"no"> ·      Date -->
+<!-- <td class=3D"no"> ·      Month -->
+<!-- <td class=3D"no"> ·      Week -->
+<!-- <td class=3D"no"> ·      Time -->
+     <td class=3Dno> · <!-- Local Date and Time --&g=
t;
+     <td class=3Dno> · <!-- Number -->
+     <td class=3Dno> · <!-- Range -->
+     <td class=3Dno> · <!-- Color -->
+     <td class=3Dno> · <!-- Checkbox -->
+<!-- <td class=3D"no"> ·      Radio Button=
 -->
+     <td class=3Dno> · <!-- File Upload -->
+     <td class=3Dyes> Yes     <!-- Submit Button -->
+     <td class=3Dyes> Yes     <!-- Image Button -->
+     <td class=3Dno> · <!-- Reset Button -->
+<!-- <td class=3D"no"> ·      Button --&gt=
;
+
+    <tr><th> <code title=3Dattr-fs-formmethod><a hr=
ef=3D#attr-fs-formmethod>formmethod</a></code>
+     <td class=3Dno> · <!-- Hidden -->
+     <td class=3Dno> · <!-- Text -->
+<!-- <td class=3D"no"> ·      Search --&gt=
;
+     <td class=3Dno> · <!-- URL, Telephone -->
+     <td class=3Dno> · <!-- E-mail -->
+     <td class=3Dno> · <!-- Password -->
+     <td class=3Dno> · <!-- Date and Time -->
+<!-- <td class=3D"no"> ·      Date -->
+<!-- <td class=3D"no"> ·      Month -->
+<!-- <td class=3D"no"> ·      Week -->
+<!-- <td class=3D"no"> ·      Time -->
+     <td class=3Dno> · <!-- Local Date and Time --&g=
t;
+     <td class=3Dno> · <!-- Number -->
+     <td class=3Dno> · <!-- Range -->
+     <td class=3Dno> · <!-- Color -->
+     <td class=3Dno> · <!-- Checkbox -->
+<!-- <td class=3D"no"> ·      Radio Button=
 -->
+     <td class=3Dno> · <!-- File Upload -->
+     <td class=3Dyes> Yes     <!-- Submit Button -->
+     <td class=3Dyes> Yes     <!-- Image Button -->
+     <td class=3Dno> · <!-- Reset Button -->
+<!-- <td class=3D"no"> ·      Button --&gt=
;
+
+    <tr><th> <code title=3Dattr-fs-formnovalidate><=
a href=3D#attr-fs-formnovalidate>formnovalidate</a></code>
+     <td class=3Dno> · <!-- Hidden -->
+     <td class=3Dno> · <!-- Text -->
+<!-- <td class=3D"no"> ·      Search --&gt=
;
+     <td class=3Dno> · <!-- URL, Telephone -->
+     <td class=3Dno> · <!-- E-mail -->
+     <td class=3Dno> · <!-- Password -->
+     <td class=3Dno> · <!-- Date and Time -->
+<!-- <td class=3D"no"> ·      Date -->
+<!-- <td class=3D"no"> ·      Month -->
+<!-- <td class=3D"no"> ·      Week -->
+<!-- <td class=3D"no"> ·      Time -->
+     <td class=3Dno> · <!-- Local Date and Time --&g=
t;
+     <td class=3Dno> · <!-- Number -->
+     <td class=3Dno> · <!-- Range -->
+     <td class=3Dno> · <!-- Color -->
+     <td class=3Dno> · <!-- Checkbox -->
+<!-- <td class=3D"no"> ·      Radio Button=
 -->
+     <td class=3Dno> · <!-- File Upload -->
+     <td class=3Dyes> Yes     <!-- Submit Button -->
+     <td class=3Dyes> Yes     <!-- Image Button -->
+     <td class=3Dno> · <!-- Reset Button -->
+<!-- <td class=3D"no"> ·      Button --&gt=
;
+
+    <tr><th> <code title=3Dattr-fs-formtarget><a hr=
ef=3D#attr-fs-formtarget>formtarget</a></code>
+     <td class=3Dno> · <!-- Hidden -->
+     <td class=3Dno> · <!-- Text -->
+<!-- <td class=3D"no"> ·      Search --&gt=
;
+     <td class=3Dno> · <!-- URL, Telephone -->
+     <td class=3Dno> · <!-- E-mail -->
+     <td class=3Dno> · <!-- Password -->
+     <td class=3Dno> · <!-- Date and Time -->
+<!-- <td class=3D"no"> ·      Date -->
+<!-- <td class=3D"no"> ·      Month -->
+<!-- <td class=3D"no"> ·      Week -->
+<!-- <td class=3D"no"> ·      Time -->
+     <td class=3Dno> · <!-- Local Date and Time --&g=
t;
+     <td class=3Dno> · <!-- Number -->
+     <td class=3Dno> · <!-- Range -->
+     <td class=3Dno> · <!-- Color -->
+     <td class=3Dno> · <!-- Checkbox -->
+<!-- <td class=3D"no"> ·      Radio Button=
 -->
+     <td class=3Dno> · <!-- File Upload -->
+     <td class=3Dyes> Yes     <!-- Submit Button -->
+     <td class=3Dyes> Yes     <!-- Image Button -->
+     <td class=3Dno> · <!-- Reset Button -->
+<!-- <td class=3D"no"> ·      Button --&gt=
;
+
+    <tr><th> <code title=3Dattr-dim-height><a href=3D=
#attr-dim-height>height</a></code>
+     <td class=3Dno> · <!-- Hidden -->
+     <td class=3Dno> · <!-- Text -->
+<!-- <td class=3D"no"> ·      Search --&gt=
;
+     <td class=3Dno> · <!-- URL, Telephone -->
+     <td class=3Dno> · <!-- E-mail -->
+     <td class=3Dno> · <!-- Password -->
+     <td class=3Dno> · <!-- Date and Time -->
+<!-- <td class=3D"no"> ·      Date -->
+<!-- <td class=3D"no"> ·      Month -->
+<!-- <td class=3D"no"> ·      Week -->
+<!-- <td class=3D"no"> ·      Time -->
+     <td class=3Dno> · <!-- Local Date and Time --&g=
t;
+     <td class=3Dno> · <!-- Number -->
+     <td class=3Dno> · <!-- Range -->
+     <td class=3Dno> · <!-- Color -->
+     <td class=3Dno> · <!-- Checkbox -->
+<!-- <td class=3D"no"> ·      Radio Button=
 -->
+     <td class=3Dno> · <!-- File Upload -->
+     <td class=3Dno> · <!-- Submit Button -->
+     <td class=3Dyes> Yes     <!-- Image Button -->
+     <td class=3Dno> · <!-- Reset Button -->
+<!-- <td class=3D"no"> ·      Button --&gt=
;
+
+    <tr><th> <code title=3Dattr-fe-inputmode><a hre=
f=3D#attr-fe-inputmode>inputmode</a></code>
+     <td class=3Dno> · <!-- Hidden -->
+     <td class=3Dyes> Yes     <!-- Text -->
+<!-- <td class=3D"yes"> Yes          Search -->
+     <td class=3Dno> · <!-- URL, Telephone -->
+     <td class=3Dno> · <!-- E-mail -->
+     <td class=3Dyes> Yes     <!-- Password -->
+     <td class=3Dno> · <!-- Date and Time -->
+<!-- <td class=3D"no"> ·      Date -->
+<!-- <td class=3D"no"> ·      Month -->
+<!-- <td class=3D"no"> ·      Week -->
+<!-- <td class=3D"no"> ·      Time -->
+     <td class=3Dno> · <!-- Local Date and Time --&g=
t;
+     <td class=3Dno> · <!-- Number -->
+     <td class=3Dno> · <!-- Range -->
+     <td class=3Dno> · <!-- Color -->
+     <td class=3Dno> · <!-- Checkbox -->
+<!-- <td class=3D"no"> ·      Radio Button=
 -->
+     <td class=3Dno> · <!-- File Upload -->
+     <td class=3Dno> · <!-- Submit Button -->
+     <td class=3Dno> · <!-- Image Button -->
+     <td class=3Dno> · <!-- Reset Button -->
+<!-- <td class=3D"no"> ·      Button --&gt=
;
+
+    <tr><th> <code title=3Dattr-input-list><a href=3D=
#attr-input-list>list</a></code>
+     <td class=3Dno> · <!-- Hidden -->
+     <td class=3Dyes> Yes     <!-- Text -->
+<!-- <td class=3D"yes"> Yes          Search -->
+     <td class=3Dyes> Yes     <!-- URL, Telephone -->
+     <td class=3Dyes> Yes     <!-- E-mail -->
+     <td class=3Dno> · <!-- Password -->
+     <td class=3Dyes> Yes     <!-- Date and Time -->
+<!-- <td class=3D"yes"> Yes          Date -->
+<!-- <td class=3D"yes"> Yes          Month -->
+<!-- <td class=3D"yes"> Yes          Week -->
+<!-- <td class=3D"yes"> Yes          Time -->
+     <td class=3Dyes> Yes     <!-- Local Date and Time -->
+     <td class=3Dyes> Yes     <!-- Number -->
+     <td class=3Dyes> Yes     <!-- Range -->
+     <td class=3Dyes> Yes     <!-- Color -->
+     <td class=3Dno> · <!-- Checkbox -->
+<!-- <td class=3D"no"> ·      Radio Button=
 -->
+     <td class=3Dno> · <!-- File Upload -->
+     <td class=3Dno> · <!-- Submit Button -->
+     <td class=3Dno> · <!-- Image Button -->
+     <td class=3Dno> · <!-- Reset Button -->
+<!-- <td class=3D"no"> ·      Button --&gt=
;
+
+    <tr><th> <code title=3Dattr-input-max><a href=3D=
#attr-input-max>max</a></code>
+     <td class=3Dno> · <!-- Hidden -->
+     <td class=3Dno> · <!-- Text -->
+<!-- <td class=3D"no"> ·      Search --&gt=
;
+     <td class=3Dno> · <!-- URL, Telephone -->
+     <td class=3Dno> · <!-- E-mail -->
+     <td class=3Dno> · <!-- Password -->
+     <td class=3Dyes> Yes     <!-- Date and Time -->
+<!-- <td class=3D"yes"> Yes          Date -->
+<!-- <td class=3D"yes"> Yes          Month -->
+<!-- <td class=3D"yes"> Yes          Week -->
+<!-- <td class=3D"yes"> Yes          Time -->
+     <td class=3Dyes> Yes     <!-- Local Date and Time -->
+     <td class=3Dyes> Yes     <!-- Number -->
+     <td class=3Dyes> Yes     <!-- Range -->
+     <td class=3Dno> · <!-- Color -->
+     <td class=3Dno> · <!-- Checkbox -->
+<!-- <td class=3D"no"> ·      Radio Button=
 -->
+     <td class=3Dno> · <!-- File Upload -->
+     <td class=3Dno> · <!-- Submit Button -->
+     <td class=3Dno> · <!-- Image Button -->
+     <td class=3Dno> · <!-- Reset Button -->
+<!-- <td class=3D"no"> ·      Button --&gt=
;
+
+    <tr><th> <code title=3Dattr-input-maxlength><a =
href=3D#attr-input-maxlength>maxlength</a></code>
+     <td class=3Dno> · <!-- Hidden -->
+     <td class=3Dyes> Yes     <!-- Text -->
+<!-- <td class=3D"yes"> Yes          Search -->
+     <td class=3Dyes> Yes     <!-- URL, Telephone -->
+     <td class=3Dyes> Yes     <!-- E-mail -->
+     <td class=3Dyes> Yes     <!-- Password -->
+     <td class=3Dno> · <!-- Date and Time -->
+<!-- <td class=3D"no"> ·      Date -->
+<!-- <td class=3D"no"> ·      Month -->
+<!-- <td class=3D"no"> ·      Week -->
+<!-- <td class=3D"no"> ·      Time -->
+     <td class=3Dno> · <!-- Local Date and Time --&g=
t;
+     <td class=3Dno> · <!-- Number -->
+     <td class=3Dno> · <!-- Range -->
+     <td class=3Dno> · <!-- Color -->
+     <td class=3Dno> · <!-- Checkbox -->
+<!-- <td class=3D"no"> ·      Radio Button=
 -->
+     <td class=3Dno> · <!-- File Upload -->
+     <td class=3Dno> · <!-- Submit Button -->
+     <td class=3Dno> · <!-- Image Button -->
+     <td class=3Dno> · <!-- Reset Button -->
+<!-- <td class=3D"no"> ·      Button --&gt=
;
+
+    <tr><th> <code title=3Dattr-input-min><a href=3D=
#attr-input-min>min</a></code>
+     <td class=3Dno> · <!-- Hidden -->
+     <td class=3Dno> · <!-- Text -->
+<!-- <td class=3D"no"> ·      Search --&gt=
;
+     <td class=3Dno> · <!-- URL, Telephone -->
+     <td class=3Dno> · <!-- E-mail -->
+     <td class=3Dno> · <!-- Password -->
+     <td class=3Dyes> Yes     <!-- Date and Time -->
+<!-- <td class=3D"yes"> Yes          Date -->
+<!-- <td class=3D"yes"> Yes          Month -->
+<!-- <td class=3D"yes"> Yes          Week -->
+<!-- <td class=3D"yes"> Yes          Time -->
+     <td class=3Dyes> Yes     <!-- Local Date and Time -->
+     <td class=3Dyes> Yes     <!-- Number -->
+     <td class=3Dyes> Yes     <!-- Range -->
+     <td class=3Dno> · <!-- Color -->
+     <td class=3Dno> · <!-- Checkbox -->
+<!-- <td class=3D"no"> ·      Radio Button=
 -->
+     <td class=3Dno> · <!-- File Upload -->
+     <td class=3Dno> · <!-- Submit Button -->
+     <td class=3Dno> · <!-- Image Button -->
+     <td class=3Dno> · <!-- Reset Button -->
+<!-- <td class=3D"no"> ·      Button --&gt=
;
+
+    <tr><th> <code title=3Dattr-input-minlength><a =
href=3D#attr-input-minlength>minlength</a></code>
+     <td class=3Dno> · <!-- Hidden -->
+     <td class=3Dyes> Yes     <!-- Text -->
+<!-- <td class=3D"yes"> Yes          Search -->
+     <td class=3Dyes> Yes     <!-- URL, Telephone -->
+     <td class=3Dyes> Yes     <!-- E-mail -->
+     <td class=3Dyes> Yes     <!-- Password -->
+     <td class=3Dno> · <!-- Date and Time -->
+<!-- <td class=3D"no"> ·      Date -->
+<!-- <td class=3D"no"> ·      Month -->
+<!-- <td class=3D"no"> ·      Week -->
+<!-- <td class=3D"no"> ·      Time -->
+     <td class=3Dno> · <!-- Local Date and Time --&g=
t;
+     <td class=3Dno> · <!-- Number -->
+     <td class=3Dno> · <!-- Range -->
+     <td class=3Dno> · <!-- Color -->
+     <td class=3Dno> · <!-- Checkbox -->
+<!-- <td class=3D"no"> ·      Radio Button=
 -->
+     <td class=3Dno> · <!-- File Upload -->
+     <td class=3Dno> · <!-- Submit Button -->
+     <td class=3Dno> · <!-- Image Button -->
+     <td class=3Dno> · <!-- Reset Button -->
+<!-- <td class=3D"no"> ·      Button --&gt=
;
+
+    <tr><th> <code title=3Dattr-input-multiple><a h=
ref=3D#attr-input-multiple>multiple</a></code>
+     <td class=3Dno> · <!-- Hidden -->
+     <td class=3Dno> · <!-- Text -->
+<!-- <td class=3D"no"> ·      Search --&gt=
;
+     <td class=3Dno> · <!-- URL, Telephone --> &l=
t;!-- if you change this, you can merge this line with the next to save r=
oom on the chart -->
+     <td class=3Dyes> Yes     <!-- E-mail -->
+     <td class=3Dno> · <!-- Password -->
+     <td class=3Dno> · <!-- Date and Time -->
+<!-- <td class=3D"no"> ·      Date -->
+<!-- <td class=3D"no"> ·      Month -->
+<!-- <td class=3D"no"> ·      Week -->
+<!-- <td class=3D"no"> ·      Time -->
+     <td class=3Dno> · <!-- Local Date and Time --&g=
t;
+     <td class=3Dno> · <!-- Number -->
+     <td class=3Dno> · <!-- Range -->
+     <td class=3Dno> · <!-- Color -->
+     <td class=3Dno> · <!-- Checkbox -->
+<!-- <td class=3D"no"> ·      Radio Button=
 -->
+     <td class=3Dyes> Yes     <!-- File Upload -->
+     <td class=3Dno> · <!-- Submit Button -->
+     <td class=3Dno> · <!-- Image Button -->
+     <td class=3Dno> · <!-- Reset Button -->
+<!-- <td class=3D"no"> ·      Button --&gt=
;
+
+    <tr><th> <code title=3Dattr-input-pattern><a hr=
ef=3D#attr-input-pattern>pattern</a></code>
+     <td class=3Dno> · <!-- Hidden -->
+     <td class=3Dyes> Yes     <!-- Text -->
+<!-- <td class=3D"yes"> Yes          Search -->
+     <td class=3Dyes> Yes     <!-- URL, Telephone -->
+     <td class=3Dyes> Yes     <!-- E-mail -->
+     <td class=3Dyes> Yes     <!-- Password -->
+     <td class=3Dno> · <!-- Date and Time -->
+<!-- <td class=3D"no"> ·      Date -->
+<!-- <td class=3D"no"> ·      Month -->
+<!-- <td class=3D"no"> ·      Week -->
+<!-- <td class=3D"no"> ·      Time -->
+     <td class=3Dno> · <!-- Local Date and Time --&g=
t;
+     <td class=3Dno> · <!-- Number -->
+     <td class=3Dno> · <!-- Range -->
+     <td class=3Dno> · <!-- Color -->
+     <td class=3Dno> · <!-- Checkbox -->
+<!-- <td class=3D"no"> ·      Radio Button=
 -->
+     <td class=3Dno> · <!-- File Upload -->
+     <td class=3Dno> · <!-- Submit Button -->
+     <td class=3Dno> · <!-- Image Button -->
+     <td class=3Dno> · <!-- Reset Button -->
+<!-- <td class=3D"no"> ·      Button --&gt=
;
+
+    <tr><th> <code title=3Dattr-input-placeholder><=
a href=3D#attr-input-placeholder>placeholder</a></code>
+     <td class=3Dno> · <!-- Hidden -->
+     <td class=3Dyes> Yes     <!-- Text -->
+<!-- <td class=3D"yes"> Yes          Search -->
+     <td class=3Dyes> Yes     <!-- URL, Telephone -->
+     <td class=3Dyes> Yes     <!-- E-mail -->
+     <td class=3Dyes> Yes     <!-- Password -->
+     <td class=3Dno> · <!-- Date and Time -->
+<!-- <td class=3D"no"> ·      Date -->
+<!-- <td class=3D"no"> ·      Month -->
+<!-- <td class=3D"no"> ·      Week -->
+<!-- <td class=3D"no"> ·      Time -->
+     <td class=3Dno> · <!-- Local Date and Time --&g=
t;
+     <td class=3Dyes> Yes     <!-- Number -->
+     <td class=3Dno> · <!-- Range -->
+     <td class=3Dno> · <!-- Color -->
+     <td class=3Dno> · <!-- Checkbox -->
+<!-- <td class=3D"no"> ·      Radio Button=
 -->
+     <td class=3Dno> · <!-- File Upload -->
+     <td class=3Dno> · <!-- Submit Button -->
+     <td class=3Dno> · <!-- Image Button -->
+     <td class=3Dno> · <!-- Reset Button -->
+<!-- <td class=3D"no"> ·      Button --&gt=
;
+
+    <tr><th> <code title=3Dattr-input-readonly><a h=
ref=3D#attr-input-readonly>readonly</a></code>
+     <td class=3Dno> · <!-- Hidden -->
+     <td class=3Dyes> Yes     <!-- Text -->
+<!-- <td class=3D"yes"> Yes          Search -->
+     <td class=3Dyes> Yes     <!-- URL, Telephone -->
+     <td class=3Dyes> Yes     <!-- E-mail -->
+     <td class=3Dyes> Yes     <!-- Password -->
+     <td class=3Dyes> Yes     <!-- Date and Time -->
+<!-- <td class=3D"yes"> Yes          Date -->
+<!-- <td class=3D"yes"> Yes          Month -->
+<!-- <td class=3D"yes"> Yes          Week -->
+<!-- <td class=3D"yes"> Yes          Time -->
+     <td class=3Dyes> Yes     <!-- Local Date and Time -->
+     <td class=3Dyes> Yes     <!-- Number -->
+     <td class=3Dno> · <!-- Range -->
+     <td class=3Dno> · <!-- Color -->
+     <td class=3Dno> · <!-- Checkbox -->
+<!-- <td class=3D"no"> ·      Radio Button=
 -->
+     <td class=3Dno> · <!-- File Upload -->
+     <td class=3Dno> · <!-- Submit Button -->
+     <td class=3Dno> · <!-- Image Button -->
+     <td class=3Dno> · <!-- Reset Button -->
+<!-- <td class=3D"no"> ·      Button --&gt=
;
+
+    <tr><th> <code title=3Dattr-input-required><a h=
ref=3D#attr-input-required>required</a></code>
+     <td class=3Dno> · <!-- Hidden -->
+     <td class=3Dyes> Yes     <!-- Text -->
+<!-- <td class=3D"yes"> Yes          Search -->
+     <td class=3Dyes> Yes     <!-- URL, Telephone -->
+     <td class=3Dyes> Yes     <!-- E-mail -->
+     <td class=3Dyes> Yes     <!-- Password -->
+     <td class=3Dyes> Yes     <!-- Date and Time -->
+<!-- <td class=3D"yes"> Yes          Date -->
+<!-- <td class=3D"yes"> Yes          Month -->
+<!-- <td class=3D"yes"> Yes          Week -->
+<!-- <td class=3D"yes"> Yes          Time -->
+     <td class=3Dyes> Yes     <!-- Local Date and Time -->
+     <td class=3Dyes> Yes     <!-- Number -->
+     <td class=3Dno> · <!-- Range -->
+     <td class=3Dno> · <!-- Color -->
+     <td class=3Dyes> Yes     <!-- Checkbox -->
+<!-- <td class=3D"yes"> Yes          Radio Button --&=
gt;
+     <td class=3Dyes> Yes     <!-- File Upload -->
+     <td class=3Dno> · <!-- Submit Button -->
+     <td class=3Dno> · <!-- Image Button -->
+     <td class=3Dno> · <!-- Reset Button -->
+<!-- <td class=3D"no"> ·      Button --&gt=
;
+
+    <tr><th> <code title=3Dattr-input-size><a href=3D=
#attr-input-size>size</a></code>
+     <td class=3Dno> · <!-- Hidden -->
+     <td class=3Dyes> Yes     <!-- Text -->
+<!-- <td class=3D"yes"> Yes          Search -->
+     <td class=3Dyes> Yes     <!-- URL, Telephone -->
+     <td class=3Dyes> Yes     <!-- E-mail -->
+     <td class=3Dyes> Yes     <!-- Password -->
+     <td class=3Dno> · <!-- Date and Time -->
+<!-- <td class=3D"no"> ·      Date -->
+<!-- <td class=3D"no"> ·      Month -->
+<!-- <td class=3D"no"> ·      Week -->
+<!-- <td class=3D"no"> ·      Time -->
+     <td class=3Dno> · <!-- Local Date and Time --&g=
t;
+     <td class=3Dno> · <!-- Number -->
+     <td class=3Dno> · <!-- Range -->
+     <td class=3Dno> · <!-- Color -->
+     <td class=3Dno> · <!-- Checkbox -->
+<!-- <td class=3D"no"> ·      Radio Button=
 -->
+     <td class=3Dno> · <!-- File Upload -->
+     <td class=3Dno> · <!-- Submit Button -->
+     <td class=3Dno> · <!-- Image Button -->
+     <td class=3Dno> · <!-- Reset Button -->
+<!-- <td class=3D"no"> ·      Button --&gt=
;
+
+    <tr><th> <code title=3Dattr-input-src><a href=3D=
#attr-input-src>src</a></code>
+     <td class=3Dno> · <!-- Hidden -->
+     <td class=3Dno> · <!-- Text -->
+<!-- <td class=3D"no"> ·      Search --&gt=
;
+     <td class=3Dno> · <!-- URL, Telephone -->
+     <td class=3Dno> · <!-- E-mail -->
+     <td class=3Dno> · <!-- Password -->
+     <td class=3Dno> · <!-- Date and Time -->
+<!-- <td class=3D"no"> ·      Date -->
+<!-- <td class=3D"no"> ·      Month -->
+<!-- <td class=3D"no"> ·      Week -->
+<!-- <td class=3D"no"> ·      Time -->
+     <td class=3Dno> · <!-- Local Date and Time --&g=
t;
+     <td class=3Dno> · <!-- Number -->
+     <td class=3Dno> · <!-- Range -->
+     <td class=3Dno> · <!-- Color -->
+     <td class=3Dno> · <!-- Checkbox -->
+<!-- <td class=3D"no"> ·      Radio Button=
 -->
+     <td class=3Dno> · <!-- File Upload -->
+     <td class=3Dno> · <!-- Submit Button -->
+     <td class=3Dyes> Yes     <!-- Image Button -->
+     <td class=3Dno> · <!-- Reset Button -->
+<!-- <td class=3D"no"> ·      Button --&gt=
;
+
+    <tr><th> <code title=3Dattr-input-step><a href=3D=
#attr-input-step>step</a></code>
+     <td class=3Dno> · <!-- Hidden -->
+     <td class=3Dno> · <!-- Text -->
+<!-- <td class=3D"no"> ·      Search --&gt=
;
+     <td class=3Dno> · <!-- URL, Telephone -->
+     <td class=3Dno> · <!-- E-mail -->
+     <td class=3Dno> · <!-- Password -->
+     <td class=3Dyes> Yes     <!-- Date and Time -->
+<!-- <td class=3D"yes"> Yes          Date -->
+<!-- <td class=3D"yes"> Yes          Month -->
+<!-- <td class=3D"yes"> Yes          Week -->
+<!-- <td class=3D"yes"> Yes          Time -->
+     <td class=3Dyes> Yes     <!-- Local Date and Time -->
+     <td class=3Dyes> Yes     <!-- Number -->
+     <td class=3Dyes> Yes     <!-- Range -->
+     <td class=3Dno> · <!-- Color -->
+     <td class=3Dno> · <!-- Checkbox -->
+<!-- <td class=3D"no"> ·      Radio Button=
 -->
+     <td class=3Dno> · <!-- File Upload -->
+     <td class=3Dno> · <!-- Submit Button -->
+     <td class=3Dno> · <!-- Image Button -->
+     <td class=3Dno> · <!-- Reset Button -->
+<!-- <td class=3D"no"> ·      Button --&gt=
;
+
+    <tr><th> <code title=3Dattr-dim-width><a href=3D=
#attr-dim-width>width</a></code>
+     <td class=3Dno> · <!-- Hidden -->
+     <td class=3Dno> · <!-- Text -->
+<!-- <td class=3D"no"> ·      Search --&gt=
;
+     <td class=3Dno> · <!-- URL, Telephone -->
+     <td class=3Dno> · <!-- E-mail -->
+     <td class=3Dno> · <!-- Password -->
+     <td class=3Dno> · <!-- Date and Time -->
+<!-- <td class=3D"no"> ·      Date -->
+<!-- <td class=3D"no"> ·      Month -->
+<!-- <td class=3D"no"> ·      Week -->
+<!-- <td class=3D"no"> ·      Time -->
+     <td class=3Dno> · <!-- Local Date and Time --&g=
t;
+     <td class=3Dno> · <!-- Number -->
+     <td class=3Dno> · <!-- Range -->
+     <td class=3Dno> · <!-- Color -->
+     <td class=3Dno> · <!-- Checkbox -->
+<!-- <td class=3D"no"> ·      Radio Button=
 -->
+     <td class=3Dno> · <!-- File Upload -->
+     <td class=3Dno> · <!-- Submit Button -->
+     <td class=3Dyes> Yes     <!-- Image Button -->
+     <td class=3Dno> · <!-- Reset Button -->
+<!-- <td class=3D"no"> ·      Button --&gt=
;
+
+   <tbody><tr><th scope=3Drowgroup colspan=3D16>IDL at=
tributes and methods
+
+    <tr><th> <code title=3Ddom-input-checked><a hre=
f=3D#dom-input-checked>checked</a></code>
+     <td class=3Dno> · <!-- Hidden -->
+     <td class=3Dno> · <!-- Text -->
+<!-- <td class=3D"no"> ·      Search --&gt=
;
+     <td class=3Dno> · <!-- URL, Telephone -->
+     <td class=3Dno> · <!-- E-mail -->
+     <td class=3Dno> · <!-- Password -->
+     <td class=3Dno> · <!-- Date and Time -->
+<!-- <td class=3D"no"> ·      Date -->
+<!-- <td class=3D"no"> ·      Month -->
+<!-- <td class=3D"no"> ·      Week -->
+<!-- <td class=3D"no"> ·      Time -->
+     <td class=3Dno> · <!-- Local Date and Time --&g=
t;
+     <td class=3Dno> · <!-- Number -->
+     <td class=3Dno> · <!-- Range -->
+     <td class=3Dno> · <!-- Color -->
+     <td class=3Dyes> Yes     <!-- Checkbox -->
+<!-- <td class=3D"yes"> Yes          Radio Button --&=
gt;
+     <td class=3Dno> · <!-- File Upload -->
+     <td class=3Dno> · <!-- Submit Button -->
+     <td class=3Dno> · <!-- Image Button -->
+     <td class=3Dno> · <!-- Reset Button -->
+<!-- <td class=3D"no"> ·      Button --&gt=
;
+
+    <tr><th> <code title=3Ddom-input-files><a href=3D=
#dom-input-files>files</a></code>
+     <td class=3Dno> · <!-- Hidden -->
+     <td class=3Dno> · <!-- Text -->
+<!-- <td class=3D"no"> ·      Search --&gt=
;
+     <td class=3Dno> · <!-- URL, Telephone -->
+     <td class=3Dno> · <!-- E-mail -->
+     <td class=3Dno> · <!-- Password -->
+     <td class=3Dno> · <!-- Date and Time -->
+<!-- <td class=3D"no"> ·      Date -->
+<!-- <td class=3D"no"> ·      Month -->
+<!-- <td class=3D"no"> ·      Week -->
+<!-- <td class=3D"no"> ·      Time -->
+     <td class=3Dno> · <!-- Local Date and Time --&g=
t;
+     <td class=3Dno> · <!-- Number -->
+     <td class=3Dno> · <!-- Range -->
+     <td class=3Dno> · <!-- Color -->
+     <td class=3Dno> · <!-- Checkbox -->
+<!-- <td class=3D"no"> ·      Radio Button=
 -->
+     <td class=3Dyes> Yes     <!-- File Upload -->
+     <td class=3Dno> · <!-- Submit Button -->
+     <td class=3Dno> · <!-- Image Button -->
+     <td class=3Dno> · <!-- Reset Button -->
+<!-- <td class=3D"no"> ·      Button --&gt=
;
+
+    <tr class=3Dimpl><th> <code title=3Ddom-input-value&g=
t;<a href=3D#dom-input-value>value</a></code>
+     <td class=3Dyes> <a href=3D#dom-input-value-default title=3D=
dom-input-value-default>default</a> <!-- Hidden -->
+     <td class=3Dyes> <a href=3D#dom-input-value-value title=3D=
dom-input-value-value>value</a> <!-- Text -->
+<!-- <td class=3D"yes"> <span title=3D"dom-in=
put-value-value">value</span>      Search -->
+     <td class=3Dyes> <a href=3D#dom-input-value-value title=3D=
dom-input-value-value>value</a> <!-- URL, Telephone -->
+     <td class=3Dyes> <a href=3D#dom-input-value-value title=3D=
dom-input-value-value>value</a> <!-- E-mail -->
+     <td class=3Dyes> <a href=3D#dom-input-value-value title=3D=
dom-input-value-value>value</a> <!-- Password -->
+     <td class=3Dyes> <a href=3D#dom-input-value-value title=3D=
dom-input-value-value>value</a> <!-- Date and Time -->
+<!-- <td class=3D"yes"> <span title=3D"dom-in=
put-value-value">value</span>      Date -->
+<!-- <td class=3D"yes"> <span title=3D"dom-in=
put-value-value">value</span>      Month -->
+<!-- <td class=3D"yes"> <span title=3D"dom-in=
put-value-value">value</span>      Week -->
+<!-- <td class=3D"yes"> <span title=3D"dom-in=
put-value-value">value</span>      Time -->
+     <td class=3Dyes> <a href=3D#dom-input-value-value title=3D=
dom-input-value-value>value</a> <!-- Local Date and Time --&g=
t;
+     <td class=3Dyes> <a href=3D#dom-input-value-value title=3D=
dom-input-value-value>value</a> <!-- Number -->
+     <td class=3Dyes> <a href=3D#dom-input-value-value title=3D=
dom-input-value-value>value</a> <!-- Range -->
+     <td class=3Dyes> <a href=3D#dom-input-value-value title=3D=
dom-input-value-value>value</a> <!-- Color -->
+     <td class=3Dyes> <a href=3D#dom-input-value-default-on tit=
le=3Ddom-input-value-default-on>default/on</a> <!-- Checkbox =
-->
+<!-- <td class=3D"yes"> <span title=3D"dom-in=
put-value-default-on">default/on</span>      Radio Button -=
->
+     <td class=3Dyes> <a href=3D#dom-input-value-filename title=
=3Ddom-input-value-filename>filename</a> <!-- File Upload --&=
gt;
+     <td class=3Dyes> <a href=3D#dom-input-value-default title=3D=
dom-input-value-default>default</a> <!-- Submit Button -->
+     <td class=3Dyes> <a href=3D#dom-input-value-default title=3D=
dom-input-value-default>default</a> <!-- Image Button -->
+     <td class=3Dyes> <a href=3D#dom-input-value-default title=3D=
dom-input-value-default>default</a> <!-- Reset Button -->
+<!-- <td class=3D"yes"> <span title=3D"dom-in=
put-value-default">default</span>      Button -->
+
+    <tr><th> <code title=3Ddom-input-valueAsDate><a=
 href=3D#dom-input-valueasdate>valueAsDate</a></code>
+     <td class=3Dno> · <!-- Hidden -->
+     <td class=3Dno> · <!-- Text -->
+<!-- <td class=3D"no"> ·      Search --&gt=
;
+     <td class=3Dno> · <!-- URL, Telephone -->
+     <td class=3Dno> · <!-- E-mail -->
+     <td class=3Dno> · <!-- Password -->
+     <td class=3Dyes> Yes     <!-- Date and Time -->
+<!-- <td class=3D"yes"> Yes          Date -->
+<!-- <td class=3D"yes"> Yes          Month -->
+<!-- <td class=3D"yes"> Yes          Week -->
+<!-- <td class=3D"yes"> Yes          Time -->
+     <td class=3Dno> · <!-- Local Date and Time --&g=
t;
+     <td class=3Dno> · <!-- Number -->
+     <td class=3Dno> · <!-- Range -->
+     <td class=3Dno> · <!-- Color -->
+     <td class=3Dno> · <!-- Checkbox -->
+<!-- <td class=3D"no"> ·      Radio Button=
 -->
+     <td class=3Dno> · <!-- File Upload -->
+     <td class=3Dno> · <!-- Submit Button -->
+     <td class=3Dno> · <!-- Image Button -->
+     <td class=3Dno> · <!-- Reset Button -->
+<!-- <td class=3D"no"> ·      Button --&gt=
;
+
+    <tr><th> <code title=3Ddom-input-valueAsNumber>&lt=
;a href=3D#dom-input-valueasnumber>valueAsNumber</a></code&gt=
;
+     <td class=3Dno> · <!-- Hidden -->
+     <td class=3Dno> · <!-- Text -->
+<!-- <td class=3D"no"> ·      Search --&gt=
;
+     <td class=3Dno> · <!-- URL, Telephone -->
+     <td class=3Dno> · <!-- E-mail -->
+     <td class=3Dno> · <!-- Password -->
+     <td class=3Dyes> Yes     <!-- Date and Time -->
+<!-- <td class=3D"yes"> Yes          Date -->
+<!-- <td class=3D"yes"> Yes          Month -->
+<!-- <td class=3D"yes"> Yes          Week -->
+<!-- <td class=3D"yes"> Yes          Time -->
+     <td class=3Dyes> Yes     <!-- Local Date and Time -->
+     <td class=3Dyes> Yes     <!-- Number -->
+     <td class=3Dyes> Yes     <!-- Range -->
+     <td class=3Dno> · <!-- Color -->
+     <td class=3Dno> · <!-- Checkbox -->
+<!-- <td class=3D"no"> ·      Radio Button=
 -->
+     <td class=3Dno> · <!-- File Upload -->
+     <td class=3Dno> · <!-- Submit Button -->
+     <td class=3Dno> · <!-- Image Button -->
+     <td class=3Dno> · <!-- Reset Button -->
+<!-- <td class=3D"no"> ·      Button --&gt=
;
+
+    <tr><th> <code title=3Ddom-input-list><a href=3D=
#dom-input-list>list</a></code>
+     <td class=3Dno> · <!-- Hidden -->
+     <td class=3Dyes> Yes     <!-- Text -->
+<!-- <td class=3D"yes"> Yes          Search -->
+     <td class=3Dyes> Yes     <!-- URL, Telephone -->
+     <td class=3Dyes> Yes     <!-- E-mail -->
+     <td class=3Dno> · <!-- Password -->
+     <td class=3Dyes> Yes     <!-- Date and Time -->
+<!-- <td class=3D"yes"> Yes          Date -->
+<!-- <td class=3D"yes"> Yes          Month -->
+<!-- <td class=3D"yes"> Yes          Week -->
+<!-- <td class=3D"yes"> Yes          Time -->
+     <td class=3Dyes> Yes     <!-- Local Date and Time -->
+     <td class=3Dyes> Yes     <!-- Number -->
+     <td class=3Dyes> Yes     <!-- Range -->
+     <td class=3Dyes> Yes     <!-- Color -->
+     <td class=3Dno> · <!-- Checkbox -->
+<!-- <td class=3D"no"> ·      Radio Button=
 -->
+     <td class=3Dno> · <!-- File Upload -->
+     <td class=3Dno> · <!-- Submit Button -->
+     <td class=3Dno> · <!-- Image Button -->
+     <td class=3Dno> · <!-- Reset Button -->
+<!-- <td class=3D"no"> ·      Button --&gt=
;
+
+    <tr><th> <code title=3Ddom-textarea/input-select>&=
lt;a href=3D#dom-textarea/input-select>select()</a></code>
+     <td class=3Dno> · <!-- Hidden -->
+     <td class=3Dyes> Yes     <!-- Text -->
+<!-- <td class=3D"yes"> Yes          Search -->
+     <td class=3Dyes> Yes     <!-- URL, Telephone -->
+     <td class=3Dno> · <!-- E-mail -->
+     <td class=3Dyes> Yes     <!-- Password -->
+     <td class=3Dno> · <!-- Date and Time -->
+<!-- <td class=3D"no"> ·      Date -->
+<!-- <td class=3D"no"> ·      Month -->
+<!-- <td class=3D"no"> ·      Week -->
+<!-- <td class=3D"no"> ·      Time -->
+     <td class=3Dno> · <!-- Local Date and Time --&g=
t;
+     <td class=3Dno> · <!-- Number -->
+     <td class=3Dno> · <!-- Range -->
+     <td class=3Dno> · <!-- Color -->
+     <td class=3Dno> · <!-- Checkbox -->
+<!-- <td class=3D"no"> ·      Radio Button=
 -->
+     <td class=3Dno> · <!-- File Upload -->
+     <td class=3Dno> · <!-- Submit Button -->
+     <td class=3Dno> · <!-- Image Button -->
+     <td class=3Dno> · <!-- Reset Button -->
+<!-- <td class=3D"no"> ·      Button --&gt=
;
+
+    <tr><th> <code title=3Ddom-textarea/input-selectionSt=
art><a href=3D#dom-textarea/input-selectionstart>selectionStart&=
lt;/a></code>
+     <td class=3Dno> · <!-- Hidden -->
+     <td class=3Dyes> Yes     <!-- Text -->
+<!-- <td class=3D"yes"> Yes          Search -->
+     <td class=3Dyes> Yes     <!-- URL, Telephone -->
+     <td class=3Dno> · <!-- E-mail -->
+     <td class=3Dyes> Yes     <!-- Password -->
+     <td class=3Dno> · <!-- Date and Time -->
+<!-- <td class=3D"no"> ·      Date -->
+<!-- <td class=3D"no"> ·      Month -->
+<!-- <td class=3D"no"> ·      Week -->
+<!-- <td class=3D"no"> ·      Time -->
+     <td class=3Dno> · <!-- Local Date and Time --&g=
t;
+     <td class=3Dno> · <!-- Number -->
+     <td class=3Dno> · <!-- Range -->
+     <td class=3Dno> · <!-- Color -->
+     <td class=3Dno> · <!-- Checkbox -->
+<!-- <td class=3D"no"> ·      Radio Button=
 -->
+     <td class=3Dno> · <!-- File Upload -->
+     <td class=3Dno> · <!-- Submit Button -->
+     <td class=3Dno> · <!-- Image Button -->
+     <td class=3Dno> · <!-- Reset Button -->
+<!-- <td class=3D"no"> ·      Button --&gt=
;
+
+    <tr><th> <code title=3Ddom-textarea/input-selectionEn=
d><a href=3D#dom-textarea/input-selectionend>selectionEnd</a&=
gt;</code>
+     <td class=3Dno> · <!-- Hidden -->
+     <td class=3Dyes> Yes     <!-- Text -->
+<!-- <td class=3D"yes"> Yes          Search -->
+     <td class=3Dyes> Yes     <!-- URL, Telephone -->
+     <td class=3Dno> · <!-- E-mail -->
+     <td class=3Dyes> Yes     <!-- Password -->
+     <td class=3Dno> · <!-- Date and Time -->
+<!-- <td class=3D"no"> ·      Date -->
+<!-- <td class=3D"no"> ·      Month -->
+<!-- <td class=3D"no"> ·      Week -->
+<!-- <td class=3D"no"> ·      Time -->
+     <td class=3Dno> · <!-- Local Date and Time --&g=
t;
+     <td class=3Dno> · <!-- Number -->
+     <td class=3Dno> · <!-- Range -->
+     <td class=3Dno> · <!-- Color -->
+     <td class=3Dno> · <!-- Checkbox -->
+<!-- <td class=3D"no"> ·      Radio Button=
 -->
+     <td class=3Dno> · <!-- File Upload -->
+     <td class=3Dno> · <!-- Submit Button -->
+     <td class=3Dno> · <!-- Image Button -->
+     <td class=3Dno> · <!-- Reset Button -->
+<!-- <td class=3D"no"> ·      Button --&gt=
;
+
+    <tr><th> <code title=3Ddom-textarea/input-selectionDi=
rection><a href=3D#dom-textarea/input-selectiondirection>selecti=
onDirection</a></code>
+     <td class=3Dno> · <!-- Hidden -->
+     <td class=3Dyes> Yes     <!-- Text -->
+<!-- <td class=3D"yes"> Yes          Search -->
+     <td class=3Dyes> Yes     <!-- URL, Telephone -->
+     <td class=3Dno> · <!-- E-mail -->
+     <td class=3Dyes> Yes     <!-- Password -->
+     <td class=3Dno> · <!-- Date and Time -->
+<!-- <td class=3D"no"> ·      Date -->
+<!-- <td class=3D"no"> ·      Month -->
+<!-- <td class=3D"no"> ·      Week -->
+<!-- <td class=3D"no"> ·      Time -->
+     <td class=3Dno> · <!-- Local Date and Time --&g=
t;
+     <td class=3Dno> · <!-- Number -->
+     <td class=3Dno> · <!-- Range -->
+     <td class=3Dno> · <!-- Color -->
+     <td class=3Dno> · <!-- Checkbox -->
+<!-- <td class=3D"no"> ·      Radio Button=
 -->
+     <td class=3Dno> · <!-- File Upload -->
+     <td class=3Dno> · <!-- Submit Button -->
+     <td class=3Dno> · <!-- Image Button -->
+     <td class=3Dno> · <!-- Reset Button -->
+<!-- <td class=3D"no"> ·      Button --&gt=
;
+
+    <tr><th> <code title=3Ddom-textarea/input-setRangeTex=
t><a href=3D#dom-textarea/input-setrangetext>setRangeText()</=
a></code>
+     <td class=3Dno> · <!-- Hidden -->
+     <td class=3Dyes> Yes     <!-- Text -->
+<!-- <td class=3D"yes"> Yes          Search -->
+     <td class=3Dyes> Yes     <!-- URL, Telephone -->
+     <td class=3Dno> · <!-- E-mail -->
+     <td class=3Dyes> Yes     <!-- Password -->
+     <td class=3Dno> · <!-- Date and Time -->
+<!-- <td class=3D"no"> ·      Date -->
+<!-- <td class=3D"no"> ·      Month -->
+<!-- <td class=3D"no"> ·      Week -->
+<!-- <td class=3D"no"> ·      Time -->
+     <td class=3Dno> · <!-- Local Date and Time --&g=
t;
+     <td class=3Dno> · <!-- Number -->
+     <td class=3Dno> · <!-- Range -->
+     <td class=3Dno> · <!-- Color -->
+     <td class=3Dno> · <!-- Checkbox -->
+<!-- <td class=3D"no"> ·      Radio Button=
 -->
+     <td class=3Dno> · <!-- File Upload -->
+     <td class=3Dno> · <!-- Submit Button -->
+     <td class=3Dno> · <!-- Image Button -->
+     <td class=3Dno> · <!-- Reset Button -->
+<!-- <td class=3D"no"> ·      Button --&gt=
;
+
+    <tr><th> <code title=3Ddom-textarea/input-setSelectio=
nRange><a href=3D#dom-textarea/input-setselectionrange>setSelect=
ionRange()</a></code>
+     <td class=3Dno> · <!-- Hidden -->
+     <td class=3Dyes> Yes     <!-- Text -->
+<!-- <td class=3D"yes"> Yes          Search -->
+     <td class=3Dyes> Yes     <!-- URL, Telephone -->
+     <td class=3Dno> · <!-- E-mail -->
+     <td class=3Dyes> Yes     <!-- Password -->
+     <td class=3Dno> · <!-- Date and Time -->
+<!-- <td class=3D"no"> ·      Date -->
+<!-- <td class=3D"no"> ·      Month -->
+<!-- <td class=3D"no"> ·      Week -->
+<!-- <td class=3D"no"> ·      Time -->
+     <td class=3Dno> · <!-- Local Date and Time --&g=
t;
+     <td class=3Dno> · <!-- Number -->
+     <td class=3Dno> · <!-- Range -->
+     <td class=3Dno> · <!-- Color -->
+     <td class=3Dno> · <!-- Checkbox -->
+<!-- <td class=3D"no"> ·      Radio Button=
 -->
+     <td class=3Dno> · <!-- File Upload -->
+     <td class=3Dno> · <!-- Submit Button -->
+     <td class=3Dno> · <!-- Image Button -->
+     <td class=3Dno> · <!-- Reset Button -->
+<!-- <td class=3D"no"> ·      Button --&gt=
;
+
+    <tr><th> <code title=3Ddom-input-stepDown><a hr=
ef=3D#dom-input-stepdown>stepDown()</a></code>
+     <td class=3Dno> · <!-- Hidden -->
+     <td class=3Dno> · <!-- Text -->
+<!-- <td class=3D"no"> ·      Search --&gt=
;
+     <td class=3Dno> · <!-- URL, Telephone -->
+     <td class=3Dno> · <!-- E-mail -->
+     <td class=3Dno> · <!-- Password -->
+     <td class=3Dyes> Yes     <!-- Date and Time -->
+<!-- <td class=3D"yes"> Yes          Date -->
+<!-- <td class=3D"yes"> Yes          Month -->
+<!-- <td class=3D"yes"> Yes          Week -->
+<!-- <td class=3D"yes"> Yes          Time -->
+     <td class=3Dyes> Yes     <!-- Local Date and Time -->
+     <td class=3Dyes> Yes     <!-- Number -->
+     <td class=3Dyes> Yes     <!-- Range -->
+     <td class=3Dno> · <!-- Color -->
+     <td class=3Dno> · <!-- Checkbox -->
+<!-- <td class=3D"no"> ·      Radio Button=
 -->
+     <td class=3Dno> · <!-- File Upload -->
+     <td class=3Dno> · <!-- Submit Button -->
+     <td class=3Dno> · <!-- Image Button -->
+     <td class=3Dno> · <!-- Reset Button -->
+<!-- <td class=3D"no"> ·      Button --&gt=
;
+
+    <tr><th> <code title=3Ddom-input-stepUp><a href=
=3D#dom-input-stepup>stepUp()</a></code>
+     <td class=3Dno> · <!-- Hidden -->
+     <td class=3Dno> · <!-- Text -->
+<!-- <td class=3D"no"> ·      Search --&gt=
;
+     <td class=3Dno> · <!-- URL, Telephone -->
+     <td class=3Dno> · <!-- E-mail -->
+     <td class=3Dno> · <!-- Password -->
+     <td class=3Dyes> Yes     <!-- Date and Time -->
+<!-- <td class=3D"yes"> Yes          Date -->
+<!-- <td class=3D"yes"> Yes          Month -->
+<!-- <td class=3D"yes"> Yes          Week -->
+<!-- <td class=3D"yes"> Yes          Time -->
+     <td class=3Dyes> Yes     <!-- Local Date and Time -->
+     <td class=3Dyes> Yes     <!-- Number -->
+     <td class=3Dyes> Yes     <!-- Range -->
+     <td class=3Dno> · <!-- Color -->
+     <td class=3Dno> · <!-- Checkbox -->
+<!-- <td class=3D"no"> ·      Radio Button=
 -->
+     <td class=3Dno> · <!-- File Upload -->
+     <td class=3Dno> · <!-- Submit Button -->
+     <td class=3Dno> · <!-- Image Button -->
+     <td class=3Dno> · <!-- Reset Button -->
+<!-- <td class=3D"no"> ·      Button --&gt=
;
+
+   <tbody><tr><th scope=3Drowgroup colspan=3D16>Events
+
+    <tr><th> <span title=3D""><code title=
=3Devent-input-input><a href=3D#event-input-input>input</a&gt=
;</code> event</span>
+     <td class=3Dno> · <!-- Hidden -->
+     <td class=3Dyes> Yes     <!-- Text -->
+<!-- <td class=3D"yes"> Yes          Search -->
+     <td class=3Dyes> Yes     <!-- URL, Telephone -->
+     <td class=3Dyes> Yes     <!-- E-mail -->
+     <td class=3Dyes> Yes     <!-- Password -->
+     <td class=3Dyes> Yes     <!-- Date and Time -->
+<!-- <td class=3D"yes"> Yes          Date -->
+<!-- <td class=3D"yes"> Yes          Month -->
+<!-- <td class=3D"yes"> Yes          Week -->
+<!-- <td class=3D"yes"> Yes          Time -->
+     <td class=3Dyes> Yes     <!-- Local Date and Time -->
+     <td class=3Dyes> Yes     <!-- Number -->
+     <td class=3Dyes> Yes     <!-- Range -->
+     <td class=3Dyes> Yes     <!-- Color -->
+     <td class=3Dno> · <!-- Checkbox -->
+<!-- <td class=3D"no"> ·      Radio Button=
 -->
+     <td class=3Dno> · <!-- File Upload -->
+     <td class=3Dno> · <!-- Submit Button -->
+     <td class=3Dno> · <!-- Image Button -->
+     <td class=3Dno> · <!-- Reset Button -->
+<!-- <td class=3D"no"> ·      Button --&gt=
;
+
+    <tr><th> <span title=3D""><code title=
=3Devent-input-change><a href=3D#event-input-change>change</a=
></code> event</span>
+     <td class=3Dno> · <!-- Hidden -->
+     <td class=3Dyes> Yes     <!-- Text -->
+<!-- <td class=3D"yes"> Yes          Search -->
+     <td class=3Dyes> Yes     <!-- URL, Telephone -->
+     <td class=3Dyes> Yes     <!-- E-mail -->
+     <td class=3Dyes> Yes     <!-- Password -->
+     <td class=3Dyes> Yes     <!-- Date and Time -->
+<!-- <td class=3D"yes"> Yes          Date -->
+<!-- <td class=3D"yes"> Yes          Month -->
+<!-- <td class=3D"yes"> Yes          Week -->
+<!-- <td class=3D"yes"> Yes          Time -->
+     <td class=3Dyes> Yes     <!-- Local Date and Time -->
+     <td class=3Dyes> Yes     <!-- Number -->
+     <td class=3Dyes> Yes     <!-- Range -->
+     <td class=3Dyes> Yes     <!-- Color -->
+     <td class=3Dyes> Yes     <!-- Checkbox -->
+<!-- <td class=3D"yes"> Yes          Radio Button --&=
gt;
+     <td class=3Dyes> Yes     <!-- File Upload -->
+     <td class=3Dno> · <!-- Submit Button -->
+     <td class=3Dno> · <!-- Image Button -->
+     <td class=3Dno> · <!-- Reset Button -->
+<!-- <td class=3D"no"> ·      Button --&gt=
;
+
+  </table><div class=3Dimpl>
+
+  <p>Some states of the <code title=3Dattr-input-type><a =
href=3D#attr-input-type>type</a></code> attribute define a=
 <dfn id=3Dvalue-sanitization-algorithm>value
+  sanitization algorithm</dfn>.</p>
+
+  <p>Each <code><a href=3D#the-input-element>input<=
/a></code> element has a <a href=3D#concept-fe-value title=3D=
concept-fe-value>value</a>, which is
+  exposed by the <code title=3Ddom-input-value><a href=3D#dom-i=
nput-value>value</a></code> IDL attribute. Some states def=
ine an
+  <dfn id=3Dconcept-input-value-string-number title=3Dconcept-input-v=
alue-string-number>algorithm to convert a string to a number</dfn&g=
t;, an
+  <dfn id=3Dconcept-input-value-number-string title=3Dconcept-input-v=
alue-number-string>algorithm to convert a number to a string</dfn&g=
t;, an
+  <dfn id=3Dconcept-input-value-string-date title=3Dconcept-input-val=
ue-string-date>algorithm to convert a string to a <code>Date<=
/code>
+  object</dfn>, and an <dfn id=3Dconcept-input-value-date-strin=
g title=3Dconcept-input-value-date-string>algorithm to convert a
+  <code>Date</code> object to a string</dfn>, which ar=
e used by <code title=3Dattr-input-max><a href=3D#attr-input-max=
>max</a></code>, <code title=3Dattr-input-min><a =
href=3D#attr-input-min>min</a></code>, <code title=3Dat=
tr-input-step><a href=3D#attr-input-step>step</a></code=
>, <code title=3Ddom-input-valueAsDate><a href=3D#dom-input-v=
alueasdate>valueAsDate</a></code>, <code title=3Ddom-in=
put-valueAsNumber><a href=3D#dom-input-valueasnumber>valueAsNumb=
er</a></code>, <code title=3Ddom-input-stepDown><a h=
ref=3D#dom-input-stepdown>stepDown()</a></code>, and <c=
ode title=3Ddom-input-stepUp><a href=3D#dom-input-stepup>stepUp(=
)</a></code>.</p>
+
+  <p>Each <code><a href=3D#the-input-element>input<=
/a></code> element has a boolean <dfn id=3Dconcept-input-valu=
e-dirty-flag title=3Dconcept-input-value-dirty-flag>dirty
+  value flag</dfn>. The <a href=3D#concept-input-value-dirty-fl=
ag title=3Dconcept-input-value-dirty-flag>dirty value flag</a> m=
ust be
+  initially set to false when the element is created, and must be set to=
 true whenever the user
+  interacts with the control in a way that changes the <a href=3D#con=
cept-fe-value title=3Dconcept-fe-value>value</a>.
+  (It is also set to true when the value is programmatically changed, as=
 described in the definition
+  of the <code title=3Ddom-input-value><a href=3D#dom-input-val=
ue>value</a></code> IDL attribute.)</p>
+
+  </div>
+
+  <p>The <dfn id=3Dattr-input-value title=3Dattr-input-value&gt=
;<code>value</code></dfn> content attribute gives the d=
efault
+  <a href=3D#concept-fe-value title=3Dconcept-fe-value>value</a=
> of the <code><a href=3D#the-input-element>input</a&gt=
;</code> element. <span class=3Dimpl>When the <code title=3D=
attr-input-value><a href=3D#attr-input-value>value</a><=
/code> content attribute is added, set,
+  or removed, if the control's <a href=3D#concept-input-value-dirty-f=
lag title=3Dconcept-input-value-dirty-flag>dirty value flag</a>
+  is false, the user agent must set the <a href=3D#concept-fe-value t=
itle=3Dconcept-fe-value>value</a> of the element
+  to the value of the <code title=3Dattr-input-value><a href=3D=
#attr-input-value>value</a></code> content attribute, if t=
here is
+  one, or the empty string otherwise, and then run the current <a hre=
f=3D#value-sanitization-algorithm>value sanitization
+  algorithm</a>, if one is defined.</span></p>
+
+  <div class=3Dimpl>
+
+  <p>Each <code><a href=3D#the-input-element>input<=
/a></code> element has a <a href=3D#concept-fe-checked title=3D=
concept-fe-checked>checkedness</a>,
+  which is exposed by the <code title=3Ddom-input-checked><a hr=
ef=3D#dom-input-checked>checked</a></code> IDL attribute.&=
lt;/p>
+
+  <p>Each <code><a href=3D#the-input-element>input<=
/a></code> element has a boolean <dfn id=3Dconcept-input-chec=
ked-dirty-flag title=3Dconcept-input-checked-dirty-flag>dirty checkedn=
ess flag</dfn>. When it is true, the
+  element is said to have a <dfn id=3Dconcept-input-checked-dirty tit=
le=3Dconcept-input-checked-dirty><i>dirty checkedness</i>&=
lt;/dfn>.
+  The <a href=3D#concept-input-checked-dirty-flag title=3Dconcept-inp=
ut-checked-dirty-flag>dirty checkedness flag</a> must be initial=
ly
+  set to false when the element is created, and must be set to true when=
ever the user interacts with
+  the control in a way that changes the <a href=3D#concept-fe-checked=
 title=3Dconcept-fe-checked>checkedness</a>.</p>
+
+  </div>
+
+  <p>The <dfn id=3Dattr-input-checked title=3Dattr-input-checke=
d><code>checked</code></dfn> content attribute is a
+  <a href=3D#boolean-attribute>boolean attribute</a> that gi=
ves the default <a href=3D#concept-fe-checked title=3Dconcept-fe-check=
ed>checkedness</a> of the <code><a href=3D#the-input-el=
ement>input</a></code> element. <span class=3Dimpl>W=
hen the <code title=3Dattr-input-checked><a href=3D#attr-input-c=
hecked>checked</a></code> content attribute is added,
+  if the control does not have <i title=3Dconcept-input-checked-dirty=
><a href=3D#concept-input-checked-dirty>dirty checkedness</a&=
gt;</i>, the
+  user agent must set the <a href=3D#concept-fe-checked title=3Dconce=
pt-fe-checked>checkedness</a> of the element to
+  true; when the <code title=3Dattr-input-checked><a href=3D#at=
tr-input-checked>checked</a></code> content attribute is r=
emoved, if
+  the control does not have <i title=3Dconcept-input-checked-dirty&gt=
;<a href=3D#concept-input-checked-dirty>dirty checkedness</a>=
</i>, the user
+  agent must set the <a href=3D#concept-fe-checked title=3Dconcept-fe=
-checked>checkedness</a> of the element to
+  false.</span></p>
+
+  <div class=3Dimpl>
+
+  <p>The <a href=3D#concept-form-reset-control title=3Dconcept-=
form-reset-control>reset algorithm</a> for <code><a hre=
f=3D#the-input-element>input</a></code>
+  elements is to set the <a href=3D#concept-input-value-dirty-flag ti=
tle=3Dconcept-input-value-dirty-flag>dirty value flag</a> and
+  <a href=3D#concept-input-checked-dirty-flag title=3Dconcept-input-c=
hecked-dirty-flag>dirty checkedness flag</a> back to false, set
+  the <a href=3D#concept-fe-value title=3Dconcept-fe-value>value&l=
t;/a> of the element to the value of the <code title=3Dattr-input-v=
alue><a href=3D#attr-input-value>value</a></code> co=
ntent attribute, if there is one, or the empty string
+  otherwise, set the <a href=3D#concept-fe-checked title=3Dconcept-fe=
-checked>checkedness</a> of the element to true if
+  the element has a <code title=3Dattr-input-checked><a href=3D=
#attr-input-checked>checked</a></code> content attribute a=
nd false if
+  it does not, empty the list of <a href=3D#concept-input-type-file-s=
elected title=3Dconcept-input-type-file-selected>selected
+  files</a>, and then invoke the <a href=3D#value-sanitization-=
algorithm>value sanitization algorithm</a>, if the <code titl=
e=3Dattr-input-type><a href=3D#attr-input-type>type</a>&lt=
;/code> attribute's current state defines one.</p>
+
+  <p>Each <code><a href=3D#the-input-element>input<=
/a></code> element can be <i title=3Dconcept-fe-mutable>&l=
t;a href=3D#concept-fe-mutable>mutable</a></i>. Except whe=
re
+  otherwise specified, an <code><a href=3D#the-input-element&gt=
;input</a></code> element is always <i title=3Dconcept-fe-=
mutable><a href=3D#concept-fe-mutable>mutable</a></i&gt=
;. Similarly, except where otherwise specified, the user
+  agent should not allow the user to modify the element's <a href=3D#=
concept-fe-value title=3Dconcept-fe-value>value</a> or <a hre=
f=3D#concept-fe-checked title=3Dconcept-fe-checked>checkedness</a&g=
t;.</p>
+
+  <p>When an <code><a href=3D#the-input-element>input&=
lt;/a></code> element is <a href=3D#concept-fe-disabled title=
=3Dconcept-fe-disabled>disabled</a>, it is not <i title=3Dcon=
cept-fe-mutable><a href=3D#concept-fe-mutable>mutable</a>&=
lt;/i>.</p>
+
+  <p class=3Dnote>The <code title=3Dattr-input-readonly><=
a href=3D#attr-input-readonly>readonly</a></code> attribut=
e can also in some
+  cases (e.g. for the <a href=3D"#date-state-(type=3Ddate)"=
 title=3Dattr-input-type-date>Date</a> state, but not the <a =
href=3D"#checkbox-state-(type=3Dcheckbox)" title=3Dattr-input-t=
ype-checkbox>Checkbox</a> state) stop an <code><a href=3D=
#the-input-element>input</a></code> element from
+  being <i title=3Dconcept-fe-mutable><a href=3D#concept-fe-mut=
able>mutable</a></i>.</p>
+
+  <p>The <a href=3D#concept-node-clone-ext title=3Dconcept-node=
-clone-ext>cloning steps</a> for <code><a href=3D#the-i=
nput-element>input</a></code> elements
+  must propagate the <a href=3D#concept-fe-value title=3Dconcept-fe-v=
alue>value</a>, <a href=3D#concept-input-value-dirty-flag tit=
le=3Dconcept-input-value-dirty-flag>dirty value flag</a>, <a =
href=3D#concept-fe-checked title=3Dconcept-fe-checked>checkedness</=
a>, and <a href=3D#concept-input-checked-dirty-flag title=3Dconcept=
-input-checked-dirty-flag>dirty checkedness flag</a> from the no=
de being cloned
+  to the copy.</p>
+
+  <hr><p>When an <code><a href=3D#the-input-element=
>input</a></code> element is first created, the element's =
rendering and behavior must
+  be set to the rendering and behavior defined for the <code title=3D=
attr-input-type><a href=3D#attr-input-type>type</a></co=
de>
+  attribute's state, and the <a href=3D#value-sanitization-algorithm&=
gt;value sanitization algorithm</a>, if one is defined for the
+  <code title=3Dattr-input-type><a href=3D#attr-input-type>t=
ype</a></code> attribute's state, must be invoked.</p>
+
+  </div>
+
+  <div id=3Dinput-type-change class=3Dimpl>
+
+  <p>When an <code><a href=3D#the-input-element>input&=
lt;/a></code> element's <code title=3Dattr-input-type><=
a href=3D#attr-input-type>type</a></code> attribute
+  changes state, the user agent must run the following steps:</p>
+
+  <ol><!-- http://software.hixie.ch/utilities/js/live-dom-viewe=
r/saved/602 --><li><p>If the previous state of the element=
's <code title=3Dattr-input-type><a href=3D#attr-input-type>t=
ype</a></code> attribute
+   put the <code title=3Ddom-input-value><a href=3D#dom-input-v=
alue>value</a></code> IDL attribute in the <i title=3Dd=
om-input-value-value><a href=3D#dom-input-value-value>value</=
a></i> mode, and the element's <a href=3D#concept-fe-value ti=
tle=3Dconcept-fe-value>value</a> is not the empty string, and th=
e new state of the element's
+   <code title=3Dattr-input-type><a href=3D#attr-input-type>=
type</a></code> attribute puts the <code title=3Ddom-input=
-value><a href=3D#dom-input-value>value</a></code> I=
DL attribute in either the <i title=3Ddom-input-value-default><a=
 href=3D#dom-input-value-default>default</a></i> mode or t=
he <i title=3Ddom-input-value-default-on><a href=3D#dom-input-va=
lue-default-on>default/on</a></i> mode, then set the eleme=
nt's <code title=3Dattr-input-value><a href=3D#attr-input-value&=
gt;value</a></code> content attribute to the element's <a =
href=3D#concept-fe-value title=3Dconcept-fe-value>value</a>.<=
/li>
+
+   <li><p>Otherwise, if the previous state of the element's =
<code title=3Dattr-input-type><a href=3D#attr-input-type>type=
</a></code> attribute put the <code title=3Ddom-input-valu=
e><a href=3D#dom-input-value>value</a></code>
+   IDL attribute in any mode other than the <i title=3Ddom-input-valu=
e-value><a href=3D#dom-input-value-value>value</a></i&g=
t; mode, and the
+   new state of the element's <code title=3Dattr-input-type><a =
href=3D#attr-input-type>type</a></code> attribute puts the=
 <code title=3Ddom-input-value><a href=3D#dom-input-value>val=
ue</a></code> IDL attribute in the <i title=3Ddom-input-va=
lue-value><a href=3D#dom-input-value-value>value</a></i=
> mode, then set the <a href=3D#concept-fe-value title=3Dconcept-fe=
-value>value</a> of the element to the value of the <code tit=
le=3Dattr-input-value><a href=3D#attr-input-value>value</a&gt=
;</code> content attribute, if there is one, or the empty string
+   otherwise, and then set the control's <a href=3D#concept-input-val=
ue-dirty-flag title=3Dconcept-input-value-dirty-flag>dirty value
+   flag</a> to false.</li>
+
+   <li><p>Update the element's rendering and behavior to the=
 new state's.</li>
+
+   <li><p>Invoke the <a href=3D#value-sanitization-algori=
thm>value sanitization algorithm</a>, if one is defined for the =
<code title=3Dattr-input-type><a href=3D#attr-input-type>type=
</a></code> attribute's new state.</li>
+
+  </ol></div>
+
+  <hr><p>
+  The <code title=3Dattr-fe-name><a href=3D#attr-fe-name>nam=
e</a></code> attribute represents the element's name.
+  The <code title=3Dattr-fe-dirname><a href=3D#attr-fe-dirname&=
gt;dirname</a></code> attribute controls how the element's &l=
t;a href=3D#the-directionality title=3D"the directionality">=
directionality</a> is submitted.
+  The <code title=3Dattr-fe-disabled><a href=3D#attr-fe-disable=
d>disabled</a></code> attribute is used to make the contro=
l non-interactive and to prevent its value from being submitted.
+  The <code title=3Dattr-fae-form><a href=3D#attr-fae-form>f=
orm</a></code> attribute is used to explicitly associate the =
<code><a href=3D#the-input-element>input</a></code&g=
t; element with its <a href=3D#form-owner>form owner</a>.
+  The <code title=3Dattr-fe-autofocus><a href=3D#attr-fe-autofo=
cus>autofocus</a></code> attribute controls focus.
+  The <code title=3Dattr-fe-inputmode><a href=3D#attr-fe-inputm=
ode>inputmode</a></code> attribute controls the user inter=
face's input modality for the control.
+  The <code title=3Dattr-fe-autocomplete><a href=3D#attr-fe-aut=
ocomplete>autocomplete</a></code> attribute controls how t=
he user agent provides autofill behavior.
+  </p>
+
+  <div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-input-indeterminate title=3Ddom-input-in=
determinate><code>indeterminate</code></dfn> IDL att=
ribute must
+  initially be set to false. On getting, it must return the last value i=
t was set to. On setting, it
+  must be set to the new value. It has no effect except for changing the=
 appearance of <a href=3D"#checkbox-state-(type=3Dcheckbox)"=
 title=3Dattr-input-type-checkbox>checkbox</a> controls.</p&g=
t;
+
+  <p>The <dfn id=3Ddom-input-accept title=3Ddom-input-accept&gt=
;<code>accept</code></dfn>, <dfn id=3Ddom-input-alt =
title=3Ddom-input-alt><code>alt</code></dfn>, <df=
n id=3Ddom-input-max title=3Ddom-input-max><code>max</code&gt=
;</dfn>,
+  <dfn id=3Ddom-input-min title=3Ddom-input-min><code>min&lt=
;/code></dfn>, <dfn id=3Ddom-input-multiple title=3Ddom-input=
-multiple><code>multiple</code></dfn>, <dfn id=3D=
dom-input-pattern title=3Ddom-input-pattern><code>pattern</co=
de></dfn>, <dfn id=3Ddom-input-placeholder title=3Ddom-input-=
placeholder><code>placeholder</code></dfn>, <dfn =
id=3Ddom-input-required title=3Ddom-input-required><code>require=
d</code></dfn>, <dfn id=3Ddom-input-size title=3Ddom-input=
-size><code>size</code></dfn>, <dfn id=3Ddom-inpu=
t-src title=3Ddom-input-src><code>src</code></dfn>,
+  and <dfn id=3Ddom-input-step title=3Ddom-input-step><code>=
step</code></dfn> IDL attributes must <a href=3D#reflect&g=
t;reflect</a>
+  the respective content attributes of the same name. The <dfn id=3Dd=
om-input-dirname title=3Ddom-input-dirName><code>dirName</cod=
e></dfn> IDL attribute must <a href=3D#reflect>reflect<=
/a> the
+  <code title=3Dattr-fe-dirname><a href=3D#attr-fe-dirname>d=
irname</a></code> content attribute. The <dfn id=3Ddom-inp=
ut-readonly title=3Ddom-input-readOnly><code>readOnly</code&g=
t;</dfn> IDL attribute must <a href=3D#reflect>reflect</a&=
gt; the
+  <code title=3Dattr-input-readonly><a href=3D#attr-input-reado=
nly>readonly</a></code> content attribute. The <dfn id=3D=
dom-input-defaultchecked title=3Ddom-input-defaultChecked><code>=
defaultChecked</code></dfn> IDL attribute must
+  <a href=3D#reflect>reflect</a> the <code title=3Dattr-i=
nput-checked><a href=3D#attr-input-checked>checked</a><=
/code> content attribute. The
+  <dfn id=3Ddom-input-defaultvalue title=3Ddom-input-defaultValue>=
<code>defaultValue</code></dfn> IDL attribute must
+  <a href=3D#reflect>reflect</a> the <code title=3Dattr-i=
nput-value><a href=3D#attr-input-value>value</a></code&=
gt; content attribute.</p>
+
+  <p>The <dfn id=3Ddom-input-type title=3Ddom-input-type>&lt=
;code>type</code></dfn> IDL attribute must <a href=3D#r=
eflect>reflect</a>
+  the respective content attribute of the same name, <a href=3D#limit=
ed-to-only-known-values>limited to only known values</a>. The
+  <dfn id=3Ddom-input-inputmode title=3Ddom-input-inputmode><co=
de>inputMode</code></dfn> IDL attribute must
+  <a href=3D#reflect>reflect</a> the <code title=3Dattr-f=
e-inputmode><a href=3D#attr-fe-inputmode>inputmode</a><=
/code> content attribute,
+  <a href=3D#limited-to-only-known-values>limited to only known va=
lues</a>. The <dfn id=3Ddom-input-maxlength title=3Ddom-input-ma=
xLength><code>maxLength</code></dfn> IDL attribute m=
ust <a href=3D#reflect>reflect</a>
+  the <code title=3Dattr-input-maxlength><a href=3D#attr-input-=
maxlength>maxlength</a></code> content attribute, <a hr=
ef=3D#limited-to-only-non-negative-numbers>limited to only
+  non-negative numbers</a>.  The <dfn id=3Ddom-input-minlength =
title=3Ddom-input-minLength><code>minLength</code></dfn=
> IDL attribute must <a href=3D#reflect>reflect</a>
+  the <code title=3Dattr-input-minlength><a href=3D#attr-input-=
minlength>minlength</a></code> content attribute, <a hr=
ef=3D#limited-to-only-non-negative-numbers>limited to only
+  non-negative numbers</a>.</p>
+
+  <p>The IDL attributes <dfn id=3Ddom-input-width title=3Ddom-i=
nput-width><code>width</code></dfn> and <dfn id=3D=
dom-input-height title=3Ddom-input-height><code>height</code&=
gt;</dfn> must return the rendered width and height of
+  the image, in CSS pixels, if an image is <a href=3D#being-rendered&=
gt;being rendered</a>, and is being rendered to a
+  visual medium; or else the intrinsic width and height of the image, in=
 CSS pixels, if an image is
+  <i title=3Dinput-img-available><a href=3D#input-img-available=
>available</a></i> but not being rendered to a visual medi=
um; or else 0,
+  if no image is <i title=3Dinput-img-available><a href=3D#inpu=
t-img-available>available</a></i>. When the <code>&l=
t;a href=3D#the-input-element>input</a></code> element's
+  <code title=3Dattr-input-type><a href=3D#attr-input-type>t=
ype</a></code> attribute is not in the <a href=3D"#im=
age-button-state-(type=3Dimage)" title=3Dattr-input-type-image>Im=
age Button</a> state, then no image is <i title=3Dinput-img-avai=
lable><a href=3D#input-img-available>available</a></i&g=
t;. <a href=3D#refsCSS>[CSS]</a></p>
+
+  <p>On setting, they must act as if they <a href=3D#reflect ti=
tle=3Dreflect>reflected</a> the respective
+  content attributes of the same name.</p>
+
+  <p>The <code title=3Ddom-cva-willValidate><a href=3D#do=
m-cva-willvalidate>willValidate</a></code>, <code title=
=3Ddom-cva-validity><a href=3D#dom-cva-validity>validity</a&g=
t;</code>, and <code title=3Ddom-cva-validationMessage><a =
href=3D#dom-cva-validationmessage>validationMessage</a></code=
> IDL attributes, and the <code title=3Ddom-cva-checkValidity>&l=
t;a href=3D#dom-cva-checkvalidity>checkValidity()</a></code&g=
t;, <code title=3Ddom-cva-reportValidity><a href=3D#dom-cva-repo=
rtvalidity>reportValidity()</a></code>, and <code title=
=3Ddom-cva-setCustomValidity><a href=3D#dom-cva-setcustomvalidity&g=
t;setCustomValidity()</a></code> methods, are part of the
+  <a href=3D#the-constraint-validation-api>constraint validation A=
PI</a>. The <code title=3Ddom-lfe-labels><a href=3D#dom-lf=
e-labels>labels</a></code> IDL
+  attribute provides a list of the element's <code><a href=3D#t=
he-label-element>label</a></code>s. The <code title=3Dd=
om-textarea/input-select><a href=3D#dom-textarea/input-select>se=
lect()</a></code>, <code title=3Ddom-textarea/input-select=
ionStart><a href=3D#dom-textarea/input-selectionstart>selectionS=
tart</a></code>, <code title=3Ddom-textarea/input-selectio=
nEnd><a href=3D#dom-textarea/input-selectionend>selectionEnd<=
/a></code>, <code title=3Ddom-textarea/input-selectionDirecti=
on><a href=3D#dom-textarea/input-selectiondirection>selectionDir=
ection</a></code>, <code title=3Ddom-textarea/input-setRan=
geText><a href=3D#dom-textarea/input-setrangetext>setRangeText()=
</a></code>, and <code title=3Ddom-textarea/input-setSelec=
tionRange><a href=3D#dom-textarea/input-setselectionrange>setSel=
ectionRange()</a></code> methods and IDL attributes
+  expose the element's text selection. The <code title=3Ddom-fe-autof=
ocus><a href=3D#dom-fe-autofocus>autofocus</a></code&gt=
;, <code title=3Ddom-fe-disabled><a href=3D#dom-fe-disabled>d=
isabled</a></code>, <code title=3Ddom-fae-form><a hr=
ef=3D#dom-fae-form>form</a></code>, and <code title=3Dd=
om-fe-name><a href=3D#dom-fe-name>name</a></code> ID=
L attributes are part of the element's forms API.</p>
+
+  </div>
+
+
+
+  <h5 id=3Dstates-of-the-type-attribute><span class=3Dsecno>=
4.10.5.1 </span>States of the <code title=3Dattr-input-type>&=
lt;a href=3D#attr-input-type>type</a></code> attribute<=
/h5>
+
+
+  <h6 id=3D"hidden-state-(type=3Dhidden)"><span class=
=3Dsecno>4.10.5.1.1 </span><dfn title=3Dattr-input-type-hidde=
n>Hidden</dfn> state (<code title=3D"">type=3Dhi=
dden</code>)</h6>
+
+  <div class=3Dimpl>
+
+  <p>When an <code><a href=3D#the-input-element>input&=
lt;/a></code> element's <code title=3Dattr-input-type><=
a href=3D#attr-input-type>type</a></code> attribute is in
+  the <a href=3D"#hidden-state-(type=3Dhidden)" title=3Datt=
r-input-type-hidden>Hidden</a> state, the rules in this section =
apply.</p>
+
+  </div>
+
+  <p>The <code><a href=3D#the-input-element>input</=
a></code> element <a href=3D#represents>represents</a&g=
t; a value that is not intended to be
+  examined or manipulated by the user.</p>
+
+  <div class=3Dimpl>
+
+  <p><strong>Constraint validation</strong>: If an &lt=
;code><a href=3D#the-input-element>input</a></code> =
element's <code title=3Dattr-input-type><a href=3D#attr-input-ty=
pe>type</a></code> attribute is in the <a href=3D"=
#hidden-state-(type=3Dhidden)" title=3Dattr-input-type-hidden>Hid=
den</a> state, it is <a href=3D#barred-from-constraint-validatio=
n>barred from constraint
+  validation</a>.</p>
+
+  </div>
+
+  <p>If the <code title=3Dattr-fe-name><a href=3D#attr-fe=
-name>name</a></code> attribute is present and has a value=
 that is a
+  <a href=3D#case-sensitive>case-sensitive</a> match for the=
 string "<code title=3Dattr-fe-name-charset><a href=3D#attr=
-fe-name-charset>_charset_</a></code>", then the elem=
ent's <code title=3Dattr-input-value><a href=3D#attr-input-value=
>value</a></code> attribute must be omitted.</p>
+
+  <div class=3Dbookkeeping>
+
+   <p>The
+   <code title=3Ddom-input-value><a href=3D#dom-input-value>=
value</a></code>
+   IDL attribute <a href=3D#concept-input-apply title=3Dconcept-input=
-apply>applies</a> to this element and is
+   in mode <a href=3D#dom-input-value-default title=3Ddom-input-value=
-default>default</a>.</p>
+
+   <p>The following content attributes must not be specified and &=
lt;a href=3D#do-not-apply>do not
+   apply</a> to the element:
+   <code class=3Dno-backref title=3Dattr-input-accept><a href=3D=
#attr-input-accept>accept</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-alt><a href=3D#a=
ttr-input-alt>alt</a></code>,
+   <code class=3Dno-backref title=3Dattr-fe-autocomplete><a hre=
f=3D#attr-fe-autocomplete>autocomplete</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-checked><a href=3D=
#attr-input-checked>checked</a></code>,
+   <code class=3Dno-backref title=3Dattr-fe-dirname><a href=3D#=
attr-fe-dirname>dirname</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formaction><a href=3D=
#attr-fs-formaction>formaction</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formenctype><a href=
=3D#attr-fs-formenctype>formenctype</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formmethod><a href=3D=
#attr-fs-formmethod>formmethod</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formnovalidate><a h=
ref=3D#attr-fs-formnovalidate>formnovalidate</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formtarget><a href=3D=
#attr-fs-formtarget>formtarget</a></code>,
+   <code class=3Dno-backref title=3Dattr-dim-height><a href=3D#=
attr-dim-height>height</a></code>,
+   <code class=3Dno-backref title=3Dattr-fe-inputmode><a href=3D=
#attr-fe-inputmode>inputmode</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-list><a href=3D#=
attr-input-list>list</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-max><a href=3D#a=
ttr-input-max>max</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-maxlength><a hre=
f=3D#attr-input-maxlength>maxlength</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-min><a href=3D#a=
ttr-input-min>min</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-minlength><a hre=
f=3D#attr-input-minlength>minlength</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-multiple><a href=
=3D#attr-input-multiple>multiple</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-pattern><a href=3D=
#attr-input-pattern>pattern</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-placeholder><a h=
ref=3D#attr-input-placeholder>placeholder</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-readonly><a href=
=3D#attr-input-readonly>readonly</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-required><a href=
=3D#attr-input-required>required</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-size><a href=3D#=
attr-input-size>size</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-src><a href=3D#a=
ttr-input-src>src</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-step><a href=3D#=
attr-input-step>step</a></code>, and
+   <code class=3Dno-backref title=3Dattr-dim-width><a href=3D#a=
ttr-dim-width>width</a></code>.</p>
+
+   <p>The following IDL attributes and methods <a href=3D#do-no=
t-apply>do not apply</a> to the
+   element:
+   <code class=3Dno-backref title=3Ddom-input-checked><a href=3D=
#dom-input-checked>checked</a></code>,
+   <code class=3Dno-backref title=3Ddom-input-files><a href=3D#=
dom-input-files>files</a></code>,
+   <code class=3Dno-backref title=3Ddom-input-list><a href=3D#d=
om-input-list>list</a></code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-selectionStart=
><a href=3D#dom-textarea/input-selectionstart>selectionStart<=
/a></code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-selectionEnd&g=
t;<a href=3D#dom-textarea/input-selectionend>selectionEnd</a>=
</code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-selectionDirec=
tion><a href=3D#dom-textarea/input-selectiondirection>selectionD=
irection</a></code>,
+   <code class=3Dno-backref title=3Ddom-input-valueAsDate><a hr=
ef=3D#dom-input-valueasdate>valueAsDate</a></code>, and
+   <code class=3Dno-backref title=3Ddom-input-valueAsNumber><a =
href=3D#dom-input-valueasnumber>valueAsNumber</a></code> I=
DL attributes;
+   <code class=3Dno-backref title=3Ddom-textarea/input-select><=
a href=3D#dom-textarea/input-select>select()</a></code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-setRangeText&g=
t;<a href=3D#dom-textarea/input-setrangetext>setRangeText()</a&g=
t;</code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-setSelectionRa=
nge><a href=3D#dom-textarea/input-setselectionrange>setSelection=
Range()</a></code>,
+   <code class=3Dno-backref title=3Ddom-input-stepDown><a href=3D=
#dom-input-stepdown>stepDown()</a></code>, and
+   <code class=3Dno-backref title=3Ddom-input-stepUp><a href=3D=
#dom-input-stepup>stepUp()</a></code> methods.</p>
+
+   <p>The <code class=3Dno-backref title=3Devent-input-input&gt=
;<a href=3D#event-input-input>input</a></code> and <=
code class=3Dno-backref title=3Devent-input-change><a href=3D#event=
-input-change>change</a></code> events <a href=3D#do-no=
t-apply>do not apply</a>.</p>
+
+  </div>
+
+
+  <h6 id=3D"text-(type=3Dtext)-state-and-search-state-(type=3Dse=
arch)"><span class=3Dsecno>4.10.5.1.2 </span><dfn =
title=3Dattr-input-type-text>Text</dfn> (<code title=3D"=
">type=3Dtext</code>) state and <dfn title=3Dattr-input-=
type-search>Search</dfn> state (<code title=3D""&gt=
;type=3Dsearch</code>)</h6>
+
+  <!-- v2 idea: applying input masks to <input>, e.g. for enter=
ing
+       data with slashes and dashes (ack Greg Kilwein)
+  -->
+
+  <div class=3Dimpl>
+
+  <p>When an <code><a href=3D#the-input-element>input&=
lt;/a></code> element's <code title=3Dattr-input-type><=
a href=3D#attr-input-type>type</a></code> attribute is in
+  the <a href=3D"#text-(type=3Dtext)-state-and-search-state-(typ=
e=3Dsearch)" title=3Dattr-input-type-text>Text</a> state or=
 the <a href=3D"#text-(type=3Dtext)-state-and-search-state-(type=3D=
search)" title=3Dattr-input-type-search>Search</a> state, t=
he rules in this section apply.</p>
+
+  </div>
+
+  <p>The <code><a href=3D#the-input-element>input</=
a></code> element <a href=3D#represents>represents</a&g=
t; a one line plain text edit control for
+  the element's <a href=3D#concept-fe-value title=3Dconcept-fe-value&=
gt;value</a>.</p>
+
+  <p class=3Dnote>The difference between the <a href=3D"#t=
ext-(type=3Dtext)-state-and-search-state-(type=3Dsearch)" title=3Dat=
tr-input-type-text>Text</a> state
+  and the <a href=3D"#text-(type=3Dtext)-state-and-search-state-=
(type=3Dsearch)" title=3Dattr-input-type-search>Search</a> =
state is primarily stylistic: on
+  platforms where search fields are distinguished from regular text fiel=
ds, the <a href=3D"#text-(type=3Dtext)-state-and-search-state-(ty=
pe=3Dsearch)" title=3Dattr-input-type-search>Search</a> sta=
te might result in an appearance consistent with
+  the platform's search fields rather than appearing like a regular text=
 field.</p>
+
+  <div class=3Dimpl>
+
+  <p>If the element is <i title=3Dconcept-fe-mutable><a h=
ref=3D#concept-fe-mutable>mutable</a></i>, its <a href=3D=
#concept-fe-value title=3Dconcept-fe-value>value</a> should be e=
ditable by the user. User agents must not allow
+  users to insert U+000A LINE FEED (LF) or U+000D CARRIAGE RETURN (CR) c=
haracters into the element's
+  <a href=3D#concept-fe-value title=3Dconcept-fe-value>value</a=
>.</p>
+
+  <!-- this next bit is also in the <textarea> section -->
+  <!-- and something similar is in the session history section -->
+  <p>If the element is <i title=3Dconcept-fe-mutable><a h=
ref=3D#concept-fe-mutable>mutable</a></i>, the user agent =
should allow the
+  user to change the writing direction of the element, setting it either=
 to a left-to-right writing
+  direction or a right-to-left writing direction. If the user does so, t=
he user agent must then run
+  the following steps:</p>
+
+  <ol><li><p>Set the element's <code title=3Dattr-d=
ir><a href=3D#the-dir-attribute>dir</a></code> attri=
bute to "<code title=3Dattr-dir-ltr><a href=3D#attr-dir-ltr=
>ltr</a></code>" if the user selected a left-to-right=
 writing direction, and
+   "<code title=3Dattr-dir-rtl><a href=3D#attr-dir-rtl>=
rtl</a></code>" if the user selected a right-to-left wri=
ting
+   direction.</li>
+
+   <li><p><a href=3D#queue-a-task>Queue a task</a&g=
t; to <a href=3D#fire-a-simple-event>fire a simple event</a> =
that bubbles named <code title=3Devent-input>input</code> at =
the <code><a href=3D#the-input-element>input</a></co=
de> element.</li>
+
+  </ol></div>
+
+  <p>The <code title=3Dattr-input-value><a href=3D#attr-i=
nput-value>value</a></code> attribute, if specified, must =
have a value that
+  contains no U+000A LINE FEED (LF) or U+000D CARRIAGE RETURN (CR) chara=
cters.</p>
+
+  <div class=3Dimpl>
+
+  <p><strong>The <a href=3D#value-sanitization-algorithm&=
gt;value sanitization algorithm</a> is as follows</strong>: &=
lt;a href=3D#strip-line-breaks>Strip line
+  breaks</a> from the <a href=3D#concept-fe-value title=3Dconce=
pt-fe-value>value</a>.</p>
+
+  </div>
+
+  <div class=3Dbookkeeping>
+
+   <p>The following common <code><a href=3D#the-input-ele=
ment>input</a></code> element content
+   attributes, IDL attributes, and methods <a href=3D#concept-input-a=
pply title=3Dconcept-input-apply>apply</a> to the element:
+   <code title=3Dattr-fe-autocomplete><a href=3D#attr-fe-autoco=
mplete>autocomplete</a></code>,
+   <code title=3Dattr-fe-dirname><a href=3D#attr-fe-dirname>=
dirname</a></code>,
+   <code title=3Dattr-fe-inputmode><a href=3D#attr-fe-inputmode=
>inputmode</a></code>,
+   <code title=3Dattr-input-list><a href=3D#attr-input-list>=
list</a></code>,
+   <code title=3Dattr-input-maxlength><a href=3D#attr-input-max=
length>maxlength</a></code>,
+   <code title=3Dattr-input-minlength><a href=3D#attr-input-min=
length>minlength</a></code>,
+   <code title=3Dattr-input-pattern><a href=3D#attr-input-patte=
rn>pattern</a></code>,
+   <code title=3Dattr-input-placeholder><a href=3D#attr-input-p=
laceholder>placeholder</a></code>,
+   <code title=3Dattr-input-readonly><a href=3D#attr-input-read=
only>readonly</a></code>,
+   <code title=3Dattr-input-required><a href=3D#attr-input-requ=
ired>required</a></code>, and
+   <code title=3Dattr-input-size><a href=3D#attr-input-size>=
size</a></code> content attributes;
+   <code title=3Ddom-input-list><a href=3D#dom-input-list>li=
st</a></code>,
+   <code title=3Ddom-textarea/input-selectionStart><a href=3D#d=
om-textarea/input-selectionstart>selectionStart</a></code>=
,
+   <code title=3Ddom-textarea/input-selectionEnd><a href=3D#dom=
-textarea/input-selectionend>selectionEnd</a></code>,=20
+   <code title=3Ddom-textarea/input-selectionDirection><a href=3D=
#dom-textarea/input-selectiondirection>selectionDirection</a>&lt=
;/code>, and
+   <code title=3Ddom-input-value><a href=3D#dom-input-value>=
value</a></code> IDL attributes;
+   <code title=3Ddom-textarea/input-select><a href=3D#dom-texta=
rea/input-select>select()</a></code>,
+   <code title=3Ddom-textarea/input-setRangeText><a href=3D#dom=
-textarea/input-setrangetext>setRangeText()</a></code>, an=
d
+   <code title=3Ddom-textarea/input-setSelectionRange><a href=3D=
#dom-textarea/input-setselectionrange>setSelectionRange()</a>&lt=
;/code> methods.</p>
+
+   <p>The <code title=3Ddom-input-value><a href=3D#dom-in=
put-value>value</a></code> IDL attribute is
+   in mode <a href=3D#dom-input-value-value title=3Ddom-input-value-v=
alue>value</a>.</p>
+
+   <p>The <code title=3Devent-input-input><a href=3D#even=
t-input-input>input</a></code> and <code title=3Devent-=
input-change><a href=3D#event-input-change>change</a></=
code> events <a href=3D#concept-input-apply title=3Dconcept-input-a=
pply>apply</a>.</p>
+
+   <p>The following content attributes must not be specified and &=
lt;a href=3D#do-not-apply>do not
+   apply</a> to the element:
+   <code class=3Dno-backref title=3Dattr-input-accept><a href=3D=
#attr-input-accept>accept</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-alt><a href=3D#a=
ttr-input-alt>alt</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-checked><a href=3D=
#attr-input-checked>checked</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formaction><a href=3D=
#attr-fs-formaction>formaction</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formenctype><a href=
=3D#attr-fs-formenctype>formenctype</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formmethod><a href=3D=
#attr-fs-formmethod>formmethod</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formnovalidate><a h=
ref=3D#attr-fs-formnovalidate>formnovalidate</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formtarget><a href=3D=
#attr-fs-formtarget>formtarget</a></code>,
+   <code class=3Dno-backref title=3Dattr-dim-height><a href=3D#=
attr-dim-height>height</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-max><a href=3D#a=
ttr-input-max>max</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-min><a href=3D#a=
ttr-input-min>min</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-multiple><a href=
=3D#attr-input-multiple>multiple</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-src><a href=3D#a=
ttr-input-src>src</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-step><a href=3D#=
attr-input-step>step</a></code>, and
+   <code class=3Dno-backref title=3Dattr-dim-width><a href=3D#a=
ttr-dim-width>width</a></code>.</p>
+
+   <p>The following IDL attributes and methods <a href=3D#do-no=
t-apply>do not apply</a> to the
+   element:
+   <code class=3Dno-backref title=3Ddom-input-checked><a href=3D=
#dom-input-checked>checked</a></code>,
+   <code class=3Dno-backref title=3Ddom-input-files><a href=3D#=
dom-input-files>files</a></code>,
+   <code class=3Dno-backref title=3Ddom-input-valueAsDate><a hr=
ef=3D#dom-input-valueasdate>valueAsDate</a></code>, and
+   <code class=3Dno-backref title=3Ddom-input-valueAsNumber><a =
href=3D#dom-input-valueasnumber>valueAsNumber</a></code> I=
DL attributes;
+   <code class=3Dno-backref title=3Ddom-input-stepDown><a href=3D=
#dom-input-stepdown>stepDown()</a></code> and
+   <code class=3Dno-backref title=3Ddom-input-stepUp><a href=3D=
#dom-input-stepup>stepUp()</a></code> methods.</p>
+
+  </div>
+
+
+  <h6 id=3D"telephone-state-(type=3Dtel)"><span class=
=3Dsecno>4.10.5.1.3 </span><dfn title=3Dattr-input-type-tel&g=
t;Telephone</dfn> state (<code title=3D"">type=3Dte=
l</code>)</h6>
+
+  <div class=3Dimpl>
+
+  <p>When an <code><a href=3D#the-input-element>input&=
lt;/a></code> element's <code title=3Dattr-input-type><=
a href=3D#attr-input-type>type</a></code> attribute is in
+  the <a href=3D"#telephone-state-(type=3Dtel)" title=3Datt=
r-input-type-tel>Telephone</a> state, the rules in this section =
apply.</p>
+
+  </div>
+
+  <p>The <code><a href=3D#the-input-element>input</=
a></code> element <a href=3D#represents>represents</a&g=
t; a control for editing a telephone number
+  given in the element's <a href=3D#concept-fe-value title=3Dconcept-=
fe-value>value</a>.</p>
+
+  <div class=3Dimpl>
+
+  <p>If the element is <i title=3Dconcept-fe-mutable><a h=
ref=3D#concept-fe-mutable>mutable</a></i>, its <a href=3D=
#concept-fe-value title=3Dconcept-fe-value>value</a> should be e=
ditable by the user. User agents may change the
+  spacing and, with care, the punctuation of <a href=3D#concept-fe-va=
lue title=3Dconcept-fe-value>values</a> that the
+  user enters. User agents must not allow users to insert U+000A LINE FE=
ED (LF) or U+000D CARRIAGE
+  RETURN (CR) characters into the element's <a href=3D#concept-fe-val=
ue title=3Dconcept-fe-value>value</a>.</p>
+
+  </div>
+
+  <p>The <code title=3Dattr-input-value><a href=3D#attr-i=
nput-value>value</a></code> attribute, if specified, must =
have a value that
+  contains no U+000A LINE FEED (LF) or U+000D CARRIAGE RETURN (CR) chara=
cters.</p>
+
+  <div class=3Dimpl>
+
+  <p><strong>The <a href=3D#value-sanitization-algorithm&=
gt;value sanitization algorithm</a> is as follows</strong>: &=
lt;a href=3D#strip-line-breaks>Strip line
+  breaks</a> from the <a href=3D#concept-fe-value title=3Dconce=
pt-fe-value>value</a>.</p>
+
+  </div>
+
+  <p class=3Dnote>Unlike the <a href=3D"#url-state-(type=3D=
url)" title=3Dattr-input-type-url>URL</a> and <a href=3D=
"#e-mail-state-(type=3Demail)" title=3Dattr-input-type-email&gt=
;E-mail</a> types, the <a href=3D"#telephone-state-(type=3D=
tel)" title=3Dattr-input-type-tel>Telephone</a> type does n=
ot enforce a particular syntax. This is
+  intentional; in practice, telephone number fields tend to be free-form=
 fields, because there are a
+  wide variety of valid phone numbers. Systems that need to enforce a pa=
rticular format are
+  encouraged to use the <code title=3Dattr-input-pattern><a hre=
f=3D#attr-input-pattern>pattern</a></code> attribute or th=
e <code title=3Ddom-cva-setCustomValidity><a href=3D#dom-cva-set=
customvalidity>setCustomValidity()</a></code> method to ho=
ok into the client-side
+  validation mechanism.</p>
+
+
+  <div class=3Dbookkeeping>
+
+   <p>The following common <code><a href=3D#the-input-ele=
ment>input</a></code> element content
+   attributes, IDL attributes, and methods <a href=3D#concept-input-a=
pply title=3Dconcept-input-apply>apply</a> to the element:
+   <code title=3Dattr-fe-autocomplete><a href=3D#attr-fe-autoco=
mplete>autocomplete</a></code>,
+   <code title=3Dattr-input-list><a href=3D#attr-input-list>=
list</a></code>,
+   <code title=3Dattr-input-maxlength><a href=3D#attr-input-max=
length>maxlength</a></code>,
+   <code title=3Dattr-input-minlength><a href=3D#attr-input-min=
length>minlength</a></code>,
+   <code title=3Dattr-input-pattern><a href=3D#attr-input-patte=
rn>pattern</a></code>,
+   <code title=3Dattr-input-placeholder><a href=3D#attr-input-p=
laceholder>placeholder</a></code>,
+   <code title=3Dattr-input-readonly><a href=3D#attr-input-read=
only>readonly</a></code>,
+   <code title=3Dattr-input-required><a href=3D#attr-input-requ=
ired>required</a></code>, and
+   <code title=3Dattr-input-size><a href=3D#attr-input-size>=
size</a></code> content attributes;
+   <code title=3Ddom-input-list><a href=3D#dom-input-list>li=
st</a></code>,
+   <code title=3Ddom-textarea/input-selectionStart><a href=3D#d=
om-textarea/input-selectionstart>selectionStart</a></code>=
,
+   <code title=3Ddom-textarea/input-selectionEnd><a href=3D#dom=
-textarea/input-selectionend>selectionEnd</a></code>,=20
+   <code title=3Ddom-textarea/input-selectionDirection><a href=3D=
#dom-textarea/input-selectiondirection>selectionDirection</a>&lt=
;/code>, and
+   <code title=3Ddom-input-value><a href=3D#dom-input-value>=
value</a></code> IDL attributes;
+   <code title=3Ddom-textarea/input-select><a href=3D#dom-texta=
rea/input-select>select()</a></code>,
+   <code title=3Ddom-textarea/input-setRangeText><a href=3D#dom=
-textarea/input-setrangetext>setRangeText()</a></code>, an=
d
+   <code title=3Ddom-textarea/input-setSelectionRange><a href=3D=
#dom-textarea/input-setselectionrange>setSelectionRange()</a>&lt=
;/code> methods.</p>
+
+   <p>The <code title=3Ddom-input-value><a href=3D#dom-in=
put-value>value</a></code> IDL attribute is
+   in mode <a href=3D#dom-input-value-value title=3Ddom-input-value-v=
alue>value</a>.</p>
+
+   <p>The <code title=3Devent-input-input><a href=3D#even=
t-input-input>input</a></code> and <code title=3Devent-=
input-change><a href=3D#event-input-change>change</a></=
code> events <a href=3D#concept-input-apply title=3Dconcept-input-a=
pply>apply</a>.</p>
+
+   <p>The following content attributes must not be specified and &=
lt;a href=3D#do-not-apply>do not
+   apply</a> to the element:
+   <code class=3Dno-backref title=3Dattr-input-accept><a href=3D=
#attr-input-accept>accept</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-alt><a href=3D#a=
ttr-input-alt>alt</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-checked><a href=3D=
#attr-input-checked>checked</a></code>,
+   <code class=3Dno-backref title=3Dattr-fe-dirname><a href=3D#=
attr-fe-dirname>dirname</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formaction><a href=3D=
#attr-fs-formaction>formaction</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formenctype><a href=
=3D#attr-fs-formenctype>formenctype</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formmethod><a href=3D=
#attr-fs-formmethod>formmethod</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formnovalidate><a h=
ref=3D#attr-fs-formnovalidate>formnovalidate</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formtarget><a href=3D=
#attr-fs-formtarget>formtarget</a></code>,
+   <code class=3Dno-backref title=3Dattr-dim-height><a href=3D#=
attr-dim-height>height</a></code>,
+   <code class=3Dno-backref title=3Dattr-fe-inputmode><a href=3D=
#attr-fe-inputmode>inputmode</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-max><a href=3D#a=
ttr-input-max>max</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-min><a href=3D#a=
ttr-input-min>min</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-multiple><a href=
=3D#attr-input-multiple>multiple</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-src><a href=3D#a=
ttr-input-src>src</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-step><a href=3D#=
attr-input-step>step</a></code>, and
+   <code class=3Dno-backref title=3Dattr-dim-width><a href=3D#a=
ttr-dim-width>width</a></code>.</p>
+
+   <p>The following IDL attributes and methods <a href=3D#do-no=
t-apply>do not apply</a> to the
+   element:
+   <code class=3Dno-backref title=3Ddom-input-checked><a href=3D=
#dom-input-checked>checked</a></code>,
+   <code class=3Dno-backref title=3Ddom-input-files><a href=3D#=
dom-input-files>files</a></code>,
+   <code class=3Dno-backref title=3Ddom-input-valueAsDate><a hr=
ef=3D#dom-input-valueasdate>valueAsDate</a></code>, and
+   <code class=3Dno-backref title=3Ddom-input-valueAsNumber><a =
href=3D#dom-input-valueasnumber>valueAsNumber</a></code> I=
DL attributes;
+   <code class=3Dno-backref title=3Ddom-input-stepDown><a href=3D=
#dom-input-stepdown>stepDown()</a></code> and
+   <code class=3Dno-backref title=3Ddom-input-stepUp><a href=3D=
#dom-input-stepup>stepUp()</a></code> methods.</p>
+
+  </div>
+
+
+  <h6 id=3D"url-state-(type=3Durl)"><span class=3Dsec=
no>4.10.5.1.4 </span><dfn title=3Dattr-input-type-url>URL&=
lt;/dfn> state (<code title=3D"">type=3Durl</code&g=
t;)</h6>
+
+  <div class=3Dimpl>
+
+  <p>When an <code><a href=3D#the-input-element>input&=
lt;/a></code> element's <code title=3Dattr-input-type><=
a href=3D#attr-input-type>type</a></code> attribute is in
+  the <a href=3D"#url-state-(type=3Durl)" title=3Dattr-inpu=
t-type-url>URL</a> state, the rules in this section apply.</p=
>
+
+  </div>
+
+  <p>The <code><a href=3D#the-input-element>input</=
a></code> element <a href=3D#represents>represents</a&g=
t; a control for editing a single
+  <a href=3D#absolute-url>absolute URL</a> given in the elem=
ent's <a href=3D#concept-fe-value title=3Dconcept-fe-value>value&lt=
;/a>.</p>
+
+  <div class=3Dimpl>
+
+  <p>If the element is <i title=3Dconcept-fe-mutable><a h=
ref=3D#concept-fe-mutable>mutable</a></i>, the user agent =
should allow the
+  user to change the URL represented by its <a href=3D#concept-fe-val=
ue title=3Dconcept-fe-value>value</a>. User agents
+  may allow the user to set the <a href=3D#concept-fe-value title=3Dc=
oncept-fe-value>value</a> to a string that is not
+  a <a href=3D#valid-url title=3D"valid URL">valid</a=
> <a href=3D#absolute-url>absolute URL</a>, but may also o=
r instead
+  automatically escape characters entered by the user so that the <a =
href=3D#concept-fe-value title=3Dconcept-fe-value>value</a> is a=
lways a <a href=3D#valid-url title=3D"valid URL">valid&lt=
;/a>
+  <a href=3D#absolute-url>absolute URL</a> (even if that isn=
't the actual value seen and edited by the user in the
+  interface). User agents should allow the user to set the <a href=3D=
#concept-fe-value title=3Dconcept-fe-value>value</a> to the empt=
y string. User agents must not allow users to
+  insert U+000A LINE FEED (LF) or U+000D CARRIAGE RETURN (CR) characters=
 into the <a href=3D#concept-fe-value title=3Dconcept-fe-value>valu=
e</a>.</p>
+
+  </div>
+
+  <p>The <code title=3Dattr-input-value><a href=3D#attr-i=
nput-value>value</a></code> attribute, if specified and no=
t empty, must
+  have a value that is a <a href=3D#valid-url-potentially-surrounded-=
by-spaces>valid URL potentially surrounded by spaces</a> that is=
 also an
+  <a href=3D#absolute-url>absolute URL</a>.</p>
+
+  <div class=3Dimpl>
+
+  <p><strong>The <a href=3D#value-sanitization-algorithm&=
gt;value sanitization algorithm</a> is as follows</strong>: &=
lt;a href=3D#strip-line-breaks>Strip line
+  breaks</a> from the <a href=3D#concept-fe-value title=3Dconce=
pt-fe-value>value</a>, then <a href=3D#strip-leading-and-trai=
ling-whitespace>strip leading and
+  trailing whitespace</a> from the <a href=3D#concept-fe-value =
title=3Dconcept-fe-value>value</a>.</p>
+
+  <p><strong>Constraint validation</strong>: While the=
 <a href=3D#concept-fe-value title=3Dconcept-fe-value>value</a&g=
t;
+  of the element is neither the empty string nor a <a href=3D#valid-u=
rl title=3D"valid URL">valid</a>
+  <a href=3D#absolute-url>absolute URL</a>, the element is &=
lt;a href=3D#suffering-from-a-type-mismatch>suffering from a type mism=
atch</a>.</p>
+
+  </div>
+
+  <div class=3Dbookkeeping>
+
+   <p>The following common <code><a href=3D#the-input-ele=
ment>input</a></code> element content
+   attributes, IDL attributes, and methods <a href=3D#concept-input-a=
pply title=3Dconcept-input-apply>apply</a> to the element:
+   <code title=3Dattr-fe-autocomplete><a href=3D#attr-fe-autoco=
mplete>autocomplete</a></code>,
+   <code title=3Dattr-input-list><a href=3D#attr-input-list>=
list</a></code>,
+   <code title=3Dattr-input-maxlength><a href=3D#attr-input-max=
length>maxlength</a></code>,
+   <code title=3Dattr-input-minlength><a href=3D#attr-input-min=
length>minlength</a></code>,
+   <code title=3Dattr-input-pattern><a href=3D#attr-input-patte=
rn>pattern</a></code>,
+   <code title=3Dattr-input-placeholder><a href=3D#attr-input-p=
laceholder>placeholder</a></code>,
+   <code title=3Dattr-input-readonly><a href=3D#attr-input-read=
only>readonly</a></code>,
+   <code title=3Dattr-input-required><a href=3D#attr-input-requ=
ired>required</a></code>, and
+   <code title=3Dattr-input-size><a href=3D#attr-input-size>=
size</a></code> content attributes;
+   <code title=3Ddom-input-list><a href=3D#dom-input-list>li=
st</a></code>,
+   <code title=3Ddom-textarea/input-selectionStart><a href=3D#d=
om-textarea/input-selectionstart>selectionStart</a></code>=
,
+   <code title=3Ddom-textarea/input-selectionEnd><a href=3D#dom=
-textarea/input-selectionend>selectionEnd</a></code>,
+   <code title=3Ddom-textarea/input-selectionDirection><a href=3D=
#dom-textarea/input-selectiondirection>selectionDirection</a>&lt=
;/code>, and
+   <code title=3Ddom-input-value><a href=3D#dom-input-value>=
value</a></code> IDL attributes;
+   <code title=3Ddom-textarea/input-select><a href=3D#dom-texta=
rea/input-select>select()</a></code>,
+   <code title=3Ddom-textarea/input-setRangeText><a href=3D#dom=
-textarea/input-setrangetext>setRangeText()</a></code>, an=
d
+   <code title=3Ddom-textarea/input-setSelectionRange><a href=3D=
#dom-textarea/input-setselectionrange>setSelectionRange()</a>&lt=
;/code> methods.</p>
+
+   <p>The <code title=3Ddom-input-value><a href=3D#dom-in=
put-value>value</a></code> IDL attribute is
+   in mode <a href=3D#dom-input-value-value title=3Ddom-input-value-v=
alue>value</a>.</p>
+
+   <p>The <code title=3Devent-input-input><a href=3D#even=
t-input-input>input</a></code> and <code title=3Devent-=
input-change><a href=3D#event-input-change>change</a></=
code> events <a href=3D#concept-input-apply title=3Dconcept-input-a=
pply>apply</a>.</p>
+
+   <p>The following content attributes must not be specified and &=
lt;a href=3D#do-not-apply>do not
+   apply</a> to the element:
+   <code class=3Dno-backref title=3Dattr-input-accept><a href=3D=
#attr-input-accept>accept</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-alt><a href=3D#a=
ttr-input-alt>alt</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-checked><a href=3D=
#attr-input-checked>checked</a></code>,
+   <code class=3Dno-backref title=3Dattr-fe-dirname><a href=3D#=
attr-fe-dirname>dirname</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formaction><a href=3D=
#attr-fs-formaction>formaction</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formenctype><a href=
=3D#attr-fs-formenctype>formenctype</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formmethod><a href=3D=
#attr-fs-formmethod>formmethod</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formnovalidate><a h=
ref=3D#attr-fs-formnovalidate>formnovalidate</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formtarget><a href=3D=
#attr-fs-formtarget>formtarget</a></code>,
+   <code class=3Dno-backref title=3Dattr-dim-height><a href=3D#=
attr-dim-height>height</a></code>,
+   <code class=3Dno-backref title=3Dattr-fe-inputmode><a href=3D=
#attr-fe-inputmode>inputmode</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-max><a href=3D#a=
ttr-input-max>max</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-min><a href=3D#a=
ttr-input-min>min</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-multiple><a href=
=3D#attr-input-multiple>multiple</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-src><a href=3D#a=
ttr-input-src>src</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-step><a href=3D#=
attr-input-step>step</a></code>, and
+   <code class=3Dno-backref title=3Dattr-dim-width><a href=3D#a=
ttr-dim-width>width</a></code>.</p>
+
+   <p>The following IDL attributes and methods <a href=3D#do-no=
t-apply>do not apply</a> to the
+   element:
+   <code class=3Dno-backref title=3Ddom-input-checked><a href=3D=
#dom-input-checked>checked</a></code>,
+   <code class=3Dno-backref title=3Ddom-input-files><a href=3D#=
dom-input-files>files</a></code>,
+   <code class=3Dno-backref title=3Ddom-input-valueAsDate><a hr=
ef=3D#dom-input-valueasdate>valueAsDate</a></code>, and
+   <code class=3Dno-backref title=3Ddom-input-valueAsNumber><a =
href=3D#dom-input-valueasnumber>valueAsNumber</a></code> I=
DL attributes;
+   <code class=3Dno-backref title=3Ddom-input-stepDown><a href=3D=
#dom-input-stepdown>stepDown()</a></code> and
+   <code class=3Dno-backref title=3Ddom-input-stepUp><a href=3D=
#dom-input-stepup>stepUp()</a></code> methods.</p>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>If a document contained the following markup:</p>
+
+   <pre><input type=3D"url" name=3D"location=
" list=3D"urls">
+<datalist id=3D"urls">
+ <option label=3D"MIME: Format of Internet Message Bodies&qu=
ot; value=3D"http://tools.ietf.org/html/rfc2045">
+ <option label=3D"HTML 4.01 Specification" value=3D&quo=
t;http://www.w3.org/TR/html4/">
+ <option label=3D"Form Controls" value=3D"http://w=
ww.w3.org/TR/xforms/slice8.html#ui-commonelems-hint">
+ <option label=3D"Scalable Vector Graphics (SVG) 1.1 Specifi=
cation" value=3D"http://www.w3.org/TR/SVG/">
+ <option label=3D"Feature Sets - SVG 1.1 - 20030114" va=
lue=3D"http://www.w3.org/TR/SVG/feature.html">
+ <option label=3D"The Single UNIX Specification, Version 3&q=
uot; value=3D"http://www.unix-systems.org/version3/">
+</datalist>
+</pre>
+
+   <p>...and the user had typed "<kbd>www.w3</kbd&gt=
;", and the user agent had also found that the user
+   had visited <code>http://www.w3.org/Consortium/#membership</=
code> and
+   <code>http://www.w3.org/TR/XForms/</code> in the recent p=
ast, then the rendering might look like
+   this:</p>
+
+   <p><img src=3Dhttp://images.whatwg.org/sample-url.png width=3D=
472 alt=3D'A text box with an icon on the left followed by the text &quot=
;www.w3" and a cursor, with a drop down button on the right hand sid=
e; with, below, a drop down box containing a list of six URLs on the left=
, with the first four having grayed out labels on the right; and a scroll=
 bar to the right of the drop down box, indicating further values are ava=
ilable.' height=3D134></p>
+
+   <p>The first four URLs in this sample consist of the four URLs =
in the author-specified list that
+   match the text the user has entered, sorted in some UA-defined manner=
 (maybe by how frequently
+   the user refers to those URLs). Note how the UA is using the knowledg=
e that the values are URLs
+   to allow the user to omit the scheme part and perform intelligent mat=
ching on the domain
+   name.</p>
+
+   <p>The last two URLs (and probably many more, given the scrollb=
ar's indications of more values
+   being available) are the matches from the user agent's session histor=
y data. This data is not
+   made available to the page DOM. In this particular case, the UA has n=
o titles to provide for
+   those values.</p>
+
+  </div>
+
+
+  <h6 id=3D"e-mail-state-(type=3Demail)"><span class=3D=
secno>4.10.5.1.5 </span><dfn title=3Dattr-input-type-email&gt=
;E-mail</dfn> state (<code title=3D"">type=3Demail&=
lt;/code>)</h6>
+
+  <div class=3Dimpl>
+
+  <p>When an <code><a href=3D#the-input-element>input&=
lt;/a></code> element's <code title=3Dattr-input-type><=
a href=3D#attr-input-type>type</a></code> attribute is in
+  the <a href=3D"#e-mail-state-(type=3Demail)" title=3Dattr=
-input-type-email>E-mail</a> state, the rules in this section ap=
ply.</p>
+
+  </div>
+
+  <p>How the <a href=3D"#e-mail-state-(type=3Demail)"=
 title=3Dattr-input-type-email>E-mail</a> state operates depends=
 on whether the
+  <code title=3Dattr-input-multiple><a href=3D#attr-input-multi=
ple>multiple</a></code> attribute is specified or not.<=
/p>
+
+  <dl class=3Dswitch><dt>When the <code title=3Dattr-inpu=
t-multiple><a href=3D#attr-input-multiple>multiple</a><=
/code> attribute is not specified on the
+   element</dt>
+
+   <dd>
+
+    <p>The <code><a href=3D#the-input-element>input&lt=
;/a></code> element <a href=3D#represents>represents</a=
> a control for editing an e-mail
+    address given in the element's <a href=3D#concept-fe-value title=3D=
concept-fe-value>value</a>.</p>
+
+    <div class=3Dimpl>
+
+    <p>If the element is <i title=3Dconcept-fe-mutable><a=
 href=3D#concept-fe-mutable>mutable</a></i>, the user agen=
t should allow the
+    user to change the e-mail address represented by its <a href=3D#c=
oncept-fe-value title=3Dconcept-fe-value>value</a>. User agents =
may allow the user to set the <a href=3D#concept-fe-value title=3Dconc=
ept-fe-value>value</a> to a string that is not a <a href=3D#v=
alid-e-mail-address>valid e-mail
+    address</a>. The user agent should act in a manner consistent =
with expecting the user to
+    provide a single e-mail address. User agents should allow the user t=
o set the <a href=3D#concept-fe-value title=3Dconcept-fe-value>valu=
e</a> to the empty string. User agents must not allow users to
+    insert U+000A LINE FEED (LF) or U+000D CARRIAGE RETURN (CR) characte=
rs into the <a href=3D#concept-fe-value title=3Dconcept-fe-value>va=
lue</a>. User agents may transform the <a href=3D#concept-fe-val=
ue title=3Dconcept-fe-value>value</a> for display and editing; i=
n particular, user agents should
+    convert punycode in the <a href=3D#concept-fe-value title=3Dconce=
pt-fe-value>value</a> to IDN in the display and
+    vice versa.</p>
+
+    <p><strong>Constraint validation</strong>: While t=
he user interface is representing input that
+    the user agent cannot convert to punycode, the control is <a href=
=3D#suffering-from-bad-input>suffering from bad
+    input</a>.</p>
+
+    </div>
+
+    <p>The <code title=3Dattr-input-value><a href=3D#attr=
-input-value>value</a></code> attribute, if specified and =
not empty, must
+    have a value that is a single <a href=3D#valid-e-mail-address>=
valid e-mail address</a>.</p>
+
+    <div class=3Dimpl>
+
+    <p><strong>The <a href=3D#value-sanitization-algorith=
m>value sanitization algorithm</a> is as follows</strong>:=
 <a href=3D#strip-line-breaks>Strip
+    line breaks</a> from the <a href=3D#concept-fe-value title=3D=
concept-fe-value>value</a>, then <a href=3D#strip-leading-and=
-trailing-whitespace>strip
+    leading and trailing whitespace</a> from the <a href=3D#con=
cept-fe-value title=3Dconcept-fe-value>value</a>.</p>
+
+    <p>When the <code title=3Dattr-input-multiple><a href=
=3D#attr-input-multiple>multiple</a></code> attribute is r=
emoved, the user
+    agent must run the <a href=3D#value-sanitization-algorithm>val=
ue sanitization algorithm</a>.</p>
+
+    <p><strong>Constraint validation</strong>: While t=
he <a href=3D#concept-fe-value title=3Dconcept-fe-value>value</a=
>
+    of the element is neither the empty string nor a single <a href=3D=
#valid-e-mail-address>valid e-mail address</a>, the
+    element is <a href=3D#suffering-from-a-type-mismatch>suffering=
 from a type mismatch</a>.</p>
+
+    </div>
+
+   </dd>
+
+   <dt>When the <code title=3Dattr-input-multiple><a href=
=3D#attr-input-multiple>multiple</a></code> attribute <=
em>is</em> specified on
+   the element</dt>
+
+   <dd>
+
+    <div class=3Dimpl>
+
+    <p>The element's <a href=3D#concept-fe-values title=3Dconce=
pt-fe-values>value<em>s</em></a> are the result of &=
lt;a href=3D#split-a-string-on-commas title=3D"split a string on com=
mas">splitting on commas</a> the element's <a href=3D#co=
ncept-fe-value title=3Dconcept-fe-value>value</a>.</p>
+
+    </div>
+
+    <p>The <code><a href=3D#the-input-element>input&lt=
;/a></code> element <a href=3D#represents>represents</a=
> a control for adding, removing, and
+    editing the e-mail addresses given in the element's <a href=3D#co=
ncept-fe-values title=3Dconcept-fe-values>value<em>s</em>&=
lt;/a>.</p>
+
+    <div class=3Dimpl>
+
+    <p>If the element is <i title=3Dconcept-fe-mutable><a=
 href=3D#concept-fe-mutable>mutable</a></i>, the user agen=
t should allow the
+    user to add, remove, and edit the e-mail addresses represented by it=
s <a href=3D#concept-fe-values title=3Dconcept-fe-values>value<e=
m>s</em></a>. User agents may allow the user to set any
+    individual value in the list of <a href=3D#concept-fe-value title=
=3Dconcept-fe-value>value<em>s</em></a> to a
+    string that is not a <a href=3D#valid-e-mail-address>valid e-m=
ail address</a>, but must not allow users to set any
+    individual value to a string containing U+002C COMMA (,), U+000A LIN=
E FEED (LF), or U+000D
+    CARRIAGE RETURN (CR) characters. User agents should allow the user t=
o remove all the addresses
+    in the element's <a href=3D#concept-fe-values title=3Dconcept-fe-=
values>value<em>s</em></a>. User agents may
+    transform the <a href=3D#concept-fe-values title=3Dconcept-fe-val=
ues>value<em>s</em></a> for display and editing; in
+    particular, user agents should convert punycode in the <a href=3D=
#concept-fe-value title=3Dconcept-fe-value>value</a> to IDN in t=
he display and vice versa.</p>
+
+    <p><strong>Constraint validation</strong>: While t=
he user interface describes a situation where
+    an individual value contains a U+002C COMMA (,) or is representing i=
nput that the user agent
+    cannot convert to punycode, the control is <a href=3D#suffering-f=
rom-bad-input>suffering from bad input</a>.</p>
+
+    <p>Whenever the user changes the element's <a href=3D#conce=
pt-fe-value title=3Dconcept-fe-value>value<em>s</em></a=
>, the user agent must run the following
+    steps:</p>
+
+    <ol><li><p>Let <var title=3D"">lat=
est values</var> be a copy of the element's <a href=3D#concept-f=
e-value title=3Dconcept-fe-value>value<em>s</em></a>=
.</li>
+
+     <!-- It's a copy because /values/ might include leading and trai=
ling spaces that we don't
+     necessarily want to remove from the UI but that we do want to remov=
e before serialising. -->
+
+     <li><p><a href=3D#strip-leading-and-trailing-whitesp=
ace>Strip leading and trailing whitespace</a> from each value in=
 <var title=3D"">latest values</var>.</li>
+
+     <li><p>Let the element's <a href=3D#concept-fe-value=
 title=3Dconcept-fe-value>value</a> be the result of
+     concatenating all the values in <var title=3D"">lat=
est values</var>, separating each value from
+     the next by a single U+002C COMMA character (,), maintaining the li=
st's order.</li>
+
+    </ol></div>
+
+    <p>The <code title=3Dattr-input-value><a href=3D#attr=
-input-value>value</a></code> attribute, if specified, mus=
t have a value
+    that is a <a href=3D#valid-e-mail-address-list>valid e-mail ad=
dress list</a>.</p>
+
+    <div class=3Dimpl>
+
+    <p><strong>The <a href=3D#value-sanitization-algorith=
m>value sanitization algorithm</a> is as follows</strong>:=
</p>
+
+    <ol><li><p><a href=3D#split-a-string-on-commas =
title=3D"split a string on commas">Split on commas</a>=
 the element's <a href=3D#concept-fe-value title=3Dconcept-fe-value&gt=
;value</a>, <a href=3D#strip-leading-and-trailing-whitespace>=
strip leading and trailing whitespace</a> from
+     each resulting token, if any, and let the element's <a href=3D#c=
oncept-fe-values title=3Dconcept-fe-values>value<em>s</em>=
</a> be the (possibly empty) resulting list of
+     (possibly empty) tokens, maintaining the original order.</li>
+
+     <li><p>Let the element's <a href=3D#concept-fe-value=
 title=3Dconcept-fe-value>value</a> be the result of
+     concatenating the element's <a href=3D#concept-fe-values title=3D=
concept-fe-values>value<em>s</em></a>, separating
+     each value from the next by a single U+002C COMMA character (,), ma=
intaining the list's
+     order.</li>
+
+    </ol><p>When the <code title=3Dattr-input-multiple&gt=
;<a href=3D#attr-input-multiple>multiple</a></code> att=
ribute is set, the user agent
+    must run the <a href=3D#value-sanitization-algorithm>value san=
itization algorithm</a>.</p>
+
+    <p><strong>Constraint validation</strong>: While t=
he <a href=3D#concept-fe-value title=3Dconcept-fe-value>value</a=
>
+    of the element is not a <a href=3D#valid-e-mail-address-list>v=
alid e-mail address list</a>, the element is <a href=3D#sufferin=
g-from-a-type-mismatch>suffering
+    from a type mismatch</a>.</p>
+
+    </div>
+
+   </dd>
+
+  </dl><p>A <dfn id=3Dvalid-e-mail-address>valid e-mai=
l address</dfn> is a string that matches the <code title=3D&quot=
;">email</code>
+  production of the following ABNF, the character set for which is Unico=
de. This ABNF implements the
+  extensions described in RFC 1123. <a href=3D#refsABNF>[ABNF]<=
/a> <a href=3D#refsRFC5322>[RFC5322]</a> <a href=3D#ref=
sRFC1034>[RFC1034]</a> <a href=3D#refsRFC1123>[RFC1123]&lt=
;/a></p>
+
+  <pre>email         =3D 1*( atext / "." ) "@"=
 label *( "." label )
+label         =3D let-dig [ [ ldh-str ] let-dig ]  ; limited to a length=
 of 63 characters by <a href=3Dhttp://tools.ietf.org/html/rfc1034#sect=
ion-3.5>RFC 1034 section 3.5</a>
+atext         =3D < as defined in <a href=3Dhttp://tools.ietf.=
org/html/rfc5322#section-3.2.3>RFC 5322 section 3.2.3</a> &g=
t;
+let-dig       =3D < as defined in <a href=3Dhttp://tools.ietf.=
org/html/rfc1034#section-3.5>RFC 1034 section 3.5</a> >
+ldh-str       =3D < as defined in <a href=3Dhttp://tools.ietf.=
org/html/rfc1034#section-3.5>RFC 1034 section 3.5</a> >&l=
t;/pre>
+
+  <!-- Domain syntax based on section 3.5 of [RFC1034] and section 2.=
1 of [RFC1123] -->
+
+  <p class=3Dnote>This requirement is a <a href=3D#willful-viol=
ation>willful violation</a> of RFC 5322, which defines a
+  syntax for e-mail addresses that is simultaneously too strict (before =
the "@" character), too
+  vague (after the "@" character), and too lax (allowing comme=
nts, whitespace characters, and quoted
+  strings in manners unfamiliar to most users) to be of practical use he=
re.</p>
+
+  <div class=3Dnote>
+
+   <!--<p><i>This note, like all notes, is non-normative.=
 In case of a conflict
+   between this note and the above definition, the above definition take=
s precedence. Please report
+   any such inconsistencies!</i></p>-->
+
+   <p>The following JavaScript- and Perl-compatible regular expres=
sion is an implementation of the
+   above definition.</p>
+
+   <pre>/^[a-zA-Z0-9.!#$%&'*+/=3D?^_`{|}~-]+@[a-zA-Z0-9](?=
:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-z=
A-Z0-9])?)*$/</pre>
+
+   <!-- based on: http://blog.gerv.net/2011/05/html5_email_address_re=
gexp/ -->
+
+  </div>
+
+  <p>A <dfn id=3Dvalid-e-mail-address-list>valid e-mail addr=
ess list</dfn> is a <a href=3D#set-of-comma-separated-tokens>=
set of comma-separated tokens</a>, where
+  each token is itself a <a href=3D#valid-e-mail-address>valid e-m=
ail address</a>. <span class=3Dimpl>To obtain the list of
+  tokens from a <a href=3D#valid-e-mail-address-list>valid e-mail =
address list</a>, and implementation must <a href=3D#split-a-str=
ing-on-commas title=3D"split a
+  string on commas">split the string on commas</a>.</sp=
an></p>
+
+  <div class=3Dbookkeeping>
+
+   <p>The following common <code><a href=3D#the-input-ele=
ment>input</a></code> element content
+   attributes, IDL attributes, and methods <a href=3D#concept-input-a=
pply title=3Dconcept-input-apply>apply</a> to the element:
+   <code title=3Dattr-fe-autocomplete><a href=3D#attr-fe-autoco=
mplete>autocomplete</a></code>,
+   <code title=3Dattr-input-list><a href=3D#attr-input-list>=
list</a></code>,
+   <code title=3Dattr-input-maxlength><a href=3D#attr-input-max=
length>maxlength</a></code>,
+   <code title=3Dattr-input-minlength><a href=3D#attr-input-min=
length>minlength</a></code>,
+   <code title=3Dattr-input-multiple><a href=3D#attr-input-mult=
iple>multiple</a></code>,
+   <code title=3Dattr-input-pattern><a href=3D#attr-input-patte=
rn>pattern</a></code>,
+   <code title=3Dattr-input-placeholder><a href=3D#attr-input-p=
laceholder>placeholder</a></code>,
+   <code title=3Dattr-input-readonly><a href=3D#attr-input-read=
only>readonly</a></code>,
+   <code title=3Dattr-input-required><a href=3D#attr-input-requ=
ired>required</a></code>, and
+   <code title=3Dattr-input-size><a href=3D#attr-input-size>=
size</a></code> content attributes;
+   <code title=3Ddom-input-list><a href=3D#dom-input-list>li=
st</a></code> and
+   <code title=3Ddom-input-value><a href=3D#dom-input-value>=
value</a></code> IDL attributes.</p>
+
+<!--
+   <p>The following common <code>input</code> element =
content
+   attributes, IDL attributes, and methods <span title=3D"concep=
t-input-apply">apply</span> to the element when
+   the <code title=3D"attr-input-multiple">multiple</=
code> attribute is
+   not specified:
+   .</p>
+-->
+
+   <p>The <code title=3Ddom-input-value><a href=3D#dom-in=
put-value>value</a></code> IDL attribute is
+   in mode <a href=3D#dom-input-value-value title=3Ddom-input-value-v=
alue>value</a>.</p>
+
+   <p>The <code title=3Devent-input-input><a href=3D#even=
t-input-input>input</a></code> and <code title=3Devent-=
input-change><a href=3D#event-input-change>change</a></=
code> events <a href=3D#concept-input-apply title=3Dconcept-input-a=
pply>apply</a>.</p>
+
+   <p>The following content attributes must not be specified and &=
lt;a href=3D#do-not-apply>do not
+   apply</a> to the element:
+   <code class=3Dno-backref title=3Dattr-input-accept><a href=3D=
#attr-input-accept>accept</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-alt><a href=3D#a=
ttr-input-alt>alt</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-checked><a href=3D=
#attr-input-checked>checked</a></code>,
+   <code class=3Dno-backref title=3Dattr-fe-dirname><a href=3D#=
attr-fe-dirname>dirname</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formaction><a href=3D=
#attr-fs-formaction>formaction</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formenctype><a href=
=3D#attr-fs-formenctype>formenctype</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formmethod><a href=3D=
#attr-fs-formmethod>formmethod</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formnovalidate><a h=
ref=3D#attr-fs-formnovalidate>formnovalidate</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formtarget><a href=3D=
#attr-fs-formtarget>formtarget</a></code>,
+   <code class=3Dno-backref title=3Dattr-dim-height><a href=3D#=
attr-dim-height>height</a></code>,
+   <code class=3Dno-backref title=3Dattr-fe-inputmode><a href=3D=
#attr-fe-inputmode>inputmode</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-max><a href=3D#a=
ttr-input-max>max</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-min><a href=3D#a=
ttr-input-min>min</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-src><a href=3D#a=
ttr-input-src>src</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-step><a href=3D#=
attr-input-step>step</a></code>, and
+   <code class=3Dno-backref title=3Dattr-dim-width><a href=3D#a=
ttr-dim-width>width</a></code>.</p>
+
+   <p>The following IDL attributes and methods <a href=3D#do-no=
t-apply>do not apply</a> to the
+   element:
+   <code class=3Dno-backref title=3Ddom-input-checked><a href=3D=
#dom-input-checked>checked</a></code>,
+   <code class=3Dno-backref title=3Ddom-input-files><a href=3D#=
dom-input-files>files</a></code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-selectionStart=
><a href=3D#dom-textarea/input-selectionstart>selectionStart<=
/a></code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-selectionEnd&g=
t;<a href=3D#dom-textarea/input-selectionend>selectionEnd</a>=
</code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-selectionDirec=
tion><a href=3D#dom-textarea/input-selectiondirection>selectionD=
irection</a></code>,
+   <code class=3Dno-backref title=3Ddom-input-valueAsDate><a hr=
ef=3D#dom-input-valueasdate>valueAsDate</a></code>, and
+   <code class=3Dno-backref title=3Ddom-input-valueAsNumber><a =
href=3D#dom-input-valueasnumber>valueAsNumber</a></code> I=
DL attributes;
+   <code class=3Dno-backref title=3Ddom-textarea/input-select><=
a href=3D#dom-textarea/input-select>select()</a></code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-setRangeText&g=
t;<a href=3D#dom-textarea/input-setrangetext>setRangeText()</a&g=
t;</code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-setSelectionRa=
nge><a href=3D#dom-textarea/input-setselectionrange>setSelection=
Range()</a></code>,
+   <code class=3Dno-backref title=3Ddom-input-stepDown><a href=3D=
#dom-input-stepdown>stepDown()</a></code> and
+   <code class=3Dno-backref title=3Ddom-input-stepUp><a href=3D=
#dom-input-stepup>stepUp()</a></code> methods.</p>
+
+  </div>
+
+
+  <h6 id=3D"password-state-(type=3Dpassword)"><span c=
lass=3Dsecno>4.10.5.1.6 </span><dfn title=3Dattr-input-type-p=
assword>Password</dfn> state (<code title=3D"">t=
ype=3Dpassword</code>)</h6>
+
+  <div class=3Dimpl>
+
+  <p>When an <code><a href=3D#the-input-element>input&=
lt;/a></code> element's <code title=3Dattr-input-type><=
a href=3D#attr-input-type>type</a></code> attribute is in
+  the <a href=3D"#password-state-(type=3Dpassword)" title=3D=
attr-input-type-password>Password</a> state, the rules in this s=
ection
+  apply.</p>
+
+  </div>
+
+  <p>The <code><a href=3D#the-input-element>input</=
a></code> element <a href=3D#represents>represents</a&g=
t; a one line plain text edit control for
+  the element's <a href=3D#concept-fe-value title=3Dconcept-fe-value&=
gt;value</a>. The user agent should obscure the value
+  so that people other than the user cannot see it.</p>
+
+  <div class=3Dimpl>
+
+  <p>If the element is <i title=3Dconcept-fe-mutable><a h=
ref=3D#concept-fe-mutable>mutable</a></i>, its <a href=3D=
#concept-fe-value title=3Dconcept-fe-value>value</a> should be e=
ditable by the user. User agents must not allow
+  users to insert U+000A LINE FEED (LF) or U+000D CARRIAGE RETURN (CR) c=
haracters into the <a href=3D#concept-fe-value title=3Dconcept-fe-valu=
e>value</a>.</p>
+
+  </div>
+
+  <p>The <code title=3Dattr-input-value><a href=3D#attr-i=
nput-value>value</a></code> attribute, if specified, must =
have a value that
+  contains no U+000A LINE FEED (LF) or U+000D CARRIAGE RETURN (CR) chara=
cters.</p>
+
+  <div class=3Dimpl>
+
+  <p><strong>The <a href=3D#value-sanitization-algorithm&=
gt;value sanitization algorithm</a> is as follows</strong>: &=
lt;a href=3D#strip-line-breaks>Strip line
+  breaks</a> from the <a href=3D#concept-fe-value title=3Dconce=
pt-fe-value>value</a>.</p>
+
+  </div>
+
+  <div class=3Dbookkeeping>
+
+   <p>The following common <code><a href=3D#the-input-ele=
ment>input</a></code> element content
+   attributes, IDL attributes, and methods <a href=3D#concept-input-a=
pply title=3Dconcept-input-apply>apply</a> to the element:
+   <code title=3Dattr-fe-autocomplete><a href=3D#attr-fe-autoco=
mplete>autocomplete</a></code>,
+   <code title=3Dattr-fe-inputmode><a href=3D#attr-fe-inputmode=
>inputmode</a></code>,
+   <code title=3Dattr-input-maxlength><a href=3D#attr-input-max=
length>maxlength</a></code>,
+   <code title=3Dattr-input-minlength><a href=3D#attr-input-min=
length>minlength</a></code>,
+   <code title=3Dattr-input-pattern><a href=3D#attr-input-patte=
rn>pattern</a></code>,
+   <code title=3Dattr-input-placeholder><a href=3D#attr-input-p=
laceholder>placeholder</a></code>,
+   <code title=3Dattr-input-readonly><a href=3D#attr-input-read=
only>readonly</a></code>,
+   <code title=3Dattr-input-required><a href=3D#attr-input-requ=
ired>required</a></code>, and
+   <code title=3Dattr-input-size><a href=3D#attr-input-size>=
size</a></code> content attributes;
+   <code title=3Ddom-textarea/input-selectionStart><a href=3D#d=
om-textarea/input-selectionstart>selectionStart</a></code>=
,
+   <code title=3Ddom-textarea/input-selectionEnd><a href=3D#dom=
-textarea/input-selectionend>selectionEnd</a></code>,
+   <code title=3Ddom-textarea/input-selectionDirection><a href=3D=
#dom-textarea/input-selectiondirection>selectionDirection</a>&lt=
;/code>, and
+   <code title=3Ddom-input-value><a href=3D#dom-input-value>=
value</a></code> IDL attributes;
+   <code title=3Ddom-textarea/input-select><a href=3D#dom-texta=
rea/input-select>select()</a></code>,
+   <code title=3Ddom-textarea/input-setRangeText><a href=3D#dom=
-textarea/input-setrangetext>setRangeText()</a></code>, an=
d
+   <code title=3Ddom-textarea/input-setSelectionRange><a href=3D=
#dom-textarea/input-setselectionrange>setSelectionRange()</a>&lt=
;/code> methods.</p>
+
+   <p>The <code title=3Ddom-input-value><a href=3D#dom-in=
put-value>value</a></code> IDL attribute is
+   in mode <a href=3D#dom-input-value-value title=3Ddom-input-value-v=
alue>value</a>.</p>
+
+   <p>The <code title=3Devent-input-input><a href=3D#even=
t-input-input>input</a></code> and <code title=3Devent-=
input-change><a href=3D#event-input-change>change</a></=
code> events <a href=3D#concept-input-apply title=3Dconcept-input-a=
pply>apply</a>.</p>
+
+   <p>The following content attributes must not be specified and &=
lt;a href=3D#do-not-apply>do not
+   apply</a> to the element:
+   <code class=3Dno-backref title=3Dattr-input-accept><a href=3D=
#attr-input-accept>accept</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-alt><a href=3D#a=
ttr-input-alt>alt</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-checked><a href=3D=
#attr-input-checked>checked</a></code>,
+   <code class=3Dno-backref title=3Dattr-fe-dirname><a href=3D#=
attr-fe-dirname>dirname</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formaction><a href=3D=
#attr-fs-formaction>formaction</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formenctype><a href=
=3D#attr-fs-formenctype>formenctype</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formmethod><a href=3D=
#attr-fs-formmethod>formmethod</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formnovalidate><a h=
ref=3D#attr-fs-formnovalidate>formnovalidate</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formtarget><a href=3D=
#attr-fs-formtarget>formtarget</a></code>,
+   <code class=3Dno-backref title=3Dattr-dim-height><a href=3D#=
attr-dim-height>height</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-list><a href=3D#=
attr-input-list>list</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-max><a href=3D#a=
ttr-input-max>max</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-min><a href=3D#a=
ttr-input-min>min</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-multiple><a href=
=3D#attr-input-multiple>multiple</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-src><a href=3D#a=
ttr-input-src>src</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-step><a href=3D#=
attr-input-step>step</a></code>, and
+   <code class=3Dno-backref title=3Dattr-dim-width><a href=3D#a=
ttr-dim-width>width</a></code>.</p>
+
+   <p>The following IDL attributes and methods <a href=3D#do-no=
t-apply>do not apply</a> to the
+   element:
+   <code class=3Dno-backref title=3Ddom-input-checked><a href=3D=
#dom-input-checked>checked</a></code>,
+   <code class=3Dno-backref title=3Ddom-input-files><a href=3D#=
dom-input-files>files</a></code>,
+   <code class=3Dno-backref title=3Ddom-input-list><a href=3D#d=
om-input-list>list</a></code>,
+   <code class=3Dno-backref title=3Ddom-input-valueAsDate><a hr=
ef=3D#dom-input-valueasdate>valueAsDate</a></code>, and
+   <code class=3Dno-backref title=3Ddom-input-valueAsNumber><a =
href=3D#dom-input-valueasnumber>valueAsNumber</a></code> I=
DL attributes;
+   <code class=3Dno-backref title=3Ddom-input-stepDown><a href=3D=
#dom-input-stepdown>stepDown()</a></code> and
+   <code class=3Dno-backref title=3Ddom-input-stepUp><a href=3D=
#dom-input-stepup>stepUp()</a></code> methods.</p>
+
+  </div>
+
+
+  <h6 id=3D"date-and-time-state-(type=3Ddatetime)"><s=
pan class=3Dsecno>4.10.5.1.7 </span><dfn title=3Dattr-input-t=
ype-datetime>Date and Time</dfn> state (<code title=3D"&=
quot;>type=3Ddatetime</code>)</h6>
+
+  <div class=3Dimpl>
+
+  <p>When an <code><a href=3D#the-input-element>input&=
lt;/a></code> element's <code title=3Dattr-input-type><=
a href=3D#attr-input-type>type</a></code> attribute is in
+  the <a href=3D"#date-and-time-state-(type=3Ddatetime)" ti=
tle=3Dattr-input-type-datetime>Date and Time</a> state, the rule=
s in this section
+  apply.</p>
+
+  </div>
+
+  <p>The <code><a href=3D#the-input-element>input</=
a></code> element <a href=3D#represents>represents</a&g=
t; a control for setting the element's
+  <a href=3D#concept-fe-value title=3Dconcept-fe-value>value</a=
> to a string representing a specific <a href=3D#concept-datetime t=
itle=3Dconcept-datetime>global date and time</a>. <span class=
=3Dimpl>User agents may display
+  the date and time in whatever time zone is appropriate for the user.&l=
t;/span></p>
+
+  <div class=3Dimpl>
+
+  <p>If the element is <i title=3Dconcept-fe-mutable><a h=
ref=3D#concept-fe-mutable>mutable</a></i>, the user agent =
should allow the
+  user to change the <a href=3D#concept-datetime title=3Dconcept-date=
time>global date and time</a> represented by its
+  <a href=3D#concept-fe-value title=3Dconcept-fe-value>value</a=
>, as obtained by <a href=3D#parse-a-global-date-and-time-string ti=
tle=3D"parse a global date and
+  time string">parsing a global date and time</a> from it.=
 User agents must not allow the user to
+  set the <a href=3D#concept-fe-value title=3Dconcept-fe-value>val=
ue</a> to a non-empty string that is not a
+  <a href=3D#valid-normalized-forced-utc-global-date-and-time-string&=
gt;valid normalized forced-UTC global date and time string</a>, tho=
ugh user agents may allow
+  the user to set and view the time in another time zone and silently tr=
anslate the time to and from
+  the UTC time zone in the <a href=3D#concept-fe-value title=3Dconcep=
t-fe-value>value</a>. If the user agent provides a
+  user interface for selecting a <a href=3D#concept-datetime title=3D=
concept-datetime>global date and time</a>, then
+  the <a href=3D#concept-fe-value title=3Dconcept-fe-value>value&l=
t;/a> must be set to a <a href=3D#valid-normalized-forced-utc-globa=
l-date-and-time-string>valid normalized forced-UTC
+  global date and time string</a> representing the user's selectio=
n. User agents should allow the
+  user to set the <a href=3D#concept-fe-value title=3Dconcept-fe-valu=
e>value</a> to the empty string.</p>
+
+  <p><strong>Constraint validation</strong>: While the=
 user interface describes input that the user
+  agent cannot convert to a <a href=3D#valid-normalized-forced-utc-gl=
obal-date-and-time-string>valid normalized forced-UTC global date and =
time string</a>,
+  the control is <a href=3D#suffering-from-bad-input>suffering fro=
m bad input</a>.</p>
+
+  </div>
+
+  <p class=3Dnote>See the <a href=3D#input-author-notes>intr=
oduction section</a> for a discussion of
+  the difference between the input format and submission format for date=
, time, and number form
+  controls<span class=3Dimpl>, and the <a href=3D#input-impl-no=
tes>implementation notes</a>
+  regarding localization of form controls</span>.</p>
+
+  <p>The <code title=3Dattr-input-value><a href=3D#attr-i=
nput-value>value</a></code> attribute, if specified and no=
t empty, must
+  have a value that is a <a href=3D#valid-global-date-and-time-string=
>valid global date and time string</a>.</p> <!-- ok to =
set
+  out-of-range value, we never know when we might have to represent bogu=
s input; also ok to be
+  non-UTC, we convert it -->
+
+  <div class=3Dimpl>
+
+  <p><strong>The <a href=3D#value-sanitization-algorithm&=
gt;value sanitization algorithm</a> is as follows</strong>: I=
f the <a href=3D#concept-fe-value title=3Dconcept-fe-value>value&lt=
;/a> of the element is a <a href=3D#valid-global-date-and-time-stri=
ng>valid global date and time
+  string</a>, then adjust the time so that the <a href=3D#conce=
pt-fe-value title=3Dconcept-fe-value>value</a>
+  represents the same point in time but expressed in the UTC time zone a=
s a <a href=3D#valid-normalized-forced-utc-global-date-and-time-string=
>valid normalized
+  forced-UTC global date and time string</a>, otherwise, set it to=
 the empty string instead.</p>
+
+  </div>
+
+  <p>The <code title=3Dattr-input-min><a href=3D#attr-inp=
ut-min>min</a></code> attribute, if specified, must have a=
 value that is
+  a <a href=3D#valid-global-date-and-time-string>valid global date=
 and time string</a>. The <code title=3Dattr-input-max><a =
href=3D#attr-input-max>max</a></code>
+  attribute, if specified, must have a value that is a <a href=3D#val=
id-global-date-and-time-string>valid global date and time
+  string</a>.</p>
+
+  <p>The <code title=3Dattr-input-step><a href=3D#attr-in=
put-step>step</a></code> attribute is expressed in seconds=
. <span class=3Dimpl>The <a href=3D#concept-input-step-scale tit=
le=3Dconcept-input-step-scale>step scale factor</a> is 1000 (whi=
ch
+  converts the seconds to milliseconds, as used in the other algorithms)=
.</span> The <a href=3D#concept-input-step-default title=3Dconce=
pt-input-step-default>default step</a> is 60 seconds.</p>
+
+  <div class=3Dimpl>
+
+  <p>When the element is <a href=3D#suffering-from-a-step-misma=
tch>suffering from a step mismatch</a>, the user agent may round=
 the
+  element's <a href=3D#concept-fe-value title=3Dconcept-fe-value>v=
alue</a> to the nearest <a href=3D#concept-datetime title=3Dconc=
ept-datetime>global date and time</a> for which the element woul=
d not <a href=3D#suffering-from-a-step-mismatch title=3D"sufferin=
g from a step mismatch">suffer from a step mismatch</a>.&lt=
;/p>
+
+  <p><strong>The <a href=3D#concept-input-value-string-nu=
mber title=3Dconcept-input-value-string-number>algorithm to convert a =
string to a
+  number</a>, given a string <var title=3D"">input=
</var>, is as follows</strong>: If <a href=3D#parse-a-glob=
al-date-and-time-string title=3D"parse a global date and time string=
">parsing a global date and time</a> from <var title=3D&=
quot;">input</var> results in an error, then return an erro=
r; otherwise, return the number of
+  milliseconds elapsed from midnight UTC on the morning of 1970-01-01 (t=
he time represented by the
+  value "<code title=3D"">1970-01-01T00:00:00.0Z&lt=
;/code>") to the parsed <a href=3D#concept-datetime title=3Dco=
ncept-datetime>global date and time</a>, ignoring leap seconds.&=
lt;/p>
+
+  <p><strong>The <a href=3D#concept-input-value-number-st=
ring title=3Dconcept-input-value-number-string>algorithm to convert a =
number to a
+  string</a>, given a number <var title=3D"">input=
</var>, is as follows</strong>: Return a
+  <a href=3D#valid-normalized-forced-utc-global-date-and-time-string&=
gt;valid normalized forced-UTC global date and time string</a> that=
 represents the <a href=3D#concept-datetime title=3Dconcept-datetime&g=
t;global date and time</a> that is <var title=3D"">=
input</var>
+  milliseconds after midnight UTC on the morning of 1970-01-01 (the time=
 represented by the value
+  "<code title=3D"">1970-01-01T00:00:00.0Z</code=
>").</p>
+
+  <p><strong>The <a href=3D#concept-input-value-string-da=
te title=3Dconcept-input-value-string-date>algorithm to convert a stri=
ng to a
+  <code>Date</code> object</a>, given a string <var=
 title=3D"">input</var>, is as follows</strong>:
+  If <a href=3D#parse-a-global-date-and-time-string title=3D"par=
se a global date and time string">parsing a global date and time&=
lt;/a> from
+  <var title=3D"">input</var> results in an error,=
 then return an error; otherwise, return <a href=3D#create-a-date-obje=
ct title=3D"create a Date object">a new <code>Date<=
/code> object</a> representing the parsed <a href=3D#concept-=
datetime title=3Dconcept-datetime>global date and time</a>, expr=
essed in UTC.</p>
+
+  <p><strong>The <a href=3D#concept-input-value-date-stri=
ng title=3Dconcept-input-value-date-string>algorithm to convert a
+  <code>Date</code> object to a string</a>, given a &l=
t;code>Date</code> object <var title=3D"">input&=
lt;/var>, is as follows</strong>: Return a <a href=3D#valid-n=
ormalized-forced-utc-global-date-and-time-string>valid normalized forc=
ed-UTC global
+  date and time string</a> that represents the <a href=3D#conce=
pt-datetime title=3Dconcept-datetime>global date and
+  time</a> that is represented by <var title=3D"">=
input</var>.</p>
+
+  </div>
+
+  <div class=3Dnote id=3Donly-contemporary-times>
+
+   <p>The <a href=3D"#date-and-time-state-(type=3Ddatetime=
)" title=3Dattr-input-type-datetime>Date and Time</a> state=
 (and other date- and
+   time-related states described in subsequent sections) is not intended=
 for the entry of values for
+   which a precise date and time relative to the contemporary calendar c=
annot be established. For
+   example, it would be inappropriate for the entry of times like "=
one millisecond after the big
+   bang", "the early part of the Jurassic period", or &qu=
ot;a winter around 250 BCE".</p>
+
+   <p>For the input of dates before the introduction of the Gregor=
ian calendar, authors are
+   encouraged to not use the <a href=3D"#date-and-time-state-(ty=
pe=3Ddatetime)" title=3Dattr-input-type-datetime>Date and Time&lt=
;/a> state (and
+   the other date- and time-related states described in subsequent secti=
ons), as user agents are not
+   required to support converting dates and times from earlier periods t=
o the Gregorian calendar,
+   and asking users to do so manually puts an undue burden on users. (Th=
is is complicated by the
+   manner in which the Gregorian calendar was phased in, which occurred =
at different times in
+   different countries, ranging from partway through the 16th century al=
l the way to early in the
+   20th.) Instead, authors are encouraged to provide fine-grained input =
controls using the
+   <code><a href=3D#the-select-element>select</a></=
code> element and <code><a href=3D#the-input-element>input=
</a></code> elements with the <a href=3D"#number-stat=
e-(type=3Dnumber)" title=3Dattr-input-type-number>Number</a&gt=
; state.</p>
+
+  </div>
+
+  <div class=3Dbookkeeping>
+
+   <p>The following common <code><a href=3D#the-input-ele=
ment>input</a></code> element content
+   attributes, IDL attributes, and methods <a href=3D#concept-input-a=
pply title=3Dconcept-input-apply>apply</a> to the element:
+   <code title=3Dattr-fe-autocomplete><a href=3D#attr-fe-autoco=
mplete>autocomplete</a></code>,
+   <code title=3Dattr-input-list><a href=3D#attr-input-list>=
list</a></code>,
+   <code title=3Dattr-input-max><a href=3D#attr-input-max>ma=
x</a></code>,
+   <code title=3Dattr-input-min><a href=3D#attr-input-min>mi=
n</a></code>,
+   <code title=3Dattr-input-readonly><a href=3D#attr-input-read=
only>readonly</a></code>,
+   <code title=3Dattr-input-required><a href=3D#attr-input-requ=
ired>required</a></code>, and
+   <code title=3Dattr-input-step><a href=3D#attr-input-step>=
step</a></code> content attributes;
+   <code title=3Ddom-input-list><a href=3D#dom-input-list>li=
st</a></code>,
+   <code title=3Ddom-input-value><a href=3D#dom-input-value>=
value</a></code>,
+   <code title=3Ddom-input-valueAsDate><a href=3D#dom-input-val=
ueasdate>valueAsDate</a></code>, and
+   <code title=3Ddom-input-valueAsNumber><a href=3D#dom-input-v=
alueasnumber>valueAsNumber</a></code> IDL attributes;
+   <code title=3Ddom-input-stepDown><a href=3D#dom-input-stepdo=
wn>stepDown()</a></code> and
+   <code title=3Ddom-input-stepUp><a href=3D#dom-input-stepup&g=
t;stepUp()</a></code> methods.</p>
+
+   <p>The <code title=3Ddom-input-value><a href=3D#dom-in=
put-value>value</a></code> IDL attribute is
+   in mode <a href=3D#dom-input-value-value title=3Ddom-input-value-v=
alue>value</a>.</p>
+
+   <p>The <code title=3Devent-input-input><a href=3D#even=
t-input-input>input</a></code> and <code title=3Devent-=
input-change><a href=3D#event-input-change>change</a></=
code> events <a href=3D#concept-input-apply title=3Dconcept-input-a=
pply>apply</a>.</p>
+
+   <p>The following content attributes must not be specified and &=
lt;a href=3D#do-not-apply>do not
+   apply</a> to the element:
+   <code class=3Dno-backref title=3Dattr-input-accept><a href=3D=
#attr-input-accept>accept</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-alt><a href=3D#a=
ttr-input-alt>alt</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-checked><a href=3D=
#attr-input-checked>checked</a></code>,
+   <code class=3Dno-backref title=3Dattr-fe-dirname><a href=3D#=
attr-fe-dirname>dirname</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formaction><a href=3D=
#attr-fs-formaction>formaction</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formenctype><a href=
=3D#attr-fs-formenctype>formenctype</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formmethod><a href=3D=
#attr-fs-formmethod>formmethod</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formnovalidate><a h=
ref=3D#attr-fs-formnovalidate>formnovalidate</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formtarget><a href=3D=
#attr-fs-formtarget>formtarget</a></code>,
+   <code class=3Dno-backref title=3Dattr-dim-height><a href=3D#=
attr-dim-height>height</a></code>,
+   <code class=3Dno-backref title=3Dattr-fe-inputmode><a href=3D=
#attr-fe-inputmode>inputmode</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-maxlength><a hre=
f=3D#attr-input-maxlength>maxlength</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-minlength><a hre=
f=3D#attr-input-minlength>minlength</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-multiple><a href=
=3D#attr-input-multiple>multiple</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-pattern><a href=3D=
#attr-input-pattern>pattern</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-placeholder><a h=
ref=3D#attr-input-placeholder>placeholder</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-size><a href=3D#=
attr-input-size>size</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-src><a href=3D#a=
ttr-input-src>src</a></code>, and
+   <code class=3Dno-backref title=3Dattr-dim-width><a href=3D#a=
ttr-dim-width>width</a></code>.</p>
+
+   <p>The following IDL attributes and methods <a href=3D#do-no=
t-apply>do not apply</a> to the
+   element:
+   <code class=3Dno-backref title=3Ddom-input-checked><a href=3D=
#dom-input-checked>checked</a></code>,
+   <code class=3Dno-backref title=3Ddom-input-files><a href=3D#=
dom-input-files>files</a></code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-selectionStart=
><a href=3D#dom-textarea/input-selectionstart>selectionStart<=
/a></code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-selectionEnd&g=
t;<a href=3D#dom-textarea/input-selectionend>selectionEnd</a>=
</code>, and
+   <code class=3Dno-backref title=3Ddom-textarea/input-selectionDirec=
tion><a href=3D#dom-textarea/input-selectiondirection>selectionD=
irection</a></code> IDL attributes;
+   <code class=3Dno-backref title=3Ddom-textarea/input-select><=
a href=3D#dom-textarea/input-select>select()</a></code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-setRangeText&g=
t;<a href=3D#dom-textarea/input-setrangetext>setRangeText()</a&g=
t;</code>, and
+   <code class=3Dno-backref title=3Ddom-textarea/input-setSelectionRa=
nge><a href=3D#dom-textarea/input-setselectionrange>setSelection=
Range()</a></code> methods.</p>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>The following fragment shows part of a calendar application.=
 A user can specify a date and
+   time for a meeting (in his local time zone, probably, though the user=
 agent can allow the user to
+   change that), and since the submitted data includes the time-zone off=
set, the application can
+   ensure that the meeting is shown at the correct time regardless of th=
e time zones used by all the
+   participants.</p>
+
+   <pre><fieldset>
+ <legend>Add Meeting</legend>
+ <p><label>Meeting name: <input type=3D=
text name=3D"meeting.label"></label>
+ <p><label>Meeting time: <input type=3D=
datetime name=3D"meeting.start"></label>
+</fieldset></pre>
+
+   <p>Had the application used the <code title=3Dattr-input-typ=
e-datetime-local><a href=3D"#local-date-and-time-state-(type=3D=
datetime-local)">datetime-local</a></code> type inste=
ad, the calendar
+   application would have also had to explicitly determine which time zo=
ne the user intended.</p>
+
+   <p>For events where the precise time is to vary as the user tra=
vels (e.g. "celebrate the new
+   year!"), and for recurring events that are to stay at the same t=
ime for a specific geographic
+   location even though that location may go in and out of daylight savi=
ngs time (e.g. "bring the
+   kid to school"), the <code title=3Dattr-input-type-datetime-l=
ocal><a href=3D"#local-date-and-time-state-(type=3Ddatetime-lo=
cal)">datetime-local</a></code> type
+   combined with a <code><a href=3D#the-select-element>selec=
t</a></code> element (or other similar control) to pick the s=
pecific
+   geographic location to which to anchor the time would be more appropr=
iate.</p>
+
+  </div>
+
+
+  <h6 id=3D"date-state-(type=3Ddate)"><span class=3Ds=
ecno>4.10.5.1.8 </span><dfn title=3Dattr-input-type-date>D=
ate</dfn> state (<code title=3D"">type=3Ddate</c=
ode>)</h6>
+
+  <div class=3Dimpl>
+
+  <p>When an <code><a href=3D#the-input-element>input&=
lt;/a></code> element's <code title=3Dattr-input-type><=
a href=3D#attr-input-type>type</a></code> attribute is in
+  the <a href=3D"#date-state-(type=3Ddate)" title=3Dattr-in=
put-type-date>Date</a> state, the rules in this section apply.&l=
t;/p>
+
+  </div>
+
+  <p>The <code><a href=3D#the-input-element>input</=
a></code> element <a href=3D#represents>represents</a&g=
t; a control for setting the element's
+  <a href=3D#concept-fe-value title=3Dconcept-fe-value>value</a=
> to a string representing a specific <a href=3D#concept-date title=
=3Dconcept-date>date</a>.</p>
+
+  <div class=3Dimpl>
+
+  <p>If the element is <i title=3Dconcept-fe-mutable><a h=
ref=3D#concept-fe-mutable>mutable</a></i>, the user agent =
should allow the
+  user to change the <a href=3D#concept-date title=3Dconcept-date>=
date</a> represented by its <a href=3D#concept-fe-value title=3D=
concept-fe-value>value</a>, as obtained by <a href=3D#parse-a=
-date-string title=3D"parse a date string">parsing a
+  date</a> from it. User agents must not allow the user to set the=
 <a href=3D#concept-fe-value title=3Dconcept-fe-value>value</a&g=
t; to a non-empty string that is not a <a href=3D#valid-date-string&gt=
;valid date
+  string</a>. If the user agent provides a user interface for sele=
cting a <a href=3D#concept-date title=3Dconcept-date>date</a>=
, then the <a href=3D#concept-fe-value title=3Dconcept-fe-value>val=
ue</a> must be set
+  to a <a href=3D#valid-date-string>valid date string</a> re=
presenting the user's selection. User agents should allow
+  the user to set the <a href=3D#concept-fe-value title=3Dconcept-fe-=
value>value</a> to the empty string.</p>
+
+  <p><strong>Constraint validation</strong>: While the=
 user interface describes input that the user
+  agent cannot convert to a <a href=3D#valid-date-string>valid dat=
e string</a>, the control is <a href=3D#suffering-from-bad-input=
>suffering from bad
+  input</a>.</p>
+
+  </div>
+
+  <p class=3Dnote>See the <a href=3D#input-author-notes>intr=
oduction section</a> for a discussion of
+  the difference between the input format and submission format for date=
, time, and number form
+  controls<span class=3Dimpl>, and the <a href=3D#input-impl-no=
tes>implementation notes</a>
+  regarding localization of form controls</span>.</p>
+
+  <p>The <code title=3Dattr-input-value><a href=3D#attr-i=
nput-value>value</a></code> attribute, if specified and no=
t empty, must
+  have a value that is a <a href=3D#valid-date-string>valid date s=
tring</a>.</p> <!-- ok to set out-of-range value, we
+  never know when we might have to represent bogus input -->
+
+  <div class=3Dimpl>
+
+  <p><strong>The <a href=3D#value-sanitization-algorithm&=
gt;value sanitization algorithm</a> is as follows</strong>: I=
f the <a href=3D#concept-fe-value title=3Dconcept-fe-value>value&lt=
;/a> of the element is not a <a href=3D#valid-date-string>valid =
date string</a>, then
+  set it to the empty string instead.</p>
+
+  </div>
+
+  <p>The <code title=3Dattr-input-min><a href=3D#attr-inp=
ut-min>min</a></code> attribute, if specified, must have a=
 value that is
+  a <a href=3D#valid-date-string>valid date string</a>. The =
<code title=3Dattr-input-max><a href=3D#attr-input-max>max&lt=
;/a></code> attribute, if
+  specified, must have a value that is a <a href=3D#valid-date-string=
>valid date string</a>.</p>
+
+  <p>The <code title=3Dattr-input-step><a href=3D#attr-in=
put-step>step</a></code> attribute is expressed in days. &=
lt;span class=3Dimpl>The <a href=3D#concept-input-step-scale title=3D=
concept-input-step-scale>step scale factor</a> is 86,400,000
+  (which converts the days to milliseconds, as used in the other algorit=
hms).</span> The <a href=3D#concept-input-step-default title=3Dc=
oncept-input-step-default>default step</a> is 1 day.</p>
+
+  <div class=3Dimpl>
+
+  <p>When the element is <a href=3D#suffering-from-a-step-misma=
tch>suffering from a step mismatch</a>, the user agent may round=
 the
+  element's <a href=3D#concept-fe-value title=3Dconcept-fe-value>v=
alue</a> to the nearest <a href=3D#concept-date title=3Dconcept-=
date>date</a> for which the element would not <a href=3D#suff=
ering-from-a-step-mismatch title=3D"suffering from a
+  step mismatch">suffer from a step mismatch</a>.</p&gt=
;
+
+  <p><strong>The <a href=3D#concept-input-value-string-nu=
mber title=3Dconcept-input-value-string-number>algorithm to convert a =
string to a
+  number</a>, given a string <var title=3D"">input=
</var>, is as follows</strong>: If <a href=3D#parse-a-date=
-string title=3D"parse a date string">parsing a date</a&g=
t; from <var title=3D"">input</var> results in an
+  error, then return an error; otherwise, return the number of milliseco=
nds elapsed from midnight
+  UTC on the morning of 1970-01-01 (the time represented by the value &q=
uot;<code title=3D"">1970-01-01T00:00:00.0Z</code>&=
quot;) to midnight UTC on the morning of the parsed <a href=3D#concept=
-date title=3Dconcept-date>date</a>, ignoring leap seconds.</=
p>
+
+  <p><strong>The <a href=3D#concept-input-value-number-st=
ring title=3Dconcept-input-value-number-string>algorithm to convert a =
number to a
+  string</a>, given a number <var title=3D"">input=
</var>, is as follows</strong>: Return a
+  <a href=3D#valid-date-string>valid date string</a> that re=
presents the <a href=3D#concept-date title=3Dconcept-date>date</=
a> that, in
+  UTC, is current <var title=3D"">input</var> mill=
iseconds after midnight UTC on the morning of
+  1970-01-01 (the time represented by the value "<code title=3D&=
quot;">1970-01-01T00:00:00.0Z</code>").</p>
+
+  <p><strong>The <a href=3D#concept-input-value-string-da=
te title=3Dconcept-input-value-string-date>algorithm to convert a stri=
ng to a
+  <code>Date</code> object</a>, given a string <var=
 title=3D"">input</var>, is as follows</strong>:
+  If <a href=3D#parse-a-date-string title=3D"parse a date string=
">parsing a date</a> from <var title=3D"">i=
nput</var> results
+  in an error, then return an error; otherwise, return <a href=3D#cre=
ate-a-date-object title=3D"create a Date object">a new
+  <code>Date</code> object</a> representing midnight U=
TC on the morning of the parsed <a href=3D#concept-date title=3Dconcep=
t-date>date</a>.</p>
+
+  <p><strong>The <a href=3D#concept-input-value-date-stri=
ng title=3Dconcept-input-value-date-string>algorithm to convert a
+  <code>Date</code> object to a string</a>, given a &l=
t;code>Date</code> object <var title=3D"">input&=
lt;/var>, is as follows</strong>: Return a <a href=3D#valid-d=
ate-string>valid date string</a> that
+  represents the <a href=3D#concept-date title=3Dconcept-date>date=
</a> current at the time represented by <var title=3D"&quot=
;>input</var> in the UTC time zone.</p>
+
+  </div>
+
+  <p class=3Dnote>See <a href=3D#only-contemporary-times>the=
 note on historical dates</a> in the
+  <a href=3D"#date-and-time-state-(type=3Ddatetime)" title=3D=
attr-input-type-datetime>Date and Time</a> state section.</p&=
gt;
+
+  <div class=3Dbookkeeping>
+
+   <p>The following common <code><a href=3D#the-input-ele=
ment>input</a></code> element content
+   attributes, IDL attributes, and methods <a href=3D#concept-input-a=
pply title=3Dconcept-input-apply>apply</a> to the element:
+   <code title=3Dattr-fe-autocomplete><a href=3D#attr-fe-autoco=
mplete>autocomplete</a></code>,
+   <code title=3Dattr-input-list><a href=3D#attr-input-list>=
list</a></code>,
+   <code title=3Dattr-input-max><a href=3D#attr-input-max>ma=
x</a></code>,
+   <code title=3Dattr-input-min><a href=3D#attr-input-min>mi=
n</a></code>,
+   <code title=3Dattr-input-readonly><a href=3D#attr-input-read=
only>readonly</a></code>,
+   <code title=3Dattr-input-required><a href=3D#attr-input-requ=
ired>required</a></code>, and
+   <code title=3Dattr-input-step><a href=3D#attr-input-step>=
step</a></code> content attributes;
+   <code title=3Ddom-input-list><a href=3D#dom-input-list>li=
st</a></code>,
+   <code title=3Ddom-input-value><a href=3D#dom-input-value>=
value</a></code>,
+   <code title=3Ddom-input-valueAsDate><a href=3D#dom-input-val=
ueasdate>valueAsDate</a></code>, and
+   <code title=3Ddom-input-valueAsNumber><a href=3D#dom-input-v=
alueasnumber>valueAsNumber</a></code> IDL attributes;
+   <code title=3Ddom-input-stepDown><a href=3D#dom-input-stepdo=
wn>stepDown()</a></code> and
+   <code title=3Ddom-input-stepUp><a href=3D#dom-input-stepup&g=
t;stepUp()</a></code> methods.</p>
+
+   <p>The <code title=3Ddom-input-value><a href=3D#dom-in=
put-value>value</a></code> IDL attribute is
+   in mode <a href=3D#dom-input-value-value title=3Ddom-input-value-v=
alue>value</a>.</p>
+
+   <p>The <code title=3Devent-input-input><a href=3D#even=
t-input-input>input</a></code> and <code title=3Devent-=
input-change><a href=3D#event-input-change>change</a></=
code> events <a href=3D#concept-input-apply title=3Dconcept-input-a=
pply>apply</a>.</p>
+
+   <p>The following content attributes must not be specified and &=
lt;a href=3D#do-not-apply>do not
+   apply</a> to the element:
+   <code class=3Dno-backref title=3Dattr-input-accept><a href=3D=
#attr-input-accept>accept</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-alt><a href=3D#a=
ttr-input-alt>alt</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-checked><a href=3D=
#attr-input-checked>checked</a></code>,
+   <code class=3Dno-backref title=3Dattr-fe-dirname><a href=3D#=
attr-fe-dirname>dirname</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formaction><a href=3D=
#attr-fs-formaction>formaction</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formenctype><a href=
=3D#attr-fs-formenctype>formenctype</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formmethod><a href=3D=
#attr-fs-formmethod>formmethod</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formnovalidate><a h=
ref=3D#attr-fs-formnovalidate>formnovalidate</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formtarget><a href=3D=
#attr-fs-formtarget>formtarget</a></code>,
+   <code class=3Dno-backref title=3Dattr-dim-height><a href=3D#=
attr-dim-height>height</a></code>,
+   <code class=3Dno-backref title=3Dattr-fe-inputmode><a href=3D=
#attr-fe-inputmode>inputmode</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-maxlength><a hre=
f=3D#attr-input-maxlength>maxlength</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-minlength><a hre=
f=3D#attr-input-minlength>minlength</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-multiple><a href=
=3D#attr-input-multiple>multiple</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-pattern><a href=3D=
#attr-input-pattern>pattern</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-placeholder><a h=
ref=3D#attr-input-placeholder>placeholder</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-size><a href=3D#=
attr-input-size>size</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-src><a href=3D#a=
ttr-input-src>src</a></code>, and
+   <code class=3Dno-backref title=3Dattr-dim-width><a href=3D#a=
ttr-dim-width>width</a></code>.</p>
+
+   <p>The following IDL attributes and methods <a href=3D#do-no=
t-apply>do not apply</a> to the
+   element:
+   <code class=3Dno-backref title=3Ddom-input-checked><a href=3D=
#dom-input-checked>checked</a></code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-selectionStart=
><a href=3D#dom-textarea/input-selectionstart>selectionStart<=
/a></code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-selectionEnd&g=
t;<a href=3D#dom-textarea/input-selectionend>selectionEnd</a>=
</code>, and
+   <code class=3Dno-backref title=3Ddom-textarea/input-selectionDirec=
tion><a href=3D#dom-textarea/input-selectiondirection>selectionD=
irection</a></code> IDL attributes;
+   <code class=3Dno-backref title=3Ddom-textarea/input-select><=
a href=3D#dom-textarea/input-select>select()</a></code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-setRangeText&g=
t;<a href=3D#dom-textarea/input-setrangetext>setRangeText()</a&g=
t;</code>, and
+   <code class=3Dno-backref title=3Ddom-textarea/input-setSelectionRa=
nge><a href=3D#dom-textarea/input-setselectionrange>setSelection=
Range()</a></code> methods.</p>
+
+  </div>
+
+
+  <h6 id=3D"month-state-(type=3Dmonth)"><span class=3D=
secno>4.10.5.1.9 </span><dfn title=3Dattr-input-type-month&gt=
;Month</dfn> state (<code title=3D"">type=3Dmonth&l=
t;/code>)</h6>
+
+  <div class=3Dimpl>
+
+  <p>When an <code><a href=3D#the-input-element>input&=
lt;/a></code> element's <code title=3Dattr-input-type><=
a href=3D#attr-input-type>type</a></code> attribute is in
+  the <a href=3D"#month-state-(type=3Dmonth)" title=3Dattr-=
input-type-month>Month</a> state, the rules in this section appl=
y.</p>
+
+  </div>
+
+  <p>The <code><a href=3D#the-input-element>input</=
a></code> element <a href=3D#represents>represents</a&g=
t; a control for setting the element's
+  <a href=3D#concept-fe-value title=3Dconcept-fe-value>value</a=
> to a string representing a specific <a href=3D#concept-month titl=
e=3Dconcept-month>month</a>.</p>
+
+  <div class=3Dimpl>
+
+  <p>If the element is <i title=3Dconcept-fe-mutable><a h=
ref=3D#concept-fe-mutable>mutable</a></i>, the user agent =
should allow the
+  user to change the <a href=3D#concept-month title=3Dconcept-month&g=
t;month</a> represented by its <a href=3D#concept-fe-value title=
=3Dconcept-fe-value>value</a>, as obtained by <a href=3D#pars=
e-a-month-string title=3D"parse a month string">parsing a
+  month</a> from it. User agents must not allow the user to set th=
e <a href=3D#concept-fe-value title=3Dconcept-fe-value>value</a&=
gt; to a non-empty string that is not a <a href=3D#valid-month-string&=
gt;valid month
+  string</a>. If the user agent provides a user interface for sele=
cting a <a href=3D#concept-month title=3Dconcept-month>month</a&=
gt;, then the <a href=3D#concept-fe-value title=3Dconcept-fe-value>=
value</a> must be
+  set to a <a href=3D#valid-month-string>valid month string</a&=
gt; representing the user's selection. User agents should
+  allow the user to set the <a href=3D#concept-fe-value title=3Dconce=
pt-fe-value>value</a> to the empty string.</p>
+
+  <p><strong>Constraint validation</strong>: While the=
 user interface describes input that the user
+  agent cannot convert to a <a href=3D#valid-month-string>valid mo=
nth string</a>, the control is <a href=3D#suffering-from-bad-inp=
ut>suffering from bad
+  input</a>.</p>
+
+  </div>
+
+  <p class=3Dnote>See the <a href=3D#input-author-notes>intr=
oduction section</a> for a discussion of
+  the difference between the input format and submission format for date=
, time, and number form
+  controls<span class=3Dimpl>, and the <a href=3D#input-impl-no=
tes>implementation notes</a>
+  regarding localization of form controls</span>.</p>
+
+  <p>The <code title=3Dattr-input-value><a href=3D#attr-i=
nput-value>value</a></code> attribute, if specified and no=
t empty, must
+  have a value that is a <a href=3D#valid-month-string>valid month=
 string</a>.</p> <!-- ok to set out-of-range value, we
+  never know when we might have to represent bogus input -->
+
+  <div class=3Dimpl>
+
+  <p><strong>The <a href=3D#value-sanitization-algorithm&=
gt;value sanitization algorithm</a> is as follows</strong>: I=
f the <a href=3D#concept-fe-value title=3Dconcept-fe-value>value&lt=
;/a> of the element is not a <a href=3D#valid-month-string>valid=
 month string</a>,
+  then set it to the empty string instead.</p>
+
+  </div>
+
+  <p>The <code title=3Dattr-input-min><a href=3D#attr-inp=
ut-min>min</a></code> attribute, if specified, must have a=
 value that is
+  a <a href=3D#valid-month-string>valid month string</a>. Th=
e <code title=3Dattr-input-max><a href=3D#attr-input-max>max&=
lt;/a></code> attribute, if
+  specified, must have a value that is a <a href=3D#valid-month-strin=
g>valid month string</a>.</p>
+
+  <p>The <code title=3Dattr-input-step><a href=3D#attr-in=
put-step>step</a></code> attribute is expressed in months.=
 <span class=3Dimpl>The <a href=3D#concept-input-step-scale titl=
e=3Dconcept-input-step-scale>step scale factor</a> is 1 (there i=
s no
+  conversion needed as the algorithms use months).</span> The <=
a href=3D#concept-input-step-default title=3Dconcept-input-step-default&g=
t;default step</a> is 1 month.</p>
+
+  <div class=3Dimpl>
+
+  <p>When the element is <a href=3D#suffering-from-a-step-misma=
tch>suffering from a step mismatch</a>, the user agent may round=
 the
+  element's <a href=3D#concept-fe-value title=3Dconcept-fe-value>v=
alue</a> to the nearest <a href=3D#concept-month title=3Dconcept=
-month>month</a> for which the element would not <a href=3D#s=
uffering-from-a-step-mismatch title=3D"suffering from a
+  step mismatch">suffer from a step mismatch</a>.</p&gt=
;
+
+  <p><strong>The <a href=3D#concept-input-value-string-nu=
mber title=3Dconcept-input-value-string-number>algorithm to convert a =
string to a
+  number</a>, given a string <var title=3D"">input=
</var>, is as follows</strong>: If <a href=3D#parse-a-mont=
h-string title=3D"parse a month string">parsing a month</=
a> from <var title=3D"">input</var> results in a=
n
+  error, then return an error; otherwise, return the number of months be=
tween January 1970 and the
+  parsed <a href=3D#concept-month title=3Dconcept-month>month</=
a>.</p>
+
+  <p><strong>The <a href=3D#concept-input-value-number-st=
ring title=3Dconcept-input-value-number-string>algorithm to convert a =
number to a
+  string</a>, given a number <var title=3D"">input=
</var>, is as follows</strong>: Return a
+  <a href=3D#valid-month-string>valid month string</a> that =
represents the <a href=3D#concept-month title=3Dconcept-month>month=
</a> that
+  has <var title=3D"">input</var> months between i=
t and January 1970.</p>
+
+  <!-- note - it doesn't matter exactly how many months are "bet=
ween" two months, so long as the UA
+  implements this consistently. The number is never actually exposed. --=
>
+
+  <p><strong>The <a href=3D#concept-input-value-string-da=
te title=3Dconcept-input-value-string-date>algorithm to convert a stri=
ng to a
+  <code>Date</code> object</a>, given a string <var=
 title=3D"">input</var>, is as follows</strong>:
+  If <a href=3D#parse-a-month-string title=3D"parse a month stri=
ng">parsing a month</a> from <var title=3D""&g=
t;input</var>
+  results in an error, then return an error; otherwise, return <a hre=
f=3D#create-a-date-object title=3D"create a Date object">a
+  new <code>Date</code> object</a> representing midnig=
ht UTC on the morning of the first day of
+  the parsed <a href=3D#concept-month title=3Dconcept-month>month&=
lt;/a>.</p>
+
+  <p><strong>The <a href=3D#concept-input-value-date-stri=
ng title=3Dconcept-input-value-date-string>algorithm to convert a
+  <code>Date</code> object to a string</a>, given a &l=
t;code>Date</code> object <var title=3D"">input&=
lt;/var>, is as follows</strong>: Return a <a href=3D#valid-m=
onth-string>valid month string</a> that
+  represents the <a href=3D#concept-month title=3Dconcept-month>mo=
nth</a> current at the time represented by <var title=3D"&q=
uot;>input</var> in the UTC time zone.</p>
+
+  </div>
+
+  <div class=3Dbookkeeping>
+
+   <p>The following common <code><a href=3D#the-input-ele=
ment>input</a></code> element content
+   attributes, IDL attributes, and methods <a href=3D#concept-input-a=
pply title=3Dconcept-input-apply>apply</a> to the element:
+   <code title=3Dattr-fe-autocomplete><a href=3D#attr-fe-autoco=
mplete>autocomplete</a></code>,
+   <code title=3Dattr-input-list><a href=3D#attr-input-list>=
list</a></code>,
+   <code title=3Dattr-input-max><a href=3D#attr-input-max>ma=
x</a></code>,
+   <code title=3Dattr-input-min><a href=3D#attr-input-min>mi=
n</a></code>,
+   <code title=3Dattr-input-readonly><a href=3D#attr-input-read=
only>readonly</a></code>,
+   <code title=3Dattr-input-required><a href=3D#attr-input-requ=
ired>required</a></code>, and
+   <code title=3Dattr-input-step><a href=3D#attr-input-step>=
step</a></code> content attributes;
+   <code title=3Ddom-input-list><a href=3D#dom-input-list>li=
st</a></code>,
+   <code title=3Ddom-input-value><a href=3D#dom-input-value>=
value</a></code>,
+   <code title=3Ddom-input-valueAsDate><a href=3D#dom-input-val=
ueasdate>valueAsDate</a></code>, and
+   <code title=3Ddom-input-valueAsNumber><a href=3D#dom-input-v=
alueasnumber>valueAsNumber</a></code> IDL attributes;
+   <code title=3Ddom-input-stepDown><a href=3D#dom-input-stepdo=
wn>stepDown()</a></code> and
+   <code title=3Ddom-input-stepUp><a href=3D#dom-input-stepup&g=
t;stepUp()</a></code> methods.</p>
+
+   <p>The <code title=3Ddom-input-value><a href=3D#dom-in=
put-value>value</a></code> IDL attribute is
+   in mode <a href=3D#dom-input-value-value title=3Ddom-input-value-v=
alue>value</a>.</p>
+
+   <p>The <code title=3Devent-input-input><a href=3D#even=
t-input-input>input</a></code> and <code title=3Devent-=
input-change><a href=3D#event-input-change>change</a></=
code> events <a href=3D#concept-input-apply title=3Dconcept-input-a=
pply>apply</a>.</p>
+
+   <p>The following content attributes must not be specified and &=
lt;a href=3D#do-not-apply>do not
+   apply</a> to the element:
+   <code class=3Dno-backref title=3Dattr-input-accept><a href=3D=
#attr-input-accept>accept</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-alt><a href=3D#a=
ttr-input-alt>alt</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-checked><a href=3D=
#attr-input-checked>checked</a></code>,
+   <code class=3Dno-backref title=3Dattr-fe-dirname><a href=3D#=
attr-fe-dirname>dirname</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formaction><a href=3D=
#attr-fs-formaction>formaction</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formenctype><a href=
=3D#attr-fs-formenctype>formenctype</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formmethod><a href=3D=
#attr-fs-formmethod>formmethod</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formnovalidate><a h=
ref=3D#attr-fs-formnovalidate>formnovalidate</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formtarget><a href=3D=
#attr-fs-formtarget>formtarget</a></code>,
+   <code class=3Dno-backref title=3Dattr-dim-height><a href=3D#=
attr-dim-height>height</a></code>,
+   <code class=3Dno-backref title=3Dattr-fe-inputmode><a href=3D=
#attr-fe-inputmode>inputmode</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-maxlength><a hre=
f=3D#attr-input-maxlength>maxlength</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-minlength><a hre=
f=3D#attr-input-minlength>minlength</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-multiple><a href=
=3D#attr-input-multiple>multiple</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-pattern><a href=3D=
#attr-input-pattern>pattern</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-placeholder><a h=
ref=3D#attr-input-placeholder>placeholder</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-size><a href=3D#=
attr-input-size>size</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-src><a href=3D#a=
ttr-input-src>src</a></code>, and
+   <code class=3Dno-backref title=3Dattr-dim-width><a href=3D#a=
ttr-dim-width>width</a></code>.</p>
+
+   <p>The following IDL attributes and methods <a href=3D#do-no=
t-apply>do not apply</a> to the
+   element:
+   <code class=3Dno-backref title=3Ddom-input-checked><a href=3D=
#dom-input-checked>checked</a></code>,
+   <code class=3Dno-backref title=3Ddom-input-files><a href=3D#=
dom-input-files>files</a></code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-selectionStart=
><a href=3D#dom-textarea/input-selectionstart>selectionStart<=
/a></code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-selectionEnd&g=
t;<a href=3D#dom-textarea/input-selectionend>selectionEnd</a>=
</code>, and
+   <code class=3Dno-backref title=3Ddom-textarea/input-selectionDirec=
tion><a href=3D#dom-textarea/input-selectiondirection>selectionD=
irection</a></code> IDL attributes;
+   <code class=3Dno-backref title=3Ddom-textarea/input-select><=
a href=3D#dom-textarea/input-select>select()</a></code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-setRangeText&g=
t;<a href=3D#dom-textarea/input-setrangetext>setRangeText()</a&g=
t;</code>, and
+   <code class=3Dno-backref title=3Ddom-textarea/input-setSelectionRa=
nge><a href=3D#dom-textarea/input-setselectionrange>setSelection=
Range()</a></code> methods.</p>
+
+  </div>
+
+
+  <h6 id=3D"week-state-(type=3Dweek)"><span class=3Ds=
ecno>4.10.5.1.10 </span><dfn title=3Dattr-input-type-week>=
Week</dfn> state (<code title=3D"">type=3Dweek</=
code>)</h6>
+
+  <div class=3Dimpl>
+
+  <p>When an <code><a href=3D#the-input-element>input&=
lt;/a></code> element's <code title=3Dattr-input-type><=
a href=3D#attr-input-type>type</a></code> attribute is in
+  the <a href=3D"#week-state-(type=3Dweek)" title=3Dattr-in=
put-type-week>Week</a> state, the rules in this section apply.&l=
t;/p>
+
+  </div>
+
+  <p>The <code><a href=3D#the-input-element>input</=
a></code> element <a href=3D#represents>represents</a&g=
t; a control for setting the element's
+  <a href=3D#concept-fe-value title=3Dconcept-fe-value>value</a=
> to a string representing a specific <a href=3D#concept-week title=
=3Dconcept-week>week</a>.</p>
+
+  <div class=3Dimpl>
+
+  <p>If the element is <i title=3Dconcept-fe-mutable><a h=
ref=3D#concept-fe-mutable>mutable</a></i>, the user agent =
should allow the
+  user to change the <a href=3D#concept-week title=3Dconcept-week>=
week</a> represented by its <a href=3D#concept-fe-value title=3D=
concept-fe-value>value</a>, as obtained by <a href=3D#parse-a=
-week-string title=3D"parse a week string">parsing a
+  week</a> from it. User agents must not allow the user to set the=
 <a href=3D#concept-fe-value title=3Dconcept-fe-value>value</a&g=
t; to a non-empty string that is not a <a href=3D#valid-week-string&gt=
;valid week
+  string</a>. If the user agent provides a user interface for sele=
cting a <a href=3D#concept-week title=3Dconcept-week>week</a>=
, then the <a href=3D#concept-fe-value title=3Dconcept-fe-value>val=
ue</a> must be set
+  to a <a href=3D#valid-week-string>valid week string</a> re=
presenting the user's selection. User agents should allow
+  the user to set the <a href=3D#concept-fe-value title=3Dconcept-fe-=
value>value</a> to the empty string.</p>
+
+  <p><strong>Constraint validation</strong>: While the=
 user interface describes input that the user
+  agent cannot convert to a <a href=3D#valid-week-string>valid wee=
k string</a>, the control is <a href=3D#suffering-from-bad-input=
>suffering from bad
+  input</a>.</p>
+
+  </div>
+
+  <p class=3Dnote>See the <a href=3D#input-author-notes>intr=
oduction section</a> for a discussion of
+  the difference between the input format and submission format for date=
, time, and number form
+  controls<span class=3Dimpl>, and the <a href=3D#input-impl-no=
tes>implementation notes</a>
+  regarding localization of form controls</span>.</p>
+
+  <p>The <code title=3Dattr-input-value><a href=3D#attr-i=
nput-value>value</a></code> attribute, if specified and no=
t empty, must
+  have a value that is a <a href=3D#valid-week-string>valid week s=
tring</a>.</p> <!-- ok to set out-of-range value, we
+  never know when we might have to represent bogus input -->
+
+  <div class=3Dimpl>
+
+  <p><strong>The <a href=3D#value-sanitization-algorithm&=
gt;value sanitization algorithm</a> is as follows</strong>: I=
f the <a href=3D#concept-fe-value title=3Dconcept-fe-value>value&lt=
;/a> of the element is not a <a href=3D#valid-week-string>valid =
week string</a>, then
+  set it to the empty string instead.</p>
+
+  </div>
+
+  <p>The <code title=3Dattr-input-min><a href=3D#attr-inp=
ut-min>min</a></code> attribute, if specified, must have a=
 value that is
+  a <a href=3D#valid-week-string>valid week string</a>. The =
<code title=3Dattr-input-max><a href=3D#attr-input-max>max&lt=
;/a></code> attribute, if
+  specified, must have a value that is a <a href=3D#valid-week-string=
>valid week string</a>.</p>
+
+  <p>The <code title=3Dattr-input-step><a href=3D#attr-in=
put-step>step</a></code> attribute is expressed in weeks. =
<span class=3Dimpl>The <a href=3D#concept-input-step-scale title=
=3Dconcept-input-step-scale>step scale factor</a> is 604,800,000
+  (which converts the weeks to milliseconds, as used in the other algori=
thms).</span> The <a href=3D#concept-input-step-default title=3D=
concept-input-step-default>default step</a> is 1 week. <span =
class=3Dimpl>The <a href=3D#concept-input-step-default-base title=3D=
concept-input-step-default-base>default step base</a> is &mi=
nus;259,200,000 (the start
+  of week 1970-W01).</span></p>
+
+  <div class=3Dimpl>
+
+  <p>When the element is <a href=3D#suffering-from-a-step-misma=
tch>suffering from a step mismatch</a>, the user agent may round=
 the
+  element's <a href=3D#concept-fe-value title=3Dconcept-fe-value>v=
alue</a> to the nearest <a href=3D#concept-week title=3Dconcept-=
week>week</a> for which the element would not <a href=3D#suff=
ering-from-a-step-mismatch title=3D"suffering from a
+  step mismatch">suffer from a step mismatch</a>.</p&gt=
;
+
+  <p><strong>The <a href=3D#concept-input-value-string-nu=
mber title=3Dconcept-input-value-string-number>algorithm to convert a =
string to a
+  number</a>, given a string <var title=3D"">input=
</var>, is as follows</strong>: If <a href=3D#parse-a-week=
-string title=3D"parse a week string">parsing a week string&=
lt;/a> from <var title=3D"">input</var> results =
in
+  an error, then return an error; otherwise, return the number of millis=
econds elapsed from midnight
+  UTC on the morning of 1970-01-01 (the time represented by the value &q=
uot;<code title=3D"">1970-01-01T00:00:00.0Z</code>&=
quot;) to midnight UTC on the morning of the Monday of the
+  parsed <a href=3D#concept-week title=3Dconcept-week>week</a&g=
t;, ignoring leap seconds.</p>
+
+  <p><strong>The <a href=3D#concept-input-value-number-st=
ring title=3Dconcept-input-value-number-string>algorithm to convert a =
number to a
+  string</a>, given a number <var title=3D"">input=
</var>, is as follows</strong>: Return a
+  <a href=3D#valid-week-string>valid week string</a> that re=
presents the <a href=3D#concept-week title=3Dconcept-week>week</=
a> that, in
+  UTC, is current <var title=3D"">input</var> mill=
iseconds after midnight UTC on the morning of
+  1970-01-01 (the time represented by the value "<code title=3D&=
quot;">1970-01-01T00:00:00.0Z</code>").</p>
+
+  <p><strong>The <a href=3D#concept-input-value-string-da=
te title=3Dconcept-input-value-string-date>algorithm to convert a stri=
ng to a
+  <code>Date</code> object</a>, given a string <var=
 title=3D"">input</var>, is as follows</strong>:
+  If <a href=3D#parse-a-week-string title=3D"parse a week string=
">parsing a week</a> from <var title=3D"">i=
nput</var> results
+  in an error, then return an error; otherwise, return <a href=3D#cre=
ate-a-date-object title=3D"create a Date object">a new
+  <code>Date</code> object</a> representing midnight U=
TC on the morning of the Monday of the
+  parsed <a href=3D#concept-week title=3Dconcept-week>week</a&g=
t;.</p>
+
+  <p><strong>The <a href=3D#concept-input-value-date-stri=
ng title=3Dconcept-input-value-date-string>algorithm to convert a
+  <code>Date</code> object to a string</a>, given a &l=
t;code>Date</code> object <var title=3D"">input&=
lt;/var>, is as follows</strong>: Return a <a href=3D#valid-w=
eek-string>valid week string</a> that
+  represents the <a href=3D#concept-week title=3Dconcept-week>week=
</a> current at the time represented by <var title=3D"&quot=
;>input</var> in the UTC time zone.</p>
+
+  </div>
+
+  <div class=3Dbookkeeping>
+
+   <p>The following common <code><a href=3D#the-input-ele=
ment>input</a></code> element content attributes, IDL attr=
ibutes, and
+   methods <a href=3D#concept-input-apply title=3Dconcept-input-apply=
>apply</a> to the element:
+   <code title=3Dattr-fe-autocomplete><a href=3D#attr-fe-autoco=
mplete>autocomplete</a></code>,
+   <code title=3Dattr-input-list><a href=3D#attr-input-list>=
list</a></code>,
+   <code title=3Dattr-input-max><a href=3D#attr-input-max>ma=
x</a></code>,
+   <code title=3Dattr-input-min><a href=3D#attr-input-min>mi=
n</a></code>,
+   <code title=3Dattr-input-readonly><a href=3D#attr-input-read=
only>readonly</a></code>,
+   <code title=3Dattr-input-required><a href=3D#attr-input-requ=
ired>required</a></code>, and
+   <code title=3Dattr-input-step><a href=3D#attr-input-step>=
step</a></code> content attributes;
+   <code title=3Ddom-input-list><a href=3D#dom-input-list>li=
st</a></code>,
+   <code title=3Ddom-input-value><a href=3D#dom-input-value>=
value</a></code>,
+   <code title=3Ddom-input-valueAsDate><a href=3D#dom-input-val=
ueasdate>valueAsDate</a></code>, and
+   <code title=3Ddom-input-valueAsNumber><a href=3D#dom-input-v=
alueasnumber>valueAsNumber</a></code> IDL attributes;
+   <code title=3Ddom-input-stepDown><a href=3D#dom-input-stepdo=
wn>stepDown()</a></code> and
+   <code title=3Ddom-input-stepUp><a href=3D#dom-input-stepup&g=
t;stepUp()</a></code> methods.</p>
+
+   <p>The <code title=3Ddom-input-value><a href=3D#dom-in=
put-value>value</a></code> IDL attribute is in mode <a =
href=3D#dom-input-value-value title=3Ddom-input-value-value>value</=
a>.</p>
+
+   <p>The <code title=3Devent-input-input><a href=3D#even=
t-input-input>input</a></code> and <code title=3Devent-=
input-change><a href=3D#event-input-change>change</a></=
code> events <a href=3D#concept-input-apply title=3Dconcept-input-a=
pply>apply</a>.</p>
+
+   <p>The following content attributes must not be specified and &=
lt;a href=3D#do-not-apply>do not apply</a> to the
+   element:
+   <code class=3Dno-backref title=3Dattr-input-accept><a href=3D=
#attr-input-accept>accept</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-alt><a href=3D#a=
ttr-input-alt>alt</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-checked><a href=3D=
#attr-input-checked>checked</a></code>,
+   <code class=3Dno-backref title=3Dattr-fe-dirname><a href=3D#=
attr-fe-dirname>dirname</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formaction><a href=3D=
#attr-fs-formaction>formaction</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formenctype><a href=
=3D#attr-fs-formenctype>formenctype</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formmethod><a href=3D=
#attr-fs-formmethod>formmethod</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formnovalidate><a h=
ref=3D#attr-fs-formnovalidate>formnovalidate</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formtarget><a href=3D=
#attr-fs-formtarget>formtarget</a></code>,
+   <code class=3Dno-backref title=3Dattr-dim-height><a href=3D#=
attr-dim-height>height</a></code>,
+   <code class=3Dno-backref title=3Dattr-fe-inputmode><a href=3D=
#attr-fe-inputmode>inputmode</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-maxlength><a hre=
f=3D#attr-input-maxlength>maxlength</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-minlength><a hre=
f=3D#attr-input-minlength>minlength</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-multiple><a href=
=3D#attr-input-multiple>multiple</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-pattern><a href=3D=
#attr-input-pattern>pattern</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-placeholder><a h=
ref=3D#attr-input-placeholder>placeholder</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-size><a href=3D#=
attr-input-size>size</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-src><a href=3D#a=
ttr-input-src>src</a></code>, and
+   <code class=3Dno-backref title=3Dattr-dim-width><a href=3D#a=
ttr-dim-width>width</a></code>.</p>
+
+   <p>The following IDL attributes and methods <a href=3D#do-no=
t-apply>do not apply</a> to the element:
+   <code class=3Dno-backref title=3Ddom-input-checked><a href=3D=
#dom-input-checked>checked</a></code>,
+   <code class=3Dno-backref title=3Ddom-input-files><a href=3D#=
dom-input-files>files</a></code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-selectionStart=
><a href=3D#dom-textarea/input-selectionstart>selectionStart<=
/a></code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-selectionEnd&g=
t;<a href=3D#dom-textarea/input-selectionend>selectionEnd</a>=
</code>, and
+   <code class=3Dno-backref title=3Ddom-textarea/input-selectionDirec=
tion><a href=3D#dom-textarea/input-selectiondirection>selectionD=
irection</a></code> IDL attributes;
+   <code class=3Dno-backref title=3Ddom-textarea/input-select><=
a href=3D#dom-textarea/input-select>select()</a></code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-setRangeText&g=
t;<a href=3D#dom-textarea/input-setrangetext>setRangeText()</a&g=
t;</code>, and
+   <code class=3Dno-backref title=3Ddom-textarea/input-setSelectionRa=
nge><a href=3D#dom-textarea/input-setselectionrange>setSelection=
Range()</a></code> methods.</p>
+
+  </div>
+
+
+  <h6 id=3D"time-state-(type=3Dtime)"><span class=3Ds=
ecno>4.10.5.1.11 </span><dfn title=3Dattr-input-type-time>=
Time</dfn> state (<code title=3D"">type=3Dtime</=
code>)</h6>
+
+  <div class=3Dimpl>
+
+  <p>When an <code><a href=3D#the-input-element>input&=
lt;/a></code> element's <code title=3Dattr-input-type><=
a href=3D#attr-input-type>type</a></code> attribute is in
+  the <a href=3D"#time-state-(type=3Dtime)" title=3Dattr-in=
put-type-time>Time</a> state, the rules in this section apply.&l=
t;/p>
+
+  </div>
+
+  <p>The <code><a href=3D#the-input-element>input</=
a></code> element <a href=3D#represents>represents</a&g=
t; a control for setting the element's
+  <a href=3D#concept-fe-value title=3Dconcept-fe-value>value</a=
> to a string representing a specific <a href=3D#concept-time title=
=3Dconcept-time>time</a>.</p>
+
+  <div class=3Dimpl>
+
+  <p>If the element is <i title=3Dconcept-fe-mutable><a h=
ref=3D#concept-fe-mutable>mutable</a></i>, the user agent =
should allow the
+  user to change the <a href=3D#concept-time title=3Dconcept-time>=
time</a> represented by its <a href=3D#concept-fe-value title=3D=
concept-fe-value>value</a>, as obtained by <a href=3D#parse-a=
-time-string title=3D"parse a time string">parsing a
+  time</a> from it. User agents must not allow the user to set the=
 <a href=3D#concept-fe-value title=3Dconcept-fe-value>value</a&g=
t; to a non-empty string that is not a <a href=3D#valid-time-string&gt=
;valid time
+  string</a>. If the user agent provides a user interface for sele=
cting a <a href=3D#concept-time title=3Dconcept-time>time</a>=
, then the <a href=3D#concept-fe-value title=3Dconcept-fe-value>val=
ue</a> must be set
+  to a <a href=3D#valid-time-string>valid time string</a> re=
presenting the user's selection. User agents should allow
+  the user to set the <a href=3D#concept-fe-value title=3Dconcept-fe-=
value>value</a> to the empty string.</p>
+
+  <p><strong>Constraint validation</strong>: While the=
 user interface describes input that the user
+  agent cannot convert to a <a href=3D#valid-time-string>valid tim=
e string</a>, the control is <a href=3D#suffering-from-bad-input=
>suffering from bad
+  input</a>.</p>
+
+  </div>
+
+  <p class=3Dnote>See the <a href=3D#input-author-notes>intr=
oduction section</a> for a discussion of
+  the difference between the input format and submission format for date=
, time, and number form
+  controls<span class=3Dimpl>, and the <a href=3D#input-impl-no=
tes>implementation notes</a>
+  regarding localization of form controls</span>.</p>
+
+  <p>The <code title=3Dattr-input-value><a href=3D#attr-i=
nput-value>value</a></code> attribute, if specified and no=
t empty, must
+  have a value that is a <a href=3D#valid-time-string>valid time s=
tring</a>.</p> <!-- ok to set out-of-range value, we
+  never know when we might have to represent bogus input -->
+
+  <div class=3Dimpl>
+
+  <p><strong>The <a href=3D#value-sanitization-algorithm&=
gt;value sanitization algorithm</a> is as follows</strong>: I=
f the <a href=3D#concept-fe-value title=3Dconcept-fe-value>value&lt=
;/a> of the element is not a <a href=3D#valid-time-string>valid =
time string</a>, then
+  set it to the empty string instead.</p>
+
+  <p>The form control <a href=3D#has-a-periodic-domain>has a=
 periodic domain</a>.</p>
+
+  </div>
+
+  <p>The <code title=3Dattr-input-min><a href=3D#attr-inp=
ut-min>min</a></code> attribute, if specified, must have a=
 value that is
+  a <a href=3D#valid-time-string>valid time string</a>. The =
<code title=3Dattr-input-max><a href=3D#attr-input-max>max&lt=
;/a></code> attribute, if
+  specified, must have a value that is a <a href=3D#valid-time-string=
>valid time string</a>.</p>
+
+  <p>The <code title=3Dattr-input-step><a href=3D#attr-in=
put-step>step</a></code> attribute is expressed in seconds=
. <span class=3Dimpl>The <a href=3D#concept-input-step-scale tit=
le=3Dconcept-input-step-scale>step scale factor</a> is 1000 (whi=
ch
+  converts the seconds to milliseconds, as used in the other algorithms)=
.</span> The <a href=3D#concept-input-step-default title=3Dconce=
pt-input-step-default>default step</a> is 60 seconds.</p>
+
+  <div class=3Dimpl>
+
+  <p>When the element is <a href=3D#suffering-from-a-step-misma=
tch>suffering from a step mismatch</a>, the user agent may round=
 the
+  element's <a href=3D#concept-fe-value title=3Dconcept-fe-value>v=
alue</a> to the nearest <a href=3D#concept-time title=3Dconcept-=
time>time</a> for which the element would not <a href=3D#suff=
ering-from-a-step-mismatch title=3D"suffering from a
+  step mismatch">suffer from a step mismatch</a>.</p&gt=
;
+
+  <p><strong>The <a href=3D#concept-input-value-string-nu=
mber title=3Dconcept-input-value-string-number>algorithm to convert a =
string to a
+  number</a>, given a string <var title=3D"">input=
</var>, is as follows</strong>: If <a href=3D#parse-a-time=
-string title=3D"parse a time string">parsing a time</a&g=
t; from <var title=3D"">input</var> results in an
+  error, then return an error; otherwise, return the number of milliseco=
nds elapsed from midnight to
+  the parsed <a href=3D#concept-time title=3Dconcept-time>time<=
/a> on a day with no time changes.</p>
+
+  <p><strong>The <a href=3D#concept-input-value-number-st=
ring title=3Dconcept-input-value-number-string>algorithm to convert a =
number to a
+  string</a>, given a number <var title=3D"">input=
</var>, is as follows</strong>: Return a
+  <a href=3D#valid-time-string>valid time string</a> that re=
presents the <a href=3D#concept-time title=3Dconcept-time>time</=
a> that is
+  <var title=3D"">input</var> milliseconds after m=
idnight on a day with no time changes.</p>
+
+  <p><strong>The <a href=3D#concept-input-value-string-da=
te title=3Dconcept-input-value-string-date>algorithm to convert a stri=
ng to a
+  <code>Date</code> object</a>, given a string <var=
 title=3D"">input</var>, is as follows</strong>:
+  If <a href=3D#parse-a-time-string title=3D"parse a time string=
">parsing a time</a> from <var title=3D"">i=
nput</var> results
+  in an error, then return an error; otherwise, return <a href=3D#cre=
ate-a-date-object title=3D"create a Date object">a new
+  <code>Date</code> object</a> representing the parsed=
 <a href=3D#concept-time title=3Dconcept-time>time</a> in
+  UTC on 1970-01-01.</p>
+
+  <p><strong>The <a href=3D#concept-input-value-date-stri=
ng title=3Dconcept-input-value-date-string>algorithm to convert a
+  <code>Date</code> object to a string</a>, given a &l=
t;code>Date</code> object <var title=3D"">input&=
lt;/var>, is as follows</strong>: Return a <a href=3D#valid-t=
ime-string>valid time string</a> that
+  represents the UTC <a href=3D#concept-time title=3Dconcept-time>=
time</a> component that is represented by <var title=3D"&qu=
ot;>input</var>.</p>
+
+  </div>
+
+  <div class=3Dbookkeeping>
+
+   <p>The following common <code><a href=3D#the-input-ele=
ment>input</a></code> element content attributes, IDL attr=
ibutes, and
+   methods <a href=3D#concept-input-apply title=3Dconcept-input-apply=
>apply</a> to the element:
+   <code title=3Dattr-fe-autocomplete><a href=3D#attr-fe-autoco=
mplete>autocomplete</a></code>,
+   <code title=3Dattr-input-list><a href=3D#attr-input-list>=
list</a></code>,
+   <code title=3Dattr-input-max><a href=3D#attr-input-max>ma=
x</a></code>,
+   <code title=3Dattr-input-min><a href=3D#attr-input-min>mi=
n</a></code>,
+   <code title=3Dattr-input-readonly><a href=3D#attr-input-read=
only>readonly</a></code>,
+   <code title=3Dattr-input-required><a href=3D#attr-input-requ=
ired>required</a></code>, and
+   <code title=3Dattr-input-step><a href=3D#attr-input-step>=
step</a></code> content attributes;
+   <code title=3Ddom-input-list><a href=3D#dom-input-list>li=
st</a></code>,
+   <code title=3Ddom-input-value><a href=3D#dom-input-value>=
value</a></code>,
+   <code title=3Ddom-input-valueAsDate><a href=3D#dom-input-val=
ueasdate>valueAsDate</a></code>, and
+   <code title=3Ddom-input-valueAsNumber><a href=3D#dom-input-v=
alueasnumber>valueAsNumber</a></code> IDL attributes;
+   <code title=3Ddom-input-stepDown><a href=3D#dom-input-stepdo=
wn>stepDown()</a></code> and
+   <code title=3Ddom-input-stepUp><a href=3D#dom-input-stepup&g=
t;stepUp()</a></code> methods.</p>
+
+   <p>The <code title=3Ddom-input-value><a href=3D#dom-in=
put-value>value</a></code> IDL attribute is in mode <a =
href=3D#dom-input-value-value title=3Ddom-input-value-value>value</=
a>.</p>
+
+   <p>The <code title=3Devent-input-input><a href=3D#even=
t-input-input>input</a></code> and <code title=3Devent-=
input-change><a href=3D#event-input-change>change</a></=
code> events <a href=3D#concept-input-apply title=3Dconcept-input-a=
pply>apply</a>.</p>
+
+   <p>The following content attributes must not be specified and &=
lt;a href=3D#do-not-apply>do not apply</a> to the
+   element:
+   <code class=3Dno-backref title=3Dattr-input-accept><a href=3D=
#attr-input-accept>accept</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-alt><a href=3D#a=
ttr-input-alt>alt</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-checked><a href=3D=
#attr-input-checked>checked</a></code>,
+   <code class=3Dno-backref title=3Dattr-fe-dirname><a href=3D#=
attr-fe-dirname>dirname</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formaction><a href=3D=
#attr-fs-formaction>formaction</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formenctype><a href=
=3D#attr-fs-formenctype>formenctype</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formmethod><a href=3D=
#attr-fs-formmethod>formmethod</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formnovalidate><a h=
ref=3D#attr-fs-formnovalidate>formnovalidate</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formtarget><a href=3D=
#attr-fs-formtarget>formtarget</a></code>,
+   <code class=3Dno-backref title=3Dattr-dim-height><a href=3D#=
attr-dim-height>height</a></code>,
+   <code class=3Dno-backref title=3Dattr-fe-inputmode><a href=3D=
#attr-fe-inputmode>inputmode</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-maxlength><a hre=
f=3D#attr-input-maxlength>maxlength</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-minlength><a hre=
f=3D#attr-input-minlength>minlength</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-multiple><a href=
=3D#attr-input-multiple>multiple</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-pattern><a href=3D=
#attr-input-pattern>pattern</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-placeholder><a h=
ref=3D#attr-input-placeholder>placeholder</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-size><a href=3D#=
attr-input-size>size</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-src><a href=3D#a=
ttr-input-src>src</a></code>, and
+   <code class=3Dno-backref title=3Dattr-dim-width><a href=3D#a=
ttr-dim-width>width</a></code>.</p>
+
+   <p>The following IDL attributes and methods <a href=3D#do-no=
t-apply>do not apply</a> to the element:
+   <code class=3Dno-backref title=3Ddom-input-checked><a href=3D=
#dom-input-checked>checked</a></code>,
+   <code class=3Dno-backref title=3Ddom-input-files><a href=3D#=
dom-input-files>files</a></code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-selectionStart=
><a href=3D#dom-textarea/input-selectionstart>selectionStart<=
/a></code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-selectionEnd&g=
t;<a href=3D#dom-textarea/input-selectionend>selectionEnd</a>=
</code>, and
+   <code class=3Dno-backref title=3Ddom-textarea/input-selectionDirec=
tion><a href=3D#dom-textarea/input-selectiondirection>selectionD=
irection</a></code> IDL attributes;
+   <code class=3Dno-backref title=3Ddom-textarea/input-select><=
a href=3D#dom-textarea/input-select>select()</a></code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-setRangeText&g=
t;<a href=3D#dom-textarea/input-setrangetext>setRangeText()</a&g=
t;</code>, and
+   <code class=3Dno-backref title=3Ddom-textarea/input-setSelectionRa=
nge><a href=3D#dom-textarea/input-setselectionrange>setSelection=
Range()</a></code> methods.</p>
+
+  </div>
+
+
+  <h6 id=3D"local-date-and-time-state-(type=3Ddatetime-local)&qu=
ot;><span class=3Dsecno>4.10.5.1.12 </span><dfn title=3D=
attr-input-type-datetime-local>Local Date and Time</dfn> state (=
<code title=3D"">type=3Ddatetime-local</code>)</=
h6>
+
+  <div class=3Dimpl>
+
+  <p>When an <code><a href=3D#the-input-element>input&=
lt;/a></code> element's <code title=3Dattr-input-type><=
a href=3D#attr-input-type>type</a></code> attribute is in
+  the <a href=3D"#local-date-and-time-state-(type=3Ddatetime-loc=
al)" title=3Dattr-input-type-datetime-local>Local Date and Time&l=
t;/a> state, the rules in
+  this section apply.</p>
+
+  </div>
+
+  <p>The <code><a href=3D#the-input-element>input</=
a></code> element <a href=3D#represents>represents</a&g=
t; a control for setting the element's
+  <a href=3D#concept-fe-value title=3Dconcept-fe-value>value</a=
> to a string representing a <a href=3D#concept-datetime-local titl=
e=3Dconcept-datetime-local>local date and time</a>, with no time=
-zone offset
+  information.</p>
+
+  <div class=3Dimpl>
+
+  <p>If the element is <i title=3Dconcept-fe-mutable><a h=
ref=3D#concept-fe-mutable>mutable</a></i>, the user agent =
should allow the
+  user to change the <a href=3D#concept-datetime-local title=3Dconcep=
t-datetime-local>date and time</a> represented by its
+  <a href=3D#concept-fe-value title=3Dconcept-fe-value>value</a=
>, as obtained by <a href=3D#parse-a-local-date-and-time-string tit=
le=3D"parse a local date and
+  time string">parsing a date and time</a> from it. User a=
gents must not allow the user to set
+  the <a href=3D#concept-fe-value title=3Dconcept-fe-value>value&l=
t;/a> to a non-empty string that is not a <a href=3D#valid-normaliz=
ed-local-date-and-time-string>valid
+  normalized local date and time string</a>. If the user agent pro=
vides a user interface for
+  selecting a <a href=3D#concept-datetime-local title=3Dconcept-datet=
ime-local>local date and time</a>, then the <a href=3D#concep=
t-fe-value title=3Dconcept-fe-value>value</a> must be set to a &=
lt;a href=3D#valid-normalized-local-date-and-time-string>valid normali=
zed local date and time
+  string</a> representing the user's selection. User agents should=
 allow the user to set the
+  <a href=3D#concept-fe-value title=3Dconcept-fe-value>value</a=
> to the empty string.</p>
+
+  <p><strong>Constraint validation</strong>: While the=
 user interface describes input that the user
+  agent cannot convert to a <a href=3D#valid-normalized-local-date-an=
d-time-string>valid normalized local date and time string</a>, t=
he control is
+  <a href=3D#suffering-from-bad-input>suffering from bad input<=
/a>.</p>
+
+  </div>
+
+  <p class=3Dnote>See the <a href=3D#input-author-notes>intr=
oduction section</a> for a discussion of
+  the difference between the input format and submission format for date=
, time, and number form
+  controls<span class=3Dimpl>, and the <a href=3D#input-impl-no=
tes>implementation notes</a>
+  regarding localization of form controls</span>.</p>
+
+  <p>The <code title=3Dattr-input-value><a href=3D#attr-i=
nput-value>value</a></code> attribute, if specified and no=
t empty, must
+  have a value that is a <a href=3D#valid-local-date-and-time-string&=
gt;valid local date and time string</a>.</p> <!-- ok to se=
t
+  out-of-range value, we never know when we might have to represent bogu=
s input -->
+
+  <div class=3Dimpl>
+
+  <p><strong>The <a href=3D#value-sanitization-algorithm&=
gt;value sanitization algorithm</a> is as follows</strong>: I=
f the <a href=3D#concept-fe-value title=3Dconcept-fe-value>value&lt=
;/a> of the element is a <a href=3D#valid-local-date-and-time-strin=
g>valid local date and time
+  string</a>, then set it to a <a href=3D#valid-normalized-loca=
l-date-and-time-string>valid normalized local date and time string<=
/a>
+  representing the same date and time; otherwise, set it to the empty st=
ring instead.</p>
+
+  </div>
+
+  <p>The <code title=3Dattr-input-min><a href=3D#attr-inp=
ut-min>min</a></code> attribute, if specified, must have a=
 value that is
+  a <a href=3D#valid-local-date-and-time-string>valid local date a=
nd time string</a>. The <code title=3Dattr-input-max><a hr=
ef=3D#attr-input-max>max</a></code>
+  attribute, if specified, must have a value that is a <a href=3D#val=
id-local-date-and-time-string>valid local date and time
+  string</a>.</p>
+
+  <p>The <code title=3Dattr-input-step><a href=3D#attr-in=
put-step>step</a></code> attribute is expressed in seconds=
. <span class=3Dimpl>The <a href=3D#concept-input-step-scale tit=
le=3Dconcept-input-step-scale>step scale factor</a> is 1000 (whi=
ch
+  converts the seconds to milliseconds, as used in the other algorithms)=
.</span> The <a href=3D#concept-input-step-default title=3Dconce=
pt-input-step-default>default step</a> is 60 seconds.</p>
+
+  <div class=3Dimpl>
+
+  <p>When the element is <a href=3D#suffering-from-a-step-misma=
tch>suffering from a step mismatch</a>, the user agent may round=
 the
+  element's <a href=3D#concept-fe-value title=3Dconcept-fe-value>v=
alue</a> to the nearest <a href=3D#concept-datetime-local title=3D=
concept-datetime-local>local date and time</a> for which the ele=
ment would not <a href=3D#suffering-from-a-step-mismatch title=3D&quot=
;suffering from a step mismatch">suffer from a step mismatch</=
a>.</p>
+
+  <p><strong>The <a href=3D#concept-input-value-string-nu=
mber title=3Dconcept-input-value-string-number>algorithm to convert a =
string to a
+  number</a>, given a string <var title=3D"">input=
</var>, is as follows</strong>: If <a href=3D#parse-a-loca=
l-date-and-time-string title=3D"parse a local date and time string&q=
uot;>parsing a date and time</a> from <var title=3D"&quo=
t;>input</var> results in an error, then return an error; otherw=
ise, return the number of
+  milliseconds elapsed from midnight on the morning of 1970-01-01 (the t=
ime represented by the value
+  "<code title=3D"">1970-01-01T00:00:00.0</code&=
gt;") to the parsed <a href=3D#concept-datetime-local title=3Dcon=
cept-datetime-local>local date and time</a>, ignoring leap secon=
ds.</p>
+
+  <p><strong>The <a href=3D#concept-input-value-number-st=
ring title=3Dconcept-input-value-number-string>algorithm to convert a =
number to a
+  string</a>, given a number <var title=3D"">input=
</var>, is as follows</strong>: Return a
+  <a href=3D#valid-normalized-local-date-and-time-string>valid nor=
malized local date and time string</a> that represents the date and=
 time that is
+  <var title=3D"">input</var> milliseconds after m=
idnight on the morning of 1970-01-01 (the time
+  represented by the value "<code title=3D"">1970-0=
1-01T00:00:00.0</code>").</p>
+
+  </div>
+
+  <p class=3Dnote>See <a href=3D#only-contemporary-times>the=
 note on historical dates</a> in the
+  <a href=3D"#date-and-time-state-(type=3Ddatetime)" title=3D=
attr-input-type-datetime>Date and Time</a> state section.</p&=
gt;
+
+  <div class=3Dbookkeeping>
+
+   <p>The following common <code><a href=3D#the-input-ele=
ment>input</a></code> element content
+   attributes, IDL attributes, and methods <a href=3D#concept-input-a=
pply title=3Dconcept-input-apply>apply</a> to the element:
+   <code title=3Dattr-fe-autocomplete><a href=3D#attr-fe-autoco=
mplete>autocomplete</a></code>,
+   <code title=3Dattr-input-list><a href=3D#attr-input-list>=
list</a></code>,
+   <code title=3Dattr-input-max><a href=3D#attr-input-max>ma=
x</a></code>,
+   <code title=3Dattr-input-min><a href=3D#attr-input-min>mi=
n</a></code>,
+   <code title=3Dattr-input-readonly><a href=3D#attr-input-read=
only>readonly</a></code>,
+   <code title=3Dattr-input-required><a href=3D#attr-input-requ=
ired>required</a></code>, and
+   <code title=3Dattr-input-step><a href=3D#attr-input-step>=
step</a></code> content attributes;
+   <code title=3Ddom-input-list><a href=3D#dom-input-list>li=
st</a></code>,
+   <code title=3Ddom-input-value><a href=3D#dom-input-value>=
value</a></code>, and
+   <code title=3Ddom-input-valueAsNumber><a href=3D#dom-input-v=
alueasnumber>valueAsNumber</a></code> IDL attributes;
+   <code title=3Ddom-input-stepDown><a href=3D#dom-input-stepdo=
wn>stepDown()</a></code> and
+   <code title=3Ddom-input-stepUp><a href=3D#dom-input-stepup&g=
t;stepUp()</a></code> methods.</p>
+
+   <p>The <code title=3Ddom-input-value><a href=3D#dom-in=
put-value>value</a></code> IDL attribute is
+   in mode <a href=3D#dom-input-value-value title=3Ddom-input-value-v=
alue>value</a>.</p>
+
+   <p>The <code title=3Devent-input-input><a href=3D#even=
t-input-input>input</a></code> and <code title=3Devent-=
input-change><a href=3D#event-input-change>change</a></=
code> events <a href=3D#concept-input-apply title=3Dconcept-input-a=
pply>apply</a>.</p>
+
+   <p>The following content attributes must not be specified and &=
lt;a href=3D#do-not-apply>do not
+   apply</a> to the element:
+   <code class=3Dno-backref title=3Dattr-input-accept><a href=3D=
#attr-input-accept>accept</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-alt><a href=3D#a=
ttr-input-alt>alt</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-checked><a href=3D=
#attr-input-checked>checked</a></code>,
+   <code class=3Dno-backref title=3Dattr-fe-dirname><a href=3D#=
attr-fe-dirname>dirname</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formaction><a href=3D=
#attr-fs-formaction>formaction</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formenctype><a href=
=3D#attr-fs-formenctype>formenctype</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formmethod><a href=3D=
#attr-fs-formmethod>formmethod</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formnovalidate><a h=
ref=3D#attr-fs-formnovalidate>formnovalidate</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formtarget><a href=3D=
#attr-fs-formtarget>formtarget</a></code>,
+   <code class=3Dno-backref title=3Dattr-dim-height><a href=3D#=
attr-dim-height>height</a></code>,
+   <code class=3Dno-backref title=3Dattr-fe-inputmode><a href=3D=
#attr-fe-inputmode>inputmode</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-maxlength><a hre=
f=3D#attr-input-maxlength>maxlength</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-minlength><a hre=
f=3D#attr-input-minlength>minlength</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-multiple><a href=
=3D#attr-input-multiple>multiple</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-pattern><a href=3D=
#attr-input-pattern>pattern</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-placeholder><a h=
ref=3D#attr-input-placeholder>placeholder</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-size><a href=3D#=
attr-input-size>size</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-src><a href=3D#a=
ttr-input-src>src</a></code>, and
+   <code class=3Dno-backref title=3Dattr-dim-width><a href=3D#a=
ttr-dim-width>width</a></code>.</p>
+
+   <p>The following IDL attributes and methods <a href=3D#do-no=
t-apply>do not apply</a> to the
+   element:
+   <code class=3Dno-backref title=3Ddom-input-checked><a href=3D=
#dom-input-checked>checked</a></code>,
+   <code class=3Dno-backref title=3Ddom-input-files><a href=3D#=
dom-input-files>files</a></code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-selectionStart=
><a href=3D#dom-textarea/input-selectionstart>selectionStart<=
/a></code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-selectionEnd&g=
t;<a href=3D#dom-textarea/input-selectionend>selectionEnd</a>=
</code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-selectionDirec=
tion><a href=3D#dom-textarea/input-selectiondirection>selectionD=
irection</a></code>, and
+   <code class=3Dno-backref title=3Ddom-input-valueAsDate><a hr=
ef=3D#dom-input-valueasdate>valueAsDate</a></code> IDL att=
ributes;
+   <code class=3Dno-backref title=3Ddom-textarea/input-select><=
a href=3D#dom-textarea/input-select>select()</a></code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-setRangeText&g=
t;<a href=3D#dom-textarea/input-setrangetext>setRangeText()</a&g=
t;</code>, and
+   <code class=3Dno-backref title=3Ddom-textarea/input-setSelectionRa=
nge><a href=3D#dom-textarea/input-setselectionrange>setSelection=
Range()</a></code> methods.</p>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>The following example shows part of a flight booking applica=
tion. The application uses an
+   <code><a href=3D#the-input-element>input</a></co=
de> element with its <code title=3Dattr-input-type><a href=3D=
#attr-input-type>type</a></code> attribute set to
+   <code title=3Dattr-input-type-datetime-local><a href=3D&quot=
;#local-date-and-time-state-(type=3Ddatetime-local)">datetime-loc=
al</a></code>, and it then interprets the
+   given date and time in the time zone of the selected airport.</p&g=
t;
+
+   <pre><fieldset>
+ <legend>Destination</legend>
+ <p><label>Airport: <input type=3Dtex=
t name=3Dto list=3Dairports></label></p&g=
t;
+ <p><label>Departure time: <input typ=
e=3Ddatetime-local name=3Dtotime step=3D3600></label&gt=
;</p>
+</fieldset>
+<datalist id=3Dairports>
+ <option value=3DATL label=3D"Atlanta">
+ <option value=3DMEM label=3D"Memphis">
+ <option value=3DLHR label=3D"London Heathrow">
+ <option value=3DLAX label=3D"Los Angeles">
+ <option value=3DFRA label=3D"Frankfurt">
+</datalist></pre>
+
+   <p>If the application instead used the <code title=3Dattr-in=
put-type-datetime><a href=3D"#date-and-time-state-(type=3Ddate=
time)">datetime</a></code>
+   type, then the user would have to work out the time-zone conversions =
himself, which is clearly
+   not a good user experience!</p>
+
+  </div>
+
+
+  <h6 id=3D"number-state-(type=3Dnumber)"><span class=
=3Dsecno>4.10.5.1.13 </span><dfn title=3Dattr-input-type-numb=
er>Number</dfn> state (<code title=3D"">type=3Dn=
umber</code>)</h6>
+
+  <div class=3Dimpl>
+
+  <p>When an <code><a href=3D#the-input-element>input&=
lt;/a></code> element's <code title=3Dattr-input-type><=
a href=3D#attr-input-type>type</a></code> attribute is in
+  the <a href=3D"#number-state-(type=3Dnumber)" title=3Datt=
r-input-type-number>Number</a> state, the rules in this section =
apply.</p>
+
+  </div>
+
+  <p>The <code><a href=3D#the-input-element>input</=
a></code> element <a href=3D#represents>represents</a&g=
t; a control for setting the element's
+  <a href=3D#concept-fe-value title=3Dconcept-fe-value>value</a=
> to a string representing a number.</p>
+
+  <div class=3Dimpl>
+
+  <p>If the element is <i title=3Dconcept-fe-mutable><a h=
ref=3D#concept-fe-mutable>mutable</a></i>, the user agent =
should allow the
+  user to change the number represented by its <a href=3D#concept-fe-=
value title=3Dconcept-fe-value>value</a>, as
+  obtained from applying the <a href=3D#rules-for-parsing-floating-po=
int-number-values>rules for parsing floating-point number values</a=
> to it. User
+  agents must not allow the user to set the <a href=3D#concept-fe-val=
ue title=3Dconcept-fe-value>value</a> to a
+  non-empty string that is not a <a href=3D#valid-floating-point-numb=
er>valid floating-point number</a>. If the user agent
+  provides a user interface for selecting a number, then the <a href=3D=
#concept-fe-value title=3Dconcept-fe-value>value</a> must be set=
 to the <a href=3D#best-representation-of-the-number-as-a-floating-poi=
nt-number title=3D"best representation of the
+  number as a floating-point number">best representation of the =
number representing the user's
+  selection as a floating-point number</a>. User agents should all=
ow the user to set the <a href=3D#concept-fe-value title=3Dconcept-fe-=
value>value</a> to the empty string.</p>
+
+  <p><strong>Constraint validation</strong>: While the=
 user interface describes input that the user
+  agent cannot convert to a <a href=3D#valid-floating-point-number&gt=
;valid floating-point number</a>, the control is <a href=3D#suff=
ering-from-bad-input>suffering
+  from bad input</a>.</p>
+
+  </div>
+
+  <p class=3Dnote>This specification does not define what user int=
erface user agents are to use;
+  user agent vendors are encouraged to consider what would best serve th=
eir users' needs. For
+  example, a user agent in Persian or Arabic markets might support Persi=
an and Arabic numeric input
+  (converting it to the format required for submission as described abov=
e). Similarly, a user agent
+  designed for Romans might display the value in Roman numerals rather t=
han in decimal; or (more
+  realistically) a user agent designed for the French market might displ=
ay the value with
+  apostrophes between thousands and commas before the decimals, and allo=
w the user to enter a value
+  in that manner, internally converting it to the submission format desc=
ribed above.</p>
+
+  <p>The <code title=3Dattr-input-value><a href=3D#attr-i=
nput-value>value</a></code> attribute, if specified and no=
t empty, must
+  have a value that is a <a href=3D#valid-floating-point-number>va=
lid floating-point number</a>.</p> <!-- ok to set out-of-r=
ange
+  value, we never know when we might have to represent bogus input --&gt=
;
+
+  <div class=3Dimpl>
+
+  <p><strong>The <a href=3D#value-sanitization-algorithm&=
gt;value sanitization algorithm</a> is as follows</strong>: I=
f the <a href=3D#concept-fe-value title=3Dconcept-fe-value>value&lt=
;/a> of the element is not a <a href=3D#valid-floating-point-number=
>valid floating-point
+  number</a>, then set it to the empty string instead.</p>
+
+  </div>
+
+  <p>The <code title=3Dattr-input-min><a href=3D#attr-inp=
ut-min>min</a></code> attribute, if specified, must have a=
 value that is
+  a <a href=3D#valid-floating-point-number>valid floating-point nu=
mber</a>. The <code title=3Dattr-input-max><a href=3D#attr=
-input-max>max</a></code> attribute,
+  if specified, must have a value that is a <a href=3D#valid-floating=
-point-number>valid floating-point number</a>.</p>
+
+  <p><span class=3Dimpl>The <a href=3D#concept-input-step=
-scale title=3Dconcept-input-step-scale>step scale factor</a> is
+  1.</span> The <a href=3D#concept-input-step-default title=3Dc=
oncept-input-step-default>default step</a> is 1 (allowing only
+  integers to be selected by the user, unless the <a href=3D#concept-=
input-min-zero title=3Dconcept-input-min-zero>step
+  base</a> has a non-integer value).</p>
+
+  <div class=3Dimpl>
+
+  <p>When the element is <a href=3D#suffering-from-a-step-misma=
tch>suffering from a step mismatch</a>, the user agent may round=
 the
+  element's <a href=3D#concept-fe-value title=3Dconcept-fe-value>v=
alue</a> to the nearest number for which the element
+  would not <a href=3D#suffering-from-a-step-mismatch title=3D"s=
uffering from a step mismatch">suffer from a step mismatch</a&=
gt;. If
+  there are two such numbers, user agents are encouraged to pick the one=
 nearest positive
+  infinity.</p>
+
+  <p><strong>The <a href=3D#concept-input-value-string-nu=
mber title=3Dconcept-input-value-string-number>algorithm to convert a =
string to a
+  number</a>, given a string <var title=3D"">input=
</var>, is as follows</strong>: If applying the
+  <a href=3D#rules-for-parsing-floating-point-number-values>rules =
for parsing floating-point number values</a> to <var title=3D&qu=
ot;">input</var> results
+  in an error, then return an error; otherwise, return the resulting num=
ber.</p>
+
+  <p><strong>The <a href=3D#concept-input-value-number-st=
ring title=3Dconcept-input-value-number-string>algorithm to convert a =
number to a
+  string</a>, given a number <var title=3D"">input=
</var>, is as follows</strong>: Return a
+  <a href=3D#valid-floating-point-number>valid floating-point numb=
er</a> that represents <var title=3D"">input</va=
r>.</p>
+
+  </div>
+
+  <div class=3Dbookkeeping>
+
+   <p>The following common <code><a href=3D#the-input-ele=
ment>input</a></code> element content attributes, IDL attr=
ibutes, and
+   methods <a href=3D#concept-input-apply title=3Dconcept-input-apply=
>apply</a> to the element:
+   <code title=3Dattr-fe-autocomplete><a href=3D#attr-fe-autoco=
mplete>autocomplete</a></code>,
+   <code title=3Dattr-input-list><a href=3D#attr-input-list>=
list</a></code>,
+   <code title=3Dattr-input-max><a href=3D#attr-input-max>ma=
x</a></code>,
+   <code title=3Dattr-input-min><a href=3D#attr-input-min>mi=
n</a></code>,
+   <code title=3Dattr-input-placeholder><a href=3D#attr-input-p=
laceholder>placeholder</a></code>,
+   <code title=3Dattr-input-readonly><a href=3D#attr-input-read=
only>readonly</a></code>,
+   <code title=3Dattr-input-required><a href=3D#attr-input-requ=
ired>required</a></code>, and
+   <code title=3Dattr-input-step><a href=3D#attr-input-step>=
step</a></code> content attributes;
+   <code title=3Ddom-input-list><a href=3D#dom-input-list>li=
st</a></code>,
+   <code title=3Ddom-input-value><a href=3D#dom-input-value>=
value</a></code>, and
+   <code title=3Ddom-input-valueAsNumber><a href=3D#dom-input-v=
alueasnumber>valueAsNumber</a></code> IDL attributes;
+   <code title=3Ddom-input-stepDown><a href=3D#dom-input-stepdo=
wn>stepDown()</a></code> and
+   <code title=3Ddom-input-stepUp><a href=3D#dom-input-stepup&g=
t;stepUp()</a></code> methods.</p>
+
+   <p>The <code title=3Ddom-input-value><a href=3D#dom-in=
put-value>value</a></code> IDL attribute is in mode <a =
href=3D#dom-input-value-value title=3Ddom-input-value-value>value</=
a>.</p>
+
+   <p>The <code title=3Devent-input-input><a href=3D#even=
t-input-input>input</a></code> and <code title=3Devent-=
input-change><a href=3D#event-input-change>change</a></=
code> events <a href=3D#concept-input-apply title=3Dconcept-input-a=
pply>apply</a>.</p>
+
+   <p>The following content attributes must not be specified and &=
lt;a href=3D#do-not-apply>do not apply</a> to the
+   element:
+   <code class=3Dno-backref title=3Dattr-input-accept><a href=3D=
#attr-input-accept>accept</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-alt><a href=3D#a=
ttr-input-alt>alt</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-checked><a href=3D=
#attr-input-checked>checked</a></code>,
+   <code class=3Dno-backref title=3Dattr-fe-dirname><a href=3D#=
attr-fe-dirname>dirname</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formaction><a href=3D=
#attr-fs-formaction>formaction</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formenctype><a href=
=3D#attr-fs-formenctype>formenctype</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formmethod><a href=3D=
#attr-fs-formmethod>formmethod</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formnovalidate><a h=
ref=3D#attr-fs-formnovalidate>formnovalidate</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formtarget><a href=3D=
#attr-fs-formtarget>formtarget</a></code>,
+   <code class=3Dno-backref title=3Dattr-dim-height><a href=3D#=
attr-dim-height>height</a></code>,
+   <code class=3Dno-backref title=3Dattr-fe-inputmode><a href=3D=
#attr-fe-inputmode>inputmode</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-maxlength><a hre=
f=3D#attr-input-maxlength>maxlength</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-minlength><a hre=
f=3D#attr-input-minlength>minlength</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-multiple><a href=
=3D#attr-input-multiple>multiple</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-pattern><a href=3D=
#attr-input-pattern>pattern</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-size><a href=3D#=
attr-input-size>size</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-src><a href=3D#a=
ttr-input-src>src</a></code>, and
+   <code class=3Dno-backref title=3Dattr-dim-width><a href=3D#a=
ttr-dim-width>width</a></code>.</p>
+
+   <p>The following IDL attributes and methods <a href=3D#do-no=
t-apply>do not apply</a> to the element:
+   <code class=3Dno-backref title=3Ddom-input-checked><a href=3D=
#dom-input-checked>checked</a></code>,
+   <code class=3Dno-backref title=3Ddom-input-files><a href=3D#=
dom-input-files>files</a></code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-selectionStart=
><a href=3D#dom-textarea/input-selectionstart>selectionStart<=
/a></code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-selectionEnd&g=
t;<a href=3D#dom-textarea/input-selectionend>selectionEnd</a>=
</code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-selectionDirec=
tion><a href=3D#dom-textarea/input-selectiondirection>selectionD=
irection</a></code>, and
+   <code class=3Dno-backref title=3Ddom-input-valueAsDate><a hr=
ef=3D#dom-input-valueasdate>valueAsDate</a></code> IDL att=
ributes;
+   <code class=3Dno-backref title=3Ddom-textarea/input-select><=
a href=3D#dom-textarea/input-select>select()</a></code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-setRangeText&g=
t;<a href=3D#dom-textarea/input-setrangetext>setRangeText()</a&g=
t;</code>, and
+   <code class=3Dno-backref title=3Ddom-textarea/input-setSelectionRa=
nge><a href=3D#dom-textarea/input-setselectionrange>setSelection=
Range()</a></code> methods.</p>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>Here is an example of using a numeric input control:</p&g=
t;
+
+   <pre><label>How much do you want to charge? $&amp=
;lt;input type=3Dnumber min=3D0 step=3D0.01 name=3Dprice></=
label></pre>
+
+   <p>As described above, a user agent might support numeric input=
 in the user's local format,
+   converting it to the format required for submission as described abov=
e. This might include
+   handling grouping separators (as in "872,000,000,000") and =
various decimal separators (such as
+   "3,99" vs "3.99") or using local digits (such as =
those in Arabic, Devanagari, Persian, and
+   Thai).</p>
+
+  </div>
+
+  <p class=3Dnote>The <code title=3D"">type=3Dnumb=
er</code> state is not appropriate for input that
+  happens to only consist of numbers but isn't strictly speaking a numbe=
r. For example, it would be
+  inappropriate for credit card numbers or US postal codes. A simple way=
 of determining whether to
+  use <code title=3D"">type=3Dnumber</code> is to =
consider whether it would make sense for the input
+  control to have a spinbox interface (e.g. with "up" and &quo=
t;down" arrows). Getting a credit card
+  number wrong by 1 in the last digit isn't a minor mistake, it's as wro=
ng as getting every digit
+  incorrect. So it would not make sense for the user to select a credit =
card number using "up" and
+  "down" buttons. When a spinbox interface is not appropriate,=
 <code title=3D"">type=3Dtext</code> is
+  probably the right choice (possibly with a <code title=3Dattr-input=
-pattern><a href=3D#attr-input-pattern>pattern</a></cod=
e>
+  attribute).</p>
+
+
+
+  <h6 id=3D"range-state-(type=3Drange)"><span class=3D=
secno>4.10.5.1.14 </span><dfn title=3Dattr-input-type-range&g=
t;Range</dfn> state (<code title=3D"">type=3Drange&=
lt;/code>)</h6>
+
+  <div class=3Dimpl>
+
+  <p>When an <code><a href=3D#the-input-element>input&=
lt;/a></code> element's <code title=3Dattr-input-type><=
a href=3D#attr-input-type>type</a></code> attribute is in
+  the <a href=3D"#range-state-(type=3Drange)" title=3Dattr-=
input-type-range>Range</a> state, the rules in this section appl=
y.</p>
+
+  </div>
+
+  <p>The <code><a href=3D#the-input-element>input</=
a></code> element <a href=3D#represents>represents</a&g=
t; a control for setting the element's
+  <a href=3D#concept-fe-value title=3Dconcept-fe-value>value</a=
> to a string representing a number, but with the caveat
+  that the exact value is not important, letting UAs provide a simpler i=
nterface than they do for
+  the <a href=3D"#number-state-(type=3Dnumber)" title=3Datt=
r-input-type-number>Number</a> state.</p>
+
+  <div class=3Dimpl>
+
+  <p class=3Dnote>In this state, the range and step constraints ar=
e enforced even during user input,
+  and there is no way to set the value to the empty string.</p>
+
+  <p>If the element is <i title=3Dconcept-fe-mutable><a h=
ref=3D#concept-fe-mutable>mutable</a></i>, the user agent =
should allow the
+  user to change the number represented by its <a href=3D#concept-fe-=
value title=3Dconcept-fe-value>value</a>, as
+  obtained from applying the <a href=3D#rules-for-parsing-floating-po=
int-number-values>rules for parsing floating-point number values</a=
> to it. User
+  agents must not allow the user to set the <a href=3D#concept-fe-val=
ue title=3Dconcept-fe-value>value</a> to a string
+  that is not a <a href=3D#valid-floating-point-number>valid float=
ing-point number</a>. If the user agent provides a user
+  interface for selecting a number, then the <a href=3D#concept-fe-va=
lue title=3Dconcept-fe-value>value</a> must be set
+  to a <a href=3D#best-representation-of-the-number-as-a-floating-poi=
nt-number title=3D"best representation of the number as a floating-p=
oint number">best
+  representation of the number representing the user's selection as a fl=
oating-point number</a>.
+  User agents must not allow the user to set the <a href=3D#concept-f=
e-value title=3Dconcept-fe-value>value</a> to the
+  empty string.</p>
+
+  <p><strong>Constraint validation</strong>: While the=
 user interface describes input that the user
+  agent cannot convert to a <a href=3D#valid-floating-point-number&gt=
;valid floating-point number</a>, the control is <a href=3D#suff=
ering-from-bad-input>suffering
+  from bad input</a>.</p>
+
+  </div>
+
+  <p>The <code title=3Dattr-input-value><a href=3D#attr-i=
nput-value>value</a></code> attribute, if specified, must =
have a value that
+  is a <a href=3D#valid-floating-point-number>valid floating-point=
 number</a>.</p> <!-- ok to set out-of-range value, we nev=
er
+  know when we might have to represent bogus input; not ok to not have a=
 value if the attribute is
+  present, since you can't not have a value (attribute missing is treate=
d as implying a default
+  value) -->
+
+  <div class=3Dimpl>
+
+  <p><strong>The <a href=3D#value-sanitization-algorithm&=
gt;value sanitization algorithm</a> is as follows</strong>: I=
f the <a href=3D#concept-fe-value title=3Dconcept-fe-value>value&lt=
;/a> of the element is not a <a href=3D#valid-floating-point-number=
>valid floating-point
+  number</a>, then set it to a <a href=3D#valid-floating-point-=
number>valid floating-point number</a> that represents the <a=
 href=3D#concept-input-value-default-range title=3Dconcept-input-value-de=
fault-range>default value</a>.</p>
+
+  </div>
+
+  <p>The <code title=3Dattr-input-min><a href=3D#attr-inp=
ut-min>min</a></code> attribute, if specified, must have a=
 value that is
+  a <a href=3D#valid-floating-point-number>valid floating-point nu=
mber</a>. The <a href=3D#concept-input-min-default title=3Dconce=
pt-input-min-default>default
+  minimum</a> is 0. The <code title=3Dattr-input-max><a h=
ref=3D#attr-input-max>max</a></code> attribute, if specifi=
ed, must
+  have a value that is a <a href=3D#valid-floating-point-number>va=
lid floating-point number</a>. The <a href=3D#concept-input-max-=
default title=3Dconcept-input-max-default>default maximum</a> is=
 100.</p>
+
+  <p>The <dfn id=3Dconcept-input-value-default-range title=3Dco=
ncept-input-value-default-range>default value</dfn> is the <a=
 href=3D#concept-input-min title=3Dconcept-input-min>minimum</a>=
 plus half the difference between the <a href=3D#concept-input-min tit=
le=3Dconcept-input-min>minimum</a> and the <a href=3D#concept=
-input-max title=3Dconcept-input-max>maximum</a>,
+  unless the <a href=3D#concept-input-max title=3Dconcept-input-max&g=
t;maximum</a> is less than the <a href=3D#concept-input-min titl=
e=3Dconcept-input-min>minimum</a>, in which case the <a href=3D=
#concept-input-value-default-range title=3Dconcept-input-value-default-ra=
nge>default value</a> is the <a href=3D#concept-input-min tit=
le=3Dconcept-input-min>minimum</a>.</p>
+
+  <div class=3Dimpl>
+
+  <p>When the element is <a href=3D#suffering-from-an-underflow=
>suffering from an underflow</a>, the user agent must set the
+  element's <a href=3D#concept-fe-value title=3Dconcept-fe-value>v=
alue</a> to a <a href=3D#valid-floating-point-number>valid fl=
oating-point
+  number</a> that represents the <a href=3D#concept-input-min t=
itle=3Dconcept-input-min>minimum</a>.</p>
+
+  <p>When the element is <a href=3D#suffering-from-an-overflow&=
gt;suffering from an overflow</a>, if the <a href=3D#concept-inp=
ut-max title=3Dconcept-input-max>maximum</a> is not less than th=
e <a href=3D#concept-input-min title=3Dconcept-input-min>minimum&lt=
;/a>, the user agent must set the element's <a href=3D#concept-fe-v=
alue title=3Dconcept-fe-value>value</a> to a <a href=3D#valid=
-floating-point-number>valid floating-point number</a> that
+  represents the <a href=3D#concept-input-max title=3Dconcept-input-m=
ax>maximum</a>.</p>
+
+  </div>
+
+  <p><span class=3Dimpl>The <a href=3D#concept-input-step=
-scale title=3Dconcept-input-step-scale>step scale factor</a> is
+  1.</span> The <a href=3D#concept-input-step-default title=3Dc=
oncept-input-step-default>default step</a> is 1 (allowing only
+  integers, unless the <code title=3Dattr-input-min><a href=3D#=
attr-input-min>min</a></code> attribute has a non-integer
+  value).</p>
+
+  <div class=3Dimpl>
+
+  <p>When the element is <a href=3D#suffering-from-a-step-misma=
tch>suffering from a step mismatch</a>, the user agent must roun=
d the
+  element's <a href=3D#concept-fe-value title=3Dconcept-fe-value>v=
alue</a> to the nearest number for which the element
+  would not <a href=3D#suffering-from-a-step-mismatch title=3D"s=
uffering from a step mismatch">suffer from a step mismatch</a&=
gt;, and
+  which is greater than or equal to the <a href=3D#concept-input-min =
title=3Dconcept-input-min>minimum</a>, and, if the
+  <a href=3D#concept-input-max title=3Dconcept-input-max>maximum&l=
t;/a> is not less than the <a href=3D#concept-input-min title=3Dcon=
cept-input-min>minimum</a>, which is less than or equal to the &=
lt;a href=3D#concept-input-max title=3Dconcept-input-max>maximum</a=
>, if there is a number that matches these constraints. If
+  two numbers match these constraints, then user agents must use the one=
 nearest to positive
+  infinity.</p>
+
+  <p class=3Dexample>For example, the markup
+  <code><input type=3D"range" m=
in=3D0 max=3D100 step=3D20 value=3D50>&=
lt;/code>
+  results in a range control whose initial value is 60.</p>
+
+  <p><strong>The <a href=3D#concept-input-value-string-nu=
mber title=3Dconcept-input-value-string-number>algorithm to convert a =
string to a
+  number</a>, given a string <var title=3D"">input=
</var>, is as follows</strong>: If applying the
+  <a href=3D#rules-for-parsing-floating-point-number-values>rules =
for parsing floating-point number values</a> to <var title=3D&qu=
ot;">input</var> results
+  in an error, then return an error; otherwise, return the resulting num=
ber.</p>
+
+  <p><strong>The <a href=3D#concept-input-value-number-st=
ring title=3Dconcept-input-value-number-string>algorithm to convert a =
number to a
+  string</a>, given a number <var title=3D"">input=
</var>, is as follows</strong>: Return a
+  <a href=3D#valid-floating-point-number>valid floating-point numb=
er</a> that represents <var title=3D"">input</va=
r>.</p>
+
+  </div>
+
+  <div class=3Dbookkeeping>
+
+   <p>The following common <code><a href=3D#the-input-ele=
ment>input</a></code> element content attributes, IDL attr=
ibutes, and
+   methods <a href=3D#concept-input-apply title=3Dconcept-input-apply=
>apply</a> to the element:
+   <code title=3Dattr-fe-autocomplete><a href=3D#attr-fe-autoco=
mplete>autocomplete</a></code>,
+   <code title=3Dattr-input-list><a href=3D#attr-input-list>=
list</a></code>,
+   <code title=3Dattr-input-max><a href=3D#attr-input-max>ma=
x</a></code>,
+   <code title=3Dattr-input-min><a href=3D#attr-input-min>mi=
n</a></code>, and
+   <code title=3Dattr-input-step><a href=3D#attr-input-step>=
step</a></code> content attributes;
+   <code title=3Ddom-input-list><a href=3D#dom-input-list>li=
st</a></code>,
+   <code title=3Ddom-input-value><a href=3D#dom-input-value>=
value</a></code>, and
+   <code title=3Ddom-input-valueAsNumber><a href=3D#dom-input-v=
alueasnumber>valueAsNumber</a></code> IDL attributes;
+   <code title=3Ddom-input-stepDown><a href=3D#dom-input-stepdo=
wn>stepDown()</a></code> and
+   <code title=3Ddom-input-stepUp><a href=3D#dom-input-stepup&g=
t;stepUp()</a></code> methods.</p>
+
+   <p>The <code title=3Ddom-input-value><a href=3D#dom-in=
put-value>value</a></code> IDL attribute is in mode <a =
href=3D#dom-input-value-value title=3Ddom-input-value-value>value</=
a>.</p>
+
+   <p>The <code title=3Devent-input-input><a href=3D#even=
t-input-input>input</a></code> and <code title=3Devent-=
input-change><a href=3D#event-input-change>change</a></=
code> events <a href=3D#concept-input-apply title=3Dconcept-input-a=
pply>apply</a>.</p>
+
+   <p>The following content attributes must not be specified and &=
lt;a href=3D#do-not-apply>do not apply</a> to the
+   element:
+   <code class=3Dno-backref title=3Dattr-input-accept><a href=3D=
#attr-input-accept>accept</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-alt><a href=3D#a=
ttr-input-alt>alt</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-checked><a href=3D=
#attr-input-checked>checked</a></code>,
+   <code class=3Dno-backref title=3Dattr-fe-dirname><a href=3D#=
attr-fe-dirname>dirname</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formaction><a href=3D=
#attr-fs-formaction>formaction</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formenctype><a href=
=3D#attr-fs-formenctype>formenctype</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formmethod><a href=3D=
#attr-fs-formmethod>formmethod</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formnovalidate><a h=
ref=3D#attr-fs-formnovalidate>formnovalidate</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formtarget><a href=3D=
#attr-fs-formtarget>formtarget</a></code>,
+   <code class=3Dno-backref title=3Dattr-dim-height><a href=3D#=
attr-dim-height>height</a></code>,
+   <code class=3Dno-backref title=3Dattr-fe-inputmode><a href=3D=
#attr-fe-inputmode>inputmode</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-maxlength><a hre=
f=3D#attr-input-maxlength>maxlength</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-minlength><a hre=
f=3D#attr-input-minlength>minlength</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-multiple><a href=
=3D#attr-input-multiple>multiple</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-pattern><a href=3D=
#attr-input-pattern>pattern</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-placeholder><a h=
ref=3D#attr-input-placeholder>placeholder</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-readonly><a href=
=3D#attr-input-readonly>readonly</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-required><a href=
=3D#attr-input-required>required</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-size><a href=3D#=
attr-input-size>size</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-src><a href=3D#a=
ttr-input-src>src</a></code>, and
+   <code class=3Dno-backref title=3Dattr-dim-width><a href=3D#a=
ttr-dim-width>width</a></code>.</p>
+
+   <p>The following IDL attributes and methods <a href=3D#do-no=
t-apply>do not apply</a> to the element:
+   <code class=3Dno-backref title=3Ddom-input-checked><a href=3D=
#dom-input-checked>checked</a></code>,
+   <code class=3Dno-backref title=3Ddom-input-files><a href=3D#=
dom-input-files>files</a></code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-selectionStart=
><a href=3D#dom-textarea/input-selectionstart>selectionStart<=
/a></code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-selectionEnd&g=
t;<a href=3D#dom-textarea/input-selectionend>selectionEnd</a>=
</code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-selectionDirec=
tion><a href=3D#dom-textarea/input-selectiondirection>selectionD=
irection</a></code>, and
+   <code class=3Dno-backref title=3Ddom-input-valueAsDate><a hr=
ef=3D#dom-input-valueasdate>valueAsDate</a></code> IDL att=
ributes;
+   <code class=3Dno-backref title=3Ddom-textarea/input-select><=
a href=3D#dom-textarea/input-select>select()</a></code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-setRangeText&g=
t;<a href=3D#dom-textarea/input-setrangetext>setRangeText()</a&g=
t;</code>, and
+   <code class=3Dno-backref title=3Ddom-textarea/input-setSelectionRa=
nge><a href=3D#dom-textarea/input-setselectionrange>setSelection=
Range()</a></code> methods.</p>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>Here is an example of a range control using an autocomplete =
list with the <code title=3Dattr-input-list><a href=3D#attr-inpu=
t-list>list</a></code> attribute. This could be useful if =
there are values along the
+   full range of the control that are especially important, such as prec=
onfigured light levels or
+   typical speed limits in a range control used as a speed control. The =
following markup
+   fragment:</p>
+
+   <pre><input type=3D"range" min=3D"-100&qu=
ot; max=3D"100" value=3D"0" step=3D"10" nam=
e=3D"power" list=3D"powers">
+<datalist id=3D"powers">
+ <option value=3D"0">
+ <option value=3D"-30">
+ <option value=3D"30">
+<span class=3Dbad> <option value=3D"++50">=
</span>
+</datalist>
+</pre>
+
+   <p>...with the following style sheet applied:</p>
+
+   <pre>input { height: 75px; width: 49px; background: #D5CCBB; co=
lor: black; }</pre>
+
+   <p>...might render as:</p>
+
+   <p><img src=3Dhttp://images.whatwg.org/sample-range.png widt=
h=3D49 alt=3D"A vertical slider control whose primary color is black=
 and whose background color is beige, with the slider having five tick ma=
rks, one long one at each extremity, and three short ones clustered aroun=
d the midpoint." height=3D75><p>Note how the UA determined =
the orientation of the control from the ratio of the
+   style-sheet-specified height and width properties. The colors were si=
milarly derived from the
+   style sheet. The tick marks, however, were derived from the markup. I=
n particular, the <code title=3Dattr-input-step><a href=3D#attr-=
input-step>step</a></code> attribute has not affected the =
placement of tick marks, the
+   UA deciding to only use the author-specified completion values and th=
en adding longer tick marks
+   at the extremes.</p>
+
+   <p>Note also how the invalid value <code title=3D"&quot=
;>++50</code> was completely ignored.</p>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>For another example, consider the following markup fragment:=
</p>
+
+   <pre><input name=3Dx type=3Drange min=3D100 max=3D700 st=
ep=3D9.09090909 value=3D509.090909></pre>
+
+   <p>A user agent could display in a variety of ways, for instanc=
e:</p>
+
+   <p><img src=3Dhttp://images.whatwg.org/sample-range-2a.png w=
idth=3D231 alt=3D"As a dial." height=3D57></p>
+
+   <p>Or, alternatively, for instance:</p>
+
+   <p><img src=3Dhttp://images.whatwg.org/sample-range-2b.png w=
idth=3D445 alt=3D"As a long horizontal slider with tick marks."=
 height=3D56></p>
+
+   <p>The user agent could pick which one to display based on the =
dimensions given in the style
+   sheet. This would allow it to maintain the same resolution for the ti=
ck marks, despite the
+   differences in width.</p>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>Finally, here is an example of a range control with two labe=
led values:</p>
+
+   <pre><input type=3D"range" name=3D"a&quot=
; list=3D"a-values">
+<datalist id=3D"a-values">
+ <option value=3D"10" label=3D"Low">
+ <option value=3D"90" label=3D"High">
+</datalist>
+</pre>
+
+   <p>With styles that make the control draw vertically, it might =
look as follows:</p>
+
+   <p><img src=3Dhttp://images.whatwg.org/sample-range-labels.p=
ng width=3D103 alt=3D"A vertical slider control with two tick marks,=
 one near the top labeled 'High', and one near the bottom labeled 'Low'.&=
quot; height=3D164></div>
+
+
+
+  <h6 id=3D"color-state-(type=3Dcolor)"><span class=3D=
secno>4.10.5.1.15 </span><dfn title=3Dattr-input-type-color&g=
t;Color</dfn> state (<code title=3D"">type=3Dcolor&=
lt;/code>)</h6>
+
+  <div class=3Dimpl>
+
+  <p>When an <code><a href=3D#the-input-element>input&=
lt;/a></code> element's <code title=3Dattr-input-type><=
a href=3D#attr-input-type>type</a></code> attribute is in
+  the <a href=3D"#color-state-(type=3Dcolor)" title=3Dattr-=
input-type-color>Color</a> state, the rules in this section appl=
y.</p>
+
+  </div>
+
+  <p>The <code><a href=3D#the-input-element>input</=
a></code> element <a href=3D#represents>represents</a&g=
t; a color well control, for setting the
+  element's <a href=3D#concept-fe-value title=3Dconcept-fe-value>v=
alue</a> to a string representing a <a href=3D#simple-color>s=
imple
+  color</a>.</p>
+
+  <div class=3Dimpl>
+
+  <p class=3Dnote>In this state, there is always a color picked, a=
nd there is no way to set the
+  value to the empty string.</p>
+
+  <p>If the element is <i title=3Dconcept-fe-mutable><a h=
ref=3D#concept-fe-mutable>mutable</a></i>, the user agent =
should allow the
+  user to change the color represented by its <a href=3D#concept-fe-v=
alue title=3Dconcept-fe-value>value</a>, as
+  obtained from applying the <a href=3D#rules-for-parsing-simple-colo=
r-values>rules for parsing simple color values</a> to it. User a=
gents
+  must not allow the user to set the <a href=3D#concept-fe-value titl=
e=3Dconcept-fe-value>value</a> to a string that is
+  not a <a href=3D#valid-lowercase-simple-color>valid lowercase si=
mple color</a>. If the user agent provides a user interface for
+  selecting a color, then the <a href=3D#concept-fe-value title=3Dcon=
cept-fe-value>value</a> must be set to the result
+  of using the <a href=3D#rules-for-serializing-simple-color-values&g=
t;rules for serializing simple color values</a> to the user's selec=
tion. User
+  agents must not allow the user to set the <a href=3D#concept-fe-val=
ue title=3Dconcept-fe-value>value</a> to the empty
+  string.</p>
+
+  <p><strong>Constraint validation</strong>: While the=
 user interface describes input that the user
+  agent cannot convert to a <a href=3D#valid-lowercase-simple-color&g=
t;valid lowercase simple color</a>, the control is
+  <a href=3D#suffering-from-bad-input>suffering from bad input<=
/a>.</p>
+
+  </div>
+
+  <p>The <code title=3Dattr-input-value><a href=3D#attr-i=
nput-value>value</a></code> attribute, if specified and no=
t empty, must
+  have a value that is a <a href=3D#valid-simple-color>valid simpl=
e color</a>.</p>
+
+  <div class=3Dimpl>
+
+  <p><strong>The <a href=3D#value-sanitization-algorithm&=
gt;value sanitization algorithm</a> is as follows</strong>: I=
f the <a href=3D#concept-fe-value title=3Dconcept-fe-value>value&lt=
;/a> of the element is a <a href=3D#valid-simple-color>valid sim=
ple color</a>, then
+  set it to the <a href=3D#concept-fe-value title=3Dconcept-fe-value&=
gt;value</a> of the element <a href=3D#converted-to-ascii-lowerc=
ase>converted to ASCII
+  lowercase</a>; otherwise, set it to the string "<code ti=
tle=3D"">#000000</code>".</p>
+
+  </div>
+
+  <div class=3Dbookkeeping>
+
+   <p>The following common <code><a href=3D#the-input-ele=
ment>input</a></code> element content attributes and IDL a=
ttributes <a href=3D#concept-input-apply title=3Dconcept-input-apply&g=
t;apply</a> to the element:
+   <code title=3Dattr-fe-autocomplete><a href=3D#attr-fe-autoco=
mplete>autocomplete</a></code> and
+   <code title=3Dattr-input-list><a href=3D#attr-input-list>=
list</a></code> content attributes;
+   <code title=3Ddom-input-list><a href=3D#dom-input-list>li=
st</a></code> and
+   <code title=3Ddom-input-value><a href=3D#dom-input-value>=
value</a></code> IDL attributes.</p>
+
+   <p>The <code title=3Ddom-input-value><a href=3D#dom-in=
put-value>value</a></code> IDL attribute is in mode <a =
href=3D#dom-input-value-value title=3Ddom-input-value-value>value</=
a>.</p>
+
+   <p>The <code title=3Devent-input-input><a href=3D#even=
t-input-input>input</a></code> and <code title=3Devent-=
input-change><a href=3D#event-input-change>change</a></=
code> events <a href=3D#concept-input-apply title=3Dconcept-input-a=
pply>apply</a>.</p>
+
+   <p>The following content attributes must not be specified and &=
lt;a href=3D#do-not-apply>do not apply</a> to the
+   element:
+   <code class=3Dno-backref title=3Dattr-input-accept><a href=3D=
#attr-input-accept>accept</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-alt><a href=3D#a=
ttr-input-alt>alt</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-checked><a href=3D=
#attr-input-checked>checked</a></code>,
+   <code class=3Dno-backref title=3Dattr-fe-dirname><a href=3D#=
attr-fe-dirname>dirname</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formaction><a href=3D=
#attr-fs-formaction>formaction</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formenctype><a href=
=3D#attr-fs-formenctype>formenctype</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formmethod><a href=3D=
#attr-fs-formmethod>formmethod</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formnovalidate><a h=
ref=3D#attr-fs-formnovalidate>formnovalidate</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formtarget><a href=3D=
#attr-fs-formtarget>formtarget</a></code>,
+   <code class=3Dno-backref title=3Dattr-dim-height><a href=3D#=
attr-dim-height>height</a></code>,
+   <code class=3Dno-backref title=3Dattr-fe-inputmode><a href=3D=
#attr-fe-inputmode>inputmode</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-max><a href=3D#a=
ttr-input-max>max</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-maxlength><a hre=
f=3D#attr-input-maxlength>maxlength</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-min><a href=3D#a=
ttr-input-min>min</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-minlength><a hre=
f=3D#attr-input-minlength>minlength</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-multiple><a href=
=3D#attr-input-multiple>multiple</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-pattern><a href=3D=
#attr-input-pattern>pattern</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-placeholder><a h=
ref=3D#attr-input-placeholder>placeholder</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-readonly><a href=
=3D#attr-input-readonly>readonly</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-required><a href=
=3D#attr-input-required>required</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-size><a href=3D#=
attr-input-size>size</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-src><a href=3D#a=
ttr-input-src>src</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-step><a href=3D#=
attr-input-step>step</a></code>, and
+   <code class=3Dno-backref title=3Dattr-dim-width><a href=3D#a=
ttr-dim-width>width</a></code>.</p>
+
+   <p>The following IDL attributes and methods <a href=3D#do-no=
t-apply>do not apply</a> to the element:
+   <code class=3Dno-backref title=3Ddom-input-checked><a href=3D=
#dom-input-checked>checked</a></code>,
+   <code class=3Dno-backref title=3Ddom-input-files><a href=3D#=
dom-input-files>files</a></code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-selectionStart=
><a href=3D#dom-textarea/input-selectionstart>selectionStart<=
/a></code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-selectionEnd&g=
t;<a href=3D#dom-textarea/input-selectionend>selectionEnd</a>=
</code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-selectionDirec=
tion><a href=3D#dom-textarea/input-selectiondirection>selectionD=
irection</a></code>,
+   <code class=3Dno-backref title=3Ddom-input-valueAsDate><a hr=
ef=3D#dom-input-valueasdate>valueAsDate</a></code>, and
+   <code class=3Dno-backref title=3Ddom-input-valueAsNumber><a =
href=3D#dom-input-valueasnumber>valueAsNumber</a></code> I=
DL attributes;
+   <code class=3Dno-backref title=3Ddom-textarea/input-select><=
a href=3D#dom-textarea/input-select>select()</a></code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-setRangeText&g=
t;<a href=3D#dom-textarea/input-setrangetext>setRangeText()</a&g=
t;</code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-setSelectionRa=
nge><a href=3D#dom-textarea/input-setselectionrange>setSelection=
Range()</a></code>,
+   <code class=3Dno-backref title=3Ddom-input-stepDown><a href=3D=
#dom-input-stepdown>stepDown()</a></code>, and
+   <code class=3Dno-backref title=3Ddom-input-stepUp><a href=3D=
#dom-input-stepup>stepUp()</a></code> methods.</p>
+
+  </div>
+
+
+  <h6 id=3D"checkbox-state-(type=3Dcheckbox)"><span c=
lass=3Dsecno>4.10.5.1.16 </span><dfn title=3Dattr-input-type-=
checkbox>Checkbox</dfn> state (<code title=3D"">=
type=3Dcheckbox</code>)</h6>
+
+  <div class=3Dimpl>
+
+  <p>When an <code><a href=3D#the-input-element>input&=
lt;/a></code> element's <code title=3Dattr-input-type><=
a href=3D#attr-input-type>type</a></code> attribute is in
+  the <a href=3D"#checkbox-state-(type=3Dcheckbox)" title=3D=
attr-input-type-checkbox>Checkbox</a> state, the rules in this s=
ection
+  apply.</p>
+
+  </div>
+
+  <p>The <code><a href=3D#the-input-element>input</=
a></code> element <a href=3D#represents>represents</a&g=
t; a two-state control that represents the
+  element's <a href=3D#concept-fe-checked title=3Dconcept-fe-checked&=
gt;checkedness</a> state. If the element's <a href=3D#concept-fe=
-checked title=3Dconcept-fe-checked>checkedness</a> state is tru=
e, the control represents a positive
+  selection, and if it is false, a negative selection. If the element's =
<code title=3Ddom-input-indeterminate><a href=3D#dom-input-indet=
erminate>indeterminate</a></code> IDL attribute is set to =
true, then the
+  control's selection should be obscured as if the control was in a thir=
d, indeterminate, state.</p>
+
+  <p class=3Dnote>The control is never a true tri-state control, e=
ven if the element's <code title=3Ddom-input-indeterminate><a hr=
ef=3D#dom-input-indeterminate>indeterminate</a></code> IDL=
 attribute is set to true. The <code title=3Ddom-input-indeterminate&g=
t;<a href=3D#dom-input-indeterminate>indeterminate</a></co=
de> IDL attribute only gives the appearance of a
+  third state.</p>
+
+  <div class=3Dimpl>
+
+  <p>If the element is <i title=3Dconcept-fe-mutable><a h=
ref=3D#concept-fe-mutable>mutable</a></i>, then: The <a=
 href=3D#pre-click-activation-steps>pre-click
+  activation steps</a> consist of setting the element's <a href=
=3D#concept-fe-checked title=3Dconcept-fe-checked>checkedness</a&gt=
; to its opposite value (i.e. true if it is false,
+  false if it is true), and of setting the element's <code title=3Ddo=
m-input-indeterminate><a href=3D#dom-input-indeterminate>indeter=
minate</a></code> IDL attribute to false. The <a href=3D#c=
anceled-activation-steps>canceled
+  activation steps</a> consist of setting the <a href=3D#concep=
t-fe-checked title=3Dconcept-fe-checked>checkedness</a>
+  and the element's <code title=3Ddom-input-indeterminate><a hr=
ef=3D#dom-input-indeterminate>indeterminate</a></code> IDL=
 attribute back to
+  the values they had before the <a href=3D#pre-click-activation-step=
s>pre-click activation steps</a> were run. The
+  <a href=3D#activation-behavior>activation behavior</a> is =
to <a href=3D#fire-a-simple-event>fire a simple event</a> tha=
t bubbles named <code title=3Devent-change>change</code> at t=
he element. <!-- It's not cancelable. Once this fires, the
+  control is checked, end of story. --></p>
+
+  <p>If the element is not <i title=3Dconcept-fe-mutable>&lt=
;a href=3D#concept-fe-mutable>mutable</a></i>, it has no &=
lt;a href=3D#activation-behavior>activation
+  behavior</a>.</p>
+
+  <p><strong>Constraint validation</strong>: If the el=
ement is <i title=3Dconcept-input-required><a href=3D#concept-in=
put-required>required</a></i> and its <a href=3D#concep=
t-fe-checked title=3Dconcept-fe-checked>checkedness</a> is false=
, then the element is <a href=3D#suffering-from-being-missing>suffe=
ring from
+  being missing</a>.</p>
+
+  </div>
+
+<!--TOPIC:DOM APIs-->
+  <dl class=3Ddomintro><dt><var title=3D"">i=
nput</var> . <code title=3Ddom-input-indeterminate><a href=
=3D#dom-input-indeterminate>indeterminate</a></code> [ =3D=
 <var title=3D"">value</var> ]</dt>
+
+   <dd>
+
+    <p>When set, overrides the rendering of <a href=3D"#ch=
eckbox-state-(type=3Dcheckbox)" title=3Dattr-input-type-checkbox>=
checkbox</a>
+    controls so that the current value is not visible.</p>
+
+   </dd>
+
+  </dl><!--TOPIC:HTML--><div class=3Dbookkeeping>
+
+   <p>The following common <code><a href=3D#the-input-ele=
ment>input</a></code> element content attributes and IDL a=
ttributes <a href=3D#concept-input-apply title=3Dconcept-input-apply&g=
t;apply</a> to the element:
+   <code title=3Dattr-input-checked><a href=3D#attr-input-check=
ed>checked</a></code>, and
+   <code title=3Dattr-input-required><a href=3D#attr-input-requ=
ired>required</a></code> content attributes;
+   <code title=3Ddom-input-checked><a href=3D#dom-input-checked=
>checked</a></code> and
+   <code title=3Ddom-input-value><a href=3D#dom-input-value>=
value</a></code> IDL attributes.</p>
+
+   <p>The <code title=3Ddom-input-value><a href=3D#dom-in=
put-value>value</a></code> IDL attribute is in mode <a =
href=3D#dom-input-value-default-on title=3Ddom-input-value-default-on>=
default/on</a>.</p>
+
+   <p>The <code title=3Devent-input-change><a href=3D#eve=
nt-input-change>change</a></code> event <a href=3D#conc=
ept-input-apply title=3Dconcept-input-apply>applies</a>.</p&g=
t;
+
+   <p>The following content attributes must not be specified and &=
lt;a href=3D#do-not-apply>do not apply</a> to the
+   element:
+   <code class=3Dno-backref title=3Dattr-input-accept><a href=3D=
#attr-input-accept>accept</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-alt><a href=3D#a=
ttr-input-alt>alt</a></code>,
+   <code class=3Dno-backref title=3Dattr-fe-autocomplete><a hre=
f=3D#attr-fe-autocomplete>autocomplete</a></code>,
+   <code class=3Dno-backref title=3Dattr-fe-dirname><a href=3D#=
attr-fe-dirname>dirname</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formaction><a href=3D=
#attr-fs-formaction>formaction</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formenctype><a href=
=3D#attr-fs-formenctype>formenctype</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formmethod><a href=3D=
#attr-fs-formmethod>formmethod</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formnovalidate><a h=
ref=3D#attr-fs-formnovalidate>formnovalidate</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formtarget><a href=3D=
#attr-fs-formtarget>formtarget</a></code>,
+   <code class=3Dno-backref title=3Dattr-dim-height><a href=3D#=
attr-dim-height>height</a></code>,
+   <code class=3Dno-backref title=3Dattr-fe-inputmode><a href=3D=
#attr-fe-inputmode>inputmode</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-list><a href=3D#=
attr-input-list>list</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-max><a href=3D#a=
ttr-input-max>max</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-maxlength><a hre=
f=3D#attr-input-maxlength>maxlength</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-min><a href=3D#a=
ttr-input-min>min</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-minlength><a hre=
f=3D#attr-input-minlength>minlength</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-multiple><a href=
=3D#attr-input-multiple>multiple</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-pattern><a href=3D=
#attr-input-pattern>pattern</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-placeholder><a h=
ref=3D#attr-input-placeholder>placeholder</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-readonly><a href=
=3D#attr-input-readonly>readonly</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-size><a href=3D#=
attr-input-size>size</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-src><a href=3D#a=
ttr-input-src>src</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-step><a href=3D#=
attr-input-step>step</a></code>, and
+   <code class=3Dno-backref title=3Dattr-dim-width><a href=3D#a=
ttr-dim-width>width</a></code>.</p>
+
+   <p>The following IDL attributes and methods <a href=3D#do-no=
t-apply>do not apply</a> to the element:
+   <code class=3Dno-backref title=3Ddom-input-files><a href=3D#=
dom-input-files>files</a></code>,
+   <code class=3Dno-backref title=3Ddom-input-list><a href=3D#d=
om-input-list>list</a></code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-selectionStart=
><a href=3D#dom-textarea/input-selectionstart>selectionStart<=
/a></code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-selectionEnd&g=
t;<a href=3D#dom-textarea/input-selectionend>selectionEnd</a>=
</code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-selectionDirec=
tion><a href=3D#dom-textarea/input-selectiondirection>selectionD=
irection</a></code>,
+   <code class=3Dno-backref title=3Ddom-input-valueAsDate><a hr=
ef=3D#dom-input-valueasdate>valueAsDate</a></code>, and
+   <code class=3Dno-backref title=3Ddom-input-valueAsNumber><a =
href=3D#dom-input-valueasnumber>valueAsNumber</a></code> I=
DL attributes;
+   <code class=3Dno-backref title=3Ddom-textarea/input-select><=
a href=3D#dom-textarea/input-select>select()</a></code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-setRangeText&g=
t;<a href=3D#dom-textarea/input-setrangetext>setRangeText()</a&g=
t;</code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-setSelectionRa=
nge><a href=3D#dom-textarea/input-setselectionrange>setSelection=
Range()</a></code>,
+   <code class=3Dno-backref title=3Ddom-input-stepDown><a href=3D=
#dom-input-stepdown>stepDown()</a></code>, and
+   <code class=3Dno-backref title=3Ddom-input-stepUp><a href=3D=
#dom-input-stepup>stepUp()</a></code> methods.</p>
+
+   <p>The <code class=3Dno-backref title=3Devent-input-input&gt=
;<a href=3D#event-input-input>input</a></code> event &l=
t;a href=3D#do-not-apply title=3D"do not
+   apply">does not apply</a>.</p>
+
+  </div>
+
+
+
+  <h6 id=3D"radio-button-state-(type=3Dradio)"><span =
class=3Dsecno>4.10.5.1.17 </span><dfn title=3Dattr-input-type=
-radio>Radio Button</dfn> state (<code title=3D""&g=
t;type=3Dradio</code>)</h6>
+
+  <div class=3Dimpl>
+
+  <p>When an <code><a href=3D#the-input-element>input&=
lt;/a></code> element's <code title=3Dattr-input-type><=
a href=3D#attr-input-type>type</a></code> attribute is in
+  the <a href=3D"#radio-button-state-(type=3Dradio)" title=3D=
attr-input-type-radio>Radio Button</a> state, the rules in this =
section
+  apply.</p>
+
+  </div>
+
+  <p>The <code><a href=3D#the-input-element>input</=
a></code> element <a href=3D#represents>represents</a&g=
t; a control that, when used in conjunction
+  with other <code><a href=3D#the-input-element>input</a&=
gt;</code> elements, forms a <i><a href=3D#radio-button-gr=
oup>radio button group</a></i> in which only one
+  control can have its <a href=3D#concept-fe-checked title=3Dconcept-=
fe-checked>checkedness</a> state set to true. If the
+  element's <a href=3D#concept-fe-checked title=3Dconcept-fe-checked&=
gt;checkedness</a> state is true, the control
+  represents the selected control in the group, and if it is false, it i=
ndicates a control in the
+  group that is not selected.</p>
+
+  <p>The <dfn id=3Dradio-button-group><i>radio button =
group</i></dfn> that contains an <code><a href=3D#th=
e-input-element>input</a></code> element <var title=3D&=
quot;">a</var> also contains all the other <code><=
a href=3D#the-input-element>input</a></code> elements <=
var title=3D"">b</var>
+  that fulfill all of the following conditions:</p>
+
+  <ul><li>The <code><a href=3D#the-input-element&gt=
;input</a></code> element <var title=3D"">b&l=
t;/var>'s <code title=3Dattr-input-type><a href=3D#attr-input=
-type>type</a></code> attribute is in the <a href=3D&qu=
ot;#radio-button-state-(type=3Dradio)" title=3Dattr-input-type-radio=
>Radio
+   Button</a> state.</li>
+
+   <li>Either <var title=3D"">a</var> and &l=
t;var title=3D"">b</var> have the same <a href=3D#f=
orm-owner>form owner</a>,
+   or they both have no <a href=3D#form-owner>form owner</a>=
.</li>
+
+   <li>Both <var title=3D"">a</var> and <=
var title=3D"">b</var> are in the same <a href=3D#h=
ome-subtree>home
+   subtree</a>.</li>
+
+   <li>They both have a <code title=3Dattr-fe-name><a hre=
f=3D#attr-fe-name>name</a></code> attribute, their <cod=
e title=3Dattr-fe-name><a href=3D#attr-fe-name>name</a>&lt=
;/code> attributes are not empty, and the value of <var title=3D&qu=
ot;">a</var>'s <code title=3Dattr-fe-name><a href=3D=
#attr-fe-name>name</a></code> attribute is a <a href=3D=
#compatibility-caseless>compatibility
+   caseless</a> match for the value of <var title=3D"&quot=
;>b</var>'s <code title=3Dattr-fe-name><a href=3D#attr-=
fe-name>name</a></code> attribute.</li>
+
+  </ul><p>A document must not contain an <code><a h=
ref=3D#the-input-element>input</a></code> element whose &l=
t;i><a href=3D#radio-button-group>radio button group</a>&l=
t;/i>
+  contains only that element.</p>
+
+  <div class=3Dimpl>
+
+  <p>When any of the following phenomena occur, if the element's &=
lt;a href=3D#concept-fe-checked title=3Dconcept-fe-checked>checkedness=
</a> state is true after the occurrence, the <a href=3D#concept-=
fe-checked title=3Dconcept-fe-checked>checkedness</a> state of a=
ll the other elements in the same <i><a href=3D#radio-button-gro=
up>radio
+  button group</a></i> must be set to false:</p>
+
+  <ul><li>The element's <a href=3D#concept-fe-checked tit=
le=3Dconcept-fe-checked>checkedness</a> state is set to true (fo=
r
+   whatever reason).</li>
+
+   <li>The element's <code title=3Dattr-fe-name><a href=3D=
#attr-fe-name>name</a></code> attribute is set, changed, o=
r
+   removed.</li>
+
+   <li>The element's <a href=3D#form-owner>form owner</a&=
gt; changes.</li>
+
+  </ul><p>If the element is <i title=3Dconcept-fe-mutable=
><a href=3D#concept-fe-mutable>mutable</a></i>, then=
: The <a href=3D#pre-click-activation-steps>pre-click
+  activation steps</a> consist of setting the element's <a href=
=3D#concept-fe-checked title=3Dconcept-fe-checked>checkedness</a&gt=
; to true. The <a href=3D#canceled-activation-steps>canceled activa=
tion steps</a>
+  consist of setting the element's <a href=3D#concept-fe-checked titl=
e=3Dconcept-fe-checked>checkedness</a> to false. The
+  <a href=3D#activation-behavior>activation behavior</a> is =
to <a href=3D#fire-a-simple-event>fire a simple event</a> tha=
t bubbles named <code title=3Devent-change>change</code> at t=
he element. <!-- It's not cancelable. Once this fires, the
+  control is checked, end of story. -->.</p>
+
+  <p>If the element is not <i title=3Dconcept-fe-mutable>&lt=
;a href=3D#concept-fe-mutable>mutable</a></i>, it has no &=
lt;a href=3D#activation-behavior>activation
+  behavior</a>.</p>
+
+  <p><strong>Constraint validation</strong>: If an ele=
ment in the <i><a href=3D#radio-button-group>radio button gro=
up</a></i> is <i title=3Dconcept-input-required><a h=
ref=3D#concept-input-required>required</a></i>, and all of=
 the <code><a href=3D#the-input-element>input</a></c=
ode> elements in the
+  <i><a href=3D#radio-button-group>radio button group</a&=
gt;</i> have a <a href=3D#concept-fe-checked title=3Dconcept-fe-=
checked>checkedness</a> that is
+  false, then the element is <a href=3D#suffering-from-being-missing&=
gt;suffering from being missing</a>.</p>
+
+  </div>
+
+  <p class=3Dnote>If none of the radio buttons in a <a href=3D#=
radio-button-group>radio button group</a> are checked when
+  they are inserted into the document, then they will all be initially u=
nchecked in the interface,
+  until such time as one of them is checked (either by the user or by sc=
ript).</p>
+
+  <div class=3Dbookkeeping>
+
+   <p>The following common <code><a href=3D#the-input-ele=
ment>input</a></code> element content attributes and IDL a=
ttributes <a href=3D#concept-input-apply title=3Dconcept-input-apply&g=
t;apply</a> to the element:
+   <code title=3Dattr-input-checked><a href=3D#attr-input-check=
ed>checked</a></code> and
+   <code title=3Dattr-input-required><a href=3D#attr-input-requ=
ired>required</a></code> content attributes;
+   <code title=3Ddom-input-checked><a href=3D#dom-input-checked=
>checked</a></code> and
+   <code title=3Ddom-input-value><a href=3D#dom-input-value>=
value</a></code> IDL attributes.</p>
+
+   <p>The <code title=3Ddom-input-value><a href=3D#dom-in=
put-value>value</a></code> IDL attribute is in mode <a =
href=3D#dom-input-value-default-on title=3Ddom-input-value-default-on>=
default/on</a>.</p>
+
+   <p>The <code title=3Devent-input-change><a href=3D#eve=
nt-input-change>change</a></code> event <a href=3D#conc=
ept-input-apply title=3Dconcept-input-apply>applies</a>.</p&g=
t;
+
+   <p>The following content attributes must not be specified and &=
lt;a href=3D#do-not-apply>do not apply</a> to the
+   element:
+   <code class=3Dno-backref title=3Dattr-input-accept><a href=3D=
#attr-input-accept>accept</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-alt><a href=3D#a=
ttr-input-alt>alt</a></code>,
+   <code class=3Dno-backref title=3Dattr-fe-autocomplete><a hre=
f=3D#attr-fe-autocomplete>autocomplete</a></code>,
+   <code class=3Dno-backref title=3Dattr-fe-dirname><a href=3D#=
attr-fe-dirname>dirname</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formaction><a href=3D=
#attr-fs-formaction>formaction</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formenctype><a href=
=3D#attr-fs-formenctype>formenctype</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formmethod><a href=3D=
#attr-fs-formmethod>formmethod</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formnovalidate><a h=
ref=3D#attr-fs-formnovalidate>formnovalidate</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formtarget><a href=3D=
#attr-fs-formtarget>formtarget</a></code>,
+   <code class=3Dno-backref title=3Dattr-dim-height><a href=3D#=
attr-dim-height>height</a></code>,
+   <code class=3Dno-backref title=3Dattr-fe-inputmode><a href=3D=
#attr-fe-inputmode>inputmode</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-list><a href=3D#=
attr-input-list>list</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-max><a href=3D#a=
ttr-input-max>max</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-maxlength><a hre=
f=3D#attr-input-maxlength>maxlength</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-min><a href=3D#a=
ttr-input-min>min</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-minlength><a hre=
f=3D#attr-input-minlength>minlength</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-multiple><a href=
=3D#attr-input-multiple>multiple</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-pattern><a href=3D=
#attr-input-pattern>pattern</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-placeholder><a h=
ref=3D#attr-input-placeholder>placeholder</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-readonly><a href=
=3D#attr-input-readonly>readonly</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-size><a href=3D#=
attr-input-size>size</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-src><a href=3D#a=
ttr-input-src>src</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-step><a href=3D#=
attr-input-step>step</a></code>, and
+   <code class=3Dno-backref title=3Dattr-dim-width><a href=3D#a=
ttr-dim-width>width</a></code>.</p>
+
+   <p>The following IDL attributes and methods <a href=3D#do-no=
t-apply>do not apply</a> to the element:
+   <code class=3Dno-backref title=3Ddom-input-files><a href=3D#=
dom-input-files>files</a></code>,
+   <code class=3Dno-backref title=3Ddom-input-list><a href=3D#d=
om-input-list>list</a></code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-selectionStart=
><a href=3D#dom-textarea/input-selectionstart>selectionStart<=
/a></code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-selectionEnd&g=
t;<a href=3D#dom-textarea/input-selectionend>selectionEnd</a>=
</code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-selectionDirec=
tion><a href=3D#dom-textarea/input-selectiondirection>selectionD=
irection</a></code>,
+   <code class=3Dno-backref title=3Ddom-input-valueAsDate><a hr=
ef=3D#dom-input-valueasdate>valueAsDate</a></code>, and
+   <code class=3Dno-backref title=3Ddom-input-valueAsNumber><a =
href=3D#dom-input-valueasnumber>valueAsNumber</a></code> I=
DL attributes;
+   <code class=3Dno-backref title=3Ddom-textarea/input-select><=
a href=3D#dom-textarea/input-select>select()</a></code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-setRangeText&g=
t;<a href=3D#dom-textarea/input-setrangetext>setRangeText()</a&g=
t;</code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-setSelectionRa=
nge><a href=3D#dom-textarea/input-setselectionrange>setSelection=
Range()</a></code>,
+   <code class=3Dno-backref title=3Ddom-input-stepDown><a href=3D=
#dom-input-stepdown>stepDown()</a></code>, and
+   <code class=3Dno-backref title=3Ddom-input-stepUp><a href=3D=
#dom-input-stepup>stepUp()</a></code> methods.</p>
+
+   <p>The <code class=3Dno-backref title=3Devent-input-input&gt=
;<a href=3D#event-input-input>input</a></code> event &l=
t;a href=3D#do-not-apply title=3D"do not
+   apply">does not apply</a>.</p>
+
+  </div>
+
+
+
+  <h6 id=3D"file-upload-state-(type=3Dfile)"><span cl=
ass=3Dsecno>4.10.5.1.18 </span><dfn title=3Dattr-input-type-f=
ile>File Upload</dfn> state (<code title=3D"">ty=
pe=3Dfile</code>)</h6>
+
+  <!-- v2 ideas:
+   * maximum height/width or required ratio for image uploads? - Leons P=
etrazickis
+   * maximum per-file upload size - Alfonso Martínez de Lizar=
rondo
+  -->
+
+  <div class=3Dimpl>
+
+  <p>When an <code><a href=3D#the-input-element>input&=
lt;/a></code> element's <code title=3Dattr-input-type><=
a href=3D#attr-input-type>type</a></code> attribute is in
+  the <a href=3D"#file-upload-state-(type=3Dfile)" title=3D=
attr-input-type-file>File Upload</a> state, the rules in this se=
ction
+  apply.</p>
+
+  </div>
+
+  <p>The <code><a href=3D#the-input-element>input</=
a></code> element <a href=3D#represents>represents</a&g=
t; a list of <dfn id=3Dconcept-input-type-file-selected title=3Dconcep=
t-input-type-file-selected>selected files</dfn>, each file consi=
sting of a file
+  name, a file type, and a file body (the contents of the file).</p&g=
t;
+
+  <div class=3Dimpl>
+
+  <p>File names must not contain path components, even in the case=
 that a user has selected an
+  entire directory hierarchy or multiple files with the same name from d=
ifferent directories. Path
+  components are those separated by U+005C REVERSE SOLIDUS character (\)=
 characters.</p>
+
+  <p>If the element is <i title=3Dconcept-fe-mutable><a h=
ref=3D#concept-fe-mutable>mutable</a></i>, the user agent =
should allow the
+  user to change the files on the list, e.g. adding or removing files. F=
iles can be from the
+  filesystem or created on the fly, e.g. a picture taken from a camera c=
onnected to the user's
+  device.</p>
+
+  <p>If the element is <i title=3Dconcept-fe-mutable><a h=
ref=3D#concept-fe-mutable>mutable</a></i>, then the elemen=
t's
+  <a href=3D#activation-behavior>activation behavior</a> is =
as follows: if the algorithm is <a href=3D#allowed-to-show-a-popup>=
allowed to show a
+  popup</a>, then asynchronously display prompt to the user reques=
ting that the user specify the
+  <a href=3D#concept-input-type-file-selected title=3Dconcept-input-t=
ype-file-selected>selected files</a>; otherwise, do nothing.<=
/p>
+
+  <p>If the element is not <i title=3Dconcept-fe-mutable>&lt=
;a href=3D#concept-fe-mutable>mutable</a></i>, it has no &=
lt;a href=3D#activation-behavior>activation
+  behavior</a>.</p>
+
+  <p><strong>Constraint validation</strong>: If the el=
ement is <i title=3Dconcept-input-required><a href=3D#concept-in=
put-required>required</a></i> and the list of <a href=3D=
#concept-input-type-file-selected title=3Dconcept-input-type-file-selecte=
d>selected files</a> is empty, then the element is
+  <a href=3D#suffering-from-being-missing>suffering from being mis=
sing</a>.</p>
+
+  <p>Unless the <code title=3Dattr-input-multiple><a href=
=3D#attr-input-multiple>multiple</a></code> attribute is s=
et, there must be no
+  more than one file in the list of <a href=3D#concept-input-type-fil=
e-selected title=3Dconcept-input-type-file-selected>selected
+  files</a>.</p>
+
+  </div>
+
+  <hr><p>The <dfn id=3Dattr-input-accept title=3Dattr-inp=
ut-accept><code>accept</code></dfn> attribute may be=
 specified to
+  provide user agents with a hint of what file types will be accepted.&l=
t;/p>
+
+  <p>If specified, the attribute must consist of a <a href=3D#s=
et-of-comma-separated-tokens>set of comma-separated tokens</a>, =
each
+  of which must be an <a href=3D#ascii-case-insensitive>ASCII case=
-insensitive</a> match for one of the following:</p>
+
+  <dl><dt>The string <code title=3D"">audio/=
*</code></dt>
+
+   <dd>Indicates that sound files are accepted.</dd>
+
+   <dt>The string <code title=3D"">video/*</cod=
e></dt>
+
+   <dd>Indicates that video files are accepted.</dd>
+
+   <dt>The string <code title=3D"">image/*</cod=
e></dt>
+
+   <dd>Indicates that image files are accepted.</dd>
+
+   <dt>A <a href=3D#valid-mime-type-with-no-parameters>valid=
 MIME type with no parameters</a></dt>
+
+   <dd>Indicates that files of the specified type are accepted.&lt=
;/dd>
+
+   <dt>A string whose first character is a U+002E FULL STOP charac=
ter (.)</dt>
+
+   <dd>Indicates that files with the specified file extension are =
accepted.</dd>
+
+  </dl><p>The tokens must not be <a href=3D#ascii-case-in=
sensitive>ASCII case-insensitive</a> matches for any of the othe=
r tokens
+  (i.e. duplicates are not allowed). <span class=3Dimpl>To obtain =
the list of tokens from the
+  attribute, the user agent must <a href=3D#split-a-string-on-commas =
title=3D"split a string on commas">split the attribute value=
 on
+  commas</a>.</span></p>
+
+  <p>User agents may use the value of this attribute to display a =
more appropriate user interface
+  than a generic file picker. For instance, given the value <code tit=
le=3D"">image/*</code>, a user
+  agent could offer the user the option of using a local camera or selec=
ting a photograph from their
+  photo collection; given the value <code title=3D"">aud=
io/*</code>, a user agent could offer the user
+  the option of recording a clip using a headset microphone.</p>
+
+  <div class=3Dimpl>
+
+  <p>User agents should prevent the user from selecting files that=
 are not accepted by one (or more)
+  of these tokens.</p>
+
+  </div>
+
+  <p class=3Dnote>Authors are encouraged to specify both any MIME =
types and any corresponding
+  extensions when looking for data in a specific format.</p>
+
+  <div class=3Dexample>
+
+   <p>For example, consider an application that converts Microsoft=
 Word documents to Open Document
+   Format files. Since Microsoft Word documents are described with a wid=
e variety of MIME types and
+   extensions, the site can list several, as follows:</p>
+
+   <pre><input type=3D"file" accept=3D".doc,=
.docx,.xml,application/msword,application/vnd.openxmlformats-officedocume=
nt.wordprocessingml.document"></pre>
+
+   <p>On platforms that only use file extensions to describe file =
types, the extensions listed here
+   can be used to filter the allowed documents, while the MIME types can=
 be used with the system's
+   type registration table (mapping MIME types to extensions used by the=
 system), if any, to
+   determine any other extensions to allow. Similarly, on a system that =
does not have file names or
+   extensions but labels documents with MIME types internally, the MIME =
types can be used to pick
+   the allowed files, while the extensions can be used if the system has=
 an extension registration
+   table that maps known extensions to MIME types used by the system.&lt=
;/p>
+
+  </div>
+
+  <p class=3Dwarning>Extensions tend to be ambiguous (e.g. there a=
re an untold number of formats
+  that use the "<code title=3D"">.dat</code>&=
quot; extension, and users can typically quite easily rename
+  their files to have a "<code title=3D"">.doc</=
code>" extension even if they are not Microsoft Word
+  documents), and MIME types tend to be unreliable (e.g. many formats ha=
ve no formally registered
+  types, and many formats are in practice labeled using a number of diff=
erent MIME types). Authors
+  are reminded that, as usual, data received from a client should be tre=
ated with caution, as it may
+  not be in an expected format even if the user is not hostile and the u=
ser agent fully obeyed the
+  <code title=3Dattr-input-accept><a href=3D#attr-input-accept&=
gt;accept</a></code> attribute's requirements.</p>
+
+  <div class=3Dexample id=3Dfakepath-srsly>
+
+   <p>For historical reasons, the <code title=3Ddom-input-value=
><a href=3D#dom-input-value>value</a></code> IDL att=
ribute prefixes
+   the file name with the string "<code title=3D"">=
C:\fakepath\</code>". Some legacy user agents
+   actually included the full path (which was a security vulnerability).=
 As a result of this,
+   obtaining the file name from the <code title=3Ddom-input-value>=
<a href=3D#dom-input-value>value</a></code> IDL attribu=
te in a
+   backwards-compatible way is non-trivial. The following function extra=
cts the file name in a
+   suitably compatible manner:</p>
+
+   <pre>function extractFilename(path) {
+  if (path.substr(0, 12) =3D=3D "C:\\fakepath\\")
+    return path.substr(12); // modern browser
+  var x;
+  x =3D path.lastIndexOf('/');
+  if (x >=3D 0) // Unix-based path
+    return path.substr(x+1);
+  x =3D path.lastIndexOf('\\');
+  if (x >=3D 0) // Windows-based path
+    return path.substr(x+1);
+  return path; // just the file name
+}</pre>
+
+   <p>This can be used as follows:</p>
+
+   <pre><p><input type=3Dfile name=3Dimage on=
change=3D"updateFilename(this.value)"></p>
+<p>The name of the file you picked is: <span id=3D&=
quot;filename">(none)</span></p>
+<script>
+ function updateFilename(path) {
+   var name =3D extractFilename(path);
+   document.getElementById('filename').textContent =3D name;
+ }
+</script></pre>
+
+   <!-- How useful this actually is... is unclear. -->
+
+  </div>
+
+  <hr><div class=3Dbookkeeping>
+
+   <p>The following common <code><a href=3D#the-input-ele=
ment>input</a></code> element content attributes and IDL a=
ttributes <a href=3D#concept-input-apply title=3Dconcept-input-apply&g=
t;apply</a> to the element:
+   <code title=3Dattr-input-accept><a href=3D#attr-input-accept=
>accept</a></code>,
+   <code title=3Dattr-input-multiple><a href=3D#attr-input-mult=
iple>multiple</a></code>, and
+   <code title=3Dattr-input-required><a href=3D#attr-input-requ=
ired>required</a></code> content attributes;
+   <code title=3Ddom-input-files><a href=3D#dom-input-files>=
files</a></code> and
+   <code title=3Ddom-input-value><a href=3D#dom-input-value>=
value</a></code> IDL attributes.</p>
+
+   <p>The <code title=3Ddom-input-value><a href=3D#dom-in=
put-value>value</a></code> IDL attribute is in mode <a =
href=3D#dom-input-value-filename title=3Ddom-input-value-filename>file=
name</a>.</p>
+
+   <p>The <code title=3Devent-input-change><a href=3D#eve=
nt-input-change>change</a></code> event <a href=3D#conc=
ept-input-apply title=3Dconcept-input-apply>applies</a>.</p&g=
t;
+
+   <p>The following content attributes must not be specified and &=
lt;a href=3D#do-not-apply>do not apply</a> to the
+   element:
+   <code class=3Dno-backref title=3Dattr-input-alt><a href=3D#a=
ttr-input-alt>alt</a></code>,
+   <code class=3Dno-backref title=3Dattr-fe-autocomplete><a hre=
f=3D#attr-fe-autocomplete>autocomplete</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-checked><a href=3D=
#attr-input-checked>checked</a></code>,
+   <code class=3Dno-backref title=3Dattr-fe-dirname><a href=3D#=
attr-fe-dirname>dirname</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formaction><a href=3D=
#attr-fs-formaction>formaction</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formenctype><a href=
=3D#attr-fs-formenctype>formenctype</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formmethod><a href=3D=
#attr-fs-formmethod>formmethod</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formnovalidate><a h=
ref=3D#attr-fs-formnovalidate>formnovalidate</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formtarget><a href=3D=
#attr-fs-formtarget>formtarget</a></code>,
+   <code class=3Dno-backref title=3Dattr-dim-height><a href=3D#=
attr-dim-height>height</a></code>,
+   <code class=3Dno-backref title=3Dattr-fe-inputmode><a href=3D=
#attr-fe-inputmode>inputmode</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-list><a href=3D#=
attr-input-list>list</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-max><a href=3D#a=
ttr-input-max>max</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-maxlength><a hre=
f=3D#attr-input-maxlength>maxlength</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-min><a href=3D#a=
ttr-input-min>min</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-minlength><a hre=
f=3D#attr-input-minlength>minlength</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-pattern><a href=3D=
#attr-input-pattern>pattern</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-placeholder><a h=
ref=3D#attr-input-placeholder>placeholder</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-readonly><a href=
=3D#attr-input-readonly>readonly</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-size><a href=3D#=
attr-input-size>size</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-src><a href=3D#a=
ttr-input-src>src</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-step><a href=3D#=
attr-input-step>step</a></code>, and
+   <code class=3Dno-backref title=3Dattr-dim-width><a href=3D#a=
ttr-dim-width>width</a></code>.</p>
+
+   <p>The element's <code title=3Dattr-input-value><a hre=
f=3D#attr-input-value>value</a></code> attribute must be o=
mitted.</p>
+
+   <p>The following IDL attributes and methods <a href=3D#do-no=
t-apply>do not apply</a> to the element:
+   <code class=3Dno-backref title=3Ddom-input-checked><a href=3D=
#dom-input-checked>checked</a></code>,
+   <code class=3Dno-backref title=3Ddom-input-list><a href=3D#d=
om-input-list>list</a></code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-selectionStart=
><a href=3D#dom-textarea/input-selectionstart>selectionStart<=
/a></code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-selectionEnd&g=
t;<a href=3D#dom-textarea/input-selectionend>selectionEnd</a>=
</code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-selectionDirec=
tion><a href=3D#dom-textarea/input-selectiondirection>selectionD=
irection</a></code>,
+   <code class=3Dno-backref title=3Ddom-input-valueAsDate><a hr=
ef=3D#dom-input-valueasdate>valueAsDate</a></code>, and
+   <code class=3Dno-backref title=3Ddom-input-valueAsNumber><a =
href=3D#dom-input-valueasnumber>valueAsNumber</a></code> I=
DL attributes;
+   <code class=3Dno-backref title=3Ddom-textarea/input-select><=
a href=3D#dom-textarea/input-select>select()</a></code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-setRangeText&g=
t;<a href=3D#dom-textarea/input-setrangetext>setRangeText()</a&g=
t;</code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-setSelectionRa=
nge><a href=3D#dom-textarea/input-setselectionrange>setSelection=
Range()</a></code>,
+   <code class=3Dno-backref title=3Ddom-input-stepDown><a href=3D=
#dom-input-stepdown>stepDown()</a></code>, and
+   <code class=3Dno-backref title=3Ddom-input-stepUp><a href=3D=
#dom-input-stepup>stepUp()</a></code> methods.</p>
+
+   <p>The <code class=3Dno-backref title=3Devent-input-input&gt=
;<a href=3D#event-input-input>input</a></code> event &l=
t;a href=3D#do-not-apply title=3D"do not
+   apply">does not apply</a>.</p>
+
+  </div>
+
+
+
+  <h6 id=3D"submit-button-state-(type=3Dsubmit)"><spa=
n class=3Dsecno>4.10.5.1.19 </span><dfn title=3Dattr-input-ty=
pe-submit>Submit Button</dfn> state (<code title=3D"&quo=
t;>type=3Dsubmit</code>)</h6>
+
+  <div class=3Dimpl>
+
+  <p>When an <code><a href=3D#the-input-element>input&=
lt;/a></code> element's <code title=3Dattr-input-type><=
a href=3D#attr-input-type>type</a></code> attribute is in
+  the <a href=3D"#submit-button-state-(type=3Dsubmit)" titl=
e=3Dattr-input-type-submit>Submit Button</a> state, the rules in=
 this section
+  apply.</p>
+
+  </div>
+
+  <p>The <code><a href=3D#the-input-element>input</=
a></code> element <a href=3D#represents>represents</a&g=
t; a button that, when activated, submits
+  the form. <span class=3Dimpl>If the element has a <code title=
=3Dattr-input-value><a href=3D#attr-input-value>value</a>&=
lt;/code>
+  attribute, the button's label must be the value of that attribute; oth=
erwise, it must be an
+  implementation-defined string that means "Submit" or some su=
ch.</span> The element is a <a href=3D#concept-button title=3Dco=
ncept-button>button</a>, specifically a <a href=3D#concept-su=
bmit-button title=3Dconcept-submit-button>submit
+  button</a>.
+  <a href=3D#fingerprinting-vector class=3Dfingerprint title=3D"=
fingerprinting vector"><img src=3Dhttp://images.whatwg.org/fin=
gerprint.png width=3D46 alt=3D"(This is a fingerprinting vector.)&qu=
ot; height=3D64></a>
+  </p>
+
+  <div class=3Dimpl>
+
+  <p>If the element is <i title=3Dconcept-fe-mutable><a h=
ref=3D#concept-fe-mutable>mutable</a></i>, then the elemen=
t's
+  <a href=3D#activation-behavior>activation behavior</a> is =
as follows: if the element has a <a href=3D#form-owner>form owner&l=
t;/a>,
+  and the element's <code><a href=3D#document>Document</a=
></code> is <a href=3D#fully-active>fully active</a>=
,
+  <a href=3D#concept-form-submit title=3Dconcept-form-submit>submi=
t</a> the <a href=3D#form-owner>form owner</a> from the
+  <code><a href=3D#the-input-element>input</a></cod=
e> element; otherwise, do nothing.</p>
+
+  <p>If the element is not <i title=3Dconcept-fe-mutable>&lt=
;a href=3D#concept-fe-mutable>mutable</a></i>, it has no &=
lt;a href=3D#activation-behavior>activation
+  behavior</a>.</p>
+
+  </div>
+
+  <p>The <code title=3Dattr-fs-formaction><a href=3D#attr=
-fs-formaction>formaction</a></code>, <code title=3Datt=
r-fs-formenctype><a href=3D#attr-fs-formenctype>formenctype</=
a></code>, <code title=3Dattr-fs-formmethod><a href=3D#=
attr-fs-formmethod>formmethod</a></code>, <code title=3D=
attr-fs-formnovalidate><a href=3D#attr-fs-formnovalidate>formnov=
alidate</a></code>, and <code title=3Dattr-fs-formtarget&g=
t;<a href=3D#attr-fs-formtarget>formtarget</a></code> a=
ttributes are <a href=3D#attributes-for-form-submission>attributes =
for form
+  submission</a>.</p>
+
+  <p class=3Dnote>The <code title=3Dattr-fs-formnovalidate>&=
lt;a href=3D#attr-fs-formnovalidate>formnovalidate</a></code&=
gt; attribute can be
+  used to make submit buttons that do not trigger the constraint validat=
ion.</p>
+
+  <div class=3Dbookkeeping>
+
+   <p>The following common <code><a href=3D#the-input-ele=
ment>input</a></code> element content attributes and IDL a=
ttributes <a href=3D#concept-input-apply title=3Dconcept-input-apply&g=
t;apply</a> to the element:
+   <code title=3Dattr-fs-formaction><a href=3D#attr-fs-formacti=
on>formaction</a></code>,
+   <code title=3Dattr-fs-formenctype><a href=3D#attr-fs-formenc=
type>formenctype</a></code>,
+   <code title=3Dattr-fs-formmethod><a href=3D#attr-fs-formmeth=
od>formmethod</a></code>,
+   <code title=3Dattr-fs-formnovalidate><a href=3D#attr-fs-form=
novalidate>formnovalidate</a></code>, and
+   <code title=3Dattr-fs-formtarget><a href=3D#attr-fs-formtarg=
et>formtarget</a></code> content attributes;
+   <code title=3Ddom-input-value><a href=3D#dom-input-value>=
value</a></code> IDL attribute.</p>
+
+   <p>The <code title=3Ddom-input-value><a href=3D#dom-in=
put-value>value</a></code> IDL attribute is in mode <a =
href=3D#dom-input-value-default title=3Ddom-input-value-default>defaul=
t</a>.</p>
+
+   <p>The following content attributes must not be specified and &=
lt;a href=3D#do-not-apply>do not apply</a> to the
+   element:
+   <code class=3Dno-backref title=3Dattr-input-accept><a href=3D=
#attr-input-accept>accept</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-alt><a href=3D#a=
ttr-input-alt>alt</a></code>,
+   <code class=3Dno-backref title=3Dattr-fe-autocomplete><a hre=
f=3D#attr-fe-autocomplete>autocomplete</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-checked><a href=3D=
#attr-input-checked>checked</a></code>,
+   <code class=3Dno-backref title=3Dattr-fe-dirname><a href=3D#=
attr-fe-dirname>dirname</a></code>,
+   <code class=3Dno-backref title=3Dattr-dim-height><a href=3D#=
attr-dim-height>height</a></code>,
+   <code class=3Dno-backref title=3Dattr-fe-inputmode><a href=3D=
#attr-fe-inputmode>inputmode</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-list><a href=3D#=
attr-input-list>list</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-max><a href=3D#a=
ttr-input-max>max</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-maxlength><a hre=
f=3D#attr-input-maxlength>maxlength</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-min><a href=3D#a=
ttr-input-min>min</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-minlength><a hre=
f=3D#attr-input-minlength>minlength</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-multiple><a href=
=3D#attr-input-multiple>multiple</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-pattern><a href=3D=
#attr-input-pattern>pattern</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-placeholder><a h=
ref=3D#attr-input-placeholder>placeholder</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-readonly><a href=
=3D#attr-input-readonly>readonly</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-required><a href=
=3D#attr-input-required>required</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-size><a href=3D#=
attr-input-size>size</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-src><a href=3D#a=
ttr-input-src>src</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-step><a href=3D#=
attr-input-step>step</a></code>, and
+   <code class=3Dno-backref title=3Dattr-dim-width><a href=3D#a=
ttr-dim-width>width</a></code>.</p>
+
+   <p>The following IDL attributes and methods <a href=3D#do-no=
t-apply>do not apply</a> to the element:
+   <code class=3Dno-backref title=3Ddom-input-checked><a href=3D=
#dom-input-checked>checked</a></code>,
+   <code class=3Dno-backref title=3Ddom-input-files><a href=3D#=
dom-input-files>files</a></code>,
+   <code class=3Dno-backref title=3Ddom-input-list><a href=3D#d=
om-input-list>list</a></code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-selectionStart=
><a href=3D#dom-textarea/input-selectionstart>selectionStart<=
/a></code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-selectionEnd&g=
t;<a href=3D#dom-textarea/input-selectionend>selectionEnd</a>=
</code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-selectionDirec=
tion><a href=3D#dom-textarea/input-selectiondirection>selectionD=
irection</a></code>,
+   <code class=3Dno-backref title=3Ddom-input-valueAsDate><a hr=
ef=3D#dom-input-valueasdate>valueAsDate</a></code>, and
+   <code class=3Dno-backref title=3Ddom-input-valueAsNumber><a =
href=3D#dom-input-valueasnumber>valueAsNumber</a></code> I=
DL attributes;
+   <code class=3Dno-backref title=3Ddom-textarea/input-select><=
a href=3D#dom-textarea/input-select>select()</a></code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-setRangeText&g=
t;<a href=3D#dom-textarea/input-setrangetext>setRangeText()</a&g=
t;</code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-setSelectionRa=
nge><a href=3D#dom-textarea/input-setselectionrange>setSelection=
Range()</a></code>,
+   <code class=3Dno-backref title=3Ddom-input-stepDown><a href=3D=
#dom-input-stepdown>stepDown()</a></code>, and
+   <code class=3Dno-backref title=3Ddom-input-stepUp><a href=3D=
#dom-input-stepup>stepUp()</a></code> methods.</p>
+
+   <p>The <code class=3Dno-backref title=3Devent-input-input&gt=
;<a href=3D#event-input-input>input</a></code> and <=
code class=3Dno-backref title=3Devent-input-change><a href=3D#event=
-input-change>change</a></code> events <a href=3D#do-no=
t-apply>do not apply</a>.</p>
+
+  </div>
+
+
+  <h6 id=3D"image-button-state-(type=3Dimage)"><span =
class=3Dsecno>4.10.5.1.20 </span><dfn title=3Dattr-input-type=
-image>Image Button</dfn> state (<code title=3D""&g=
t;type=3Dimage</code>)</h6>
+
+  <div class=3Dimpl>
+
+  <p>When an <code><a href=3D#the-input-element>input&=
lt;/a></code> element's <code title=3Dattr-input-type><=
a href=3D#attr-input-type>type</a></code> attribute is in
+  the <a href=3D"#image-button-state-(type=3Dimage)" title=3D=
attr-input-type-image>Image Button</a> state, the rules in this =
section
+  apply.</p>
+
+  </div>
+
+  <p>The <code><a href=3D#the-input-element>input</=
a></code> element <a href=3D#represents>represents</a&g=
t; either an image from which a user can
+  select a coordinate and submit the form, or alternatively a button fro=
m which the user can submit
+  the form. The element is a <a href=3D#concept-button title=3Dconcep=
t-button>button</a>, specifically a <a href=3D#concept-submit=
-button title=3Dconcept-submit-button>submit button</a>.</p&g=
t;
+
+  <p class=3Dnote>The coordinate is sent to the server <a href=3D=
#constructing-the-form-data-set title=3D"constructing the form data
+  set">during form submission</a> by sending two entries f=
or the element, derived from the name
+  of the control but with "<code title=3D"">.x</=
code>" and "<code title=3D"">.y</code>=
" appended to the
+  name with the <var title=3D"">x</var> and <va=
r title=3D"">y</var> components of the coordinate
+  respectively.</p>
+
+  <hr><p>The image is given by the <dfn id=3Dattr-input-s=
rc title=3Dattr-input-src><code>src</code></dfn> att=
ribute. The
+  <code title=3Dattr-input-src><a href=3D#attr-input-src>src=
</a></code> attribute must be present, and must contain a &lt=
;a href=3D#valid-non-empty-url-potentially-surrounded-by-spaces>valid
+  non-empty URL potentially surrounded by spaces</a> referencing a=
 non-interactive, optionally
+  animated, image resource that is neither paged nor scripted.</p>
+
+  <div class=3Dimpl>
+
+  <p>When any of the following events occur, unless the user agent=
 cannot support images, or its
+  support for images has been disabled, or the user agent only fetches e=
lements on demand, or the
+  <code title=3Dattr-input-src><a href=3D#attr-input-src>src=
</a></code> attribute's value is the empty string, the user a=
gent must
+  <a href=3D#resolve-a-url title=3D"resolve a url">resol=
ve</a> the value of the <code title=3Dattr-input-src><a hr=
ef=3D#attr-input-src>src</a></code> attribute, relative to=
 the element, and if that is successful,
+  must <a href=3D#fetch>fetch</a><!--FETCH--> the resu=
lting <a href=3D#absolute-url>absolute URL</a>:</p> &lt=
;!-- Note how
+  this does NOT happen when the base URL changes. --> <!-- http-or=
igin privacy sensitive -->
+
+  <ul><li>The <code><a href=3D#the-input-element&gt=
;input</a></code> element's <code title=3Dattr-input-type&=
gt;<a href=3D#attr-input-type>type</a></code> attribute=
 is first
+   set to the <a href=3D"#image-button-state-(type=3Dimage)&quot=
; title=3Dattr-input-type-image>Image Button</a> state (possibly=
 when the
+   element is first created), and the <code title=3Dattr-input-src&gt=
;<a href=3D#attr-input-src>src</a></code> attribute is
+   present.</li>
+
+   <li>The <code><a href=3D#the-input-element>input&lt=
;/a></code> element's <code title=3Dattr-input-type><a =
href=3D#attr-input-type>type</a></code> attribute is
+   changed back to the <a href=3D"#image-button-state-(type=3Dim=
age)" title=3Dattr-input-type-image>Image Button</a> state,=
 and the <code title=3Dattr-input-src><a href=3D#attr-input-src&=
gt;src</a></code> attribute is present, and its value has cha=
nged since the last
+   time the <code title=3Dattr-input-type><a href=3D#attr-input=
-type>type</a></code> attribute was in the <a href=3D&q=
uot;#image-button-state-(type=3Dimage)" title=3Dattr-input-type-imag=
e>Image Button</a> state.</li>
+
+   <li>The <code><a href=3D#the-input-element>input&lt=
;/a></code> element's <code title=3Dattr-input-type><a =
href=3D#attr-input-type>type</a></code> attribute is in
+   the <a href=3D"#image-button-state-(type=3Dimage)" title=
=3Dattr-input-type-image>Image Button</a> state, and the <cod=
e title=3Dattr-input-src><a href=3D#attr-input-src>src</a>=
</code> attribute is set or changed.</li>
+
+  </ul><!-- same text in <img> section and similar text e=
lsewhere --><p>Fetching the image must <a href=3D#delay-the-l=
oad-event>delay the load event</a> of the element's document unt=
il the
+  <a href=3D#concept-task title=3Dconcept-task>task</a> that=
 is <a href=3D#queue-a-task title=3D"queue a task">queued=
</a> by the
+  <a href=3D#networking-task-source>networking task source</a&g=
t; once the resource has been <a href=3D#fetch title=3Dfetch>fetche=
d</a>
+  (defined below) has been run.</p>
+
+  <p>If the image was successfully obtained, with no network error=
s, and the image's type is a
+  supported image type, and the image is a valid image of that type, the=
n the image is said to be
+  <dfn id=3Dinput-img-available title=3Dinput-img-available><i&=
gt;available</i></dfn>. If this is true before the image is
+  completely downloaded, each <a href=3D#concept-task title=3Dconcept=
-task>task</a> that is <a href=3D#queue-a-task title=3D"=
queue a
+  task">queued</a> by the <a href=3D#networking-task-so=
urce>networking task source</a> while the image is being <a h=
ref=3D#fetch title=3Dfetch>fetched</a> must update the presentat=
ion of the image appropriately.</p>
+
+  <p>The user agent should apply the <a href=3D#content-type-sn=
iffing:-image title=3D"Content-Type sniffing: image">image s=
niffing
+  rules</a> to determine the type of the image, with the image's &=
lt;a href=3D#content-type title=3DContent-Type>associated Content-Type=
 headers</a> giving the <var title=3D"">official
+  type</var>. If these rules are not applied, then the type of the=
 image must be the type given by
+  the image's <a href=3D#content-type title=3DContent-Type>associa=
ted Content-Type headers</a>.</p>
+
+  <p>User agents must not support non-image resources with the &lt=
;code><a href=3D#the-input-element>input</a></code> =
element. User
+  agents must not run executable code embedded in the image resource. Us=
er agents must only display
+  the first page of a multipage resource. User agents must not allow the=
 resource to act in an
+  interactive fashion, but should honor any animation in the resource.&l=
t;/p>
+
+  <p>The <a href=3D#concept-task title=3Dconcept-task>task&l=
t;/a> that is <a href=3D#queue-a-task title=3D"queue a task&qu=
ot;>queued</a> by
+  the <a href=3D#networking-task-source>networking task source<=
/a> once the resource has been <a href=3D#fetch title=3Dfetch>fe=
tched</a>, must, if the download was successful and the image is &l=
t;i title=3Dinput-img-available><a href=3D#input-img-available>a=
vailable</a></i>, <a href=3D#queue-a-task>queue a task&=
lt;/a> to <a href=3D#fire-a-simple-event>fire a simple
+  event</a> named <code title=3Devent-load>load</code>=
 at the <code><a href=3D#the-input-element>input</a>&lt=
;/code> element; and
+  otherwise, if the fetching process fails without a response from the r=
emote server, or completes
+  but the image is not a valid or supported image, <a href=3D#queue-a=
-task>queue a task</a> to <a href=3D#fire-a-simple-event>f=
ire a simple
+  event</a> named <code title=3Devent-error>error</code&g=
t; on the <code><a href=3D#the-input-element>input</a>&=
lt;/code> element.</p>
+
+  <hr></div>
+
+  <p>The <dfn id=3Dattr-input-alt title=3Dattr-input-alt>&lt=
;code>alt</code></dfn> attribute provides the textual labe=
l for
+  the button for users and user agents who cannot use the image. The &lt=
;code title=3Dattr-input-alt><a href=3D#attr-input-alt>alt</a=
></code> attribute must be present, and must contain a non-empty=
 string
+  giving the label that would be appropriate for an equivalent button if=
 the image was
+  unavailable.</p>
+
+  <p>The <code><a href=3D#the-input-element>input</=
a></code> element supports <a href=3D#dimension-attributes&gt=
;dimension attributes</a>.</p>
+
+  <div class=3Dimpl>
+
+  <hr><p>If the <code title=3Dattr-input-src><a hre=
f=3D#attr-input-src>src</a></code> attribute is set, and t=
he image is <i title=3Dinput-img-available><a href=3D#input-img-=
available>available</a></i> and the user agent is configur=
ed to display that image,
+  then: The element <a href=3D#represents>represents</a> a c=
ontrol for selecting a <a href=3D#concept-input-type-image-coordinate =
title=3Dconcept-input-type-image-coordinate>coordinate</a> from =
the image specified by the
+  <code title=3Dattr-input-src><a href=3D#attr-input-src>src=
</a></code> attribute; if the element is <i title=3Dconcep=
t-fe-mutable><a href=3D#concept-fe-mutable>mutable</a><=
/i>, the user agent should allow the user to select this <a href=3D=
#concept-input-type-image-coordinate title=3Dconcept-input-type-image-coo=
rdinate>coordinate</a>, and the element's <a href=3D#activati=
on-behavior>activation
+  behavior</a> is as follows: if the element has a <a href=3D#f=
orm-owner>form owner</a>, and the element's
+  <code><a href=3D#document>Document</a></code> =
is <a href=3D#fully-active>fully active</a>, take the user's =
selected <a href=3D#concept-input-type-image-coordinate title=3Dconcep=
t-input-type-image-coordinate>coordinate</a>, and <a href=3D#=
concept-form-submit title=3Dconcept-form-submit>submit</a> the &=
lt;code><a href=3D#the-input-element>input</a></code&gt=
; element's <a href=3D#form-owner>form owner</a>
+  from the <code><a href=3D#the-input-element>input</a&gt=
;</code> element. If the user activates the control without explici=
tly
+  selecting a coordinate, then the coordinate (0,0) must be assumed.<=
/p>
+
+  <p>Otherwise, the element <a href=3D#represents>represents=
</a> a submit button whose label is given by the
+  value of the <code title=3Dattr-input-alt><a href=3D#attr-inp=
ut-alt>alt</a></code> attribute; if the element is <i t=
itle=3Dconcept-fe-mutable><a href=3D#concept-fe-mutable>mutable&=
lt;/a></i>, then the element's <a href=3D#activation-behavior=
>activation behavior</a> is as
+  follows: if the element has a <a href=3D#form-owner>form owner&l=
t;/a>, and the element's <code><a href=3D#document>Documen=
t</a></code> is
+  <a href=3D#fully-active>fully active</a>, set the <a hr=
ef=3D#concept-input-type-image-coordinate title=3Dconcept-input-type-imag=
e-coordinate>selected
+  coordinate</a> to (0,0), and <a href=3D#concept-form-submit t=
itle=3Dconcept-form-submit>submit</a> the
+  <code><a href=3D#the-input-element>input</a></cod=
e> element's <a href=3D#form-owner>form owner</a> from the=
 <code><a href=3D#the-input-element>input</a></code&=
gt; element.</p>
+
+  <p>In either case, if the element is <i title=3Dconcept-fe-mu=
table><a href=3D#concept-fe-mutable>mutable</a></i> =
but has no
+  <a href=3D#form-owner>form owner</a> or the element's <=
code><a href=3D#document>Document</a></code> is not =
<a href=3D#fully-active>fully active</a>,
+  then its <a href=3D#activation-behavior>activation behavior</=
a> must be to do nothing. If the element is not <i title=3Dconcept-=
fe-mutable><a href=3D#concept-fe-mutable>mutable</a></i=
>, it has no <a href=3D#activation-behavior>activation behavior&=
lt;/a>.</p>
+
+  <p>The <dfn id=3Dconcept-input-type-image-coordinate title=3D=
concept-input-type-image-coordinate>selected coordinate</dfn> mu=
st consist of
+  an <var title=3D"">x</var>-component and a <v=
ar title=3D"">y</var>-component. The coordinates
+  represent the position relative to the edge of the image, with the coo=
rdinate space having the
+  positive <var title=3D"">x</var> direction to th=
e right, and the positive <var title=3D"">y</var>
+  direction downwards.</p>
+
+  <p>The <var title=3D"">x</var>-component m=
ust be a <a href=3D#valid-integer>valid integer</a> represent=
ing a number
+  <var title=3D"">x</var> in the range <span ti=
tle=3D"">−(<var title=3D"">border&=
lt;sub title=3D"">left</sub></var>+<var title=
=3D"">padding<sub title=3D"">left</sub&gt=
;</var>) ≤ <var title=3D"">x</var> &am=
p;le; <var title=3D"">width</var>+<var title=3D&=
quot;">border<sub title=3D"">right</sub>&lt=
;/var>+<var title=3D"">padding<sub title=3D"&q=
uot;>right</sub></var></span>, where <var title=3D=
"">width</var> is the rendered width of the image, &lt=
;var title=3D"">border<sub title=3D"">left&l=
t;/sub></var> is the width of the border on the left of the imag=
e, <var title=3D"">padding<sub title=3D""&gt=
;left</sub></var> is the width of the padding on the left of =
the
+  image, <var title=3D"">border<sub title=3D"&qu=
ot;>right</sub></var> is the width of the border on the ri=
ght
+  of the image, and <var title=3D"">padding<sub title=
=3D"">right</sub></var> is the width of the padd=
ing
+  on the right of the image, with all dimensions given in CSS pixels.&lt=
;/p>
+
+  <p>The <var title=3D"">y</var>-component m=
ust be a <a href=3D#valid-integer>valid integer</a> represent=
ing a number
+  <var title=3D"">y</var> in the range <span ti=
tle=3D"">−(<var title=3D"">border&=
lt;sub title=3D"">top</sub></var>+<var title=3D=
"">padding<sub title=3D"">top</sub>&lt=
;/var>) ≤ <var title=3D"">y</var> &le=
; <var title=3D"">height</var>+<var title=3D&quo=
t;">border<sub title=3D"">bottom</sub></=
var>+<var title=3D"">padding<sub title=3D"&quo=
t;>bottom</sub></var></span>, where
+  <var title=3D"">height</var> is the rendered hei=
ght of the image, <var title=3D"">border<sub title=3D&=
quot;">top</sub></var> is the width of the border abo=
ve the image, <var title=3D"">padding<sub title=3D&quo=
t;">top</sub></var> is the width of the padding above=
 the image, <var title=3D"">border<sub title=3D"&=
quot;>bottom</sub></var> is the width of the border below =
the image, and <var title=3D"">padding<sub title=3D&qu=
ot;">bottom</sub></var> is the width of the padding b=
elow the image, with
+  all dimensions given in CSS pixels.</p>
+
+  <p>Where a border or padding is missing, its width is zero CSS p=
ixels.</p>
+
+  <hr></div>
+
+  <p>The <code title=3Dattr-fs-formaction><a href=3D#attr=
-fs-formaction>formaction</a></code>, <code title=3Datt=
r-fs-formenctype><a href=3D#attr-fs-formenctype>formenctype</=
a></code>, <code title=3Dattr-fs-formmethod><a href=3D#=
attr-fs-formmethod>formmethod</a></code>, <code title=3D=
attr-fs-formnovalidate><a href=3D#attr-fs-formnovalidate>formnov=
alidate</a></code>, and <code title=3Dattr-fs-formtarget&g=
t;<a href=3D#attr-fs-formtarget>formtarget</a></code> a=
ttributes are <a href=3D#attributes-for-form-submission>attributes =
for form
+  submission</a>.</p>
+
+<!--TOPIC:DOM APIs-->
+  <dl class=3Ddomintro><dt><var title=3D"">i=
mage</var> . <code title=3Ddom-input-width><a href=3D#dom-=
input-width>width</a></code> [ =3D <var title=3D"&=
quot;>value</var> ]</dt>
+   <dt><var title=3D"">image</var> . <cod=
e title=3Ddom-input-height><a href=3D#dom-input-height>height&lt=
;/a></code> [ =3D <var title=3D"">value</var&=
gt; ]</dt>
+
+   <dd>
+
+    <p>These attributes return the actual rendered dimensions of t=
he image, or zero if the
+    dimensions are not known.</p>
+
+    <p>They can be set, to change the corresponding content attrib=
utes.</p>
+
+   </dd>
+
+  </dl><!--TOPIC:HTML--><div class=3Dbookkeeping>
+
+   <p>The following common <code><a href=3D#the-input-ele=
ment>input</a></code> element content attributes and IDL a=
ttributes <a href=3D#concept-input-apply title=3Dconcept-input-apply&g=
t;apply</a> to the element:
+   <code title=3Dattr-input-alt><a href=3D#attr-input-alt>al=
t</a></code>,
+   <code title=3Dattr-fs-formaction><a href=3D#attr-fs-formacti=
on>formaction</a></code>,
+   <code title=3Dattr-fs-formenctype><a href=3D#attr-fs-formenc=
type>formenctype</a></code>,
+   <code title=3Dattr-fs-formmethod><a href=3D#attr-fs-formmeth=
od>formmethod</a></code>,
+   <code title=3Dattr-fs-formnovalidate><a href=3D#attr-fs-form=
novalidate>formnovalidate</a></code>,
+   <code title=3Dattr-fs-formtarget><a href=3D#attr-fs-formtarg=
et>formtarget</a></code>,
+   <code title=3Dattr-dim-height><a href=3D#attr-dim-height>=
height</a></code>,
+   <code title=3Dattr-input-src><a href=3D#attr-input-src>sr=
c</a></code>, and
+   <code title=3Dattr-dim-width><a href=3D#attr-dim-width>wi=
dth</a></code> content attributes;
+   <code title=3Ddom-input-value><a href=3D#dom-input-value>=
value</a></code> IDL attribute.</p>
+
+   <p>The <code title=3Ddom-input-value><a href=3D#dom-in=
put-value>value</a></code> IDL attribute is in mode <a =
href=3D#dom-input-value-default title=3Ddom-input-value-default>defaul=
t</a>.</p>
+
+   <p>The following content attributes must not be specified and &=
lt;a href=3D#do-not-apply>do not apply</a> to the
+   element:
+   <code class=3Dno-backref title=3Dattr-input-accept><a href=3D=
#attr-input-accept>accept</a></code>,
+   <code class=3Dno-backref title=3Dattr-fe-autocomplete><a hre=
f=3D#attr-fe-autocomplete>autocomplete</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-checked><a href=3D=
#attr-input-checked>checked</a></code>,
+   <code class=3Dno-backref title=3Dattr-fe-dirname><a href=3D#=
attr-fe-dirname>dirname</a></code>,
+   <code class=3Dno-backref title=3Dattr-fe-inputmode><a href=3D=
#attr-fe-inputmode>inputmode</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-list><a href=3D#=
attr-input-list>list</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-max><a href=3D#a=
ttr-input-max>max</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-maxlength><a hre=
f=3D#attr-input-maxlength>maxlength</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-min><a href=3D#a=
ttr-input-min>min</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-minlength><a hre=
f=3D#attr-input-minlength>minlength</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-multiple><a href=
=3D#attr-input-multiple>multiple</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-pattern><a href=3D=
#attr-input-pattern>pattern</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-placeholder><a h=
ref=3D#attr-input-placeholder>placeholder</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-readonly><a href=
=3D#attr-input-readonly>readonly</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-required><a href=
=3D#attr-input-required>required</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-size><a href=3D#=
attr-input-size>size</a></code>, and
+   <code class=3Dno-backref title=3Dattr-input-step><a href=3D#=
attr-input-step>step</a></code>.</p>
+
+   <p>The element's <code title=3Dattr-input-value><a hre=
f=3D#attr-input-value>value</a></code> attribute must be o=
mitted.</p>
+
+   <p>The following IDL attributes and methods <a href=3D#do-no=
t-apply>do not apply</a> to the element:
+   <code class=3Dno-backref title=3Ddom-input-checked><a href=3D=
#dom-input-checked>checked</a></code>,
+   <code class=3Dno-backref title=3Ddom-input-files><a href=3D#=
dom-input-files>files</a></code>,
+   <code class=3Dno-backref title=3Ddom-input-list><a href=3D#d=
om-input-list>list</a></code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-selectionStart=
><a href=3D#dom-textarea/input-selectionstart>selectionStart<=
/a></code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-selectionEnd&g=
t;<a href=3D#dom-textarea/input-selectionend>selectionEnd</a>=
</code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-selectionDirec=
tion><a href=3D#dom-textarea/input-selectiondirection>selectionD=
irection</a></code>,
+   <code class=3Dno-backref title=3Ddom-input-valueAsDate><a hr=
ef=3D#dom-input-valueasdate>valueAsDate</a></code>, and
+   <code class=3Dno-backref title=3Ddom-input-valueAsNumber><a =
href=3D#dom-input-valueasnumber>valueAsNumber</a></code> I=
DL attributes;
+   <code class=3Dno-backref title=3Ddom-textarea/input-select><=
a href=3D#dom-textarea/input-select>select()</a></code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-setRangeText&g=
t;<a href=3D#dom-textarea/input-setrangetext>setRangeText()</a&g=
t;</code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-setSelectionRa=
nge><a href=3D#dom-textarea/input-setselectionrange>setSelection=
Range()</a></code>,
+   <code class=3Dno-backref title=3Ddom-input-stepDown><a href=3D=
#dom-input-stepdown>stepDown()</a></code>, and
+   <code class=3Dno-backref title=3Ddom-input-stepUp><a href=3D=
#dom-input-stepup>stepUp()</a></code> methods.</p>
+
+   <p>The <code class=3Dno-backref title=3Devent-input-input&gt=
;<a href=3D#event-input-input>input</a></code> and <=
code class=3Dno-backref title=3Devent-input-change><a href=3D#event=
-input-change>change</a></code> events <a href=3D#do-no=
t-apply>do not apply</a>.</p>
+
+  </div>
+
+  <p class=3Dnote>Many aspects of this state's behavior are simila=
r to the behavior of the
+  <code><a href=3D#the-img-element>img</a></code&gt=
; element. Readers are encouraged to read that section, where many of the=
 same
+  requirements are described in more detail.</p>
+
+  <div class=3Dexample>
+
+   <p>Take the following form:</p>
+
+   <pre><form action=3D"process.cgi">
+ <input type=3Dimage src=3Dmap.png name=3Dwhere alt=3D"Show =
location list">
+</form></pre>
+
+   <p>If the user clicked on the image at coordinate (127,40) then=
 the URL used to submit the form
+   would be "<code title=3D"">process.cgi?where.x=3D=
127&where.y=3D40</code>".</p>
+
+   <p>(In this example, it's assumed that for users who don't see =
the map, and who instead just see
+   a button labeled "Show location list", clicking the button =
will cause the server to show a list
+   of locations to pick from instead of the map.)</p>
+
+  </div>
+
+
+
+  <h6 id=3D"reset-button-state-(type=3Dreset)"><span =
class=3Dsecno>4.10.5.1.21 </span><dfn title=3Dattr-input-type=
-reset>Reset Button</dfn> state (<code title=3D""&g=
t;type=3Dreset</code>)</h6>
+
+  <div class=3Dimpl>
+
+  <p>When an <code><a href=3D#the-input-element>input&=
lt;/a></code> element's <code title=3Dattr-input-type><=
a href=3D#attr-input-type>type</a></code> attribute is in
+  the <a href=3D"#reset-button-state-(type=3Dreset)" title=3D=
attr-input-type-reset>Reset Button</a> state, the rules in this =
section
+  apply.</p>
+
+  </div>
+
+  <p>The <code><a href=3D#the-input-element>input</=
a></code> element <a href=3D#represents>represents</a&g=
t; a button that, when activated, resets
+  the form. <span class=3Dimpl>If the element has a <code title=
=3Dattr-input-value><a href=3D#attr-input-value>value</a>&=
lt;/code>
+  attribute, the button's label must be the value of that attribute; oth=
erwise, it must be an
+  implementation-defined string that means "Reset" or some suc=
h.</span> The element is a <a href=3D#concept-button title=3Dcon=
cept-button>button</a>.
+  <a href=3D#fingerprinting-vector class=3Dfingerprint title=3D"=
fingerprinting vector"><img src=3Dhttp://images.whatwg.org/fin=
gerprint.png width=3D46 alt=3D"(This is a fingerprinting vector.)&qu=
ot; height=3D64></a>
+  </p>
+
+  <div class=3Dimpl>
+
+  <p>If the element is <i title=3Dconcept-fe-mutable><a h=
ref=3D#concept-fe-mutable>mutable</a></i>, then the elemen=
t's
+  <a href=3D#activation-behavior>activation behavior</a>, if=
 the element has a <a href=3D#form-owner>form owner</a> and t=
he element's
+  <code><a href=3D#document>Document</a></code> =
is <a href=3D#fully-active>fully active</a>, is to <a href=
=3D#concept-form-reset title=3Dconcept-form-reset>reset</a> the =
<a href=3D#form-owner>form owner</a>; otherwise, it is to do
+  nothing.</p>
+
+  <p>If the element is not <i title=3Dconcept-fe-mutable>&lt=
;a href=3D#concept-fe-mutable>mutable</a></i>, it has no &=
lt;a href=3D#activation-behavior>activation
+  behavior</a>.</p>
+
+  <p><strong>Constraint validation</strong>: The eleme=
nt is <a href=3D#barred-from-constraint-validation>barred from cons=
traint
+  validation</a>.</p>
+
+  </div>
+
+  <div class=3Dbookkeeping>
+
+   <p>The <code title=3Ddom-input-value><a href=3D#dom-in=
put-value>value</a></code> IDL attribute <a href=3D#con=
cept-input-apply title=3Dconcept-input-apply>applies</a> to this=
 element and is in mode <a href=3D#dom-input-value-default title=3Ddom=
-input-value-default>default</a>.</p>
+
+   <p>The following content attributes must not be specified and &=
lt;a href=3D#do-not-apply>do not apply</a> to the
+   element:
+   <code class=3Dno-backref title=3Dattr-input-accept><a href=3D=
#attr-input-accept>accept</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-alt><a href=3D#a=
ttr-input-alt>alt</a></code>,
+   <code class=3Dno-backref title=3Dattr-fe-autocomplete><a hre=
f=3D#attr-fe-autocomplete>autocomplete</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-checked><a href=3D=
#attr-input-checked>checked</a></code>,
+   <code class=3Dno-backref title=3Dattr-fe-dirname><a href=3D#=
attr-fe-dirname>dirname</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formaction><a href=3D=
#attr-fs-formaction>formaction</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formenctype><a href=
=3D#attr-fs-formenctype>formenctype</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formmethod><a href=3D=
#attr-fs-formmethod>formmethod</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formnovalidate><a h=
ref=3D#attr-fs-formnovalidate>formnovalidate</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formtarget><a href=3D=
#attr-fs-formtarget>formtarget</a></code>,
+   <code class=3Dno-backref title=3Dattr-dim-height><a href=3D#=
attr-dim-height>height</a></code>,
+   <code class=3Dno-backref title=3Dattr-fe-inputmode><a href=3D=
#attr-fe-inputmode>inputmode</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-list><a href=3D#=
attr-input-list>list</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-max><a href=3D#a=
ttr-input-max>max</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-maxlength><a hre=
f=3D#attr-input-maxlength>maxlength</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-min><a href=3D#a=
ttr-input-min>min</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-minlength><a hre=
f=3D#attr-input-minlength>minlength</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-multiple><a href=
=3D#attr-input-multiple>multiple</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-pattern><a href=3D=
#attr-input-pattern>pattern</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-placeholder><a h=
ref=3D#attr-input-placeholder>placeholder</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-readonly><a href=
=3D#attr-input-readonly>readonly</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-required><a href=
=3D#attr-input-required>required</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-size><a href=3D#=
attr-input-size>size</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-src><a href=3D#a=
ttr-input-src>src</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-step><a href=3D#=
attr-input-step>step</a></code>, and
+   <code class=3Dno-backref title=3Dattr-dim-width><a href=3D#a=
ttr-dim-width>width</a></code>.</p>
+
+   <p>The following IDL attributes and methods <a href=3D#do-no=
t-apply>do not apply</a> to the element:
+   <code class=3Dno-backref title=3Ddom-input-checked><a href=3D=
#dom-input-checked>checked</a></code>,
+   <code class=3Dno-backref title=3Ddom-input-files><a href=3D#=
dom-input-files>files</a></code>,
+   <code class=3Dno-backref title=3Ddom-input-list><a href=3D#d=
om-input-list>list</a></code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-selectionStart=
><a href=3D#dom-textarea/input-selectionstart>selectionStart<=
/a></code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-selectionEnd&g=
t;<a href=3D#dom-textarea/input-selectionend>selectionEnd</a>=
</code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-selectionDirec=
tion><a href=3D#dom-textarea/input-selectiondirection>selectionD=
irection</a></code>,
+   <code class=3Dno-backref title=3Ddom-input-valueAsDate><a hr=
ef=3D#dom-input-valueasdate>valueAsDate</a></code>, and
+   <code class=3Dno-backref title=3Ddom-input-valueAsNumber><a =
href=3D#dom-input-valueasnumber>valueAsNumber</a></code> I=
DL attributes;
+   <code class=3Dno-backref title=3Ddom-textarea/input-select><=
a href=3D#dom-textarea/input-select>select()</a></code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-setRangeText&g=
t;<a href=3D#dom-textarea/input-setrangetext>setRangeText()</a&g=
t;</code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-setSelectionRa=
nge><a href=3D#dom-textarea/input-setselectionrange>setSelection=
Range()</a></code>,
+   <code class=3Dno-backref title=3Ddom-input-stepDown><a href=3D=
#dom-input-stepdown>stepDown()</a></code>, and
+   <code class=3Dno-backref title=3Ddom-input-stepUp><a href=3D=
#dom-input-stepup>stepUp()</a></code> methods.</p>
+
+   <p>The <code class=3Dno-backref title=3Devent-input-input&gt=
;<a href=3D#event-input-input>input</a></code> and <=
code class=3Dno-backref title=3Devent-input-change><a href=3D#event=
-input-change>change</a></code> events <a href=3D#do-no=
t-apply>do not apply</a>.</p>
+
+  </div>
+
+
+  <h6 id=3D"button-state-(type=3Dbutton)"><span class=
=3Dsecno>4.10.5.1.22 </span><dfn title=3Dattr-input-type-butt=
on>Button</dfn> state (<code title=3D"">type=3Db=
utton</code>)</h6>
+
+  <div class=3Dimpl>
+
+  <p>When an <code><a href=3D#the-input-element>input&=
lt;/a></code> element's <code title=3Dattr-input-type><=
a href=3D#attr-input-type>type</a></code> attribute is in
+  the <a href=3D"#button-state-(type=3Dbutton)" title=3Datt=
r-input-type-button>Button</a> state, the rules in this section =
apply.</p>
+
+  </div>
+
+  <p>The <code><a href=3D#the-input-element>input</=
a></code> element <a href=3D#represents>represents</a&g=
t; a button with no default behavior. A
+  label for the button must be provided in the <code title=3Dattr-inp=
ut-value><a href=3D#attr-input-value>value</a></code&gt=
;
+  attribute, though it may be the empty string. <span class=3Dimpl&gt=
;If the element has a <code title=3Dattr-input-value><a href=3D#=
attr-input-value>value</a></code> attribute, the button's =
label must be the value of that
+  attribute; otherwise, it must be the empty string.</span> The el=
ement is a <a href=3D#concept-button title=3Dconcept-button>button&=
lt;/a>.</p>
+
+  <div class=3Dimpl>
+
+  <p>If the element is <i title=3Dconcept-fe-mutable><a h=
ref=3D#concept-fe-mutable>mutable</a></i>, the element's &=
lt;a href=3D#activation-behavior>activation
+  behavior</a> is to do nothing.</p>
+
+  <p>If the element is not <i title=3Dconcept-fe-mutable>&lt=
;a href=3D#concept-fe-mutable>mutable</a></i>, it has no &=
lt;a href=3D#activation-behavior>activation
+  behavior</a>.</p>
+
+  <p><strong>Constraint validation</strong>: The eleme=
nt is <a href=3D#barred-from-constraint-validation>barred from cons=
traint
+  validation</a>.</p>
+
+  </div>
+
+  <div class=3Dbookkeeping>
+
+   <p>The <code title=3Ddom-input-value><a href=3D#dom-in=
put-value>value</a></code> IDL attribute <a href=3D#con=
cept-input-apply title=3Dconcept-input-apply>applies</a> to this=
 element and is in mode <a href=3D#dom-input-value-default title=3Ddom=
-input-value-default>default</a>.</p>
+
+   <p>The following content attributes must not be specified and &=
lt;a href=3D#do-not-apply>do not apply</a> to the
+   element:
+   <code class=3Dno-backref title=3Dattr-input-accept><a href=3D=
#attr-input-accept>accept</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-alt><a href=3D#a=
ttr-input-alt>alt</a></code>,
+   <code class=3Dno-backref title=3Dattr-fe-autocomplete><a hre=
f=3D#attr-fe-autocomplete>autocomplete</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-checked><a href=3D=
#attr-input-checked>checked</a></code>,
+   <code class=3Dno-backref title=3Dattr-fe-dirname><a href=3D#=
attr-fe-dirname>dirname</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formaction><a href=3D=
#attr-fs-formaction>formaction</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formenctype><a href=
=3D#attr-fs-formenctype>formenctype</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formmethod><a href=3D=
#attr-fs-formmethod>formmethod</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formnovalidate><a h=
ref=3D#attr-fs-formnovalidate>formnovalidate</a></code>,
+   <code class=3Dno-backref title=3Dattr-fs-formtarget><a href=3D=
#attr-fs-formtarget>formtarget</a></code>,
+   <code class=3Dno-backref title=3Dattr-dim-height><a href=3D#=
attr-dim-height>height</a></code>,
+   <code class=3Dno-backref title=3Dattr-fe-inputmode><a href=3D=
#attr-fe-inputmode>inputmode</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-list><a href=3D#=
attr-input-list>list</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-max><a href=3D#a=
ttr-input-max>max</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-maxlength><a hre=
f=3D#attr-input-maxlength>maxlength</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-min><a href=3D#a=
ttr-input-min>min</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-minlength><a hre=
f=3D#attr-input-minlength>minlength</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-multiple><a href=
=3D#attr-input-multiple>multiple</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-pattern><a href=3D=
#attr-input-pattern>pattern</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-placeholder><a h=
ref=3D#attr-input-placeholder>placeholder</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-readonly><a href=
=3D#attr-input-readonly>readonly</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-required><a href=
=3D#attr-input-required>required</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-size><a href=3D#=
attr-input-size>size</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-src><a href=3D#a=
ttr-input-src>src</a></code>,
+   <code class=3Dno-backref title=3Dattr-input-step><a href=3D#=
attr-input-step>step</a></code>, and
+   <code class=3Dno-backref title=3Dattr-dim-width><a href=3D#a=
ttr-dim-width>width</a></code>.</p>
+
+   <p>The following IDL attributes and methods <a href=3D#do-no=
t-apply>do not apply</a> to the element:
+   <code class=3Dno-backref title=3Ddom-input-checked><a href=3D=
#dom-input-checked>checked</a></code>,
+   <code class=3Dno-backref title=3Ddom-input-files><a href=3D#=
dom-input-files>files</a></code>,
+   <code class=3Dno-backref title=3Ddom-input-list><a href=3D#d=
om-input-list>list</a></code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-selectionStart=
><a href=3D#dom-textarea/input-selectionstart>selectionStart<=
/a></code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-selectionEnd&g=
t;<a href=3D#dom-textarea/input-selectionend>selectionEnd</a>=
</code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-selectionDirec=
tion><a href=3D#dom-textarea/input-selectiondirection>selectionD=
irection</a></code>,
+   <code class=3Dno-backref title=3Ddom-input-valueAsDate><a hr=
ef=3D#dom-input-valueasdate>valueAsDate</a></code>, and
+   <code class=3Dno-backref title=3Ddom-input-valueAsNumber><a =
href=3D#dom-input-valueasnumber>valueAsNumber</a></code> I=
DL attributes;
+   <code class=3Dno-backref title=3Ddom-textarea/input-select><=
a href=3D#dom-textarea/input-select>select()</a></code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-setRangeText&g=
t;<a href=3D#dom-textarea/input-setrangetext>setRangeText()</a&g=
t;</code>,
+   <code class=3Dno-backref title=3Ddom-textarea/input-setSelectionRa=
nge><a href=3D#dom-textarea/input-setselectionrange>setSelection=
Range()</a></code>,
+   <code class=3Dno-backref title=3Ddom-input-stepDown><a href=3D=
#dom-input-stepdown>stepDown()</a></code>, and
+   <code class=3Dno-backref title=3Ddom-input-stepUp><a href=3D=
#dom-input-stepup>stepUp()</a></code> methods.</p>
+
+   <p>The <code class=3Dno-backref title=3Devent-input-input&gt=
;<a href=3D#event-input-input>input</a></code> and <=
code class=3Dno-backref title=3Devent-input-change><a href=3D#event=
-input-change>change</a></code> events <a href=3D#do-no=
t-apply>do not apply</a>.</p>
+
+  </div>
+
+
+  <div class=3Dimpl>
+
+  <h5 id=3Dinput-impl-notes><span class=3Dsecno>4.10.5.2 &lt=
;/span>Implemention notes regarding localization of form controls</=
h5>
+  <!-- ID referenced from other parts of the spec -->
+
+  <p><i>This section is non-normative.</i></p>
+
+  <p>The formats shown to the user in date, time, and number contr=
ols is independent of the format
+  used for form submission.</p>
+
+  <p>Browsers are encouraged to use user interfaces that present d=
ates, times, and numbers according
+  to the conventions of either the locale implied by the <code>&lt=
;a href=3D#the-input-element>input</a></code> element's
+  <a href=3D#language>language</a> or the user's preferred l=
ocale. Using the page's locale will ensure
+  consistency with page-provided data.
+
+  <p class=3Dexample>For example, it would be confusing to users i=
f an American English page claimed
+  that a Cirque De Soleil show was going to be showing on 02/03<!-- F=
eb 3 (year) -->, but their
+  browser, configured to use the British English locale, only showed the=
 date 03/02<!-- 3 Feb (year)
+  --> in the ticket purchase date picker. Using the page's locale wou=
ld at least ensure that the
+  date was presented in the same format everywhere. (There's still a ris=
k that the user would end up
+  arriving a month late, of course, but there's only so much that can be=
 done about such cultural
+  differences...)</p>
+
+  </div>
+
+
+
+  <h5 id=3Dcommon-input-element-attributes><span class=3Dsecno&=
gt;4.10.5.3 </span>Common <code><a href=3D#the-input-eleme=
nt>input</a></code> element attributes</h5>
+
+  <div class=3Dimpl>
+
+  <p>These attributes only <a href=3D#concept-input-apply title=
=3Dconcept-input-apply>apply</a> to an <code><a href=3D=
#the-input-element>input</a></code>
+  element if its <code title=3Dattr-input-type><a href=3D#attr-=
input-type>type</a></code> attribute is in a state whose d=
efinition
+  declares that the attribute <a href=3D#concept-input-apply title=3D=
concept-input-apply>applies</a>. When an attribute
+  <a href=3D#do-not-apply title=3D"do not apply">doesn't=
 apply</a> to an <code><a href=3D#the-input-element>inp=
ut</a></code> element, user agents must
+  <a href=3D#ignore>ignore</a> the attribute, regardless of =
the requirements and definitions below.</p>
+
+  </div>
+
+
+  <h6 id=3Dthe-maxlength-and-minlength-attributes><span class=3D=
secno>4.10.5.3.1 </span>The <code title=3Dattr-input-maxlengt=
h><a href=3D#attr-input-maxlength>maxlength</a></code&g=
t; and <code title=3Dattr-input-minlength><a href=3D#attr-input-=
minlength>minlength</a></code> attributes</h6>
+
+  <p>The <dfn id=3Dattr-input-maxlength title=3Dattr-input-maxl=
ength><code>maxlength</code></dfn> attribute<span=
 class=3Dimpl>, when it <a href=3D#concept-input-apply title=3Dconc=
ept-input-apply>applies</a>,</span> is a <a href=3D#att=
r-fe-maxlength title=3Dattr-fe-maxlength>form control <code title=3D=
"">maxlength</code> attribute</a><span class=3D=
impl> controlled by the <code><a href=3D#the-input-element&gt=
;input</a></code> element's <a href=3D#concept-input-value=
-dirty-flag title=3Dconcept-input-value-dirty-flag>dirty value flag&lt=
;/a></span>.</p>
+
+  <p>The <dfn id=3Dattr-input-minlength title=3Dattr-input-minl=
ength><code>minlength</code></dfn> attribute<span=
 class=3Dimpl>, when it <a href=3D#concept-input-apply title=3Dconc=
ept-input-apply>applies</a>,</span> is a <a href=3D#att=
r-fe-minlength title=3Dattr-fe-minlength>form control <code title=3D=
"">minlength</code> attribute</a><span class=3D=
impl> controlled by the <code><a href=3D#the-input-element&gt=
;input</a></code> element's <a href=3D#concept-input-value=
-dirty-flag title=3Dconcept-input-value-dirty-flag>dirty value flag&lt=
;/a></span>.</p>
+
+  <p>If the <code><a href=3D#the-input-element>input&l=
t;/a></code> element has a <a href=3D#maximum-allowed-value-l=
ength>maximum allowed value length</a>, then the
+  <a href=3D#code-unit-length>code-unit length</a> of the va=
lue of the element's <code title=3Dattr-input-value><a href=3D#a=
ttr-input-value>value</a></code> attribute must be equal t=
o or less than the element's
+  <a href=3D#maximum-allowed-value-length>maximum allowed value le=
ngth</a>.</p>
+
+  <!-- we allow the default to be smaller than the minimum, so that y=
ou can have incomplete, but not
+  empty, input already in the form, like a template that needs to be fil=
led in -->
+
+  <div class=3Dexample>
+
+   <p>The following extract shows how a messaging client's text en=
try could be arbitrarily
+   restricted to a fixed number of characters, thus forcing any conversa=
tion through this medium to
+   be terse and discouraging intelligent discourse.</p>
+
+   <pre><label>What are you doing? <input nam=
e=3Dstatus maxlength=3D140></label></pre>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>Here, a password is given a minimum length:</p>
+
+   <pre><p><label>Username: <in=
put name=3Du required></label>
+<p><label>Password: <input name=3Dp r=
equired minlength=3D12></label></pre>
+
+  </div>
+
+
+
+  <h6 id=3Dthe-size-attribute><span class=3Dsecno>4.10.5.3.2=
 </span>The <code title=3Dattr-input-size><a href=3D#attr-=
input-size>size</a></code> attribute</h6>
+
+  <p>The <dfn id=3Dattr-input-size title=3Dattr-input-size>&=
lt;code>size</code></dfn> attribute gives the number of
+  characters that, in a visual rendering, the user agent is to allow the=
 user to see while editing
+  the element's <a href=3D#concept-fe-value title=3Dconcept-fe-value&=
gt;value</a>.</p>
+
+  <p>The <code title=3Dattr-input-size><a href=3D#attr-in=
put-size>size</a></code> attribute, if specified, must hav=
e a value that
+  is a <a href=3D#valid-non-negative-integer>valid non-negative in=
teger</a> greater than zero.</p>
+
+  <div class=3Dimpl>
+
+  <p>If the attribute is present, then its value must be parsed us=
ing the <a href=3D#rules-for-parsing-non-negative-integers>rules fo=
r parsing
+  non-negative integers</a>, and if the result is a number greater=
 than zero, then the user agent
+  should ensure that at least that many characters are visible.</p&gt=
;
+
+  <p>The <code title=3Ddom-input-size><a href=3D#dom-inpu=
t-size>size</a></code> IDL attribute is <a href=3D#limi=
ted-to-only-non-negative-numbers-greater-than-zero>limited to only
+  non-negative numbers greater than zero</a> and has a default val=
ue of 20.</p>
+
+  </div>
+
+
+
+  <h6 id=3Dthe-readonly-attribute><span class=3Dsecno>4.10.5=
.3.3 </span>The <code title=3Dattr-input-readonly><a href=3D=
#attr-input-readonly>readonly</a></code> attribute</h6&=
gt;
+
+  <p>The <dfn id=3Dattr-input-readonly title=3Dattr-input-reado=
nly><code>readonly</code></dfn> attribute is a <a=
 href=3D#boolean-attribute>boolean
+  attribute</a> that controls whether or not the user can edit the=
 form control. <span class=3Dimpl>When specified, the element is no=
t <i title=3Dconcept-fe-mutable><a href=3D#concept-fe-mutable&gt=
;mutable</a></i>.</span></p>
+
+  <div class=3Dimpl>
+
+  <p><strong>Constraint validation</strong>: If the &l=
t;code title=3Dattr-input-readonly><a href=3D#attr-input-readonly&g=
t;readonly</a></code> attribute is specified on an <code&g=
t;<a href=3D#the-input-element>input</a></code>
+  element, the element is <a href=3D#barred-from-constraint-validatio=
n>barred from constraint validation</a>.</p>
+
+  </div>
+
+  <p class=3Dnote>The difference between <code title=3Dattr-fe-=
disabled><a href=3D#attr-fe-disabled>disabled</a></code=
> and <code title=3Dattr-input-readonly><a href=3D#attr-input=
-readonly>readonly</a></code> is that read-only controls a=
re still focusable, so the
+  user can still select the text and interact with it, whereas disabled =
controls are entirely
+  non-interactive. (For this reason, only text controls can be made read=
-only: it wouldn't make
+  sense for checkboxes or buttons, for instances.)</p>
+
+  <div class=3Dexample>
+
+   <p>In the following example, the existing product identifiers c=
annot be modified, but they are
+   still displayed as part of the form, for consistency with the row rep=
resenting a new product
+   (where the identifier is not yet filled in).</p>
+
+   <pre><form action=3D"products.cgi" method=3D&q=
uot;post" enctype=3D"multipart/form-data">
+ <table>
+  <tr> <th> Product ID <th> Pr=
oduct name <th> Price <th> Action
+  <tr>
+   <td> <input readonly=3D"readonly" name=
=3D"1.pid" value=3D"H412">
+   <td> <input required=3D"required" name=
=3D"1.pname" value=3D"Floor lamp Ulke">
+   <td> $<input required=3D"required" typ=
e=3D"number" min=3D"0" step=3D"0.01" name=3D=
"1.pprice" value=3D"49.99">
+   <td> <button formnovalidate=3D"formnovalida=
te" name=3D"action" value=3D"delete:1">De=
lete</button>
+  <tr>
+   <td> <input readonly=3D"readonly" name=
=3D"2.pid" value=3D"FG28">
+   <td> <input required=3D"required" name=
=3D"2.pname" value=3D"Table lamp Ulke">
+   <td> $<input required=3D"required" typ=
e=3D"number" min=3D"0" step=3D"0.01" name=3D=
"2.pprice" value=3D"24.99">
+   <td> <button formnovalidate=3D"formnovalida=
te" name=3D"action" value=3D"delete:2">De=
lete</button>
+  <tr>
+   <td> <input required=3D"required" name=
=3D"3.pid" value=3D"" pattern=3D"[A-Z0-9]+"=
>
+   <td> <input required=3D"required" name=
=3D"3.pname" value=3D"">
+   <td> $<input required=3D"required" typ=
e=3D"number" min=3D"0" step=3D"0.01" name=3D=
"3.pprice" value=3D"">
+   <td> <button formnovalidate=3D"formnovalida=
te" name=3D"action" value=3D"delete:3">De=
lete</button>
+ </table>
+ <p> <button formnovalidate=3D"formnovalidate&=
quot; name=3D"action" value=3D"add">Add&lt=
;/button> </p>
+ <p> <button name=3D"action" value=3D&quo=
t;update">Save</button> </p>
+</form></pre>
+
+  </div>
+
+
+
+  <h6 id=3Dthe-required-attribute><span class=3Dsecno>4.10.5=
.3.4 </span>The <code title=3Dattr-input-required><a href=3D=
#attr-input-required>required</a></code> attribute</h6&=
gt;
+
+  <p>The <dfn id=3Dattr-input-required title=3Dattr-input-requi=
red><code>required</code></dfn> attribute is a <a=
 href=3D#boolean-attribute>boolean
+  attribute</a>. When specified, the element is <dfn id=3Dconce=
pt-input-required title=3Dconcept-input-required><i>required<=
/i></dfn>.</p>
+
+  <div class=3Dimpl>
+
+  <p><strong>Constraint validation</strong>: If the el=
ement is <i title=3Dconcept-input-required><a href=3D#concept-in=
put-required>required</a></i>, and its <code title=3Ddo=
m-input-value><a href=3D#dom-input-value>value</a></cod=
e>
+  IDL attribute <a href=3D#concept-input-apply title=3Dconcept-input-=
apply>applies</a> and is in the mode <a href=3D#dom-input-val=
ue-value title=3Ddom-input-value-value>value</a>, and the elemen=
t is <i title=3Dconcept-fe-mutable><a href=3D#concept-fe-mutable=
>mutable</a></i>, and the element's <a href=3D#concept-=
fe-value title=3Dconcept-fe-value>value</a> is the empty string,=
 then the element is <a href=3D#suffering-from-being-missing>suffer=
ing
+  from being missing</a>.</p>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>The following form has two required fields, one for an e-mai=
l address and one for a password.
+   It also has a third field that is only considered valid if the user t=
ypes the same password in
+   the password field and this third field.</p>
+
+   <pre><h1>Create new account</h1>
+<form action=3D"/newaccount" method=3Dpost
+      oninput=3D"up2.setCustomValidity(up2.value !=3D up.value ? 'P=
asswords do not match.' : '')">
+ <p>
+  <label for=3D"username">E-mail address:&lt=
;/label>
+  <input id=3D"username" type=3Demail required name=3Du=
n>
+ <p>
+  <label for=3D"password1">Password:</lab=
el>
+  <input id=3D"password1" type=3Dpassword required name=
=3Dup>
+ <p>
+  <label for=3D"password2">Confirm password:&amp=
;lt;/label>
+  <input id=3D"password2" type=3Dpassword name=3Dup2&am=
p;gt;
+ <p>
+  <input type=3Dsubmit value=3D"Create account">
+</form></pre>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>For radio buttons, the <code title=3Dattr-input-required&=
gt;<a href=3D#attr-input-required>required</a></code> a=
ttribute is
+   satisfied if any of the radio buttons in the <a href=3D#radio-butt=
on-group title=3D"radio button group">group</a> is
+   selected. Thus, in the following example, any of the radio buttons ca=
n be checked, not just the
+   one marked as required:</p>
+
+   <pre><fieldset>
+ <legend>Did the movie pass the Bechdel test?</lege=
nd>
+ <p><label><input type=3D"radio&=
quot; name=3D"bechdel" value=3D"no-characters"&gt=
; No, there are not even two female characters in the movie. </lab=
el>
+ <p><label><input type=3D"radio&=
quot; name=3D"bechdel" value=3D"no-names"> No,=
 the female characters never talk to each other. </label>
+ <p><label><input type=3D"radio&=
quot; name=3D"bechdel" value=3D"no-topic"> No,=
 when female characters talk to each other it's always about a male chara=
cter. </label>
+ <p><label><input type=3D"radio&=
quot; name=3D"bechdel" value=3D"yes" <strong>re=
quired</strong>> Yes. </label>
+ <p><label><input type=3D"radio&=
quot; name=3D"bechdel" value=3D"unknown"> I do=
n't know. </label>
+</fieldset></pre>
+
+   <p>To avoid confusion as to whether a <a href=3D#radio-butto=
n-group>radio button group</a> is required or not, authors
+   are encouraged to specify the attribute on all the radio buttons in a=
 group. Indeed, in general,
+   authors are encouraged to avoid having radio button groups that do no=
t have any initially checked
+   controls in the first place, as this is a state that the user cannot =
return to, and is therefore
+   generally considered a poor user interface.</p>
+
+  </div>
+
+
+  <h6 id=3Dthe-multiple-attribute><span class=3Dsecno>4.10.5=
.3.5 </span>The <code title=3Dattr-input-multiple><a href=3D=
#attr-input-multiple>multiple</a></code> attribute</h6&=
gt;
+
+  <p>The <dfn id=3Dattr-input-multiple title=3Dattr-input-multi=
ple><code>multiple</code></dfn> attribute is a <a=
 href=3D#boolean-attribute>boolean
+  attribute</a> that indicates whether the user is to be allowed t=
o specify more than one
+  value.</p>
+
+  <div class=3Dexample>
+
+   <p>The following extract shows how an e-mail client's "Cc&=
quot; field could accept multiple e-mail
+   addresses.</p>
+
+   <pre><label>Cc: <input type=3Demail multip=
le name=3Dcc></label></pre>
+
+   <p>If the user had, amongst many friends in his user contacts d=
atabase, two friends "Arthur Dent"
+   (with address "art at example.net") and "Adam Josh" =
(with address "adamjosh at example.net"), then,
+   after the user has typed "a", the user agent might suggest =
these two e-mail addresses to the
+   user.</p>
+
+   <!-- Having alternative text in the following image would be bogus=
 and non-conforming use of
+   HTML, since the image is redundant with the previous paragraph. In pa=
rticular, just describing
+   the image would be especially bad for accessibility as it would be di=
sorienting, there having
+   been no mention that an image is present. -->
+   <p><img src=3Dhttp://images.whatwg.org/sample-email-1.png wi=
dth=3D500 alt=3D"" height=3D140></p>
+
+   <p>The page could also link in the user's contacts database fro=
m the site:</p>
+
+   <pre><label>Cc: <input type=3Demail multip=
le name=3Dcc list=3Dcontacts></label>
+...
+<datalist id=3D"contacts">
+ <option value=3D"hedral at damowmow.com">
+ <option value=3D"pillar at example.com">
+ <option value=3D"astrophy at cute.example">
+ <option value=3D"astronomy at science.example.org"&gt=
;
+</datalist></pre>
+
+   <p>Suppose the user had entered "bob at example.net" int=
o this text field, and then started typing a
+   second e-mail address starting with "a". The user agent mig=
ht show both the two friends mentioned
+   earlier, as well as the "astrophy" and "astronomy&quot=
; values given in the <code><a href=3D#the-datalist-element>d=
atalist</a></code>
+   element.</p>
+
+   <!-- As above, having a non-empty alt=3D"" attribute on =
the following image would be dumb, which is
+   why it's left blank. The pertinent parts of the image are already des=
cribed in the prose, and the
+   non-pertinent parts aren't relevant to users who can't see the image,=
 obviously. -->
+   <p><img src=3Dhttp://images.whatwg.org/sample-email-2.png wi=
dth=3D500 alt=3D"" height=3D171></p>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>The following extract shows how an e-mail client's "Att=
achments" field could accept multiple
+   files for upload.</p>
+
+   <pre><label>Attachments: <input type=3Dfil=
e multiple name=3Datt></label></pre>
+
+  </div>
+
+
+
+  <h6 id=3Dthe-pattern-attribute><span class=3Dsecno>4.10.5.=
3.6 </span>The <code title=3Dattr-input-pattern><a href=3D=
#attr-input-pattern>pattern</a></code> attribute</h6&gt=
;
+
+  <p>The <dfn id=3Dattr-input-pattern title=3Dattr-input-patter=
n><code>pattern</code></dfn> attribute specifies a r=
egular
+  expression against which the control's <a href=3D#concept-fe-value =
title=3Dconcept-fe-value>value</a>, or, when the
+  <code title=3Dattr-input-multiple><a href=3D#attr-input-multi=
ple>multiple</a></code> attribute <a href=3D#concept-in=
put-apply title=3Dconcept-input-apply>applies</a> and is set, th=
e control's <a href=3D#concept-fe-values title=3Dconcept-fe-values>=
value<em>s</em></a>, are to be checked.</p>
+
+  <p>If specified, the attribute's value must match the JavaScript=
 <i title=3D"">Pattern</i>
+  production. <a href=3D#refsECMA262>[ECMA262]</a></p>
+
+  <div class=3Dimpl>
+
+  <p>If an <code><a href=3D#the-input-element>input&lt=
;/a></code> element has a <code title=3Dattr-input-pattern&gt=
;<a href=3D#attr-input-pattern>pattern</a></code>
+  attribute specified, and the attribute's value, when compiled as a Jav=
aScript regular expression
+  with the <code title=3D"">global</code>, <cod=
e title=3D"">ignoreCase</code>, and <code title=3D&=
quot;">multiline</code> flags <em>disabled</em>=
 (see ECMA262 Edition 5, sections 15.10.7.2
+  through 15.10.7.4), compiles successfully, then the resulting regular =
expression is the element's
+  <dfn id=3Dcompiled-pattern-regular-expression>compiled pattern r=
egular expression</dfn>. If the element has no such attribute, or i=
f the
+  value doesn't compile successfully, then the element has no <a href=
=3D#compiled-pattern-regular-expression>compiled pattern regular
+  expression</a>. <a href=3D#refsECMA262>[ECMA262]</a>=
</p>
+
+  <p><strong>Constraint validation</strong>: If the el=
ement's <a href=3D#concept-fe-value title=3Dconcept-fe-value>value&=
lt;/a> is not the empty string, and either the element's <code titl=
e=3Dattr-input-multiple><a href=3D#attr-input-multiple>multiple&=
lt;/a></code> attribute is not specified or it <a href=3D#do-=
not-apply title=3D"do not
+  apply">does not apply</a> to the <code><a href=3D=
#the-input-element>input</a></code> element given its <=
code title=3Dattr-input-type><a href=3D#attr-input-type>type<=
/a></code> attribute's current state, and the element has a
+  <a href=3D#compiled-pattern-regular-expression>compiled pattern =
regular expression</a> but that regular expression does not match t=
he
+  entirety of the element's <a href=3D#concept-fe-value title=3Dconce=
pt-fe-value>value</a>, then the element is
+  <a href=3D#suffering-from-a-pattern-mismatch>suffering from a pa=
ttern mismatch</a>.</p>
+
+  <p><strong>Constraint validation</strong>: If the el=
ement's <a href=3D#concept-fe-value title=3Dconcept-fe-value>value&=
lt;/a> is not the empty string, and the element's <code title=3Datt=
r-input-multiple><a href=3D#attr-input-multiple>multiple</a&g=
t;</code> attribute is specified and <a href=3D#concept-input-ap=
ply title=3Dconcept-input-apply>applies</a> to the <code>&=
lt;a href=3D#the-input-element>input</a></code> element, a=
nd the element has
+  a <a href=3D#compiled-pattern-regular-expression>compiled patter=
n regular expression</a> but that regular expression does not match=
 the
+  entirety of each of the element's <a href=3D#concept-fe-values titl=
e=3Dconcept-fe-values>value<em>s</em></a>, then the
+  element is <a href=3D#suffering-from-a-pattern-mismatch>sufferin=
g from a pattern mismatch</a>.</p>
+
+  <p>The <a href=3D#compiled-pattern-regular-expression>comp=
iled pattern regular expression</a>, when matched against a string,=
 must have
+  its start anchored to the start of the string and its end anchored to =
the end of the string.</p>
+
+  <p class=3Dnote>This implies that the regular expression languag=
e used for this attribute is the
+  same as that used in JavaScript, except that the <code title=3Dattr=
-input-pattern><a href=3D#attr-input-pattern>pattern</a>&l=
t;/code>
+  attribute is matched against the entire value, not just any subset (so=
mewhat as if it implied a
+  <code title=3D"">^(?:</code> at the start of the=
 pattern and a <code title=3D"">)$</code> at the
+  end).</p>
+
+  </div>
+
+  <p>When an <code><a href=3D#the-input-element>input&=
lt;/a></code> element has a <code title=3Dattr-input-pattern&=
gt;<a href=3D#attr-input-pattern>pattern</a></code>
+  attribute specified, authors should include a <code title=3Dattr-ti=
tle><a href=3D#attr-title>title</a></code> attribute=
 to
+  give a description of the pattern. User agents may use the contents of=
 this attribute, if it is
+  present, when informing the user that the pattern is not matched, or a=
t any other suitable time,
+  such as in a tooltip or read out by assistive technology when the cont=
rol gains focus.</p>
+
+  <div class=3Dexample>
+   <p>For example, the following snippet:</p>
+   <pre><label> Part number:
+ <input pattern=3D"[0-9][A-Z]{3}" name=3D"part&quo=
t;
+        title=3D"A part number is a digit followed by three upperca=
se letters."/>
+</label></pre>
+   <p>...could cause the UA to display an alert such as:</p>
+   <pre><samp>A part number is a digit followed by three upp=
ercase letters.
+You cannot submit this form when the field is incorrect.</samp>&lt=
;/pre>
+  </div>
+
+  <p>When a control has a <code title=3Dattr-input-pattern>&=
lt;a href=3D#attr-input-pattern>pattern</a></code> attribu=
te, the <code title=3Dattr-title><a href=3D#attr-title>title&=
lt;/a></code> attribute, if used, must describe the pattern. Add=
itional
+  information could also be included, so long as it assists the user in =
filling in the control.
+  Otherwise, assistive technology would be impaired.</p>
+
+  <p class=3Dexample>For instance, if the title attribute containe=
d the caption of the control,
+  assistive technology could end up saying something like <samp>Th=
e text you have entered does not
+  match the required pattern. Birthday</samp>, which is not useful=
.</p>
+
+  <p>UAs may still show the <code title=3Dattr-title><a h=
ref=3D#attr-title>title</a></code> in non-error situations=
 (for
+  example, as a tooltip when hovering over the control), so authors shou=
ld be careful not to word
+  <code title=3Dattr-title><a href=3D#attr-title>title</a=
></code>s as if an error has necessarily occurred.</p>
+
+
+
+  <h6 id=3Dthe-min-and-max-attributes><span class=3Dsecno>4.=
10.5.3.7 </span>The <code title=3Dattr-input-min><a href=3D=
#attr-input-min>min</a></code> and <code title=3Dattr-i=
nput-max><a href=3D#attr-input-max>max</a></code> at=
tributes</h6>
+
+  <p>Some form controls can have explicit constraints applied limi=
ting the allowed range of values
+  that the user can provide. Normally, such a range would be linear and =
continuous. A form control
+  can <dfn id=3Dhas-a-periodic-domain title=3D"has a periodic do=
main">have a periodic domain</dfn>, however, in which case =
the
+  form control's broadest possible range is finite, and authors can spec=
ify explicit ranges within
+  it that span the boundaries.</p>
+
+  <p class=3Dexample>Specifically, the broadest range of a <cod=
e title=3Dattr-input-type-time><a href=3D"#time-state-(type=3D=
time)">type=3Dtime</a></code> control is midnight to =
midnight (24 hours), and
+  authors can set both continuous linear ranges (such as 9pm to 11pm) an=
d discontinuous ranges
+  spanning midnight (such as 11pm to 1am).</p>
+
+  <p>The <dfn id=3Dattr-input-min title=3Dattr-input-min>&lt=
;code>min</code></dfn> and <dfn id=3Dattr-input-max tit=
le=3Dattr-input-max><code>max</code></dfn> attribute=
s indicate the allowed range of values for
+  the element.</p>
+
+  <div class=3Dimpl>
+
+  <p>Their syntax is defined by the section that defines the <c=
ode title=3Dattr-input-type><a href=3D#attr-input-type>type</=
a></code> attribute's current state.</p>
+
+  <p>If the element has a <code title=3Dattr-input-min><a=
 href=3D#attr-input-min>min</a></code> attribute, and the =
result of
+  applying the <a href=3D#concept-input-value-string-number title=3Dc=
oncept-input-value-string-number>algorithm to convert a string to a
+  number</a> to the value of the <code title=3Dattr-input-min&g=
t;<a href=3D#attr-input-min>min</a></code> attribute is=
 a number,
+  then that number is the element's <dfn id=3Dconcept-input-min title=
=3Dconcept-input-min>minimum</dfn>; otherwise, if the
+  <code title=3Dattr-input-type><a href=3D#attr-input-type>t=
ype</a></code> attribute's current state defines a <dfn id=
=3Dconcept-input-min-default title=3Dconcept-input-min-default>default=
 minimum</dfn>, then that is the <a href=3D#concept-input-min ti=
tle=3Dconcept-input-min>minimum</a>; otherwise, the element has =
no <a href=3D#concept-input-min title=3Dconcept-input-min>minimum&l=
t;/a>.</p>
+
+  <p>The <code title=3Dattr-input-min><a href=3D#attr-inp=
ut-min>min</a></code> attribute also defines the <a hre=
f=3D#concept-input-min-zero title=3Dconcept-input-min-zero>step base&l=
t;/a>.</p>
+
+  <p>If the element has a <code title=3Dattr-input-max><a=
 href=3D#attr-input-max>max</a></code> attribute, and the =
result of
+  applying the <a href=3D#concept-input-value-string-number title=3Dc=
oncept-input-value-string-number>algorithm to convert a string to a
+  number</a> to the value of the <code title=3Dattr-input-max&g=
t;<a href=3D#attr-input-max>max</a></code> attribute is=
 a number,
+  then that number is the element's <dfn id=3Dconcept-input-max title=
=3Dconcept-input-max>maximum</dfn>; otherwise, if the
+  <code title=3Dattr-input-type><a href=3D#attr-input-type>t=
ype</a></code> attribute's current state defines a <dfn id=
=3Dconcept-input-max-default title=3Dconcept-input-max-default>default=
 maximum</dfn>, then that is the <a href=3D#concept-input-max ti=
tle=3Dconcept-input-max>maximum</a>; otherwise, the element has =
no <a href=3D#concept-input-max title=3Dconcept-input-max>maximum&l=
t;/a>.</p>
+
+  </div>
+
+  <p>If the element does not <a href=3D#has-a-periodic-domain t=
itle=3D"has a periodic domain">have a periodic domain</a&=
gt;, the
+  <code title=3Dattr-input-max><a href=3D#attr-input-max>max=
</a></code> attribute's value (the <a href=3D#concept-inpu=
t-max title=3Dconcept-input-max>maximum</a>) must not be less th=
an the <code title=3Dattr-input-min><a href=3D#attr-input-min&gt=
;min</a></code> attribute's value (its <a href=3D#concept-=
input-min title=3Dconcept-input-min>minimum</a>).</p>
+
+  <div class=3Dimpl>
+
+  <p class=3Dnote>If an element that does not <a href=3D#has-a-=
periodic-domain title=3D"has a periodic domain">have a perio=
dic
+  domain</a> has a <a href=3D#attr-input-max title=3Dattr-input=
-max>maximum</a> that is less than its <a href=3D#attr-input-=
min title=3Dattr-input-min>minimum</a>, then so long as the elem=
ent has a <a href=3D#concept-fe-value title=3Dconcept-fe-value>valu=
e</a>, it will either be <a href=3D#suffering-from-an-underflow&=
gt;suffering from an underflow</a>
+  or <a href=3D#suffering-from-an-overflow>suffering from an overf=
low</a>.</p>
+
+  <p>An element <dfn id=3Dhas-a-reversed-range>has a reverse=
d range</dfn> if it <a href=3D#has-a-periodic-domain>has a pe=
riodic domain</a> and its
+  <a href=3D#concept-input-max title=3Dconcept-input-max>maximum&l=
t;/a> is less than its <a href=3D#concept-input-min title=3Dconcept=
-input-min>minimum</a>.</p>
+
+  </div>
+
+  <p>An element <dfn id=3Dhave-range-limitations title=3D"=
have range limitations">has range limitations</dfn> if it h=
as a defined
+  <a href=3D#concept-input-min title=3Dconcept-input-min>minimum&l=
t;/a> or a defined <a href=3D#concept-input-max title=3Dconcept-inp=
ut-max>maximum</a>.</p>
+
+  <div class=3Dimpl>
+
+  <p><strong>Constraint validation</strong>: When the =
element has a <a href=3D#attr-input-min title=3Dattr-input-min>mini=
mum</a> and does not <a href=3D#has-a-reversed-range title=3D&qu=
ot;has a reversed range">have a
+  reversed range</a>, and the result of applying the <a href=3D=
#concept-input-value-string-number title=3Dconcept-input-value-string-num=
ber>algorithm to convert a string to a number</a> to the
+  string given by the element's <a href=3D#concept-fe-value title=3Dc=
oncept-fe-value>value</a> is a number, and the
+  number obtained from that algorithm is less than the <a href=3D#att=
r-input-min title=3Dattr-input-min>minimum</a>,
+  the element is <a href=3D#suffering-from-an-underflow>suffering =
from an underflow</a>.</p>
+
+  <p><strong>Constraint validation</strong>: When the =
element has a <a href=3D#attr-input-max title=3Dattr-input-max>maxi=
mum</a> and does not <a href=3D#has-a-reversed-range title=3D&qu=
ot;has a reversed range">have a
+  reversed range</a>, and the result of applying the <a href=3D=
#concept-input-value-string-number title=3Dconcept-input-value-string-num=
ber>algorithm to convert a string to a number</a> to the
+  string given by the element's <a href=3D#concept-fe-value title=3Dc=
oncept-fe-value>value</a> is a number, and the
+  number obtained from that algorithm is more than the <a href=3D#att=
r-input-max title=3Dattr-input-max>maximum</a>,
+  the element is <a href=3D#suffering-from-an-overflow>suffering f=
rom an overflow</a>.</p>
+
+  <p><strong>Constraint validation</strong>: When an e=
lement <a href=3D#has-a-reversed-range>has a reversed range</a&g=
t;, and
+  the result of applying the <a href=3D#concept-input-value-string-nu=
mber title=3Dconcept-input-value-string-number>algorithm to convert a
+  string to a number</a> to the string given by the element's <=
a href=3D#concept-fe-value title=3Dconcept-fe-value>value</a> is=
 a number, and the number obtained from that algorithm is
+  more than the <a href=3D#attr-input-max title=3Dattr-input-max>m=
aximum</a> <em>and</em> less than the <a href=3D#att=
r-input-min title=3Dattr-input-min>minimum</a>, the element is s=
imultaneously <a href=3D#suffering-from-an-underflow>suffering from=
 an
+  underflow</a> and <a href=3D#suffering-from-an-overflow>su=
ffering from an overflow</a>.</p>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>The following date control limits input to dates that are be=
fore the 1980s:</p>
+
+   <pre><input name=3Dbday type=3Ddate max=3D"1979-12-=
31"></pre>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>The following number control limits input to whole numbers g=
reater than zero:</p>
+
+   <pre><input name=3Dquantity required=3D"" type=
=3D"number" min=3D"1" value=3D"1">&l=
t;/pre>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>The following time control limits input to those minutes tha=
t occur between 9pm and 6am,
+   defaulting to midnight:</p>
+
+   <pre><input name=3D"sleepStart" type=3Dtime mi=
n=3D"21:00" max=3D"06:00" step=3D"60" value=
=3D"00:00"></pre>
+
+  </div>
+
+
+
+  <h6 id=3Dthe-step-attribute><span class=3Dsecno>4.10.5.3.8=
 </span>The <code title=3Dattr-input-step><a href=3D#attr-=
input-step>step</a></code> attribute</h6>
+
+  <p>The <dfn id=3Dattr-input-step title=3Dattr-input-step>&=
lt;code>step</code></dfn> attribute indicates the granular=
ity
+  that is expected (and required) of the <a href=3D#concept-fe-value =
title=3Dconcept-fe-value>value</a>, by limiting
+  the allowed values. <span class=3Dimpl>The section that defines =
the <code title=3Dattr-input-type><a href=3D#attr-input-type>=
type</a></code> attribute's current state also defines the &l=
t;dfn id=3Dconcept-input-step-default title=3Dconcept-input-step-default&=
gt;default step</dfn>, the <dfn id=3Dconcept-input-step-scale ti=
tle=3Dconcept-input-step-scale>step scale factor</dfn>, and in s=
ome cases the <dfn id=3Dconcept-input-step-default-base title=3Dconcep=
t-input-step-default-base>default step base</dfn>, which are use=
d in processing the
+  attribute as described below.</span></p>
+
+  <p>The <code title=3Dattr-input-step><a href=3D#attr-in=
put-step>step</a></code> attribute, if specified, must eit=
her have a value
+  that is a <a href=3D#valid-floating-point-number>valid floating-=
point number</a> that <a href=3D#rules-for-parsing-floating-poin=
t-number-values title=3D"rules for parsing
+  floating-point number values">parses</a> to a number tha=
t is greater than zero, or must have a
+  value that is an <a href=3D#ascii-case-insensitive>ASCII case-in=
sensitive</a> match for the string "<code title=3D"&qu=
ot;>any</code>".</p>
+
+  <div class=3Dimpl>
+
+  <p>The attribute provides the <dfn id=3Dconcept-input-step ti=
tle=3Dconcept-input-step>allowed value step</dfn> for the
+  element, as follows:</p>
+
+  <ol><li>If the attribute is absent, then the <a href=3D=
#concept-input-step title=3Dconcept-input-step>allowed value
+   step</a> is the <a href=3D#concept-input-step-default title=3D=
concept-input-step-default>default step</a> multiplied by the
+   <a href=3D#concept-input-step-scale title=3Dconcept-input-step-sca=
le>step scale factor</a>.</li>
+
+   <li>Otherwise, if the attribute's value is an <a href=3D#asc=
ii-case-insensitive>ASCII case-insensitive</a> match for the
+   string "<code title=3D"">any</code>",=
 then there is no <a href=3D#concept-input-step title=3Dconcept-input-=
step>allowed
+   value step</a>.</li>
+
+   <li>Otherwise, if the <a href=3D#rules-for-parsing-floating-=
point-number-values>rules for parsing floating-point number values<=
/a>, when they are
+   applied to the attribute's value, return an error, zero, or a number =
less than zero, then the
+   <a href=3D#concept-input-step title=3Dconcept-input-step>allowe=
d value step</a> is the <a href=3D#concept-input-step-default ti=
tle=3Dconcept-input-step-default>default step</a> multiplied by =
the <a href=3D#concept-input-step-scale title=3Dconcept-input-step-sca=
le>step scale factor</a>.</li>
+
+   <li>Otherwise, the <a href=3D#concept-input-step title=3Dcon=
cept-input-step>allowed value step</a> is the number
+   returned by the <a href=3D#rules-for-parsing-floating-point-number=
-values>rules for parsing floating-point number values</a> when =
they are applied
+   to the attribute's value, multiplied by the <a href=3D#concept-inp=
ut-step-scale title=3Dconcept-input-step-scale>step scale
+   factor</a>.</li>
+
+  </ol><p>The <dfn id=3Dconcept-input-min-zero title=3Dco=
ncept-input-min-zero>step base</dfn> is the value returned by th=
e following
+  algorithm:</p>
+
+  <ol><li><p>If the element has a <code title=3Datt=
r-input-min><a href=3D#attr-input-min>min</a></code>=
 content attribute, and the
+   result of applying the <a href=3D#concept-input-value-string-numbe=
r title=3Dconcept-input-value-string-number>algorithm to convert a
+   string to a number</a> to the value of the <code title=3Datt=
r-input-min><a href=3D#attr-input-min>min</a></code>=
 content
+   attribute is not an error, then return that result and abort these st=
eps.</li>
+
+   <li><p>If the element has a <code title=3Dattr-input-v=
alue><a href=3D#attr-input-value>value</a></code> co=
ntent attribute, and
+   the result of applying the <a href=3D#concept-input-value-string-n=
umber title=3Dconcept-input-value-string-number>algorithm to convert a
+   string to a number</a> to the value of the <code title=3Datt=
r-input-value><a href=3D#attr-input-value>value</a></co=
de> content
+   attribute is not an error, then return that result and abort these st=
eps.</li>
+
+   <li><p>If a <a href=3D#concept-input-step-default-base=
 title=3Dconcept-input-step-default-base>default step base</a> i=
s defined for
+   this element given its <code title=3Dattr-input-type><a href=
=3D#attr-input-type>type</a></code> attribute's state, the=
n return
+   it and abort these steps.</p>
+
+   <li><p>Return zero.</li>
+
+  </ol><p><strong>Constraint validation</strong>=
: When the element has an <a href=3D#concept-input-step title=3Dconcep=
t-input-step>allowed value step</a>, and the result of applying =
the <a href=3D#concept-input-value-string-number title=3Dconcept-input=
-value-string-number>algorithm to convert a string to a number</a&g=
t; to the
+  string given by the element's <a href=3D#concept-fe-value title=3Dc=
oncept-fe-value>value</a> is a number, and that
+  number subtracted from the <a href=3D#concept-input-min-zero title=3D=
concept-input-min-zero>step base</a> is not an
+  integral multiple of the <a href=3D#concept-input-step title=3Dconc=
ept-input-step>allowed value step</a>, the element
+  is <a href=3D#suffering-from-a-step-mismatch>suffering from a st=
ep mismatch</a>.</p>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>The following range control only accepts values in the range=
 0..1, and allows 256 steps in
+   that range:</p>
+
+   <pre><input name=3Dopacity type=3Drange min=3D0 max=3D1 =
step=3D0.00392156863></pre>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>The following control allows any time in the day to be selec=
ted, with any accuracy (e.g.
+   thousandth-of-a-second accuracy or more):</p>
+
+   <pre><input name=3Dfavtime type=3Dtime step=3Dany&gt=
;</pre>
+
+   <p>Normally, time controls are limited to an accuracy of one mi=
nute.</p>
+
+  </div>
+
+
+
+  <h6 id=3Dthe-list-attribute><span class=3Dsecno>4.10.5.3.9=
 </span>The <code title=3Dattr-input-list><a href=3D#attr-=
input-list>list</a></code> attribute</h6>
+
+  <p>The <dfn id=3Dattr-input-list title=3Dattr-input-list>&=
lt;code>list</code></dfn> attribute is used to identify an
+  element that lists predefined options suggested to the user.</p>
+
+  <p>If present, its value must be the <a href=3D#concept-id ti=
tle=3Dconcept-id>ID</a> of a <code><a href=3D#the-datal=
ist-element>datalist</a></code>
+  element in the same document.</p>
+
+  <div class=3Dimpl>
+
+  <p>The <dfn id=3Dconcept-input-list title=3Dconcept-input-lis=
t>suggestions source element</dfn> is the first element in
+  the document in <a href=3D#tree-order>tree order</a> to ha=
ve an <a href=3D#concept-id title=3Dconcept-id>ID</a> equal t=
o the
+  value of the <code title=3Dattr-input-list><a href=3D#attr-in=
put-list>list</a></code> attribute, if that element is a
+  <code><a href=3D#the-datalist-element>datalist</a>&l=
t;/code> element. If there is no <code title=3Dattr-input-list>&=
lt;a href=3D#attr-input-list>list</a></code> attribute,
+  or if there is no element with that <a href=3D#concept-id title=3Dc=
oncept-id>ID</a>, or if the first element
+  with that <a href=3D#concept-id title=3Dconcept-id>ID</a> =
is not a <code><a href=3D#the-datalist-element>datalist</a=
></code> element, then there is
+  no <a href=3D#concept-input-list title=3Dconcept-input-list>sugg=
estions source element</a>.</p>
+
+  <p>If there is a <a href=3D#concept-input-list title=3Dconcep=
t-input-list>suggestions source element</a>, then, when
+  the user agent is allowing the user to edit the <code><a href=
=3D#the-input-element>input</a></code> element's <a hre=
f=3D#concept-fe-value title=3Dconcept-fe-value>value</a>, the us=
er agent should offer the suggestions represented by
+  the <a href=3D#concept-input-list title=3Dconcept-input-list>sug=
gestions source element</a> to the user in a manner
+  suitable for the type of control used. The user agent may use the sugg=
estion's <a href=3D#concept-option-label title=3Dconcept-option-label&=
gt;label</a> to identify the suggestion if appropriate.</p>
+
+  <p>How user selections of suggestions are handled depends on whe=
ther the element is a control
+  accepting a single value only, or whether it accepts multiple values:&=
lt;/p>
+
+  <dl class=3Dswitch><dt>If the element does not have a <=
code title=3Dattr-input-multiple><a href=3D#attr-input-multiple>=
multiple</a></code> attribute
+   specified or if the <code title=3Dattr-input-multiple><a hre=
f=3D#attr-input-multiple>multiple</a></code> attribute doe=
s <span>not
+   apply</span></dt>
+
+   <dd>
+
+    <p>When the user selects a suggestion, the <code><a h=
ref=3D#the-input-element>input</a></code> element's <a =
href=3D#concept-fe-value title=3Dconcept-fe-value>value</a> must=
 be set to the selected suggestion's <a href=3D#concept-option-value t=
itle=3Dconcept-option-value>value</a>, as if the user had writte=
n that value himself.</p>
+
+   </dd>
+
+   <dt>If the element <em>does</em> have a <code ti=
tle=3Dattr-input-multiple><a href=3D#attr-input-multiple>multipl=
e</a></code>
+   attribute specified, and the <code title=3Dattr-input-multiple>=
<a href=3D#attr-input-multiple>multiple</a></code> attr=
ibute does
+   <a href=3D#concept-input-apply title=3Dconcept-input-apply>appl=
y</a></dt>
+
+   <dd>
+
+    <p>When the user selects a suggestion, the user agent must eit=
her add a new entry to the
+    <code><a href=3D#the-input-element>input</a></c=
ode> element's <a href=3D#concept-fe-values title=3Dconcept-fe-valu=
es>value<em>s</em></a>, whose value
+    is the selected suggestion's <a href=3D#concept-option-value titl=
e=3Dconcept-option-value>value</a>, or change an
+    existing entry in the <code><a href=3D#the-input-element&gt=
;input</a></code> element's <a href=3D#concept-fe-values t=
itle=3Dconcept-fe-values>value<em>s</em></a> to have=
 the value given by the selected
+    suggestion's <a href=3D#concept-option-value title=3Dconcept-opti=
on-value>value</a>, as if the user had himself added
+    an entry with that value, or edited an existing entry to be that val=
ue. Which behavior is to be
+    applied depends on the user interface in a user-agent-defined manner=
.</p>
+
+   </dd>
+
+  </dl><hr><p>If the <code title=3Dattr-input-list&=
gt;<a href=3D#attr-input-list>list</a></code> attribute=
 <a href=3D#do-not-apply title=3D"do not apply">does not
+  apply</a>, there is no <a href=3D#concept-input-list title=3D=
concept-input-list>suggestions source element</a>.</p>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>This URL field offers some suggestions.</p>
+
+   <pre><label>Homepage: <input name=3Dhp typ=
e=3Durl list=3Dhpurls></label>
+<datalist id=3Dhpurls>
+ <option value=3D"http://www.google.com/" label=3D&quot=
;Google">
+ <option value=3D"http://www.reddit.com/" label=3D&quot=
;Reddit">
+</datalist></pre>
+
+   <p>Other URLs from the user's history might show also; this is =
up to the user agent.</p>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>This example demonstrates how to design a form that uses the=
 autocompletion list feature while
+   still degrading usefully in legacy user agents.</p>
+
+   <p>If the autocompletion list is merely an aid, and is not impo=
rtant to the content, then simply
+   using a <code><a href=3D#the-datalist-element>datalist&lt=
;/a></code> element with children <code><a href=3D#the-=
option-element>option</a></code> elements is enough. To
+   prevent the values from being rendered in legacy user agents, they ne=
ed to be placed inside the
+   <code title=3Dattr-option-value><a href=3D#attr-option-value=
>value</a></code> attribute instead of inline.</p>
+
+   <pre><p>
+ <label>
+  Enter a breed:
+  <input type=3D"text" name=3D"breed" list=3D=
"breeds">
+  <datalist id=3D"breeds">
+   <option value=3D"Abyssinian">
+   <option value=3D"Alpaca">
+   <!-- ... -->
+  </datalist>
+ </label>
+</p></pre>
+
+   <p>However, if the values need to be shown in legacy UAs, then =
fallback content can be placed
+   inside the <code><a href=3D#the-datalist-element>datalist=
</a></code> element, as follows:</p>
+
+   <pre><p>
+ <label>
+  Enter a breed:
+  <input type=3D"text" name=3D"breed" list=3D=
"breeds">
+ </label>
+ <datalist id=3D"breeds">
+  <label>
+   or select one from the list:
+   <select name=3D"breed">
+    <option value=3D""> (none selected)
+    <option>Abyssinian
+    <option>Alpaca
+    <!-- ... -->
+   </select>
+  </label>
+ </datalist>
+</p>
+</pre>
+
+   <p>The fallback content will only be shown in UAs that don't su=
pport <code><a href=3D#the-datalist-element>datalist</a&gt=
;</code>. The
+   options, on the other hand, will be detected by all UAs, even though =
they are not children of the
+   <code><a href=3D#the-datalist-element>datalist</a>&=
lt;/code> element.</p>
+
+   <p>Note that if an <code><a href=3D#the-option-element=
>option</a></code> element used in a <code><a hre=
f=3D#the-datalist-element>datalist</a></code> is <code =
title=3Dattr-option-selected><a href=3D#attr-option-selected>sel=
ected</a></code>, it will be selected by default by legacy UA=
s
+   (because it affects the <code><a href=3D#the-select-element&=
gt;select</a></code>), but it will not have any effect on the
+   <code><a href=3D#the-input-element>input</a></co=
de> element in UAs that support <code><a href=3D#the-datalist=
-element>datalist</a></code>.</p>
+
+  </div>
+
+
+
+  <h6 id=3Dthe-placeholder-attribute><span class=3Dsecno>4.1=
0.5.3.10 </span>The <code title=3Dattr-input-placeholder><=
a href=3D#attr-input-placeholder>placeholder</a></code> at=
tribute</h6>
+
+  <!-- substantially similar text in the <textarea> section --&=
gt;
+
+  <p>The <dfn id=3Dattr-input-placeholder title=3Dattr-input-pl=
aceholder><code>placeholder</code></dfn> attribute r=
epresents a
+  <em>short</em> hint (a word or short phrase) intended to a=
id the user with data entry when the
+  control has no value. A hint could be a sample value or a brief descri=
ption of the expected
+  format. The attribute, if specified, must have a value that contains n=
o U+000A LINE FEED (LF) or
+  U+000D CARRIAGE RETURN (CR) characters.</p>
+
+  <p>The <code title=3Dattr-input-placeholder><a href=3D#=
attr-input-placeholder>placeholder</a></code> attribute sh=
ould not be used as an
+  alternative to a <code><a href=3D#the-label-element>label&=
lt;/a></code>. For a longer hint or other advisory text, the &lt=
;code title=3Dattr-title><a href=3D#attr-title>title</a>&l=
t;/code> attribute is more appropriate.</p>
+
+  <p class=3Dnote>These mechanisms are very similar but subtly dif=
ferent: the hint given by the
+  control's <code><a href=3D#the-label-element>label</a&g=
t;</code> is shown at all times; the short hint given in the <co=
de title=3Dattr-input-placeholder><a href=3D#attr-input-placeholder=
>placeholder</a></code> attribute is shown before the user=
 enters a
+  value; and the hint in the <code title=3Dattr-title><a href=3D=
#attr-title>title</a></code> attribute is shown when the u=
ser
+  requests further help.</p>
+
+  <div class=3Dimpl>
+
+  <p>User agents should present this hint to the user, after havin=
g <a href=3D#strip-line-breaks title=3D"strip line
+  breaks">stripped line breaks</a> from it, when the eleme=
nt's <a href=3D#concept-fe-value title=3Dconcept-fe-value>value<=
/a> is the empty string or the control is not focused (or both),
+  e.g. by displaying it inside a blank unfocused control and hiding it o=
therwise.</p>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>Here is an example of a mail configuration user interface th=
at uses the <code title=3Dattr-input-placeholder><a href=3D#attr=
-input-placeholder>placeholder</a></code> attribute:</p=
>
+
+   <pre><fieldset>
+ <legend>Mail Account</legend>
+ <p><label>Name: <input type=3D"=
text" name=3D"fullname" placeholder=3D"John Ratzenber=
ger"></label></p>
+ <p><label>Address: <input type=3D&qu=
ot;email" name=3D"address" placeholder=3D"john at exampl=
e.net"></label></p>
+ <p><label>Password: <input type=3D&q=
uot;password" name=3D"password"></label&=
gt;</p>
+ <p><label>Description: <input type=3D=
"text" name=3D"desc" placeholder=3D"My Email Acc=
ount"></label></p>
+</fieldset></pre>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>In situations where the control's content has one directiona=
lity but the placeholder needs to
+   have a different directionality, Unicode's bidirectional-algorithm fo=
rmatting characters can be
+   used in the attribute value:</p>
+
+   <pre><input name=3Dt1 type=3Dtel placeholder=3D"&lt=
;strong>‫</strong> <bdo dir=3Drtl&g=
t;رقم ال&#=
x647;اتف 1</bdo> =
<strong>‮</strong>">
+<input name=3Dt2 type=3Dtel placeholder=3D"<strong>&am=
p;amp;#x202B;</strong> <bdo dir=3Drtl>ر&=
amp;#x642;م اله&#x62=
7;تف 2</bdo> <strong>=
‮</strong>"></pre>
+
+   <p>For slightly more clarity, here's the same example using num=
eric character references instead of inline Arabic:</p>
+
+   <pre><input name=3Dt1 type=3Dtel placeholder=3D"&lt=
;strong>‫</strong>رق&=
amp;amp;#1605; اله&amp=
;amp;#1575;تف 1<strong>&am=
p;#x202E;</strong>">
+<input name=3Dt2 type=3Dtel placeholder=3D"<strong>&am=
p;amp;#x202B;</strong>رقم=
 الها&am=
p;amp;#1578;ف 2<strong>‮</=
strong>"></pre>
+
+  </div>
+
+
+
+<!--TOPIC:DOM APIs-->
+
+  <h5 id=3Dcommon-input-element-apis><span class=3Dsecno>4.1=
0.5.4 </span>Common <code><a href=3D#the-input-element>=
input</a></code> element APIs</h5>
+
+  <dl class=3Ddomintro><dt><var title=3D"">i=
nput</var> . <code title=3Ddom-input-value><a href=3D#dom-=
input-value>value</a></code> [ =3D <var title=3D"&=
quot;>value</var> ]</dt>
+
+   <dd>
+
+    <p>Returns the current <a href=3D#concept-fe-value title=3D=
concept-fe-value>value</a> of the form control.</p>
+
+    <p>Can be set, to change the value.</p>
+
+    <p>Throws an <code><a href=3D#invalidstateerror>In=
validStateError</a></code> exception if it is set to any valu=
e other than the
+    empty string when the control is a file upload control.</p>
+
+   </dd>
+
+   <dt><var title=3D"">input</var> . <cod=
e title=3Ddom-input-checked><a href=3D#dom-input-checked>checked=
</a></code> [ =3D <var title=3D"">value</v=
ar> ]</dt>
+
+   <dd>
+
+    <p>Returns the current <a href=3D#concept-fe-checked title=3D=
concept-fe-checked>checkedness</a> of the form
+    control.</p>
+
+    <p>Can be set, to change the <a href=3D#concept-fe-checked =
title=3Dconcept-fe-checked>checkedness</a>.</p>
+
+   </dd>
+
+   <dt><var title=3D"">input</var> . <cod=
e title=3Ddom-input-files><a href=3D#dom-input-files>files</a=
></code> <!-- [ =3D <var title=3D"">files<=
/var> ] --></dt>
+
+   <dd>
+
+    <p>Returns a <code><a href=3D#filelist>FileList&lt=
;/a></code> object listing the <a href=3D#concept-input-type-=
file-selected title=3Dconcept-input-type-file-selected>selected files&=
lt;/a> of the form control.</p>
+
+    <p>Returns null if the control isn't a file control.</p>
+
+<!--
+    <p>Can be set to an array of <code>File</code> or =
<code>Blob</code> instances.</p>-
+-->
+
+   </dd>
+
+   <dt><var title=3D"">input</var> . <cod=
e title=3Ddom-input-valueAsDate><a href=3D#dom-input-valueasdate&gt=
;valueAsDate</a></code> [ =3D <var title=3D""&gt=
;value</var> ]</dt>
+
+   <dd>
+
+    <p>Returns a <code>Date</code> object representing=
 the form control's <a href=3D#concept-fe-value title=3Dconcept-fe-val=
ue>value</a>, if applicable; otherwise, returns null.</p>
+
+    <p>Can be set, to change the value.</p>
+
+    <p>Throws an <code><a href=3D#invalidstateerror>In=
validStateError</a></code> exception if the control isn't dat=
e- or
+    time-based.</p>
+
+   </dd>
+
+   <dt><var title=3D"">input</var> . <cod=
e title=3Ddom-input-valueAsNumber><a href=3D#dom-input-valueasnumbe=
r>valueAsNumber</a></code> [ =3D <var title=3D"&qu=
ot;>value</var> ]</dt>
+
+   <dd>
+
+    <p>Returns a number representing the form control's <a href=
=3D#concept-fe-value title=3Dconcept-fe-value>value</a>,
+    if applicable; otherwise, returns NaN.</p>
+
+    <p>Can be set, to change the value. Setting this to NaN will s=
et the underlying value to the
+    empty string.</p>
+
+    <p>Throws an <code><a href=3D#invalidstateerror>In=
validStateError</a></code> exception if the control is neithe=
r date- or
+    time-based nor numeric.</p>
+
+   </dd>
+
+   <dt><var title=3D"">input</var> . <cod=
e title=3Ddom-input-stepUp><a href=3D#dom-input-stepup>stepUp&lt=
;/a></code>( [ <var title=3D"">n</var> ] )=
</dt>
+   <dt><var title=3D"">input</var> . <cod=
e title=3Ddom-input-stepDown><a href=3D#dom-input-stepdown>stepD=
own</a></code>( [ <var title=3D"">n</var&g=
t; ] )</dt>
+
+   <dd>
+
+    <p>Changes the form control's <a href=3D#concept-fe-value t=
itle=3Dconcept-fe-value>value</a> by the value given in
+    the <code title=3Dattr-input-step><a href=3D#attr-input-ste=
p>step</a></code> attribute, multiplied by <var title=3D=
"">n</var>.
+    The default value for <var title=3D"">n</var> =
is 1.</p>
+
+    <p>Throws <code><a href=3D#invalidstateerror>Inval=
idStateError</a></code> exception if the control is neither d=
ate- or time-based
+    nor numeric, or if the <code title=3Dattr-input-step><a hre=
f=3D#attr-input-step>step</a></code> attribute's value is =
"<code title=3D"">any</code>".</p>
+
+   </dd>
+
+   <dt><var title=3D"">input</var> . <cod=
e title=3Ddom-input-list><a href=3D#dom-input-list>list</a&gt=
;</code></dt>
+
+   <dd>
+
+    <p>Returns the <code><a href=3D#the-datalist-element&=
gt;datalist</a></code> element indicated by the <code titl=
e=3Dattr-input-list><a href=3D#attr-input-list>list</a>&lt=
;/code> attribute.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-input-value title=3Ddom-input-value>&=
lt;code>value</code></dfn> IDL attribute allows scripts to
+  manipulate the <a href=3D#concept-fe-value title=3Dconcept-fe-value=
>value</a> of an <code><a href=3D#the-input-element>=
input</a></code> element. The
+  attribute is in one of the following modes, which define its behavior:=
</p>
+
+  <dl><dt><dfn id=3Ddom-input-value-value title=3Ddom-inp=
ut-value-value>value</dfn>
+
+   <dd>
+
+    <p>On getting, it must return the current <a href=3D#concep=
t-fe-value title=3Dconcept-fe-value>value</a> of the
+    element. On setting, it must set the element's <a href=3D#concept=
-fe-value title=3Dconcept-fe-value>value</a> to
+    the new value, set the element's <a href=3D#concept-input-value-d=
irty-flag title=3Dconcept-input-value-dirty-flag>dirty value
+    flag</a> to true, invoke the <a href=3D#value-sanitization-=
algorithm>value sanitization algorithm</a>, if the element's
+    <code title=3Dattr-input-type><a href=3D#attr-input-type&gt=
;type</a></code> attribute's current state defines one, and t=
hen, if
+    the element has a text entry cursor position, should move the text e=
ntry cursor position to the
+    end of the text field, unselecting any selected text and resetting t=
he selection direction to
+    <i>none</i>.</p>
+
+   </dd>
+
+   <dt><dfn id=3Ddom-input-value-default title=3Ddom-input-valu=
e-default>default</dfn>
+
+   <dd>
+
+    <p>On getting, if the element has a <code title=3Dattr-inpu=
t-value><a href=3D#attr-input-value>value</a></code>=
 attribute, it
+    must return that attribute's value; otherwise, it must return the em=
pty string. On setting, it
+    must set the element's <code title=3Dattr-input-value><a hr=
ef=3D#attr-input-value>value</a></code> attribute to the n=
ew
+    value.</p>
+
+   </dd>
+
+   <dt><dfn id=3Ddom-input-value-default-on title=3Ddom-input-v=
alue-default-on>default/on</dfn>
+
+   <dd>
+
+    <p>On getting, if the element has a <code title=3Dattr-inpu=
t-value><a href=3D#attr-input-value>value</a></code>=
 attribute, it
+    must return that attribute's value; otherwise, it must return the st=
ring "<code title=3D"">on</code>". On set=
ting, it must set the element's <code title=3Dattr-input-value><=
a href=3D#attr-input-value>value</a></code> attribute to t=
he new value.</p>
+
+   </dd>
+
+   <dt><dfn id=3Ddom-input-value-filename title=3Ddom-input-val=
ue-filename>filename</dfn>
+
+   <dd id=3Dfakepath-orly>
+
+    <p>On getting, it must return the string "<code title=3D=
"">C:\fakepath\</code>" followed by the
+    name of the first file in the list of <a href=3D#concept-input-ty=
pe-file-selected title=3Dconcept-input-type-file-selected>selected
+    files</a>, if any, or the empty string if the list is empty. O=
n setting, if the new value is
+    the empty string, it must empty the list of <a href=3D#concept-in=
put-type-file-selected title=3Dconcept-input-type-file-selected>select=
ed files</a>; otherwise, it must throw an
+    <code><a href=3D#invalidstateerror>InvalidStateError<=
/a></code> exception.</p>
+
+    <p class=3Dnote>This "fakepath" requirement is a sad=
 accident of history. See <a href=3D#fakepath-srsly>the example in =
the File Upload state section</a> for more
+    information.</p>
+
+   </dd>
+
+  </dl><hr><p>The <dfn id=3Ddom-input-checked title=
=3Ddom-input-checked><code>checked</code></dfn> IDL =
attribute allows scripts to
+  manipulate the <a href=3D#concept-fe-checked title=3Dconcept-fe-che=
cked>checkedness</a> of an <code><a href=3D#the-input-e=
lement>input</a></code>
+  element. On getting, it must return the current <a href=3D#concept-=
fe-checked title=3Dconcept-fe-checked>checkedness</a> of the ele=
ment; and on setting, it must set the
+  element's <a href=3D#concept-fe-checked title=3Dconcept-fe-checked&=
gt;checkedness</a> to the new value and set the
+  element's <a href=3D#concept-input-checked-dirty-flag title=3Dconce=
pt-input-checked-dirty-flag>dirty checkedness flag</a> to
+  true.</p>
+
+  <hr><p>The <dfn id=3Ddom-input-files title=3Ddom-input-=
files><code>files</code></dfn> IDL attribute allows =
scripts to
+  access the element's <a href=3D#concept-input-type-file-selected ti=
tle=3Dconcept-input-type-file-selected>selected files</a>. On
+  getting, if the IDL attribute <a href=3D#concept-input-apply title=3D=
concept-input-apply>applies</a>, it must return a
+  <code><a href=3D#filelist>FileList</a></code> =
object that represents the current <a href=3D#concept-input-type-file-=
selected title=3Dconcept-input-type-file-selected>selected files</a=
>. The same object must be returned
+  until the list of <a href=3D#concept-input-type-file-selected title=
=3Dconcept-input-type-file-selected>selected files</a> changes. =
If
+  the IDL attribute <a href=3D#do-not-apply title=3D"do not appl=
y">does not apply</a>, then it must instead return
+  null. <a href=3D#refsFILEAPI>[FILEAPI]</a></p>
+
+  <hr><p>The <dfn id=3Ddom-input-valueasdate title=3Ddom-=
input-valueAsDate><code>valueAsDate</code></dfn> IDL=
 attribute represents
+  the <a href=3D#concept-fe-value title=3Dconcept-fe-value>value&l=
t;/a> of the element, interpreted as a date.</p>
+
+  <p>On getting, if the <code title=3Ddom-input-valueAsDate>=
<a href=3D#dom-input-valueasdate>valueAsDate</a></code>=
 attribute <a href=3D#do-not-apply title=3D"do not apply"&gt=
;does not apply</a>, as defined for the <code><a href=3D#t=
he-input-element>input</a></code> element's <code title=
=3Dattr-input-type><a href=3D#attr-input-type>type</a><=
/code> attribute's current state, then return null. Otherwise, run
+  the <a href=3D#concept-input-value-string-date title=3Dconcept-inpu=
t-value-string-date>algorithm to convert a string to a
+  <code>Date</code> object</a> defined for that state;=
 if the algorithm returned a
+  <code>Date</code> object, then return it, otherwise, retur=
n null.</p>
+
+  <p>On setting, if the <code title=3Ddom-input-valueAsDate>=
<a href=3D#dom-input-valueasdate>valueAsDate</a></code>=
 attribute <a href=3D#do-not-apply title=3D"do not apply"&gt=
;does not apply</a>, as defined for the <code><a href=3D#t=
he-input-element>input</a></code> element's <code title=
=3Dattr-input-type><a href=3D#attr-input-type>type</a><=
/code> attribute's current state, then throw an
+  <code><a href=3D#invalidstateerror>InvalidStateError</a=
></code> exception; otherwise, if the new value is null or a
+  <code>Date</code> object representing the NaN time value, =
then set the <a href=3D#concept-fe-value title=3Dconcept-fe-value>v=
alue</a> of the element to the empty string; otherwise, run the &lt=
;a href=3D#concept-input-value-date-string title=3Dconcept-input-value-da=
te-string>algorithm to convert a <code>Date</code> object =
to a
+  string</a>, as defined for that state, on the new value, and set=
 the <a href=3D#concept-fe-value title=3Dconcept-fe-value>value<=
/a> of the element to the resulting string.</p>
+
+  <hr><p>The <dfn id=3Ddom-input-valueasnumber title=3Ddo=
m-input-valueAsNumber><code>valueAsNumber</code></dfn&g=
t; IDL attribute
+  represents the <a href=3D#concept-fe-value title=3Dconcept-fe-value=
>value</a> of the element, interpreted as a
+  number.</p>
+
+  <p>On getting, if the <code title=3Ddom-input-valueAsNumber&g=
t;<a href=3D#dom-input-valueasnumber>valueAsNumber</a></co=
de> attribute <a href=3D#do-not-apply title=3D"do not apply&qu=
ot;>does not apply</a>, as defined for the <code><a hre=
f=3D#the-input-element>input</a></code> element's <code=
 title=3Dattr-input-type><a href=3D#attr-input-type>type</a&g=
t;</code> attribute's current state, then return a Not-a-Number (Na=
N)
+  value. Otherwise, if the <code title=3Ddom-input-valueAsDate>&lt=
;a href=3D#dom-input-valueasdate>valueAs<em>Date</em></=
a></code> attribute
+  <a href=3D#concept-input-apply title=3Dconcept-input-apply>appli=
es</a>, run the <a href=3D#concept-input-value-string-date title=
=3Dconcept-input-value-string-date>algorithm to convert a string to a =
<code>Date</code>
+  object</a> defined for that state; if the algorithm returned a &=
lt;code>Date</code> object, then
+  return the <i>time value</i> of the object (the number of =
milliseconds from midnight UTC the
+  morning of 1970-01-01 to the time represented by the <code>Date&=
lt;/code> object), otherwise, return
+  a Not-a-Number (NaN) value. Otherwise, run the <a href=3D#concept-i=
nput-value-string-number title=3Dconcept-input-value-string-number>alg=
orithm to convert a string to a number</a> defined
+  for that state; if the algorithm returned a number, then return it, ot=
herwise, return a
+  Not-a-Number (NaN) value.</p>
+
+  <p>On setting, if the new value is infinite, then throw a <co=
de>TypeError</code> exception.
+  Otherwise, if the <code title=3Ddom-input-valueAsNumber><a hr=
ef=3D#dom-input-valueasnumber>valueAsNumber</a></code> att=
ribute <a href=3D#do-not-apply title=3D"do not apply">doe=
s not apply</a>, as defined for the <code><a href=3D#the-i=
nput-element>input</a></code> element's <code title=3Da=
ttr-input-type><a href=3D#attr-input-type>type</a></cod=
e> attribute's current state, then throw an
+  <code><a href=3D#invalidstateerror>InvalidStateError</a=
></code> exception. Otherwise, if the new value is a Not-a-Numbe=
r (NaN)
+  value, then set the <a href=3D#concept-fe-value title=3Dconcept-fe-=
value>value</a> of the element to the empty
+  string. Otherwise, if the <code title=3Ddom-input-valueAsDate>&l=
t;a href=3D#dom-input-valueasdate>valueAs<em>Date</em><=
/a></code>
+  attribute <a href=3D#concept-input-apply title=3Dconcept-input-appl=
y>applies</a>, run the <a href=3D#concept-input-value-date-st=
ring title=3Dconcept-input-value-date-string>algorithm to convert a &l=
t;code>Date</code> object to a
+  string</a> defined for that state, passing it a <code>Date=
</code> object whose <i>time
+  value</i> is the new value, and set the <a href=3D#concept-fe=
-value title=3Dconcept-fe-value>value</a> of the element
+  to the resulting string. Otherwise, run the <a href=3D#concept-inpu=
t-value-number-string title=3Dconcept-input-value-number-string>algori=
thm to convert a number to a string</a>, as
+  defined for that state, on the new value, and set the <a href=3D#co=
ncept-fe-value title=3Dconcept-fe-value>value</a>
+  of the element to the resulting string.</p>
+
+  <hr><p>The <dfn id=3Ddom-input-stepdown title=3Ddom-inp=
ut-stepDown><code>stepDown(<var title=3D"">n<=
/var>)</code></dfn> and <dfn id=3Ddom-input-stepup titl=
e=3Ddom-input-stepUp><code>stepUp(<var title=3D""&g=
t;n</var>)</code></dfn> methods, when invoked,
+  must run the following algorithm:</p>
+
+  <ol><li><p>If the <code title=3Ddom-input-stepDow=
n><a href=3D#dom-input-stepdown>stepDown()</a></code&gt=
; and <code title=3Ddom-input-stepUp><a href=3D#dom-input-stepup=
>stepUp()</a></code> methods <a href=3D#do-not-apply&gt=
;do not apply</a>, as defined for the
+   <code><a href=3D#the-input-element>input</a></co=
de> element's <code title=3Dattr-input-type><a href=3D#attr-i=
nput-type>type</a></code> attribute's current state,
+   then throw an <code><a href=3D#invalidstateerror>InvalidS=
tateError</a></code> exception, and abort these steps.</li=
>
+
+   <li><p>If the element has no <a href=3D#concept-input-=
step title=3Dconcept-input-step>allowed value step</a>, then
+   throw an <code><a href=3D#invalidstateerror>InvalidStateE=
rror</a></code> exception, and abort these steps.</li>
+
+   <li><p>If the element has a <a href=3D#concept-input-m=
in title=3Dconcept-input-min>minimum</a> and a <a href=3D#con=
cept-input-max title=3Dconcept-input-max>maximum</a> and the &lt=
;a href=3D#concept-input-min title=3Dconcept-input-min>minimum</a&g=
t;
+   is greater than the <a href=3D#concept-input-max title=3Dconcept-i=
nput-max>maximum</a>, then abort these steps.</p>
+
+   <li><p>If the element has a <a href=3D#concept-input-m=
in title=3Dconcept-input-min>minimum</a> and a <a href=3D#con=
cept-input-max title=3Dconcept-input-max>maximum</a> and there i=
s no value greater than or equal to the
+   element's <a href=3D#concept-input-min title=3Dconcept-input-min&g=
t;minimum</a> and less than or equal to the element's
+   <a href=3D#concept-input-max title=3Dconcept-input-max>maximum&=
lt;/a> that, when subtracted from the <a href=3D#concept-input-min-=
zero title=3Dconcept-input-min-zero>step base</a>, is an integra=
l multiple of the <a href=3D#concept-input-step title=3Dconcept-input-=
step>allowed value step</a>, then abort these steps.</p>
+
+   <li><p>If applying the <a href=3D#concept-input-value-=
string-number title=3Dconcept-input-value-string-number>algorithm to c=
onvert a
+   string to a number</a> to the string given by the element's &lt=
;a href=3D#concept-fe-value title=3Dconcept-fe-value>value</a> d=
oes not result in an error, then let <var title=3D"">valu=
e</var> be the result of that algorithm. Otherwise, let <var tit=
le=3D"">value</var> be
+   zero.</li>
+
+   <li>
+
+    <p>If <var title=3D"">value</var> subtra=
cted from the <a href=3D#concept-input-min-zero title=3Dconcept-input-=
min-zero>step
+    base</a> is not an integral multiple of the <a href=3D#conc=
ept-input-step title=3Dconcept-input-step>allowed value
+    step</a>, then set <var title=3D"">value</v=
ar> to the nearest value that, when subtracted from
+    the <a href=3D#concept-input-min-zero title=3Dconcept-input-min-z=
ero>step base</a>, is an integral multiple of the <a href=3D#=
concept-input-step title=3Dconcept-input-step>allowed value step</a=
>, and that is less than <var title=3D"">value</var=
> if the method invoked was the <code title=3Ddom-input-stepDown&gt=
;<a href=3D#dom-input-stepdown>stepDown()</a></code> an=
d more than <var title=3D"">value</var>
+    otherwise.</p>
+
+    <p>Otherwise (<var title=3D"">value</var&gt=
; subtracted from the <a href=3D#concept-input-min-zero title=3Dconcep=
t-input-min-zero>step base</a> is an integral multiple of the &l=
t;a href=3D#concept-input-step title=3Dconcept-input-step>allowed valu=
e step</a>), run the following substeps:</p>
+
+    <ol><li><p>Let <var title=3D"">n&l=
t;/var> be the argument.</li>
+
+     <li><p>Let <var title=3D"">delta</va=
r> be the <a href=3D#concept-input-step title=3Dconcept-input-step&=
gt;allowed value
+     step</a> multiplied by <var title=3D"">n</=
var>.</li>
+
+     <li><p>If the method invoked was the <code title=3Dd=
om-input-stepDown><a href=3D#dom-input-stepdown>stepDown()</a=
></code> method,
+     negate <var title=3D"">delta</var>.</li&gt=
;
+
+     <li><p>Let <var title=3D"">value</va=
r> be the result of adding <var title=3D"">delta</v=
ar> to <var title=3D"">value</var>.</li>
+
+    </ol></li>
+
+   <li><p>If the element has a <a href=3D#concept-input-m=
in title=3Dconcept-input-min>minimum</a>, and <var title=3D&q=
uot;">value</var> is less than that <a href=3D#concept-i=
nput-min title=3Dconcept-input-min>minimum</a>, then set
+   <var title=3D"">value</var> to the smallest val=
ue that, when subtracted from the <a href=3D#concept-input-min-zero ti=
tle=3Dconcept-input-min-zero>step base</a>, is an integral multi=
ple of the <a href=3D#concept-input-step title=3Dconcept-input-step&gt=
;allowed value step</a>, and that is more than or equal to <var =
title=3D"">minimum</var>.</li>
+
+   <li><p>If the element has a <a href=3D#concept-input-m=
in title=3Dconcept-input-min>maximum</a>, and <var title=3D&q=
uot;">value</var> is greater than that <a href=3D#concep=
t-input-min title=3Dconcept-input-min>maximum</a>, then
+   set <var title=3D"">value</var> to the largest =
value that, when subtracted from the <a href=3D#concept-input-min-zero=
 title=3Dconcept-input-min-zero>step base</a>, is an integral mu=
ltiple of the <a href=3D#concept-input-step title=3Dconcept-input-step=
>allowed value step</a>, and that is less than or equal to <v=
ar title=3D"">maximum</var>.</li>
+
+   <li><p>Let <var title=3D"">value as strin=
g</var> be the result of running the <a href=3D#concept-input-va=
lue-number-string title=3Dconcept-input-value-number-string>algorithm =
to convert a number to a string</a>, as
+   defined for the <code><a href=3D#the-input-element>input&=
lt;/a></code> element's <code title=3Dattr-input-type><=
a href=3D#attr-input-type>type</a></code>
+   attribute's current state, on <var title=3D"">value&l=
t;/var>.</li>
+
+   <li><p>Set the <a href=3D#concept-fe-value title=3Dcon=
cept-fe-value>value</a> of the element to <var title=3D"=
">value
+   as string</var>.</li>
+
+  </ol><hr><p>The <dfn id=3Ddom-input-list title=3D=
dom-input-list><code>list</code></dfn> IDL attribute=
 must return the current
+  <a href=3D#concept-input-list title=3Dconcept-input-list>suggest=
ions source element</a>, if any, or null otherwise.</p>
+
+  </div>
+<!--TOPIC:HTML-->
+
+
+  <div class=3Dimpl>
+
+  <h5 id=3Dcommon-event-behaviors><span class=3Dsecno>4.10.5=
.5 </span>Common event behaviors</h5>
+
+  <p>When the <dfn id=3Devent-input-input title=3Devent-input-i=
nput><code>input</code></dfn> event <a href=3D#co=
ncept-input-apply title=3Dconcept-input-apply>applies</a>, any t=
ime the user causes the element's <a href=3D#concept-fe-value title=3D=
concept-fe-value>value</a> to change, the user agent must <a =
href=3D#queue-a-task>queue a task</a> to
+  <a href=3D#fire-a-simple-event>fire a simple event</a> tha=
t bubbles named <code title=3Devent-input>input</code> at the
+  <code><a href=3D#the-input-element>input</a></cod=
e> element. User agents may wait for a suitable break in the user's in=
teraction
+  before queuing the task; for example, a user agent could wait for the =
user to have not hit a key
+  for 100ms, so as to only fire the event when the user pauses, instead =
of continuously for each
+  keystroke.</p> <!-- same text is present in the <textarea&=
gt; section -->
+
+  <p class=3Dexample>Examples of a user changing the element's &lt=
;a href=3D#concept-fe-value title=3Dconcept-fe-value>value</a> w=
ould include the user typing into a text field, pasting a
+  new value into the field, or undoing an edit in that field. Some user =
interactions do not cause
+  changes to the value, e.g. hitting the "delete" key in an em=
pty text field, or replacing some text
+  in the field with text from the clipboard that happens to be exactly t=
he same text.</p>
+
+  <p>When the <dfn id=3Devent-input-change title=3Devent-input-=
change><code>change</code></dfn> event <a href=3D=
#concept-input-apply title=3Dconcept-input-apply>applies</a>, if=
 the element does not have an <a href=3D#activation-behavior>activa=
tion
+  behavior</a> defined but uses a user interface that involves an =
explicit commit action, then
+  any time the user commits a change to the element's <a href=3D#conc=
ept-fe-value title=3Dconcept-fe-value>value</a> or
+  list of <a href=3D#concept-input-type-file-selected title=3Dconcept=
-input-type-file-selected>selected files</a>, the user agent mus=
t
+  <a href=3D#queue-a-task>queue a task</a> to <a href=3D#=
fire-a-simple-event>fire a simple event</a> that bubbles named &=
lt;code title=3Devent-change>change</code> at the <code>&l=
t;a href=3D#the-input-element>input</a></code> element.&lt=
;/p>
+
+  <p class=3Dexample>An example of a user interface with a commit =
action would be a <a href=3D"#file-upload-state-(type=3Dfile)&quo=
t; title=3Dattr-input-type-file>File Upload</a> control that con=
sists of a single button that
+  brings up a file selection dialog: when the dialog is closed, if that =
the <a href=3D#concept-input-type-file-selected title=3Dconcept-input-=
type-file-selected>file selection</a> changed as a result, then =
the user
+  has committed a new <a href=3D#concept-input-type-file-selected tit=
le=3Dconcept-input-type-file-selected>file selection</a>.</p&=
gt;
+
+  <p class=3Dexample>Another example of a user interface with a co=
mmit action would be a <a href=3D"#date-state-(type=3Ddate)"=
 title=3Dattr-input-type-date>Date</a> control that allows both =
text-based user input and user
+  selection from a drop-down calendar: while text input might not have a=
n explicit commit step,
+  selecting a date from the drop down calendar and then dismissing the d=
rop down would be a commit
+  action.</p>
+
+  <p class=3Dexample>A third example of a user interface with a co=
mmit action would be a <a href=3D"#range-state-(type=3Drange)&quo=
t; title=3Dattr-input-type-range>Range</a> controls that use a s=
lider. While the user is dragging
+  the control's knob, <code title=3Devent-input>input</code>=
 events would fire whenever the position
+  changed, whereas the <code title=3Devent-change>change</code&=
gt; event would only fire when the user
+  let go of the knob, committing to a specific value.</p>
+
+  <p>When the user agent changes the element's <a href=3D#conce=
pt-fe-value title=3Dconcept-fe-value>value</a> on behalf
+  of the user (e.g. as part of a form prefilling feature), the user agen=
t must follow these
+  steps:</p>
+
+  <ol><li>If the <code title=3Devent-input-input><a=
 href=3D#event-input-input>input</a></code> event <a hr=
ef=3D#concept-input-apply title=3Dconcept-input-apply>applies</a&gt=
;, <a href=3D#queue-a-task>queue a task</a> to <a href=3D#=
fire-a-simple-event>fire a simple
+   event</a> that bubbles named <code title=3Devent-input>in=
put</code> at the <code><a href=3D#the-input-element>in=
put</a></code>
+   element.</li>
+
+   <li>If the <code title=3Devent-input-change><a href=3D=
#event-input-change>change</a></code> event <a href=3D#=
concept-input-apply title=3Dconcept-input-apply>applies</a>, &lt=
;a href=3D#queue-a-task>queue a task</a> to <a href=3D#fire-a=
-simple-event>fire a simple
+   event</a> that bubbles named <code title=3Devent-change>c=
hange</code> at the
+   <code><a href=3D#the-input-element>input</a></co=
de> element.</li>
+
+  </ol><p class=3Dnote>In addition, when the <code title=3D=
event-input-change><a href=3D#event-input-change>change</a&gt=
;</code> event <a href=3D#concept-input-apply title=3Dconcept-in=
put-apply>applies</a>, <code title=3Devent-change>change&l=
t;/code> events can
+  also be fired as part of the element's <a href=3D#activation-behavi=
or>activation behavior</a> and as part of the
+  <a href=3D#unfocusing-steps>unfocusing steps</a>.</p&gt=
;
+
+  <p>The <a href=3D#task-source>task source</a> for th=
ese <a href=3D#concept-task title=3Dconcept-task>tasks</a> is=
 the
+  <a href=3D#user-interaction-task-source>user interaction task so=
urce</a>.</p>
+
+  </div>
+
+
+
+  <h4 id=3Dthe-button-element><span class=3Dsecno>4.10.6 &lt=
;/span>The <dfn><code>button</code></dfn> elem=
ent</h4>
+
+  <dl class=3Delement><dt><a href=3D#element-dfn-categori=
es title=3Delement-dfn-categories>Categories</a>:</dt>
+   <dd><a href=3D#flow-content>Flow content</a>.</d=
d>
+   <dd><a href=3D#phrasing-content>Phrasing content</a&gt=
;.</dd>
+   <dd><a href=3D#interactive-content>Interactive content&lt=
;/a>.</dd>
+   <dd><a href=3D#category-listed title=3Dcategory-listed>Li=
sted</a>, <a href=3D#category-label title=3Dcategory-label>la=
belable</a>, <a href=3D#category-submit title=3Dcategory-submit&=
gt;submittable</a>, and <a href=3D#category-form-attr title=3Dca=
tegory-form-attr>reassociateable</a> <a href=3D#form-associat=
ed-element>form-associated element</a>.</dd>
+   <dd><a href=3D#palpable-content>Palpable content</a&gt=
;.</dd>
+   <dt><a href=3D#element-dfn-contexts title=3Delement-dfn-cont=
exts>Contexts in which this element can be used</a>:</dt>
+   <dd>Where <a href=3D#phrasing-content>phrasing content&lt=
;/a> is expected.</dd>
+   <dt><a href=3D#element-dfn-content-model title=3Delement-dfn=
-content-model>Content model</a>:</dt>
+   <dd><a href=3D#phrasing-content>Phrasing content</a&gt=
;, but there must be no <a href=3D#interactive-content>interactive =
content</a> descendant.</dd>
+   <dt><a href=3D#element-dfn-tag-omission title=3Delement-dfn-=
tag-omission>Tag omission in text/html</a>:</dt>
+   <dd>Neither tag is omissible.</dd>
+   <dt><a href=3D#element-dfn-attributes title=3Delement-dfn-at=
tributes>Content attributes</a>:</dt>
+   <dd><a href=3D#global-attributes>Global attributes</a&=
gt;</dd>
+   <dd><code title=3Dattr-fe-autofocus><a href=3D#attr-fe=
-autofocus>autofocus</a></code> — Automatically =
focus the form control when the page is loaded</dd>
+   <dd><code title=3Dattr-fe-disabled><a href=3D#attr-fe-=
disabled>disabled</a></code> — Whether the form =
control is disabled</dd>
+   <dd><code title=3Dattr-fae-form><a href=3D#attr-fae-fo=
rm>form</a></code> — Associates the control with=
 a <code><a href=3D#the-form-element>form</a></code&=
gt; element</dd>
+   <dd><code title=3Dattr-fs-formaction><a href=3D#attr-f=
s-formaction>formaction</a></code> — <a href=3D=
#url>URL</a> to use for <a href=3D#form-submission>form su=
bmission</a></dd>
+   <dd><code title=3Dattr-fs-formenctype><a href=3D#attr-=
fs-formenctype>formenctype</a></code> — Form dat=
a set encoding type to use for <a href=3D#form-submission>form subm=
ission</a></dd>
+   <dd><code title=3Dattr-fs-formmethod><a href=3D#attr-f=
s-formmethod>formmethod</a></code> — HTTP method=
 to use for <a href=3D#form-submission>form submission</a>&lt=
;/dd>
+   <dd><code title=3Dattr-fs-formnovalidate><a href=3D#at=
tr-fs-formnovalidate>formnovalidate</a></code> —=
 Bypass form control validation for <a href=3D#form-submission>form=
 submission</a></dd>
+   <dd><code title=3Dattr-fs-formtarget><a href=3D#attr-f=
s-formtarget>formtarget</a></code> — <a href=3D=
#browsing-context>Browsing context</a> for <a href=3D#form-su=
bmission>form submission</a></dd>
+   <dd><code title=3Dattr-button-menu><a href=3D#attr-but=
ton-menu>menu</a></code> — Specifies the element=
's <a href=3D#designated-pop-up-menu>designated pop-up menu</a&g=
t;</dd>
+   <dd><code title=3Dattr-fe-name><a href=3D#attr-fe-name=
>name</a></code> — Name of form control to use f=
or <a href=3D#form-submission>form submission</a> and in the =
<code title=3Ddom-form-elements><a href=3D#dom-form-elements>=
form.elements</a></code> API</dd>
+   <dd><code title=3Dattr-button-type><a href=3D#attr-but=
ton-type>type</a></code> — Type of button</dd=
>
+   <dd><code title=3Dattr-button-value><a href=3D#attr-bu=
tton-value>value</a></code> — Value to be used f=
or <a href=3D#form-submission>form submission</a></dd>
+   <dt><a href=3D#element-dfn-dom title=3Delement-dfn-dom>DO=
M interface</a>:</dt><!--TOPIC:DOM APIs-->
+   <dd>
+<pre class=3Didl>interface <dfn id=3Dhtmlbuttonelement>HTMLB=
uttonElement</dfn> : <a href=3D#htmlelement>HTMLElement</a=
> {
+           attribute boolean <a href=3D#dom-fe-autofocus title=3Ddom-=
fe-autofocus>autofocus</a>;
+           attribute boolean <a href=3D#dom-fe-disabled title=3Ddom-f=
e-disabled>disabled</a>;
+  readonly attribute <a href=3D#htmlformelement>HTMLFormElement&lt=
;/a>? <a href=3D#dom-fae-form title=3Ddom-fae-form>form</a&gt=
;;
+           attribute DOMString <a href=3D#dom-fs-formaction title=3Dd=
om-fs-formAction>formAction</a>;
+           attribute DOMString <a href=3D#dom-fs-formenctype title=3D=
dom-fs-formEnctype>formEnctype</a>;
+           attribute DOMString <a href=3D#dom-fs-formmethod title=3Dd=
om-fs-formMethod>formMethod</a>;
+           attribute boolean <a href=3D#dom-fs-formnovalidate title=3D=
dom-fs-formNoValidate>formNoValidate</a>;
+           attribute DOMString <a href=3D#dom-fs-formtarget title=3Dd=
om-fs-formTarget>formTarget</a>;
+           attribute DOMString <a href=3D#dom-fe-name title=3Ddom-fe-=
name>name</a>;
+           attribute DOMString <a href=3D#dom-button-type title=3Ddom=
-button-type>type</a>;
+           attribute DOMString <a href=3D#dom-button-value title=3Ddo=
m-button-value>value</a>;
+           attribute <a href=3D#htmlmenuelement>HTMLMenuElement&lt=
;/a>? <a href=3D#dom-button-menu title=3Ddom-button-menu>menu&lt=
;/a>;
+
+  readonly attribute boolean <a href=3D#dom-cva-willvalidate title=3D=
dom-cva-willValidate>willValidate</a>;
+  readonly attribute <a href=3D#validitystate>ValidityState</a&=
gt; <a href=3D#dom-cva-validity title=3Ddom-cva-validity>validity&l=
t;/a>;
+  readonly attribute DOMString <a href=3D#dom-cva-validationmessage t=
itle=3Ddom-cva-validationMessage>validationMessage</a>;
+  boolean <a href=3D#dom-cva-checkvalidity title=3Ddom-cva-checkValid=
ity>checkValidity</a>();
+  boolean <a href=3D#dom-cva-reportvalidity title=3Ddom-cva-reportVal=
idity>reportValidity</a>();
+  void <a href=3D#dom-cva-setcustomvalidity title=3Ddom-cva-setCustom=
Validity>setCustomValidity</a>(DOMString error);
+
+  readonly attribute <a href=3D#nodelist>NodeList</a> <a =
href=3D#dom-lfe-labels title=3Ddom-lfe-labels>labels</a>;
+};</pre>
+   </dd>
+  </dl><!--TOPIC:HTML--><p>The <code><a href=3D=
#the-button-element>button</a></code> element <a href=3D=
#represents>represents</a> a button labeled by its contents.<=
/p>
+
+  <p>The element is a <a href=3D#concept-button title=3Dconcept=
-button>button</a>.</p>
+
+  <p>The <dfn id=3Dattr-button-type title=3Dattr-button-type&gt=
;<code>type</code></dfn> attribute controls the behavio=
r of
+  the button when it is activated. It is an <a href=3D#enumerated-att=
ribute>enumerated attribute</a>. The following table
+  lists the keywords and states for the attribute — the keywor=
ds in the left column map to the
+  states in the cell in the second column on the same row as the keyword=
.</p>
+
+  <table><thead><tr><th> Keyword
+     <th> State
+     <th> Brief description
+   <tbody><tr><td><dfn id=3Dattr-button-type-submit=
 title=3Dattr-button-type-submit><code>submit</code></d=
fn>
+     <td><a href=3D#attr-button-type-submit-state title=3Dattr-=
button-type-submit-state>Submit Button</a>
+     <td>Submits the form.
+    <tr><td><dfn id=3Dattr-button-type-reset title=3Dattr=
-button-type-reset><code>reset</code></dfn>
+     <td><a href=3D#attr-button-type-reset-state title=3Dattr-b=
utton-type-reset-state>Reset Button</a>
+     <td>Resets the form.
+    <tr><td><dfn id=3Dattr-button-type-button title=3Datt=
r-button-type-button><code>button</code></dfn>
+     <td><a href=3D#attr-button-type-button-state title=3Dattr-=
button-type-button-state>Button</a>
+     <td>Does nothing.
+    <tr><td><dfn id=3Dattr-button-type-menu title=3Dattr-=
button-type-menu><code>menu</code></dfn>
+     <td><a href=3D#attr-button-type-menu-state title=3Dattr-bu=
tton-type-menu-state>Menu</a>
+     <td>Shows a menu.
+  </table><p>The <i>missing value default</i> is=
 the <a href=3D#attr-button-type-submit-state title=3Dattr-button-type=
-submit-state>Submit
+  Button</a> state.</p>
+
+  <p>If the <code title=3Dattr-button-type><a href=3D#att=
r-button-type>type</a></code> attribute is in the <a hr=
ef=3D#attr-button-type-submit-state title=3Dattr-button-type-submit-state=
>Submit Button</a> state, the element is specifically a
+  <a href=3D#concept-submit-button title=3Dconcept-submit-button>s=
ubmit button</a>.</p>
+
+  <div class=3Dimpl>
+
+  <p><strong>Constraint validation</strong>: If the &l=
t;code title=3Dattr-button-type><a href=3D#attr-button-type>type=
</a></code>
+  attribute is in the <a href=3D#attr-button-type-reset-state title=3D=
attr-button-type-reset-state>Reset Button</a> state, the
+  <a href=3D#attr-button-type-button-state title=3Dattr-button-type-b=
utton-state>Button</a> state, or the <a href=3D#attr-button-t=
ype-menu-state title=3Dattr-button-type-menu-state>Menu</a> stat=
e, the element is <a href=3D#barred-from-constraint-validation>barr=
ed from constraint
+  validation</a>.</p>
+
+  <p>When a <code><a href=3D#the-button-element>button=
</a></code> element is not <a href=3D#concept-fe-disabled =
title=3Dconcept-fe-disabled>disabled</a>,
+  its <a href=3D#activation-behavior>activation behavior</a>=
 element is to run the steps defined in the following list for
+  the current state of the element's <code title=3Dattr-button-type&g=
t;<a href=3D#attr-button-type>type</a></code> attribute=
:</p>
+
+  <dl><dt> <dfn id=3Dattr-button-type-submit-state title=3D=
attr-button-type-submit-state>Submit Button</dfn> </dt>
+
+   <dd><p>If the element has a <a href=3D#form-owner>f=
orm owner</a> and the element's <code><a href=3D#document&=
gt;Document</a></code> is
+   <a href=3D#fully-active>fully active</a>, the element mus=
t <a href=3D#concept-form-submit title=3Dconcept-form-submit>submit=
</a> the
+   <a href=3D#form-owner>form owner</a> from the <code&gt=
;<a href=3D#the-button-element>button</a></code> elemen=
t.</dd>
+
+   <dt> <dfn id=3Dattr-button-type-reset-state title=3Dattr-but=
ton-type-reset-state>Reset Button</dfn> </dt>
+
+   <dd><p>If the element has a <a href=3D#form-owner>f=
orm owner</a> and the element's <code><a href=3D#document&=
gt;Document</a></code> is
+   <a href=3D#fully-active>fully active</a>, the element mus=
t <a href=3D#concept-form-reset title=3Dconcept-form-reset>reset&lt=
;/a> the
+   <a href=3D#form-owner>form owner</a>.</dd>
+
+   <dt> <dfn id=3Dattr-button-type-button-state title=3Dattr-bu=
tton-type-button-state>Button</dfn>
+
+   <dd><p>Do nothing.</dd>
+
+   <dt> <dfn id=3Dattr-button-type-menu-state title=3Dattr-butt=
on-type-menu-state>Menu</dfn>
+
+   <dd>
+
+    <p>The element must follow these steps:</p>
+
+    <ol><li><p>If the <code><a href=3D#the-bu=
tton-element>button</a></code> is not <a href=3D#being-=
rendered>being rendered</a>, abort these
+     steps.</li>
+
+     <li><p>If the <code><a href=3D#the-button-elem=
ent>button</a></code> element's <code><a href=3D#=
document>Document</a></code> is not <a href=3D#fully-ac=
tive>fully
+     active</a>, abort these steps.</li>
+   =20
+     <li><p>Let <var title=3D"">menu</var=
> be the element's <a href=3D#designated-pop-up-menu>designated =
pop-up menu</a>, if
+     any. If there isn't one, then abort these steps.</li>
+
+     <li><p><a href=3D#concept-event-fire title=3Dconcept=
-event-fire>Fire</a> a <a href=3D#concept-events-trusted titl=
e=3Dconcept-events-trusted>trusted</a> event with the name <c=
ode title=3Devent-show>show</code> at <var title=3D"&quo=
t;>menu</var>, using the <code><a href=3D#relatedevent&=
gt;RelatedEvent</a></code>
+     interface, with the <code title=3Ddom-RelatedEvent-relatedTarget=
><a href=3D#dom-relatedevent-relatedtarget>relatedTarget</a&g=
t;</code> attribute
+     initialized to the <code><a href=3D#the-button-element>=
button</a></code> element. The event must be cancelable. <=
!-- v2: include
+     modifier key information --></li>
+
+     <li><p>If the event is not canceled, then <a href=3D=
#construct-and-show-a-menu title=3D"construct and show a menu"&=
gt;construct and
+     show</a> the menu for <var title=3D"">menu&lt=
;/var>, with the <code><a href=3D#the-button-element>butto=
n</a></code> element as the
+     subject.</li>
+
+    </ol></dd>
+
+  </dl></div>
+
+  <p>The <code title=3Dattr-fae-form><a href=3D#attr-fae-=
form>form</a></code> attribute is used to explicitly assoc=
iate the
+  <code><a href=3D#the-button-element>button</a></c=
ode> element with its <a href=3D#form-owner>form owner</a>=
. The <code title=3Dattr-fe-name><a href=3D#attr-fe-name>name=
</a></code> attribute represents the element's name. The <=
code title=3Dattr-fe-disabled><a href=3D#attr-fe-disabled>disabl=
ed</a></code> attribute is used to make the control non-inter=
active and
+  to prevent its value from being submitted. The <code title=3Dattr-f=
e-autofocus><a href=3D#attr-fe-autofocus>autofocus</a><=
/code>
+  attribute controls focus. The <code title=3Dattr-fs-formaction>&=
lt;a href=3D#attr-fs-formaction>formaction</a></code>, &lt=
;code title=3Dattr-fs-formenctype><a href=3D#attr-fs-formenctype&gt=
;formenctype</a></code>, <code title=3Dattr-fs-formmethod&=
gt;<a href=3D#attr-fs-formmethod>formmethod</a></code>,=
 <code title=3Dattr-fs-formnovalidate><a href=3D#attr-fs-formnov=
alidate>formnovalidate</a></code>, and <code title=3Dat=
tr-fs-formtarget><a href=3D#attr-fs-formtarget>formtarget</a&=
gt;</code> attributes are <a href=3D#attributes-for-form-submiss=
ion>attributes for form
+  submission</a>.</p>
+
+  <p class=3Dnote>The <code title=3Dattr-fs-formnovalidate>&=
lt;a href=3D#attr-fs-formnovalidate>formnovalidate</a></code&=
gt; attribute can be
+  used to make submit buttons that do not trigger the constraint validat=
ion.</p>
+
+  <p>The <code title=3Dattr-fs-formaction><a href=3D#attr=
-fs-formaction>formaction</a></code>, <code title=3Datt=
r-fs-formenctype><a href=3D#attr-fs-formenctype>formenctype</=
a></code>, <code title=3Dattr-fs-formmethod><a href=3D#=
attr-fs-formmethod>formmethod</a></code>, <code title=3D=
attr-fs-formnovalidate><a href=3D#attr-fs-formnovalidate>formnov=
alidate</a></code>, and <code title=3Dattr-fs-formtarget&g=
t;<a href=3D#attr-fs-formtarget>formtarget</a></code> m=
ust not be specified if the element's <code title=3Dattr-button-type&g=
t;<a href=3D#attr-button-type>type</a></code> attribute=
 is not in the <a href=3D#attr-button-type-submit-state title=3Dattr-b=
utton-type-submit-state>Submit Button</a> state.</p>
+
+  <p>The <dfn id=3Dattr-button-value title=3Dattr-button-value&=
gt;<code>value</code></dfn> attribute gives the element=
's value
+  for the purposes of form submission. The element's <a href=3D#conce=
pt-fe-value title=3Dconcept-fe-value>value</a> is
+  the value of the element's <code title=3Dattr-button-value><a=
 href=3D#attr-button-value>value</a></code> attribute, if =
there is
+  one, or the empty string otherwise.</p>
+
+  <p class=3Dnote>A button (and its value) is only included in the=
 form submission if the button
+  itself was used to initiate the form submission.</p>
+
+  <hr><p>If the element's <code title=3Dattr-button-type&=
gt;<a href=3D#attr-button-type>type</a></code> attribut=
e is in the <a href=3D#attr-button-type-menu-state title=3Dattr-button=
-type-menu-state>Menu</a> state, the <dfn id=3Dattr-button-me=
nu title=3Dattr-button-menu><code>menu</code></dfn> =
attribute must be specified to give the element's
+  menu. The value must be the <a href=3D#concept-id title=3Dconcept-i=
d>ID</a> of a <code><a href=3D#the-menu-element>menu=
</a></code> element in
+  the same <a href=3D#home-subtree>home subtree</a> whose &l=
t;code title=3Dattr-menu-type><a href=3D#attr-menu-type>type<=
/a></code> attribute is in
+  the <a href=3D#popup-menu-state title=3D"popup menu state&quot=
;>popup menu</a> state. The attribute must not be specified if
+  the element's <code title=3Dattr-button-type><a href=3D#attr-=
button-type>type</a></code> attribute is not in the <a =
href=3D#attr-button-type-menu-state title=3Dattr-button-type-menu-state&g=
t;Menu</a> state.</p>
+
+  <div class=3Dimpl>
+
+  <p>A <code><a href=3D#the-button-element>button</=
a></code> element's <dfn id=3Ddesignated-pop-up-menu>desig=
nated pop-up menu</dfn> is the first element in the
+  <code><a href=3D#the-button-element>button</a></c=
ode>'s <a href=3D#home-subtree>home subtree</a> whose ID i=
s that given by the <code><a href=3D#the-button-element>butto=
n</a></code>
+  element's <code title=3Dattr-button-menu><a href=3D#attr-butt=
on-menu>menu</a></code> attribute, if there is such an ele=
ment and
+  its <code title=3Dattr-menu-type><a href=3D#attr-menu-type&gt=
;type</a></code> attribute is in the <a href=3D#popup-menu=
-state title=3D"popup menu
+  state">popup menu</a> state; otherwise, the element has =
no <a href=3D#designated-pop-up-menu>designated pop-up
+  menu</a>.</p>
+
+  <hr><p>The <dfn id=3Ddom-button-value title=3Ddom-butto=
n-value><code>value</code></dfn> and <dfn id=3Ddo=
m-button-menu title=3Ddom-button-menu><code>menu</code>&lt=
;/dfn> IDL attributes must <a href=3D#reflect>reflect</a> =
the
+  content attributes of the same name.</p>
+
+  <p>The <dfn id=3Ddom-button-type title=3Ddom-button-type>&=
lt;code>type</code></dfn> IDL attribute must
+  <a href=3D#reflect>reflect</a> the content attribute of th=
e same name, <a href=3D#limited-to-only-known-values>limited to onl=
y known
+  values</a>.</p>
+
+  <p>The <code title=3Ddom-cva-willValidate><a href=3D#do=
m-cva-willvalidate>willValidate</a></code>, <code title=
=3Ddom-cva-validity><a href=3D#dom-cva-validity>validity</a&g=
t;</code>, and <code title=3Ddom-cva-validationMessage><a =
href=3D#dom-cva-validationmessage>validationMessage</a></code=
> IDL attributes, and the <code title=3Ddom-cva-checkValidity>&l=
t;a href=3D#dom-cva-checkvalidity>checkValidity()</a></code&g=
t;, <code title=3Ddom-cva-reportValidity><a href=3D#dom-cva-repo=
rtvalidity>reportValidity()</a></code>, and <code title=
=3Ddom-cva-setCustomValidity><a href=3D#dom-cva-setcustomvalidity&g=
t;setCustomValidity()</a></code> methods, are part of the
+  <a href=3D#the-constraint-validation-api>constraint validation A=
PI</a>. The <code title=3Ddom-lfe-labels><a href=3D#dom-lf=
e-labels>labels</a></code> IDL
+  attribute provides a list of the element's <code><a href=3D#t=
he-label-element>label</a></code>s. The <code title=3Dd=
om-fe-autofocus><a href=3D#dom-fe-autofocus>autofocus</a>&=
lt;/code>, <code title=3Ddom-fe-disabled><a href=3D#dom-fe-di=
sabled>disabled</a></code>, <code title=3Ddom-fae-form&=
gt;<a href=3D#dom-fae-form>form</a></code>, and <cod=
e title=3Ddom-fe-name><a href=3D#dom-fe-name>name</a></=
code> IDL attributes are
+  part of the element's forms API.</p>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>The following button is labeled "Show hint" and po=
ps up a dialog box when activated:</p>
+
+   <pre><button type=3Dbutton
+        onclick=3D"alert('This 15-20 minute piece was composed by G=
eorge Gershwin.')">
+ Show hint
+</button></pre>
+
+  </div>
+
+
+
+
+  <h4 id=3Dthe-select-element><span class=3Dsecno>4.10.7 &lt=
;/span>The <dfn><code>select</code></dfn> elem=
ent</h4>
+
+  <dl class=3Delement><dt><a href=3D#element-dfn-categori=
es title=3Delement-dfn-categories>Categories</a>:</dt>
+   <dd><a href=3D#flow-content>Flow content</a>.</d=
d>
+   <dd><a href=3D#phrasing-content>Phrasing content</a&gt=
;.</dd>
+   <dd><a href=3D#interactive-content>Interactive content&lt=
;/a>.</dd>
+   <dd><a href=3D#category-listed title=3Dcategory-listed>Li=
sted</a>, <a href=3D#category-label title=3Dcategory-label>la=
belable</a>, <a href=3D#category-submit title=3Dcategory-submit&=
gt;submittable</a>, <a href=3D#category-reset title=3Dcategory-r=
eset>resettable</a>, and <a href=3D#category-form-attr title=3D=
category-form-attr>reassociateable</a> <a href=3D#form-associ=
ated-element>form-associated element</a>.</dd>
+   <dd><a href=3D#palpable-content>Palpable content</a&gt=
;.</dd>
+   <dt><a href=3D#element-dfn-contexts title=3Delement-dfn-cont=
exts>Contexts in which this element can be used</a>:</dt>
+   <dd>Where <a href=3D#phrasing-content>phrasing content&lt=
;/a> is expected.</dd>
+   <dt><a href=3D#element-dfn-content-model title=3Delement-dfn=
-content-model>Content model</a>:</dt>
+   <dd>Zero or more <code><a href=3D#the-option-element&g=
t;option</a></code>, <code><a href=3D#the-optgroup-e=
lement>optgroup</a></code>, and <a href=3D#script-suppo=
rting-elements title=3D"script-supporting elements">script-s=
upporting</a> elements.</dd>
+   <dt><a href=3D#element-dfn-tag-omission title=3Delement-dfn-=
tag-omission>Tag omission in text/html</a>:</dt>
+   <dd>Neither tag is omissible.</dd>
+   <dt><a href=3D#element-dfn-attributes title=3Delement-dfn-at=
tributes>Content attributes</a>:</dt>
+   <dd><a href=3D#global-attributes>Global attributes</a&=
gt;</dd>
+   <dd><code title=3Dattr-fe-autofocus><a href=3D#attr-fe=
-autofocus>autofocus</a></code> — Automatically =
focus the form control when the page is loaded</dd>
+   <dd><code title=3Dattr-fe-disabled><a href=3D#attr-fe-=
disabled>disabled</a></code> — Whether the form =
control is disabled</dd>
+   <dd><code title=3Dattr-fae-form><a href=3D#attr-fae-fo=
rm>form</a></code> — Associates the control with=
 a <code><a href=3D#the-form-element>form</a></code&=
gt; element</dd>
+   <dd><code title=3Dattr-select-multiple><a href=3D#attr=
-select-multiple>multiple</a></code> — Whether t=
o allow multiple values</dd>
+   <dd><code title=3Dattr-fe-name><a href=3D#attr-fe-name=
>name</a></code> — Name of form control to use f=
or <a href=3D#form-submission>form submission</a> and in the =
<code title=3Ddom-form-elements><a href=3D#dom-form-elements>=
form.elements</a></code> API</dd>
+   <dd><code title=3Dattr-select-required><a href=3D#attr=
-select-required>required</a></code> — Whether t=
he control is required for <a href=3D#form-submission>form submissi=
on</a></dd>
+   <dd><code title=3Dattr-select-size><a href=3D#attr-sel=
ect-size>size</a></code> — Size of the control&l=
t;/dd>
+   <dt><a href=3D#element-dfn-dom title=3Delement-dfn-dom>DO=
M interface</a>:</dt><!--TOPIC:DOM APIs-->
+   <dd>
+<pre class=3Didl>interface <dfn id=3Dhtmlselectelement>HTMLS=
electElement</dfn> : <a href=3D#htmlelement>HTMLElement</a=
> {
+           attribute boolean <a href=3D#dom-fe-autofocus title=3Ddom-=
fe-autofocus>autofocus</a>;
+           attribute boolean <a href=3D#dom-fe-disabled title=3Ddom-f=
e-disabled>disabled</a>;
+  readonly attribute <a href=3D#htmlformelement>HTMLFormElement&lt=
;/a>? <a href=3D#dom-fae-form title=3Ddom-fae-form>form</a&gt=
;;
+           attribute boolean <a href=3D#dom-select-multiple title=3Dd=
om-select-multiple>multiple</a>;
+           attribute DOMString <a href=3D#dom-fe-name title=3Ddom-fe-=
name>name</a>;
+           attribute boolean <a href=3D#dom-select-required title=3Dd=
om-select-required>required</a>;
+           attribute unsigned long <a href=3D#dom-select-size title=3D=
dom-select-size>size</a>;
+
+  readonly attribute DOMString <a href=3D#dom-select-type title=3Ddom=
-select-type>type</a>;
+
+  readonly attribute <a href=3D#htmloptionscollection>HTMLOptionsC=
ollection</a> <a href=3D#dom-select-options title=3Ddom-select-o=
ptions>options</a>;
+           attribute unsigned long <a href=3D#dom-select-length title=
=3Ddom-select-length>length</a>;
+  getter <a href=3D#element>Element</a>? <a href=3D#dom-s=
elect-item title=3Ddom-select-item>item</a>(unsigned long index)=
;
+  <a href=3D#htmloptionelement>HTMLOptionElement</a>? <a =
href=3D#dom-select-nameditem title=3Ddom-select-namedItem>namedItem&lt=
;/a>(DOMString name);
+  void <a href=3D#dom-select-add title=3Ddom-select-add>add</a&=
gt;((<a href=3D#htmloptionelement>HTMLOptionElement</a> or &l=
t;a href=3D#htmloptgroupelement>HTMLOptGroupElement</a>) element=
, optional (<a href=3D#htmlelement>HTMLElement</a> or long)? =
before =3D null);
+  void <a href=3D#dom-select-remove title=3Ddom-select-remove>remo=
ve</a>(); // ChildNode overload
+  void <a href=3D#dom-select-remove title=3Ddom-select-remove>remo=
ve</a>(long index);
+  <a href=3D#dom-htmloptionscollection-setter title=3Ddom-HTMLOptions=
Collection-setter>setter creator</a> void (unsigned long index, =
<a href=3D#htmloptionelement>HTMLOptionElement</a>? option);
+
+  readonly attribute <a href=3D#htmlcollection>HTMLCollection</=
a> <a href=3D#dom-select-selectedoptions title=3Ddom-select-selecte=
dOptions>selectedOptions</a>;
+           attribute long <a href=3D#dom-select-selectedindex title=3D=
dom-select-selectedIndex>selectedIndex</a>;
+           attribute DOMString <a href=3D#dom-select-value title=3Ddo=
m-select-value>value</a>;
+
+  readonly attribute boolean <a href=3D#dom-cva-willvalidate title=3D=
dom-cva-willValidate>willValidate</a>;
+  readonly attribute <a href=3D#validitystate>ValidityState</a&=
gt; <a href=3D#dom-cva-validity title=3Ddom-cva-validity>validity&l=
t;/a>;
+  readonly attribute DOMString <a href=3D#dom-cva-validationmessage t=
itle=3Ddom-cva-validationMessage>validationMessage</a>;
+  boolean <a href=3D#dom-cva-checkvalidity title=3Ddom-cva-checkValid=
ity>checkValidity</a>();
+  boolean <a href=3D#dom-cva-reportvalidity title=3Ddom-cva-reportVal=
idity>reportValidity</a>();
+  void <a href=3D#dom-cva-setcustomvalidity title=3Ddom-cva-setCustom=
Validity>setCustomValidity</a>(DOMString error);
+
+  readonly attribute <a href=3D#nodelist>NodeList</a> <a =
href=3D#dom-lfe-labels title=3Ddom-lfe-labels>labels</a>;
+};</pre>
+   </dd>
+  </dl><!--TOPIC:HTML--><!-- Proposals for v2:
+       * <select value=3D""> as an alternative to <op=
tion selected>
+         http://developers.slashdot.org/comments.pl?sid=3D426306&cid=
=3D22142072
+         <Philip`> http://www.ipiao.com.cn/ does <select size=3D=
"1" name=3D"to"><script>City_Default=3D&quot=
;PEK"</script><SCRIPT language=3Djavascript
+                   src=3D"/js/flightcity.js"></SCRIPT&gt=
;</select> which is the kind of thing that could be much simpler wi=
th <select value=3D"PEK">
+    --><p>The <code><a href=3D#the-select-element>s=
elect</a></code> element represents a control for selecting a=
mongst a set of
+  options.</p>
+
+  <p>The <dfn id=3Dattr-select-multiple title=3Dattr-select-mul=
tiple><code>multiple</code></dfn> attribute is a &lt=
;a href=3D#boolean-attribute>boolean
+  attribute</a>. If the attribute is present, then the <code&gt=
;<a href=3D#the-select-element>select</a></code> elemen=
t
+  <a href=3D#represents>represents</a> a control for selecti=
ng zero or more options from the <a href=3D#concept-select-option-list=
 title=3Dconcept-select-option-list>list of options</a>. If the =
attribute is absent, then the
+  <code><a href=3D#the-select-element>select</a></c=
ode> element <a href=3D#represents>represents</a> a contro=
l for selecting a single option from
+  the <a href=3D#concept-select-option-list title=3Dconcept-select-op=
tion-list>list of options</a>.</p>
+
+  <p>The <dfn id=3Dattr-select-size title=3Dattr-select-size&gt=
;<code>size</code></dfn> attribute gives the number of =
options
+  to show to the user. The <code title=3Dattr-select-size><a hr=
ef=3D#attr-select-size>size</a></code> attribute, if speci=
fied, must
+  have a value that is a <a href=3D#valid-non-negative-integer>val=
id non-negative integer</a> greater than zero.</p>
+
+  <div class=3Dimpl>
+
+  <p>The <dfn id=3Dconcept-select-size title=3Dconcept-select-s=
ize>display size</dfn> of a <code><a href=3D#the-select=
-element>select</a></code> element is the
+  result of applying the <a href=3D#rules-for-parsing-non-negative-in=
tegers>rules for parsing non-negative integers</a> to the value =
of
+  element's <code title=3Dattr-select-size><a href=3D#attr-sele=
ct-size>size</a></code> attribute, if it has one and parsi=
ng it is
+  successful. If applying those rules to the attribute's value is not su=
ccessful, or if the <code title=3Dattr-select-size><a href=3D#at=
tr-select-size>size</a></code> attribute is absent, then t=
he element's <a href=3D#concept-select-size title=3Dconcept-select-siz=
e>display size</a> is 4 if the element's <code title=3Dattr-s=
elect-multiple><a href=3D#attr-select-multiple>multiple</a&gt=
;</code> content attribute is present, and 1 otherwise.</p>
+
+  </div>
+
+  <p>The <dfn id=3Dconcept-select-option-list title=3Dconcept-s=
elect-option-list>list of options</dfn> for a <code><a =
href=3D#the-select-element>select</a></code>
+  element consists of all the <code><a href=3D#the-option-eleme=
nt>option</a></code> element children of the <code>&=
lt;a href=3D#the-select-element>select</a></code>
+  element, and all the <code><a href=3D#the-option-element>o=
ption</a></code> element children of all the <code><=
a href=3D#the-optgroup-element>optgroup</a></code> element
+  children of the <code><a href=3D#the-select-element>select=
</a></code> element, in <a href=3D#tree-order>tree orde=
r</a>.</p>
+
+  <p>The <dfn id=3Dattr-select-required title=3Dattr-select-req=
uired><code>required</code></dfn> attribute is a &lt=
;a href=3D#boolean-attribute>boolean
+  attribute</a>. When specified, the user will be required to sele=
ct a value before submitting
+  the form.</p>
+
+  <p>If a <code><a href=3D#the-select-element>select&l=
t;/a></code> element has a <code title=3Dattr-select-required=
><a href=3D#attr-select-required>required</a></code>
+  attribute specified, does not have a <code title=3Dattr-select-mult=
iple><a href=3D#attr-select-multiple>multiple</a></code=
> attribute
+  specified, and has a <a href=3D#concept-select-size title=3Dconcept=
-select-size>display size</a> of 1; and if the <a href=3D#con=
cept-option-value title=3Dconcept-option-value>value</a> of the =
first <code><a href=3D#the-option-element>option</a>&lt=
;/code> element in the
+  <code><a href=3D#the-select-element>select</a></c=
ode> element's <a href=3D#concept-select-option-list title=3Dconcep=
t-select-option-list>list of options</a> (if
+  any) is the empty string, and that <code><a href=3D#the-optio=
n-element>option</a></code> element's parent node is the
+  <code><a href=3D#the-select-element>select</a></c=
ode> element (and not an <code><a href=3D#the-optgroup-elemen=
t>optgroup</a></code> element), then that
+  <code><a href=3D#the-option-element>option</a></c=
ode> is the <code><a href=3D#the-select-element>select<=
/a></code> element's <dfn id=3Dplaceholder-label-option>pl=
aceholder label option</dfn>.</p>
+
+  <p>If a <code><a href=3D#the-select-element>select&l=
t;/a></code> element has a <code title=3Dattr-select-required=
><a href=3D#attr-select-required>required</a></code>
+  attribute specified, does not have a <code title=3Dattr-select-mult=
iple><a href=3D#attr-select-multiple>multiple</a></code=
> attribute
+  specified, and has a <a href=3D#concept-select-size title=3Dconcept=
-select-size>display size</a> of 1, then the
+  <code><a href=3D#the-select-element>select</a></c=
ode> element must have a <a href=3D#placeholder-label-option>pla=
ceholder label option</a>.</p>
+
+  <div class=3Dimpl>
+
+  <p><strong>Constraint validation</strong>: If the el=
ement has its <code title=3Dattr-select-required><a href=3D#attr=
-select-required>required</a></code> attribute specified, =
and either none of the
+  <code><a href=3D#the-option-element>option</a></c=
ode> elements in the <code><a href=3D#the-select-element>s=
elect</a></code> element's <a href=3D#concept-select-optio=
n-list title=3Dconcept-select-option-list>list of options</a> ha=
ve their <a href=3D#concept-option-selectedness title=3Dconcept-option=
-selectedness>selectedness</a> set to true, or the only
+  <code><a href=3D#the-option-element>option</a></c=
ode> element in the <code><a href=3D#the-select-element>se=
lect</a></code> element's <a href=3D#concept-select-option=
-list title=3Dconcept-select-option-list>list of options</a> wit=
h its <a href=3D#concept-option-selectedness title=3Dconcept-option-se=
lectedness>selectedness</a> set to true is the <a href=3D#pla=
ceholder-label-option>placeholder label
+  option</a>, then the element is <a href=3D#suffering-from-bei=
ng-missing>suffering from being missing</a>.</p>
+
+  </div>
+
+  <div class=3Dimpl>
+
+  <p>If the <code title=3Dattr-select-multiple><a href=3D=
#attr-select-multiple>multiple</a></code> attribute is abs=
ent, and the element
+  is not <a href=3D#concept-fe-disabled title=3Dconcept-fe-disabled&g=
t;disabled</a>, then the user agent should allow the
+  user to pick an <code><a href=3D#the-option-element>option=
</a></code> element in its <a href=3D#concept-select-optio=
n-list title=3Dconcept-select-option-list>list
+  of options</a> that is itself not <a href=3D#concept-option-d=
isabled title=3Dconcept-option-disabled>disabled</a>. Upon
+  this <code><a href=3D#the-option-element>option</a>&=
lt;/code> element being <dfn id=3Dconcept-select-pick title=3Dconce=
pt-select-pick>picked</dfn> (either
+  through a click, or through unfocusing the element after changing its =
value, or through a <a href=3D#using-the-option-element-to-define-a-co=
mmand title=3Doption-command>menu command</a>, or through any ot=
her mechanism), and before the
+  relevant user interaction event <!-- interaction event spec point -=
-> is queued (e.g. before the
+  <code title=3Devent-click><a href=3D#event-click>click<=
/a></code> event), the user agent must set the <a href=3D#con=
cept-option-selectedness title=3Dconcept-option-selectedness>selectedn=
ess</a> of the picked <code><a href=3D#the-option-element&=
gt;option</a></code> element
+  to true and then <a href=3D#queue-a-task>queue a task</a> =
to <a href=3D#fire-a-simple-event>fire a simple event</a> tha=
t bubbles named
+  <code title=3Devent-change>change</code> at the <code&g=
t;<a href=3D#the-select-element>select</a></code> eleme=
nt, using the <a href=3D#user-interaction-task-source>user
+  interaction task source</a> as the task source.</p>
+
+  <p>If the <code title=3Dattr-select-multiple><a href=3D=
#attr-select-multiple>multiple</a></code> attribute is abs=
ent, whenever an
+  <code><a href=3D#the-option-element>option</a></c=
ode> element in the <code><a href=3D#the-select-element>se=
lect</a></code> element's <a href=3D#concept-select-option=
-list title=3Dconcept-select-option-list>list of options</a> has=
 its <a href=3D#concept-option-selectedness title=3Dconcept-option-sel=
ectedness>selectedness</a> set to true, and whenever an
+  <code><a href=3D#the-option-element>option</a></c=
ode> element with its <a href=3D#concept-option-selectedness title=3D=
concept-option-selectedness>selectedness</a>
+  set to true is added to the <code><a href=3D#the-select-eleme=
nt>select</a></code> element's <a href=3D#concept-selec=
t-option-list title=3Dconcept-select-option-list>list of options</a=
>, the user agent must set the <a href=3D#concept-option-selectedne=
ss title=3Dconcept-option-selectedness>selectedness</a> of all t=
he other <code><a href=3D#the-option-element>option</a>=
</code>
+  elements in its <a href=3D#concept-select-option-list title=3Dconce=
pt-select-option-list>list of options</a> to false.</p>
+
+  <p>If the <code title=3Dattr-select-multiple><a href=3D=
#attr-select-multiple>multiple</a></code> attribute is abs=
ent and the element's
+  <a href=3D#concept-select-size title=3Dconcept-select-size>displ=
ay size</a> is greater than 1, then the user agent
+  should also allow the user to request that the <code><a href=3D=
#the-option-element>option</a></code> whose <a href=3D#=
concept-option-selectedness title=3Dconcept-option-selectedness>select=
edness</a> is true, if any, be unselected. Upon this
+  request being conveyed to the user agent, and before the relevant user=
 interaction event <!--
+  interaction event spec point --> is queued (e.g. before the <cod=
e title=3Devent-click><a href=3D#event-click>click</a><=
/code>
+  event), the user agent must set the <a href=3D#concept-option-selec=
tedness title=3Dconcept-option-selectedness>selectedness</a>
+  of that <code><a href=3D#the-option-element>option</a&g=
t;</code> element to false and then <a href=3D#queue-a-task>q=
ueue a task</a> to <a href=3D#fire-a-simple-event>fire a
+  simple event</a> that bubbles named <code title=3Devent-chang=
e>change</code> at the
+  <code><a href=3D#the-select-element>select</a></c=
ode> element, using the <a href=3D#user-interaction-task-source>=
user interaction task source</a> as the task
+  source.</p>
+
+  <p>If <a href=3D#nodes-are-inserted>nodes are inserted<=
/a> or <a href=3D#nodes-are-removed>nodes are removed</a> =
causing the <a href=3D#concept-select-option-list title=3Dconcept-sele=
ct-option-list>list of options</a> to gain or lose one or more
+  <code><a href=3D#the-option-element>option</a></c=
ode> elements, or if an <code><a href=3D#the-option-element&g=
t;option</a></code> element in the <a href=3D#concept-sele=
ct-option-list title=3Dconcept-select-option-list>list of options</=
a> <dfn id=3Dask-for-a-reset title=3D"ask for a reset"&gt=
;asks for a
+  reset</dfn>, then, if the <code><a href=3D#the-select-e=
lement>select</a></code> element's <code title=3Dattr-s=
elect-multiple><a href=3D#attr-select-multiple>multiple</a&gt=
;</code> attribute is absent, the <code><a href=3D#the-sel=
ect-element>select</a></code>
+  element's <a href=3D#concept-select-size title=3Dconcept-select-siz=
e>display size</a> is 1, and no <code><a href=3D#the-op=
tion-element>option</a></code>
+  elements in the <code><a href=3D#the-select-element>select=
</a></code> element's <a href=3D#concept-select-option-lis=
t title=3Dconcept-select-option-list>list of
+  options</a> have their <a href=3D#concept-option-selectedness=
 title=3Dconcept-option-selectedness>selectedness</a> set to
+  true, the user agent must set the <a href=3D#concept-option-selecte=
dness title=3Dconcept-option-selectedness>selectedness</a> of
+  the first <code><a href=3D#the-option-element>option</a=
></code> element in the <a href=3D#concept-select-option-list=
 title=3Dconcept-select-option-list>list of
+  options</a> in <a href=3D#tree-order>tree order</a> =
that is not <a href=3D#concept-option-disabled title=3Dconcept-option-=
disabled>disabled</a>, if any, to true.</p>
+
+  <p>If the <code title=3Dattr-select-multiple><a href=3D=
#attr-select-multiple>multiple</a></code> attribute is pre=
sent, and the element
+  is not <a href=3D#concept-fe-disabled title=3Dconcept-fe-disabled&g=
t;disabled</a>, then the user agent should allow the
+  user to <dfn id=3Dconcept-select-toggle title=3Dconcept-select-togg=
le>toggle</dfn> the <a href=3D#concept-option-selectedness ti=
tle=3Dconcept-option-selectedness>selectedness</a> of the <co=
de><a href=3D#the-option-element>option</a></code> e=
lements in its
+  <a href=3D#concept-select-option-list title=3Dconcept-select-option=
-list>list of options</a> that are themselves not <a href=3D#=
concept-option-disabled title=3Dconcept-option-disabled>disabled</a=
> (either through a click, or through a <a href=3D#using-the-option=
-element-to-define-a-command title=3Doption-command>menu command</a=
>, or any other mechanism). Upon the <a href=3D#concept-option-sele=
ctedness title=3Dconcept-option-selectedness>selectedness</a> of=
 one or more <code><a href=3D#the-option-element>option</a=
></code>
+  elements being changed by the user, and before the relevant user inter=
action event <!--
+  interaction event spec point --> is queued (e.g. before a related &=
lt;code title=3Devent-click><a href=3D#event-click>click</a&g=
t;</code> event), the user agent must <a href=3D#queue-a-task&gt=
;queue a task</a> to
+  <a href=3D#fire-a-simple-event>fire a simple event</a> tha=
t bubbles named <code title=3Devent-change>change</code> at
+  the <code><a href=3D#the-select-element>select</a>&l=
t;/code> element, using the <a href=3D#user-interaction-task-source=
>user interaction task source</a> as the task
+  source.</p>
+
+  <p>The <a href=3D#concept-form-reset-control title=3Dconcept-=
form-reset-control>reset algorithm</a> for <code><a hre=
f=3D#the-select-element>select</a></code>
+  elements is to go through all the <code><a href=3D#the-option=
-element>option</a></code> elements in the element's <a=
 href=3D#concept-select-option-list title=3Dconcept-select-option-list&gt=
;list of options</a>, set their <a href=3D#concept-option-select=
edness title=3Dconcept-option-selectedness>selectedness</a> to t=
rue if the <code><a href=3D#the-option-element>option</a&g=
t;</code> element
+  has a <code title=3Dattr-option-selected><a href=3D#attr-opti=
on-selected>selected</a></code> attribute, and false other=
wise, and then
+  have the <code><a href=3D#the-option-element>option</a&=
gt;</code> elements <a href=3D#ask-for-a-reset>ask for a rese=
t</a>.</p>
+
+  </div>
+
+  <p>The <code title=3Dattr-fae-form><a href=3D#attr-fae-=
form>form</a></code> attribute is used to explicitly assoc=
iate the
+  <code><a href=3D#the-select-element>select</a></c=
ode> element with its <a href=3D#form-owner>form owner</a>=
. The <code title=3Dattr-fe-name><a href=3D#attr-fe-name>name=
</a></code> attribute represents the element's name. The <=
code title=3Dattr-fe-disabled><a href=3D#attr-fe-disabled>disabl=
ed</a></code> attribute is used to make the control non-inter=
active and
+  to prevent its value from being submitted. The <code title=3Dattr-f=
e-autofocus><a href=3D#attr-fe-autofocus>autofocus</a><=
/code>
+  attribute controls focus.</p>
+
+  <p>A <code><a href=3D#the-select-element>select</=
a></code> element that is not <a href=3D#concept-fe-disabled =
title=3Dconcept-fe-disabled>disabled</a> is
+  <i title=3Dconcept-fe-mutable><a href=3D#concept-fe-mutable&g=
t;mutable</a></i>.</p>
+
+<!--TOPIC:DOM APIs-->
+  <dl class=3Ddomintro><dt><var title=3D"">s=
elect</var> . <code title=3Ddom-select-type><a href=3D#dom=
-select-type>type</a></code></dt>
+
+   <dd>
+
+    <p>Returns "<code title=3D"">select-multi=
ple</code>" if the element has a <code title=3Dattr-select-=
multiple><a href=3D#attr-select-multiple>multiple</a></=
code> attribute, and "<code title=3D"">select-one=
</code>"
+    otherwise.</p>
+
+   </dd>
+
+   <dt><var title=3D"">select</var> . <co=
de title=3Ddom-select-options><a href=3D#dom-select-options>opti=
ons</a></code></dt>
+
+   <dd>
+
+    <p>Returns an <code><a href=3D#htmloptionscollection&=
gt;HTMLOptionsCollection</a></code> of the <a href=3D#conc=
ept-select-option-list title=3Dconcept-select-option-list>list of opti=
ons</a>.</p>
+
+   </dd>
+
+   <dt><var title=3D"">select</var> . <co=
de title=3Ddom-select-length><a href=3D#dom-select-length>length=
</a></code> [ =3D <var title=3D"">value</v=
ar> ]</dt>
+   <dd>
+
+    <p>Returns the number of elements in the <a href=3D#concept=
-select-option-list title=3Dconcept-select-option-list>list of
+    options</a>.</p>
+
+    <p>When set to a smaller number, truncates the number of <c=
ode><a href=3D#the-option-element>option</a></code> =
elements in the
+    <code><a href=3D#the-select-element>select</a><=
/code>.</p>
+
+    <p>When set to a greater number, adds new blank <code>&l=
t;a href=3D#the-option-element>option</a></code> elements =
to the
+    <code><a href=3D#the-select-element>select</a><=
/code>.</p>
+
+   </dd>
+
+   <dt><var title=3D"">element</var> =3D &lt=
;var title=3D"">select</var> . <code title=3Ddom-se=
lect-item><a href=3D#dom-select-item>item</a></code>=
(<var title=3D"">index</var>)</dt>
+   <dt><var title=3D"">select</var>[<var =
title=3D"">index</var>]</dt>
+   <dd>
+
+    <p>Returns the item with index <var title=3D""&gt=
;index</var> from the <a href=3D#concept-select-option-list titl=
e=3Dconcept-select-option-list>list of options</a>. The items ar=
e sorted in <a href=3D#tree-order>tree
+    order</a>.</p>
+
+   </dd>
+
+   <dt><var title=3D"">element</var> =3D &lt=
;var title=3D"">select</var> . <code title=3Ddom-se=
lect-item><a href=3D#dom-select-item>namedItem</a></cod=
e>(<var title=3D"">name</var>)</dt>
+   <dd>
+
+    <p>Returns the first item with <a href=3D#concept-id title=3D=
concept-id>ID</a> or <code title=3Dattr-option-name><a =
href=3D#attr-option-name>name</a></code> <var title=3D&=
quot;">name</var> from the <a href=3D#concept-select-opt=
ion-list title=3Dconcept-select-option-list>list of options</a>.=
</p>
+
+    <p>Returns null if no element with that <a href=3D#concept-=
id title=3Dconcept-id>ID</a> could be found.</p>
+
+   </dd>
+
+   <dt><var title=3D"">select</var> . <co=
de title=3Ddom-select-add><a href=3D#dom-select-add>add</a&gt=
;</code>(<var title=3D"">element</var> [, &lt=
;var title=3D"">before</var> ])</dt>
+   <dd>
+
+    <p>Inserts <var title=3D"">element</var>=
 before the node given by <var title=3D"">before</var&=
gt;.</p>
+
+    <p>The <var title=3D"">before</var> argu=
ment can be a number, in which case <var title=3D"">eleme=
nt</var> is inserted before the item with that number, or an elemen=
t from the
+    <a href=3D#concept-select-option-list title=3Dconcept-select-opti=
on-list>list of options</a>, in which case <var title=3D&quot=
;">element</var> is inserted before that element.</p>
+
+    <p>If <var title=3D"">before</var> is om=
itted, null, or a number out of range, then <var title=3D""&=
gt;element</var> will be added at the end of the list.</p>
+
+    <p>This method will throw a <code><a href=3D#hierarch=
yrequesterror>HierarchyRequestError</a></code> exception i=
f <var title=3D"">element</var> is an ancestor of t=
he element into which it is to be inserted.</p>
+
+   </dd>
+
+   <dt><var title=3D"">select</var> . <co=
de title=3Ddom-select-selectedOptions><a href=3D#dom-select-selecte=
doptions>selectedOptions</a></code></dt>
+
+   <dd>
+
+    <p>Returns an <code><a href=3D#htmlcollection>HTML=
Collection</a></code> of the <a href=3D#concept-select-opt=
ion-list title=3Dconcept-select-option-list>list
+    of options</a> that are selected.</p>
+
+   </dd>
+
+   <dt><var title=3D"">select</var> . <co=
de title=3Ddom-select-selectedIndex><a href=3D#dom-select-selectedi=
ndex>selectedIndex</a></code> [ =3D <var title=3D"=
">value</var> ]</dt>
+
+   <dd>
+
+    <p>Returns the index of the first selected item, if any, or &a=
mp;minus;1 if there is no selected
+    item.</p>
+
+    <p>Can be set, to change the selection.</p>
+
+   </dd>
+
+   <dt><var title=3D"">select</var> . <co=
de title=3Ddom-select-value><a href=3D#dom-select-value>value&lt=
;/a></code> [ =3D <var title=3D"">value</var&=
gt; ]</dt>
+
+   <dd>
+
+    <p>Returns the <a href=3D#concept-fe-value title=3Dconcept-=
fe-value>value</a> of the first selected item, if any,
+    or the empty string if there is no selected item.</p>
+
+    <p>Can be set, to change the selection.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-select-type title=3Ddom-select-type>&=
lt;code>type</code></dfn> IDL attribute, on getting, must =
return
+  the string "<code title=3D"">select-one</code&=
gt;" if the <code title=3Dattr-select-multiple><a href=3D#a=
ttr-select-multiple>multiple</a></code> attribute is absen=
t, and the string "<code title=3D"">select-multiple&=
lt;/code>" if the <code title=3Dattr-select-multiple><a =
href=3D#attr-select-multiple>multiple</a></code>
+  attribute is present.</p>
+
+  <p>The <dfn id=3Ddom-select-options title=3Ddom-select-option=
s><code>options</code></dfn> IDL attribute must retu=
rn an
+  <code><a href=3D#htmloptionscollection>HTMLOptionsCollecti=
on</a></code> rooted at the <code><a href=3D#the-sel=
ect-element>select</a></code> node, whose filter matches
+  the elements in the <a href=3D#concept-select-option-list title=3Dc=
oncept-select-option-list>list of options</a>.</p>
+
+  <p>The <code title=3Ddom-select-options><a href=3D#dom-=
select-options>options</a></code> collection is also mirro=
red on the
+  <code><a href=3D#htmlselectelement>HTMLSelectElement</a=
></code> object. The <a href=3D#supported-property-indices&gt=
;supported property indices</a> at any instant
+  are the indices supported by the object returned by the <code title=
=3Ddom-select-options><a href=3D#dom-select-options>options</=
a></code> attribute at that instant.</p>
+
+  <p>The <dfn id=3Ddom-select-length title=3Ddom-select-length&=
gt;<code>length</code></dfn> IDL attribute must return =
the
+  number of nodes <a href=3D#represented-by-the-collection title=3D&q=
uot;represented by the collection">represented</a> by the &=
lt;code title=3Ddom-select-options><a href=3D#dom-select-options&gt=
;options</a></code> collection. On setting, it must act like =
the attribute
+  of the same name on the <code title=3Ddom-select-options><a h=
ref=3D#dom-select-options>options</a></code> collection.&l=
t;/p>
+
+  <p>The <dfn id=3Ddom-select-item title=3Ddom-select-item>&=
lt;code>item(<var title=3D"">index</var>)</co=
de></dfn> method must
+  return the value returned by <a href=3D#dom-htmlcollection-item tit=
le=3Ddom-HTMLCollection-item>the method of the same
+  name</a> on the <code title=3Ddom-select-options><a hre=
f=3D#dom-select-options>options</a></code> collection, whe=
n invoked with
+  the same argument.</p>
+
+  <p>The <dfn id=3Ddom-select-nameditem title=3Ddom-select-name=
dItem><code>namedItem(<var title=3D"">name</v=
ar>)</code></dfn>
+  method must return the value returned by <a href=3D#dom-htmloptions=
collection-nameditem title=3Ddom-HTMLOptionsCollection-namedItem>the
+  method of the same name</a> on the <code title=3Ddom-select-o=
ptions><a href=3D#dom-select-options>options</a></code&=
gt; collection,
+  when invoked with the same argument.</p>
+
+  <p>When the user agent is to <dfn id=3Ddom-htmlselectelement-=
setter title=3Ddom-HTMLSelectElement-setter>set the value of a new
+  indexed property</dfn> for a given property index <var title=3D=
"">index</var> to a new value <var title=3D"&q=
uot;>value</var>, it must instead <a href=3D#dom-htmloptionsc=
ollection-setter title=3Ddom-HTMLOptionsCollection-setter>set the valu=
e
+  of a new indexed property</a> with the given property index <=
var title=3D"">index</var> to the
+  new value <var title=3D"">value</var> on the &lt=
;code title=3Ddom-select-options><a href=3D#dom-select-options>o=
ptions</a></code>
+  collection.</p>
+
+  <p>Similarly, the <dfn id=3Ddom-select-add title=3Ddom-select=
-add><code>add()</code></dfn> method must act like i=
ts
+  namesake method on that same <code title=3Ddom-select-options>&l=
t;a href=3D#dom-select-options>options</a></code> collecti=
on.</p>
+
+  <p>The <dfn id=3Ddom-select-remove title=3Ddom-select-remove&=
gt;<code>remove()</code></dfn> method must act like its
+  namesake method on that same <code title=3Ddom-select-options>&l=
t;a href=3D#dom-select-options>options</a></code> collecti=
on when it
+  has arguments, and like its namesake method on the <code><a h=
ref=3D#childnode>ChildNode</a></code> interface implemente=
d by
+  the <code><a href=3D#htmlselectelement>HTMLSelectElement&l=
t;/a></code> ancestor interface <code><a href=3D#elemen=
t>Element</a></code> when it has no
+  arguments.</p>
+
+  <p>The <dfn id=3Ddom-select-selectedoptions title=3Ddom-selec=
t-selectedOptions><code>selectedOptions</code></dfn>=
 IDL attribute
+  must return an <code><a href=3D#htmlcollection>HTMLCollect=
ion</a></code> rooted at the <code><a href=3D#the-se=
lect-element>select</a></code> node, whose filter
+  matches the elements in the <a href=3D#concept-select-option-list t=
itle=3Dconcept-select-option-list>list of options</a> that
+  have their <a href=3D#concept-option-selectedness title=3Dconcept-o=
ption-selectedness>selectedness</a> set to true.</p>
+
+  <p>The <dfn id=3Ddom-select-selectedindex title=3Ddom-select-=
selectedIndex><code>selectedIndex</code></dfn> IDL a=
ttribute, on
+  getting, must return the <a href=3D#concept-option-index title=3Dco=
ncept-option-index>index</a> of the first
+  <code><a href=3D#the-option-element>option</a></c=
ode> element in the <a href=3D#concept-select-option-list title=3Dc=
oncept-select-option-list>list of options</a>
+  in <a href=3D#tree-order>tree order</a> that has its <a=
 href=3D#concept-option-selectedness title=3Dconcept-option-selectedness&=
gt;selectedness</a> set to true, if any. If there isn't one,
+  then it must return −1.</p>
+
+  <p>On setting, the <code title=3Ddom-select-selectedIndex>=
<a href=3D#dom-select-selectedindex>selectedIndex</a></cod=
e> attribute must set
+  the <a href=3D#concept-option-selectedness title=3Dconcept-option-s=
electedness>selectedness</a> of all the <code><a href=3D=
#the-option-element>option</a></code>
+  elements in the <a href=3D#concept-select-option-list title=3Dconce=
pt-select-option-list>list of options</a> to false, and then
+  the <code><a href=3D#the-option-element>option</a>&l=
t;/code> element in the <a href=3D#concept-select-option-list title=
=3Dconcept-select-option-list>list of
+  options</a> whose <a href=3D#concept-option-index title=3Dcon=
cept-option-index>index</a> is the given new value, if
+  any, must have its <a href=3D#concept-option-selectedness title=3Dc=
oncept-option-selectedness>selectedness</a> set to true.</p&g=
t;
+
+  <p class=3Dnote>This can result in no element having a <a hre=
f=3D#concept-option-selectedness title=3Dconcept-option-selectedness>s=
electedness</a> set to true even in the case of the
+  <code><a href=3D#the-select-element>select</a></c=
ode> element having no <code title=3Dattr-select-multiple><a =
href=3D#attr-select-multiple>multiple</a></code> attribute
+  and a <a href=3D#concept-select-size title=3Dconcept-select-size&gt=
;display size</a> of 1.</p>
+
+  <p>The <dfn id=3Ddom-select-value title=3Ddom-select-value&gt=
;<code>value</code></dfn> IDL attribute, on getting, mu=
st
+  return the <a href=3D#concept-option-value title=3Dconcept-option-v=
alue>value</a> of the first <code><a href=3D#the-option=
-element>option</a></code>
+  element in the <a href=3D#concept-select-option-list title=3Dconcep=
t-select-option-list>list of options</a> in <a href=3D#tree-o=
rder>tree
+  order</a> that has its <a href=3D#concept-option-selectedness=
 title=3Dconcept-option-selectedness>selectedness</a> set to
+  true, if any. If there isn't one, then it must return the empty string=
.</p>
+
+  <p>On setting, the <code title=3Ddom-select-value><a hr=
ef=3D#dom-select-value>value</a></code> attribute must set=
 the <a href=3D#concept-option-selectedness title=3Dconcept-option-sel=
ectedness>selectedness</a> of all the <code><a href=3D#=
the-option-element>option</a></code> elements in
+  the <a href=3D#concept-select-option-list title=3Dconcept-select-op=
tion-list>list of options</a> to false, and then the first
+  <code><a href=3D#the-option-element>option</a></c=
ode> element in the <a href=3D#concept-select-option-list title=3Dc=
oncept-select-option-list>list of
+  options</a>, in <a href=3D#tree-order>tree order</a>=
, whose <a href=3D#concept-option-value title=3Dconcept-option-value&g=
t;value</a>
+  is equal to the given new value, if any, must have its <a href=3D#c=
oncept-option-selectedness title=3Dconcept-option-selectedness>selecte=
dness</a> set to true.</p>
+
+  <p class=3Dnote>This can result in no element having a <a hre=
f=3D#concept-option-selectedness title=3Dconcept-option-selectedness>s=
electedness</a> set to true even in the case of the
+  <code><a href=3D#the-select-element>select</a></c=
ode> element having no <code title=3Dattr-select-multiple><a =
href=3D#attr-select-multiple>multiple</a></code> attribute
+  and a <a href=3D#concept-select-size title=3Dconcept-select-size&gt=
;display size</a> of 1.</p>
+
+  <p>The <dfn id=3Ddom-select-multiple title=3Ddom-select-multi=
ple><code>multiple</code></dfn>, <dfn id=3Ddom-se=
lect-required title=3Ddom-select-required><code>required</cod=
e></dfn>, and <dfn id=3Ddom-select-size title=3Ddom-select-si=
ze><code>size</code></dfn> IDL attributes must <a=
 href=3D#reflect>reflect</a> the
+  respective content attributes of the same name. The <code title=3Dd=
om-select-size><a href=3D#dom-select-size>size</a></cod=
e> IDL
+  attribute has a default value of zero.</p> <!-- see bug 12288=
 for compat reasons why .size allows
+  zero (it's not limited to values greater than zero) even though that v=
alue really makes no sense
+  -->
+
+  <p class=3Dnote>For historical reasons, the default value of the=
 <code title=3Ddom-select-size><a href=3D#dom-select-size>siz=
e</a></code> IDL attribute does not return the actual size us=
ed, which, in
+  the absence of the <code title=3Dattr-select-size><a href=3D#=
attr-select-size>size</a></code> content attribute, is eit=
her 1 or 4
+  depending on the presence of the <code title=3Dattr-select-multiple=
><a href=3D#attr-select-multiple>multiple</a></code>=
 attribute.</p>
+
+  <p>The <code title=3Ddom-cva-willValidate><a href=3D#do=
m-cva-willvalidate>willValidate</a></code>, <code title=
=3Ddom-cva-validity><a href=3D#dom-cva-validity>validity</a&g=
t;</code>, and <code title=3Ddom-cva-validationMessage><a =
href=3D#dom-cva-validationmessage>validationMessage</a></code=
> IDL attributes, and the <code title=3Ddom-cva-checkValidity>&l=
t;a href=3D#dom-cva-checkvalidity>checkValidity()</a></code&g=
t;, <code title=3Ddom-cva-reportValidity><a href=3D#dom-cva-repo=
rtvalidity>reportValidity()</a></code>, and <code title=
=3Ddom-cva-setCustomValidity><a href=3D#dom-cva-setcustomvalidity&g=
t;setCustomValidity()</a></code> methods, are part of the
+  <a href=3D#the-constraint-validation-api>constraint validation A=
PI</a>. The <code title=3Ddom-lfe-labels><a href=3D#dom-lf=
e-labels>labels</a></code> IDL
+  attribute provides a list of the element's <code><a href=3D#t=
he-label-element>label</a></code>s. The <code title=3Dd=
om-fe-autofocus><a href=3D#dom-fe-autofocus>autofocus</a>&=
lt;/code>, <code title=3Ddom-fe-disabled><a href=3D#dom-fe-di=
sabled>disabled</a></code>, <code title=3Ddom-fae-form&=
gt;<a href=3D#dom-fae-form>form</a></code>, and <cod=
e title=3Ddom-fe-name><a href=3D#dom-fe-name>name</a></=
code> IDL attributes are
+  part of the element's forms API.</p>
+
+  </div>
+<!--TOPIC:HTML-->
+
+  <div class=3Dexample>
+
+   <p>The following example shows how a <code><a href=3D#=
the-select-element>select</a></code> element can be used t=
o offer the user
+   with a set of options from which the user can select a single option.=
 The default option is
+   preselected.</p>
+
+   <pre><p>
+ <label for=3D"unittype">Select unit type:&l=
t;/label>
+ <select id=3D"unittype" name=3D"unittype"&am=
p;gt;
+  <option value=3D"1"> Miner </option&amp=
;gt;
+  <option value=3D"2"> Puffer </option&am=
p;gt;
+  <option value=3D"3" selected> Snipey </=
option>
+  <option value=3D"4"> Max </option&g=
t;
+  <option value=3D"5"> Firebot </option&a=
mp;gt;
+ </select>
+</p></pre>
+
+   <p>When there is no default option, a placeholder can be used i=
nstead:</p>
+
+   <pre><select name=3D"unittype" <strong>r=
equired</strong>>
+ <strong><option value=3D""> Select unit t=
ype </option></strong>
+ <option value=3D"1"> Miner </option&=
gt;
+ <option value=3D"2"> Puffer </option&amp=
;gt;
+ <option value=3D"3"> Snipey </option&amp=
;gt;
+ <option value=3D"4"> Max </option&gt=
;
+ <option value=3D"5"> Firebot </option&am=
p;gt;
+</select></pre>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>Here, the user is offered a set of options from which he can=
 select any number. By default,
+   all five options are selected.</p>
+
+   <pre><p>
+ <label for=3D"allowedunits">Select unit types t=
o enable on this map:</label>
+ <select id=3D"allowedunits" name=3D"allowedunits&=
quot; multiple>
+  <option value=3D"1" selected> Miner </o=
ption>
+  <option value=3D"2" selected> Puffer </=
option>
+  <option value=3D"3" selected> Snipey </=
option>
+  <option value=3D"4" selected> Max </opt=
ion>
+  <option value=3D"5" selected> Firebot <=
/option>
+ </select>
+</p></pre>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>Sometimes, a user has to select one or more items. This exam=
ple shows such an interface.</p>
+
+   <pre><p>Select the songs from that you would like=
 on your Act II Mix Tape:</p>
+<select multiple required name=3D"act2">
+ <option value=3D"s1">It Sucks to Be Me (Reprise=
)
+ <option value=3D"s2">There is Life Outside Your=
 Apartment
+ <option value=3D"s3">The More You Ruv Someone
+ <option value=3D"s4">Schadenfreude
+ <option value=3D"s5">I Wish I Could Go Back to =
College
+ <option value=3D"s6">The Money Song
+ <option value=3D"s7">School for Monsters
+ <option value=3D"s8">The Money Song (Reprise)
+ <option value=3D"s9">There's a Fine, Fine Line =
(Reprise)
+ <option value=3D"s10">What Do You Do With a B.A=
. in English? (Reprise)
+ <option value=3D"s11">For Now
+</select></pre>
+
+  </div>
+
+
+
+  <h4 id=3Dthe-datalist-element><span class=3Dsecno>4.10.8 &=
lt;/span>The <dfn><code>datalist</code></dfn> =
element</h4>
+
+  <dl class=3Delement><dt><a href=3D#element-dfn-categori=
es title=3Delement-dfn-categories>Categories</a>:</dt>
+   <dd><a href=3D#flow-content>Flow content</a>.</d=
d>
+   <dd><a href=3D#phrasing-content>Phrasing content</a&gt=
;.</dd>
+   <dt><a href=3D#element-dfn-contexts title=3Delement-dfn-cont=
exts>Contexts in which this element can be used</a>:</dt>
+   <dd>Where <a href=3D#phrasing-content>phrasing content&lt=
;/a> is expected.</dd>
+   <dt><a href=3D#element-dfn-content-model title=3Delement-dfn=
-content-model>Content model</a>:</dt>
+   <dd>Either: <a href=3D#phrasing-content>phrasing content&=
lt;/a>.</dd>
+   <dd>Or: Zero or more <code><a href=3D#the-option-eleme=
nt>option</a></code> elements.</dd>
+   <dt><a href=3D#element-dfn-tag-omission title=3Delement-dfn-=
tag-omission>Tag omission in text/html</a>:</dt>
+   <dd>Neither tag is omissible.</dd>
+   <dt><a href=3D#element-dfn-attributes title=3Delement-dfn-at=
tributes>Content attributes</a>:</dt>
+   <dd><a href=3D#global-attributes>Global attributes</a&=
gt;</dd>
+   <dt><a href=3D#element-dfn-dom title=3Delement-dfn-dom>DO=
M interface</a>:</dt><!--TOPIC:DOM APIs-->
+   <dd>
+<pre class=3Didl>interface <dfn id=3Dhtmldatalistelement>HTM=
LDataListElement</dfn> : <a href=3D#htmlelement>HTMLElement&l=
t;/a> {
+  readonly attribute <a href=3D#htmlcollection>HTMLCollection</=
a> <a href=3D#dom-datalist-options title=3Ddom-datalist-options>=
options</a>;
+};</pre>
+   </dd>
+  </dl><!--TOPIC:HTML--><p>The <code><a href=3D=
#the-datalist-element>datalist</a></code> element represen=
ts a set of <code><a href=3D#the-option-element>option</a&=
gt;</code> elements that
+  represent predefined options for other controls. In the rendering, the=
 <code><a href=3D#the-datalist-element>datalist</a><=
/code>
+  element <a href=3D#represents>represents</a> nothing<sp=
an class=3Dimpl> and it, along with its children, should
+  be hidden</span>.</p>
+
+  <p>The <code><a href=3D#the-datalist-element>datalis=
t</a></code> element can be used in two ways. In the simplest=
 case, the
+  <code><a href=3D#the-datalist-element>datalist</a>&l=
t;/code> element has just <code><a href=3D#the-option-element=
>option</a></code> element children.</p>
+
+  <div class=3Dexample>
+
+   <pre><label>
+ Sex:
+ <input name=3Dsex list=3Dsexes>
+ <datalist id=3Dsexes>
+  <option value=3D"Female">
+  <option value=3D"Male">
+ </datalist>
+</label></pre>
+
+  </div>
+
+  <p>In the more elaborate case, the <code><a href=3D#the=
-datalist-element>datalist</a></code> element can be given=
 contents that are to
+  be displayed for down-level clients that don't support <code>&lt=
;a href=3D#the-datalist-element>datalist</a></code>. In th=
is case, the
+  <code><a href=3D#the-option-element>option</a></c=
ode> elements are provided inside a <code><a href=3D#the-sele=
ct-element>select</a></code> element inside the
+  <code><a href=3D#the-datalist-element>datalist</a>&l=
t;/code> element.</p>
+
+  <div class=3Dexample>
+
+   <pre><label>
+ Sex:
+ <input name=3Dsex list=3Dsexes>
+</label>
+<datalist id=3Dsexes>
+ <label>
+  or select from the list:
+  <select name=3Dsex>
+   <option value=3D"">
+   <option>Female
+   <option>Male
+  </select>
+ </label>
+</datalist></pre>
+
+  </div>
+
+  <p>The <code><a href=3D#the-datalist-element>datalis=
t</a></code> element is hooked up to an <code><a hre=
f=3D#the-input-element>input</a></code> element using the =
<code title=3Dattr-input-list><a href=3D#attr-input-list>list=
</a></code> attribute on the <code><a href=3D#the-in=
put-element>input</a></code> element.</p>
+
+  <p>Each <code><a href=3D#the-option-element>option&l=
t;/a></code> element that is a descendant of the <code>&lt=
;a href=3D#the-datalist-element>datalist</a></code> elemen=
t,
+  that is not <a href=3D#concept-option-disabled title=3Dconcept-opti=
on-disabled>disabled</a>, and whose <a href=3D#concept-option=
-value title=3Dconcept-option-value>value</a> is a string that i=
sn't the empty string, represents a
+  suggestion. Each suggestion has a <a href=3D#concept-option-value t=
itle=3Dconcept-option-value>value</a> and a <a href=3D#concep=
t-option-label title=3Dconcept-option-label>label</a>.
+
+<!--TOPIC:DOM APIs-->
+  <dl class=3Ddomintro><dt><var title=3D"">d=
atalist</var> . <code title=3Ddom-datalist-options><a href=
=3D#dom-datalist-options>options</a></code></dt>
+
+   <dd>
+    <p>Returns an <code><a href=3D#htmlcollection>HTML=
Collection</a></code> of the <code>options</code>=
 elements of the
+    <code><a href=3D#the-datalist-element>datalist</a>=
</code> element.</p>
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-datalist-options title=3Ddom-datalist-op=
tions><code>options</code></dfn> IDL attribute must =
return an
+  <code><a href=3D#htmlcollection>HTMLCollection</a>&l=
t;/code> rooted at the <code><a href=3D#the-datalist-element&=
gt;datalist</a></code> node, whose filter matches
+  <code><a href=3D#the-option-element>option</a></c=
ode> elements.</p>
+
+  <p><strong>Constraint validation</strong>: If an ele=
ment has a <code><a href=3D#the-datalist-element>datalist<=
/a></code> element
+  ancestor, it is <a href=3D#barred-from-constraint-validation>bar=
red from constraint validation</a>.</p>
+
+  </div>
+<!--TOPIC:HTML-->
+
+
+  <h4 id=3Dthe-optgroup-element><span class=3Dsecno>4.10.9 &=
lt;/span>The <dfn><code>optgroup</code></dfn> =
element</h4>
+
+  <dl class=3Delement><dt><a href=3D#element-dfn-categori=
es title=3Delement-dfn-categories>Categories</a>:</dt>
+   <dd>None.</dd>
+   <dt><a href=3D#element-dfn-contexts title=3Delement-dfn-cont=
exts>Contexts in which this element can be used</a>:</dt>
+   <dd>As a child of a <code><a href=3D#the-select-elemen=
t>select</a></code> element.</dd>
+   <dt><a href=3D#element-dfn-content-model title=3Delement-dfn=
-content-model>Content model</a>:</dt>
+   <dd>Zero or more <code><a href=3D#the-option-element&g=
t;option</a></code> and <a href=3D#script-supporting-eleme=
nts title=3D"script-supporting elements">script-supporting&l=
t;/a> elements.</dd>
+   <dt><a href=3D#element-dfn-tag-omission title=3Delement-dfn-=
tag-omission>Tag omission in text/html</a>:</dt>
+   <dd>An <code><a href=3D#the-optgroup-element>optgro=
up</a></code> element's <a href=3D#syntax-end-tag title=3D=
syntax-end-tag>end tag</a> can be omitted
+   if the <code><a href=3D#the-optgroup-element>optgroup<=
/a></code> element <!--has an ancestor <code>select<=
/code> element and--> is
+   immediately followed by another <code><a href=3D#the-optgrou=
p-element>optgroup</a></code> element, or if <!--all of=
 the elements that
+   are ancestors of the <code>optgroup</code> element, up to=
 and including the first ancestor element
+   that is not an <code>optgroup</code> element, have no mor=
e content--> there is no more content in
+   the parent element.</dd>
+   <dt><a href=3D#element-dfn-attributes title=3Delement-dfn-at=
tributes>Content attributes</a>:</dt>
+   <dd><a href=3D#global-attributes>Global attributes</a&=
gt;</dd>
+   <dd><code title=3Dattr-optgroup-disabled><a href=3D#at=
tr-optgroup-disabled>disabled</a></code> — Wheth=
er the form control is disabled</dd>
+   <dd><code title=3Dattr-optgroup-label><a href=3D#attr-=
optgroup-label>label</a></code> — User-visible l=
abel</dd>
+   <dt><a href=3D#element-dfn-dom title=3Delement-dfn-dom>DO=
M interface</a>:</dt><!--TOPIC:DOM APIs-->
+   <dd>
+<pre class=3Didl>interface <dfn id=3Dhtmloptgroupelement>HTM=
LOptGroupElement</dfn> : <a href=3D#htmlelement>HTMLElement&l=
t;/a> {
+           attribute boolean <a href=3D#dom-optgroup-disabled title=3D=
dom-optgroup-disabled>disabled</a>;
+           attribute DOMString <a href=3D#dom-optgroup-label title=3D=
dom-optgroup-label>label</a>;
+};</pre>
+   </dd>
+  </dl><!--TOPIC:HTML--><!-- v2: make optgroups selectabl=
e if they have a value. --><p>The <code><a href=3D#the-=
optgroup-element>optgroup</a></code> element <a href=3D=
#represents>represents</a> a group of <code><a href=3D#=
the-option-element>option</a></code>
+  elements with a common label.</p>
+
+  <p>The element's group of <code><a href=3D#the-option-e=
lement>option</a></code> elements consists of the <code=
><a href=3D#the-option-element>option</a></code>
+  elements that are children of the <code><a href=3D#the-optgro=
up-element>optgroup</a></code> element.</p>
+
+  <div class=3Dimpl>
+
+  <p>When showing <code><a href=3D#the-option-element>=
option</a></code> elements in <code><a href=3D#the-s=
elect-element>select</a></code> elements, user agents shou=
ld
+  show the <code><a href=3D#the-option-element>option</a&=
gt;</code> elements of such groups as being related to each other a=
nd separate
+  from other <code><a href=3D#the-option-element>option</=
a></code> elements.</p>
+
+  </div>
+
+  <p>The <dfn id=3Dattr-optgroup-disabled title=3Dattr-optgroup=
-disabled><code>disabled</code></dfn> attribute is a
+  <a href=3D#boolean-attribute>boolean attribute</a> and can=
 be used to <a href=3D#concept-option-disabled title=3Dconcept-option-=
disabled>disable</a> a group of <code><a href=3D#the-op=
tion-element>option</a></code> elements
+  together.</p>
+
+  <p>The <dfn id=3Dattr-optgroup-label title=3Dattr-optgroup-la=
bel><code>label</code></dfn> attribute must be speci=
fied. Its
+  value gives the name of the group, for the purposes of the user interf=
ace. <span class=3Dimpl>User
+  agents should use this attribute's value when labeling the group of &l=
t;code><a href=3D#the-option-element>option</a></code&g=
t; elements
+  in a <code><a href=3D#the-select-element>select</a>&=
lt;/code> element.</span></p>
+
+  <div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-optgroup-disabled title=3Ddom-optgroup-d=
isabled><code>disabled</code></dfn> and <dfn id=3D=
dom-optgroup-label title=3Ddom-optgroup-label><code>label</co=
de></dfn> attributes must <a href=3D#reflect>reflect</a=
> the
+  respective content attributes of the same name.</p>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>The following snippet shows how a set of lessons from three =
courses could be offered in a
+   <code><a href=3D#the-select-element>select</a></=
code> drop-down widget:</p>
+
+   <pre><form action=3D"courseselector.dll" metho=
d=3D"get">
+ <p>Which course would you like to watch today?
+ <p><label>Course:
+  <select name=3D"c">
+   <optgroup label=3D"8.01 Physics I: Classical Mechanics&qu=
ot;>
+    <option value=3D"8.01.1">Lecture 01: Powers =
of Ten
+    <option value=3D"8.01.2">Lecture 02: 1D Kine=
matics
+    <option value=3D"8.01.3">Lecture 03: Vectors
+   <optgroup label=3D"8.02 Electricity and Magnestism"&=
amp;gt;
+    <option value=3D"8.02.1">Lecture 01: What ho=
lds our world together?
+    <option value=3D"8.02.2">Lecture 02: Electri=
c Field
+    <option value=3D"8.02.3">Lecture 03: Electri=
c Flux
+   <optgroup label=3D"8.03 Physics III: Vibrations and Waves=
">
+    <option value=3D"8.03.1">Lecture 01: Periodi=
c Phenomenon
+    <option value=3D"8.03.2">Lecture 02: Beats
+    <option value=3D"8.03.3">Lecture 03: Forced =
Oscillations with Damping
+  </select>
+ </label>
+ <p><input type=3Dsubmit value=3D"▶=
 Play">
+</form></pre>
+
+  </div>
+
+
+
+  <h4 id=3Dthe-option-element><span class=3Dsecno>4.10.10 &l=
t;/span>The <dfn><code>option</code></dfn> ele=
ment</h4>
+
+  <dl class=3Delement><dt><a href=3D#element-dfn-categori=
es title=3Delement-dfn-categories>Categories</a>:</dt>
+   <dd>None.</dd>
+   <dt><a href=3D#element-dfn-contexts title=3Delement-dfn-cont=
exts>Contexts in which this element can be used</a>:</dt>
+   <dd>As a child of a <code><a href=3D#the-select-elemen=
t>select</a></code> element.</dd>
+   <dd>As a child of a <code><a href=3D#the-datalist-elem=
ent>datalist</a></code> element.</dd>
+   <dd>As a child of an <code><a href=3D#the-optgroup-ele=
ment>optgroup</a></code> element.</dd>
+   <dt><a href=3D#element-dfn-content-model title=3Delement-dfn=
-content-model>Content model</a>:</dt>
+   <dd>If the element has a <code title=3Dattr-option-label>=
<a href=3D#attr-option-label>label</a></code> attribute=
 and a <code title=3Dattr-option-value><a href=3D#attr-option-va=
lue>value</a></code> attribute: Empty.</dd>
+   <dd>If the element has a <code title=3Dattr-option-label>=
<a href=3D#attr-option-label>label</a></code> attribute=
 but no <code title=3Dattr-option-value><a href=3D#attr-option-v=
alue>value</a></code> attribute: <a href=3D#text-conten=
t title=3D"text content">Text</a>.</dd>
+   <dd>If the element has no <code title=3Dattr-option-label&gt=
;<a href=3D#attr-option-label>label</a></code> attribut=
e: <a href=3D#text-content title=3D"text content">Text&lt=
;/a> that is not <a href=3D#inter-element-whitespace>inter-eleme=
nt whitespace</a>.</dd>
+   <dt><a href=3D#element-dfn-tag-omission title=3Delement-dfn-=
tag-omission>Tag omission in text/html</a>:</dt>
+   <dd>An <code><a href=3D#the-option-element>option&l=
t;/a></code> element's <a href=3D#syntax-end-tag title=3Dsynt=
ax-end-tag>end tag</a> can be omitted if
+   the <code><a href=3D#the-option-element>option</a>&=
lt;/code> element is immediately followed by another <code><a=
 href=3D#the-option-element>option</a></code> element, or
+   if it is immediately followed by an <code><a href=3D#the-opt=
group-element>optgroup</a></code> element, or if there is =
no more content
+   in the parent element.</dd>
+   <dt><a href=3D#element-dfn-attributes title=3Delement-dfn-at=
tributes>Content attributes</a>:</dt>
+   <dd><a href=3D#global-attributes>Global attributes</a&=
gt;</dd>
+   <dd><code title=3Dattr-option-disabled><a href=3D#attr=
-option-disabled>disabled</a></code> — Whether t=
he form control is disabled</dd>
+   <dd><code title=3Dattr-option-label><a href=3D#attr-op=
tion-label>label</a></code> — User-visible label=
</dd>
+   <dd><code title=3Dattr-option-selected><a href=3D#attr=
-option-selected>selected</a></code> — Whether t=
he option is selected by default</dd>
+   <dd><code title=3Dattr-option-value><a href=3D#attr-op=
tion-value>value</a></code> — Value to be used f=
or <a href=3D#form-submission>form submission</a></dd>
+   <dt><a href=3D#element-dfn-dom title=3Delement-dfn-dom>DO=
M interface</a>:</dt><!--TOPIC:DOM APIs-->
+   <dd>
+<pre class=3Didl>[NamedConstructor=3D<a href=3D#dom-option titl=
e=3Ddom-option>Option</a>(optional DOMString text =3D "&quo=
t;, optional DOMString value, optional boolean defaultSelected =3D false,=
 optional boolean selected =3D false)]
+interface <dfn id=3Dhtmloptionelement>HTMLOptionElement</dfn&gt=
; : <a href=3D#htmlelement>HTMLElement</a> {
+           attribute boolean <a href=3D#dom-option-disabled title=3Dd=
om-option-disabled>disabled</a>;
+  readonly attribute <a href=3D#htmlformelement>HTMLFormElement&lt=
;/a>? <a href=3D#dom-option-form title=3Ddom-option-form>form&lt=
;/a>;
+           attribute DOMString <a href=3D#dom-option-label title=3Ddo=
m-option-label>label</a>;
+           attribute boolean <a href=3D#dom-option-defaultselected ti=
tle=3Ddom-option-defaultSelected>defaultSelected</a>;
+           attribute boolean <a href=3D#dom-option-selected title=3Dd=
om-option-selected>selected</a>;
+           attribute DOMString <a href=3D#dom-option-value title=3Ddo=
m-option-value>value</a>;
+
+           attribute DOMString <a href=3D#dom-option-text title=3Ddom=
-option-text>text</a>;
+  readonly attribute long <a href=3D#dom-option-index title=3Ddom-opt=
ion-index>index</a>;
+};</pre>
+   </dd>
+  </dl><!--TOPIC:HTML--><p>The <code><a href=3D=
#the-option-element>option</a></code> element <a href=3D=
#represents>represents</a> an option in a <code><a href=
=3D#the-select-element>select</a></code>
+  element or as part of a list of suggestions in a <code><a hre=
f=3D#the-datalist-element>datalist</a></code> element.<=
/p>
+
+  <p>In certain circumstances described in the definition of the &=
lt;code><a href=3D#the-select-element>select</a></code&=
gt; element, an
+  <code><a href=3D#the-option-element>option</a></c=
ode> element can be a <code><a href=3D#the-select-element>=
select</a></code> element's <a href=3D#placeholder-label-o=
ption>placeholder label
+  option</a>. A <a href=3D#placeholder-label-option>placehol=
der label option</a> does not represent an actual option, but
+  instead represents a label for the <code><a href=3D#the-selec=
t-element>select</a></code> control.</p>
+
+  <p>The <dfn id=3Dattr-option-disabled title=3Dattr-option-dis=
abled><code>disabled</code></dfn> attribute is a &lt=
;a href=3D#boolean-attribute>boolean
+  attribute</a>. An <code><a href=3D#the-option-element&g=
t;option</a></code> element is <dfn id=3Dconcept-option-di=
sabled title=3Dconcept-option-disabled>disabled</dfn> if its &lt=
;code title=3Dattr-option-disabled><a href=3D#attr-option-disabled&=
gt;disabled</a></code> attribute is present or if it is a chi=
ld of an
+  <code><a href=3D#the-optgroup-element>optgroup</a>&l=
t;/code> element whose <code title=3Dattr-optgroup-disabled><=
a href=3D#attr-optgroup-disabled>disabled</a></code> attri=
bute
+  is present.</p>
+
+  <div class=3Dimpl>
+
+  <p>An <code><a href=3D#the-option-element>option<=
/a></code> element that is <a href=3D#attr-option-disabled ti=
tle=3Dattr-option-disabled>disabled</a> must
+  prevent any <code title=3Devent-click><a href=3D#event-click&=
gt;click</a></code> events that are <a href=3D#queue-a-tas=
k title=3D"queue a
+  task">queued</a> on the <a href=3D#user-interaction-t=
ask-source>user interaction task source</a> from being dispatche=
d on the
+  element.</p>
+
+  </div>
+
+  <p>The <dfn id=3Dattr-option-label title=3Dattr-option-label&=
gt;<code>label</code></dfn> attribute provides a label =
for
+  element. The <dfn id=3Dconcept-option-label title=3Dconcept-option-=
label>label</dfn> of an <code><a href=3D#the-option-ele=
ment>option</a></code> element is
+  the value of the <code title=3Dattr-option-label><a href=3D#a=
ttr-option-label>label</a></code> content attribute, if th=
ere is one,
+  or, if there is not, the value of the element's <code title=3Ddom-o=
ption-text><a href=3D#dom-option-text>text</a></code&gt=
; IDL
+  attribute.</p>
+
+  <p>The <code title=3Dattr-option-label><a href=3D#attr-=
option-label>label</a></code> content attribute, if specif=
ied, must not be
+  empty.</p>
+
+  <p>The <dfn id=3Dattr-option-value title=3Dattr-option-value&=
gt;<code>value</code></dfn> attribute provides a value =
for
+  element. The <dfn id=3Dconcept-option-value title=3Dconcept-option-=
value>value</dfn> of an <code><a href=3D#the-option-ele=
ment>option</a></code> element is
+  the value of the <code title=3Dattr-option-value><a href=3D#a=
ttr-option-value>value</a></code> content attribute, if th=
ere is one,
+  or, if there is not, the value of the element's <code title=3Ddom-o=
ption-text><a href=3D#dom-option-text>text</a></code&gt=
; IDL
+  attribute.</p>
+
+  <p>The <dfn id=3Dattr-option-selected title=3Dattr-option-sel=
ected><code>selected</code></dfn> attribute is a &lt=
;a href=3D#boolean-attribute>boolean
+  attribute</a>. It represents the default <a href=3D#concept-o=
ption-selectedness title=3Dconcept-option-selectedness>selectedness&lt=
;/a> of the element.</p>
+
+  <div class=3Dimpl>
+
+  <p>The <dfn id=3Dconcept-option-selectedness title=3Dconcept-=
option-selectedness>selectedness</dfn> of an <code><a h=
ref=3D#the-option-element>option</a></code>
+  element is a boolean state, initially false. Except where otherwise sp=
ecified, when the element is
+  created, its <a href=3D#concept-option-selectedness title=3Dconcept=
-option-selectedness>selectedness</a> must be set to true if
+  the element has a <code title=3Dattr-option-selected><a href=3D=
#attr-option-selected>selected</a></code> attribute. Whene=
ver an
+  <code><a href=3D#the-option-element>option</a></c=
ode> element's <code title=3Dattr-option-selected><a href=3D#=
attr-option-selected>selected</a></code> attribute is
+  added, its <a href=3D#concept-option-selectedness title=3Dconcept-o=
ption-selectedness>selectedness</a> must be set to true.</p&g=
t;
+
+  <p class=3Dnote>The <code title=3Ddom-option><a href=3D=
#dom-option>Option()</a></code> constructor, when called w=
ith three
+  or fewer arguments, overrides the initial state of the <a href=3D#c=
oncept-option-selectedness title=3Dconcept-option-selectedness>selecte=
dness</a> state to always be false even if the third
+  argument is true (implying that a <code title=3Dattr-option-selecte=
d><a href=3D#attr-option-selected>selected</a></code&gt=
; attribute is
+  to be set). The fourth argument can be used to explicitly set the init=
ial <a href=3D#concept-option-selectedness title=3Dconcept-option-sele=
ctedness>selectedness</a> state when using the constructor.</=
p>
+
+  <!-- http://software.hixie.ch/utilities/js/live-dom-viewer/saved/60=
4 -->
+
+  </div>
+
+  <p>A <code><a href=3D#the-select-element>select</=
a></code> element whose <code title=3Dattr-select-multiple&gt=
;<a href=3D#attr-select-multiple>multiple</a></code>
+  attribute is not specified must not have more than one descendant <=
code><a href=3D#the-option-element>option</a></code>=
 element with
+  its <code title=3Dattr-option-selected><a href=3D#attr-option=
-selected>selected</a></code> attribute set.</p>
+
+  <div class=3Dimpl>
+
+  <p>An <code><a href=3D#the-option-element>option<=
/a></code> element's <dfn id=3Dconcept-option-index title=3Dc=
oncept-option-index>index</dfn> is the number of
+  <code><a href=3D#the-option-element>option</a></c=
ode> elements that are in the same <a href=3D#concept-select-option=
-list title=3Dconcept-select-option-list>list of
+  options</a> but that come before it in <a href=3D#tree-order&=
gt;tree order</a>. If the <code><a href=3D#the-option-elem=
ent>option</a></code>
+  element is not in a <a href=3D#concept-select-option-list title=3Dc=
oncept-select-option-list>list of options</a>, then the
+  <code><a href=3D#the-option-element>option</a></c=
ode> element's <a href=3D#concept-option-index title=3Dconcept-opti=
on-index>index</a> is zero.</p>
+
+  </div>
+
+<!--TOPIC:DOM APIs-->
+  <dl class=3Ddomintro><dt><var title=3D"">o=
ption</var> . <code title=3Ddom-option-selected><a href=3D=
#dom-option-selected>selected</a></code></dt>
+
+   <dd>
+
+    <p>Returns true if the element is selected, and false otherwis=
e.</p>
+
+    <p>Can be set, to override the current state of the element.&l=
t;/p>
+
+   </dd>
+
+   <dt><var title=3D"">option</var> . <co=
de title=3Ddom-option-index><a href=3D#dom-option-index>index&lt=
;/a></code></dt>
+
+   <dd>
+
+    <p>Returns the index of the element in its <code><a h=
ref=3D#the-select-element>select</a></code> element's <=
code title=3Ddom-select-options><a href=3D#dom-select-options>op=
tions</a></code> list.</p>
+
+   </dd>
+
+   <dt><var title=3D"">option</var> . <co=
de title=3Ddom-option-form><a href=3D#dom-option-form>form</a=
></code></dt>
+
+   <dd>
+
+    <p>Returns the element's <code><a href=3D#the-form-el=
ement>form</a></code> element, if any, or null otherwise.&=
lt;/p>
+
+   </dd>
+
+   <dt><var title=3D"">option</var> . <co=
de title=3Ddom-option-text><a href=3D#dom-option-text>text</a=
></code></dt>
+
+   <dd>
+
+    <p>Same as <code><a href=3D#textcontent>textConten=
t</a></code>, except that spaces are collapsed and <code&g=
t;<a href=3D#the-script-element>script</a></code> eleme=
nts are skipped.</p>
+
+   </dd>
+
+   <dt><var title=3D"">option</var> =3D new =
<code title=3Ddom-option><a href=3D#dom-option>Option</a&g=
t;</code>( [ <var title=3D"">text</var> [, &l=
t;var title=3D"">value</var> [, <var title=3D"=
">defaultSelected</var> [, <var title=3D"">=
selected</var> ] ] ] ] )</dt>
+
+   <dd>
+
+    <p>Returns a new <code><a href=3D#the-option-element&=
gt;option</a></code> element.</p>
+
+    <p>The <var title=3D"">text</var> argume=
nt sets the contents of the element.</p>
+
+    <p>The <var title=3D"">value</var> argum=
ent sets the <code title=3Dattr-option-value><a href=3D#attr-opt=
ion-value>value</a></code>
+    attribute.</p>
+
+    <p>The <var title=3D"">defaultSelected</var=
> argument sets the <code title=3Dattr-option-selected><a hre=
f=3D#attr-option-selected>selected</a></code> attribute.&l=
t;/p>
+
+    <p>The <var title=3D"">selected</var> ar=
gument sets whether or not the element is selected. If it
+    is omitted, even if the <var title=3D"">defaultSelec=
ted</var> argument is true, the element is not
+    selected.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-option-disabled title=3Ddom-option-disab=
led><code>disabled</code></dfn> IDL attribute must
+  <a href=3D#reflect>reflect</a> the content attribute of th=
e same name. The <dfn id=3Ddom-option-defaultselected title=3Ddom-opti=
on-defaultSelected><code>defaultSelected</code></dfn&gt=
; IDL attribute must
+  <a href=3D#reflect>reflect</a> the <code title=3Dattr-o=
ption-selected><a href=3D#attr-option-selected>selected</a&gt=
;</code> content attribute.</p>
+
+  <p>The <dfn id=3Ddom-option-label title=3Ddom-option-label&gt=
;<code>label</code></dfn> IDL attribute, on getting, mu=
st
+  return the element's <a href=3D#concept-option-label title=3Dconcep=
t-option-label>label</a>. On setting, the element's
+  <code title=3Dattr-option-label><a href=3D#attr-option-label&=
gt;label</a></code> content attribute must be set to the new =
value.</p>
+
+  <p>The <dfn id=3Ddom-option-value title=3Ddom-option-value&gt=
;<code>value</code></dfn> IDL attribute, on getting, mu=
st
+  return the element's <a href=3D#concept-option-value title=3Dconcep=
t-option-value>value</a>. On setting, the element's
+  <code title=3Dattr-option-value><a href=3D#attr-option-value&=
gt;value</a></code> content attribute must be set to the new =
value.</p>
+
+  <p>The <dfn id=3Ddom-option-selected title=3Ddom-option-selec=
ted><code>selected</code></dfn> IDL attribute, on ge=
tting,
+  must return true if the element's <a href=3D#concept-option-selecte=
dness title=3Dconcept-option-selectedness>selectedness</a> is
+  true, and false otherwise. On setting, it must set the element's <a=
 href=3D#concept-option-selectedness title=3Dconcept-option-selectedness&=
gt;selectedness</a> to the new value, and then cause the
+  element to <a href=3D#ask-for-a-reset>ask for a reset</a>.=
</p>
+
+  <p>The <dfn id=3Ddom-option-index title=3Ddom-option-index&gt=
;<code>index</code></dfn> IDL attribute must return the
+  element's <a href=3D#concept-option-index title=3Dconcept-option-in=
dex>index</a>.</p>
+
+  <p>The <dfn id=3Ddom-option-text title=3Ddom-option-text>&=
lt;code>text</code></dfn> IDL attribute, on getting, must =
return
+  the result of <a href=3D#strip-and-collapse-whitespace title=3D&quo=
t;strip and collapse whitespace">stripping and collapsing
+  whitespace</a> from the concatenation of <a href=3D#concept-c=
d-data title=3Dconcept-cd-data>data</a> of all the
+  <code><a href=3D#text>Text</a></code> node des=
cendants of the <code><a href=3D#the-option-element>option&lt=
;/a></code> element, in <a href=3D#tree-order>tree order&l=
t;/a>,
+  excluding any that are descendants of descendants of the <code>&=
lt;a href=3D#the-option-element>option</a></code> element =
that are
+  themselves <code><a href=3D#the-script-element>script</=
a></code> elements in the <a href=3D#html-namespace-0>HTML=
 namespace</a> or <code title=3D"">script</code&=
gt; elements in the <a href=3D#svg-namespace>SVG namespace</a&gt=
;.</p>
+
+  <p>On setting, the <code title=3Ddom-option-text><a hre=
f=3D#dom-option-text>text</a></code> attribute must act as=
 if the
+  <code><a href=3D#textcontent>textContent</a></cod=
e> IDL attribute on the element had been set to the new value.</p&g=
t;
+
+  <p>The <dfn id=3Ddom-option-form title=3Ddom-option-form>&=
lt;code>form</code></dfn> IDL attribute's behavior depends=
 on
+  whether the <code><a href=3D#the-option-element>option<=
/a></code> element is in a <code><a href=3D#the-select-=
element>select</a></code> element or not. If the
+  <code><a href=3D#the-option-element>option</a></c=
ode> has a <code><a href=3D#the-select-element>select</=
a></code> element as its parent, or has an
+  <code><a href=3D#the-optgroup-element>optgroup</a>&l=
t;/code> element as its parent and that <code><a href=3D#the-=
optgroup-element>optgroup</a></code> element has a
+  <code><a href=3D#the-select-element>select</a></c=
ode> element as its parent, then the <code title=3Ddom-option-form&=
gt;<a href=3D#dom-option-form>form</a></code> IDL
+  attribute must return the same value as the <code title=3Ddom-fae-f=
orm><a href=3D#dom-fae-form>form</a></code> IDL attr=
ibute
+  on that <code><a href=3D#the-select-element>select</a&g=
t;</code> element. Otherwise, it must return null.</p>
+
+  <p>A constructor is provided for creating <code><a href=
=3D#htmloptionelement>HTMLOptionElement</a></code> objects=
 (in addition to
+  the factory methods from DOM such as <code title=3D"">=
createElement()</code>): <dfn id=3Ddom-option title=3Ddom-option=
><code>Option(<var title=3D"">text</var>, =
<var title=3D"">value</var>, <var title=3D"=
">defaultSelected</var>, <var title=3D"">se=
lected</var>)</code></dfn>. When invoked as a
+  constructor, it must return a new <code><a href=3D#htmloption=
element>HTMLOptionElement</a></code> object (a new <cod=
e><a href=3D#the-option-element>option</a></code>
+  element). If the first argument is not the empty string, the new objec=
t must have as its only
+  child a <code><a href=3D#text>Text</a></code> =
node whose data is the value of that argument. Otherwise, it must have
+  no children. If the <var title=3D"">value</var> =
argument is present, the new object must have a
+  <code title=3Dattr-option-value><a href=3D#attr-option-value&=
gt;value</a></code> attribute set with the value of the argum=
ent as its
+  value. If the <var title=3D"">defaultSelected</var&=
gt; argument is true, the new object must have a
+  <code title=3Dattr-option-selected><a href=3D#attr-option-sel=
ected>selected</a></code> attribute set with no value. If =
the <var title=3D"">selected</var> argument is true=
, the new object must have its <a href=3D#concept-option-selectedness =
title=3Dconcept-option-selectedness>selectedness</a> set to true=
; otherwise the <a href=3D#concept-option-selectedness title=3Dconcept=
-option-selectedness>selectedness</a> must be set to false, even=
 if the <var title=3D"">defaultSelected</var> argum=
ent is true. The element's document must be the <a href=3D#active-docu=
ment>active
+  document</a> of the <a href=3D#browsing-context>browsing c=
ontext</a> of the <code><a href=3D#window>Window</a&=
gt;</code> object on which
+  the interface object of the invoked constructor is found.</p>
+
+  </div>
+<!--TOPIC:HTML-->
+
+
+
+  <h4 id=3Dthe-textarea-element><span class=3Dsecno>4.10.11 =
</span>The <dfn><code>textarea</code></dfn>=
 element</h4>
+
+  <dl class=3Delement><dt><a href=3D#element-dfn-categori=
es title=3Delement-dfn-categories>Categories</a>:</dt>
+   <dd><a href=3D#flow-content>Flow content</a>.</d=
d>
+   <dd><a href=3D#phrasing-content>Phrasing content</a&gt=
;.</dd>
+   <dd><a href=3D#interactive-content>Interactive content&lt=
;/a>.</dd>
+   <dd><a href=3D#category-listed title=3Dcategory-listed>Li=
sted</a>, <a href=3D#category-label title=3Dcategory-label>la=
belable</a>, <a href=3D#category-submit title=3Dcategory-submit&=
gt;submittable</a>, <a href=3D#category-reset title=3Dcategory-r=
eset>resettable</a>, and <a href=3D#category-form-attr title=3D=
category-form-attr>reassociateable</a> <a href=3D#form-associ=
ated-element>form-associated element</a>.</dd>
+   <dd><a href=3D#palpable-content>Palpable content</a&gt=
;.</dd>
+   <dt><a href=3D#element-dfn-contexts title=3Delement-dfn-cont=
exts>Contexts in which this element can be used</a>:</dt>
+   <dd>Where <a href=3D#phrasing-content>phrasing content&lt=
;/a> is expected.</dd>
+   <dt><a href=3D#element-dfn-content-model title=3Delement-dfn=
-content-model>Content model</a>:</dt>
+   <dd><a href=3D#text-content title=3D"text content"=
>Text</a>.</dd>
+   <dt><a href=3D#element-dfn-tag-omission title=3Delement-dfn-=
tag-omission>Tag omission in text/html</a>:</dt>
+   <dd>Neither tag is omissible.</dd>
+   <dt><a href=3D#element-dfn-attributes title=3Delement-dfn-at=
tributes>Content attributes</a>:</dt>
+   <dd><a href=3D#global-attributes>Global attributes</a&=
gt;</dd>
+   <dd><code title=3Dattr-fe-autocomplete><a href=3D#attr=
-fe-autocomplete>autocomplete</a></code> — Hint =
for form autofill feature</dd>
+   <dd><code title=3Dattr-fe-autofocus><a href=3D#attr-fe=
-autofocus>autofocus</a></code> — Automatically =
focus the form control when the page is loaded</dd>
+   <dd><code title=3Dattr-textarea-cols><a href=3D#attr-t=
extarea-cols>cols</a></code> — Maximum number of=
 characters per line</dd>
+   <dd><code title=3Dattr-fe-dirname><a href=3D#attr-fe-d=
irname>dirname</a></code> — Name of form field t=
o use for sending the element's <a href=3D#the-directionality title=3D=
"the directionality">directionality</a> in <a href=3D=
#form-submission>form submission</a></dd>
+   <dd><code title=3Dattr-fe-disabled><a href=3D#attr-fe-=
disabled>disabled</a></code> — Whether the form =
control is disabled</dd>
+   <dd><code title=3Dattr-fae-form><a href=3D#attr-fae-fo=
rm>form</a></code> — Associates the control with=
 a <code><a href=3D#the-form-element>form</a></code&=
gt; element</dd>
+   <dd><code title=3Dattr-fe-inputmode><a href=3D#attr-fe=
-inputmode>inputmode</a></code> — Hint for selec=
ting an input modality</dd>
+   <dd><code title=3Dattr-textarea-maxlength><a href=3D#a=
ttr-textarea-maxlength>maxlength</a></code> — Ma=
ximum length of value</dd>
+   <dd><code title=3Dattr-textarea-minlength><a href=3D#a=
ttr-textarea-minlength>minlength</a></code> — Mi=
nimum length of value</dd>
+   <dd><code title=3Dattr-fe-name><a href=3D#attr-fe-name=
>name</a></code> — Name of form control to use f=
or <a href=3D#form-submission>form submission</a> and in the =
<code title=3Ddom-form-elements><a href=3D#dom-form-elements>=
form.elements</a></code> API</dd>
+   <dd><code title=3Dattr-textarea-placeholder><a href=3D=
#attr-textarea-placeholder>placeholder</a></code> &mda=
sh; User-visible label to be placed within the form control</dd>
+   <dd><code title=3Dattr-textarea-readonly><a href=3D#at=
tr-textarea-readonly>readonly</a></code> — Wheth=
er to allow the value to be edited by the user</dd>
+   <dd><code title=3Dattr-textarea-required><a href=3D#at=
tr-textarea-required>required</a></code> — Wheth=
er the control is required for <a href=3D#form-submission>form subm=
ission</a></dd>
+   <dd><code title=3Dattr-textarea-rows><a href=3D#attr-t=
extarea-rows>rows</a></code> — Number of lines t=
o show</dd>
+   <dd><code title=3Dattr-textarea-wrap><a href=3D#attr-t=
extarea-wrap>wrap</a></code> — How the value of =
the form control is to be wrapped for <a href=3D#form-submission>fo=
rm submission</a></dd>
+   <dt><a href=3D#element-dfn-dom title=3Delement-dfn-dom>DO=
M interface</a>:</dt><!--TOPIC:DOM APIs-->
+   <dd>
+<pre class=3Didl>interface <dfn id=3Dhtmltextareaelement>HTM=
LTextAreaElement</dfn> : <a href=3D#htmlelement>HTMLElement&l=
t;/a> {
+           attribute DOMString <a href=3D#dom-fe-autocomplete title=3D=
dom-fe-autocomplete>autocomplete</a>;
+           attribute boolean <a href=3D#dom-fe-autofocus title=3Ddom-=
fe-autofocus>autofocus</a>;
+           attribute unsigned long <a href=3D#dom-textarea-cols title=
=3Ddom-textarea-cols>cols</a>;
+           attribute DOMString <a href=3D#dom-textarea-dirname title=3D=
dom-textarea-dirName>dirName</a>;
+           attribute boolean <a href=3D#dom-fe-disabled title=3Ddom-f=
e-disabled>disabled</a>;
+  readonly attribute <a href=3D#htmlformelement>HTMLFormElement&lt=
;/a>? <a href=3D#dom-fae-form title=3Ddom-fae-form>form</a&gt=
;;
+           attribute DOMString <a href=3D#dom-textarea-inputmode titl=
e=3Ddom-textarea-inputMode>inputMode</a>;
+           attribute long <a href=3D#dom-textarea-maxlength title=3Dd=
om-textarea-maxLength>maxLength</a>;
+           attribute long <a href=3D#dom-textarea-minlength title=3Dd=
om-textarea-minLength>minLength</a>;
+           attribute DOMString <a href=3D#dom-fe-name title=3Ddom-fe-=
name>name</a>;
+           attribute DOMString <a href=3D#dom-textarea-placeholder ti=
tle=3Ddom-textarea-placeholder>placeholder</a>;
+           attribute boolean <a href=3D#dom-textarea-readonly title=3D=
dom-textarea-readOnly>readOnly</a>;
+           attribute boolean <a href=3D#dom-textarea-required title=3D=
dom-textarea-required>required</a>;
+           attribute unsigned long <a href=3D#dom-textarea-rows title=
=3Ddom-textarea-rows>rows</a>;
+           attribute DOMString <a href=3D#dom-textarea-wrap title=3Dd=
om-textarea-wrap>wrap</a>;
+
+  readonly attribute DOMString <a href=3D#dom-textarea-type title=3Dd=
om-textarea-type>type</a>;
+           attribute DOMString <a href=3D#dom-textarea-defaultvalue t=
itle=3Ddom-textarea-defaultValue>defaultValue</a>;
+  [TreatNullAs=3DEmptyString] attribute DOMString <a href=3D#dom-text=
area-value title=3Ddom-textarea-value>value</a>;
+  readonly attribute unsigned long <a href=3D#dom-textarea-textlength=
 title=3Ddom-textarea-textLength>textLength</a>;
+
+  readonly attribute boolean <a href=3D#dom-cva-willvalidate title=3D=
dom-cva-willValidate>willValidate</a>;
+  readonly attribute <a href=3D#validitystate>ValidityState</a&=
gt; <a href=3D#dom-cva-validity title=3Ddom-cva-validity>validity&l=
t;/a>;
+  readonly attribute DOMString <a href=3D#dom-cva-validationmessage t=
itle=3Ddom-cva-validationMessage>validationMessage</a>;
+  boolean <a href=3D#dom-cva-checkvalidity title=3Ddom-cva-checkValid=
ity>checkValidity</a>();
+  boolean <a href=3D#dom-cva-reportvalidity title=3Ddom-cva-reportVal=
idity>reportValidity</a>();
+  void <a href=3D#dom-cva-setcustomvalidity title=3Ddom-cva-setCustom=
Validity>setCustomValidity</a>(DOMString error);
+
+  readonly attribute <a href=3D#nodelist>NodeList</a> <a =
href=3D#dom-lfe-labels title=3Ddom-lfe-labels>labels</a>;
+
+  void <a href=3D#dom-textarea/input-select title=3Ddom-textarea/inpu=
t-select>select</a>();
+           attribute unsigned long <a href=3D#dom-textarea/input-sele=
ctionstart title=3Ddom-textarea/input-selectionStart>selectionStart&lt=
;/a>;
+           attribute unsigned long <a href=3D#dom-textarea/input-sele=
ctionend title=3Ddom-textarea/input-selectionEnd>selectionEnd</a&gt=
;;
+           attribute DOMString <a href=3D#dom-textarea/input-selectio=
ndirection title=3Ddom-textarea/input-selectionDirection>selectionDire=
ction</a>;
+  void <a href=3D#dom-textarea/input-setrangetext title=3Ddom-textare=
a/input-setRangeText>setRangeText</a>(DOMString replacement);
+  void <a href=3D#dom-textarea/input-setrangetext title=3Ddom-textare=
a/input-setRangeText>setRangeText</a>(DOMString replacement, uns=
igned long start, unsigned long end, optional <a href=3D#selectionmode=
>SelectionMode</a> selectionMode =3D "preserve");
+  void <a href=3D#dom-textarea/input-setselectionrange title=3Ddom-te=
xtarea/input-setSelectionRange>setSelectionRange</a>(unsigned lo=
ng start, unsigned long end, optional DOMString direction);
+};</pre>
+   </dd>
+  </dl><!--TOPIC:HTML--><p>The <code><a href=3D=
#the-textarea-element>textarea</a></code> element <a hr=
ef=3D#represents>represents</a> a multiline plain text edit
+  control<span class=3Dimpl> for the element's <dfn id=3Dconcep=
t-textarea-raw-value title=3Dconcept-textarea-raw-value>raw
+  value</dfn></span>. The contents of the control represent =
the control's default value.</p>
+
+  <div class=3Dimpl>
+
+  <p>The <a href=3D#concept-textarea-raw-value title=3Dconcept-=
textarea-raw-value>raw value</a> of a <code><a href=3D#=
the-textarea-element>textarea</a></code>
+  control must be initially the empty string.</p>
+
+  <p>A newline in a <code><a href=3D#the-textarea-element=
>textarea</a></code> element, and in its <a href=3D#con=
cept-textarea-raw-value title=3Dconcept-textarea-raw-value>raw value&l=
t;/a>, should separate paragraphs for the purposes
+  of the Unicode bidirectional algorithm. This requirement may be implem=
ented indirectly through the
+  style layer. For example, an HTML+CSS user agent could implement these=
 requirements by
+  implementing the CSS 'unicode-bidi' property. <a href=3D#refsBIDI&g=
t;[BIDI]</a> <a href=3D#refsCSS>[CSS]</a></p>
+
+  </div>
+
+  <p>The <dfn id=3Dattr-textarea-readonly title=3Dattr-textarea=
-readonly><code>readonly</code></dfn> attribute is a
+  <a href=3D#boolean-attribute>boolean attribute</a> used to=
 control whether the text can be edited by the user or
+  not.</p>
+
+  <div class=3Dexample>
+
+   <p>In this example, a text field is marked read-only because it=
 represents a read-only file:</p>
+
+   <pre>Filename: <code>/etc/bash.bashrc</cod=
e>
+<textarea name=3D"buffer" readonly>
+# System-wide .bashrc file for interactive bash(1) shells.
+
+# To enable the settings / commands in this file for login shells as wel=
l,
+# this file has to be sourced in /etc/profile.
+
+# If not running interactively, don't do anything
+[ -z "$PS1" ] && return
+
+...</textarea></pre>
+
+  </div>
+
+  <div class=3Dimpl>
+
+  <p><strong>Constraint validation</strong>: If the &l=
t;code title=3Dattr-textarea-readonly><a href=3D#attr-textarea-read=
only>readonly</a></code> attribute is specified on a <c=
ode><a href=3D#the-textarea-element>textarea</a></code&=
gt;
+  element, the element is <a href=3D#barred-from-constraint-validatio=
n>barred from constraint validation</a>.</p>
+
+  <p>A <code><a href=3D#the-textarea-element>textarea&=
lt;/a></code> element is <a href=3D#concept-fe-mutable title=3D=
concept-fe-mutable>mutable</a> if it is
+  neither <a href=3D#concept-fe-disabled title=3Dconcept-fe-disabled&=
gt;disabled</a> nor has a <code title=3Dattr-textarea-readonly&g=
t;<a href=3D#attr-textarea-readonly>readonly</a></code>=
 attribute specified.</p>
+
+  <p>When a <code><a href=3D#the-textarea-element>text=
area</a></code> is <a href=3D#concept-fe-mutable title=3Dc=
oncept-fe-mutable>mutable</a>, its <a href=3D#concept-textare=
a-raw-value title=3Dconcept-textarea-raw-value>raw value</a> sho=
uld be editable by the user: the user agent
+  should allow the user to edit, insert, and remove text, and to insert =
and remove line breaks in
+  the form of U+000A LINE FEED (LF) characters. Any time the user causes=
 the element's <a href=3D#concept-textarea-raw-value title=3Dconcept-t=
extarea-raw-value>raw value</a> to change, the user agent must &=
lt;a href=3D#queue-a-task>queue a
+  task</a> to <a href=3D#fire-a-simple-event>fire a simple e=
vent</a> that bubbles named <code title=3Devent-input>input&l=
t;/code> at the <code><a href=3D#the-textarea-element>text=
area</a></code> element. User agents may wait for a
+  suitable break in the user's interaction before queuing the task; for =
example, a user agent could
+  wait for the user to have not hit a key for 100ms, so as to only fire =
the event when the user
+  pauses, instead of continuously for each keystroke.</p> <!-- =
same text is present in the <input>
+  section -->
+
+  <p>A <code><a href=3D#the-textarea-element>textarea&=
lt;/a></code> element has a <dfn id=3Dconcept-textarea-dirty =
title=3Dconcept-textarea-dirty>dirty value
+  flag</dfn>, which must be initially set to false, and must be se=
t to true whenever the user
+  interacts with the control in a way that changes the <a href=3D#con=
cept-textarea-raw-value title=3Dconcept-textarea-raw-value>raw
+  value</a>.</p>
+
+  <p>When the <code><a href=3D#the-textarea-element>te=
xtarea</a></code> element's <code><a href=3D#textcon=
tent>textContent</a></code> IDL attribute changes value,
+  if the element's <a href=3D#concept-textarea-dirty title=3Dconcept-=
textarea-dirty>dirty value flag</a> is false, then the
+  element's <a href=3D#concept-textarea-raw-value title=3Dconcept-tex=
tarea-raw-value>raw value</a> must be set to the value of
+  the element's <code><a href=3D#textcontent>textContent<=
/a></code> IDL attribute.</p>
+
+  <p>The <a href=3D#concept-form-reset-control title=3Dconcept-=
form-reset-control>reset algorithm</a> for <code><a hre=
f=3D#the-textarea-element>textarea</a></code>
+  elements is to set the element's <a href=3D#concept-textarea-raw-va=
lue title=3Dconcept-textarea-raw-value>value</a> to the
+  value of the element's <code><a href=3D#textcontent>textCo=
ntent</a></code> IDL attribute.</p>
+
+  <!-- this next bit is also in the <input> Text/Search section=
 -->
+  <!-- and something similar is in the session history section -->
+  <p>If the element is <a href=3D#concept-fe-mutable title=3Dco=
ncept-fe-mutable>mutable</a>, the user agent should allow
+  the user to change the writing direction of the element, setting it ei=
ther to a left-to-right
+  writing direction or a right-to-left writing direction. If the user do=
es so, the user agent must
+  then run the following steps:</p>
+
+  <ol><li><p>Set the element's <code title=3Dattr-d=
ir><a href=3D#the-dir-attribute>dir</a></code> attri=
bute to "<code title=3Dattr-dir-ltr><a href=3D#attr-dir-ltr=
>ltr</a></code>" if the user selected a left-to-right=
 writing direction, and
+   "<code title=3Dattr-dir-rtl><a href=3D#attr-dir-rtl>=
rtl</a></code>" if the user selected a right-to-left wri=
ting
+   direction.</li>
+
+   <li><p><a href=3D#queue-a-task>Queue a task</a&g=
t; to <a href=3D#fire-a-simple-event>fire a simple event</a> =
that bubbles named <code title=3Devent-input>input</code> at =
the <code><a href=3D#the-textarea-element>textarea</a>&=
lt;/code> element.</li>
+
+  </ol></div>
+
+  <p>The <dfn id=3Dattr-textarea-cols title=3Dattr-textarea-col=
s><code>cols</code></dfn> attribute specifies the ex=
pected
+  maximum number of characters per line. If the <code title=3Dattr-te=
xtarea-cols><a href=3D#attr-textarea-cols>cols</a></cod=
e>
+  attribute is specified, its value must be a <a href=3D#valid-non-ne=
gative-integer>valid non-negative integer</a> greater than
+  zero. <span class=3Dimpl>If applying the <a href=3D#rules-for=
-parsing-non-negative-integers>rules for parsing non-negative integers=
</a> to
+  the attribute's value results in a number greater than zero, then the =
element's <dfn id=3Dattr-textarea-cols-value title=3Dattr-textarea-col=
s-value>character width</dfn> is that value; otherwise, it is
+  20.</span></p>
+
+  <div class=3Dimpl>
+
+  <p>The user agent may use the <code><a href=3D#the-text=
area-element>textarea</a></code> element's <a href=3D#a=
ttr-textarea-cols-value title=3Dattr-textarea-cols-value>character wid=
th</a> as a hint to the user as to how many
+  characters the server prefers per line (e.g. for visual user agents by=
 making the width of the
+  control be that many characters). In visual renderings, the user agent=
 should wrap the user's
+  input in the rendering so that each line is no wider than this number =
of characters.</p>
+
+  </div>
+
+  <p>The <dfn id=3Dattr-textarea-rows title=3Dattr-textarea-row=
s><code>rows</code></dfn> attribute specifies the nu=
mber of
+  lines to show. If the <code title=3Dattr-textarea-rows><a hre=
f=3D#attr-textarea-rows>rows</a></code> attribute is speci=
fied, its
+  value must be a <a href=3D#valid-non-negative-integer>valid non-=
negative integer</a> greater than zero. <span class=3Dimpl>If
+  applying the <a href=3D#rules-for-parsing-non-negative-integers>=
rules for parsing non-negative integers</a> to the attribute's valu=
e results
+  in a number greater than zero, then the element's <dfn id=3Dattr-te=
xtarea-rows-value title=3Dattr-textarea-rows-value>character
+  height</dfn> is that value; otherwise, it is 2.</span><=
/p>
+
+  <div class=3Dimpl>
+
+  <p>Visual user agents should set the height of the control to th=
e number of lines given by <a href=3D#attr-textarea-rows-value title=3D=
attr-textarea-rows-value>character height</a>.</p>
+
+  </div>
+
+  <p>The <dfn id=3Dattr-textarea-wrap title=3Dattr-textarea-wra=
p><code>wrap</code></dfn> attribute is an <a href=
=3D#enumerated-attribute>enumerated
+  attribute</a> with two keywords and states: the <dfn id=3Datt=
r-textarea-wrap-soft title=3Dattr-textarea-wrap-soft><code>soft&=
lt;/code></dfn> keyword which maps to the <a href=3D#attr-tex=
tarea-wrap-soft-state title=3Dattr-textarea-wrap-soft-state>Soft</a=
> state, and the <dfn id=3Dattr-textarea-wrap-hard title=3Dattr-tex=
tarea-wrap-hard><code>hard</code></dfn> keyword whic=
h maps to the <a href=3D#attr-textarea-wrap-hard-state title=3Dattr-te=
xtarea-wrap-hard-state>Hard</a> state. The <i>missing valu=
e default</i> is the
+  <a href=3D#attr-textarea-wrap-soft-state title=3Dattr-textarea-wrap=
-soft-state>Soft</a> state.</p>
+
+  <p>The <dfn id=3Dattr-textarea-wrap-soft-state title=3Dattr-t=
extarea-wrap-soft-state>Soft</dfn> state indicates that the text=
 in the
+  <code><a href=3D#the-textarea-element>textarea</a>&l=
t;/code> is not to be wrapped when it is submitted (though it can stil=
l be wrapped in
+  the rendering).</p>
+
+  <p>The <dfn id=3Dattr-textarea-wrap-hard-state title=3Dattr-t=
extarea-wrap-hard-state>Hard</dfn> state indicates that the text=
 in the
+  <code><a href=3D#the-textarea-element>textarea</a>&l=
t;/code> is to have newlines added by the user agent so that the text =
is wrapped when
+  it is submitted.</p>
+
+  <p>If the element's <code title=3Dattr-textarea-wrap><a=
 href=3D#attr-textarea-wrap>wrap</a></code> attribute is i=
n the <a href=3D#attr-textarea-wrap-hard-state title=3Dattr-textarea-w=
rap-hard-state>Hard</a> state, the <code title=3Dattr-textare=
a-cols><a href=3D#attr-textarea-cols>cols</a></code>=
 attribute must be specified.</p>
+
+  <!-- attr-textarea-wrap-off (attr-textarea-wrap-off-state): not con=
forming; turns off the
+  rendering of wrapping but otherwise acts like 'soft' -->
+
+  <div class=3Dimpl>
+
+  <p>For historical reasons, the element's value is normalised in =
three different ways for three
+  different purposes. The <a href=3D#concept-textarea-raw-value title=
=3Dconcept-textarea-raw-value>raw value</a> is the value as
+  it was originally set. It is not normalized. The <a href=3D#concept=
-textarea-api-value title=3Dconcept-textarea-api-value>API
+  value</a> is the value used in the <code title=3Ddom-textarea=
-value><a href=3D#dom-textarea-value>value</a></code&gt=
; IDL attribute.
+  It is normalized so that line breaks use U+000A LINE FEED (LF) charact=
ers. Finally, there is the
+  form submission <a href=3D#concept-fe-value title=3Dconcept-fe-valu=
e>value</a>. It is normalized so that line breaks
+  use U+000D CARRIAGE RETURN U+000A LINE FEED (CRLF) character pairs, an=
d in addition, if necessary
+  given the element's <code title=3Dattr-textarea-wrap><a href=3D=
#attr-textarea-wrap>wrap</a></code> attribute, additional =
line breaks
+  are inserted to wrap the text at the given width.</p>
+
+  <p>The element's <dfn id=3Dconcept-textarea-api-value title=3D=
concept-textarea-api-value>API value</dfn> is defined to be the
+  element's <a href=3D#concept-textarea-raw-value title=3Dconcept-tex=
tarea-raw-value>raw value</a> with the following
+  transformation applied:</p>
+
+  <ol><li><p>Replace every U+000D CARRIAGE RETURN U+00=
0A LINE FEED (CRLF) character pair from the <a href=3D#concept-textare=
a-raw-value title=3Dconcept-textarea-raw-value>raw value</a> wit=
h a single U+000A LINE FEED (LF)
+   character.</li>
+
+   <li><p>Replace every remaining U+000D CARRIAGE RETURN cha=
racter from the <a href=3D#concept-textarea-raw-value title=3Dconcept-=
textarea-raw-value>raw value</a> with a single U+000A LINE FEED =
(LF)
+   character.</li>
+
+  </ol><p>The element's <a href=3D#concept-fe-value title=
=3Dconcept-fe-value>value</a> is defined to be the element's &lt=
;a href=3D#concept-textarea-raw-value title=3Dconcept-textarea-raw-value&=
gt;raw value</a> with the following transformation applied:</p&g=
t;
+
+  <ol><li><p>Replace every occurrence of a U+000D CARR=
IAGE RETURN (CR) character not followed by a
+   U+000A LINE FEED (LF) character, and every occurrence of a U+000A LIN=
E FEED (LF) character not
+   preceded by a U+000D CARRIAGE RETURN (CR) character, by a two-charact=
er string consisting of a
+   U+000D CARRIAGE RETURN U+000A LINE FEED (CRLF) character pair.</li=
>
+
+   <li><p>If the element's <code title=3Dattr-textarea-wr=
ap><a href=3D#attr-textarea-wrap>wrap</a></code> att=
ribute is in the <a href=3D#attr-textarea-wrap-hard-state title=3Dattr=
-textarea-wrap-hard-state>Hard</a> state, insert U+000D CARRIAGE=
 RETURN U+000A
+   LINE FEED (CRLF) character pairs into the string using a UA-defined a=
lgorithm so that each line
+   has no more than <a href=3D#attr-textarea-cols-value title=3Dattr-=
textarea-cols-value>character width</a> characters. For
+   the purposes of this requirement, lines are delimited by the start of=
 the string, the end of the
+   string, and U+000D CARRIAGE RETURN U+000A LINE FEED (CRLF) character =
pairs.</li>
+
+  </ol></div>
+
+  <p>The <dfn id=3Dattr-textarea-maxlength title=3Dattr-textare=
a-maxlength><code>maxlength</code></dfn> attribute i=
s a <a href=3D#attr-fe-maxlength title=3Dattr-fe-maxlength>form con=
trol <code title=3D"">maxlength</code> attribute&lt=
;/a> controlled
+  by the <code><a href=3D#the-textarea-element>textarea</=
a></code> element's <a href=3D#concept-textarea-dirty title=3D=
concept-textarea-dirty>dirty value
+  flag</a>.</p>
+
+  <p>If the <code><a href=3D#the-textarea-element>text=
area</a></code> element has a <a href=3D#maximum-allowed-v=
alue-length>maximum allowed value length</a>, then the
+  element's children must be such that the <a href=3D#code-unit-lengt=
h>code-unit length</a> of the value of the
+  element's <code><a href=3D#textcontent>textContent</a&g=
t;</code> IDL attribute is equal to or less than the element's
+  <a href=3D#maximum-allowed-value-length>maximum allowed value le=
ngth</a>.</p>
+
+  <p>The <dfn id=3Dattr-textarea-minlength title=3Dattr-textare=
a-minlength><code>minlength</code></dfn> attribute i=
s a <a href=3D#attr-fe-minlength title=3Dattr-fe-minlength>form con=
trol <code title=3D"">minlength</code> attribute&lt=
;/a> controlled
+  by the <code><a href=3D#the-textarea-element>textarea</=
a></code> element's <a href=3D#concept-textarea-dirty title=3D=
concept-textarea-dirty>dirty value
+  flag</a>.</p>
+
+  <!-- we allow the default to be smaller than the minimum, so that y=
ou can have incomplete, but not
+  empty, input already in the form, like a template that needs to be fil=
led in -->
+
+  <p>The <dfn id=3Dattr-textarea-required title=3Dattr-textarea=
-required><code>required</code></dfn> attribute is a
+  <a href=3D#boolean-attribute>boolean attribute</a>. When s=
pecified, the user will be required to enter a value before
+  submitting the form.</p>
+
+  <div class=3Dimpl>
+
+  <p><strong>Constraint validation</strong>: If the el=
ement has its <code title=3Dattr-textarea-required><a href=3D#at=
tr-textarea-required>required</a></code> attribute specifi=
ed, and the element is <a href=3D#concept-fe-mutable title=3Dconcept-f=
e-mutable>mutable</a>, and the element's <a href=3D#concept-f=
e-value title=3Dconcept-fe-value>value</a> is the empty string, =
then the element is <a href=3D#suffering-from-being-missing>sufferi=
ng
+  from being missing</a>.</p>
+
+  </div>
+
+
+  <!-- substantially similar text in the <input> section -->
+
+  <p>The <dfn id=3Dattr-textarea-placeholder title=3Dattr-texta=
rea-placeholder><code>placeholder</code></dfn> attri=
bute represents
+  a <em>short</em> hint (a word or short phrase) intended to=
 aid the user with data entry when the
+  control has no value. A hint could be a sample value or a brief descri=
ption of the expected
+  format.</p>
+
+  <p>The <code title=3Dattr-textarea-placeholder><a href=3D=
#attr-textarea-placeholder>placeholder</a></code> attribut=
e should not be used as
+  an alternative to a <code><a href=3D#the-label-element>lab=
el</a></code>. For a longer hint or other advisory text, the =
<code title=3Dattr-title><a href=3D#attr-title>title</a&gt=
;</code> attribute is more appropriate.</p>
+
+  <p class=3Dnote>These mechanisms are very similar but subtly dif=
ferent: the hint given by the
+  control's <code><a href=3D#the-label-element>label</a&g=
t;</code> is shown at all times; the short hint given in the <co=
de title=3Dattr-textarea-placeholder><a href=3D#attr-textarea-place=
holder>placeholder</a></code> attribute is shown before th=
e user enters a
+  value; and the hint in the <code title=3Dattr-title><a href=3D=
#attr-title>title</a></code> attribute is shown when the u=
ser
+  requests further help.</p>
+
+  <div class=3Dimpl>
+
+  <p>User agents should present this hint to the user when the ele=
ment's <a href=3D#concept-fe-value title=3Dconcept-fe-value>value&l=
t;/a> is the empty string and the control is not focused (e.g. by
+  displaying it inside a blank unfocused control). All U+000D CARRIAGE R=
ETURN U+000A LINE FEED
+  character pairs (CRLF) in the hint, as well as all other U+000D CARRIA=
GE RETURN (CR) and U+000A
+  LINE FEED (LF) characters in the hint, must be treated as line breaks =
when rendering the hint.
+
+  </p>
+
+  </div>
+
+  <p>
+  The <code title=3Dattr-fe-name><a href=3D#attr-fe-name>nam=
e</a></code> attribute represents the element's name.
+  The <code title=3Dattr-fe-dirname><a href=3D#attr-fe-dirname&=
gt;dirname</a></code> attribute controls how the element's &l=
t;a href=3D#the-directionality title=3D"the directionality">=
directionality</a> is submitted.
+  The <code title=3Dattr-fe-disabled><a href=3D#attr-fe-disable=
d>disabled</a></code> attribute is used to make the contro=
l
+  non-interactive and to prevent its value from being submitted.
+  The <code title=3Dattr-fae-form><a href=3D#attr-fae-form>f=
orm</a></code> attribute is used to explicitly associate the
+  <code><a href=3D#the-textarea-element>textarea</a>&l=
t;/code> element with its <a href=3D#form-owner>form owner</a=
>.
+  The <code title=3Dattr-fe-autofocus><a href=3D#attr-fe-autofo=
cus>autofocus</a></code> attribute controls focus.
+  The <code title=3Dattr-fe-inputmode><a href=3D#attr-fe-inputm=
ode>inputmode</a></code> attribute controls the user inter=
face's input
+  modality for the control.
+  The <code title=3Dattr-fe-autocomplete><a href=3D#attr-fe-aut=
ocomplete>autocomplete</a></code> attribute controls how t=
he user agent
+  provides autofill behavior.
+  </p>
+
+<!--TOPIC:DOM APIs-->
+  <dl class=3Ddomintro><dt><var title=3D"">t=
extarea</var> . <code title=3Dattr-textarea-type>type</cod=
e></dt>
+
+   <dd>
+
+    <p>Returns the string "<code title=3D"">t=
extarea</code>".</p>
+
+   </dd>
+
+   <dt><var title=3D"">textarea</var> . <=
code title=3Dattr-textarea-value>value</code></dt>
+
+   <dd>
+
+    <p>Returns the current value of the element.</p>
+
+    <p>Can be set, to change the value.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-textarea-cols title=3Ddom-textarea-cols&=
gt;<code>cols</code></dfn>, <dfn id=3Ddom-textarea-p=
laceholder title=3Ddom-textarea-placeholder><code>placeholder&lt=
;/code></dfn>, <dfn id=3Ddom-textarea-required title=3Ddom-te=
xtarea-required><code>required</code></dfn>, <dfn=
 id=3Ddom-textarea-rows title=3Ddom-textarea-rows><code>rows<=
/code></dfn>, and <dfn id=3Ddom-textarea-wrap title=3Ddom-tex=
tarea-wrap><code>wrap</code></dfn> attributes must &=
lt;a href=3D#reflect>reflect</a> the
+  respective content attributes of the same name. The <code title=3Dd=
om-textarea-cols><a href=3D#dom-textarea-cols>cols</a><=
/code>
+  and <code title=3Ddom-textarea-rows><a href=3D#dom-textarea-r=
ows>rows</a></code> attributes are <a href=3D#limited-t=
o-only-non-negative-numbers-greater-than-zero>limited to only non-nega=
tive
+  numbers greater than zero</a>. The <code title=3Ddom-textarea=
-cols><a href=3D#dom-textarea-cols>cols</a></code> a=
ttribute's
+  default value is 20. The <code title=3Ddom-textarea-rows><a h=
ref=3D#dom-textarea-rows>rows</a></code> attribute's defau=
lt value is
+  2. The <dfn id=3Ddom-textarea-dirname title=3Ddom-textarea-dirName&=
gt;<code>dirName</code></dfn> IDL attribute must
+  <a href=3D#reflect>reflect</a> the <code title=3Dattr-f=
e-dirname><a href=3D#attr-fe-dirname>dirname</a></code&=
gt; content attribute. The <dfn id=3Ddom-textarea-inputmode title=3Ddo=
m-textarea-inputMode><code>inputMode</code></dfn> ID=
L attribute must
+  <a href=3D#reflect>reflect</a> the <code title=3Dattr-f=
e-inputmode><a href=3D#attr-fe-inputmode>inputmode</a><=
/code> content attribute,
+  <a href=3D#limited-to-only-known-values>limited to only known va=
lues</a>. The <dfn id=3Ddom-textarea-maxlength title=3Ddom-texta=
rea-maxLength><code>maxLength</code></dfn> IDL attri=
bute must
+  <a href=3D#reflect>reflect</a> the <code title=3Dattr-t=
extarea-maxlength><a href=3D#attr-textarea-maxlength>maxlength&l=
t;/a></code> content attribute,
+  <a href=3D#limited-to-only-non-negative-numbers>limited to only =
non-negative numbers</a>. The <dfn id=3Ddom-textarea-minlength t=
itle=3Ddom-textarea-minLength><code>minLength</code></d=
fn> IDL attribute must
+  <a href=3D#reflect>reflect</a> the <code title=3Dattr-t=
extarea-minlength><a href=3D#attr-textarea-minlength>minlength&l=
t;/a></code> content attribute,
+  <a href=3D#limited-to-only-non-negative-numbers>limited to only =
non-negative numbers</a>. The <dfn id=3Ddom-textarea-readonly ti=
tle=3Ddom-textarea-readOnly><code>readOnly</code></dfn&=
gt; IDL attribute must <a href=3D#reflect>reflect</a>
+  the <code title=3Dattr-textarea-readonly><a href=3D#attr-text=
area-readonly>readonly</a></code> content attribute.</p=
>
+
+  <p>The <dfn id=3Ddom-textarea-type title=3Ddom-textarea-type&=
gt;<code>type</code></dfn> IDL attribute must return th=
e value
+  "<code title=3D"">textarea</code>".&lt=
;/p>
+
+  <p>The <dfn id=3Ddom-textarea-defaultvalue title=3Ddom-textar=
ea-defaultValue><code>defaultValue</code></dfn> IDL =
attribute must
+  act like the element's <code><a href=3D#textcontent>textCo=
ntent</a></code> IDL attribute.</p>
+
+  <p>The <dfn id=3Ddom-textarea-value title=3Ddom-textarea-valu=
e><code>value</code></dfn> attribute must, on gettin=
g, return
+  the element's <a href=3D#concept-textarea-api-value title=3Dconcept=
-textarea-api-value>API value</a>; on setting, it must set
+  the element's <a href=3D#concept-textarea-raw-value title=3Dconcept=
-textarea-raw-value>raw value</a> to the new value, set the
+  element's <a href=3D#concept-textarea-dirty title=3Dconcept-textare=
a-dirty>dirty value flag</a> to true, and should then
+  move the text entry cursor position to the end of the text field, unse=
lecting any selected text
+  and resetting the selection direction to <i>none</i>.</=
p>
+
+  <p>The <dfn id=3Ddom-textarea-textlength title=3Ddom-textarea=
-textLength><code>textLength</code></dfn> IDL attrib=
ute must
+  return the <a href=3D#code-unit-length>code-unit length</a&gt=
; of the element's <a href=3D#concept-textarea-api-value title=3Dconce=
pt-textarea-api-value>API value</a>.</p>
+
+  <p>The <code title=3Ddom-cva-willValidate><a href=3D#do=
m-cva-willvalidate>willValidate</a></code>, <code title=
=3Ddom-cva-validity><a href=3D#dom-cva-validity>validity</a&g=
t;</code>, and <code title=3Ddom-cva-validationMessage><a =
href=3D#dom-cva-validationmessage>validationMessage</a></code=
> IDL attributes, and the <code title=3Ddom-cva-checkValidity>&l=
t;a href=3D#dom-cva-checkvalidity>checkValidity()</a></code&g=
t;, <code title=3Ddom-cva-reportValidity><a href=3D#dom-cva-repo=
rtvalidity>reportValidity()</a></code>, and <code title=
=3Ddom-cva-setCustomValidity><a href=3D#dom-cva-setcustomvalidity&g=
t;setCustomValidity()</a></code> methods, are part of the
+  <a href=3D#the-constraint-validation-api>constraint validation A=
PI</a>. The <code title=3Ddom-lfe-labels><a href=3D#dom-lf=
e-labels>labels</a></code> IDL
+  attribute provides a list of the element's <code><a href=3D#t=
he-label-element>label</a></code>s. The <code title=3Dd=
om-textarea/input-select><a href=3D#dom-textarea/input-select>se=
lect()</a></code>, <code title=3Ddom-textarea/input-select=
ionStart><a href=3D#dom-textarea/input-selectionstart>selectionS=
tart</a></code>, <code title=3Ddom-textarea/input-selectio=
nEnd><a href=3D#dom-textarea/input-selectionend>selectionEnd<=
/a></code>, <code title=3Ddom-textarea/input-selectionDirecti=
on><a href=3D#dom-textarea/input-selectiondirection>selectionDir=
ection</a></code>, <code title=3Ddom-textarea/input-setRan=
geText><a href=3D#dom-textarea/input-setrangetext>setRangeText()=
</a></code>, and <code title=3Ddom-textarea/input-setSelec=
tionRange><a href=3D#dom-textarea/input-setselectionrange>setSel=
ectionRange()</a></code> methods and IDL attributes
+  expose the element's text selection. The <code title=3Ddom-fe-autof=
ocus><a href=3D#dom-fe-autofocus>autofocus</a></code&gt=
;, <code title=3Ddom-fe-disabled><a href=3D#dom-fe-disabled>d=
isabled</a></code>, <code title=3Ddom-fae-form><a hr=
ef=3D#dom-fae-form>form</a></code>, and <code title=3Dd=
om-fe-name><a href=3D#dom-fe-name>name</a></code> ID=
L attributes are part of the element's forms API.</p>
+
+  </div>
+<!--TOPIC:HTML-->
+
+  <div class=3Dexample>
+
+   <p>Here is an example of a <code><a href=3D#the-textar=
ea-element>textarea</a></code> being used for unrestricted=
 free-form text input
+   in a form:</p>
+
+   <pre><p>If you have any comments, please let us k=
now: <textarea cols=3D80 name=3Dcomments></textarea&=
amp;gt;</p></pre>
+
+   <p>To specify a maximum length for the comments, one can use th=
e <code title=3Dattr-textarea-maxlength><a href=3D#attr-textarea=
-maxlength>maxlength</a></code> attribute:</p>
+
+   <pre><p>If you have any short comments, please le=
t us know: <textarea cols=3D80 name=3Dcomments maxlength=3D200&amp=
;gt;</textarea></p></pre>
+
+   <p>To give a default value, text can be included inside the ele=
ment:</p>
+
+   <pre><p>If you have any comments, please let us k=
now: <textarea cols=3D80 name=3Dcomments>You rock!</=
textarea></p></pre>
+
+   <p>You can also give a minimum length. Here, a letter needs to =
be filled out by the user; a
+   template (which is shorter than the minimum length) is provided, but =
is insufficient to submit
+   the form:</p>
+
+   <pre><textarea required minlength=3D"500"&=
gt;Dear Madam Speaker,
+
+Regarding your letter dated ...
+
+...
+
+Yours Sincerely,
+
+...</textarea></pre>
+
+   <p>A placeholder can be given as well, to suggest the basic for=
m to the user, without providing
+   an explicit template:</p>
+
+   <pre><textarea placeholder=3D"Dear Francine,
+
+They closed the parks this week, so we won't be able to
+meet your there. Should we just have dinner?
+
+Love,
+Daddy"></textarea></pre>
+
+   <p>To have the browser submit <a href=3D#the-directionality&=
gt;the directionality</a> of
+   the element along with the value, the <code title=3Dattr-fe-dirnam=
e><a href=3D#attr-fe-dirname>dirname</a></code> attr=
ibute can be
+   specified:</p>
+
+   <pre><p>If you have any comments, please let us k=
now (you may use either English or Hebrew for your comments):
+<textarea cols=3D80 name=3Dcomments dirname=3Dcomments.dir&gt=
;</textarea></p></pre>
+
+  </div>
+
+
+
+  <h4 id=3Dthe-keygen-element><span class=3Dsecno>4.10.12 &l=
t;/span>The <dfn><code>keygen</code></dfn> ele=
ment</h4>
+
+  <dl class=3Delement><dt><a href=3D#element-dfn-categori=
es title=3Delement-dfn-categories>Categories</a>:</dt>
+   <dd><a href=3D#flow-content>Flow content</a>.</d=
d>
+   <dd><a href=3D#phrasing-content>Phrasing content</a&gt=
;.</dd>
+   <dd><a href=3D#interactive-content>Interactive content&lt=
;/a>.</dd>
+   <dd><a href=3D#category-listed title=3Dcategory-listed>Li=
sted</a>, <a href=3D#category-label title=3Dcategory-label>la=
belable</a>, <a href=3D#category-submit title=3Dcategory-submit&=
gt;submittable</a>, <a href=3D#category-reset title=3Dcategory-r=
eset>resettable</a>, and <a href=3D#category-form-attr title=3D=
category-form-attr>reassociateable</a> <a href=3D#form-associ=
ated-element>form-associated element</a>.</dd>
+   <dd><a href=3D#palpable-content>Palpable content</a&gt=
;.</dd>
+   <dt><a href=3D#element-dfn-contexts title=3Delement-dfn-cont=
exts>Contexts in which this element can be used</a>:</dt>
+   <dd>Where <a href=3D#phrasing-content>phrasing content&lt=
;/a> is expected.</dd>
+   <dt><a href=3D#element-dfn-content-model title=3Delement-dfn=
-content-model>Content model</a>:</dt>
+   <dd>Empty.</dd>
+   <dt><a href=3D#element-dfn-tag-omission title=3Delement-dfn-=
tag-omission>Tag omission in text/html</a>:</dt>
+   <dd>No <a href=3D#syntax-end-tag title=3Dsyntax-end-tag>e=
nd tag</a>.</dd>
+   <dt><a href=3D#element-dfn-attributes title=3Delement-dfn-at=
tributes>Content attributes</a>:</dt>
+   <dd><a href=3D#global-attributes>Global attributes</a&=
gt;</dd>
+   <dd><code title=3Dattr-fe-autofocus><a href=3D#attr-fe=
-autofocus>autofocus</a></code> — Automatically =
focus the form control when the page is loaded</dd>
+   <dd><code title=3Dattr-keygen-challenge><a href=3D#att=
r-keygen-challenge>challenge</a></code> — String=
 to package with the generated and signed public key</dd>
+   <dd><code title=3Dattr-fe-disabled><a href=3D#attr-fe-=
disabled>disabled</a></code> — Whether the form =
control is disabled</dd>
+   <dd><code title=3Dattr-fae-form><a href=3D#attr-fae-fo=
rm>form</a></code> — Associates the control with=
 a <code><a href=3D#the-form-element>form</a></code&=
gt; element</dd>
+   <dd><code title=3Dattr-keygen-keytype><a href=3D#attr-=
keygen-keytype>keytype</a></code> — The type of =
cryptographic key to generate</dd>
+   <dd><code title=3Dattr-fe-name><a href=3D#attr-fe-name=
>name</a></code> — Name of form control to use f=
or <a href=3D#form-submission>form submission</a> and in the =
<code title=3Ddom-form-elements><a href=3D#dom-form-elements>=
form.elements</a></code> API</dd>
+   <dt><a href=3D#element-dfn-dom title=3Delement-dfn-dom>DO=
M interface</a>:</dt><!--TOPIC:DOM APIs-->
+   <dd>
+<pre class=3Didl>interface <dfn id=3Dhtmlkeygenelement>HTMLK=
eygenElement</dfn> : <a href=3D#htmlelement>HTMLElement</a=
> {
+           attribute boolean <a href=3D#dom-fe-autofocus title=3Ddom-=
fe-autofocus>autofocus</a>;
+           attribute DOMString <a href=3D#dom-keygen-challenge title=3D=
dom-keygen-challenge>challenge</a>;
+           attribute boolean <a href=3D#dom-fe-disabled title=3Ddom-f=
e-disabled>disabled</a>;
+  readonly attribute <a href=3D#htmlformelement>HTMLFormElement&lt=
;/a>? <a href=3D#dom-fae-form title=3Ddom-fae-form>form</a&gt=
;;
+           attribute DOMString <a href=3D#dom-keygen-keytype title=3D=
dom-keygen-keytype>keytype</a>;
+           attribute DOMString <a href=3D#dom-fe-name title=3Ddom-fe-=
name>name</a>;
+
+  readonly attribute DOMString <a href=3D#dom-keygen-type title=3Ddom=
-keygen-type>type</a>;
+
+  readonly attribute boolean <a href=3D#dom-cva-willvalidate title=3D=
dom-cva-willValidate>willValidate</a>;
+  readonly attribute <a href=3D#validitystate>ValidityState</a&=
gt; <a href=3D#dom-cva-validity title=3Ddom-cva-validity>validity&l=
t;/a>;
+  readonly attribute DOMString <a href=3D#dom-cva-validationmessage t=
itle=3Ddom-cva-validationMessage>validationMessage</a>;
+  boolean <a href=3D#dom-cva-checkvalidity title=3Ddom-cva-checkValid=
ity>checkValidity</a>();
+  boolean <a href=3D#dom-cva-reportvalidity title=3Ddom-cva-reportVal=
idity>reportValidity</a>();
+  void <a href=3D#dom-cva-setcustomvalidity title=3Ddom-cva-setCustom=
Validity>setCustomValidity</a>(DOMString error);
+
+  readonly attribute <a href=3D#nodelist>NodeList</a> <a =
href=3D#dom-lfe-labels title=3Ddom-lfe-labels>labels</a>;
+};</pre>
+   </dd>
+  </dl><!--TOPIC:HTML--><p>The <code><a href=3D=
#the-keygen-element>keygen</a></code> element <a href=3D=
#represents>represents</a> a key pair generator control. When th=
e
+  control's form is submitted, the private key is stored in the local ke=
ystore, and the public key
+  is packaged and sent to the server.</p>
+
+  <p>The <dfn id=3Dattr-keygen-challenge title=3Dattr-keygen-ch=
allenge><code>challenge</code></dfn> attribute may b=
e specified.
+  Its value will be packaged with the submitted key.</p>
+
+  <p>The <dfn id=3Dattr-keygen-keytype title=3Dattr-keygen-keyt=
ype><code>keytype</code></dfn> attribute is an
+  <a href=3D#enumerated-attribute>enumerated attribute</a>. =
The following table lists the keywords and states for the
+  attribute — the keywords in the left column map to the state=
s listed in the cell in the
+  second column on the same row as the keyword. User agents are not requ=
ired to support these
+  values, and must only recognize values whose corresponding algorithms =
they support.</p>
+
+  <table><thead><tr><th> Keyword <th> Stat=
e
+   <tbody><tr><td> <code title=3D"">rs=
a</code>
+     <td> <i title=3D"">RSA</i>
+<!-- v2 (see below)
+    <tr>
+     <td> <code title=3D"">ec</code>
+     <td> <i title=3D"">EC</i>
+-->
+  </table><p>The <i>invalid value default</i> st=
ate is the <i title=3D"">unknown</i> state. The &lt=
;i>missing
+  value default</i> state is the <i title=3D"">RSA=
</i> state, if it is supported, or the <i title=3D""&g=
t;unknown</i> state otherwise.</p>
+
+  <p class=3Dnote>This specification does not specify what key typ=
es user agents are to support
+  — it is possible for a user agent to not support any key typ=
es at all.</p>
+
+  <div class=3Dimpl>
+
+  <p>The user agent may expose a user interface for each <code&=
gt;<a href=3D#the-keygen-element>keygen</a></code> elem=
ent to allow the
+  user to configure settings of the element's key pair generator, e.g. t=
he key length.</p>
+
+  <p>The <a href=3D#concept-form-reset-control title=3Dconcept-=
form-reset-control>reset algorithm</a> for <code><a hre=
f=3D#the-keygen-element>keygen</a></code>
+  elements is to set these various configuration settings back to their =
defaults.</p>
+
+  <p>The element's <a href=3D#concept-fe-value title=3Dconcept-=
fe-value>value</a> is the string returned from the
+  following algorithm:</p>
+
+  <ol><li>
+
+    <p>Use the appropriate step from the following list:</p>
+
+    <dl class=3Dswitch><!-- v2 (see above)
+
+     <dt>If the <code title=3D"attr-keygen-keytype"&g=
t;keytype</code> attribute is in the <i
+     title=3D"">EC</i> state</dt>
+
+     <dd>
+
+      <p>...
+
+      http://www.mail-archive.com/dev-tech-crypto@lists.mozilla.org/msg0=
5902.html
+
+     </dd>
+
+     --><dt>If the <code title=3Dattr-keygen-keytype><=
a href=3D#attr-keygen-keytype>keytype</a></code> attribute=
 is in the <i title=3D"">RSA</i> state</dt>
+
+     <dd>
+
+      <p>Generate an RSA key pair using the settings given by the =
user, if appropriate, using the
+      <code title=3D"">md5WithRSAEncryption</code>=
 RSA signature algorithm (the signature algorithm
+      with MD5 and the RSA encryption algorithm) referenced in section 2=
.2.1 ("RSA Signature
+      Algorithm") of RFC 3279, and defined in RFC 2313. <a href=3D=
#refsRFC3279>[RFC3279]</a> <a href=3D#refsRFC2313>[RFC2313=
]</a></p>
+
+     </dd>
+
+     <dt>Otherwise, the <code title=3Dattr-keygen-keytype>&l=
t;a href=3D#attr-keygen-keytype>keytype</a></code> attribu=
te is in the <i title=3D"">unknown</i> state</dt=
>
+
+     <dd>
+
+      <p>The given key type is not supported. Return the empty str=
ing and abort this algorithm.</p>
+
+     </dd>
+
+    </dl><p>Let <var title=3D"">private key&=
lt;/var> be the generated private key.</p>
+
+    <p>Let <var title=3D"">public key</var> =
be the generated public key.</p>
+
+    <p>Let <var title=3D"">signature algorithm<=
/var> be the selected signature algorithm.</p>
+
+   </li>
+
+   <li>
+
+    <p>If the element has a <code title=3Dattr-keygen-challenge=
><a href=3D#attr-keygen-challenge>challenge</a></code&g=
t; attribute, then let
+    <var title=3D"">challenge</var> be that attrib=
ute's value. Otherwise, let <var title=3D"">challenge<=
/var> be the empty string.</p>
+
+   </li>
+
+   <li>
+
+    <p>Let <var title=3D"">algorithm</var> b=
e an ASN.1 <code title=3D"">AlgorithmIdentifier</code&=
gt;
+    structure as defined by RFC 5280, with the <code title=3D"&q=
uot;>algorithm</code> field giving the
+    ASN.1 OID used to identify <var title=3D"">signature=
 algorithm</var>, using the OIDs defined in
+    section 2.2 ("Signature Algorithms") of RFC 3279, and the =
<code title=3D"">parameters</code> field
+    set up as required by RFC 3279 for <code title=3D"">=
AlgorithmIdentifier</code> structures for that
+    algorithm. <a href=3D#refsX690>[X690]</a> <a href=3D#=
refsRFC5280>[RFC5280]</a> <a href=3D#refsRFC3279>[RFC3279]=
</a></p>
+
+   </li>
+
+   <li>
+
+    <p>Let <var title=3D"">spki</var> be an =
ASN.1 <code title=3D"">SubjectPublicKeyInfo</code> =
structure
+    as defined by RFC 5280, with the <code title=3D"">al=
gorithm</code> field set to the <var title=3D"">alg=
orithm</var> structure from the previous step, and the <code tit=
le=3D"">subjectPublicKey</code> field set to the BIT S=
TRING value resulting from ASN.1 DER
+    encoding the <var title=3D"">public key</var>.=
 <a href=3D#refsX690>[X690]</a> <a href=3D#refsRFC5280>=
[RFC5280]</a></p>
+
+   </li>
+
+   <li>
+
+    <p>Let <var title=3D"">publicKeyAndChallenge&l=
t;/var> be an ASN.1 <code><a href=3D#publickeyandchallenge&gt=
;PublicKeyAndChallenge</a></code>
+    structure as defined below, with the <code title=3D""&g=
t;spki</code> field set to the <var title=3D"">spki=
</var> structure from the previous step, and the <code title=3D&=
quot;">challenge</code>
+    field set to the string <var title=3D"">challenge&lt=
;/var> obtained earlier. <a href=3D#refsX690>[X690]</a>&lt=
;/p>
+
+   </li>
+
+   <li>
+
+    <p>Let <var title=3D"">signature</var> b=
e the BIT STRING value resulting from ASN.1 DER encoding
+    the signature generated by applying the <var title=3D""=
>signature algorithm</var> to the byte
+    string obtained by ASN.1 DER encoding the <var title=3D"&quo=
t;>publicKeyAndChallenge</var> structure,
+    using <var title=3D"">private key</var> as the=
 signing key. <a href=3D#refsX690>[X690]</a></p>
+
+   </li>
+
+   <li>
+
+    <p>Let <var title=3D"">signedPublicKeyAndChall=
enge</var> be an ASN.1
+    <code><a href=3D#signedpublickeyandchallenge>SignedPubli=
cKeyAndChallenge</a></code> structure as defined below, with =
the <code title=3D"">publicKeyAndChallenge</code> f=
ield set to the <var title=3D"">publicKeyAndChallenge<=
/var>
+    structure, the <code title=3D"">signatureAlgorithm&l=
t;/code> field set to the <var title=3D"">algorithm&lt=
;/var> structure, and the <code title=3D"">signature&l=
t;/code> field set to the BIT
+    STRING <var title=3D"">signature</var> from th=
e previous step. <a href=3D#refsX690>[X690]</a></p>
+
+   </li>
+
+   <li>
+
+    <p>Return the result of base64 encoding the result of ASN.1 DE=
R encoding the <var title=3D"">signedPublicKeyAndChalleng=
e</var> structure. <a href=3D#refsRFC4648>[RFC4648]</a>=
<!--base64--> <a href=3D#refsX690>[X690]</a></p>
+
+   </li>
+
+  </ol><p>The data objects used by the above algorithm are d=
efined as follows. These definitions use the
+  same "ASN.1-like" syntax defined by RFC 5280. <a href=3D#=
refsRFC5280>[RFC5280]</a></p>
+
+  <pre class=3Dasn><dfn id=3Dpublickeyandchallenge>PublicKey=
AndChallenge</dfn> ::=3D SEQUENCE {
+    spki <span>SubjectPublicKeyInfo</span>,
+    challenge IA5STRING
+}
+
+<dfn id=3Dsignedpublickeyandchallenge>SignedPublicKeyAndChallenge&=
lt;/dfn> ::=3D SEQUENCE {
+    publicKeyAndChallenge <a href=3D#publickeyandchallenge>PublicK=
eyAndChallenge</a>,
+    signatureAlgorithm <span>AlgorithmIdentifier</span>,
+    signature BIT STRING
+}</pre>
+
+  <hr><p><strong>Constraint validation</strong>:=
 The <code><a href=3D#the-keygen-element>keygen</a><=
/code> element is <a href=3D#barred-from-constraint-validation>b=
arred from
+  constraint validation</a>.</p>
+
+  </div>
+
+  <p>The <code title=3Dattr-fae-form><a href=3D#attr-fae-=
form>form</a></code> attribute is used to explicitly assoc=
iate the
+  <code><a href=3D#the-keygen-element>keygen</a></c=
ode> element with its <a href=3D#form-owner>form owner</a>=
. The <code title=3Dattr-fe-name><a href=3D#attr-fe-name>name=
</a></code> attribute represents the element's name. The <=
code title=3Dattr-fe-disabled><a href=3D#attr-fe-disabled>disabl=
ed</a></code> attribute is used to make the control non-inter=
active and
+  to prevent its value from being submitted. The <code title=3Dattr-f=
e-autofocus><a href=3D#attr-fe-autofocus>autofocus</a><=
/code>
+  attribute controls focus.</p>
+
+<!--TOPIC:DOM APIs-->
+  <dl class=3Ddomintro><dt><var title=3D"">k=
eygen</var> . <code title=3Dattr-keygen-type>type</code&gt=
;</dt>
+
+   <dd>
+
+    <p>Returns the string "<code title=3D"">k=
eygen</code>".</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-keygen-challenge title=3Ddom-keygen-chal=
lenge><code>challenge</code></dfn> IDL attribute mus=
t
+  <a href=3D#reflect>reflect</a> the content attribute of th=
e same name.</p>
+
+  <p>The <dfn id=3Ddom-keygen-keytype title=3Ddom-keygen-keytyp=
e><code>keytype</code></dfn> IDL attribute must
+  <a href=3D#reflect>reflect</a> the content attribute of th=
e same name, <a href=3D#limited-to-only-known-values>limited to onl=
y known
+  values</a>.</p>
+
+  <p>The <dfn id=3Ddom-keygen-type title=3Ddom-keygen-type>&=
lt;code>type</code></dfn> IDL attribute must return the va=
lue
+  "<code title=3D"">keygen</code>".</=
p>
+
+  <p>The <code title=3Ddom-cva-willValidate><a href=3D#do=
m-cva-willvalidate>willValidate</a></code>, <code title=
=3Ddom-cva-validity><a href=3D#dom-cva-validity>validity</a&g=
t;</code>, and <code title=3Ddom-cva-validationMessage><a =
href=3D#dom-cva-validationmessage>validationMessage</a></code=
> IDL attributes, and the <code title=3Ddom-cva-checkValidity>&l=
t;a href=3D#dom-cva-checkvalidity>checkValidity()</a></code&g=
t;, <code title=3Ddom-cva-reportValidity><a href=3D#dom-cva-repo=
rtvalidity>reportValidity()</a></code>, and <code title=
=3Ddom-cva-setCustomValidity><a href=3D#dom-cva-setcustomvalidity&g=
t;setCustomValidity()</a></code> methods, are part of the
+  <a href=3D#the-constraint-validation-api>constraint validation A=
PI</a>. The <code title=3Ddom-lfe-labels><a href=3D#dom-lf=
e-labels>labels</a></code> IDL
+  attribute provides a list of the element's <code><a href=3D#t=
he-label-element>label</a></code>s. The <code title=3Dd=
om-fe-autofocus><a href=3D#dom-fe-autofocus>autofocus</a>&=
lt;/code>, <code title=3Ddom-fe-disabled><a href=3D#dom-fe-di=
sabled>disabled</a></code>, <code title=3Ddom-fae-form&=
gt;<a href=3D#dom-fae-form>form</a></code>, and <cod=
e title=3Ddom-fe-name><a href=3D#dom-fe-name>name</a></=
code> IDL attributes are
+  part of the element's forms API.</p>
+
+  </div>
+<!--TOPIC:HTML-->
+
+  <p class=3Dnote>This specification does not specify how the priv=
ate key generated is to be used.
+  It is expected that after receiving the <code><a href=3D#sign=
edpublickeyandchallenge>SignedPublicKeyAndChallenge</a></code=
> (SPKAC)
+  structure, the server will generate a client certificate and offer it =
back to the user for
+  download; this certificate, once downloaded and stored in the key stor=
e along with the private
+  key, can then be used to authenticate to services that use TLS and cer=
tificate authentication.</p>
+
+  <!-- how does the UA know which private key is associated with a ce=
rtificate it gets back after
+  the server has taken the public key created by <keygen> and turn=
ed it into a client cert? -->
+
+  <div class=3Dexample>
+
+   <p>To generate a key pair, add the private key to the user's ke=
y store, and submit the public key
+   to the server, markup such as the following can be used:</p>
+
+   <pre><form action=3D"processkey.cgi" method=3D=
"post" enctype=3D"multipart/form-data">
+ <p><keygen name=3D"key"></=
p>
+ <p><input type=3Dsubmit value=3D"Submit key..=
."></p>
+</form></pre>
+
+   <p>The server will then receive a form submission with a packag=
ed RSA public key as the value of
+   "<code title=3D"">key</code>". This c=
an then be used for various purposes, such as generating a
+   client certificate, as mentioned above.</p>
+
+  </div>
+
+
+
+  <h4 id=3Dthe-output-element><span class=3Dsecno>4.10.13 &l=
t;/span>The <dfn><code>output</code></dfn> ele=
ment</h4>
+
+  <dl class=3Delement><dt><a href=3D#element-dfn-categori=
es title=3Delement-dfn-categories>Categories</a>:</dt>
+   <dd><a href=3D#flow-content>Flow content</a>.</d=
d>
+   <dd><a href=3D#phrasing-content>Phrasing content</a&gt=
;.</dd>
+   <dd><a href=3D#category-listed title=3Dcategory-listed>Li=
sted</a>, <a href=3D#category-label title=3Dcategory-label>la=
belable</a>, <a href=3D#category-reset title=3Dcategory-reset&gt=
;resettable</a>, and <a href=3D#category-form-attr title=3Dcateg=
ory-form-attr>reassociateable</a> <a href=3D#form-associated-=
element>form-associated element</a>.</dd>
+   <dd><a href=3D#palpable-content>Palpable content</a&gt=
;.</dd>
+   <dt><a href=3D#element-dfn-contexts title=3Delement-dfn-cont=
exts>Contexts in which this element can be used</a>:</dt>
+   <dd>Where <a href=3D#phrasing-content>phrasing content&lt=
;/a> is expected.</dd>
+   <dt><a href=3D#element-dfn-content-model title=3Delement-dfn=
-content-model>Content model</a>:</dt>
+   <dd><a href=3D#phrasing-content>Phrasing content</a&gt=
;.</dd>
+   <dt><a href=3D#element-dfn-tag-omission title=3Delement-dfn-=
tag-omission>Tag omission in text/html</a>:</dt>
+   <dd>Neither tag is omissible.</dd>
+   <dt><a href=3D#element-dfn-attributes title=3Delement-dfn-at=
tributes>Content attributes</a>:</dt>
+   <dd><a href=3D#global-attributes>Global attributes</a&=
gt;</dd>
+   <dd><code title=3Dattr-output-for><a href=3D#attr-outp=
ut-for>for</a></code> — Specifies controls from =
which the output was calculated</dd>
+   <dd><code title=3Dattr-fae-form><a href=3D#attr-fae-fo=
rm>form</a></code> — Associates the control with=
 a <code><a href=3D#the-form-element>form</a></code&=
gt; element</dd>
+   <dd><code title=3Dattr-fe-name><a href=3D#attr-fe-name=
>name</a></code> — Name of form control to use f=
or <a href=3D#form-submission>form submission</a> and in the =
<code title=3Ddom-form-elements><a href=3D#dom-form-elements>=
form.elements</a></code> API</dd>
+   <dt><a href=3D#element-dfn-dom title=3Delement-dfn-dom>DO=
M interface</a>:</dt><!--TOPIC:DOM APIs-->
+   <dd>
+<pre class=3Didl>interface <dfn id=3Dhtmloutputelement>HTMLO=
utputElement</dfn> : <a href=3D#htmlelement>HTMLElement</a=
> {
+  [PutForwards=3D<span title=3Ddom-DOMSettableTokenList-value>valu=
e</span>] readonly attribute <a href=3D#domsettabletokenlist>=
DOMSettableTokenList</a> <a href=3D#dom-output-htmlfor title=3Dd=
om-output-htmlFor>htmlFor</a>;
+  readonly attribute <a href=3D#htmlformelement>HTMLFormElement&lt=
;/a>? <a href=3D#dom-fae-form title=3Ddom-fae-form>form</a&gt=
;;
+           attribute DOMString <a href=3D#dom-fe-name title=3Ddom-fe-=
name>name</a>;
+
+  readonly attribute DOMString <a href=3D#dom-output-type title=3Ddom=
-output-type>type</a>;
+           attribute DOMString <a href=3D#dom-output-defaultvalue tit=
le=3Ddom-output-defaultValue>defaultValue</a>;
+           attribute DOMString <a href=3D#dom-output-value title=3Ddo=
m-output-value>value</a>;
+
+  readonly attribute boolean <a href=3D#dom-cva-willvalidate title=3D=
dom-cva-willValidate>willValidate</a>;
+  readonly attribute <a href=3D#validitystate>ValidityState</a&=
gt; <a href=3D#dom-cva-validity title=3Ddom-cva-validity>validity&l=
t;/a>;
+  readonly attribute DOMString <a href=3D#dom-cva-validationmessage t=
itle=3Ddom-cva-validationMessage>validationMessage</a>;
+  boolean <a href=3D#dom-cva-checkvalidity title=3Ddom-cva-checkValid=
ity>checkValidity</a>();
+  boolean <a href=3D#dom-cva-reportvalidity title=3Ddom-cva-reportVal=
idity>reportValidity</a>();
+  void <a href=3D#dom-cva-setcustomvalidity title=3Ddom-cva-setCustom=
Validity>setCustomValidity</a>(DOMString error);
+
+  readonly attribute <a href=3D#nodelist>NodeList</a> <a =
href=3D#dom-lfe-labels title=3Ddom-lfe-labels>labels</a>;
+};</pre>
+   </dd>
+  </dl><!--TOPIC:HTML--><p>The <code><a href=3D=
#the-output-element>output</a></code> element <a href=3D=
#represents>represents</a> the result of a calculation or user
+  action.</p>
+
+  <p>The <dfn id=3Dattr-output-for title=3Dattr-output-for>&=
lt;code>for</code></dfn> content attribute allows an expli=
cit
+  relationship to be made between the result of a calculation and the el=
ements that represent the
+  values that went into the calculation or that otherwise influenced the=
 calculation. The <code title=3Dattr-output-for><a href=3D#attr-=
output-for>for</a></code> attribute, if specified, must co=
ntain a string consisting of an
+  <a href=3D#unordered-set-of-unique-space-separated-tokens>unorde=
red set of unique space-separated tokens</a> that are <a href=3D=
#case-sensitive>case-sensitive</a>,
+  each of which must have the value of an <a href=3D#concept-id title=
=3Dconcept-id>ID</a> of an element in the
+  same <code><a href=3D#document>Document</a></code=
>.</p>
+
+  <p>The <code title=3Dattr-fae-form><a href=3D#attr-fae-=
form>form</a></code> attribute is used to explicitly assoc=
iate the
+  <code><a href=3D#the-output-element>output</a></c=
ode> element with its <a href=3D#form-owner>form owner</a>=
. The <code title=3Dattr-fe-name><a href=3D#attr-fe-name>name=
</a></code> attribute represents the element's name.</p&gt=
;
+
+  <div class=3Dimpl>
+
+  <p>The element has a <dfn id=3Dconcept-output-mode title=3Dco=
ncept-output-mode>value mode flag</dfn> which is either <i ti=
tle=3Dconcept-output-mode-value>value</i> or <i title=3Dconce=
pt-output-mode-default>default</i>.
+  Initially, the <a href=3D#concept-output-mode title=3Dconcept-outpu=
t-mode>value mode flag</a> must be set to <i title=3Dconcept-=
output-mode-default>default</i>.</p>
+
+  <p>The element also has a <dfn id=3Dconcept-output-defaultval=
ue title=3Dconcept-output-defaultValue>default value</dfn>. Init=
ially,
+  the <a href=3D#concept-output-defaultvalue title=3Dconcept-output-d=
efaultValue>default value</a> must be the empty string.</p&gt=
;
+
+  <p>When the <a href=3D#concept-output-mode title=3Dconcept-ou=
tput-mode>value mode flag</a> is in mode <i title=3Dconcept-o=
utput-mode-default>default</i>, the contents of the element repr=
esent both the
+  value of the element and its <a href=3D#concept-output-defaultvalue=
 title=3Dconcept-output-defaultValue>default value</a>. When
+  the <a href=3D#concept-output-mode title=3Dconcept-output-mode>v=
alue mode flag</a> is in mode <i title=3Dconcept-output-mode-val=
ue>value</i>, the contents of the element represent the value of
+  the element only, and the <a href=3D#concept-output-defaultvalue ti=
tle=3Dconcept-output-defaultValue>default value</a> is only
+  accessible using the <code title=3Ddom-output-defaultValue><a=
 href=3D#dom-output-defaultvalue>defaultValue</a></code> I=
DL attribute.</p>
+
+  <p>Whenever the element's descendants are changed in any way, if=
 the <a href=3D#concept-output-mode title=3Dconcept-output-mode>val=
ue mode flag</a> is in mode <i title=3Dconcept-output-mode-defau=
lt>default</i>, the element's <a href=3D#concept-output-defau=
ltvalue title=3Dconcept-output-defaultValue>default value</a> mu=
st be set to the value of the element's
+  <code><a href=3D#textcontent>textContent</a></cod=
e> IDL attribute.</p>
+
+  <p>The <a href=3D#concept-form-reset-control title=3Dconcept-=
form-reset-control>reset algorithm</a> for <code><a hre=
f=3D#the-output-element>output</a></code>
+  elements is to set the element's <a href=3D#concept-output-mode tit=
le=3Dconcept-output-mode>value mode flag</a> to <i title=3Dco=
ncept-output-mode-default>default</i> and then to set the elemen=
t's
+  <code><a href=3D#textcontent>textContent</a></cod=
e> IDL attribute to the value of the element's <a href=3D#concept-o=
utput-defaultvalue title=3Dconcept-output-defaultValue>default value&l=
t;/a> (thus replacing the element's child
+  nodes).</p>
+
+  </div>
+
+<!--TOPIC:DOM APIs-->
+  <dl class=3Ddomintro><dt><var title=3D"">o=
utput</var> . <code title=3Ddom-output-value><a href=3D#do=
m-output-value>value</a></code> [ =3D <var title=3D&quo=
t;">value</var> ]</dt>
+
+   <dd>
+
+    <p>Returns the element's current value.</p>
+
+    <p>Can be set, to change the value.</p>
+
+   </dd>
+
+   <dt><var title=3D"">output</var> . <co=
de title=3Ddom-output-defaultValue><a href=3D#dom-output-defaultval=
ue>defaultValue</a></code> [ =3D <var title=3D"&qu=
ot;>value</var> ]</dt>
+
+   <dd>
+
+    <p>Returns the element's current default value.</p>
+
+    <p>Can be set, to change the default value.</p>
+
+   </dd>
+
+   <dt><var title=3D"">output</var> . <co=
de title=3Ddom-output-type><a href=3D#dom-output-type>type</a=
></code></dt>
+
+   <dd>
+
+    <p>Returns the string "<code title=3D"">o=
utput</code>".</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-output-value title=3Ddom-output-value&gt=
;<code>value</code></dfn> IDL attribute must act like t=
he
+  element's <code><a href=3D#textcontent>textContent</a&g=
t;</code> IDL attribute, except that on setting, in addition, befor=
e the
+  child nodes are changed, the element's <a href=3D#concept-output-mo=
de title=3Dconcept-output-mode>value mode flag</a>
+  must be set to <i title=3Dconcept-output-mode-value>value</i&=
gt;.</p>
+
+  <p>The <dfn id=3Ddom-output-defaultvalue title=3Ddom-output-d=
efaultValue><code>defaultValue</code></dfn> IDL attr=
ibute, on
+  getting, must return the element's <a href=3D#concept-output-defaul=
tvalue title=3Dconcept-output-defaultValue>default value</a>.
+  On setting, the attribute must set the element's <a href=3D#concept=
-output-defaultvalue title=3Dconcept-output-defaultValue>default
+  value</a>, and, if the element's <a href=3D#concept-output-mo=
de title=3Dconcept-output-mode>value mode flag</a> is in
+  the mode <i title=3Dconcept-output-mode-default>default</i&gt=
;, set the element's
+  <code><a href=3D#textcontent>textContent</a></cod=
e> IDL attribute as well.</p>
+
+  <p>The <dfn id=3Ddom-output-type title=3Ddom-output-type>&=
lt;code>type</code></dfn> attribute must return the string
+  "<code title=3D"">output</code>".</=
p>
+
+  <p>The <dfn id=3Ddom-output-htmlfor title=3Ddom-output-htmlFo=
r><code>htmlFor</code></dfn> IDL attribute must
+  <a href=3D#reflect>reflect</a> the <code title=3Dattr-o=
utput-for><a href=3D#attr-output-for>for</a></code> =
content attribute.</p>
+
+  <p>The <code title=3Ddom-cva-willValidate><a href=3D#do=
m-cva-willvalidate>willValidate</a></code>, <code title=
=3Ddom-cva-validity><a href=3D#dom-cva-validity>validity</a&g=
t;</code>, and <code title=3Ddom-cva-validationMessage><a =
href=3D#dom-cva-validationmessage>validationMessage</a></code=
> IDL attributes, and the <code title=3Ddom-cva-checkValidity>&l=
t;a href=3D#dom-cva-checkvalidity>checkValidity()</a></code&g=
t;, <code title=3Ddom-cva-reportValidity><a href=3D#dom-cva-repo=
rtvalidity>reportValidity()</a></code>, and <code title=
=3Ddom-cva-setCustomValidity><a href=3D#dom-cva-setcustomvalidity&g=
t;setCustomValidity()</a></code> methods, are part of the
+  <a href=3D#the-constraint-validation-api>constraint validation A=
PI</a>. The <code title=3Ddom-lfe-labels><a href=3D#dom-lf=
e-labels>labels</a></code> IDL
+  attribute provides a list of the element's <code><a href=3D#t=
he-label-element>label</a></code>s. The <code title=3Dd=
om-fae-form><a href=3D#dom-fae-form>form</a></code> =
and <code title=3Ddom-fe-name><a href=3D#dom-fe-name>name<=
/a></code> IDL attributes are part
+  of the element's forms API.</p>
+
+  </div>
+<!--TOPIC:HTML-->
+
+  <div class=3Dexample>
+
+   <p>A simple calculator could use <code><a href=3D#the-=
output-element>output</a></code> for its display of calcul=
ated results:</p>
+
+   <pre><form onsubmit=3D"return false" oninput=3D=
"o.value =3D a.valueAsNumber + b.valueAsNumber">
+ <input name=3Da type=3Dnumber step=3Dany> +
+ <input name=3Db type=3Dnumber step=3Dany> =3D
+ <output name=3Do></output>
+</form></pre>
+
+  </div>
+
+
+
+  <h4 id=3Dthe-progress-element><span class=3Dsecno>4.10.14 =
</span>The <dfn><code>progress</code></dfn>=
 element</h4>
+
+  <dl class=3Delement><dt><a href=3D#element-dfn-categori=
es title=3Delement-dfn-categories>Categories</a>:</dt>
+   <dd><a href=3D#flow-content>Flow content</a>.</d=
d>
+   <dd><a href=3D#phrasing-content>Phrasing content</a&gt=
;.</dd>
+   <dd><a href=3D#category-label title=3Dcategory-label>Labe=
lable element</a>.</dd>
+   <dd><a href=3D#palpable-content>Palpable content</a&gt=
;.</dd>
+   <dt><a href=3D#element-dfn-contexts title=3Delement-dfn-cont=
exts>Contexts in which this element can be used</a>:</dt>
+   <dd>Where <a href=3D#phrasing-content>phrasing content&lt=
;/a> is expected.</dd>
+   <dt><a href=3D#element-dfn-content-model title=3Delement-dfn=
-content-model>Content model</a>:</dt>
+   <dd><a href=3D#phrasing-content>Phrasing content</a&gt=
;, but there must be no <code><a href=3D#the-progress-element&gt=
;progress</a></code> element descendants.</dd>
+   <dt><a href=3D#element-dfn-tag-omission title=3Delement-dfn-=
tag-omission>Tag omission in text/html</a>:</dt>
+   <dd>Neither tag is omissible.</dd>
+   <dt><a href=3D#element-dfn-attributes title=3Delement-dfn-at=
tributes>Content attributes</a>:</dt>
+   <dd><a href=3D#global-attributes>Global attributes</a&=
gt;</dd>
+   <dd><code title=3Dattr-progress-value><a href=3D#attr-=
progress-value>value</a></code> — Current value =
of the element</dd>
+   <dd><code title=3Dattr-progress-max><a href=3D#attr-pr=
ogress-max>max</a></code> — Upper bound of range=
</dd>
+   <dt><a href=3D#element-dfn-dom title=3Delement-dfn-dom>DO=
M interface</a>:</dt><!--TOPIC:DOM APIs-->
+   <dd>
+<pre class=3Didl>interface <dfn id=3Dhtmlprogresselement>HTM=
LProgressElement</dfn> : <a href=3D#htmlelement>HTMLElement&l=
t;/a> {
+           attribute double <a href=3D#dom-progress-value title=3Ddom=
-progress-value>value</a>;
+           attribute double <a href=3D#dom-progress-max title=3Ddom-p=
rogress-max>max</a>;
+  readonly attribute double <a href=3D#dom-progress-position title=3D=
dom-progress-position>position</a>;
+  readonly attribute <a href=3D#nodelist>NodeList</a> <a =
href=3D#dom-lfe-labels title=3Ddom-lfe-labels>labels</a>;
+};</pre>
+   </dd>
+  </dl><!--TOPIC:HTML--><p>The <code><a href=3D=
#the-progress-element>progress</a></code> element <a hr=
ef=3D#represents>represents</a> the completion progress of a tas=
k.
+  The progress is either indeterminate, indicating that progress is bein=
g made but that it is not
+  clear how much more work remains to be done before the task is complet=
e (e.g. because the task is
+  waiting for a remote host to respond), or the progress is a number in =
the range zero to a maximum,
+  giving the fraction of work that has so far been completed.</p>
+
+  <p>There are two attributes that determine the current task comp=
letion represented by the element.
+  The <dfn id=3Dattr-progress-value title=3Dattr-progress-value>&l=
t;code>value</code></dfn> attribute specifies how much of =
the
+  task has been completed, and the <dfn id=3Dattr-progress-max title=3D=
attr-progress-max><code>max</code></dfn> attribute
+  specifies how much work the task requires in total. The units are arbi=
trary and not specified.</p>
+
+  <p class=3Dnote>To make a determinate progress bar, add a <co=
de title=3Dattr-progress-value><a href=3D#attr-progress-value>va=
lue</a></code> attribute with the current progress (either a =
number from
+  0.0 to 1.0, or, if the <code title=3Dattr-progress-max><a hre=
f=3D#attr-progress-max>max</a></code> attribute is specifi=
ed, a number
+  from 0 to the value of the <code title=3Dattr-progress-max><a=
 href=3D#attr-progress-max>max</a></code> attribute). To m=
ake an
+  indeterminate progress bar, remove the <code title=3Dattr-progress-=
value><a href=3D#attr-progress-value>value</a></code&gt=
;
+  attribute.</p>
+
+  <p>Authors are encouraged to also include the current value and =
the maximum value inline as text
+  inside the element, so that the progress is made available to users of=
 legacy user agents.</p>
+
+  <div class=3Dexample>
+
+   <p>Here is a snippet of a Web application that shows the progre=
ss of some automated task:</p>
+
+   <pre><section>
+ <h2>Task Progress</h2>
+ <p>Progress: <progress id=3D"p" max=3D10=
0><span>0</span>%</progress&amp=
;gt;</p>
+ <script>
+  var progressBar =3D document.getElementById('p');
+  function updateProgress(newValue) {
+    progressBar.value =3D newValue;
+    progressBar.getElementsByTagName('span')[0].textContent =3D newValue=
;
+  }
+ </script>
+</section></pre>
+
+   <p>(The <code>updateProgress()</code> method in thi=
s example would be called by some other code
+   on the page to update the actual progress bar as the task progressed.=
)</p>
+
+  </div>
+
+  <p>The <code title=3Dattr-progress-value><a href=3D#att=
r-progress-value>value</a></code> and <code title=3Datt=
r-progress-max><a href=3D#attr-progress-max>max</a></co=
de> attributes, when present, must have values that are <a href=3D#=
valid-floating-point-number title=3D"valid floating-point number&quo=
t;>valid floating-point numbers</a>. The <code title=3Dattr-p=
rogress-value><a href=3D#attr-progress-value>value</a><=
/code> attribute, if present, must have a value equal to or
+  greater than zero, and less than or equal to the value of the <code=
 title=3Dattr-progress-max><a href=3D#attr-progress-max>max</=
a></code> attribute, if present, or 1.0, otherwise. The <code=
 title=3Dattr-progress-max><a href=3D#attr-progress-max>max</=
a></code> attribute, if present, must have a value greater than
+  zero.</p>
+
+  <p class=3Dnote>The <code><a href=3D#the-progress-eleme=
nt>progress</a></code> element is the wrong element to use=
 for something that
+  is just a gauge, as opposed to task progress. For instance, indicating=
 disk space usage using
+  <code><a href=3D#the-progress-element>progress</a>&l=
t;/code> would be inappropriate. Instead, the <code><a href=3D=
#the-meter-element>meter</a></code> element is available
+  for such use cases.</p>
+
+  <div class=3Dimpl>
+
+  <p><strong>User agent requirements</strong>: If the =
<code title=3Dattr-progress-value><a href=3D#attr-progress-value=
>value</a></code>
+  attribute is omitted, then the progress bar is an indeterminate progre=
ss bar. Otherwise, it is a
+  determinate progress bar.</p>
+
+  <p>If the progress bar is a determinate progress bar and the ele=
ment has a <code title=3Dattr-progress-max><a href=3D#attr-progr=
ess-max>max</a></code> attribute, the user agent must pars=
e the <code title=3Dattr-progress-max><a href=3D#attr-progress-m=
ax>max</a></code> attribute's value according to the <a=
 href=3D#rules-for-parsing-floating-point-number-values>rules for pars=
ing
+  floating-point number values</a>. If this does not result in an =
error, and if the parsed value
+  is greater than zero, then the <dfn id=3Dconcept-progress-maximum t=
itle=3Dconcept-progress-maximum>maximum value</dfn> of the
+  progress bar is that value. Otherwise, if the element has no <code =
title=3Dattr-progress-max><a href=3D#attr-progress-max>max</a=
></code> attribute, or if it has one but parsing it resulted in =
an
+  error, or if the parsed value was less than or equal to zero, then the=
 <a href=3D#concept-progress-maximum title=3Dconcept-progress-maximum&=
gt;maximum value</a> of the progress bar is 1.0.</p>
+
+  <p>If the progress bar is a determinate progress bar, user agent=
s must parse the <code title=3Dattr-progress-value><a href=3D#at=
tr-progress-value>value</a></code> attribute's value accor=
ding to the <a href=3D#rules-for-parsing-floating-point-number-values&=
gt;rules for
+  parsing floating-point number values</a>. If this does not resul=
t in an error, and if the
+  parsed value is less than the <a href=3D#concept-progress-maximum t=
itle=3Dconcept-progress-maximum>maximum value</a> and
+  greater than zero, then the <dfn id=3Dconcept-progress-value title=3D=
concept-progress-value>current value</dfn> of the
+  progress bar is that parsed value. Otherwise, if the parsed value was =
greater than or equal to the
+  <a href=3D#concept-progress-maximum title=3Dconcept-progress-maximu=
m>maximum value</a>, then the <a href=3D#concept-progress-val=
ue title=3Dconcept-progress-value>current value</a> of the progr=
ess bar is the <a href=3D#concept-progress-maximum title=3Dconcept-pro=
gress-maximum>maximum value</a> of the progress bar. Otherwise, =
if parsing
+  the <code title=3Dattr-progress-value><a href=3D#attr-progres=
s-value>value</a></code> attribute's value resulted in an =
error, or a
+  number less than or equal to zero, then the <a href=3D#concept-prog=
ress-value title=3Dconcept-progress-value>current
+  value</a> of the progress bar is zero.</p>
+
+  <p><strong>UA requirements for showing the progress bar&lt=
;/strong>: When representing a
+  <code><a href=3D#the-progress-element>progress</a>&l=
t;/code> element to the user, the UA should indicate whether it is a d=
eterminate or
+  indeterminate progress bar, and in the former case, should indicate th=
e relative position of the
+  <a href=3D#concept-progress-value title=3Dconcept-progress-value&gt=
;current value</a> relative to the <a href=3D#concept-progress-m=
aximum title=3Dconcept-progress-maximum>maximum value</a>.</p=
>
+
+  </div>
+
+<!--TOPIC:DOM APIs-->
+  <dl class=3Ddomintro><dt><var title=3D"">p=
rogress</var> . <code title=3Ddom-progress-position><a hre=
f=3D#dom-progress-position>position</a></code></dt>
+
+   <dd>
+
+    <p>For a determinate progress bar (one with known current and =
maximum values), returns the
+    result of dividing the current value by the maximum value.</p>
+
+    <p>For an indeterminate progress bar, returns −1.&lt=
;/p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>If the progress bar is an indeterminate progress bar, then th=
e <dfn id=3Ddom-progress-position title=3Ddom-progress-position>&lt=
;code>position</code></dfn> IDL attribute must return &amp=
;minus;1.
+  Otherwise, it must return the result of dividing the <a href=3D#con=
cept-progress-value title=3Dconcept-progress-value>current
+  value</a> by the <a href=3D#concept-progress-maximum title=3D=
concept-progress-maximum>maximum value</a>.</p>
+
+  <p>If the progress bar is an indeterminate progress bar, then th=
e <dfn id=3Ddom-progress-value title=3Ddom-progress-value><code&=
gt;value</code></dfn> IDL attribute, on getting, must return =
0.
+  Otherwise, it must return the <a href=3D#concept-progress-value tit=
le=3Dconcept-progress-value>current value</a>. On
+  setting, the given value must be converted to the <a href=3D#best-r=
epresentation-of-the-number-as-a-floating-point-number>best representa=
tion of the number as a
+  floating-point number</a> and then the <code title=3Ddom-prog=
ress-value><a href=3D#dom-progress-value>value</a></cod=
e> content
+  attribute must be set to that string.</p>
+
+  <p class=3Dnote>Setting the <code title=3Ddom-progress-value&=
gt;<a href=3D#dom-progress-value>value</a></code> IDL a=
ttribute to itself
+  when the corresponding content attribute is absent would change the pr=
ogress bar from an
+  indeterminate progress bar to a determinate progress bar with no progr=
ess.</p>
+
+  <p>The <dfn id=3Ddom-progress-max title=3Ddom-progress-max&gt=
;<code>max</code></dfn> IDL attribute must
+  <a href=3D#reflect>reflect</a> the content attribute of th=
e same name, <a href=3D#limited-to-numbers-greater-than-zero>limite=
d to numbers greater than
+  zero</a>. The default value for <code title=3Ddom-progress-ma=
x><a href=3D#dom-progress-max>max</a></code> is 1.0.=
</p>
+
+  <p>The <code title=3Ddom-lfe-labels><a href=3D#dom-lfe-=
labels>labels</a></code> IDL attribute provides a list of =
the element's
+  <code><a href=3D#the-label-element>label</a></cod=
e>s.</p>
+
+  </div>
+<!--TOPIC:HTML-->
+
+
+
+  <h4 id=3Dthe-meter-element><span class=3Dsecno>4.10.15 &lt=
;/span>The <dfn><code>meter</code></dfn> eleme=
nt</h4>
+  <!-- Keep this after <progress> and NOT close to <time>=
 -->
+
+  <dl class=3Delement><dt><a href=3D#element-dfn-categori=
es title=3Delement-dfn-categories>Categories</a>:</dt>
+   <dd><a href=3D#flow-content>Flow content</a>.</d=
d>
+   <dd><a href=3D#phrasing-content>Phrasing content</a&gt=
;.</dd>
+   <dd><a href=3D#category-label title=3Dcategory-label>Labe=
lable element</a>.</dd>
+   <dd><a href=3D#palpable-content>Palpable content</a&gt=
;.</dd>
+   <dt><a href=3D#element-dfn-contexts title=3Delement-dfn-cont=
exts>Contexts in which this element can be used</a>:</dt>
+   <dd>Where <a href=3D#phrasing-content>phrasing content&lt=
;/a> is expected.</dd>
+   <dt><a href=3D#element-dfn-content-model title=3Delement-dfn=
-content-model>Content model</a>:</dt>
+   <dd><a href=3D#phrasing-content>Phrasing content</a&gt=
;, but there must be no <code><a href=3D#the-meter-element>me=
ter</a></code> element descendants.</dd>
+   <dt><a href=3D#element-dfn-tag-omission title=3Delement-dfn-=
tag-omission>Tag omission in text/html</a>:</dt>
+   <dd>Neither tag is omissible.</dd>
+   <dt><a href=3D#element-dfn-attributes title=3Delement-dfn-at=
tributes>Content attributes</a>:</dt>
+   <dd><a href=3D#global-attributes>Global attributes</a&=
gt;</dd>
+   <dd><code title=3Dattr-meter-value><a href=3D#attr-met=
er-value>value</a></code> — Current value of the=
 element</dd>
+   <dd><code title=3Dattr-meter-min><a href=3D#attr-meter=
-min>min</a></code> — Lower bound of range</d=
d>
+   <dd><code title=3Dattr-meter-max><a href=3D#attr-meter=
-max>max</a></code> — Upper bound of range</d=
d>
+   <dd><code title=3Dattr-meter-low><a href=3D#attr-meter=
-low>low</a></code> — High limit of low range&lt=
;/dd>
+   <dd><code title=3Dattr-meter-high><a href=3D#attr-mete=
r-high>high</a></code> — Low limit of high range=
</dd>
+   <dd><code title=3Dattr-meter-optimum><a href=3D#attr-m=
eter-optimum>optimum</a></code> — Optimum value =
in gauge</dd>
+   <dt><a href=3D#element-dfn-dom title=3Delement-dfn-dom>DO=
M interface</a>:</dt><!--TOPIC:DOM APIs-->
+   <dd>
+<pre class=3Didl>interface <dfn id=3Dhtmlmeterelement>HTMLMe=
terElement</dfn> : <a href=3D#htmlelement>HTMLElement</a&g=
t; {
+           attribute double <a href=3D#dom-meter-value title=3Ddom-me=
ter-value>value</a>;
+           attribute double <a href=3D#dom-meter-min title=3Ddom-mete=
r-min>min</a>;
+           attribute double <a href=3D#dom-meter-max title=3Ddom-mete=
r-max>max</a>;
+           attribute double <a href=3D#dom-meter-low title=3Ddom-mete=
r-low>low</a>;
+           attribute double <a href=3D#dom-meter-high title=3Ddom-met=
er-high>high</a>;
+           attribute double <a href=3D#dom-meter-optimum title=3Ddom-=
meter-optimum>optimum</a>;
+  readonly attribute <a href=3D#nodelist>NodeList</a> <a =
href=3D#dom-lfe-labels title=3Ddom-lfe-labels>labels</a>;
+};</pre>
+   </dd>
+  </dl><!--TOPIC:HTML--><p>The <code><a href=3D=
#the-meter-element>meter</a></code> element <a href=3D#=
represents>represents</a> a scalar measurement within a known
+  range, or a fractional value; for example disk usage, the relevance of=
 a query result, or the
+  fraction of a voting population to have selected a particular candidat=
e.</p>
+
+  <p>This is also known as a gauge.</p>
+
+  <p class=3Dnote>The <code><a href=3D#the-meter-element&=
gt;meter</a></code> element should not be used to indicate pr=
ogress (as in a
+  progress bar). For that role, HTML provides a separate <code>&lt=
;a href=3D#the-progress-element>progress</a></code> elemen=
t.</p>
+
+  <p class=3Dnote>The <code><a href=3D#the-meter-element&=
gt;meter</a></code> element also does not represent a scalar =
value of arbitrary
+  range — for example, it would be wrong to use this to report=
 a weight, or height, unless
+  there is a known maximum value.</p>
+
+  <p>There are six attributes that determine the semantics of the =
gauge represented by the
+  element.</p>
+
+  <p>The <dfn id=3Dattr-meter-min title=3Dattr-meter-min>&lt=
;code>min</code></dfn> attribute specifies the lower bound=
 of
+  the range, and the <dfn id=3Dattr-meter-max title=3Dattr-meter-max&=
gt;<code>max</code></dfn> attribute specifies the
+  upper bound. The <dfn id=3Dattr-meter-value title=3Dattr-meter-valu=
e><code>value</code></dfn> attribute specifies the
+  value to have the gauge indicate as the "measured" value.&lt=
;/p>
+
+  <p>The other three attributes can be used to segment the gauge's=
 range into "low", "medium", and
+  "high" parts, and to indicate which part of the gauge is the=
 "optimum" part. The <dfn id=3Dattr-meter-low title=3Dattr-m=
eter-low><code>low</code></dfn> attribute specifies =
the range that is considered to
+  be the "low" part, and the <dfn id=3Dattr-meter-high titl=
e=3Dattr-meter-high><code>high</code></dfn> attribut=
e
+  specifies the range that is considered to be the "high" part=
. The <dfn id=3Dattr-meter-optimum title=3Dattr-meter-optimum><c=
ode>optimum</code></dfn> attribute gives the position that=
 is
+  "optimum"; if that is higher than the "high" value=
 then this indicates that the higher the value,
+  the better; if it's lower than the "low" mark then it indica=
tes that lower values are better, and
+  naturally if it is in between then it indicates that neither high nor =
low values are good.</p>
+
+  <p><span class=3Dimpl><strong>Authoring requirements=
</strong>:</span> The <code title=3Dattr-meter-value>&l=
t;a href=3D#attr-meter-value>value</a></code> attribute mu=
st be specified. The <code title=3Dattr-meter-value><a href=3D#a=
ttr-meter-value>value</a></code>, <code title=3Dattr-me=
ter-min><a href=3D#attr-meter-min>min</a></code>, &l=
t;code title=3Dattr-meter-low><a href=3D#attr-meter-low>low</=
a></code>, <code title=3Dattr-meter-high><a href=3D#att=
r-meter-high>high</a></code>, <code title=3Dattr-meter-=
max><a href=3D#attr-meter-max>max</a></code>, and &l=
t;code title=3Dattr-meter-optimum><a href=3D#attr-meter-optimum>=
optimum</a></code> attributes,
+  when present, must have values that are <a href=3D#valid-floating-p=
oint-number title=3D"valid floating-point number">valid
+  floating-point numbers</a>.</p>
+
+  <p>In addition, the attributes' values are further constrained:&=
lt;/p>
+
+  <p>Let <var title=3D"">value</var> be the =
<code title=3Dattr-meter-value><a href=3D#attr-meter-value>va=
lue</a></code> attribute's
+  number.</p>
+
+  <p>If the <code title=3Dattr-meter-min><a href=3D#attr-=
meter-min>min</a></code> attribute is specified, then let =
<var title=3D"">minimum</var> be that attribute's v=
alue; otherwise, let it be zero.</p>
+
+  <p>If the <code title=3Dattr-meter-max><a href=3D#attr-=
meter-max>max</a></code> attribute is specified, then let =
<var title=3D"">maximum</var> be that attribute's v=
alue; otherwise, let it be 1.0.</p>
+
+  <p>The following inequalities must hold, as applicable:</p&gt=
;
+
+  <ul class=3Dbrief><li><var title=3D"">mini=
mum</var> ≤ <var title=3D"">value</var&gt=
; ≤ <var title=3D"">maximum</var></li>
+
+   <li><var title=3D"">minimum</var> &le=
; <code title=3Dattr-meter-low><a href=3D#attr-meter-low>low&=
lt;/a></code> ≤ <var title=3D"">maximum&l=
t;/var> (if <code title=3Dattr-meter-low><a href=3D#attr-mete=
r-low>low</a></code> is specified)</li>
+
+   <li><var title=3D"">minimum</var> &le=
; <code title=3Dattr-meter-high><a href=3D#attr-meter-high>hi=
gh</a></code> ≤ <var title=3D"">maximu=
m</var> (if <code title=3Dattr-meter-high><a href=3D#attr-=
meter-high>high</a></code> is specified)</li>
+
+   <li><var title=3D"">minimum</var> &le=
; <code title=3Dattr-meter-optimum><a href=3D#attr-meter-optimum=
>optimum</a></code> ≤ <var title=3D""&=
gt;maximum</var> (if <code title=3Dattr-meter-optimum><a h=
ref=3D#attr-meter-optimum>optimum</a></code> is specified)=
</li>
+
+   <li><code title=3Dattr-meter-low><a href=3D#attr-meter=
-low>low</a></code> ≤ <code title=3Dattr-meter-h=
igh><a href=3D#attr-meter-high>high</a></code> (if
+   both <code title=3Dattr-meter-low><a href=3D#attr-meter-low&=
gt;low</a></code> and <code title=3Dattr-meter-high>&lt=
;a href=3D#attr-meter-high>high</a></code> are
+   specified)</li>
+
+  </ul><p class=3Dnote>If no minimum or maximum is specified=
, then the range is assumed to be 0..1, and
+  the value thus has to be within that range.</p>
+
+  <p>Authors are encouraged to include a textual representation of=
 the gauge's state in the
+  element's contents, for users of user agents that do not support the &=
lt;code><a href=3D#the-meter-element>meter</a></code&gt=
;
+  element.</p>
+
+  <p>When used with <a href=3D#microdata>microdata</a>=
, the <code><a href=3D#the-meter-element>meter</a></=
code> element's <code title=3Dattr-meter-value><a href=3D#att=
r-meter-value>value</a></code> attribute provides the elem=
ent's machine-readable value.</p>
+
+  <div class=3Dexample>
+
+   <p>The following examples show three gauges that would all be t=
hree-quarters full:</p>
+
+   <pre>Storage space usage: <meter value=3D6 max=3D8&g=
t;6 blocks used (out of 8 total)</meter>
+Voter turnout: <meter value=3D0.75><img alt=3D&quot=
;75%" src=3D"graph75.png"></meter>
+Tickets sold: <meter min=3D"0" max=3D"100" va=
lue=3D"75"></meter></pre>
+
+   <p>The following example is incorrect use of the element, becau=
se it doesn't give a range (and
+   since the default maximum is 1, both of the gauges would end up looki=
ng maxed out):</p>
+
+   <pre class=3Dbad><p>The grapefruit pie had a radi=
us of <meter value=3D12>12cm</meter>
+and a height of <meter value=3D2>2cm</meter>=
.</p> <!-- <strong>BAD!</strong> --&=
gt;</pre>
+
+   <p>Instead, one would either not include the meter element, or =
use the meter element with a
+   defined range to give the dimensions in context compared to other pie=
s:</p>
+
+   <pre><p>The grapefruit pie had a radius of 12cm a=
nd a height of
+2cm.</p>
+<dl>
+ <dt>Radius: <dd> <meter min=3D0 max=3D=
20 value=3D12>12cm</meter>
+ <dt>Height: <dd> <meter min=3D0 max=3D=
10 value=3D2>2cm</meter>
+</dl></pre>
+
+  </div>
+
+  <p>There is no explicit way to specify units in the <code>=
<a href=3D#the-meter-element>meter</a></code> element, =
but the units may
+  be specified in the <code title=3Dattr-title><a href=3D#attr-=
title>title</a></code> attribute in free-form text.</p&=
gt;
+
+  <div class=3Dexample>
+
+   <p>The example above could be extended to mention the units:&lt=
;/p>
+
+   <pre><dl>
+ <dt>Radius: <dd> <meter min=3D0 max=3D=
20 value=3D12 title=3D"centimeters">12cm</meter&a=
mp;gt;
+ <dt>Height: <dd> <meter min=3D0 max=3D=
10 value=3D2 title=3D"centimeters">2cm</meter&amp=
;gt;
+</dl></pre>
+
+  </div>
+
+  <div class=3Dimpl>
+
+  <p><strong>User agent requirements</strong>: User ag=
ents must parse the <code title=3Dattr-meter-min><a href=3D#attr=
-meter-min>min</a></code>, <code title=3Dattr-meter-max=
><a href=3D#attr-meter-max>max</a></code>, <code =
title=3Dattr-meter-value><a href=3D#attr-meter-value>value</a=
></code>, <code title=3Dattr-meter-low><a href=3D#attr-=
meter-low>low</a></code>, <code title=3Dattr-meter-high=
><a href=3D#attr-meter-high>high</a></code>, and &lt=
;code title=3Dattr-meter-optimum><a href=3D#attr-meter-optimum>o=
ptimum</a></code>
+  attributes using the <a href=3D#rules-for-parsing-floating-point-nu=
mber-values>rules for parsing floating-point number values</a>.&=
lt;/p>
+
+  <p>User agents must then use all these numbers to obtain values =
for six points on the gauge, as
+  follows. (The order in which these are evaluated is important, as some=
 of the values refer to
+  earlier ones.)</p>
+
+  <dl><dt>The <dfn id=3Dconcept-meter-minimum title=3Dcon=
cept-meter-minimum>minimum value</dfn></dt>
+
+   <dd>
+
+    <p>If the <code title=3Dattr-meter-min><a href=3D#att=
r-meter-min>min</a></code> attribute is specified and a va=
lue could be
+    parsed out of it, then the minimum value is that value. Otherwise, t=
he minimum value is
+    zero.</p>
+
+   </dd>
+
+   <dt>The <dfn id=3Dconcept-meter-maximum title=3Dconcept-mete=
r-maximum>maximum value</dfn></dt>
+
+   <dd>
+
+    <p>If the <code title=3Dattr-meter-max><a href=3D#att=
r-meter-max>max</a></code> attribute is specified and a va=
lue could be
+    parsed out of it, then the candidate maximum value is that value. Ot=
herwise, the candidate
+    maximum value is 1.0.</p>
+
+    <p>If the candidate maximum value is greater than or equal to =
the minimum value, then the
+    maximum value is the candidate maximum value. Otherwise, the maximum=
 value is the same as the
+    minimum value.</p>
+
+   </dd>
+
+   <dt>The <dfn id=3Dconcept-meter-actual title=3Dconcept-meter=
-actual>actual value</dfn></dt>
+
+   <dd>
+
+    <p>If the <code title=3Dattr-meter-value><a href=3D#a=
ttr-meter-value>value</a></code> attribute is specified an=
d a value could
+    be parsed out of it, then that value is the candidate actual value. =
Otherwise, the candidate
+    actual value is zero.</p>
+
+    <p>If the candidate actual value is less than the minimum valu=
e, then the actual value is the
+    minimum value.</p>
+
+    <p>Otherwise, if the candidate actual value is greater than th=
e maximum value, then the actual
+    value is the maximum value.</p>
+
+    <p>Otherwise, the actual value is the candidate actual value.&=
lt;/p>
+
+   </dd>
+
+   <dt>The <dfn id=3Dconcept-meter-low title=3Dconcept-meter-lo=
w>low boundary</dfn></dt>
+
+   <dd>
+
+    <p>If the <code title=3Dattr-meter-low><a href=3D#att=
r-meter-low>low</a></code> attribute is specified and a va=
lue could be
+    parsed out of it, then the candidate low boundary is that value. Oth=
erwise, the candidate low
+    boundary is the same as the minimum value.</p>
+
+    <p>If the candidate low boundary is less than the minimum valu=
e, then the low boundary is the
+    minimum value.</p>
+
+    <p>Otherwise, if the candidate low boundary is greater than th=
e maximum value, then the low
+    boundary is the maximum value.</p>
+
+    <p>Otherwise, the low boundary is the candidate low boundary.&=
lt;/p>
+
+   </dd>
+
+   <dt>The <dfn id=3Dconcept-meter-high title=3Dconcept-meter-h=
igh>high boundary</dfn></dt>
+
+   <dd>
+
+    <p>If the <code title=3Dattr-meter-high><a href=3D#at=
tr-meter-high>high</a></code> attribute is specified and a=
 value could be
+    parsed out of it, then the candidate high boundary is that value. Ot=
herwise, the candidate high
+    boundary is the same as the maximum value.</p>
+
+    <p>If the candidate high boundary is less than the low boundar=
y, then the high boundary is the
+    low boundary.</p>
+
+    <p>Otherwise, if the candidate high boundary is greater than t=
he maximum value, then the high
+    boundary is the maximum value.</p>
+
+    <p>Otherwise, the high boundary is the candidate high boundary=
.</p>
+
+   </dd>
+
+   <dt>The <dfn id=3Dconcept-meter-optimum title=3Dconcept-mete=
r-optimum>optimum point</dfn></dt>
+
+   <dd>
+
+    <p>If the <code title=3Dattr-meter-optimum><a href=3D=
#attr-meter-optimum>optimum</a></code> attribute is specif=
ied and a value
+    could be parsed out of it, then the candidate optimum point is that =
value. Otherwise, the
+    candidate optimum point is the midpoint between the minimum value an=
d the maximum value.</p>
+
+    <p>If the candidate optimum point is less than the minimum val=
ue, then the optimum point is the
+    minimum value.</p>
+
+    <p>Otherwise, if the candidate optimum point is greater than t=
he maximum value, then the optimum
+    point is the maximum value.</p>
+
+    <p>Otherwise, the optimum point is the candidate optimum point=
.</p>
+
+   </dd>
+
+  </dl><p>All of which will result in the following inequali=
ties all being true:</p>
+
+  <ul class=3Dbrief><li>minimum value ≤ actual value =
≤ maximum value</li>
+   <li>minimum value ≤ low boundary ≤ high boundary =
≤ maximum value</li>
+   <li>minimum value ≤ optimum point ≤ maximum value=
</li>
+  </ul><p><strong>UA requirements for regions of the g=
auge</strong>: If the optimum point is equal to the
+  low boundary or the high boundary, or anywhere in between them, then t=
he region between the low
+  and high boundaries of the gauge must be treated as the optimum region=
, and the low and high
+  parts, if any, must be treated as suboptimal. Otherwise, if the optimu=
m point is less than the low
+  boundary, then the region between the minimum value and the low bounda=
ry must be treated as the
+  optimum region, the region from the low boundary up to the high bounda=
ry must be treated as a
+  suboptimal region, and the remaining region must be treated as an even=
 less good region. Finally,
+  if the optimum point is higher than the high boundary, then the situat=
ion is reversed; the region
+  between the high boundary and the maximum value must be treated as the=
 optimum region, the region
+  from the high boundary down to the low boundary must be treated as a s=
uboptimal region, and the
+  remaining region must be treated as an even less good region.</p&gt=
;
+
+  <p><strong>UA requirements for showing the gauge</stron=
g>: When representing a <code><a href=3D#the-meter-element&gt=
;meter</a></code>
+  element to the user, the UA should indicate the relative position of t=
he actual value to the
+  minimum and maximum values, and the relationship between the actual va=
lue and the three regions of
+  the gauge.</p>
+
+  </div>
+
+  <div class=3Dexample>
+   <p>The following markup:</p>
+   <pre><h3>Suggested groups</h3>
+<menu type=3D"toolbar">
+ <a href=3D"?cmd=3Dhsg" onclick=3D"hideSuggestedGr=
oups()">Hide suggested groups</a>
+</menu>
+<ul>
+ <li>
+  <p><a href=3D"/group/comp.infosystems.www.au=
thoring.stylesheets/view">comp.infosystems.www.authoring.styl=
esheets</a> -
+     <a href=3D"/group/comp.infosystems.www.authoring.styles=
heets/subscribe">join</a></p>
+  <p>Group description: <strong>Layout/prese=
ntation on the WWW.</strong></p>
+  <p><strong><meter value=3D"0.5"&a=
mp;gt;Moderate activity,</meter></strong> Usenet, 618=
 subscribers</p>
+ </li>
+ <li>
+  <p><a href=3D"/group/netscape.public.mozilla=
.xpinstall/view">netscape.public.mozilla.xpinstall</a&=
amp;gt; -
+     <a href=3D"/group/netscape.public.mozilla.xpinstall/sub=
scribe">join</a></p>
+  <p>Group description: <strong>Mozilla XPIn=
stall discussion.</strong></p>
+  <p><strong><meter value=3D"0.25"&=
amp;gt;Low activity,</meter></strong> Usenet, 22 subs=
cribers</p>
+ </li>
+ <li>
+  <p><a href=3D"/group/mozilla.dev.general/vie=
w">mozilla.dev.general</a> -
+     <a href=3D"/group/mozilla.dev.general/subscribe"&a=
mp;gt;join</a></p>
+  <p><strong><meter value=3D"0.25"&=
amp;gt;Low activity,</meter></strong> Usenet, 66 subs=
cribers</p>
+ </li>
+</ul></pre>
+   <p>Might be rendered as follows:</p>
+   <p><img src=3Dhttp://images.whatwg.org/sample-meter.png widt=
h=3D332 alt=3D"With the <meter> elements rendered as inline gr=
een bars of varying lengths." height=3D178></p>
+  </div>
+
+  <p>User agents <span class=3Dimpl>may</span> combine=
 the value of the <code title=3Dattr-title><a href=3D#attr-title=
>title</a></code> attribute and the other attributes to pr=
ovide context-sensitive
+  help or inline text detailing the actual values.</p>
+
+  <div class=3Dexample>
+   <p>For example, the following snippet:</p>
+   <pre><meter min=3D0 max=3D60 value=3D23.2 title=3Dsecond=
s></meter></pre>
+   <p>...might cause the user agent to display a gauge with a tool=
tip
+   saying "Value: 23.2 out of 60." on one line and "secon=
ds" on a
+   second line.</p>
+  </div>
+
+  <div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-meter-value title=3Ddom-meter-value>&=
lt;code>value</code></dfn> IDL attribute, on getting, must
+  return the <a href=3D#concept-meter-actual title=3Dconcept-meter-ac=
tual>actual value</a>. On setting, the given value
+  must be converted to the <a href=3D#best-representation-of-the-numb=
er-as-a-floating-point-number>best representation of the number as a f=
loating-point number</a>
+  and then the <code title=3Ddom-meter-value><a href=3D#dom-met=
er-value>value</a></code> content attribute must be set to=
 that
+  string.</p>
+
+  <p>The <dfn id=3Ddom-meter-min title=3Ddom-meter-min><c=
ode>min</code></dfn> IDL attribute, on getting, must retur=
n
+  the <a href=3D#concept-meter-minimum title=3Dconcept-meter-minimum&=
gt;minimum value</a>. On setting, the given value must be
+  converted to the <a href=3D#best-representation-of-the-number-as-a-=
floating-point-number>best representation of the number as a floating-=
point number</a> and
+  then the <code title=3Ddom-meter-min><a href=3D#dom-meter-min=
>min</a></code> content attribute must be set to that stri=
ng.</p>
+
+  <p>The <dfn id=3Ddom-meter-max title=3Ddom-meter-max><c=
ode>max</code></dfn> IDL attribute, on getting, must retur=
n
+  the <a href=3D#concept-meter-maximum title=3Dconcept-meter-maximum&=
gt;maximum value</a>. On setting, the given value must be
+  converted to the <a href=3D#best-representation-of-the-number-as-a-=
floating-point-number>best representation of the number as a floating-=
point number</a> and
+  then the <code title=3Ddom-meter-max><a href=3D#dom-meter-max=
>max</a></code> content attribute must be set to that stri=
ng.</p>
+
+  <p>The <dfn id=3Ddom-meter-low title=3Ddom-meter-low><c=
ode>low</code></dfn> IDL attribute, on getting, must retur=
n
+  the <a href=3D#concept-meter-low title=3Dconcept-meter-low>low b=
oundary</a>. On setting, the given value must be
+  converted to the <a href=3D#best-representation-of-the-number-as-a-=
floating-point-number>best representation of the number as a floating-=
point number</a> and
+  then the <code title=3Ddom-meter-low><a href=3D#dom-meter-low=
>low</a></code> content attribute must be set to that stri=
ng.</p>
+
+  <p>The <dfn id=3Ddom-meter-high title=3Ddom-meter-high>&lt=
;code>high</code></dfn> IDL attribute, on getting, must re=
turn
+  the <a href=3D#concept-meter-high title=3Dconcept-meter-high>hig=
h boundary</a>. On setting, the given value must be
+  converted to the <a href=3D#best-representation-of-the-number-as-a-=
floating-point-number>best representation of the number as a floating-=
point number</a> and
+  then the <code title=3Ddom-meter-high><a href=3D#dom-meter-hi=
gh>high</a></code> content attribute must be set to that
+  string.</p>
+
+  <p>The <dfn id=3Ddom-meter-optimum title=3Ddom-meter-optimum&=
gt;<code>optimum</code></dfn> IDL attribute, on getting=
, must
+  return the <a href=3D#concept-meter-optimum title=3Dconcept-meter-o=
ptimum>optimum value</a>. On setting, the given value
+  must be converted to the <a href=3D#best-representation-of-the-numb=
er-as-a-floating-point-number>best representation of the number as a f=
loating-point number</a>
+  and then the <code title=3Ddom-meter-optimum><a href=3D#dom-m=
eter-optimum>optimum</a></code> content attribute must be =
set to that
+  string.</p>
+
+  <p>The <code title=3Ddom-lfe-labels><a href=3D#dom-lfe-=
labels>labels</a></code> IDL attribute provides a list of =
the element's
+  <code><a href=3D#the-label-element>label</a></cod=
e>s.</p>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>The following example shows how a gauge could fall back to l=
ocalized or pretty-printed
+   text.</p>
+
+   <pre><p>Disk usage: <meter min=3D0 value=3D=
170261928 max=3D233257824>170 261 928 bytes =
used
+out of 233 257 824 bytes available</meter&a=
mp;gt;</p></pre>
+
+  </div>
+
+
+
+
+  <h4 id=3Dthe-fieldset-element><span class=3Dsecno>4.10.16 =
</span>The <dfn><code>fieldset</code></dfn>=
 element</h4>
+
+  <dl class=3Delement><dt><a href=3D#element-dfn-categori=
es title=3Delement-dfn-categories>Categories</a>:</dt>
+   <dd><a href=3D#flow-content>Flow content</a>.</d=
d>
+   <dd><a href=3D#sectioning-root>Sectioning root</a>.=
</dd>
+   <dd><a href=3D#category-listed title=3Dcategory-listed>Li=
sted</a> and <a href=3D#category-form-attr title=3Dcategory-form=
-attr>reassociateable</a> <a href=3D#form-associated-element&=
gt;form-associated element</a>.</dd>
+   <dd><a href=3D#palpable-content>Palpable content</a&gt=
;.</dd>
+   <dt><a href=3D#element-dfn-contexts title=3Delement-dfn-cont=
exts>Contexts in which this element can be used</a>:</dt>
+   <dd>Where <a href=3D#flow-content>flow content</a> =
is expected.</dd>
+   <dt><a href=3D#element-dfn-content-model title=3Delement-dfn=
-content-model>Content model</a>:</dt>
+   <dd>Optionally a <code><a href=3D#the-legend-element&g=
t;legend</a></code> element, followed by <a href=3D#flow-c=
ontent>flow content</a>.</dd>
+   <dt><a href=3D#element-dfn-tag-omission title=3Delement-dfn-=
tag-omission>Tag omission in text/html</a>:</dt>
+   <dd>Neither tag is omissible.</dd>
+   <dt><a href=3D#element-dfn-attributes title=3Delement-dfn-at=
tributes>Content attributes</a>:</dt>
+   <dd><a href=3D#global-attributes>Global attributes</a&=
gt;</dd>
+   <dd><code title=3Dattr-fieldset-disabled><a href=3D#at=
tr-fieldset-disabled>disabled</a></code> — Wheth=
er the form control is disabled</dd>
+   <dd><code title=3Dattr-fae-form><a href=3D#attr-fae-fo=
rm>form</a></code> — Associates the control with=
 a <code><a href=3D#the-form-element>form</a></code&=
gt; element</dd>
+   <dd><code title=3Dattr-fe-name><a href=3D#attr-fe-name=
>name</a></code> — Name of form control to use f=
or <a href=3D#form-submission>form submission</a> and in the =
<code title=3Ddom-form-elements><a href=3D#dom-form-elements>=
form.elements</a></code> API</dd>
+   <dt><a href=3D#element-dfn-dom title=3Delement-dfn-dom>DO=
M interface</a>:</dt><!--TOPIC:DOM APIs-->
+   <dd>
+<pre class=3Didl>interface <dfn id=3Dhtmlfieldsetelement>HTM=
LFieldSetElement</dfn> : <a href=3D#htmlelement>HTMLElement&l=
t;/a> {
+           attribute boolean <a href=3D#dom-fieldset-disabled title=3D=
dom-fieldset-disabled>disabled</a>;
+  readonly attribute <a href=3D#htmlformelement>HTMLFormElement&lt=
;/a>? <a href=3D#dom-fae-form title=3Ddom-fae-form>form</a&gt=
;;
+           attribute DOMString <a href=3D#dom-fe-name title=3Ddom-fe-=
name>name</a>;
+
+  readonly attribute DOMString <a href=3D#dom-fieldset-type title=3Dd=
om-fieldset-type>type</a>;
+
+  readonly attribute <a href=3D#htmlformcontrolscollection>HTMLFor=
mControlsCollection</a> <a href=3D#dom-fieldset-elements title=3D=
dom-fieldset-elements>elements</a>;
+
+  readonly attribute boolean <a href=3D#dom-cva-willvalidate title=3D=
dom-cva-willValidate>willValidate</a>;
+  readonly attribute <a href=3D#validitystate>ValidityState</a&=
gt; <a href=3D#dom-cva-validity title=3Ddom-cva-validity>validity&l=
t;/a>;
+  readonly attribute DOMString <a href=3D#dom-cva-validationmessage t=
itle=3Ddom-cva-validationMessage>validationMessage</a>;
+  boolean <a href=3D#dom-cva-checkvalidity title=3Ddom-cva-checkValid=
ity>checkValidity</a>();
+  boolean <a href=3D#dom-cva-reportvalidity title=3Ddom-cva-reportVal=
idity>reportValidity</a>();
+  void <a href=3D#dom-cva-setcustomvalidity title=3Ddom-cva-setCustom=
Validity>setCustomValidity</a>(DOMString error);
+};</pre>
+   </dd>
+  </dl><!--TOPIC:HTML--><p>The <code><a href=3D=
#the-fieldset-element>fieldset</a></code> element <a hr=
ef=3D#represents>represents</a> a set of form controls optionall=
y
+  grouped under a common name.</p>
+
+  <p>The name of the group is given by the first <code><a=
 href=3D#the-legend-element>legend</a></code> element that=
 is a child of the
+  <code><a href=3D#the-fieldset-element>fieldset</a>&l=
t;/code> element, if any. The remainder of the descendants form the gr=
oup.</p>
+
+  <p>The <dfn id=3Dattr-fieldset-disabled title=3Dattr-fieldset=
-disabled><code>disabled</code></dfn> attribute, whe=
n specified,
+  causes all the form control descendants of the <code><a href=3D=
#the-fieldset-element>fieldset</a></code> element, excludi=
ng those that
+  are descendants of the <code><a href=3D#the-fieldset-element&=
gt;fieldset</a></code> element's first <code><a href=
=3D#the-legend-element>legend</a></code> element child, if
+  any, to be <a href=3D#concept-fe-disabled title=3Dconcept-fe-disabl=
ed>disabled</a>.</p>
+
+  <p>The <code title=3Dattr-fae-form><a href=3D#attr-fae-=
form>form</a></code> attribute is used to explicitly assoc=
iate the
+  <code><a href=3D#the-fieldset-element>fieldset</a>&l=
t;/code> element with its <a href=3D#form-owner>form owner</a=
>. The <code title=3Dattr-fe-name><a href=3D#attr-fe-name>=
name</a></code> attribute represents the element's name.</=
p>
+
+<!--TOPIC:DOM APIs-->
+  <dl class=3Ddomintro><dt><var title=3D"">f=
ieldset</var> . <code title=3Ddom-fieldset-type><a href=3D=
#dom-fieldset-type>type</a></code></dt>
+
+   <dd>
+
+    <p>Returns the string "fieldset".</p>
+
+   </dd>
+
+   <dt><var title=3D"">fieldset</var> . <=
code title=3Ddom-form-elements><a href=3D#dom-form-elements>elem=
ents</a></code></dt>
+
+   <dd>
+
+    <p>Returns an <code><a href=3D#htmlformcontrolscollec=
tion>HTMLFormControlsCollection</a></code> of the form con=
trols in the element.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-fieldset-disabled title=3Ddom-fieldset-d=
isabled><code>disabled</code></dfn> IDL attribute mu=
st
+  <a href=3D#reflect>reflect</a> the content attribute of th=
e same name.</p>
+
+  <p>The <dfn id=3Ddom-fieldset-type title=3Ddom-fieldset-type&=
gt;<code>type</code></dfn> IDL attribute must return th=
e string
+  "<code title=3D"">fieldset</code>".&lt=
;/p>
+
+  <p>The <dfn id=3Ddom-fieldset-elements title=3Ddom-fieldset-e=
lements><code>elements</code></dfn> IDL attribute mu=
st return an
+  <code><a href=3D#htmlformcontrolscollection>HTMLFormContro=
lsCollection</a></code> rooted at the <code><a href=3D=
#the-fieldset-element>fieldset</a></code> element, whose f=
ilter
+  matches <a href=3D#category-listed title=3Dcategory-listed>liste=
d elements</a>.</p>
+
+  <p>The <code title=3Ddom-cva-willValidate><a href=3D#do=
m-cva-willvalidate>willValidate</a></code>, <code title=
=3Ddom-cva-validity><a href=3D#dom-cva-validity>validity</a&g=
t;</code>, and <code title=3Ddom-cva-validationMessage><a =
href=3D#dom-cva-validationmessage>validationMessage</a></code=
> attributes, and the <code title=3Ddom-cva-checkValidity><a =
href=3D#dom-cva-checkvalidity>checkValidity()</a></code>, =
<code title=3Ddom-cva-reportValidity><a href=3D#dom-cva-reportva=
lidity>reportValidity()</a></code>, and <code title=3Dd=
om-cva-setCustomValidity><a href=3D#dom-cva-setcustomvalidity>se=
tCustomValidity()</a></code> methods, are part of the
+  <a href=3D#the-constraint-validation-api>constraint validation A=
PI</a>. The <code title=3Ddom-fae-form><a href=3D#dom-fae-=
form>form</a></code> and <code title=3Ddom-fe-name>&=
lt;a href=3D#dom-fe-name>name</a></code> IDL attributes ar=
e part of the element's forms API.</p>
+
+  </div>
+<!--TOPIC:HTML-->
+
+  <div class=3Dexample>
+
+   <p>This example shows a <code><a href=3D#the-fieldset-=
element>fieldset</a></code> element being used to group a =
set of related
+   controls:</p>
+
+   <pre><fieldset>
+ <legend>Display</legend>
+ <p><label><input type=3Dradio name=3D=
c value=3D0 checked> Black on White</label>
+ <p><label><input type=3Dradio name=3D=
c value=3D1> White on Black</label>
+ <p><label><input type=3Dcheckbox nam=
e=3Dg> Use grayscale</label>
+ <p><label>Enhance contrast <input ty=
pe=3Drange name=3De list=3Dcontrast min=3D0 max=3D100 value=3D0 step=3D1&=
amp;gt;</label>
+ <datalist id=3Dcontrast>
+  <option label=3DNormal value=3D0>
+  <option label=3DMaximum value=3D100>
+ </datalist>
+</fieldset></pre>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>The following snippet shows a fieldset with a checkbox in th=
e legend that controls whether or
+   not the fieldset is enabled. The contents of the fieldset consist of =
two required text fields and
+   an optional year/month control.</p>
+
+   <pre><fieldset name=3D"clubfields" disabled&am=
p;gt;
+ <legend> <label>
+  <input type=3Dcheckbox name=3Dclub onchange=3D"form.clubfi=
elds.disabled =3D !checked">
+  Use Club Card
+ </label> </legend>
+ <p><label>Name on card: <input name=3D=
clubname required></label></p>
+ <p><label>Card number: <input name=3D=
clubnum required pattern=3D"[-0-9]+"></label&=
gt;</p>
+ <p><label>Expiry date: <input name=3D=
clubexp type=3Dmonth></label></p>
+</fieldset></pre>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>You can also nest <code><a href=3D#the-fieldset-ele=
ment>fieldset</a></code> elements. Here is an example expa=
nding on the previous
+   one that does so:</p>
+
+   <pre><fieldset name=3D"clubfields" disabled&am=
p;gt;
+ <legend> <label>
+  <input type=3Dcheckbox name=3Dclub onchange=3D"form.clubfi=
elds.disabled =3D !checked">
+  Use Club Card
+ </label> </legend>
+ <p><label>Name on card: <input name=3D=
clubname required></label></p>
+ <fieldset name=3D"numfields">
+  <legend> <label>
+   <input type=3Dradio checked name=3Dclubtype onchange=3D"f=
orm.numfields.disabled =3D !checked">
+   My card has numbers on it
+  </label> </legend>
+  <p><label>Card number: <input name=3D=
clubnum required pattern=3D"[-0-9]+"></label&=
gt;</p>
+ </fieldset>
+ <fieldset name=3D"letfields" disabled>
+  <legend> <label>
+   <input type=3Dradio name=3Dclubtype onchange=3D"form.letf=
ields.disabled =3D !checked">
+   My card has letters on it
+  </label> </legend>
+  <p><label>Card code: <input name=3D=
clublet required pattern=3D"[A-Za-z]+"></label&am=
p;gt;</p>
+ </fieldset>
+</fieldset></pre>
+
+   <p>In this example, if the outer "Use Club Card" chec=
kbox is not checked, everything inside the
+   outer <code><a href=3D#the-fieldset-element>fieldset</=
a></code>, including the two radio buttons in the legends of the=
 two nested
+   <code><a href=3D#the-fieldset-element>fieldset</a>&=
lt;/code>s, will be disabled. However, if the checkbox is checked, the=
n the radio
+   buttons will both be enabled and will let you select which of the two=
 inner
+   <code><a href=3D#the-fieldset-element>fieldset</a>&=
lt;/code>s is to be enabled.</p>
+
+  </div>
+
+
+  <h4 id=3Dthe-legend-element><span class=3Dsecno>4.10.17 &l=
t;/span>The <dfn><code>legend</code></dfn> ele=
ment</h4>
+
+  <dl class=3Delement><dt><a href=3D#element-dfn-categori=
es title=3Delement-dfn-categories>Categories</a>:</dt>
+   <dd>None.</dd>
+   <dt><a href=3D#element-dfn-contexts title=3Delement-dfn-cont=
exts>Contexts in which this element can be used</a>:</dt>
+   <dd>As the first child of a <code><a href=3D#the-field=
set-element>fieldset</a></code> element.</dd>
+   <dt><a href=3D#element-dfn-content-model title=3Delement-dfn=
-content-model>Content model</a>:</dt>
+   <dd><a href=3D#phrasing-content>Phrasing content</a&gt=
;.</dd>
+   <dt><a href=3D#element-dfn-tag-omission title=3Delement-dfn-=
tag-omission>Tag omission in text/html</a>:</dt>
+   <dd>Neither tag is omissible.</dd>
+   <dt><a href=3D#element-dfn-attributes title=3Delement-dfn-at=
tributes>Content attributes</a>:</dt>
+   <dd><a href=3D#global-attributes>Global attributes</a&=
gt;</dd>
+   <dt><a href=3D#element-dfn-dom title=3Delement-dfn-dom>DO=
M interface</a>:</dt><!--TOPIC:DOM APIs-->
+   <dd>
+    <pre class=3Didl>interface <dfn id=3Dhtmllegendelement>H=
TMLLegendElement</dfn> : <a href=3D#htmlelement>HTMLElement&l=
t;/a> {
+  readonly attribute <a href=3D#htmlformelement>HTMLFormElement&lt=
;/a>? <a href=3D#dom-legend-form title=3Ddom-legend-form>form&lt=
;/a>;
+
+  // <a href=3D"#HTMLLegendElement-partial">also has obs=
olete members</a>
+};</pre>
+   </dd>
+  </dl><!--TOPIC:HTML--><p>The <code><a href=3D=
#the-legend-element>legend</a></code> element <a href=3D=
#represents>represents</a> a caption for the rest of the content=
s
+  of the <code><a href=3D#the-legend-element>legend</a&gt=
;</code> element's parent <code><a href=3D#the-fieldset-el=
ement>fieldset</a></code> element<span class=3Dimpl>=
, if
+  any</span>.</p>
+
+<!--TOPIC:DOM APIs-->
+  <dl class=3Ddomintro><dt><var title=3D"">l=
egend</var> . <code title=3Ddom-legend-form><a href=3D#dom=
-legend-form>form</a></code></dt>
+
+   <dd>
+
+    <p>Returns the element's <code><a href=3D#the-form-el=
ement>form</a></code> element, if any, or null otherwise.&=
lt;/p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-legend-form title=3Ddom-legend-form>&=
lt;code>form</code></dfn> IDL attribute's behavior depends=
 on
+  whether the <code><a href=3D#the-legend-element>legend<=
/a></code> element is in a <code><a href=3D#the-fieldse=
t-element>fieldset</a></code> element or not. If the
+  <code><a href=3D#the-legend-element>legend</a></c=
ode> has a <code><a href=3D#the-fieldset-element>fieldset&=
lt;/a></code> element as its parent, then the <code title=3Dd=
om-legend-form><a href=3D#dom-legend-form>form</a></cod=
e> IDL attribute must return the same value as the <code title=3Ddo=
m-fae-form><a href=3D#dom-fae-form>form</a></code> I=
DL attribute on that <code><a href=3D#the-fieldset-element>fi=
eldset</a></code> element. Otherwise,
+  it must return null.</p>
+
+  </div>
+<!--TOPIC:HTML-->
+
+
+
+  <h4 id=3Dform-control-infrastructure><span class=3Dsecno>4=
.10.18 </span>Form control infrastructure</h4>
+
+  <h5 id=3D"a-form-control's-value"><span class=3Dsec=
no>4.10.18.1 </span>A form control's value</h5>
+
+  <p>Form controls have a <dfn id=3Dconcept-fe-value title=3Dco=
ncept-fe-value>value</dfn> and a <dfn id=3Dconcept-fe-checked=
 title=3Dconcept-fe-checked>checkedness</dfn>. (The latter is on=
ly used by <code><a href=3D#the-input-element>input</a>=
</code>
+  elements.) These are used to describe how the user interacts with the =
control.</p>
+
+  <p>To define the behaviour of constraint validation in the face =
of the <code><a href=3D#the-input-element>input</a><=
/code>
+  element's <code title=3Dattr-input-multiple><a href=3D#attr-i=
nput-multiple>multiple</a></code> attribute, <code>&=
lt;a href=3D#the-input-element>input</a></code> elements
+  can also have separately defined <dfn id=3Dconcept-fe-values title=3D=
concept-fe-values>value<em>s</em></dfn>.</p>
+
+
+  <h5 id=3Dmutability><span class=3Dsecno>4.10.18.2 </spa=
n>Mutability</h5>
+
+  <p>A form control can be designated as <dfn id=3Dconcept-fe-m=
utable title=3Dconcept-fe-mutable><i>mutable</i></dfn&g=
t;.</p>
+
+  <p class=3Dnote>This determines (by means of definitions and req=
uirements in this specification
+  that rely on whether an element is so designated) whether or not the u=
ser can modify the <a href=3D#concept-fe-value title=3Dconcept-fe-valu=
e>value</a> or <a href=3D#concept-fe-checked title=3Dconcept-=
fe-checked>checkedness</a> of a
+  form control, or whether or not a control can be automatically prefill=
ed.</p>
+
+
+  <h5 id=3Dassociation-of-controls-and-forms><span class=3Dsecn=
o>4.10.18.3 </span>Association of controls and forms</h5>
+
+  <p>A <a href=3D#form-associated-element>form-associated el=
ement</a> can have a relationship with a <code><a href=3D#=
the-form-element>form</a></code>
+  element, which is called the element's <dfn id=3Dform-owner>form=
 owner</dfn>. If a <a href=3D#form-associated-element>form-as=
sociated
+  element</a> is not associated with a <code><a href=3D#t=
he-form-element>form</a></code> element, its <a href=3D=
#form-owner>form owner</a> is
+  said to be null.</p>
+
+  <p>A <a href=3D#form-associated-element>form-associated el=
ement</a> is, by default, associated with its <span class=3Dimpl=
>nearest</span> ancestor <code><a href=3D#the-form-elem=
ent>form</a></code> element<span class=3Dimpl> (as d=
escribed
+  below)</span>, but, if it is <a href=3D#category-form-attr ti=
tle=3Dcategory-form-attr>reassociateable</a>, may have a
+  <dfn id=3Dattr-fae-form title=3Dattr-fae-form><code>form&l=
t;/code></dfn> attribute specified to override this.</p>
+
+  <p class=3Dnote>This feature allows authors to work around the l=
ack of support for nested
+  <code><a href=3D#the-form-element>form</a></code&=
gt; elements.</p>
+
+  <p>If a <a href=3D#category-form-attr title=3Dcategory-form-a=
ttr>reassociateable</a> <a href=3D#form-associated-element&gt=
;form-associated
+  element</a> has a <code title=3Dattr-fae-form><a href=3D=
#attr-fae-form>form</a></code> attribute specified, then t=
hat
+  attribute's value must be the <a href=3D#concept-id title=3Dconcept=
-id>ID</a> of a <code><a href=3D#the-form-element>fo=
rm</a></code> element in
+  the element's owner <code><a href=3D#document>Document<=
/a></code>.</p>
+
+  <div class=3Dimpl>
+
+  <p class=3Dnote>The rules in this section are complicated by the=
 fact that although conforming
+  documents will never contain nested <code><a href=3D#the-form=
-element>form</a></code> elements, it is quite possible (e=
.g. using a
+  script that performs DOM manipulation) to generate documents that have=
 such nested elements. They
+  are also complicated by rules in the HTML parser that, for historical =
reasons, can result in a
+  <a href=3D#form-associated-element>form-associated element</a=
> being associated with a <code><a href=3D#the-form-element&g=
t;form</a></code> element that is not
+  its ancestor.</p>
+
+  <p>When a <a href=3D#form-associated-element>form-associat=
ed element</a> is created, its <a href=3D#form-owner>form own=
er</a> must be
+  initialized to null (no owner).</p>
+
+  <p>When a <a href=3D#form-associated-element>form-associat=
ed element</a> is to be <dfn id=3Dconcept-form-association title=
=3Dconcept-form-association>associated</dfn> with a form, its &l=
t;a href=3D#form-owner>form owner</a> must be
+  set to that form.</p>
+
+  <p>When a <a href=3D#form-associated-element>form-associat=
ed element</a> or one of its ancestors is <a href=3D#insert-an-e=
lement-into-a-document title=3D"insert an
+  element into a document">inserted into a <code>Document&=
lt;/code></a>, then the user agent must
+  <a href=3D#reset-the-form-owner>reset the form owner</a> o=
f that <a href=3D#form-associated-element>form-associated element&l=
t;/a>. <span class=3Dnote>The <a href=3D#html-parser>HTML =
parser</a> overrides this requirement when inserting form
+  controls.</span></p>
+
+  <p>When an element is <a href=3D#remove-an-element-from-a-doc=
ument title=3D"remove an element from a document">removed fr=
om a
+  <code>Document</code></a> resulting in a <a href=3D=
#form-associated-element>form-associated element</a> and its
+  <a href=3D#form-owner>form owner</a> (if any) no longer be=
ing in the same <a href=3D#home-subtree>home subtree</a>, the=
n the
+  user agent must <a href=3D#reset-the-form-owner>reset the form o=
wner</a> of that <a href=3D#form-associated-element>form-asso=
ciated
+  element</a>.</p>
+
+  <p>When a <a href=3D#category-form-attr title=3Dcategory-form=
-attr>reassociateable</a> <a href=3D#form-associated-element&=
gt;form-associated
+  element</a>'s <code title=3Dattr-fae-form><a href=3D#at=
tr-fae-form>form</a></code> attribute is set, changed, or =
removed,
+  then the user agent must <a href=3D#reset-the-form-owner>reset t=
he form owner</a> of that element.</p>
+
+  <p>When a <a href=3D#category-form-attr title=3Dcategory-form=
-attr>reassociateable</a> <a href=3D#form-associated-element&=
gt;form-associated
+  element</a> has a <code title=3Dattr-fae-form><a href=3D=
#attr-fae-form>form</a></code> attribute and the <a hre=
f=3D#concept-id title=3Dconcept-id>ID</a> of any of the elements=
 in the <code><a href=3D#document>Document</a></code=
> changes, then the
+  user agent must <a href=3D#reset-the-form-owner>reset the form o=
wner</a> of that <a href=3D#form-associated-element>form-asso=
ciated
+  element</a>.</p>
+
+  <p>When a <a href=3D#category-form-attr title=3Dcategory-form=
-attr>reassociateable</a> <a href=3D#form-associated-element&=
gt;form-associated
+  element</a> has a <code title=3Dattr-fae-form><a href=3D=
#attr-fae-form>form</a></code> attribute and an element wi=
th an
+  <a href=3D#concept-id title=3Dconcept-id>ID</a> is <a h=
ref=3D#insert-an-element-into-a-document title=3D"insert an element =
into a document">inserted
+  into</a> or <a href=3D#remove-an-element-from-a-document titl=
e=3D"remove an element from a document">removed from</a&g=
t; the
+  <code><a href=3D#document>Document</a></code>,=
 then the user agent must <a href=3D#reset-the-form-owner>reset the=
 form owner</a> of that
+  <a href=3D#form-associated-element>form-associated element</a=
>.</p>
+
+  <p>When the user agent is to <dfn id=3Dreset-the-form-owner&g=
t;reset the form owner</dfn> of a <a href=3D#form-associated-ele=
ment>form-associated
+  element</a>, it must run the following steps:</p>
+
+  <ol><li><p>If the element's <a href=3D#form-owner=
>form owner</a> is not null, and either the element is not <a=
 href=3D#category-form-attr title=3Dcategory-form-attr>reassociateable=
</a> or its <code title=3Dattr-fae-form><a href=3D#attr-fa=
e-form>form</a></code>
+   content attribute is not present, and the element's <a href=3D#for=
m-owner>form owner</a> is its nearest
+   <code><a href=3D#the-form-element>form</a></code=
> element ancestor after the change to the ancestor chain, then do not=
hing, and
+   abort these steps.</li>
+
+   <li><p>Let the element's <a href=3D#form-owner>form=
 owner</a> be null.</li>
+
+   <li>
+
+    <p>If the element is <a href=3D#category-form-attr title=3D=
category-form-attr>reassociateable</a>, has a <code title=3Da=
ttr-fae-form><a href=3D#attr-fae-form>form</a></code&gt=
; content attribute, and is itself <a href=3D#in-a-document title=3D&q=
uot;in a
+    Document">in a <code>Document</code></a>, =
then run these substeps:</p>
+
+    <ol><!-- note that this ignores the name=3D"" att=
ribute and is unaffected by quirks mode (it's always
+     case sensitive) --><li><p>If the first element <a=
 href=3D#in-a-document title=3D"in a Document">in the <co=
de>Document</code></a> to
+     have an <a href=3D#concept-id title=3Dconcept-id>ID</a>=
 that is <a href=3D#case-sensitive title=3Dcase-sensitive>case-sens=
itively</a> equal to the element's <code title=3Dattr-fae-form&g=
t;<a href=3D#attr-fae-form>form</a></code> content attr=
ibute's value is a <code><a href=3D#the-form-element>form<=
/a></code> element,
+     then <a href=3D#concept-form-association title=3Dconcept-form-as=
sociation>associate</a> the <a href=3D#form-associated-elemen=
t>form-associated
+     element</a> with that <code><a href=3D#the-form-elem=
ent>form</a></code> element.</li>
+
+     <li><p>Abort the "reset the form owner" steps=
.</li>
+
+    </ol></li>
+
+   <li><p>Otherwise, if the <a href=3D#form-associated-el=
ement>form-associated element</a> in question has an ancestor
+   <code><a href=3D#the-form-element>form</a></code=
> element, then <a href=3D#concept-form-association title=3Dconcept=
-form-association>associate</a> the
+   <a href=3D#form-associated-element>form-associated element</=
a> with the nearest such ancestor <code><a href=3D#the-form-e=
lement>form</a></code>
+   element.</li>
+
+   <li><p>Otherwise, the element is left unassociated.</l=
i>
+
+  </ol><div class=3Dexample>
+
+   <p>In the following non-conforming snippet:</p>
+
+   <pre class=3Dbad>...
+ <form id=3D"a">
+  <div id=3D"b"></div>
+ </form>
+ <script>
+  document.getElementById('b').innerHTML =3D
+     '<table><tr><td><f=
orm id=3D"c"><input id=3D"d">&am=
p;lt;/table>' +
+     '<input id=3D"e">';
+ </script>
+...</pre>
+
+   <p>The <a href=3D#form-owner>form owner</a> of &quo=
t;d" would be the inner nested form "c", while the <a h=
ref=3D#form-owner>form
+   owner</a> of "e" would be the outer form "a&quot=
;.</p>
+
+   <p>This happens as follows: First, the "e" node gets =
associated with "c" in the <a href=3D#html-parser>HTML
+   parser</a>. Then, the <code title=3Ddom-innerHTML><a h=
ref=3D#dom-innerhtml>innerHTML</a></code> algorithm moves =
the nodes
+   from the temporary document to the "b" element. At this poi=
nt, the nodes see their ancestor chain
+   change, and thus all the "magic" associations done by the p=
arser are reset to normal ancestor
+   associations.</p>
+
+   <p>This example is a non-conforming document, though, as it is =
a violation of the content models
+   to nest <code><a href=3D#the-form-element>form</a>&=
lt;/code> elements.</p>
+
+  </div>
+
+  </div>
+
+<!--TOPIC:DOM APIs-->
+  <dl class=3Ddomintro><dt><var title=3D"">e=
lement</var> . <code title=3Ddom-fae-form><a href=3D#dom-f=
ae-form>form</a></code></dt>
+
+   <dd>
+
+    <p>Returns the element's <a href=3D#form-owner>form owne=
r</a>.</p>
+
+    <p>Returns null if there isn't one.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p><a href=3D#category-form-attr title=3Dcategory-form-attr&g=
t;Reassociateable</a> <a href=3D#form-associated-element title=3D=
"form-associated
+  element">form-associated elements</a> have a <dfn id=3D=
dom-fae-form title=3Ddom-fae-form><code>form</code></df=
n>
+  IDL attribute, which, on getting, must return the element's <a href=
=3D#form-owner>form owner</a>, or null if
+  there isn't one.</p>
+
+  </div>
+<!--TOPIC:HTML-->
+
+
+
+  <h4 id=3Dattributes-common-to-form-controls><span class=3Dsec=
no>4.10.19 </span><dfn>Attributes common to form controls&=
lt;/dfn></h4>
+
+  <h5 id=3Dnaming-form-controls:-the-name-attribute><span class=
=3Dsecno>4.10.19.1 </span>Naming form controls: the <code tit=
le=3Dattr-fe-name><a href=3D#attr-fe-name>name</a></cod=
e> attribute</h5>
+
+  <p>The <dfn id=3Dattr-fe-name title=3Dattr-fe-name><cod=
e>name</code></dfn> content attribute gives the name of th=
e
+  form control, as used in <a href=3D#form-submission>form submiss=
ion</a> and in the <code><a href=3D#the-form-element>fo=
rm</a></code> element's <code title=3Ddom-form-elements&gt=
;<a href=3D#dom-form-elements>elements</a></code> objec=
t. If the attribute is specified, its value must
+  not be the empty string.</p>
+
+  <p>Any non-empty value for <code title=3Dattr-form-name>&l=
t;a href=3D#attr-form-name>name</a></code> is allowed, but=
 the names
+  "<code title=3Dattr-fe-name-charset><a href=3D#attr-fe-n=
ame-charset>_charset_</a></code>" and "<code =
title=3Dattr-fe-name-isindex><a href=3D#attr-fe-name-isindex>isi=
ndex</a></code>" are special:</p>
+
+  <dl><dt><dfn id=3Dattr-fe-name-isindex title=3Dattr-fe-=
name-isindex><code>isindex</code></dfn></dt>
+   <dd>
+
+    <p>This value, if used as the name of a <a href=3D"#te=
xt-(type=3Dtext)-state-and-search-state-(type=3Dsearch)" title=3Datt=
r-input-type-text>Text</a> control
+    that is the first control in a form that is submitted using the <=
code title=3Dattr-fs-enctype-urlencoded><a href=3D#attr-fs-enctype-=
urlencoded>application/x-www-form-urlencoded</a></code> me=
chanism, causes
+    the submission to only include the value of this control, with no na=
me.</p>
+
+   </dd>
+
+   <dt><dfn id=3Dattr-fe-name-charset title=3Dattr-fe-name-char=
set><code>_charset_</code></dfn></dt>
+   <dd>
+
+    <p>This value, if used as the name of a <a href=3D"#hi=
dden-state-(type=3Dhidden)" title=3Dattr-input-type-hidden>Hidden=
</a>
+    control with no <code title=3Dattr-input-value><a href=3D#a=
ttr-input-value>value</a></code> attribute, is automatical=
ly given a
+    value during submission consisting of the submission character encod=
ing.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-fe-name title=3Ddom-fe-name><code&=
gt;name</code></dfn> IDL attribute must <a href=3D#reflect=
>reflect</a>
+  the <code title=3Dattr-fe-name><a href=3D#attr-fe-name>nam=
e</a></code> content attribute.</p>
+
+  </div>
+
+
+  <h5 id=3Dsubmitting-element-directionality:-the-dirname-attribute&g=
t;<span class=3Dsecno>4.10.19.2 </span>Submitting element dir=
ectionality: the <code title=3Dattr-fe-dirname><a href=3D#attr-f=
e-dirname>dirname</a></code> attribute</h5>
+
+  <p>The <dfn id=3Dattr-fe-dirname title=3Dattr-fe-dirname>&=
lt;code>dirname</code></dfn> attribute on a form control e=
lement
+  enables the submission of <a href=3D#the-directionality>the dire=
ctionality</a> of the element, and gives the name of
+  the field that contains this value during <a href=3D#form-submissio=
n>form submission</a>. If such an attribute is
+  specified, its value must not be the empty string.</p>
+
+  <div class=3Dexample>
+
+   <p>In this example, a form contains a text field and a submissi=
on button:</p>
+
+   <pre><form action=3D"addcomment.cgi" method=3D=
post>
+ <p><label>Comment: <input type=3Dtex=
t name=3D"comment" dirname=3D"comment.dir" required&a=
mp;gt;</label></p>
+ <p><button name=3D"mode" type=3Dsubmit v=
alue=3D"add">Post Comment</button><=
/p>
+</form></pre>
+
+   <p>When the user submits the form, the user agent includes thre=
e fields, one called "comment",
+   one called "comment.dir", and one called "mode"; =
so if the user types "Hello", the submission
+   body might be something like:</p>
+
+   <pre>comment=3DHello&<strong>comment.dir=3Dltr&lt=
;/strong>&mode=3Dadd</pre>
+
+   <p>If the user manually switches to a right-to-left writing dir=
ection and enters "<span dir=3Drtl lang=3Dar title=3D""=
>مرحبا</span>&=
quot;, the submission body might be
+   something like:</p>
+
+   <pre>comment=3D%D9%85%D8%B1%D8%AD%D8%A8%D8%A7&<stron=
g>comment.dir=3Drtl</strong>&mode=3Dadd</pre>
+
+  </div>
+
+
+  <h5 id=3Dlimiting-user-input-length:-the-maxlength-attribute>&lt=
;span class=3Dsecno>4.10.19.3 </span>Limiting user input length:=
 the <code title=3Dattr-fe-maxlength><a href=3D#attr-fe-maxlengt=
h>maxlength</a></code> attribute</h5>
+
+  <p>A <dfn id=3Dattr-fe-maxlength title=3Dattr-fe-maxlength&gt=
;form control <code title=3D"">maxlength</code> att=
ribute</dfn>,
+  controlled by a <var title=3D"">dirty value flag</v=
ar>, declares a limit on the number of characters
+  a user can input.</p>
+
+  <p>If an element has its <a href=3D#attr-fe-maxlength title=3D=
attr-fe-maxlength>form control <code title=3D"">maxlen=
gth</code> attribute</a> specified, the attribute's value mus=
t be a <a href=3D#valid-non-negative-integer>valid
+  non-negative integer</a>. If the attribute is specified and appl=
ying the <a href=3D#rules-for-parsing-non-negative-integers>rules f=
or
+  parsing non-negative integers</a> to its value results in a numb=
er, then that number is the
+  element's <dfn id=3Dmaximum-allowed-value-length>maximum allowed=
 value length</dfn>. If the attribute is omitted or parsing its
+  value results in an error, then there is no <a href=3D#maximum-allo=
wed-value-length>maximum allowed value length</a>.</p>
+
+  <div class=3Dimpl>
+
+  <p><strong>Constraint validation</strong>: If an ele=
ment has a <a href=3D#maximum-allowed-value-length>maximum allowed =
value
+  length</a>, its <var title=3D"">dirty value flag=
</var> is true, its <a href=3D#concept-fe-value title=3Dconcept-=
fe-value>value</a> was last changed by a user edit (as opposed t=
o a change made
+  by a script), and the <a href=3D#code-unit-length>code-unit leng=
th</a> of the element's <a href=3D#concept-fe-value title=3Dconc=
ept-fe-value>value</a> is greater than the element's <a href=3D=
#maximum-allowed-value-length>maximum allowed value
+  length</a>, then the element is <a href=3D#suffering-from-bei=
ng-too-long>suffering from being too long</a>.</p>
+
+  <p>User agents may prevent the user from causing the element's &=
lt;a href=3D#concept-fe-value title=3Dconcept-fe-value>value</a>=
 to be set to a value whose <a href=3D#code-unit-length>code-unit l=
ength</a> is
+  greater than the element's <a href=3D#maximum-allowed-value-length&=
gt;maximum allowed value length</a>.</p>
+
+  </div>
+
+
+  <h5 id=3Dsetting-minimum-input-length-requirements:-the-minlength-a=
ttribute><span class=3Dsecno>4.10.19.4 </span>Setting mini=
mum input length requirements: the <code title=3Dattr-fe-minlength>=
<a href=3D#attr-fe-minlength>minlength</a></code> attri=
bute</h5>
+
+  <p>A <dfn id=3Dattr-fe-minlength title=3Dattr-fe-minlength&gt=
;form control <code title=3D"">minlength</code> att=
ribute</dfn>,
+  controlled by a <var title=3D"">dirty value flag</v=
ar>, declares a lower bound on the number of
+  characters a user can input.</p>
+
+  <p class=3Dnote>The <code title=3Dattr-fe-minlength><a =
href=3D#attr-fe-minlength>minlength</a></code> attribute d=
oes not imply the
+  <code title=3D"">required</code> attribute. If t=
he form control has no <code title=3Dattr-fe-minlength><a href=3D=
#attr-fe-minlength>minlength</a></code> attribute, then th=
e value can still be omitted; the
+  <code title=3Dattr-fe-minlength><a href=3D#attr-fe-minlength&=
gt;minlength</a></code> attribute only kicks in once the user=
 has entered
+  a value at all. If the empty string is not allowed, then the <code =
title=3D"">required</code>
+  attribute also needs to be set.</p>
+
+  <p>If an element has its <a href=3D#attr-fe-minlength title=3D=
attr-fe-minlength>form control <code title=3D"">minlen=
gth</code> attribute</a> specified, the attribute's value mus=
t be a <a href=3D#valid-non-negative-integer>valid
+  non-negative integer</a>. If the attribute is specified and appl=
ying the <a href=3D#rules-for-parsing-non-negative-integers>rules f=
or
+  parsing non-negative integers</a> to its value results in a numb=
er, then that number is the
+  element's <dfn id=3Dminimum-allowed-value-length>minimum allowed=
 value length</dfn>. If the attribute is omitted or parsing its
+  value results in an error, then there is no <a href=3D#minimum-allo=
wed-value-length>minimum allowed value length</a>.</p>
+
+  <p>If an element has both a <a href=3D#maximum-allowed-value-=
length>maximum allowed value length</a> and a <a href=3D#mini=
mum-allowed-value-length>minimum allowed
+  value length</a>, the <a href=3D#minimum-allowed-value-length=
>minimum allowed value length</a> must be smaller than or equal
+  to the <a href=3D#maximum-allowed-value-length>maximum allowed v=
alue length</a>.</p>
+
+  <div class=3Dimpl>
+
+  <p><strong>Constraint validation</strong>: If an ele=
ment has a <a href=3D#minimum-allowed-value-length>minimum allowed =
value
+  length</a>, its <a href=3D#concept-fe-value title=3Dconcept-f=
e-value>value</a> is not the empty string, and the
+  <a href=3D#code-unit-length>code-unit length</a> of the el=
ement's <a href=3D#concept-fe-value title=3Dconcept-fe-value>value&=
lt;/a> is less
+  than the element's <a href=3D#minimum-allowed-value-length>minim=
um allowed value length</a>, then the element is <a href=3D#suff=
ering-from-being-too-short>suffering
+  from being too short</a>.</p>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>In this example, there are four text fields. The first is re=
quired, and has to be at least 5
+   characters long. The other three are optional, but if the user fills =
one in, the user has to
+   enter at least 10 characters.</p>
+
+   <pre><form action=3D"/events/menu.cgi" method=3D=
"post">
+ <p><label>Name of Event: <input requ=
ired minlength=3D5 maxlength=3D50 name=3Devent></label&=
gt;</p>
+ <p><label>Describe what you would like for =
breakfast, if anything:
+    <textarea name=3D"breakfast" minlength=3D"10&q=
uot;></textarea></label></p&amp=
;gt;
+ <p><label>Describe what you would like for =
lunch, if anything:
+    <textarea name=3D"lunch" minlength=3D"10"=
></textarea></label></p>
+ <p><label>Describe what you would like for =
dinner, if anything:
+    <textarea name=3D"dinner" minlength=3D"10&quot=
;></textarea></label></p&gt=
;
+ <p><input type=3Dsubmit value=3D"Submit Reque=
st"></p>
+</form></pre>
+
+
+  </div>
+
+
+  <h5 id=3Denabling-and-disabling-form-controls:-the-disabled-attribu=
te><span class=3Dsecno>4.10.19.5 </span>Enabling and disab=
ling form controls: the <code title=3Dattr-fe-disabled><a href=3D=
#attr-fe-disabled>disabled</a></code> attribute</h5>
+
+  <p>The <dfn id=3Dattr-fe-disabled title=3Dattr-fe-disabled&gt=
;<code>disabled</code></dfn> content attribute is a
+  <a href=3D#boolean-attribute>boolean attribute</a>.</p&=
gt;
+
+  <p>A form control is <dfn id=3Dconcept-fe-disabled title=3Dco=
ncept-fe-disabled>disabled</dfn> if its <code title=3Dattr-fe=
-disabled><a href=3D#attr-fe-disabled>disabled</a></cod=
e> attribute is set, or if it is a descendant of a
+  <code><a href=3D#the-fieldset-element>fieldset</a>&l=
t;/code> element whose <code title=3Dattr-fieldset-disabled><=
a href=3D#attr-fieldset-disabled>disabled</a></code> attri=
bute
+  is set and is <em>not</em> a descendant of that <code&g=
t;<a href=3D#the-fieldset-element>fieldset</a></code> e=
lement's first
+  <code><a href=3D#the-legend-element>legend</a></c=
ode> element child, if any.</p>
+
+  <div class=3Dimpl>
+
+  <p>A form control that is <a href=3D#concept-fe-disabled titl=
e=3Dconcept-fe-disabled>disabled</a> must prevent any <code t=
itle=3Devent-click><a href=3D#event-click>click</a></co=
de> events that are <a href=3D#queue-a-task title=3D"queue a t=
ask">queued</a> on the
+  <a href=3D#user-interaction-task-source>user interaction task so=
urce</a> from being dispatched on the element.</p>
+
+  <p><strong>Constraint validation</strong>: If an ele=
ment is <a href=3D#concept-fe-disabled title=3Dconcept-fe-disabled>=
disabled</a>, it is <a href=3D#barred-from-constraint-validation=
>barred from constraint
+  validation</a>.</p>
+
+  <p>The <dfn id=3Ddom-fe-disabled title=3Ddom-fe-disabled>&=
lt;code>disabled</code></dfn> IDL attribute must
+  <a href=3D#reflect>reflect</a> the <code title=3Dattr-f=
e-disabled><a href=3D#attr-fe-disabled>disabled</a></co=
de> content attribute.</p>
+
+  </div>
+
+
+  <h5 id=3Dform-submission-0><span class=3Dsecno>4.10.19.6 &=
lt;/span>Form submission</h5>
+
+  <p><dfn id=3Dattributes-for-form-submission>Attributes for=
 form submission</dfn> can be specified both on <code><a h=
ref=3D#the-form-element>form</a></code> elements
+  and on <a href=3D#concept-submit-button title=3Dconcept-submit-butt=
on>submit buttons</a> (elements that represent buttons
+  that submit forms, e.g. an <code><a href=3D#the-input-element=
>input</a></code> element whose <code title=3Dattr-inpu=
t-type><a href=3D#attr-input-type>type</a></code> at=
tribute is in the <a href=3D"#submit-button-state-(type=3Dsubmit)=
" title=3Dattr-input-type-submit>Submit Button</a> state).
+
+  <p>The <a href=3D#attributes-for-form-submission>attribute=
s for form submission</a> that may be specified on <code><=
a href=3D#the-form-element>form</a></code>
+  elements are <code title=3Dattr-fs-action><a href=3D#attr-fs-=
action>action</a></code>, <code title=3Dattr-fs-enctype=
><a href=3D#attr-fs-enctype>enctype</a></code>, <=
code title=3Dattr-fs-method><a href=3D#attr-fs-method>method<=
/a></code>, <code title=3Dattr-fs-novalidate><a href=3D=
#attr-fs-novalidate>novalidate</a></code>, and <code ti=
tle=3Dattr-fs-target><a href=3D#attr-fs-target>target</a>&=
lt;/code>.</p>
+
+  <p>The corresponding <a href=3D#attributes-for-form-submissio=
n>attributes for form submission</a> that may be specified on &l=
t;a href=3D#concept-submit-button title=3Dconcept-submit-button>submit=
 buttons</a> are <code title=3Dattr-fs-formaction><a href=3D=
#attr-fs-formaction>formaction</a></code>, <code title=3D=
attr-fs-formenctype><a href=3D#attr-fs-formenctype>formenctype&l=
t;/a></code>, <code title=3Dattr-fs-formmethod><a href=3D=
#attr-fs-formmethod>formmethod</a></code>, <code title=3D=
attr-fs-formnovalidate><a href=3D#attr-fs-formnovalidate>formnov=
alidate</a></code>, and <code title=3Dattr-fs-formtarget&g=
t;<a href=3D#attr-fs-formtarget>formtarget</a></code>. =
When omitted, they default to the values given on
+  the corresponding attributes on the <code><a href=3D#the-form=
-element>form</a></code> element.</p>
+
+  <hr><p>The <dfn id=3Dattr-fs-action title=3Dattr-fs-act=
ion><code>action</code></dfn> and <dfn id=3Dattr-=
fs-formaction title=3Dattr-fs-formaction><code>formaction</co=
de></dfn> content attributes, if specified, must
+  have a value that is a <a href=3D#valid-non-empty-url-potentially-s=
urrounded-by-spaces>valid non-empty URL potentially surrounded by spac=
es</a>.</p>
+
+  <p>The <dfn id=3Dconcept-fs-action title=3Dconcept-fs-action&=
gt;action</dfn> of an element is the value of the element's
+  <code title=3Dattr-fs-formaction><a href=3D#attr-fs-formactio=
n>formaction</a></code> attribute, if the element is a &lt=
;a href=3D#concept-submit-button title=3Dconcept-submit-button>submit =
button</a> and has such an attribute, or the value of its
+  <a href=3D#form-owner>form owner</a>'s <code title=3Dat=
tr-fs-action><a href=3D#attr-fs-action>action</a></code=
> attribute, if <em>it</em> has
+  one, or else the empty string.</p>
+
+  <hr><p>The <dfn id=3Dattr-fs-method title=3Dattr-fs-met=
hod><code>method</code></dfn> and <dfn id=3Dattr-=
fs-formmethod title=3Dattr-fs-formmethod><code>formmethod</co=
de></dfn> content attributes are <a href=3D#enumerated-attrib=
ute title=3D"enumerated attribute">enumerated attributes<=
/a> with the following keywords and
+  states:</p>
+
+  <ul><li>The keyword <dfn id=3Dattr-fs-method-get-keywor=
d title=3Dattr-fs-method-GET-keyword><code>get</code></=
dfn>, mapping to the
+   state <dfn id=3Dattr-fs-method-get title=3Dattr-fs-method-GET>G=
ET</dfn>, indicating the HTTP GET method.</li>
+
+   <li>The keyword <dfn id=3Dattr-fs-method-post-keyword title=3D=
attr-fs-method-POST-keyword><code>post</code></dfn>,=
 mapping to the
+   state <dfn id=3Dattr-fs-method-post title=3Dattr-fs-method-POST&gt=
;POST</dfn>, indicating the HTTP POST method.</li>
+
+   <li>The keyword <dfn id=3Dattr-fs-method-dialog-keyword titl=
e=3Dattr-fs-method-dialog-keyword><code>dialog</code></=
dfn>, mapping to
+   the state <dfn id=3Dattr-fs-method-dialog title=3Dattr-fs-method-d=
ialog>dialog</dfn>, indicating that submitting the
+   <code><a href=3D#the-form-element>form</a></code=
> is intended to close the <code><a href=3D#the-dialog-elemen=
t>dialog</a></code> box in which the form finds
+   itself, if any, and otherwise not submit.</li>
+
+  </ul><p>The <i>invalid value default</i> for t=
hese attributes is the <a href=3D#attr-fs-method-get title=3Dattr-fs-m=
ethod-GET>GET</a> state. The <i>missing value default</=
i> for the <code title=3Dattr-fs-method><a href=3D#attr-fs-me=
thod>method</a></code> attribute is also the <a href=3D=
#attr-fs-method-get title=3Dattr-fs-method-GET>GET</a> state. (T=
here is no <i>missing value default</i> for the
+  <code title=3Dattr-fs-formmethod><a href=3D#attr-fs-formmetho=
d>formmethod</a></code> attribute.)</p>
+
+  <p>The <dfn id=3Dconcept-fs-method title=3Dconcept-fs-method&=
gt;method</dfn> of an element is one of those states. If the
+  element is a <a href=3D#concept-submit-button title=3Dconcept-submi=
t-button>submit button</a> and has a <code title=3Dattr-fs-fo=
rmmethod><a href=3D#attr-fs-formmethod>formmethod</a></=
code> attribute, then the element's <a href=3D#concept-fs-method ti=
tle=3Dconcept-fs-method>method</a> is that attribute's state; ot=
herwise, it is the <a href=3D#form-owner>form
+  owner</a>'s <code title=3Dattr-fs-method><a href=3D#att=
r-fs-method>method</a></code> attribute's state.</p>
+
+  <hr><p>The <dfn id=3Dattr-fs-enctype title=3Dattr-fs-en=
ctype><code>enctype</code></dfn> and <dfn id=3Dat=
tr-fs-formenctype title=3Dattr-fs-formenctype><code>formenctype&=
lt;/code></dfn> content attributes are <a href=3D#enumerated-=
attribute title=3D"enumerated attribute">enumerated attribut=
es</a> with the following keywords and
+  states:</p>
+
+  <ul><li>The "<dfn id=3Dattr-fs-enctype-urlencoded =
title=3Dattr-fs-enctype-urlencoded><code>application/x-www-form-=
urlencoded</code></dfn>" keyword and corresponding state=
.</li>
+   <li>The "<dfn id=3Dattr-fs-enctype-formdata title=3Datt=
r-fs-enctype-formdata><code>multipart/form-data</code><=
/dfn>" keyword and corresponding state.</li>
+   <li>The "<dfn id=3Dattr-fs-enctype-text title=3Dattr-fs=
-enctype-text><code>text/plain</code></dfn>" ke=
yword and corresponding state.</li>
+  </ul><p>The <i>invalid value default</i> for t=
hese attributes is the <code title=3Dattr-fs-enctype-urlencoded>&lt=
;a href=3D#attr-fs-enctype-urlencoded>application/x-www-form-urlencode=
d</a></code> state. The <i>missing
+  value default</i> for the <code title=3Dattr-fs-enctype>&l=
t;a href=3D#attr-fs-enctype>enctype</a></code> attribute i=
s also the <code title=3Dattr-fs-enctype-urlencoded><a href=3D#a=
ttr-fs-enctype-urlencoded>application/x-www-form-urlencoded</a>&=
lt;/code> state. (There is no
+  <i>missing value default</i> for the <code title=3Dattr=
-fs-formenctype><a href=3D#attr-fs-formenctype>formenctype</a=
></code>
+  attribute.)</p>
+
+  <p>The <dfn id=3Dconcept-fs-enctype title=3Dconcept-fs-enctyp=
e>enctype</dfn> of an element is one of those three states.
+  If the element is a <a href=3D#concept-submit-button title=3Dconcep=
t-submit-button>submit button</a> and has a <code title=3Datt=
r-fs-formenctype><a href=3D#attr-fs-formenctype>formenctype</=
a></code> attribute, then the element's <a href=3D#concept-fs=
-enctype title=3Dconcept-fs-enctype>enctype</a> is that attribut=
e's state; otherwise, it is the
+  <a href=3D#form-owner>form owner</a>'s <code title=3Dat=
tr-fs-enctype><a href=3D#attr-fs-enctype>enctype</a></c=
ode> attribute's state.</p>
+
+  <hr><p>The <dfn id=3Dattr-fs-target title=3Dattr-fs-tar=
get><code>target</code></dfn> and <dfn id=3Dattr-=
fs-formtarget title=3Dattr-fs-formtarget><code>formtarget</co=
de></dfn> content attributes, if specified, must
+  have values that are <a href=3D#valid-browsing-context-name-or-keyw=
ord title=3D"valid browsing context name or keyword">valid b=
rowsing context
+  names or keywords</a>.</p>
+
+  <p>The <dfn id=3Dconcept-fs-target title=3Dconcept-fs-target&=
gt;target</dfn> of an element is the value of the element's
+  <code title=3Dattr-fs-formtarget><a href=3D#attr-fs-formtarge=
t>formtarget</a></code> attribute, if the element is a &lt=
;a href=3D#concept-submit-button title=3Dconcept-submit-button>submit =
button</a> and has such an attribute; or the value of its
+  <a href=3D#form-owner>form owner</a>'s <code title=3Dat=
tr-fs-target><a href=3D#attr-fs-target>target</a></code=
> attribute, if <em>it</em> has
+  such an attribute; or, if the <code><a href=3D#document>Do=
cument</a></code> contains a <code><a href=3D#the-ba=
se-element>base</a></code> element with a
+  <code title=3Dattr-base-target><a href=3D#attr-base-target&gt=
;target</a></code> attribute, then the value of the <code =
title=3Dattr-base-target><a href=3D#attr-base-target>target</=
a></code> attribute of the first such <code><a href=3D#=
the-base-element>base</a></code> element; or,
+  if there is no such element, the empty string.</p> <!-- c.f. =
hyperlink following -->
+
+  <hr><p>The <dfn id=3Dattr-fs-novalidate title=3Dattr-fs=
-novalidate><code>novalidate</code></dfn> and <df=
n id=3Dattr-fs-formnovalidate title=3Dattr-fs-formnovalidate><code&=
gt;formnovalidate</code></dfn> content attributes are <a h=
ref=3D#boolean-attribute title=3D"boolean attribute">boolean=
 attributes</a>. If present, they indicate that the form is
+  not to be validated during submission.</p>
+
+  <p>The <dfn id=3Dconcept-fs-novalidate title=3Dconcept-fs-nov=
alidate>no-validate state</dfn> of an element is true if the
+  element is a <a href=3D#concept-submit-button title=3Dconcept-submi=
t-button>submit button</a> and the element's <code title=3Dat=
tr-fs-formnovalidate><a href=3D#attr-fs-formnovalidate>formnoval=
idate</a></code> attribute is present, or if the element's
+  <a href=3D#form-owner>form owner</a>'s <code title=3Dat=
tr-fs-novalidate><a href=3D#attr-fs-novalidate>novalidate</a&=
gt;</code> attribute is present,
+  and false otherwise.</p>
+
+  <div class=3Dexample>
+
+   <p>This attribute is useful to include "save" buttons=
 on forms that have validation constraints,
+   to allow users to save their progress even though they haven't fully =
entered the data in the
+   form. The following example shows a simple form that has two required=
 fields. There are three
+   buttons: one to submit the form, which requires both fields to be fil=
led in; one to save the form
+   so that the user can come back and fill it in later; and one to cance=
l the form altogether.</p>
+
+   <pre><form action=3D"editor.cgi" method=3D&quo=
t;post">
+ <p><label>Name: <input required name=
=3Dfn></label></p>
+ <p><label>Essay: <textarea required =
name=3Dessay></textarea></label>&l=
t;/p>
+ <p><input type=3Dsubmit name=3Dsubmit value=3D&quo=
t;Submit essay"></p>
+ <p><input type=3Dsubmit formnovalidate name=3Dsave=
 value=3D"Save essay"></p>
+ <p><input type=3Dsubmit formnovalidate name=3Dcanc=
el value=3D"Cancel"></p>
+</form></pre>
+
+  </div>
+
+  <div class=3Dimpl>
+
+  <hr><p>The <dfn id=3Ddom-fs-action title=3Ddom-fs-actio=
n><code>action</code></dfn> IDL attribute must
+  <a href=3D#reflect>reflect</a> the content attribute of th=
e same name, except that on getting, when the
+  content attribute is missing or its value is the empty string, <a h=
ref=3D"#the-document's-address">the document's address</a=
>
+  must be returned instead. The <dfn id=3Ddom-fs-target title=3Ddom-f=
s-target><code>target</code></dfn> IDL attribute
+  must <a href=3D#reflect>reflect</a> the content attribute =
of the same name. The <dfn id=3Ddom-fs-method title=3Ddom-fs-method&gt=
;<code>method</code></dfn> and <dfn id=3Ddom-fs-enct=
ype title=3Ddom-fs-enctype><code>enctype</code></dfn&gt=
; IDL attributes must <a href=3D#reflect>reflect</a> the
+  respective content attributes of the same name, <a href=3D#limited-=
to-only-known-values>limited to only known values</a>. The
+  <dfn id=3Ddom-fs-encoding title=3Ddom-fs-encoding><code>en=
coding</code></dfn> IDL attribute must <a href=3D#reflect&=
gt;reflect</a>
+  the <code title=3Dattr-fs-enctype><a href=3D#attr-fs-enctype&=
gt;enctype</a></code> content attribute, <a href=3D#limite=
d-to-only-known-values>limited to only known
+  values</a>. The <dfn id=3Ddom-fs-novalidate title=3Ddom-fs-no=
Validate><code>noValidate</code></dfn> IDL attribute=
 must
+  <a href=3D#reflect>reflect</a> the <code title=3Dattr-f=
s-novalidate><a href=3D#attr-fs-novalidate>novalidate</a>&=
lt;/code> content attribute. The
+  <dfn id=3Ddom-fs-formaction title=3Ddom-fs-formAction><code&g=
t;formAction</code></dfn> IDL attribute must
+  <a href=3D#reflect>reflect</a> the <code title=3Dattr-f=
s-formaction><a href=3D#attr-fs-formaction>formaction</a>&=
lt;/code> content attribute,
+  except that on getting, when the content attribute is missing or its v=
alue is the empty string,
+  <a href=3D"#the-document's-address">the document's add=
ress</a> must be returned instead. The <dfn id=3Ddom-fs-formenct=
ype title=3Ddom-fs-formEnctype><code>formEnctype</code>&lt=
;/dfn> IDL attribute must <a href=3D#reflect>reflect</a>
+  the <code title=3Dattr-fs-formenctype><a href=3D#attr-fs-form=
enctype>formenctype</a></code> content attribute, <a hr=
ef=3D#limited-to-only-known-values>limited to only
+  known values</a>. The <dfn id=3Ddom-fs-formmethod title=3Ddom=
-fs-formMethod><code>formMethod</code></dfn> IDL
+  attribute must <a href=3D#reflect>reflect</a> the <code=
 title=3Dattr-fs-formmethod><a href=3D#attr-fs-formmethod>formme=
thod</a></code> content
+  attribute, <a href=3D#limited-to-only-known-values>limited to on=
ly known values</a>. The <dfn id=3Ddom-fs-formnovalidate title=3D=
dom-fs-formNoValidate><code>formNoValidate</code></dfn&=
gt; IDL attribute must
+  <a href=3D#reflect>reflect</a> the <code title=3Dattr-f=
s-formnovalidate><a href=3D#attr-fs-formnovalidate>formnovalidat=
e</a></code> content
+  attribute. The <dfn id=3Ddom-fs-formtarget title=3Ddom-fs-formTarge=
t><code>formTarget</code></dfn> IDL attribute must
+  <a href=3D#reflect>reflect</a> the <code title=3Dattr-f=
s-formtarget><a href=3D#attr-fs-formtarget>formtarget</a>&=
lt;/code> content attribute.
+
+  </div>
+
+
+  <h5 id=3Dautofocusing-a-form-control:-the-autofocus-attribute>&l=
t;span class=3Dsecno>4.10.19.7 </span>Autofocusing a form contro=
l: the <code title=3Dattr-fe-autofocus><a href=3D#attr-fe-autofo=
cus>autofocus</a></code> attribute</h5>
+
+  <!-- v2: Apply this to contentEditable elements -->
+
+  <p>The <dfn id=3Dattr-fe-autofocus title=3Dattr-fe-autofocus&=
gt;<code>autofocus</code></dfn> content attribute allow=
s the
+  author to indicate that a control is to be focused as soon as the page=
 is loaded or as soon as the
+  <code><a href=3D#the-dialog-element>dialog</a></c=
ode> within which it finds itself is shown, allowing the user to just =
start typing
+  without having to manually focus the main control.</p>
+
+  <p>The <code title=3Dattr-fe-autofocus><a href=3D#attr-=
fe-autofocus>autofocus</a></code> attribute is a <a hre=
f=3D#boolean-attribute>boolean
+  attribute</a>.</p>
+
+  <p>An element's <dfn id=3Dnearest-ancestor-autofocus-scoping-=
root-element>nearest ancestor autofocus scoping root element</dfn&g=
t; is the element itself
+  if the element is a <code><a href=3D#the-dialog-element>di=
alog</a></code> element, or else is the element's nearest anc=
estor
+  <code><a href=3D#the-dialog-element>dialog</a></c=
ode> element, if any, or else is the element's <a href=3D#root-elem=
ent>root element</a>.</p>
+
+  <p>There must not be two elements with the same <a href=3D#ne=
arest-ancestor-autofocus-scoping-root-element>nearest ancestor autofoc=
us scoping root
+  element</a> that both have the <code title=3Dattr-fe-autofocu=
s><a href=3D#attr-fe-autofocus>autofocus</a></code> =
attribute
+  specified.</p>
+
+  <div class=3Dimpl>
+
+  <p>When an element with the <code title=3Dattr-fe-autofocus&g=
t;<a href=3D#attr-fe-autofocus>autofocus</a></code> att=
ribute specified
+  is <a href=3D#insert-an-element-into-a-document title=3D"inser=
t an element into a document">inserted into a document</a>,=
 user agents
+  should run the following steps:</p>
+
+  <ol><li><p>Let <var title=3D"">targe=
t</var> be the element's <code><a href=3D#document>Docu=
ment</a></code>.</li>
+
+   <li><p>If <var title=3D"">target</var&=
gt; has no <a href=3D#browsing-context>browsing context</a>, =
abort these
+   steps.</li>
+
+   <li><p>If <var title=3D"">target</var&=
gt;'s <a href=3D#browsing-context>browsing context</a> has no=
 <a href=3D#top-level-browsing-context>top-level
+   browsing context</a> (e.g. it is a <a href=3D#nested-browsin=
g-context>nested browsing context</a> with no <a href=3D#pare=
nt-browsing-context>parent
+   browsing context</a>), abort these steps.</li>
+
+   <li><p>If <var title=3D"">target</var&=
gt;'s <a href=3D#active-sandboxing-flag-set>active sandboxing flag =
set</a> has the
+   <a href=3D#sandboxed-automatic-features-browsing-context-flag>s=
andboxed automatic features browsing context flag</a>, abort these =
steps.</li>
+
+   <li><p>If <var title=3D"">target</var&=
gt;'s <a href=3D#origin>origin</a> is not the <a href=3D#s=
ame-origin title=3D"same
+   origin">same</a> as the <a href=3D#origin>origin&=
lt;/a> of the <code><a href=3D#document>Document</a>=
</code> of the currently
+   focused element in <var title=3D"">target</var>=
's <a href=3D#top-level-browsing-context>top-level browsing context=
</a>, abort
+   these steps.</li>
+
+   <li><p>If <var title=3D"">target</var&=
gt;'s <a href=3D#origin>origin</a> is not the <a href=3D#s=
ame-origin title=3D"same
+   origin">same</a> as the <a href=3D#origin>origin&=
lt;/a> of the <a href=3D#active-document>active document</a&g=
t; of <var title=3D"">target</var>'s <a href=3D#=
top-level-browsing-context>top-level browsing context</a>, abort=
 these steps.</li>
+
+   <li><p>If the user agent has already reached the last ste=
p of this list of steps in response to
+   an element being <a href=3D#insert-an-element-into-a-document titl=
e=3D"insert an element into a document">inserted</a> i=
nto a
+   <code><a href=3D#document>Document</a></code>=
 whose <a href=3D#top-level-browsing-context>top-level browsing con=
text</a>'s <a href=3D#active-document>active
+   document</a> is the same as <var title=3D"">tar=
get</var>'s <a href=3D#top-level-browsing-context>top-level b=
rowsing
+   context</a>'s <a href=3D#active-document>active document&=
lt;/a>, abort these steps.</li>
+
+   <li><p>If the user has indicated (for example, by startin=
g to type in a form control) that he
+   does not wish focus to be changed, then optionally abort these steps.=
</li>
+
+   <li><p><a href=3D#queue-a-task>Queue a task</a&g=
t; that checks to see if the element is <a href=3D#focusable>focusa=
ble</a>, and
+   if so, runs the <a href=3D#focusing-steps>focusing steps</a&=
gt; for that element. User agents may also change the
+   scrolling position of the document, or perform some other action that=
 brings the element to the
+   user's attention. The <a href=3D#task-source>task source</a&=
gt; for this task is the <a href=3D#user-interaction-task-source>us=
er interaction task
+   source</a>.</li>
+
+  </ol><p class=3Dnote>This handles the automatic focusing d=
uring document load. The <code title=3Ddom-dialog-showModal><a h=
ref=3D#dom-dialog-showmodal>showModal()</a></code> method =
of <code><a href=3D#the-dialog-element>dialog</a></c=
ode> elements also
+  processes the <code title=3Dattr-fe-autofocus><a href=3D#attr=
-fe-autofocus>autofocus</a></code> attribute.</p>
+
+  <p class=3Dnote>Focusing the control does not imply that the use=
r agent must focus the browser
+  window if it has lost focus.</p>
+
+  <p>The <dfn id=3Ddom-fe-autofocus title=3Ddom-fe-autofocus&gt=
;<code>autofocus</code></dfn> IDL attribute must
+  <a href=3D#reflect>reflect</a> the content attribute of th=
e same name.</p>
+
+  </div>
+
+  <div class=3Dexample>
+   <p>In the following snippet, the text control would be focused =
when
+   the document was loaded.</p>
+   <pre><input maxlength=3D"256" name=3D"q&q=
uot; value=3D"" autofocus>
+<input type=3D"submit" value=3D"Search"&g=
t;</pre>
+  </div>
+
+
+  <h5 id=3Dinput-modalities:-the-inputmode-attribute><span clas=
s=3Dsecno>4.10.19.8 </span>Input modalities: the <code title=3D=
attr-fe-inputmode><a href=3D#attr-fe-inputmode>inputmode</a&g=
t;</code> attribute</h5>
+
+  <!-- v2: Apply this to contentEditable elements -->
+
+  <p>The <dfn id=3Dattr-fe-inputmode title=3Dattr-fe-inputmode&=
gt;<code>inputmode</code></dfn> content attribute is an
+  <a href=3D#enumerated-attribute>enumerated attribute</a> t=
hat specifies what kind of input mechanism would be most
+  helpful for users entering content into the form control.</p>
+
+  <div class=3Dimpl>
+
+  <p>User agents must recognise all the keywords and corresponding=
 states given below, but need not
+  support all of the corresponding states. If a keyword's state is not s=
upported, the user agent
+  must act as if the keyword instead mapped to the given state's fallbac=
k state, as defined below.
+  This fallback behaviour is transitive.</p>
+
+  <p class=3Dnote>For example, if a user agent with a QWERTY keybo=
ard layout does not support text
+  prediction and automatic capitalization, then it could treat the <c=
ode title=3Dattr-fe-inputmode-keyword-latin-prose><a href=3D#attr-f=
e-inputmode-keyword-latin-prose>latin-prose</a></code> key=
word in the same way as the
+  <code title=3Dattr-fe-inputmode-keyword-verbatim><a href=3D#a=
ttr-fe-inputmode-keyword-verbatim>verbatim</a></code> keyw=
ord, following the chain
+  <a href=3D#attr-fe-inputmode-state-latin-prose title=3Dattr-fe-inpu=
tmode-state-latin-prose>Latin Prose</a> → <a href=3D=
#attr-fe-inputmode-state-latin title=3Dattr-fe-inputmode-state-latin>L=
atin Text</a> → <a href=3D#attr-fe-inputmode-state-ver=
batim title=3Dattr-fe-inputmode-state-verbatim>Latin Verbatim</a&gt=
;.</p>
+
+  </div>
+
+  <p>The possible keywords and states for the attributes are liste=
d in the following table. The
+  keywords are listed in the first column. Each maps to the state given =
in the cell in the second
+  column of that keyword's row, and that state has the fallback state gi=
ven in the cell in the third
+  column of that row.</p>
+
+  <table class=3Dthree-column-nowrap><thead><tr><th=
> Keyword
+     <th> State
+     <th> Fallback state
+     <th> Description
+
+   <tbody><tr><td> <dfn id=3Dattr-fe-inputmode-keyw=
ord-verbatim title=3Dattr-fe-inputmode-keyword-verbatim><code>ve=
rbatim</code></dfn>
+     <td> <dfn id=3Dattr-fe-inputmode-state-verbatim title=3Dat=
tr-fe-inputmode-state-verbatim>Latin Verbatim</dfn>
+     <td> <a href=3D#attr-fe-inputmode-state-default title=3Dat=
tr-fe-inputmode-state-default>Default</a>
+     <td> Alphanumeric Latin-script input of non-prose content, e.=
g. usernames, passwords, product codes.
+
+    <tr><td> <dfn id=3Dattr-fe-inputmode-keyword-latin ti=
tle=3Dattr-fe-inputmode-keyword-latin><code>latin</code>&l=
t;/dfn>
+     <td> <dfn id=3Dattr-fe-inputmode-state-latin title=3Dattr-=
fe-inputmode-state-latin>Latin Text</dfn>
+     <td> <a href=3D#attr-fe-inputmode-state-verbatim title=3Da=
ttr-fe-inputmode-state-verbatim>Latin Verbatim</a>
+     <td> Latin-script input in the user's preferred language(s), =
with some typing aids enabled
+     (e.g. text prediction). Intended for human-to-computer communicatio=
ns, e.g. free-form text
+     search fields.
+
+    <tr><td> <dfn id=3Dattr-fe-inputmode-keyword-latin-na=
me title=3Dattr-fe-inputmode-keyword-latin-name><code>latin-name=
</code></dfn>
+     <td> <dfn id=3Dattr-fe-inputmode-state-latin-name title=3D=
attr-fe-inputmode-state-latin-name>Latin Name</dfn>
+     <td> <a href=3D#attr-fe-inputmode-state-latin title=3Dattr=
-fe-inputmode-state-latin>Latin Text</a>
+     <td> Latin-script input in the user's preferred language(s), =
with typing aids intended for
+     entering human names enabled (e.g. text prediction from the user's =
contact list and automatic
+     capitalisation at every word). Intended for situations such as cust=
omer name fields.
+
+    <tr><td> <dfn id=3Dattr-fe-inputmode-keyword-latin-pr=
ose title=3Dattr-fe-inputmode-keyword-latin-prose><code>latin-pr=
ose</code></dfn>
+     <td> <dfn id=3Dattr-fe-inputmode-state-latin-prose title=3D=
attr-fe-inputmode-state-latin-prose>Latin Prose</dfn>
+     <td> <a href=3D#attr-fe-inputmode-state-latin title=3Dattr=
-fe-inputmode-state-latin>Latin Text</a>
+     <td> Latin-script input in the user's preferred language(s), =
with aggressive typing aids
+     intended for human-to-human communications enabled (e.g. text predi=
ction and automatic
+     capitalisation at the start of sentences). Intended for situations =
such as e-mails and instant
+     messaging.
+
+    <tr><td> <dfn id=3Dattr-fe-inputmode-keyword-full-wid=
th-latin title=3Dattr-fe-inputmode-keyword-full-width-latin><code&g=
t;full-width-latin</code></dfn>
+     <td> <dfn id=3Dattr-fe-inputmode-state-full-width-latin ti=
tle=3Dattr-fe-inputmode-state-full-width-latin>Full-width Latin</df=
n>
+     <td> <a href=3D#attr-fe-inputmode-state-latin title=3Dattr=
-fe-inputmode-state-latin>Latin Prose</a>
+     <td> Latin-script input in the user's secondary language(s), =
using full-width characters, with
+     aggressive typing aids intended for human-to-human communications e=
nabled (e.g. text prediction
+     and automatic capitalisation at the start of sentences). Intended f=
or latin text embedded
+     inside CJK text.
+
+    <tr><td> <dfn id=3Dattr-fe-inputmode-keyword-kana tit=
le=3Dattr-fe-inputmode-keyword-kana><code>kana</code></=
dfn>
+     <td> <dfn id=3Dattr-fe-inputmode-state-kana title=3Dattr-f=
e-inputmode-state-kana>Kana</dfn>
+     <td> <a href=3D#attr-fe-inputmode-state-default title=3Dat=
tr-fe-inputmode-state-default>Default</a>
+     <td> Kana or romaji input, typically hiragana input, using fu=
ll-width characters, with support
+     for converting to kanji. Intended for Japanese text input.
+
+    <tr><td> <dfn id=3Dattr-fe-inputmode-keyword-katakana=
 title=3Dattr-fe-inputmode-keyword-katakana><code>katakana</c=
ode></dfn>
+     <td> <dfn id=3Dattr-fe-inputmode-state-katakana title=3Dat=
tr-fe-inputmode-state-katakana>Katakana</dfn>
+     <td> <a href=3D#attr-fe-inputmode-state-kana title=3Dattr-=
fe-inputmode-state-kana>Kana</a>
+     <td> Katakana input, using full-width characters, with suppor=
t for converting to kanji.
+     Intended for Japanese text input.
+
+<!-- See comment on https://plus.google.com/u/0/107429617152575897589=
/posts/WwVmKNjcZ4p
+    <tr>
+     <td> <dfn title=3D"attr-fe-inputmode-keyword-half-wid=
th-katakana"><code>half-width-katakana</code></dfn=
>
+     <td> <dfn title=3D"attr-fe-inputmode-state-half-width=
-katakana">Half-width Katakana</dfn>
+     <td> <span title=3D"attr-fe-inputmode-state-katakana&=
quot;>Katakana</span>
+     <td> Katakana input, using half-width characters, with suppor=
t for converting to kanji.
+     Intended for Japanese text input.
+-->
+
+    <tr><td> <dfn id=3Dattr-fe-inputmode-keyword-numeric =
title=3Dattr-fe-inputmode-keyword-numeric><code>numeric</code=
></dfn>
+     <td> <dfn id=3Dattr-fe-inputmode-state-numeric title=3Datt=
r-fe-inputmode-state-numeric>Numeric</dfn>
+     <td> <a href=3D#attr-fe-inputmode-state-default title=3Dat=
tr-fe-inputmode-state-default>Default</a>
+     <td> Numeric input, including keys for the digits 0 to 9, the=
 user's preferred thousands
+     separator character, and the character for indicating negative numb=
ers. Intended for numeric
+     codes, e.g. credit card numbers. (For numbers, prefer "<cod=
e title=3Dattr-input-type-number><a href=3D"#number-state-(typ=
e=3Dnumber)"><input type=3Dnumber></a></co=
de>".)
+
+    <tr class=3Drare><td> <dfn id=3Dattr-fe-inputmode-key=
word-tel title=3Dattr-fe-inputmode-keyword-tel><code>tel</cod=
e></dfn>
+     <td> <dfn id=3Dattr-fe-inputmode-state-telephone title=3Da=
ttr-fe-inputmode-state-telephone>Telephone</dfn>
+     <td> <a href=3D#attr-fe-inputmode-state-numeric title=3Dat=
tr-fe-inputmode-state-numeric>Numeric</a>
+     <td> Telephone number input, including keys for the digits 0 =
to 9, the "#" character, and the
+     "*" character. In some locales, this can also include alp=
habetic mnemonic labels (e.g. in the
+     US, the key labeled "2" is historically also labeled with=
 the letters A, B, and C). <a href=3D#avoid-inputmode>Rarely necess=
ary</a>; use "<code title=3Dattr-input-type-tel><a hr=
ef=3D"#telephone-state-(type=3Dtel)"><input
+     type=3Dtel></a></code>" instead.
+
+    <tr class=3Drare><td> <dfn id=3Dattr-fe-inputmode-key=
word-email title=3Dattr-fe-inputmode-keyword-email><code>email&l=
t;/code></dfn>
+     <td> <dfn id=3Dattr-fe-inputmode-state-email title=3Dattr-=
fe-inputmode-state-email>E-mail</dfn>
+     <td> <a href=3D#attr-fe-inputmode-state-default title=3Dat=
tr-fe-inputmode-state-default>Default</a>
+     <td> Text input in the user's locale, with keys for aiding in=
 the input of e-mail addresses,
+     such as that for the "@" character and the "." =
character. <a href=3D#avoid-inputmode>Rarely
+     necessary</a>; use "<code title=3Dattr-input-type-ema=
il><a href=3D"#e-mail-state-(type=3Demail)"><in=
put type=3Demail></a></code>" instead.
+
+    <tr class=3Drare><td> <dfn id=3Dattr-fe-inputmode-key=
word-url title=3Dattr-fe-inputmode-keyword-url><code>url</cod=
e></dfn>
+     <td> <dfn id=3Dattr-fe-inputmode-state-url title=3Dattr-fe=
-inputmode-state-url>URL</dfn>
+     <td> <a href=3D#attr-fe-inputmode-state-default title=3Dat=
tr-fe-inputmode-state-default>Default</a>
+     <td> Text input in the user's locale, with keys for aiding in=
 the input of Web addresses, such
+     as that for the "/" and "." characters and for =
quick input of strings commonly found in domain
+     names such as "www." or ".co.uk". <a href=3D=
#avoid-inputmode>Rarely necessary</a>; use "<code title=3D=
attr-input-type-url><a href=3D"#url-state-(type=3Durl)"&g=
t;<input type=3Durl></a></code>" instead.
+
+  </table><p id=3Davoid-inputmode>The last three keywords li=
sted above are only provided for completeness,
+  and are rarely necessary, as dedicated input controls exist for their =
usual use cases (as
+  described in the table above).</p>
+
+  <p>User agents <span class=3Dimpl>must</span> all su=
pport the <dfn id=3Dattr-fe-inputmode-state-default title=3Dattr-fe-in=
putmode-state-default>Default</dfn> input mode state, which corr=
esponds to the
+  user agent's default input modality. <span class=3Dimpl>This spe=
cification does not define how the
+  user agent's default modality is to operate.</span> The <i&gt=
;missing value default</i> is the <a href=3D#attr-fe-inputmode-s=
tate-default title=3Dattr-fe-inputmode-state-default>default input mod=
e</a> state.</p>
+
+  <div class=3Dimpl>
+
+  <p>User agents should use the input modality corresponding to th=
e state of the <code title=3Dattr-fe-inputmode><a href=3D#attr-f=
e-inputmode>inputmode</a></code> attribute when exposing a=
 user interface for editing
+  the value of a form control to which the attribute <a href=3D#conce=
pt-input-apply title=3Dconcept-input-apply>applies</a>. An input=
 modality corresponding to a state is one
+  designed to fit the description of the state in the table above. This =
value can change
+  dynamically; user agents should update their interface as the attribut=
e changes state, unless that
+  would go against the user's wishes.</p>
+
+  </div>
+
+
+  <h5 id=3Dautofilling-form-controls:-the-autocomplete-attribute>&=
lt;span class=3Dsecno>4.10.19.9 </span>Autofilling form controls=
: the <code title=3Dattr-fe-autocomplete><a href=3D#attr-fe-auto=
complete>autocomplete</a></code> attribute</h5>
+
+  <p>User agents sometimes have features for helping users fill fo=
rms in, for example prefilling the
+  user's address based on earlier user input. The <dfn id=3Dattr-fe-a=
utocomplete title=3Dattr-fe-autocomplete><code>autocomplete</=
code></dfn> content attribute can be used to hint
+  to the user agent how to, or indeed whether to, provide such a feature=
.</p>
+
+  <p>The attribute, if present, must have a value that is a <a =
href=3D#set-of-space-separated-tokens>set of space-separated
+  tokens</a> consisting of either a single token that is an <a =
href=3D#ascii-case-insensitive>ASCII case-insensitive</a>
+  match for the string "<code title=3Dattr-fe-autocomplete-off&g=
t;<a href=3D#attr-fe-autocomplete-off>off</a></code>&qu=
ot;, or a single token that
+  is an <a href=3D#ascii-case-insensitive>ASCII case-insensitive&l=
t;/a> match for the string "<code title=3Dattr-fe-autocomplete=
-on><a href=3D#attr-fe-autocomplete-on>on</a></code>=
", or the following, in the order given below:</p>
+
+  <ol><li>
+
+    <p>Optionally, a token whose first eight characters are an &lt=
;a href=3D#ascii-case-insensitive>ASCII case-insensitive</a>
+    match for the string "<code title=3Dattr-fe-autocomplete-sec=
tion>section-</code>", meaning that
+    the field belongs to the named group.</p>
+
+    <div class=3Dnote>
+
+     <p>For example, if there are two shipping addresses in the fo=
rm, then they could be marked up
+     as:</p>
+
+     <pre><fieldset>
+ <legend>Ship the blue gift to...</legend>
+ <p> <label> Address:     <input name=
=3Dba autocomplete=3D"section-blue shipping street-address"&amp=
;gt; </label>
+ <p> <label> City:        <input name=
=3Dbc autocomplete=3D"section-blue shipping region"> &am=
p;lt;/label>
+ <p> <label> Postal Code: <input name=
=3Dbp autocomplete=3D"section-blue shipping postal-code"&gt=
; </label>
+</fieldset>
+<fieldset>
+ <legend>Ship the red gift to...</legend>
+ <p> <label> Address:     <input name=
=3Dra autocomplete=3D"section-red shipping street-address"&=
gt; </label>
+ <p> <label> City:        <input name=
=3Drc autocomplete=3D"section-red shipping region"> &amp=
;lt;/label>
+ <p> <label> Postal Code: <input name=
=3Drp autocomplete=3D"section-red shipping country"> &am=
p;lt;/label>
+</fieldset></pre>
+
+    </div>
+
+   </li>
+
+   <li>
+
+    <p>Optionally, a token that is an <a href=3D#ascii-case-ins=
ensitive>ASCII case-insensitive</a> match for one of the
+    following strings:</p>
+
+    <ul class=3Dbrief><li>"<dfn id=3Dattr-fe-autocom=
plete-shipping title=3Dattr-fe-autocomplete-shipping><code>shipp=
ing</code></dfn>", meaning the field
+     is part of the shipping address or contact information
+
+     <li>"<dfn id=3Dattr-fe-autocomplete-billing title=3Da=
ttr-fe-autocomplete-billing><code>billing</code></dfn&g=
t;", meaning the field
+     is part of the billing address or contact information
+
+    </ul></li>
+
+   <li>
+
+    <p>Either of the following two options:</p>
+
+    <ul><li>
+
+      <p>A token that is an <a href=3D#ascii-case-insensitive&g=
t;ASCII case-insensitive</a> match for one of the following
+      <a href=3D#autofill-field>autofill field</a> strings:&=
lt;/p>
+
+      <ul class=3Dbrief><li>"<code title=3Dattr-fe-a=
utocomplete-name><a href=3D#attr-fe-autocomplete-name>name</a=
></code>"
+       <li>"<code title=3Dattr-fe-autocomplete-honorific-p=
refix><a href=3D#attr-fe-autocomplete-honorific-prefix>honorific=
-prefix</a></code>"
+       <li>"<code title=3Dattr-fe-autocomplete-given-name&=
gt;<a href=3D#attr-fe-autocomplete-given-name>given-name</a>&=
lt;/code>"
+       <li>"<code title=3Dattr-fe-autocomplete-additional-=
name><a href=3D#attr-fe-autocomplete-additional-name>additional-=
name</a></code>"
+       <li>"<code title=3Dattr-fe-autocomplete-family-name=
><a href=3D#attr-fe-autocomplete-family-name>family-name</a&g=
t;</code>"
+       <li>"<code title=3Dattr-fe-autocomplete-honorific-s=
uffix><a href=3D#attr-fe-autocomplete-honorific-suffix>honorific=
-suffix</a></code>"
+       <li>"<code title=3Dattr-fe-autocomplete-nickname&gt=
;<a href=3D#attr-fe-autocomplete-nickname>nickname</a></co=
de>"
+       <li>"<code title=3Dattr-fe-autocomplete-organizatio=
n-title><a href=3D#attr-fe-autocomplete-organization-title>organ=
ization-title</a></code>"
+       <li>"<code title=3Dattr-fe-autocomplete-organizatio=
n><a href=3D#attr-fe-autocomplete-organization>organization</=
a></code>"
+       <li>"<code title=3Dattr-fe-autocomplete-street-addr=
ess><a href=3D#attr-fe-autocomplete-street-address>street-addres=
s</a></code>"
+       <li>"<code title=3Dattr-fe-autocomplete-address-lin=
e1><a href=3D#attr-fe-autocomplete-address-line1>address-line1&l=
t;/a></code>"
+       <li>"<code title=3Dattr-fe-autocomplete-address-lin=
e2><a href=3D#attr-fe-autocomplete-address-line2>address-line2&l=
t;/a></code>"
+       <li>"<code title=3Dattr-fe-autocomplete-address-lin=
e3><a href=3D#attr-fe-autocomplete-address-line3>address-line3&l=
t;/a></code>"
+       <li>"<code title=3Dattr-fe-autocomplete-locality&gt=
;<a href=3D#attr-fe-autocomplete-locality>locality</a></co=
de>"
+       <li>"<code title=3Dattr-fe-autocomplete-region>&=
lt;a href=3D#attr-fe-autocomplete-region>region</a></code>=
"
+       <li>"<code title=3Dattr-fe-autocomplete-country>=
<a href=3D#attr-fe-autocomplete-country>country</a></code&=
gt;"
+       <li>"<code title=3Dattr-fe-autocomplete-country-nam=
e><a href=3D#attr-fe-autocomplete-country-name>country-name</=
a></code>"
+       <li>"<code title=3Dattr-fe-autocomplete-postal-code=
><a href=3D#attr-fe-autocomplete-postal-code>postal-code</a&g=
t;</code>"
+       <li>"<code title=3Dattr-fe-autocomplete-cc-name>=
<a href=3D#attr-fe-autocomplete-cc-name>cc-name</a></code&=
gt;"
+       <li>"<code title=3Dattr-fe-autocomplete-cc-given-na=
me><a href=3D#attr-fe-autocomplete-cc-given-name>cc-given-name&l=
t;/a></code>"
+       <li>"<code title=3Dattr-fe-autocomplete-cc-addition=
al-name><a href=3D#attr-fe-autocomplete-cc-additional-name>cc-ad=
ditional-name</a></code>"
+       <li>"<code title=3Dattr-fe-autocomplete-cc-family-n=
ame><a href=3D#attr-fe-autocomplete-cc-family-name>cc-family-nam=
e</a></code>"
+       <li>"<code title=3Dattr-fe-autocomplete-cc-number&g=
t;<a href=3D#attr-fe-autocomplete-cc-number>cc-number</a><=
/code>"
+       <li>"<code title=3Dattr-fe-autocomplete-cc-exp>&=
lt;a href=3D#attr-fe-autocomplete-cc-exp>cc-exp</a></code>=
"
+       <li>"<code title=3Dattr-fe-autocomplete-cc-exp-mont=
h><a href=3D#attr-fe-autocomplete-cc-exp-month>cc-exp-month</=
a></code>"
+       <li>"<code title=3Dattr-fe-autocomplete-cc-exp-year=
><a href=3D#attr-fe-autocomplete-cc-exp-year>cc-exp-year</a&g=
t;</code>"
+       <li>"<code title=3Dattr-fe-autocomplete-cc-csc>&=
lt;a href=3D#attr-fe-autocomplete-cc-csc>cc-csc</a></code>=
"
+       <li>"<code title=3Dattr-fe-autocomplete-cc-type>=
<a href=3D#attr-fe-autocomplete-cc-type>cc-type</a></code&=
gt;"
+       <li>"<code title=3Dattr-fe-autocomplete-language&gt=
;<a href=3D#attr-fe-autocomplete-language>language</a></co=
de>"
+       <li>"<code title=3Dattr-fe-autocomplete-bday>&lt=
;a href=3D#attr-fe-autocomplete-bday>bday</a></code>"
+       <li>"<code title=3Dattr-fe-autocomplete-bday-day&gt=
;<a href=3D#attr-fe-autocomplete-bday-day>bday-day</a></co=
de>"
+       <li>"<code title=3Dattr-fe-autocomplete-bday-month&=
gt;<a href=3D#attr-fe-autocomplete-bday-month>bday-month</a>&=
lt;/code>"
+       <li>"<code title=3Dattr-fe-autocomplete-bday-year&g=
t;<a href=3D#attr-fe-autocomplete-bday-year>bday-year</a><=
/code>"
+       <li>"<code title=3Dattr-fe-autocomplete-sex><=
a href=3D#attr-fe-autocomplete-sex>sex</a></code>"
+       <li>"<code title=3Dattr-fe-autocomplete-url><=
a href=3D#attr-fe-autocomplete-url>url</a></code>"
+       <li>"<code title=3Dattr-fe-autocomplete-photo>&l=
t;a href=3D#attr-fe-autocomplete-photo>photo</a></code>&qu=
ot;
+      </ul><p>(See the table below for descriptions of these=
 values.)</p>
+
+     </li>
+
+     <li>
+
+      <p>The following, in the given order:</p>
+
+      <ol><li>
+
+        <p>Optionally, a token that is an <a href=3D#ascii-case=
-insensitive>ASCII case-insensitive</a> match for one of the
+        following strings:</p>
+
+        <ul class=3Dbrief><li>"<dfn id=3Dattr-fe-aut=
ocomplete-home title=3Dattr-fe-autocomplete-home><code>home</=
code></dfn>", meaning the field is
+         for contacting someone at their residence
+
+         <li>"<dfn id=3Dattr-fe-autocomplete-work title=3D=
attr-fe-autocomplete-work><code>work</code></dfn>&qu=
ot;, meaning the field is
+         for contacting someone at their workplace
+
+         <li>"<dfn id=3Dattr-fe-autocomplete-mobile title=3D=
attr-fe-autocomplete-mobile><code>mobile</code></dfn&gt=
;"<!-- or "cell"?
+         -->, meaning the field is for contacting someone regardless =
of location
+
+         <li>"<dfn id=3Dattr-fe-autocomplete-fax title=3Da=
ttr-fe-autocomplete-fax><code>fax</code></dfn>"=
, meaning the field
+         describes a fax machine's contact details
+
+         <li>"<dfn id=3Dattr-fe-autocomplete-pager title=3D=
attr-fe-autocomplete-pager><code>pager</code></dfn>&=
quot;, meaning the field
+         describes a pager's or beeper's contact details
+
+        </ul></li>
+
+       <li>
+
+        <p>A token that is an <a href=3D#ascii-case-insensitive=
>ASCII case-insensitive</a> match for one of the following
+        <a href=3D#autofill-field>autofill field</a> strings=
:</p>
+
+        <ul class=3Dbrief><li>"<code title=3Dattr-fe=
-autocomplete-tel><a href=3D#attr-fe-autocomplete-tel>tel</a&=
gt;</code>"
+         <li>"<code title=3Dattr-fe-autocomplete-tel-count=
ry-code><a href=3D#attr-fe-autocomplete-tel-country-code>tel-cou=
ntry-code</a></code>"
+         <li>"<code title=3Dattr-fe-autocomplete-tel-natio=
nal><a href=3D#attr-fe-autocomplete-tel-national>tel-national&lt=
;/a></code>"
+         <li>"<code title=3Dattr-fe-autocomplete-tel-area-=
code><a href=3D#attr-fe-autocomplete-tel-area-code>tel-area-code=
</a></code>"
+         <li>"<code title=3Dattr-fe-autocomplete-tel-local=
><a href=3D#attr-fe-autocomplete-tel-local>tel-local</a>&l=
t;/code>"
+         <li>"<code title=3Dattr-fe-autocomplete-tel-local=
-prefix><a href=3D#attr-fe-autocomplete-tel-local-prefix>tel-loc=
al-prefix</a></code>"
+         <li>"<code title=3Dattr-fe-autocomplete-tel-local=
-suffix><a href=3D#attr-fe-autocomplete-tel-local-suffix>tel-loc=
al-suffix</a></code>"
+         <li>"<code title=3Dattr-fe-autocomplete-tel-exten=
sion><a href=3D#attr-fe-autocomplete-tel-extension>tel-extension=
</a></code>"
+         <li>"<code title=3Dattr-fe-autocomplete-email>=
<a href=3D#attr-fe-autocomplete-email>email</a></code>&=
quot;
+         <li>"<code title=3Dattr-fe-autocomplete-impp>&=
lt;a href=3D#attr-fe-autocomplete-impp>impp</a></code>&quo=
t;
+        </ul><p>(See the table below for descriptions of the=
se values.)</p>
+
+       </li>
+
+      </ol></li>
+
+    </ul></li>
+
+  </ol><p>The "<dfn id=3Dattr-fe-autocomplete-off ti=
tle=3Dattr-fe-autocomplete-off><code>off</code></dfn&gt=
;" keyword indicates either
+  that the control's input data is particularly sensitive (for example t=
he activation code for a
+  nuclear weapon); or that it is a value that will never be reused (for =
example a one-time-key for a
+  bank login) and the user will therefore have to explicitly enter the d=
ata each time, instead of
+  being able to rely on the UA to prefill the value for him; or that the=
 document provides its own
+  autocomplete mechanism and does not want the user agent to provide aut=
ocompletion values.</p>
+
+  <p>The "<dfn id=3Dattr-fe-autocomplete-on title=3Dattr-f=
e-autocomplete-on><code>on</code></dfn>" keywor=
d indicates that the
+  user agent is allowed to provide the user with autocompletion values, =
but does not provide any
+  further information about what kind of data the user might be expected=
 to enter. User agents would
+  have to use heuristics to decide what autocompletion values to suggest=
.</p>
+
+  <p>The <dfn id=3Dautofill-field title=3D"autofill field&=
quot;>autofill fields</dfn> names listed above indicate that the=
 user
+  agent is allowed to provide the user with autocompletion values, and s=
pecifies what kind of value
+  is expected. The keywords relate to each other as described in the tab=
le below. Each field name
+  listed on a row of this table corresponds to the meaning given in the =
cell for that row in the
+  column labeled "Meaning". Some fields correspond to subparts=
 of other fields; for example, a
+  credit card expiry date can be expressed as one field giving both the =
month and year of expiry
+  ("<code title=3Dattr-fe-autocomplete-cc-exp><a href=3D#a=
ttr-fe-autocomplete-cc-exp>cc-exp</a></code>"), or as=
 two fields, one giving the
+  month ("<code title=3Dattr-fe-autocomplete-cc-exp-month>&lt=
;a href=3D#attr-fe-autocomplete-cc-exp-month>cc-exp-month</a>&lt=
;/code>") and one the year
+  ("<code title=3Dattr-fe-autocomplete-cc-exp-year><a href=
=3D#attr-fe-autocomplete-cc-exp-year>cc-exp-year</a></code&gt=
;"). In such cases, the names of
+  the broader fields cover multiple rows, in which the narrower fields a=
re defined.</p>
+
+  <p class=3Dnote>Generally, authors are encouraged to use the bro=
ader fields rather than the
+  narrower fields, as the narrower fields tend to expose Western biases.=
 For example, while it is
+  common in some Western cultures to have a given name and a family name=
, in that order (and thus
+  often referred to as a <i>first name</i> and a <i>su=
rname</i>), many cultures put the family name
+  first and the given name second, and many others simply have one name =
(a <i>mononym</i>). Having a
+  single field is therefore more flexible.</p>
+
+  <table><thead><tr><th colspan=3D4> Field name
+     <th> Meaning
+     <th> Canonical Format
+     <th> Canonical Format Example
+   <tbody><tr><td colspan=3D4>"<dfn id=3Dattr-=
fe-autocomplete-name title=3Dattr-fe-autocomplete-name><code>nam=
e</code></dfn>"
+     <td>Full name
+     <td>Free-form text, no newlines
+     <td>Sir Timothy John Berners-Lee, OM, KBE, FRS, FREng, FRSA
+    <tr><td rowspan=3D5 class=3Dnon-rectangular-cell-indentatio=
n>
+      <td colspan=3D3>"<dfn id=3Dattr-fe-autocomplete-hono=
rific-prefix title=3Dattr-fe-autocomplete-honorific-prefix><code&gt=
;honorific-prefix</code></dfn>"
+      <td>Prefix or title (e.g. "Mr.", "Ms.", =
"Dr.", "<span lang=3Dfr title=3D"">M<su=
p>lle</sup></span>")
+      <td>Free-form text, no newlines
+      <td>Sir
+    <tr><td colspan=3D3>"<dfn id=3Dattr-fe-autocompl=
ete-given-name title=3Dattr-fe-autocomplete-given-name><code>giv=
en-name</code></dfn>"
+      <td>Given name (in some Western cultures, also known as the =
<i>first name</i>)
+      <td>Free-form text, no newlines
+      <td>Timothy
+    <tr><td colspan=3D3>"<dfn id=3Dattr-fe-autocompl=
ete-additional-name title=3Dattr-fe-autocomplete-additional-name><c=
ode>additional-name</code></dfn>"
+      <td>Additional names (in some Western cultures, also known a=
s <i>middle names</i>, forenames other than the first name)
+      <td>Free-form text, no newlines
+      <td>John
+    <tr><td colspan=3D3>"<dfn id=3Dattr-fe-autocompl=
ete-family-name title=3Dattr-fe-autocomplete-family-name><code>f=
amily-name</code></dfn>"
+      <td>Family name (in some Western cultures, also known as the=
 <i>last name</i> or <i>surname</i>)
+      <td>Free-form text, no newlines
+      <td>Berners-Lee
+    <tr><td colspan=3D3>"<dfn id=3Dattr-fe-autocompl=
ete-honorific-suffix title=3Dattr-fe-autocomplete-honorific-suffix>&lt=
;code>honorific-suffix</code></dfn>"
+      <td>Suffix (e.g. "Jr.", "B.Sc.", "M=
BASW", "II")
+      <td>Free-form text, no newlines
+      <td>OM, KBE, FRS, FREng, FRSA
+    <tr><td colspan=3D4>"<dfn id=3Dattr-fe-autocompl=
ete-nickname title=3Dattr-fe-autocomplete-nickname><code>nicknam=
e</code></dfn>"
+     <td>Nickname, screen name, handle: a typically short name use=
d instead of the full name
+     <td>Free-form text, no newlines
+     <td>Tim
+    <tr><td colspan=3D4>"<dfn id=3Dattr-fe-autocompl=
ete-organization-title title=3Dattr-fe-autocomplete-organization-title&gt=
;<code>organization-title</code></dfn>"
+     <td>Job title (e.g. "Software Engineer", "Seni=
or Vice President", "Deputy Managing Director")
+     <td>Free-form text, no newlines
+     <td>Professor
+   <tbody><tr><td colspan=3D4>"<dfn id=3Dattr-=
fe-autocomplete-organization title=3Dattr-fe-autocomplete-organization&gt=
;<code>organization</code></dfn>"
+     <td>Company name corresponding to the person, address, or con=
tact information in the other fields associated with this field
+     <td>Free-form text, no newlines
+     <td>World Wide Web Consortium
+    <tr><td colspan=3D4>"<dfn id=3Dattr-fe-autocompl=
ete-street-address title=3Dattr-fe-autocomplete-street-address><cod=
e>street-address</code></dfn>"
+     <td>Street address (multiple lines, newlines preserved)
+     <td>Free-form text
+     <td>32 Vassar Street<br>
+MIT Room 32-G524
+    <tr><td rowspan=3D3 class=3Dnon-rectangular-cell-indentatio=
n>
+      <td colspan=3D3>"<dfn id=3Dattr-fe-autocomplete-addr=
ess-line1 title=3Dattr-fe-autocomplete-address-line1><code>addre=
ss-line1</code></dfn>"
+      <td rowspan=3D3>Street address (one line per field)
+      <td>Free-form text, no newlines
+      <td>32 Vassar Street
+    <tr><td colspan=3D3>"<dfn id=3Dattr-fe-autocompl=
ete-address-line2 title=3Dattr-fe-autocomplete-address-line2><code&=
gt;address-line2</code></dfn>"
+      <td>Free-form text, no newlines
+      <td>MIT Room 32-G524
+    <tr><td colspan=3D3>"<dfn id=3Dattr-fe-autocompl=
ete-address-line3 title=3Dattr-fe-autocomplete-address-line3><code&=
gt;address-line3</code></dfn>"
+      <td>Free-form text, no newlines
+      <td>
+    <tr><td colspan=3D4>"<dfn id=3Dattr-fe-autocompl=
ete-locality title=3Dattr-fe-autocomplete-locality><code>localit=
y</code></dfn>"
+     <td>City, town, village, post town, or other locality within =
which the relevant street address is found
+     <td>Free-form text, no newlines
+     <td>Cambridge
+    <tr><td colspan=3D4>"<dfn id=3Dattr-fe-autocompl=
ete-region title=3Dattr-fe-autocomplete-region><code>region</=
code></dfn>"
+     <td>Province such as a state, county, or canton within which =
the locality is found
+     <td>Free-form text, no newlines
+     <td>MA
+    <tr><td colspan=3D4>"<dfn id=3Dattr-fe-autocompl=
ete-country title=3Dattr-fe-autocomplete-country><code>country&l=
t;/code></dfn>"
+     <td>Country code
+     <td>Valid <a href=3Dhttp://www.iso.org/iso/country_codes/i=
so_3166_code_lists/country_names_and_code_elements.htm>ISO 3166-1-alph=
a-2 country code</a> <a href=3D#refsISO3166>[ISO3166]</a&g=
t;
+     <td>US
+    <tr><td colspan=3D4>"<dfn id=3Dattr-fe-autocompl=
ete-country-name title=3Dattr-fe-autocomplete-country-name><code&gt=
;country-name</code></dfn>"
+     <td>Country name
+     <td>Free-form text, no newlines; <a href=3D#autofill-count=
ry>derived from <code title=3Dattr-fe-autocomplete-country>count=
ry</code> in some cases</a>
+     <td>US
+    <tr><td colspan=3D4>"<dfn id=3Dattr-fe-autocompl=
ete-postal-code title=3Dattr-fe-autocomplete-postal-code><code>p=
ostal-code</code></dfn>"
+     <td>Postal code, post code, ZIP code, CEDEX code (if CEDEX, a=
ppend "CEDEX", and the <i lang=3Dfr>arrondissement</i&=
gt; if relevant, to the <code title=3Dattr-fe-autocomplete-locality&gt=
;<a href=3D#attr-fe-autocomplete-locality>locality</a></co=
de> field)
+     <td>Free-form text, no newlines
+     <td>02139
+   <tbody><tr><td colspan=3D4>"<dfn id=3Dattr-=
fe-autocomplete-cc-name title=3Dattr-fe-autocomplete-cc-name><code&=
gt;cc-name</code></dfn>"
+     <td>Full name as given on the payment instrument
+     <td>Free-form text, no newlines
+     <td>Tim Berners-Lee
+    <tr><td rowspan=3D3 class=3Dnon-rectangular-cell-indentatio=
n>
+      <td colspan=3D3>"<dfn id=3Dattr-fe-autocomplete-cc-g=
iven-name title=3Dattr-fe-autocomplete-cc-given-name><code>cc-gi=
ven-name</code></dfn>"
+      <td>Given name as given on the payment instrument (in some W=
estern cultures, also known as the <i>first name</i>)
+      <td>Free-form text, no newlines
+      <td>Tim
+    <tr><td colspan=3D3>"<dfn id=3Dattr-fe-autocompl=
ete-cc-additional-name title=3Dattr-fe-autocomplete-cc-additional-name&gt=
;<code>cc-additional-name</code></dfn>"
+      <td>Additional names given on the payment instrument (in som=
e Western cultures, also known as <i>middle names</i>, forena=
mes other than the first name)
+      <td>Free-form text, no newlines
+      <td>
+    <tr><td colspan=3D3>"<dfn id=3Dattr-fe-autocompl=
ete-cc-family-name title=3Dattr-fe-autocomplete-cc-family-name><cod=
e>cc-family-name</code></dfn>"
+      <td>Family name given on the payment instrument (in some Wes=
tern cultures, also known as the <i>last name</i> or <i&gt=
;surname</i>)
+      <td>Free-form text, no newlines
+      <td>Berners-Lee
+    <tr><td colspan=3D4>"<dfn id=3Dattr-fe-autocompl=
ete-cc-number title=3Dattr-fe-autocomplete-cc-number><code>cc-nu=
mber</code></dfn>"
+     <td>Code identifying the payment instrument (e.g. the credit =
card number, bank account number)
+     <td><a href=3D#ascii-digits>ASCII digits</a>
+     <td>4114360123456785 <!-- http://www.auricsystems.com/supp=
ort-center/sample-credit-card-numbers -->
+    <tr><td colspan=3D4>"<dfn id=3Dattr-fe-autocompl=
ete-cc-exp title=3Dattr-fe-autocomplete-cc-exp><code>cc-exp</=
code></dfn>"
+     <td>Expiration date of the payment instrument
+     <td><a href=3D#valid-month-string>Valid month string&lt=
;/a>
+     <td>2014-12
+    <tr><td rowspan=3D2 class=3Dnon-rectangular-cell-indentatio=
n>
+      <td colspan=3D3>"<dfn id=3Dattr-fe-autocomplete-cc-e=
xp-month title=3Dattr-fe-autocomplete-cc-exp-month><code>cc-exp-=
month</code></dfn>"
+      <td>Month component of the expiration date of the payment in=
strument
+      <td><a href=3D#valid-integer>Valid integer</a> i=
n the range 1..12
+      <td>12
+    <tr><td colspan=3D3>"<dfn id=3Dattr-fe-autocompl=
ete-cc-exp-year title=3Dattr-fe-autocomplete-cc-exp-year><code>c=
c-exp-year</code></dfn>"
+      <td>Year component of the expiration date of the payment ins=
trument
+      <td><a href=3D#valid-integer>Valid integer</a> g=
reater than zero
+      <td>2014
+    <tr><td colspan=3D4>"<dfn id=3Dattr-fe-autocompl=
ete-cc-csc title=3Dattr-fe-autocomplete-cc-csc><code>cc-csc</=
code></dfn>"
+     <td>Security code for the payment instrument (also known as t=
he card security code (CSC), card validation code (CVC), card verificatio=
n value (CVV), signature panel code (SPC), credit card ID (CCID), etc)
+     <td><a href=3D#ascii-digits>ASCII digits</a>
+     <td>419
+    <tr><td colspan=3D4>"<dfn id=3Dattr-fe-autocompl=
ete-cc-type title=3Dattr-fe-autocomplete-cc-type><code>cc-type&l=
t;/code></dfn>"
+     <td>Type of payment instrument
+     <td>Free-form text, no newlines
+     <td>Visa
+   <tbody><tr><td colspan=3D4>"<dfn id=3Dattr-=
fe-autocomplete-language title=3Dattr-fe-autocomplete-language><cod=
e>language</code></dfn>"
+     <td>Preferred language
+     <td>Valid BCP 47 language tag <a href=3D#refsBCP47>[BCP=
47]</a>
+     <td>en
+    <tr><td colspan=3D4>"<dfn id=3Dattr-fe-autocompl=
ete-bday title=3Dattr-fe-autocomplete-bday><code>bday</code&g=
t;</dfn>"
+     <td>Birthday
+     <td><a href=3D#valid-date-string>Valid date string</=
a>
+     <td>1955-06-08
+    <tr><td rowspan=3D3 class=3Dnon-rectangular-cell-indentatio=
n>
+      <td colspan=3D3>"<dfn id=3Dattr-fe-autocomplete-bday=
-day title=3Dattr-fe-autocomplete-bday-day><code>bday-day</co=
de></dfn>"
+      <td>Day component of birthday
+      <td><a href=3D#valid-integer>Valid integer</a> i=
n the range 1..31
+      <td>8
+    <tr><td colspan=3D3>"<dfn id=3Dattr-fe-autocompl=
ete-bday-month title=3Dattr-fe-autocomplete-bday-month><code>bda=
y-month</code></dfn>"
+      <td>Month component of birthday
+      <td><a href=3D#valid-integer>Valid integer</a> i=
n the range 1..12
+      <td>6
+    <tr><td colspan=3D3>"<dfn id=3Dattr-fe-autocompl=
ete-bday-year title=3Dattr-fe-autocomplete-bday-year><code>bday-=
year</code></dfn>"
+      <td>Year component of birthday
+      <td><a href=3D#valid-integer>Valid integer</a> g=
reater than zero
+      <td>1955
+    <tr><td colspan=3D4>"<dfn id=3Dattr-fe-autocompl=
ete-sex title=3Dattr-fe-autocomplete-sex><code>sex</code>&=
lt;/dfn>"
+     <td>Gender identity (e.g. Female, Fa'afafine)
+     <td>Free-form text, no newlines
+     <td>Male
+    <tr><td colspan=3D4>"<dfn id=3Dattr-fe-autocompl=
ete-url title=3Dattr-fe-autocomplete-url><code>url</code>&=
lt;/dfn>"
+     <td>Home page or other Web page corresponding to the company,=
 person, address, or contact information in the other fields associated w=
ith this field
+     <td><a href=3D#valid-url>Valid URL</a>
+     <td>http://www.w3.org/People/Berners-Lee/
+    <tr><td colspan=3D4>"<dfn id=3Dattr-fe-autocompl=
ete-photo title=3Dattr-fe-autocomplete-photo><code>photo</cod=
e></dfn>"
+     <td>Photograph, icon, or other image corresponding to the com=
pany, person, address, or contact information in the other fields associa=
ted with this field
+     <td>File or <a href=3D#valid-url>Valid URL</a>
+     <td>http://www.w3.org/Press/Stock/Berners-Lee/2001-europaeum-=
eighth.jpg
+   <tbody><tr><td colspan=3D4>"<dfn id=3Dattr-=
fe-autocomplete-tel title=3Dattr-fe-autocomplete-tel><code>tel&l=
t;/code></dfn>"
+     <td>Full telephone number, including country code
+     <td><a href=3D#ascii-digits>ASCII digits</a> and =
U+0020 SPACE characters, prefixed by a U+002B PLUS SIGN character (+)
+     <td>+1 617 253 5702
+    <tr><td rowspan=3D6 class=3Dnon-rectangular-cell-indentatio=
n>
+      <td colspan=3D3>"<dfn id=3Dattr-fe-autocomplete-tel-=
country-code title=3Dattr-fe-autocomplete-tel-country-code><code&gt=
;tel-country-code</code></dfn>"
+      <td>Country code component of the telephone number
+     <td><a href=3D#ascii-digits>ASCII digits</a> pref=
ixed by a U+002B PLUS SIGN character (+)
+      <td>+1
+    <tr><td colspan=3D3>"<dfn id=3Dattr-fe-autocompl=
ete-tel-national title=3Dattr-fe-autocomplete-tel-national><code&gt=
;tel-national</code></dfn>"
+      <td>Telephone number without the county code component, with=
 a country-internal prefix applied if applicable
+      <td><a href=3D#ascii-digits>ASCII digits</a> and=
 U+0020 SPACE characters
+      <td>617 253 5702
+    <tr><td rowspan=3D4 class=3Dnon-rectangular-cell-indentatio=
n>
+       <td colspan=3D2>"<dfn id=3Dattr-fe-autocomplete-tel=
-area-code title=3Dattr-fe-autocomplete-tel-area-code><code>tel-=
area-code</code></dfn>"
+       <td>Area code component of the telephone number, with a cou=
ntry-internal prefix applied if applicable
+       <td><a href=3D#ascii-digits>ASCII digits</a>
+       <td>617
+    <tr><td colspan=3D2>"<dfn id=3Dattr-fe-autocompl=
ete-tel-local title=3Dattr-fe-autocomplete-tel-local><code>tel-l=
ocal</code></dfn>"
+       <td>Telephone number without the country code and area code=
 components
+       <td><a href=3D#ascii-digits>ASCII digits</a>
+       <td>2535702
+    <tr><td rowspan=3D2 class=3Dnon-rectangular-cell-indentatio=
n>
+        <td>"<dfn id=3Dattr-fe-autocomplete-tel-local-pref=
ix title=3Dattr-fe-autocomplete-tel-local-prefix><code>tel-local=
-prefix</code></dfn>"
+        <td>First part of the component of the telephone number th=
at follows the area code, when that component is split into two component=
s
+        <td><a href=3D#ascii-digits>ASCII digits</a>
+        <td>253
+    <tr><td>"<dfn id=3Dattr-fe-autocomplete-tel-loca=
l-suffix title=3Dattr-fe-autocomplete-tel-local-suffix><code>tel=
-local-suffix</code></dfn>"
+        <td>Second part of the component of the telephone number t=
hat follows the area code, when that component is split into two componen=
ts
+        <td><a href=3D#ascii-digits>ASCII digits</a>
+        <td>5702
+    <tr><td colspan=3D4>"<dfn id=3Dattr-fe-autocompl=
ete-tel-extension title=3Dattr-fe-autocomplete-tel-extension><code&=
gt;tel-extension</code></dfn>"
+     <td>Telephone number internal extension code
+     <td><a href=3D#ascii-digits>ASCII digits</a>
+     <td>1000
+    <tr><td colspan=3D4>"<dfn id=3Dattr-fe-autocompl=
ete-email title=3Dattr-fe-autocomplete-email><code>email</cod=
e></dfn>"
+     <td>E-mail address
+     <td><a href=3D#valid-e-mail-address>Valid e-mail addres=
s</a>
+     <td>timbl at w3.org
+    <tr><td colspan=3D4>"<dfn id=3Dattr-fe-autocompl=
ete-impp title=3Dattr-fe-autocomplete-impp><code>impp</code&g=
t;</dfn>"
+     <td>URL representing an instant messaging protocol endpoint (=
for example, "<code title=3D"">aim:goim?screenname=3D=
example</code>" or "<code title=3D"">xmpp=
:fred at example.net</code>")
+     <td><a href=3D#valid-url>Valid URL</a>
+     <td>irc://example.org/timbl,isuser
+  </table><p>If the <code title=3Dattr-fe-autocomplete&gt=
;<a href=3D#attr-fe-autocomplete>autocomplete</a></code&gt=
; attribute is omitted, the default
+  value corresponding to the state of the element's <a href=3D#form-o=
wner>form owner</a>'s <code title=3Dattr-form-autocomplete&gt=
;<a href=3D#attr-form-autocomplete>autocomplete</a></code&=
gt; attribute is used instead (either "<code title=3Dattr-fe-auto=
complete-on><a href=3D#attr-fe-autocomplete-on>on</a></=
code>" or "<code title=3Dattr-fe-autocomplete-off><=
a href=3D#attr-fe-autocomplete-off>off</a></code>"). =
If there is no <a href=3D#form-owner>form owner</a>, then the
+  value "<code title=3Dattr-fe-autocomplete-on><a href=3D#=
attr-fe-autocomplete-on>on</a></code>" is used.</p=
>
+
+  <div class=3Dimpl>
+
+  <p>Each <code><a href=3D#the-input-element>input<=
/a></code>, <code><a href=3D#the-select-element>sele=
ct</a></code>, and <code><a href=3D#the-textarea-ele=
ment>textarea</a></code> element has an
+  <dfn id=3Dautofill-hint-set>autofill hint set</dfn>, an &l=
t;dfn id=3Dautofill-scope>autofill scope</dfn>, an <dfn id=3D=
autofill-field-name>autofill field name</dfn>, and
+  an <dfn id=3Didl-exposed-autofill-value>IDL-exposed autofill val=
ue</dfn>.</p>
+
+  <p>The <a href=3D#autofill-field-name>autofill field name&=
lt;/a> specifies the specific kind of data expected in the field,
+  e.g. "<code title=3Dattr-fe-autocomplete-street-address>&lt=
;a href=3D#attr-fe-autocomplete-street-address>street-address</a&gt=
;</code>" or "<code title=3Dattr-fe-autocomplete-cc-ex=
p><a href=3D#attr-fe-autocomplete-cc-exp>cc-exp</a></co=
de>".</p>
+
+  <p>The <a href=3D#autofill-hint-set>autofill hint set</=
a> identifies what address or contact information type the user
+  agent is to look at, e.g. "<code title=3Dattr-fe-autocomplete-=
shipping><a href=3D#attr-fe-autocomplete-shipping>shipping</a=
></code> <code title=3Dattr-fe-autocomplete-fax><a href=
=3D#attr-fe-autocomplete-fax>fax</a></code>" or &quot=
;<code title=3Dattr-fe-autocomplete-billing><a href=3D#attr-fe-a=
utocomplete-billing>billing</a></code>".</p>
+
+  <p>The <a href=3D#autofill-scope>autofill scope</a> =
identifies the group of fields that are to be filled with the
+  information from the same source, and consists of the <a href=3D#au=
tofill-hint-set>autofill hint set</a> with, if
+  applicable, the "<code title=3D"">section-*</c=
ode>" prefix, e.g. "billing", "<code title=3D&q=
uot;">section-parent shipping</code>", or "<co=
de title=3D"">section-child home
+  shipping</code>".</p>
+
+  <p>These values are defined as the result of running the followi=
ng algorithm:</p>
+
+  <ol><li><p>If the element has no <code title=3Dat=
tr-fe-autocomplete><a href=3D#attr-fe-autocomplete>autocomplete&=
lt;/a></code> attribute,
+   then jump to the step labeled <i>default</i>.</li>
+
+   <li><p>Let <var title=3D"">tokens</var=
> be the result of <a href=3D#split-a-string-on-spaces title=3D&quo=
t;split a string on
+   spaces">splitting the attribute's value on spaces</a>.&=
lt;/li>
+
+   <li><p>If <var title=3D"">tokens</var&=
gt; is empty, then jump to the step labeled
+   <i>default</i>.</li>
+
+   <li><p>Let <var title=3D"">index</var&=
gt; be the index of the last token in <var title=3D"">tok=
ens</var>.</li>
+
+   <li>
+
+    <p>If the <var title=3D"">index</var>th =
token in <var title=3D"">tokens</var> is not an &lt=
;a href=3D#ascii-case-insensitive>ASCII
+    case-insensitive</a> match for one of the tokens given in the =
first column of the following
+    table, or if the number of tokens in <var title=3D""&gt=
;tokens</var> is greater than the maximum
+    number given in the cell in the second column of that token's row, t=
hen jump to the step labeled
+    <i>default</i>. Otherwise, let <var title=3D"&qu=
ot;>field</var> be the string given in the cell of the
+    first column of the matching row, and let <var title=3D"&quo=
t;>category</var> be the value of the cell
+    in the third column of that same row.</p>
+
+    <table><thead><tr><th>Token
+       <th>Maximum number of tokens
+       <th>Category
+     <tbody><tr><td>"<code title=3Dattr-fe-aut=
ocomplete-off><a href=3D#attr-fe-autocomplete-off>off</a>&=
lt;/code>"
+       <td>1
+       <td>Off
+      <tr><td>"<code title=3Dattr-fe-autocomplete-on=
><a href=3D#attr-fe-autocomplete-on>on</a></code>&qu=
ot;
+       <td>1
+       <td>Automatic
+     <tbody><tr><td>"<code title=3Dattr-fe-aut=
ocomplete-name><a href=3D#attr-fe-autocomplete-name>name</a&g=
t;</code>"
+       <td>3
+       <td>Normal
+      <tr><td>"<code title=3Dattr-fe-autocomplete-ho=
norific-prefix><a href=3D#attr-fe-autocomplete-honorific-prefix>=
honorific-prefix</a></code>"
+       <td>3
+       <td>Normal
+      <tr><td>"<code title=3Dattr-fe-autocomplete-gi=
ven-name><a href=3D#attr-fe-autocomplete-given-name>given-name&l=
t;/a></code>"
+       <td>3
+       <td>Normal
+      <tr><td>"<code title=3Dattr-fe-autocomplete-ad=
ditional-name><a href=3D#attr-fe-autocomplete-additional-name>ad=
ditional-name</a></code>"
+       <td>3
+       <td>Normal
+      <tr><td>"<code title=3Dattr-fe-autocomplete-fa=
mily-name><a href=3D#attr-fe-autocomplete-family-name>family-nam=
e</a></code>"
+       <td>3
+       <td>Normal
+      <tr><td>"<code title=3Dattr-fe-autocomplete-ho=
norific-suffix><a href=3D#attr-fe-autocomplete-honorific-suffix>=
honorific-suffix</a></code>"
+       <td>3
+       <td>Normal
+      <tr><td>"<code title=3Dattr-fe-autocomplete-ni=
ckname><a href=3D#attr-fe-autocomplete-nickname>nickname</a&g=
t;</code>"
+       <td>3
+       <td>Normal
+      <tr><td>"<code title=3Dattr-fe-autocomplete-or=
ganization-title><a href=3D#attr-fe-autocomplete-organization-title=
>organization-title</a></code>"
+       <td>3
+       <td>Normal
+      <tr><td>"<code title=3Dattr-fe-autocomplete-or=
ganization><a href=3D#attr-fe-autocomplete-organization>organiza=
tion</a></code>"
+       <td>3
+       <td>Normal
+      <tr><td>"<code title=3Dattr-fe-autocomplete-st=
reet-address><a href=3D#attr-fe-autocomplete-street-address>stre=
et-address</a></code>"
+       <td>3
+       <td>Normal
+      <tr><td>"<code title=3Dattr-fe-autocomplete-ad=
dress-line1><a href=3D#attr-fe-autocomplete-address-line1>addres=
s-line1</a></code>"
+       <td>3
+       <td>Normal
+      <tr><td>"<code title=3Dattr-fe-autocomplete-ad=
dress-line2><a href=3D#attr-fe-autocomplete-address-line2>addres=
s-line2</a></code>"
+       <td>3
+       <td>Normal
+      <tr><td>"<code title=3Dattr-fe-autocomplete-ad=
dress-line3><a href=3D#attr-fe-autocomplete-address-line3>addres=
s-line3</a></code>"
+       <td>3
+       <td>Normal
+      <tr><td>"<code title=3Dattr-fe-autocomplete-lo=
cality><a href=3D#attr-fe-autocomplete-locality>locality</a&g=
t;</code>"
+       <td>3
+       <td>Normal
+      <tr><td>"<code title=3Dattr-fe-autocomplete-re=
gion><a href=3D#attr-fe-autocomplete-region>region</a><=
/code>"
+       <td>3
+       <td>Normal
+      <tr><td>"<code title=3Dattr-fe-autocomplete-co=
untry><a href=3D#attr-fe-autocomplete-country>country</a>&=
lt;/code>"
+       <td>3
+       <td>Normal
+      <tr><td>"<code title=3Dattr-fe-autocomplete-co=
untry-name><a href=3D#attr-fe-autocomplete-country-name>country-=
name</a></code>"
+       <td>3
+       <td>Normal
+      <tr><td>"<code title=3Dattr-fe-autocomplete-po=
stal-code><a href=3D#attr-fe-autocomplete-postal-code>postal-cod=
e</a></code>"
+       <td>3
+       <td>Normal
+      <tr><td>"<code title=3Dattr-fe-autocomplete-cc=
-name><a href=3D#attr-fe-autocomplete-cc-name>cc-name</a>&=
lt;/code>"
+       <td>3
+       <td>Normal
+      <tr><td>"<code title=3Dattr-fe-autocomplete-cc=
-given-name><a href=3D#attr-fe-autocomplete-cc-given-name>cc-giv=
en-name</a></code>"
+       <td>3
+       <td>Normal
+      <tr><td>"<code title=3Dattr-fe-autocomplete-cc=
-additional-name><a href=3D#attr-fe-autocomplete-cc-additional-name=
>cc-additional-name</a></code>"
+       <td>3
+       <td>Normal
+      <tr><td>"<code title=3Dattr-fe-autocomplete-cc=
-family-name><a href=3D#attr-fe-autocomplete-cc-family-name>cc-f=
amily-name</a></code>"
+       <td>3
+       <td>Normal
+      <tr><td>"<code title=3Dattr-fe-autocomplete-cc=
-number><a href=3D#attr-fe-autocomplete-cc-number>cc-number</=
a></code>"
+       <td>3
+       <td>Normal
+      <tr><td>"<code title=3Dattr-fe-autocomplete-cc=
-exp><a href=3D#attr-fe-autocomplete-cc-exp>cc-exp</a><=
/code>"
+       <td>3
+       <td>Normal
+      <tr><td>"<code title=3Dattr-fe-autocomplete-cc=
-exp-month><a href=3D#attr-fe-autocomplete-cc-exp-month>cc-exp-m=
onth</a></code>"
+       <td>3
+       <td>Normal
+      <tr><td>"<code title=3Dattr-fe-autocomplete-cc=
-exp-year><a href=3D#attr-fe-autocomplete-cc-exp-year>cc-exp-yea=
r</a></code>"
+       <td>3
+       <td>Normal
+      <tr><td>"<code title=3Dattr-fe-autocomplete-cc=
-csc><a href=3D#attr-fe-autocomplete-cc-csc>cc-csc</a><=
/code>"
+       <td>3
+       <td>Normal
+      <tr><td>"<code title=3Dattr-fe-autocomplete-cc=
-type><a href=3D#attr-fe-autocomplete-cc-type>cc-type</a>&=
lt;/code>"
+       <td>3
+       <td>Normal
+      <tr><td>"<code title=3Dattr-fe-autocomplete-la=
nguage><a href=3D#attr-fe-autocomplete-language>language</a&g=
t;</code>"
+       <td>3
+       <td>Normal
+      <tr><td>"<code title=3Dattr-fe-autocomplete-bd=
ay><a href=3D#attr-fe-autocomplete-bday>bday</a></code&=
gt;"
+       <td>3
+       <td>Normal
+      <tr><td>"<code title=3Dattr-fe-autocomplete-bd=
ay-day><a href=3D#attr-fe-autocomplete-bday-day>bday-day</a&g=
t;</code>"
+       <td>3
+       <td>Normal
+      <tr><td>"<code title=3Dattr-fe-autocomplete-bd=
ay-month><a href=3D#attr-fe-autocomplete-bday-month>bday-month&l=
t;/a></code>"
+       <td>3
+       <td>Normal
+      <tr><td>"<code title=3Dattr-fe-autocomplete-bd=
ay-year><a href=3D#attr-fe-autocomplete-bday-year>bday-year</=
a></code>"
+       <td>3
+       <td>Normal
+      <tr><td>"<code title=3Dattr-fe-autocomplete-se=
x><a href=3D#attr-fe-autocomplete-sex>sex</a></code>=
"
+       <td>3
+       <td>Normal
+      <tr><td>"<code title=3Dattr-fe-autocomplete-ur=
l><a href=3D#attr-fe-autocomplete-url>url</a></code>=
"
+       <td>3
+       <td>Normal
+      <tr><td>"<code title=3Dattr-fe-autocomplete-ph=
oto><a href=3D#attr-fe-autocomplete-photo>photo</a></co=
de>"
+       <td>3
+       <td>Normal
+     <tbody><tr><td>"<code title=3Dattr-fe-aut=
ocomplete-tel><a href=3D#attr-fe-autocomplete-tel>tel</a>&=
lt;/code>"
+       <td>4
+       <td>Contact
+      <tr><td>"<code title=3Dattr-fe-autocomplete-te=
l-country-code><a href=3D#attr-fe-autocomplete-tel-country-code>=
tel-country-code</a></code>"
+       <td>4
+       <td>Contact
+      <tr><td>"<code title=3Dattr-fe-autocomplete-te=
l-national><a href=3D#attr-fe-autocomplete-tel-national>tel-nati=
onal</a></code>"
+       <td>4
+       <td>Contact
+      <tr><td>"<code title=3Dattr-fe-autocomplete-te=
l-area-code><a href=3D#attr-fe-autocomplete-tel-area-code>tel-ar=
ea-code</a></code>"
+       <td>4
+       <td>Contact
+      <tr><td>"<code title=3Dattr-fe-autocomplete-te=
l-local><a href=3D#attr-fe-autocomplete-tel-local>tel-local</=
a></code>"
+       <td>4
+       <td>Contact
+      <tr><td>"<code title=3Dattr-fe-autocomplete-te=
l-local-prefix><a href=3D#attr-fe-autocomplete-tel-local-prefix>=
tel-local-prefix</a></code>"
+       <td>4
+       <td>Contact
+      <tr><td>"<code title=3Dattr-fe-autocomplete-te=
l-local-suffix><a href=3D#attr-fe-autocomplete-tel-local-suffix>=
tel-local-suffix</a></code>"
+       <td>4
+       <td>Contact
+      <tr><td>"<code title=3Dattr-fe-autocomplete-te=
l-extension><a href=3D#attr-fe-autocomplete-tel-extension>tel-ex=
tension</a></code>"
+       <td>4
+       <td>Contact
+      <tr><td>"<code title=3Dattr-fe-autocomplete-em=
ail><a href=3D#attr-fe-autocomplete-email>email</a></co=
de>"
+       <td>4
+       <td>Contact
+      <tr><td>"<code title=3Dattr-fe-autocomplete-im=
pp><a href=3D#attr-fe-autocomplete-impp>impp</a></code&=
gt;"     =20
+       <td>4
+       <td>Contact
+    </table></li>
+
+   <li><p>If <var title=3D"">category</va=
r> is Off, let the element's <a href=3D#autofill-field-name>auto=
fill field name</a>
+   be the string "<code title=3D"">off</code>=
", let its <a href=3D#autofill-hint-set>autofill hint set</=
a> be empty, and
+   let its <a href=3D#idl-exposed-autofill-value>IDL-exposed autof=
ill value</a> be the string "<code title=3D"">=
off</code>". Then,
+   abort these steps.</p>
+
+   <li><p>If <var title=3D"">category</va=
r> is Automatic, let the element's <a href=3D#autofill-field-name&g=
t;autofill field
+   name</a> be the string "<code title=3D"">o=
n</code>", let its <a href=3D#autofill-hint-set>autofill=
 hint set</a> be
+   empty, and let its <a href=3D#idl-exposed-autofill-value>IDL-ex=
posed autofill value</a> be the string "<code title=3D&quot=
;">on</code>". Then, abort these steps.</p>
+
+   <li><p>Let <var title=3D"">scope tokens&l=
t;/var> be an empty list.</li>
+
+   <li><p>Let <var title=3D"">hint tokens&lt=
;/var> be an empty set.</li>
+
+   <li><p>Let <var title=3D"">IDL value</=
var> have the same value as <var title=3D"">field</=
var>.</li>
+
+   <li><p>If the <var title=3D"">index</v=
ar>th token in <var title=3D"">tokens</var> is t=
he first entry,
+   then skip to the step labeled <i>done</i>.</li>
+
+   <li><p>Decrement <var title=3D"">index&lt=
;/var> by one.</li>
+
+   <li>
+
+    <p>If <var title=3D"">category</var> is =
Contact and the <var title=3D"">index</var>th token=
 in <var title=3D"">tokens</var> is an <a href=3D=
#ascii-case-insensitive>ASCII case-insensitive</a> match for one=
 of the strings in
+    the following list, then run the substeps that follow:</p>
+
+    <ul class=3Dbrief><li>"<code title=3Dattr-fe-aut=
ocomplete-home><a href=3D#attr-fe-autocomplete-home>home</a&g=
t;</code>"
+     <li>"<code title=3Dattr-fe-autocomplete-work><a=
 href=3D#attr-fe-autocomplete-work>work</a></code>"
+     <li>"<code title=3Dattr-fe-autocomplete-mobile>&lt=
;a href=3D#attr-fe-autocomplete-mobile>mobile</a></code>&q=
uot;
+     <li>"<code title=3Dattr-fe-autocomplete-fax><a =
href=3D#attr-fe-autocomplete-fax>fax</a></code>"
+     <li>"<code title=3Dattr-fe-autocomplete-pager><=
a href=3D#attr-fe-autocomplete-pager>pager</a></code>&quot=
;
+    </ul><p>The substeps are:</p>
+
+    <ol><li><p>Let <var title=3D"">con=
tact</var> be the matching string from the list above.</li>
+
+     <li><p>Insert <var title=3D"">contact&l=
t;/var> at the start of <var title=3D"">scope
+     tokens</var>.</li>
+
+     <li><p>Add <var title=3D"">contact</=
var> to <var title=3D"">hint tokens</var>.</l=
i>
+
+     <li><p>Let <var title=3D"">IDL value&lt=
;/var> be the concatenation of <var title=3D"">contact=
</var>, a
+     U+0020 SPACE character, and the previous value of <var title=3D&=
quot;">IDL value</var> (which at this
+     point will always be <var title=3D"">field</var&=
gt;).</li>
+
+     <li><p>If the <var title=3D"">index<=
/var>th entry in <var title=3D"">tokens</var> is=
 the first
+     entry, then skip to the step labeled <i>done</i>.</l=
i>
+
+     <li><p>Decrement <var title=3D"">index&=
lt;/var> by one.</li>
+
+    </ol></li>
+
+   <li>
+
+    <p>If the <var title=3D"">index</var>th =
token in <var title=3D"">tokens</var> is an <a h=
ref=3D#ascii-case-insensitive>ASCII
+    case-insensitive</a> match for one of the strings in the follo=
wing list, then run the
+    substeps that follow:</p>
+
+    <ul class=3Dbrief><li>"<code title=3Dattr-fe-aut=
ocomplete-shipping><a href=3D#attr-fe-autocomplete-shipping>ship=
ping</a></code>"
+     <li>"<code title=3Dattr-fe-autocomplete-billing>&l=
t;a href=3D#attr-fe-autocomplete-billing>billing</a></code&gt=
;"
+    </ul><p>The substeps are:</p>
+
+    <ol><li><p>Let <var title=3D"">mod=
e</var> be the matching string from the list above.</li>
+
+     <li><p>Insert <var title=3D"">mode</=
var> at the start of <var title=3D"">scope
+     tokens</var>.</li>
+
+     <li><p>Add <var title=3D"">mode</var=
> to <var title=3D"">hint tokens</var>.</li&g=
t;
+
+     <li><p>Let <var title=3D"">IDL value&lt=
;/var> be the concatenation of <var title=3D"">mode&lt=
;/var>, a
+     U+0020 SPACE character, and the previous value of <var title=3D&=
quot;">IDL value</var> (which at this
+     point will either be <var title=3D"">field</var&=
gt; or the concatenation of <var title=3D"">contact</v=
ar>, a space, and <var title=3D"">field</var>).&=
lt;/li>
+
+     <li><p>If the <var title=3D"">index<=
/var>th entry in <var title=3D"">tokens</var> is=
 the first
+     entry, then skip to the step labeled <i>done</i>.</l=
i>
+
+     <li><p>Decrement <var title=3D"">index&=
lt;/var> by one.</li>
+
+    </ol></li>
+
+   <li><p>If the <var title=3D"">index</v=
ar>th entry in <var title=3D"">tokens</var> is n=
ot the first
+   entry, then jump to the step labeled <i>default</i>.</=
li>
+
+   <li><p>If the first eight characters of the <var title=
=3D"">index</var>th token in <var title=3D"&qu=
ot;>tokens</var> are not an <a href=3D#ascii-case-insensitive=
>ASCII case-insensitive</a> match for the string "<code =
title=3Dattr-fe-autocomplete-section>section-</code>", then=
 jump to the step labeled
+   <i>default</i>.</li>
+
+   <li><p>Let <var title=3D"">section</va=
r> be the <var title=3D"">index</var>th token in=
 <var title=3D"">tokens</var>, <a href=3D#conver=
ted-to-ascii-lowercase>converted to ASCII lowercase</a>.</li&=
gt;
+
+   <li><p>Insert <var title=3D"">section<=
/var> at the start of <var title=3D"">scope
+   tokens</var>.</li>
+
+   <li><p>Let <var title=3D"">IDL value</=
var> be the concatenation of <var title=3D"">section&l=
t;/var>, a
+   U+0020 SPACE character, and the previous value of <var title=3D&qu=
ot;">IDL value</var>.</li>
+
+   <li><p><i>Done</i>: Let the element's <a h=
ref=3D#autofill-hint-set>autofill hint set</a> be <var title=3D=
"">hint
+   tokens</var>.</p>
+
+   <li><p>Let the element's <a href=3D#autofill-scope>=
autofill scope</a> be <var title=3D"">scope tokens&=
lt;/var>.</p>
+
+   <li><p>Let the element's <a href=3D#autofill-field-nam=
e>autofill field name</a> be <var title=3D"">fie=
ld</var>.</p>
+
+   <li><p>Let the element's <a href=3D#idl-exposed-autofi=
ll-value>IDL-exposed autofill value</a> be <var title=3D&quot=
;">IDL
+   value</var>.</p>
+
+   <li><p>Abort these steps.</li>
+
+   <li><p><i>Default</i>: Let the element's <=
a href=3D#idl-exposed-autofill-value>IDL-exposed autofill value</a&=
gt; be the empty
+   string, and its <a href=3D#autofill-hint-set>autofill hint set&=
lt;/a> and <a href=3D#autofill-scope>autofill scope</a> be=
 empty.</li>
+
+   <li><p>Let <var title=3D"">form</var&g=
t; be the element's <a href=3D#form-owner>form owner</a>, if =
any, or null
+   otherwise.</li>
+
+   <li>
+
+    <p>If <var title=3D"">form</var> is not =
null and <var title=3D"">form</var>'s <code titl=
e=3Dattr-form-autocomplete><a href=3D#attr-form-autocomplete>aut=
ocomplete</a></code> attribute is in the <a href=3D#attr-f=
orm-autocomplete-off-state title=3Dattr-form-autocomplete-off-state>of=
f</a> state, then let the element's <a href=3D#autofill-field-na=
me>autofill
+    field name</a> be "<code title=3Dattr-fe-autocomplete-=
off><a href=3D#attr-fe-autocomplete-off>off</a></code&g=
t;".</p>
+
+    <p>Otherwise, let the element's <a href=3D#autofill-field-n=
ame>autofill field name</a> be "<code title=3Dattr-fe-au=
tocomplete-on><a href=3D#attr-fe-autocomplete-on>on</a>&lt=
;/code>".</p>
+
+   </li>
+
+  </ol><p>When an element's <a href=3D#autofill-field-nam=
e>autofill field name</a> is "<code title=3Dattr-fe-auto=
complete-off><a href=3D#attr-fe-autocomplete-off>off</a>&l=
t;/code>", the user agent should not remember the control's
+  <a href=3D#concept-fe-value title=3Dconcept-fe-value>value</a=
>, and should not offer past values to the user.</p>
+
+  <p class=3Dnote>In addition, when an element's <a href=3D#aut=
ofill-field-name>autofill field name</a> is "<code title=
=3Dattr-fe-autocomplete-off><a href=3D#attr-fe-autocomplete-off>=
off</a></code>", <a href=3D#history-autocomplete>v=
alues are reset</a>
+  when <a href=3D#traverse-the-history title=3D"traverse the his=
tory">traversing the history</a>.</p>
+
+  <div class=3Dexample>
+
+   <p>Banks frequently do not want UAs to prefill login informatio=
n:</p>
+
+   <pre><p><label>Account: <inp=
ut type=3D"text" name=3D"ac" autocomplete=3D"off=
"></label></p>
+<p><label>PIN: <input type=3D"pa=
ssword" name=3D"pin" autocomplete=3D"off"&gt=
;</label></p></pre>
+
+  </div>
+
+  <p>When an element's <a href=3D#autofill-field-name>autofi=
ll field name</a> is <em>not</em> "<code title=3D=
attr-fe-autocomplete-off><a href=3D#attr-fe-autocomplete-off>off=
</a></code>", the user agent may store the control's &lt=
;a href=3D#concept-fe-value title=3Dconcept-fe-value>value</a>, =
and may offer previously stored values to the user.</p>
+
+  <p>When the <a href=3D#autofill-field-name>autofill field =
name</a> is "<code title=3Dattr-fe-autocomplete-on><a=
 href=3D#attr-fe-autocomplete-on>on</a></code>",
+  the user agent should attempt to use heuristics to determine the most =
appropriate values to offer
+  the user, e.g. based on the element's <code title=3Dattr-fe-name&gt=
;<a href=3D#attr-fe-name>name</a></code> value, the pos=
ition
+  of the element in the document's DOM, what other fields exist in the f=
orm, and so forth.</p>
+
+  <p>When the <a href=3D#autofill-field-name>autofill field =
name</a> is one of the names of the <a href=3D#autofill-field ti=
tle=3D"autofill
+  field">autofill fields</a> described above, the user age=
nt should provide suggestions that
+  match the meaning of the field name as given in the table earlier in t=
his section. The
+  <a href=3D#autofill-hint-set>autofill hint set</a> should =
be used to select amongst multiple possible suggestions.</p>
+
+  <p class=3Dexample>For example, if a user once entered one addre=
ss into fields that used the
+  "<code title=3Dattr-fe-autocomplete-shipping><a href=3D#=
attr-fe-autocomplete-shipping>shipping</a></code>" ke=
yword, and another address into
+  fields that used the "<code title=3Dattr-fe-autocomplete-billi=
ng><a href=3D#attr-fe-autocomplete-billing>billing</a><=
/code>" keyword, then in
+  subsequent forms only the first address would be suggested for form co=
ntrols whose <a href=3D#autofill-hint-set>autofill
+  hint set</a> contains the keyword "<code title=3Dattr-fe=
-autocomplete-shipping><a href=3D#attr-fe-autocomplete-shipping>=
shipping</a></code>". Both addresses might be suggested,
+  however, for address-related form controls whose <a href=3D#autofil=
l-hint-set>autofill hint set</a> does not contain
+  either keyword.</p>
+
+  <p>When the user agent autofills form controls, elements with th=
e same <a href=3D#form-owner>form owner</a> and
+  the same <a href=3D#autofill-scope>autofill scope</a> must=
 use data relating to the same person, address, payment
+  instrument, and contact details. <span id=3Dautofill-country title=3D=
"">When a user agent autofills
+  "<code title=3Dattr-fe-autocomplete-country><a href=3D#a=
ttr-fe-autocomplete-country>country</a></code>" and &=
quot;<code title=3Dattr-fe-autocomplete-country-name><a href=3D#=
attr-fe-autocomplete-country-name>country-name</a></code>&=
quot; fields with the same <a href=3D#form-owner>form
+  owner</a> and <a href=3D#autofill-scope>autofill scope<=
/a>, and the user agent has a value for the <code title=3Dattr-fe-a=
utocomplete-country><a href=3D#attr-fe-autocomplete-country>coun=
try</a></code>" field(s), then the "<code title=3D=
attr-fe-autocomplete-country-name><a href=3D#attr-fe-autocomplete-c=
ountry-name>country-name</a></code>" field(s) must be=
 filled using a
+  human-readable name for the same country.</span> When a user age=
nt fills in multiple fields at
+  once, all fields with the same <a href=3D#autofill-field-name>au=
tofill field name</a>, <a href=3D#form-owner>form owner</a=
> and
+  <a href=3D#autofill-scope>autofill scope</a> must be fille=
d with the same value.</p>
+
+  <p class=3Dexample>Suppose a user agent knows of two phone numbe=
rs, +1 555 123 1234 and +1 555 666
+  7777. It would not be conforming for the user agent to fill a field wi=
th <code title=3D"">autocomplete=3D"shipping tel-loc=
al-prefix"</code> with the value "123" and another f=
ield in
+  the same form with <code title=3D"">autocomplete=3D&qu=
ot;shipping tel-local-suffix"</code> with the value
+  "7777". The only valid prefilled values given the aforementi=
oned information would be "123" and
+  "1234", or "666" and "7777", respectivel=
y.</p>
+
+  <p class=3Dexample>Similarly, if a form for some reason containe=
d both a "<code title=3Dattr-fe-autocomplete-cc-exp><a href=
=3D#attr-fe-autocomplete-cc-exp>cc-exp</a></code>" fi=
eld and a "<code title=3Dattr-fe-autocomplete-cc-exp-month>&lt=
;a href=3D#attr-fe-autocomplete-cc-exp-month>cc-exp-month</a>&lt=
;/code>" field, and the user agent prefilled
+  the form, then the month component of the former would have to match t=
he latter.</p>
+
+  <p>The autocompletion mechanism must be implemented by the user =
agent acting as if the user had
+  modified the element's <a href=3D#concept-fe-value title=3Dconcept-=
fe-value>value</a>, and must be done at a time
+  where the element is <i title=3Dconcept-fe-mutable><a href=3D=
#concept-fe-mutable>mutable</a></i> (e.g. just after the e=
lement has
+  been inserted into the document, or when the user agent <a href=3D#=
stop-parsing title=3D"stop parsing">stops
+  parsing</a>). User agents must only prefill controls using value=
s that the user could have
+  entered.</p>
+
+  <p class=3Dexample>For example, if a <code><a href=3D#t=
he-select-element>select</a></code> element only has <c=
ode><a href=3D#the-option-element>option</a></code>
+  elements with values "Steve" and "Rebecca", "=
Jay", and "Bob", and has an <a href=3D#autofill-field-n=
ame>autofill field
+  name</a> "<code title=3Dattr-fe-autocomplete-given-name&=
gt;<a href=3D#attr-fe-autocomplete-given-name>given-name</a>&=
lt;/code>", but the user
+  agent's only idea for what to prefill the field with is "Evan&quo=
t;, then the user agent cannot prefill
+  the field. It would not be conforming to somehow set the <code>&=
lt;a href=3D#the-select-element>select</a></code> element =
to the value
+  "Evan", since the user could not have done so themselves.&lt=
;/p>
+
+  <p>A user agent prefilling a form control's <a href=3D#concep=
t-fe-value title=3Dconcept-fe-value>value</a> must not
+  cause that control to <a href=3D#suffering-from-a-type-mismatch tit=
le=3D"suffering from a type mismatch">suffer from a type
+  mismatch</a>, <a href=3D#suffering-from-a-pattern-mismatch ti=
tle=3D"suffering from a pattern mismatch">suffer from a patt=
ern
+  mismatch</a>, <a href=3D#suffering-from-being-too-long title=3D=
"suffering from being too long">suffer from being too long&l=
t;/a>,
+  <a href=3D#suffering-from-being-too-short title=3D"suffering f=
rom being too short">suffer from being too short</a>, <a=
 href=3D#suffering-from-an-underflow title=3D"suffering from an unde=
rflow">suffer from an underflow</a>, <a href=3D#sufferin=
g-from-an-overflow title=3D"suffering from
+  an overflow">suffer from an overflow</a>, or <a href=3D=
#suffering-from-a-step-mismatch title=3D"suffering from a step
+  mismatch">suffer from a step mismatch</a>. Where possibl=
e given the control's constraints, user
+  agents must use the format given as canonical in the aforementioned ta=
ble. Where it's not possible
+  for the canonical format to be used, user agents should use heuristics=
 to attempt to convert
+  values so that they can be used.</p>
+
+  <div class=3Dexample>
+
+   <p>For example, if the user agent knows that the user's middle =
name is "Ines", and attempts to
+   prefill a form control that looks like this:</p>
+
+   <pre><input name=3Dmiddle-initial maxlength=3D1 autocomp=
lete=3D"additional-name"></pre>
+
+   <p>...then the user agent could convert "Ines" to &qu=
ot;I" and prefill it that way.</p>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>A more elaborate example would be with month values. If the =
user agent knows that the user's
+   birthday is the 27th of July 2012, then it might try to prefill all o=
f the following controls
+   with slightly different values, all driven from this information:<=
/p>
+
+   <table><tr><td>
+      <pre><input name=3Db type=3Dmonth autocomplete=3D&quo=
t;bday"></pre>
+     <td>
+      2012-07
+     <td>
+      The day is dropped since the <a href=3D"#month-state-(type=
=3Dmonth)" title=3Dattr-input-type-month>Month</a> state on=
ly accepts a
+      month/year combination.
+    <tr><td>
+      <pre><select name=3Dc autocomplete=3D"bday"=
>
+ <option>Jan
+ <option>Feb
+ <em>...</em>
+ <option>Jul
+ <option>Aug
+ <em>...</em>
+</select></pre>
+     <td>
+      July
+     <td>
+      The user agent picks the month from the listed options, either by =
noticing there are twelve
+      options and picking the 7th, or by recognising that one of the str=
ings (three characters "Jul"
+      followed by a newline and a space) is a close match for the name o=
f the month (July) in one of
+      the user agent's supported languages, or through some other simila=
r mechanism.
+    <tr><td>
+      <pre><input name=3Da type=3Dnumber min=3D1 max=3D12 a=
utocomplete=3D"bday-month"></pre>
+     <td>
+      7
+     <td>
+      User agent converts "July" to a month number in the rang=
e 1..12, like the field.
+    <tr><td>
+      <pre><input name=3Da type=3Dnumber min=3D0 max=3D11 a=
utocomplete=3D"bday-month"></pre>
+     <td>
+      6
+     <td>
+      User agent converts "July" to a month number in the rang=
e 0..11, like the field.
+    <tr><td>
+      <pre><input name=3Da type=3Dnumber min=3D1 max=3D11 a=
utocomplete=3D"bday-month"></pre>
+     <td>
+     <td>
+      User agent doesn't fill in the field, since it can't make a good g=
uess as to what the form expects.
+   </table></div>
+
+  <p>A user agent may allow the user to override an element's <=
a href=3D#autofill-field-name>autofill field name</a>, e.g.
+  to change it from "<code title=3Dattr-fe-autocomplete-off>&=
lt;a href=3D#attr-fe-autocomplete-off>off</a></code>"=
 to "<code title=3Dattr-fe-autocomplete-on><a href=3D#attr-=
fe-autocomplete-on>on</a></code>" to allow values to =
be remembered and prefilled despite
+  the page author's objections, or to always "<code title=3Dattr=
-fe-autocomplete-off><a href=3D#attr-fe-autocomplete-off>off<=
/a></code>",
+  never remembering values. However, user agents should not allow users =
to trivially override the
+  <a href=3D#autofill-field-name>autofill field name</a> fro=
m "<code title=3Dattr-fe-autocomplete-off><a href=3D#attr-f=
e-autocomplete-off>off</a></code>" to
+  "<code title=3Dattr-fe-autocomplete-on><a href=3D#attr-f=
e-autocomplete-on>on</a></code>" or other values, as =
there are significant
+  security implications for the user if all values are always remembered=
, regardless of the site's
+  preferences.</p>
+
+  <p>The <dfn id=3Ddom-fe-autocomplete title=3Ddom-fe-autocompl=
ete><code>autocomplete</code></dfn> IDL attribute, o=
n getting,
+  must return the element's <a href=3D#idl-exposed-autofill-value>=
IDL-exposed autofill value</a>, and on setting, must
+  <a href=3D#reflect>reflect</a> the content attribute of th=
e same name.</p>
+
+  </div>
+
+
+
+<!--TOPIC:DOM APIs-->
+  <h4 id=3DtextFieldSelection><span class=3Dsecno>4.10.20 &l=
t;/span>APIs for the text field selections</h4>
+
+  <!-- v2 idea: DOM Range APIs to expose the textarea/input edited va=
lue (ack martijnw) -->
+
+  <p>The <code><a href=3D#the-input-element>input</=
a></code> and <code><a href=3D#the-textarea-element>=
textarea</a></code> elements define the following members in =
their
+  DOM interfaces for handling their selection:</p>
+
+  <pre class=3D"idl extract">  void <a href=3D#dom-te=
xtarea/input-select title=3Ddom-textarea/input-select>select</a>=
();
+           attribute unsigned long <a href=3D#dom-textarea/input-sele=
ctionstart title=3Ddom-textarea/input-selectionStart>selectionStart&lt=
;/a>;
+           attribute unsigned long <a href=3D#dom-textarea/input-sele=
ctionend title=3Ddom-textarea/input-selectionEnd>selectionEnd</a&gt=
;;
+           attribute DOMString <a href=3D#dom-textarea/input-selectio=
ndirection title=3Ddom-textarea/input-selectionDirection>selectionDire=
ction</a>;
+  void <a href=3D#dom-textarea/input-setrangetext title=3Ddom-textare=
a/input-setRangeText>setRangeText</a>(DOMString replacement);
+  void <a href=3D#dom-textarea/input-setrangetext title=3Ddom-textare=
a/input-setRangeText>setRangeText</a>(DOMString replacement, uns=
igned long start, unsigned long end, optional <a href=3D#selectionmode=
>SelectionMode</a> selectionMode =3D "preserve");
+  void <a href=3D#dom-textarea/input-setselectionrange title=3Ddom-te=
xtarea/input-setSelectionRange>setSelectionRange</a>(unsigned lo=
ng start, unsigned long end, optional DOMString direction =3D "prese=
rve");</pre>
+  <!-- v2: also add textLength? it seems to be widely used -->
+
+  <p>The <code title=3Ddom-textarea/input-setRangeText><a=
 href=3D#dom-textarea/input-setrangetext>setRangeText</a></co=
de> method uses the following
+  enumeration:</p>
+
+  <pre class=3Didl>enum <dfn id=3Dselectionmode>SelectionMod=
e</dfn> {
+  "<a href=3D#dom-selectionmode-select title=3Ddom-SelectionMode=
-select>select</a>",
+  "<a href=3D#dom-selectionmode-start title=3Ddom-SelectionMode-=
start>start</a>",
+  "<a href=3D#dom-selectionmode-end title=3Ddom-SelectionMode-en=
d>end</a>",
+  "<a href=3D#dom-selectionmode-preserve title=3Ddom-SelectionMo=
de-preserve>preserve</a>", // default
+};</pre>
+
+  <p>These methods and attributes expose and control the selection=
 of <code><a href=3D#the-input-element>input</a></co=
de> and
+  <code><a href=3D#the-textarea-element>textarea</a>&l=
t;/code> text fields.</p>
+
+  <dl class=3Ddomintro><dt><var title=3D"">e=
lement</var> . <code title=3Ddom-textarea/input-select><a =
href=3D#dom-textarea/input-select>select</a></code>()</=
dt>
+
+   <dd>
+
+    <p>Selects everything in the text field.</p>
+
+   </dd>
+
+   <dt><var title=3D"">element</var> . <c=
ode title=3Ddom-textarea/input-selecionStart>selectionStart</code&g=
t; [ =3D <var title=3D"">value</var> ]</dt>
+
+   <dd>
+
+    <p>Returns the offset to the start of the selection.</p>
+
+    <p>Can be set, to change the start of the selection.</p>
+
+   </dd>
+
+   <dt><var title=3D"">element</var> . <c=
ode title=3Ddom-textarea/input-selecionEnd>selectionEnd</code> [=
 =3D <var title=3D"">value</var> ]</dt>
+
+   <dd>
+
+    <p>Returns the offset to the end of the selection.</p>
+
+    <p>Can be set, to change the end of the selection.</p>
+
+   </dd>
+
+   <dt><var title=3D"">element</var> . <c=
ode title=3Ddom-textarea/input-selecionDirection>selectionDirection&lt=
;/code> [ =3D <var title=3D"">value</var> ]</=
dt>
+
+   <dd>
+
+    <p>Returns the current direction of the selection.</p>
+
+    <p>Can be set, to change the direction of the selection.</p=
>
+
+    <p>The possible values are "<code title=3D""=
>forward</code>", "<code title=3D"">ba=
ckward</code>", and "<code title=3D"">non=
e</code>".</p>
+
+   </dd>
+
+   <dt><var title=3D"">element</var> . <c=
ode title=3Ddom-textarea/input-setSelectionRange><a href=3D#dom-tex=
tarea/input-setselectionrange>setSelectionRange</a></code>=
(<var title=3D"">start</var>, <var title=3D&quot=
;">end</var> [, <var title=3D"">direction&l=
t;/var>] )</dt>
+
+   <dd>
+
+    <p>Changes the selection to cover the given substring in the g=
iven direction. If the direction
+    is omitted, it will be reset to be the platform default (none or for=
ward).</p>
+
+   </dd>
+
+   <dt><var title=3D"">element</var> . <c=
ode title=3Ddom-textarea/input-setRangeText><a href=3D#dom-textarea=
/input-setrangetext>setRangeText</a></code>(<var title=3D=
"">replacement</var> [, <var title=3D""&g=
t;start</var>, <var title=3D"">end</var> [, &=
lt;var title=3D"">selectionMode</var> ] ] )</dt>
+
+   <dd>
+
+    <p>Replaces a range of text with the new text. If the <var =
title=3D"">start</var> and <var title=3D"&quot=
;>end</var> arguments are not provided, the range is assumed to =
be the selection.</p>
+
+    <p>The final argument determines how the selection should be s=
et after the text has been
+    replaced. The possible values are:</p>
+
+    <dl><dt>"<code title=3Ddom-SelectionMode-select&=
gt;<a href=3D#dom-selectionmode-select>select</a></code&gt=
;"</dt>
+
+     <dd>Selects the newly inserted text.</dd>
+
+
+     <dt>"<code title=3Ddom-SelectionMode-start><a h=
ref=3D#dom-selectionmode-start>start</a></code>"</=
dt>
+
+     <dd>Moves the selection to just before the inserted text.<=
/dd>
+
+
+     <dt>"<code title=3Ddom-SelectionMode-end><a hre=
f=3D#dom-selectionmode-end>end</a></code>"</dt>
+
+     <dd>Moves the selection to just after the selected text.</=
dd>
+
+
+     <dt>"<code title=3Ddom-SelectionMode-preserve><=
a href=3D#dom-selectionmode-preserve>preserve</a></code>&q=
uot;</dt>
+
+     <dd>Attempts to preserve the selection. This is the default.&=
lt;/dd>
+
+
+    </dl></dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>For <code><a href=3D#the-input-element>input</=
a></code> elements, calling these methods while they <a href=3D=
#do-not-apply title=3D"do not
+  apply">don't apply</a>, and getting or setting these att=
ributes while they <a href=3D#do-not-apply title=3D"do not
+  apply">don't apply</a>, must throw an <code><a =
href=3D#invalidstateerror>InvalidStateError</a></code> exc=
eption. Otherwise, they
+  must act as described below.</p>
+
+  <p>For <code><a href=3D#the-input-element>input</=
a></code> elements, these methods and attributes must operate on=
 the element's
+  <a href=3D#concept-fe-value title=3Dconcept-fe-value>value</a=
>. For <code><a href=3D#the-textarea-element>textarea</=
a></code> elements, these methods and
+  attributes must operate on the element's <a href=3D#concept-textare=
a-raw-value title=3Dconcept-textarea-raw-value>raw
+  value</a>.</p>
+
+  <p>Where possible, user interface features for changing the text=
 selection in <code><a href=3D#the-input-element>input</a&=
gt;</code>
+  and <code><a href=3D#the-textarea-element>textarea</a&g=
t;</code> elements must be implemented in terms of the DOM API desc=
ribed in this
+  section, so that, e.g., all the same events fire.</p>
+
+
+  <p>The selections of <code><a href=3D#the-input-element=
>input</a></code> and <code><a href=3D#the-textar=
ea-element>textarea</a></code> elements have a
+  <i>direction</i>, which is either <i>forward</i&g=
t;, <i>backward</i>, or <i>none</i>. This directi=
on
+  is set when the user manipulates the selection. The exact meaning of t=
he selection direction
+  depends on the platform.</p>
+
+  <p class=3Dnote>On Windows, the direction indicates the position=
 of the caret relative to the
+  selection: a <i>forward</i> selection has the caret at the=
 end of the selection and a
+  <i>backward</i> selection has the caret at the start of th=
e selection. Windows has no <i>none</i>
+  direction. On Mac, the direction indicates which end of the selection =
is affected when the user
+  adjusts the size of the selection using the arrow keys with the Shift =
modifier: the forward
+  direction means the end of the selection is modified, and the backward=
s direction means the start
+  of the selection is modified. The none direction is the default on Mac=
, it indicates that no
+  particular direction has yet been selected. The user sets the directio=
n implicitly when first
+  adjusting the selection, based on which directional arrow key was used=
.</p>
+
+
+  <p>The <dfn id=3Ddom-textarea/input-select title=3Ddom-textar=
ea/input-select><code>select()</code></dfn> method m=
ust cause the
+  contents of the text field to be fully selected, with the selection di=
rection being none, if the
+  platform support selections with the direction <i>none</i>=
, or otherwise <i>forward</i>. The user
+  agent must then <a href=3D#queue-a-task>queue a task</a> t=
o <a href=3D#fire-a-simple-event>fire a simple event</a> that=
 bubbles named
+  <code title=3Devent-select>select</code> at the element, u=
sing the <a href=3D#user-interaction-task-source>user interaction t=
ask
+  source</a> as the task source.</p>
+
+
+  <p>The <dfn id=3Ddom-textarea/input-selectionstart title=3Ddo=
m-textarea/input-selectionStart><code>selectionStart</code&gt=
;</dfn> attribute
+  must, on getting, return the offset (in logical order) to the characte=
r that immediately follows
+  the start of the selection. If there is no selection, then it must ret=
urn the offset (in logical
+  order) to the character that immediately follows the text entry cursor=
.</p>
+
+  <p>On setting, it must act as if the <code title=3Ddom-textar=
ea/input-setSelectionRange><a href=3D#dom-textarea/input-setselecti=
onrange>setSelectionRange()</a></code> method had been cal=
led,
+  with the new value as the first argument; the current value of the &lt=
;code title=3Ddom-textarea/input-selectionEnd><a href=3D#dom-textar=
ea/input-selectionend>selectionEnd</a></code> attribute as=
 the second argument,
+  unless the current value of the <code title=3Ddom-textarea/input-se=
lectionEnd><a href=3D#dom-textarea/input-selectionend>selectionE=
nd</a></code>
+  is less than the new value, in which case the second argument must als=
o be the new value; and the
+  current value of the <code title=3Ddom-textarea/input-selectionDire=
ction><a href=3D#dom-textarea/input-selectiondirection>selection=
Direction</a></code>
+  as the third argument.</p>
+
+
+  <p>The <dfn id=3Ddom-textarea/input-selectionend title=3Ddom-=
textarea/input-selectionEnd><code>selectionEnd</code></=
dfn> attribute
+  must, on getting, return the offset (in logical order) to the characte=
r that immediately follows
+  the end of the selection. If there is no selection, then it must retur=
n the offset (in logical
+  order) to the character that immediately follows the text entry cursor=
.</p>
+
+  <p>On setting, it must act as if the <code title=3Ddom-textar=
ea/input-setSelectionRange><a href=3D#dom-textarea/input-setselecti=
onrange>setSelectionRange()</a></code> method had been cal=
led,
+  with the current value of the <code title=3Ddom-textarea/input-sele=
ctionStart><a href=3D#dom-textarea/input-selectionstart>selectio=
nStart</a></code> attribute as the first argument,
+  the new value as the second argument, and the current value of the &lt=
;code title=3Ddom-textarea/input-selectionDirection><a href=3D#dom-=
textarea/input-selectiondirection>selectionDirection</a></cod=
e> as the third argument.</p>
+
+
+  <p>The <dfn id=3Ddom-textarea/input-selectiondirection title=3D=
dom-textarea/input-selectionDirection><code>selectionDirection&l=
t;/code></dfn>
+  attribute must, on getting, return the string corresponding to the cur=
rent selection direction: if
+  the direction is <i>forward</i>, "<code title=3D&q=
uot;">forward</code>"; if the direction is
+  <i>backward</i>, "<code title=3D"">ba=
ckward</code>"; and otherwise, "<code title=3D"&q=
uot;>none</code>".</p>
+
+  <p>On setting, it must act as if the <code title=3Ddom-textar=
ea/input-setSelectionRange><a href=3D#dom-textarea/input-setselecti=
onrange>setSelectionRange()</a></code> method had been cal=
led,
+  with the current value of the <code title=3Ddom-textarea/input-sele=
ctionStart><a href=3D#dom-textarea/input-selectionstart>selectio=
nStart</a></code> attribute as the first argument,
+  the current value of the <code title=3Ddom-textarea/input-selection=
End><a href=3D#dom-textarea/input-selectionend>selectionEnd</=
a></code>
+  attribute as the second argument, and the new value as the third argum=
ent.</p>
+
+
+  <p>The <dfn id=3Ddom-textarea/input-setselectionrange title=3D=
dom-textarea/input-setSelectionRange><code>setSelectionRange(&lt=
;var title=3D"">start</var>, <var title=3D"&qu=
ot;>end</var>, <var title=3D"">direction</var=
>)</code></dfn> method
+  must set the selection of the text field to the sequence of characters=
 starting with the character
+  at the <var title=3D"">start</var>th position (i=
n logical order) and ending with the character at
+  the <span title=3D"">(<var title=3D"">=
end</var>-1)</span>th position. Arguments greater than the
+  length of the value of the text field must be treated as pointing at t=
he end of the text field. If
+  <var title=3D"">end</var> is less than or equal =
to <var title=3D"">start</var> then the start of th=
e
+  selection and the end of the selection must both be placed immediately=
 before the character with
+  offset <var title=3D"">end</var>. In UAs where t=
here is no concept of an empty selection, this must
+  set the cursor to be just before the character with offset <var tit=
le=3D"">end</var>. The direction
+  of the selection must be set to <i>backward</i> if <var=
 title=3D"">direction</var> is a
+  <a href=3D#case-sensitive>case-sensitive</a> match for the=
 string "<code title=3D"">backward</code>&quot=
;, <i>forward</i>
+  if <var title=3D"">direction</var> is a <a hr=
ef=3D#case-sensitive>case-sensitive</a> match for the string &qu=
ot;<code title=3D"">forward</code>" or if the =
platform does not support selections with the direction
+  <i>none</i>, and <i>none</i> otherwise (includ=
ing if the argument is omitted). The user agent must
+  then <a href=3D#queue-a-task>queue a task</a> to <a hre=
f=3D#fire-a-simple-event>fire a simple event</a> that bubbles na=
med <code title=3Devent-select>select</code> at the element, =
using the <a href=3D#user-interaction-task-source>user interaction =
task
+  source</a> as the task source.</p>
+
+
+  <p>The <dfn id=3Ddom-textarea/input-setrangetext title=3Ddom-=
textarea/input-setRangeText><code>setRangeText(<var title=3D&=
quot;">replacement</var>, <var title=3D"">s=
tart</var>, <var title=3D"">end</var>, <va=
r title=3D"">selectMode</var>)</code></dfn&gt=
; method must run the following steps:</p>
+
+  <ol><li>
+
+    <p>If the method has only one argument, then let <var title=
=3D"">start</var> and <var title=3D"">=
end</var> have the values of the <code title=3Ddom-textarea/inpu=
t-selectionStart><a href=3D#dom-textarea/input-selectionstart>se=
lectionStart</a></code> attribute and the <code title=3Ddo=
m-textarea/input-selectionEnd><a href=3D#dom-textarea/input-selecti=
onend>selectionEnd</a></code> attribute respectively.</=
p>
+
+    <p>Otherwise, let <var title=3D"">start</va=
r>, <var title=3D"">end</var> have the values of=
 the
+    second and third arguments respectively.</p>
+
+   </li>
+
+   <li><p>If <var title=3D"">start</var&g=
t; is greater than <var title=3D"">end</var>, then =
throw an
+   <code><a href=3D#indexsizeerror>IndexSizeError</a>&=
lt;/code> exception and abort these steps.</li>
+
+   <li><p>If <var title=3D"">start</var&g=
t; is greater than the length of the value of the text field,
+   then set it to the length of the value of the text field.</li>
+
+   <li><p>If <var title=3D"">end</var>=
 is greater than the length of the value of the text field,
+   then set it to the length of the value of the text field.</li>
+
+   <li><p>Let <var title=3D"">selection star=
t</var> be the current value of the <code title=3Ddom-textarea/i=
nput-selectionStart><a href=3D#dom-textarea/input-selectionstart&gt=
;selectionStart</a></code> attribute.</li>
+
+   <li><p>Let <var title=3D"">selection end&=
lt;/var> be the current value of the <code title=3Ddom-textarea/inp=
ut-selectionEnd><a href=3D#dom-textarea/input-selectionend>selec=
tionEnd</a></code> attribute.</li>
+
+   <li><p>If <var title=3D"">start</var&g=
t; is less than <var title=3D"">end</var>, delete t=
he sequence of
+   characters starting with the character at the <var title=3D"&=
quot;>start</var>th position (in logical
+   order) and ending with the character at the <span title=3D"&q=
uot;>(<var title=3D"">end</var>-1)</span>t=
h
+   position.</li>
+
+   <li><p>Insert the value of the first argument into the te=
xt of the value of the text field,
+   immediately before the <var title=3D"">start</var&=
gt;th character.</li>
+
+   <li><p>Let <var title=3D"">new length<=
/var> be the length of the value of the first argument.</li>
+
+   <li><p>Let <var title=3D"">new end</va=
r> be the sum of <var title=3D"">start</var> and=
 <var title=3D"">new length</var>.</li>
+
+   <li>
+
+    <p>Run the appropriate set of substeps from the following list=
:</p>
+
+    <dl class=3Dswitch><dt>If the fourth argument's value is=
 "<dfn id=3Ddom-selectionmode-select title=3Ddom-SelectionMode-se=
lect><code>select</code></dfn>"</dt>
+
+     <dd>
+
+      <p>Let <var title=3D"">selection start</v=
ar> be <var title=3D"">start</var>.</p>
+
+      <p>Let <var title=3D"">selection end</var=
> be <var title=3D"">new end</var>.</p>
+
+     </dd>
+
+     <dt>If the fourth argument's value is "<dfn id=3Ddom-=
selectionmode-start title=3Ddom-SelectionMode-start><code>start&=
lt;/code></dfn>"</dt>
+
+     <dd>
+
+      <p>Let <var title=3D"">selection start</v=
ar> and <var title=3D"">selection end</var> be &=
lt;var title=3D"">start</var>.</p>
+
+     </dd>
+
+     <dt>If the fourth argument's value is "<dfn id=3Ddom-=
selectionmode-end title=3Ddom-SelectionMode-end><code>end</co=
de></dfn>"</dt>
+
+     <dd>
+
+      <p>Let <var title=3D"">selection start</v=
ar> and <var title=3D"">selection end</var> be &=
lt;var title=3D"">new end</var>.</p>
+
+     </dd>
+
+     <dt>If the fourth argument's value is "<dfn id=3Ddom-=
selectionmode-preserve title=3Ddom-SelectionMode-preserve><code>=
preserve</code></dfn>" (the default)</dt>
+
+     <dd>
+
+      <ol><li><p>Let <var title=3D"">o=
ld length</var> be <var title=3D"">end</var> =
minus <var title=3D"">start</var>.</p>
+
+       <li><p>Let <var title=3D"">delta</=
var> be <var title=3D"">new length</var> minus &=
lt;var title=3D"">old length</var>.</p>
+
+       <li>
+
+        <p>If <var title=3D"">selection start</=
var> is greater than <var title=3D"">end</var>, =
then
+        increment it by <var title=3D"">delta</var&gt=
;. (If <var title=3D"">delta</var> is negative, i.e=
.
+        the new text is shorter than the old text, then this will <em=
>decrease</em> the value of
+        <var title=3D"">selection start</var>.)&lt=
;/p>
+
+        <p>Otherwise: if <var title=3D"">selection=
 start</var> is greater than <var title=3D"">start&=
lt;/var>, then set it to <var title=3D"">start</var=
>. (This snaps the start of the
+        selection to the start of the new text if it was in the middle o=
f the text that it
+        replaced.)</p>
+
+       </li>
+
+       <li>
+
+        <p>If <var title=3D"">selection end</va=
r> is greater than <var title=3D"">end</var>, th=
en
+        increment it by <var title=3D"">delta</var&gt=
; in the same way.</p>
+
+        <p>Otherwise: if <var title=3D"">selection=
 end</var> is greater than <var title=3D"">start&lt=
;/var>, then set it to <var title=3D"">new end</var=
>. (This snaps the end of the
+        selection to the end of the new text if it was in the middle of =
the text that it
+        replaced.)</p>
+
+       </li>
+
+      </ol></dd>
+
+    </dl></li>
+
+   <li>
+
+    <p>Set the selection of the text field to the sequence of char=
acters starting with the character
+    at the <var title=3D"">selection start</var>th=
 position (in logical order) and ending with the
+    character at the <span title=3D"">(<var title=3D&=
quot;">selection end</var>-1)</span>th position. In U=
As
+    where there is no concept of an empty selection, this must set the c=
ursor to be just before the
+    character with offset <var title=3D"">end</var&gt=
;. The direction of the selection must be set to
+    <i>forward</i> if the platform does not support selectio=
ns with the direction <i>none</i>, and
+    <i>none</i> otherwise.</p>
+
+   </li>
+
+   <li><p><a href=3D#queue-a-task>Queue a task</a&g=
t; to <a href=3D#fire-a-simple-event>fire a simple event</a> =
that bubbles named <code title=3Devent-select>select</code> a=
t the element, using the <a href=3D#user-interaction-task-source>us=
er interaction task
+   source</a> as the task source.</li>
+
+  </ol><p>All elements to which this API <a href=3D#conce=
pt-input-apply title=3Dconcept-input-apply>applies</a> have eith=
er a
+  selection or a text entry cursor position at all times (even for eleme=
nts that are not <a href=3D#being-rendered>being
+  rendered</a>). User agents should follow platform conventions to=
 determine their initial
+  state.</p>
+
+  </div>
+
+
+  <p>Characters with no visible rendering, such as U+200D ZERO WID=
TH JOINER, still count as
+  characters. Thus, for instance, the selection can include just an invi=
sible character, and the
+  text insertion cursor can be placed to one side or another of such a c=
haracter.</p>
+
+  <div class=3Dexample>
+
+   <p>To obtain the currently selected text, the following JavaScr=
ipt suffices:</p>
+
+   <pre>var selectionText =3D control.value.substring(control.sele=
ctionStart, control.selectionEnd);</pre>
+
+   <p>...where <var title=3D"">control</var>=
 is the <code><a href=3D#the-input-element>input</a>&lt=
;/code> or <code><a href=3D#the-textarea-element>textarea&=
lt;/a></code>
+   element.</p>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>To add some text at the start of a text control, while maint=
aining the text selection, the
+   three attributes must be preserved:</p>
+
+   <pre>var oldStart =3D control.selectionStart;
+var oldEnd =3D control.selectionEnd;
+var oldDirection =3D control.selectionDirection;
+var prefix =3D "http://";
+control.value =3D prefix + control.value;
+control.setSelectionRange(oldStart + prefix.length, oldEnd + prefix.leng=
th, oldDirection);</pre>
+
+   <p>...where <var title=3D"">control</var>=
 is the <code><a href=3D#the-input-element>input</a>&lt=
;/code> or <code><a href=3D#the-textarea-element>textarea&=
lt;/a></code>
+   element.</p>
+
+  </div>
+<!--TOPIC:HTML-->
+
+
+
+  <h4 id=3Dconstraints><span class=3Dsecno>4.10.21 </span=
>Constraints</h4>
+
+  <h5 id=3Ddefinitions><span class=3Dsecno>4.10.21.1 </sp=
an>Definitions</h5>
+
+  <div class=3Dimpl>
+
+  <p>A <a href=3D#category-submit title=3Dcategory-submit>su=
bmittable element</a> is a <dfn id=3Dcandidate-for-constraint-va=
lidation>candidate for constraint
+  validation</dfn> except when a condition has <dfn id=3Dbarred=
-from-constraint-validation title=3D"barred from constraint validati=
on">barred
+  the element from constraint validation</dfn>. (For example, an e=
lement is <a href=3D#barred-from-constraint-validation>barred from
+  constraint validation</a> if it is an <code><a href=3D#=
the-object-element>object</a></code> element.)</p>
+
+  <p>An element can have a <dfn id=3Dcustom-validity-error-mess=
age>custom validity error message</dfn> defined. Initially, an e=
lement
+  must have its <a href=3D#custom-validity-error-message>custom va=
lidity error message</a> set to the empty string. When its value
+  is not the empty string, the element is <a href=3D#suffering-from-a=
-custom-error>suffering from a custom error</a>. It can be set
+  using the <code title=3Ddom-cva-setCustomValidity><a href=3D#=
dom-cva-setcustomvalidity>setCustomValidity()</a></code> m=
ethod. The user
+  agent should use the <a href=3D#custom-validity-error-message>cu=
stom validity error message</a> when alerting the user to the
+  problem with the control.</p>
+
+  <p>An element can be constrained in various ways. The following =
is the list of <dfn id=3Dvalidity-states>validity
+  states</dfn> that a form control can be in, making the control i=
nvalid for the purposes of
+  constraint validation. (The definitions below are non-normative; other=
 parts of this specification
+  define more precisely when each state applies or does not.)</p>
+
+  <dl><dt> <dfn id=3Dsuffering-from-being-missing>Suff=
ering from being missing</dfn> </dt>
+
+   <dd> <p>When a control has no <a href=3D#concept-fe-va=
lue title=3Dconcept-fe-value>value</a> but has a <code title=3D=
"">required</code> attribute (<code><a href=3D=
#the-input-element>input</a></code> <code title=3Dattr-=
input-required><a href=3D#attr-input-required>required</a>=
</code>, <code><a href=3D#the-select-element>select<=
/a></code> <code title=3Dattr-select-required><a href=3D=
#attr-select-required>required</a></code>, <code>&lt=
;a href=3D#the-textarea-element>textarea</a></code> <co=
de title=3Dattr-textarea-required><a href=3D#attr-textarea-required=
>required</a></code>), or, in the case of an element in a =
<i><a href=3D#radio-button-group>radio
+   button group</a></i>, any of the other elements in the gr=
oup has a <code title=3Dattr-input-required><a href=3D#attr-inpu=
t-required>required</a></code> attribute. </dd>
+
+   <dt> <dfn id=3Dsuffering-from-a-type-mismatch>Suffering f=
rom a type mismatch</dfn> </dt>
+
+   <dd> <p>When a control that allows arbitrary user input h=
as a <a href=3D#concept-fe-value title=3Dconcept-fe-value>value<=
/a> that is not in the correct syntax (<a href=3D"#e-mail-stat=
e-(type=3Demail)" title=3Dattr-input-type-email>E-mail</a>,=
 <a href=3D"#url-state-(type=3Durl)" title=3Dattr-input-type=
-url>URL</a>).
+   </dd>
+
+   <dt> <dfn id=3Dsuffering-from-a-pattern-mismatch>Sufferin=
g from a pattern mismatch</dfn> </dt>
+
+   <dd> <p>When a control has a <a href=3D#concept-fe-val=
ue title=3Dconcept-fe-value>value</a> that doesn't satisfy the
+   <code title=3Dattr-input-pattern><a href=3D#attr-input-patte=
rn>pattern</a></code> attribute.</dd>
+
+   <dt> <dfn id=3Dsuffering-from-being-too-long>Suffering fr=
om being too long</dfn> </dt>
+
+   <dd> <p>When a control has a <a href=3D#concept-fe-val=
ue title=3Dconcept-fe-value>value</a> that is too long for the
+   <a href=3D#attr-fe-maxlength title=3Dattr-fe-maxlength>form con=
trol <code title=3D"">maxlength</code> attribute&lt=
;/a>
+   (<code><a href=3D#the-input-element>input</a></c=
ode> <code title=3Dattr-input-maxlength><a href=3D#attr-input=
-maxlength>maxlength</a></code>, <code><a href=3D=
#the-textarea-element>textarea</a></code>
+   <code title=3Dattr-textarea-maxlength><a href=3D#attr-textar=
ea-maxlength>maxlength</a></code>). </dd>
+
+   <dt> <dfn id=3Dsuffering-from-being-too-short>Suffering f=
rom being too short</dfn> </dt>
+
+   <dd> <p>When a control has a <a href=3D#concept-fe-val=
ue title=3Dconcept-fe-value>value</a> that is too short for the
+   <a href=3D#attr-fe-minlength title=3Dattr-fe-minlength>form con=
trol <code title=3D"">minlength</code> attribute&lt=
;/a>
+   (<code><a href=3D#the-input-element>input</a></c=
ode> <code title=3Dattr-input-minlength><a href=3D#attr-input=
-minlength>minlength</a></code>, <code><a href=3D=
#the-textarea-element>textarea</a></code>
+   <code title=3Dattr-textarea-minlength><a href=3D#attr-textar=
ea-minlength>minlength</a></code>). </dd>
+
+   <dt> <dfn id=3Dsuffering-from-an-underflow>Suffering from=
 an underflow</dfn> </dt>
+
+   <dd> <p>When a control has a <a href=3D#concept-fe-val=
ue title=3Dconcept-fe-value>value</a> that is too low for the
+   <code title=3Dattr-input-min><a href=3D#attr-input-min>mi=
n</a></code> attribute.</dd>
+
+   <dt> <dfn id=3Dsuffering-from-an-overflow>Suffering from =
an overflow</dfn> </dt>
+
+   <dd> <p>When a control has a <a href=3D#concept-fe-val=
ue title=3Dconcept-fe-value>value</a> that is too high for the
+   <code title=3Dattr-input-max><a href=3D#attr-input-max>ma=
x</a></code> attribute.</dd>
+
+   <dt> <dfn id=3Dsuffering-from-a-step-mismatch>Suffering f=
rom a step mismatch</dfn> </dt>
+
+   <dd> <p>When a control has a <a href=3D#concept-fe-val=
ue title=3Dconcept-fe-value>value</a> that doesn't fit the
+   rules given by the <code title=3Dattr-input-step><a href=3D#=
attr-input-step>step</a></code> attribute.</dd>
+
+   <dt> <dfn id=3Dsuffering-from-bad-input>Suffering from ba=
d input</dfn> </dt>
+
+   <dd> <p>When a control has incomplete input and the user =
agent does not think the user ought to
+   be able to submit the form in its current state.</dd>
+
+   <dt> <dfn id=3Dsuffering-from-a-custom-error>Suffering fr=
om a custom error</dfn> </dt>
+
+   <dd> <p>When a control's <a href=3D#custom-validity-er=
ror-message>custom validity error message</a> (as set by the ele=
ment's
+   <code title=3Ddom-cva-setCustomValidity><a href=3D#dom-cva-s=
etcustomvalidity>setCustomValidity()</a></code> method) is=
 not the empty
+   string.</p> </dd>
+
+  </dl><p class=3Dnote>An element can still suffer from thes=
e states even when the element is <a href=3D#concept-fe-disabled title=
=3Dconcept-fe-disabled>disabled</a>; thus these states can be re=
presented in the DOM even
+  if validating the form during submission wouldn't indicate a problem t=
o the user.</p>
+
+  <p>An element <dfn id=3Dconcept-fv-valid title=3Dconcept-fv-v=
alid>satisfies its constraints</dfn> if it is not suffering
+  from any of the above <a href=3D#validity-states>validity states=
</a>.</p>
+
+  </div>
+
+
+
+  <div class=3Dimpl>
+
+  <h5 id=3Dconstraint-validation><span class=3Dsecno>4.10.21=
.2 </span>Constraint validation</h5>
+
+  <p>When the user agent is required to <dfn id=3Dstatically-va=
lidate-the-constraints>statically validate the constraints</dfn>=
 of
+  <code><a href=3D#the-form-element>form</a></code&=
gt; element <var title=3D"">form</var>, it must run=
 the following steps, which return
+  either a <i>positive</i> result (all the controls in the f=
orm are valid) or a <i>negative</i>
+  result (there are invalid controls) along with a (possibly empty) list=
 of elements that are
+  invalid and for which no script has claimed responsibility:</p>
+
+  <ol><li><p>Let <var title=3D"">contr=
ols</var> be a list of all the <a href=3D#category-submit title=3D=
category-submit>submittable elements</a> whose <a href=3D#for=
m-owner>form owner</a> is <var title=3D"">form&l=
t;/var>, in <a href=3D#tree-order>tree order</a>.</li&g=
t;
+
+   <li><p>Let <var title=3D"">invalid contro=
ls</var> be an initially empty list of elements.</li>
+
+   <li>
+
+    <p>For each element <var title=3D"">field</=
var> in <var title=3D"">controls</var>, in <a=
 href=3D#tree-order>tree
+    order</a>, run the following substeps:</p>
+
+    <ol><li><p>If <var title=3D"">fiel=
d</var> is not a <a href=3D#candidate-for-constraint-validation&=
gt;candidate for constraint validation</a>,
+     then move on to the next element.</li>
+
+     <li><p>Otherwise, if <var title=3D"">fi=
eld</var> <a href=3D#concept-fv-valid title=3Dconcept-fv-valid&g=
t;satisfies its
+     constraints</a>, then move on to the next element.</li>
+
+     <li><p>Otherwise, add <var title=3D"">f=
ield</var> to <var title=3D"">invalid
+     controls</var>.</li>
+
+    </ol></li>
+
+   <li><p>If <var title=3D"">invalid control=
s</var> is empty, then return a <i>positive</i> result =
and
+   abort these steps.</li>
+
+   <li><p>Let <var title=3D"">unhandled inva=
lid controls</var> be an initially empty list of
+   elements.</li>
+
+   <li>
+
+    <p>For each element <var title=3D"">field</=
var> in <var title=3D"">invalid controls</var>, =
if any,
+    in <a href=3D#tree-order>tree order</a>, run the followi=
ng substeps:</p>
+
+    <ol><li><p><a href=3D#fire-a-simple-event>Fi=
re a simple event</a> named <code title=3Devent-invalid>inval=
id</code> that
+     is cancelable at <var title=3D"">field</var>.=
</li>
+
+     <li><p>If the event was not canceled, then add <var =
title=3D"">field</var> to <var title=3D""=
>unhandled invalid controls</var>.</li>
+
+    </ol></li>
+
+   <li><p>Return a <i>negative</i> result with t=
he list of elements in the <var title=3D"">unhandled
+   invalid controls</var> list.</li>
+
+  </ol><p>If a user agent is to <dfn id=3Dinteractively-v=
alidate-the-constraints>interactively validate the constraints</dfn=
> of <code><a href=3D#the-form-element>form</a></=
code>
+  element <var title=3D"">form</var>, then the use=
r agent must run the following steps:</p>
+
+  <ol><li><p><a href=3D#statically-validate-the-con=
straints>Statically validate the constraints</a> of <var titl=
e=3D"">form</var>, and let <var title=3D"&quot=
;>unhandled invalid controls</var> be the list of elements retur=
ned if the result was
+   <i>negative</i>.</li>
+
+   <li><p>If the result was <i>positive</i>, the=
n return that result and abort these steps.</li>
+
+   <li><p>Report the problems with the constraints of at lea=
st one of the elements given in <var title=3D"">unhandled=
 invalid controls</var> to the user. User agents may focus one of t=
hose
+   elements in the process, by running the <a href=3D#focusing-steps&=
gt;focusing steps</a> for that element, and may
+   change the scrolling position of the document, or perform some other =
action that brings the
+   element to the user's attention. User agents may report more than one=
 constraint violation. User
+   agents may coalesce related constraint violation reports if appropria=
te (e.g. if multiple radio
+   buttons in a <a href=3D#radio-button-group title=3D"radio but=
ton group">group</a> are marked as required, only one error
+   need be reported). If one of the controls is not <a href=3D#being-=
rendered>being rendered</a> (e.g. it has the
+   <code title=3Dattr-hidden><a href=3D#the-hidden-attribute&gt=
;hidden</a></code> attribute set) then user agents may report=
 a script
+   error.</li>
+
+   <li><p>Return a <i>negative</i> result.</l=
i>
+
+  </ol></div>
+
+
+
+<!--TOPIC:DOM APIs-->
+  <h5 id=3Dthe-constraint-validation-api><span class=3Dsecno&gt=
;4.10.21.3 </span>The <dfn>constraint validation API</dfn&=
gt;</h5>
+
+  <dl class=3Ddomintro><dt><var title=3D"">e=
lement</var> . <code title=3Ddom-cva-willValidate><a href=3D=
#dom-cva-willvalidate>willValidate</a></code></dt>
+
+   <dd>
+
+    <p>Returns true if the element will be validated when the form=
 is submitted; false
+    otherwise.</p>
+
+   </dd>
+
+   <dt><var title=3D"">element</var> . <c=
ode title=3Ddom-cva-setCustomValidity><a href=3D#dom-cva-setcustomv=
alidity>setCustomValidity</a></code>(<var title=3D&quot=
;">message</var>)</dt>
+
+   <dd>
+
+    <p>Sets a custom error, so that the element would fail to vali=
date. The given message is the
+    message to be shown to the user when reporting the problem to the us=
er.</p>
+
+    <p>If the argument is the empty string, clears the custom erro=
r.</p>
+
+   </dd>
+
+   <dt><var title=3D"">element</var> . <c=
ode title=3Ddom-cva-validity><a href=3D#dom-cva-validity>validit=
y</a></code> . <code title=3Ddom-validitystate-valueMissin=
g><a href=3D#dom-validitystate-valuemissing>valueMissing</a&g=
t;</code></dt>
+
+   <dd>
+
+    <p>Returns true if the element has no value but is a required =
field; false otherwise.</p>
+
+   </dd>
+
+   <dt><var title=3D"">element</var> . <c=
ode title=3Ddom-cva-validity><a href=3D#dom-cva-validity>validit=
y</a></code> . <code title=3Ddom-validitystate-typeMismatc=
h><a href=3D#dom-validitystate-typemismatch>typeMismatch</a&g=
t;</code></dt>
+
+   <dd>
+
+    <p>Returns true if the element's value is not in the correct s=
yntax; false otherwise.</p>
+
+   </dd>
+
+   <dt><var title=3D"">element</var> . <c=
ode title=3Ddom-cva-validity><a href=3D#dom-cva-validity>validit=
y</a></code> . <code title=3Ddom-validitystate-patternMism=
atch><a href=3D#dom-validitystate-patternmismatch>patternMismatc=
h</a></code></dt>
+
+   <dd>
+
+    <p>Returns true if the element's value doesn't match the provi=
ded pattern; false otherwise.</p>
+
+   </dd>
+
+   <dt><var title=3D"">element</var> . <c=
ode title=3Ddom-cva-validity><a href=3D#dom-cva-validity>validit=
y</a></code> . <code title=3Ddom-validitystate-tooLong>=
<a href=3D#dom-validitystate-toolong>tooLong</a></code>=
</dt>
+
+   <dd>
+
+    <p>Returns true if the element's value is longer than the prov=
ided maximum length; false otherwise.</p>
+
+   </dd>
+
+   <dt><var title=3D"">element</var> . <c=
ode title=3Ddom-cva-validity><a href=3D#dom-cva-validity>validit=
y</a></code> . <code title=3Ddom-validitystate-tooShort&gt=
;<a href=3D#dom-validitystate-tooshort>tooShort</a></code&=
gt;</dt>
+
+   <dd>
+
+    <p>Returns true if the element's value, if it is not the empty=
 string, is shorter than the
+    provided minimum length; false otherwise.</p>
+
+   </dd>
+
+   <dt><var title=3D"">element</var> . <c=
ode title=3Ddom-cva-validity><a href=3D#dom-cva-validity>validit=
y</a></code> . <code title=3Ddom-validitystate-rangeUnderf=
low><a href=3D#dom-validitystate-rangeunderflow>rangeUnderflow&l=
t;/a></code></dt>
+
+   <dd>
+
+    <p>Returns true if the element's value is lower than the provi=
ded minimum; false otherwise.</p>
+
+   </dd>
+
+   <dt><var title=3D"">element</var> . <c=
ode title=3Ddom-cva-validity><a href=3D#dom-cva-validity>validit=
y</a></code> . <code title=3Ddom-validitystate-rangeOverfl=
ow><a href=3D#dom-validitystate-rangeoverflow>rangeOverflow</=
a></code></dt>
+
+   <dd>
+
+    <p>Returns true if the element's value is higher than the prov=
ided maximum; false otherwise.</p>
+
+   </dd>
+
+   <dt><var title=3D"">element</var> . <c=
ode title=3Ddom-cva-validity><a href=3D#dom-cva-validity>validit=
y</a></code> . <code title=3Ddom-validitystate-stepMismatc=
h><a href=3D#dom-validitystate-stepmismatch>stepMismatch</a&g=
t;</code></dt>
+
+   <dd>
+
+    <p>Returns true if the element's value doesn't fit the rules g=
iven by the <code title=3Dattr-input-step><a href=3D#attr-input-=
step>step</a></code> attribute; false otherwise.</p>
+
+   </dd>
+
+   <dt><var title=3D"">element</var> . <c=
ode title=3Ddom-cva-validity><a href=3D#dom-cva-validity>validit=
y</a></code> . <code title=3Ddom-validitystate-badInput&gt=
;<a href=3D#dom-validitystate-badinput>badInput</a></code&=
gt;</dt>
+
+   <dd>
+
+    <p>Returns true if the user has provided input in the user int=
erface that the user agent is
+    unable to convert to a value; false otherwise.</p>
+
+   </dd>
+
+   <dt><var title=3D"">element</var> . <c=
ode title=3Ddom-cva-validity><a href=3D#dom-cva-validity>validit=
y</a></code> . <code title=3Ddom-validitystate-customError=
><a href=3D#dom-validitystate-customerror>customError</a>&=
lt;/code></dt>
+
+   <dd>
+
+    <p>Returns true if the element has a custom error; false other=
wise.</p>
+
+   </dd>
+
+   <dt><var title=3D"">element</var> . <c=
ode title=3Ddom-cva-validity><a href=3D#dom-cva-validity>validit=
y</a></code> . <code title=3Ddom-validitystate-valid>&l=
t;a href=3D#dom-validitystate-valid>valid</a></code></d=
t>
+
+   <dd>
+
+    <p>Returns true if the element's value has no validity problem=
s; false otherwise.</p>
+
+   </dd>
+
+   <dt><var title=3D"">valid</var> =3D <v=
ar title=3D"">element</var> . <code title=3Ddom-cva=
-checkValidity><a href=3D#dom-cva-checkvalidity>checkValidity&lt=
;/a></code>()</dt>
+
+   <dd>
+
+    <p>Returns true if the element's value has no validity problem=
s; false otherwise. Fires an <code title=3Devent-invalid>invalid&lt=
;/code> event at the element in the latter case.</p>
+
+   </dd>
+
+   <dt><var title=3D"">valid</var> =3D <v=
ar title=3D"">element</var> . <code title=3Ddom-cva=
-reportValidity><a href=3D#dom-cva-reportvalidity>reportValidity=
</a></code>()</dt>
+
+   <dd>
+
+    <p>Returns true if the element's value has no validity problem=
s; otherwise, returns false, fires
+    an <code title=3Devent-invalid>invalid</code> event at t=
he element, and (if the event isn't
+    canceled) reports the problem to the user.</p>
+
+   </dd>
+
+   <dt><var title=3D"">element</var> . <c=
ode title=3Ddom-cva-validationMessage><a href=3D#dom-cva-validation=
message>validationMessage</a></code></dt>
+
+   <dd>
+
+    <p>Returns the error message that would be shown to the user i=
f the element was to be checked
+    for validity.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-cva-willvalidate title=3Ddom-cva-willVal=
idate><code>willValidate</code></dfn> attribute must=
 return
+  true if an element is a <a href=3D#candidate-for-constraint-validat=
ion>candidate for constraint validation</a>, and false otherwise
+  (i.e. false if any conditions are <a href=3D#barred-from-constraint=
-validation title=3D"barred from constraint validation">barr=
ing it from
+  constraint validation</a>).</p>
+
+  <p>The <dfn id=3Ddom-cva-setcustomvalidity title=3Ddom-cva-se=
tCustomValidity><code>setCustomValidity(<var title=3D"&q=
uot;>message</var>)</code></dfn>, when invoked, must=
 set the <a href=3D#custom-validity-error-message>custom validity e=
rror
+  message</a> to the value of the given <var title=3D"&quo=
t;>message</var> argument.</p>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>In the following example, a script checks the value of a for=
m control each time it is edited,
+   and whenever it is not a valid value, uses the <code title=3Ddom-c=
va-setCustomValidity><a href=3D#dom-cva-setcustomvalidity>setCus=
tomValidity()</a></code> method to set an appropriate
+   message.</p>
+
+   <pre><label>Feeling: <input name=3Df type=3D=
"text" oninput=3D"check(this)"></label&=
amp;gt;
+<script>
+ function check(input) {
+   if (input.value =3D=3D "good" ||
+       input.value =3D=3D "fine" ||
+       input.value =3D=3D "tired") {
+     input.setCustomValidity('"' + input.value + '" is not a f=
eeling.');
+<!--   } else if (input.value =3D=3D "...") {
+     input.setCustomValidity('...');
+-->   } else {
+     // input is fine -- reset the error message
+     input.setCustomValidity('');
+   }
+ }
+</script></pre>
+
+  </div>
+
+  <div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-cva-validity title=3Ddom-cva-validity&gt=
;<code>validity</code></dfn> attribute must return a
+  <code><a href=3D#validitystate>ValidityState</a><=
/code> object that represents the <a href=3D#validity-states>val=
idity states</a> of the element.
+  This object is <a href=3D#live>live</a>, and the same obje=
ct must be returned each time the element's
+  <code title=3Ddom-cva-validity><a href=3D#dom-cva-validity&gt=
;validity</a></code> attribute is retrieved.</p>
+
+<pre class=3Didl>interface <dfn id=3Dvaliditystate>ValidityS=
tate</dfn> {
+  readonly attribute boolean <a href=3D#dom-validitystate-valuemissin=
g title=3Ddom-ValidityState-valueMissing>valueMissing</a>;
+  readonly attribute boolean <a href=3D#dom-validitystate-typemismatc=
h title=3Ddom-ValidityState-typeMismatch>typeMismatch</a>;
+  readonly attribute boolean <a href=3D#dom-validitystate-patternmism=
atch title=3Ddom-ValidityState-patternMismatch>patternMismatch</a&g=
t;;
+  readonly attribute boolean <a href=3D#dom-validitystate-toolong tit=
le=3Ddom-ValidityState-tooLong>tooLong</a>;
+  readonly attribute boolean <a href=3D#dom-validitystate-tooshort ti=
tle=3Ddom-ValidityState-tooShort>tooShort</a>;
+  readonly attribute boolean <a href=3D#dom-validitystate-rangeunderf=
low title=3Ddom-ValidityState-rangeUnderflow>rangeUnderflow</a>;
+  readonly attribute boolean <a href=3D#dom-validitystate-rangeoverfl=
ow title=3Ddom-ValidityState-rangeOverflow>rangeOverflow</a>;
+  readonly attribute boolean <a href=3D#dom-validitystate-stepmismatc=
h title=3Ddom-ValidityState-stepMismatch>stepMismatch</a>;
+  readonly attribute boolean <a href=3D#dom-validitystate-badinput ti=
tle=3Ddom-ValidityState-badInput>badInput</a>;
+  readonly attribute boolean <a href=3D#dom-validitystate-customerror=
 title=3Ddom-ValidityState-customError>customError</a>;
+  readonly attribute boolean <a href=3D#dom-validitystate-valid title=
=3Ddom-ValidityState-valid>valid</a>;
+};</pre>
+
+  <p>A <code><a href=3D#validitystate>ValidityState&lt=
;/a></code> object has the following attributes. On getting, the=
y must return
+  true if the corresponding condition given in the following list is tru=
e, and false otherwise.</p>
+
+  <dl><dt><dfn id=3Ddom-validitystate-valuemissing title=3D=
dom-ValidityState-valueMissing><code>valueMissing</code>&l=
t;/dfn></dt>
+   <dd> <p>The control is <a href=3D#suffering-from-being=
-missing>suffering from being missing</a>.</p> </dd>
+
+   <dt><dfn id=3Ddom-validitystate-typemismatch title=3Ddom-Val=
idityState-typeMismatch><code>typeMismatch</code></dfn&=
gt;</dt>
+   <dd> <p>The control is <a href=3D#suffering-from-a-typ=
e-mismatch>suffering from a type mismatch</a>.</p> </dd=
>
+
+   <dt><dfn id=3Ddom-validitystate-patternmismatch title=3Ddom-=
ValidityState-patternMismatch><code>patternMismatch</code>=
</dfn></dt>
+   <dd> <p>The control is <a href=3D#suffering-from-a-pat=
tern-mismatch>suffering from a pattern mismatch</a>.</p> &=
lt;/dd>
+
+   <dt><dfn id=3Ddom-validitystate-toolong title=3Ddom-Validity=
State-tooLong><code>tooLong</code></dfn></dt>
+   <dd> <p>The control is <a href=3D#suffering-from-being=
-too-long>suffering from being too long</a>.</p> </dd&g=
t;
+
+   <dt><dfn id=3Ddom-validitystate-tooshort title=3Ddom-Validit=
yState-tooShort><code>tooShort</code></dfn></dt&g=
t;
+   <dd> <p>The control is <a href=3D#suffering-from-being=
-too-short>suffering from being too short</a>.</p> </dd=
>
+
+   <dt><dfn id=3Ddom-validitystate-rangeunderflow title=3Ddom-V=
alidityState-rangeUnderflow><code>rangeUnderflow</code>&lt=
;/dfn></dt>
+   <dd> <p>The control is <a href=3D#suffering-from-an-un=
derflow>suffering from an underflow</a>.</p> </dd>
+
+   <dt><dfn id=3Ddom-validitystate-rangeoverflow title=3Ddom-Va=
lidityState-rangeOverflow><code>rangeOverflow</code></d=
fn></dt>
+   <dd> <p>The control is <a href=3D#suffering-from-an-ov=
erflow>suffering from an overflow</a>.</p> </dd>
+
+   <dt><dfn id=3Ddom-validitystate-stepmismatch title=3Ddom-Val=
idityState-stepMismatch><code>stepMismatch</code></dfn&=
gt;</dt>
+   <dd> <p>The control is <a href=3D#suffering-from-a-ste=
p-mismatch>suffering from a step mismatch</a>.</p> </dd=
>
+
+   <dt><dfn id=3Ddom-validitystate-badinput title=3Ddom-Validit=
yState-badInput><code>badInput</code></dfn></dt&g=
t;
+   <dd> <p>The control is <a href=3D#suffering-from-bad-i=
nput>suffering from bad input</a>.</p> </dd>
+
+   <dt><dfn id=3Ddom-validitystate-customerror title=3Ddom-Vali=
dityState-customError><code>customError</code></dfn>=
</dt>
+   <dd> <p>The control is <a href=3D#suffering-from-a-cus=
tom-error>suffering from a custom error</a>.</p> </dd&g=
t;
+
+   <dt><dfn id=3Ddom-validitystate-valid title=3Ddom-ValiditySt=
ate-valid><code>valid</code></dfn></dt>
+   <dd> <p>None of the other conditions are true.</p> =
</dd>
+
+  </dl><p>When the <dfn id=3Ddom-cva-checkvalidity title=3D=
dom-cva-checkValidity><code>checkValidity()</code></dfn=
> method is
+  invoked, if the element is a <a href=3D#candidate-for-constraint-va=
lidation>candidate for constraint validation</a> and does not &l=
t;a href=3D#concept-fv-valid title=3Dconcept-fv-valid>satisfy its cons=
traints</a>, the user agent must <a href=3D#fire-a-simple-event&=
gt;fire a simple
+  event</a> named <code title=3Devent-invalid>invalid</co=
de> that is cancelable (but in this case
+  has no default action) at the element and return false. Otherwise, it =
must only return true
+  without doing anything else.</p>
+
+  <p>When the <dfn id=3Ddom-cva-reportvalidity title=3Ddom-cva-=
reportValidity><code>reportValidity()</code></dfn> m=
ethod is
+  invoked, if the element is a <a href=3D#candidate-for-constraint-va=
lidation>candidate for constraint validation</a> and does not &l=
t;a href=3D#concept-fv-valid title=3Dconcept-fv-valid>satisfy its cons=
traints</a>, the user agent must: <a href=3D#fire-a-simple-event=
>fire a simple
+  event</a> named <code title=3Devent-invalid>invalid</co=
de> that is cancelable at the element,
+  and if that event is not canceled, report the problems with the constr=
aints of that element to the
+  user; then, return false. Otherwise, it must only return true without =
doing anything else. When
+  reporting the problem with the constraints to the user, the user agent=
 may run the <a href=3D#focusing-steps>focusing
+  steps</a> for that element, and may change the scrolling positio=
n of the document, or perform
+  some other action that brings the element to the user's attention. Use=
r agents may report more
+  than one constraint violation, if the element suffers from multiple pr=
oblems at once. If the
+  element is not <a href=3D#being-rendered>being rendered</a&gt=
;, then the user agent may, instead of notifying the
+  user, report a script error.</p>
+
+  <p>The <dfn id=3Ddom-cva-validationmessage title=3Ddom-cva-va=
lidationMessage><code>validationMessage</code></dfn>=
 attribute must
+  return the empty string if the element is not a <a href=3D#candidat=
e-for-constraint-validation>candidate for constraint validation</a&=
gt;
+  or if it is one but it <a href=3D#concept-fv-valid title=3Dconcept-=
fv-valid>satisfies its constraints</a>; otherwise,
+  it must return a suitably localized message that the user agent would =
show the user if this were
+  the only form control with a validity constraint problem. If the user =
agent would not actually
+  show a textual message in such a situation (e.g. it would show a graph=
ical cue instead), then the
+  attribute must return a suitably localized message that expresses (one=
 or more of) the validity
+  constraint(s) that the control does not satisfy. If the element is a &=
lt;a href=3D#candidate-for-constraint-validation>candidate for
+  constraint validation</a> and is <a href=3D#suffering-from-a-=
custom-error>suffering from a custom error</a>, then the
+  <a href=3D#custom-validity-error-message>custom validity error m=
essage</a> should be present in the return value.</p>
+
+  </div>
+<!--TOPIC:HTML-->
+
+
+<!--ADD-TOPIC:Security-->
+  <h5 id=3Dsecurity-forms><span class=3Dsecno>4.10.21.4 <=
/span>Security</h5>
+
+  <p id=3Dsecurity-0>Servers should not rely on client-side valida=
tion. Client-side validation can
+  be intentionally bypassed by hostile users, and unintentionally bypass=
ed by users of older user
+  agents or automated tools that do not implement these features. The co=
nstraint validation features
+  are only intended to improve the user experience, not to provide any k=
ind of security
+  mechanism.</p>
+<!--REMOVE-TOPIC:Security-->
+
+
+
+
+  <h4 id=3Dform-submission><span class=3Dsecno>4.10.22 </=
span><dfn>Form submission</dfn></h4>
+
+  <div class=3Dimpl>
+
+  <h5 id=3Dintroduction-3><span class=3Dsecno>4.10.22.1 <=
/span>Introduction</h5>
+
+  </div>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <p>When a form is submitted, the data in the form is converted i=
nto the structure specified by the
+  <a href=3D#concept-fs-enctype title=3Dconcept-fs-enctype>enctype=
</a>, and then sent to the destination specified by the
+  <a href=3D#concept-fs-action title=3Dconcept-fs-action>action&lt=
;/a> using the given <a href=3D#concept-fs-method title=3Dconcept-f=
s-method>method</a>.</p>
+
+  <p>For example, take the following form:</p>
+
+  <pre><form action=3D"/find.cgi" method=3Dget&am=
p;gt;
+ <input type=3Dtext name=3Dt>
+ <input type=3Dsearch name=3Dq>
+ <input type=3Dsubmit>
+</form></pre>
+
+  <p>If the user types in "cats" in the first field and =
"fur" in the second, and then hits the
+  submit button, then the user agent will load <code title=3D"&q=
uot;>/find.cgi?t=3Dcats&q=3Dfur</code>.</p>
+
+  <p>On the other hand, consider this form:</p>
+
+  <pre><form action=3D"/find.cgi" method=3Dpost e=
nctype=3D"multipart/form-data">
+ <input type=3Dtext name=3Dt>
+ <input type=3Dsearch name=3Dq>
+ <input type=3Dsubmit>
+</form></pre>
+
+  <p>Given the same user input, the result on submission is quite =
different: the user agent instead
+  does an HTTP POST to the given URL, with as the entity body something =
like the following text:</p>
+
+  <pre>------kYFrd4jNJEgCervE
+Content-Disposition: form-data; name=3D"t"
+
+cats
+------kYFrd4jNJEgCervE
+Content-Disposition: form-data; name=3D"q"
+
+fur
+------kYFrd4jNJEgCervE--</pre>
+
+
+
+  <div class=3Dimpl>
+
+  <h5 id=3Dimplicit-submission><span class=3Dsecno>4.10.22.2=
 </span>Implicit submission</h5>
+
+  <p>A <code><a href=3D#the-form-element>form</a&gt=
;</code> element's <dfn id=3Ddefault-button>default button&lt=
;/dfn> is the first <a href=3D#concept-submit-button title=3Dconcep=
t-submit-button>submit button</a> in <a href=3D#tree-order&gt=
;tree order</a> whose <a href=3D#form-owner>form
+  owner</a> is that <code><a href=3D#the-form-element>=
form</a></code> element.</p>
+
+  <p>If the user agent supports letting the user submit a form imp=
licitly (for example, on some
+  platforms hitting the "enter" key while a text field is focu=
sed implicitly submits the form), then
+  doing so for a form whose <a href=3D#default-button>default butt=
on</a> has a defined <a href=3D#activation-behavior>activatio=
n
+  behavior</a> must cause the user agent to <a href=3D#run-synt=
hetic-click-activation-steps>run synthetic click activation steps</=
a> on
+  that <a href=3D#default-button>default button</a>.</p&g=
t;
+
+  <p class=3Dnote>Consequently, if the <a href=3D#default-butto=
n>default button</a> is <a href=3D#concept-fe-disabled title=3D=
concept-fe-disabled>disabled</a>, the form is not submitted when=
 such an implicit
+  submission mechanism is used. (A button has no <a href=3D#activatio=
n-behavior>activation behavior</a> when
+  disabled.)</p>
+
+  <p class=3Dnote>There are pages on the Web that are only usable =
if there is a way to implicitly
+  submit forms, so user agents are strongly encouraged to support this.&=
lt;/p>
+
+  <p><!-- For Web compatibility reasons caused by obscure histo=
rical accidents, -->If the form has
+  no <a href=3D#concept-submit-button title=3Dconcept-submit-button&g=
t;submit button</a>, then the implicit submission
+  mechanism must do nothing if the form has more than one <i>field=
 that blocks implicit
+  submission</i>, and must <a href=3D#concept-form-submit title=
=3Dconcept-form-submit>submit</a> the <code><a href=3D#=
the-form-element>form</a></code>
+  element from the <code><a href=3D#the-form-element>form&lt=
;/a></code> element itself otherwise.</p>
+
+  <p>For the purpose of the previous paragraph, an element is a &l=
t;i>field that blocks implicit
+  submission</i> of a <code><a href=3D#the-form-element&g=
t;form</a></code> element if it is an <code><a href=3D=
#the-input-element>input</a></code> element whose
+  <a href=3D#form-owner>form owner</a> is that <code>&=
lt;a href=3D#the-form-element>form</a></code> element and =
whose <code title=3Dattr-input-type><a href=3D#attr-input-type&g=
t;type</a></code> attribute is in one of the following states=
:
+  <a href=3D"#text-(type=3Dtext)-state-and-search-state-(type=3D=
search)" title=3Dattr-input-type-text>Text</a>,
+  <a href=3D"#text-(type=3Dtext)-state-and-search-state-(type=3D=
search)" title=3Dattr-input-type-search>Search</a>,
+  <a href=3D"#url-state-(type=3Durl)" title=3Dattr-input-ty=
pe-url>URL</a>,
+  <a href=3D"#telephone-state-(type=3Dtel)" title=3Dattr-in=
put-type-tel>Telephone</a>,
+  <a href=3D"#e-mail-state-(type=3Demail)" title=3Dattr-inp=
ut-type-email>E-mail</a>,
+  <a href=3D"#password-state-(type=3Dpassword)" title=3Datt=
r-input-type-password>Password</a>,
+  <a href=3D"#date-and-time-state-(type=3Ddatetime)" title=3D=
attr-input-type-datetime>Date and Time</a>,
+  <a href=3D"#date-state-(type=3Ddate)" title=3Dattr-input-=
type-date>Date</a>,
+  <a href=3D"#month-state-(type=3Dmonth)" title=3Dattr-inpu=
t-type-month>Month</a>,
+  <a href=3D"#week-state-(type=3Dweek)" title=3Dattr-input-=
type-week>Week</a>,
+  <a href=3D"#time-state-(type=3Dtime)" title=3Dattr-input-=
type-time>Time</a>,
+  <a href=3D"#local-date-and-time-state-(type=3Ddatetime-local)&=
quot; title=3Dattr-input-type-datetime-local>Local Date and Time</a=
>,
+  <a href=3D"#number-state-(type=3Dnumber)" title=3Dattr-in=
put-type-number>Number</a>
+  </p>
+
+  </div>
+
+
+  <div class=3Dimpl>
+
+  <h5 id=3Dform-submission-algorithm><span class=3Dsecno>4.1=
0.22.3 </span>Form submission algorithm</h5>
+
+  <p>When a <code><a href=3D#the-form-element>form<=
/a></code> element <var title=3D"">form</var&=
gt; is <dfn id=3Dconcept-form-submit title=3Dconcept-form-submit>su=
bmitted</dfn> from an element <var title=3D"">submi=
tter</var>
+  (typically a button), optionally with a <var title=3D""&g=
t;submitted from <code title=3Ddom-form-submit><a href=3D#dom-fo=
rm-submit>submit()</a></code> method</var> flag set,=
 the user agent must run the
+  following steps:</p>
+
+  <ol><li><p>Let <var title=3D"">form =
document</var> be the <var title=3D"">form</var&=
gt;'s
+   <code><a href=3D#document>Document</a></code>=
.</li>
+
+   <li id=3DsandboxSubmitBlocked><p>If <var title=3D&quot=
;">form document</var> has no associated
+   <a href=3D#browsing-context>browsing context</a> or its &=
lt;a href=3D#active-sandboxing-flag-set>active sandboxing flag set<=
/a> has its
+   <a href=3D#sandboxed-forms-browsing-context-flag>sandboxed form=
s browsing context flag</a> set, then abort these steps without doi=
ng
+   anything.</li>
+
+   <li><p>Let <var title=3D"">form browsing =
context</var> be the <a href=3D#browsing-context>browsing con=
text</a> of <var title=3D"">form document</var&g=
t;.</li>
+
+   <!-- lock (all the following steps are skipped if called from subm=
it() - see unlock step below) -->
+
+   <li><p>If the <var title=3D"">submitted f=
rom <code title=3Ddom-form-submit><a href=3D#dom-form-submit>=
submit()</a></code>
+   method</var> flag is not set, and the <var title=3D"&qu=
ot;>submitter</var> element's <a href=3D#concept-fs-novalidat=
e title=3Dconcept-fs-novalidate>no-validate state</a> is false, =
then <a href=3D#interactively-validate-the-constraints>interactivel=
y
+   validate the constraints</a> of <var title=3D""&gt=
;form</var> and examine the result: if the result
+   is negative (the constraint validation concluded that there were inva=
lid fields and probably
+   informed the user of this) then <a href=3D#fire-a-simple-event>=
fire a simple event</a> named <code title=3Devent-invalid>inv=
alid</code> at the <var title=3D"">form</var>=
 element and then abort these
+   steps.</li>
+
+   <li><p>If the <var title=3D"">submitted f=
rom <code title=3Ddom-form-submit><a href=3D#dom-form-submit>=
submit()</a></code>
+   method</var> flag is not set, then <a href=3D#fire-a-simple-=
event>fire a simple event</a> that bubbles and is
+   cancelable named <code title=3Devent-submit>submit</code>=
, at <var title=3D"">form</var>. If the
+   event's default action is prevented (i.e. if the event is canceled) t=
hen abort these steps.
+   Otherwise, continue (effectively the default action is to perform the=
 submission).</li>
+
+   <!-- if you add any steps between the "lock" and "u=
nlock" lines, make sure to update the step
+   immediately before the "lock" line -->
+
+   <!-- unlock -->
+
+   <li><p>Let <var title=3D"">form data set&=
lt;/var> be the result of <a href=3D#constructing-the-form-data-set=
>constructing the form data
+   set</a> for <var title=3D"">form</var> in=
 the context of <var title=3D"">submitter</var>.&lt=
;/li>
+
+   <li><p>Let <var title=3D"">action</var=
> be the <var title=3D"">submitter</var> element=
's <a href=3D#concept-fs-action title=3Dconcept-fs-action>action&lt=
;/a>.</li>
+
+   <li>
+
+    <p>If <var title=3D"">action</var> is th=
e empty string, let <var title=3D"">action</var> be
+    <a href=3D"#the-document's-address">the document's a=
ddress</a> of the <var title=3D"">form document<=
/var>.</p>
+
+    <!-- Don't ask me why. But that's what IE does. It even treats ac=
tion=3D"" differently from
+    action=3D" " or action=3D"#" (the latter two res=
olve to the base URL, the first one resolves to the
+    doc URL). And other browsers concur. It is even required, see e.g.
+      http://bugs.webkit.org/show_bug.cgi?id=3D7763
+      https://bugzilla.mozilla.org/show_bug.cgi?id=3D297761
+    -->
+
+   </li>
+
+   <li><p><a href=3D#resolve-a-url title=3D"resolve =
a url">Resolve</a> the <a href=3D#url>URL</a> &=
lt;var title=3D"">action</var>, relative to the <va=
r title=3D"">submitter</var> element. If this fails,
+   abort these steps.</li>
+
+   <li><p>Let <var title=3D"">action</var=
> be the resulting <a href=3D#absolute-url>absolute URL</a&gt=
;.</li>
+
+   <li><p>Let <var title=3D"">action compone=
nts</var> be the resulting <a href=3D#parsed-url>parsed
+   URL</a>.</li>
+
+   <li><p>Let <var title=3D"">scheme</var=
> be the <a href=3D#concept-url-scheme title=3Dconcept-url-scheme&g=
t;scheme</a> of
+   the resulting <a href=3D#parsed-url>parsed URL</a>.</l=
i>
+
+   <li><p>Let <var title=3D"">enctype</va=
r> be the <var title=3D"">submitter</var> elemen=
t's <a href=3D#concept-fs-enctype title=3Dconcept-fs-enctype>enctyp=
e</a>.</li>
+
+   <li><p>Let <var title=3D"">method</var=
> be the <var title=3D"">submitter</var> element=
's <a href=3D#concept-fs-method title=3Dconcept-fs-method>method&lt=
;/a>.</li>
+
+   <li><p>Let <var title=3D"">target</var=
> be the <var title=3D"">submitter</var> element=
's <a href=3D#concept-fs-target title=3Dconcept-fs-target>target&lt=
;/a>.</li>
+
+   <li><p>If the user indicated a specific <a href=3D#bro=
wsing-context>browsing context</a> to use when submitting the
+   form, then let <var title=3D"">target browsing contex=
t</var> be that <a href=3D#browsing-context>browsing context&=
lt;/a>.
+   Otherwise, apply <a href=3D#the-rules-for-choosing-a-browsing-cont=
ext-given-a-browsing-context-name>the rules for choosing a browsing co=
ntext given a browsing context
+   name</a> using <var title=3D"">target</var&g=
t; as the name and <var title=3D"">form browsing
+   context</var> as the context in which the algorithm is executed=
, and let <var title=3D"">target
+   browsing context</var> be the resulting <a href=3D#browsing-=
context>browsing context</a>.</li>
+
+   <li><p>If <var title=3D"">target browsing=
 context</var> was created in the previous step, or,
+   alternatively, if the <var title=3D"">form document&l=
t;/var> has not yet <a href=3D#completely-loaded>completely
+   loaded</a> and the <var title=3D"">submitted fr=
om <code title=3Ddom-form-submit><a href=3D#dom-form-submit>s=
ubmit()</a></code>
+   method</var> flag is set, then let <var title=3D""=
>replace</var> be true. Otherwise, let it be
+   false.</li>
+
+   <li>
+
+    <p>If the value of <var title=3D"">method</=
var> is <a href=3D#attr-fs-method-dialog title=3Dattr-fs-method-dia=
log>dialog</a> then jump to the <a href=3D#submit-dialog titl=
e=3Dsubmit-dialog>submit
+    dialog</a> steps.</p>
+
+    <p>Otherwise, select the appropriate row in the table below ba=
sed on the value of <var title=3D"">scheme</var> as=
 given by the first cell of each row. Then, select the appropriate cell
+    on that row based on the value of <var title=3D"">me=
thod</var> as given in the first cell of each
+    column. Then, jump to the steps named in that cell and defined below=
 the table.</p>
+
+    <table><thead><tr><td>
+      <th> <a href=3D#attr-fs-method-get title=3Dattr-fs-method=
-GET>GET</a>
+      <th> <a href=3D#attr-fs-method-post title=3Dattr-fs-metho=
d-POST>POST</a>
+     <tbody><tr><th> <code title=3D"">=
http</code>
+      <td> <a href=3D#submit-mutate-action title=3Dsubmit-mutat=
e-action>Mutate action URL</a>
+      <td> <a href=3D#submit-body title=3Dsubmit-body>Submit=
 as entity body</a>
+     <tr><th> <code title=3D"">https</cod=
e>
+      <td> <a href=3D#submit-mutate-action title=3Dsubmit-mutat=
e-action>Mutate action URL</a>
+      <td> <a href=3D#submit-body title=3Dsubmit-body>Submit=
 as entity body</a>
+     <tr><th> <code title=3D"">ftp</code&=
gt;
+      <td> <a href=3D#submit-get-action title=3Dsubmit-get-acti=
on>Get action URL</a>
+      <td> <a href=3D#submit-get-action title=3Dsubmit-get-acti=
on>Get action URL</a>
+     <tr><th> <code title=3D"">javascript&lt=
;/code>
+      <td> <a href=3D#submit-get-action title=3Dsubmit-get-acti=
on>Get action URL</a>
+      <td> <a href=3D#submit-get-action title=3Dsubmit-get-acti=
on>Get action URL</a>
+     <tr><th> <code title=3D"">data</code=
>
+      <td> <a href=3D#submit-get-action title=3Dsubmit-get-acti=
on>Get action URL</a>
+      <td> <a href=3D#submit-data-post title=3Dsubmit-data-post=
>Post to data:</a>
+     <tr><th> <code title=3D"">mailto</co=
de>
+      <td> <a href=3D#submit-mailto-headers title=3Dsubmit-mail=
to-headers>Mail with headers</a>
+      <td> <a href=3D#submit-mailto-body title=3Dsubmit-mailto-=
body>Mail as body</a>
+    </table><p>If <var title=3D"">scheme<=
/var> is not one of those listed in this table, then the behavior is
+    not defined by this specification. User agents should, in the absenc=
e of another specification
+    defining this, act in a manner analogous to that defined in this spe=
cification for similar
+    schemes.</p>
+
+    <p>Each <code><a href=3D#the-form-element>form<=
/a></code> element has a <dfn id=3Dplanned-navigation>plan=
ned navigation</dfn>, which is either null or a
+    <a href=3D#concept-task title=3Dconcept-task>task</a>; w=
hen the <code><a href=3D#the-form-element>form</a></=
code> is first created, its
+    <a href=3D#planned-navigation>planned navigation</a> mus=
t be set to null. In the behaviours described below, when the
+    user agent is required to <dfn id=3Dplan-to-navigate>plan to n=
avigate</dfn> to a particular resource <var title=3D""=
>destination</var>, it must run the following steps:</p>
+
+    <ol><li><p>If the <code><a href=3D#the-fo=
rm-element>form</a></code> has a non-null <a href=3D#pl=
anned-navigation>planned navigation</a>, remove it from
+     its <a href=3D#task-queue>task queue</a>.</li>
+
+     <li>
+
+      <p>Let the <code><a href=3D#the-form-element>for=
m</a></code>'s <a href=3D#planned-navigation>planned na=
vigation</a> be a new <a href=3D#concept-task title=3Dconcept-ta=
sk>task</a> that consists of running the following steps:</p&=
gt;
+
+      <ol><li><p>Let the <code><a href=3D#the=
-form-element>form</a></code>'s <a href=3D#planned-navi=
gation>planned navigation</a> be null.</li>
+
+       <li><p><a href=3D#navigate>Navigate</a>&l=
t;!--DONAV form--> <var title=3D"">target browsing con=
text</var> to
+       the particular resource <var title=3D"">destinati=
on</var>. If <var title=3D"">replace</var> is
+       true, then <var title=3D"">target browsing contex=
t</var> must be navigated with
+       <a href=3D#replacement-enabled>replacement enabled</a&gt=
;.</p>
+
+      </ol><p>For the purposes of this task, <var title=3D=
"">target browsing context</var> and <var title=3D&=
quot;">replace</var> are the variables that were set up whe=
n the overall form submission
+      algorithm was run, with their values as they stood when this <a=
 href=3D#planned-navigation>planned navigation</a>
+      was <a href=3D#queue-a-task title=3D"queue a task"&gt=
;queued</a>.</p>
+
+     </li>
+
+     <li>
+
+      <p><a href=3D#queue-a-task title=3D"queue a task&quo=
t;>Queue the task</a> that is the <code><a href=3D#the-=
form-element>form</a></code>'s new
+      <a href=3D#planned-navigation>planned navigation</a>.&=
lt;/p>
+
+      <p>The <a href=3D#task-source>task source</a> fo=
r this task is the <a href=3D#dom-manipulation-task-source>DOM mani=
pulation task
+      source</a>.</p>
+
+     </li>
+
+    </ol><p>The behaviors are as follows:</p>
+
+    <dl><dt><dfn id=3Dsubmit-mutate-action title=3Dsubmit=
-mutate-action>Mutate action URL</dfn>
+     <dd>
+
+      <p>Let <var title=3D"">query</var> be =
the result of encoding the <var title=3D"">form data
+      set</var> using the <a href=3D#application/x-www-form-url=
encoded-encoding-algorithm><code title=3D"">applicatio=
n/x-www-form-urlencoded</code> encoding
+      algorithm</a>, interpreted as a US-ASCII string.</p>
+
+      <!-- by this point we've already tried to resolve the URL, so w=
e know we can parse it -->
+
+      <p>Set <var title=3D"">parsed action</var=
>'s <a href=3D#concept-url-query title=3Dconcept-url-query>query=
</a>
+      component to <var title=3D"">query</var>.&lt=
;/p>
+
+      <p>Let <var title=3D"">destination</var&g=
t; be a new <a href=3D#url>URL</a> formed by applying the
+      <a href=3D#concept-url-serializer title=3Dconcept-url-serialize=
r>URL serializer</a> algorithm to <var title=3D""&g=
t;parsed action</var>.</p>
+
+      <p><a href=3D#plan-to-navigate>Plan to navigate</a&=
gt; to <var title=3D"">destination</var>.</p>
+
+     </dd>
+
+     <dt><dfn id=3Dsubmit-body title=3Dsubmit-body>Submit as=
 entity body</dfn>
+     <dd>
+
+      <p>Let <var title=3D"">entity body</var&g=
t; be the result of encoding the <var title=3D"">form dat=
a
+      set</var> using the <a href=3D#appropriate-form-encoding-=
algorithm>appropriate form encoding algorithm</a>.</p>
+
+      <p>Let <var title=3D"">MIME type</var>=
 be determined as follows:</p>
+
+      <dl><dt>If <var title=3D"">enctype<=
/var> is <code title=3Dattr-fs-enctype-urlencoded><a href=3D#=
attr-fs-enctype-urlencoded>application/x-www-form-urlencoded</a>=
</code></dt>
+
+       <dd>Let <var title=3D"">MIME type</var&g=
t; be "<code title=3D"">application/x-www-form-urlen=
coded</code>".</dd>
+
+       <dt>If <var title=3D"">enctype</var> =
is <code title=3Dattr-fs-enctype-formdata><a href=3D#attr-fs-enc=
type-formdata>multipart/form-data</a></code></dt>
+
+       <dd>Let <var title=3D"">MIME type</var&g=
t; be the concatenation of the string "<code title=3D""=
>multipart/form-data;</code>", a U+0020 SPACE character, th=
e string "<code title=3D"">boundary=3D</code>&=
quot;, and the <a href=3D#multipart/form-data-boundary-string><c=
ode title=3D"">multipart/form-data</code> boundary
+       string</a> generated by the <a href=3D#multipart/form-da=
ta-encoding-algorithm><code title=3D"">multipart/form-=
data</code> encoding
+       algorithm</a>.</dd>
+
+       <dt>If <var title=3D"">enctype</var> =
is <code title=3Dattr-fs-enctype-text><a href=3D#attr-fs-enctype=
-text>text/plain</a></code></dt>
+
+       <dd>Let <var title=3D"">MIME type</var&g=
t; be "<code title=3D"">text/plain</code>&quot=
;.</dd>
+
+      </dl><!--<p>If <var title=3D"">meth=
od</var> is anything but (GET or) POST, and the
+      <span>origin</span> of <var title=3D""&gt=
;action</var> is not the <span>same origin</span> as th=
at
+      of <var title=3D"">form document</var>, then=
 abort these steps.</p> [or do CORS] (this is
+      commented out since only POST can trigger this now, and that's his=
torically unrestricted)--><p>Otherwise, <a href=3D#plan-to-na=
vigate>plan to navigate</a> to <var title=3D"">a=
ction</var> using the HTTP
+      method given by <var title=3D"">method</var>=
 and with <var title=3D"">entity body</var> as the
+      entity body, of type <var title=3D"">MIME type<=
/var>.</p>
+
+     </dd>
+
+     <dt><dfn id=3Dsubmit-get-action title=3Dsubmit-get-action&=
gt;Get action URL</dfn>
+     <dd>
+
+      <p><a href=3D#plan-to-navigate>Plan to navigate</a&=
gt; to <var title=3D"">action</var>.</p>
+
+      <p class=3Dnote>The <var title=3D"">form dat=
a set</var> is discarded.</p>
+
+     </dd>
+
+     <dt><dfn id=3Dsubmit-data-post title=3Dsubmit-data-post&gt=
;Post to data:</dfn>
+     <dd>
+
+      <p>Let <var title=3D"">data</var> be t=
he result of encoding the <var title=3D"">form data
+      set</var> using the <a href=3D#appropriate-form-encoding-=
algorithm>appropriate form encoding algorithm</a>.</p>
+
+      <p>If <var title=3D"">action</var> con=
tains the string "<code title=3D"">%%%%</code>=
" (four U+0025
+      PERCENT SIGN characters), then <a href=3D#percent-encode>per=
cent encode</a> all bytes in <var title=3D"">data&l=
t;/var> that, if interpreted as US-ASCII, are not characters in the UR=
L
+      <a href=3D#default-encode-set>default encode set</a>, =
and then, treating the result as a US-ASCII string,
+      <a href=3D#utf-8-percent-encode>UTF-8 percent encode</a&g=
t; all the U+0025 PERCENT SIGN characters in the resulting
+      string and replace the first occurrence of "<code title=3D=
"">%%%%</code>" in <var title=3D""&g=
t;action</var> with the resulting doubly-escaped string. <a href=
=3D#refsURL>[URL]</a></p>
+
+      <p>Otherwise, if <var title=3D"">action</=
var> contains the string "<code title=3D"">%%<=
/code>"
+      (two U+0025 PERCENT SIGN characters in a row, but not four), then =
<a href=3D#utf-8-percent-encode>UTF-8 percent
+      encode</a> all characters in <var title=3D""&gt=
;data</var> that, if interpreted as US-ASCII, are
+      not characters in the URL <a href=3D#default-encode-set>defa=
ult encode set</a>, and then, treating the result as a
+      US-ASCII string, replace the first occurrence of "<code ti=
tle=3D"">%%</code>" in <var title=3D"&quo=
t;>action</var> with the resulting escaped string. <a href=3D=
#refsURL>[URL]</a></p>
+
+      <p><a href=3D#plan-to-navigate>Plan to navigate</a&=
gt; to the potentially modified <var title=3D"">action&lt=
;/var> (which
+      will be a <a href=3D#data-protocol title=3D"data protocol&=
quot;><code title=3D"">data:</code> URL</a&gt=
;).</p>
+
+     </dd>
+
+     <dt><dfn id=3Dsubmit-mailto-headers title=3Dsubmit-mailto-=
headers>Mail with headers</dfn>
+     <dd>
+
+      <p>Let <var title=3D"">headers</var> b=
e the resulting encoding the <var title=3D"">form data
+      set</var> using the <a href=3D#application/x-www-form-url=
encoded-encoding-algorithm><code title=3D"">applicatio=
n/x-www-form-urlencoded</code> encoding
+      algorithm</a>, interpreted as a US-ASCII string.</p>
+
+      <p>Replace occurrences of U+002B PLUS SIGN characters (+) in=
 <var title=3D"">headers</var> with
+      the string "<code title=3D"">%20</code>=
".</p>
+
+      <p>Let <var title=3D"">destination</var&g=
t; consist of all the characters from the first character
+      in <var title=3D"">action</var> to the chara=
cter immediately before the first U+003F QUESTION
+      MARK character (?), if any, or the end of the string if there are =
none.</p>
+
+      <p>Append a single U+003F QUESTION MARK character (?) to &lt=
;var title=3D"">destination</var>.</p>
+
+      <p>Append <var title=3D"">headers</var&gt=
; to <var title=3D"">destination</var>.</p>
+
+      <p><a href=3D#plan-to-navigate>Plan to navigate</a&=
gt; to <var title=3D"">destination</var>.</p>
+
+     </dd>
+
+     <dt><dfn id=3Dsubmit-mailto-body title=3Dsubmit-mailto-bod=
y>Mail as body</dfn>
+     <dd>
+
+      <p>Let <var title=3D"">body</var> be t=
he resulting of encoding the <var title=3D"">form data
+      set</var> using the <a href=3D#appropriate-form-encoding-=
algorithm>appropriate form encoding algorithm</a> and then <a=
 href=3D#percent-encode title=3D"percent encode">percent enc=
oding</a> all the bytes in the resulting byte string
+      that, when interpreted as US-ASCII, are not characters in the URL =
<a href=3D#default-encode-set>default encode
+      set</a>. <a href=3D#refsURL>[URL]</a></p>
+
+      <p>Let <var title=3D"">destination</var&g=
t; have the same value as <var title=3D"">action</var&=
gt;.</p>
+
+      <p>If <var title=3D"">destination</var&gt=
; does not contain a U+003F QUESTION MARK character (?),
+      append a single U+003F QUESTION MARK character (?) to <var titl=
e=3D"">destination</var>.
+      Otherwise, append a single U+0026 AMPERSAND character (&).=
</p>
+
+      <p>Append the string "<code title=3D"">=
body=3D</code>" to <var title=3D"">destination=
</var>.</p>
+
+      <p>Append <var title=3D"">body</var>, =
interpreted as a US-ASCII string, to <var title=3D"">dest=
ination</var>.</p>
+
+      <p><a href=3D#plan-to-navigate>Plan to navigate</a&=
gt; to <var title=3D"">destination</var>.</p>
+
+     </dd>
+
+
+     <dt><dfn id=3Dsubmit-dialog title=3Dsubmit-dialog>Submi=
t dialog</dfn>
+     <dd>
+
+      <p>Let <var title=3D"">subject</var> b=
e the nearest ancestor <code><a href=3D#the-dialog-element>di=
alog</a></code> element of <var title=3D"">fo=
rm</var>, if any.</p>
+
+      <p>If there isn't one, do nothing. Otherwise, proceed as fol=
lows:</p>
+
+      <p>If <var title=3D"">submitter</var> =
is an <code><a href=3D#the-input-element>input</a></=
code> element whose <code title=3Dattr-input-type><a href=3D#=
attr-input-type>type</a></code> attribute is in the <a =
href=3D"#image-button-state-(type=3Dimage)" title=3Dattr-input-=
type-image>Image Button</a> state, then let <var title=3D&quo=
t;">result</var>
+      be the string formed by concatenating the <a href=3D#concept-in=
put-type-image-coordinate title=3Dconcept-input-type-image-coordinate>=
selected coordinate</a>'s <var title=3D"">x</var=
>-component, expressed as a base-ten number using <a href=3D#ascii-=
digits>ASCII digits</a>, a
+      U+002C COMMA character (,), and the <a href=3D#concept-input-ty=
pe-image-coordinate title=3Dconcept-input-type-image-coordinate>select=
ed
+      coordinate</a>'s <var title=3D"">y</var&g=
t;-component, expressed in the same way as the <var title=3D"&quo=
t;>x</var>-component.</p>
+
+      <p>Otherwise, if <var title=3D"">submitter&l=
t;/var> has a <a href=3D#concept-fe-value title=3Dconcept-fe-value&=
gt;value</a>, then let <var title=3D"">result</v=
ar> be that <a href=3D#concept-fe-value title=3Dconcept-fe-value&gt=
;value</a>.</p>
+
+      <p>Otherwise, there is no <var title=3D"">re=
sult</var>.</p>
+
+      <p>Then, <a href=3D#close-the-dialog>close the dialog&=
lt;/a> <var title=3D"">subject</var>. If there i=
s a <var title=3D"">result</var>, let that be the r=
eturn value.</p>
+
+     </dd>
+
+    </dl><p>The <dfn id=3Dappropriate-form-encoding-algor=
ithm>appropriate form encoding algorithm</dfn> is
+    determined as follows:</p>
+
+    <dl><dt>If <var title=3D"">enctype</v=
ar> is <code title=3Dattr-fs-enctype-urlencoded><a href=3D#at=
tr-fs-enctype-urlencoded>application/x-www-form-urlencoded</a>&l=
t;/code></dt>
+
+     <dd>Use the <a href=3D#application/x-www-form-urlencoded-e=
ncoding-algorithm><code title=3D"">application/x-www-f=
orm-urlencoded</code> encoding
+     algorithm</a>.</dd>
+
+     <dt>If <var title=3D"">enctype</var> is=
 <code title=3Dattr-fs-enctype-formdata><a href=3D#attr-fs-encty=
pe-formdata>multipart/form-data</a></code></dt>
+
+     <dd>Use the <a href=3D#multipart/form-data-encoding-algori=
thm><code title=3D"">multipart/form-data</code> =
encoding algorithm</a>.</dd>
+
+     <dt>If <var title=3D"">enctype</var> is=
 <code title=3Dattr-fs-enctype-text><a href=3D#attr-fs-enctype-t=
ext>text/plain</a></code></dt>
+
+     <dd>Use the <a href=3D#text/plain-encoding-algorithm>&l=
t;code title=3D"">text/plain</code> encoding algorithm=
</a>.</dd>
+
+    </dl></li>
+
+  </ol><h5 id=3Dconstructing-form-data-set><span class=3D=
secno>4.10.22.4 </span>Constructing the form data set</h5>
+
+  <p>The algorithm to <dfn id=3Dconstructing-the-form-data-set =
title=3D"constructing the form data set">construct the form =
data set</dfn>
+  for a form <var title=3D"">form</var> optionally=
 in the context of a submitter <var title=3D"">submitter&=
lt;/var> is as follows. If not specified otherwise, <var title=3D&q=
uot;">submitter</var>
+  is null.</p>
+
+  <ol><li><p>Let <var title=3D"">contr=
ols</var> be a list of all the <a href=3D#category-submit title=3D=
category-submit>submittable elements</a> whose <a href=3D#for=
m-owner>form owner</a> is <var title=3D"">form&l=
t;/var>, in <a href=3D#tree-order>tree order</a>.</li&g=
t;
+
+   <li><p>Let the <var title=3D"">form data =
set</var> be a list of name-value-type tuples, initially
+   empty.</li>
+
+   <li>
+
+    <p><i>Loop</i>: For each element <var title=3D&=
quot;">field</var> in <var title=3D"">contr=
ols</var>, in
+    <a href=3D#tree-order>tree order</a>, run the following =
substeps:</p>
+
+    <ol><li>
+
+      <p>If any of the following conditions are met, then skip the=
se substeps for this element:</p>
+
+      <ul><li>The <var title=3D"">field</=
var> element has a <code><a href=3D#the-datalist-element>d=
atalist</a></code> element ancestor.</li>
+
+       <li>The <var title=3D"">field</var> e=
lement is <a href=3D#concept-fe-disabled title=3Dconcept-fe-disabled&g=
t;disabled</a>.</li>
+
+       <li>The <var title=3D"">field</var> e=
lement is a <a href=3D#concept-button title=3Dconcept-button>button=
</a> but
+       it is not <var title=3D"">submitter</var>.&=
lt;/li>
+
+       <li>The <var title=3D"">field</var> e=
lement is an <code><a href=3D#the-input-element>input</a&g=
t;</code> element whose <code title=3Dattr-input-type><a h=
ref=3D#attr-input-type>type</a></code> attribute is in the=
 <a href=3D"#checkbox-state-(type=3Dcheckbox)" title=3Dattr-=
input-type-checkbox>Checkbox</a> state and whose <a href=3D#c=
oncept-fe-checked title=3Dconcept-fe-checked>checkedness</a> is =
false.</li>
+
+       <li>The <var title=3D"">field</var> e=
lement is an <code><a href=3D#the-input-element>input</a&g=
t;</code> element whose <code title=3Dattr-input-type><a h=
ref=3D#attr-input-type>type</a></code> attribute is in the=
 <a href=3D"#radio-button-state-(type=3Dradio)" title=3Dattr=
-input-type-radio>Radio Button</a> state and whose <a href=3D=
#concept-fe-checked title=3Dconcept-fe-checked>checkedness</a> i=
s false.</li>
+
+       <li>The <var title=3D"">field</var> e=
lement is not an <code><a href=3D#the-input-element>input<=
/a></code> element whose <code title=3Dattr-input-type>&lt=
;a href=3D#attr-input-type>type</a></code> attribute is in=
 the <a href=3D"#image-button-state-(type=3Dimage)" title=3D=
attr-input-type-image>Image Button</a> state, and either the &lt=
;var title=3D"">field</var> element does not have a &l=
t;code title=3Dattr-fe-name><a href=3D#attr-fe-name>name</a&g=
t;</code> attribute
+       specified, or its <code title=3Dattr-fe-name><a href=3D#=
attr-fe-name>name</a></code> attribute's value is the empt=
y
+       string.</li>
+
+       <li>The <var title=3D"">field</var> e=
lement is an <code><a href=3D#the-object-element>object</a=
></code> element that is not using
+       a <a href=3D#plugin>plugin</a>.</li>
+
+      </ul><p>Otherwise, process <var title=3D"&quot=
;>field</var> as follows:</p>
+
+     </li>
+
+     <li><p>Let <var title=3D"">type</var=
> be the value of the <code title=3D"">type</code&g=
t; IDL
+     attribute of <var title=3D"">field</var>.<=
/li> <!-- if the field is an <object> element, this
+     will get ignored. -->
+
+     <li>
+
+      <p>If the <var title=3D"">field</var> =
element is an <code><a href=3D#the-input-element>input</a&=
gt;</code> element whose <code title=3Dattr-input-type><a =
href=3D#attr-input-type>type</a></code> attribute is in th=
e <a href=3D"#image-button-state-(type=3Dimage)" title=3Datt=
r-input-type-image>Image Button</a> state, then run these furthe=
r nested
+      substeps:</p>
+
+      <ol><li><p>If the <var title=3D""&g=
t;field</var> element has a <code title=3Dattr-fe-name><a =
href=3D#attr-fe-name>name</a></code>
+       attribute specified and its value is not the empty string, let &l=
t;var title=3D"">name</var> be
+       that value followed by a single U+002E FULL STOP character (.). O=
therwise, let <var title=3D"">name</var> be the emp=
ty string.</li>
+
+       <li><p>Let <var title=3D"">name<su=
b title=3D"">x</sub></var> be the string consist=
ing of the
+       concatenation of <var title=3D"">name</var>=
 and a single U+0078 LATIN SMALL LETTER X character
+       (x).</li>
+
+       <li><p>Let <var title=3D"">name<su=
b title=3D"">y</sub></var> be the string consist=
ing of the
+       concatenation of <var title=3D"">name</var>=
 and a single U+0079 LATIN SMALL LETTER Y character
+       (y).</li>
+
+       <li><p>The <var title=3D"">field</=
var> element is <var title=3D"">submitter</var>,=
 and before
+       this algorithm was invoked the user <a href=3D#concept-input-t=
ype-image-coordinate title=3Dconcept-input-type-image-coordinate>indic=
ated a coordinate</a>. Let <var title=3D"">x</va=
r> be the <var title=3D"">x</var>-component of t=
he coordinate selected by the
+       user, and let <var title=3D"">y</var> be th=
e <var title=3D"">y</var>-component of the coordina=
te
+       selected by the user.</li>
+
+       <li><p>Append an entry to the <var title=3D"&=
quot;>form data set</var> with the name <var title=3D"&q=
uot;>name<sub title=3D"">x</sub></var>, th=
e value <var title=3D"">x</var>, and the type <v=
ar title=3D"">type</var>.</li>
+
+       <li><p>Append an entry to the <var title=3D"&=
quot;>form data set</var> with the name <var title=3D"&q=
uot;>name<sub title=3D"">y</sub></var> and=
 the value <var title=3D"">y</var>, and the type
+       <var title=3D"">type</var>.</li>
+
+       <li><p>Skip the remaining substeps for this element: =
if there are any more elements in <var title=3D"">control=
s</var>, return to the top of the <i>loop</i> step, oth=
erwise, jump to the
+       <i>end</i> step below.</li>
+
+      </ol></li>
+
+     <li><p>Let <var title=3D"">name</var=
> be the value of the <var title=3D"">field</var&gt=
; element's
+     <code title=3Dattr-fe-name><a href=3D#attr-fe-name>name=
</a></code> attribute.</li>
+
+     <li><p>If the <var title=3D"">field<=
/var> element is a <code><a href=3D#the-select-element>sel=
ect</a></code> element, then for each
+     <code><a href=3D#the-option-element>option</a>&lt=
;/code> element in the <code><a href=3D#the-select-element&gt=
;select</a></code> element's <a href=3D#concept-select-opt=
ion-list title=3Dconcept-select-option-list>list of options</a> =
whose <a href=3D#concept-option-selectedness title=3Dconcept-option-se=
lectedness>selectedness</a> is true and that is not <a href=3D=
#concept-option-disabled title=3Dconcept-option-disabled>disabled</=
a>, append an entry to the <var title=3D"">form data
+     set</var> with the <var title=3D"">name</v=
ar> as the name, the <a href=3D#concept-option-value title=3Dconcep=
t-option-value>value</a> of the <code><a href=3D#the-op=
tion-element>option</a></code> element as the value, and
+     <var title=3D"">type</var> as the type.</l=
i>
+
+     <li>
+
+      <p>Otherwise, if the <var title=3D"">field&l=
t;/var> element is an <code><a href=3D#the-input-element>i=
nput</a></code> element whose
+      <code title=3Dattr-input-type><a href=3D#attr-input-type&=
gt;type</a></code> attribute is in the <a href=3D"#ch=
eckbox-state-(type=3Dcheckbox)" title=3Dattr-input-type-checkbox>=
Checkbox</a> state or the <a href=3D"#radio-button-state-(t=
ype=3Dradio)" title=3Dattr-input-type-radio>Radio Button</a&gt=
; state, then run these further nested
+      substeps:</p>
+
+      <ol><li><p>If the <var title=3D""&g=
t;field</var> element has a <code title=3Dattr-input-value>&l=
t;a href=3D#attr-input-value>value</a></code> attribute sp=
ecified, then let <var title=3D"">value</var>
+       be the value of that attribute; otherwise, let <var title=3D&q=
uot;">value</var> be the string "<code title=3D&quo=
t;">on</code>".</li>
+
+       <li><p>Append an entry to the <var title=3D"&=
quot;>form data set</var> with <var title=3D"">n=
ame</var>
+       as the name, <var title=3D"">value</var> as=
 the value, and <var title=3D"">type</var> as the
+       type.</li>
+
+      </ol></li>
+
+     <li><p>Otherwise, if the <var title=3D""&g=
t;field</var> element is an <code><a href=3D#the-input-ele=
ment>input</a></code> element
+     whose <code title=3Dattr-input-type><a href=3D#attr-input-=
type>type</a></code> attribute is in the <a href=3D&quo=
t;#file-upload-state-(type=3Dfile)" title=3Dattr-input-type-file>=
File Upload</a> state, then for each file <a href=3D#concept-inp=
ut-type-file-selected title=3Dconcept-input-type-file-selected>selecte=
d</a> in the <code><a href=3D#the-input-element>input&l=
t;/a></code> element,
+     append an entry to the <var title=3D"">form data se=
t</var> with the <var title=3D"">name</var> a=
s
+     the name, the file (consisting of the name, the type, and the body)=
 as the value, and <var title=3D"">type</var> as th=
e type. If there are no <a href=3D#concept-input-type-file-selected ti=
tle=3Dconcept-input-type-file-selected>selected files</a>, then =
append an entry to the
+     <var title=3D"">form data set</var> with the =
<var title=3D"">name</var> as the name, the empty
+     string as the value, and <code>application/octet-stream</c=
ode> as the type.</li> <!--
+     https://bugzilla.mozilla.org/show_bug.cgi?id=3D529859 -->
+
+     <li><p>Otherwise, if the <var title=3D""&g=
t;field</var> element is an <code><a href=3D#the-object-el=
ement>object</a></code> element:
+     try to obtain a form submission value from the <a href=3D#plugin=
>plugin</a><!-- using NPAPI's
+     NPP_GetValue() entry point with the NPPVformValue variable -->, =
and if that is successful,
+     append an entry to the <var title=3D"">form data se=
t</var> with <var title=3D"">name</var> as th=
e
+     name, the returned form submission value as the value, and the stri=
ng "<code title=3D"">object</code>" as th=
e type.</li>
+
+     <li><p>Otherwise, append an entry to the <var title=3D=
"">form data set</var> with <var title=3D"&quo=
t;>name</var> as the name, the <a href=3D#concept-fe-value ti=
tle=3Dconcept-fe-value>value</a> of the <var title=3D"&q=
uot;>field</var> element as the value, and <var title=3D&quot=
;">type</var> as the type.</li>
+
+     <li>
+
+      <p>If the element has a <code title=3Dattr-fe-dirname>=
<a href=3D#attr-fe-dirname>dirname</a></code> attribute=
, and that
+      attribute's value is not the empty string, then run these substeps=
:</p>
+
+      <ol><li><p>Let <var title=3D"">d=
irname</var> be the value of the element's <code title=3Dattr-fe=
-dirname><a href=3D#attr-fe-dirname>dirname</a></code&g=
t; attribute.</li>
+
+       <li><p>Let <var title=3D"">dir</va=
r> be the string "<code title=3D"">ltr</code&g=
t;" if <a href=3D#the-directionality>the
+       directionality</a> of the element is '<a href=3D#concept=
-ltr title=3Dconcept-ltr>ltr</a>', and "<code title=3D&q=
uot;">rtl</code>" otherwise (i.e. when <a href=3D#t=
he-directionality>the directionality</a> of the element is
+       '<a href=3D#concept-rtl title=3Dconcept-rtl>rtl</a>')=
.</li>
+
+       <li><p>Append an entry to the <var title=3D"&=
quot;>form data set</var> with <var title=3D"">d=
irname</var> as the name, <var title=3D"">dir</v=
ar> as the value, and the string
+       "<code title=3D"">direction</code>&quo=
t; as the type.</li>
+
+      </ol><p class=3Dnote>An element can only have a <co=
de title=3Dattr-fe-dirname><a href=3D#attr-fe-dirname>dirname&lt=
;/a></code>
+      attribute if it is a <code><a href=3D#the-textarea-elemen=
t>textarea</a></code> element or an <code><a href=
=3D#the-input-element>input</a></code> element whose
+      <code title=3Dattr-input-type><a href=3D#attr-input-type&=
gt;type</a></code> attribute is in either the <a href=3D&q=
uot;#text-(type=3Dtext)-state-and-search-state-(type=3Dsearch)" titl=
e=3Dattr-input-type-text>Text</a> state or the <a href=3D&quo=
t;#text-(type=3Dtext)-state-and-search-state-(type=3Dsearch)" title=3D=
attr-input-type-search>Search</a> state.</p>
+
+     </li>
+
+    </ol></li>
+
+   <li>
+
+    <p><i>End</i>: For the name of each entry in the &=
lt;var title=3D"">form data set</var>, and for the
+    value of each entry in the <var title=3D"">form data=
 set</var> whose type is not "<code title=3D""&gt=
;file</code>" or "<code title=3D"">textar=
ea</code>", replace every occurrence of a U+000D
+    CARRIAGE RETURN (CR) character not followed by a U+000A LINE FEED (L=
F) character, and every
+    occurrence of a U+000A LINE FEED (LF) character not preceded by a U+=
000D CARRIAGE RETURN (CR)
+    character, by a two-character string consisting of a U+000D CARRIAGE=
 RETURN U+000A LINE FEED
+    (CRLF) character pair.</p>
+
+    <p class=3Dnote>In the case of the <a href=3D#concept-fe-va=
lue title=3Dconcept-fe-value>value</a> of
+    <code><a href=3D#the-textarea-element>textarea</a>=
</code> elements, this newline normalization is already performed d=
uring the
+    conversion of the control's <a href=3D#concept-textarea-raw-value=
 title=3Dconcept-textarea-raw-value>raw value</a> into the
+    control's <a href=3D#concept-fe-value title=3Dconcept-fe-value&gt=
;value</a> (which also performs any necessary line
+    wrapping). In the case of <code><a href=3D#the-input-elemen=
t>input</a></code> elements <code title=3Dattr-input-ty=
pe><a href=3D#attr-input-type>type</a></code>
+    attributes in the <a href=3D"#file-upload-state-(type=3Dfile=
)" title=3Dattr-input-type-file>File Upload</a> state, the =
value is not
+    normalized.</p>
+
+   </li>
+
+   <li><p>Return the <var title=3D"">form da=
ta set</var>.</li>
+
+  </ol></div>
+
+
+  <div class=3Dimpl>
+
+  <h5 id=3Dselecting-a-form-submission-encoding><span class=3Ds=
ecno>4.10.22.5 </span>Selecting a form submission encoding</h=
5>
+
+  <p>If the user agent is to <dfn id=3Dpicking-an-encoding-for-=
the-form title=3D"picking an encoding for the form">pick an =
encoding for a
+  form</dfn>, optionally with an <i>allow non-ASCII-compatib=
le encodings</i> flag set, it must run
+  the following substeps:</p>
+
+  <ol><li><p>Let <var title=3D"">input=
</var> be the value of the <code><a href=3D#the-form-eleme=
nt>form</a></code> element's <code title=3Dattr-form-ac=
cept-charset><a href=3D#attr-form-accept-charset>accept-charset&=
lt;/a></code> attribute.</li>
+
+   <li><p>Let <var title=3D"">candidate enco=
ding labels</var> be the result of <a href=3D#split-a-string-on-=
spaces title=3D"split a
+   string on spaces">splitting <var title=3D"">i=
nput</var> on spaces</a>.</li>
+
+   <li><p>Let <var title=3D"">candidate enco=
dings</var> be an empty list of <a href=3D#encoding title=3Denco=
ding>character encodings</a>.</li>
+
+   <li><p>For each token in <var title=3D"">=
candidate encoding labels</var> in turn (in the order in
+   which they were found in <var title=3D"">input</va=
r>), <a href=3D#getting-an-encoding title=3D"getting an encodi=
ng">get an
+   encoding</a> for the token and, if this does not result in fail=
ure, append the
+   <a href=3D#encoding>encoding</a> to <var title=3D&quot=
;">candidate encodings</var>.</li>
+
+   <li><p>If the <i>allow non-ASCII-compatible encodin=
gs</i> flag is not set, remove any encodings
+   that are not <a href=3D#ascii-compatible-character-encoding title=3D=
"ASCII-compatible character encoding">ASCII-compatible chara=
cter
+   encodings</a> from <var title=3D"">candidate en=
codings</var>.</li>
+
+   <li><p>If <var title=3D"">candidate encod=
ings</var> is empty, return UTF-8 and abort these
+   steps.</li>
+
+   <li>
+
+    <p>Each character encoding in <var title=3D"">=
candidate encodings</var> can represent a finite
+    number of characters. (For example, UTF-8 can represent all 1.1 mill=
ion or so Unicode code
+    points, while Windows-1252 can only represent 256.)</p>
+
+    <p>For each encoding in <var title=3D"">candid=
ate encodings</var>, determine how many of the
+    characters in the names and values of the entries in the <var tit=
le=3D"">form data set</var> the
+    encoding can represent (without ignoring duplicates). Let <var ti=
tle=3D"">max</var> be the
+    highest such count. (For UTF-8, <var title=3D"">max&=
lt;/var> would equal the number of characters
+    in the names and values of the entries in the <var title=3D"=
">form data set</var>.)</p>
+
+    <p>Return the first encoding in <var title=3D""&g=
t;candidate encodings</var> that can encode <var title=3D"&=
quot;>max</var> characters in the names and values of the entrie=
s in the <var title=3D"">form
+    data set</var>.</p>
+
+   </li>
+
+  </ol></div>
+
+
+  <h5 id=3Durl-encoded-form-data><span class=3Dsecno>4.10.22=
.6 </span>URL-encoded form data</h5>
+
+  <p class=3Dnote>This form data set encoding is in many ways an a=
berrant monstrosity, the result of
+  many years of implementation accidents and compromises leading to a se=
t of requirements necessary
+  for interoperability, but in no way representing good design practices=
. In particular, readers are
+  cautioned to pay close attention to the twisted details involving repe=
ated (and in some cases
+  nested) conversions between character encodings and byte sequences.&lt=
;/p>
+
+  <div class=3Dimpl>
+
+  <p>The <dfn id=3Dapplication/x-www-form-urlencoded-encoding-a=
lgorithm><code title=3D"">application/x-www-form-urlen=
coded</code> encoding algorithm</dfn> is as
+  follows:</p>
+
+  <ol><!-- the first few steps of this are the same as in the n=
ext section --><li><p>Let <var title=3D"">=
result</var> be the empty string.</li>
+
+   <li>
+
+    <p>If the <code><a href=3D#the-form-element>form&l=
t;/a></code> element has an <code title=3Dattr-form-accept-ch=
arset><a href=3D#attr-form-accept-charset>accept-charset</a&g=
t;</code> attribute, let the selected character
+    encoding be the result of <a href=3D#picking-an-encoding-for-the-=
form>picking an encoding for the form</a>.</p>
+
+    <p>Otherwise, if the <code><a href=3D#the-form-elemen=
t>form</a></code> element has no <code title=3Dattr-for=
m-accept-charset><a href=3D#attr-form-accept-charset>accept-char=
set</a></code> attribute, but the <a href=3D"#documen=
t's-character-encoding">document's
+    character encoding</a> is an <a href=3D#ascii-compatible-ch=
aracter-encoding>ASCII-compatible character encoding</a>, then t=
hat is
+    the selected character encoding.</p>
+
+    <p>Otherwise, let the selected character encoding be UTF-8.&lt=
;/p>
+
+   </li>
+
+   <li><p>Let <var title=3D"">charset</va=
r> be the <a href=3D#encoding-name title=3D"encoding name&quot=
;>name</a> of the
+   selected <a href=3D#encoding title=3Dencoding>character encodin=
g</a>.</li>
+
+   <li>
+
+    <p>For each entry in the <var title=3D"">form =
data set</var>, perform these substeps:</p>
+
+    <ol><li><p>If the entry's name is "<code t=
itle=3Dattr-fe-name-charset><a href=3D#attr-fe-name-charset>_cha=
rset_</a></code>" and its
+     type is "<code title=3D"">hidden</code>&=
quot;, replace its value with <var title=3D"">charset<=
/var>.</li>
+
+     <li><p>If the entry's type is "<code title=3D&q=
uot;">file</code>", replace its value with the file's
+     name only.</li> <!-- this is not present in the next secti=
on -->
+
+     <li><p>For each character in the entry's name and value=
 that cannot be expressed using the
+     selected character encoding, replace the character by a string cons=
isting of a U+0026 AMPERSAND
+     character (&), a U+0023 NUMBER SIGN character (#), one or m=
ore <a href=3D#ascii-digits>ASCII digits</a>
+     representing the Unicode code point of the character in base ten, a=
nd finally a U+003B
+     SEMICOLON character (;).</li><!-- we should say it should =
be the shortest possible string,
+     no leading zeros. this whole step is asinine, though, so... -->
+
+     <!-- this is where the similarities with the next section end --=
>
+
+     <li>
+
+      <p>Encode the entry's name and value using the <a href=3D=
#encoder>encoder</a> for the selected character
+      encoding. The entry's name and value are now byte strings.</p&g=
t;
+
+     </li>
+
+     <li>
+
+      <p>For each byte in the entry's name and value, apply the ap=
propriate subsubsteps from the
+      following list:</p>
+
+      <dl class=3Dswitch><dt>If the byte is 0x20 (U+0020 SPA=
CE if interpreted as ASCII)</dt>
+
+       <dd>Replace the byte with a single 0x2B byte (U+002B PLUS S=
IGN character (+) if interpreted
+       as ASCII).</dd>
+
+
+       <!-- * - . 0-9 a-z _ A-Z -->
+
+       <dt>If the byte is in the range 0x2A, 0x2D, 0x2E, 0x30 to 0=
x39, 0x41 to 0x5A, 0x5F, 0x61 to
+       0x7A</dt>
+
+       <dd><p>Leave the byte as is.</dd>
+
+
+       <dt>Otherwise</dt>
+
+       <dd>
+
+        <ol><li><p>Let <var title=3D""&gt=
;s</var> be a string consisting of a U+0025 PERCENT SIGN character
+         (%) followed by <a href=3D#uppercase-ascii-hex-digits>upp=
ercase ASCII hex digits</a> representing the hexadecimal value
+         of the byte in question (zero-padded if necessary).</li>
+
+         <li><p>Encode the string <var title=3D"&quo=
t;>s</var> as US-ASCII, so that it is now a byte
+         string.</p>
+
+         <li><p>Replace the byte in question in the name or =
value being processed by the bytes in
+         <var title=3D"">s</var>, preserving their=
 relative order.</li>
+
+        </ol></dd>
+
+      </dl></li>
+
+     <li>
+
+      <p>Interpret the entry's name and value as Unicode strings e=
ncoded in US-ASCII. (All of the
+      bytes in the string will be in the range 0x00 to 0x7F; the high bi=
t will be zero throughout.)
+      The entry's name and value are now Unicode strings again.</p&gt=
;
+
+     </li>
+
+     <li><p>If the entry's name is "<code title=3Dat=
tr-fe-name-isindex><a href=3D#attr-fe-name-isindex>isindex</a=
></code>", its type is
+     "<code title=3D"">text</code>", and=
 this is the first entry in the <var title=3D"">form data
+     set</var>, then append the value to <var title=3D"&qu=
ot;>result</var> and skip the rest of the
+     substeps for this entry, moving on to the next entry, if any, or th=
e next step in the overall
+     algorithm otherwise.</li>
+
+     <li><p>If this is not the first entry, append a single =
U+0026 AMPERSAND character (&) to
+     <var title=3D"">result</var>.</li>
+
+     <li><p>Append the entry's name to <var title=3D&quot=
;">result</var>.</li>
+
+     <li><p>Append a single U+003D EQUALS SIGN character (=3D=
) to <var title=3D"">result</var>.</li>
+
+     <li><p>Append the entry's value to <var title=3D&quo=
t;">result</var>.</li>
+
+    </ol></li>
+
+   <li><p>Encode <var title=3D"">result</=
var> as US-ASCII and return the resulting byte
+   stream.</li>
+
+  </ol></div>
+
+  <p>To <dfn id=3Dapplication/x-www-form-urlencoded-decoding-al=
gorithm title=3D"application/x-www-form-urlencoded decoding algorith=
m">decode
+  <code>application/x-www-form-urlencoded</code> payloads&lt=
;/dfn>, the following algorithm should be
+  used. This algorithm uses as inputs the payload itself, <var title=3D=
"">payload</var>, consisting of
+  a Unicode string using only characters in the range U+0000 to U+007F; =
a default character encoding
+  <var title=3D"">encoding</var>; and optionally a=
n <var title=3D"">isindex</var> flag indicating tha=
t
+  the payload is to be processed as if it had been generated for a form =
containing an <code title=3Dattr-fe-name-isindex><a href=3D#attr=
-fe-name-isindex>isindex</a></code> control. The output of=
 this algorithm is a sorted list
+  of name-value pairs. If the <var title=3D"">isindex&lt=
;/var> flag is set and the first control really
+  was an <code title=3Dattr-fe-name-isindex><a href=3D#attr-fe-=
name-isindex>isindex</a></code> control, then the first na=
me-value pair
+  will have as its name the empty string.</p>
+
+  <p>Which default character encoding to use can only be determine=
d on a case-by-case basis, but
+  generally the best character encoding to use as a default is the one t=
hat was used to encode the
+  page on which the form used to create the payload was itself found. In=
 the absence of a better
+  default, UTF-8 is suggested.</p>
+
+  <p>The <var title=3D"">isindex</var> flag =
is for legacy use only. Forms in conforming HTML documents
+  will not generate payloads that need to be decoded with this flag set.=
</p>
+
+  <ol><li><p>Let <var title=3D"">strin=
gs</var> be the result of <a href=3D#strictly-split-a-string tit=
le=3D"strictly split a
+   string">strictly splitting the string</a> <var title=
=3D"">payload</var> on U+0026 AMPERSAND
+   characters (&).</li>
+
+   <li><p>If the <var title=3D"">isindex<=
/var> flag is set and the first string in <var title=3D""=
>strings</var> does not contain a U+003D EQUALS SIGN character (=
=3D), insert a U+003D
+   EQUALS SIGN character (=3D) at the start of the first string in <v=
ar title=3D"">strings</var>.</li>
+
+   <li><p>Let <var title=3D"">pairs</var&=
gt; be an empty list of name-value pairs.</li>
+
+   <li>
+
+    <p>For each string <var title=3D"">string</=
var> in <var title=3D"">strings</var>, run these
+    substeps:</p>
+
+    <ol><li>
+
+      <p>If <var title=3D"">string</var> con=
tains a U+003D EQUALS SIGN character (=3D), then let <var title=3D&quo=
t;">name</var> be the substring of <var title=3D"&q=
uot;>string</var> from the start of <var title=3D""=
>string</var> up to but excluding its first U+003D EQUALS SIGN c=
haracter (=3D), and let
+      <var title=3D"">value</var> be the substring=
 from the first character, if any, after the first
+      U+003D EQUALS SIGN character (=3D) up to the end of <var title=3D=
"">string</var>. If the first
+      U+003D EQUALS SIGN character (=3D) is the first character, then &l=
t;var title=3D"">name</var> will be
+      the empty string. If it is the last character, then <var title=3D=
"">value</var> will be the
+      empty string.</p>
+
+      <p>Otherwise, <var title=3D"">string</var=
> contains no U+003D EQUALS SIGN characters (=3D). Let
+      <var title=3D"">name</var> have the value of=
 <var title=3D"">string</var> and let <var title=
=3D"">value</var> be the empty string.</p>
+
+     </li>
+
+     <li>
+
+      <p>Replace any U+002B PLUS SIGN characters (+) in <var ti=
tle=3D"">name</var> and <var title=3D""&g=
t;value</var> with U+0020 SPACE characters.</p>
+
+     </li>
+
+     <li>
+
+      <p>Replace any escape in <var title=3D"">nam=
e</var> and <var title=3D"">value</var> with =
the
+      character represented by the escape. This replacement must not be =
recursive.</p>
+
+      <p>An escape is a U+0025 PERCENT SIGN character (%) followed=
 by two <a href=3D#ascii-hex-digits>ASCII hex
+      digits</a>.</p>
+
+      <p>The character represented by an escape is the Unicode cha=
racter whose code point is equal
+      to the value of the two characters after the U+0025 PERCENT SIGN c=
haracter (%), interpreted as
+      a hexadecimal number (in the range 0..255).</p>
+
+      <p class=3Dexample>So for instance the string "<code=
 title=3D"">A%2BC</code>" would become
+      "<code title=3D"">A+C</code>". Sim=
ilarly, the string "<code title=3D"">100%25AA%21<=
/code>" becomes
+      the string "<code title=3D"">100%AA!</code=
>".</p>
+
+     </li>
+
+     <li><p>Convert the <var title=3D"">name=
</var> and <var title=3D"">value</var> string=
s to their byte
+     representation in ISO-8859-1 (i.e. convert the Unicode string to a =
byte string, mapping code
+     points to byte values directly).</li>
+
+     <li><p>Add a pair consisting of <var title=3D"&=
quot;>name</var> and <var title=3D"">value</v=
ar> to <var title=3D"">pairs</var>.</li>
+
+    </ol></li>
+
+   <li><p>If any of the name-value pairs in <var title=3D=
"">pairs</var> have a name component
+   consisting of the string "<code title=3D"">_char=
set_</code>" encoded in US-ASCII, and the value
+   component of the first such pair, when decoded as US-ASCII, is the na=
me of a supported character
+   encoding, then let <var title=3D"">encoding</var&g=
t; be that character encoding (replacing the default
+   passed to the algorithm).</li>
+
+   <li><p>Convert the name and value components of each name=
-value pair in <var title=3D"">pairs</var>
+   to Unicode by interpreting the bytes according to the encoding <va=
r title=3D"">encoding</var>.</li>
+
+   <li><p>Return <var title=3D"">pairs</v=
ar>.</li>
+
+  </ol><p class=3Dnote>Parameters on the <code><a h=
ref=3D#application/x-www-form-urlencoded>application/x-www-form-urlenc=
oded</a></code> MIME type are
+  ignored. In particular, this MIME type does not support the <code t=
itle=3D"">charset</code>
+  parameter.</p>
+
+
+
+  <h5 id=3Dmultipart-form-data><span class=3Dsecno>4.10.22.7=
 </span>Multipart form data</h5>
+
+  <div class=3Dimpl>
+
+  <!-- http://hixie.ch/tests/adhoc/html/forms/submission/multipart_fo=
rm-data/ -->
+
+  <!-- NOTE: This algorithm is also used by the XHR spec -->
+
+  <p>The <dfn id=3Dmultipart/form-data-encoding-algorithm>&l=
t;code title=3D"">multipart/form-data</code> encoding =
algorithm</dfn> is as follows:</p>
+
+  <ol><!-- the first few steps of this are the same as in the p=
revious section --><li><p>Let <var title=3D""=
>result</var> be the empty string.</li>
+
+   <li>
+
+    <p>If the algorithm was invoked with an explicit character enc=
oding, let the selected character
+    encoding be that encoding. (This algorithm is used by other specific=
ations, which provide an
+    explicit character encoding to avoid the dependency on the <code&=
gt;<a href=3D#the-form-element>form</a></code> element =
described
+    in the next paragraph.)</p>
+
+    <p>Otherwise, if the <code><a href=3D#the-form-elemen=
t>form</a></code> element has an <code title=3Dattr-for=
m-accept-charset><a href=3D#attr-form-accept-charset>accept-char=
set</a></code> attribute, let the selected character
+    encoding be the result of <a href=3D#picking-an-encoding-for-the-=
form>picking an encoding for the form</a>.</p>
+
+    <p>Otherwise, if the <code><a href=3D#the-form-elemen=
t>form</a></code> element has no <code title=3Dattr-for=
m-accept-charset><a href=3D#attr-form-accept-charset>accept-char=
set</a></code> attribute, but the <a href=3D"#documen=
t's-character-encoding">document's
+    character encoding</a> is an <a href=3D#ascii-compatible-ch=
aracter-encoding>ASCII-compatible character encoding</a>, then t=
hat is
+    the selected character encoding.</p>
+
+    <p>Otherwise, let the selected character encoding be UTF-8.&lt=
;/p>
+
+   </li>
+
+   <li><p>Let <var title=3D"">charset</va=
r> be the <a href=3D#encoding-name title=3D"encoding name&quot=
;>name</a> of the
+   selected <a href=3D#encoding title=3Dencoding>character encodin=
g</a>.</li>
+
+   <li>
+
+    <p>For each entry in the <var title=3D"">form =
data set</var>, perform these substeps:</p>
+
+    <ol><li><p>If the entry's name is "<code t=
itle=3Dattr-fe-name-charset><a href=3D#attr-fe-name-charset>_cha=
rset_</a></code>" and its
+     type is "<code title=3D"">hidden</code>&=
quot;, replace its value with <var title=3D"">charset<=
/var>.</li>
+
+     <!-- the step that replaces a file with its name is missing in
+     this version of the algorithm -->
+
+     <li><p>For each character in the entry's name and value=
 that cannot be expressed using the
+     selected character encoding, replace the character by a string cons=
isting of a U+0026 AMPERSAND
+     character (&), a U+0023 NUMBER SIGN character (#), one or m=
ore <a href=3D#ascii-digits>ASCII digits</a>
+     representing the Unicode code point of the character in base ten, a=
nd finally a U+003B
+     SEMICOLON character (;).</li><!-- we should say it should =
be the shortest possible string,
+     no leading zeros. this whole step is asinine, though, so... -->
+
+     <!-- this is where the similarities with the previous section en=
d -->
+
+    </ol></li>
+
+   <li>
+
+    <p>Encode the (now mutated) <var title=3D"">fo=
rm data set</var> using the rules described by RFC
+    2388, <cite>Returning Values from Forms: <code title=3D&quo=
t;">multipart/form-data</code></cite>, and
+    return the resulting byte stream. <a href=3D#refsRFC2388>[RFC2=
388]</a></p>
+
+    <p>Each entry in the <var title=3D"">form data=
 set</var> is a <i>field</i>, the name of the entry
+    is the <i>field name</i> and the value of the entry is t=
he <i>field value</i>.</p>
+
+    <p>The order of parts must be the same as the order of fields =
in the <var title=3D"">form data
+    set</var>. Multiple entries with the same name must be treated=
 as distinct fields.</p>
+
+    <p class=3Dnote>In particular, this means that multiple files =
submitted as part of a single
+    <code title=3D""><input type=3Dfile&=
amp;nbsp;multiple></code> element will result in each file
+    having its own field; the "sets of files" feature ("&=
lt;code title=3D"">multipart/mixed</code>") of
+    RFC 2388 is not used.</p>
+
+    <p>The parts of the generated <code title=3D""&gt=
;multipart/form-data</code> resource that correspond
+    to non-file fields must not have a <code><a href=3D#content=
-type>Content-Type</a></code> header specified. Their name=
s and
+    values must be encoded using the character encoding selected above (=
field names in particular do
+    not get converted to a 7-bit safe encoding as suggested in RFC 2388)=
.</p>
+
+    <p>File names included in the generated <code title=3D&quot=
;">multipart/form-data</code> resource (as
+    part of file fields) must use the character encoding selected above,=
 though the precise name may
+    be approximated if necessary (e.g. newlines could be removed from fi=
le names, quotes could be
+    changed to "%22", and characters not expressible in the se=
lected character encoding could be
+    replaced by other characters). User agents must not use the RFC 2231=
 encoding suggested by RFC
+    2388.</p> <!-- this isn't a willful violation since 2388 do=
esn't make it a requirement, it just
+    vaguely suggests it -->
+
+    <p>The boundary used by the user agent in generating the retur=
n value of this algorithm is the
+    <dfn id=3Dmultipart/form-data-boundary-string><code title=3D=
"">multipart/form-data</code> boundary string</dfn&=
gt;. (This value is used to
+    generate the MIME type of the form submission payload generated by t=
his algorithm.)</p>
+
+   </li>
+
+  </ol></div>
+
+  <p>For details on how to interpret <code>multipart/form-da=
ta</code> payloads, see RFC 2388. <a href=3D#refsRFC2388>[RFC=
2388]</a></p>
+
+
+
+  <h5 id=3Dplain-text-form-data><span class=3Dsecno>4.10.22.=
8 </span>Plain text form data</h5>
+
+  <div class=3Dimpl>
+
+  <p>The <dfn id=3Dtext/plain-encoding-algorithm><code ti=
tle=3D"">text/plain</code> encoding algorithm</dfn&=
gt; is as follows:</p>
+
+  <ol><li><p>Let <var title=3D"">resul=
t</var> be the empty string.</li>
+
+   <li>
+
+    <!-- this is different from application/x-www-form-urlencoded in =
that it isn't limited to
+    ASCII-compatible encodings -->
+
+    <p>If the <code><a href=3D#the-form-element>form&l=
t;/a></code> element has an <code title=3Dattr-form-accept-ch=
arset><a href=3D#attr-form-accept-charset>accept-charset</a&g=
t;</code> attribute, let the selected character
+    encoding be the result of <a href=3D#picking-an-encoding-for-the-=
form>picking an encoding for the form</a>, with the <i>all=
ow
+    non-ASCII-compatible encodings</i> flag unset.</p>
+
+    <p>Otherwise, if the <code><a href=3D#the-form-elemen=
t>form</a></code> element has no <code title=3Dattr-for=
m-accept-charset><a href=3D#attr-form-accept-charset>accept-char=
set</a></code> attribute, then that is the selected
+    character encoding.</p>
+
+   </li>
+
+   <li><p>Let <var title=3D"">charset</va=
r> be the <a href=3D#encoding-name title=3D"encoding name&quot=
;>name</a> of the
+   selected <a href=3D#encoding title=3Dencoding>character encodin=
g</a>.</li>
+
+   <li><p>If the entry's name is "<code title=3Dattr=
-fe-name-charset><a href=3D#attr-fe-name-charset>_charset_</a=
></code>" and its type
+   is "<code title=3D"">hidden</code>", =
replace its value with <var title=3D"">charset</var&gt=
;.</li>
+
+   <li><p>If the entry's type is "<code title=3D&quo=
t;">file</code>", replace its value with the file's
+   name only.</li>
+
+   <li>
+
+    <p>For each entry in the <var title=3D"">form =
data set</var>, perform these substeps:</p>
+
+    <ol><li><p>Append the entry's name to <var titl=
e=3D"">result</var>.</li>
+
+     <li><p>Append a single U+003D EQUALS SIGN character (=3D=
) to <var title=3D"">result</var>.</li>
+
+     <li><p>Append the entry's value to <var title=3D&quo=
t;">result</var>.</li>
+
+     <li><p>Append a U+000D CARRIAGE RETURN (CR) U+000A LINE=
 FEED (LF) character pair to <var title=3D"">result</v=
ar>.</li>
+
+    </ol></li>
+
+   <li><p>Encode <var title=3D"">result</=
var> using the <a href=3D#encoder>encoder</a> for the sele=
cted
+   character encoding and return the resulting byte stream.</li>
+
+  </ol></div>
+
+  <p>Payloads using the <code>text/plain</code> format=
 are intended to be human readable. They are
+  not reliably interpretable by computer, as the format is ambiguous (fo=
r example, there is no way
+  to distinguish a literal newline in a value from the newline at the en=
d of the value).</p>
+
+
+
+  <div class=3Dimpl>
+
+  <h4 id=3Dresetting-a-form><span class=3Dsecno>4.10.23 <=
/span>Resetting a form</h4>
+
+  <p>When a <code><a href=3D#the-form-element>form<=
/a></code> element <var title=3D"">form</var&=
gt; is <dfn id=3Dconcept-form-reset title=3Dconcept-form-reset>rese=
t</dfn>, the user agent must <a href=3D#fire-a-simple-event>f=
ire a simple event</a> named
+  <code title=3Devent-reset>reset</code>, that bubbles and i=
s cancelable, at <var title=3D"">form</var>, and th=
en, if that event is not canceled, must invoke the <a href=3D#concept-=
form-reset-control title=3Dconcept-form-reset-control>reset algorithm&=
lt;/a> of each <a href=3D#category-reset title=3Dcategory-reset>=
resettable element</a> whose <a href=3D#form-owner>form owner=
</a> is <var title=3D"">form</var>.</p>
+
+  <p>Each <a href=3D#category-reset title=3Dcategory-reset>r=
esettable element</a> defines its own <dfn id=3Dconcept-form-res=
et-control title=3Dconcept-form-reset-control>reset algorithm</dfn&=
gt;. Changes made to form controls as part of
+  these algorithms do not count as changes caused by the user (and thus,=
 e.g., do not cause <code title=3Devent-input>input</code> ev=
ents to fire).</p>
+
+  </div>
+
+
+
+  <h3 id=3Dinteractive-elements><span class=3Dsecno>4.11 &lt=
;/span>Interactive elements</h3>
+
+  <h4 id=3Dthe-details-element><span class=3Dsecno>4.11.1 &l=
t;/span>The <dfn><code>details</code></dfn> el=
ement</h4>
+
+  <dl class=3Delement><dt><a href=3D#element-dfn-categori=
es title=3Delement-dfn-categories>Categories</a>:</dt>
+   <dd><a href=3D#flow-content>Flow content</a>.</d=
d>
+   <dd><a href=3D#sectioning-root>Sectioning root</a>.=
</dd>
+   <dd><a href=3D#interactive-content>Interactive content&lt=
;/a>.</dd>
+   <dd><a href=3D#palpable-content>Palpable content</a&gt=
;.</dd>
+   <dt><a href=3D#element-dfn-contexts title=3Delement-dfn-cont=
exts>Contexts in which this element can be used</a>:</dt>
+   <dd>Where <a href=3D#flow-content>flow content</a> =
is expected.</dd>
+   <dt><a href=3D#element-dfn-content-model title=3Delement-dfn=
-content-model>Content model</a>:</dt>
+   <dd>One <code><a href=3D#the-summary-element>summar=
y</a></code> element followed by <a href=3D#flow-content&g=
t;flow content</a>.</dd>
+   <dt><a href=3D#element-dfn-tag-omission title=3Delement-dfn-=
tag-omission>Tag omission in text/html</a>:</dt>
+   <dd>Neither tag is omissible.</dd>
+   <dt><a href=3D#element-dfn-attributes title=3Delement-dfn-at=
tributes>Content attributes</a>:</dt>
+   <dd><a href=3D#global-attributes>Global attributes</a&=
gt;</dd>
+   <dd><code title=3Dattr-details-open><a href=3D#attr-de=
tails-open>open</a></code> — Whether the details=
 are visible</dd>
+   <dt><a href=3D#element-dfn-dom title=3Delement-dfn-dom>DO=
M interface</a>:</dt><!--TOPIC:DOM APIs-->
+   <dd>
+<pre class=3Didl>interface <dfn id=3Dhtmldetailselement>HTML=
DetailsElement</dfn> : <a href=3D#htmlelement>HTMLElement<=
/a> {
+           attribute boolean <a href=3D#dom-details-open title=3Ddom-=
details-open>open</a>;
+};</pre>
+   </dd>
+  </dl><!--TOPIC:HTML--><p>The <code><a href=3D=
#the-details-element>details</a></code> element <a href=
=3D#represents>represents</a> a disclosure widget from which the
+  user can obtain additional information or controls.</p>
+
+  <p class=3Dnote>The <code><a href=3D#the-details-elemen=
t>details</a></code> element is not appropriate for footno=
tes. Please see <a href=3D#footnotes>the section on footnotes</a=
> for details on how to mark up footnotes.</p>
+
+  <p>The <span class=3Dimpl>first</span> <code>&=
lt;a href=3D#the-summary-element>summary</a></code> elemen=
t child of the element, if any,
+  <a href=3D#represents>represents</a> the summary or legend=
 of the details. <span class=3Dimpl>If there is no
+  child <code><a href=3D#the-summary-element>summary</a&g=
t;</code> element, the user agent should provide its own legend (e.=
g.
+  "Details").</span></p>
+
+  <p>The rest of the element's contents <a href=3D#represents&g=
t;represents</a> the additional information or
+  controls.</p>
+
+  <p>The <dfn id=3Dattr-details-open title=3Dattr-details-open&=
gt;<code>open</code></dfn> content attribute is a <a=
 href=3D#boolean-attribute>boolean
+  attribute</a>. If present, it indicates that both the summary an=
d the additional information is
+  to be shown to the user. If the attribute is absent, only the summary =
is to be shown.</p>
+
+  <div class=3Dimpl>
+
+  <p>When the element is created, if the attribute is absent, the =
additional information should be
+  hidden; if the attribute is present, that information should be shown.=
 Subsequently, if the
+  attribute is removed, then the information should be hidden; if the at=
tribute is added, the
+  information should be shown.</p>
+
+  <p>The user agent should allow the user to request that the addi=
tional information be shown or
+  hidden. To honor a request for the details to be shown, the user agent=
 must set the <code title=3Dattr-details-open><a href=3D#attr-de=
tails-open>open</a></code> attribute on the element to the=
 value <code title=3D"">open</code>. To honor a req=
uest for the information to be hidden, the user agent must
+  remove the <code title=3Dattr-details-open><a href=3D#attr-de=
tails-open>open</a></code> attribute from the element.<=
/p>
+
+  <p>Whenever the <code title=3Dattr-details-open><a href=
=3D#attr-details-open>open</a></code> attribute is added t=
o or removed from
+  a <code><a href=3D#the-details-element>details</a>&l=
t;/code> element, the user agent must <a href=3D#queue-a-task>qu=
eue a task</a> that runs the
+  following steps, which are known as the <dfn id=3Ddetails-notificat=
ion-task-steps>details notification task steps</dfn>, for this
+  <code><a href=3D#the-details-element>details</a><=
/code> element:</p>
+
+  <ol><li>
+
+    <p>If another <a href=3D#concept-task title=3Dconcept-task&=
gt;task</a> has been <a href=3D#queue-a-task title=3D"queue=
 a
+    task">queued</a> to run the <a href=3D#details-noti=
fication-task-steps>details notification task steps</a> for this
+    <code><a href=3D#the-details-element>details</a>&l=
t;/code> element, then abort these steps.</p>
+
+    <p class=3Dnote>When the <code title=3Dattr-details-open&gt=
;<a href=3D#attr-details-open>open</a></code> attribute=
 is toggled
+    several times in succession, these steps essentially get coalesced s=
o that only one event is
+    fired.</p>
+
+   </li>
+
+   <li><p><a href=3D#fire-a-simple-event>Fire a simple=
 event</a> named <code title=3Devent-toggle>toggle</code&g=
t; at the
+   <code><a href=3D#the-details-element>details</a>&lt=
;/code> element.</li>
+
+  </ol><p>The <a href=3D#task-source>task source</a=
> for this task must be the <a href=3D#dom-manipulation-task-source=
>DOM manipulation task
+  source</a>.</p>
+
+  <p>The <dfn id=3Ddom-details-open title=3Ddom-details-open&gt=
;<code>open</code></dfn> IDL attribute must
+  <a href=3D#reflect>reflect</a> the <code title=3Dattr-d=
etails-open><a href=3D#attr-details-open>open</a></code=
> content attribute.</p>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>The following example shows the <code><a href=3D#th=
e-details-element>details</a></code> element being used to=
 hide technical
+   details in a progress report.</p>
+
+   <pre><section class=3D"progress window"&gt=
;
+ <h1>Copying "Really Achieving Your Childhood Dreams&=
quot;</h1>
+ <details>
+  <summary>Copying... <progress max=3D"3755053=
92" value=3D"97543282"></progress> 25=
%</summary>
+  <dl>
+   <dt>Transfer rate:</dt> <dd&gt=
;452KB/s</dd>
+   <dt>Local filename:</dt> <dd&g=
t;/home/rpausch/raycd.m4v</dd>
+   <dt>Remote filename:</dt> <dd&=
gt;/var/www/lectures/raycd.m4v</dd>
+   <dt>Duration:</dt> <dd>01:1=
6:27</dd>
+   <dt>Color profile:</dt> <dd&gt=
;SD (6-1-6)</dd>
+   <dt>Dimensions:</dt> <dd>32=
0×240</dd>
+  </dl>
+ </details>
+</section></pre>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>The following shows how a <code><a href=3D#the-deta=
ils-element>details</a></code> element can be used to hide=
 some controls by
+   default:</p>
+
+   <pre><details>
+ <summary><label for=3Dfn>Name & Ext=
ension:</label></summary>
+ <p><input type=3Dtext id=3Dfn name=3Dfn value=3D&q=
uot;Pillar Magazine.pdf">
+ <p><label><input type=3Dcheckbox nam=
e=3Dext checked> Hide extension</label>
+</details></pre>
+
+   <p>One could use this in conjunction with other <code>&lt=
;a href=3D#the-details-element>details</a></code> in a lis=
t to allow the user
+   to collapse a set of fields down to a small set of headings, with the=
 ability to open each
+   one.</p>
+
+   <p class=3Ddetails-example><img src=3Dhttp://images.whatwg.o=
rg/sample-details-1.png width=3D345 alt=3D"" height=3D611>&l=
t;img src=3Dhttp://images.whatwg.org/sample-details-2.png width=3D345 alt=
=3D"" height=3D666></p>
+
+   <p>In these examples, the summary really just summarises what t=
he controls can change, and not
+   the actual values, which is less than ideal.</p>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>Because the <code title=3Dattr-details-open><a href=
=3D#attr-details-open>open</a></code> attribute is added a=
nd removed
+   automatically as the user interacts with the control, it can be used =
in CSS to style the element
+   differently based on its state. Here, a stylesheet is used to animate=
 the color of the summary
+   when the element is opened or closed:</p>
+
+   <pre><style>
+ details > summary { transition: color 1s; color: black; }
+ details[open] > summary { color: red; }
+</style>
+<details>
+ <summary>Automated Status: Operational</summary&am=
p;gt;
+ <p>Velocity: 12m/s</p>
+ <p>Direction: North</p>
+</details></pre>
+
+  </div>
+
+
+  <h4 id=3Dthe-summary-element><span class=3Dsecno>4.11.2 &l=
t;/span>The <dfn><code>summary</code></dfn> el=
ement</h4>
+
+  <dl class=3Delement><dt><a href=3D#element-dfn-categori=
es title=3Delement-dfn-categories>Categories</a>:</dt>
+   <dd>None.</dd>
+   <dt><a href=3D#element-dfn-contexts title=3Delement-dfn-cont=
exts>Contexts in which this element can be used</a>:</dt>
+   <dd>As the first child of a <code><a href=3D#the-detai=
ls-element>details</a></code> element.</dd>
+   <dt><a href=3D#element-dfn-content-model title=3Delement-dfn=
-content-model>Content model</a>:</dt>
+   <dd><a href=3D#phrasing-content>Phrasing content</a&gt=
;.</dd>
+   <dt><a href=3D#element-dfn-tag-omission title=3Delement-dfn-=
tag-omission>Tag omission in text/html</a>:</dt>
+   <dd>Neither tag is omissible.</dd>
+   <dt><a href=3D#element-dfn-attributes title=3Delement-dfn-at=
tributes>Content attributes</a>:</dt>
+   <dd><a href=3D#global-attributes>Global attributes</a&=
gt;</dd>
+   <dt><a href=3D#element-dfn-dom title=3Delement-dfn-dom>DO=
M interface</a>:</dt><!--TOPIC:DOM APIs-->
+   <dd>Uses <code><a href=3D#htmlelement>HTMLElement&l=
t;/a></code>.</dd>
+  </dl><!--TOPIC:HTML--><p>The <code><a href=3D=
#the-summary-element>summary</a></code> element <a href=
=3D#represents>represents</a> a summary, caption, or legend for =
the
+  rest of the contents of the <code><a href=3D#the-summary-elem=
ent>summary</a></code> element's parent <code><a =
href=3D#the-details-element>details</a></code>
+  element<span class=3Dimpl>, if any</span>.</p>
+
+
+
+  <h4 id=3Dthe-menu-element><span class=3Dsecno>4.11.3 </=
span>The <dfn id=3Dmenus><code>menu</code></dfn&g=
t; element</h4>
+
+  <dl class=3Delement><dt><a href=3D#element-dfn-categori=
es title=3Delement-dfn-categories>Categories</a>:</dt>
+   <dd><a href=3D#flow-content>Flow content</a>.</d=
d>
+   <dd>If the element's <code title=3Dattr-menu-type><a h=
ref=3D#attr-menu-type>type</a></code> attribute is in the =
<a href=3D#toolbar-state title=3D"toolbar state">toolbar&=
lt;/a> state: <a href=3D#palpable-content>Palpable content</a=
>.</dd>
+   <dt><a href=3D#element-dfn-contexts title=3Delement-dfn-cont=
exts>Contexts in which this element can be used</a>:</dt>
+   <dd>Where <a href=3D#flow-content>flow content</a> =
is expected.</dd>
+   <dd>If the element's <code title=3Dattr-menu-type><a h=
ref=3D#attr-menu-type>type</a></code> attribute is in the =
<a href=3D#popup-menu-state title=3D"popup menu state">po=
pup menu</a> state: as the child of a <code><a href=3D#the=
-menu-element>menu</a></code> element whose <code title=
=3Dattr-menu-type><a href=3D#attr-menu-type>type</a></c=
ode> attribute is in the <a href=3D#popup-menu-state title=3D"=
popup menu state">popup menu</a> state.</dd>
+   <dt><a href=3D#element-dfn-content-model title=3Delement-dfn=
-content-model>Content model</a>:</dt>
+   <dd>If the element's <code title=3Dattr-menu-type><a h=
ref=3D#attr-menu-type>type</a></code> attribute is in the =
<a href=3D#toolbar-state title=3D"toolbar state">toolbar&=
lt;/a> state: either zero or more <code><a href=3D#the-li-ele=
ment>li</a></code> and <a href=3D#script-supporting-ele=
ments title=3D"script-supporting elements">script-supporting=
</a> elements, or, <a href=3D#flow-content>flow content</a=
>.</dd>
+   <dd>If the element's <code title=3Dattr-menu-type><a h=
ref=3D#attr-menu-type>type</a></code> attribute is in the =
<a href=3D#popup-menu-state title=3D"popup menu state">po=
pup menu</a> state: in any order, zero or more <code><a hr=
ef=3D#the-menuitem-element>menuitem</a></code> elements, z=
ero or more <code><a href=3D#the-hr-element>hr</a></=
code> elements, zero or more <code><a href=3D#the-menu-elemen=
t>menu</a></code> elements whose <code title=3Dattr-men=
u-type><a href=3D#attr-menu-type>type</a></code> att=
ributes are in the <a href=3D#popup-menu-state title=3D"popup men=
u state">popup menu</a> state, and zero or more <a href=3D=
#script-supporting-elements title=3D"script-supporting elements&quot=
;>script-supporting</a> elements.</dd>
+   <dt><a href=3D#element-dfn-tag-omission title=3Delement-dfn-=
tag-omission>Tag omission in text/html</a>:</dt>
+   <dd>Neither tag is omissible.</dd>
+   <dt><a href=3D#element-dfn-attributes title=3Delement-dfn-at=
tributes>Content attributes</a>:</dt>
+   <dd><a href=3D#global-attributes>Global attributes</a&=
gt;</dd>
+   <dd><code title=3Dattr-menu-type><a href=3D#attr-menu-=
type>type</a></code> — Type of menu</dd>
+   <dd><code title=3Dattr-menu-label><a href=3D#attr-menu=
-label>label</a></code> — User-visible label<=
/dd>
+   <dt><a href=3D#element-dfn-dom title=3Delement-dfn-dom>DO=
M interface</a>:</dt><!--TOPIC:DOM APIs-->
+   <dd>
+<pre class=3Didl>interface <dfn id=3Dhtmlmenuelement>HTMLMen=
uElement</dfn> : <a href=3D#htmlelement>HTMLElement</a>=
 {
+           attribute DOMString <a href=3D#dom-menu-type title=3Ddom-m=
enu-type>type</a>;
+           attribute DOMString <a href=3D#dom-menu-label title=3Ddom-=
menu-label>label</a>;
+
+  // <a href=3D"#HTMLMenuElement-partial">also has obsol=
ete members</a>
+};</pre>
+  </dl><!--TOPIC:HTML--><p>The <code><a href=3D=
#the-menu-element>menu</a></code> element represents a lis=
t of commands.</p>
+
+  <!-- v2 idea: <menu> should get an icon, like <command>=
 -->
+
+  <p>The <dfn id=3Dattr-menu-type title=3Dattr-menu-type>&lt=
;code>type</code></dfn> attribute is an <a href=3D#enum=
erated-attribute>enumerated
+  attribute</a> indicating the kind of menu being declared. The at=
tribute has two states. The
+  <code title=3Dattr-menu-type-popup>popup</code> keyword ma=
ps to the <dfn id=3Dpopup-menu-state title=3D"popup menu
+  state">popup menu</dfn> state, in which the element is d=
eclaring a context menu or the menu for a
+  <a href=3D#attr-button-type-menu-state title=3Dattr-button-type-men=
u-state>menu button</a>. The <code title=3Dattr-menu-type-too=
lbar>toolbar</code> keyword maps to the <dfn id=3Dtoolbar-sta=
te title=3D"toolbar
+  state">toolbar</dfn> state, in which the element is decl=
aring a toolbar. The attribute may also be
+  omitted. The <i>missing value default</i> is the <a hre=
f=3D#popup-menu-state title=3D"popup menu state">popup menu&=
lt;/a>
+  state if the parent element is a <code><a href=3D#the-menu-el=
ement>menu</a></code> element whose <code title=3Dattr-=
menu-type><a href=3D#attr-menu-type>type</a></code> =
attribute is in the <a href=3D#popup-menu-state title=3D"popup me=
nu state">popup
+  menu</a> state; otherwise, it is the <a href=3D#toolbar-state=
 title=3D"toolbar state">toolbar</a> state.</p>
+
+  <p>If a <code><a href=3D#the-menu-element>menu</a=
></code> element's <code title=3Dattr-menu-type><a href=
=3D#attr-menu-type>type</a></code> attribute is in the
+  <a href=3D#popup-menu-state title=3D"popup menu state"&gt=
;popup menu</a> state, then the element <a href=3D#represents&gt=
;represents</a>
+  the commands of a popup menu, and the user can only examine and intera=
ct with the commands if that
+  popup menu is activated through some other element, either via the &lt=
;code title=3Dattr-contextmenu><a href=3D#attr-contextmenu>conte=
xtmenu</a></code> attribute or the <code><a href=3D#=
the-button-element>button</a></code> element's <code ti=
tle=3Dattr-button-menu><a href=3D#attr-button-menu>menu</a&gt=
;</code> attribute.</p>
+
+  <p>If a <code><a href=3D#the-menu-element>menu</a=
></code> element's <code title=3Dattr-menu-type><a href=
=3D#attr-menu-type>type</a></code> attribute is in the
+  <a href=3D#toolbar-state title=3D"toolbar state">toolb=
ar</a> state, then the element <a href=3D#represents>represen=
ts</a> a
+  toolbar consisting of its contents, in the form of either an unordered=
 list of items (represented
+  by <code><a href=3D#the-li-element>li</a></code&g=
t; elements), each of which represents a command that the user can perfor=
m or
+  activate, or, if the element has no <code><a href=3D#the-li-e=
lement>li</a></code> element children, <a href=3D#flow-=
content>flow content</a>
+  describing available commands.</p>
+
+  <p>The <dfn id=3Dattr-menu-label title=3Dattr-menu-label>&=
lt;code>label</code></dfn> attribute gives the label of th=
e
+  menu. It is used by user agents to display nested menus in the UI: a c=
ontext menu containing
+  another menu would use the nested menu's <code title=3Dattr-menu-la=
bel><a href=3D#attr-menu-label>label</a></code> attr=
ibute for
+  the submenu's menu label. The <code title=3Dattr-menu-label><=
a href=3D#attr-menu-label>label</a></code> attribute must =
only be
+  specified on <code><a href=3D#the-menu-element>menu</a&=
gt;</code> elements whose parent element is a <code><a hre=
f=3D#the-menu-element>menu</a></code> element whose
+  <code title=3Dattr-menu-type><a href=3D#attr-menu-type>typ=
e</a></code> attribute is in the <a href=3D#popup-menu-sta=
te title=3D"popup menu state">popup
+  menu</a> state.</p>
+
+  <div class=3Dimpl>
+
+  <hr><p>A <code><a href=3D#the-menu-element>men=
u</a></code> is a <dfn id=3Dcurrently-relevant-menu-elemen=
t>currently relevant <code>menu</code> element</dfn>=
 if it is the
+  child of a <a href=3D#currently-relevant-menu-element>currently =
relevant <code>menu</code> element</a>, or if it is the
+  <a href=3D#designated-pop-up-menu>designated pop-up menu</a&g=
t; of a <code><a href=3D#the-button-element>button</a>&=
lt;/code> element that is not
+  <a href=3D#inert>inert</a>, does not have a <code title=
=3Dattr-hidden><a href=3D#the-hidden-attribute>hidden</a>&=
lt;/code> attribute, and is not
+  the descendant of an element with a <code title=3Dattr-hidden>&l=
t;a href=3D#the-hidden-attribute>hidden</a></code> attribu=
te.</p>
+
+  <hr><p>A pop-up menu consists of a list of zero or more me=
nu items, which can be any of:</p>
+
+  <ul class=3Dbrief><li><a href=3D#concept-command title=3D=
concept-command>Commands</a>, which can be marked as default com=
mands (<code><a href=3D#the-menuitem-element>menuitem</a&g=
t;</code>)</li>
+   <li>Separators (<code><a href=3D#the-hr-element>hr&=
lt;/a></code>)</li>
+   <li>Other menus, which allows the list to be nested (<code&g=
t;<a href=3D#the-menu-element>menu</a></code>)</li&g=
t;
+  </ul><p>To <dfn id=3Dconstruct-and-show-a-menu>const=
ruct and show a menu</dfn> for a particular <code><a href=3D=
#the-menu-element>menu</a></code> element and with a
+  particular element as a subject, the user agent must run the following=
 steps:</p>
+
+  <ol><li><p>Let the menu be an empty list of the type=
 described above.</li>
+
+   <li>
+
+    <p>Run the <a href=3D#menu-builder>menu builder</a&gt=
; steps for the <code><a href=3D#the-menu-element>menu</a&=
gt;</code> element using the menu
+    prepared in the previous list as the output.</p>
+
+    <p>The <dfn id=3Dmenu-builder>menu builder</dfn> s=
teps for a <code><a href=3D#the-menu-element>menu</a>&l=
t;/code> element using a specific menu as
+    output are as follows: For each child node of the <code><a =
href=3D#the-menu-element>menu</a></code> in <a href=3D#=
tree-order>tree order</a>,
+    run the appropriate steps from the following list:</p>
+
+    <dl class=3Dswitch><dt>If the child is a <code>&lt=
;a href=3D#the-menuitem-element>menuitem</a></code> elemen=
t that <a href=3D#concept-command title=3Dconcept-command>defines
+     a command</a></dt>
+
+     <dd>Append the command to the menu, respecting its <a href=
=3D#concept-facet title=3Dconcept-facet>facets</a><!-- we mig=
ht need to be explicit about what this means for
+     each facet, if testing shows this isn't well-implemented. e.g.: If =
there's an Icon facet for
+     the command, it should be <span title=3D"fetch">fet=
ched</span><!- -FETCH- -> (this would be
+     http-origin privacy-sensitive), and then that image should be assoc=
iated with the command, such
+     that each command only has its image fetched once, to prevent chang=
es to the base URL from
+     having effects after the image has been fetched once. (no need to r=
esolve the Icon facet, it's
+     an absolute URL) -->. If the <code><a href=3D#the-menui=
tem-element>menuitem</a></code> element has a <code tit=
le=3Dattr-menuitem-default><a href=3D#attr-menuitem-default>defa=
ult</a></code> attribute, mark the command as being a default
+     command.</dd>
+
+
+     <dt>If the child is an <code><a href=3D#the-hr-eleme=
nt>hr</a></code> element</dt>
+
+     <dd>Append a separator to the menu.</dd>
+
+
+     <dt>If the child is a <code><a href=3D#the-menu-elem=
ent>menu</a></code> element with no <code title=3Dattr-=
menu-label><a href=3D#attr-menu-label>label</a></code&g=
t; attribute</dt>
+
+     <dd>Append a separator to the menu, then run the <a href=3D=
#menu-builder>menu builder</a> steps using this
+     child <code><a href=3D#the-menu-element>menu</a>&=
lt;/code> element for the same menu, then append another separator to =
the
+     menu.</dd>
+
+
+     <dt>If the child is a <code><a href=3D#the-menu-elem=
ent>menu</a></code> element with a <code title=3Dattr-m=
enu-label><a href=3D#attr-menu-label>label</a></code&gt=
; attribute</dt>
+
+     <dd>Create a new submenu as an empty list of the type describ=
ed above, and construct it by
+     running the <a href=3D#menu-builder>menu builder</a> st=
eps for the child <code><a href=3D#the-menu-element>menu</=
a></code> element using the
+     new submenu as the output. Then, append the submenu to the menu, us=
ing the value of the child
+     <code><a href=3D#the-menu-element>menu</a></co=
de> element's <code title=3Dattr-menu-label><a href=3D#attr-m=
enu-label>label</a></code> attribute as the label
+     of the submenu.</dd>
+
+
+     <dt>Otherwise</dt>
+
+     <dd><a href=3D#ignore>Ignore</a> the child node.&=
lt;/dd>
+
+    </dl></li>
+
+   <li><p>Remove any submenu with no label, or whose label i=
s the empty string, in the menu or any
+   submenus.</li>
+
+   <li><p>Remove any menu item with no label, or whose label=
 is the empty string, in the menu or any
+   submenus.</li>
+
+   <li><p>Collapse all sequences of two or more adjacent sep=
arators in the menu or any submenus to a
+   single separator.</li>
+
+   <li><p>Remove all separators at the start or end of the m=
enu and any submenus.</li>
+
+   <li>
+
+    <p>Display the menu to the user, and let the algorithm that in=
voked this one continue.</p>
+
+    <p>If the user selects a menu item that corresponds to an elem=
ent that still represents a <a href=3D#concept-command title=3Dconcept=
-command>command</a> when the user selects it, then the UA must =
invoke that
+    command's <a href=3D#command-facet-action title=3Dcommand-facet-A=
ction>Action</a>. If the command's <a href=3D#command-facet-a=
ction title=3Dcommand-facet-Action>Action</a> is defined as <=
a href=3D#fire-a-click-event title=3D"fire a click event">fi=
ring
+    a <code title=3Devent-click>click</code> event</a>=
, either directly or via the <a href=3D#run-synthetic-click-activation=
-steps>run
+    synthetic click activation steps</a> algorithm, then the <c=
ode title=3Ddom-MouseEvent-relatedTarget>relatedTarget</code> at=
tribute of that <code title=3Devent-click><a href=3D#event-click=
>click</a></code> event must be initialized to the subject=
 passed to this
+    <a href=3D#construct-and-show-a-menu>construct and show a menu=
</a> algorithm.</p>
+
+    <p>Pop-up menus must not, while being shown, reflect changes i=
n the DOM. The menu is constructed
+    from the DOM before being shown, and is then immutable.</p>
+
+   </li>
+
+  </ol><hr><p>The <dfn id=3Ddom-menu-type title=3Dd=
om-menu-type><code>type</code></dfn> IDL attribute m=
ust <a href=3D#reflect>reflect</a>
+  the content attribute of the same name, <a href=3D#limited-to-only-=
known-values>limited to only known values</a>.</p>
+
+  <p>The <dfn id=3Ddom-menu-label title=3Ddom-menu-label>&lt=
;code>label</code></dfn> IDL attribute must
+  <a href=3D#reflect>reflect</a> the content attribute of th=
e same name.</p>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>In this example, the <code><a href=3D#the-menu-elem=
ent>menu</a></code> element is used to describe a toolbar =
with three menu
+   buttons on it, each of which has a dropdown menu with a series of opt=
ions:</p>
+
+  <pre><menu> <!-- type=3D"toolbar" imp=
lied -->
+ <li>
+  <button type=3Dmenu value=3D"File" menu=3D"filem=
enu">
+  <menu id=3D"filemenu" type=3D"popup"&gt=
;
+   <menuitem onclick=3D"fnew()" label=3D"New...&qu=
ot;>
+   <menuitem onclick=3D"fopen()" label=3D"Open...&=
quot;>
+   <menuitem onclick=3D"fsave()" label=3D"Save&quo=
t;>
+   <menuitem onclick=3D"fsaveas()" label=3D"Save a=
s...">
+  </menu>
+ </li>
+ <li>
+  <button type=3Dmenu value=3D"Edit" menu=3D"editm=
enu">
+  <menu id=3D"editmenu" type=3D"popup"&gt=
;
+   <menuitem onclick=3D"ecopy()" label=3D"Copy&quo=
t;>
+   <menuitem onclick=3D"ecut()" label=3D"Cut"=
>
+   <menuitem onclick=3D"epaste()" label=3D"Paste&q=
uot;>
+  </menu>
+ </li>
+ <li>
+  <button type=3Dmenu value=3D"Help" menu=3D"helpm=
enu">
+  <menu id=3D"helpmenu" type=3D"popup"&gt=
;
+   <menuitem onclick=3D"location=3D'help.html'" label=3D=
"Help">
+   <menuitem onclick=3D"location=3D'about.html'" label=3D=
"About">
+  </menu>
+ </li>
+</menu></pre>
+
+   <p>In a supporting user agent, this might look like this (assum=
ing the user has just activated the
+   second button):</p>
+
+   <p><img src=3Dhttp://images.whatwg.org/sample-toolbar-1.png =
width=3D303 alt=3D"A toolbar with three buttons, labeled 'File', 'Ed=
it', and 'Help'; where if you select the 'Edit' button you get a drop-dow=
n menu with three more options, 'Copy', 'Cut', and 'Paste'." height=3D=
101></p>
+
+  </div>
+
+
+
+  <h4 id=3Dthe-menuitem-element><span class=3Dsecno>4.11.4 &=
lt;/span>The <dfn><code>menuitem</code></dfn> =
element</h4>
+
+  <dl class=3Delement><dt><a href=3D#element-dfn-categori=
es title=3Delement-dfn-categories>Categories</a>:</dt>
+   <dd>None.</dd>
+   <dt><a href=3D#element-dfn-contexts title=3Delement-dfn-cont=
exts>Contexts in which this element can be used</a>:</dt>
+   <dd>As a child of a <code><a href=3D#the-menu-element&=
gt;menu</a></code> element whose <code title=3Dattr-menu-t=
ype><a href=3D#attr-menu-type>type</a></code> attrib=
ute is in the <a href=3D#popup-menu-state title=3D"popup menu sta=
te">popup menu</a> state.</dd>
+   <dt><a href=3D#element-dfn-content-model title=3Delement-dfn=
-content-model>Content model</a>:</dt>
+   <dd>Empty.</dd>
+   <dt><a href=3D#element-dfn-tag-omission title=3Delement-dfn-=
tag-omission>Tag omission in text/html</a>:</dt>
+   <dd>No <a href=3D#syntax-end-tag title=3Dsyntax-end-tag>e=
nd tag</a>.</dd>
+   <dt><a href=3D#element-dfn-attributes title=3Delement-dfn-at=
tributes>Content attributes</a>:</dt>
+   <dd><a href=3D#global-attributes>Global attributes</a&=
gt;</dd>
+   <dd><code title=3Dattr-menuitem-type><a href=3D#attr-m=
enuitem-type>type</a></code> — Type of command&l=
t;/dd>
+   <dd><code title=3Dattr-menuitem-label><a href=3D#attr-=
menuitem-label>label</a></code> — User-visible l=
abel</dd>
+   <dd><code title=3Dattr-menuitem-icon><a href=3D#attr-m=
enuitem-icon>icon</a></code> — Icon for the comm=
and</dd>
+   <dd><code title=3Dattr-menuitem-disabled><a href=3D#at=
tr-menuitem-disabled>disabled</a></code> — Wheth=
er the form control is disabled</dd>
+   <dd><code title=3Dattr-menuitem-checked><a href=3D#att=
r-menuitem-checked>checked</a></code> — Whether =
the command or control is checked</dd>
+   <dd><code title=3Dattr-menuitem-radiogroup><a href=3D#=
attr-menuitem-radiogroup>radiogroup</a></code> —=
 Name of group of commands to treat as a radio button group</dd>
+   <dd><code title=3Dattr-menuitem-default><a href=3D#att=
r-menuitem-default>default</a></code> — Mark the=
 command as being a default command</dd>
+   <dd><code title=3Dattr-menuitem-command><a href=3D#att=
r-menuitem-command>command</a></code> — Command =
definition</dd>
+   <dd>Also, the <code title=3Dattr-menuitem-title><a hre=
f=3D#attr-menuitem-title>title</a></code> attribute has sp=
ecial semantics on this element. — Hint describing the command&=
lt;/dd>
+   <dt><a href=3D#element-dfn-dom title=3Delement-dfn-dom>DO=
M interface</a>:</dt><!--TOPIC:DOM APIs-->
+   <dd>
+<pre class=3Didl>interface <dfn id=3Dhtmlmenuitemelement>HTM=
LMenuItemElement</dfn> : <a href=3D#htmlelement>HTMLElement&l=
t;/a> {
+           attribute DOMString <a href=3D#dom-menuitem-type title=3Dd=
om-menuitem-type>type</a>;
+           attribute DOMString <a href=3D#dom-menuitem-label title=3D=
dom-menuitem-label>label</a>;
+           attribute DOMString <a href=3D#dom-menuitem-icon title=3Dd=
om-menuitem-icon>icon</a>;
+           attribute boolean <a href=3D#dom-menuitem-disabled title=3D=
dom-menuitem-disabled>disabled</a>;
+           attribute boolean <a href=3D#dom-menuitem-checked title=3D=
dom-menuitem-checked>checked</a>;
+           attribute DOMString <a href=3D#dom-menuitem-radiogroup tit=
le=3Ddom-menuitem-radiogroup>radiogroup</a>;
+           attribute boolean <a href=3D#dom-menuitem-default title=3D=
dom-menuitem-default>default</a>;
+  readonly attribute <a href=3D#htmlelement>HTMLElement</a>?=
 <a href=3D#dom-menuitem-command title=3Ddom-menuitem-command>comma=
nd</a>;
+};</pre>
+   </dd>
+  </dl><!--TOPIC:HTML--><p>The <code><a href=3D=
#the-menuitem-element>menuitem</a></code> element represen=
ts a command that the user can invoke from a popup
+  menu (either a <a href=3D#attr-contextmenu title=3Dattr-contextmenu=
>context menu</a> or the menu of a <a href=3D#attr-button-typ=
e-menu-state title=3Dattr-button-type-menu-state>menu button</a>=
).</p>
+
+  <p>A <code><a href=3D#the-menuitem-element>menuitem&=
lt;/a></code> element that uses one or more of the
+   <code title=3Dattr-menuitem-type><a href=3D#attr-menuitem-ty=
pe>type</a></code>,
+   <code title=3Dattr-menuitem-label><a href=3D#attr-menuitem-l=
abel>label</a></code>,
+   <code title=3Dattr-menuitem-icon><a href=3D#attr-menuitem-ic=
on>icon</a></code>,
+   <code title=3Dattr-menuitem-disabled><a href=3D#attr-menuite=
m-disabled>disabled</a></code>,
+   <code title=3Dattr-menuitem-checked><a href=3D#attr-menuitem=
-checked>checked</a></code>, and
+   <code title=3Dattr-menuitem-radiogroup><a href=3D#attr-menui=
tem-radiogroup>radiogroup</a></code>
+  attributes defines a new command.</p>
+
+  <p>A <code><a href=3D#the-menuitem-element>menuitem&=
lt;/a></code> element that uses the <code title=3Dattr-menuit=
em-command><a href=3D#attr-menuitem-command>command</a>&lt=
;/code> attribute defines a command by reference to another
+  one. This allows authors to define a command once, and set its state (=
e.g. whether it is active or
+  disabled) in one place, and have all references to that command in the=
 user interface change at
+  the same time.</p>
+
+  <p>If the <code title=3Dattr-menuitem-command><a href=3D=
#attr-menuitem-command>command</a></code> attribute is spe=
cified, the element
+  is in the <dfn id=3Dindirect-command>indirect command</dfn&gt=
; mode. If it is not specified, it is in the <dfn id=3Dexplicit-comman=
d>explicit
+  command</dfn> mode. When the element is in the <a href=3D#ind=
irect-command>indirect command</a> mode, the element
+  must not have any of the following attributes specified:
+   <code title=3Dattr-menuitem-type><a href=3D#attr-menuitem-ty=
pe>type</a></code>,
+   <code title=3Dattr-menuitem-label><a href=3D#attr-menuitem-l=
abel>label</a></code>,
+   <code title=3Dattr-menuitem-icon><a href=3D#attr-menuitem-ic=
on>icon</a></code>,
+   <code title=3Dattr-menuitem-disabled><a href=3D#attr-menuite=
m-disabled>disabled</a></code>,
+   <code title=3Dattr-menuitem-checked><a href=3D#attr-menuitem=
-checked>checked</a></code>,
+   <code title=3Dattr-menuitem-radiogroup><a href=3D#attr-menui=
tem-radiogroup>radiogroup</a></code>.
+  </p>
+
+  <hr><p>The <dfn id=3Dattr-menuitem-type title=3Dattr-me=
nuitem-type><code>type</code></dfn> attribute indica=
tes the kind of
+  command: either a normal command with an associated action, or a state=
 or option that can be
+  toggled, or a selection of one item from a list of items.</p>
+
+  <p>The attribute is an <a href=3D#enumerated-attribute>enu=
merated attribute</a> with three keywords and states. The "&lt=
;dfn id=3Dattr-menuitem-type-keyword-command title=3Dattr-menuitem-type-k=
eyword-command><code>command</code></dfn>" keyw=
ord maps to the <a href=3D#attr-menuitem-type-state-command title=3Dat=
tr-menuitem-type-state-command>Command</a> state, the "<=
dfn id=3Dattr-menuitem-type-keyword-checkbox title=3Dattr-menuitem-type-k=
eyword-checkbox><code>checkbox</code></dfn>" ke=
yword maps to the <a href=3D#attr-menuitem-type-state-checkbox title=3D=
attr-menuitem-type-state-checkbox>Checkbox</a> state, and the &q=
uot;<dfn id=3Dattr-menuitem-type-keyword-radio title=3Dattr-menuitem-t=
ype-keyword-radio><code>radio</code></dfn>" key=
word maps to the <a href=3D#attr-menuitem-type-state-radio title=3Datt=
r-menuitem-type-state-radio>Radio</a> state. The <i>missin=
g value default</i> is the
+  <a href=3D#attr-menuitem-type-state-command title=3Dattr-menuitem-t=
ype-state-command>Command</a> state.</p>
+
+  <dl><dt>The <dfn id=3Dattr-menuitem-type-state-command =
title=3Dattr-menuitem-type-state-command>Command</dfn> state<=
/dt>
+
+   <dd><p>The element <a href=3D#represents>represents=
</a> a normal command with an associated action.</dd>
+
+   <dt>The <dfn id=3Dattr-menuitem-type-state-checkbox title=3D=
attr-menuitem-type-state-checkbox>Checkbox</dfn> state</dt&gt=
;
+
+   <dd><p>The element <a href=3D#represents>represents=
</a> a state or option that can be toggled.</dd>
+
+   <dt>The <dfn id=3Dattr-menuitem-type-state-radio title=3Datt=
r-menuitem-type-state-radio>Radio</dfn> state</dt>
+
+   <dd><p>The element <a href=3D#represents>represents=
</a> a selection of one item from a list of items.</dd>
+
+  </dl><p>The <dfn id=3Dattr-menuitem-label title=3Dattr-=
menuitem-label><code>label</code></dfn> attribute gi=
ves the name of the
+  command, as shown to the user. The <code title=3Dattr-menuitem-labe=
l><a href=3D#attr-menuitem-label>label</a></code> at=
tribute must
+  be specified if the element is in the <a href=3D#explicit-command&g=
t;explicit command</a> mode. If the attribute is
+  specified, it must have a value that is not the empty string.</p&gt=
;
+
+  <p>The <dfn id=3Dattr-menuitem-icon title=3Dattr-menuitem-ico=
n><code>icon</code></dfn> attribute gives a picture =
that
+  represents the command. If the attribute is specified, the attribute's=
 value must contain a
+  <a href=3D#valid-non-empty-url-potentially-surrounded-by-spaces>=
valid non-empty URL potentially surrounded by spaces</a>. <span =
class=3Dimpl>To obtain
+  the <a href=3D#absolute-url>absolute URL</a> of the icon w=
hen the attribute's value is not the empty string, the
+  attribute's value must be <a href=3D#resolve-a-url title=3D"re=
solve a url">resolved</a> relative to the element.
+  When the attribute is absent, or its value is the empty string, or &lt=
;a href=3D#resolve-a-url title=3D"resolve a
+  url">resolving</a> its value fails, there is no icon.&lt=
;/span></p> <!-- this is affected by the
+  base URL being changed, so users of this should cache the image once t=
hey've fetched it once, at
+  least until the relative url changes again -->
+
+  <p>The <dfn id=3Dattr-menuitem-disabled title=3Dattr-menuitem=
-disabled><code>disabled</code></dfn> attribute is a
+  <a href=3D#boolean-attribute>boolean attribute</a> that, i=
f present, indicates that the command is not available in
+  the current state.</p>
+
+  <p class=3Dnote>The distinction between <code title=3Dattr-me=
nuitem-disabled><a href=3D#attr-menuitem-disabled>disabled</a=
></code> and
+  <code title=3Dattr-hidden><a href=3D#the-hidden-attribute>=
hidden</a></code> is subtle. A command would be disabled if, =
in the same
+  context, it could be enabled if only certain aspects of the situation =
were changed. A command
+  would be marked as hidden if, in that situation, the command will neve=
r be enabled. For example,
+  in the context menu for a water faucet, the command "open" m=
ight be disabled if the faucet is
+  already open, but the command "eat" would be marked hidden s=
ince the faucet could never be
+  eaten.</p>
+
+  <p>The <dfn id=3Dattr-menuitem-checked title=3Dattr-menuitem-=
checked><code>checked</code></dfn> attribute is a &l=
t;a href=3D#boolean-attribute>boolean
+  attribute</a> that, if present, indicates that the command is se=
lected. The attribute must be
+  omitted unless the <code title=3Dattr-menuitem-type><a href=3D=
#attr-menuitem-type>type</a></code> attribute is in either=
 the <a href=3D#attr-menuitem-type-state-checkbox title=3Dattr-menuite=
m-type-state-checkbox>Checkbox</a> state or the <a href=3D#at=
tr-menuitem-type-state-radio title=3Dattr-menuitem-type-state-radio>Ra=
dio</a> state.</p>
+
+  <p>The <dfn id=3Dattr-menuitem-radiogroup title=3Dattr-menuit=
em-radiogroup><code>radiogroup</code></dfn> attribut=
e gives the
+  name of the group of commands that will be toggled when the command it=
self is toggled, for
+  commands whose <code title=3Dattr-menuitem-type><a href=3D#at=
tr-menuitem-type>type</a></code> attribute has the value &=
quot;<code title=3D"">radio</code>". The scope=
 of the name is the child list of the parent element. The
+  attribute must be omitted unless the <code title=3Dattr-menuitem-ty=
pe><a href=3D#attr-menuitem-type>type</a></code> att=
ribute is in
+  the <a href=3D#attr-menuitem-type-state-radio title=3Dattr-menuitem=
-type-state-radio>Radio</a> state. When specified, the
+  attribute's value must be a non-empty string.</p>
+
+  <hr><p>If a <code><a href=3D#the-menuitem-element=
>menuitem</a></code> element <var title=3D""&=
gt;slave</var> has a <dfn id=3Dattr-menuitem-command title=3Datt=
r-menuitem-command><code>command</code></dfn> attrib=
ute, and there is an element in
+  <var title=3D"">slave</var>'s <a href=3D#home=
-subtree>home subtree</a> whose <a href=3D#concept-id title=3D=
concept-id>ID</a> has
+  a value equal to the value of <var title=3D"">slave&lt=
;/var>'s <code title=3Dattr-menuitem-command><a href=3D#attr-=
menuitem-command>command</a></code> attribute, and the fir=
st such element in <a href=3D#tree-order>tree
+  order</a>, hereafter <var title=3D"">master</=
var>, itself <a href=3D#concept-command title=3Dconcept-command>=
defines a
+  command</a> and either is not a <code><a href=3D#the-me=
nuitem-element>menuitem</a></code> element or does not its=
elf have a <code title=3Dattr-menuitem-command><a href=3D#attr-m=
enuitem-command>command</a></code> attribute, then the &lt=
;dfn id=3Dmaster-command>master command</dfn> of <var title=3D=
"">slave</var> is <var title=3D"">mast=
er</var>.</p>
+
+  <p>A <code><a href=3D#the-menuitem-element>menuitem&=
lt;/a></code> element with a <code title=3Dattr-menuitem-comm=
and><a href=3D#attr-menuitem-command>command</a></code&=
gt;
+  attribute must have a <a href=3D#master-command>master command&l=
t;/a>.</p>
+
+  <p class=3Dnote>This effectively defines the syntax of the attri=
bute's value as being the ID of
+  another element that <a href=3D#concept-command title=3Dconcept-com=
mand>defines a command</a>.</p>
+
+  <hr><p>The <dfn id=3Dattr-menuitem-title title=3Dattr-m=
enuitem-title><code>title</code></dfn> attribute giv=
es a hint describing
+  the command, which might be shown to the user to help him.</p>
+
+  <p>The <dfn id=3Dattr-menuitem-default title=3Dattr-menuitem-=
default><code>default</code></dfn> attribute indicat=
es, if
+  present, that the command is the one that would have been invoked if t=
he user had directly
+  activated the menu's subject instead of using the menu. The <code t=
itle=3Dattr-menuitem-default><a href=3D#attr-menuitem-default>de=
fault</a></code> attribute is a <a href=3D#boolean-attribu=
te>boolean attribute</a>.</p>
+
+  <div class=3Dexample>
+
+   <p>In this trivial example, a submit button is given a context =
menu that has two options, one to
+   reset the form, and one to submit the form. The submit command is mar=
ked as being the default.</p>
+
+   <pre><form action=3D"dosearch.pl">
+ <p><label>Enter search terms: <input=
 type=3D"text" name=3D"terms"></label&a=
mp;gt;</p>
+ <p><input type=3Dsubmit contextmenu=3Dformmenu id=3D=
"submitbutton"></p>
+ <p hidden><input type=3Dreset id=3D"resetbutt=
on"></p>
+ <menu type=3Dpopup id=3Dformmenu>
+  <menuitem command=3D"submitbutton" default>
+  <menuitem command=3D"resetbutton">
+ </menu>
+</form></pre>
+
+  </div>
+
+  <div class=3Dimpl>
+
+  <hr><p>The <dfn id=3Ddom-menuitem-type title=3Ddom-menu=
item-type><code>type</code></dfn> IDL attribute must
+  <a href=3D#reflect>reflect</a> the content attribute of th=
e same name, <a href=3D#limited-to-only-known-values>limited to onl=
y known
+  values</a>.</p>
+
+  <p>The <dfn id=3Ddom-menuitem-label title=3Ddom-menuitem-labe=
l><code>label</code></dfn>, <dfn id=3Ddom-menuite=
m-icon title=3Ddom-menuitem-icon><code>icon</code></dfn=
>, <dfn id=3Ddom-menuitem-disabled title=3Ddom-menuitem-disabled&gt=
;<code>disabled</code></dfn>, <dfn id=3Ddom-menuitem=
-checked title=3Ddom-menuitem-checked><code>checked</code>=
</dfn>, and <dfn id=3Ddom-menuitem-radiogroup title=3Ddom-menuit=
em-radiogroup><code>radiogroup</code></dfn>, and &lt=
;dfn id=3Ddom-menuitem-default title=3Ddom-menuitem-default><code&g=
t;default</code></dfn> IDL attributes must <a href=3D#refl=
ect>reflect</a>
+  the respective content attributes of the same name.</p>
+
+  <p>The <dfn id=3Ddom-menuitem-command title=3Ddom-menuitem-co=
mmand><code>command</code></dfn> IDL attribute must =
return the
+  <a href=3D#master-command>master command</a>, if any, or n=
ull otherwise.</p>
+
+  <hr><p>If the element's <a href=3D#command-facet-disabl=
edstate title=3Dcommand-facet-DisabledState>Disabled State</a> i=
s false
+  (enabled) then the element's <a href=3D#activation-behavior>acti=
vation behavior</a> depends on the element's <code title=3Dattr-=
menuitem-type><a href=3D#attr-menuitem-type>type</a></c=
ode> and <code title=3Dattr-menuitem-command><a href=3D#attr-=
menuitem-command>command</a></code>
+  attributes, as follows:</p>
+
+  <dl class=3Dswitch><dt>If the element has a <a href=3D#=
master-command>master command</a> set by its <code title=3Dat=
tr-menuitem-command><a href=3D#attr-menuitem-command>command<=
/a></code> attribute</dt>
+
+   <dd><p>The user agent must <a href=3D#run-synthetic-cl=
ick-activation-steps>run synthetic click activation steps</a> on=
 the element's
+   <a href=3D#master-command>master command</a>.</dd>
+   <!-- we know it has a defined <span>activation behavior</=
span> if we get here -->
+
+
+   <dt>If the <code title=3Dattr-menuitem-type><a href=3D=
#attr-menuitem-type>type</a></code> attribute is in the &l=
t;a href=3D#attr-menuitem-type-state-checkbox title=3Dattr-menuitem-type-=
state-checkbox>Checkbox</a> state</dt>
+
+   <dd><p>If the element has a <code title=3Dattr-menuite=
m-checked><a href=3D#attr-menuitem-checked>checked</a><=
/code> attribute, the UA
+   must remove that attribute. Otherwise, the UA must add a <code tit=
le=3Dattr-menuitem-checked><a href=3D#attr-menuitem-checked>chec=
ked</a></code> attribute, with the literal value <code tit=
le=3D"">checked</code>.</dd>
+
+
+   <dt>If the <code title=3Dattr-menuitem-type><a href=3D=
#attr-menuitem-type>type</a></code> attribute is in the &l=
t;a href=3D#attr-menuitem-type-state-radio title=3Dattr-menuitem-type-sta=
te-radio>Radio</a> state</dt>
+
+   <dd><p>If the element has a parent, then the UA must walk=
 the list of child nodes of that parent
+   element, and for each node that is a <code><a href=3D#the-me=
nuitem-element>menuitem</a></code> element, if that elemen=
t has a <code title=3Dattr-menuitem-radiogroup><a href=3D#attr-m=
enuitem-radiogroup>radiogroup</a></code> attribute whose v=
alue exactly matches the
+   current element's (treating missing <code title=3Dattr-menuitem-ra=
diogroup><a href=3D#attr-menuitem-radiogroup>radiogroup</a&gt=
;</code>
+   attributes as if they were the empty string), and has a <code titl=
e=3Dattr-menuitem-checked><a href=3D#attr-menuitem-checked>check=
ed</a></code> attribute, must remove that attribute.</p&gt=
;
+
+   <p>Then, the element's <code title=3Dattr-menuitem-checked&g=
t;<a href=3D#attr-menuitem-checked>checked</a></code> a=
ttribute must be set
+   to the literal value <code title=3D"">checked</cod=
e>.</dd>
+
+
+   <dt>Otherwise</dt>
+
+   <dd><p>The element's <a href=3D#activation-behavior&gt=
;activation behavior</a> is to do nothing.</dd>
+
+  </dl><p class=3Dnote>Firing a synthetic <code title=3De=
vent-click><a href=3D#event-click>click</a></code> e=
vent at the element
+  does not cause any of the actions described above to happen.</p>
+
+  <!-- v2COMMAND: Expose the Triggers facet again. -->
+
+  <p>If the element's <a href=3D#command-facet-disabledstate ti=
tle=3Dcommand-facet-DisabledState>Disabled State</a> is true
+  (disabled) then the element has no <a href=3D#activation-behavior&g=
t;activation behavior</a>.</p>
+
+  </div>
+
+  <p class=3Dnote>The <code><a href=3D#the-menuitem-eleme=
nt>menuitem</a></code> element is not rendered except as &=
lt;a href=3D#the-menu-element title=3Dmenu>part of a popup menu</a&=
gt;.</p>
+
+  <div class=3Dexample>
+
+   <p>Here is an example of a pop-up menu button with three option=
s that let the user toggle between
+   left, center, and right alignment. One could imagine such a toolbar a=
s part of a text editor. The
+   menu also has a separator followed by another menu item labeled &quot=
;Publish", though that menu item
+   is disabled.</p>
+
+   <pre><button type=3Dmenu menu=3Deditmenu>Commands=
...</button>
+<menu type=3D"popup" id=3D"editmenu">
+ <menuitem type=3D"radio" radiogroup=3D"alignment&=
quot; checked=3D"checked"
+          label=3D"Left" icon=3D"icons/alL.png" oncl=
ick=3D"setAlign('left')">
+ <menuitem type=3D"radio" radiogroup=3D"alignment&=
quot;
+          label=3D"Center" icon=3D"icons/alC.png" on=
click=3D"setAlign('center')">
+ <menuitem type=3D"radio" radiogroup=3D"alignment&=
quot;
+          label=3D"Right" icon=3D"icons/alR.png" onc=
lick=3D"setAlign('right')">
+ <hr>
+ <menuitem type=3D"command" disabled
+          label=3D"Publish" icon=3D"icons/pub.png" o=
nclick=3D"publish()">
+</menu></pre>
+
+  </div>
+
+
+  <h4 id=3Dcontext-menus><span class=3Dsecno>4.11.5 </spa=
n>Context menus</h4>
+
+  <h5 id=3Ddeclaring-a-context-menu><span class=3Dsecno>4.11=
.5.1 </span>Declaring a context menu</h5>
+
+  <p>The <dfn id=3Dattr-contextmenu title=3Dattr-contextmenu&gt=
;<code>contextmenu</code></dfn> attribute gives the ele=
ment's
+  context menu. The value must be the <a href=3D#concept-id title=3Dc=
oncept-id>ID</a> of a <code><a href=3D#the-menu-element=
>menu</a></code>
+  element in the same <a href=3D#home-subtree>home subtree</a&g=
t; whose <code title=3Dattr-menu-type><a href=3D#attr-menu-type&=
gt;type</a></code>
+  attribute is in the <a href=3D#popup-menu-state title=3D"popup=
 menu state">popup menu</a> state.</p>
+
+  <p class=3Dnote>When a user right-clicks on an element with a &l=
t;code title=3Dattr-contextmenu><a href=3D#attr-contextmenu>cont=
extmenu</a></code> attribute, the user agent will first fire =
a <code title=3Devent-contextmenu>contextmenu</code> event at=
 the element, and then, if that event is not
+  canceled, a <code title=3Devent-show>show</code> event at =
the <code><a href=3D#the-menu-element>menu</a></code=
> element.</p>
+
+  <div class=3Dexample>
+
+   <p>Here is an example of a context menu for an input control:&l=
t;/p>
+
+   <pre><form name=3D"npc">
+ <label>Character name: <input name=3Dchar type=3Dt=
ext contextmenu=3Dnamemenu required></label>
+ <menu type=3Dpopup id=3Dnamemenu>
+  <menuitem label=3D"Pick random name" onclick=3D"=
document.forms.npc.elements.char.value =3D getRandomName()">
+  <menuitem label=3D"Prefill other fields based on name&quot=
; onclick=3D"prefillFields(document.forms.npc.elements.char.value)&q=
uot;>
+ </menu>
+</form></pre>
+
+   <p>This adds two items to the control's context menu, one calle=
d "Pick random name", and one
+   called "Prefill other fields based on name". They invoke sc=
ripts that are not shown in the
+   example above.</p>
+
+  </div>
+
+
+
+  <div class=3Dimpl>
+
+  <h5 id=3Dprocessing-model-2><span class=3Dsecno>4.11.5.2 &=
lt;/span>Processing model</h5>
+
+  <p>Each element has an <dfn id=3Dassigned-context-menu>ass=
igned context menu</dfn>, which can be null. If an element <var =
title=3D"">A</var> has a <code title=3Dattr-context=
menu><a href=3D#attr-contextmenu>contextmenu</a></code&=
gt; attribute, and there is
+  an element with the ID given by <var title=3D"">A</=
var>'s <code title=3Dattr-contextmenu><a href=3D#attr-context=
menu>contextmenu</a></code> attribute's value in <var t=
itle=3D"">A</var>'s
+  <a href=3D#home-subtree>home subtree</a>, and the first su=
ch element in <a href=3D#tree-order>tree order</a> is a
+  <code><a href=3D#the-menu-element>menu</a></code&=
gt; element whose <code title=3Dattr-menu-type><a href=3D#attr-m=
enu-type>type</a></code> attribute is in the <a href=3D=
#popup-menu-state title=3D"popup menu state">popup menu</=
a> state, then <var title=3D"">A</var>'s <a h=
ref=3D#assigned-context-menu>assigned
+  context menu</a> is that element. Otherwise, if <var title=3D=
"">A</var> has a parent element,
+  then <var title=3D"">A</var>'s <a href=3D#ass=
igned-context-menu>assigned context menu</a> is the <a href=3D=
#assigned-context-menu>assigned context
+  menu</a> of its parent element. Otherwise, <var title=3D&quot=
;">A</var>'s <a href=3D#assigned-context-menu>assigne=
d context
+  menu</a> is null.</p>
+
+  <p>When an element's context menu is requested (e.g. by the user=
 right-clicking the element, or
+  pressing a context menu key), the user agent must apply the appropriat=
e rules from the following
+  list:</p>
+
+  <dl class=3Dswitch><dt>If the user requested a context men=
u using a pointing device</dt>
+
+   <dd><p>The user agent must <a href=3D#concept-event-fi=
re title=3Dconcept-event-fire>fire</a> a <a href=3D#concept-e=
vents-trusted title=3Dconcept-events-trusted>trusted</a> event w=
ith the name <code title=3Devent-contextmenu>contextmenu</code&g=
t;, that bubbles and is cancelable, and that uses the
+   <code><a href=3D#mouseevent>MouseEvent</a></code=
> interface, at the element for which the menu was requested. The cont=
ext
+   information of the event must be initialized to the same values as th=
e last
+   <code><a href=3D#mouseevent>MouseEvent</a></code=
> user interaction event that was fired as part of the gesture that wa=
s
+   interpreted as a request for the context menu.</dd>
+
+   <dt>Otherwise</dt>
+
+   <dd><p>The user agent must <a href=3D#fire-a-synthetic=
-mouse-event title=3D"fire a synthetic mouse event">fire a s=
ynthetic mouse
+   event named <code title=3Devent-contextmenu>contextmenu</cod=
e></a> that bubbles and is
+   cancelable at the element for which the menu was requested.</dd&gt=
;
+
+  </dl><p class=3Dnote>Typically, therefore, the firing of t=
he <code title=3Devent-contextmenu>contextmenu</code> event w=
ill be the default action of a <code title=3Dmouseup>mouseup</co=
de> or <code title=3Devent-keyup>keyup</code> event. The e=
xact sequence
+  of events is UA-dependent, as it will vary based on platform conventio=
ns.</p>
+
+  <p>The default action of the <code title=3Devent-contextmenu&=
gt;contextmenu</code> event depends on
+  whether or not the element for which the menu was requested has a non-=
null <a href=3D#assigned-context-menu>assigned context
+  menu</a> when the event dispatch has completed, as follows.</=
p>
+
+  <p>If the <a href=3D#assigned-context-menu>assigned contex=
t menu</a> of the element for which the menu was requested is
+  null, the default action must be for the user agent to show its defaul=
t context menu, if it has
+  one.</p>
+
+  <p>Otherwise, let <var title=3D"">subject</va=
r> be the element for which the menu was requested, and
+  let <var title=3D"">menu</var> be the <a href=
=3D#assigned-context-menu>assigned context menu</a> of <var t=
itle=3D"">target</var> immediately after the <code =
title=3Devent-contextmenu>contextmenu</code>
+  event's dispatch has completed. The user agent must <a href=3D#conc=
ept-event-fire title=3Dconcept-event-fire>fire</a> a
+  <a href=3D#concept-events-trusted title=3Dconcept-events-trusted&gt=
;trusted</a> event with the name <code title=3Devent-show>sho=
w</code> at <var title=3D"">menu</var>, using=
 the <code><a href=3D#relatedevent>RelatedEvent</a><=
/code>
+  interface, with the <code title=3Ddom-RelatedEvent-relatedTarget&gt=
;<a href=3D#dom-relatedevent-relatedtarget>relatedTarget</a>&=
lt;/code> attribute
+  initialized to <var title=3D"">subject</var>. Th=
e event must be cancelable. <!-- v2: include
+  modifier key information --></p>
+
+  <p>If <em>this</em> event (the <code title=3Deven=
t-show>show</code> event) is not canceled, then
+  the user agent must <a href=3D#construct-and-show-a-menu title=3D&q=
uot;construct and show a menu">construct and show</a> the m=
enu for
+  <var title=3D"">menu</var> with <var title=3D=
"">subject</var> as the subject.</p>
+
+  <p>The user agent may also provide access to its default context=
 menu, if any, with the context
+  menu shown. For example, it could merge the menu items from the two me=
nus together, or provide the
+  page's context menu as a submenu of the default menu. In general, user=
 agents are encouraged to
+  de-emphasize their own contextual menu items, so as to give the author=
's context menu the
+  appearance of legitimacy — to allow documents to feel like &=
quot;applications" rather than "mere
+  Web pages".</p>
+
+  <p>User agents may provide means for bypassing the context menu =
processing model, ensuring that
+  the user can always access the UA's default context menus. For example=
, the user agent could
+  handle right-clicks that have the Shift key depressed in such a way th=
at it does not fire the
+  <code title=3Devent-contextmenu>contextmenu</code> event a=
nd instead always shows the default
+  context menu.</p>
+
+  <hr><p>The <dfn id=3Ddom-contextmenu title=3Ddom-contex=
tMenu><code>contextMenu</code></dfn> IDL attribute m=
ust
+  <a href=3D#reflect>reflect</a> the <code title=3Dattr-c=
ontextmenu><a href=3D#attr-contextmenu>contextmenu</a><=
/code> content attribute.</p>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>In this example, an image of cats is given a context menu wi=
th four possible commands:</p>
+
+   <pre><img src=3D"cats.jpeg" alt=3D"Cats&q=
uot; contextmenu=3Dcatsmenu>
+<menu type=3D"popup" id=3D"catsmenu">
+ <menuitem label=3D"Pet the kittens" onclick=3D"ki=
ttens.pet()">
+ <menuitem label=3D"Cuddle with the kittens" onclick=3D=
"kittens.cuddle()">
+ <menu label=3D"Feed the kittens"><!-- note: =
contents of this submenu aren't visible in the pictures below -->
+  <menuitem label=3D"Fish" onclick=3D"kittens.feed=
(fish)">
+  <menuitem label=3D"Chicken" onclick=3D"kittens.f=
eed(chicken)">
+ </menu>
+</menu></pre>
+
+   <p>When a user of a mouse-operated visual Web browser right-cli=
cks on the image, the browser
+   might pop up a context menu like this:</p>
+
+   <p><img src=3Dhttp://images.whatwg.org/contextmenu-collapsed=
.png alt=3D"A context menu, shown over a picture of cats, with four =
lines: the first two offering the menu items described in the markup abov=
e ('Pet the kittens' and 'Cuddle with the kittens'), the third giving a s=
ubmenu labeled 'Feed the kittens', and the fourth, after a horizontal spl=
itter, consisting of only a downwards-pointing disclosure triangle."=
><p>When the user clicks the disclosure triangle, such a user ag=
ent would expand the context menu
+   in place, to show the browser's own commands:</p>
+
+   <p><img src=3Dhttp://images.whatwg.org/contextmenu-expanded.=
png alt=3D"This would result in the same basic interface, but with a=
 longer menu; the disclosure triangle having been replaced by items such =
as 'View Image', 'Copy Image', 'Copy Image Location', and so forth."=
></div>
+
+
+  <h5 id=3Devent-definitions-0><span class=3Dsecno>4.11.5.3 =
</span>Event definitions</h5>
+
+  <pre class=3Didl>[Constructor(DOMString type, optional <a hre=
f=3D#relatedeventinit>RelatedEventInit</a> eventInitDict)]
+interface <dfn id=3Drelatedevent>RelatedEvent</dfn> : <a =
href=3D#event>Event</a> {
+  readonly attribute <a href=3D#eventtarget>EventTarget</a>?=
 <a href=3D#dom-relatedevent-relatedtarget title=3Ddom-RelatedEvent-re=
latedTarget>relatedTarget</a>;
+};
+
+dictionary <dfn id=3Drelatedeventinit>RelatedEventInit</dfn>=
 : <a href=3D#eventinit>EventInit</a> {
+  <a href=3D#eventtarget>EventTarget</a>? relatedTarget;
+};</pre>
+
+  <dl class=3Ddomintro><dt><var title=3D"">e=
vent</var> . <code title=3Ddom-RelatedEvent-relatedTarget>&lt=
;a href=3D#dom-relatedevent-relatedtarget>relatedTarget</a></=
code></dt>
+
+   <dd>
+
+    <p>Returns the other event target involved in this event. For =
example, when a <code title=3Devent-show>show</code> event fi=
res on a <code><a href=3D#the-menu-element>menu</a><=
/code> element, the other event
+    target involved in the event would be the element for which the menu=
 is being shown.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-relatedevent-relatedtarget title=3Ddom-R=
elatedEvent-relatedTarget><code>relatedTarget</code></d=
fn> attribute must
+  return the value it was initialized to. When the object is created, th=
is attribute must be
+  initialized to null. It represents the other event target that is rela=
ted to the event.</p>
+
+  </div>
+
+
+
+
+  <h4 id=3Dcommands><span class=3Dsecno>4.11.6 </span>=
Commands</h4>
+
+  <h5 id=3Dfacets-0><span class=3Dsecno>4.11.6.1 </span&g=
t;Facets</h5>
+
+  <p>A <dfn id=3Dconcept-command title=3Dconcept-command>com=
mand</dfn> is the abstraction behind menu items, buttons, and
+  links. Once a command is defined, other parts of the interface can ref=
er to the same command,
+  allowing many access points to a single feature to share facets such a=
s the <a href=3D#command-facet-disabledstate title=3Dcommand-facet-Dis=
abledState>Disabled State</a>.</p>
+
+  <p id=3Dfacets>Commands are defined to have the following <df=
n id=3Dconcept-facet title=3Dconcept-facet>facets</dfn>:</p&g=
t;
+
+  <dl><dt><dfn id=3Dcommand-facet-type title=3Dcommand-fa=
cet-Type>Type</dfn></dt>
+
+   <dd>The kind of command: "command", meaning it is a n=
ormal command; "radio", meaning that
+   triggering the command will, amongst other things, set the <a href=
=3D#command-facet-checkedstate title=3Dcommand-facet-CheckedState>Chec=
ked State</a> to true (and probably uncheck some other
+   commands); or "checkbox", meaning that triggering the comma=
nd will, amongst other things, toggle
+   the value of the <a href=3D#command-facet-checkedstate title=3Dcom=
mand-facet-CheckedState>Checked State</a>.</dd>
+
+   <dt><dfn id=3Dcommand-facet-id title=3Dcommand-facet-ID>I=
D</dfn></dt>
+
+   <dd>The name of the command, for referring to the command from =
the markup or from script. If a
+   command has no ID, it is an <dfn id=3Danonymous-command>anonymo=
us command</dfn>.</dd>
+
+   <dt><dfn id=3Dcommand-facet-label title=3Dcommand-facet-Labe=
l>Label</dfn></dt>
+
+   <dd>The name of the command as seen by the user.</dd>
+
+   <dt><dfn id=3Dcommand-facet-hint title=3Dcommand-facet-Hint&=
gt;Hint</dfn></dt>
+
+   <dd>A helpful or descriptive string that can be shown to the us=
er.</dd>
+
+   <dt><dfn id=3Dcommand-facet-icon title=3Dcommand-facet-Icon&=
gt;Icon</dfn></dt>
+
+   <dd>An <a href=3D#absolute-url>absolute URL</a> ide=
ntifying a graphical image that represents the action. A
+   command might not have an Icon.</dd> <!-- changing base URLs=
 might change the icon -->
+
+   <dt><dfn id=3Dcommand-facet-accesskey title=3Dcommand-facet-=
AccessKey>Access Key</dfn></dt>
+
+   <dd>A key combination selected by the user agent that triggers =
the command. A command might not
+   have an Access Key.</dd>
+
+   <dt><dfn id=3Dcommand-facet-hiddenstate title=3Dcommand-face=
t-HiddenState>Hidden State</dfn></dt>
+
+   <dd>Whether the command is hidden or not (basically, whether it=
 should be shown in menus).</dd>
+
+   <dt><dfn id=3Dcommand-facet-disabledstate title=3Dcommand-fa=
cet-DisabledState>Disabled State</dfn></dt>
+
+   <dd>Whether the command is relevant and can be triggered or not=
.</dd>
+
+   <dt><dfn id=3Dcommand-facet-checkedstate title=3Dcommand-fac=
et-CheckedState>Checked State</dfn></dt>
+
+   <dd>Whether the command is checked or not.</dd>
+
+   <dt><dfn id=3Dcommand-facet-action title=3Dcommand-facet-Act=
ion>Action</dfn></dt>
+
+   <dd>The actual effect that triggering the command will have. Th=
is could be a scripted event
+   handler, a <a href=3D#url>URL</a> to which to <a href=3D=
#navigate>navigate</a>, or a form submission.</dd>
+
+<!-- v2COMMAND
+   <dt><dfn title=3D"command-facet-Triggers">Trigg=
ers</dfn></dt>
+
+   <dd>The list of elements that can trigger the command. The elem=
ent defining a command is always
+   in the list of elements that can trigger the command. For anonymous c=
ommands, only the element
+   defining the command is on the list, since other elements have no way=
 to refer to it.</dd>
+-->
+
+  </dl><!--TOPIC:DOM APIs--><p>These facets are expose=
d on elements using the <dfn id=3Dcommand-api>command API</dfn&g=
t;:</p>
+
+  <dl class=3Ddomintro><dt><var title=3D"">e=
lement</var> . <code title=3Ddom-command-ro-commandType><a=
 href=3D#dom-command-ro-commandtype>commandType</a></code>=
</dt>
+
+   <dd>
+
+    <p>Exposes the <a href=3D#command-facet-type title=3Dcomman=
d-facet-Type>Type</a> facet of the command.</p>
+
+   </dd>
+
+   <dt><var title=3D"">element</var> . <c=
ode title=3Ddom-Element-id><a href=3D#dom-element-id>id</a&gt=
;</code></dt>
+
+   <dd>
+
+    <p>Exposes the <a href=3D#command-facet-id title=3Dcommand-=
facet-ID>ID</a> facet of the command.</p>
+
+   </dd>
+
+   <dt><var title=3D"">element</var> . <c=
ode title=3Ddom-command-ro-commandLabel><a href=3D#dom-command-ro-c=
ommandlabel>commandLabel</a></code></dt>
+
+   <dd>
+
+    <p>Exposes the <a href=3D#command-facet-label title=3Dcomma=
nd-facet-Label>Label</a> facet of the command.</p>
+
+   </dd>
+
+   <dt><var title=3D"">element</var> . <c=
ode title=3Ddom-title><a href=3D#dom-title>title</a></c=
ode></dt>
+
+   <dd>
+
+    <p>Exposes the <a href=3D#command-facet-hint title=3Dcomman=
d-facet-Hint>Hint</a> facet of the command.</p>
+
+   </dd>
+
+   <dt><var title=3D"">element</var> . <c=
ode title=3Ddom-command-ro-commandIcon><a href=3D#dom-command-ro-co=
mmandicon>commandIcon</a></code></dt>
+
+   <dd>
+
+    <p>Exposes the <a href=3D#command-facet-icon title=3Dcomman=
d-facet-Icon>Icon</a> facet of the command.</p>
+
+   </dd>
+
+   <dt><var title=3D"">element</var> . <c=
ode title=3Ddom-accessKeyLabel><a href=3D#dom-accesskeylabel>acc=
essKeyLabel</a></code></dt>
+
+   <dd>
+
+    <p>Exposes the <a href=3D#command-facet-accesskey title=3Dc=
ommand-facet-AccessKey>Access Key</a> facet of the command.</=
p>
+
+   </dd>
+
+   <dt><var title=3D"">element</var> . <c=
ode title=3Ddom-command-ro-commandHidden><a href=3D#dom-command-ro-=
commandhidden>commandHidden</a></code></dt>
+
+   <dd>
+
+    <p>Exposes the <a href=3D#command-facet-hiddenstate title=3D=
command-facet-HiddenState>Hidden State</a> facet of the command.=
</p>
+
+   </dd>
+
+   <dt><var title=3D"">element</var> . <c=
ode title=3Ddom-command-ro-commandDisabled><a href=3D#dom-command-r=
o-commanddisabled>commandDisabled</a></code></dt>
+
+   <dd>
+
+    <p>Exposes the <a href=3D#command-facet-disabledstate title=
=3Dcommand-facet-DisabledState>Disabled State</a> facet of the c=
ommand.</p>
+
+   </dd>
+
+   <dt><var title=3D"">element</var> . <c=
ode title=3Ddom-command-ro-commandChecked><a href=3D#dom-command-ro=
-commandchecked>commandChecked</a></code></dt>
+
+   <dd>
+
+    <p>Exposes the <a href=3D#command-facet-checkedstate title=3D=
command-facet-CheckedState>Checked State</a> facet of the comman=
d.</p>
+
+   </dd>
+
+   <dt><var title=3D"">element</var> . <c=
ode title=3Ddom-click><a href=3D#dom-click>click</a></c=
ode>()</dt>
+
+   <dd>
+
+    <p>Triggers the <a href=3D#command-facet-action title=3Dcom=
mand-facet-Action>Action</a> of the command.</p>
+
+   </dd>
+
+<!--v2COMMAND
+   <dt><var title=3D"">element</var> . <c=
ode title=3D"dom-command-ro-commandTriggers">commandTriggers=
</code></dt>
+
+   <dd>
+
+    <p>Exposes the <span title=3D"command-facet-Triggers&q=
uot;>Triggers</span> facet of the command.</p>
+
+   </dd>
+-->
+
+  </dl><div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-command-ro-commandtype title=3Ddom-comma=
nd-ro-commandType><code>commandType</code></dfn> att=
ribute must
+  return a string whose value is either "<code title=3D"&qu=
ot;>command</code>", "<code title=3D""&gt=
;radio</code>", or "<code title=3D"">chec=
kbox</code>", depending on whether the <a href=3D#command-f=
acet-type title=3Dcommand-facet-Type>Type</a> of the command def=
ined by the element is "command",
+  "radio", or "checkbox" respectively. If the elemen=
t does not define a command, it must return
+  null.</p>
+
+  <p>The <dfn id=3Ddom-command-ro-commandlabel title=3Ddom-comm=
and-ro-commandLabel><code>commandLabel</code></dfn> =
attribute must
+  return the command's <a href=3D#command-facet-label title=3Dcommand=
-facet-Label>Label</a>, or null if the element does
+  not define a command or does not specify a <a href=3D#command-facet=
-label title=3Dcommand-facet-Label>Label</a>.</p>
+
+  <p>The <dfn id=3Ddom-command-ro-commandicon title=3Ddom-comma=
nd-ro-commandIcon><code>commandIcon</code></dfn> att=
ribute must
+  return the <a href=3D#absolute-url>absolute URL</a> of the=
 command's <a href=3D#command-facet-icon title=3Dcommand-facet-Icon&gt=
;Icon</a>. If the element does not specify an icon, or if the eleme=
nt
+  does not define a command, then the attribute must return null.</p&=
gt;
+
+  <p>The <dfn id=3Ddom-command-ro-commandhidden title=3Ddom-com=
mand-ro-commandHidden><code>commandHidden</code></dfn&g=
t; attribute must
+  return true if the command's <a href=3D#command-facet-hiddenstate t=
itle=3Dcommand-facet-HiddenState>Hidden State</a> is that
+  the command is hidden, and false if the command is not hidden. If the =
element does not define a
+  command, the attribute must return null.</p>
+
+  <p>The <dfn id=3Ddom-command-ro-commanddisabled title=3Ddom-c=
ommand-ro-commandDisabled><code>commandDisabled</code><=
/dfn> attribute
+  must return true if the command's <a href=3D#command-facet-disabled=
state title=3Dcommand-facet-DisabledState>Disabled State</a>
+  is that the command is disabled, and false if the command is not disab=
led. This attribute is not
+  affected by the command's <a href=3D#command-facet-hiddenstate titl=
e=3Dcommand-facet-HiddenState>Hidden State</a>. If the
+  element does not define a command, the attribute must return null.<=
/p>
+
+  <p>The <dfn id=3Ddom-command-ro-commandchecked title=3Ddom-co=
mmand-ro-commandChecked><code>commandChecked</code></df=
n> attribute must
+  return true if the command's <a href=3D#command-facet-checkedstate =
title=3Dcommand-facet-CheckedState>Checked State</a> is that
+  the command is checked, and false if it is that the command is not che=
cked. If the element does
+  not define a command, the attribute must return null.</p>
+
+<!--v2COMMAND
+  <p>The <dfn title=3D"dom-command-ro-commandTriggers&quot=
;><code>commandTriggers</code></dfn> attribute
+  must return a list containing the elements that can trigger the comman=
d (the command's <span
+  title=3D"command-facet-Triggers">Triggers</span>). =
The list must be <span>live</span>. The same
+  object must be returned each time. While the element does not define a=
 command, the list must be
+  empty.</p>
+-->
+
+  <p class=3Dnote>The <a href=3D#command-facet-id title=3Dcomma=
nd-facet-ID>ID</a> facet is exposed by the <code title=3Ddom-=
Element-id><a href=3D#dom-element-id>id</a></code> I=
DL attribute, the <a href=3D#command-facet-hint title=3Dcommand-facet-=
Hint>Hint</a>
+  facet is exposed by the <code title=3Ddom-title><a href=3D#do=
m-title>title</a></code> IDL attribute, and the <a href=
=3D#command-facet-accesskey title=3Dcommand-facet-AccessKey>AccessKey&=
lt;/a> facet is exposed by the <code title=3Ddom-accessKeyLabel>=
<a href=3D#dom-accesskeylabel>accessKeyLabel</a></code>=
 IDL attribute.</p>
+
+  </div>
+
+  <hr><dl class=3Ddomintro><dt><var title=3D"&=
quot;>document</var> . <code title=3Ddom-document-commands&gt=
;<a href=3D#dom-document-commands>commands</a></code>&l=
t;/dt>
+   <dd>
+    <p>Returns an <code><a href=3D#htmlcollection>HTML=
Collection</a></code> of the elements in the <code><=
a href=3D#document>Document</a></code> that
+    define commands and have IDs.</p>
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-document-commands title=3Ddom-document-c=
ommands><code>commands</code></dfn> attribute of the=
 document's
+  <code><a href=3D#document>Document</a></code> =
interface must return an <code><a href=3D#htmlcollection>HTML=
Collection</a></code> rooted at the
+  <code><a href=3D#document>Document</a></code> =
node, whose filter matches only elements that <a href=3D#concept-comma=
nd title=3Dconcept-command>define commands</a> and have <a hr=
ef=3D#command-facet-id title=3Dcommand-facet-ID>IDs</a>.</p&g=
t;
+
+  </div>
+<!--TOPIC:HTML-->
+
+  <hr><p id=3Dexpose-commands-in-ui>User agents may expose t=
he <a href=3D#concept-command title=3Dconcept-command>commands</=
a> that match the following criteria:</p>
+
+  <ul class=3Dbrief><li>The <a href=3D#command-facet-hidd=
enstate title=3Dcommand-facet-HiddenState>Hidden State</a> facet=
 is false (visible)</li>
+
+   <li>The element is <a href=3D#in-a-document>in a <code=
>Document</code></a> that has an associated <a href=3D#=
browsing-context>browsing
+   context</a>.</li>
+
+   <li>Neither the element nor any of its ancestors has a <code=
 title=3Dattr-hidden><a href=3D#the-hidden-attribute>hidden</=
a></code>
+   attribute specified.</li>
+
+   <li>The element is not a <code><a href=3D#the-menuitem=
-element>menuitem</a></code> element, or it is a child of =
a <a href=3D#currently-relevant-menu-element>currently
+   relevant <code>menu</code> element</a>, or it has a=
n <a href=3D#command-facet-accesskey title=3Dcommand-facet-accesskey&g=
t;Access Key</a>.</li>
+
+  </ul><p>User agents are encouraged to do this especially f=
or commands that have <a href=3D#command-facet-accesskey title=3Dcomma=
nd-facet-AccessKey>Access Keys</a>, as a way to advertise those =
keys to the
+  user.</p>
+
+  <p class=3Dexample>For example, such commands could be listed in=
 the user agent's menu bar.</p>
+
+
+  <div class=3Dimpl>
+
+  <h5 id=3Dusing-the-a-element-to-define-a-command><span class=3D=
secno>4.11.6.2 </span><dfn title=3Da-command>Using the &lt=
;code>a</code> element to define a command</dfn></h5&gt=
;
+
+  <p>An <code><a href=3D#the-a-element>a</a><=
/code> element with an <code title=3Dattr-hyperlink-href><a h=
ref=3D#attr-hyperlink-href>href</a></code> attribute <a=
 href=3D#concept-command title=3Dconcept-command>defines a command<=
/a>.</p>
+
+  <p>The <a href=3D#command-facet-type title=3Dcommand-facet-Ty=
pe>Type</a> of the command is "command".</p>
+
+  <p>The <a href=3D#command-facet-id title=3Dcommand-facet-ID&g=
t;ID</a> of the command is the value of the <code title=3Dattr-i=
d><a href=3D#the-id-attribute>id</a></code> attribut=
e of the element, if the attribute is present and not empty.
+  Otherwise the command is an <a href=3D#anonymous-command>anonymo=
us command</a>.</p>
+
+  <p>The <a href=3D#command-facet-label title=3Dcommand-facet-L=
abel>Label</a> of the command is the string given by the
+  element's <code><a href=3D#textcontent>textContent</a&g=
t;</code> IDL attribute.</p>
+
+  <p>The <a href=3D#command-facet-hint title=3Dcommand-facet-Hi=
nt>Hint</a> of the command is the value of the <code title=3D=
attr-title><a href=3D#attr-title>title</a></code> at=
tribute of the element. If the attribute is not present, the
+  <a href=3D#command-facet-hint title=3Dcommand-facet-Hint>Hint&lt=
;/a> is the empty string.</p>
+
+  <p>The <a href=3D#command-facet-icon title=3Dcommand-facet-Ic=
on>Icon</a> of the command is the <a href=3D#absolute-url>=
absolute
+  URL</a> obtained from <a href=3D#resolve-a-url title=3D"=
resolve a url">resolving</a> the value of the <code titl=
e=3Dattr-img-src><a href=3D#attr-img-src>src</a></code&=
gt; attribute of the first <code><a href=3D#the-img-element>i=
mg</a></code> element descendant of the
+  element in <a href=3D#tree-order>tree order</a>, relative =
to that element, if there is such an element and
+  resolving its attribute is successful. Otherwise, there is no <a hr=
ef=3D#command-facet-icon title=3Dcommand-facet-Icon>Icon</a> for=
 the command.</p>
+
+  <p>The <a href=3D#command-facet-accesskey title=3Dcommand-fac=
et-AccessKey>AccessKey</a> of the command is the element's
+  <a href=3D#assigned-access-key>assigned access key</a>, if=
 any.</p>
+
+  <p>The <a href=3D#command-facet-hiddenstate title=3Dcommand-f=
acet-HiddenState>Hidden State</a> of the command is true (hidden=
)
+  if the element has a <code title=3Dattr-hidden><a href=3D#the=
-hidden-attribute>hidden</a></code> attribute, and false o=
therwise.</p>
+
+  <p>The <a href=3D#command-facet-disabledstate title=3Dcommand=
-facet-DisabledState>Disabled State</a> facet of the command is
+  true if the element or one of its ancestors is <a href=3D#inert>=
inert</a>, and false otherwise.</p>
+
+  <p>The <a href=3D#command-facet-checkedstate title=3Dcommand-=
facet-CheckedState>Checked State</a> of the command is always
+  false. (The command is never checked.)</p>
+
+  <p>The <a href=3D#command-facet-action title=3Dcommand-facet-=
Action>Action</a> of the command, if the element has a
+  defined <a href=3D#activation-behavior>activation behavior</a=
>, is to <a href=3D#run-synthetic-click-activation-steps>run syn=
thetic click activation steps</a>
+  on the element. Otherwise, it is just to <a href=3D#fire-a-click-ev=
ent>fire a <code title=3Devent-click>click</code>
+  event</a> at the element.</p>
+
+
+  <h5 id=3Dusing-the-button-element-to-define-a-command><span c=
lass=3Dsecno>4.11.6.3 </span><dfn title=3Dbutton-command>U=
sing the <code>button</code> element to define a command</=
dfn></h5>
+
+  <p>A <code><a href=3D#the-button-element>button</=
a></code> element always <a href=3D#concept-command title=3Dc=
oncept-command>defines a
+  command</a>.</p>
+
+  <p>The <a href=3D#command-facet-type title=3Dcommand-facet-Ty=
pe>Type</a>, <a href=3D#command-facet-id title=3Dcommand-face=
t-ID>ID</a>,
+  <a href=3D#command-facet-label title=3Dcommand-facet-Label>Label=
</a>, <a href=3D#command-facet-hint title=3Dcommand-facet-Hint&g=
t;Hint</a>,
+  <a href=3D#command-facet-icon title=3Dcommand-facet-Icon>Icon&lt=
;/a>, <a href=3D#command-facet-accesskey title=3Dcommand-facet-Acce=
ssKey>Access
+  Key</a>, <a href=3D#command-facet-hiddenstate title=3Dcommand=
-facet-HiddenState>Hidden State</a>, <a href=3D#command-facet=
-checkedstate title=3Dcommand-facet-CheckedState>Checked State</a&g=
t;, and <a href=3D#command-facet-action title=3Dcommand-facet-Action&g=
t;Action</a> facets of the command are determined <a href=3D#usi=
ng-the-a-element-to-define-a-command title=3Da-command>as for <code=
>a</code> elements</a> (see the previous section).</p&g=
t;
+
+  <p>The <a href=3D#command-facet-disabledstate title=3Dcommand=
-facet-DisabledState>Disabled State</a> of the command is true i=
f
+  the element or one of its ancestors is <a href=3D#inert>inert&lt=
;/a>, or if the element's <a href=3D#concept-fe-disabled title=3Dco=
ncept-fe-disabled>disabled</a> state is set, and false otherwise=
.</p>
+
+
+  <h5 id=3Dusing-the-input-element-to-define-a-command><span cl=
ass=3Dsecno>4.11.6.4 </span><dfn title=3Dinput-command>Usi=
ng the <code>input</code> element to define a command</dfn=
></h5>
+
+  <p>An <code><a href=3D#the-input-element>input</a=
></code> element whose <code title=3Dattr-input-type><a=
 href=3D#attr-input-type>type</a></code> attribute is in
+  one of the <a href=3D"#submit-button-state-(type=3Dsubmit)&quo=
t; title=3Dattr-input-type-submit>Submit Button</a>, <a href=3D=
"#reset-button-state-(type=3Dreset)" title=3Dattr-input-type-re=
set>Reset Button</a>, <a href=3D"#image-button-state-(ty=
pe=3Dimage)" title=3Dattr-input-type-image>Image
+  Button</a>, <a href=3D"#button-state-(type=3Dbutton)&quo=
t; title=3Dattr-input-type-button>Button</a>, <a href=3D&quot=
;#radio-button-state-(type=3Dradio)" title=3Dattr-input-type-radio&g=
t;Radio Button</a>, or <a href=3D"#checkbox-state-(type=3Dc=
heckbox)" title=3Dattr-input-type-checkbox>Checkbox</a> sta=
tes <a href=3D#concept-command title=3Dconcept-command>defines a
+  command</a>.</p>
+
+  <p>The <a href=3D#command-facet-type title=3Dcommand-facet-Ty=
pe>Type</a> of the command is "radio" if the <code =
title=3Dattr-input-type><a href=3D#attr-input-type>type</a&gt=
;</code> attribute is in the <a href=3D"#radio-button-state=
-(type=3Dradio)" title=3Dattr-input-type-radio>Radio
+  Button</a> state, "checkbox" if the <code title=3Da=
ttr-input-type><a href=3D#attr-input-type>type</a></cod=
e> attribute is in
+  the <a href=3D"#checkbox-state-(type=3Dcheckbox)" title=3D=
attr-input-type-checkbox>Checkbox</a> state, and "command&q=
uot; otherwise.</p>
+
+  <p>The <a href=3D#command-facet-id title=3Dcommand-facet-ID&g=
t;ID</a> of the command is the value of the <code title=3Dattr-i=
d><a href=3D#the-id-attribute>id</a></code> attribut=
e of the element, if the attribute is present and not empty.
+  Otherwise the command is an <a href=3D#anonymous-command>anonymo=
us command</a>.</p>
+
+  <p>The <a href=3D#command-facet-label title=3Dcommand-facet-L=
abel>Label</a> of the command depends on the Type of the
+  command:</p>
+
+  <p>If the <a href=3D#command-facet-type title=3Dcommand-facet=
-Type>Type</a> is "command", then it is the string giv=
en
+  by the <code title=3Dattr-input-value><a href=3D#attr-input-v=
alue>value</a></code> attribute, if any, and a UA-dependen=
t,
+  locale-dependent value that the UA uses to label the button itself if =
the attribute is absent.</p>
+
+  <p>Otherwise, the <a href=3D#command-facet-type title=3Dcomma=
nd-facet-Type>Type</a> is "radio" or "checkbox&qu=
ot;. If the
+  element is a <a href=3D#labeled-control>labeled control</a&gt=
;, the <code><a href=3D#textcontent>textContent</a><=
/code> of the first
+  <code><a href=3D#the-label-element>label</a></cod=
e> element in <a href=3D#tree-order>tree order</a> whose &=
lt;a href=3D#labeled-control>labeled control</a> is the
+  element in question is the <a href=3D#command-facet-label title=3Dc=
ommand-facet-Label>Label</a> (in DOM terms, this is
+  the string given by <code><var title=3D"">elemen=
t</var>.labels[0].textContent</code>). Otherwise,
+  the value of the <code title=3Dattr-input-value><a href=3D#at=
tr-input-value>value</a></code> attribute, if present, is =
the <a href=3D#command-facet-label title=3Dcommand-facet-Label>Labe=
l</a>. Otherwise, the <a href=3D#command-facet-label title=3Dcom=
mand-facet-Label>Label</a> is the empty string.</p>
+
+  <p>The <a href=3D#command-facet-hint title=3Dcommand-facet-Hi=
nt>Hint</a> of the command is the value of the <code title=3D=
attr-title><a href=3D#attr-title>title</a></code> at=
tribute of the <code><a href=3D#the-input-element>input</a=
></code> element. If the attribute is
+  not present, the <a href=3D#command-facet-hint title=3Dcommand-face=
t-Hint>Hint</a> is the empty string.</p>
+
+  <p>If the element's <code title=3Dattr-input-type><a hr=
ef=3D#attr-input-type>type</a></code> attribute is in the =
<a href=3D"#image-button-state-(type=3Dimage)" title=3Dattr-=
input-type-image>Image Button</a> state, and the element has a &=
lt;code title=3Dattr-img-src><a href=3D#attr-img-src>src</a&g=
t;</code> attribute, and that attribute's value can be successfully=
 <a href=3D#resolve-a-url title=3D"resolve a url">resolve=
d</a> relative to the element, then the <a href=3D#command-facet=
-icon title=3Dcommand-facet-Icon>Icon</a> of the command is the =
<a href=3D#absolute-url>absolute URL</a> obtained
+  from resolving that attribute that way. Otherwise, there is no <a h=
ref=3D#command-facet-icon title=3Dcommand-facet-Icon>Icon</a> fo=
r the command.</p>
+
+  <p>The <a href=3D#command-facet-accesskey title=3Dcommand-fac=
et-AccessKey>AccessKey</a> of the command is the element's
+  <a href=3D#assigned-access-key>assigned access key</a>, if=
 any.</p>
+
+  <p>The <a href=3D#command-facet-hiddenstate title=3Dcommand-f=
acet-HiddenState>Hidden State</a> of the command is true (hidden=
)
+  if the element has a <code title=3Dattr-hidden><a href=3D#the=
-hidden-attribute>hidden</a></code> attribute, and false o=
therwise.</p>
+
+  <p>The <a href=3D#command-facet-disabledstate title=3Dcommand=
-facet-DisabledState>Disabled State</a> of the command is true i=
f
+  the element or one of its ancestors is <a href=3D#inert>inert&lt=
;/a>, or if the element's <a href=3D#concept-fe-disabled title=3Dco=
ncept-fe-disabled>disabled</a> state is set, and false otherwise=
.</p>
+
+  <p>The <a href=3D#command-facet-checkedstate title=3Dcommand-=
facet-CheckedState>Checked State</a> of the command is true if t=
he
+  command is of <a href=3D#command-facet-type title=3Dcommand-facet-T=
ype>Type</a> "radio" or "checkbox" and the e=
lement
+  is <a href=3D#concept-fe-checked title=3Dconcept-fe-checked>chec=
ked</a> attribute, and false otherwise.</p>
+
+  <p>The <a href=3D#command-facet-action title=3Dcommand-facet-=
Action>Action</a> of the command, if the element has a
+  defined <a href=3D#activation-behavior>activation behavior</a=
>, is to <a href=3D#run-synthetic-click-activation-steps>run syn=
thetic click activation steps</a>
+  on the element. Otherwise, it is just to <a href=3D#fire-a-click-ev=
ent>fire a <code title=3Devent-click>click</code>
+  event</a> at the element.</p>
+
+
+  <h5 id=3Dusing-the-option-element-to-define-a-command><span c=
lass=3Dsecno>4.11.6.5 </span><dfn title=3Doption-command>U=
sing the <code>option</code> element to define a command</=
dfn></h5>
+
+  <p>An <code><a href=3D#the-option-element>option<=
/a></code> element with an ancestor <code><a href=3D#th=
e-select-element>select</a></code> element and either no &=
lt;code title=3Dattr-option-value><a href=3D#attr-option-value>v=
alue</a></code> attribute or a <code title=3Dattr-option-v=
alue><a href=3D#attr-option-value>value</a></code>
+  attribute that is not the empty string <a href=3D#concept-command t=
itle=3Dconcept-command>defines a command</a>.</p>
+
+  <p>The <a href=3D#command-facet-type title=3Dcommand-facet-Ty=
pe>Type</a> of the command is "radio" if the
+  <code><a href=3D#the-option-element>option</a></c=
ode>'s nearest ancestor <code><a href=3D#the-select-element&g=
t;select</a></code> element has no <code title=3Dattr-sele=
ct-multiple><a href=3D#attr-select-multiple>multiple</a>&l=
t;/code> attribute, and "checkbox" if it does.</p>
+
+  <p>The <a href=3D#command-facet-id title=3Dcommand-facet-ID&g=
t;ID</a> of the command is the value of the <code title=3Dattr-i=
d><a href=3D#the-id-attribute>id</a></code> attribut=
e of the element, if the attribute is present and not empty.
+  Otherwise the command is an <a href=3D#anonymous-command>anonymo=
us command</a>.</p>
+
+  <p>The <a href=3D#command-facet-label title=3Dcommand-facet-L=
abel>Label</a> of the command is the value of the
+  <code><a href=3D#the-option-element>option</a></c=
ode> element's <code title=3Dattr-option-label><a href=3D#att=
r-option-label>label</a></code> attribute, if there is
+  one, or else the value of <code><a href=3D#the-option-element=
>option</a></code> element's <code><a href=3D#tex=
tcontent>textContent</a></code> IDL attribute,
+  with <a href=3D#strip-leading-and-trailing-whitespace title=3D&quot=
;strip leading and trailing whitespace">leading and trailing whit=
espace
+  stripped</a>, and with any sequences of two or more <a href=3D=
#space-character title=3D"space character">space
+  characters</a> replaced by a single U+0020 SPACE character.</=
p>
+
+  <p>The <a href=3D#command-facet-hint title=3Dcommand-facet-Hi=
nt>Hint</a> of the command is the string given by the
+  element's <code title=3Dattr-title><a href=3D#attr-title>t=
itle</a></code> attribute, if any, and the empty string if th=
e
+  attribute is absent.</p>
+
+  <p>There is no <a href=3D#command-facet-icon title=3Dcommand-=
facet-Icon>Icon</a> for the command.</p>
+
+  <p>The <a href=3D#command-facet-accesskey title=3Dcommand-fac=
et-AccessKey>AccessKey</a> of the command is the element's
+  <a href=3D#assigned-access-key>assigned access key</a>, if=
 any.</p>
+
+  <p>The <a href=3D#command-facet-hiddenstate title=3Dcommand-f=
acet-HiddenState>Hidden State</a> of the command is true (hidden=
)
+  if the element has a <code title=3Dattr-hidden><a href=3D#the=
-hidden-attribute>hidden</a></code> attribute, and false o=
therwise.</p>
+
+  <p>The <a href=3D#command-facet-disabledstate title=3Dcommand=
-facet-DisabledState>Disabled State</a> of the command is true i=
f
+  the element is <a href=3D#concept-option-disabled title=3Dconcept-o=
ption-disabled>disabled</a>, or if its nearest ancestor
+  <code><a href=3D#the-select-element>select</a></c=
ode> element is <a href=3D#concept-fe-disabled title=3Dconcept-fe-d=
isabled>disabled</a>, or if it or one
+  of its ancestors is <a href=3D#inert>inert</a>, and false =
otherwise.</p>
+
+  <p>The <a href=3D#command-facet-checkedstate title=3Dcommand-=
facet-CheckedState>Checked State</a> of the command is true
+  (checked) if the element's <a href=3D#concept-option-selectedness t=
itle=3Dconcept-option-selectedness>selectedness</a> is true,
+  and false otherwise.</p>
+
+  <p>The <a href=3D#command-facet-action title=3Dcommand-facet-=
Action>Action</a> of the command depends on its <a href=3D#co=
mmand-facet-type title=3Dcommand-facet-Type>Type</a>. If the com=
mand is of <a href=3D#command-facet-type title=3Dcommand-facet-Type&gt=
;Type</a> "radio" then it must <a href=3D#concept-sele=
ct-pick title=3Dconcept-select-pick>pick</a> the <code>&lt=
;a href=3D#the-option-element>option</a></code> element. O=
therwise, it must <a href=3D#concept-select-toggle title=3Dconcept-sel=
ect-toggle>toggle</a> the <code><a href=3D#the-option-e=
lement>option</a></code> element.</p>
+
+
+
+  <h5 id=3Dusing-the-menuitem-element-to-define-a-command><span=
 class=3Dsecno>4.11.6.6 </span>Using the <dfn title=3Dcommand=
-element><code>menuitem</code></dfn> element to defi=
ne a
+  command</h5>
+
+  <p>A <code><a href=3D#the-menuitem-element>menuitem&=
lt;/a></code> element that does not have a <code title=3Dattr=
-menuitem-command><a href=3D#attr-menuitem-command>command</a=
></code> attribute <a href=3D#concept-command title=3Dconcept=
-command>defines a
+  command</a>.</p>
+
+  <p>The <a href=3D#command-facet-type title=3Dcommand-facet-Ty=
pe>Type</a> of the command is "radio" if the
+  <code><a href=3D#the-menuitem-element>menuitem</a>&l=
t;/code>'s <code title=3Dattr-menuitem-type><a href=3D#attr-m=
enuitem-type>type</a></code> attribute is
+  "<code>radio</code>", "checkbox" if th=
e attribute's value is "<code>checkbox</code>", and
+  "command" otherwise.</p>
+
+  <p>The <a href=3D#command-facet-id title=3Dcommand-facet-ID&g=
t;ID</a> of the command is the value of the <code title=3Dattr-i=
d><a href=3D#the-id-attribute>id</a></code> attribut=
e of the element, if the attribute is present and not empty.
+  Otherwise the command is an <a href=3D#anonymous-command>anonymo=
us command</a>.</p>
+
+  <p>The <a href=3D#command-facet-label title=3Dcommand-facet-L=
abel>Label</a> of the command is the value of the element's
+  <code title=3Dattr-menuitem-label><a href=3D#attr-menuitem-la=
bel>label</a></code> attribute, if there is one, or the em=
pty string if
+  it doesn't.</p>
+
+  <p>The <a href=3D#command-facet-hint title=3Dcommand-facet-Hi=
nt>Hint</a> of the command is the string given by the
+  element's <code title=3Dattr-menuitem-title><a href=3D#attr-m=
enuitem-title>title</a></code> attribute, if any, and the =
empty string
+  if the attribute is absent.</p>
+
+  <p>The <a href=3D#command-facet-icon title=3Dcommand-facet-Ic=
on>Icon</a> for the command is the <a href=3D#absolute-url&gt=
;absolute
+  URL</a> obtained from <a href=3D#resolve-a-url title=3D"=
resolve a url">resolving</a> the value of the element's
+  <code title=3Dattr-menuitem-icon><a href=3D#attr-menuitem-ico=
n>icon</a></code> attribute, relative to the element, if i=
t has such an
+  attribute and resolving it is successful. Otherwise, there is no <a=
 href=3D#command-facet-icon title=3Dcommand-facet-Icon>Icon</a> =
for the command.</p>
+
+  <p>The <a href=3D#command-facet-accesskey title=3Dcommand-fac=
et-AccessKey>AccessKey</a> of the command is the element's
+  <a href=3D#assigned-access-key>assigned access key</a>, if=
 any.</p>
+
+  <p>The <a href=3D#command-facet-hiddenstate title=3Dcommand-f=
acet-HiddenState>Hidden State</a> of the command is true (hidden=
)
+  if the element has a <code title=3Dattr-hidden><a href=3D#the=
-hidden-attribute>hidden</a></code> attribute, and false o=
therwise.</p>
+
+  <p>The <a href=3D#command-facet-disabledstate title=3Dcommand=
-facet-DisabledState>Disabled State</a> of the command is true i=
f
+  the element or one of its ancestors is <a href=3D#inert>inert&lt=
;/a>, or if the element has a <code title=3Dattr-menuitem-disabled&=
gt;<a href=3D#attr-menuitem-disabled>disabled</a></code&gt=
; attribute, and false otherwise.</p>
+
+  <p>The <a href=3D#command-facet-checkedstate title=3Dcommand-=
facet-CheckedState>Checked State</a> of the command is true
+  (checked) if the element has a <code title=3Dattr-menuitem-checked&=
gt;<a href=3D#attr-menuitem-checked>checked</a></code> =
attribute, and
+  false otherwise.</p>
+
+  <p>The <a href=3D#command-facet-action title=3Dcommand-facet-=
Action>Action</a> of the command, if the element has a
+  defined <a href=3D#activation-behavior>activation behavior</a=
><!-- it doesn't if the element is disabled -->, is to
+  <a href=3D#run-synthetic-click-activation-steps>run synthetic cl=
ick activation steps</a> on the element. Otherwise, it is just to
+  <a href=3D#fire-a-click-event>fire a <code title=3Devent-clic=
k>click</code> event</a> at the element.</p>
+
+
+
+  <h5 id=3Dusing-the-command-attribute-on-menuitem-elements-to-define=
-a-command-indirectly><span class=3Dsecno>4.11.6.7 </span>=
<dfn title=3Dcommand-menuitem-command>Using the <code title=3Dat=
tr-menuitem-command>command</code> attribute on <code>menu=
item</code> elements to define
+  a command indirectly</dfn></h5>
+
+  <p>A <code><a href=3D#the-menuitem-element>menuitem&=
lt;/a></code> element with a <a href=3D#master-command>mas=
ter command</a> <a href=3D#concept-command title=3Dconcept-comma=
nd>defines a command</a>.</p>
+
+  <p>The <a href=3D#command-facet-type title=3Dcommand-facet-Ty=
pe>Type</a> of the command is the <a href=3D#command-facet-ty=
pe title=3Dcommand-facet-Type>Type</a> of the <a href=3D#mast=
er-command>master command</a>.</p>
+
+  <p>The <a href=3D#command-facet-id title=3Dcommand-facet-ID&g=
t;ID</a> of the command is the value of the <code title=3Dattr-i=
d><a href=3D#the-id-attribute>id</a></code> attribut=
e of the element, if the attribute is present and not empty.
+  Otherwise the command is an <a href=3D#anonymous-command>anonymo=
us command</a>.</p>
+
+  <p>The <a href=3D#command-facet-label title=3Dcommand-facet-L=
abel>Label</a> of the command is the <a href=3D#command-facet=
-label title=3Dcommand-facet-Label>Label</a> of the <a href=3D=
#master-command>master command</a>.</p>
+
+  <p>If the element has a <code title=3Dattr-title><a hre=
f=3D#attr-title>title</a></code> attribute, then the <a=
 href=3D#command-facet-hint title=3Dcommand-facet-Hint>Hint</a> =
of the command is the value of that <code title=3Dattr-title><a =
href=3D#attr-title>title</a></code> attribute. Otherwise, =
the <a href=3D#command-facet-hint title=3Dcommand-facet-Hint>Hint&l=
t;/a> of the command is the <a href=3D#command-facet-hint title=3Dc=
ommand-facet-Hint>Hint</a> of the <a href=3D#master-command&g=
t;master command</a>.</p>
+
+  <p>The <a href=3D#command-facet-icon title=3Dcommand-facet-Ic=
on>Icon</a> of the command is the <a href=3D#command-facet-ic=
on title=3Dcommand-facet-Icon>Icon</a> of the <a href=3D#mast=
er-command>master command</a>.</p>
+
+  <p>The <a href=3D#command-facet-accesskey title=3Dcommand-fac=
et-AccessKey>AccessKey</a> of the command is the element's
+  <a href=3D#assigned-access-key>assigned access key</a>, if=
 any.</p>
+
+  <p>The <a href=3D#command-facet-hiddenstate title=3Dcommand-f=
acet-HiddenState>Hidden State</a> of the command is the <a hr=
ef=3D#command-facet-hiddenstate title=3Dcommand-facet-HiddenState>Hidd=
en State</a> of the <a href=3D#master-command>master command&=
lt;/a>.</p>
+
+  <p>The <a href=3D#command-facet-disabledstate title=3Dcommand=
-facet-DisabledState>Disabled State</a> of the command is the &l=
t;a href=3D#command-facet-disabledstate title=3Dcommand-facet-DisabledSta=
te>Disabled State</a> of the <a href=3D#master-command>mas=
ter command</a>.</p>
+
+  <p>The <a href=3D#command-facet-checkedstate title=3Dcommand-=
facet-CheckedState>Checked State</a> of the command is the <a=
 href=3D#command-facet-checkedstate title=3Dcommand-facet-CheckedState&gt=
;Checked State</a> of the <a href=3D#master-command>master co=
mmand</a>.</p>
+
+  <p>The <a href=3D#command-facet-action title=3Dcommand-facet-=
Action>Action</a> of the command is to invoke the <a href=3D#=
command-facet-action title=3Dcommand-facet-Action>Action</a> of =
the <a href=3D#master-command>master command</a>.</p>
+
+
+
+  <h5 id=3Dusing-the-accesskey-attribute-on-a-label-element-to-define=
-a-command><span class=3Dsecno>4.11.6.8 </span><dfn tit=
le=3Dlabel-command>Using the <code title=3Dattr-accesskey>access=
key</code> attribute
+  on a <code>label</code> element to define a command</df=
n></h5>
+
+  <p>A <code><a href=3D#the-label-element>label</a&=
gt;</code> element that has an <a href=3D#assigned-access-key&gt=
;assigned access key</a> and a <a href=3D#labeled-control>lab=
eled
+  control</a> and whose <a href=3D#labeled-control>labeled c=
ontrol</a> <a href=3D#concept-command title=3Dconcept-command&gt=
;defines a
+  command</a>, itself <a href=3D#concept-command title=3Dconcep=
t-command>defines a command</a>.</p>
+
+  <p>The <a href=3D#command-facet-type title=3Dcommand-facet-Ty=
pe>Type</a> of the command is "command".</p>
+
+  <p>The <a href=3D#command-facet-id title=3Dcommand-facet-ID&g=
t;ID</a> of the command is the value of the <code title=3Dattr-i=
d><a href=3D#the-id-attribute>id</a></code> attribut=
e of the element, if the attribute is present and not empty.
+  Otherwise the command is an <a href=3D#anonymous-command>anonymo=
us command</a>.</p>
+
+  <p>The <a href=3D#command-facet-label title=3Dcommand-facet-L=
abel>Label</a> of the command is the string given by the
+  element's <code><a href=3D#textcontent>textContent</a&g=
t;</code> IDL attribute.</p>
+
+  <p>The <a href=3D#command-facet-hint title=3Dcommand-facet-Hi=
nt>Hint</a> of the command is the value of the <code title=3D=
attr-title><a href=3D#attr-title>title</a></code> at=
tribute of the element.</p>
+
+  <p>There is no <a href=3D#command-facet-icon title=3Dcommand-=
facet-Icon>Icon</a> for the command.</p>
+
+  <p>The <a href=3D#command-facet-accesskey title=3Dcommand-fac=
et-AccessKey>AccessKey</a> of the command is the element's
+  <a href=3D#assigned-access-key>assigned access key</a>.&lt=
;/p>
+
+  <p>The <a href=3D#command-facet-hiddenstate title=3Dcommand-f=
acet-HiddenState>Hidden State</a>, <a href=3D#command-facet-d=
isabledstate title=3Dcommand-facet-DisabledState>Disabled State</a&=
gt;, and <a href=3D#command-facet-action title=3Dcommand-facet-Action&=
gt;Action</a> facets of the command are the same as the respective
+  facets of the element's <a href=3D#labeled-control>labeled contr=
ol</a>.</p>
+
+  <p>The <a href=3D#command-facet-checkedstate title=3Dcommand-=
facet-CheckedState>Checked State</a> of the command is always
+  false. (The command is never checked.)</p>
+
+
+
+  <h5 id=3Dusing-the-accesskey-attribute-on-a-legend-element-to-defin=
e-a-command><span class=3Dsecno>4.11.6.9 </span><dfn ti=
tle=3Dlegend-command>Using the <code title=3Dattr-accesskey>acce=
sskey</code> attribute
+  on a <code>legend</code> element to define a command</d=
fn></h5>
+
+  <p>A <code><a href=3D#the-legend-element>legend</=
a></code> element that has an <a href=3D#assigned-access-key&=
gt;assigned access key</a> and is a child of a
+  <code><a href=3D#the-fieldset-element>fieldset</a>&l=
t;/code> element that has a descendant that is not a descendant of the
+  <code><a href=3D#the-legend-element>legend</a></c=
ode> element and is neither a <code><a href=3D#the-label-elem=
ent>label</a></code> element nor a <code><a href=3D=
#the-legend-element>legend</a></code>
+  element but that <a href=3D#concept-command title=3Dconcept-command=
>defines a command</a>, itself <a href=3D#concept-command tit=
le=3Dconcept-command>defines a command</a>.</p>
+
+  <p>The <a href=3D#command-facet-type title=3Dcommand-facet-Ty=
pe>Type</a> of the command is "command".</p>
+
+  <p>The <a href=3D#command-facet-id title=3Dcommand-facet-ID&g=
t;ID</a> of the command is the value of the <code title=3Dattr-i=
d><a href=3D#the-id-attribute>id</a></code> attribut=
e of the element, if the attribute is present and not empty.
+  Otherwise the command is an <a href=3D#anonymous-command>anonymo=
us command</a>.</p>
+
+  <p>The <a href=3D#command-facet-label title=3Dcommand-facet-L=
abel>Label</a> of the command is the string given by the
+  element's <code><a href=3D#textcontent>textContent</a&g=
t;</code> IDL attribute.</p>
+
+  <p>The <a href=3D#command-facet-hint title=3Dcommand-facet-Hi=
nt>Hint</a> of the command is the value of the <code title=3D=
attr-title><a href=3D#attr-title>title</a></code> at=
tribute of the element.</p>
+
+  <p>There is no <a href=3D#command-facet-icon title=3Dcommand-=
facet-Icon>Icon</a> for the command.</p>
+
+  <p>The <a href=3D#command-facet-accesskey title=3Dcommand-fac=
et-AccessKey>AccessKey</a> of the command is the element's
+  <a href=3D#assigned-access-key>assigned access key</a>.&lt=
;/p>
+
+  <p>The <a href=3D#command-facet-hiddenstate title=3Dcommand-f=
acet-HiddenState>Hidden State</a>, <a href=3D#command-facet-d=
isabledstate title=3Dcommand-facet-DisabledState>Disabled State</a&=
gt;, and <a href=3D#command-facet-action title=3Dcommand-facet-Action&=
gt;Action</a> facets of the command are the same as the respective
+  facets of the first element in <a href=3D#tree-order>tree order&=
lt;/a> that is a descendant of the parent of the
+  <code><a href=3D#the-legend-element>legend</a></c=
ode> element that <a href=3D#concept-command title=3Dconcept-comman=
d>defines a command</a> but is not
+  a descendant of the <code><a href=3D#the-legend-element>le=
gend</a></code> element and is neither a <code><a hr=
ef=3D#the-label-element>label</a></code> nor a
+  <code><a href=3D#the-legend-element>legend</a></c=
ode> element.</p>
+
+  <p>The <a href=3D#command-facet-checkedstate title=3Dcommand-=
facet-CheckedState>Checked State</a> of the command is always
+  false. (The command is never checked.)</p>
+
+
+
+  <h5 id=3Dusing-the-accesskey-attribute-to-define-a-command-on-other=
-elements><span class=3Dsecno>4.11.6.10 </span><dfn tit=
le=3Daccesskey-command>Using the <code title=3Dattr-accesskey>ac=
cesskey</code>
+  attribute to define a command on other elements</dfn></h5>
+
+  <p>An element that has an <a href=3D#assigned-access-key>a=
ssigned access key</a> <a href=3D#concept-command title=3Dconcep=
t-command>defines a
+  command</a>.</p>
+
+  <p>If one of the earlier sections that define elements that <=
a href=3D#concept-command title=3Dconcept-command>define
+  commands</a> define that this element <a href=3D#concept-comm=
and title=3Dconcept-command>defines a command</a>,
+  then that section applies to this element, and this section does not. =
Otherwise, this section
+  applies to that element.</p>
+
+  <p>The <a href=3D#command-facet-type title=3Dcommand-facet-Ty=
pe>Type</a> of the command is "command".</p>
+
+  <p>The <a href=3D#command-facet-id title=3Dcommand-facet-ID&g=
t;ID</a> of the command is the value of the <code title=3Dattr-i=
d><a href=3D#the-id-attribute>id</a></code> attribut=
e of the element, if the attribute is present and not empty.
+  Otherwise the command is an <a href=3D#anonymous-command>anonymo=
us command</a>.</p>
+
+  <p>The <a href=3D#command-facet-label title=3Dcommand-facet-L=
abel>Label</a> of the command depends on the element. If
+  the element is a <a href=3D#labeled-control>labeled control</=
a>, the <code><a href=3D#textcontent>textContent</a>=
</code> of the first
+  <code><a href=3D#the-label-element>label</a></cod=
e> element in <a href=3D#tree-order>tree order</a> whose &=
lt;a href=3D#labeled-control>labeled control</a> is the
+  element in question is the <a href=3D#command-facet-label title=3Dc=
ommand-facet-Label>Label</a> (in DOM terms, this is
+  the string given by <code><var title=3D"">elemen=
t</var>.labels[0].textContent</code>). Otherwise,
+  the <a href=3D#command-facet-label title=3Dcommand-facet-Label>L=
abel</a> is the <code><a href=3D#textcontent>textConten=
t</a></code> of the element
+  itself.</p>
+
+  <p>The <a href=3D#command-facet-hint title=3Dcommand-facet-Hi=
nt>Hint</a> of the command is the value of the <code title=3D=
attr-title><a href=3D#attr-title>title</a></code> at=
tribute of the element. If the attribute is not present, the
+  <a href=3D#command-facet-hint title=3Dcommand-facet-Hint>Hint&lt=
;/a> is the empty string.</p>
+
+  <p>There is no <a href=3D#command-facet-icon title=3Dcommand-=
facet-Icon>Icon</a> for the command.</p>
+
+  <p>The <a href=3D#command-facet-accesskey title=3Dcommand-fac=
et-AccessKey>AccessKey</a> of the command is the element's
+  <a href=3D#assigned-access-key>assigned access key</a>.&lt=
;/p>
+
+  <p>The <a href=3D#command-facet-hiddenstate title=3Dcommand-f=
acet-HiddenState>Hidden State</a> of the command is true (hidden=
)
+  if the element has a <code title=3Dattr-hidden><a href=3D#the=
-hidden-attribute>hidden</a></code> attribute, and false o=
therwise.</p>
+
+  <p>The <a href=3D#command-facet-disabledstate title=3Dcommand=
-facet-DisabledState>Disabled State</a> of the command is true i=
f
+  the element or one of its ancestors is <a href=3D#inert>inert&lt=
;/a>, and false otherwise.</p>
+
+  <p>The <a href=3D#command-facet-checkedstate title=3Dcommand-=
facet-CheckedState>Checked State</a> of the command is always
+  false. (The command is never checked.)</p>
+
+  <p>The <a href=3D#command-facet-action title=3Dcommand-facet-=
Action>Action</a> of the command is to run the following
+  steps:</p>
+
+  <ol><li>If the element is <a href=3D#focusable>focus=
able</a>, run the <a href=3D#focusing-steps>focusing steps&lt=
;/a> for the
+   element.</li>
+
+   <li>If the element has a defined <a href=3D#activation-behav=
ior>activation behavior</a>, <a href=3D#run-synthetic-click-a=
ctivation-steps>run synthetic click
+   activation steps</a> on the element.</li>
+
+   <li>Otherwise, if the element does not have a defined <a hre=
f=3D#activation-behavior>activation behavior</a>,
+   <a href=3D#fire-a-click-event>fire a <code title=3Devent-cli=
ck>click</code> event</a> at the element.</li>
+
+  </ol></div>
+
+
+  <h4 id=3Dthe-dialog-element><span class=3Dsecno>4.11.7 &lt=
;/span>The <dfn><code>dialog</code></dfn> elem=
ent</h4>
+
+  <dl class=3Delement><dt><a href=3D#element-dfn-categori=
es title=3Delement-dfn-categories>Categories</a>:</dt>
+   <dd><a href=3D#flow-content>Flow content</a>.</d=
d>
+   <dd><a href=3D#sectioning-root>Sectioning root</a>.=
</dd>
+   <dt><a href=3D#element-dfn-contexts title=3Delement-dfn-cont=
exts>Contexts in which this element can be used</a>:</dt>
+   <dd>Where <a href=3D#flow-content>flow content</a> =
is expected.</dd>
+   <dt><a href=3D#element-dfn-content-model title=3Delement-dfn=
-content-model>Content model</a>:</dt>
+   <dd><a href=3D#flow-content>Flow content</a>.</d=
d>
+   <dt><a href=3D#element-dfn-tag-omission title=3Delement-dfn-=
tag-omission>Tag omission in text/html</a>:</dt>
+   <dd>Neither tag is omissible.</dd>
+   <dt><a href=3D#element-dfn-attributes title=3Delement-dfn-at=
tributes>Content attributes</a>:</dt>
+   <dd><a href=3D#global-attributes>Global attributes</a&=
gt;</dd>
+   <dd><code title=3Dattr-dialog-open><a href=3D#attr-dia=
log-open>open</a></code> — Whether the dialog bo=
x is showing</dd>
+   <dt><a href=3D#element-dfn-dom title=3Delement-dfn-dom>DO=
M interface</a>:</dt><!--TOPIC:DOM APIs-->
+   <dd>
+<pre class=3Didl>interface <dfn id=3Dhtmldialogelement>HTMLD=
ialogElement</dfn> : <a href=3D#htmlelement>HTMLElement</a=
> {
+           attribute boolean <a href=3D#dom-dialog-open title=3Ddom-d=
ialog-open>open</a>;
+           attribute DOMString <a href=3D#dom-dialog-returnvalue titl=
e=3Ddom-dialog-returnValue>returnValue</a>;
+  void <a href=3D#dom-dialog-show title=3Ddom-dialog-show>show<=
/a>(optional (<a href=3D#mouseevent>MouseEvent</a> or <=
a href=3D#element>Element</a>) anchor);
+  void <a href=3D#dom-dialog-showmodal title=3Ddom-dialog-showModal&g=
t;showModal</a>(optional (<a href=3D#mouseevent>MouseEvent&lt=
;/a> or <a href=3D#element>Element</a>) anchor);
+  void <a href=3D#dom-dialog-close title=3Ddom-dialog-close>close&=
lt;/a>(optional DOMString returnValue);
+};</pre>
+   </dd>
+  </dl><!--TOPIC:HTML--><p>The <code><a href=3D=
#the-dialog-element>dialog</a></code> element represents a=
 part of an application that a user interacts with
+  to perform a task, for example a dialog box, inspector, or window.<=
/p>
+
+  <p>The <dfn id=3Dattr-dialog-open title=3Dattr-dialog-open&gt=
;<code>open</code></dfn> attribute is a <a href=3D#b=
oolean-attribute>boolean
+  attribute</a>. When specified, it indicates that the <code&gt=
;<a href=3D#the-dialog-element>dialog</a></code> elemen=
t is active and
+  that the user can interact with it.</p>
+
+  <div class=3Dimpl>
+
+  <p>A <code><a href=3D#the-dialog-element>dialog</=
a></code> element without an <code title=3Dattr-dialog-open&g=
t;<a href=3D#attr-dialog-open>open</a></code> attribute
+  specified should not be shown to the user. This requirement may be imp=
lemented indirectly through
+  the style layer. For example, user agents that <a href=3D#rendering=
UA>support the suggested
+  default rendering</a> implement this requirement using the CSS r=
ules described in the <a href=3D#rendering>rendering section</a&=
gt;.</p>
+
+  </div>
+
+<!--TOPIC:DOM APIs-->
+
+  <dl class=3Ddomintro><dt><var title=3D"">d=
ialog</var> . <code title=3Ddom-dialog-show><a href=3D#dom=
-dialog-show>show</a></code>( [ <var title=3D"&quo=
t;>anchor</var> ] )</dt>
+
+   <dd>
+
+    <p>Displays the <code><a href=3D#the-dialog-element&g=
t;dialog</a></code> element.</p>
+
+    <p>The argument, if provided, provides an anchor point to whic=
h the element will be fixed.</p>
+
+   </dd>
+
+   <dt><var title=3D"">dialog</var> . <co=
de title=3Ddom-dialog-showModal><a href=3D#dom-dialog-showmodal>=
showModal</a></code>( [ <var title=3D"">ancho=
r</var> ] )</dt>
+
+   <dd>
+
+    <p>Displays the <code><a href=3D#the-dialog-element&g=
t;dialog</a></code> element and makes it the top-most modal d=
ialog.</p>
+
+    <p>The argument, if provided, provides an anchor point to whic=
h the element will be fixed.</p>
+
+    <p>This method honors the <code title=3Dattr-fe-autofocus&g=
t;<a href=3D#attr-fe-autofocus>autofocus</a></code> att=
ribute.</p>
+
+   </dd>
+
+   <dt><var title=3D"">dialog</var> . <co=
de title=3Ddom-dialog-close><a href=3D#dom-dialog-close>close&lt=
;/a></code>( [ <var title=3D"">result</var&gt=
; ] )</dt>
+
+   <dd>
+
+    <p>Closes the <code><a href=3D#the-dialog-element>=
dialog</a></code> element.</p>
+
+    <p>The argument, if provided, provides a return value.</p&g=
t;
+
+   </dd>
+
+   <dt><var title=3D"">dialog</var> . <co=
de title=3Ddom-dialog-returnValue><a href=3D#dom-dialog-returnvalue=
>returnValue</a></code> [ =3D <var title=3D""=
>result</var> ]</dt>
+
+   <dd>
+
+    <p>Returns the <code><a href=3D#the-dialog-element&gt=
;dialog</a></code>'s return value.</p>
+
+    <p>Can be set, to update the return value.</p>
+
+   </dd>
+
+  </dl><!--ADD-TOPIC:CSS--><div class=3Dimpl>
+
+  <p>When the <dfn id=3Ddom-dialog-show title=3Ddom-dialog-show=
><code>show()</code></dfn> method is invoked, the us=
er
+  agent must run the following steps:</p>
+
+  <ol><li><p>If the element already has an <code ti=
tle=3Dattr-dialog-open><a href=3D#attr-dialog-open>open</a&gt=
;</code> attribute, then
+   abort these steps.</li>
+
+   <li><p>Add an <code title=3Dattr-dialog-open><a =
href=3D#attr-dialog-open>open</a></code> attribute to the =
<code><a href=3D#the-dialog-element>dialog</a></code=
>
+   element, whose value is the empty string.</li>
+
+   <li><p>If the <code title=3Ddom-dialog-show><a h=
ref=3D#dom-dialog-show>show()</a></code> method was invoke=
d with an argument,
+   <a href=3D#set-up-the-position>set up the position</a> of=
 the <code><a href=3D#the-dialog-element>dialog</a><=
/code> element, using that argument as the
+   anchor. Otherwise, <a href=3D#set-up-the-default-static-position&g=
t;set up the default static position</a> of the dialog
+   element.</li>
+
+  </ol><hr><p>Each <code><a href=3D#document&=
gt;Document</a></code> has a stack of <code><a href=3D=
#the-dialog-element>dialog</a></code> elements known as th=
e
+  <dfn id=3Dpending-dialog-stack>pending dialog stack</dfn>.=
 When a <code><a href=3D#document>Document</a></code=
> is created, this stack must be
+  initialized to be empty.</p>
+
+  <p>When an element is added to the <a href=3D#pending-dialog-=
stack>pending dialog stack</a>, it must also be added to the
+  <a href=3D#top-layer>top layer</a> layer. When an element =
is removed from the <a href=3D#pending-dialog-stack>pending dialog
+  stack</a>, it must be removed from the <a href=3D#top-layer&g=
t;top layer</a>. <a href=3D#refsFULLSCREEN>[FULLSCREEN]</a=
></p>
+
+  <p>When the <dfn id=3Ddom-dialog-showmodal title=3Ddom-dialog=
-showModal><code>showModal()</code></dfn> method is =
invoked,
+  the user agent must run the following steps:</p>
+
+  <ol><li><p>Let <var title=3D"">subje=
ct</var> be the <code><a href=3D#the-dialog-element>dia=
log</a></code> element on which the method was
+   invoked.</li>
+
+   <li><p>If <var title=3D"">subject</var=
> already has an <code title=3Dattr-dialog-open><a href=3D#at=
tr-dialog-open>open</a></code>
+   attribute, then throw an <code><a href=3D#invalidstateerror&=
gt;InvalidStateError</a></code> exception and abort these ste=
ps.</li>
+
+   <li><p>If <var title=3D"">subject</var=
> is not <a href=3D#in-a-document>in a <code>Document</=
code></a>, then throw
+   an <code><a href=3D#invalidstateerror>InvalidStateError&l=
t;/a></code> exception and abort these steps.</li>
+
+   <li><p>Add an <code title=3Dattr-dialog-open><a =
href=3D#attr-dialog-open>open</a></code> attribute to <=
var title=3D"">subject</var>, whose value is the empty=
 string.</li>
+
+   <li><p>If the <code title=3Ddom-dialog-showModal>&l=
t;a href=3D#dom-dialog-showmodal>showModal()</a></code> me=
thod was invoked with an
+   argument, <a href=3D#set-up-the-position>set up the position&lt=
;/a> of <var title=3D"">subject</var>, using tha=
t argument as
+   the anchor. Otherwise, <a href=3D#set-up-the-default-static-positi=
on>set up the default static position</a> of the dialog
+   element.</li>
+
+   <li><p>Let <var title=3D"">subject</va=
r>'s <code><a href=3D#document>Document</a></code=
> be <a href=3D#blocked-by-a-modal-dialog title=3D"blocked by =
a modal
+   dialog">blocked by the modal dialog</a> <var title=3D=
"">subject</var>.</li>
+
+   <li><p>Push <var title=3D"">subject</v=
ar> onto <var title=3D"">subject</var>'s
+   <code><a href=3D#document>Document</a></code>=
's <a href=3D#pending-dialog-stack>pending dialog stack</a>.&=
lt;/li>
+
+   <li><p>Let <var title=3D"">control</va=
r> be the first element in tree order whose nearest ancestor
+   <code><a href=3D#the-dialog-element>dialog</a></=
code> element is <var title=3D"">subject</var> a=
nd that has an <code title=3Dattr-fe-autofocus><a href=3D#attr-f=
e-autofocus>autofocus</a></code> attribute specified, if a=
ny.</li>
+
+   <li><p>If there is no <var title=3D"">con=
trol</var>, then abort these steps.</li>
+
+   <li><p>Run the <a href=3D#focusing-steps>focusing s=
teps</a> for <var title=3D"">control</var>.&l=
t;/li>
+
+  </ol><p>If at any time a <code><a href=3D#the-dia=
log-element>dialog</a></code> element is <a href=3D#rem=
ove-an-element-from-a-document title=3D"remove an element from a
+  document">removed from a <code>Document</code><=
/a>, then if that <code><a href=3D#the-dialog-element>dial=
og</a></code> is in that
+  <code><a href=3D#document>Document</a></code>'=
s <a href=3D#pending-dialog-stack>pending dialog stack</a>, t=
he following steps must be run:</p>
+
+  <ol><li><p>Let <var title=3D"">subje=
ct</var> be that <code><a href=3D#the-dialog-element>di=
alog</a></code> element and <var title=3D"">d=
ocument</var> be the <code><a href=3D#document>Document=
</a></code> from which it is being removed.</li>
+
+   <li><p>Remove <var title=3D"">subject<=
/var> from <var title=3D"">document</var>'s <=
a href=3D#pending-dialog-stack>pending
+   dialog stack</a>.</li>
+
+   <li><p>If <var title=3D"">document</va=
r>'s <a href=3D#pending-dialog-stack>pending dialog stack</a&=
gt; is not empty, then let
+   <var title=3D"">document</var> be <a href=3D=
#blocked-by-a-modal-dialog title=3D"blocked by a modal dialog"&=
gt;blocked by the modal
+   dialog</a> that is at the top of <var title=3D""&g=
t;document</var>'s <a href=3D#pending-dialog-stack>pending di=
alog
+   stack</a>. Otherwise, let <var title=3D"">docum=
ent</var> be no longer <a href=3D#blocked-by-a-modal-dialog>b=
locked by a modal
+   dialog</a> at all.</li>
+
+  </ol><p>When the <dfn id=3Ddom-dialog-close title=3Ddom=
-dialog-close><code>close()</code></dfn> method is i=
nvoked, the user
+  agent must <a href=3D#close-the-dialog>close the dialog</a&gt=
; that the method was invoked on. If the method was invoked
+  with an argument, that argument must be used as the return value; othe=
rwise, there is no return
+  value.</p>
+
+<!--TOPIC:HTML-->
+
+  <p>When a <code><a href=3D#the-dialog-element>dialog=
</a></code> element <var title=3D"">subject&l=
t;/var> is to be <dfn id=3Dclose-the-dialog title=3D"close the
+  dialog">closed</dfn>, optionally with a return value &lt=
;var title=3D"">result</var>, the user agent
+  must run the following steps:</p>
+
+  <ol><li><p>If <var title=3D"">subjec=
t</var> does not have an <code title=3Dattr-dialog-open><a=
 href=3D#attr-dialog-open>open</a></code>
+   attribute, then throw an <code><a href=3D#invalidstateerror&=
gt;InvalidStateError</a></code> exception and abort these ste=
ps.</li>
+
+   <li><p>Remove <var title=3D"">subject<=
/var>'s <code title=3Dattr-dialog-open><a href=3D#attr-dialog=
-open>open</a></code>
+   attribute.</li>
+
+   <li><p>If the argument was passed a <var title=3D&quot=
;">result</var>, then set the <code title=3Ddom-dialog-r=
eturnValue><a href=3D#dom-dialog-returnvalue>returnValue</a&g=
t;</code> attribute to the value of <var title=3D""&gt=
;result</var>.</li>
+
+   <li>
+
+    <p>If <var title=3D"">subject</var> is i=
n its <code><a href=3D#document>Document</a></code&g=
t;'s <a href=3D#pending-dialog-stack>pending dialog
+    stack</a>, then run these substeps:</p>
+
+    <ol><li><p>Remove <var title=3D"">=
subject</var> from that <a href=3D#pending-dialog-stack>pendi=
ng dialog stack</a>.</li>
+
+     <li><p>If that <a href=3D#pending-dialog-stack>pe=
nding dialog stack</a> is not empty, then let <var title=3D&quot=
;">subject</var>'s <code><a href=3D#document>Do=
cument</a></code> be <a href=3D#blocked-by-a-modal-dialog =
title=3D"blocked by a modal
+     dialog">blocked by the modal dialog</a> that is at th=
e top of the <a href=3D#pending-dialog-stack>pending dialog
+     stack</a>. Otherwise, let <var title=3D"">doc=
ument</var> be no longer <a href=3D#blocked-by-a-modal-dialog&gt=
;blocked by a modal
+     dialog</a> at all.</li>
+
+    </ol></li>
+
+   <li><p><a href=3D#queue-a-task>Queue a task</a&g=
t; to <a href=3D#fire-a-simple-event>fire a simple event</a> =
named <dfn id=3Devent-close title=3Devent-close><code>close&l=
t;/code></dfn> at <var title=3D"">subject</va=
r>.</li>
+
+  </ol><!--TOPIC:DOM APIs--><p>The <dfn id=3Ddom-di=
alog-returnvalue title=3Ddom-dialog-returnValue><code>returnValu=
e</code></dfn> IDL attribute, on
+  getting, must return the last value to which it was set. On setting, i=
t must be set to the new
+  value. When the element is created, it must be set to the empty string=
.</p>
+<!--TOPIC:HTML-->
+
+  <hr><p><strong>Canceling dialogs</strong>: Whe=
n a <code><a href=3D#document>Document</a></code>=
's <a href=3D#pending-dialog-stack>pending dialog
+  stack</a> is not empty, user agents may provide a user interface=
 that, upon activation, <a href=3D#queue-a-task title=3D"queue a =
task">queues a task</a> to <a href=3D#fire-a-simple-even=
t>fire a simple event</a> named <dfn id=3Devent-cancel title=3D=
event-cancel><code>cancel</code></dfn> that is cance=
lable at the top <code><a href=3D#the-dialog-element>dialog&l=
t;/a></code>
+  element on the <code><a href=3D#document>Document</a&gt=
;</code>'s <a href=3D#pending-dialog-stack>pending dialog sta=
ck</a>. The default action of
+  this event must be to <a href=3D#close-the-dialog>close the dial=
og</a> with no return value.</p>
+
+  <p class=3Dnote>An example of such a UI mechanism would be the u=
ser pressing the "Escape" key.</p>
+
+  <hr><p>The containing block of all <code><a href=3D=
#the-dialog-element>dialog</a></code> elements that are &l=
t;i>absolutely positioned</i>
+  must be the initial containing block.</p>
+
+  <p>All <code><a href=3D#the-dialog-element>dialog&lt=
;/a></code> elements are always in one of two modes: <dfn id=3D=
mundanely-aligned>mundanely aligned</dfn>,
+  or <dfn id=3Dmagically-aligned>magically aligned</dfn>. Wh=
en a <code><a href=3D#the-dialog-element>dialog</a><=
/code> element is created, it must be placed
+  in the <a href=3D#mundanely-aligned>mundanely aligned</a> =
mode and the user agent must <a href=3D#set-up-the-default-static-posi=
tion>set up the default static
+  position</a> for that element, without an anchor.</p>
+
+  <p>When a user agent is to <dfn id=3Dset-up-the-default-stati=
c-position>set up the default static position</dfn> of an elemen=
t <var title=3D"">subject</var> without an anchor, =
if that element is <a href=3D#being-rendered>being rendered</a&g=
t;, it must
+  set up the element such that its top static position, for the purposes=
 of calculating the used
+  value of the 'top' property, is the value that would place the element=
's top margin edge as far
+  from the top of the viewport as the element's bottom margin edge from =
the bottom of the viewport,
+  if the element's height is less than the height of the viewport, and o=
therwise is the value that
+  would place the element's top margin edge at the top of the viewport.&=
lt;/p>
+
+  <p>If there is a <code><a href=3D#the-dialog-element&gt=
;dialog</a></code> element that is <a href=3D#mundanely-al=
igned>mundanely aligned</a> and that is
+  <a href=3D#being-rendered>being rendered</a> when its <=
a href=3D#browsing-context>browsing context</a> changes viewport=
 width (as
+  measured in CSS pixels), then the user agent must <a href=3D#set-up=
-the-default-static-position>set up the default static position</a&=
gt;
+  of all such elements in that <a href=3D#browsing-context>browsin=
g context</a> again, still without anchors.</p>
+
+  <p>When a <code><a href=3D#the-dialog-element>dialog=
</a></code> element that is <a href=3D#mundanely-aligned&g=
t;mundanely aligned</a> starts <a href=3D#being-rendered>bein=
g
+  rendered</a>, the user agent must <a href=3D#set-up-the-defau=
lt-static-position>set up the default static position</a> of tha=
t
+  element, without an anchor.</p>
+
+  <p>This top static position of a <a href=3D#mundanely-aligned=
>mundanely aligned</a> <code><a href=3D#the-dialog-elem=
ent>dialog</a></code> element must
+  remain the element's top static position until the <a href=3D#set-u=
p-the-default-static-position>set up the default static position</a=
>
+  algorithm is once again invoked for that element. (The element's stati=
c position is only used in
+  calculating the used value of the 'top' property in certain situations=
; it's not used, for
+  instance, to position the element if its 'position' property is set to=
 'static'.)</p>
+
+  <p>When a user agent is to <dfn id=3Dset-up-the-position>s=
et up the position</dfn> of an element <var title=3D""=
>subject</var> using an anchor <var title=3D"">a=
nchor</var>, it must run the following
+  steps:</p>
+
+  <ol><li>
+
+    <p>If <var title=3D"">anchor</var> is a =
<code><a href=3D#mouseevent>MouseEvent</a></code>=
 object, then run these
+    substeps:</p>
+
+    <ol><li><p>If <var title=3D"">anch=
or</var>'s target element does not have a rendered box, or is in a
+     different document than <var title=3D"">subject<=
/var>, then let <var title=3D"">subject</var> be
+     <a href=3D#mundanely-aligned>mundanely aligned</a>, &lt=
;a href=3D#set-up-the-default-static-position>set up the default stati=
c position</a> of <var title=3D"">subject</var&g=
t; without an anchor, and abort the <a href=3D#set-up-the-position>=
set up the position</a>
+     steps.</li>
+
+     <li><p>Let <var title=3D"">anchor eleme=
nt</var> be an anonymous element rendered as a box with
+     zero height and width (so its margin and border boxes both just for=
m a point), positioned so
+     that its top and left are at the coordinate identified by the event=
, and whose properties all
+     compute to their initial values.</li>
+
+    </ol><p>Otherwise, let <var title=3D"">a=
nchor element</var> be <var title=3D"">anchor</v=
ar>.</p>
+
+   </li>
+
+   <li><p>Let <var title=3D"">subject</va=
r> be <a href=3D#magically-aligned>magically aligned</a> t=
o <var title=3D"">anchor
+   element</var>.</li>
+
+  </ol><p>While an element <var title=3D"">A=
</var> is <a href=3D#magically-aligned>magically aligned</=
a> to an element <var title=3D"">B</var>, the fo=
llowing requirements apply:</p>
+
+  <ul><li>
+
+    <p>If at any time either <var title=3D"">A<=
/var> or <var title=3D"">B</var> cease having re=
ndered
+    boxes, <var title=3D"">A</var> and <var tit=
le=3D"">B</var> cease being in the same
+    <code><a href=3D#document>Document</a></code&gt=
;, or <var title=3D"">B</var> ceases being earlier =
than <var title=3D"">A</var>
+    in <a href=3D#tree-order>tree order</a>, let <var tit=
le=3D"">subject</var> be <a href=3D#mundanely-align=
ed>mundanely aligned</a>,
+    and <a href=3D#set-up-the-default-static-position>set up the d=
efault static position</a> of <var title=3D"">subje=
ct</var> without an
+    anchor.</p>
+
+   </li>
+
+   <li>
+
+    <p><var title=3D"">A</var>'s 'position' =
property must compute to the keyword '<a href=3D#css-position-absolute=
-anchored title=3Dcss-position-absolute-anchored>absolute-anchored<=
/a>' rather than whatever it would
+    otherwise compute to (i.e. the 'position' property's specified value=
 is ignored).</p>
+
+    <p class=3Dnote>The '<a href=3D#css-position-absolute-ancho=
red title=3Dcss-position-absolute-anchored>absolute-anchored</a>=
'
+    keyword's requirements are described below.</p>
+
+   </li>
+
+   <li>
+
+    <p>The anchor points for <var title=3D"">A<=
/var> and <var title=3D"">B</var> are defined as=
 per the
+    appropriate entry in the following list:</p>
+
+    <dl class=3Dswitch><dt>If the computed value of 'anchor-=
point' is 'none' on both <var title=3D"">A</var> an=
d <var title=3D"">B</var>
+
+     <dd>
+      <p>The anchor points of <var title=3D"">A&lt=
;/var> and <var title=3D"">B</var> are the cente=
r points
+      of their respective first boxes' border boxes.
+
+
+     <dt>If the computed value of 'anchor-point' is 'none' on <=
var title=3D"">A</var> and a specific
+     point on <var title=3D"">B</var>
+
+     <dd>
+      <p>The anchor point of <var title=3D"">B<=
/var> is the point given by its 'anchor-point'
+      property.
+
+      <p>If the anchor point of <var title=3D"">B&=
lt;/var> is the center point of <var title=3D"">B</=
var>'s
+      first box's border box, then <var title=3D"">A<=
/var>'s anchor point is the center point of its
+      first box's margin box.
+
+      <p>Otherwise, <var title=3D"">A</var>'=
s anchor point is on one of its margin edges. Consider
+      four hypothetical half-infinite lines L1, L2, L3, and L4 that each=
 start in the center of <var title=3D"">B</var>'s f=
irst box's border box, and that extend respectively through the top left
+      corner, top right corner, bottom right corner, and bottom left cor=
ner of <var title=3D"">B</var>'s first box's border=
 box. <var title=3D"">A</var>'s anchor point is det=
ermined
+      by the location of <var title=3D"">B</var>'s=
 anchor point relative to these four hypothetical
+      lines, as follows:
+
+      <p>If the anchor point of <var title=3D"">B&=
lt;/var> lies on L1 or L2, or inside the area bounded
+      by L1 and L2 that also contains the points above <var title=3D&=
quot;">B</var>'s first box's border
+      box, then let <var title=3D"">A</var>'s anch=
or point be the horizontal center of <var title=3D"">A&lt=
;/var>'s bottom margin edge.</p>
+
+      <p>Otherwise, if the anchor point of <var title=3D"&=
quot;>B</var> lies on L3 or L4, or inside the
+      area bounded by L4 and L4 that also contains the points below <=
var title=3D"">B</var>'s first
+      box's border box, then let <var title=3D"">A</v=
ar>'s anchor point be the horizontal center of
+      <var title=3D"">A</var>'s top margin edge.&l=
t;/p>
+
+      <p>Otherwise, if the anchor point of <var title=3D"&=
quot;>B</var> lies inside the area bounded by L4
+      and L1 that also contains the points to the left of <var title=3D=
"">B</var>'s first box's border
+      box, then let <var title=3D"">A</var>'s anch=
or point be the vertical center of <var title=3D"">A</=
var>'s right margin edge.</p>
+
+      <p>Otherwise, the anchor point of <var title=3D"&quo=
t;>B</var> lies inside the area bounded by L2 and
+      L3 that also contains the points to the right of <var title=3D&=
quot;">B</var>'s first box's border
+      box; let <var title=3D"">A</var>'s anchor po=
int be the vertical center of <var title=3D"">A</var&g=
t;'s left margin edge.</p>
+
+
+     <dt>If the computed value of 'anchor-point' is a specific poi=
nt on <var title=3D"">A</var> and
+     'none' on <var title=3D"">B</var>
+
+     <dd>
+      <p>The anchor point of <var title=3D"">A<=
/var> is the point given by its 'anchor-point'
+      property.
+
+      <p>If the anchor point of <var title=3D"">A&=
lt;/var> is the center point of <var title=3D"">A</=
var>'s
+      first box's margin box, then <var title=3D"">B<=
/var>'s anchor point is the center point of its
+      first box's border box.
+
+      <p>Otherwise, <var title=3D"">B</var>'=
s anchor point is on one of its border edges. Consider
+      four hypothetical half-infinite lines L1, L2, L3, and L4 that each=
 start in the center of <var title=3D"">A</var>'s f=
irst box's margin box, and that extend respectively through the top left
+      corner, top right corner, bottom right corner, and bottom left cor=
ner of <var title=3D"">A</var>'s first box's margin=
 box. <var title=3D"">B</var>'s anchor point is det=
ermined
+      by the location of <var title=3D"">A</var>'s=
 anchor point relative to these four hypothetical
+      lines, as follows:
+
+      <p>If the anchor point of <var title=3D"">A&=
lt;/var> lies on L1 or L2, or inside the area bounded
+      by L1 and L2 that also contains the points above <var title=3D&=
quot;">A</var>'s first box's margin
+      box, then let <var title=3D"">B</var>'s anch=
or point be the horizontal center of <var title=3D"">B&lt=
;/var>'s bottom border edge.</p>
+
+      <p>Otherwise, if the anchor point of <var title=3D"&=
quot;>A</var> lies on L3 or L4, or inside the
+      area bounded by L4 and L4 that also contains the points below <=
var title=3D"">A</var>'s first
+      box's margin box, then let <var title=3D"">B</v=
ar>'s anchor point be the horizontal center of
+      <var title=3D"">B</var>'s top border edge.&l=
t;/p>
+
+      <p>Otherwise, if the anchor point of <var title=3D"&=
quot;>A</var> lies inside the area bounded by L4
+      and L1 that also contains the points to the left of <var title=3D=
"">A</var>'s first box's margin
+      box, then let <var title=3D"">B</var>'s anch=
or point be the vertical center of <var title=3D"">B</=
var>'s right border edge.</p>
+
+      <p>Otherwise, the anchor point of <var title=3D"&quo=
t;>A</var> lies inside the area bounded by L2 and
+      L3 that also contains the points to the right of <var title=3D&=
quot;">A</var>'s first box's margin
+      box; let <var title=3D"">B</var>'s anchor po=
int be the vertical center of <var title=3D"">B</var&g=
t;'s left border edge.</p>
+
+
+     <dt>If the computed value of 'anchor-point' is a specific poi=
nt on both <var title=3D"">A</var>
+     and <var title=3D"">B</var>
+
+     <dd>
+      <p>The anchor points of <var title=3D"">A&lt=
;/var> and <var title=3D"">B</var> are the point=
s given
+      by their respective 'anchor-point' properties.
+
+    </dl><p class=3Dnote>The rules above generally use <v=
ar title=3D"">A</var>'s <em>margin</em> bo=
x, but
+    <var title=3D"">B</var>'s <em>border<=
/em> box. This is because while <var title=3D"">A</=
var> always
+    has a margin box, and using the margin box allows for the dialog to =
be positioned offset from
+    the box it is annotating, <var title=3D"">B</var&=
gt; sometimes does not have a margin box (e.g. if it
+    is a table-cell), or has a margin box whose position may be not enti=
rely clear (e.g. in the face
+    of margin collapsing and 'clear' handling of in-flow blocks).</p&=
gt;
+
+    <p>In cases where <var title=3D"">B</var&gt=
; does not have a border box but its border box is used by
+    the algorithm above, user agents must use its first box's content ar=
ea instead. (This is in
+    particular an issue with boxes in tables that have 'border-collapse'=
 set to 'collapse'.)</p>
+
+   </li>
+
+   <li>
+
+    <p>When an element's 'position' property computes to '<dfn =
id=3Dcss-position-absolute-anchored title=3Dcss-position-absolute-anchore=
d>absolute-anchored</dfn>', the 'float' property does not
+    apply and must compute to 'none', the 'display' property must comput=
e to a value as described by
+    the table in <a href=3Dhttp://www.w3.org/TR/CSS21/visuren.html#di=
s-pos-flo>the section of CSS
+    2.1 describing the <cite>relationships between 'display', 'pos=
ition', and 'float'</cite></a>,
+    and the element's box must be positioned using the rules for absolut=
e positioning but with its
+    static position set such that if the box is positioned in its static=
 position, its anchor point
+    is exactly aligned over the anchor point of the element to which it =
is <a href=3D#magically-aligned>magically
+    aligned</a>. Elements aligned in this way are <i>absolut=
ely positioned</i>. For the purposes
+    of determining the containing block of other elements, the '<a hr=
ef=3D#css-position-absolute-anchored title=3Dcss-position-absolute-anchor=
ed>absolute-anchored</a>' keyword must be treated like
+    the 'absolute' keyword.</p>
+
+   </li>
+
+  </ul><p class=3Dnote>The trivial example of an element tha=
t does not have a rendered box is one whose
+  'display' property computes to 'none'. However, there are many other c=
ases; e.g. table columns do
+  not have boxes (their properties merely affect other boxes).</p>
+
+  <p class=3Dnote>If an element to which another element is anchor=
ed changes rendering, the anchored
+  element will be be repositioned accordingly. (In other words, the requ=
irements above are live,
+  they are not just calculated once per anchored element.)</p>
+
+  <p class=3Dnote>The '<a href=3D#css-position-absolute-anchore=
d title=3Dcss-position-absolute-anchored>absolute-anchored</a>'
+  keyword is not a keyword that can be specified in CSS; the 'position' =
property can only compute to
+  this value if the <code><a href=3D#the-dialog-element>dial=
og</a></code> element is positioned via the APIs described ab=
ove.</p>
+
+  <p class=3Dnote>Elements positioned in this way are not clipped =
by the 'overflow' property of
+  ancestors (nor moved by the resulting scrolling mechanisms), since the=
 containing block is the
+  initial containing block. Anchoring to an element that <em>is&lt=
;/em> so clipped (and shifted) can
+  therefore result in unexpected effects (where the anchored element mov=
es along with the clipped
+  element, but isn't itself clipped).</p>
+
+  <hr><!--TOPIC:DOM APIs--><p>The <dfn id=3Ddom-dia=
log-open title=3Ddom-dialog-open><code>open</code></dfn=
> IDL attribute must
+  <a href=3D#reflect>reflect</a> the <code title=3Dattr-d=
ialog-open><a href=3D#attr-dialog-open>open</a></code&g=
t; content attribute.</p>
+<!--TOPIC:HTML-->
+
+  </div>
+
+
+  <h5 id=3Danchor-points><span class=3Dsecno>4.11.7.1 </s=
pan>Anchor points</h5>
+
+  <p class=3Dcritical>This section will eventually be moved to a C=
SS specification; it is specified
+  here only on an interim basis until an editor can be found to own this=
.</p>
+
+  <table class=3Dcss-property><caption>'anchor-point'</ca=
ption>
+   <tr><th>Value:
+    <td> none | <position>
+   <tr><th>Initial:
+    <td> none
+   <tr><th>Applies to:
+    <td> all elements
+   <tr><th>Inherited:
+    <td> no
+   <tr><th>Percentages:
+    <td> refer to width or height of box; see prose
+   <tr><th>Media:
+    <td> visual
+   <tr><th>Computed value:
+    <td> The specified value, but with any lengths replaced by the=
ir corresponding absolute length
+   <tr><th>Animatable:
+    <td> no
+   <tr><th>Canonical order:
+    <td> per grammar
+  </table><p>The 'anchor-point' property specifies a point t=
o which dialog boxes are to be aligned.</p>
+
+  <p>If the value is a <position>, the alignment poi=
nt is the point given by the value, which
+  must be interpreted relative to the element's first rendered box's mar=
gin box. Percentages must be
+  calculated relative to the element's first rendered box's margin box (=
specifically, its width for
+  the horizontal position and its height for the vertical position). &lt=
;a href=3D#refsCSSVALUES>[CSSVALUES]</a> <a href=3D#refsCSS&g=
t;[CSS]</a></p>
+
+  <p>If the value is the keyword 'none', then no explicit alignmen=
t point is defined. The user agent
+  will pick an alignment point automatically if necessary (as described =
in the definition of the
+  <code title=3Ddom-dialog-open><a href=3D#dom-dialog-open>o=
pen()</a></code> method above).</p>
+
+<!--REMOVE-TOPIC:CSS-->
+
+
+
+  <h3 id=3Dscripting-1><span class=3Dsecno>4.12 </span&gt=
;Scripting</h3>
+
+  <p>Scripts allow authors to add interactivity to their documents=
.</p>
+
+  <p>Authors are encouraged to use declarative alternatives to scr=
ipting where possible, as
+  declarative mechanisms are often more maintainable, and many users dis=
able scripting.</p>
+
+  <div class=3Dexample>
+
+   <p>For example, instead of using script to show or hide a secti=
on to show more details, the
+   <code><a href=3D#the-details-element>details</a>&lt=
;/code> element could be used.</p>
+
+  </div>
+
+  <p>Authors are also encouraged to make their applications degrad=
e gracefully in the absence of
+  scripting support.</p>
+
+  <div class=3Dexample>
+
+   <p>For example, if an author provides a link in a table header =
to dynamically resort the table,
+   the link could also be made to function without scripts by requesting=
 the sorted table from the
+   server.</p>
+
+  </div>
+
+
+  <h4 id=3Dthe-script-element><span class=3Dsecno>4.12.1 &lt=
;/span>The <dfn id=3Dscript><code>script</code></=
dfn> element</h4>
+
+  <dl class=3Delement><dt><a href=3D#element-dfn-categori=
es title=3Delement-dfn-categories>Categories</a>:</dt>
+   <dd><a href=3D#metadata-content>Metadata content</a&gt=
;.</dd>
+   <dd><a href=3D#flow-content>Flow content</a>.</d=
d>
+   <dd><a href=3D#phrasing-content>Phrasing content</a&gt=
;.</dd>
+   <dd><a href=3D#script-supporting-elements title=3D"scri=
pt-supporting elements">Script-supporting element</a>.</=
dd>
+   <dt><a href=3D#element-dfn-contexts title=3Delement-dfn-cont=
exts>Contexts in which this element can be used</a>:</dt>
+   <dd>Where <a href=3D#metadata-content>metadata content&lt=
;/a> is expected.</dd>
+   <dd>Where <a href=3D#phrasing-content>phrasing content&lt=
;/a> is expected.</dd>
+   <dd>Where <a href=3D#script-supporting-elements>script-su=
pporting elements</a> are expected.</dd>
+   <dt><a href=3D#element-dfn-content-model title=3Delement-dfn=
-content-model>Content model</a>:</dt>
+   <dd>If there is no <code title=3Dattr-script-src><a hr=
ef=3D#attr-script-src>src</a></code>
+   attribute, depends on the value of the <code title=3Dattr-script-t=
ype><a href=3D#attr-script-type>type</a></code> attr=
ibute, but must match
+   <a href=3D#restrictions-for-contents-of-script-elements>script =
content restrictions</a>.</dd>
+   <dd>If there <em>is</em> a <code title=3Dattr-sc=
ript-src><a href=3D#attr-script-src>src</a></code>
+   attribute, the element must be either empty or contain only
+   <a href=3D#inline-documentation-for-external-scripts>script doc=
umentation</a> that also matches <a href=3D#restrictions-for-con=
tents-of-script-elements>script
+   content restrictions</a>.</dd>
+   <dt><a href=3D#element-dfn-tag-omission title=3Delement-dfn-=
tag-omission>Tag omission in text/html</a>:</dt>
+   <dd>Neither tag is omissible.</dd>
+   <dt><a href=3D#element-dfn-attributes title=3Delement-dfn-at=
tributes>Content attributes</a>:</dt>
+   <dd><a href=3D#global-attributes>Global attributes</a&=
gt;</dd>
+   <dd><code title=3Dattr-script-src><a href=3D#attr-scri=
pt-src>src</a></code> — Address of the resource&=
lt;/dd>
+   <dd><code title=3Dattr-script-type><a href=3D#attr-scr=
ipt-type>type</a></code> — Type of embedded reso=
urce</dd>
+   <dd><code title=3Dattr-script-charset><a href=3D#attr-=
script-charset>charset</a></code> — Character en=
coding of the external script resource</dd>
+   <dd><code title=3Dattr-script-async><a href=3D#attr-sc=
ript-async>async</a></code> — Execute script asy=
nchronously</dd>
+   <dd><code title=3Dattr-script-defer><a href=3D#attr-sc=
ript-defer>defer</a></code> — Defer script execu=
tion</dd>
+   <dd><code title=3Dattr-script-crossorigin><a href=3D#a=
ttr-script-crossorigin>crossorigin</a></code> — =
How the element handles crossorigin requests</dd>
+   <dt><a href=3D#element-dfn-dom title=3Delement-dfn-dom>DO=
M interface</a>:</dt><!--TOPIC:DOM APIs-->
+   <dd>
+<pre class=3Didl>interface <dfn id=3Dhtmlscriptelement>HTMLS=
criptElement</dfn> : <a href=3D#htmlelement>HTMLElement</a=
> {
+           attribute DOMString <a href=3D#dom-script-src title=3Ddom-=
script-src>src</a>;
+           attribute DOMString <a href=3D#dom-script-type title=3Ddom=
-script-type>type</a>;
+           attribute DOMString <a href=3D#dom-script-charset title=3D=
dom-script-charset>charset</a>;
+           attribute boolean <a href=3D#dom-script-async title=3Ddom-=
script-async>async</a>;
+           attribute boolean <a href=3D#dom-script-defer title=3Ddom-=
script-defer>defer</a>;
+           attribute DOMString <a href=3D#dom-script-crossorigin titl=
e=3Ddom-script-crossorigin>crossOrigin</a>;
+           attribute DOMString <a href=3D#dom-script-text title=3Ddom=
-script-text>text</a>;
+
+  // <a href=3D"#HTMLScriptElement-partial">also has obs=
olete members</a>
+};</pre>
+   </dd>
+  </dl><!--TOPIC:HTML--><p>The <code><a href=3D=
#the-script-element>script</a></code> element allows autho=
rs to include dynamic script and data blocks in
+  their documents. The element does not <a href=3D#represents title=3D=
represents>represent</a> content for the
+  user.</p>
+
+  <p>When used to include dynamic scripts, the scripts may either =
be embedded inline or may be
+  imported from an external file using the <code title=3Dattr-script-=
src><a href=3D#attr-script-src>src</a></code> attrib=
ute. If
+  the language is not that described by "<code title=3D"&qu=
ot;>text/javascript</code>", then the <code title=3Dattr=
-script-type><a href=3D#attr-script-type>type</a></code=
> attribute must be present, as described below. Whatever
+  language is used, the contents of the <code><a href=3D#the-sc=
ript-element>script</a></code> element must conform with t=
he
+  requirements of that language's specification.</p>
+
+  <p>When used to include data blocks (as opposed to scripts), the=
 data must be embedded inline, the
+  format of the data must be given using the <code title=3Dattr-scrip=
t-type><a href=3D#attr-script-type>type</a></code> a=
ttribute,
+  the <code title=3Dattr-script-src><a href=3D#attr-script-src&=
gt;src</a></code> attribute must not be specified, and the co=
ntents of
+  the <code><a href=3D#the-script-element>script</a>&l=
t;/code> element must conform to the requirements defined for the form=
at used.</p>
+
+  <p>The <dfn id=3Dattr-script-type title=3Dattr-script-type&gt=
;<code>type</code></dfn> attribute gives the language o=
f the
+  script or format of the data. If the attribute is present, its value m=
ust be a <a href=3D#valid-mime-type>valid MIME
+  type</a>. The <code title=3D"">charset</code&=
gt; parameter must not be specified. The default, which
+  is used if the attribute is absent, is "<code title=3D"&q=
uot;>text/javascript</code>".</p>
+
+  <p>The <dfn id=3Dattr-script-src title=3Dattr-script-src>&=
lt;code>src</code></dfn> attribute, if specified, gives th=
e
+  address of the external script resource to use. The value of the attri=
bute must be a <a href=3D#valid-non-empty-url-potentially-surrounded-b=
y-spaces>valid
+  non-empty URL potentially surrounded by spaces</a> identifying a=
 script resource of the type
+  given by the <code title=3Dattr-script-type><a href=3D#attr-s=
cript-type>type</a></code> attribute, if the attribute is =
present, or
+  of the type "<code title=3D"">text/javascript<=
/code>", if the attribute is absent. A resource is a
+  script resource of a given type if that type identifies a scripting la=
nguage and the resource
+  conforms with the requirements of that language's specification.</p=
>
+
+  <p>The <dfn id=3Dattr-script-charset title=3Dattr-script-char=
set><code>charset</code></dfn> attribute gives the c=
haracter
+  encoding of the external script resource. The attribute must not be sp=
ecified if the <code title=3Dattr-script-src><a href=3D#attr-scr=
ipt-src>src</a></code> attribute is not present. If the at=
tribute is set, its value
+  must be an <a href=3D#ascii-case-insensitive>ASCII case-insensit=
ive</a> match for one of the <a href=3D#encoding-label title=3D&=
quot;encoding
+  label">labels</a> of an <a href=3D#encoding>encodi=
ng</a>, and must specify the same <a href=3D#encoding>encodin=
g</a> as
+  the <code title=3D"">charset</code> parameter of=
 the <a href=3D#content-type title=3DContent-Type>Content-Type
+  metadata</a> of the external file, if any. <a href=3D#refsENC=
ODING>[ENCODING]</a></p>
+
+  <p>The <dfn id=3Dattr-script-async title=3Dattr-script-async&=
gt;<code>async</code></dfn> and <dfn id=3Dattr-scrip=
t-defer title=3Dattr-script-defer><code>defer</code></d=
fn> attributes are <a href=3D#boolean-attribute title=3D"boole=
an
+  attribute">boolean attributes</a> that indicate how the =
script should be executed. The <code title=3Dattr-script-defer><=
a href=3D#attr-script-defer>defer</a></code> and <code =
title=3Dattr-script-async><a href=3D#attr-script-async>async<=
/a></code> attributes
+  must not be specified if the <code title=3Dattr-script-src><a=
 href=3D#attr-script-src>src</a></code> attribute is not
+  present.</p>
+
+  <p>There are three possible modes that can be selected using the=
se attributes. If the <code title=3Dattr-script-async><a href=3D=
#attr-script-async>async</a></code> attribute is present, =
then the script will be executed
+  asynchronously, as soon as it is available. If the <code title=3Dat=
tr-script-async><a href=3D#attr-script-async>async</a><=
/code>
+  attribute is not present but the <code title=3Dattr-script-defer&gt=
;<a href=3D#attr-script-defer>defer</a></code> attribut=
e is
+  present, then the script is executed when the page has finished parsin=
g. If neither attribute is
+  present, then the script is fetched and executed immediately, before t=
he user agent continues
+  parsing the page.</p>
+
+  <p class=3Dnote>The exact processing details for these attribute=
s are, for mostly historical
+  reasons, somewhat non-trivial, involving a number of aspects of HTML. =
The implementation
+  requirements are therefore by necessity scattered throughout the speci=
fication. The algorithms
+  below (in this section) describe the core of this processing, but thes=
e algorithms reference and
+  are referenced by the parsing rules for <code><a href=3D#the-=
script-element>script</a></code> <a href=3D#scriptTag&g=
t;start</a> and <a href=3D#scriptEndTag>end</a> tags in=
 HTML, <a href=3D#scriptForeignEndTag>in foreign content</a>,
+  and <a href=3D#scriptTagXML>in XML</a>, the rules for the =
<code title=3Ddom-document-write><a href=3D#dom-document-write&g=
t;document.write()</a></code> method, the handling of <a h=
ref=3D#scripting>scripting</a>, etc.</p>
+
+  <p>The <code title=3Dattr-script-defer><a href=3D#attr-=
script-defer>defer</a></code> attribute may be specified e=
ven if the <code title=3Dattr-script-async><a href=3D#attr-scrip=
t-async>async</a></code> attribute is specified, to cause =
legacy Web browsers that
+  only support <code title=3Dattr-script-defer><a href=3D#attr-=
script-defer>defer</a></code> (and not <code title=3Dat=
tr-script-async><a href=3D#attr-script-async>async</a><=
/code>) to fall back to the <code title=3Dattr-script-defer><=
a href=3D#attr-script-defer>defer</a></code> behavior inst=
ead of the synchronous blocking behavior that
+  is the default.</p>
+
+  <p>The <dfn id=3Dattr-script-crossorigin title=3Dattr-script-=
crossorigin><code>crossorigin</code></dfn> attribute=
 is a
+  <a href=3D#cors-settings-attribute>CORS settings attribute</a=
>. It controls, for scripts that are obtained from other <a href=3D=
#origin title=3Dorigin>origins</a>, whether error information wi=
ll be exposed.</p>
+
+  <p>Changing the <code title=3Dattr-script-src><a href=3D=
#attr-script-src>src</a></code>, <code title=3Dattr-scr=
ipt-type><a href=3D#attr-script-type>type</a></code>=
, <code title=3Dattr-script-charset><a href=3D#attr-script-chars=
et>charset</a></code>, <code title=3Dattr-script-async&=
gt;<a href=3D#attr-script-async>async</a></code>, <c=
ode title=3Dattr-script-defer><a href=3D#attr-script-defer>defer=
</a></code>, and <code title=3Dattr-script-crossorigin>=
<a href=3D#attr-script-crossorigin>crossorigin</a></code&g=
t; attributes dynamically has no direct effect;
+  these attribute are only used at specific times described below.</p=
> <!-- by implication, changes
+  to the base URL also have no effect -->
+
+  <div class=3Dimpl>
+
+  <p>A <code><a href=3D#the-script-element>script</=
a></code> element has several associated pieces of state.</p&=
gt;
+
+  <p>The first is a flag indicating whether or not the script bloc=
k has been <dfn id=3Dalready-started>"already
+  started"</dfn>. Initially, <code><a href=3D#the-sc=
ript-element>script</a></code> elements must have this fla=
g unset (script blocks,
+  when created, are not "already started"). The <a href=3D#=
concept-node-clone-ext title=3Dconcept-node-clone-ext>cloning
+  steps</a> for <code><a href=3D#the-script-element>sc=
ript</a></code> elements must set the "already started&q=
uot; flag on the copy if
+  it is set on the element being cloned.</p>
+
+  <p>The second is a flag indicating whether the element was <d=
fn id=3Dparser-inserted>"parser-inserted"</dfn>.
+  Initially, <code><a href=3D#the-script-element>script</=
a></code> elements must have this flag unset. It is set by the &=
lt;a href=3D#html-parser>HTML
+  parser</a> and the <a href=3D#xml-parser>XML parser</a&=
gt; on <code><a href=3D#the-script-element>script</a>&l=
t;/code> elements they insert and
+  affects the processing of those elements.</p>
+
+  <p>The third is a flag indicating whether the element will <d=
fn id=3Dforce-async>"force-async"</dfn>. Initially,
+  <code><a href=3D#the-script-element>script</a></c=
ode> elements must have this flag set. It is unset by the <a href=3D=
#html-parser>HTML parser</a>
+  and the <a href=3D#xml-parser>XML parser</a> on <code&g=
t;<a href=3D#the-script-element>script</a></code> eleme=
nts they insert. In addition, whenever
+  a <code><a href=3D#the-script-element>script</a><=
/code> element whose <a href=3D#force-async>"force-async&qu=
ot;</a> flag is set has a <code title=3Dattr-script-async>&lt=
;a href=3D#attr-script-async>async</a></code> content attr=
ibute added, the element's
+  <a href=3D#force-async>"force-async"</a> flag mu=
st be unset.</p> <!-- there's no need to unset it when the
+  attribute is removed since you can't have the attribute and the flag s=
et at once. -->
+
+  <p>The fourth is a flag indicating whether or not the script blo=
ck is <dfn id=3Dready-to-be-parser-executed>"ready to be
+  parser-executed"</dfn>. Initially, <code><a href=3D=
#the-script-element>script</a></code> elements must have t=
his flag unset (script
+  blocks, when created, are not "ready to be parser-executed")=
. This flag is used only for elements
+  that are also <a href=3D#parser-inserted>"parser-inserted&q=
uot;</a>, to let the parser know when to execute the
+  script.</p>
+
+  <p>The last few pieces of state are <dfn id=3D"the-scrip=
t-block's-type"><var>the script block's type</var>&lt=
;/dfn>, <dfn id=3D"the-script-block's-character-encoding"=
><var>the
+  script block's character encoding</var></dfn>, and <dfn=
 id=3D"the-script-block's-fallback-character-encoding"><v=
ar>the script block's fallback character
+  encoding</var></dfn>. They are determined when the script =
is prepared, based on the attributes on
+  the element at that time, and the <code><a href=3D#document&g=
t;Document</a></code> of the <code><a href=3D#the-sc=
ript-element>script</a></code> element.</p>
+
+  <p>When a <code><a href=3D#the-script-element>script=
</a></code> element that is not marked as being <a href=3D=
#parser-inserted>"parser-inserted"</a>
+  experiences one of the events listed in the following list, the user a=
gent must synchronously
+  <a href=3D#prepare-a-script title=3D"prepare a script"&gt=
;prepare</a> the <code><a href=3D#the-script-element>sc=
ript</a></code> element:</p>
+
+  <ul><li>The <code><a href=3D#the-script-element&g=
t;script</a></code> element gets <a href=3D#insert-an-elem=
ent-into-a-document title=3D"insert an element into a document"=
>inserted
+   into a document</a>, at the time the <a href=3D#nodes-are-in=
serted title=3D"nodes are inserted">node is inserted</a&g=
t;
+   according to the DOM, after any other <code><a href=3D#the-s=
cript-element>script</a></code> elements inserted at the s=
ame time that
+   are earlier in the <code><a href=3D#document>Document<=
/a></code> in <a href=3D#tree-order>tree order</a>.&=
lt;/li>
+
+   <li>The <code><a href=3D#the-script-element>script&=
lt;/a></code> element is <a href=3D#in-a-document>in a &lt=
;code>Document</code></a> and a node or
+   document fragment is <a href=3D#nodes-are-inserted title=3D"n=
odes are inserted">inserted</a> into the
+   <code><a href=3D#the-script-element>script</a></=
code> element, after any <code><a href=3D#the-script-element&=
gt;script</a></code> elements <a href=3D#nodes-are-inserte=
d title=3D"nodes are
+   inserted">inserted</a> at that time.</li>
+
+   <li>The <code><a href=3D#the-script-element>script&=
lt;/a></code> element is <a href=3D#in-a-document>in a &lt=
;code>Document</code></a> and has a <code title=3Dattr-=
script-src><a href=3D#attr-script-src>src</a></code>=
 attribute set where previously the element had no such
+   attribute.</li>
+
+  </ul><p>To <dfn id=3Dprepare-a-script title=3D"pre=
pare a script">prepare a script</dfn>, the user agent must =
act as
+  follows:</p>
+
+  <ol><li>
+
+    <p>If the <code><a href=3D#the-script-element>scri=
pt</a></code> element is marked as having <a href=3D#alrea=
dy-started>"already started"</a>, then
+    the user agent must abort these steps at this point. The script is n=
ot executed.</p>
+
+   </li>
+
+   <li>
+
+    <p>If the element has its <a href=3D#parser-inserted>&qu=
ot;parser-inserted"</a> flag set, then set <var title=3D&qu=
ot;">was-parser-inserted</var> to true and unset the elemen=
t's
+    <a href=3D#parser-inserted>"parser-inserted"</a&g=
t; flag. Otherwise, set <var title=3D"">was-parser-insert=
ed</var> to
+    false.</p>
+
+    <p class=3Dnote>This is done so that if parser-inserted <co=
de><a href=3D#the-script-element>script</a></code> e=
lements fail to run
+    when the parser tries to run them, e.g. because they are empty or sp=
ecify an unsupported
+    scripting language, another script can later mutate them and cause t=
hem to run again.</p>
+
+    <!-- q.v. http://hsivonen.iki.fi/test/moz/script-setting-src-on-p=
arser-inserted-script.html -->
+
+   </li>
+
+   <li>
+
+    <p>If <var title=3D"">was-parser-inserted</=
var> is true and the element does not have an <code title=3Dattr-sc=
ript-async><a href=3D#attr-script-async>async</a></code=
> attribute, then set the element's
+    <a href=3D#force-async>"force-async"</a> flag =
to true.</p>
+
+    <p class=3Dnote>This is done so that if a parser-inserted <=
code><a href=3D#the-script-element>script</a></code>=
 element fails to
+    run when the parser tries to run it, but it is later executed after =
a script dynamically updates
+    it, it will execute asynchronously even if the <code title=3Dattr=
-script-async><a href=3D#attr-script-async>async</a></c=
ode>
+    attribute isn't set.</p>
+
+   </li>
+
+   <li id=3Dscript-processing-empty>
+
+    <p>If the element has no <code title=3Dattr-script-src>&=
lt;a href=3D#attr-script-src>src</a></code> attribute, and=
 its child
+    nodes, if any, consist only of comment nodes and empty <code>&=
lt;a href=3D#text>Text</a></code> nodes, then the user
+    agent must abort these steps at this point. The script is not execut=
ed.</p>
+
+   </li>
+
+   <li>
+
+    <p>If the element is not <a href=3D#in-a-document>in a &=
lt;code>Document</code></a>, then the user agent must abor=
t
+    these steps at this point. The script is not executed.</p>
+
+   </li>
+
+   <li id=3Dscript-processing-prepare>
+
+    <p>If either:</p>
+
+    <ul class=3Dbrief><li>the <code><a href=3D#the-=
script-element>script</a></code> element has a <code ti=
tle=3Dattr-script-type><a href=3D#attr-script-type>type</a&gt=
;</code> attribute
+     and its value is the empty string, or</li>
+
+     <li>the <code><a href=3D#the-script-element>scrip=
t</a></code> element has no <code title=3Dattr-script-type=
><a href=3D#attr-script-type>type</a></code> attribu=
te
+     but it has a <code title=3Dattr-script-language><a href=3D=
#attr-script-language>language</a></code> attribute and &l=
t;em>that</em>
+     attribute's value is the empty string, or</li>
+
+     <li>the <code><a href=3D#the-script-element>scrip=
t</a></code> element has neither a <code title=3Dattr-scri=
pt-type><a href=3D#attr-script-type>type</a></code>
+     attribute nor a <code title=3Dattr-script-language><a href=
=3D#attr-script-language>language</a></code> attribute, th=
en</li>
+
+    </ul><p>...let <var><a href=3D"#the-script=
-block's-type">the script block's type</a></var> for =
this <code><a href=3D#the-script-element>script</a><=
/code> element be "<code title=3D"">text/javascri=
pt</code>".</p>
+
+    <p>Otherwise, if the <code><a href=3D#the-script-elem=
ent>script</a></code> element has a <code title=3Dattr-=
script-type><a href=3D#attr-script-type>type</a></code&=
gt; attribute, let <var><a href=3D"#the-script-block's-type=
">the script block's type</a></var> for this
+    <code><a href=3D#the-script-element>script</a><=
/code> element be the value of that attribute with any leading or trai=
ling
+    sequences of <a href=3D#space-character title=3D"space chara=
cter">space characters</a> removed.</p> <!-- <s=
pan>Strip
+    leading and trailing whitespace</span> from... -->
+
+    <p>Otherwise, the element has a non-empty <code title=3Datt=
r-script-language><a href=3D#attr-script-language>language</a=
></code>
+    attribute; let <var><a href=3D"#the-script-block's-typ=
e">the script block's type</a></var> for this <cod=
e><a href=3D#the-script-element>script</a></code> el=
ement be the
+    concatenation of the string "<code title=3D"">t=
ext/</code>" followed by the value of the <code title=3Datt=
r-script-language><a href=3D#attr-script-language>language</a=
></code> attribute.</p> <!-- user agents already suppor=
t,
+    e.g., type=3D"text/javascript1.3", so we don't have to sup=
port that separately. -->
+
+    <p class=3Dnote>The <code title=3Dattr-script-language>&=
lt;a href=3D#attr-script-language>language</a></code> attr=
ibute is never
+    conforming, and is always ignored if there is a <code title=3Datt=
r-script-type><a href=3D#attr-script-type>type</a></cod=
e>
+    attribute present.</p>
+
+   </li>
+
+   <li>
+
+    <p>If the user agent does not <a href=3D#support-the-script=
ing-language>support the scripting language</a> given by <var=
><a href=3D"#the-script-block's-type">the
+    script block's type</a></var> for this <code><a=
 href=3D#the-script-element>script</a></code> element, the=
n the user agent must abort
+    these steps at this point. The script is not executed.</p>
+
+   </li>
+
+   <li>
+
+    <p>If <var title=3D"">was-parser-inserted</=
var> is true, then flag the element as
+    <a href=3D#parser-inserted>"parser-inserted"</a&g=
t; again, and set the element's <a href=3D#force-async>"force-=
async"</a> flag to
+    false.</p>
+
+   </li>
+
+   <li id=3Dscript-processing-start>
+
+    <p>The user agent must set the element's <a href=3D#already=
-started>"already started"</a> flag.</p>
+
+    <p class=3Dnote>The state of the element at this moment <a =
href=3D#establish-script-block-source>is later used</a> to deter=
mine the script source.</p>
+
+   </li>
+
+   <li>
+
+    <p>If the element is flagged as <a href=3D#parser-inserted&=
gt;"parser-inserted"</a>, but the element's
+    <code><a href=3D#document>Document</a></code&gt=
; is not the <code><a href=3D#document>Document</a><=
/code> of the parser that created the element,
+    then abort these steps.</p>
+
+   </li>
+
+   <li id=3Dscript-processing-noscript>
+
+    <p>If <a href=3D#concept-n-noscript title=3Dconcept-n-noscr=
ipt>scripting is disabled</a> for the <code><a href=3D#=
the-script-element>script</a></code>
+    element, then the user agent must abort these steps at this point. T=
he script is not
+    executed.</p>
+
+    <p class=3Dnote>The definition of <a href=3D#concept-n-nosc=
ript title=3Dconcept-n-noscript>scripting is disabled</a>
+    means that, amongst others, the following scripts will not execute: =
scripts in
+    <code>XMLHttpRequest</code>'s <code title=3Ddom-XMLHt=
tpRequest-responseXML>responseXML</code>
+    documents, scripts in <code>DOMParser</code>-created doc=
uments, scripts in documents created by
+    <code>XSLTProcessor</code>'s <code title=3Ddom-XSLTPr=
ocessor-transformToDocument>transformToDocument</code> feature, =
and scripts
+    that are first inserted by a script into a <code><a href=3D=
#document>Document</a></code> that was created using the
+    <code title=3Ddom-DOMImplementation-createDocument><a href=3D=
#dom-domimplementation-createdocument>createDocument()</a></c=
ode> API. <a href=3D#refsXHR>[XHR]</a> <a href=3D#refsD=
OMPARSING>[DOMPARSING]</a> <!--<a
+    href=3D"#refsXSLTP">[XSLTP]</a>--> <a href=3D=
#refsDOM>[DOM]</a></p>
+
+
+   </li>
+
+   <li id=3Dscript-processing-for>
+
+    <p>If the <code><a href=3D#the-script-element>scri=
pt</a></code> element has an <code title=3Dattr-script-eve=
nt><a href=3D#attr-script-event>event</a></code>
+    attribute and a <code title=3Dattr-script-for><a href=3D#at=
tr-script-for>for</a></code> attribute, then run these sub=
steps:</p>
+
+    <ol><li><p>Let <var title=3D"">for=
</var> be the value of the <code title=3Dattr-script-for><=
a href=3D#attr-script-for>for</a></code>
+     attribute.</li>
+
+     <li><p>Let <var title=3D"">event</va=
r> be the value of the <code title=3Dattr-script-event><a hre=
f=3D#attr-script-event>event</a></code> attribute.</li&=
gt;
+
+     <li><p><a href=3D#strip-leading-and-trailing-whitesp=
ace>Strip leading and trailing whitespace</a> from <var title=
=3D"">event</var> and
+     <var title=3D"">for</var>.</li>
+
+     <li><p>If <var title=3D"">for</var&g=
t; is not an <a href=3D#ascii-case-insensitive>ASCII case-insensiti=
ve</a> match for the
+     string "<code title=3D"">window</code>&q=
uot;, then the user agent must abort these steps at this
+     point. The script is not executed.</li>
+
+     <li><p>If <var title=3D"">event</var=
> is not an <a href=3D#ascii-case-insensitive>ASCII case-insensi=
tive</a> match for
+     either the string "<code title=3D"">onload<=
/code>" or the string "<code title=3D"">onlo=
ad()</code>", then the user agent must abort these steps at th=
is point. The script
+     is not executed.</li>
+
+    </ol></li>
+
+   <li id=3Dscript-processing-encoding>
+
+    <p>If the <code><a href=3D#the-script-element>scri=
pt</a></code> element has a <code title=3Dattr-script-char=
set><a href=3D#attr-script-charset>charset</a></code&gt=
;
+    attribute, then let <var><a href=3D"#the-script-block'=
s-character-encoding">the script block's character encoding</a=
></var> for this
+    <code><a href=3D#the-script-element>script</a><=
/code> element be the result of <a href=3D#getting-an-encoding>g=
etting an encoding</a> from the value of
+    the <code title=3Dattr-script-charset><a href=3D#attr-scrip=
t-charset>charset</a></code> attribute.</p>
+
+    <p>Otherwise, let <var><a href=3D"#the-script-bl=
ock's-fallback-character-encoding">the script block's fallback ch=
aracter encoding</a></var> for this
+    <code><a href=3D#the-script-element>script</a><=
/code> element be the same as <a href=3D"#document's-character=
-encoding" title=3D"document's character encoding">the
+    encoding of the document itself</a>.</p>
+
+    <p class=3Dnote>Only one of these two pieces of state is set.&=
lt;/p>
+
+   </li>
+
+   <li id=3Dscript-processing-src-prepare>
+
+    <p>If the element has a <code title=3Dattr-script-src>&l=
t;a href=3D#attr-script-src>src</a></code> content attribu=
te, run these
+    substeps:</p>
+
+    <ol><li><p>Let <var title=3D"">src=
</var> be the value of the element's <code title=3Dattr-script-s=
rc><a href=3D#attr-script-src>src</a></code> attribu=
te.</li>
+
+     <li><p>If <var title=3D"">src</var&g=
t; is the empty string, <a href=3D#queue-a-task>queue a task</a&=
gt; to <a href=3D#fire-a-simple-event>fire
+     a simple event</a> named <code title=3Devent-error>erro=
r</code> at the element, and abort
+     these steps.</li>
+
+     <li><p><a href=3D#resolve-a-url title=3D"resolv=
e a url">Resolve</a> <var title=3D"">src&lt=
;/var> relative to the
+     element.</li>
+
+     <li><p>If the previous step failed, <a href=3D#queue=
-a-task>queue a task</a> to <a href=3D#fire-a-simple-event&gt=
;fire a simple
+     event</a> named <code title=3Devent-error>error</cod=
e> at the element, and abort these
+     steps.</li>
+
+     <li>
+
+      <p>Do a <a href=3D#potentially-cors-enabled-fetch>pote=
ntially CORS-enabled fetch</a><!--FETCH--> of the resulting
+      <a href=3D#absolute-url>absolute URL</a>, with the &lt=
;i>mode</i> being the state of the element's <code title=3Dat=
tr-script-crossorigin><a href=3D#attr-script-crossorigin>crossor=
igin</a></code> content attribute, the <i title=3D"&q=
uot;>origin</i> being the <a href=3D#origin>origin</a&g=
t; of the <code><a href=3D#the-script-element>script</a&gt=
;</code> element's
+      <code><a href=3D#document>Document</a></code&=
gt;, and the <i>default origin behaviour</i> set to <i>=
taint</i>.</p>
+
+      <p>The resource obtained in this fashion can be either <a=
 href=3D#cors-same-origin>CORS-same-origin</a> or
+      <a href=3D#cors-cross-origin>CORS-cross-origin</a>. Th=
is only affects how error reporting happens.</p>
+
+      <p>For historical reasons, if the <a href=3D#url>URL&l=
t;/a> is a <a href=3D#javascript-protocol title=3D"javascript
+      protocol"><code title=3D"">javascript:<=
/code> URL</a>, then the user agent must not, despite
+      the requirements in the definition of the <a href=3D#fetch titl=
e=3Dfetch>fetching</a> algorithm,
+      actually execute the script in the URL; instead the user agent mus=
t act as if it had received
+      an empty HTTP 400 response.</p>
+
+      <p>For performance reasons, user agents may start fetching t=
he script (as defined above) as
+      soon as the <code title=3Dattr-script-src><a href=3D#attr=
-script-src>src</a></code> attribute is set, instead, in t=
he hope
+      that the element will be inserted into the document (and that the =
<code title=3Dattr-script-crossorigin><a href=3D#attr-script-cro=
ssorigin>crossorigin</a></code> attribute won't change val=
ue in the
+      meantime). Either way, once the element is <a href=3D#insert-an=
-element-into-a-document title=3D"insert an element into a
+      document">inserted into the document</a>, the load m=
ust have started as described in this
+      step. If the UA performs such prefetching, but the element is neve=
r inserted in the document,
+      or the <code title=3Dattr-script-src><a href=3D#attr-scri=
pt-src>src</a></code> attribute is dynamically changed,&lt=
;!-- or the
+      base URL is dynamically changed,--> or the <code title=3Datt=
r-script-crossorigin><a href=3D#attr-script-crossorigin>crossori=
gin</a></code> attribute is dynamically changed, then the
+      user agent will not execute the script so obtained, and the fetchi=
ng process will have been
+      effectively wasted.</p>
+
+     </li>
+
+    </ol></li>
+
+   <!-- at this point if the element is "parser-inserted" t=
hen we know it is not "force-async". -->
+
+   <li>
+
+    <p>Then, the first of the following options that describes the=
 situation must be followed:</p>
+
+    <dl class=3Dswitch><dt id=3Dscript-processing-defer>If t=
he element has a <code title=3Dattr-script-src><a href=3D#attr-s=
cript-src>src</a></code>
+     attribute, and the element has a <code title=3Dattr-script-defer=
><a href=3D#attr-script-defer>defer</a></code> attri=
bute, and
+     the element has been flagged as <a href=3D#parser-inserted>&q=
uot;parser-inserted"</a>, and the element does not have
+     an <code title=3Dattr-script-async><a href=3D#attr-script-=
async>async</a></code> attribute</dt>
+
+     <dd>
+
+      <p>The element must be added to the end of the <dfn id=3D=
list-of-scripts-that-will-execute-when-the-document-has-finished-parsing&=
gt;list of scripts that will execute when the
+      document has finished parsing</dfn> associated with the <=
code><a href=3D#document>Document</a></code> of the =
parser
+      that created the element.</p>
+
+      <p>The <a href=3D#concept-task title=3Dconcept-task>ta=
sk</a> that the <a href=3D#networking-task-source>networking =
task source</a>
+      places on the <a href=3D#task-queue>task queue</a> onc=
e the <a href=3D#fetch title=3Dfetch>fetching algorithm</a>
+      has completed must set the element's <a href=3D#ready-to-be-par=
ser-executed>"ready to be parser-executed"</a> flag. T=
he
+      parser will handle executing the script.</p>
+
+     </dd>
+
+
+     <dt id=3Dscript-processing-parser-inserted>If the element has=
 a <code title=3Dattr-script-src><a href=3D#attr-script-src>s=
rc</a></code> attribute, and the element has been flagged as
+     <a href=3D#parser-inserted>"parser-inserted"</a&=
gt;, and the element does not have an <code title=3Dattr-script-async&=
gt;<a href=3D#attr-script-async>async</a></code> attrib=
ute</dt>
+
+     <dd>
+
+      <p>The element is the <a href=3D#pending-parsing-blocking=
-script>pending parsing-blocking script</a> of the
+      <code><a href=3D#document>Document</a></code&=
gt; of the parser that created the element. (There can only be one such
+      script per <code><a href=3D#document>Document</a&gt=
;</code> at a time.)</p>
+
+      <p>The <a href=3D#concept-task title=3Dconcept-task>ta=
sk</a> that the <a href=3D#networking-task-source>networking =
task source</a>
+      places on the <a href=3D#task-queue>task queue</a> onc=
e the <a href=3D#fetch title=3Dfetch>fetching algorithm</a>
+      has completed must set the element's <a href=3D#ready-to-be-par=
ser-executed>"ready to be parser-executed"</a> flag. T=
he
+      parser will handle executing the script.</p>
+
+     </dd>
+
+
+     <dt id=3Dscript-processing-style-delayed>If the element does =
not have a <code title=3Dattr-script-src><a href=3D#attr-script-=
src>src</a></code> attribute, and the element has been fla=
gged as
+     <a href=3D#parser-inserted>"parser-inserted"</a&=
gt;, and either the parser that created the <code><a href=3D#the=
-script-element>script</a></code> is
+     an <a href=3D#xml-parser>XML parser</a> or it's an <=
a href=3D#html-parser>HTML parser</a> whose <a href=3D#script=
-nesting-level>script nesting
+     level</a> is not greater than one, and the <code><a =
href=3D#document>Document</a></code> of the <a href=3D#=
html-parser>HTML
+     parser</a> or <a href=3D#xml-parser>XML parser</a&gt=
; that created the <code><a href=3D#the-script-element>script=
</a></code> element <a href=3D#has-a-style-sheet-that-is-b=
locking-scripts>has
+     a style sheet that is blocking scripts</a></dt>
+
+     <dd>
+
+      <p>The element is the <a href=3D#pending-parsing-blocking=
-script>pending parsing-blocking script</a> of the
+      <code><a href=3D#document>Document</a></code&=
gt; of the parser that created the element. (There can only be one such
+      script per <code><a href=3D#document>Document</a&gt=
;</code> at a time.)</p>
+
+      <p>Set the element's <a href=3D#ready-to-be-parser-execut=
ed>"ready to be parser-executed"</a> flag. The parser =
will handle
+      executing the script.</p>
+
+     </dd>
+
+
+     <dt id=3Dscript-processing-src-sync>If the element has a <=
code title=3Dattr-script-src><a href=3D#attr-script-src>src</=
a></code> attribute, does not have an <code title=3Dattr-scri=
pt-async><a href=3D#attr-script-async>async</a></code&g=
t; attribute, and does not have the
+     <a href=3D#force-async>"force-async"</a> flag=
 set</dt>
+
+     <dd>
+
+      <p>The element must be added to the end of the <dfn id=3D=
list-of-scripts-that-will-execute-in-order-as-soon-as-possible>list of=
 scripts that will execute in order
+      as soon as possible</dfn> associated with the <code>&l=
t;a href=3D#document>Document</a></code> of the <code&g=
t;<a href=3D#the-script-element>script</a></code>
+      element at the time the <a href=3D#prepare-a-script>prepare =
a script</a> algorithm started.</p>
+
+      <p>The <a href=3D#concept-task title=3Dconcept-task>ta=
sk</a> that the <a href=3D#networking-task-source>networking =
task source</a>
+      places on the <a href=3D#task-queue>task queue</a> onc=
e the <a href=3D#fetch title=3Dfetch>fetching algorithm</a>
+      has completed must run the following steps:</p>
+
+      <ol><li><p>If the element is not now the first e=
lement in the <a href=3D#list-of-scripts-that-will-execute-in-order-as=
-soon-as-possible>list of scripts that will
+       execute in order as soon as possible</a> to which it was ad=
ded above, then mark the
+       element as ready but abort these steps without executing the scri=
pt yet.</li>
+
+       <li><p><i>Execution</i>: <a href=3D#ex=
ecute-the-script-block>Execute the script block</a> correspondin=
g to the first
+       script element in this <a href=3D#list-of-scripts-that-will-ex=
ecute-in-order-as-soon-as-possible>list of scripts that will execute i=
n order as soon as
+       possible</a>.</li>
+
+       <li><p>Remove the first element from this <a href=3D=
#list-of-scripts-that-will-execute-in-order-as-soon-as-possible>list o=
f scripts that will execute in order as
+       soon as possible</a>.</li>
+
+       <li><p>If this <a href=3D#list-of-scripts-that-wil=
l-execute-in-order-as-soon-as-possible>list of scripts that will execu=
te in order as soon as possible</a> is
+       still not empty and the first entry has already been marked as re=
ady, then jump back to the
+       step labeled <i>execution</i>.</li>
+
+      </ol></dd>
+
+
+     <dt id=3Dscript-processing-src>If the element has a <code =
title=3Dattr-script-src><a href=3D#attr-script-src>src</a>=
</code>
+     attribute</dt>
+
+     <dd>
+
+      <p>The element must be added to the <dfn id=3Dset-of-scri=
pts-that-will-execute-as-soon-as-possible>set of scripts that will exe=
cute as soon as
+      possible</dfn> of the <code><a href=3D#document>=
Document</a></code> of the <code><a href=3D#the-scri=
pt-element>script</a></code> element at the time the
+      <a href=3D#prepare-a-script>prepare a script</a> algor=
ithm started.</p>
+
+      <p>The <a href=3D#concept-task title=3Dconcept-task>ta=
sk</a> that the <a href=3D#networking-task-source>networking =
task source</a>
+      places on the <a href=3D#task-queue>task queue</a> onc=
e the <a href=3D#fetch title=3Dfetch>fetching algorithm</a>
+      has completed must <a href=3D#execute-the-script-block>execu=
te the script block</a> and then remove the element from the
+      <a href=3D#set-of-scripts-that-will-execute-as-soon-as-possible=
>set of scripts that will execute as soon as possible</a>.</p=
>
+
+     </dd>
+
+
+     <dt id=3Dscript-processing-inline>Otherwise</dt>
+
+     <dd>The user agent must immediately <a href=3D#execute-the=
-script-block>execute the script block</a>, even if other
+     scripts are already executing.</dd>
+
+    </dl></li>
+
+  </ol><!-- similar text in various places --><p>Fetch=
ing an external script must <a href=3D#delay-the-load-event>delay t=
he load event</a> of the element's document
+  until the <a href=3D#concept-task title=3Dconcept-task>task</=
a> that is <a href=3D#queue-a-task title=3D"queue a task"=
>queued</a>
+  by the <a href=3D#networking-task-source>networking task source&=
lt;/a> once the resource has been <a href=3D#fetch title=3Dfetch&gt=
;fetched</a> (defined above) has been run.</p>
+
+  <p>The <dfn id=3Dpending-parsing-blocking-script>pending p=
arsing-blocking script</dfn> of a <code><a href=3D#documen=
t>Document</a></code> is used by the
+  <code><a href=3D#document>Document</a></code>'=
s parser(s).</p>
+
+  <p class=3Dnote>If a <code><a href=3D#the-script-elemen=
t>script</a></code> element that blocks a parser gets move=
d to another
+  <code><a href=3D#document>Document</a></code> =
before it would normally have stopped blocking that parser, it nonetheles=
s
+  continues blocking that parser until the condition that causes it to b=
e blocking the parser no
+  longer applies (e.g. if the script is a <a href=3D#pending-parsing-=
blocking-script>pending parsing-blocking script</a> because ther=
e
+  was <a href=3D#a-style-sheet-that-is-blocking-scripts>a style sh=
eet that is blocking scripts</a> when it was parsed, but then the s=
cript is
+  moved to another <code><a href=3D#document>Document</a&=
gt;</code> before the style sheet loads, the script still blocks th=
e
+  parser until the style sheets are all loaded, at which time the script=
 executes and the parser is
+  unblocked).</p>
+
+  <!-- also (and this would be worth testing): the way the spec is wr=
itten, if you do not have a
+  style sheet that is blocking scripts, then you parse a <script src&=
gt;, then while waiting for the
+  script to load you insert an external style sheet, the script will del=
ay until the sheet is
+  loaded, because there's just a binary "are style sheets blocking =
scripts" state, things aren't
+  defined in terms of which style sheets are blocking which scripts --&g=
t;
+
+  <p>When the user agent is required to <dfn id=3Dexecute-the-s=
cript-block title=3D"execute the script block">execute a scr=
ipt
+  block</dfn>, it must run the following steps:</p>
+
+  <ol><li>
+
+    <p>If the element is flagged as <a href=3D#parser-inserted&=
gt;"parser-inserted"</a>, but the element's
+    <code><a href=3D#document>Document</a></code&gt=
; is not the <code><a href=3D#document>Document</a><=
/code> of the parser that created the element,
+    then abort these steps.</p>
+
+   </li>
+
+   <li>
+
+    <p>Jump to the appropriate set of steps from the list below:&l=
t;/p>
+
+    <dl class=3Dswitch><dt>If the load resulted in an error =
(for example a DNS error, or an HTTP 404 error)</dt>
+
+     <dd><p>Executing the script block must just consist of =
<a href=3D#fire-a-simple-event title=3D"fire a simple event"=
>firing
+     a simple event</a> named <code title=3Devent-error>erro=
r</code> at the element.</dd>
+
+     <dt>If the load was successful</dt>
+
+     <!-- SCRIPT EXEC -->
+     <dd>
+
+      <p>Executing the script block must consist of running the fo=
llowing steps. For the purposes of
+      these steps, the script is considered to be from an <i>exter=
nal file</i> if, while the
+      <a href=3D#prepare-a-script>prepare a script</a> algor=
ithm above was running for this script, the
+      <code><a href=3D#the-script-element>script</a>&l=
t;/code> element had a <code title=3Dattr-script-src><a href=3D=
#attr-script-src>src</a></code> attribute
+      specified.</p>
+
+      <ol><li id=3Destablish-script-block-source>
+
+        <p>Initialize <dfn id=3D"the-script-block's-source=
"><var>the script block's source</var></dfn> as=
 follows:</p>
+
+        <dl class=3Dswitch><dt>If the script is from an exte=
rnal file and <var><a href=3D"#the-script-block's-type&quot=
;>the script block's type</a></var> is a
+         text-based language</dt>
+
+         <dd>
+
+          <p>The contents of that file, interpreted as a Unicode s=
tring, are the script source.</p>
+
+          <p>To obtain the Unicode string, the user agent run the =
following steps:</p>
+
+          <ol><li><p>If the resource's <a href=3D#c=
ontent-type title=3DContent-Type>Content Type metadata</a>, if a=
ny,
+           specifies a character encoding, and the user agent supports t=
hat encoding, then let <var title=3D"">character encoding=
</var> be that encoding, and jump to the bottom step in this
+           series of steps.</li>
+
+           <li><p>If the algorithm above set <var><=
a href=3D"#the-script-block's-character-encoding">the script=
 block's character encoding</a></var>, then
+           let <var title=3D"">character encoding</va=
r> be that encoding, and jump to the bottom step
+           in this series of steps.</li>
+
+           <li><p>Let <var title=3D"">charac=
ter encoding</var> be <var><a href=3D"#the-script-blo=
ck's-fallback-character-encoding">the script block's fallback
+           character encoding</a></var>.</li>
+
+           <li>
+
+            <p>If the specification for <var><a href=3D&q=
uot;#the-script-block's-type">the script block's type</a>&l=
t;/var> gives specific rules for
+            decoding files in that format to Unicode, follow them, using=
 <var>character
+            encoding</var> as the character encoding specified by =
higher-level protocols, if
+            necessary.</p> <!-- e.g. XML -->
+
+            <p>Otherwise, <a href=3D#decode>decode</a>=
 the file to Unicode, using <var>character
+            encoding</var> as the fallback encoding.</p>
+
+            <p class=3Dnote>The <a href=3D#decode>decode<=
/a> algorithm overrides <var>character
+            encoding</var> if the file contains a BOM.</p>
+
+           </li>
+
+          </ol></dd>
+
+         <dt>If the script is from an external file and <var&gt=
;<a href=3D"#the-script-block's-type">the script block's =
type</a></var> is an
+         XML-based language</dt>
+
+         <dd>
+
+          <p>The external file is the script source. When it is la=
ter executed, it must be
+          interpreted in a manner consistent with the specification defi=
ning the language given by
+          <var><a href=3D"#the-script-block's-type"&g=
t;the script block's type</a></var>.</p>
+
+         </dd>
+
+         <dt>If the script is inline and <var><a href=3D&=
quot;#the-script-block's-type">the script block's type</a>&=
lt;/var> is a text-based
+         language</dt>
+
+         <dd>
+
+          <p>The value of the <code title=3Ddom-script-text>=
<a href=3D#dom-script-text>text</a></code> IDL attribut=
e at the time
+          the element's <a href=3D#already-started>"already s=
tarted"</a> flag was last set is the script source.</p>
+
+         </dd>
+
+         <dt>If the script is inline and <var><a href=3D&=
quot;#the-script-block's-type">the script block's type</a>&=
lt;/var> is an XML-based
+         language</dt>
+
+         <dd>
+
+          <p>The child nodes of the <code><a href=3D#the-=
script-element>script</a></code> element at the time the e=
lement's
+          <a href=3D#already-started>"already started"&l=
t;/a> flag was last set are the script source.</p>
+
+         </dd>
+
+        </dl></li>
+
+       <li>
+
+        <p><a href=3D#fire-a-simple-event>Fire a simple even=
t</a> named <code title=3Devent-beforescriptexecute>beforescr=
iptexecute</code> that bubbles and is cancelable
+        at the <code><a href=3D#the-script-element>script&lt=
;/a></code> element.</p>
+
+        <p>If the event is canceled, then abort these steps.</p=
>
+
+       </li>
+
+       <li>
+
+        <p>If the script is from an external file, then increment =
the
+        <a href=3D#ignore-destructive-writes-counter>ignore-destru=
ctive-writes counter</a> of the <code><a href=3D#the-scrip=
t-element>script</a></code> element's
+        <code><a href=3D#document>Document</a></cod=
e>. Let <var title=3D"">neutralized doc</var> be=
 that
+        <code><a href=3D#document>Document</a></cod=
e>.</p>
+
+       </li>
+
+       <li>
+
+<!--CLEANUP-->
+        <p>Let <var title=3D"">old script element&=
lt;/var> be the value to which the
+        <code><a href=3D#the-script-element>script</a>=
</code> element's <code><a href=3D#document>Document&lt=
;/a></code>'s <code title=3Ddom-document-currentScript>&lt=
;a href=3D#dom-document-currentscript>currentScript</a></code=
> object was most recently
+        initialized.</p>
+
+       </li>
+
+       <li>
+
+<!--CLEANUP-->
+        <p>Initialize the <code><a href=3D#the-script-ele=
ment>script</a></code> element's <code><a href=3D=
#document>Document</a></code>'s <code title=3Ddom-docum=
ent-currentScript><a href=3D#dom-document-currentscript>currentS=
cript</a></code> object to the <code><a href=3D#the-=
script-element>script</a></code>
+        element.</p>
+
+       </li>
+
+       <li>
+
+<!--CLEANUP-->
+        <p><a href=3D#create-a-script>Create a script</a&=
gt;, using <var><a href=3D"#the-script-block's-source"=
>the script block's source</a></var>, the
+        <a href=3D#url>URL</a> from which the script was obt=
ained, <var><a href=3D"#the-script-block's-type">th=
e script block's
+        type</a></var> as the scripting language, and the &l=
t;a href=3D#script-settings-object>script settings object</a> of=
 the <code><a href=3D#the-script-element>script</a><=
/code> element's
+        <code><a href=3D#document>Document</a></cod=
e>'s <code><a href=3D#window>Window</a></code>=
 object.</p>
+
+<!--CLEANUP-->
+        <p>If the script came from a resource that was <a href=3D=
#fetch title=3Dfetch>fetched</a> in the
+        steps above, and the resource was <a href=3D#cors-cross-origi=
n>CORS-cross-origin</a>, then pass the <var title=3D"&qu=
ot;>muted errors</var> flag to the <a href=3D#create-a-script=
>create a script</a>
+        algorithm as well.</p>
+
+        <p class=3Dnote>This is where the script is compiled and a=
ctually executed.</p>
+
+       </li>
+
+       <li>
+
+<!--CLEANUP-->
+        <p>Initialize the <code><a href=3D#the-script-ele=
ment>script</a></code> element's <code><a href=3D=
#document>Document</a></code>'s <code title=3Ddom-docum=
ent-currentScript><a href=3D#dom-document-currentscript>currentS=
cript</a></code> object to <var title=3D"">ol=
d script
+        element</var>.</p>
+
+       </li>
+
+       <li>
+
+        <p>Decrement the <a href=3D#ignore-destructive-writes-c=
ounter>ignore-destructive-writes counter</a> of <var title=3D=
"">neutralized
+        doc</var>, if it was incremented in the earlier step.</=
p>
+
+       </li>
+
+       <li>
+
+        <p><a href=3D#fire-a-simple-event>Fire a simple even=
t</a> named <code title=3Devent-afterscriptexecute>afterscrip=
texecute</code> that bubbles (but is not
+        cancelable) at the <code><a href=3D#the-script-element&=
gt;script</a></code> element.</p>
+
+       </li>
+
+       <li>
+
+        <p>If the script is from an external file, <a href=3D#f=
ire-a-simple-event>fire a simple event</a> named <code title=3D=
event-load>load</code> at the <code><a href=3D#the-scri=
pt-element>script</a></code> element.</p>
+
+        <p>Otherwise, the script is internal; <a href=3D#queue-=
a-task>queue a task</a> to <a href=3D#fire-a-simple-event>=
fire a simple
+        event</a> named <code title=3Devent-load>load</co=
de> at the <code><a href=3D#the-script-element>script</=
a></code>
+        element.</p>
+
+       </li>
+
+      </ol></dd>
+
+    </dl></li>
+
+  </ol><p>The IDL attributes <dfn id=3Ddom-script-src tit=
le=3Ddom-script-src><code>src</code></dfn>, <dfn =
id=3Ddom-script-type title=3Ddom-script-type><code>type</code=
></dfn>, <dfn id=3Ddom-script-charset title=3Ddom-script-char=
set><code>charset</code></dfn>, <dfn id=3Ddom-scr=
ipt-defer title=3Ddom-script-defer><code>defer</code></=
dfn>, each must <a href=3D#reflect>reflect</a> the respect=
ive
+  content attributes of the same name.</p>
+
+  <p>The <dfn id=3Ddom-script-crossorigin title=3Ddom-script-cr=
ossOrigin><code>crossOrigin</code></dfn> IDL attribu=
te must
+  <a href=3D#reflect>reflect</a> the <code title=3Dattr-s=
cript-crossorigin><a href=3D#attr-script-crossorigin>crossorigin=
</a></code> content
+  attribute, <a href=3D#limited-to-only-known-values>limited to on=
ly known values</a>.</p>
+
+  <p>The <dfn id=3Ddom-script-async title=3Ddom-script-async&gt=
;<code>async</code></dfn> IDL attribute controls whethe=
r the
+  element will execute asynchronously or not. If the element's <a hre=
f=3D#force-async>"force-async"</a> flag is
+  set, then, on getting, the <code title=3Ddom-script-async><a =
href=3D#dom-script-async>async</a></code> IDL attribute mu=
st return
+  true, and on setting, the <a href=3D#force-async>"force-asy=
nc"</a> flag must first be unset, and then the
+  content attribute must be removed if the IDL attribute's new value is =
false, and must be set to
+  the empty string if the IDL attribute's new value is true. If the elem=
ent's
+  <a href=3D#force-async>"force-async"</a> flag is=
 <em>not</em> set, the IDL attribute must <a href=3D#refle=
ct>reflect</a>
+  the <code title=3Dattr-script-async><a href=3D#attr-script-as=
ync>async</a></code> content attribute.</p>
+
+  </div>
+
+<!--TOPIC:DOM APIs-->
+  <dl class=3Ddomintro><dt><var title=3D"">s=
cript</var> . <code title=3Ddom-script-text><a href=3D#dom=
-script-text>text</a></code> [ =3D <var title=3D"&=
quot;>value</var> ]</dt>
+
+   <dd>
+
+    <p>Returns the contents of the element, ignoring child nodes t=
hat aren't <code><a href=3D#text>Text</a></code>
+    nodes.</p>
+
+    <p>Can be set, to replace the element's children with the give=
n value.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>The IDL attribute <dfn id=3Ddom-script-text title=3Ddom-sc=
ript-text><code>text</code></dfn> must return a
+  concatenation of the contents of all the <code><a href=3D#tex=
t>Text</a></code> nodes that are children of the
+  <code><a href=3D#the-script-element>script</a></c=
ode> element (ignoring any other nodes such as comments or elements), =
in tree
+  order. On setting, it must act the same way as the <code><a h=
ref=3D#textcontent>textContent</a></code> IDL attribute.&l=
t;/p>
+
+  </div>
+<!--TOPIC:HTML-->
+
+  <p class=3Dnote>When inserted using the <code title=3Ddom-doc=
ument-write><a href=3D#dom-document-write>document.write()</a=
></code>
+  method, <code><a href=3D#the-script-element>script</a&g=
t;</code> elements execute (typically synchronously), but when inse=
rted using
+  <code title=3Ddom-innerHTML><a href=3D#dom-innerhtml>inner=
HTML</a></code> and <code title=3Ddom-outerHTML><a h=
ref=3D#dom-outerhtml>outerHTML</a></code>
+  attributes, they do not execute at all.</p>
+
+  <div class=3Dexample>
+
+   <p>In this example, two <code><a href=3D#the-script-el=
ement>script</a></code> elements are used. One embeds an e=
xternal script, and
+   the other includes some data.</p>
+
+   <pre><script src=3D"game-engine.js">&am=
p;lt;/script>
+<script type=3D"text/x-game-map">
+........U.........e
+o............A....e
+.....A.....AAA....e
+.A..AAA...AAAAA...e
+</script></pre>
+
+   <p>The data in this case might be used by the script to generat=
e the map of a video game. The
+   data doesn't have to be used that way, though; maybe the map data is =
actually embedded in other
+   parts of the page's markup, and the data block here is just used by t=
he site's search engine to
+   help users who are looking for particular features in their game maps=
.</p>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>The following sample shows how a script element can be used =
to define a function that is then
+   used by other parts of the document. It also shows how a <code>=
<a href=3D#the-script-element>script</a></code> element=
 can be used
+   to invoke script while the document is being parsed, in this case to =
initialize the form's
+   output.</p>
+
+   <pre><script>
+ function calculate(form) {
+   var price =3D 52000;
+   if (form.elements.brakes.checked)
+     price +=3D 1000;
+   if (form.elements.radio.checked)
+     price +=3D 2500;
+   if (form.elements.turbo.checked)
+     price +=3D 5000;
+   if (form.elements.sticker.checked)
+     price +=3D 250;
+   form.elements.result.value =3D price;
+ }
+</script>
+<form name=3D"pricecalc" onsubmit=3D"return false&=
quot; onchange=3D"calculate(this)">
+ <fieldset>
+  <legend>Work out the price of your car</legend&am=
p;gt;
+  <p>Base cost: £52000.</p>
+  <p>Select additional options:</p>
+  <ul>
+   <li><label><input type=3Dcheckbox =
name=3Dbrakes> Ceramic brakes (£1000)</label&=
gt;</li>
+   <li><label><input type=3Dcheckbox =
name=3Dradio> Satellite radio (£2500)</label&=
gt;</li>
+   <li><label><input type=3Dcheckbox =
name=3Dturbo> Turbo charger (£5000)</label&gt=
;</li>
+   <li><label><input type=3Dcheckbox =
name=3Dsticker> "XZ" sticker (£250)</la=
bel></li>
+  </ul>
+  <p>Total: £<output name=3Dresult&gt=
;</output></p>
+ </fieldset>
+ <script>
+  calculate(document.forms.pricecalc);
+ </script>
+</form></pre>
+
+  </div>
+
+
+
+  <h5 id=3DscriptingLanguages><span class=3Dsecno>4.12.1.1 &=
lt;/span>Scripting languages</h5>
+
+  <div class=3Dimpl>
+
+  <p>A user agent is said to <dfn id=3Dsupport-the-scripting-la=
nguage>support the scripting language</dfn> if each component of=
 <var><a href=3D"#the-script-block's-type">the
+  script block's type</a></var> is an <a href=3D#ascii-ca=
se-insensitive>ASCII case-insensitive</a> match for the correspo=
nding
+  component in the <a href=3D#mime-type>MIME type</a> string=
 of a scripting language that the user agent
+  implements.</p>
+
+  </div>
+
+  <p>The following lists the <a href=3D#mime-type>MIME type&=
lt;/a> strings that user agents must recognize, and the
+  languages to which they refer:</p>
+
+  <dl><dt>"<code>application/ecmascript</code&=
gt;"</dt>
+   <dt>"<code>application/javascript</code>"=
</dt>
+   <dt>"<code>application/x-ecmascript</code>&quo=
t;</dt>
+   <dt>"<code>application/x-javascript</code>&quo=
t;</dt>
+   <dt>"<code>text/ecmascript</code>"</dt=
>
+   <dt>"<code>text/javascript</code>"</dt=
>
+   <dt>"<code>text/javascript1.0</code>"<=
/dt>
+   <dt>"<code>text/javascript1.1</code>"<=
/dt>
+   <dt>"<code>text/javascript1.2</code>"<=
/dt>
+   <dt>"<code>text/javascript1.3</code>"<=
/dt>
+   <dt>"<code>text/javascript1.4</code>"<=
/dt>
+   <dt>"<code>text/javascript1.5</code>"<=
/dt>
+   <dt>"<code>text/jscript</code>"</dt&gt=
;
+   <dt>"<code>text/livescript</code>"</dt=
>
+   <dt>"<code>text/x-ecmascript</code>"</=
dt>
+   <dt>"<code>text/x-javascript</code>"</=
dt>
+   <dd>JavaScript. <a href=3D#refsECMA262>[ECMA262]</a&gt=
;</dd>
+
+<!--(historical footnote)
+   <dt>"<code>text/javascript;e4x=3D1</code>&quot=
;</dt>
+   <dd>JavaScript with ECMAScript for XML. <a href=3D"#ref=
sECMA357">[ECMA357]</a></dd>
+-->
+
+  </dl><div class=3Dimpl>
+
+  <p>User agents may support other <a href=3D#mime-type title=3D=
"MIME type">MIME types</a> for other languages,
+  but must not support other <a href=3D#mime-type title=3D"MIME =
type">MIME types</a> for the languages in the list
+  above. User agents are not required to support the languages listed ab=
ove.</p>
+
+  <p>The following <a href=3D#mime-type title=3D"MIME type=
">MIME types</a> (with or without parameters) must not
+  be interpreted as scripting languages:</p>
+
+  <ul class=3Dbrief><li>"<code>text/plain</cod=
e>"
+   <li>"<code>text/xml</code>"
+   <!--<li>"<code>text/html</code>"-->
+   <li>"<code>application/octet-stream</code>&quo=
t;
+   <li>"<code>application/xml</code>"
+   <!--<li>"<code>application/xhtml+xml</code>=
"-->
+   <!--<li>"<code>image/svg+xml</code>"--=
>
+
+   <!-- the commented-out ones aren't listed here because they couldn=
't sanely be interpreted as a
+   scripting language anyway: they're defined to be something else. I ju=
st don't want this to
+   devolve into a list of every non-scripting type in existence. -->
+
+  </ul><p class=3Dnote>These types are explicitly listed her=
e because they are poorly-defined types that
+  are nonetheless likely to be used as formats for data blocks, and it w=
ould be problematic if they
+  were suddenly to be interpreted as script by a user agent.</p>
+
+  <!-- a similar paragraph is also present in the <style> secti=
on -->
+
+  <p>When examining types to determine if they represent supported=
 languages, user agents must not
+  ignore MIME parameters. Types are to be compared including all paramet=
ers.</p> <!-- whether the
+  order of parameters matters is left undefined until such time as it ma=
tters; so far the only
+  relevant parameter was 'e4x', and it's gone for now -->
+
+  <p class=3Dnote>For example, types that include the <code tit=
le=3D"">charset</code> parameter will
+  not be recognized as referencing any of the scripting languages listed=
 above.</p>
+
+  </div>
+
+
+  <h5 id=3Drestrictions-for-contents-of-script-elements><span c=
lass=3Dsecno>4.12.1.2 </span><dfn title=3D"script conten=
t restrictions">Restrictions for contents of <code>script&l=
t;/code> elements</dfn></h5>
+
+  <p class=3Dnote>The easiest and safest way to avoid the rather s=
trange restrictions described in
+  this section is to always escape "<code title=3D""&g=
t;<!--</code>" as "<code title=3D""&g=
t;<\!--</code>", "<code title=3D""&gt=
;<script</code>" as "<code title=3D""=
><\script</code>", and "<code title=3D"=
"></script</code>" as "<code title=3D&q=
uot;"><\/script</code>" when these sequences ap=
pear in scripts (e.g. in strings or in
+  comments). Doing so avoids the pitfalls that the restrictions in this =
section are prone to
+  triggering: namely, that, for historical reasons, parsing of <code&=
gt;<a href=3D#the-script-element>script</a></code> bloc=
ks in HTML is
+  a strange and exotic practice that acts unintuitively in the face of t=
hese strings.</p>
+
+  <p>The <code><a href=3D#textcontent>textContent</=
a></code> of a <code><a href=3D#the-script-element>s=
cript</a></code> element must match the <code title=3D&quo=
t;">script</code> production in the following ABNF, the cha=
racter set for which is Unicode.
+  <a href=3D#refsABNF>[ABNF]</a></p>
+
+  <pre>script        =3D data1 *( escape [ script-start data3 ] &q=
uot;-->" data1 ) [ escape ]
+escape        =3D "<!--" data2 *( script-start data3 sc=
ript-end data2 )
+
+data1         =3D < any string that doesn't contain a substring t=
hat matches not-data1 >
+not-data1     =3D <!-- script-end / -->"<!--"    =
         <!-- the script-end is redundant here since it would close th=
e element -->
+
+data2         =3D < any string that doesn't contain a substring t=
hat matches not-data2 >
+not-data2     =3D <!-- script-end / -->script-start / "--&amp=
;gt;"  <!-- the script-end is redundant here since it would close=
 the element -->
+
+data3         =3D < any string that doesn't contain a substring t=
hat matches not-data3 >
+not-data3     =3D script-end / "-->"
+
+script-start  =3D lt       s c r i p t tag-end
+script-end    =3D lt slash s c r i p t tag-end
+
+lt            =3D  %x003C ; U+003C LESS-THAN SIGN character (<)
+slash         =3D  %x002F ; U+002F SOLIDUS character (/)
+
+s             =3D  %x0053 ; U+0053 LATIN CAPITAL LETTER S
+s             =3D/ %x0073 ; U+0073 LATIN SMALL LETTER S
+c             =3D  %x0043 ; U+0043 LATIN CAPITAL LETTER C
+c             =3D/ %x0063 ; U+0063 LATIN SMALL LETTER C
+r             =3D  %x0052 ; U+0052 LATIN CAPITAL LETTER R
+r             =3D/ %x0072 ; U+0072 LATIN SMALL LETTER R
+i             =3D  %x0049 ; U+0049 LATIN CAPITAL LETTER I
+i             =3D/ %x0069 ; U+0069 LATIN SMALL LETTER I
+p             =3D  %x0050 ; U+0050 LATIN CAPITAL LETTER P
+p             =3D/ %x0070 ; U+0070 LATIN SMALL LETTER P
+t             =3D  %x0054 ; U+0054 LATIN CAPITAL LETTER T
+t             =3D/ %x0074 ; U+0074 LATIN SMALL LETTER T
+
+tag-end       =3D  %x0009 ; U+0009 CHARACTER TABULATION (tab)
+tag-end       =3D/ %x000A ; U+000A LINE FEED (LF)
+tag-end       =3D/ %x000C ; U+000C FORM FEED (FF)
+tag-end       =3D/ %x0020 ; U+0020 SPACE
+tag-end       =3D/ %x002F ; U+002F SOLIDUS (/)
+tag-end       =3D/ %x003E ; U+003E GREATER-THAN SIGN (>)</pre&=
gt;
+
+  <p>When a <code><a href=3D#the-script-element>script=
</a></code> element contains <a href=3D#inline-documentati=
on-for-external-scripts>script documentation</a>, there are
+  further restrictions on the contents of the element, as described in t=
he section below.</p>
+
+  <div class=3Dexample>
+
+   <p>The following script illustrates this issue. Suppose you hav=
e a script that contains a string,
+   as in:</p>
+
+   <pre>var example =3D 'Consider this string: <!-- &lt=
;script>';
+console.log(example);</pre>
+
+   <p>If one were to put this string directly in a <code>&lt=
;a href=3D#the-script-element>script</a></code> block, it =
would violate the
+   restrictions above:</p>
+
+   <pre><script>
+  var example =3D 'Consider this string: <!-- <script&=
gt;';
+  console.log(example);
+</script></pre>
+
+   <p>The bigger problem, though, and the reason why it would viol=
ate those restrictions, is that
+   actually the script would get parsed weirdly: <em>the script bl=
ock above is not terminated</em>.
+   That is, what looks like a "<code title=3D"">&am=
p;lt;/script></code>" end tag in this snippet is
+   actually still part of the <code><a href=3D#the-script-eleme=
nt>script</a></code> block. The script doesn't execute (si=
nce it's not
+   terminated); if it somehow were to execute, as it might if the markup=
 looked as follows, it would
+   fail because the script (highlighted here) is not valid JavaScript:&l=
t;/p>
+
+   <pre><script><mark>
+  var example =3D 'Consider this string: <!-- <script&=
gt;';
+  console.log(example);
+</script>
+<!-- despite appearances, this is actually part of the script sti=
ll! -->
+<script>
+ ... // this is the same script block still...
+</mark></script></pre>
+
+   <p>What is going on here is that for legacy reasons, "<=
code title=3D""><!--</code>" and "&lt=
;code title=3D""><script</code>" strings i=
n <code><a href=3D#the-script-element>script</a></co=
de> elements in HTML need to be balanced
+   in order for the parser to consider closing the block.</p>
+
+   <p>By escaping the problematic strings as mentioned at the top =
of this section, the problem is
+   avoided entirely:</p>
+
+   <pre><script><mark>
+  var example =3D 'Consider this string: <\!-- <\script&am=
p;gt;';
+  console.log(example);
+</mark></script>
+<!-- this is just a comment between script blocks -->
+<script><mark>
+ ... // this is a new script block
+</mark></script></pre>
+
+  </div>
+
+
+  <h5 id=3Dinline-documentation-for-external-scripts><span clas=
s=3Dsecno>4.12.1.3 </span><dfn title=3D"script documenta=
tion">Inline documentation for external scripts</dfn></h=
5>
+
+  <p>If a <code><a href=3D#the-script-element>script&l=
t;/a></code> element's <code title=3Dattr-script-src><a=
 href=3D#attr-script-src>src</a></code> attribute is
+  specified, then the contents of the <code><a href=3D#the-scri=
pt-element>script</a></code> element, if any, must be such=
 that the
+  value of the <code title=3Ddom-script-text><a href=3D#dom-scr=
ipt-text>text</a></code> IDL attribute, which is derived f=
rom the
+  element's contents, matches the <code title=3D"">docum=
entation</code> production in the following
+  ABNF, the character set for which is Unicode. <a href=3D#refsABNF&g=
t;[ABNF]</a></p>
+
+  <pre>documentation =3D *( *( space / tab / comment ) [ line-comm=
ent ] newline )
+comment       =3D slash star *( not-star / star not-slash ) 1*star slash
+line-comment  =3D slash slash *not-newline
+
+; characters
+tab           =3D %x0009 ; U+0009 CHARACTER TABULATION (tab)
+newline       =3D %x000A ; U+000A LINE FEED (LF)
+space         =3D %x0020 ; U+0020 SPACE
+star          =3D %x002A ; U+002A ASTERISK (*)
+slash         =3D %x002F ; U+002F SOLIDUS (/)
+not-newline   =3D %x0000-0009 / %x000B-10FFFF
+                ; a <a href=3D#unicode-character>Unicode character=
</a> other than U+000A LINE FEED (LF)
+not-star      =3D %x0000-0029 / %x002B-10FFFF
+                ; a <a href=3D#unicode-character>Unicode character=
</a> other than U+002A ASTERISK (*)
+not-slash     =3D %x0000-002E / %x0030-10FFFF
+                ; a <a href=3D#unicode-character>Unicode character=
</a> other than U+002F SOLIDUS (/)</pre>
+
+  <p class=3Dnote>This corresponds to putting the contents of the =
element in JavaScript
+  comments.</p>
+
+  <p class=3Dnote>This requirement is in addition to the earlier r=
estrictions on the syntax of
+  contents of <code><a href=3D#the-script-element>script<=
/a></code> elements.</p>
+
+  <div class=3Dexample>
+
+   <p>This allows authors to include documentation, such as licens=
e information or API information,
+   inside their documents while still referring to external script files=
. The syntax is constrained
+   so that authors don't accidentally include what looks like valid scri=
pt while also providing a
+   <code title=3Dattr-script-src><a href=3D#attr-script-src>=
src</a></code> attribute.</p>
+
+   <pre><script src=3D"cool-effects.js">
+ // create new instances using:
+ //    var e =3D new Effect();
+ // start the effect using .play, stop using .stop:
+ //    e.play();
+ //    e.stop();
+</script></pre>
+
+  </div>
+
+
+  <div class=3Dimpl>
+
+  <h5 id=3DscriptTagXSLT><span class=3Dsecno>4.12.1.4 </s=
pan>Interaction of <code><a href=3D#the-script-element>scr=
ipt</a></code> elements and XSLT</h5>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <p>This specification does not define how XSLT interacts with th=
e <code><a href=3D#the-script-element>script</a></co=
de> element.
+  However, in the absence of another specification actually defining thi=
s, here are some guidelines
+  for implementors, based on existing implementations:</p>
+
+  <ul><li><p>When an XSLT transformation program is tr=
iggered by an <code title=3D""><?xml-stylesheet?&a=
mp;gt;</code> processing instruction and the browser implements a
+   direct-to-DOM transformation, <code><a href=3D#the-script-el=
ement>script</a></code> elements created by the XSLT proce=
ssor need to
+   be marked <a href=3D#parser-inserted>"parser-inserted&quot=
;</a> and run in document order (modulo scripts marked <code tit=
le=3Dattr-script-defer><a href=3D#attr-script-defer>defer</a&=
gt;</code> or <code title=3Dattr-script-async><a href=3D#a=
ttr-script-async>async</a></code>),
+   asynchronously while the transformation is occurring.</li>
+
+   <li><p>The <code title=3Ddom-XSLTProcessor-transformTo=
Document>XSLTProcessor.transformToDocument()</code> method
+   adds elements to a <code><a href=3D#document>Document<=
/a></code> that is not in a <a href=3D#browsing-context>br=
owsing context</a>, and,
+   accordingly, any <code><a href=3D#the-script-element>scri=
pt</a></code> elements they create need to have their <a h=
ref=3D#already-started>"already
+   started"</a> flag set in the <a href=3D#prepare-a-scrip=
t>prepare a script</a> algorithm and never get executed
+   (<a href=3D#concept-bc-noscript title=3Dconcept-bc-noscript>scr=
ipting is disabled</a>). Such <code><a href=3D#the-script-=
element>script</a></code>
+   elements still need to be marked <a href=3D#parser-inserted>&qu=
ot;parser-inserted"</a>, though, such that their <code titl=
e=3Ddom-script-async><a href=3D#dom-script-async>async</a>=
</code> IDL attribute will return false in the absence of an <co=
de title=3Dattr-script-async><a href=3D#attr-script-async>async&=
lt;/a></code> content attribute.</li>
+
+   <li><p>The <code title=3Ddom-XSLTProcessor-transformTo=
Fragment>XSLTProcessor.transformToFragment()</code> method
+   needs to create a fragment that is equivalent to one built manually b=
y creating the elements
+   using <code title=3Ddom-document-createElementNS><a href=3D#=
dom-document-createelementns>document.createElementNS()</a></=
code>. For instance,
+   it needs to create <code><a href=3D#the-script-element>sc=
ript</a></code> elements that aren't <a href=3D#parser-ins=
erted>"parser-inserted"</a> and
+   that don't have their <a href=3D#already-started>"already =
started"</a> flag set, so that they will execute when the
+   fragment is inserted into a document.</li>
+
+  </ul><p>The main distinction between the first two cases a=
nd the last case is that the first two
+  operate on <code><a href=3D#document>Document</a>&lt=
;/code>s and the last operates on a fragment.</p>
+
+  </div>
+
+
+
+  <h4 id=3Dthe-noscript-element><span class=3Dsecno>4.12.2 &=
lt;/span>The <dfn><code>noscript</code></dfn> =
element</h4>
+
+  <dl class=3Delement><dt><a href=3D#element-dfn-categori=
es title=3Delement-dfn-categories>Categories</a>:</dt>
+   <dd><a href=3D#metadata-content>Metadata content</a&gt=
;.</dd>
+   <dd><a href=3D#flow-content>Flow content</a>.</d=
d>
+   <dd><a href=3D#phrasing-content>Phrasing content</a&gt=
;.</dd>
+   <dt><a href=3D#element-dfn-contexts title=3Delement-dfn-cont=
exts>Contexts in which this element can be used</a>:</dt>
+   <dd>In a <code><a href=3D#the-head-element>head<=
/a></code> element of an <a href=3D#html-documents title=3D&q=
uot;HTML documents">HTML document</a>, if there are no ance=
stor <code><a href=3D#the-noscript-element>noscript</a>=
</code> elements.</dd>
+   <dd>Where <a href=3D#phrasing-content>phrasing content&lt=
;/a> is expected in <a href=3D#html-documents>HTML documents<=
/a>, if there are no ancestor <code><a href=3D#the-noscript-e=
lement>noscript</a></code> elements.</dd>
+   <dt><a href=3D#element-dfn-content-model title=3Delement-dfn=
-content-model>Content model</a>:</dt>
+   <dd>When <a href=3D#concept-n-noscript title=3Dconcept-n-nos=
cript>scripting is disabled</a>, in a <code><a href=3D#=
the-head-element>head</a></code> element: in any order, ze=
ro or more <code><a href=3D#the-link-element>link</a>&l=
t;/code> elements, zero or more <code><a href=3D#the-style-el=
ement>style</a></code> elements, and zero or more <code=
><a href=3D#the-meta-element>meta</a></code> element=
s.</dd>
+   <dd>When <a href=3D#concept-n-noscript title=3Dconcept-n-nos=
cript>scripting is disabled</a>, not in a <code><a href=
=3D#the-head-element>head</a></code> element: <a href=3D=
#transparent>transparent</a>, but there must be no <code>&=
lt;a href=3D#the-noscript-element>noscript</a></code> elem=
ent descendants.</dd>
+   <dd>Otherwise: text that conforms to the requirements given in =
the prose.</dd>
+   <dt><a href=3D#element-dfn-tag-omission title=3Delement-dfn-=
tag-omission>Tag omission in text/html</a>:</dt>
+   <dd>Neither tag is omissible.</dd>
+   <dt><a href=3D#element-dfn-attributes title=3Delement-dfn-at=
tributes>Content attributes</a>:</dt>
+   <dd><a href=3D#global-attributes>Global attributes</a&=
gt;</dd>
+   <dt><a href=3D#element-dfn-dom title=3Delement-dfn-dom>DO=
M interface</a>:</dt><!--TOPIC:DOM APIs-->
+   <dd>Uses <code><a href=3D#htmlelement>HTMLElement&l=
t;/a></code>.</dd>
+  </dl><!--TOPIC:HTML--><p>The <code><a href=3D=
#the-noscript-element>noscript</a></code> element <a hr=
ef=3D#represents>represents</a> nothing if <a href=3D#concept=
-n-script title=3Dconcept-n-script>scripting is enabled</a>, and=
 <a href=3D#represents>represents</a> its children if
+  <a href=3D#concept-n-noscript title=3Dconcept-n-noscript>scripti=
ng is disabled</a>. It is used to present different
+  markup to user agents that support scripting and those that don't supp=
ort scripting, by affecting
+  how the document is parsed.</p>
+
+  <p>When used in <a href=3D#html-documents>HTML documents&l=
t;/a>, the allowed content model is as follows:</p>
+
+  <dl><dt>In a <code><a href=3D#the-head-element&gt=
;head</a></code> element, if <a href=3D#concept-n-noscript=
 title=3Dconcept-n-noscript>scripting is
+   disabled</a> for the <code><a href=3D#the-noscript-ele=
ment>noscript</a></code> element</dt>
+
+   <dd><p>The <code><a href=3D#the-noscript-element=
>noscript</a></code> element must contain only <code&gt=
;<a href=3D#the-link-element>link</a></code>, <code&=
gt;<a href=3D#the-style-element>style</a></code>,
+   and <code><a href=3D#the-meta-element>meta</a></=
code> elements.</dd>
+
+   <dt>In a <code><a href=3D#the-head-element>head<=
/a></code> element, if <a href=3D#concept-n-script title=3Dco=
ncept-n-script>scripting is enabled</a>
+   for the <code><a href=3D#the-noscript-element>noscript&lt=
;/a></code> element</dt>
+
+   <dd><p>The <code><a href=3D#the-noscript-element=
>noscript</a></code> element must contain only text, excep=
t that invoking the
+   <a href=3D#html-fragment-parsing-algorithm>HTML fragment parsin=
g algorithm</a> <!-- (which disables <script> execution) -=
-> with
+   the <code><a href=3D#the-noscript-element>noscript</a&=
gt;</code> element as the <var title=3Dconcept-frag-parse-contex=
t><a href=3D#concept-frag-parse-context>context</a></va=
r>
+   element and the text contents as the <var title=3D"">=
input</var> must result in a list of nodes
+   that consists only of <code><a href=3D#the-link-element>l=
ink</a></code>, <code><a href=3D#the-style-element&g=
t;style</a></code>, and <code><a href=3D#the-meta-el=
ement>meta</a></code> elements that
+   would be conforming if they were children of the <code><a hr=
ef=3D#the-noscript-element>noscript</a></code> element, an=
d no <a href=3D#parse-error title=3D"parse error">parse e=
rrors</a>.</dd>
+
+   <dt>Outside of <code><a href=3D#the-head-element>he=
ad</a></code> elements, if <a href=3D#concept-n-noscript t=
itle=3Dconcept-n-noscript>scripting is
+   disabled</a> for the <code><a href=3D#the-noscript-ele=
ment>noscript</a></code> element</dt>
+
+   <dd><p>The <code><a href=3D#the-noscript-element=
>noscript</a></code> element's content model is <a href=
=3D#transparent>transparent</a>, with the
+   additional restriction that a <code><a href=3D#the-noscript-=
element>noscript</a></code> element must not have a <co=
de><a href=3D#the-noscript-element>noscript</a></code&g=
t;
+   element as an ancestor (that is, <code><a href=3D#the-noscri=
pt-element>noscript</a></code> can't be nested).</dd&gt=
;
+
+   <dt>Outside of <code><a href=3D#the-head-element>he=
ad</a></code> elements, if <a href=3D#concept-n-script tit=
le=3Dconcept-n-script>scripting is
+   enabled</a> for the <code><a href=3D#the-noscript-elem=
ent>noscript</a></code> element</dt>
+
+   <dd>
+
+    <p>The <code><a href=3D#the-noscript-element>noscr=
ipt</a></code> element must contain only text, except that th=
e text must be such
+    that running the following algorithm results in a conforming documen=
t with no
+    <code><a href=3D#the-noscript-element>noscript</a>=
</code> elements and no <code><a href=3D#the-script-elemen=
t>script</a></code> elements, and such that no step in the
+    algorithm causes an <a href=3D#html-parser>HTML parser</a&g=
t; to flag a <a href=3D#parse-error>parse error</a>:</p&gt=
;
+
+    <ol><li>Remove every <code><a href=3D#the-scrip=
t-element>script</a></code> element from the document.<=
/li>
+
+     <li>Make a list of every <code><a href=3D#the-noscri=
pt-element>noscript</a></code> element in the document. Fo=
r every
+     <code><a href=3D#the-noscript-element>noscript</a&gt=
;</code> element in that list, perform the following steps:
+
+      <ol><li>Let the <var title=3D"">parent=
 element</var> be the parent element of the
+       <code><a href=3D#the-noscript-element>noscript</a&=
gt;</code> element.</li>
+
+       <li>Take all the children of the <var title=3D"&quo=
t;>parent element</var> that come before the
+       <code><a href=3D#the-noscript-element>noscript</a&=
gt;</code> element, and call these elements <var title=3D"&=
quot;>the before
+       children</var>.</li>
+
+       <li>Take all the children of the <var title=3D"&quo=
t;>parent element</var> that come <em>after</em>
+       the <code><a href=3D#the-noscript-element>noscript&lt=
;/a></code> element, and call these elements <var title=3D&qu=
ot;">the after
+       children</var>.</li>
+
+       <li>Let <var title=3D"">s</var> be th=
e concatenation of all the <code><a href=3D#text>Text</a&g=
t;</code> node children
+       of the <code><a href=3D#the-noscript-element>noscript=
</a></code> element.</li>
+
+       <li>Set the <code title=3Ddom-innerHTML><a href=3D=
#dom-innerhtml>innerHTML</a></code> attribute of the <v=
ar title=3D"">parent element</var> to the value of &lt=
;var title=3D"">s</var>. (This, as a side-effect,
+       causes the <code><a href=3D#the-noscript-element>nosc=
ript</a></code> element to be removed from the document.)<=
/li>
+
+       <li>Insert <var title=3D"">the before child=
ren</var> at the start of the <var title=3D"">paren=
t
+       element</var>, preserving their original relative order.&lt=
;/li>
+
+       <li>Insert <var title=3D"">the after childr=
en</var> at the end of the <var title=3D"">parent
+       element</var>, preserving their original relative order.&lt=
;/li>
+
+      </ol></li>
+
+    </ol></dd>
+
+  </dl><p class=3Dnote>All these contortions are required be=
cause, for historical reasons, the
+  <code><a href=3D#the-noscript-element>noscript</a>&l=
t;/code> element is handled differently by the <a href=3D#html-pars=
er>HTML parser</a> based on
+  whether <a href=3D#scripting-flag title=3D"scripting flag&quot=
;>scripting was enabled or not</a> when the parser was
+  invoked.</p>
+
+  <p>The <code><a href=3D#the-noscript-element>noscrip=
t</a></code> element must not be used in <a href=3D#xml-do=
cuments>XML documents</a>.</p>
+
+  <p class=3Dnote>The <code><a href=3D#the-noscript-eleme=
nt>noscript</a></code> element is only effective in <a =
href=3D#syntax>the HTML
+  syntax</a>, it has no effect in <a href=3D#the-xhtml-syntax&g=
t;the XHTML syntax</a>. This is because the way it works
+  is by essentially "turning off" the parser when scripts are =
enabled, so that the contents of the
+  element are treated as pure text and not as real elements. XML does no=
t define a mechanism by
+  which to do this.</p>
+
+  <div class=3Dimpl>
+
+  <p>The <code><a href=3D#the-noscript-element>noscrip=
t</a></code> element has no other requirements. In particular=
, children of the
+  <code><a href=3D#the-noscript-element>noscript</a>&l=
t;/code> element are not exempt from <a href=3D#form-submission>=
form submission</a>, scripting, and so
+  forth, even when <a href=3D#concept-n-script title=3Dconcept-n-scri=
pt>scripting is enabled</a> for the element.</p>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>In the following example, a <code><a href=3D#the-no=
script-element>noscript</a></code> element is
+   used to provide fallback for a script.</p>
+
+   <pre><form action=3D"calcSquare.php">
+ <p>
+  <label for=3Dx>Number</label>:
+  <input id=3D"x" name=3D"x" type=3D"num=
ber">
+ </p>
+ <script>
+  var x =3D document.getElementById('x');
+  var output =3D document.createElement('p');
+  output.textContent =3D 'Type a number; it will be squared right then!'=
;
+  x.form.appendChild(output);
+  x.form.onsubmit =3D function () { return false; }
+  x.oninput =3D function () {
+    var v =3D x.valueAsNumber;
+    output.textContent =3D v + ' squared is ' + v * v;
+  };
+ </script>
+ <noscript>
+  <input type=3Dsubmit value=3D"Calculate Square"&g=
t;
+ </noscript>
+</form></pre>
+
+   <p>When script is disabled, a button appears to do the calculat=
ion on the server side. When
+   script is enabled, the value is computed on-the-fly instead.</p&gt=
;
+
+   <p>The <code><a href=3D#the-noscript-element>noscri=
pt</a></code> element is a blunt instrument. Sometimes, scrip=
ts might be enabled,
+   but for some reason the page's script might fail. For this reason, it=
's generally better to avoid
+   using <code><a href=3D#the-noscript-element>noscript</=
a></code>, and to instead design the script to change the page f=
rom being a
+   scriptless page to a scripted page on the fly, as in the next example=
:</p>
+
+   <pre><form action=3D"calcSquare.php">
+ <p>
+  <label for=3Dx>Number</label>:
+  <input id=3D"x" name=3D"x" type=3D"num=
ber">
+ </p>
+ <strong><input id=3D"submit" type=3Dsubmit value=
=3D"Calculate Square"></strong>
+ <script>
+  var x =3D document.getElementById('x');
+  var output =3D document.createElement('p');
+  output.textContent =3D 'Type a number; it will be squared right then!'=
;
+  x.form.appendChild(output);
+  x.form.onsubmit =3D function () { return false; }
+  x.oninput =3D function () {
+    var v =3D x.valueAsNumber;
+    output.textContent =3D v + ' squared is ' + v * v;
+  };
+<strong>  var submit =3D document.getElementById('submit');
+  submit.parentNode.removeChild(submit);</strong>
+ </script>
+</form></pre>
+
+   <p>The above technique is also useful in XHTML, since <code&=
gt;<a href=3D#the-noscript-element>noscript</a></code> =
is not supported in
+   <a href=3D#the-xhtml-syntax>the XHTML syntax</a>.</p&g=
t;
+
+  </div>
+
+
+  <h4 id=3Dthe-template-element><span class=3Dsecno>4.12.3 &=
lt;/span>The <dfn><code>template</code></dfn> =
element</h4>
+
+  <dl class=3Delement><dt><a href=3D#element-dfn-categori=
es title=3Delement-dfn-categories>Categories</a>:</dt>
+   <dd><a href=3D#metadata-content>Metadata content</a&gt=
;.</dd>
+   <dd><a href=3D#flow-content>Flow content</a>.</d=
d>
+   <dd><a href=3D#phrasing-content>Phrasing content</a&gt=
;.</dd>
+   <dd><a href=3D#script-supporting-elements title=3D"scri=
pt-supporting elements">Script-supporting element</a>.</=
dd>
+   <dt><a href=3D#element-dfn-contexts title=3Delement-dfn-cont=
exts>Contexts in which this element can be used</a>:</dt>
+   <dd>Where <a href=3D#metadata-content>metadata content&lt=
;/a> is expected.</dd>
+   <dd>Where <a href=3D#phrasing-content>phrasing content&lt=
;/a> is expected.</dd>
+   <dd>Where <a href=3D#script-supporting-elements>script-su=
pporting elements</a> are expected.</dd>
+   <dd>As a child of a <code><a href=3D#the-colgroup-elem=
ent>colgroup</a></code> element that doesn't have a <co=
de title=3Dattr-colgroup-span><a href=3D#attr-colgroup-span>span=
</a></code> attribute.</dd>
+   <dt><a href=3D#element-dfn-content-model title=3Delement-dfn=
-content-model>Content model</a>:</dt>
+   <dd>Either: <a href=3D#metadata-content>Metadata content&=
lt;/a>.</dd>
+   <dd>Or: <a href=3D#flow-content>Flow content</a>.&l=
t;/dd>
+   <dd>Or: The content model of <code><a href=3D#the-ol-e=
lement>ol</a></code> and <code><a href=3D#the-ul-=
element>ul</a></code> elements.</dd>
+   <dd>Or: The content model of <code><a href=3D#the-dl-e=
lement>dl</a></code> elements.</dd>
+   <dd>Or: The content model of <code><a href=3D#the-figu=
re-element>figure</a></code> elements.</dd>
+   <dd>Or: The content model of <code><a href=3D#the-ruby=
-element>ruby</a></code> elements.</dd>
+   <dd>Or: The content model of <code><a href=3D#the-obje=
ct-element>object</a></code> elements.</dd>
+   <dd>Or: The content model of <code><a href=3D#the-vide=
o-element>video</a></code> and <code><a href=3D#t=
he-audio-element>audio</a></code> elements.</dd>
+   <dd>Or: The content model of <code><a href=3D#the-tabl=
e-element>table</a></code> elements.</dd>
+   <dd>Or: The content model of <code><a href=3D#the-colg=
roup-element>colgroup</a></code> elements.</dd>
+   <dd>Or: The content model of <code><a href=3D#the-thea=
d-element>thead</a></code>, <code><a href=3D#the-=
tbody-element>tbody</a></code>, and <code><a href=
=3D#the-tfoot-element>tfoot</a></code> elements.</dd&gt=
;
+   <dd>Or: The content model of <code><a href=3D#the-tr-e=
lement>tr</a></code> elements.</dd>
+   <dd>Or: The content model of <code><a href=3D#the-fiel=
dset-element>fieldset</a></code> elements.</dd>
+   <dd>Or: The content model of <code><a href=3D#the-sele=
ct-element>select</a></code> elements.</dd>
+   <dd>Or: The content model of <code><a href=3D#the-deta=
ils-element>details</a></code> elements.</dd>
+   <dd>Or: The content model of <code><a href=3D#the-menu=
-element>menu</a></code> elements whose <code title=3Da=
ttr-menu-type><a href=3D#attr-menu-type>type</a></code&=
gt; attribute is in the <a href=3D#popup-menu-state>popup menu stat=
e</a>.</dd>
+   <dt><a href=3D#element-dfn-tag-omission title=3Delement-dfn-=
tag-omission>Tag omission in text/html</a>:</dt>
+   <dd>Neither tag is omissible.</dd>
+   <dt><a href=3D#element-dfn-attributes title=3Delement-dfn-at=
tributes>Content attributes</a>:</dt>
+   <dd><a href=3D#global-attributes>Global attributes</a&=
gt;</dd>
+   <dt><a href=3D#element-dfn-dom title=3Delement-dfn-dom>DO=
M interface</a>:</dt><!--TOPIC:DOM APIs-->
+   <dd>
+<pre class=3Didl>interface <dfn id=3Dhtmltemplateelement>HTM=
LTemplateElement</dfn> : <a href=3D#htmlelement>HTMLElement&l=
t;/a> {
+  readonly attribute <a href=3D#documentfragment>DocumentFragment&=
lt;/a> <a href=3D#dom-template-content title=3Ddom-template-content=
>content</a>;
+};</pre>
+</dd>
+  </dl><!--TOPIC:HTML--><p>The <code><a href=3D=
#the-template-element>template</a></code> element is used =
to declare fragments of HTML that can be cloned and
+  inserted in the document by script.</p>
+
+  <p>In a rendering, the <code><a href=3D#the-template-el=
ement>template</a></code> element <a href=3D#represents=
>represents</a> nothing.</p>
+
+  <dl class=3Ddomintro><dt><var title=3D"">t=
emplate</var> . <code title=3Ddom-template-content><a href=
=3D#dom-template-content>content</a></code></dt>
+
+   <dd>
+
+    <p>Returns the contents of the <code><a href=3D#the-t=
emplate-element>template</a></code>, which are stored in a
+    <code><a href=3D#documentfragment>DocumentFragment</a=
></code> associated with a different <code><a href=3D#d=
ocument>Document</a></code> so as to avoid
+    the <code><a href=3D#the-template-element>template</a=
></code> contents interfering with the main <code><a hr=
ef=3D#document>Document</a></code>. (For
+    example, this avoids form controls from being submitted, scripts fro=
m executing, and so
+    forth.)</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>Each <code><a href=3D#the-template-element>templa=
te</a></code> element has an associated <code><a hre=
f=3D#documentfragment>DocumentFragment</a></code> object t=
hat
+  is its <dfn id=3Dtemplate-contents>template contents</dfn>=
. When a <code><a href=3D#the-template-element>template</a=
></code> element is created, the user
+  agent must run the following steps to establish the <a href=3D#temp=
late-contents>template contents</a>:</p>
+
+  <ol><li><p>Let <var title=3D"">doc&l=
t;/var> be the <code><a href=3D#the-template-element>templ=
ate</a></code> element's <code title=3Ddom-node-ownerdocum=
ent><a href=3D#dom-node-ownerdocument>ownerDocument</a>&lt=
;/code>.</li>
+
+   <li>
+
+    <p>If <var title=3D"">doc</var> has an a=
ssociated <a href=3D#browsing-context>browsing context</a>, r=
un these substeps:</p>
+
+    <ol><li><p>Let <var title=3D"">new=
 doc</var> be a new <code><a href=3D#document>Document&=
lt;/a></code> (that does not have a
+     <a href=3D#browsing-context>browsing context</a>).</=
li>
+
+     <li><p>If <var title=3D"">doc</var&g=
t; is an <a href=3D#html-documents title=3D"HTML documents"&=
gt;HTML document</a>, mark
+     <var title=3D"">new doc</var> as an <a hre=
f=3D#html-documents title=3D"HTML documents">HTML document&l=
t;/a>
+     also.</li>
+
+     <li><p>Set <var title=3D"">doc</var&=
gt; to <var title=3D"">new doc</var>.</li>
+
+    </ol></li>
+
+   <li><p>Create a <code><a href=3D#documentfragmen=
t>DocumentFragment</a></code> object whose <code title=3D=
dom-node-ownerdocument><a href=3D#dom-node-ownerdocument>ownerDo=
cument</a></code> is <var title=3D"">doc</=
var>.</li>
+
+   <li><p>Set the <code><a href=3D#the-template-ele=
ment>template</a></code> element's <a href=3D#template-=
contents>template contents</a> to the newly
+   created <code><a href=3D#documentfragment>DocumentFragmen=
t</a></code> object.</li>
+
+  </ol><p>The <dfn id=3Ddom-template-content title=3Ddom-=
template-content><code>content</code></dfn> IDL attr=
ibute must return the
+  <code><a href=3D#the-template-element>template</a>&l=
t;/code> element's <a href=3D#template-contents>template content=
s</a>.</p>
+
+  <hr><p>The <a href=3D#concept-node-clone-ext title=3Dco=
ncept-node-clone-ext>cloning steps</a> for a <code><a h=
ref=3D#the-template-element>template</a></code>
+  element <var title=3D"">node</var> being cloned =
to a copy <var title=3D"">copy</var> must run the
+  following steps:</p>
+
+  <ol><li><p>If the <var title=3D"">cl=
one children flag</var> is not set in the calling <a href=3D#con=
cept-node-clone title=3Dconcept-node-clone>clone</a> algorithm, =
abort these steps.</li>
+
+   <li><p>Let <var title=3D"">copied content=
s</var> be the result of <a href=3D#concept-node-clone title=3Dc=
oncept-node-clone>cloning</a> all the children of <var title=3D=
"">node</var>'s
+   <a href=3D#template-contents>template contents</a>, with =
<var title=3D"">ownerDocument</var> set to <var =
title=3D"">copy</var>'s <a href=3D#template-content=
s>template contents</a>'s <code title=3Ddom-node-ownerdocumen=
t><a href=3D#dom-node-ownerdocument>ownerDocument</a></=
code>, and with the <var title=3D"">clone children
+   flag</var> set.</li>
+
+   <li><p>Append <var title=3D"">copied cont=
ents</var> to <var title=3D"">copy</var>'s &l=
t;a href=3D#template-contents>template
+   contents</a>.</li>
+
+  </ol></div>
+
+  <div class=3Dexample>
+
+   <p>In this example, a script populates a table with data from a=
 data structure, using a
+   <code><a href=3D#the-template-element>template</a>&=
lt;/code> to provide the element structure instead of manually generat=
ing the
+   structure from markup.</p>
+
+   <pre><!DOCTYPE html>
+<title>Cat data</title>
+<script>
+ // Data is hard-coded here, but could come from the server
+ var data =3D [
+   { name: 'Pillar', color: 'Ticked Tabby', sex: 'Female (neutered)', le=
gs: 3 },
+   { name: 'Hedral', color: 'Tuxedo', sex: 'Male (neutered)', legs: 4 },
+ ];
+</script>
+<table>
+ <thead>
+  <tr>
+   <th>Name <th>Color <th>Sex =
<th>Legs
+ <tbody>
+  <template id=3D"row">
+   <tr><td><td><td&=
gt;<td>
+  </template>
+</table>
+<script>
+ var template =3D document.querySelector('#row');
+ for (var i =3D 0; i < data.length; i +=3D 1) {
+   var cat =3D data[i];
+   var clone =3D template.content.cloneNode(true);
+   var cells =3D clone.querySelectorAll('td');
+   cells[0].textContent =3D cat.name;
+   cells[1].textContent =3D cat.color;
+   cells[2].textContent =3D cat.sex;
+   cells[3].textContent =3D cat.legs;
+   template.parentNode.appendChild(clone);
+ }
+</script></pre>
+
+  </div>
+
+
+
+  <div class=3Dimpl>
+
+  <h5 id=3Dtemplate-XSLT-XPath><span class=3Dsecno>4.12.3.1 =
</span>Interaction of <code><a href=3D#the-template-elemen=
t>template</a></code> elements with XSLT and XPath</h5&=
gt;
+
+  <p><i>This section is non-normative.</i></p>
+
+  <p>This specification does not define how XSLT and XPath interac=
t with the <code><a href=3D#the-template-element>template<=
/a></code>
+  element. However, in the absence of another specification actually def=
ining this, here are some
+  guidelines for implementors, which are intended to be consistent with =
other processing described
+  in this specification:</p>
+
+  <ul><li><p>An XSLT processor based on an XML parser =
that acts <a href=3D#xml-parser title=3D"xml parser">as d=
escribed
+   in this specification</a> needs to act as if <code><a =
href=3D#the-template-element>template</a></code> elements =
contain as
+   descendants their <a href=3D#template-contents>template content=
s</a> for the purposes of the transform.</li>
+
+   <li><p>An XSLT processor that outputs a DOM needs to ensu=
re that nodes that would go into a
+   <code><a href=3D#the-template-element>template</a>&=
lt;/code> element are instead placed into the element's <a href=3D#=
template-contents>template
+   contents</a>.</li>
+
+   <li><p>XPath evaluation using the XPath DOM API when appl=
ied to a <code><a href=3D#document>Document</a></cod=
e> parsed
+   using the <a href=3D#html-parser>HTML parser</a> or the &=
lt;a href=3D#xml-parser>XML parser</a> described in this specifi=
cation
+   needs to ignore <a href=3D#template-contents>template contents&=
lt;/a>.</p>
+
+  </ul></div>
+
+
+
+<!--TOPIC:Canvas-->
+  <h4 id=3Dthe-canvas-element><span class=3Dsecno>4.12.4 &lt=
;/span>The <dfn id=3Dcanvas><code>canvas</code></=
dfn> element</h4>
+
+  <dl class=3Delement><dt><a href=3D#element-dfn-categori=
es title=3Delement-dfn-categories>Categories</a>:</dt>
+   <dd><a href=3D#flow-content>Flow content</a>.</d=
d>
+   <dd><a href=3D#phrasing-content>Phrasing content</a&gt=
;.</dd>
+   <dd><a href=3D#embedded-content>Embedded content</a&gt=
;.</dd>
+   <dd><a href=3D#palpable-content>Palpable content</a&gt=
;.</dd>
+   <dt><a href=3D#element-dfn-contexts title=3Delement-dfn-cont=
exts>Contexts in which this element can be used</a>:</dt>
+   <dd>Where <a href=3D#embedded-content>embedded content&lt=
;/a> is expected.</dd>
+   <dt><a href=3D#element-dfn-content-model title=3Delement-dfn=
-content-model>Content model</a>:</dt>
+   <dd><a href=3D#transparent>Transparent</a>, but wit=
h no <a href=3D#interactive-content>interactive content</a> d=
escendants except for <code><a href=3D#the-a-element>a</a&=
gt;</code> elements, <code><a href=3D#the-button-element&g=
t;button</a></code> elements, <code><a href=3D#the-i=
nput-element>input</a></code> elements whose <code titl=
e=3Dattr-input-type><a href=3D#attr-input-type>type</a>&lt=
;/code> attribute are in the <a href=3D"#checkbox-state-(type=3D=
checkbox)" title=3Dattr-input-type-checkbox>Checkbox</a> or=
 <a href=3D"#radio-button-state-(type=3Dradio)" title=3Dattr=
-input-type-radio>Radio Button</a> states, and <code><a=
 href=3D#the-input-element>input</a></code> elements that =
are <a href=3D#concept-button title=3Dconcept-button>buttons</a&=
gt;.</dd> <!-- and maybe <select>, I guess? I've left it o=
ur for now, since I guess authors might make accessible selects if they'r=
e simple enough, and it's not obvious how to distinguish the simple ones =
from the complex ones... -->
+   <dt><a href=3D#element-dfn-tag-omission title=3Delement-dfn-=
tag-omission>Tag omission in text/html</a>:</dt>
+   <dd>Neither tag is omissible.</dd>
+   <dt><a href=3D#element-dfn-attributes title=3Delement-dfn-at=
tributes>Content attributes</a>:</dt>
+   <dd><a href=3D#global-attributes>Global attributes</a&=
gt;</dd>
+   <dd><code title=3Dattr-canvas-width><a href=3D#attr-ca=
nvas-width>width</a></code> — Horizontal dimensi=
on</dd>
+   <dd><code title=3Dattr-canvas-height><a href=3D#attr-c=
anvas-height>height</a></code> — Vertical dimens=
ion</dd>
+   <dt><a href=3D#element-dfn-dom title=3Delement-dfn-dom>DO=
M interface</a>:</dt><!--ADD-TOPIC:DOM APIs-->
+   <dd>
+    <pre class=3Didl>typedef (<a href=3D#canvasrenderingcontext=
2d>CanvasRenderingContext2D</a> or <a href=3D#webglrenderingc=
ontext>WebGLRenderingContext</a>) <dfn id=3Drenderingcontext&=
gt;RenderingContext</dfn>;
+
+interface <dfn id=3Dhtmlcanvaselement>HTMLCanvasElement</dfn&gt=
; : <a href=3D#htmlelement>HTMLElement</a> {
+           attribute unsigned long <a href=3D#dom-canvas-width title=3D=
dom-canvas-width>width</a>;
+           attribute unsigned long <a href=3D#dom-canvas-height title=
=3Ddom-canvas-height>height</a>;
+
+  <a href=3D#renderingcontext>RenderingContext</a>? <a hr=
ef=3D#dom-canvas-getcontext title=3Ddom-canvas-getContext>getContext&l=
t;/a>(DOMString contextId, any... arguments);
+  boolean <a href=3D#dom-canvas-probablysupportscontext title=3Ddom-c=
anvas-probablySupportsContext>probablySupportsContext</a>(DOMStr=
ing contextId, any... arguments);
+
+  void <a href=3D#dom-canvas-setcontext title=3Ddom-canvas-setContext=
>setContext</a>(<a href=3D#renderingcontext>RenderingConte=
xt</a> context);
+  <a href=3D#canvasproxy>CanvasProxy</a> <a href=3D#dom-c=
anvas-transfercontroltoproxy title=3Ddom-canvas-transferControlToProxy&gt=
;transferControlToProxy</a>();
+
+  DOMString <a href=3D#dom-canvas-todataurl title=3Ddom-canvas-toData=
URL>toDataURL</a>(optional DOMString type, any... arguments);
+  DOMString <a href=3D#dom-canvas-todataurlhd title=3Ddom-canvas-toDa=
taURLHD>toDataURLHD</a>(optional DOMString type, any... argument=
s);
+  void <a href=3D#dom-canvas-toblob title=3Ddom-canvas-toBlob>toBl=
ob</a>(<a href=3D#filecallback>FileCallback</a>? _callb=
ack, optional DOMString type, any... arguments);
+  void <a href=3D#dom-canvas-toblobhd title=3Ddom-canvas-toBlobHD>=
toBlobHD</a>(<a href=3D#filecallback>FileCallback</a>? =
_callback, optional DOMString type, any... arguments);
+};</pre>
+   </dd>
+  </dl><!--REMOVE-TOPIC:DOM APIs--><p>The <code>=
<a href=3D#the-canvas-element>canvas</a></code> element=
 provides scripts with a resolution-dependent bitmap canvas,
+  which can be used for rendering graphs, game graphics, art, or other v=
isual images on the fly.</p>
+
+  <p>Authors should not use the <code><a href=3D#the-canv=
as-element>canvas</a></code> element in a document when a =
more suitable
+  element is available. For example, it is inappropriate to use a <co=
de><a href=3D#the-canvas-element>canvas</a></code> e=
lement to
+  render a page heading: if the desired presentation of the heading is g=
raphically intense, it
+  should be marked up using appropriate elements (typically <code>=
<a href=3D#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h1</a><=
/code>) and then styled using
+  CSS and supporting technologies such as XBL.</p>
+
+  <p>When authors use the <code><a href=3D#the-canvas-ele=
ment>canvas</a></code> element, they must also provide con=
tent that, when
+  presented to the user, conveys essentially the same function or purpos=
e as the
+  <code><a href=3D#the-canvas-element>canvas</a></c=
ode>' bitmap. This content may be placed as content of the <code&gt=
;<a href=3D#the-canvas-element>canvas</a></code>
+  element. The contents of the <code><a href=3D#the-canvas-elem=
ent>canvas</a></code> element, if any, are the element's &=
lt;a href=3D#fallback-content>fallback
+  content</a>.</p>
+
+  <hr><p>In interactive visual media, if <a href=3D#conce=
pt-n-script title=3Dconcept-n-script>scripting is enabled</a> fo=
r
+  the <code><a href=3D#the-canvas-element>canvas</a>&l=
t;/code> element, and if support for <code><a href=3D#the-can=
vas-element>canvas</a></code> elements has been enabled,
+  the <code><a href=3D#the-canvas-element>canvas</a>&l=
t;/code> element <a href=3D#represents>represents</a> <=
a href=3D#embedded-content>embedded content</a> consisting
+  of a dynamically created image, the element's bitmap.</p>
+
+  <p>In non-interactive, static, visual media, if the <code>=
<a href=3D#the-canvas-element>canvas</a></code> element=
 has been
+  previously associated with a rendering context (e.g. if the page was v=
iewed in an interactive
+  visual medium and is now being printed, or if some script that ran dur=
ing the page layout process
+  painted on the element), then the <code><a href=3D#the-canvas=
-element>canvas</a></code> element <a href=3D#represent=
s>represents</a>
+  <a href=3D#embedded-content>embedded content</a> with the =
element's current bitmap and size. Otherwise, the element
+  represents its <a href=3D#fallback-content>fallback content</=
a> instead.</p>
+
+  <p>In non-visual media, and in visual media if <a href=3D#con=
cept-n-noscript title=3Dconcept-n-noscript>scripting is
+  disabled</a> for the <code><a href=3D#the-canvas-elemen=
t>canvas</a></code> element or if support for <code>=
<a href=3D#the-canvas-element>canvas</a></code> element=
s
+  has been disabled, the <code><a href=3D#the-canvas-element&gt=
;canvas</a></code> element <a href=3D#represents>repres=
ents</a> its <a href=3D#fallback-content>fallback
+  content</a> instead.</p>
+
+  <!-- CANVAS-FOCUS-FALLBACK -->
+  <p>When a <code><a href=3D#the-canvas-element>canvas=
</a></code> element <a href=3D#represents>represents&lt=
;/a> <a href=3D#embedded-content>embedded content</a>, the
+  user can still focus descendants of the <code><a href=3D#the-=
canvas-element>canvas</a></code> element (in the <a hre=
f=3D#fallback-content>fallback
+  content</a>). When an element is focused, it is the target of ke=
yboard interaction events (even
+  though the element itself is not visible). This allows authors to make=
 an interactive canvas
+  keyboard-accessible: authors should have a one-to-one mapping of inter=
active regions to focusable
+  elements in the <a href=3D#fallback-content>fallback content<=
/a>. (Focus has no effect on mouse interaction events.)
+  <a href=3D#refsDOMEVENTS>[DOMEVENTS]</a></p> <!--=
 user interaction spec integration point -->
+
+  <hr><p>The <code><a href=3D#the-canvas-element&gt=
;canvas</a></code> element has two attributes to control the =
size of the element's bitmap:
+  <dfn id=3Dattr-canvas-width title=3Dattr-canvas-width><code&g=
t;width</code></dfn> and <dfn id=3Dattr-canvas-height titl=
e=3Dattr-canvas-height><code>height</code></dfn>. Th=
ese attributes, when specified, must have
+  values that are <a href=3D#valid-non-negative-integer title=3D&quot=
;valid non-negative integer">valid non-negative integers</a&gt=
;. <span class=3Dimpl>The <a href=3D#rules-for-parsing-non-negat=
ive-integers>rules for parsing non-negative integers</a> must be=
 used to obtain their
+  numeric values. If an attribute is missing, or if parsing its value re=
turns an error, then the
+  default value must be used instead.</span> The <code title=3D=
attr-canvas-width><a href=3D#attr-canvas-width>width</a>&l=
t;/code>
+  attribute defaults to 300, and the <code title=3Dattr-canvas-height=
><a href=3D#attr-canvas-height>height</a></code> att=
ribute
+  defaults to 150.</p>
+
+  <p>The intrinsic dimensions of the <code><a href=3D#the=
-canvas-element>canvas</a></code> element when it <a hr=
ef=3D#represents>represents</a>
+  <a href=3D#embedded-content>embedded content</a> are equal=
 to the dimensions of the element's bitmap.</p>
+
+  <p class=3Dnote>A <code><a href=3D#the-canvas-element&g=
t;canvas</a></code> element can be sized arbitrarily by a sty=
le sheet, its
+  bitmap is then subject to the 'object-fit' CSS property. <a href=3D=
#refsCSSIMAGES>[CSSIMAGES]</a></p>
+
+  <div class=3Dimpl>
+
+  <hr><!--ADD-TOPIC:Security--><p>The bitmaps of <c=
ode><a href=3D#the-canvas-element>canvas</a></code> =
elements, as well as some of the bitmaps of rendering
+  contexts, such as those described in the section on the <code>&l=
t;a href=3D#canvasrenderingcontext2d>CanvasRenderingContext2D</a&gt=
;</code>
+  object below, have an <dfn id=3Dconcept-canvas-origin-clean title=3D=
concept-canvas-origin-clean>origin-clean</dfn> flag, which can
+  be set to true or false. Initially, when the <code><a href=3D=
#the-canvas-element>canvas</a></code> element is created, =
its bitmap's
+  <a href=3D#concept-canvas-origin-clean title=3Dconcept-canvas-origi=
n-clean>origin-clean</a> flag must be set to true.</p>
+<!--REMOVE-TOPIC:Security-->
+
+  <p>A <code><a href=3D#the-canvas-element>canvas</=
a></code> bitmap can also have a <a href=3D#hit-region-list&g=
t;hit region list</a>, as described in the
+  <code><a href=3D#canvasrenderingcontext2d>CanvasRenderingC=
ontext2D</a></code> section below.</p>
+
+  <p>A <code><a href=3D#the-canvas-element>canvas</=
a></code> element can have a rendering context bound to it. Init=
ially, it does not
+  have a bound rendering context. To keep track of whether it has a rend=
ering context or not, and
+  what kind of rendering context it is, a <code><a href=3D#the-=
canvas-element>canvas</a></code> also has a <dfn id=3Dc=
oncept-canvas-context-mode title=3Dconcept-canvas-context-mode>canvas =
context mode</dfn>, which is initially <dfn id=3Dconcept-canvas-=
none title=3Dconcept-canvas-none>none</dfn> but can be changed t=
o either <dfn id=3Dconcept-canvas-direct-2d title=3Dconcept-canvas-dir=
ect-2d>direct-2d</dfn>, <dfn id=3Dconcept-canvas-direct-webgl=
 title=3Dconcept-canvas-direct-webgl>direct-webgl</dfn>, <dfn=
 id=3Dconcept-canvas-indirect title=3Dconcept-canvas-indirect>indirect=
</dfn>, or <dfn id=3Dconcept-canvas-proxied title=3Dconcept-canv=
as-proxied>proxied</dfn> by algorithms defined in this specifica=
tion.</p>
+
+  <p>When its <a href=3D#concept-canvas-context-mode title=3Dco=
ncept-canvas-context-mode>canvas context mode</a> is <a href=3D=
#concept-canvas-none title=3Dconcept-canvas-none>none</a>, a &lt=
;code><a href=3D#the-canvas-element>canvas</a></code&gt=
; element has no rendering context,
+  and its bitmap must be fully transparent black with an intrinsic width=
 equal to the numeric value
+  of the element's <code title=3Dattr-canvas-width><a href=3D#a=
ttr-canvas-width>width</a></code> attribute and an intrins=
ic height
+  equal to the numeric value of the element's <code title=3Dattr-canv=
as-height><a href=3D#attr-canvas-height>height</a></cod=
e>
+  attribute, those values being interpreted in CSS pixels, and being upd=
ated as the attributes are
+  set, changed, or removed.</p>
+
+  <p>When a <code><a href=3D#the-canvas-element>canvas=
</a></code> element represents <a href=3D#embedded-content=
>embedded content</a>, it <a href=3D#provides-a-paint-source&=
gt;provides
+  a paint source</a> whose width is the element's intrinsic width,=
 whose height is the element's
+  intrinsic height, and whose appearance is the element's bitmap.</p&=
gt;
+
+  <p>Whenever the <code title=3Dattr-canvas-width><a href=
=3D#attr-canvas-width>width</a></code> and <code title=3D=
attr-canvas-height><a href=3D#attr-canvas-height>height</a&gt=
;</code> content attributes are set, removed, changed, or
+  redundantly set to the value they already have, if the <a href=3D#c=
oncept-canvas-context-mode title=3Dconcept-canvas-context-mode>canvas =
context mode</a> is <a href=3D#concept-canvas-direct-2d title=3D=
concept-canvas-direct-2d>direct-2d</a><!-- (and the rendering=
 context's <span
+  title=3D"concept-canvas-context-bitmap-mode">context bitm=
ap mode</span>, therefore, is <span
+  title=3D"concept-canvas-fixed">fixed</span>)-->,=
 the user agent must <a href=3D#concept-canvas-set-bitmap-dimensions t=
itle=3Dconcept-canvas-set-bitmap-dimensions>set bitmap dimensions</=
a> to the numeric values of
+  the <code title=3Dattr-canvas-width><a href=3D#attr-canvas-wi=
dth>width</a></code> and <code title=3Dattr-canvas-heig=
ht><a href=3D#attr-canvas-height>height</a></code> c=
ontent attributes.</p>
+
+  <p>The <dfn id=3Ddom-canvas-width title=3Ddom-canvas-width&gt=
;<code>width</code></dfn> and <dfn id=3Ddom-canvas-h=
eight title=3Ddom-canvas-height><code>height</code></df=
n> IDL attributes must <a href=3D#reflect>reflect</a> the
+  respective content attributes of the same name, with the same defaults=
.</p>
+
+  </div>
+
+  <p class=3Dnote>The bitmaps used with <code><a href=3D#=
the-canvas-element>canvas</a></code> elements can have arb=
itrary pixel
+  densities. Typically, the density will match that of the user's screen=
.</p>
+
+  <hr><!--ADD-TOPIC:DOM APIs--><dl class=3Ddomintro>&l=
t;dt><var title=3D"">context</var> =3D <var t=
itle=3D"">canvas</var> . <code title=3Ddom-canvas-g=
etContext><a href=3D#dom-canvas-getcontext>getContext</a>&=
lt;/code>(<var title=3D"">contextId</var> [, ...=
 ])</dt>
+
+   <dd>
+
+    <p>Returns an object that exposes an API for drawing on the ca=
nvas. The first argument specifies
+    the desired API, either "<code title=3Dcanvas-context-2d>=
<a href=3D#canvas-context-2d>2d</a></code>" or &qu=
ot;<code title=3Dcanvas-context-webgl><a href=3D#canvas-context-=
webgl>webgl</a></code>". Subsequent arguments are han=
dled by that API.</p>
+
+    <p>This specification defines the "<code title=3Dcanva=
s-context-2d><a href=3D#canvas-context-2d>2d</a></code&=
gt;" context below.
+    There is also a specification that defines a "<code title=3D=
canvas-context-webgl><a href=3D#canvas-context-webgl>webgl</a=
></code>"
+    context. <a href=3D#refsWEBGL>[WEBGL]</a></p>
+
+    <p>Returns null if the given context ID is not supported, if t=
he canvas has already been
+    initialized with the other context type (e.g. trying to get a "=
<code title=3Dcanvas-context-2d><a href=3D#canvas-context-2d>=
2d</a></code>" context after getting a "<code ti=
tle=3Dcanvas-context-webgl><a href=3D#canvas-context-webgl>webgl=
</a></code>" context).</p>
+
+    <p>Throws an <code><a href=3D#invalidstateerror>In=
validStateError</a></code> exception if the <code title=3D=
dom-canvas-setContext><a href=3D#dom-canvas-setcontext>setContex=
t()</a></code> or <code title=3Ddom-canvas-transferControl=
ToProxy><a href=3D#dom-canvas-transfercontroltoproxy>transferCon=
trolToProxy()</a></code> methods have been
+    used.</p>
+
+   </dd>
+
+   <dt><var title=3D"">supported</var> =3D &=
lt;var title=3D"">canvas</var> . <code title=3Ddom-=
canvas-probablySupportsContext><a href=3D#dom-canvas-probablysuppor=
tscontext>probablySupportsContext</a></code>(<var title=
=3D"">contextId</var> [, ... ])</dt>
+
+   <dd>
+
+    <p>Returns false if calling <code title=3Ddom-canvas-getCon=
text><a href=3D#dom-canvas-getcontext>getContext()</a><=
/code> with the
+    same arguments would definitely return null, and true otherwise.<=
/p>
+
+    <p>This return value is not a guarantee that <code title=3D=
dom-canvas-getContext><a href=3D#dom-canvas-getcontext>getContex=
t()</a></code> will or will not return an object, as
+    conditions (e.g. availability of system resources) can vary over tim=
e.</p>
+
+    <p>Throws an <code><a href=3D#invalidstateerror>In=
validStateError</a></code> exception if the <code title=3D=
dom-canvas-setContext><a href=3D#dom-canvas-setcontext>setContex=
t()</a></code> or <code title=3Ddom-canvas-transferControl=
ToProxy><a href=3D#dom-canvas-transfercontroltoproxy>transferCon=
trolToProxy()</a></code> methods have been
+    used.</p>
+
+   </dd>
+
+   <dt><var title=3D"">canvas</var> . <co=
de title=3Ddom-canvas-setContext><a href=3D#dom-canvas-setcontext&g=
t;setContext</a></code>(<var title=3D"">conte=
xt</var>)</dt>
+
+   <dd>
+
+    <p>Sets the <code><a href=3D#the-canvas-element>ca=
nvas</a></code>' rendering context to the given object.</p=
>
+
+    <p>Throws an <code><a href=3D#invalidstateerror>In=
validStateError</a></code> exception if the <code title=3D=
dom-canvas-getContext><a href=3D#dom-canvas-getcontext>getContex=
t()</a></code> or <code title=3Ddom-canvas-transferControl=
ToProxy><a href=3D#dom-canvas-transfercontroltoproxy>transferCon=
trolToProxy()</a></code> methods have been
+    used.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>There are two ways for a <code><a href=3D#the-canvas=
-element>canvas</a></code> element to acquire a rendering =
context: the
+  <code><a href=3D#the-canvas-element>canvas</a></c=
ode> element can provide one via the <code title=3Ddom-canvas-getCo=
ntext><a href=3D#dom-canvas-getcontext>getContext()</a>&lt=
;/code> method, and one can be assigned to it via the
+  <code title=3Ddom-canvas-setContext><a href=3D#dom-canvas-set=
context>setContext()</a></code> method. In addition, the w=
hole issue of a
+  rendering context can be taken out of the <code><a href=3D#th=
e-canvas-element>canvas</a></code> element's hands and pas=
sed to a
+  <code><a href=3D#canvasproxy>CanvasProxy</a></cod=
e> object, which itself can then be assigned a rendering context using=
 its
+  <code title=3Ddom-CanvasProxy-setContext><a href=3D#dom-canva=
sproxy-setcontext>setContext()</a></code> method.</p&gt=
;
+
+  <p>These three methods are mutually exclusive; calling any of th=
e three makes the other two start
+  throwing <code><a href=3D#invalidstateerror>InvalidStateEr=
ror</a></code> exceptions when called.</p>
+
+  <p>Each rendering context has a <dfn id=3Dconcept-canvas-cont=
ext-bitmap-mode title=3Dconcept-canvas-context-bitmap-mode>context bit=
map
+  mode</dfn>, which is one of <dfn id=3Dconcept-canvas-fixed ti=
tle=3Dconcept-canvas-fixed>fixed</dfn>, <dfn id=3Dconcept-can=
vas-unbound title=3Dconcept-canvas-unbound>unbound</dfn>, or &lt=
;dfn id=3Dconcept-canvas-bound title=3Dconcept-canvas-bound>bound</=
dfn>.
+  Initially, rendering contexts must be in the <a href=3D#concept-can=
vas-bound title=3Dconcept-canvas-bound>unbound</a>
+  mode.</p>
+
+  <hr><p>The <dfn id=3Ddom-canvas-getcontext title=3Ddom-=
canvas-getContext><code>getContext(<var title=3D""&=
gt;contextId</var>, <var title=3D"">arguments...&lt=
;/var>)</code></dfn> method of the <code><a href=3D=
#the-canvas-element>canvas</a></code> element, when invoke=
d,
+  must run the steps in the cell of the following table whose column hea=
der describes the
+  <code><a href=3D#the-canvas-element>canvas</a></c=
ode> element's <a href=3D#concept-canvas-context-mode title=3Dconce=
pt-canvas-context-mode>canvas context mode</a>
+  and whose row header describes the method's first argument.</p>
+
+  <table><thead><tr><td>
+     <th><a href=3D#concept-canvas-none title=3Dconcept-canvas-=
none>none</a>
+     <th><a href=3D#concept-canvas-direct-2d title=3Dconcept-ca=
nvas-direct-2d>direct-2d</a>
+     <th><a href=3D#concept-canvas-direct-webgl title=3Dconcept=
-canvas-direct-webgl>direct-webgl</a>
+     <th><a href=3D#concept-canvas-indirect title=3Dconcept-can=
vas-indirect>indirect</a>
+     <th><a href=3D#concept-canvas-proxied title=3Dconcept-canv=
as-proxied>proxied</a>
+   <tbody><tr><th>"<dfn id=3Dcanvas-context-2d=
 title=3Dcanvas-context-2d><code>2d</code></dfn>&quo=
t;
+     <td>
+      Set the <code><a href=3D#the-canvas-element>canvas<=
/a></code> element's <a href=3D#concept-canvas-context-mode t=
itle=3Dconcept-canvas-context-mode>context
+      mode</a> to <a href=3D#concept-canvas-direct-2d title=3Dc=
oncept-canvas-direct-2d>direct-2d</a>; follow the <a href=3D#=
2d-context-creation-algorithm>2D
+      context creation algorithm</a> defined in the section below,=
 passing it the
+      <code><a href=3D#the-canvas-element>canvas</a>&l=
t;/code> element, to obtain a <code><a href=3D#canvasrenderin=
gcontext2d>CanvasRenderingContext2D</a></code> object; set
+      that object's <a href=3D#concept-canvas-context-bitmap-mode tit=
le=3Dconcept-canvas-context-bitmap-mode>context bitmap mode</a> =
to
+      <a href=3D#concept-canvas-fixed title=3Dconcept-canvas-fixed&gt=
;fixed</a>, and return the
+      <code><a href=3D#canvasrenderingcontext2d>CanvasRender=
ingContext2D</a></code> object
+     <td>
+      Return the same object as was return the last time the method was =
invoked with this same
+      argument.
+     <td>
+      Return null.
+     <td>
+      Throw an <code><a href=3D#invalidstateerror>InvalidSta=
teError</a></code> exception.
+     <td>
+      Throw an <code><a href=3D#invalidstateerror>InvalidSta=
teError</a></code> exception.
+
+    <tr><th>"<dfn id=3Dcanvas-context-webgl title=3D=
canvas-context-webgl><code>webgl</code></dfn>",=
 if the user agent supports the WebGL feature in its current configuratio=
n
+     <td>
+      Follow the instructions given in the WebGL specification's <i&g=
t;Context Creation</i> section to
+      obtain either a <code><a href=3D#webglrenderingcontext&gt=
;WebGLRenderingContext</a></code> or null; if the returned va=
lue is null,
+      then return null and abort these steps, otherwise, set the <cod=
e><a href=3D#the-canvas-element>canvas</a></code> el=
ement's <a href=3D#concept-canvas-context-mode title=3Dconcept-canvas-=
context-mode>context mode</a> to <a href=3D#concept-canvas-di=
rect-webgl title=3Dconcept-canvas-direct-webgl>direct-webgl</a>,=
 set the new
+      <code><a href=3D#webglrenderingcontext>WebGLRenderingC=
ontext</a></code> object's <a href=3D#concept-canvas-conte=
xt-bitmap-mode title=3Dconcept-canvas-context-bitmap-mode>context bitm=
ap mode</a> to <a href=3D#concept-canvas-fixed title=3Dconcept-c=
anvas-fixed>fixed</a>, and return the <code><a href=3D#=
webglrenderingcontext>WebGLRenderingContext</a></code>
+      object‡ <a href=3D#refsWEBGL>[WEBGL]</a>
+     <td>
+      Return null.
+     <td>
+      Return the same object as was return the last time the method was =
invoked with this same
+      argument.
+     <td>
+      Throw an <code><a href=3D#invalidstateerror>InvalidSta=
teError</a></code> exception.
+     <td>
+      Throw an <code><a href=3D#invalidstateerror>InvalidSta=
teError</a></code> exception.
+
+    <tr><th>A vendor-specific extension*
+     <td>
+      Behave as defined for the extension.
+     <td>
+      Behave as defined for the extension.
+     <td>
+      Behave as defined for the extension.
+     <td>
+      Throw an <code><a href=3D#invalidstateerror>InvalidSta=
teError</a></code> exception.
+     <td>
+      Throw an <code><a href=3D#invalidstateerror>InvalidSta=
teError</a></code> exception.
+
+    <tr><th>An unsupported value†
+     <td>
+      Return null.
+     <td>
+      Return null.
+     <td>
+      Return null.
+     <td>
+      Throw an <code><a href=3D#invalidstateerror>InvalidSta=
teError</a></code> exception.
+     <td>
+      Throw an <code><a href=3D#invalidstateerror>InvalidSta=
teError</a></code> exception.
+   =20
+  </table><p class=3Dtablenote><small>* Vendors may de=
fine experimental contexts using the syntax <code><var title=3D&=
quot;">vendorname</var>-<var title=3D"">con=
text</var></code>, for example,
+  <code>moz-3d</code>.</small></p>
+
+  <p class=3Dtablenote><small>† For example, the =
"<code title=3Dcanvas-context-webgl><a href=3D#canvas-conte=
xt-webgl>webgl</a></code>" value in the case of a use=
r agent having exhausted the
+  graphics hardware's abilities and having no software fallback implemen=
tation.</small></p>
+
+  <p class=3Dtablenote><small>‡ The second (and =
subsequent) argument(s) to the method, if
+  any, are ignored in all cases except this one. See the WebGL specifica=
tion for
+  details.</small></p>
+
+  <hr><p>The <dfn id=3Ddom-canvas-probablysupportscontext=
 title=3Ddom-canvas-probablySupportsContext><code>probablySuppor=
tsContext(<var title=3D"">contextId</var>,
+  <var title=3D"">arguments...</var>)</code>=
</dfn> method of the <code><a href=3D#the-canvas-element&g=
t;canvas</a></code> element, when
+  invoked, must return false if calling <code title=3Ddom-canvas-getC=
ontext><a href=3D#dom-canvas-getcontext>getContext()</a>&l=
t;/code> on
+  the same object and with the same arguments would definitely return nu=
ll at this time, and true
+  otherwise.</p>
+
+  <hr><p>The <dfn id=3Ddom-canvas-setcontext title=3Ddom-=
canvas-setContext><code>setContext(<var title=3D""&=
gt;context</var>)</code></dfn> method of the <code&g=
t;<a href=3D#the-canvas-element>canvas</a></code> eleme=
nt, when invoked, must
+  run the following steps:</p>
+
+  <ol><li><p>If the <code><a href=3D#the-canv=
as-element>canvas</a></code> element's <a href=3D#conce=
pt-canvas-context-mode title=3Dconcept-canvas-context-mode>canvas
+   context mode</a> is neither <a href=3D#concept-canvas-none t=
itle=3Dconcept-canvas-none>none</a> nor <a href=3D#concept-ca=
nvas-indirect title=3Dconcept-canvas-indirect>indirect</a>, thro=
w an <code><a href=3D#invalidstateerror>InvalidStateError<=
/a></code>
+   exception and abort these steps.</li>
+
+   <li><p>If <var title=3D"">context</var=
>'s <a href=3D#concept-canvas-context-bitmap-mode title=3Dconcept-c=
anvas-context-bitmap-mode>context
+   bitmap mode</a> is <a href=3D#concept-canvas-fixed title=3Dc=
oncept-canvas-fixed>fixed</a>, then throw an
+   <code><a href=3D#invalidstateerror>InvalidStateError</=
a></code> exception and abort these steps.</li>
+
+   <li><p>If <var title=3D"">context</var=
>'s <a href=3D#concept-canvas-context-bitmap-mode title=3Dconcept-c=
anvas-context-bitmap-mode>context
+   bitmap mode</a> is <a href=3D#concept-canvas-bound title=3Dc=
oncept-canvas-bound>bound</a>, then run <var title=3D"&q=
uot;>context</var>'s <a href=3D#concept-canvas-unbinding-step=
s title=3Dconcept-canvas-unbinding-steps>unbinding steps</a> and
+   set its <var title=3D"">context</var>'s <a h=
ref=3D#concept-canvas-context-bitmap-mode title=3Dconcept-canvas-context-=
bitmap-mode>context
+   bitmap mode</a> to <a href=3D#concept-canvas-unbound title=3D=
concept-canvas-unbound>unbound</a>.</li>
+
+   <li><p>Run <var title=3D"">context</va=
r>'s <a href=3D#concept-canvas-binding-steps title=3Dconcept-canvas=
-binding-steps>binding
+   steps</a> to bind it to this <code><a href=3D#the-canv=
as-element>canvas</a></code> element.</li>
+
+   <li><p>Set the <code><a href=3D#the-canvas-eleme=
nt>canvas</a></code> element's <a href=3D#concept-canva=
s-context-mode title=3Dconcept-canvas-context-mode>context
+   mode</a> to <a href=3D#concept-canvas-indirect title=3Dconce=
pt-canvas-indirect>indirect</a> and the <var title=3D"&q=
uot;>context</var>'s <a href=3D#concept-canvas-context-bitmap=
-mode title=3Dconcept-canvas-context-bitmap-mode>context bitmap
+   mode</a> to <a href=3D#concept-canvas-bound title=3Dconcept-=
canvas-bound>bound</a>.</li>
+
+  </ol><hr></div>
+
+  <dl class=3Ddomintro><dt><var title=3D"">u=
rl</var> =3D <var title=3D"">canvas</var> . &=
lt;code title=3Ddom-canvas-toDataURL><a href=3D#dom-canvas-todataur=
l>toDataURL</a></code>( [ <var title=3D"">=
type</var>, ... ] )</dt>
+   <dt><var title=3D"">url</var> =3D <var=
 title=3D"">canvas</var> . <code title=3Ddom-canvas=
-toDataURLHD><a href=3D#dom-canvas-todataurlhd>toDataURLHD</a=
></code>( [ <var title=3D"">type</var>, ..=
. ] )</dt>
+
+   <dd>
+
+    <p>Returns a <a href=3D#data-protocol title=3D"data pr=
otocol"><code title=3D"">data:</code> URL&l=
t;/a> for the image in
+    the canvas.</p>
+
+    <p>The first argument, if provided, controls the type of the i=
mage to be returned (e.g. PNG or
+    JPEG). The default is <code title=3D"">image/png<=
/code>; that type is also used if the given type
+    isn't supported. The other arguments are specific to the type, and c=
ontrol the way that the
+    image is generated, as given <a href=3D#canvas-serialization-argu=
ments>in the table
+    below</a>.</p>
+
+    <p>When trying to use types other than "<code>image=
/png</code>", authors can check if the image
+    was really returned in the requested format by checking to see if th=
e returned string starts
+    with one of the exact strings "<code title=3D""&gt=
;data:image/png,</code>" or "<code title=3D"&quot=
;>data:image/png;</code>". If it does, the image is PNG, an=
d thus the requested type was
+    not supported. (The one exception to this is if the canvas has eithe=
r no height or no width, in
+    which case the result might simply be "<code title=3D"&=
quot;>data:,</code>".)</p>
+
+    <p>The <code title=3Ddom-canvas-toDataURL><a href=3D#=
dom-canvas-todataurl>toDataURL()</a></code> method returns=
 the data at a
+    resolution of 96dpi. The <code title=3Ddom-canvas-toDataURLHD>=
<a href=3D#dom-canvas-todataurlhd>toDataURLHD()</a></code&=
gt; method
+    returns it at the native canvas bitmap resolution.</p>
+
+   </dd>
+
+   <dt><var title=3D"">canvas</var> . <co=
de title=3Ddom-canvas-toBlob><a href=3D#dom-canvas-toblob>toBlob=
</a></code>(<var title=3D"">callback</var&=
gt; [, <var title=3D"">type</var>, ... ])</dt&gt=
;
+   <dt><var title=3D"">canvas</var> . <co=
de title=3Ddom-canvas-toBlobHD><a href=3D#dom-canvas-toblobhd>to=
BlobHD</a></code>(<var title=3D"">callback&lt=
;/var> [, <var title=3D"">type</var>, ... ])<=
/dt>
+
+   <dd>
+
+    <p>Creates a <code><a href=3D#blob>Blob</a>&=
lt;/code> object representing a file containing the image in the canva=
s,
+    and invokes a callback with a handle to that object.</p>
+
+    <p>The second argument, if provided, controls the type of the =
image to be returned (e.g. PNG or
+    JPEG). The default is <code title=3D"">image/png<=
/code>; that type is also used if the given type
+    isn't supported. The other arguments are specific to the type, and c=
ontrol the way that the
+    image is generated, as given <a href=3D#canvas-serialization-argu=
ments>in the table
+    below</a>.</p>
+
+    <p>The <code title=3Ddom-canvas-toBlob><a href=3D#dom=
-canvas-toblob>toBlob()</a></code> method provides the dat=
a at a resolution
+    of 96dpi. The <code title=3Ddom-canvas-toBlobHD><a href=3D#=
dom-canvas-toblobhd>toBlobHD()</a></code> method provides =
it at the
+    native canvas bitmap resolution.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-canvas-todataurl title=3Ddom-canvas-toDa=
taURL><code>toDataURL()</code></dfn> and <dfn id=3D=
dom-canvas-todataurlhd title=3Ddom-canvas-toDataURLHD><code>toDa=
taURLHD()</code></dfn> methods must run the following
+  steps:</p>
+
+  <ol><!--ADD-TOPIC:Security--><li><p>If the &lt=
;code><a href=3D#the-canvas-element>canvas</a></code&gt=
; element's bitmap's <a href=3D#concept-canvas-origin-clean title=3Dco=
ncept-canvas-origin-clean>origin-clean</a> flag is set to false,=
 throw a
+   <code><a href=3D#securityerror>SecurityError</a>&lt=
;/code> exception and abort these steps.</p>
+<!--REMOVE-TOPIC:Security-->
+
+   <li><p>If the <code><a href=3D#the-canvas-elemen=
t>canvas</a></code> element's bitmap has no pixels (i.e. e=
ither its horizontal
+   dimension or its vertical dimension is zero) then return the string &=
quot;<code title=3D"">data:,</code>" and abort=
 these steps. (This is the shortest <a href=3D#data-protocol title=3D&=
quot;data
+   protocol"><code title=3D"">data:</code>=
 URL</a>; it represents the empty string in a <code title=3D&quo=
t;">text/plain</code> resource.)</li>
+
+   <li><p>Let <var title=3D"">file</var&g=
t; be <a href=3D#a-serialization-of-the-bitmap-as-a-file title=3D&quot=
;a serialization of the bitmap as a file">a
+   serialization of the <code>canvas</code> element's bitmap=
 as a file</a>, using the method's
+   arguments (if any) as the <var title=3D"">arguments&l=
t;/var>, and with the <var title=3D"">native</var&g=
t;
+   flag set if the method is the <code title=3Ddom-canvas-toDataURLHD=
><a href=3D#dom-canvas-todataurlhd>toDataURLHD()</a></c=
ode> method,
+   and not otherwise.</li>
+
+   <li><p>Return a <a href=3D#data-protocol title=3D&quot=
;data protocol"><code title=3D"">data:</code&g=
t; URL</a> representing
+   <var title=3D"">file</var>. <a href=3D#refsR=
FC2397>[RFC2397]</a></p>
+
+   <!-- should we explicitly require the URL to be base64-encoded and=
 not have any parameters, to
+   ensure the same exact URL is generated in each browser? -->
+
+  </ol><p>The <dfn id=3Ddom-canvas-toblob title=3Ddom-can=
vas-toBlob><code>toBlob()</code></dfn> and <dfn i=
d=3Ddom-canvas-toblobhd title=3Ddom-canvas-toBlobHD><code>toBlob=
HD()</code></dfn> methods must run the following
+  steps:</p>
+
+  <ol><!--ADD-TOPIC:Security--><li><p>If the &lt=
;code><a href=3D#the-canvas-element>canvas</a></code&gt=
; element's bitmap's <a href=3D#concept-canvas-origin-clean title=3Dco=
ncept-canvas-origin-clean>origin-clean</a> flag is set to false,=
 throw a
+   <code><a href=3D#securityerror>SecurityError</a>&lt=
;/code> exception and abort these steps.</p>
+<!--REMOVE-TOPIC:Security-->
+
+   <li><p>Let <var title=3D"">callback</v=
ar> be the first argument.</li>
+
+   <li><p>Let <var title=3D"">arguments</=
var> be the second and subsequent arguments to the method, if
+   any.</li>
+
+   <li>
+
+    <p>If the <code><a href=3D#the-canvas-element>canv=
as</a></code> element's bitmap has no pixels (i.e. either its=
 horizontal
+    dimension or its vertical dimension is zero) then let <var title=3D=
"">result</var> be null.</p>
+
+    <p>Otherwise, let <var title=3D"">result</v=
ar> be a <code><a href=3D#blob>Blob</a></code>=
 object representing <a href=3D#a-serialization-of-the-bitmap-as-a-fil=
e title=3D"a serialization of the bitmap as a file">a serial=
ization of the <code>canvas</code>
+    element's bitmap as a file</a>, using <var title=3D"&q=
uot;>arguments</var>, and with the <var title=3D""&=
gt;native</var> flag set if the method is the <code title=3Ddom-=
canvas-toBlobHD><a href=3D#dom-canvas-toblobhd>toBlobHD()</a&=
gt;</code> method, and not otherwise. <a href=3D#refsFILEAPI>=
[FILEAPI]</a> </p>
+
+   </li>
+
+   <li><p>Return, but continue running these steps asynchron=
ously.</li>
+
+   <li><p>If <var title=3D"">callback</va=
r> is null, abort these steps.</li>
+
+   <li><p><a href=3D#queue-a-task>Queue a task</a&g=
t; to invoke the <code><a href=3D#filecallback>FileCallback&l=
t;/a></code> <var title=3D"">callback</var&gt=
; with <var title=3D"">result</var> as its argument=
. The <a href=3D#task-source>task
+   source</a> for this task is the <dfn id=3Dcanvas-blob-serial=
ization-task-source>canvas blob serialization task source</dfn>.=
</li>
+
+  </ol></div>
+  <!--REMOVE-TOPIC:DOM APIs-->
+
+
+  <!--ADD-TOPIC:Workers-->
+  <h5 id=3Dproxying-canvases-to-workers><span class=3Dsecno>=
4.12.4.1 </span>Proxying canvases to workers</h5>
+
+  <p>Since DOM nodes cannot be accessed across worker boundaries, =
a proxy object is needed to enable
+  workers to render to <code><a href=3D#the-canvas-element>c=
anvas</a></code> elements in <code><a href=3D#docume=
nt>Document</a></code>s.</p>
+
+  <pre class=3Didl>interface <dfn id=3Dcanvasproxy>CanvasPro=
xy</dfn> {
+  void <a href=3D#dom-canvasproxy-setcontext title=3Ddom-CanvasProxy-=
setContext>setContext</a>(<a href=3D#renderingcontext>Rend=
eringContext</a> context);
+};
+// <a href=3D#canvasproxy>CanvasProxy</a> implements <a h=
ref=3D#transferable>Transferable</a>;</pre>
+
+  <dl class=3Ddomintro><dt><var title=3D"">c=
anvasProxy</var> =3D <var title=3D"">canvas</var=
> . <code title=3Ddom-canvas-transferControlToProxy><a href=3D=
#dom-canvas-transfercontroltoproxy>transferControlToProxy</a>&lt=
;/code>()</dt>
+
+   <dd>
+
+    <p>Returns a <code><a href=3D#canvasproxy>CanvasPr=
oxy</a></code> object that can be used to transfer control fo=
r this
+    canvas over to another document (e.g. an <code><a href=3D#t=
he-iframe-element>iframe</a></code> from another <a hre=
f=3D#origin>origin</a>)
+    or to a worker.</p>
+
+    <p>Throws an <code><a href=3D#invalidstateerror>In=
validStateError</a></code> exception if the <code title=3D=
dom-canvas-getContext><a href=3D#dom-canvas-getcontext>getContex=
t()</a></code> or <code title=3Ddom-canvas-setContext>&=
lt;a href=3D#dom-canvas-setcontext>setContext()</a></code>=
 methods have been used.</p>
+
+   </dd>
+
+   <dt><var title=3D"">canvasProxy</var> . &=
lt;code title=3Ddom-CanvasProxy-setContext><a href=3D#dom-canvaspro=
xy-setcontext>setContext</a></code>(<var title=3D"=
">context</var>)</dt>
+
+   <dd>
+
+    <p>Sets the <code><a href=3D#canvasproxy>CanvasPro=
xy</a></code> object's <code><a href=3D#the-canvas-e=
lement>canvas</a></code> element's rendering context to
+    the given object.</p>
+
+    <p>Throws an <code><a href=3D#invalidstateerror>In=
validStateError</a></code> exception if the <code><a=
 href=3D#canvasproxy>CanvasProxy</a></code> has been
+    <a href=3D#transfer-a-transferable-object title=3D"transfer =
a Transferable object">transfered</a>.</p>
+
+   </dd>
+
+  </dl><hr><p>The <dfn id=3Ddom-canvas-transfercont=
roltoproxy title=3Ddom-canvas-transferControlToProxy><code>trans=
ferControlToProxy()</code></dfn>
+  method of the <code><a href=3D#the-canvas-element>canvas&l=
t;/a></code> element, when invoked, must run the following steps=
:</p>
+
+  <ol><li><p>If the <code><a href=3D#the-canv=
as-element>canvas</a></code> element's <a href=3D#conce=
pt-canvas-context-mode title=3Dconcept-canvas-context-mode>canvas
+   context mode</a> is not <a href=3D#concept-canvas-none title=
=3Dconcept-canvas-none>none</a>, throw an
+   <code><a href=3D#invalidstateerror>InvalidStateError</=
a></code> exception and abort these steps.</li>
+
+   <li><p>Set the <code><a href=3D#the-canvas-eleme=
nt>canvas</a></code> element's <a href=3D#concept-canva=
s-context-mode title=3Dconcept-canvas-context-mode>context
+   mode</a> to <a href=3D#concept-canvas-proxied title=3Dconcep=
t-canvas-proxied>proxied</a>.</li>
+
+   <li><p>Return a <code><a href=3D#canvasproxy>=
CanvasProxy</a></code> object bound to this <code><a=
 href=3D#the-canvas-element>canvas</a></code>
+   element.</li>
+
+  </ol><p>A <code><a href=3D#canvasproxy>CanvasP=
roxy</a></code> object can be <a href=3D#concept-transfera=
ble-neutered title=3Dconcept-transferable-neutered>neutered</a> =
(like any <code><a href=3D#transferable>Transferable</a&gt=
;</code> object),
+  meaning it can no longer be <a href=3D#transfer-a-transferable-obje=
ct title=3D"transfer a Transferable object">transferred</=
a>, and
+  can be <dfn id=3Dconcept-canvasproxy-disabled title=3Dconcept-Canva=
sProxy-disabled>disabled</dfn>, meaning it can no longer be boun=
d
+  to rendering contexts. When first created, a <code><a href=3D=
#canvasproxy>CanvasProxy</a></code> object must be neither=
.</p>
+
+  <p>A <code><a href=3D#canvasproxy>CanvasProxy</a&=
gt;</code> is created with a link to a <code><a href=3D#th=
e-canvas-element>canvas</a></code> element. A
+  <code><a href=3D#canvasproxy>CanvasProxy</a></cod=
e> object that has not been <a href=3D#concept-canvasproxy-disabled=
 title=3Dconcept-CanvasProxy-disabled>disabled</a> must have a s=
trong reference to its canvas
+  element.</p>
+
+  <p>The <dfn id=3Ddom-canvasproxy-setcontext title=3Ddom-Canva=
sProxy-setContext><code>setContext(<var title=3D""&=
gt;context</var>)</code></dfn> method of <code>&l=
t;a href=3D#canvasproxy>CanvasProxy</a></code> objects, wh=
en invoked,
+  must run the following steps:</p>
+
+  <ol><li><p>If the <code><a href=3D#canvaspr=
oxy>CanvasProxy</a></code> object has been <a href=3D#c=
oncept-canvasproxy-disabled title=3Dconcept-CanvasProxy-disabled>disab=
led</a>, throw an <code><a href=3D#invalidstateerror>In=
validStateError</a></code>
+   exception and abort these steps.</li>
+
+   <li><p>If the <code><a href=3D#canvasproxy>Ca=
nvasProxy</a></code> object has not been <a href=3D#concep=
t-transferable-neutered title=3Dconcept-transferable-neutered>neutered=
</a>, then <a href=3D#concept-transferable-neutered title=3Dconc=
ept-transferable-neutered>neuter</a> it.</li>
+
+   <li><p>If <var title=3D"">context</var=
>'s <a href=3D#concept-canvas-context-bitmap-mode title=3Dconcept-c=
anvas-context-bitmap-mode>context
+   bitmap mode</a> is <a href=3D#concept-canvas-fixed title=3Dc=
oncept-canvas-fixed>fixed</a>, then throw an
+   <code><a href=3D#invalidstateerror>InvalidStateError</=
a></code> exception and abort these steps.</li>
+
+   <li><p>If <var title=3D"">context</var=
>'s <a href=3D#concept-canvas-context-bitmap-mode title=3Dconcept-c=
anvas-context-bitmap-mode>context
+   bitmap mode</a> is <a href=3D#concept-canvas-bound title=3Dc=
oncept-canvas-bound>bound</a>, then run <var title=3D"&q=
uot;>context</var>'s <a href=3D#concept-canvas-unbinding-step=
s title=3Dconcept-canvas-unbinding-steps>unbinding steps</a> and
+   set its <var title=3D"">context</var>'s <a h=
ref=3D#concept-canvas-context-bitmap-mode title=3Dconcept-canvas-context-=
bitmap-mode>context
+   bitmap mode</a> to <a href=3D#concept-canvas-unbound title=3D=
concept-canvas-unbound>unbound</a>.</li>
+
+   <li><p>Run <var title=3D"">context</va=
r>'s <a href=3D#concept-canvas-binding-steps title=3Dconcept-canvas=
-binding-steps>binding
+   steps</a> to bind it to this <code><a href=3D#canvaspr=
oxy>CanvasProxy</a></code> object's <code><a href=
=3D#the-canvas-element>canvas</a></code>
+   element.</li>
+
+   <li><p>Set the <var title=3D"">context&lt=
;/var>'s <a href=3D#concept-canvas-context-bitmap-mode title=3Dconc=
ept-canvas-context-bitmap-mode>context bitmap mode</a> to <a =
href=3D#concept-canvas-bound title=3Dconcept-canvas-bound>bound</a&=
gt;.</li>
+
+  </ol><p id=3DtransferCanvasProxy>To <a href=3D#transfer=
-a-transferable-object title=3D"transfer a Transferable object"=
>transfer</a> a
+  <code><a href=3D#canvasproxy>CanvasProxy</a></cod=
e> object <var title=3D"">old</var> to a new own=
er <var title=3D"">owner</var>,
+  a user agent must create a new <code><a href=3D#canvasproxy&g=
t;CanvasProxy</a></code> object linked to the same
+  <code><a href=3D#the-canvas-element>canvas</a></c=
ode> element as <var title=3D"">old</var>, thus =
obtaining <var title=3D"">new</var>,
+  must <a href=3D#concept-transferable-neutered title=3Dconcept-Trans=
ferable-neutered>neuter</a> and <a href=3D#concept-canvasprox=
y-disabled title=3Dconcept-CanvasProxy-disabled>disable</a> the =
<var title=3D"">old</var> object, and must
+  finally return <var title=3D"">new</var>.</p&=
gt;
+
+  <div class=3Dexample>
+
+   <p>Here is a clock implemented on a worker. First, the main pag=
e:</p>
+
+   <pre><!DOCTYPE HTML>
+<title>Clock</title>
+<canvas></canvas> <!-- defaults to 300x15=
0 -->
+<script>
+  var canvas =3D document.getElementsByTagName('canvas')[0];
+  var proxy =3D canvas.transferControlToProxy();
+  var worker =3D new Worker('clock.js');
+  worker.postMessage(proxy, [proxy]);
+</script></pre>
+
+   <p>Second, the worker:</p>
+
+   <pre>onmessage =3D function (event) {
+  var context =3D new CanvasRenderingContext2D();
+  event.data.setContext(context); // event.data is the CanvasProxy objec=
t
+  setInterval(function () {
+    context.clearRect(0, 0, context.width, context.height);
+    context.fillText(new Date(), 0, 100);
+    context.commit();
+  }, 1000);
+};</pre>
+
+  </div>
+
+  <!--REMOVE-TOPIC:Workers-->
+
+
+  <h5 id=3D2dcontext><span class=3Dsecno>4.12.4.2 </span&=
gt;The 2D rendering context</h5>
+
+  <!-- v2: we're on v5. suggestions for subsequent versions are marke=
d v6, v7, v8. -->
+
+  <pre class=3Didl>typedef (<a href=3D#htmlimageelement>HTML=
ImageElement</a> or
+         <a href=3D#htmlvideoelement>HTMLVideoElement</a> or
+         <a href=3D#htmlcanvaselement>HTMLCanvasElement</a> =
or
+         <a href=3D#canvasrenderingcontext2d>CanvasRenderingContex=
t2D</a> or
+         <a href=3D#imagebitmap>ImageBitmap</a>) <dfn id=3D=
canvasimagesource>CanvasImageSource</dfn>;
+
+enum <dfn id=3Dcanvasfillrule>CanvasFillRule</dfn> { "&=
lt;a href=3D#dom-context-2d-fillrule-nonzero title=3Ddom-context-2d-fillR=
ule-nonzero>nonzero</a>", "<a href=3D#dom-context-2=
d-fillrule-evenodd title=3Ddom-context-2d-fillRule-evenodd>evenodd<=
/a>" };
+
+[<a href=3D#dom-context-2d title=3Ddom-context-2d>Constructor</=
a>(optional unsigned long width, unsigned long height)]
+interface <dfn id=3Dcanvasrenderingcontext2d>CanvasRenderingContex=
t2D</dfn> {
+
+  // back-reference to the canvas
+  readonly attribute <a href=3D#htmlcanvaselement>HTMLCanvasElemen=
t</a> <a href=3D#dom-context-2d-canvas title=3Ddom-context-2d-ca=
nvas>canvas</a>;
+
+  // canvas dimensions
+           attribute unsigned long <a href=3D#dom-context-2d-width ti=
tle=3Ddom-context-2d-width>width</a>;
+           attribute unsigned long <a href=3D#dom-context-2d-height t=
itle=3Ddom-context-2d-height>height</a>;
+
+  // for contexts that aren't directly <a href=3D#concept-canvas-fixe=
d title=3Dconcept-canvas-fixed>fixed</a> to a specific canvas
+  void <a href=3D#dom-context-2d-commit title=3Ddom-context-2d-commit=
>commit</a>(); // push the image to the <a href=3D#output-bit=
map>output bitmap</a>
+
+  // state
+  void <a href=3D#dom-context-2d-save title=3Ddom-context-2d-save>=
save</a>(); // push state on state stack
+  void <a href=3D#dom-context-2d-restore title=3Ddom-context-2d-resto=
re>restore</a>(); // pop state stack and restore state
+<!--
+  // v7 we've also received requests for:
+          attribute boolean <span title=3D"dom-context-2d-forceH=
ighQuality">forceHighQuality</span> // (default false)
+  // when enabled, it would prevent the UA from falling back on lower-qu=
ality but faster rendering routines
+  // useful e.g. for when an image manipulation app uses <canvas> =
both for UI previews and the actual work
+
+-->
+  // transformations (default transform is the identity matrix)
+           attribute <a href=3D#svgmatrix>SVGMatrix</a> <=
a href=3D#dom-context-2d-currenttransform title=3Ddom-context-2d-currentT=
ransform>currentTransform</a>;
+  void <a href=3D#dom-context-2d-scale title=3Ddom-context-2d-scale&g=
t;scale</a>(unrestricted double x, unrestricted double y);
+  void <a href=3D#dom-context-2d-rotate title=3Ddom-context-2d-rotate=
>rotate</a>(unrestricted double angle);
+  void <a href=3D#dom-context-2d-translate title=3Ddom-context-2d-tra=
nslate>translate</a>(unrestricted double x, unrestricted double =
y);
+  void <a href=3D#dom-context-2d-transform title=3Ddom-context-2d-tra=
nsform>transform</a>(unrestricted double a, unrestricted double =
b, unrestricted double c, unrestricted double d, unrestricted double e, u=
nrestricted double f);
+  void <a href=3D#dom-context-2d-settransform title=3Ddom-context-2d-=
setTransform>setTransform</a>(unrestricted double a, unrestricte=
d double b, unrestricted double c, unrestricted double d, unrestricted do=
uble e, unrestricted double f);
+  void <a href=3D#dom-context-2d-resettransform title=3Ddom-context-2=
d-resetTransform>resetTransform</a>();
+<!--
+  // v7 we've also received requests (though not many so far) for:
+  void skew(...);                             // is this common enough t=
hat one can't just use setTransform()?
+  void reflect(...);  and  void mirror(...);  // aren't negative values =
in scale() sufficient for these?
+
+-->
+  // compositing
+           attribute unrestricted double <a href=3D#dom-context-2d-gl=
obalalpha title=3Ddom-context-2d-globalAlpha>globalAlpha</a>; //=
 (default 1.0)
+           attribute DOMString <a href=3D#dom-context-2d-globalcompos=
iteoperation title=3Ddom-context-2d-globalCompositeOperation>globalCom=
positeOperation</a>; // (default source-over)
+
+  // image smoothing
+           attribute boolean <a href=3D#dom-context-2d-imagesmoothing=
enabled title=3Ddom-context-2d-imageSmoothingEnabled>imageSmoothingEna=
bled</a>; // (default true)
+<!--
+  // v7 we've also received requests for:
+  - turning off antialiasing to avoid seams when patterns are painted ne=
xt to each other
+    - might be better to overdraw?
+    - might be better to just draw at a higher res then downsample, like=
 for 3d?
+  - nested layers
+    - the ability to composite an entire set of drawing operations with =
one shadow all at once
+      http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2008-August/01=
5567.html
+
+-->
+  // colors and styles (see also the <a href=3D#canvasdrawingstyles&g=
t;CanvasDrawingStyles</a> interface)
+           attribute (DOMString or CanvasGradient or CanvasPattern) <=
a href=3D#dom-context-2d-strokestyle title=3Ddom-context-2d-strokeStyle&g=
t;strokeStyle</a>; // (default black)
+           attribute (DOMString or CanvasGradient or CanvasPattern) <=
a href=3D#dom-context-2d-fillstyle title=3Ddom-context-2d-fillStyle>fi=
llStyle</a>; // (default black)
+  <a href=3D#canvasgradient>CanvasGradient</a> <a href=3D=
#dom-context-2d-createlineargradient title=3Ddom-context-2d-createLinearG=
radient>createLinearGradient</a>(double x0, double y0, double x1=
, double y1);
+  <a href=3D#canvasgradient>CanvasGradient</a> <a href=3D=
#dom-context-2d-createradialgradient title=3Ddom-context-2d-createRadialG=
radient>createRadialGradient</a>(double x0, double y0, double r0=
, double x1, double y1, double r1);
+  <a href=3D#canvaspattern>CanvasPattern</a> <a href=3D#d=
om-context-2d-createpattern title=3Ddom-context-2d-createPattern>creat=
ePattern</a>(<a href=3D#canvasimagesource>CanvasImageSource&l=
t;/a> image, [TreatNullAs=3DEmptyString] DOMString repetition);
+<!--
+  // v8 we received one request from Ralf Richard G&oml;bel for a ne=
w kind of pattern: a hatch.
+  // basically it would be a series of dash styles, angles, line widths,=
 and offsets
+-->
+  // shadows
+           attribute unrestricted double <a href=3D#dom-context-2d-sh=
adowoffsetx title=3Ddom-context-2d-shadowOffsetX>shadowOffsetX</a&g=
t;; // (default 0)
+           attribute unrestricted double <a href=3D#dom-context-2d-sh=
adowoffsety title=3Ddom-context-2d-shadowOffsetY>shadowOffsetY</a&g=
t;; // (default 0)
+           attribute unrestricted double <a href=3D#dom-context-2d-sh=
adowblur title=3Ddom-context-2d-shadowBlur>shadowBlur</a>; // (d=
efault 0)
+           attribute DOMString <a href=3D#dom-context-2d-shadowcolor =
title=3Ddom-context-2d-shadowColor>shadowColor</a>; // (default =
transparent black)
+
+  // rects
+  void <a href=3D#dom-context-2d-clearrect title=3Ddom-context-2d-cle=
arRect>clearRect</a>(unrestricted double x, unrestricted double =
y, unrestricted double w, unrestricted double h);
+  void <a href=3D#dom-context-2d-fillrect title=3Ddom-context-2d-fill=
Rect>fillRect</a>(unrestricted double x, unrestricted double y, =
unrestricted double w, unrestricted double h);
+  void <a href=3D#dom-context-2d-strokerect title=3Ddom-context-2d-st=
rokeRect>strokeRect</a>(unrestricted double x, unrestricted doub=
le y, unrestricted double w, unrestricted double h);
+
+  // path API (see also <a href=3D#canvaspathmethods>CanvasPathMet=
hods</a>)
+  void <a href=3D#dom-context-2d-beginpath title=3Ddom-context-2d-beg=
inPath>beginPath</a>();
+  void <a href=3D#dom-context-2d-fill title=3Ddom-context-2d-fill>=
fill</a>(optional <a href=3D#canvasfillrule>CanvasFillRule&lt=
;/a> fillRule =3D "<a href=3D#dom-context-2d-fillrule-nonzero =
title=3Ddom-context-2d-fillRule-nonzero>nonzero</a>");
+  void <a href=3D#dom-context-2d-fill title=3Ddom-context-2d-fill>=
fill</a>(<a href=3D#path>Path</a> path, optional <a =
href=3D#canvasfillrule>CanvasFillRule</a> fillRule =3D "&lt=
;a href=3D#dom-context-2d-fillrule-nonzero title=3Ddom-context-2d-fillRul=
e-nonzero>nonzero</a>");
+  void <a href=3D#dom-context-2d-stroke title=3Ddom-context-2d-stroke=
>stroke</a>();
+  void <a href=3D#dom-context-2d-stroke title=3Ddom-context-2d-stroke=
>stroke</a>(<a href=3D#path>Path</a> path);
+  void <a href=3D#dom-context-2d-drawsystemfocusring title=3Ddom-cont=
ext-2d-drawSystemFocusRing>drawSystemFocusRing</a>(<a href=3D=
#element>Element</a> element);
+  void <a href=3D#dom-context-2d-drawsystemfocusring title=3Ddom-cont=
ext-2d-drawSystemFocusRing>drawSystemFocusRing</a>(<a href=3D=
#path>Path</a> path, <a href=3D#element>Element</a> =
element);
+  boolean <a href=3D#dom-context-2d-drawcustomfocusring title=3Ddom-c=
ontext-2d-drawCustomFocusRing>drawCustomFocusRing</a>(<a href=
=3D#element>Element</a> element);
+  boolean <a href=3D#dom-context-2d-drawcustomfocusring title=3Ddom-c=
ontext-2d-drawCustomFocusRing>drawCustomFocusRing</a>(<a href=
=3D#path>Path</a> path, <a href=3D#element>Element</a&g=
t; element);
+  void <a href=3D#dom-context-2d-scrollpathintoview title=3Ddom-conte=
xt-2d-scrollPathIntoView>scrollPathIntoView</a>();
+  void <a href=3D#dom-context-2d-scrollpathintoview title=3Ddom-conte=
xt-2d-scrollPathIntoView>scrollPathIntoView</a>(<a href=3D#pa=
th>Path</a> path);
+  void <a href=3D#dom-context-2d-clip title=3Ddom-context-2d-clip>=
clip</a>(optional <a href=3D#canvasfillrule>CanvasFillRule&lt=
;/a> fillRule =3D "<a href=3D#dom-context-2d-fillrule-nonzero =
title=3Ddom-context-2d-fillRule-nonzero>nonzero</a>");
+  void <a href=3D#dom-context-2d-clip title=3Ddom-context-2d-clip>=
clip</a>(<a href=3D#path>Path</a> path, optional <a =
href=3D#canvasfillrule>CanvasFillRule</a> fillRule =3D "&lt=
;a href=3D#dom-context-2d-fillrule-nonzero title=3Ddom-context-2d-fillRul=
e-nonzero>nonzero</a>");
+  void <a href=3D#dom-context-2d-resetclip title=3Ddom-context-2d-res=
etClip>resetClip</a>();
+  boolean <a href=3D#dom-context-2d-ispointinpath title=3Ddom-context=
-2d-isPointInPath>isPointInPath</a>(unrestricted double x, unres=
tricted double y, optional <a href=3D#canvasfillrule>CanvasFillRule=
</a> fillRule =3D "<a href=3D#dom-context-2d-fillrule-nonze=
ro title=3Ddom-context-2d-fillRule-nonzero>nonzero</a>");
+  boolean <a href=3D#dom-context-2d-ispointinpath title=3Ddom-context=
-2d-isPointInPath>isPointInPath</a>(<a href=3D#path>Path&l=
t;/a> path, unrestricted double x, unrestricted double y, optional &lt=
;a href=3D#canvasfillrule>CanvasFillRule</a> fillRule =3D "=
<a href=3D#dom-context-2d-fillrule-nonzero title=3Ddom-context-2d-fill=
Rule-nonzero>nonzero</a>");
+  boolean <a href=3D#dom-context-2d-ispointinstroke title=3Ddom-conte=
xt-2d-isPointInStroke>isPointInStroke</a>(unrestricted double x,=
 unrestricted double y);
+  boolean <a href=3D#dom-context-2d-ispointinstroke title=3Ddom-conte=
xt-2d-isPointInStroke>isPointInStroke</a>(<a href=3D#path>=
Path</a> path, unrestricted double x, unrestricted double y);
+
+  // text (see also the <a href=3D#canvasdrawingstyles>CanvasDrawi=
ngStyles</a> interface)
+  void <a href=3D#dom-context-2d-filltext title=3Ddom-context-2d-fill=
Text>fillText</a>(DOMString text, unrestricted double x, unrestr=
icted double y, optional unrestricted double maxWidth);
+  void <a href=3D#dom-context-2d-stroketext title=3Ddom-context-2d-st=
rokeText>strokeText</a>(DOMString text, unrestricted double x, u=
nrestricted double y, optional unrestricted double maxWidth);<!-- v6DV=
T
+  void <span title=3D"dom-context-2d-fillVerticalText">f=
illVerticalText</span>(DOMString text, unrestricted double x, unres=
tricted double y, optional unrestricted double maxHeight);
+  void <span title=3D"dom-context-2d-strokeVerticalText"&gt=
;strokeVerticalText</span>(DOMString text, unrestricted double x, u=
nrestricted double y, optional unrestricted double maxHeight); -->
+  <a href=3D#textmetrics>TextMetrics</a> <a href=3D#dom-c=
ontext-2d-measuretext title=3Ddom-context-2d-measureText>measureText&l=
t;/a>(DOMString text);
+
+  // drawing images
+  void <a href=3D#dom-context-2d-drawimage title=3Ddom-context-2d-dra=
wImage>drawImage</a>(<a href=3D#canvasimagesource>CanvasIm=
ageSource</a> image, unrestricted double dx, unrestricted double dy=
);
+  void <a href=3D#dom-context-2d-drawimage title=3Ddom-context-2d-dra=
wImage>drawImage</a>(<a href=3D#canvasimagesource>CanvasIm=
ageSource</a> image, unrestricted double dx, unrestricted double dy=
, unrestricted double dw, unrestricted double dh);
+  void <a href=3D#dom-context-2d-drawimage title=3Ddom-context-2d-dra=
wImage>drawImage</a>(<a href=3D#canvasimagesource>CanvasIm=
ageSource</a> image, unrestricted double sx, unrestricted double sy=
, unrestricted double sw, unrestricted double sh, unrestricted double dx,=
 unrestricted double dy, unrestricted double dw, unrestricted double dh);
+
+  // hit regions
+  void <a href=3D#dom-context-2d-addhitregion title=3Ddom-context-2d-=
addHitRegion>addHitRegion</a>(optional <a href=3D#hitregionop=
tions>HitRegionOptions</a> options);
+  void <a href=3D#dom-context-2d-removehitregion title=3Ddom-context-=
2d-removeHitRegion>removeHitRegion</a>(DOMString id);
+
+  // pixel manipulation
+  <a href=3D#imagedata>ImageData</a> <a href=3D#dom-conte=
xt-2d-createimagedata title=3Ddom-context-2d-createImageData>createIma=
geData</a>(double sw, double sh);
+  <a href=3D#imagedata>ImageData</a> <a href=3D#dom-conte=
xt-2d-createimagedata title=3Ddom-context-2d-createImageData>createIma=
geData</a>(<a href=3D#imagedata>ImageData</a> imagedata=
);
+  <a href=3D#imagedata>ImageData</a> <a href=3D#dom-conte=
xt-2d-createimagedatahd title=3Ddom-context-2d-createImageDataHD>creat=
eImageDataHD</a>(double sw, double sh);
+  <a href=3D#imagedata>ImageData</a> <a href=3D#dom-conte=
xt-2d-getimagedata title=3Ddom-context-2d-getImageData>getImageData&lt=
;/a>(double sx, double sy, double sw, double sh);
+  <a href=3D#imagedata>ImageData</a> <a href=3D#dom-conte=
xt-2d-getimagedatahd title=3Ddom-context-2d-getImageDataHD>getImageDat=
aHD</a>(double sx, double sy, double sw, double sh);
+  void <a href=3D#dom-context-2d-putimagedata title=3Ddom-context-2d-=
putImageData>putImageData</a>(<a href=3D#imagedata>ImageDa=
ta</a> imagedata, double dx, double dy);
+  void <a href=3D#dom-context-2d-putimagedata title=3Ddom-context-2d-=
putImageData>putImageData</a>(<a href=3D#imagedata>ImageDa=
ta</a> imagedata, double dx, double dy, double dirtyX, double dirty=
Y, double dirtyWidth, double dirtyHeight);
+  void <a href=3D#dom-context-2d-putimagedatahd title=3Ddom-context-2=
d-putImageDataHD>putImageDataHD</a>(<a href=3D#imagedata>I=
mageData</a> imagedata, double dx, double dy);
+  void <a href=3D#dom-context-2d-putimagedatahd title=3Ddom-context-2=
d-putImageDataHD>putImageDataHD</a>(<a href=3D#imagedata>I=
mageData</a> imagedata, double dx, double dy, double dirtyX, double=
 dirtyY, double dirtyWidth, double dirtyHeight);
+};
+<a href=3D#canvasrenderingcontext2d>CanvasRenderingContext2D</a=
> implements <a href=3D#canvasdrawingstyles>CanvasDrawingStyles&=
lt;/a>;
+<a href=3D#canvasrenderingcontext2d>CanvasRenderingContext2D</a=
> implements <a href=3D#canvaspathmethods>CanvasPathMethods</=
a>;
+
+[NoInterfaceObject]
+interface <dfn id=3Dcanvasdrawingstyles>CanvasDrawingStyles</df=
n> {
+  // line caps/joins
+           attribute unrestricted double <a href=3D#dom-context-2d-li=
newidth title=3Ddom-context-2d-lineWidth>lineWidth</a>; // (defa=
ult 1)
+           attribute DOMString <a href=3D#dom-context-2d-linecap titl=
e=3Ddom-context-2d-lineCap>lineCap</a>; // "butt", &qu=
ot;round", "square" (default "butt")
+           attribute DOMString <a href=3D#dom-context-2d-linejoin tit=
le=3Ddom-context-2d-lineJoin>lineJoin</a>; // "round",=
 "bevel", "miter" (default "miter")
+           attribute unrestricted double <a href=3D#dom-context-2d-mi=
terlimit title=3Ddom-context-2d-miterLimit>miterLimit</a>; // (d=
efault 10)
+
+  // dashed lines
+  void <a href=3D#dom-context-2d-setlinedash title=3Ddom-context-2d-s=
etLineDash>setLineDash</a>(sequence<unrestricted double&a=
mp;gt; segments); // default empty
+  sequence<unrestricted double> <a href=3D#dom-context-=
2d-getlinedash title=3Ddom-context-2d-getLineDash>getLineDash</a&gt=
;();
+           attribute unrestricted double <a href=3D#dom-context-2d-li=
nedashoffset title=3Ddom-context-2d-lineDashOffset>lineDashOffset</=
a>;
+
+  // text
+           attribute DOMString <a href=3D#dom-context-2d-font title=3D=
dom-context-2d-font>font</a>; // (default 10px sans-serif)
+           attribute DOMString <a href=3D#dom-context-2d-textalign ti=
tle=3Ddom-context-2d-textAlign>textAlign</a>; // "start&quo=
t;, "end", "left", "right", "center&qu=
ot; (default: "start")
+           attribute DOMString <a href=3D#dom-context-2d-textbaseline=
 title=3Ddom-context-2d-textBaseline>textBaseline</a>; // "=
top", "hanging", "middle", "alphabetic&quot=
;, "ideographic", "bottom" (default: "alphabetic=
")
+           attribute DOMString <a href=3D#dom-context-2d-direction ti=
tle=3Ddom-context-2d-direction>direction</a>; // "ltr"=
, "rtl"<!--, "auto"-->, "inherit" (de=
fault: "inherit")
+};
+
+[NoInterfaceObject]
+interface <dfn id=3Dcanvaspathmethods>CanvasPathMethods</dfn&gt=
; {
+  // shared path API methods
+  void <a href=3D#dom-context-2d-closepath title=3Ddom-context-2d-clo=
sePath>closePath</a>();
+  void <a href=3D#dom-context-2d-moveto title=3Ddom-context-2d-moveTo=
>moveTo</a>(unrestricted double x, unrestricted double y);
+  void <a href=3D#dom-context-2d-lineto title=3Ddom-context-2d-lineTo=
>lineTo</a>(unrestricted double x, unrestricted double y);
+  void <a href=3D#dom-context-2d-quadraticcurveto title=3Ddom-context=
-2d-quadraticCurveTo>quadraticCurveTo</a>(unrestricted double cp=
x, unrestricted double cpy, unrestricted double x, unrestricted double y)=
;
+  void <a href=3D#dom-context-2d-beziercurveto title=3Ddom-context-2d=
-bezierCurveTo>bezierCurveTo</a>(unrestricted double cp1x, unres=
tricted double cp1y, unrestricted double cp2x, unrestricted double cp2y, =
unrestricted double x, unrestricted double y);
+  void <a href=3D#dom-context-2d-arcto title=3Ddom-context-2d-arcTo&g=
t;arcTo</a>(unrestricted double x1, unrestricted double y1, unrestr=
icted double x2, unrestricted double y2, unrestricted double radius); &lt=
;!-- see ARC-ORDER note below -->
+  void <a href=3D#dom-context-2d-arcto title=3Ddom-context-2d-arcTo&g=
t;arcTo</a>(unrestricted double x1, unrestricted double y1, unrestr=
icted double x2, unrestricted double y2, unrestricted double radiusX, unr=
estricted double radiusY, unrestricted double rotation); <!-- see ARC-=
ORDER note below -->
+  void <a href=3D#dom-context-2d-rect title=3Ddom-context-2d-rect>=
rect</a>(unrestricted double x, unrestricted double y, unrestricted=
 double w, unrestricted double h);
+  void <a href=3D#dom-context-2d-arc title=3Ddom-context-2d-arc>ar=
c</a>(unrestricted double x, unrestricted double y, unrestricted do=
uble radius, unrestricted double startAngle, unrestricted double endAngle=
, optional boolean anticlockwise =3D false); <!-- see ARC-ORDER note b=
elow -->
+  void <a href=3D#dom-context-2d-ellipse title=3Ddom-context-2d-ellip=
se>ellipse</a>(unrestricted double x, unrestricted double y, unr=
estricted double radiusX, unrestricted double radiusY, unrestricted doubl=
e rotation, unrestricted double startAngle, unrestricted double endAngle,=
 optional boolean anticlockwise =3D false); <!-- see ARC-ORDER note be=
low -->
+};
+
+interface <dfn id=3Dcanvasgradient>CanvasGradient</dfn> {
+  // opaque object
+  void <a href=3D#dom-canvasgradient-addcolorstop title=3Ddom-canvasg=
radient-addColorStop>addColorStop</a>(double offset, DOMString c=
olor);
+};
+
+interface <dfn id=3Dcanvaspattern>CanvasPattern</dfn> {
+  // opaque object
+  void <a href=3D#dom-canvaspattern-settransform title=3Ddom-canvaspa=
ttern-setTransform>setTransform</a>(<a href=3D#svgmatrix>S=
VGMatrix</a> transform);
+};
+
+interface <dfn id=3Dtextmetrics>TextMetrics</dfn> {
+  // x-direction
+  readonly attribute double <a href=3D#dom-textmetrics-width title=3D=
dom-textmetrics-width>width</a>; // advance width
+  readonly attribute double <a href=3D#dom-textmetrics-actualbounding=
boxleft title=3Ddom-textmetrics-actualBoundingBoxLeft>actualBoundingBo=
xLeft</a>;
+  readonly attribute double <a href=3D#dom-textmetrics-actualbounding=
boxright title=3Ddom-textmetrics-actualBoundingBoxRight>actualBounding=
BoxRight</a>;
+
+  // y-direction
+  readonly attribute double <a href=3D#dom-textmetrics-fontboundingbo=
xascent title=3Ddom-textmetrics-fontBoundingBoxAscent>fontBoundingBoxA=
scent</a>;
+  readonly attribute double <a href=3D#dom-textmetrics-fontboundingbo=
xdescent title=3Ddom-textmetrics-fontBoundingBoxDescent>fontBoundingBo=
xDescent</a>;
+  readonly attribute double <a href=3D#dom-textmetrics-actualbounding=
boxascent title=3Ddom-textmetrics-actualBoundingBoxAscent>actualBoundi=
ngBoxAscent</a>;
+  readonly attribute double <a href=3D#dom-textmetrics-actualbounding=
boxdescent title=3Ddom-textmetrics-actualBoundingBoxDescent>actualBoun=
dingBoxDescent</a>;
+  readonly attribute double <a href=3D#dom-textmetrics-emheightascent=
 title=3Ddom-textmetrics-emHeightAscent>emHeightAscent</a>;
+  readonly attribute double <a href=3D#dom-textmetrics-emheightdescen=
t title=3Ddom-textmetrics-emHeightDescent>emHeightDescent</a>;
+  readonly attribute double <a href=3D#dom-textmetrics-hangingbaselin=
e title=3Ddom-textmetrics-hangingBaseline>hangingBaseline</a>;
+  readonly attribute double <a href=3D#dom-textmetrics-alphabeticbase=
line title=3Ddom-textmetrics-alphabeticBaseline>alphabeticBaseline<=
/a>;
+  readonly attribute double <a href=3D#dom-textmetrics-ideographicbas=
eline title=3Ddom-textmetrics-ideographicBaseline>ideographicBaseline&=
lt;/a>;
+};
+
+dictionary <dfn id=3Dhitregionoptions>HitRegionOptions</dfn>=
 {
+  <a href=3D#path>Path</a>? <span title=3Ddom-HitRegionOp=
tions-path>path</span> =3D null;
+  <a href=3D#canvasfillrule>CanvasFillRule</a> <span titl=
e=3Ddom-HitRegionOptions-fillRule>fillRule</span> =3D "<=
a href=3D#dom-context-2d-fillrule-nonzero title=3Ddom-context-2d-fillRule=
-nonzero>nonzero</a>";
+<!--  <span>SVGMatrix</span>? <span title=3D"dom-=
HitRegionOptions-transform">transform</span> =3D null;
+-->  DOMString <span title=3Ddom-HitRegionOptions-id>id</spa=
n> =3D ""; <!-- "" is converted to null interna=
lly by addHitRegion() -->
+  DOMString? <span title=3Ddom-HitRegionOptions-parentID>parentID&=
lt;/span> =3D null;
+  DOMString <span title=3Ddom-HitRegionOptions-cursor>cursor</s=
pan> =3D "inherit";
+  // for control-backed regions:
+  <a href=3D#element>Element</a>? <span title=3Ddom-HitRe=
gionOptions-control>control</span> =3D null;
+  // for unbacked regions:
+  DOMString? <span title=3Ddom-HitRegionOptions-label>label</sp=
an> =3D null;
+  DOMString? <span title=3Ddom-HitRegionOptions-role>role</span=
> =3D null;
+};
+
+interface <dfn id=3Dimagedata>ImageData</dfn> {
+  readonly attribute unsigned long <a href=3D#dom-imagedata-width tit=
le=3Ddom-imagedata-width>width</a>;
+  readonly attribute unsigned long <a href=3D#dom-imagedata-height ti=
tle=3Ddom-imagedata-height>height</a>;
+  readonly attribute double <a href=3D#dom-imagedata-resolution title=
=3Ddom-imagedata-resolution>resolution</a>;
+  readonly attribute <a href=3D#uint8clampedarray>Uint8ClampedArra=
y</a> <a href=3D#dom-imagedata-data title=3Ddom-imagedata-data&g=
t;data</a>;
+};
+
+[<a href=3D#dom-drawingstyle title=3Ddom-DrawingStyle>Constructor&=
lt;/a>(optional <a href=3D#element>Element</a> scope)]
+interface <dfn id=3Ddrawingstyle>DrawingStyle</dfn> { };
+<a href=3D#drawingstyle>DrawingStyle</a> implements <a hr=
ef=3D#canvasdrawingstyles>CanvasDrawingStyles</a>;
+
+[<a href=3D#dom-path title=3Ddom-Path>Constructor</a>,
+ <a href=3D#dom-path-copy title=3Ddom-Path-copy>Constructor</a&=
gt;(<a href=3D#path>Path</a> path),
+ <a href=3D#dom-path-withdata title=3Ddom-Path-withdata>Constructo=
r</a>(DOMString d)]
+interface <dfn id=3Dpath>Path</dfn> {
+  void <a href=3D#dom-path-addpath title=3Ddom-path-addPath>addPat=
h</a>(<a href=3D#path>Path</a> path, <a href=3D#svgm=
atrix>SVGMatrix</a>? transformation);
+  void <a href=3D#dom-path-addpathbystrokingpath title=3Ddom-path-add=
PathByStrokingPath>addPathByStrokingPath</a>(<a href=3D#path&=
gt;Path</a> path, <a href=3D#canvasdrawingstyles>CanvasDrawin=
gStyles</a> styles, <a href=3D#svgmatrix>SVGMatrix</a>?=
 transformation);
+  void <a href=3D#dom-path-addtext title=3Ddom-path-addText>addTex=
t</a>(DOMString text, <a href=3D#canvasdrawingstyles>CanvasDr=
awingStyles</a> styles, <a href=3D#svgmatrix>SVGMatrix</a&=
gt;? transformation, unrestricted double x, unrestricted double y, option=
al unrestricted double maxWidth);
+  void <a href=3D#dom-path-addpathbystrokingtext title=3Ddom-path-add=
PathByStrokingText>addPathByStrokingText</a>(DOMString text, &lt=
;a href=3D#canvasdrawingstyles>CanvasDrawingStyles</a> styles, &=
lt;a href=3D#svgmatrix>SVGMatrix</a>? transformation, unrestrict=
ed double x, unrestricted double y, optional unrestricted double maxWidth=
);
+  void <a href=3D#dom-path-addtext title=3Ddom-path-addText>addTex=
t</a>(DOMString text, <a href=3D#canvasdrawingstyles>CanvasDr=
awingStyles</a> styles, <a href=3D#svgmatrix>SVGMatrix</a&=
gt;? transformation, <a href=3D#path>Path</a> path, optional =
unrestricted double maxWidth);
+  void <a href=3D#dom-path-addpathbystrokingtext title=3Ddom-path-add=
PathByStrokingText>addPathByStrokingText</a>(DOMString text, &lt=
;a href=3D#canvasdrawingstyles>CanvasDrawingStyles</a> styles, &=
lt;a href=3D#svgmatrix>SVGMatrix</a>? transformation, <a href=
=3D#path>Path</a> path, optional unrestricted double maxWidth);
+};
+<a href=3D#path>Path</a> implements <a href=3D#canvaspath=
methods>CanvasPathMethods</a>;</pre>
+
+ <!-- ARC-ORDER note (see above):
+      some demos rely on the precise order of the arc() and arcTo()
+      methods, see https://bugzilla.mozilla.org/show_bug.cgi?id=3D623437
+      for an example, and its duplicates for more -->
+
+  <dl class=3Ddomintro><dt><var title=3D"">c=
ontext</var> =3D <var title=3D"">canvas</var>=
 . <code title=3Ddom-canvas-getContext><a href=3D#dom-canvas-get=
context>getContext</a></code>('2d')</dt>
+
+   <dd>
+
+    <p>Returns a <code><a href=3D#canvasrenderingcontext2=
d>CanvasRenderingContext2D</a></code> object that is perma=
nently bound to a
+    particular <code><a href=3D#the-canvas-element>canvas&lt=
;/a></code> element.</p>
+
+   </dd>
+
+   <dt><var title=3D"">context</var> =3D new=
 <code title=3Ddom-context-2d><a href=3D#dom-context-2d>Canva=
sRenderingContext2D</a></code>( [ <var title=3D"&quot=
;>width</var>, <var title=3D"">height</var&gt=
; ] )</dt>
+
+   <dd>
+
+    <p>Returns an unbound <code><a href=3D#canvasrenderin=
gcontext2d>CanvasRenderingContext2D</a></code> object with=
 an implied bitmap with
+    the given dimensions in CSS pixels (300x150, if the arguments are om=
itted).</p>
+
+   </dd>
+
+   <dt><var title=3D"">context</var> . <c=
ode title=3Ddom-context-2d-canvas><a href=3D#dom-context-2d-canvas&=
gt;canvas</a></code></dt>
+
+   <dd>
+
+    <p>Returns the <code><a href=3D#the-canvas-element&gt=
;canvas</a></code> element, if the rendering context was obta=
ined using the
+    <code title=3Ddom-canvas-getContext><a href=3D#dom-canvas-g=
etcontext>getContext()</a></code> method.</p>
+
+   </dd>
+
+   <dt><var title=3D"">context</var> . <c=
ode title=3Ddom-context-2d-width><a href=3D#dom-context-2d-width&gt=
;width</a></code></dt>
+   <dt><var title=3D"">context</var> . <c=
ode title=3Ddom-context-2d-height><a href=3D#dom-context-2d-height&=
gt;height</a></code></dt>
+
+   <dd>
+
+    <p>Return the dimensions of the bitmap, in CSS pixels.</p&g=
t;
+
+    <p>Can be set, to update the bitmap's dimensions. If the rende=
ring context is bound to a canvas,
+    this will also update the canvas' intrinsic dimensions.</p>
+
+   </dd>
+
+   <dt><var title=3D"">context</var> . <c=
ode title=3Ddom-context-2d-commit><a href=3D#dom-context-2d-commit&=
gt;commit</a></code>()</dt>
+
+   <dd>
+
+    <p>If the rendering context is bound to a <code><a hr=
ef=3D#the-canvas-element>canvas</a></code>, display the cu=
rrent frame.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>A <code><a href=3D#canvasrenderingcontext2d>Canva=
sRenderingContext2D</a></code> object can be obtained in two =
ways: the <code title=3Ddom-canvas-getContext><a href=3D#dom-can=
vas-getcontext>getContext()</a></code> method on a <cod=
e><a href=3D#the-canvas-element>canvas</a></code> el=
ement (which
+  invokes the <a href=3D#2d-context-creation-algorithm>2D context =
creation algorithm</a>), and the <code title=3Ddom-context-2d&gt=
;<a href=3D#dom-context-2d>CanvasRenderingContext2D()</a><=
/code> constructor.</p>
+
+  <p>A <code><a href=3D#canvasrenderingcontext2d>Canva=
sRenderingContext2D</a></code> object has a <dfn id=3Dscra=
tch-bitmap>scratch bitmap</dfn> and can be bound
+  to an <dfn id=3Doutput-bitmap>output bitmap</dfn>. These a=
re initialized when the object is created, and can be
+  subsequently adjusted when the rendering context is <a href=3D#conc=
ept-canvas-binding-steps title=3Dconcept-canvas-binding-steps>bound&lt=
;/a> or <a href=3D#concept-canvas-unbinding-steps title=3Dconcept-c=
anvas-unbinding-steps>unbound</a>. In some cases, these bitmaps =
are the same
+  underlying bitmap. In general, the <a href=3D#scratch-bitmap>scr=
atch bitmap</a> is what scripts interact with, and
+  the <a href=3D#output-bitmap>output bitmap</a> is what is =
being displayed. These bitmaps always have the same
+  dimensions.</p>
+
+<!--ADD-TOPIC:Security-->
+  <p>Each such bitmap has an <a href=3D#concept-canvas-origin-c=
lean title=3Dconcept-canvas-origin-clean>origin-clean</a> flag,
+  which can be set to true or false. Initially, when one of these bitmap=
s is created, its <a href=3D#concept-canvas-origin-clean title=3Dconce=
pt-canvas-origin-clean>origin-clean</a> flag must be set to true=
.</p>
+<!--REMOVE-TOPIC:Security-->
+
+  <p>These bitmaps also have a <a href=3D#hit-region-list>hi=
t region list</a>, which is described in a later section.
+  Initially, this list is empty. <a href=3D#scratch-bitmap title=3D&q=
uot;scratch bitmap">Scratch bitmaps</a> also have a
+  <dfn id=3Dlist-of-pending-interface-actions>list of pending inte=
rface actions</dfn>, which can contain instructions to draw the use=
r's
+  attention to a location on the bitmap, and instructions to scroll to a=
 location on the bitmap.
+  Initially, this list is also empty.</p>
+
+  <p>The <code><a href=3D#canvasrenderingcontext2d>Can=
vasRenderingContext2D</a></code> 2D rendering context represe=
nts a flat linear
+  Cartesian surface whose origin (0,0) is at the top left corner, with t=
he coordinate space having
+  <var title=3D"">x</var> values increasing when g=
oing right, and <var title=3D"">y</var> values
+  increasing when going down. The <var title=3D"">x</=
var>-coordinate of the right-most edge is equal to
+  the width of the rendering context's <a href=3D#scratch-bitmap>s=
cratch bitmap</a> in CSS pixels; similarly, the
+  <var title=3D"">y</var>-coordinate of the bottom=
-most edge is equal to the height of the rendering
+  context's <a href=3D#scratch-bitmap>scratch bitmap</a> in =
CSS pixels.</p>
+
+  <p>The size of the coordinate space does not necessarily represe=
nt the size of the actual bitmaps
+  that the user agent will use internally or during rendering. On high-d=
efinition displays, for
+  instance, the user agent may internally use bitmaps with two device pi=
xels per unit in the
+  coordinate space, so that the rendering remains at high quality throug=
hout. Anti-aliasing can
+  similarly be implemented using over-sampling with bitmaps of a higher =
resolution than the final
+  image on the display.</p>
+
+  <hr><p>The <dfn id=3D2d-context-creation-algorithm>2=
D context creation algorithm</dfn>, which is passed a <var title=
=3D"">target</var> (a
+  <code><a href=3D#the-canvas-element>canvas</a></c=
ode> element), consists of running the following steps:</p>
+
+  <ol><li><p>Create a new <code><a href=3D#ca=
nvasrenderingcontext2d>CanvasRenderingContext2D</a></code>=
 object.</li>
+
+   <li><p>Initialize its <code title=3Ddom-context-2d-can=
vas><a href=3D#dom-context-2d-canvas>canvas</a></code&g=
t; attribute to point to
+   <var title=3D"">target</var>.</li>
+
+   <li><p>Let the new <code><a href=3D#canvasrender=
ingcontext2d>CanvasRenderingContext2D</a></code> object's =
<a href=3D#output-bitmap>output bitmap</a> and
+   <a href=3D#scratch-bitmap>scratch bitmap</a> both be the =
same bitmap as <var title=3D"">target</var>'s bitma=
p (so
+   that they are shared).</li>
+
+   <li><p><a href=3D#concept-canvas-set-bitmap-dimensions=
 title=3Dconcept-canvas-set-bitmap-dimensions>Set bitmap dimensions&lt=
;/a> to the
+   numeric values of <var title=3D"">target</var>'=
s <code title=3Dattr-canvas-width><a href=3D#attr-canvas-width&g=
t;width</a></code> and
+   <code title=3Dattr-canvas-height><a href=3D#attr-canvas-heig=
ht>height</a></code> content attributes.</li>
+
+   <li><p>Return the new <code><a href=3D#canvasren=
deringcontext2d>CanvasRenderingContext2D</a></code> object=
.</li>
+
+  </ol><hr><p>The <dfn id=3Ddom-context-2d title=3D=
dom-context-2d><code>CanvasRenderingContext2D()</code><=
/dfn> constructor, when
+  invoked, must run the following steps:</p>
+
+  <ol><li><p>Create a new <code><a href=3D#ca=
nvasrenderingcontext2d>CanvasRenderingContext2D</a></code>=
 object.</li>
+
+   <li><p>Initialize its <code title=3Ddom-context-2d-can=
vas><a href=3D#dom-context-2d-canvas>canvas</a></code&g=
t; attribute to
+   null.</li>
+
+   <li><p>Let the new <code><a href=3D#canvasrender=
ingcontext2d>CanvasRenderingContext2D</a></code> object's =
<a href=3D#scratch-bitmap>scratch bitmap</a> be
+   a new bitmap.</li>
+
+   <li><p>If the constructor was called with arguments, let =
<var title=3D"">width</var> and <var title=3D&qu=
ot;">height</var> be the first and second arguments, respec=
tively. Otherwise, let <var title=3D"">width</var> =
and <var title=3D"">height</var> be 300 and 150, re=
spectively.</li>
+
+   <li><p><a href=3D#concept-canvas-set-bitmap-dimensions=
 title=3Dconcept-canvas-set-bitmap-dimensions>Set bitmap dimensions&lt=
;/a> to <var title=3D"">width</var> and <var =
title=3D"">height</var>.</li>
+
+   <li><p>Let the new <code><a href=3D#canvasrender=
ingcontext2d>CanvasRenderingContext2D</a></code> object ha=
ve no <a href=3D#output-bitmap>output
+   bitmap</a>.</li>
+
+<!--
+   <li><p><span>Start autocommitting the scratch bitma=
p</span> for the new
+   <code>CanvasRenderingContext2D</code> object.</p>&l=
t;/li>
+-->
+
+   <li><p>Return the new <code><a href=3D#canvasren=
deringcontext2d>CanvasRenderingContext2D</a></code> object=
.</li>
+
+  </ol><hr><p>When the user agent is required to <d=
fn id=3Dcommit-the-scratch-bitmap>commit the scratch bitmap</dfn&gt=
; for a rendering
+  context, it must run the following steps:
+
+  <ol><li><p>Let <var title=3D"">bitma=
p copy</var> be a copy of the rendering context's <a href=3D#scr=
atch-bitmap>scratch
+   bitmap</a>.</li>
+
+<!--ADD-TOPIC:Security-->
+   <li><p>Let <var title=3D"">origin-clean f=
lag copy</var> be a copy of the rendering context's
+   <a href=3D#scratch-bitmap>scratch bitmap</a>'s <a href=
=3D#concept-canvas-origin-clean title=3Dconcept-canvas-origin-clean>or=
igin-clean</a>
+   flag.</li>
+<!--REMOVE-TOPIC:Security-->
+
+   <li><p>Let <var title=3D"">hit region lis=
t copy</var> be a copy of the rendering context's
+   <a href=3D#scratch-bitmap>scratch bitmap</a>'s <a href=
=3D#hit-region-list>hit region list</a>.</li>
+
+   <li><p>Let <var title=3D"">list of pendin=
g interface actions copy</var> be a copy of the rendering
+   context's <a href=3D#scratch-bitmap>scratch bitmap</a>'s =
<a href=3D#list-of-pending-interface-actions>list of pending interf=
ace actions</a>.</li>
+
+   <li><p>Empty the <a href=3D#scratch-bitmap>scratch =
bitmap</a>'s <a href=3D#list-of-pending-interface-actions>lis=
t of pending interface actions</a>.</li>
+
+   <li><p>If the rendering context has no <a href=3D#outp=
ut-bitmap>output bitmap</a>, abort these steps.</li>
+
+   <li><p>Let <var title=3D"">output bitmap&=
lt;/var> be the rendering context's <a href=3D#output-bitmap>out=
put
+   bitmap</a>.</li>
+
+   <li><p>Let <var title=3D"">canvas</var=
> be the <code><a href=3D#the-canvas-element>canvas</a&=
gt;</code> element to which the rendering
+   context was most recently <a href=3D#concept-canvas-binding-steps =
title=3Dconcept-canvas-binding-steps>bound</a>.</li>
+
+   <li>
+
+    <p><a href=3D#queue-a-task>Queue a task</a> associ=
ated with <var title=3D"">canvas</var>' <code&gt=
;<a href=3D#document>Document</a></code>
+    to perform the following substeps:</p>
+
+    <ol><li><p>Overwrite <var title=3D""&=
gt;output bitmap</var> with <var title=3D"">bitmap
+     copy</var>.</li>
+
+<!--ADD-TOPIC:Security-->
+     <li><p>Overwrite <var title=3D"">output=
 bitmap</var>'s <a href=3D#concept-canvas-origin-clean title=3Dc=
oncept-canvas-origin-clean>origin-clean</a> flag with <var ti=
tle=3D"">origin-clean
+     flag copy</var>.</li>
+<!--REMOVE-TOPIC:Security-->
+
+     <li><p>Overwrite <var title=3D"">output=
 bitmap</var>'s <a href=3D#hit-region-list>hit region list&lt=
;/a> with <var title=3D"">hit region list copy</var=
>.</li>
+
+     <li><p>Follow the directions in the <var title=3D&qu=
ot;">list of pending interface actions
+     copy</var>.</li>
+
+    </ol></li>
+
+  </ol><p>The algorithm above must use the <dfn id=3Dcanv=
as-updating-task-source>canvas updating task source</dfn> (which=
 is just used by
+  this algorithm).</p>
+
+<!--(right now we're requiring commit())
+  <p>When a user agent is to <dfn>start autocommitting the s=
cratch bitmap</dfn> for a rendering
+  context, it must asynchronously start running the following algorithm.=
 This algorithm interacts
+  closely with the <span>event loop</span> mechanism; in par=
ticular, it has a <span>synchronous
+  section</span> (which is triggered as part of the <span>ev=
ent loop</span> algorithm). The steps in
+  that section are marked with ⌛.</p>
+
+  <ol>
+
+   <li><p><i>Top</i>: <span>Await a stable=
 state</span>. The <span>synchronous section</span>
+   consists of the following steps. (The steps in the <span>synchr=
onous section</span> are marked
+   with ⌛.)</p></li>
+
+   <li><p>⌛ <span>Commit the scratch bitmap=
</span> for the rendering context.</p></li>
+
+   <li><p>End the <span>synchronous section</span&g=
t;, continuing the remaining steps
+   asynchronously.</p></li>
+
+   <li><p>Return to the step labeled <i>top</i>.=
</p></li>
+
+  </ol>
+-->
+
+  <p>The <dfn id=3Ddom-context-2d-commit title=3Ddom-context-2d=
-commit><code>commit()</code></dfn> method must run =
the
+  following steps:</p>
+
+  <ol><li><p>If the rendering context's <a href=3D#=
concept-canvas-context-bitmap-mode title=3Dconcept-canvas-context-bitmap-=
mode>context bitmap
+   mode</a> is <a href=3D#concept-canvas-bound title=3Dconcept-=
canvas-bound>fixed</a>, throw an
+   <code><a href=3D#invalidstateerror>InvalidStateError</=
a></code> exception and abort these steps.</li>
+
+   <li><p><a href=3D#commit-the-scratch-bitmap>Commit =
the scratch bitmap</a> for the rendering context.</li>
+
+  </ol><p class=3Dnote>The <a href=3D#scratch-bitmap>s=
cratch bitmap</a> is only <a href=3D#commit-the-scratch-bitmap t=
itle=3D"commit the scratch
+  bitmap">committed</a> when the <code title=3Ddom-cont=
ext-2d-commit><a href=3D#dom-context-2d-commit>commit()</a&gt=
;</code> method is
+  called. (This doesn't matter for <code><a href=3D#the-canvas-=
element>canvas</a></code> elements in <a href=3D#concep=
t-canvas-direct-2d title=3Dconcept-canvas-direct-2d>direct-2d</a&gt=
; mode, since there the <a href=3D#scratch-bitmap>scratch
+  bitmap</a> is also the <code><a href=3D#the-canvas-elem=
ent>canvas</a></code> element's bitmap so every drawing op=
eration is
+  immediately drawn.)</p>
+
+  <hr><p>When the user agent is to <dfn id=3Dconcept-canv=
as-set-bitmap-dimensions title=3Dconcept-canvas-set-bitmap-dimensions>=
set bitmap
+  dimensions</dfn> to <var title=3D"">width</va=
r> and <var title=3D"">height</var>, it must run=
 the
+  following steps:</p>
+
+  <ol><li><p><a href=3D#reset-the-rendering-context=
-to-its-default-state>Reset the rendering context to its default state=
</a>.</li>
+
+   <li><p>Clear the <a href=3D#scratch-bitmap>scratch =
bitmap</a>'s <a href=3D#hit-region-list>hit region list</a=
> and its <a href=3D#list-of-pending-interface-actions>list of
+   pending interface actions</a>.</li>
+
+   <li><p>Resize the <a href=3D#scratch-bitmap>scratch=
 bitmap</a> to the new <var title=3D"">width</va=
r> and <var title=3D"">height</var> and clear it=
 to fully transparent black.</li>
+
+   <li><p>If the rendering context has an <a href=3D#outp=
ut-bitmap>output bitmap</a>, and the <a href=3D#scratch-bitma=
p>scratch
+   bitmap</a> is a different bitmap than the <a href=3D#output-=
bitmap>output bitmap</a>, then resize the
+   <a href=3D#output-bitmap>output bitmap</a> to the new &lt=
;var title=3D"">width</var> and <var title=3D"=
">height</var>
+   and clear it to fully transparent black.</li>
+
+   <li>
+
+    <p>If the rendering context's <a href=3D#concept-canvas-con=
text-bitmap-mode title=3Dconcept-canvas-context-bitmap-mode>context bi=
tmap
+    mode</a> is <a href=3D#concept-canvas-fixed title=3Dconcept=
-canvas-fixed>fixed</a>, then run these substeps:</p>
+
+    <ol><li><p>Let <var title=3D"">can=
vas</var> be the <code><a href=3D#the-canvas-element>ca=
nvas</a></code> element to which the rendering
+     context's <code title=3Ddom-context-2d-canvas><a href=3D#d=
om-context-2d-canvas>canvas</a></code> attribute was initi=
alized.</li>
+
+     <li><p>If the rendering context's <a href=3D#concept=
-canvas-context-bitmap-mode title=3Dconcept-canvas-context-bitmap-mode&gt=
;context
+     bitmap mode</a> is <a href=3D#concept-canvas-fixed title=3D=
concept-canvas-fixed>fixed</a> and the numeric value of
+     the <var title=3D"">canvas</var>' <code ti=
tle=3Dattr-canvas-width><a href=3D#attr-canvas-width>width</a=
></code> content attribute
+     differs from <var title=3D"">width</var>, the=
n set <var title=3D"">canvas</var>' <code title=3D=
attr-canvas-width><a href=3D#attr-canvas-width>width</a>&l=
t;/code> content attribute to the shortest possible string
+     representing <var title=3D"">width</var> as a=
 <a href=3D#valid-non-negative-integer>valid non-negative integer&l=
t;/a>.</li>
+
+     <li><p>If the rendering context's <a href=3D#concept=
-canvas-context-bitmap-mode title=3Dconcept-canvas-context-bitmap-mode&gt=
;context
+     bitmap mode</a> is <a href=3D#concept-canvas-fixed title=3D=
concept-canvas-fixed>fixed</a> and the numeric value of
+     the <var title=3D"">canvas</var>' <code ti=
tle=3Dattr-canvas-height><a href=3D#attr-canvas-height>height&lt=
;/a></code> content attribute
+     differs from <var title=3D"">height</var>, th=
en set <var title=3D"">canvas</var>' <code title=
=3Dattr-canvas-height><a href=3D#attr-canvas-height>height</a=
></code> content attribute to the shortest possible string
+     representing <var title=3D"">height</var> as =
a <a href=3D#valid-non-negative-integer>valid non-negative integer&=
lt;/a>.</li>
+
+    </ol></li>
+
+  </ol><div class=3Dexample>
+   <p>Only one square appears to be drawn in the following example=
:</p>
+   <pre>// canvas is a reference to a <canvas> eleme=
nt
+var context =3D canvas.getContext('2d');
+context.fillRect(0,0,50,50);
+canvas.setAttribute('width', '300'); // clears the canvas
+context.fillRect(0,100,50,50);
+canvas.width =3D canvas.width; // clears the canvas
+context.fillRect(100,0,50,50); // only this square remains</pre>
+  </div>
+
+  <hr><p>When the user agent is to run the <dfn id=3Dconc=
ept-canvas-unbinding-steps title=3Dconcept-canvas-unbinding-steps>unbi=
nding
+  steps</dfn> for a rendering context, it must run the following s=
teps:</p>
+
+  <ol><li><p><a href=3D#reset-the-rendering-context=
-to-its-default-state>Reset the rendering context to its default state=
</a>.</li>
+
+   <li><p>Clear the <a href=3D#scratch-bitmap>scratch =
bitmap</a>'s <a href=3D#hit-region-list>hit region list</a=
> and its <a href=3D#list-of-pending-interface-actions>list of
+   pending interface actions</a>.</li>
+
+   <li><p>Clear the <code><a href=3D#canvasrenderin=
gcontext2d>CanvasRenderingContext2D</a></code> object's &l=
t;a href=3D#scratch-bitmap>scratch bitmap</a> to a
+   transparent black.</li>
+
+<!--ADD-TOPIC:Security-->
+   <li><p>Set the <code><a href=3D#canvasrenderingc=
ontext2d>CanvasRenderingContext2D</a></code> object's <=
a href=3D#scratch-bitmap>scratch bitmap</a>'s <a href=3D#conc=
ept-canvas-origin-clean title=3Dconcept-canvas-origin-clean>origin-cle=
an</a> flag to true.</li>
+<!--REMOVE-TOPIC:Security-->
+
+   <li><p>Let the <code><a href=3D#canvasrenderingc=
ontext2d>CanvasRenderingContext2D</a></code> object have n=
o <a href=3D#output-bitmap>output
+   bitmap</a>.</li>
+
+  </ol><p>When the user agent is to run the <dfn id=3Dcon=
cept-canvas-binding-steps title=3Dconcept-canvas-binding-steps>binding=
 steps</dfn>
+  to bind the rendering context to the <code><a href=3D#the-can=
vas-element>canvas</a></code> element <var title=3D&quo=
t;">target</var>, it
+  must run the following steps:</p>
+
+  <ol><li><p><a href=3D#reset-the-rendering-context=
-to-its-default-state>Reset the rendering context to its default state=
</a>.</li>
+
+   <li><p>Clear the <a href=3D#scratch-bitmap>scratch =
bitmap</a>'s <a href=3D#hit-region-list>hit region list</a=
> and its <a href=3D#list-of-pending-interface-actions>list of
+   pending interface actions</a>.</li>
+
+   <li><p>Resize the <code><a href=3D#canvasrenderi=
ngcontext2d>CanvasRenderingContext2D</a></code> object's &=
lt;a href=3D#scratch-bitmap>scratch bitmap</a> to
+   the dimensions of <var title=3D"">target</var>'=
s bitmap and clear it to fully transparent
+   black.</li>
+
+<!--ADD-TOPIC:Security-->
+   <li><p>Set the <code><a href=3D#canvasrenderingc=
ontext2d>CanvasRenderingContext2D</a></code> object's <=
a href=3D#scratch-bitmap>scratch bitmap</a>'s <a href=3D#conc=
ept-canvas-origin-clean title=3Dconcept-canvas-origin-clean>origin-cle=
an</a> flag to true.</li>
+<!--REMOVE-TOPIC:Security-->
+
+   <li><p>Let the <code><a href=3D#canvasrenderingc=
ontext2d>CanvasRenderingContext2D</a></code> object's <=
a href=3D#output-bitmap>output bitmap</a> be <var title=3D&qu=
ot;">target</var>'s bitmap.</li>
+
+  </ol><hr><p>The <dfn id=3Ddom-context-2d-canvas t=
itle=3Ddom-context-2d-canvas><code>canvas</code></dfn&g=
t; attribute must return the
+  value it was initialized to when the object was created.</p>
+
+  <p>The <dfn id=3Ddom-context-2d-width title=3Ddom-context-2d-=
width><code>width</code></dfn> attribute, on getting=
, must
+  return the width of the rendering context's <a href=3D#scratch-bitm=
ap>scratch bitmap</a>, in CSS pixels. On
+  setting, it must <a href=3D#concept-canvas-set-bitmap-dimensions ti=
tle=3Dconcept-canvas-set-bitmap-dimensions>set bitmap dimensions</a=
>
+  to the new value and the current height of the rendering context's &lt=
;a href=3D#scratch-bitmap>scratch bitmap</a> in
+  CSS pixels, respectively.</p>
+
+  <p>The <dfn id=3Ddom-context-2d-height title=3Ddom-context-2d=
-height><code>height</code></dfn> attribute, on gett=
ing, must
+  return the height of the rendering context's <a href=3D#scratch-bit=
map>scratch bitmap</a>, in CSS pixels. On
+  setting, it must <a href=3D#concept-canvas-set-bitmap-dimensions ti=
tle=3Dconcept-canvas-set-bitmap-dimensions>set bitmap dimensions</a=
>
+  to the current width of the rendering context's <a href=3D#scratch-=
bitmap>scratch bitmap</a> in CSS pixels and the
+  new value, respectively.</p>
+
+  <hr><p>Except where otherwise specified, for the 2D contex=
t interface, <strong>any method call with a
+  numeric argument whose value is infinite or a NaN value must be ignore=
d</strong>.</p>
+
+  <!--
+   Philip Taylor wrote:
+   > My experience with some 3d canvas code is that infinities come u=
p in
+   > naturally harmless places, e.g. having a function that scales by=
 x then
+   > translates by 1/x and wanting it to work when x=3D0 (which ought=
 to draw
+   > nothing, since anything it draws is zero pixels wide), and it's =
a bit
+   > annoying to track down and fix those issues, so I'd probably lik=
e it if
+   > they were harmless in canvas methods. Opera appears to silently =
not draw
+   > anything if the transformation matrix is not finite, but Firefox=
 throws
+   > exceptions when passing in non-finite arguments.
+  -->
+
+  <p>Whenever the CSS value <code title=3D"">curre=
ntColor</code> is used as a color in the
+  <code><a href=3D#canvasrenderingcontext2d>CanvasRenderingC=
ontext2D</a></code> API, the "computed value of the 'col=
or' property" for the
+  purposes of determining the computed value of the <code title=3D&qu=
ot;">currentColor</code> keyword is
+  the value described by the appropriate entry in the following list:&lt=
;/p>
+
+  <dl><dt>If the rendering context's <a href=3D#concept-c=
anvas-context-bitmap-mode title=3Dconcept-canvas-context-bitmap-mode>c=
ontext bitmap
+   mode</a> is <a href=3D#concept-canvas-fixed title=3Dconcept-=
canvas-fixed>fixed</a> and the <code><a href=3D#the-can=
vas-element>canvas</a></code>
+   element is <a href=3D#being-rendered>being rendered</a>&l=
t;/dt>
+
+   <dd><p>The "computed value of the 'color' property&q=
uot; for the purposes of determining the computed
+   value of the <code title=3D"">currentColor</code&g=
t; keyword is the computed value of the 'color'
+   property on the <code><a href=3D#the-canvas-element>canva=
s</a></code> element at the time that the color is specified =
(e.g. when
+   the appropriate attribute is set, or when the method is called; not w=
hen the color is rendered or
+   otherwise used). <a href=3D#refsCSSCOLOR>[CSSCOLOR]</a>&l=
t;/dd>
+
+   <dt>In all other cases</dt>
+
+   <dd><p>The "computed value of the 'color' property&q=
uot; for the purposes of determining the computed
+   value of the <code title=3D"">currentColor</code&g=
t; keyword is fully opaque black. <a href=3D#refsCSSCOLOR>[CSSCOLOR=
]</a></dd>
+
+  </dl><p>In the case of <code title=3Ddom-canvasgradient=
-addColorStop><a href=3D#dom-canvasgradient-addcolorstop>addColo=
rStop()</a></code> on
+  <code><a href=3D#canvasgradient>CanvasGradient</a>&l=
t;/code>, the "computed value of the 'color' property" for t=
he purposes of
+  determining the computed value of the <code title=3D""&gt=
;currentColor</code> keyword is always fully
+  opaque black (there is no associated element). <a href=3D#refsCSSCO=
LOR>[CSSCOLOR]</a></p>
+
+  <p class=3Dnote>This is because <code><a href=3D#canvas=
gradient>CanvasGradient</a></code> objects are
+  <code><a href=3D#the-canvas-element>canvas</a></c=
ode>-neutral — a <code><a href=3D#canvasgradient&gt=
;CanvasGradient</a></code> object created by one
+  <code><a href=3D#the-canvas-element>canvas</a></c=
ode> can be used by another, and there is therefore no way to know whi=
ch is the
+  "element in question" at the time that the color is specifie=
d.</p>
+
+  <p class=3Dnote>Similar concerns exist with font-related propert=
ies; the rules for those are
+  described in detail in the relevant section below.</p>
+
+  </div>
+
+  <hr><p>The <code><a href=3D#canvasfillrule>Can=
vasFillRule</a></code> enumeration is used to select the <=
dfn id=3Dfill-rule>fill rule</dfn>
+  algorithm by which to determine if a point is inside or outside a path=
.</p>
+
+  <p>The value "<dfn id=3Ddom-context-2d-fillrule-nonzero =
title=3Ddom-context-2d-fillRule-nonzero><code>nonzero</code&g=
t;</dfn>" value
+  indicates the non-zero winding rule, wherein
+
+     a point is considered to be outside a shape if the number of times =
a half-infinite straight
+     line drawn from that point crosses the shape's path going in one di=
rection is equal to the
+     number of times it crosses the path going in the other direction.
+
+  </p>
+
+
+  <p>The "<dfn id=3Ddom-context-2d-fillrule-evenodd title=3D=
dom-context-2d-fillRule-evenodd><code>evenodd</code></d=
fn>" value indicates
+  the even-odd rule, wherein
+
+     a point is considered to be outside a shape if the number of times =
a half-infinite straight
+     line drawn from that point crosses the shape's path is even.
+
+  </p>
+
+  <p>If a point is not outside a shape, it is inside the shape.&lt=
;/p>
+
+
+  <h6 id=3Dimplementation-notes><span class=3Dsecno>4.12.4.2=
.1 </span>Implementation notes</h6>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <p>Although the way the specification is written it might sound =
like an implementation needs to
+  track up to four bitmaps per canvas or rendering context — o=
ne <a href=3D#scratch-bitmap>scratch bitmap</a>,
+  one <a href=3D#output-bitmap>output bitmap</a> for the ren=
dering context, one bitmap for the <code><a href=3D#the-canvas-e=
lement>canvas</a></code>,
+  and one bitmap for the actually currently rendered image — u=
ser agents can in fact generally
+  optimise this to only one or two.</p>
+
+  <p>The <a href=3D#scratch-bitmap>scratch bitmap</a>,=
 when it isn't the same bitmap as the <a href=3D#output-bitmap>outp=
ut
+  bitmap</a>, is only directly observable if it is read, and there=
fore implementations can,
+  instead of updating this bitmap, merely remember the sequence of drawi=
ng operations that have been
+  applied to it until such time as the bitmap's actual data is needed (f=
or example because of a call
+  to <code title=3Ddom-context-2d-commit><a href=3D#dom-context=
-2d-commit>commit()</a></code>, <code title=3Ddom-conte=
xt-2d-drawImage><a href=3D#dom-context-2d-drawimage>drawImage()&=
lt;/a></code>, or the <code title=3Ddom-createImageBitmap>=
<a href=3D#dom-createimagebitmap>createImageBitmap()</a></=
code>
+  factory method). In many cases, this will be more memory efficient.&lt=
;/p>
+
+  <p>The bitmap of a <code><a href=3D#the-canvas-element&=
gt;canvas</a></code> element is the one bitmap that's pretty =
much always going
+  to be needed in practice. The <a href=3D#output-bitmap>output bi=
tmap</a> of a rendering context, when it has one,
+  is always just an alias to a <code><a href=3D#the-canvas-elem=
ent>canvas</a></code> element's bitmap.</p>
+
+  <p>Additional bitmaps are sometimes needed, e.g. to enable fast =
drawing when the canvas is being
+  painted at a different size than its intrinsic size, or to enable doub=
le buffering so that the
+  rendering commands from the <a href=3D#scratch-bitmap>scratch bi=
tmap</a> can be applied without the rendering being
+  updated midway.</p>
+
+
+
+
+  <h6 id=3Dthe-canvas-state><span class=3Dsecno>4.12.4.2.2 &=
lt;/span>The canvas state</h6>
+
+  <p>Each <code><a href=3D#canvasrenderingcontext2d>Ca=
nvasRenderingContext2D</a></code> rendering context maintains=
 a stack of drawing
+  states. <dfn id=3Ddrawing-state title=3D"drawing state"&g=
t;Drawing states</dfn> consist of:</p>
+
+  <ul class=3Dbrief><li>The current <a href=3D#transforma=
tions title=3Ddom-context-2d-transformation>transformation matrix</=
a>.</li>
+   <li>The current <a href=3D#clipping-region>clipping regio=
n</a>.</li>
+   <li>The current values of the following attributes: <code ti=
tle=3Ddom-context-2d-strokeStyle><a href=3D#dom-context-2d-strokest=
yle>strokeStyle</a></code>, <code title=3Ddom-context-2=
d-fillStyle><a href=3D#dom-context-2d-fillstyle>fillStyle</a&=
gt;</code>, <code title=3Ddom-context-2d-globalAlpha><a hr=
ef=3D#dom-context-2d-globalalpha>globalAlpha</a></code>, &=
lt;code title=3Ddom-context-2d-lineWidth><a href=3D#dom-context-2d-=
linewidth>lineWidth</a></code>, <code title=3Ddom-conte=
xt-2d-lineCap><a href=3D#dom-context-2d-linecap>lineCap</a&gt=
;</code>, <code title=3Ddom-context-2d-lineJoin><a href=3D=
#dom-context-2d-linejoin>lineJoin</a></code>, <code tit=
le=3Ddom-context-2d-miterLimit><a href=3D#dom-context-2d-miterlimit=
>miterLimit</a></code>, <code title=3Ddom-context-2d-li=
neDashOffset><a href=3D#dom-context-2d-linedashoffset>lineDashOf=
fset</a></code>, <code title=3Ddom-context-2d-shadowOffset=
X><a href=3D#dom-context-2d-shadowoffsetx>shadowOffsetX</a&gt=
;</code>, <code title=3Ddom-context-2d-shadowOffsetY><a hr=
ef=3D#dom-context-2d-shadowoffsety>shadowOffsetY</a></code&gt=
;, <code title=3Ddom-context-2d-shadowBlur><a href=3D#dom-contex=
t-2d-shadowblur>shadowBlur</a></code>, <code title=3Ddo=
m-context-2d-shadowColor><a href=3D#dom-context-2d-shadowcolor>s=
hadowColor</a></code>, <code title=3Ddom-context-2d-global=
CompositeOperation><a href=3D#dom-context-2d-globalcompositeoperati=
on>globalCompositeOperation</a></code>, <code title=3Dd=
om-context-2d-font><a href=3D#dom-context-2d-font>font</a>=
</code>, <code title=3Ddom-context-2d-textAlign><a href=3D=
#dom-context-2d-textalign>textAlign</a></code>, <code t=
itle=3Ddom-context-2d-textBaseline><a href=3D#dom-context-2d-textba=
seline>textBaseline</a></code>, <code title=3Ddom-conte=
xt-2d-direction><a href=3D#dom-context-2d-direction>direction&lt=
;/a></code>, <code title=3Ddom-context-2d-imageSmoothingEnabl=
ed><a href=3D#dom-context-2d-imagesmoothingenabled>imageSmoothin=
gEnabled</a></code>.</li>
+   <li>The current <a href=3D#dash-list>dash list</a>.=
</li>
+  </ul><p class=3Dnote>The <a href=3D#current-default-pat=
h>current default path</a> and the rendering context's bitmaps a=
re not
+  part of the drawing state. The <a href=3D#current-default-path>c=
urrent default path</a> is persistent, and can only be
+  reset using the <code title=3Ddom-context-2d-beginPath><a hre=
f=3D#dom-context-2d-beginpath>beginPath()</a></code> metho=
d. The bitmaps
+  depend on whether and how the rendering context is bound to a <code=
><a href=3D#the-canvas-element>canvas</a></code> ele=
ment.</p>
+
+  <dl class=3Ddomintro><dt><var title=3D"">c=
ontext</var> . <code title=3Ddom-context-2d-save><a href=3D=
#dom-context-2d-save>save</a></code>()</dt>
+
+   <dd>
+
+    <p>Pushes the current state onto the stack.</p>
+
+   </dd>
+
+   <dt><var title=3D"">context</var> . <c=
ode title=3Ddom-context-2d-restore><a href=3D#dom-context-2d-restor=
e>restore</a></code>()</dt>
+
+   <dd>
+
+    <p>Pops the top state on the stack, restoring the context to t=
hat state.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-context-2d-save title=3Ddom-context-2d-s=
ave><code>save()</code></dfn> method must push a cop=
y of the
+  current drawing state onto the drawing state stack.</p>
+
+  <p>The <dfn id=3Ddom-context-2d-restore title=3Ddom-context-2=
d-restore><code>restore()</code></dfn> method must p=
op the top
+  entry in the drawing state stack, and reset the drawing state it descr=
ibes. If there is no saved
+  state, the method must do nothing.</p>
+
+  <p>When the user agent is to <dfn id=3Dreset-the-rendering-co=
ntext-to-its-default-state>reset the rendering context to its default =
state</dfn>, it must
+  clear the drawing state stack and everything that <a href=3D#drawin=
g-state>drawing state</a> consists of to
+  initial values.</p>
+
+  <!-- v7
+idea from Mihai:
+> 5. Drawing states should be saveable with IDs, and for easier resto=
ring.
+>
+> save(id)
+> restore(id)
+>
+> If id is not provided, then save() works as defined now. The same f=
or
+> restore().
+>
+> Currently, it's not trivial to save and restore a specific state.
+...and from Philip:
+> I think a more convenient syntax would be:
+>   var state =3D ctx.save();
+>   ctx.restore(state);
+> But how would it interact with normal calls to ctx.restore()?
+  -->
+
+  </div>
+
+
+  <h6 id=3Ddrawingstyle-objects><span class=3Dsecno>4.12.4.2=
.3 </span><code><a href=3D#drawingstyle>DrawingStyle&lt=
;/a></code> objects</h6>
+
+  <p>All the line styles (line width, caps, joins, and dash patter=
ns) and text styles (fonts)
+  described in the next two sections apply to <code><a href=3D#=
canvasrenderingcontext2d>CanvasRenderingContext2D</a></code&g=
t; objects and to
+  <code><a href=3D#drawingstyle>DrawingStyle</a></c=
ode> objects. This section defines the constructor used to obtain a
+  <code><a href=3D#drawingstyle>DrawingStyle</a></c=
ode> object. This object is then used by methods on <code><a =
href=3D#path>Path</a></code> objects
+  to control how text and paths are rasterised and stroked.</p>
+
+  <dl class=3Ddomintro><dt><var title=3D"">s=
tyles</var> =3D new <code title=3Ddom-DrawingStyle><a href=
=3D#dom-drawingstyle>DrawingStyle</a></code>( [ <var ti=
tle=3D"">element</var> ] )</dt>
+
+   <dd>
+
+    <p>Creates a new <code><a href=3D#drawingstyle>Dra=
wingStyle</a></code> object, optionally using a specific elem=
ent for
+    resolving relative keywords and sizes in font specifications.</p&=
gt;
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>Each <code><a href=3D#drawingstyle>DrawingStyle&l=
t;/a></code> object can have a <dfn id=3Dstyles-scope-object&=
gt;styles scope object</dfn>.</p>
+
+  <p>The <dfn id=3Ddom-drawingstyle title=3Ddom-DrawingStyle&gt=
;<code>DrawingStyle()</code></dfn> constructor, when in=
voked,
+  must return a newly created <code><a href=3D#drawingstyle>=
DrawingStyle</a></code> object. If the constructor was passed=
 an
+  argument, then the <code><a href=3D#drawingstyle>DrawingSt=
yle</a></code> object's <a href=3D#styles-scope-object>=
styles scope object</a> is that
+  element. Otherwise, if the <a href=3D#javascript-global-environment=
>JavaScript global environment</a> is a <a href=3D#document-e=
nvironment>document
+  environment</a>, the object's <a href=3D#styles-scope-object&=
gt;styles scope object</a> is the <code><a href=3D#documen=
t>Document</a></code>
+  object of the <a href=3D#active-document>active document</a&g=
t; of the <a href=3D#browsing-context>browsing context</a> of=
 the
+  <code><a href=3D#window>Window</a></code> obje=
ct on which the interface object of the invoked constructor is found.
+  Otherwise, the <a href=3D#javascript-global-environment>JavaScri=
pt global environment</a> is a <a href=3D#worker-environment>=
worker environment</a>,
+  and the <a href=3D#styles-scope-object>styles scope object</a=
> is the worker.</p>
+
+  </div>
+
+
+  <h6 id=3Dline-styles><span class=3Dsecno>4.12.4.2.4 </s=
pan>Line styles</h6>
+
+  <dl class=3Ddomintro><dt><var title=3D"">c=
ontext</var> . <code title=3Ddom-context-2d-lineWidth><a h=
ref=3D#dom-context-2d-linewidth>lineWidth</a></code> [ =3D=
 <var title=3D"">value</var> ]</dt>
+   <dt><var title=3D"">styles</var> . <co=
de title=3Ddom-context-2d-lineWidth><a href=3D#dom-context-2d-linew=
idth>lineWidth</a></code> [ =3D <var title=3D"&quo=
t;>value</var> ]</dt>
+
+   <dd>
+
+    <p>Returns the current line width.</p>
+
+    <p>Can be set, to change the line width. Values that are not f=
inite values greater than zero are
+    ignored.</p>
+
+   </dd>
+
+   <dt><var title=3D"">context</var> . <c=
ode title=3Ddom-context-2d-lineCap><a href=3D#dom-context-2d-lineca=
p>lineCap</a></code> [ =3D <var title=3D""&gt=
;value</var> ]</dt>
+   <dt><var title=3D"">styles</var> . <co=
de title=3Ddom-context-2d-lineCap><a href=3D#dom-context-2d-linecap=
>lineCap</a></code> [ =3D <var title=3D"">=
value</var> ]</dt>
+
+   <dd>
+
+    <p>Returns the current line cap style.</p>
+
+    <p>Can be set, to change the line cap style.</p>
+
+    <p>The possible line cap styles are <code>butt</code&=
gt;, <code>round</code>, and
+    <code>square</code>. Other values are ignored.</p>
+
+   </dd>
+
+   <dt><var title=3D"">context</var> . <c=
ode title=3Ddom-context-2d-lineJoin><a href=3D#dom-context-2d-linej=
oin>lineJoin</a></code> [ =3D <var title=3D""=
>value</var> ]</dt>
+   <dt><var title=3D"">styles</var> . <co=
de title=3Ddom-context-2d-lineJoin><a href=3D#dom-context-2d-linejo=
in>lineJoin</a></code> [ =3D <var title=3D""&=
gt;value</var> ]</dt>
+
+   <dd>
+
+    <p>Returns the current line join style.</p>
+
+    <p>Can be set, to change the line join style.</p>
+
+    <p>The possible line join styles are <code>bevel</cod=
e>, <code>round</code>, and
+    <code>miter</code>. Other values are ignored.</p>
+
+   </dd>
+
+   <dt><var title=3D"">context</var> . <c=
ode title=3Ddom-context-2d-miterLimit><a href=3D#dom-context-2d-mit=
erlimit>miterLimit</a></code> [ =3D <var title=3D"=
">value</var> ]</dt>
+   <dt><var title=3D"">styles</var> . <co=
de title=3Ddom-context-2d-miterLimit><a href=3D#dom-context-2d-mite=
rlimit>miterLimit</a></code> [ =3D <var title=3D"&=
quot;>value</var> ]</dt>
+
+   <dd>
+
+    <p>Returns the current miter limit ratio.</p>
+
+    <p>Can be set, to change the miter limit ratio. Values that ar=
e not finite values greater than
+    zero are ignored.</p>
+
+   </dd>
+
+
+   <dt><var title=3D"">context</var> . <c=
ode title=3Ddom-context-2d-setLineDash><a href=3D#dom-context-2d-se=
tlinedash>setLineDash</a></code>(<var title=3D"&qu=
ot;>segments</var>)</dt>
+   <dt><var title=3D"">styles</var> . <co=
de title=3Ddom-context-2d-setLineDash><a href=3D#dom-context-2d-set=
linedash>setLineDash</a></code>(<var title=3D"&quo=
t;>segments</var>)</dt>
+
+   <dd>
+
+    <p>Sets the current line dash pattern (as used when stroking).=
 The argument is a list of
+    distances for which to alternately have the line on and the line off=
.</p>
+
+   </dd>
+
+
+   <dt><var title=3D"">segments</var> =3D &l=
t;var title=3D"">context</var> . <code title=3Ddom-=
context-2d-getLineDash><a href=3D#dom-context-2d-getlinedash>get=
LineDash</a></code>()</dt>
+   <dt><var title=3D"">segments</var> =3D &l=
t;var title=3D"">styles</var> . <code title=3Ddom-c=
ontext-2d-getLineDash><a href=3D#dom-context-2d-getlinedash>getL=
ineDash</a></code>()</dt>
+
+   <dd>
+
+    <p>Returns a copy of the current line dash pattern. The array =
returned will always have an even
+    number of entries (i.e. the pattern is normalized).</p>
+
+   </dd>
+
+
+   <dt><var title=3D"">context</var> . <c=
ode title=3Ddom-context-2d-lineDashOffset><a href=3D#dom-context-2d=
-linedashoffset>lineDashOffset</a></code></dt>
+   <dt><var title=3D"">styles</var> . <co=
de title=3Ddom-context-2d-lineDashOffset><a href=3D#dom-context-2d-=
linedashoffset>lineDashOffset</a></code></dt>
+
+   <dd>
+
+    <p>Returns the phase offset (in the same units as the line das=
h pattern).</p>
+
+    <p>Can be set, to change the phase offset. Values that are not=
 finite values are ignored.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>Objects that implement the <code><a href=3D#canvasdr=
awingstyles>CanvasDrawingStyles</a></code> interface have =
attributes and
+  methods (defined in this section) that control how lines are treated b=
y the object.</p>
+
+  <p>The <dfn id=3Ddom-context-2d-linewidth title=3Ddom-context=
-2d-lineWidth><code>lineWidth</code></dfn> attribute=
 gives the
+  width of lines, in coordinate space units. On getting, it must return =
the current value. On
+  setting, zero, negative, infinite, and NaN values must be ignored, lea=
ving the value unchanged;
+  other values must change the current value to the new value.</p>
+
+  <p>When the object implementing the <code><a href=3D#ca=
nvasdrawingstyles>CanvasDrawingStyles</a></code> interface=
 is created, the
+  <code title=3Ddom-context-2d-lineWidth><a href=3D#dom-context=
-2d-linewidth>lineWidth</a></code> attribute must initiall=
y have the value
+  <code>1.0</code>.</p>
+
+  <hr><p>The <dfn id=3Ddom-context-2d-linecap title=3Ddom=
-context-2d-lineCap><code>lineCap</code></dfn> attri=
bute defines the type
+  of endings that UAs will place on the end of lines. The three valid va=
lues are <code>butt</code>,
+  <code>round</code>, and <code>square</code>.&l=
t;/p>
+
+  <p>On getting, it must return the current value. On setting, if =
the new value is one of the
+  literal strings <code>butt</code>, <code>round</c=
ode>, and <code>square</code>, then the current
+  value must be changed to the new value; other values must ignored, lea=
ving the value
+  unchanged.</p>
+
+  <p>When the object implementing the <code><a href=3D#ca=
nvasdrawingstyles>CanvasDrawingStyles</a></code> interface=
 is created, the
+  <code title=3Ddom-context-2d-lineCap><a href=3D#dom-context-2=
d-linecap>lineCap</a></code> attribute must initially have=
 the value
+  <code>butt</code>.</p>
+
+  <hr><p>The <dfn id=3Ddom-context-2d-linejoin title=3Ddo=
m-context-2d-lineJoin><code>lineJoin</code></dfn> at=
tribute defines the type
+  of corners that UAs will place where two lines meet. The three valid v=
alues are
+  <code>bevel</code>, <code>round</code>, and &l=
t;code>miter</code>.</p>
+
+  <p>On getting, it must return the current value. On setting, if =
the new value is one of the
+  literal strings <code>bevel</code>, <code>round</=
code>, and <code>miter</code>, then the current
+  value must be changed to the new value; other values must be ignored, =
leaving the value
+  unchanged.</p>
+
+  <p>When the object implementing the <code><a href=3D#ca=
nvasdrawingstyles>CanvasDrawingStyles</a></code> interface=
 is created, the
+  <code title=3Ddom-context-2d-lineJoin><a href=3D#dom-context-=
2d-linejoin>lineJoin</a></code> attribute must initially h=
ave the value
+  <code>miter</code>.</p>
+
+  <hr><p>When the <code title=3Ddom-context-2d-lineJoin&g=
t;<a href=3D#dom-context-2d-linejoin>lineJoin</a></code&gt=
; attribute has the value
+  <code>miter</code>, strokes use the miter limit ratio to d=
ecide how to render joins. The miter
+  limit ratio can be explicitly set using the <dfn id=3Ddom-context-2=
d-miterlimit title=3Ddom-context-2d-miterLimit><code>miterLimit&=
lt;/code></dfn> attribute. On getting, it must
+  return the current value. On setting, zero, negative, infinite, and Na=
N values must be ignored,
+  leaving the value unchanged; other values must change the current valu=
e to the new value.</p>
+  <!-- values less than 1.0 are equivalent to 1.0, since it's compare=
d
+       against a ratio that can't be less than 1.0 -->
+
+  <p>When the object implementing the <code><a href=3D#ca=
nvasdrawingstyles>CanvasDrawingStyles</a></code> interface=
 is created, the
+  <code title=3Ddom-context-2d-miterLimit><a href=3D#dom-contex=
t-2d-miterlimit>miterLimit</a></code> attribute must initi=
ally have the value
+  <code>10.0</code>.</p>
+
+  <hr><p>Each <code><a href=3D#canvasdrawingstyles&=
gt;CanvasDrawingStyles</a></code> object has a <dfn id=3Dd=
ash-list>dash list</dfn>, which is either empty
+  or consists of an even number of non-negative numbers. Initially, the =
<a href=3D#dash-list>dash list</a> must
+  be empty.</p>
+
+  <p>When the <dfn id=3Ddom-context-2d-setlinedash title=3Ddom-=
context-2d-setLineDash><code>setLineDash()</code></dfn&=
gt; method is
+  invoked, it must run the following steps:</p>
+
+  <ol><li><p>Let <var title=3D"">a<=
/var> be the argument.</li>
+
+   <li><p>If any value in <var title=3D"">a&=
lt;/var> is not finite (e.g. an Infinity or a NaN value), or
+   if any value is negative (less than zero), then abort these steps (wi=
thout throwing an exception;
+   user agents could show a message on a developer console, though, as t=
hat would be helpful for
+   debugging).</li>
+
+   <li><p>If the number of elements in <var title=3D&quot=
;">a</var> is odd, then let <var title=3D""&gt=
;a</var>
+   be the concatentation of two copies of <var title=3D""&g=
t;a</var>.</li>
+
+   <li><p>Let the object's <a href=3D#dash-list>dash l=
ist</a> be <var title=3D"">a</var>.</li&gt=
;
+
+  </ol><p>When the <dfn id=3Ddom-context-2d-getlinedash t=
itle=3Ddom-context-2d-getLineDash><code>getLineDash()</code&g=
t;</dfn> method is
+  invoked, it must return a sequence whose values are the values of the =
object's <a href=3D#dash-list>dash
+  list</a>, in the same order.</p>
+
+  <p>It is sometimes useful to change the "phase" of the=
 dash pattern, e.g. to achieve a "marching
+  ants" effect. The phase can be set using the <dfn id=3Ddom-con=
text-2d-linedashoffset title=3Ddom-context-2d-lineDashOffset><code&=
gt;lineDashOffset</code></dfn> attribute. On getting, it
+  must return the current value. On setting, infinite and NaN values mus=
t be ignored, leaving the
+  value unchanged; other values must change the current value to the new=
 value.</p>
+
+  <p>When the object implementing the <code><a href=3D#ca=
nvasdrawingstyles>CanvasDrawingStyles</a></code> interface=
 is created, the
+  <code title=3Ddom-context-2d-lineDashOffset><a href=3D#dom-co=
ntext-2d-linedashoffset>lineDashOffset</a></code> attribut=
e must initially have
+  the value <code>0.0</code>.</p>
+
+  <hr><p>When a user agent is to <dfn id=3Dtrace-a-path&g=
t;trace a <span title=3Dconcept-path>path</span></dfn>,=
 <!-- <dfn>trace a path</dfn> -->
+  given an object <var title=3D"">style</var> that=
 implements the <code><a href=3D#canvasdrawingstyles>CanvasDr=
awingStyles</a></code>
+  interface, it must run the following algorithm. This algorithm returns=
 a new <a href=3D#concept-path title=3Dconcept-path>path</a>.=
</p>
+
+  <ol><li><p>Let <var title=3D"">path&=
lt;/var> be a copy of the path being traced.</li>
+
+   <!-- PATH SANITIZATION -->
+
+   <li><p>Remove from <var title=3D"">path&l=
t;/var> any subpaths containing no lines (i.e. subpaths with
+   just one point).</li>
+
+   <li><p>Replace each point in each subpath of <var titl=
e=3D"">path</var> other than the first point
+   and the last point of each subpath by a <i>join</i> that =
joins the line leading to that point to
+   the line leading out of that point, such that the subpaths all consis=
t of two points (a starting
+   point with a line leading out of it, and an ending point with a line =
leading into it), one or
+   more lines (connecting the points and the joins), and zero or more jo=
ins (each connecting one
+   line to another), connected together such that each subpath is a seri=
es of one or more lines with
+   a join between each one and a point on each end.</li>
+
+   <li><p>Add a straight closing line to each closed subpath=
 in <var title=3D"">path</var> connecting
+   the last point and the first point of that subpath; change the last p=
oint to a join (from the
+   previously last line to the newly added closing line), and change the=
 first point to a join (from
+   the newly added closing line to the first line).</p>
+
+   <li><p>If the <var title=3D"">styles</=
var> <a href=3D#dash-list>dash list</a> is empty, jump to =
the step
+   labeled <i>convert</i>.</li>
+
+   <!-- DASHING -->
+
+   <li><p>Let <var title=3D"">pattern width&=
lt;/var> be the concatenation of all the entries of the <var title=3D=
"">styles</var> <a href=3D#dash-list>dash list&l=
t;/a>, in coordinate space units.</p>
+
+   <li><p>For each subpath <var title=3D"">s=
ubpath</var> in <var title=3D"">path</var>, r=
un the
+   following substeps. These substeps mutate the subpaths in <var tit=
le=3D"">path</var> <i>in
+   vivo</i>.</p>
+
+    <ol><li><p>Let <var title=3D"">sub=
path width</var> be the length of all the lines of <var title=3D=
"">subpath</var>, in coordinate space units.</p>
+
+     <li><p>Let <var title=3D"">offset</v=
ar> be the value of the <var title=3D"">styles</var=
> <code title=3Ddom-context-2d-lineDashOffset><a href=3D#dom-=
context-2d-linedashoffset>lineDashOffset</a></code>, in
+     coordinate space units.</li>
+
+     <li>
+ =20
+      <p>While <var title=3D"">offset</var> =
is greater than <var title=3D"">pattern width</var>=
,
+      decrement it by <var title=3D"">pattern width</=
var>.</p>
+ =20
+      <p>While <var title=3D"">offset</var> =
is less than <var title=3D"">pattern width</var>, i=
ncrement
+      it by <var title=3D"">pattern width</var>.&l=
t;/p>
+
+     </li>
+
+     <li><p>Define <var title=3D"">L</var=
> to be a linear coordinate line defined along all lines in
+     <var title=3D"">subpath</var>, such that the =
start of the first line in the subpath is defined as
+     coordinate 0, and the end of the last line in the subpath is define=
d as coordinate <var title=3D"">width</var>.</li=
>
+
+     <li><p>Let <var title=3D"">position<=
/var> be zero minus <var title=3D"">offset</var>=
.</li>
+
+     <li><p>Let <var title=3D"">index</va=
r> be 0.</li>
+
+     <li><p>Let <var title=3D"">current stat=
e</var> be <i>off</i> (the other states being <i>=
on</i>
+     and <i>zero-on</i>).</li>
+
+     <li><p><i>Dash on</i>: Let <var title=3D=
"">segment length</var> be
+     the value of the <var title=3D"">styles</var>=
 <a href=3D#dash-list>dash
+     list</a>'s <var title=3D"">index</var>t=
h entry.</li>
+
+     <li><p>Increment <var title=3D"">positi=
on</var> by <var title=3D"">segment length</var&=
gt;.</li>
+
+     <li><p>If <var title=3D"">position</=
var> is greater than <var title=3D"">subpath width<=
/var>, then
+     end these substeps for this subpath and start them again for the ne=
xt subpath; if there are no
+     more subpaths, then jump to the step labeled <i>convert</i=
> instead.</li>
+
+     <li><p>If <var title=3D"">segment lengt=
h</var> is non-zero, let <var title=3D"">current st=
ate</var> be <i>on</i>.</li>
+
+     <li><p>Increment <var title=3D"">index&=
lt;/var> by one.</li>
+
+     <li><p><i>Dash off<!-- labeled for consistency=
 only --></i>: Let <var title=3D"">segment
+     length</var> be the value of the <var title=3D""=
>styles</var> <a href=3D#dash-list>dash list</a>'s &=
lt;var title=3D"">index</var>th entry.</li>
+
+     <li><p>Let <var title=3D"">start</va=
r> be the offset <var title=3D"">position</var> =
on <var title=3D"">L</var>.</li>
+
+     <li><p>Increment <var title=3D"">positi=
on</var> by <var title=3D"">segment length</var&=
gt;.</li>
+
+     <li><p>If <var title=3D"">position</=
var> is less than zero, then jump to the step labeled
+     <i>post-cut</i>.</li> <!-- start and end both =
before zero -->
+
+     <li><p>If <var title=3D"">start</var=
> is less than zero, then let <var title=3D"">start&lt=
;/var> be
+     zero.</li> <!-- end will be (at or) after zero -->
+
+     <li><p>If <var title=3D"">position</=
var> is greater than <var title=3D"">subpath width<=
/var>, then
+     let <var title=3D"">end</var> be the offset &=
lt;var title=3D"">subpath width</var> on <var title=
=3D"">L</var>. Otherwise, let <var title=3D"&q=
uot;>end</var> be the offset <var title=3D"">pos=
ition</var> on <var title=3D"">L</var>.</l=
i>
+
+     <li>
+
+      <p>Jump to the first appropriate step:</p>
+
+      <dl class=3Dswitch><dt>If <var title=3D""=
>segment length</var> is zero and <var title=3D""&g=
t;current state</var> is <i>off</i></dt>
+
+       <dd>
+
+        <p>Do nothing, just continue to the next step.</p>
+
+       </dd>
+
+
+       <dt>If <var title=3D"">current state</va=
r> is <i>off</i></dt>
+
+       <dd>
+
+        <p>Cut the line on which <var title=3D"">e=
nd</var> finds itself short at <var title=3D"">end&=
lt;/var> and place a point there, cutting the subpath that it was in i=
n two;
+        remove all line segments, joins, points, and subpaths that are b=
etween <var title=3D"">start</var> and <var titl=
e=3D"">end</var>; and finally place a single point at =
<var title=3D"">start</var> with no lines connectin=
g to it.</p>
+
+        <p>The point has a <i>directionality</i> for t=
he purposes of drawing line caps (see below).
+        The directionality is the direction that the original line had a=
t that point (i.e. when <var title=3D"">L</var> was=
 defined above).</p>
+
+       </dd>
+
+
+       <dt>Otherwise</dt>
+
+       <dd>
+
+        <p>Cut the line on which <var title=3D"">s=
tart</var> finds itself into two at <var title=3D""&gt=
;start</var> and place a point there, cutting the subpath that it w=
as in in two, and
+        similarly cut the line on which <var title=3D"">=
end</var> finds itself short at <var title=3D"">end=
</var> and place a point there, cutting the subpath that <em>=
it</em> was in in
+        two, and then remove all line segments, joins, points, and subpa=
ths that are between <var title=3D"">start</var> an=
d <var title=3D"">end</var>.</p>
+
+        <p>If <var title=3D"">start</var> an=
d <var title=3D"">end</var> are the same point, the=
n this
+        results in just the line being cut in two and two points being i=
nserted there, with nothing
+        being removed, unless a join also happens to be at that point, i=
n which case the join must
+        be removed.</p>
+
+       </dd>
+
+      </dl></li>
+
+     <li><p><i>Post-cut</i>: If <var title=3D=
"">position</var> is greater than <var title=3D&quo=
t;">width</var>, then jump to the step labeled <i>con=
vert</i>.</li>
+
+     <li><p>If <var title=3D"">segment lengt=
h</var> is greater than zero, let <var title=3D"">p=
ositioned-at-on-dash</var> be false.</li>
+
+     <li><p>Increment <var title=3D"">index&=
lt;/var> by one. If it is equal to the number of entries in
+     the <var title=3D"">styles</var> <a href=3D=
#dash-list>dash list</a>, then let <var title=3D""&=
gt;index</var> be
+     0.</li>
+
+     <li><p>Return to the step labeled <i>dash on</=
i>.</li>
+
+    </ol></li>
+
+   <!-- STROKING -->
+
+   <li>
+
+    <p><i>Convert</i>: This is the step that converts =
the path to a new path that represents its
+    stroke.</p>
+
+    <p>Create a new <a href=3D#concept-path title=3Dconcept-pat=
h>path</a> that describes the edge of the areas that
+    would be covered if a straight line of length equal to the <var t=
itle=3D"">styles</var> <code title=3Ddom-context-2d=
-lineWidth><a href=3D#dom-context-2d-linewidth>lineWidth</a&g=
t;</code> was swept along each path in <var title=3D""=
>path</var> while being kept at an angle such that the line is o=
rthogonal to the path
+    being swept, replacing each point with the end cap necessary to sati=
sfy the <var title=3D"">styles</var> <code title=
=3Ddom-context-2d-lineCap><a href=3D#dom-context-2d-linecap>line=
Cap</a></code> attribute as described
+    previously and elaborated below, and replacing each join with the jo=
in necessary to satisfy the
+    <var title=3D"">styles</var> <code title=3D=
dom-context-2d-lineJoin><a href=3D#dom-context-2d-linejoin>lineJ=
oin</a></code> type, as
+    defined below.</p>
+
+    <p><strong>Caps</strong>: Each point has a flat ed=
ge perpendicular to the direction of the line
+    coming out of it. This is them augmented according to the value of t=
he <var title=3D"">styles</var> <code title=3Ddo=
m-context-2d-lineCap><a href=3D#dom-context-2d-linecap>lineCap&l=
t;/a></code>. The <code>butt</code>
+    value means that no additional line cap is added. The <code>ro=
und</code> value means that a
+    semi-circle with the diameter equal to the <var title=3D"&qu=
ot;>styles</var> <code title=3Ddom-context-2d-lineWidth>&l=
t;a href=3D#dom-context-2d-linewidth>lineWidth</a></code> =
width must additionally be placed on to the
+    line coming out of each point. The <code>square</code> v=
alue means that a rectangle with the
+    length of the <var title=3D"">styles</var> &lt=
;code title=3Ddom-context-2d-lineWidth><a href=3D#dom-context-2d-li=
newidth>lineWidth</a></code>
+    width and the width of half the <var title=3D"">styl=
es</var> <code title=3Ddom-context-2d-lineWidth><a href=3D=
#dom-context-2d-linewidth>lineWidth</a></code> width, plac=
ed flat against the edge
+    perpendicular to the direction of the line coming out of the point, =
must be added at each
+    point.</p>
+
+    <p>Points with no lines coming out of them must have two caps =
placed back-to-back as if it was
+    really two points connected to each other by an infinitesimally shor=
t straight line in the
+    direction of the point's <i>directionality</i> (as defin=
ed above).</p>
+
+    <p><strong>Joins</strong>: In addition to the poin=
t where a join occurs, two additional points
+    are relevant to each join, one for each line: the two corners found =
half the line width away
+    from the join point, one perpendicular to each line, each on the sid=
e furthest from the other
+    line.</p>
+
+    <p>A filled triangle connecting these two opposite corners wit=
h a straight line, with the third
+    point of the triangle being the join point, must be added at all joi=
ns. The <code title=3Ddom-context-2d-lineJoin><a href=3D#dom-con=
text-2d-linejoin>lineJoin</a></code> attribute controls wh=
ether anything else is
+    rendered. The three aforementioned values have the following meaning=
s:</p>
+
+    <p>The <code>bevel</code> value means that this is=
 all that is rendered at joins.</p>
+
+    <p>The <code>round</code> value means that a fille=
d arc connecting the two aforementioned
+    corners of the join, abutting (and not overlapping) the aforemention=
ed triangle, with the
+    diameter equal to the line width and the origin at the point of the =
join, must be added at
+    joins.</p>
+
+    <p>The <code>miter</code> value means that a secon=
d filled triangle must (if it can given the
+    miter length) be added at the join, with one line being the line bet=
ween the two aforementioned
+    corners, abutting the first triangle, and the other two being contin=
uations of the outside edges
+    of the two joining lines, as long as required to intersect without g=
oing over the miter
+    length.</p>
+
+    <p>The miter length is the distance from the point where the j=
oin occurs to the intersection of
+    the line edges on the outside of the join. The miter limit ratio is =
the maximum allowed ratio of
+    the miter length to half the line width. If the miter length would c=
ause the miter limit ratio
+    (as set by the <var title=3D"">style</var> &lt=
;code title=3Ddom-context-2d-miterLimit><a href=3D#dom-context-2d-m=
iterlimit>miterLimit</a></code> attribute) to be exceeded,=
 this second
+    triangle must not be added.</p> <!-- the actual ratio can't=
 possibly be less than 1.0 -->
+
+<!-- here's a nice demo of the miter:
+  c.clearRect(0, 0, 640, 480);
+  c.beginPath();
+
+  c.moveTo((new Date()/100) % 600, 100);
+  c.lineTo(300, 300);
+  c.lineTo(500, 300);
+
+  c.lineWidth =3D 50;
+  c.miterLimit =3D 10000;
+  c.strokeStyle =3D 'silver'
+  c.stroke();
+
+  c.miterLimit =3D 0.0001;
+  c.strokeStyle =3D 'black'
+  c.stroke();
+
+  c.lineWidth =3D 1;
+  c.strokeStyle =3D 'red'
+  c.stroke();
+-->
+
+
+    <p>Subpaths in the newly created path must wind clockwise, reg=
ardless of the direction of paths
+    in <var title=3D"">path</var>.</p>
+
+    <!-- ...because both of these examples result in two lines (assum=
ing non-zero winding rules,
+    things are different under even/odd), there's no "hole" wh=
ere the lines overlap:
+
+            c.beginPath();
+            c.lineWidth=3D30;
+            c.moveTo(200,200); // subpath 1
+            c.lineTo(400,200);
+            c.moveTo(400,210); // subpath 2
+            c.lineTo(200,190);
+            c.stroke();
+
+            c.beginPath();
+            c.lineWidth=3D30;
+            c.moveTo(200,200); // subpath 1
+            c.lineTo(400,200);
+            c.lineTo(300,300);
+            c.closePath();
+            c.moveTo(400,210); // subpath 2
+            c.lineTo(200,190);
+            c.lineTo(300,300);
+            c.closePath();
+            c.stroke();
+
+     ...and we want the same result when you create the two subpaths in =
each example above as two
+     Paths, stroke them onto a third Path, and then fill that Path on th=
e context.
+    -->
+
+   </li>
+
+   <li><p>Return the newly created path.</li>
+
+  </ol><!--v6: Another request has been for hairline width line=
s, that remain hairline width with
+transform. ack Shaun Morris. --></div>
+
+
+  <h6 id=3Dtext-styles><span class=3Dsecno>4.12.4.2.5 </s=
pan>Text styles</h6>
+
+  <dl class=3Ddomintro><dt><var title=3D"">c=
ontext</var> . <code title=3Ddom-context-2d-font><a href=3D=
#dom-context-2d-font>font</a></code> [ =3D <var title=3D=
"">value</var> ]</dt>
+   <dt><var title=3D"">styles</var> . <co=
de title=3Ddom-context-2d-font><a href=3D#dom-context-2d-font>fo=
nt</a></code> [ =3D <var title=3D"">value<=
/var> ]</dt>
+
+   <dd>
+
+    <p>Returns the current font settings.</p>
+
+    <p>Can be set, to change the font. The syntax is the same as f=
or the CSS 'font' property; values
+    that cannot be parsed as CSS font values are ignored.</p>
+
+    <p>Relative keywords and lengths are computed relative to the =
font of the <code><a href=3D#the-canvas-element>canvas</a&=
gt;</code>
+    element.</p>
+
+   </dd>
+
+   <dt><var title=3D"">context</var> . <c=
ode title=3Ddom-context-2d-textAlign><a href=3D#dom-context-2d-text=
align>textAlign</a></code> [ =3D <var title=3D"&qu=
ot;>value</var> ]</dt>
+   <dt><var title=3D"">styles</var> . <co=
de title=3Ddom-context-2d-textAlign><a href=3D#dom-context-2d-texta=
lign>textAlign</a></code> [ =3D <var title=3D"&quo=
t;>value</var> ]</dt>
+
+   <dd>
+
+    <p>Returns the current text alignment settings.</p>
+
+    <p>Can be set, to change the alignment. The possible values ar=
e and their meanings are given
+    below. Other values are ignored. The default is <code title=3D&qu=
ot;">start</code>.</p>
+
+   </dd>
+
+   <dt><var title=3D"">context</var> . <c=
ode title=3Ddom-context-2d-textBaseline><a href=3D#dom-context-2d-t=
extbaseline>textBaseline</a></code> [ =3D <var title=3D=
"">value</var> ]</dt>
+   <dt><var title=3D"">styles</var> . <co=
de title=3Ddom-context-2d-textBaseline><a href=3D#dom-context-2d-te=
xtbaseline>textBaseline</a></code> [ =3D <var title=3D&=
quot;">value</var> ]</dt>
+
+   <dd>
+
+    <p>Returns the current baseline alignment settings.</p>
+
+    <p>Can be set, to change the baseline alignment. The possible =
values and their meanings are
+    given below. Other values are ignored. The default is <code title=
=3Ddom-concept-2d-textAlign-alphabetic>alphabetic</code>.</p&=
gt;
+
+   </dd>
+
+   <dt><var title=3D"">context</var> . <c=
ode title=3Ddom-context-2d-direction><a href=3D#dom-context-2d-dire=
ction>direction</a></code> [ =3D <var title=3D"&qu=
ot;>value</var> ]</dt>
+   <dt><var title=3D"">styles</var> . <co=
de title=3Ddom-context-2d-direction><a href=3D#dom-context-2d-direc=
tion>direction</a></code> [ =3D <var title=3D"&quo=
t;>value</var> ]</dt>
+
+   <dd>
+
+    <p>Returns the current directionality.</p>
+
+    <p>Can be set, to change the directionality. The possible valu=
es and their meanings are given
+    below. Other values are ignored. The default is <code title=3Ddom=
-concept-2d-textAlign-inherit>inherit</code>.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>Objects that implement the <code><a href=3D#canvasdr=
awingstyles>CanvasDrawingStyles</a></code> interface have =
attributes (defined
+  in this section) that control how text is laid out (rasterized or outl=
ined) by the object. Such
+  objects can also have a <dfn id=3Dfont-style-source-object>font =
style source object</dfn>. For
+  <code><a href=3D#canvasrenderingcontext2d>CanvasRenderingC=
ontext2D</a></code> objects whose <a href=3D#concept-canva=
s-context-bitmap-mode title=3Dconcept-canvas-context-bitmap-mode>conte=
xt bitmap mode</a> is <a href=3D#concept-canvas-fixed title=3Dco=
ncept-canvas-fixed>fixed</a>, this is their <code><a hr=
ef=3D#the-canvas-element>canvas</a></code> element; for ot=
her
+  <code><a href=3D#canvasrenderingcontext2d>CanvasRenderingC=
ontext2D</a></code> objects, if the <a href=3D#javascript-=
global-environment>JavaScript global environment</a>
+  is a <a href=3D#document-environment>document environment</a&=
gt;, the object's <a href=3D#font-style-source-object>font style so=
urce object</a> is the
+  <code><a href=3D#document>Document</a></code> =
object of the <a href=3D#active-document>active document</a> =
of the <a href=3D#browsing-context>browsing
+  context</a> of the <code><a href=3D#window>Window&lt=
;/a></code> object on which the interface object of the
+  <code><a href=3D#canvasrenderingcontext2d>CanvasRenderingC=
ontext2D</a></code> object is found; otherwise the <a href=
=3D#javascript-global-environment>JavaScript global
+  environment</a> is a <a href=3D#worker-environment>worker =
environment</a> and the <a href=3D#font-style-source-object>f=
ont style source
+  object</a> is the worker. For <code><a href=3D#drawings=
tyle>DrawingStyle</a></code> objects, it's the <a href=3D=
#styles-scope-object>styles scope
+  object</a>.</p>
+
+  <p>The <dfn id=3Ddom-context-2d-font title=3Ddom-context-2d-f=
ont><code>font</code></dfn> IDL attribute, on settin=
g, must be
+  parsed the same way as the 'font' property of CSS (but without support=
ing property-independent
+  style sheet syntax like 'inherit'), and the resulting font must be ass=
igned to the context, with
+  the 'line-height' component forced to 'normal', with the 'font-size' c=
omponent converted to CSS
+  pixels, and with system fonts being computed to explicit values. If th=
e new value is syntactically
+  incorrect (including using property-independent style sheet syntax lik=
e 'inherit' or 'initial'),
+  then it must be ignored, without assigning a new font value. <a hre=
f=3D#refsCSS>[CSS]</a></p>
+
+  <p>Font family names must be interpreted in the context of the &=
lt;a href=3D#font-style-source-object>font style source
+  object</a> when the font is to be used; any fonts embedded using=
 <code title=3D"">@font-face</code> or loaded using=
 the <code><a href=3D#fontloader>FontLoader</a></cod=
e> that are visible to the
+  <a href=3D#font-style-source-object>font style source object<=
/a> must therefore be available once they are loaded. If a font
+  is used before it is fully loaded, or if the <a href=3D#font-style-=
source-object>font style source object</a> does not have
+  that font in scope at the time the font is to be used, then it must be=
 treated as if it was an
+  unknown font, falling back to another as described by the relevant CSS=
 specifications. <a href=3D#refsCSSFONTS>[CSSFONTS]</a> <a=
 href=3D#refsCSSFONTLOAD>[CSSFONTLOAD]</a></p>
+
+  <p>On getting, the <code title=3Ddom-context-2d-font><a=
 href=3D#dom-context-2d-font>font</a></code> attribute mus=
t return the <a href=3D#serializing-a-css-value title=3D"serializ=
ing a CSS value">serialized form</a> of the current font of=
 the context (with no
+  'line-height' component). <a href=3D#refsCSSOM>[CSSOM]</a>=
</p>
+
+  <div class=3Dexample>
+
+   <p>For example, after the following statement:</p>
+
+   <pre>context.font =3D 'italic 400 12px/2 Unknown Font, sans-ser=
if';</pre>
+
+   <p>...the expression <code title=3D"">context.f=
ont</code> would evaluate to the string "<code title=3D&quo=
t;">italic 12px "Unknown Font&quo=
t;, sans-serif</code>". The "400"
+   font-weight doesn't appear because that is the default value. The lin=
e-height doesn't appear
+   because it is forced to "normal", the default value.</p&=
gt;
+
+  </div>
+
+  <p>When the object implementing the <code><a href=3D#ca=
nvasdrawingstyles>CanvasDrawingStyles</a></code> interface=
 is created, the
+  font of the context must be set to 10px sans-serif. When the 'font-siz=
e' component is set to
+  lengths using percentages, 'em' or 'ex' units, or the 'larger' or 'sma=
ller' keywords, these must
+  be interpreted relative to the computed value of the 'font-size' prope=
rty of the <a href=3D#font-style-source-object>font style
+  source object</a> at the time that the attribute is set, if it i=
s an element. When the
+  'font-weight' component is set to the relative values 'bolder' and 'li=
ghter', these must be
+  interpreted relative to the computed value of the 'font-weight' proper=
ty of the <a href=3D#font-style-source-object>font style
+  source object</a> at the time that the attribute is set, if it i=
s an element. If the computed
+  values are undefined for a particular case (e.g. because the <a hre=
f=3D#font-style-source-object>font style source object</a>
+  is not an element or is not <a href=3D#being-rendered>being rend=
ered</a>), then the relative keywords must be
+  interpreted relative to the normal-weight 10px sans-serif default.<=
/p>
+
+  <p>The <dfn id=3Ddom-context-2d-textalign title=3Ddom-context=
-2d-textAlign><code>textAlign</code></dfn> IDL attri=
bute, on
+  getting, must return the current value. On setting, if the value is on=
e of <code title=3Ddom-concept-2d-textAlign-start><a href=3D#dom=
-concept-2d-textalign-start>start</a></code>, <code tit=
le=3Ddom-concept-2d-textAlign-end><a href=3D#dom-concept-2d-textali=
gn-end>end</a></code>, <code title=3Ddom-concept-2d-tex=
tAlign-left><a href=3D#dom-concept-2d-textalign-left>left</a&=
gt;</code>, <code title=3Ddom-concept-2d-textAlign-right><=
a href=3D#dom-concept-2d-textalign-right>right</a></code>,=
 or <code title=3Ddom-concept-2d-textAlign-center><a href=3D#dom=
-concept-2d-textalign-center>center</a></code>, then the v=
alue must be changed to the new
+  value. Otherwise, the new value must be ignored. When the object imple=
menting the
+  <code><a href=3D#canvasdrawingstyles>CanvasDrawingStyles&l=
t;/a></code> interface is created, the <code title=3Ddom-cont=
ext-2d-textAlign><a href=3D#dom-context-2d-textalign>textAlign&l=
t;/a></code> attribute must initially have the value <code ti=
tle=3Ddom-concept-2d-textAlign-start><a href=3D#dom-concept-2d-text=
align-start>start</a></code>.</p>
+
+  <p>The <dfn id=3Ddom-context-2d-textbaseline title=3Ddom-cont=
ext-2d-textBaseline><code>textBaseline</code></dfn> =
IDL attribute, on
+  getting, must return the current value. On setting, if the value is on=
e of <code title=3Ddom-context-2d-textBaseline-top><a href=3D#do=
m-context-2d-textbaseline-top>top</a></code>, <code tit=
le=3Ddom-context-2d-textBaseline-hanging><a href=3D#dom-context-2d-=
textbaseline-hanging>hanging</a></code>, <code title=3D=
dom-context-2d-textBaseline-middle><a href=3D#dom-context-2d-textba=
seline-middle>middle</a></code>, <code title=3Ddom-cont=
ext-2d-textBaseline-alphabetic><a href=3D#dom-context-2d-textbaseli=
ne-alphabetic>alphabetic</a></code>, <code title=3Ddom-=
context-2d-textBaseline-ideographic><a href=3D#dom-context-2d-textb=
aseline-ideographic>ideographic</a></code>, or <code ti=
tle=3Ddom-context-2d-textBaseline-bottom><a href=3D#dom-context-2d-=
textbaseline-bottom>bottom</a></code>, then the value must=
 be changed to the
+  new value. Otherwise, the new value must be ignored. When the object i=
mplementing the
+  <code><a href=3D#canvasdrawingstyles>CanvasDrawingStyles&l=
t;/a></code> interface is created, the <code title=3Ddom-cont=
ext-2d-textBaseline><a href=3D#dom-context-2d-textbaseline>textB=
aseline</a></code> attribute must initially have the value
+  <code title=3Ddom-context-2d-textBaseline-alphabetic><a href=3D=
#dom-context-2d-textbaseline-alphabetic>alphabetic</a></code&=
gt;.</p>
+
+  <p>The <dfn id=3Ddom-context-2d-direction title=3Ddom-context=
-2d-direction><code>direction</code></dfn> IDL attri=
bute, on
+  getting, must return the current value. On setting, if the value is on=
e of <code title=3Ddom-context-2d-direction-ltr>ltr</code>, &=
lt;code title=3Ddom-context-2d-direction-rtl>rtl</code>, <!--=
<code
+  title=3D"dom-context-2d-direction-auto">auto</code>=
,--> or <code title=3Ddom-context-2d-direction-inherit>inherit&l=
t;/code>, then the value must be changed to the new
+  value. Otherwise, the new value must be ignored. When the object imple=
menting the
+  <code><a href=3D#canvasdrawingstyles>CanvasDrawingStyles&l=
t;/a></code> interface is created, the <code title=3Ddom-cont=
ext-2d-direction><a href=3D#dom-context-2d-direction>direction&l=
t;/a></code> attribute must initially have the value <code ti=
tle=3Ddom-context-2d-direction-inherit>inherit</code>.</p>
+
+  </div>
+
+  <p>The <code title=3Ddom-context-2d-textAlign><a href=3D=
#dom-context-2d-textalign>textAlign</a></code> attribute's=
 allowed keywords are
+  as follows:</p>
+
+  <dl><dt><dfn id=3Ddom-concept-2d-textalign-start title=3D=
dom-concept-2d-textAlign-start><code>start</code></dfn&=
gt;
+   <dd><p>Align to the start edge of the text (left side in =
left-to-right text, right side in
+   right-to-left text).</dd>
+
+   <dt><dfn id=3Ddom-concept-2d-textalign-end title=3Ddom-conce=
pt-2d-textAlign-end><code>end</code></dfn>
+   <dd><p>Align to the end edge of the text (right side in l=
eft-to-right text, left side in
+   right-to-left text).</dd>
+
+   <dt><dfn id=3Ddom-concept-2d-textalign-left title=3Ddom-conc=
ept-2d-textAlign-left><code>left</code></dfn>
+   <dd><p>Align to the left.</dd>
+
+   <dt><dfn id=3Ddom-concept-2d-textalign-right title=3Ddom-con=
cept-2d-textAlign-right><code>right</code></dfn>
+   <dd><p>Align to the right.</dd>
+
+   <dt><dfn id=3Ddom-concept-2d-textalign-center title=3Ddom-co=
ncept-2d-textAlign-center><code>center</code></dfn>
+   <dd><p>Align to the center.</dd>
+
+  </dl><p>The <code title=3Ddom-context-2d-textBaseline&g=
t;<a href=3D#dom-context-2d-textbaseline>textBaseline</a><=
/code>
+  attribute's allowed keywords correspond to alignment points in the
+  font:</p>
+
+  <p><img src=3Dhttp://images.whatwg.org/baselines.png width=3D=
738 alt=3D"The top of the em square is roughly at the top of the gly=
phs in a font, the hanging baseline is where some glyphs like आ=
 are anchored, the middle is half-way between the top of the em square an=
d the bottom of the em square, the alphabetic baseline is where character=
s like Á, ÿ, f, and Ω are anchored, the ideog=
raphic baseline is where glyphs like 私 and 達 are an=
chored, and the bottom of the em square is roughly at the bottom of the g=
lyphs in a font. The top and bottom of the bounding box can be far from t=
hese baselines, due to glyphs extending far outside the em square." =
height=3D300></p>
+
+  <p>The keywords map to these alignment points as follows:</p&=
gt;
+
+  <dl><dt><dfn id=3Ddom-context-2d-textbaseline-top title=
=3Ddom-context-2d-textBaseline-top><code>top</code></df=
n>
+   <dd>The top of the em square</dd>
+
+   <dt><dfn id=3Ddom-context-2d-textbaseline-hanging title=3Ddo=
m-context-2d-textBaseline-hanging><code>hanging</code><=
/dfn>
+   <dd>The hanging baseline</dd>
+
+   <dt><dfn id=3Ddom-context-2d-textbaseline-middle title=3Ddom=
-context-2d-textBaseline-middle><code>middle</code></df=
n>
+   <dd>The middle of the em square</dd>
+
+   <dt><dfn id=3Ddom-context-2d-textbaseline-alphabetic title=3D=
dom-context-2d-textBaseline-alphabetic><code>alphabetic</code=
></dfn>
+   <dd>The alphabetic baseline</dd>
+
+   <dt><dfn id=3Ddom-context-2d-textbaseline-ideographic title=3D=
dom-context-2d-textBaseline-ideographic><code>ideographic</co=
de></dfn>
+   <dd>The ideographic baseline</dd>
+
+   <dt><dfn id=3Ddom-context-2d-textbaseline-bottom title=3Ddom=
-context-2d-textBaseline-bottom><code>bottom</code></df=
n>
+   <dd>The bottom of the em square</dd>
+
+  </dl><p>The <code title=3Ddom-context-2d-direction>&=
lt;a href=3D#dom-context-2d-direction>direction</a></code>=
 attribute's allowed keywords are
+  as follows:</p>
+
+  <dl><dt><dfn id=3Ddom-concept-2d-direction-ltr title=3D=
dom-concept-2d-direction-ltr><code>ltr</code></dfn>
+
+   <dd><p>Treat input to the <a href=3D#text-preparation-=
algorithm>text preparation algorithm</a> as left-to-right text.&=
lt;/dd>
+
+   <dt><dfn id=3Ddom-concept-2d-direction-rtl title=3Ddom-conce=
pt-2d-direction-rtl><code>rtl</code></dfn>
+
+   <dd><p>Treat input to the <a href=3D#text-preparation-=
algorithm>text preparation algorithm</a> as right-to-left text.&=
lt;/dd>
+
+<!--
+   <dt><dfn title=3D"dom-concept-2d-direction-auto"&g=
t;<code>auto</code></dfn>
+
+   <dd><p>Determine the direction from the input to the <=
span>text preparation algorithm</span>.</p></dd>
+-->
+
+   <dt><dfn id=3Ddom-concept-2d-direction-inherit title=3Ddom-c=
oncept-2d-direction-inherit><code>inherit</code></dfn&g=
t;
+
+   <dd><p>Default to the directionality of the <code>&=
lt;a href=3D#the-canvas-element>canvas</a></code> element =
or <code><a href=3D#document>Document</a></code>
+   as appropriate.</dd>
+
+  </dl><p>The <dfn id=3Dtext-preparation-algorithm>tex=
t preparation algorithm</dfn> is as follows. It takes as input a st=
ring <var title=3D"">text</var>, a <code><=
a href=3D#canvasdrawingstyles>CanvasDrawingStyles</a></code&g=
t; object <var title=3D"">target</var>, and an
+  optional length <var title=3D"">maxWidth</var>. =
It returns an array of glyph shapes, each positioned
+  on a common coordinate space, a <var title=3D"">physic=
al alignment</var> whose value is one of
+  <i>left</i>, <i>right</i>, and <i title=3D&=
quot;">center</i>, and an inline box. (Most callers of this
+  algorithm ignore the <var title=3D"">physical alignmen=
t</var> and the inline box.)</p>
+
+  <ol><li><p>If <var title=3D"">maxWid=
th</var> was provided but is less than or equal to zero, return an
+   empty array.</li>
+
+   <li><p>Replace all the <a href=3D#space-character titl=
e=3D"space character">space characters</a> in <var =
title=3D"">text</var> with U+0020 SPACE characters.&lt=
;/li>
+
+   <li><p>Let <var title=3D"">font</var&g=
t; be the current font of <var title=3D"">target</var&=
gt;, as given
+   by that object's <code title=3Ddom-context-2d-font><a href=3D=
#dom-context-2d-font>font</a></code> attribute.</li>
+
+   <li>
+
+    <p>Apply the appropriate step from the following list to deter=
mine the value of <var title=3D"">direction</var>:&=
lt;/p>
+
+    <dl class=3Dswitch><dt>If the <var title=3D"&quo=
t;>target</var> object's <code title=3Ddom-context-2d-directi=
on><a href=3D#dom-context-2d-direction>direction</a></c=
ode> attribute has the value "<code title=3Ddom-context-2d-dir=
ection-ltr>ltr</code>"</dt>
+     <dd>Let <var title=3D"">direction</var>=
 be '<a href=3D#concept-ltr title=3Dconcept-ltr>ltr</a>'.<=
/dd>
+
+     <dt>If the <var title=3D"">target</var>=
 object's <code title=3Ddom-context-2d-direction><a href=3D#dom-=
context-2d-direction>direction</a></code> attribute has th=
e value "<code title=3Ddom-context-2d-direction-rtl>rtl</co=
de>"</dt>
+     <dd>Let <var title=3D"">direction</var>=
 be '<a href=3D#concept-rtl title=3Dconcept-rtl>rtl</a>'.<=
/dd>
+
+<!--
+     <dt>If the <var title=3D"">target</var>=
 object's <code
+     title=3D"dom-context-2d-direction">direction</code&=
gt; attribute has the value "<code
+     title=3D"dom-context-2d-direction-auto">auto</code&=
gt;"</dt>
+     <dd>
+      Find the first character in <var title=3D"">text&l=
t;/var> of bidirectional character type L, AL, or
+      R, if any. If such a character is found and it is of bidirectional=
 character type AL or R,
+      then let <var title=3D"">direction</var> be =
'<span title=3D"concept-rtl">rtl</span>'; otherwise=
,
+      let <var title=3D"">direction</var> be '<=
span title=3D"concept-rtl">rtl</span>'. <a
+      href=3D"#refsBIDI">[BIDI]</a>
+     </dd>
+-->
+
+     <dt>If the <var title=3D"">target</var>=
 object's <a href=3D#font-style-source-object>font style source obj=
ect</a> is an
+     element</dt>
+
+     <dd>Let <var title=3D"">direction</var>=
 be <a href=3D#the-directionality>the directionality</a> of t=
he <var title=3D"">target</var> object's <a href=
=3D#font-style-source-object>font style source object</a>.</d=
d>
+
+     <dt>If the <var title=3D"">target</var>=
 object's <a href=3D#font-style-source-object>font style source obj=
ect</a> is a
+     <code><a href=3D#document>Document</a></code&g=
t; and that <code><a href=3D#document>Document</a></=
code> has a root element child</dt>
+
+     <dd>Let <var title=3D"">direction</var>=
 be <a href=3D#the-directionality>the directionality</a> of t=
he <var title=3D"">target</var> object's <a href=
=3D#font-style-source-object>font style source object</a>'s root=
 element child.</dd>
+
+     <dt>Otherwise</dt>
+
+     <dd>Let <var title=3D"">direction</var>=
 be '<a href=3D#concept-ltr title=3Dconcept-ltr>ltr</a>'.<=
/dd>
+
+    </dl></li>
+
+   <li><p>Form a hypothetical infinitely-wide CSS line box c=
ontaining a single inline box containing
+   the text <var title=3D"">text</var>, with all t=
he properties at their initial values except the
+   'font' property of the inline box set to <var title=3D""=
>font</var>, the 'direction' property of
+   the inline box set to <var title=3D"">direction</v=
ar>, and the 'white-space' property set to 'pre'.
+   <a href=3D#refsCSS>[CSS]</a></li>
+
+   <!-- if you insert a step here, make sure to adjust the next step'=
s final words -->
+
+   <li><p>If <var title=3D"">maxWidth</va=
r> was provided and the hypothetical width of the inline box
+   in the hypothetical line box is greater than <var title=3D"&q=
uot;>maxWidth</var> CSS pixels, then change
+   <var title=3D"">font</var> to have a more conde=
nsed font (if one is available or if a reasonably
+   readable one can be synthesized by applying a horizontal scale factor=
 to the font) or a smaller
+   font, and return to the previous step.</li>
+
+   <li>
+
+    <p>The <var title=3D"">anchor point</var&gt=
; is a point on the inline box, and the <var title=3D"">p=
hysical alignment</var> is one of the values <i>left</i&gt=
;, <i>right</i>, and <i title=3D"">center<=
/i>. These variables are determined by the <code title=3Ddom-contex=
t-2d-textAlign><a href=3D#dom-context-2d-textalign>textAlign<=
/a></code> and <code title=3Ddom-context-2d-textBaseline>&=
lt;a href=3D#dom-context-2d-textbaseline>textBaseline</a></co=
de> values as follows:</p>
+
+    <p>Horizontal position:</p>
+
+    <dl><dt>If <code title=3Ddom-context-2d-textAlign>=
<a href=3D#dom-context-2d-textalign>textAlign</a></code&gt=
; is <code title=3Ddom-concept-2d-textAlign-left><a href=3D#dom-=
concept-2d-textalign-left>left</a></code></dt>
+
+     <dt>If <code title=3Ddom-context-2d-textAlign><a hre=
f=3D#dom-context-2d-textalign>textAlign</a></code> is <=
code title=3Ddom-concept-2d-textAlign-start><a href=3D#dom-concept-=
2d-textalign-start>start</a></code> and <var title=3D&q=
uot;">direction</var> is
+     'ltr'</dt>
+
+     <dt>If <code title=3Ddom-context-2d-textAlign><a hre=
f=3D#dom-context-2d-textalign>textAlign</a></code> is <=
code title=3Ddom-concept-2d-textAlign-end><a href=3D#dom-concept-2d=
-textalign-end>end</a></code> and <var title=3D"&q=
uot;>direction</var> is 'rtl'</dt>
+
+     <dd>Let the <var title=3D"">anchor point</=
var>'s horizontal position be the left edge of the
+     inline box, and let <var title=3D"">physical alignm=
ent</var> be <i>left</i>.</dd>
+
+
+     <dt>If <code title=3Ddom-context-2d-textAlign><a hre=
f=3D#dom-context-2d-textalign>textAlign</a></code> is <=
code title=3Ddom-concept-2d-textAlign-right><a href=3D#dom-concept-=
2d-textalign-right>right</a></code></dt>
+
+     <dt>If <code title=3Ddom-context-2d-textAlign><a hre=
f=3D#dom-context-2d-textalign>textAlign</a></code> is <=
code title=3Ddom-concept-2d-textAlign-end><a href=3D#dom-concept-2d=
-textalign-end>end</a></code> and <var title=3D"&q=
uot;>direction</var> is 'ltr'</dt>
+
+     <dt>If <code title=3Ddom-context-2d-textAlign><a hre=
f=3D#dom-context-2d-textalign>textAlign</a></code> is <=
code title=3Ddom-concept-2d-textAlign-start><a href=3D#dom-concept-=
2d-textalign-start>start</a></code> and <var title=3D&q=
uot;">direction</var> is
+     'rtl'</dt>
+
+     <dd>Let the <var title=3D"">anchor point</=
var>'s horizontal position be the right edge of the
+     inline box, and let <var title=3D"">physical alignm=
ent</var> be <i>right</i>.</dd>
+
+
+     <dt>If <code title=3Ddom-context-2d-textAlign><a hre=
f=3D#dom-context-2d-textalign>textAlign</a></code> is <=
code title=3Ddom-concept-2d-textAlign-center><a href=3D#dom-concept=
-2d-textalign-center>center</a></code></dt>
+
+     <dd>Let the <var title=3D"">anchor point</=
var>'s horizontal position be half way between the left
+     and right edges of the inline box, and let <var title=3D"&q=
uot;>physical alignment</var> be <i title=3D"">c=
enter</i>.</dd>
+
+    </dl><p>Vertical position:</p>
+
+    <dl><dt>If <code title=3Ddom-context-2d-textBaseline&=
gt;<a href=3D#dom-context-2d-textbaseline>textBaseline</a>&lt=
;/code> is <code title=3Ddom-context-2d-textBaseline-top><a h=
ref=3D#dom-context-2d-textbaseline-top>top</a></code></=
dt>
+
+     <dd>Let the <var title=3D"">anchor point</=
var>'s vertical position be the top of the em box of
+     the first available font of the inline box.</dd>
+
+
+     <dt>If <code title=3Ddom-context-2d-textBaseline><a =
href=3D#dom-context-2d-textbaseline>textBaseline</a></code&gt=
; is <code title=3Ddom-context-2d-textBaseline-hanging><a href=3D=
#dom-context-2d-textbaseline-hanging>hanging</a></code>&lt=
;/dt>
+
+     <dd>Let the <var title=3D"">anchor point</=
var>'s vertical position be the hanging baseline of the
+     first available font of the inline box.</dd>
+
+
+     <dt>If <code title=3Ddom-context-2d-textBaseline><a =
href=3D#dom-context-2d-textbaseline>textBaseline</a></code&gt=
; is <code title=3Ddom-context-2d-textBaseline-middle><a href=3D=
#dom-context-2d-textbaseline-middle>middle</a></code></=
dt>
+
+     <dd>Let the <var title=3D"">anchor point</=
var>'s vertical position be half way between the bottom
+     and the top of the em box of the first available font of the inline=
 box.</dd>
+
+
+     <dt>If <code title=3Ddom-context-2d-textBaseline><a =
href=3D#dom-context-2d-textbaseline>textBaseline</a></code&gt=
; is <code title=3Ddom-context-2d-textBaseline-alphabetic><a hre=
f=3D#dom-context-2d-textbaseline-alphabetic>alphabetic</a></c=
ode></dt>
+
+     <dd>Let the <var title=3D"">anchor point</=
var>'s vertical position be the alphabetic baseline of
+     the first available font of the inline box.</dd>
+
+
+     <dt>If <code title=3Ddom-context-2d-textBaseline><a =
href=3D#dom-context-2d-textbaseline>textBaseline</a></code&gt=
; is <code title=3Ddom-context-2d-textBaseline-ideographic><a hr=
ef=3D#dom-context-2d-textbaseline-ideographic>ideographic</a>&lt=
;/code></dt>
+
+     <dd>Let the <var title=3D"">anchor point</=
var>'s vertical position be the ideographic baseline of
+     the first available font of the inline box.</dd>
+
+
+     <dt>If <code title=3Ddom-context-2d-textBaseline><a =
href=3D#dom-context-2d-textbaseline>textBaseline</a></code&gt=
; is <code title=3Ddom-context-2d-textBaseline-bottom><a href=3D=
#dom-context-2d-textbaseline-bottom>bottom</a></code></=
dt>
+
+     <dd>Let the <var title=3D"">anchor point</=
var>'s vertical position be the bottom of the em box of
+     the first available font of the inline box.</dd>
+
+    </dl></li>
+
+   <li>
+
+    <p>Let <var title=3D"">result</var> be a=
n array constructed by iterating over each glyph in the
+    inline box from left to right (if any), adding to the array, for eac=
h glyph, the shape of the
+    glyph as it is in the inline box, positioned on a coordinate space u=
sing CSS pixels with its
+    origin is at the <var title=3D"">anchor point</va=
r>.</p>
+
+   </li>
+
+   <li><p>Return <var title=3D"">result</=
var>, <var title=3D"">physical alignment</var>, =
and the inline
+   box.</li>
+
+  </ol><h6 id=3Dbuilding-paths><span class=3Dsecno>4.1=
2.4.2.6 </span>Building paths</h6>
+
+  <p>Each object implementing the <code><a href=3D#canvas=
pathmethods>CanvasPathMethods</a></code> interface has a &=
lt;a href=3D#concept-path title=3Dconcept-path>path</a>. A <d=
fn id=3Dconcept-path title=3Dconcept-path>path</dfn> has a list =
of zero or
+  more subpaths. Each subpath consists of a list of one or more points, =
connected by straight or
+  curved lines, and a flag indicating whether the subpath is closed or n=
ot. A closed subpath is one
+  where the last point of the subpath is connected to the first point of=
 the subpath by a straight
+  line. Subpaths with only one point are ignored when painting the path.=
</p>
+
+  <p>When an object implementing the <code><a href=3D#can=
vaspathmethods>CanvasPathMethods</a></code> interface is c=
reated, its <a href=3D#concept-path title=3Dconcept-path>path</a=
> must be initialized to zero subpaths.</p>
+
+  <dl class=3Ddomintro><dt><var title=3D"">c=
ontext</var> . <code title=3Ddom-context-2d-moveTo><a href=
=3D#dom-context-2d-moveto>moveTo</a></code>(<var title=3D=
"">x</var>, <var title=3D"">y</var&=
gt;)</dt>
+   <dt><var title=3D"">path</var> . <code=
 title=3Ddom-context-2d-moveTo><a href=3D#dom-context-2d-moveto>=
moveTo</a></code>(<var title=3D"">x</var&g=
t;, <var title=3D"">y</var>)</dt>
+
+   <dd>
+
+    <p>Creates a new subpath with the given point.</p>
+
+   </dd>
+
+   <dt><var title=3D"">context</var> . <c=
ode title=3Ddom-context-2d-closePath><a href=3D#dom-context-2d-clos=
epath>closePath</a></code>()</dt>
+   <dt><var title=3D"">path</var> . <code=
 title=3Ddom-context-2d-closePath><a href=3D#dom-context-2d-closepa=
th>closePath</a></code>()</dt>
+
+   <dd>
+
+    <p>Marks the current subpath as closed, and starts a new subpa=
th with a point the same as the
+    start and end of the newly closed subpath.</p>
+
+   </dd>
+
+   <dt><var title=3D"">context</var> . <c=
ode title=3Ddom-context-2d-lineTo><a href=3D#dom-context-2d-lineto&=
gt;lineTo</a></code>(<var title=3D"">x</va=
r>, <var title=3D"">y</var>)</dt>
+   <dt><var title=3D"">path</var> . <code=
 title=3Ddom-context-2d-lineTo><a href=3D#dom-context-2d-lineto>=
lineTo</a></code>(<var title=3D"">x</var&g=
t;, <var title=3D"">y</var>)</dt>
+
+   <dd>
+
+    <p>Adds the given point to the current subpath, connected to t=
he previous one by a straight
+    line.</p>
+
+   </dd>
+
+   <dt><var title=3D"">context</var> . <c=
ode title=3Ddom-context-2d-quadraticCurveTo><a href=3D#dom-context-=
2d-quadraticcurveto>quadraticCurveTo</a></code>(<var ti=
tle=3D"">cpx</var>, <var title=3D"">cp=
y</var>, <var title=3D"">x</var>, <var tit=
le=3D"">y</var>)</dt>
+   <dt><var title=3D"">path</var> . <code=
 title=3Ddom-context-2d-quadraticCurveTo><a href=3D#dom-context-2d-=
quadraticcurveto>quadraticCurveTo</a></code>(<var title=
=3D"">cpx</var>, <var title=3D"">cpy&l=
t;/var>, <var title=3D"">x</var>, <var title=3D=
"">y</var>)</dt>
+
+   <dd>
+
+    <p>Adds the given point to the current subpath, connected to t=
he previous one by a quadratic
+    Bézier curve with the given control point.</p>
+
+   </dd>
+
+   <dt><var title=3D"">context</var> . <c=
ode title=3Ddom-context-2d-bezierCurveTo><a href=3D#dom-context-2d-=
beziercurveto>bezierCurveTo</a></code>(<var title=3D&qu=
ot;">cp1x</var>, <var title=3D"">cp1y</v=
ar>, <var title=3D"">cp2x</var>, <var title=3D=
"">cp2y</var>, <var title=3D"">x</v=
ar>, <var title=3D"">y</var>)</dt>
+   <dt><var title=3D"">path</var> . <code=
 title=3Ddom-context-2d-bezierCurveTo><a href=3D#dom-context-2d-bez=
iercurveto>bezierCurveTo</a></code>(<var title=3D"=
">cp1x</var>, <var title=3D"">cp1y</var&=
gt;, <var title=3D"">cp2x</var>, <var title=3D&q=
uot;">cp2y</var>, <var title=3D"">x</var=
>, <var title=3D"">y</var>)</dt>
+
+   <dd>
+
+    <p>Adds the given point to the current subpath, connected to t=
he previous one by a cubic
+    Bézier curve with the given control points.</p>
+
+   </dd>
+
+   <dt><var title=3D"">context</var> . <c=
ode title=3Ddom-context-2d-arcTo><a href=3D#dom-context-2d-arcto&gt=
;arcTo</a></code>(<var title=3D"">x1</var&=
gt;, <var title=3D"">y1</var>, <var title=3D&quo=
t;">x2</var>, <var title=3D"">y2</var&gt=
;, <var title=3D"">radiusX</var> [, <var title=3D=
"">radiusY</var>, <var title=3D"">rota=
tion</var> ])</dt>
+   <dt><var title=3D"">path</var> . <code=
 title=3Ddom-context-2d-arcTo><a href=3D#dom-context-2d-arcto>ar=
cTo</a></code>(<var title=3D"">x1</var>=
, <var title=3D"">y1</var>, <var title=3D"&=
quot;>x2</var>, <var title=3D"">y2</var>, =
<var title=3D"">radiusX</var> [, <var title=3D&q=
uot;">radiusY</var>, <var title=3D"">rotati=
on</var> ])</dt>
+
+   <dd>
+
+    <p>Adds an arc with the given control points and radius to the=
 current subpath, connected to the
+    previous point by a straight line.</p>
+
+    <p>If two radii are provided, the first controls the width of =
the arc's ellipse, and the second
+    controls the height. If only one is provided, or if they are the sam=
e, the arc is from a circle.
+    In the case of an ellipse, the rotation argument controls the clockw=
ise inclination of the
+    ellipse relative to the x-axis.</p>
+
+    <p>Throws an <code><a href=3D#indexsizeerror>Index=
SizeError</a></code> exception if the given radius is negativ=
e.</p>
+
+    <figure class=3Ddiagrams><!-- if anyone wants to try writin=
g alternative text for these,
+     be my guest. I can't work out how to describe them. --><img s=
rc=3Dhttp://images.whatwg.org/arcTo1.png width=3D357 alt=3D"" h=
eight=3D254><img src=3Dhttp://images.whatwg.org/arcTo2.png width=3D=
468 alt=3D"" height=3D310><img src=3Dhttp://images.whatwg=
.org/arcTo3.png width=3D513 alt=3D"" height=3D233></figur=
e><!--
+
+c.clearRect(0, 0, 640, 480);
+c.save();
+try {
+  var x0 =3D 150;
+  var y0 =3D 100;
+  var x1 =3D 375;
+  var y1 =3D 100;
+  var x2 =3D x1;
+  var y2 =3D 250;
+  var r =3D 50;
+
+  var bottom =3D 210;
+  var center =3D 100;
+
+  var fontSize =3D 16;
+  var margin =3D 50;
+  var dotHalfSize =3D 5;
+
+  // (also update the label positions at the bottom)
+
+
+  // =3D=3D=3D=3D=3D=3D=3D=3D
+
+  function extendLine(xa,ya,xb,yb) {
+    var dx =3D xb-xa;
+    var dy =3D yb-ya;
+    var theta =3D Math.atan2(dx,dy);
+    var extX =3D margin * Math.sin(theta);
+    var extY =3D margin * Math.cos(theta);
+    c.beginPath();
+    c.moveTo(xa-extX,ya-extY);
+    c.lineTo(xb+extX,yb+extY);
+    c.stroke();
+  }
+
+  function dot(x,y,s) {
+    c.beginPath();
+    c.arc(x,y,dotHalfSize,0,Math.PI*2);
+    c.fill();
+    c.textAlign =3D 'left';
+    c.textBaseline =3D 'top';
+    c.fillText(s,x+dotHalfSize,y);
+  }
+
+  c.font =3D fontSize + 'px Gill Sans';
+  c.fillStyle =3D 'black';
+  c.lineWidth =3D 1;
+  c.strokeStyle =3D 'red';
+  extendLine(x0,y0,x1,y1);
+  extendLine(x1,y1,x2,y2);
+
+  c.lineWidth =3D 1;
+  c.strokeStyle =3D 'silver';
+  c.beginPath();
+  c.moveTo(x0,y0);
+
+  // based on http://lists.freedesktop.org/archives/cairo/2005-August/00=
4801.html
+  var angle0, angle1, angle2, angled;
+  var xc, yc, dc;
+  angle0 =3D Math.atan2(y0 - y1, x0 - x1);
+  angle2 =3D Math.atan2(y2 - y1, x2 - x1);
+  angle1 =3D (angle0 + angle2) / 2;
+  angled =3D angle2 - angle0;
+  if (angled > Math.PI || (angled < 0 && angled > -Math=
.PI)) {
+    angle1 +=3D Math.PI;
+    angled =3D 2 * Math.PI - angled;
+    angle0 +=3D Math.PI*2;
+    angle2 -=3D Math.PI*2;
+  } else {
+    angle0 -=3D Math.PI*2;
+    angle2 +=3D Math.PI*2;
+  }
+  dc =3D r / Math.sin (angled / 2);
+  yc =3D Math.sin(angle1);
+  xc =3D Math.cos(angle1);
+  xc =3D x1 + xc * dc;
+  yc =3D y1 + yc * dc;
+
+  c.lineWidth =3D 1;
+  c.strokeStyle =3D 'blue';
+  c.beginPath();
+  c.moveTo(xc,yc);
+  c.arc(xc,yc,r, Math.PI*3/4, Math.PI*(3/4));
+  c.stroke();
+  c.beginPath();
+  c.strokeStyle =3D 'silver';
+  c.arc(xc,yc,r, Math.PI*3/4,Math.PI*(2+3/4));
+  c.stroke();
+  c.save();
+  try {
+    c.translate(xc, yc);
+    c.rotate(-Math.PI/4);
+    c.textAlign =3D 'center';
+    c.textBaseline =3D 'top';
+    c.fillText("radius", -r/2, 0);
+  } finally {
+    c.restore();
+  }
+
+  c.lineWidth =3D 15;
+  c.lineCap =3D 'round';
+  c.strokeStyle =3D 'rgba(20,200,40,0.8)';
+  c.beginPath();
+  c.moveTo(x0,y0);
+  c.arcTo(x1,y1,x2,y2,r);
+  c.stroke();
+
+  dot(x0,y0, "x\u2080,y\u2080");
+  dot(x1,y1, "x\u2081,y\u2081");
+  dot(x2,y2, "x\u2082,y\u2082");
+  dot(xc,yc, '');
+
+  c.textAlign =3D 'left';
+  c.textBaseline =3D 'alphabetic';
+  var L =3D 0;
+
+  function print(s) {
+    c.fillText(s, center, bottom+L*fontSize*1.3);
+    L +=3D 1;
+  }
+  print('// the thick line corresponds to:');
+  print('context.moveTo(x\u2080, y\u2080)');
+  print('context.arcTo(x\u2081, y\u2081, x\u2082, y\u2082, radius)');
+  print('context.stroke()');
+
+  c.fillStyle =3D 'green';
+  c.fillText("\u25be initial line", 160, 70);
+  c.textAlign =3D 'right';
+  c.fillText("arc \u25b8", x1-25, 115);
+
+} finally {
+  c.restore();
+}
+
+--></dd>
+
+   <dt><var title=3D"">context</var> . <c=
ode title=3Ddom-context-2d-arc><a href=3D#dom-context-2d-arc>arc=
</a></code>(<var title=3D"">x</var>, &l=
t;var title=3D"">y</var>, <var title=3D""=
>radius</var>, <var title=3D"">startAngle</va=
r>, <var title=3D"">endAngle</var> [, <var ti=
tle=3D"">anticlockwise</var> ] )</dt>
+   <dt><var title=3D"">path</var> . <code=
 title=3Ddom-context-2d-arc><a href=3D#dom-context-2d-arc>arc&lt=
;/a></code>(<var title=3D"">x</var>, <v=
ar title=3D"">y</var>, <var title=3D""&gt=
;radius</var>, <var title=3D"">startAngle</var&g=
t;, <var title=3D"">endAngle</var> [, <var title=
=3D"">anticlockwise</var> ] )</dt>
+
+   <dd>
+
+    <p>Adds points to the subpath such that the arc described by t=
he circumference of the circle
+    described by the arguments, starting at the given start angle and en=
ding at the given end angle,
+    going in the given direction (defaulting to clockwise), is added to =
the path, connected to the
+    previous point by a straight line.</p>
+
+    <p>Throws an <code><a href=3D#indexsizeerror>Index=
SizeError</a></code> exception if the given radius is negativ=
e.</p>
+
+    <figure class=3Ddiagrams><!-- if anyone wants to try writin=
g alternative text for this, be my guest. I can't work out how to describ=
e it. --><img src=3Dhttp://images.whatwg.org/arc1.png width=3D590 a=
lt=3D"" height=3D255></figure><!--
+
+c.clearRect(0, 0, 640, 480);
+c.save();
+try {
+  var x0 =3D 50;
+  var y0 =3D 200;
+  var x =3D 255;
+  var y =3D 150;
+  var radius =3D 100;
+  var startAngle =3D 2.0;
+  var endAngle =3D 5.7;
+  var direction =3D false;
+
+  var bottom =3D 110;
+  var center =3D 380;
+
+  var fontSize =3D 16;
+  var margin =3D 50;
+  var dotHalfSize =3D 5;
+  var arrowHead =3D 5;
+
+  // (also update the label positions at the bottom)
+
+  // =3D=3D=3D=3D=3D=3D=3D=3D
+
+  function dot(x,y,s) {
+    c.beginPath();
+    c.arc(x,y,dotHalfSize,0,Math.PI*2);
+    c.fill();
+    c.textAlign =3D 'center';
+    c.textBaseline =3D 'top';
+    c.fillText(s,x,y+dotHalfSize);
+  }
+
+  function arc(x, y, r, sA, eA, d, fr, s) {
+    c.lineWidth =3D 1;
+    c.strokeStyle =3D 'red';
+    c.beginPath();
+    c.arc(x, y, r, sA, eA, d);
+    c.stroke();
+
+    c.save();
+    c.translate(x, y);
+    c.rotate(eA);
+    c.beginPath();
+    c.moveTo(r-arrowHead, d?arrowHead:-arrowHead);
+    c.lineTo(r, 0);
+    c.lineTo(r+arrowHead, d?arrowHead:-arrowHead);
+    c.stroke();
+    c.strokeStyle =3D 'silver';
+    c.beginPath();
+    c.moveTo(0, 0);
+    c.lineTo(fr, 0);
+    c.stroke();
+    c.restore();
+
+    c.fillStyle =3D 'black';
+    if (eA<Math.PI) {
+      c.save();
+      c.translate(x, y);
+      c.rotate(sA+(eA-sA)/2-Math.PI/2);
+      c.translate(0, r);
+      c.rotate(-(sA+(eA-sA)/2-Math.PI/2));
+      c.beginPath();
+      c.textAlign =3D 'center';
+      c.textBaseline =3D 'bottom';
+      c.fillText(s + '  ',0,0);
+      c.restore();
+    } else {
+      c.save();
+      c.beginPath();
+      c.textAlign =3D 'left';
+      c.textBaseline =3D 'middle';
+      c.fillText(' ' + s,x-r,y);
+      c.restore();
+    }
+  }
+
+  function radial(x, y, length, rotation, s) {
+    c.lineWidth =3D 1;
+    c.strokeStyle =3D 'blue';
+    c.save();
+    c.translate(x, y);
+    c.rotate(rotation);
+    c.beginPath();
+    c.moveTo(0, 0);
+    c.lineTo(length, 0);
+    c.stroke();
+    c.textAlign =3D 'center';
+    c.textBaseline =3D 'bottom';
+    c.fillStyle =3D 'black';
+    c.fillText(s,length/2,0);
+    c.restore();
+  }
+
+  c.font =3D fontSize + 'px Gill Sans';
+
+  // construction lines
+  c.lineWidth =3D 1;
+  c.strokeStyle =3D 'silver';
+  // circle
+  c.beginPath();
+  c.arc(x, y, radius, 0, 2*Math.PI);
+  c.stroke();
+  // angles
+  arc(x, y, radius/10+2*radius/3, 0, startAngle, false, radius, '\u03B1'=
);
+  arc(x, y, radius/10+radius/3, 0, endAngle, false, radius, '\u03B2');
+  // radii
+  radial(x, y, radius, 0, 'radius');
+
+  // the line
+  c.lineWidth =3D 15;
+  c.lineCap =3D 'round';
+  c.strokeStyle =3D 'rgba(20,200,40,0.8)';
+  c.beginPath();
+  c.moveTo(x0,y0);
+  c.arc(x,y,radius,startAngle,endAngle,direction);
+  c.stroke();
+
+  dot(x0,y0, "x\u2080,y\u2080");
+  dot(x,y, "x,y");
+
+  c.textAlign =3D 'left';
+  c.textBaseline =3D 'alphabetic';
+  var L =3D 0;
+
+  function print(s) {
+    c.fillText(s, center, bottom+L*fontSize*1.3);
+    L +=3D 1;
+  }
+  print('// the thick line corresponds to:');
+  print('context.moveTo(x\u2080, y\u2080)');
+  print('context.arc(x, y, radius, \u03B1, \u03B2)');
+  print('context.stroke()');
+
+  c.fillStyle =3D 'green';
+
+  c.textBaseline =3D 'top';
+  c.fillText("initial line \u25b4", x0+20, y0+fontSize*2);
+
+  c.textAlign =3D 'right';
+  c.textBaseline =3D 'middle';
+  c.fillText("arc \u25b8", x-radius-15, y);
+
+} finally {
+  c.restore();
+}
+--></dd>
+
+   <dt><var title=3D"">context</var> . <c=
ode title=3Ddom-context-2d-ellipse><a href=3D#dom-context-2d-ellips=
e>ellipse</a></code>(<var title=3D"">x<=
/var>, <var title=3D"">y</var>, <var title=3D=
"">radiusX</var>, <var title=3D"">radi=
usY</var>, <var title=3D"">rotation</var>, &l=
t;var title=3D"">startAngle</var>, <var title=3D&qu=
ot;">endAngle</var> [, <var title=3D"">anti=
clockwise</var>] )</dt>
+   <dt><var title=3D"">path</var> . <code=
 title=3Ddom-context-2d-ellipse><a href=3D#dom-context-2d-ellipse&g=
t;ellipse</a></code>(<var title=3D"">x</va=
r>, <var title=3D"">y</var>, <var title=3D&qu=
ot;">radiusX</var>, <var title=3D"">radiusY=
</var>, <var title=3D"">rotation</var>, <v=
ar title=3D"">startAngle</var>, <var title=3D"=
">endAngle</var> [, <var title=3D"">anticlo=
ckwise</var>] )</dt>
+
+   <dd>
+
+    <p>Adds points to the subpath such that the arc described by t=
he circumference of the ellipse
+    described by the arguments, starting at the given start angle and en=
ding at the given end angle,
+    going in the given direction (defaulting to clockwise), is added to =
the path, connected to the
+    previous point by a straight line.</p>
+
+    <p>Throws an <code><a href=3D#indexsizeerror>Index=
SizeError</a></code> exception if the given radius is negativ=
e.</p>
+
+   </dd>
+
+   <dt><var title=3D"">context</var> . <c=
ode title=3Ddom-context-2d-rect><a href=3D#dom-context-2d-rect>r=
ect</a></code>(<var title=3D"">x</var>,=
 <var title=3D"">y</var>, <var title=3D"&qu=
ot;>w</var>, <var title=3D"">h</var>)</=
dt>
+   <dt><var title=3D"">path</var> . <code=
 title=3Ddom-context-2d-rect><a href=3D#dom-context-2d-rect>rect=
</a></code>(<var title=3D"">x</var>, &l=
t;var title=3D"">y</var>, <var title=3D""=
>w</var>, <var title=3D"">h</var>)</dt&=
gt;
+
+   <dd>
+
+    <p>Adds a new closed subpath to the path, representing the giv=
en rectangle.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>The following methods allow authors to manipulate the <a h=
ref=3D#concept-path title=3Dconcept-path>paths</a>
+  of objects implementing the <code><a href=3D#canvaspathmethod=
s>CanvasPathMethods</a></code> interface.</p>
+
+  <p>For <code><a href=3D#canvasrenderingcontext2d>Can=
vasRenderingContext2D</a></code> objects, the points passed t=
o the methods, and the
+  resulting lines added to <a href=3D#current-default-path>current=
 default path</a> by these methods, must be transformed
+  according to the <a href=3D#transformations title=3Ddom-context-2d-=
transformation>current transformation matrix</a>
+  before being added to the path.</p>
+
+
+  <p>The <dfn id=3Ddom-context-2d-moveto title=3Ddom-context-2d=
-moveTo><code>moveTo(<var title=3D"">x</var&g=
t;, <var title=3D"">y</var>)</code></dfn&g=
t; method must create a new subpath with the specified point as its
+  first (and only) point.</p>
+
+  <p>When the user agent is to <dfn id=3Densure-there-is-a-subp=
ath>ensure there is a subpath</dfn> for a coordinate (<var ti=
tle=3D"">x</var>, <var title=3D"">y&lt=
;/var>) on a <a href=3D#concept-path title=3Dconcept-path>path&l=
t;/a>, the user
+  agent must check to see if the <a href=3D#concept-path title=3Dconc=
ept-path>path</a> has any subpaths, and if it
+  does not, then the user agent must create a new subpath with the point=
 (<var title=3D"">x</var>,
+  <var title=3D"">y</var>) as its first (and only)=
 point, as if the <code title=3Ddom-context-2d-moveTo><a href=3D=
#dom-context-2d-moveto>moveTo()</a></code> method had been=
 called.</p>
+
+
+  <p>The <dfn id=3Ddom-context-2d-closepath title=3Ddom-context=
-2d-closePath><code>closePath()</code></dfn> method =
must do nothing
+  if the object's path has no subpaths. Otherwise, it must mark the last=
 subpath as closed, create a
+  new subpath whose first point is the same as the previous subpath's fi=
rst point, and finally add
+  this new subpath to the path.</p>
+
+  <p class=3Dnote>If the last subpath had more than one point in i=
ts list of points, then this is
+  equivalent to adding a straight line connecting the last point back to=
 the first point, thus
+  "closing" the shape, and then repeating the last (possibly i=
mplied) <code title=3Ddom-context-2d-moveTo><a href=3D#dom-conte=
xt-2d-moveto>moveTo()</a></code> call.</p>
+
+
+  <p>New points and the lines connecting them are added to subpath=
s using the methods described
+  below. In all cases, the methods only modify the last subpath in the o=
bject's path.</p>
+
+
+  <p>The <dfn id=3Ddom-context-2d-lineto title=3Ddom-context-2d=
-lineTo><code>lineTo(<var title=3D"">x</var&g=
t;, <var title=3D"">y</var>)</code></dfn&g=
t; method must <a href=3D#ensure-there-is-a-subpath>ensure there is=
 a subpath</a> for <span title=3D"">(<var title=3D=
"">x</var>, <var title=3D"">y</var&=
gt;)</span> if the object's path has no
+  subpaths. Otherwise, it must connect the last point in the subpath to =
the given point (<var title=3D"">x</var>, <var t=
itle=3D"">y</var>) using a straight line, and must the=
n add the given point
+  (<var title=3D"">x</var>, <var title=3D"=
">y</var>) to the subpath.</p>
+
+
+  <p>The <dfn id=3Ddom-context-2d-quadraticcurveto title=3Ddom-=
context-2d-quadraticCurveTo><code>quadraticCurveTo(<var title=
=3D"">cpx</var>, <var title=3D"">cpy&l=
t;/var>, <var title=3D"">x</var>, <var title=3D=
"">y</var>)</code></dfn> method must <a=
 href=3D#ensure-there-is-a-subpath>ensure there is a subpath</a>=
 for <span title=3D"">(<var title=3D"">cp=
x</var>, <var title=3D"">cpy</var>)</span&=
gt;, and then must connect the last
+  point in the subpath to the given point (<var title=3D""&=
gt;x</var>, <var title=3D"">y</var>) using a
+  quadratic Bézier curve with control point (<var title=3D=
"">cpx</var>, <var title=3D"">cpy</=
var>), and must then add the given point (<var title=3D""=
>x</var>, <var title=3D"">y</var>) to the =
subpath. <a href=3D#refsBEZIER>[BEZIER]</a></p>
+
+
+  <p>The <dfn id=3Ddom-context-2d-beziercurveto title=3Ddom-con=
text-2d-bezierCurveTo><code>bezierCurveTo(<var title=3D"=
">cp1x</var>,
+  <var title=3D"">cp1y</var>, <var title=3D&quo=
t;">cp2x</var>, <var title=3D"">cp2y</va=
r>, <var title=3D"">x</var>, <var title=3D&qu=
ot;">y</var>)</code></dfn> method must <a hr=
ef=3D#ensure-there-is-a-subpath>ensure there is a
+  subpath</a> for <span title=3D"">(<var title=3D=
"">cp1x</var>, <var title=3D"">cp1y&lt=
;/var>)</span>, and
+  then must connect the last point in the subpath to the given point (&l=
t;var title=3D"">x</var>, <var title=3D""=
>y</var>) using a cubic Bézier curve with control poi=
nts (<var title=3D"">cp1x</var>,
+  <var title=3D"">cp1y</var>) and (<var title=3D=
"">cp2x</var>, <var title=3D"">cp2y&lt=
;/var>). Then, it must
+  add the point (<var title=3D"">x</var>, <var =
title=3D"">y</var>) to the subpath. <a href=3D#refs=
BEZIER>[BEZIER]</a></p>
+
+  <hr><p>The <dfn id=3Ddom-context-2d-arcto title=3Ddom-c=
ontext-2d-arcTo><code>arcTo(<var title=3D"">x1&l=
t;/var>, <var title=3D"">y1</var>, <var title=
=3D"">x2</var>, <var title=3D"">y2<=
/var>, <var title=3D"">radiusX</var>,
+  <var title=3D"">radiusY</var>, <var title=3D&=
quot;">rotation</var>)</code></dfn> method must=
 first
+  <a href=3D#ensure-there-is-a-subpath>ensure there is a subpath&l=
t;/a> for <span title=3D"">(<var title=3D"&quo=
t;>x1</var>, <var title=3D"">y1</var>)<=
/span>. Then, the behavior depends on the arguments and the last point=
 in the
+  subpath, as described below.</p>
+
+  <p>Negative values for <var title=3D"">radiusX&l=
t;/var> or <var title=3D"">radiusY</var> must ca=
use the
+  implementation to throw an <code><a href=3D#indexsizeerror&gt=
;IndexSizeError</a></code> exception. If <var title=3D&quo=
t;">radiusY</var>
+  is omitted, user agents must act as if it had the same value as <va=
r title=3D"">radiusX</var>.</p>
+
+  <p>Let the point (<var title=3D"">x0</var>=
, <var title=3D"">y0</var>) be the last point in th=
e
+  subpath, transformed by the inverse of the <a href=3D#transformatio=
ns title=3Ddom-context-2d-transformation>current
+  transformation matrix</a> (so that it is in the same coordinate =
system as the points passed to
+  the method).</p>
+
+  <p>If the point (<var title=3D"">x0</var>,=
 <var title=3D"">y0</var>) is equal to the point (&=
lt;var title=3D"">x1</var>, <var title=3D"&quo=
t;>y1</var>), or if the point (<var title=3D"">x=
1</var>, <var title=3D"">y1</var>) is equal t=
o the point (<var title=3D"">x2</var>, <var titl=
e=3D"">y2</var>), or if
+  both <var title=3D"">radiusX</var> and <var t=
itle=3D"">radiusY</var> are zero, then the method must
+  add the point (<var title=3D"">x1</var>, <var=
 title=3D"">y1</var>) to the subpath, and connect that
+  point to the previous point (<var title=3D"">x0</va=
r>, <var title=3D"">y0</var>) by a straight
+  line.</p>
+
+  <p>Otherwise, if the points (<var title=3D"">x0&=
lt;/var>, <var title=3D"">y0</var>), (<var ti=
tle=3D"">x1</var>, <var title=3D"">y1&=
lt;/var>), and (<var title=3D"">x2</var>, <va=
r title=3D"">y2</var>)
+  all lie on a single straight line, then the method must add the point =
(<var title=3D"">x1</var>,
+  <var title=3D"">y1</var>) to the subpath, and co=
nnect that point to the previous point (<var title=3D"">x=
0</var>, <var title=3D"">y0</var>) by a strai=
ght line.</p>
+
+  <p>Otherwise, let <var title=3D"">The Arc</va=
r> be the shortest arc given by circumference of the
+  ellipse that has radius <var title=3D"">radiusX</va=
r> on the major axis and radius <var title=3D"">radius=
Y</var> on the minor axis, and whose semi-major axis is rotated &lt=
;var title=3D"">rotation</var> radians clockwise from =
the positive x-axis, and that has one point tangent
+  to the half-infinite line that crosses the point (<var title=3D&quo=
t;">x0</var>, <var title=3D"">y0</var&gt=
;)
+  and ends at the point (<var title=3D"">x1</var>,=
 <var title=3D"">y1</var>), and that has a differen=
t
+  point tangent to the half-infinite line that ends at the point (<va=
r title=3D"">x1</var>, <var title=3D""&gt=
;y1</var>) and crosses the point (<var title=3D"">x=
2</var>, <var title=3D"">y2</var>). The
+  points at which this ellipse touches these two lines are called the st=
art and end tangent points
+  respectively. The method must connect the point (<var title=3D&quot=
;">x0</var>, <var title=3D"">y0</var>=
)
+  to the start tangent point by a straight line, adding the start tangen=
t point to the subpath, and
+  then must connect the start tangent point to the end tangent point by =
<var title=3D"">The Arc</var>,
+  adding the end tangent point to the subpath.</p>
+
+  <hr><p>The <dfn id=3Ddom-context-2d-arc title=3Ddom-con=
text-2d-arc><code>arc(<var title=3D"">x</var&=
gt;, <var title=3D"">y</var>,
+  <var title=3D"">radius</var>, <var title=3D&q=
uot;">startAngle</var>, <var title=3D"">end=
Angle</var>, <var title=3D"">anticlockwise</var&=
gt;)</code></dfn> and <dfn id=3Ddom-context-2d-ellipse tit=
le=3Ddom-context-2d-ellipse><code>ellipse(<var title=3D"=
">x</var>, <var title=3D"">y</var>, &=
lt;var title=3D"">radiusX</var>, <var title=3D&quot=
;">radiusY</var>, <var title=3D"">rotation&=
lt;/var>, <var title=3D"">startAngle</var>, <=
var title=3D"">endAngle</var>, <var title=3D"&=
quot;>anticlockwise</var>)</code></dfn> methods draw=
 arcs.</p>
+
+  <p>The <code title=3Ddom-context-2d-arc><a href=3D#dom-=
context-2d-arc>arc()</a></code> method is equivalent to th=
e <code title=3Ddom-context-2d-ellipse><a href=3D#dom-context-2d=
-ellipse>ellipse()</a></code> method in the case where the=
 two radii are equal.
+  When the <code title=3Ddom-context-2d-arc><a href=3D#dom-cont=
ext-2d-arc>arc()</a></code> method is invoked, it must act=
 as if the
+  <code title=3Ddom-context-2d-ellipse><a href=3D#dom-context-2=
d-ellipse>ellipse()</a></code> method had been invoked wit=
h the <var title=3D"">radiusX</var> and <var tit=
le=3D"">radiusY</var> arguments set to the value of th=
e <var title=3D"">radius</var> argument, the <va=
r title=3D"">rotation</var> argument set to zero, and =
the
+  other arguments set to the same values as their identically named argu=
ments on the <code title=3Ddom-context-2d-arc><a href=3D#dom-con=
text-2d-arc>arc()</a></code> method.</p>
+
+  <p>When the <code title=3Ddom-context-2d-ellipse><a hre=
f=3D#dom-context-2d-ellipse>ellipse()</a></code> method is=
 invoked, it must
+  proceed as follows. First, if the object's path has any subpaths, then=
 the method must add a
+  straight line from the last point in the subpath to the start point of=
 the arc. Then, it must add
+  the start and end points of the arc to the subpath, and connect them w=
ith an arc. The arc and its
+  start and end points are defined as follows:</p>
+
+  <p>Consider an ellipse that has its origin at (<var title=3D&=
quot;">x</var>, <var title=3D"">y</var&g=
t;), that
+  has a major-axis radius <var title=3D"">radiusX</va=
r> and a minor-axis radius <var title=3D"">radiusY<=
/var>, and that is rotated about its origin such that its semi-major a=
xis is
+  inclined <var title=3D"">rotation</var> radians =
clockwise from the x-axis. The points at <var title=3D"">=
startAngle</var> and <var title=3D"">endAngle</v=
ar> along this circle's circumference,
+  measured in radians clockwise from the ellipse's semi-major axis, are =
the start and end points
+  respectively.</p>
+
+  <p>If the <var title=3D"">anticlockwise</var&=
gt; argument is false and <span title=3D""><var title=3D=
"">endAngle</var>-<var title=3D"">star=
tAngle</var></span> is equal to or greater than <span titl=
e=3D"">2π</span>, or, if the <var title=3D&q=
uot;">anticlockwise</var> argument is <em>true</em=
> and
+  <span title=3D""><var title=3D"">start=
Angle</var>-<var title=3D"">endAngle</var>&lt=
;/span> is equal to or
+  greater than <span title=3D"">2π</span>, =
then the arc is the whole circumference of this
+  ellipse.</p>
+
+  <p>Otherwise, the arc is the path along the circumference of thi=
s ellipse from the start point to
+  the end point, going anti-clockwise if the <var title=3D"&quot=
;>anticlockwise</var> argument is true, and
+  clockwise otherwise. Since the points are on the ellipse, as opposed t=
o being simply angles from
+  zero, the arc can never cover an angle greater than <span title=3D&=
quot;">2π</span> radians.</p>
+
+  <p>Negative values for <var title=3D"">radiusX&l=
t;/var> or <var title=3D"">radiusY</var> must ca=
use the
+  implementation to throw an <code><a href=3D#indexsizeerror&gt=
;IndexSizeError</a></code> exception.</p>
+
+  <hr><p>The <dfn id=3Ddom-context-2d-rect title=3Ddom-co=
ntext-2d-rect><code>rect(<var title=3D"">x</v=
ar>, <var title=3D"">y</var>,
+  <var title=3D"">w</var>, <var title=3D"&=
quot;>h</var>)</code></dfn> method must create a new=
 subpath
+  containing just the four points (<var title=3D"">x<=
/var>, <var title=3D"">y</var>), (<var title=3D=
"">x</var>+<var title=3D"">w</var&g=
t;, <var title=3D"">y</var>), (<var title=3D&quo=
t;">x</var>+<var title=3D"">w</var>, =
<var title=3D"">y</var>+<var title=3D"&quot=
;>h</var>), (<var title=3D"">x</var>, <=
var title=3D"">y</var>+<var title=3D""&gt=
;h</var>), with those four points connected by straight lines, and
+  must then mark the subpath as closed. It must then create a new subpat=
h with the point (<var title=3D"">x</var>, <var =
title=3D"">y</var>) as the only point in the subpath.&=
lt;/p>
+
+
+  <!-- v6 feature request:
+        * points as a primitive shape
+          http://home.comcast.net/~urbanjost/canvas/vogle4.html
+  -->
+
+  </div>
+
+
+
+  <h6 id=3Dpath-objects><span class=3Dsecno>4.12.4.2.7 </=
span><code><a href=3D#path>Path</a></code> obj=
ects</h6>
+
+  <p><code><a href=3D#path>Path</a></code>=
 objects can be used to declare paths that are then later used on
+  <code><a href=3D#canvasrenderingcontext2d>CanvasRenderingC=
ontext2D</a></code> objects. In addition to many of the APIs =
described in
+  earlier sections, <code><a href=3D#path>Path</a><=
/code> objects have methods to combine paths, and to add text to
+  paths.</p>
+
+  <dl class=3Ddomintro><dt><var title=3D"">p=
ath</var> =3D new <code title=3Ddom-Path><a href=3D#dom-pa=
th>Path</a></code>()</dt>
+
+   <dd>
+
+    <p>Creates a new empty <code><a href=3D#path>Path&=
lt;/a></code> object.</p>
+
+   </dd>
+
+   <dt><var title=3D"">path</var> =3D new &l=
t;code title=3Ddom-Path-copy><a href=3D#dom-path-copy>Path</a=
></code>(<var title=3D"">path</var>)</d=
t>
+
+   <dd>
+
+    <p>Creates a new <code><a href=3D#path>Path</a&=
gt;</code> object that is a copy of the argument.</p>
+
+   </dd>
+
+   <dt><var title=3D"">path</var> =3D new &l=
t;code title=3Ddom-Path-withdata><a href=3D#dom-path-withdata>Pa=
th</a></code>(<var title=3D"">d</var>)&=
lt;/dt>
+
+   <dd>
+
+    <p>Creates a new path with the path described by the argument,=
 interpreted as SVG path data. <a href=3D#refsSVG>[SVG]</a>&l=
t;/p>
+
+   </dd>
+
+   <dt><var title=3D"">path</var> . <code=
 title=3Ddom-path-addPath><a href=3D#dom-path-addpath>addPath&lt=
;/a></code>(<var title=3D"">path</var>, &l=
t;var title=3D"">transform</var>)</dt>
+   <dt><var title=3D"">path</var> . <code=
 title=3Ddom-path-addPathByStrokingPath><a href=3D#dom-path-addpath=
bystrokingpath>addPathByStrokingPath</a></code>(<var ti=
tle=3D"">path</var>, <var title=3D"">s=
tyles</var>, <var title=3D"">transform</var>)=
</dt>
+
+   <dd>
+
+    <p>Adds to the path the path given by the argument.</p>
+
+    <p>In the case of the stroking variants, the line styles are t=
aken from the <var title=3D"">styles</var> argument=
, which can be either a <code><a href=3D#drawingstyle>Drawing=
Style</a></code> object or a
+    <code><a href=3D#canvasrenderingcontext2d>CanvasRenderin=
gContext2D</a></code> object.</p>
+
+   </dd>
+
+   <dt><var title=3D"">path</var> . <code=
 title=3Ddom-path-addText><a href=3D#dom-path-addtext>addText&lt=
;/a></code>(<var title=3D"">text</var>, &l=
t;var title=3D"">styles</var>, <var title=3D"&=
quot;>transform</var>, <var title=3D"">x</var=
>, <var title=3D"">y</var> [, <var title=3D&q=
uot;">maxWidth</var> ])</dt>
+   <dt><var title=3D"">path</var> . <code=
 title=3Ddom-path-addText><a href=3D#dom-path-addtext>addText&lt=
;/a></code>(<var title=3D"">text</var>, &l=
t;var title=3D"">styles</var>, <var title=3D"&=
quot;>transform</var>, <var title=3D"">path</=
var> [, <var title=3D"">maxWidth</var> ])</dt=
>
+   <dt><var title=3D"">path</var> . <code=
 title=3Ddom-path-addPathByStrokingText><a href=3D#dom-path-addpath=
bystrokingtext>addPathByStrokingText</a></code>(<var ti=
tle=3D"">text</var>, <var title=3D"">s=
tyles</var>, <var title=3D"">transform</var>,=
 <var title=3D"">x</var>, <var title=3D"&qu=
ot;>y</var> [, <var title=3D"">maxWidth</var&=
gt; ])</dt>
+   <dt><var title=3D"">path</var> . <code=
 title=3Ddom-path-addPathByStrokingText><a href=3D#dom-path-addpath=
bystrokingtext>addPathByStrokingText</a></code>(<var ti=
tle=3D"">text</var>, <var title=3D"">s=
tyles</var>, <var title=3D"">transform</var>,=
 <var title=3D"">path</var> [, <var title=3D&quo=
t;">maxWidth</var> ])</dt>
+
+   <dd>
+
+    <p>Adds to the path a series of subpaths corresponding to the =
given text. If the arguments give
+    a coordinate, the text is drawn horizontally at the given coordinate=
s. If the arguments give a
+    path, the text is drawn along the path. If a maximum width is provid=
ed, the text will be scaled
+    to fit that width if necessary.</p>
+
+    <p>The font, and in the case of the stroking variants, the lin=
e styles, are taken from the <var title=3D"">styles</v=
ar> argument, which can be either a <code><a href=3D#drawings=
tyle>DrawingStyle</a></code> object or a
+    <code><a href=3D#canvasrenderingcontext2d>CanvasRenderin=
gContext2D</a></code> object.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-path title=3Ddom-Path><code>Pat=
h()</code></dfn> constructor, when invoked, must return a
+  newly created <code><a href=3D#path>Path</a></cod=
e> object.</p>
+
+  <hr><p>The <dfn id=3Ddom-path-copy title=3Ddom-Path-cop=
y><code>Path(<var title=3D"">path</var>)&l=
t;/code></dfn> constructor,
+  when invoked, must return a newly created <code><a href=3D#pa=
th>Path</a></code> object, to which the subpaths of the
+  argument are added. (In other words, it returns a copy of the argument=
.)</p>
+
+  <hr><p>The <dfn id=3Ddom-path-withdata title=3Ddom-Path=
-withdata><code>Path(<var title=3D"">d</var&g=
t;)</code></dfn> constructor
+  must run the following steps:</p>
+
+  <ol><li>
+
+    <p>Parse and interpret the <var title=3D"">d&l=
t;/var> argument according to the SVG specification's
+    rules for path data, thus obtaining an SVG path. <a href=3D#refsS=
VG>[SVG]</a></p>
+
+    <p class=3Dnote>The resulting path could be empty. SVG defines=
 error handling rules for parsing
+    and applying path data.</p>
+
+   </li>
+
+   <li><p>Let (<var title=3D"">x</var>=
, <var title=3D"">y</var>) be the last point in the=
 SVG
+   path.</li>
+
+   <li><p>Create a new <code><a href=3D#path>Pat=
h</a></code> object and add all the subpaths in the SVG path,=
 if any, to
+   that <code><a href=3D#path>Path</a></code> ob=
ject. </p>
+
+   <li><p>Create a new subpath in the <code><a href=
=3D#path>Path</a></code> object with (<var title=3D&quo=
t;">x</var>, <var title=3D"">y</var>)=
 as the only point in the subpath.</li>
+
+   <li><p>Return the <code><a href=3D#path>Path&=
lt;/a></code> object as the constructed object.</li>
+
+  </ol><hr><p>The <dfn id=3Ddom-path-addpath title=3D=
dom-path-addPath><code>addPath(<var title=3D"">b=
</var>, <var title=3D"">transform</var>)</=
code></dfn> method, when invoked on a <code><a href=3D#=
path>Path</a></code> object <var title=3D""&g=
t;a</var>, must run the following steps:</p>
+
+  <ol><li><p>If the <code><a href=3D#path>=
Path</a></code> object <var title=3D"">b</=
var> has no subpaths, abort these
+   steps.</li>
+
+   <li><p>Create a copy of all the subpaths in <var title=
=3D"">b</var>. Let this copy be known as <var title=
=3D"">c</var>.</li>
+
+   <li><p>Transform all the coordinates and lines in <var=
 title=3D"">c</var> by the transform matrix
+   <var title=3D"">transform</var>, if it is not n=
ull.</li>
+
+   <li><p>Let (<var title=3D"">x</var>=
, <var title=3D"">y</var>) be the last point in the=
 last subpath
+   of <var title=3D"">c</var>.</li>
+
+   <li><p>Add all the subpaths in <var title=3D"&quo=
t;>c</var> to <var title=3D"">a</var>.<=
/li>
+
+   <li><p>Create a new subpath in <var title=3D"&quo=
t;>a</var> with (<var title=3D"">x</var>, =
<var title=3D"">y</var>) as the only point in the s=
ubpath.</li>
+
+  </ol><hr><p>The <dfn id=3Ddom-path-addpathbystrok=
ingpath title=3Ddom-path-addPathByStrokingPath><code>addPathBySt=
rokingPath(<var title=3D"">b</var>, <var title=3D=
"">styles</var>, <var title=3D"">trans=
form</var>)</code></dfn> method,
+  when invoked on a <code><a href=3D#path>Path</a><=
/code> object <var title=3D"">a</var>, must run =
the following
+  steps:</p>
+
+  <ol><li><p>If the <code><a href=3D#path>=
Path</a></code> object <var title=3D"">b</=
var> has no subpaths, abort these
+   steps.</li>
+
+   <li><p>Create a copy of all the subpaths in <var title=
=3D"">b</var>. Let this copy be known as <var title=
=3D"">c</var>.</li>
+
+   <li><p>Transform all the coordinates and lines in <var=
 title=3D"">c</var> by transformation matrix
+   <var title=3D"">transform</var>, if it is not n=
ull.</li>
+
+   <li><p>Let a new list of subpaths <var title=3D"&=
quot;>d</var> be the result of <a href=3D#trace-a-path title=3D=
"trace a
+   path">tracing</a> <var title=3D"">c<=
/var>, using the <var title=3D"">styles</var> ar=
gument for the
+   line styles.</p>
+
+   <li><p>Let (<var title=3D"">x</var>=
, <var title=3D"">y</var>) be the last point in the=
 last subpath
+   of <var title=3D"">d</var>.</li>
+
+   <li><p>Add all the subpaths in <var title=3D"&quo=
t;>d</var> to <var title=3D"">a</var>.<=
/li>
+
+   <li><p>Create a new subpath in <var title=3D"&quo=
t;>a</var> with (<var title=3D"">x</var>, =
<var title=3D"">y</var>) as the only point in the s=
ubpath.</li>
+
+  </ol><hr><p>The <dfn id=3Ddom-path-addtext title=3D=
dom-path-addText><code>addText()</code></dfn> and &l=
t;dfn id=3Ddom-path-addpathbystrokingtext title=3Ddom-path-addPathByStrok=
ingText><code>addPathByStrokingText()</code></dfn> m=
ethods each
+  come in two variants: one rendering text at a given coordinate, and on=
e rendering text along a
+  given path. In both cases, the methods take a <code><a href=3D=
#canvasdrawingstyles>CanvasDrawingStyles</a></code> object=
 argument for
+  the text and (if appropriate) line styles to use, an <code><a=
 href=3D#svgmatrix>SVGMatrix</a></code> object <var tit=
le=3D"">transform</var> (which can be null), and a max=
imum width can optionally be provided.</p>
+
+  <p>When one of the <code title=3Ddom-path-addText><a hr=
ef=3D#dom-path-addtext>addText()</a></code> and <code t=
itle=3Ddom-path-addPathByStrokingText><a href=3D#dom-path-addpathby=
strokingtext>addPathByStrokingText()</a></code> variants t=
hat take as
+  argument an (<var title=3D"">x</var>, <var ti=
tle=3D"">y</var>) coordinate is invoked, the method mu=
st
+  run the following algorithm:</p>
+
+  <ol><li><p>Run the <a href=3D#text-preparation-al=
gorithm>text preparation algorithm</a>, passing it <var title=
=3D"">text</var>, the
+   <code><a href=3D#canvasdrawingstyles>CanvasDrawingStyles&=
lt;/a></code> object argument, and, if the <var title=3D&quot=
;">maxWidth</var>
+   argument was provided, that argument. Let <var title=3D"&quot=
;>glyphs</var> be the result.</p>
+
+   <li><p>Move all the shapes in <var title=3D"&quot=
;>glyphs</var> to the right by <var title=3D"">x=
</var>
+   CSS pixels and down by <var title=3D"">y</var> =
CSS pixels.</li>
+
+   <li><p>Let <var title=3D"">glyph subpaths=
</var> be a <a href=3D#concept-path title=3Dconcept-path>path=
</a> describing the shapes given
+   in <var title=3D"">glyphs</var>, with each CSS =
pixel in the coordinate space of <var title=3D"">glyphs&l=
t;/var> mapped to one coordinate space unit in <var title=3D"&=
quot;>glyph subpaths</var>.
+   Subpaths in <var title=3D"">glyph subpaths</var&gt=
; must wind clockwise, regardless of how the user
+   agent's font subsystem renders fonts and regardless of how the fonts =
themselves are defined.</p>
+
+   <li><p>Transform all the coordinates and lines in <var=
 title=3D"">glyph subpaths</var> by the
+   transformation matrix <var title=3D"">transform</v=
ar>, if it is not null.</li>
+
+   <li><p>If the method is <code title=3Ddom-path-addPath=
ByStrokingText><a href=3D#dom-path-addpathbystrokingtext>addPath=
ByStrokingText()</a></code>, replace <var title=3D"&q=
uot;>glyph subpaths</var> by the result of <a href=3D#trace-a=
-path title=3D"trace a path">tracing</a> <var title=
=3D"">glyph subpaths</var>, using the <code><=
a href=3D#canvasdrawingstyles>CanvasDrawingStyles</a></code&g=
t; object argument for the
+   line styles.</p>
+
+   <li><p>Let (<var title=3D"">x<sub titl=
e=3D"">final</sub></var>, <var title=3D"=
">y<sub title=3D"">final</sub></var>)=
 be the last point in the last subpath of <var title=3D""&gt=
;glyph
+   subpaths</var>.</li>
+
+   <li><p>Add all the subpaths in <var title=3D"&quo=
t;>glyph subpaths</var> to the <code><a href=3D#path&gt=
;Path</a></code>
+   object.</li>
+
+   <li><p>Create a new subpath in the <code><a href=
=3D#path>Path</a></code> object with (<var title=3D&quo=
t;">x<sub title=3D"">final</sub></var&gt=
;, <var title=3D"">y<sub title=3D"">final=
</sub></var>) as the only point in
+   the subpath.</li>
+
+  </ol><p>When one of the <code title=3Ddom-path-addText&=
gt;<a href=3D#dom-path-addtext>addText()</a></code> and=
 <code title=3Ddom-path-addPathByStrokingText><a href=3D#dom-pat=
h-addpathbystrokingtext>addPathByStrokingText()</a></code>=
 variants that take as
+  argument a <code><a href=3D#path>Path</a></code&g=
t; object is invoked, the method must run the following algorithm:</p&=
gt;
+
+  <ol><li><p>Let <var title=3D"">targe=
t</var> be the <code><a href=3D#path>Path</a><=
/code> object on which the method was
+   invoked.</li>
+
+   <li><p>Let <var title=3D"">path</var&g=
t; be the <code><a href=3D#path>Path</a></code> o=
bject that was provided in the
+   method's arguments.</li>
+
+   <li><p>Run the <a href=3D#text-preparation-algorithm&g=
t;text preparation algorithm</a>, passing it <var title=3D"=
">text</var>, the
+   <code><a href=3D#canvasdrawingstyles>CanvasDrawingStyles&=
lt;/a></code> object argument, and, if the <var title=3D&quot=
;">maxWidth</var>
+   argument was provided, that argument. Let <var title=3D"&quot=
;>glyphs</var> be the resulting array, and
+   <var title=3D"">physical alignment</var> be the=
 resulting alignment value.</p>
+
+   <li><p>Let <var title=3D"">width</var&=
gt; be the aggregate length of all the subpaths in <var title=3D"=
">path</var>, including the distances from the last point o=
f each closed subpath to the
+   first point of that subpath.</li>
+
+   <li><p>Define <var title=3D"">L</var&g=
t; to be a linear coordinate line for of all the subpaths in
+   <var title=3D"">path</var>, with additional lin=
es drawn between the last point and the first point
+   of each closed subpath, such that the first point of the first subpat=
h is defined as point 0, and
+   the last point of the last subpath, if the last subpath is not closed=
, or the second occurrence
+   first point of that subpath, if it is closed, is defined as point &lt=
;var title=3D"">width</var>.</li>
+
+   <li>
+
+    <p>Let <var title=3D"">offset</var> be d=
etermined according to the appropriate step below:</p>
+
+    <dl class=3Dswitch><dt>If <var title=3D""&g=
t;physical alignment</var> is <i>left</i></dt> &l=
t;dd>Let <var title=3D"">offset</var> be zero.&l=
t;/dd>
+
+     <dt>If <var title=3D"">physical alignment<=
/var> is <i>right</i></dt> <dd>Let <var tit=
le=3D"">offset</var> be <var title=3D""&g=
t;width</var>.</dd>
+
+     <dt>If <var title=3D"">physical alignment<=
/var> is <i title=3D"">center</i></dt> &lt=
;dd>Let <var title=3D"">offset</var> be half of =
<var title=3D"">width</var>.</dd>
+
+    </dl></li>
+
+   <li><p>Move all the shapes in <var title=3D"&quot=
;>glyphs</var> to the right by <var title=3D"">o=
ffset</var> CSS pixels.</li>
+
+   <li>
+
+    <p>For each glyph <var title=3D"">glyph</va=
r> in the <var title=3D"">glyphs</var> array, ru=
n these
+    substeps:</p>
+
+    <ol><li><p>Let <var title=3D"">dx&=
lt;/var> be the <var title=3D"">x</var>-coordina=
te of the horizontal
+     center of the bounding box of the shape described by <var title=3D=
"">glyph</var>, in CSS
+     pixels.</li>
+
+     <li><p>If <var title=3D"">dx</var&gt=
; is negative or greater than <var title=3D"">width</v=
ar>, skip
+     the remainder of these substeps for this glyph.</li>
+
+     <li><p>Recast <var title=3D"">dx</va=
r> to coordinate spaces units in <var title=3D"">path&=
lt;/var>.
+     (This just changes the dimensionality of <var title=3D"&quo=
t;>dx</var>, not its numeric value.)</p>
+     <!-- hide this step if people get confused by the pedancy -->
+
+     <li><p>Find the point <var title=3D"">p=
</var> on <var title=3D"">path</var> (or impl=
ied closing
+     lines in <var title=3D"">path</var>) that cor=
responds to the position <var title=3D"">dx</var> o=
n
+     the coordinate line <var title=3D"">L</var>.&=
lt;/p>
+
+     <li><p>Let <var title=3D"">θ&=
lt;/var> be the clockwise angle from the positive x-axis to the
+     side of the line that is tangential to <var title=3D""=
>path</var> at the point <var title=3D"">p</v=
ar> that is going in the same direction as the line at point <var t=
itle=3D"">p</var>.</li>
+
+     <li><p>Rotate the shape described by <var title=3D&q=
uot;">glyph</var> clockwise by <var title=3D""=
>θ</var> about the point that is at the <var title=3D=
"">dx</var> coordinate
+     horizontally and the zero coordinate vertically.</li>
+
+     <li><p>Let (<var title=3D"">x</var&g=
t;, <var title=3D"">y</var>) be the coordinate of t=
he point <var title=3D"">p</var>.</li>
+
+     <li><p>Move the shape described by <var title=3D&quo=
t;">glyph</var> to the right by <var title=3D"&quot=
;>x</var> and down by <var title=3D"">y</var&=
gt;.</li>
+
+     <li><p>Let <var title=3D"">glyph subpat=
hs</var> be a list of subpaths describing the shape given
+     in <var title=3D"">glyph</var>, with each CSS=
 pixel in the coordinate space of <var title=3D"">glyph&l=
t;/var> mapped to one coordinate space unit in <var title=3D"&=
quot;>glyph subpaths</var>.
+     Subpaths in <var title=3D"">glyph subpaths</var&=
gt; must wind clockwise, regardless of how the user
+     agent's font subsystem renders fonts and regardless of how the font=
s themselves are
+     defined.</p>
+
+     <li><p>Transform all the coordinates and lines in <v=
ar title=3D"">glyph subpaths</var> by the
+     transformation matrix <var title=3D"">transform<=
/var>, if it is not null.</li>
+
+     <li><p>If the method is <code title=3Ddom-path-addPa=
thByStrokingText><a href=3D#dom-path-addpathbystrokingtext>addPa=
thByStrokingText()</a></code>, replace <var title=3D"=
">glyph subpaths</var> by the result of <a href=3D#trace=
-a-path title=3D"trace a path">tracing</a> <var tit=
le=3D"">glyph subpaths</var>, using the <code>&l=
t;a href=3D#canvasdrawingstyles>CanvasDrawingStyles</a></code=
> object argument for
+     the line styles.</p>
+
+     <li><p>Let (<var title=3D"">x<sub ti=
tle=3D"">final</sub></var>, <var title=3D&quo=
t;">y<sub title=3D"">final</sub></var&gt=
;) be the last point in the last subpath of <var title=3D""&=
gt;glyph
+     subpaths</var>. (This coordinate is only used if this is the =
last glyph processed.)</li>
+
+     <li><p>Add all the subpaths in <var title=3D"&q=
uot;>glyph subpaths</var> to <var title=3D"">tar=
get</var>.</li>
+
+    </ol></li>
+
+   <li><p>Create a new subpath in the <code><a href=
=3D#path>Path</a></code> object with (<var title=3D&quo=
t;">x<sub title=3D"">final</sub></var&gt=
;, <var title=3D"">y<sub title=3D"">final=
</sub></var>) as the only point in
+   the subpath.</li>
+
+  </ol></div>
+
+
+  <h6 id=3Dtransformations><span class=3Dsecno>4.12.4.2.8 &l=
t;/span><dfn title=3Ddom-context-2d-transformation>Transformatio=
ns</dfn></h6>
+
+  <p>Each <code><a href=3D#canvasrenderingcontext2d>Ca=
nvasRenderingContext2D</a></code> object has a <i>curre=
nt transformation matrix</i>,
+  as well as methods (described in this section) to manipulate it. When =
a
+  <code><a href=3D#canvasrenderingcontext2d>CanvasRenderingC=
ontext2D</a></code> object is created, its transformation mat=
rix must be
+  initialized to the identity transform.</p>
+
+  <p>The transformation matrix is applied to coordinates when crea=
ting the <a href=3D#current-default-path>current default
+  path</a>, and when painting text, shapes, and <code><a =
href=3D#path>Path</a></code> objects, on
+  <code><a href=3D#canvasrenderingcontext2d>CanvasRenderingC=
ontext2D</a></code> objects.</p> <!-- conformance cr=
iteria for actual drawing
+  are described in the various sections below -->
+
+  <p class=3Dnote>Most of the API uses <code><a href=3D#s=
vgmatrix>SVGMatrix</a></code> objects rather than this API=
. This API
+  remains mostly for historical reasons.</p>
+
+  <div class=3Dimpl>
+
+  <p>The transformations must be performed in reverse order.</p=
>
+
+  <p class=3Dnote>For instance, if a scale transformation that dou=
bles the width is applied to the
+  canvas, followed by a rotation transformation that rotates drawing ope=
rations by a quarter turn,
+  and a rectangle twice as wide as it is tall is then drawn on the canva=
s, the actual result will be
+  a square.</p> <!-- q.v. http://goo.gl/5RLrN -->
+
+  </div>
+
+  <dl class=3Ddomintro><dt><var title=3D"">c=
ontext</var> . <code title=3Ddom-context-2d-currentTransform>=
<a href=3D#dom-context-2d-currenttransform>currentTransform</a&g=
t;</code> [ =3D <var title=3D"">value</var> ]=
</dt>
+
+   <dd>
+
+    <p>Returns the transformation matrix, as an <code><a =
href=3D#svgmatrix>SVGMatrix</a></code> object.</p>
+
+    <p>Can be set, to change the transformation matrix.</p>
+
+   </dd>
+
+   <dt><var title=3D"">context</var> . <c=
ode title=3Ddom-context-2d-scale><a href=3D#dom-context-2d-scale&gt=
;scale</a></code>(<var title=3D"">x</var&g=
t;, <var title=3D"">y</var>)</dt>
+
+   <dd>
+
+    <p>Changes the transformation matrix to apply a scaling transf=
ormation with the given characteristics.</p>
+
+   </dd>
+
+   <dt><var title=3D"">context</var> . <c=
ode title=3Ddom-context-2d-rotate><a href=3D#dom-context-2d-rotate&=
gt;rotate</a></code>(<var title=3D"">angle&lt=
;/var>)</dt>
+
+   <dd>
+
+    <p>Changes the transformation matrix to apply a rotation trans=
formation with the given characteristics. The angle is in radians.</p&=
gt;
+
+   </dd>
+
+   <dt><var title=3D"">context</var> . <c=
ode title=3Ddom-context-2d-translate><a href=3D#dom-context-2d-tran=
slate>translate</a></code>(<var title=3D""&gt=
;x</var>, <var title=3D"">y</var>)</dt>
+
+   <dd>
+
+    <p>Changes the transformation matrix to apply a translation tr=
ansformation with the given characteristics.</p>
+
+   </dd>
+
+   <dt><var title=3D"">context</var> . <c=
ode title=3Ddom-context-2d-transform><a href=3D#dom-context-2d-tran=
sform>transform</a></code>(<var title=3D""&gt=
;a</var>, <var title=3D"">b</var>, <var ti=
tle=3D"">c</var>, <var title=3D"">d&lt=
;/var>, <var title=3D"">e</var>, <var title=3D=
"">f</var>)</dt>
+
+   <dd>
+
+    <p>Changes the transformation matrix to apply the matrix given=
 by the arguments as described below.</p>
+
+   </dd>
+
+   <dt><var title=3D"">context</var> . <c=
ode title=3Ddom-context-2d-setTransform><a href=3D#dom-context-2d-s=
ettransform>setTransform</a></code>(<var title=3D"=
">a</var>, <var title=3D"">b</var>, &=
lt;var title=3D"">c</var>, <var title=3D"&quot=
;>d</var>, <var title=3D"">e</var>, <va=
r title=3D"">f</var>)</dt>
+
+   <dd>
+
+    <p>Changes the transformation matrix <em>to</em> t=
he matrix given by the arguments as described below.</p>
+
+   </dd>
+
+   <dt><var title=3D"">context</var> . <c=
ode title=3Ddom-context-2d-resetTransform><a href=3D#dom-context-2d=
-resettransform>resetTransform</a></code>()</dt>
+
+   <dd>
+
+    <p>Changes the transformation matrix to the identity transform=
.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-context-2d-currenttransform title=3Ddom-=
context-2d-currentTransform><code>currentTransform</code>&=
lt;/dfn>, on
+  getting, must return the last object that it was set to. On setting, i=
ts value must be changed to
+  the new value, and the transformation matrix must be updated to match =
the matrix described by the
+  new value. When the <code><a href=3D#canvasrenderingcontext2d=
>CanvasRenderingContext2D</a></code> object is created, th=
e <code title=3Ddom-context-2d-currentTransform><a href=3D#dom-c=
ontext-2d-currenttransform>currentTransform</a></code> att=
ribute must be set a newly
+  created <code><a href=3D#svgmatrix>SVGMatrix</a><=
/code> object. When the transformation matrix is mutated by the method=
s
+  described in this section, the last <code><a href=3D#svgmatri=
x>SVGMatrix</a></code> object to which the attribute has b=
een
+  set must be mutated in a corresponding fashion.</p>
+
+  <p>The <dfn id=3Ddom-context-2d-scale title=3Ddom-context-2d-=
scale><code>scale(<var title=3D"">x</var>,=
 <var title=3D"">y</var>)</code></dfn> =
method must add the scaling transformation described by the
+  arguments to the transformation matrix. The <var title=3D"&quo=
t;>x</var> argument represents the scale
+  factor in the horizontal direction and the <var title=3D"&quot=
;>y</var> argument represents the scale
+  factor in the vertical direction. The factors are multiples.</p>
+
+  <p>The <dfn id=3Ddom-context-2d-rotate title=3Ddom-context-2d=
-rotate><code>rotate(<var title=3D"">angle</v=
ar>)</code></dfn>
+  method must add the rotation transformation described by the argument =
to the transformation
+  matrix. The <var title=3D"">angle</var> argument=
 represents a clockwise rotation angle expressed in
+  radians.</p>
+
+  <p>The <dfn id=3Ddom-context-2d-translate title=3Ddom-context=
-2d-translate><code>translate(<var title=3D"">x&=
lt;/var>, <var title=3D"">y</var>)</code>&=
lt;/dfn> method must add the translation transformation described by t=
he
+  arguments to the transformation matrix. The <var title=3D"&quo=
t;>x</var> argument represents the
+  translation distance in the horizontal direction and the <var title=
=3D"">y</var> argument represents
+  the translation distance in the vertical direction. The arguments are =
in coordinate space
+  units.</p>
+
+  <p>The <dfn id=3Ddom-context-2d-transform title=3Ddom-context=
-2d-transform><code>transform(<var title=3D"">a&=
lt;/var>, <var title=3D"">b</var>, <var title=
=3D"">c</var>, <var title=3D"">d</v=
ar>, <var title=3D"">e</var>, <var title=3D&q=
uot;">f</var>)</code></dfn> method must replace=
 the current transformation matrix with the
+  result of multiplying the current transformation matrix with the matri=
x described by:</p>
+
+  </div>
+
+  <table class=3Dmatrix><tr><td><var title=3D"=
">a</var></td>
+    <td><var title=3D"">c</var></td>
+    <td><var title=3D"">e</var></td>
+   <tr><td><var title=3D"">b</var><=
/td>
+    <td><var title=3D"">d</var></td>
+    <td><var title=3D"">f</var></td>
+   <tr><td>0</td>
+    <td>0</td>
+    <td>1</td>
+   </table><p class=3Dnote>The arguments <var title=3D&qu=
ot;">a</var>, <var title=3D"">b</var>=
, <var title=3D"">c</var>,
+  <var title=3D"">d</var>, <var title=3D"&=
quot;>e</var>, and <var title=3D"">f</var>=
 are sometimes called <var title=3D"">m11</var>, &l=
t;var title=3D"">m12</var>, <var title=3D"&quo=
t;>m21</var>, <var title=3D"">m22</var>,
+  <var title=3D"">dx</var>, and <var title=3D&q=
uot;">dy</var> or <var title=3D"">m11</v=
ar>, <var title=3D"">m21</var>, <var title=3D=
"">m12</var>, <var title=3D"">m22</=
var>, <var title=3D"">dx</var>, and
+  <var title=3D"">dy</var>. Care should be taken i=
n particular with the order of the second and third
+  arguments (<var title=3D"">b</var> and <var t=
itle=3D"">c</var>) as their order varies from API to A=
PI
+  and APIs sometimes use the notation <var title=3D"">m1=
2</var>/<var title=3D"">m21</var> and sometim=
es
+  <var title=3D"">m21</var>/<var title=3D"=
">m12</var> for those positions.</p>
+
+  <div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-context-2d-settransform title=3Ddom-cont=
ext-2d-setTransform><code>setTransform(<var title=3D"&qu=
ot;>a</var>, <var title=3D"">b</var>, <=
var title=3D"">c</var>, <var title=3D""&g=
t;d</var>, <var title=3D"">e</var>, <var t=
itle=3D"">f</var>)</code></dfn> method mus=
t reset the current transform to the identity matrix, and
+  then invoke the <code><a href=3D#dom-context-2d-transform tit=
le=3Ddom-context-2d-transform>transform</a>(<var title=3D&quo=
t;">a</var>, <var title=3D"">b</var>,=
 <var title=3D"">c</var>, <var title=3D"&qu=
ot;>d</var>, <var title=3D"">e</var>, <=
var title=3D"">f</var>)</code> method with the s=
ame arguments.</p>
+
+  <p>The <dfn id=3Ddom-context-2d-resettransform title=3Ddom-co=
ntext-2d-resetTransform><code>resetTransform()</code></=
dfn> method must
+  reset the current transform to the identity matrix.</p>
+
+  </div>
+
+
+
+  <h6 id=3Dimage-sources-for-2d-rendering-contexts><span class=3D=
secno>4.12.4.2.9 </span>Image sources for 2D rendering contexts&=
lt;/h6>
+
+  <p>Several methods in the <code><a href=3D#canvasrender=
ingcontext2d>CanvasRenderingContext2D</a></code> API take =
the union type
+  <code><a href=3D#canvasimagesource>CanvasImageSource</a=
></code> as an argument.</p>
+
+  <p>This union type allows objects implementing any of the follow=
ing interfaces to be used as image
+  sources:</p>
+
+  <ul><li><code><a href=3D#htmlimageelement>HTML=
ImageElement</a></code> (<code><a href=3D#the-img-el=
ement>img</a></code> elements)</li>
+
+   <li><code><a href=3D#htmlvideoelement>HTMLVideoElem=
ent</a></code> (<code><a href=3D#the-video-element&g=
t;video</a></code> elements)</li>
+
+   <li><code><a href=3D#htmlcanvaselement>HTMLCanvasEl=
ement</a></code> (<code><a href=3D#the-canvas-elemen=
t>canvas</a></code> elements)</li>
+
+   <li><code><a href=3D#canvasrenderingcontext2d>Canva=
sRenderingContext2D</a></code></li>
+
+   <li><code><a href=3D#imagebitmap>ImageBitmap</a&=
gt;</code></li>
+
+  </ul><p class=3Dnote>The <code><a href=3D#imagebi=
tmap>ImageBitmap</a></code> interface can be created from =
a number of other
+  image-representing types, including <code><a href=3D#imagedat=
a>ImageData</a></code>.</p>
+
+  <p>When a user agent is required to <dfn id=3Dcheck-the-usabi=
lity-of-the-image-argument>check the usability of the <var title=3D=
"">image</var>
+  argument</dfn>, where <var title=3D"">image</=
var> is a <code><a href=3D#canvasimagesource>CanvasImageSo=
urce</a></code> object, the
+  user agent must run these steps, which return either <i>good<=
/i>, <i>bad</i>, or
+  <i>aborted</i>:</p>
+
+  <ol><li><p>If the <var title=3D"">im=
age</var> argument is an <code><a href=3D#htmlimageelement=
>HTMLImageElement</a></code> object that
+   is in the <a href=3D#img-error title=3Dimg-error>broken</a&g=
t; state, then throw an
+   <code><a href=3D#invalidstateerror>InvalidStateError</=
a></code> exception, return <i>aborted</i>, and abor=
t these steps.</p>
+
+   <li><p>If the <var title=3D"">image</v=
ar> argument is an <code><a href=3D#htmlimageelement>HTMLI=
mageElement</a></code> object that
+   is not <a href=3D#img-good title=3Dimg-good>fully decodable<=
/a>, or if the <var title=3D"">image</var>
+   argument is an <code><a href=3D#htmlvideoelement>HTMLVide=
oElement</a></code> object whose <code title=3Ddom-media-r=
eadyState><a href=3D#dom-media-readystate>readyState</a>&l=
t;/code> attribute is either <code title=3Ddom-media-HAVE_NOTHING&g=
t;<a href=3D#dom-media-have_nothing>HAVE_NOTHING</a></code=
> or <code title=3Ddom-media-HAVE_METADATA><a href=3D#dom-med=
ia-have_metadata>HAVE_METADATA</a></code>, then return &lt=
;i>bad</i> and abort these
+   steps.</li>
+
+   <li><p>If the <var title=3D"">image</v=
ar> argument is an <code><a href=3D#htmlimageelement>HTMLI=
mageElement</a></code> object with
+   an intrinsic width or intrinsic height (or both) equal to zero, then =
return <i>bad</i> and abort
+   these steps.</p> <!-- http://software.hixie.ch/utilities/js/=
live-dom-viewer/saved/2567 -->
+
+   <li><p>If the <var title=3D"">image</v=
ar> argument is an <code><a href=3D#htmlcanvaselement>HTML=
CanvasElement</a></code> object with
+   either a horizontal dimension or a vertical dimension equal to zero, =
then return <i>bad</i> and
+   abort these steps.</p>
+
+   <li><p>Return <i>good</i>.</li>
+
+  </ol><p>When a <code><a href=3D#canvasimagesource=
>CanvasImageSource</a></code> object represents an <cod=
e><a href=3D#htmlimageelement>HTMLImageElement</a></cod=
e>, the
+  element's image must be used as the source image.</p>
+
+  <p>Specifically, when a <code><a href=3D#canvasimagesou=
rce>CanvasImageSource</a></code> object represents an anim=
ated image in an
+  <code><a href=3D#htmlimageelement>HTMLImageElement</a&g=
t;</code>, the user agent must use the default image of the animati=
on (the
+  one that the format defines is to be used when animation is not suppor=
ted or is disabled), or, if
+  there is no such image, the first frame of the animation, when renderi=
ng the image for
+  <code><a href=3D#canvasrenderingcontext2d>CanvasRenderingC=
ontext2D</a></code> APIs.</p>
+
+  <p>When a <code><a href=3D#canvasimagesource>CanvasI=
mageSource</a></code> object represents an <code><a =
href=3D#htmlvideoelement>HTMLVideoElement</a></code>, then
+  the frame at the <a href=3D#current-playback-position>current pl=
ayback position</a> when the method with the argument is
+  invoked must be used as the source image when rendering the image for
+  <code><a href=3D#canvasrenderingcontext2d>CanvasRenderingC=
ontext2D</a></code> APIs, and the source image's dimensions m=
ust be the <a href=3D#concept-video-intrinsic-width title=3Dconcept-vi=
deo-intrinsic-width>intrinsic width</a> and <a href=3D#concep=
t-video-intrinsic-height title=3Dconcept-video-intrinsic-height>intrin=
sic height</a> of the <a href=3D#media-resource>media resourc=
e</a>
+  (i.e. after any aspect-ratio correction has been applied).</p>
+
+  <p>When a <code><a href=3D#canvasimagesource>CanvasI=
mageSource</a></code> object represents an <code><a =
href=3D#htmlcanvaselement>HTMLCanvasElement</a></code>, th=
e
+  element's bitmap must be used as the source image.</p>
+
+  <p>When a <code><a href=3D#canvasimagesource>CanvasI=
mageSource</a></code> object represents a <code><a h=
ref=3D#canvasrenderingcontext2d>CanvasRenderingContext2D</a><=
/code>, the
+  object's <a href=3D#scratch-bitmap>scratch bitmap</a> must=
 be used as the source image.</p>
+
+  <p>When a <code><a href=3D#canvasimagesource>CanvasI=
mageSource</a></code> object represents an element that is &l=
t;a href=3D#being-rendered>being
+  rendered</a> and that element has been resized, the original ima=
ge data of the source image
+  must be used, not the image as it is rendered (e.g. <code title=3Da=
ttr-dim-width><a href=3D#attr-dim-width>width</a></code=
> and
+  <code title=3Dattr-dim-height><a href=3D#attr-dim-height>h=
eight</a></code> attributes on the source element have no eff=
ect on how
+  the object is interpreted when rendering the image for <code>&lt=
;a href=3D#canvasrenderingcontext2d>CanvasRenderingContext2D</a>=
</code>
+  APIs).</p>
+
+  <p>When a <code><a href=3D#canvasimagesource>CanvasI=
mageSource</a></code> object represents an <code><a =
href=3D#imagebitmap>ImageBitmap</a></code>, the
+  object's bitmap image data must be used as the source image.</p>
+
+<!--ADD-TOPIC:Security-->
+<!--CLEANUP-->
+  <p><dfn id=3Dthe-image-argument-is-not-origin-clean>The &l=
t;var title=3D"">image argument</var> is not origin-cl=
ean</dfn> if it is an
+  <code><a href=3D#htmlimageelement>HTMLImageElement</a&g=
t;</code> or <code><a href=3D#htmlvideoelement>HTMLVide=
oElement</a></code> whose <a href=3D#origin>origin</=
a> is not
+  the <a href=3D#same-origin title=3D"same origin">same&=
lt;/a> as the <a href=3D#origin>origin</a> specified by th=
e <a href=3D#entry-settings-object>entry settings object</a>,
+  or if it is an <code><a href=3D#htmlcanvaselement>HTMLCanv=
asElement</a></code> whose bitmap's <a href=3D#concept-can=
vas-origin-clean title=3Dconcept-canvas-origin-clean>origin-clean</=
a> flag is false, or if it is a
+  <code><a href=3D#canvasrenderingcontext2d>CanvasRenderingC=
ontext2D</a></code> object whose <a href=3D#scratch-bitmap=
>scratch bitmap</a>'s <a href=3D#concept-canvas-origin-clean =
title=3Dconcept-canvas-origin-clean>origin-clean</a> flag is fal=
se.</p>
+<!--REMOVE-TOPIC:Security-->
+
+
+
+  <h6 id=3Dfill-and-stroke-styles><span class=3Dsecno>4.12.4=
.2.10 </span>Fill and stroke styles</h6>
+
+  <dl class=3Ddomintro><dt><var title=3D"">c=
ontext</var> . <code title=3Ddom-context-2d-fillStyle><a h=
ref=3D#dom-context-2d-fillstyle>fillStyle</a></code> [ =3D=
 <var title=3D"">value</var> ]</dt>
+
+   <dd>
+
+    <p>Returns the current style used for filling shapes.</p&gt=
;
+
+    <p>Can be set, to change the fill style.</p>
+
+    <p>The style can be either a string containing a CSS color, or=
 a
+    <code><a href=3D#canvasgradient>CanvasGradient</a>=
</code> or <code><a href=3D#canvaspattern>CanvasPattern=
</a></code>
+    object. Invalid values are ignored.</p>
+
+   </dd>
+
+   <dt><var title=3D"">context</var> . <c=
ode title=3Ddom-context-2d-strokeStyle><a href=3D#dom-context-2d-st=
rokestyle>strokeStyle</a></code> [ =3D <var title=3D&qu=
ot;">value</var> ]</dt>
+
+   <dd>
+
+    <p>Returns the current style used for stroking shapes.</p&g=
t;
+
+    <p>Can be set, to change the stroke style.</p>
+
+    <p>The style can be either a string containing a CSS color, or=
 a
+    <code><a href=3D#canvasgradient>CanvasGradient</a>=
</code> or <code><a href=3D#canvaspattern>CanvasPattern=
</a></code>
+    object. Invalid values are ignored.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <!-- v6 feature requests:
+
+   * Getting and setting colours by component to bypass the CSS value pa=
rsing.
+
+     Either:
+        context.fillStyle.red +=3D 1;
+
+     Or:
+        var array =3D context.fillStyle;
+        array[1] +=3D 1;
+        context.fillStyle =3D array;
+
+   * A more performant way of setting colours in general, e.g.:
+
+       context.setFillColor(r,g,b,a) // already supported by webkit
+
+     Or:
+
+       context.fillStyle =3D 0xRRGGBBAA; // set a 32bit int directly
+
+  -->
+
+  <p>The <dfn id=3Ddom-context-2d-fillstyle title=3Ddom-context=
-2d-fillStyle><code>fillStyle</code></dfn> attribute=
 represents the
+  color or style to use inside shapes, and the <dfn id=3Ddom-context-=
2d-strokestyle title=3Ddom-context-2d-strokeStyle><code>strokeSt=
yle</code></dfn> attribute represents the color
+  or style to use for the lines around the shapes.</p>
+
+  <p>Both attributes can be either strings, <code><a href=
=3D#canvasgradient>CanvasGradient</a></code>s, or
+  <code><a href=3D#canvaspattern>CanvasPattern</a><=
/code>s. On setting, strings must be <a href=3D#parsed-as-a-css-col=
or-value title=3D"parsed as a CSS
+  <color> value">parsed as CSS <color> value=
s</a> and the color assigned, and
+  <code><a href=3D#canvasgradient>CanvasGradient</a>&l=
t;/code> and <code><a href=3D#canvaspattern>CanvasPattern&=
lt;/a></code> objects must be assigned themselves. <a href=3D=
#refsCSSCOLOR>[CSSCOLOR]</a> If the value is a string but cannot=
 be <a href=3D#parsed-as-a-css-color-value>parsed as a CSS
+  <color> value</a>, then it must be ignored, and th=
e attribute must retain its previous
+  value.
+<!--ADD-TOPIC:Security-->
+  If the new value is a <code><a href=3D#canvaspattern>Canva=
sPattern</a></code> object that is marked as <a href=3D#co=
ncept-canvas-pattern-not-origin-clean title=3Dconcept-canvas-pattern-not-=
origin-clean>not origin-clean</a>, then the <a href=3D#scratc=
h-bitmap>scratch
+  bitmap</a>'s <a href=3D#concept-canvas-origin-clean title=3Dc=
oncept-canvas-origin-clean>origin-clean</a> flag must be set to
+  false.
+<!--REMOVE-TOPIC:Security-->
+  </p>
+
+  <p>When set to a <code><a href=3D#canvaspattern>Canv=
asPattern</a></code> or <code><a href=3D#canvasgradi=
ent>CanvasGradient</a></code> object, the assignment
+  is <a href=3D#live>live</a>, meaning that changes made to =
the object after the assignment do affect
+  subsequent stroking or filling of shapes.</p>
+
+  <p>On getting, if the value is a color, then the <a href=3D#s=
erialization-of-a-color title=3D"serialization of a
+  color">serialization of the color</a> must be returned. =
Otherwise, if it is not a color but a
+  <code><a href=3D#canvasgradient>CanvasGradient</a>&l=
t;/code> or <code><a href=3D#canvaspattern>CanvasPattern&l=
t;/a></code>, then the respective object must be
+  returned. (Such objects are opaque and therefore only useful for assig=
ning to other attributes or
+  for comparison to other gradients or patterns.)</p>
+
+  <p>The <dfn id=3Dserialization-of-a-color>serialization of=
 a color</dfn> for a color value is a string, computed as follows: =
if
+  it has alpha equal to 1.0, then the string is a lowercase six-digit he=
x value, prefixed with a "#"
+  character (U+0023 NUMBER SIGN), with the first two digits representing=
 the red component, the next
+  two digits representing the green component, and the last two digits r=
epresenting the blue
+  component, the digits being <a href=3D#lowercase-ascii-hex-digits&g=
t;lowercase ASCII hex digits</a>. Otherwise, the color value
+  has alpha less than 1.0, and the string is the color value in the CSS =
<code title=3D"">rgba()</code>
+  functional-notation format: the literal string <code title=3D"=
">rgba</code> (U+0072 U+0067 U+0062
+  U+0061) followed by a U+0028 LEFT PARENTHESIS, a base-ten integer in t=
he range 0-255 representing
+  the red component (using <a href=3D#ascii-digits>ASCII digits&lt=
;/a> in the shortest form possible), a literal
+  U+002C COMMA and U+0020 SPACE, an integer for the green component, a c=
omma and a space, an integer
+  for the blue component, another comma and space, a U+0030 DIGIT ZERO, =
if the alpha value is
+  greater than zero then a U+002E FULL STOP (representing the decimal po=
int), if the alpha value is
+  greater than zero then one or more <a href=3D#ascii-digits>ASCII=
 digits</a> representing the fractional part of
+  the alpha<!-- value with no trailing zeros (implied by next sentenc=
e)-->, and finally a U+0029
+  RIGHT PARENTHESIS. User agents must express the fractional part of the=
 alpha value, if any, with
+  the level of precision necessary for the alpha value, when reparsed, t=
o be interpreted as the same
+  alpha value.</p> <!-- if people complain this is unreadable, =
expand it into a <dl> with two nested
+  <ol>s -->
+
+  <p>When the context is created, the <code title=3Ddom-context=
-2d-fillStyle><a href=3D#dom-context-2d-fillstyle>fillStyle</=
a></code> and <code title=3Ddom-context-2d-strokeStyle>&lt=
;a href=3D#dom-context-2d-strokestyle>strokeStyle</a></code&g=
t; attributes
+  must initially have the string value <code title=3D"">=
#000000</code>.</p>
+
+  <p>When the value is a color, it must not be affected by the tra=
nsformation matrix when used to
+  draw on bitmaps.</p> <!-- so singular matrices don't affect s=
olid color fillStyles -->
+
+  </div>
+
+  <hr><p>There are two types of gradients, linear gradients =
and radial gradients, both represented by
+  objects implementing the opaque <code><a href=3D#canvasgradie=
nt>CanvasGradient</a></code> interface.</p>
+
+  <p id=3Dinterpolation>Once a gradient has been created (see belo=
w), stops are placed along it to
+  define how the colors are distributed along the gradient. <span cla=
ss=3Dimpl>The color of the
+  gradient at each stop is the color specified for that stop. Between ea=
ch such stop, the colors and
+  the alpha component must be linearly interpolated over the RGBA space =
without premultiplying the
+  alpha value to find the color to use at that offset. Before the first =
stop, the color must be the
+  color of the first stop. After the last stop, the color must be the co=
lor of the last stop. When
+  there are no stops, the gradient is transparent black.</span>&lt=
;/p>
+
+  <dl class=3Ddomintro><dt><var title=3D"">g=
radient</var> . <code title=3Ddom-canvasgradient-addColorStop&gt=
;<a href=3D#dom-canvasgradient-addcolorstop>addColorStop</a>&=
lt;/code>(<var title=3D"">offset</var>, <var =
title=3D"">color</var>)</dt>
+
+   <dd>
+
+    <p>Adds a color stop with the given color to the gradient at t=
he given offset. 0.0 is the offset
+    at one end of the gradient, 1.0 is the offset at the other end.</=
p>
+
+    <p>Throws an <code><a href=3D#indexsizeerror>Index=
SizeError</a></code> exception if the offset is out of range.=
 Throws a
+    <code><a href=3D#syntaxerror>SyntaxError</a></c=
ode> exception if the color cannot be parsed.</p>
+
+   </dd>
+
+   <dt><var title=3D"">gradient</var> =3D &l=
t;var title=3D"">context</var> . <code title=3Ddom-=
context-2d-createLinearGradient><a href=3D#dom-context-2d-createlin=
eargradient>createLinearGradient</a></code>(<var title=3D=
"">x0</var>, <var title=3D"">y0</va=
r>, <var title=3D"">x1</var>, <var title=3D&q=
uot;">y1</var>)</dt>
+
+   <dd>
+
+    <p>Returns a <code><a href=3D#canvasgradient>Canva=
sGradient</a></code> object that represents a
+    linear gradient that paints along the line given by the
+    coordinates represented by the arguments.</p>
+
+   </dd>
+
+   <dt><var title=3D"">gradient</var> =3D &l=
t;var title=3D"">context</var> . <code title=3Ddom-=
context-2d-createRadialGradient><a href=3D#dom-context-2d-createrad=
ialgradient>createRadialGradient</a></code>(<var title=3D=
"">x0</var>, <var title=3D"">y0</va=
r>, <var title=3D"">r0</var>, <var title=3D&q=
uot;">x1</var>, <var title=3D"">y1</var&=
gt;, <var title=3D"">r1</var>)</dt>
+
+   <dd>
+
+    <p>Returns a <code><a href=3D#canvasgradient>Canva=
sGradient</a></code> object that represents a
+    radial gradient that paints along the cone given by the circles
+    represented by the arguments.</p>
+
+    <p>If either of the radii are negative, throws an
+    <code><a href=3D#indexsizeerror>IndexSizeError</a>=
</code> exception.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-canvasgradient-addcolorstop title=3Ddom-=
canvasgradient-addColorStop><code>addColorStop(<var title=3D&=
quot;">offset</var>,
+  <var title=3D"">color</var>)</code></df=
n> method on the <code><a href=3D#canvasgradient>CanvasGra=
dient</a></code> interface adds a
+  new stop to a gradient. If the <var title=3D"">offset&=
lt;/var> is less than 0 or greater than 1 then an
+  <code><a href=3D#indexsizeerror>IndexSizeError</a>&l=
t;/code> exception must be thrown. If the <var title=3D""=
>color</var> cannot be
+  <a href=3D#parsed-as-a-css-color-value>parsed as a CSS <c=
olor> value</a>, then a <code><a href=3D#syntaxerro=
r>SyntaxError</a></code> exception must
+  be thrown. Otherwise, the gradient must have a new stop placed, at off=
set <var title=3D"">offset</var> relative to the wh=
ole gradient, and with the color obtained by parsing <var title=3D&quo=
t;">color</var> as a CSS <color> value. If mu=
ltiple stops are added at the same offset
+  on a gradient, they must be placed in the order added, with the first =
one closest to the start of
+  the gradient, and each subsequent one infinitesimally further along to=
wards the end point (in
+  effect causing all but the first and last stop added at each point to =
be ignored).</p>
+
+  <p>The <dfn id=3Ddom-context-2d-createlineargradient title=3D=
dom-context-2d-createLinearGradient><code>createLinearGradient(&=
lt;var title=3D"">x0</var>, <var title=3D"&quo=
t;>y0</var>, <var title=3D"">x1</var>, &lt=
;var title=3D"">y1</var>)</code></dfn> met=
hod takes four arguments that represent the start point (<var title=3D=
"">x0</var>, <var title=3D"">y0</va=
r>) and end point (<var title=3D"">x1</var>, &lt=
;var title=3D"">y1</var>) of the gradient. The method =
must return a linear <code><a href=3D#canvasgradient>CanvasGr=
adient</a></code>
+  initialized with the specified line.</p>
+
+  <p>Linear gradients must be rendered such that all points on a l=
ine perpendicular to the line that
+  crosses the start and end points have the color at the point where tho=
se two lines cross (with the
+  colors coming from the <a href=3D#interpolation>interpolation an=
d extrapolation</a> described
+  above). The points in the linear gradient must be transformed as descr=
ibed by the <a href=3D#transformations title=3Ddom-context-2d-transfor=
mation>current transformation matrix</a> when rendering.</p&g=
t;
+
+  <p>If <span title=3D""><var title=3D"&qu=
ot;>x0</var> =3D <var title=3D""&=
gt;x1</var></span> and <span title=3D""><v=
ar title=3D"">y0</var> =3D <var t=
itle=3D"">y1</var></span>, then the linear
+  gradient must paint nothing.</p>
+
+  <p>The <dfn id=3Ddom-context-2d-createradialgradient title=3D=
dom-context-2d-createRadialGradient><code>createRadialGradient(&=
lt;var title=3D"">x0</var>, <var title=3D"&quo=
t;>y0</var>, <var title=3D"">r0</var>, &lt=
;var title=3D"">x1</var>, <var title=3D""=
>y1</var>, <var title=3D"">r1</var>)</c=
ode></dfn> method takes six arguments, the first
+  three representing the start circle with origin (<var title=3D&quot=
;">x0</var>, <var title=3D"">y0</var>=
)
+  and radius <var title=3D"">r0</var>, and the las=
t three representing the end circle with origin
+  (<var title=3D"">x1</var>, <var title=3D&quot=
;">y1</var>) and radius <var title=3D"">r1&=
lt;/var>. The values are
+  in coordinate space units. If either of <var title=3D""&g=
t;r0</var> or <var title=3D"">r1</var> are
+  negative, an <code><a href=3D#indexsizeerror>IndexSizeErro=
r</a></code> exception must be thrown. Otherwise, the method =
must
+  return a radial <code><a href=3D#canvasgradient>CanvasGrad=
ient</a></code> initialized with the two specified circles.&l=
t;/p>
+
+  <p>Radial gradients must be rendered by following these steps:&l=
t;/p>
+
+  <ol><li><p>If <span title=3D""><v=
ar title=3D"">x<sub title=3D"">0</sub>=
</var> =3D <var title=3D"">x<s=
ub title=3D"">1</sub></var></span> and &lt=
;span title=3D""><var title=3D"">y<sub ti=
tle=3D"">0</sub></var> =3D &lt=
;var title=3D"">y<sub title=3D"">1</sub&g=
t;</var></span> and <span title=3D""><var =
title=3D"">r<sub title=3D"">0</sub>&lt=
;/var> =3D <var title=3D"">r<sub =
title=3D"">1</sub></var></span>, then the =
radial gradient must
+   paint nothing. Abort these steps.</li>
+
+   <li>
+
+    <p>Let <span title=3D"">x(<var title=3D&quo=
t;">ω</var>) =3D (<var title=
=3D"">x<sub title=3D"">1</sub></var=
>-<var title=3D"">x<sub title=3D"">0&l=
t;/sub></var>)<var title=3D"">ω</va=
r> + <var title=3D"">x<sub title=3D=
"">0</sub></var></span></p>
+
+    <p>Let <span title=3D"">y(<var title=3D&quo=
t;">ω</var>) =3D (<var title=
=3D"">y<sub title=3D"">1</sub></var=
>-<var title=3D"">y<sub title=3D"">0&l=
t;/sub></var>)<var title=3D"">ω</va=
r> + <var title=3D"">y<sub title=3D=
"">0</sub></var></span></p>
+
+    <p>Let <span title=3D"">r(<var title=3D&quo=
t;">ω</var>) =3D (<var title=
=3D"">r<sub title=3D"">1</sub></var=
>-<var title=3D"">r<sub title=3D"">0&l=
t;/sub></var>)<var title=3D"">ω</va=
r> + <var title=3D"">r<sub title=3D=
"">0</sub></var></span></p>
+
+    <p>Let the color at <var title=3D"">&omega=
;</var> be the color at that position on the gradient
+    (with the colors coming from the <a href=3D#interpolation>inte=
rpolation and extrapolation</a>
+    described above).</p>
+
+   </li>
+
+   <li><p>For all values of <var title=3D"">=
ω</var> where <span title=3D"">r(<var =
title=3D"">ω</var>) >&nb=
sp;0</span>, starting with the value of <var title=3D"&quot=
;>ω</var> nearest to positive infinity and ending with=
 the value of <var title=3D"">ω</var> nea=
rest to negative infinity, draw the circumference of the circle with
+   radius <span title=3D"">r(<var title=3D"&quot=
;>ω</var>)</span> at position (<span title=3D=
"">x(<var title=3D"">ω</var>=
)</span>, <span title=3D"">y(<var title=3D"=
">ω</var>)</span>), with the
+   color at <var title=3D"">ω</var>, but=
 only painting on the parts of the bitmap that have not
+   yet been painted on by earlier circles in this step for this renderin=
g of the gradient.</li>
+
+  </ol><p class=3Dnote>This effectively creates a cone, touc=
hed by the two circles defined in the
+  creation of the gradient, with the part of the cone before the start c=
ircle (0.0) using the color
+  of the first offset, the part of the cone after the end circle (1.0) u=
sing the color of the last
+  offset, and areas outside the cone untouched by the gradient (transpar=
ent black).</p>
+
+  <p>The resulting radial gradient must then be transformed as des=
cribed by the <a href=3D#transformations title=3Ddom-context-2d-transf=
ormation>current transformation matrix</a> when rendering.</p=
>
+
+  <p>Gradients must be painted only where the relevant stroking or=
 filling effects requires that
+  they be drawn.</p>
+
+  </div>
+
+  <hr><p>Patterns are represented by objects implementing th=
e opaque <code><a href=3D#canvaspattern>CanvasPattern</a&g=
t;</code>
+  interface.</p>
+
+  <dl class=3Ddomintro><dt><var title=3D"">p=
attern</var> =3D <var title=3D"">context</var&gt=
; . <code title=3Ddom-context-2d-createPattern><a href=3D#dom-co=
ntext-2d-createpattern>createPattern</a></code>(<var ti=
tle=3D"">image</var>, <var title=3D"">=
repetition</var>)</dt>
+
+   <dd>
+
+    <p>Returns a <code><a href=3D#canvaspattern>Canvas=
Pattern</a></code> object that uses the given image and repea=
ts in the
+    direction(s) given by the <var title=3D"">repetition=
</var> argument.</p>
+
+    <p>The allowed values for <var title=3D"">repe=
tition</var> are <code title=3D"">repeat</code&g=
t; (both
+    directions), <code title=3D"">repeat-x</code> =
(horizontal only), <code title=3D"">repeat-y</code>
+    (vertical only), and <code title=3D"">no-repeat</=
code> (neither). If the <var title=3D"">repetition<=
/var> argument is empty, the value <code title=3D"">re=
peat</code> is used.</p>
+
+    <p>If the image isn't yet fully decoded, then nothing is drawn=
. If the image is a canvas with no
+    data, throws an <code><a href=3D#invalidstateerror>Inval=
idStateError</a></code> exception.</p>
+
+   </dd>
+
+   <dt><var title=3D"">pattern</var> . <c=
ode title=3Ddom-canvaspattern-setTransform><a href=3D#dom-canvaspat=
tern-settransform>setTransform</a></code>(<var title=3D=
"">transform</var>)</dt>
+
+   <dd>
+
+    <p>Sets the transformation matrix that will be used when rende=
ring the pattern during a fill or
+    stroke painting operation.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>To create objects of this type, the <dfn id=3Ddom-context-=
2d-createpattern title=3Ddom-context-2d-createPattern><code>crea=
tePattern(<var title=3D"">image</var>, <var titl=
e=3D"">repetition</var>)</code></dfn> meth=
od is used. When the method is invoked, the user agent
+  must run the following steps:</p>
+
+  <ol><li><p>Let <var title=3D"">image=
</var> be the first argument and <var title=3D"">re=
petition</var> be
+   the second argument.</li>
+
+   <li><p><a href=3D#check-the-usability-of-the-image-arg=
ument>Check the usability of the <var title=3D"">image=
</var> argument</a>. If this
+   returns <i>aborted</i>, then an exception has been thrown=
 and the method doesn't return anything;
+   abort these steps. If it returns <i>bad</i>, then return =
null and abort these steps. Otherwise it
+   returns <i>good</i>; continue with these steps.</li&gt=
;
+
+   <li><p>If <var title=3D"">repetition</=
var> is the empty string, let it be "<code title=3D"&quot=
;>repeat</code>".</p>
+
+   <li><p>If <var title=3D"">repetition</=
var> is not a <a href=3D#case-sensitive>case-sensitive</a>=
 match for one of
+   "<code title=3D"">repeat</code>", &qu=
ot;<code title=3D"">repeat-x</code>", "&l=
t;code title=3D"">repeat-y</code>", or "<=
code title=3D"">no-repeat</code>", throw a <co=
de><a href=3D#syntaxerror>SyntaxError</a></code>
+   exception and abort these steps.</li>
+
+   <li><p>Create a new <code><a href=3D#canvaspatte=
rn>CanvasPattern</a></code> object with the image <var =
title=3D"">image</var>
+   and the repetition behavior given by <var title=3D"">=
repetition</var>.</li>
+
+<!--ADD-TOPIC:Security-->
+   <li><p>If <a href=3D#the-image-argument-is-not-origin-=
clean>the <var title=3D"">image argument</var> i=
s not origin-clean</a>, then mark the
+   <code><a href=3D#canvaspattern>CanvasPattern</a>&lt=
;/code> object as <dfn id=3Dconcept-canvas-pattern-not-origin-clean=
 title=3Dconcept-canvas-pattern-not-origin-clean>not
+   origin-clean</dfn>.</li>
+<!--REMOVE-TOPIC:Security-->
+
+   <li><p>Return the <code><a href=3D#canvaspattern=
>CanvasPattern</a></code> object.</li>
+
+  </ol><p>Modifying the <var title=3D"">imag=
e</var> used when creating a <code><a href=3D#canvaspatter=
n>CanvasPattern</a></code> object
+  after calling the <code title=3Ddom-context-2d-createPattern>&lt=
;a href=3D#dom-context-2d-createpattern>createPattern()</a></=
code> method must
+  not affect the pattern(s) rendered by the <code><a href=3D#ca=
nvaspattern>CanvasPattern</a></code> object.</p>
+
+  <p>Patterns have a transformation matrix, which controls how the=
 pattern is used when it is
+  painted. Initially, a pattern's transformation matrix must be the iden=
tity transform.</p>
+
+  <p>When the <dfn id=3Ddom-canvaspattern-settransform title=3D=
dom-canvaspattern-setTransform><code>setTransform()</code>=
</dfn> method
+  is invoked on the pattern, the user agent must replace the pattern's t=
ransformation matrix with
+  the one described by the <code><a href=3D#svgmatrix>SVGMat=
rix</a></code> object provided as an argument to the method.&=
lt;/p>
+
+  <p>When a pattern is to be rendered within an area, the user age=
nt must run the following steps to
+  determine what is rendered:</p>
+
+  <ol><li><p>Create an infinite transparent black bitm=
ap.</li>
+
+   <li>
+
+    <p>Place a copy of the image on the bitmap, anchored such that=
 its top left corner is at the
+    origin of the coordinate space, with one coordinate space unit per C=
SS pixel of the image, then
+    place repeated copies of this image horizontally to the left and rig=
ht, if the repetition
+    behavior is "<code title=3D"">repeat-x</code=
>", or vertically up and down, if the repetition
+    behavior is "<code title=3D"">repeat-y</code=
>", or in all four directions all over the bitmap, if
+    the repetition behavior is "<code title=3D"">re=
peat</code>".</p>
+
+    <p>If the original image data is a bitmap image, the value pai=
nted at a point in the area of the
+    repetitions is computed by filtering the original image data. When s=
caling up, if the <code title=3Ddom-context-2d-imageSmoothingEnabled&g=
t;<a href=3D#dom-context-2d-imagesmoothingenabled>imageSmoothingEna=
bled</a></code> attribute is set to
+    true, the image must be rendered using nearest-neighbor interpolatio=
n. Otherwise, the user agent
+    may use any filtering algorithm (for example bilinear interpolation =
or nearest-neighbor). When
+    such a filtering algorithm requires a pixel value from outside the o=
riginal image data, it must
+    instead use the value from wrapping the pixel's coordinates to the o=
riginal image's dimensions.
+    (That is, the filter uses 'repeat' behavior, regardless of the value=
 of the pattern's repetition
+    behavior.)</p>
+    <!-- drawImage() has similar paragraphs with different rules --&g=
t;
+
+   </li>
+
+   <li><p>Transform the resulting bitmap according to the pa=
ttern's transformation matrix.</li>
+
+   <li><p>Transform the resulting bitmap again, this time ac=
cording to the <a href=3D#transformations title=3Ddom-context-2d-trans=
formation>current transformation matrix</a>.</li>
+
+   <li><p>Replace any part of the image outside the area in =
which the pattern is to be rendered with
+   transparent black.</li>
+
+   <li><p>The resulting bitmap is what is to be rendered, wi=
th the same origin and same
+   scale.</li>
+
+  </ol><hr><p>If a radial gradient or repeated pattern=
 is used when the transformation matrix is singular,
+  the resulting style must be transparent black (otherwise the gradient =
or pattern would be
+  collapsed to a point or line, leaving the other pixels undefined). Lin=
ear gradients and solid
+  colors always define all points even with singular tranformation matri=
ces.</p>
+
+  </div>
+
+
+
+
+  <h6 id=3Ddrawing-rectangles-to-the-bitmap><span class=3Dsecno=
>4.12.4.2.11 </span>Drawing rectangles to the bitmap</h6>
+
+  <p>There are three methods that immediately draw rectangles to t=
he bitmap. They each take four
+  arguments; the first two give the <var title=3D"">x&lt=
;/var> and <var title=3D"">y</var> coordinates o=
f
+  the top left of the rectangle, and the second two give the width <v=
ar title=3D"">w</var> and height
+  <var title=3D"">h</var> of the rectangle, respec=
tively.</p>
+
+  <div class=3Dimpl>
+
+  <p>The <a href=3D#transformations title=3Ddom-context-2d-tran=
sformation>current transformation matrix</a> must be
+  applied to the following four coordinates, which form the path that mu=
st then be closed to get the
+  specified rectangle: <span title=3D"">(<var title=3D=
"">x</var>, <var title=3D"">y</var&=
gt;)</span>, <span title=3D"">(<span title=3D&qu=
ot;"><var title=3D"">x</var>+<var title=3D=
"">w</var></span>, <var title=3D""&=
gt;y</var>)</span>, <span title=3D"">(<spa=
n title=3D""><var title=3D"">x</var>+&=
lt;var title=3D"">w</var></span>, <span title=
=3D""><var title=3D"">y</var>+<var =
title=3D"">h</var></span>)</span>, <spa=
n title=3D"">(<var title=3D"">x</var>,=
 <span title=3D""><var title=3D"">y</v=
ar>+<var title=3D"">h</var></span>)</sp=
an>.</p>
+
+  <p>Shapes are painted without affecting the <a href=3D#curren=
t-default-path>current default path</a>, and are subject to
+  the <a href=3D#clipping-region>clipping region</a>, and, w=
ith the exception of <code title=3Ddom-context-2d-clearRect><a h=
ref=3D#dom-context-2d-clearrect>clearRect()</a></code>, al=
so <a href=3D#shadows title=3Dshadows>shadow
+  effects</a>, <a href=3D#dom-context-2d-globalalpha title=3Ddo=
m-context-2d-globalAlpha>global alpha</a>, and <a href=3D#dom=
-context-2d-globalcompositeoperation title=3Ddom-context-2d-globalComposi=
teOperation>global composition operators</a>.</p>
+
+  </div>
+
+  <dl class=3Ddomintro><dt><var title=3D"">c=
ontext</var> . <code title=3Ddom-context-2d-clearRect><a h=
ref=3D#dom-context-2d-clearrect>clearRect</a></code>(<v=
ar title=3D"">x</var>, <var title=3D""&gt=
;y</var>, <var title=3D"">w</var>, <var ti=
tle=3D"">h</var>)</dt>
+
+   <dd>
+
+    <p>Clears all pixels on the bitmap in the given rectangle to t=
ransparent black.</p>
+
+   </dd>
+
+   <dt><var title=3D"">context</var> . <c=
ode title=3Ddom-context-2d-fillRect><a href=3D#dom-context-2d-fillr=
ect>fillRect</a></code>(<var title=3D"">x&=
lt;/var>, <var title=3D"">y</var>, <var title=
=3D"">w</var>, <var title=3D"">h</v=
ar>)</dt>
+
+   <dd>
+
+    <p>Paints the given rectangle onto the bitmap, using the curre=
nt fill style.</p>
+
+   </dd>
+
+   <dt><var title=3D"">context</var> . <c=
ode title=3Ddom-context-2d-strokeRect><a href=3D#dom-context-2d-str=
okerect>strokeRect</a></code>(<var title=3D""=
>x</var>, <var title=3D"">y</var>, <var=
 title=3D"">w</var>, <var title=3D"">h=
</var>)</dt>
+
+   <dd>
+
+    <p>Paints the box that outlines the given rectangle onto the b=
itmap, using the current stroke
+    style.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-context-2d-clearrect title=3Ddom-context=
-2d-clearRect><code>clearRect(<var title=3D"">x&=
lt;/var>, <var title=3D"">y</var>, <var title=
=3D"">w</var>, <var title=3D"">h</v=
ar>)</code></dfn> method must run the
+  following steps:</p>
+
+  <ol><li><p>Let <var title=3D"">pixel=
s</var> be the set of pixels in the specified rectangle that also
+   intersect the current <a href=3D#clipping-region>clipping regio=
n</a>.</li>
+
+   <li><p>Clear the pixels in <var title=3D""&g=
t;pixels</var> to a fully transparent black, erasing any
+   previous image.</li>
+
+   <li><p><a href=3D#clear-regions-that-cover-the-pixels&=
gt;Clear regions that cover the pixels</a> in <var title=3D&quot=
;">pixels</var> on the
+   <a href=3D#scratch-bitmap>scratch bitmap</a>.</li>
+
+  </ol><p class=3Dnote>If either height or width are zero, t=
his method has no effect, since the set of
+  pixels would be empty.</p>
+
+  <p>The <dfn id=3Ddom-context-2d-fillrect title=3Ddom-context-=
2d-fillRect><code>fillRect(<var title=3D"">x<=
/var>, <var title=3D"">y</var>, <var title=3D=
"">w</var>, <var title=3D"">h</var&=
gt;)</code></dfn> method must paint the
+  specified rectangular area using the <code title=3Ddom-context-2d-f=
illStyle><a href=3D#dom-context-2d-fillstyle>fillStyle</a>=
</code>. If
+  either height or width are zero, this method has no effect.</p>
+
+  <p>The <dfn id=3Ddom-context-2d-strokerect title=3Ddom-contex=
t-2d-strokeRect><code>strokeRect(<var title=3D""&gt=
;x</var>, <var title=3D"">y</var>, <var ti=
tle=3D"">w</var>, <var title=3D"">h&lt=
;/var>)</code></dfn> method must take the
+  result of <a href=3D#trace-a-path title=3D"trace a path"&=
gt;tracing the path</a> described below, using the
+  <code><a href=3D#canvasrenderingcontext2d>CanvasRenderingC=
ontext2D</a></code> object's line styles, and fill it with th=
e <code title=3Ddom-context-2d-strokeStyle><a href=3D#dom-contex=
t-2d-strokestyle>strokeStyle</a></code>.</p>
+
+  <p>If both <var title=3D"">w</var> and &lt=
;var title=3D"">h</var> are zero, the path has a singl=
e subpath
+  with just one point (<var title=3D"">x</var>, &l=
t;var title=3D"">y</var>), and no lines, and this meth=
od
+  thus has no effect (the <a href=3D#trace-a-path>trace a path<=
/a> algorithm returns an empty path in that
+  case).</p>
+
+  <p>If just one of either <var title=3D"">w</v=
ar> or <var title=3D"">h</var> is zero, then the=
 path has
+  a single subpath consisting of two points, with coordinates (<span =
title=3D""><var title=3D"">x</var><=
/span>, <span title=3D""><var title=3D""&=
gt;y</var></span>) and (<span title=3D""><=
var title=3D"">x</var>+<var title=3D""&gt=
;w</var></span>, <span title=3D""><var tit=
le=3D"">y</var></span>+<var title=3D"&qu=
ot;>h</var>), in that order, connected by a single straight line=
.</p>
+
+  <p>Otherwise, the path has a single subpath consisting of four p=
oints, with coordinates (<span title=3D""><var title=3D=
"">x</var></span>, <span title=3D""=
><var title=3D"">y</var></span>), (<spa=
n title=3D""><var title=3D"">x</var>+&=
lt;var title=3D"">w</var></span>, <span title=
=3D""><var title=3D"">y</var></span=
>), (<span title=3D""><var title=3D"">=
x</var>+<var title=3D"">w</var></span>,
+  <span title=3D""><var title=3D"">y<=
/var></span>+<var title=3D"">h</var>), and=
 (<span title=3D""><var title=3D"">x</=
var></span>, <span title=3D""><var title=3D&q=
uot;">y</var>+<var title=3D"">h</var>=
</span>),
+  connected to each other in that order by straight lines.</p>
+
+  </div>
+
+
+
+  <h6 id=3Ddrawing-text-to-the-bitmap><span class=3Dsecno>4.=
12.4.2.12 </span>Drawing text to the bitmap</h6>
+
+  <dl class=3Ddomintro><dt><var title=3D"">c=
ontext</var> . <code title=3Ddom-context-2d-fillText><a hr=
ef=3D#dom-context-2d-filltext>fillText</a></code>(<var =
title=3D"">text</var>, <var title=3D""&gt=
;x</var>, <var title=3D"">y</var> [, <var =
title=3D"">maxWidth</var> ] )</dt>
+   <dt><var title=3D"">context</var> . <c=
ode title=3Ddom-context-2d-strokeText><a href=3D#dom-context-2d-str=
oketext>strokeText</a></code>(<var title=3D""=
>text</var>, <var title=3D"">x</var>, <=
var title=3D"">y</var> [, <var title=3D""=
>maxWidth</var> ] )</dt>
+
+   <dd>
+
+    <p>Fills or strokes (respectively) the given text at the given=
 position. If a maximum width is
+    provided, the text will be scaled to fit that width if necessary.&lt=
;/p>
+
+   </dd>
+
+   <dt><var title=3D"">metrics</var> =3D &lt=
;var title=3D"">context</var> . <code title=3Ddom-c=
ontext-2d-measureText><a href=3D#dom-context-2d-measuretext>meas=
ureText</a></code>(<var title=3D"">text</v=
ar>)</dt>
+
+   <dd>
+
+    <p>Returns a <code><a href=3D#textmetrics>TextMetr=
ics</a></code> object with the metrics of the given text in t=
he current
+    font.</p>
+
+   </dd>
+
+   <dt><var title=3D"">metrics</var> . <c=
ode title=3Ddom-textmetrics-width><a href=3D#dom-textmetrics-width&=
gt;width</a></code></dt>
+   <dt><var title=3D"">metrics</var> . <c=
ode title=3Ddom-textmetrics-actualBoundingBoxLeft><a href=3D#dom-te=
xtmetrics-actualboundingboxleft>actualBoundingBoxLeft</a></co=
de></dt>
+   <dt><var title=3D"">metrics</var> . <c=
ode title=3Ddom-textmetrics-actualBoundingBoxRight><a href=3D#dom-t=
extmetrics-actualboundingboxright>actualBoundingBoxRight</a><=
/code></dt>
+   <dt><var title=3D"">metrics</var> . <c=
ode title=3Ddom-textmetrics-fontBoundingBoxAscent><a href=3D#dom-te=
xtmetrics-fontboundingboxascent>fontBoundingBoxAscent</a></co=
de></dt>
+   <dt><var title=3D"">metrics</var> . <c=
ode title=3Ddom-textmetrics-fontBoundingBoxDescent><a href=3D#dom-t=
extmetrics-fontboundingboxdescent>fontBoundingBoxDescent</a><=
/code></dt>
+   <dt><var title=3D"">metrics</var> . <c=
ode title=3Ddom-textmetrics-actualBoundingBoxAscent><a href=3D#dom-=
textmetrics-actualboundingboxascent>actualBoundingBoxAscent</a>&=
lt;/code></dt>
+   <dt><var title=3D"">metrics</var> . <c=
ode title=3Ddom-textmetrics-actualBoundingBoxDescent><a href=3D#dom=
-textmetrics-actualboundingboxdescent>actualBoundingBoxDescent</a&g=
t;</code></dt>
+   <dt><var title=3D"">metrics</var> . <c=
ode title=3Ddom-textmetrics-emHeightAscent><a href=3D#dom-textmetri=
cs-emheightascent>emHeightAscent</a></code></dt>
+   <dt><var title=3D"">metrics</var> . <c=
ode title=3Ddom-textmetrics-emHeightDescent><a href=3D#dom-textmetr=
ics-emheightdescent>emHeightDescent</a></code></dt>
+   <dt><var title=3D"">metrics</var> . <c=
ode title=3Ddom-textmetrics-hangingBaseline><a href=3D#dom-textmetr=
ics-hangingbaseline>hangingBaseline</a></code></dt>
+   <dt><var title=3D"">metrics</var> . <c=
ode title=3Ddom-textmetrics-alphabeticBaseline><a href=3D#dom-textm=
etrics-alphabeticbaseline>alphabeticBaseline</a></code>&lt=
;/dt>
+   <dt><var title=3D"">metrics</var> . <c=
ode title=3Ddom-textmetrics-ideographicBaseline><a href=3D#dom-text=
metrics-ideographicbaseline>ideographicBaseline</a></code>=
</dt>
+
+   <dd>
+
+    <p>Returns the measurement described below.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>The <code><a href=3D#canvasrenderingcontext2d>Can=
vasRenderingContext2D</a></code> interface provides the follo=
wing methods for
+  rendering text.</p>
+
+  <p>The <dfn id=3Ddom-context-2d-filltext title=3Ddom-context-=
2d-fillText><code>fillText()</code></dfn> and <df=
n id=3Ddom-context-2d-stroketext title=3Ddom-context-2d-strokeText>&lt=
;code>strokeText()</code></dfn> methods take three or four
+  arguments, <var title=3D"">text</var>, <var t=
itle=3D"">x</var>, <var title=3D"">y&l=
t;/var>, and optionally
+  <var title=3D"">maxWidth</var>, and render the g=
iven <var title=3D"">text</var> at the given (<v=
ar title=3D"">x</var>, <var title=3D""&gt=
;y</var>) coordinates ensuring that the text isn't wider than <v=
ar title=3D"">maxWidth</var> if specified, using the c=
urrent <code title=3Ddom-context-2d-font><a href=3D#dom-context-=
2d-font>font</a></code>, <code title=3Ddom-context-2d-t=
extAlign><a href=3D#dom-context-2d-textalign>textAlign</a>=
</code>,
+  and <code title=3Ddom-context-2d-textBaseline><a href=3D#dom-=
context-2d-textbaseline>textBaseline</a></code> values. Sp=
ecifically, when the
+  methods are called, the user agent must run the following steps:</p=
>
+
+  <ol><li><p>Run the <a href=3D#text-preparation-al=
gorithm>text preparation algorithm</a>, passing it <var title=
=3D"">text</var>, the
+   <code><a href=3D#canvasrenderingcontext2d>CanvasRendering=
Context2D</a></code> object, and, if the <var title=3D&quo=
t;">maxWidth</var> argument
+   was provided, that argument. Let <var title=3D"">glyp=
hs</var> be the result.</p>
+
+   <li><p>Move all the shapes in <var title=3D"&quot=
;>glyphs</var> to the right by <var title=3D"">x=
</var>
+   CSS pixels and down by <var title=3D"">y</var> =
CSS pixels.</li>
+
+   <li>
+
+    <p>Paint the shapes given in <var title=3D"">g=
lyphs</var>, as transformed by the <a href=3D#transformations ti=
tle=3Ddom-context-2d-transformation>current transformation matrix</=
a>, with each CSS pixel
+    in the coordinate space of <var title=3D"">glyphs&lt=
;/var> mapped to one coordinate space unit.</p>
+
+    <p>For <code title=3Ddom-context-2d-fillText><a href=3D=
#dom-context-2d-filltext>fillText()</a></code>, <code t=
itle=3Ddom-context-2d-fillStyle><a href=3D#dom-context-2d-fillstyle=
>fillStyle</a></code> must be applied to the shapes and &l=
t;code title=3Ddom-context-2d-strokeStyle><a href=3D#dom-context-2d=
-strokestyle>strokeStyle</a></code> must be ignored. For &=
lt;code title=3Ddom-context-2d-strokeText><a href=3D#dom-context-2d=
-stroketext>strokeText()</a></code>, the reverse holds: &l=
t;code title=3Ddom-context-2d-strokeStyle><a href=3D#dom-context-2d=
-strokestyle>strokeStyle</a></code> must be applied to the=
 result of <a href=3D#trace-a-path title=3D"trace a path"&gt=
;tracing</a> the shapes using the <code><a href=3D#canvasr=
enderingcontext2d>CanvasRenderingContext2D</a></code>
+    object for the line styles, and <code title=3Ddom-context-2d-fill=
Style><a href=3D#dom-context-2d-fillstyle>fillStyle</a>&lt=
;/code> must be
+    ignored.</p>
+
+    <p>These shapes are painted without affecting the current path=
, and are subject to <a href=3D#shadows title=3Dshadows>shadow effe=
cts</a>, <a href=3D#dom-context-2d-globalalpha title=3Ddom-conte=
xt-2d-globalAlpha>global
+    alpha</a>, the <a href=3D#clipping-region>clipping regio=
n</a>, and <a href=3D#dom-context-2d-globalcompositeoperation ti=
tle=3Ddom-context-2d-globalCompositeOperation>global composition opera=
tors</a>.</p>
+
+   </li>
+
+<!--ADD-TOPIC:Security-->
+<!--CLEANUP-->
+   <li><p>If the <a href=3D#text-preparation-algorithm&gt=
;text preparation algorithm</a> used a font that has an <a href=3D=
#origin>origin</a>
+   that is not the <a href=3D#same-origin title=3D"same origin&q=
uot;>same</a> as the=20
+   <a href=3D#origin>origin</a> specified by the <a href=3D=
#entry-settings-object>entry settings object</a> (even if "=
using a font" means just checking if that font has a particular
+   glyph in it before falling back to another font), then set the <a =
href=3D#scratch-bitmap>scratch bitmap</a>'s
+   <a href=3D#concept-canvas-origin-clean title=3Dconcept-canvas-orig=
in-clean>origin-clean</a> flag to false.</li> <!--
+   because fonts could consider sensitive material, I guess; and because=
 that sensitivity could
+   extend to whether or not a particular glyph is in the font in the fir=
st place. -->
+<!--REMOVE-TOPIC:Security-->
+
+  </ol><!--v6DVT - this is commented out until CSS can get its =
act together
+enough to actual specify vertical text rendering (how long have we
+been waiting now?)
+
+WHEN EDITING THIS, FIX THE PARTS MARKED "XX&a=
mp;#x0058;" BELOW
+
+ALSO NOTE THAT THIS PROBABLY NEEDS ENTIRELY REVISITING NOW THAT WE
+HAVE REJIGGED HOW TEXT WORKS IN v5 (e.g. remember security)
+
+  <p>The <dfn title=3D"dom-context-2d-fillVerticalText&quo=
t;><code>fillVerticalText()</code></dfn> and <dfn
+  title=3D"dom-context-2d-strokeVerticalText"><code>s=
trokeVerticalText()</code></dfn> methods take
+  three or four arguments, <var title=3D"">text</var&=
gt;, <var title=3D"">x</var>, <var title=3D&quot=
;">y</var>,
+  and optionally <var title=3D"">maxHeight</var>, =
and render the given <var title=3D"">text</var> as
+  vertical text at the given (<var title=3D"">x</var&=
gt;, <var title=3D"">y</var>) coordinates ensuring
+  that the text isn't taller than <var title=3D"">maxHei=
ght</var> if specified, using the current
+  <code title=3D"dom-context-2d-font">font</code> =
and <code
+  title=3D"dom-context-2d-textAlign">textAlign</code>=
 values. Specifically, when the methods are
+  called, the user agent must run the following steps:</p>
+
+  <ol>
+
+   <li><p>If <var title=3D"">maxHeight</v=
ar> is present but less than or equal to zero, return without
+   doing anything; abort these steps.</p></li>
+
+   <li><p>Let <var title=3D"">font</var&g=
t; be the current font of the context, as given by the <code
+   title=3D"dom-context-2d-font">font</code> attribut=
e.</p></li>
+
+   <li><p>Replace all the <span title=3D"space chara=
cter">space characters</span> in <var
+   title=3D"">text</var> with U+0020 SPACE characters=
.</p></li>
+
+   <li><p>Form a <em class=3D"X&#x005=
8;X">whatever CSS ends up calling vertical line
+   boxes and inline boxes</em> containing the text <var title=3D=
"">text</var>, with all the properties
+   at their initial values except the 'font' property of the inline box =
set to <var
+   title=3D"">font</var> and the 'direction' property=
 of the inline box set to <span>the
+   directionality</span> of the <code>canvas</code> el=
ement.</p></li>
+
+   <!- - if you insert a step here, make sure to adjust the next step=
's final words - ->
+
+   <li><p>If the <var title=3D"">maxHeight&l=
t;/var> argument was specified and the hypothetical height of
+   the <em class=3D"XXX"&g=
t;box</em> in the hypothetical line box is greater than
+   <var title=3D"">maxHeight</var> CSS pixels, the=
n change <var title=3D"">font</var> to have a more
+   condensed font (if one is available or if a reasonably readable one c=
an be synthesized by
+   applying an appropriate scale factor to the font) or a smaller font, =
and return to the previous
+   step.</p></li>
+
+   <li>
+
+    <p>Let the <var title=3D"">anchor point</va=
r> be a point on the <em
+    class=3D"XXX">inline b=
ox</var>, determined by the <code
+    title=3D"dom-context-2d-textAlign">textAlign</code&g=
t;, as follows:</p>
+
+    <p>Vertical position:</p>
+
+    <dl>
+
+     <dt>If <code title=3D"dom-context-2d-textAlign"&=
gt;textAlign</code> is <code
+     title=3D"">start</code></dt>
+
+     <dt>If <code title=3D"dom-context-2d-textAlign"&=
gt;textAlign</code> is <code title=3D"">left</co=
de>
+     and <span>the directionality</span> of the <code>=
canvas</code> element is 'ltr'</dt>
+
+     <dt>If <code title=3D"dom-context-2d-textAlign"&=
gt;textAlign</code> is <code title=3D"">right</c=
ode>
+     and <span>the directionality</span> of the <code>=
canvas</code> element is 'rtl'</dt>
+
+     <dd>Let the <var title=3D"">anchor point</=
var>'s vertical position be the top edge of the <em
+     class=3D"XXX">inline =
box</em>.</dd>
+
+
+     <dt>If <code title=3D"dom-context-2d-textAlign"&=
gt;textAlign</code> is <code
+     title=3D"">end</code></dt>
+
+     <dt>If <code title=3D"dom-context-2d-textAlign"&=
gt;textAlign</code> is <code title=3D"">right</c=
ode>
+     and <span>the directionality</span> of the <code>=
canvas</code> element is 'ltr'</dt>
+
+     <dt>If <code title=3D"dom-context-2d-textAlign"&=
gt;textAlign</code> is <code title=3D"">left</co=
de>
+     and <span>the directionality</span> of the <code>=
canvas</code> element is 'rtl'</dt>
+
+     <dd>Let the <var title=3D"">anchor point</=
var>'s vertical
+     position be the bottom edge of the <em class=3D"&#x0058=
;XX">inline
+     box</em>.</dd>
+
+
+     <dt>If <code title=3D"dom-context-2d-textAlign"&=
gt;textAlign</code> is <code
+     title=3D"">center</code></dt>
+
+     <dd>Let the <var title=3D"">anchor point</=
var>'s vertical position be half way between the top
+     and bottom edges of the <em class=3D"X&#x005=
8;X">inline box</em>.</dd>
+
+    </dl>
+
+    <p>Let the horizontal position be half way between the left an=
d right edges of the em box of the
+    first available font of the <em class=3D"X&#x=
0058;X">inline box</em>.</p>
+
+   </li>
+
+   <li>
+
+    <p>Paint the hypothetical inline box as the shape given by the=
 text's glyphs, as transformed by
+    the <span title=3D"dom-context-2d-transformation">cu=
rrent transformation matrix</span>, and
+    anchored and sized so that before applying the <span
+    title=3D"dom-context-2d-transformation">current transfo=
rmation matrix</span>, the <var
+    title=3D"">anchor point</var> is at (<var titl=
e=3D"">x</var>, <var title=3D"">y</=
var>) and each CSS
+    pixel is mapped to one coordinate space unit.</p>
+
+    <p>For <code title=3D"dom-context-2d-fillVerticalText&=
quot;>fillVerticalText()</code> <code
+    title=3D"dom-context-2d-fillStyle">fillStyle</code&g=
t; must be applied and <code
+    title=3D"dom-context-2d-strokeStyle">strokeStyle</co=
de> must be ignored. For <code
+    title=3D"dom-context-2d-strokeVerticalText">strokeVerti=
calText()</code> the reverse holds and
+    <code title=3D"dom-context-2d-strokeStyle">strokeSty=
le</code> must be applied and <code
+    title=3D"dom-context-2d-fillStyle">fillStyle</code&g=
t; must be ignored.</p>
+
+    <p>Text is painted without affecting the current path, and is =
subject to <span
+    title=3D"shadows">shadow effects</span>, <span=
 title=3D"dom-context-2d-globalAlpha">global
+    alpha</span>, the <span>clipping region</span>, an=
d <span
+    title=3D"dom-context-2d-globalCompositeOperation">globa=
l composition operators</span>.</p>
+
+   </li>
+
+  </ol>
+
+v6DVT (also check for '- -' bits in the part above) --><p>The &=
lt;dfn id=3Ddom-context-2d-measuretext title=3Ddom-context-2d-measureText=
><code>measureText()</code></dfn> method takes one
+  argument, <var title=3D"">text</var>. When the m=
ethod is invoked, the user agent must run the
+  <a href=3D#text-preparation-algorithm>text preparation algorithm=
</a>, passing it <var title=3D"">text</var> a=
nd the
+  <code><a href=3D#canvasrenderingcontext2d>CanvasRenderingC=
ontext2D</a></code> object, and then using the returned inlin=
e box must create a
+  new <code><a href=3D#textmetrics>TextMetrics</a><=
/code> object with its attributes set as described in the following li=
st.
+<!--ADD-TOPIC:Security-->
+  If doing these measurements requires using a font that has an <a hr=
ef=3D#origin>origin</a> that is not the
+  <a href=3D#same-origin title=3D"same origin">same</=
a> as that of the <code><a href=3D#document>Document</a=
></code> object that owns the
+  <code><a href=3D#the-canvas-element>canvas</a></c=
ode> element (even if "using a font" means just checking if =
that font has a
+  particular glyph in it before falling back to another font), then the =
method must throw a
+  <code><a href=3D#securityerror>SecurityError</a><=
/code> exception.
+<!--REMOVE-TOPIC:Security-->
+  Otherwise, it must return the new <code><a href=3D#textmetric=
s>TextMetrics</a></code> object.
+  <a href=3D#refsCSS>[CSS]</a>
+  <a href=3D#fingerprinting-vector class=3Dfingerprint title=3D"=
fingerprinting vector"><img src=3Dhttp://images.whatwg.org/fin=
gerprint.png width=3D46 alt=3D"(This is a fingerprinting vector.)&qu=
ot; height=3D64></a>
+  </p>
+
+  </div>
+
+  <dl><dt><dfn id=3Ddom-textmetrics-width title=3Ddom-tex=
tmetrics-width><code>width</code></dfn> attribute&lt=
;/dt>
+
+   <dd><p>The width of that inline box, in CSS pixels. (The =
text's advance width.)</dd>
+
+   <dt><dfn id=3Ddom-textmetrics-actualboundingboxleft title=3D=
dom-textmetrics-actualBoundingBoxLeft><code>actualBoundingBoxLef=
t</code></dfn> attribute</dt>
+
+   <dd>
+
+    <p>The distance parallel to the baseline from the alignment po=
int given by the <code title=3Ddom-context-2d-textAlign><a href=3D=
#dom-context-2d-textalign>textAlign</a></code> attribute t=
o the left side of the bounding
+    rectangle of the given text, in CSS pixels; positive numbers indicat=
ing a distance going left
+    from the given alignment point.
+
+    <p class=3Dnote>The sum of this value and the next (<code t=
itle=3Ddom-textmetrics-actualBoundingBoxRight><a href=3D#dom-textme=
trics-actualboundingboxright>actualBoundingBoxRight</a></code=
>) can be wider than
+    the width of the inline box (<code title=3Ddom-textmetrics-width&=
gt;<a href=3D#dom-textmetrics-width>width</a></code>), =
in particular
+    with slanted fonts where characters overhang their advance width.&lt=
;/p>
+
+   </dd>
+
+   <dt><dfn id=3Ddom-textmetrics-actualboundingboxright title=3D=
dom-textmetrics-actualBoundingBoxRight><code>actualBoundingBoxRi=
ght</code></dfn> attribute</dt>
+
+   <dd>
+
+    <p>The distance parallel to the baseline from the alignment po=
int given by the <code title=3Ddom-context-2d-textAlign><a href=3D=
#dom-context-2d-textalign>textAlign</a></code> attribute t=
o the right side of the bounding
+    rectangle of the given text, in CSS pixels; positive numbers indicat=
ing a distance going right
+    from the given alignment point.</p>
+
+   </dd>
+
+   <dt><dfn id=3Ddom-textmetrics-fontboundingboxascent title=3D=
dom-textmetrics-fontBoundingBoxAscent><code>fontBoundingBoxAscen=
t</code></dfn> attribute</dt>
+
+   <dd>
+
+    <p>The distance from the horizontal line indicated by the <=
code title=3Ddom-context-2d-textBaseline><a href=3D#dom-context-2d-=
textbaseline>textBaseline</a></code> attribute to the top =
of the highest
+    bounding rectangle of all the fonts used to render the text, in CSS =
pixels; positive numbers
+    indicating a distance going up from the given baseline.</p>
+
+    <p class=3Dnote>This value and the next are useful when render=
ing a background that must have a
+    consistent height even if the exact text being rendered changes. The=
 <code title=3Ddom-textmetrics-actualBoundingBoxAscent><a href=3D=
#dom-textmetrics-actualboundingboxascent>actualBoundingBoxAscent</a=
></code> attribute (and
+    its corresponding attribute for the descent) are useful when drawing=
 a bounding box around
+    specific text.</p>
+
+   </dd>
+
+   <dt><dfn id=3Ddom-textmetrics-fontboundingboxdescent title=3D=
dom-textmetrics-fontBoundingBoxDescent><code>fontBoundingBoxDesc=
ent</code></dfn> attribute</dt>
+
+   <dd><p>The distance from the horizontal line indicated by=
 the <code title=3Ddom-context-2d-textBaseline><a href=3D#dom-co=
ntext-2d-textbaseline>textBaseline</a></code> attribute to=
 the bottom of the lowest
+   bounding rectangle of all the fonts used to render the text, in CSS p=
ixels; positive numbers
+   indicating a distance going down from the given baseline.</dd>
+
+   <dt><dfn id=3Ddom-textmetrics-actualboundingboxascent title=3D=
dom-textmetrics-actualBoundingBoxAscent><code>actualBoundingBoxA=
scent</code></dfn> attribute</dt>
+
+   <dd>
+
+    <p>The distance from the horizontal line indicated by the <=
code title=3Ddom-context-2d-textBaseline><a href=3D#dom-context-2d-=
textbaseline>textBaseline</a></code> attribute to the top =
of the bounding
+    rectangle of the given text, in CSS pixels; positive numbers indicat=
ing a distance going up from
+    the given baseline.
+
+    <p class=3Dnote>This number can vary greatly based on the inpu=
t text, even if the first font
+    specified covers all the characters in the input. For example, the &=
lt;code title=3Ddom-textmetrics-actualBoundingBoxAscent><a href=3D#=
dom-textmetrics-actualboundingboxascent>actualBoundingBoxAscent</a&=
gt;</code> of a lowercase
+    "o" from an alphabetic baseline would be less than that of=
 an uppercase "F". The value can
+    easily be negative; for example, the distance from the top of the em=
 box (<code title=3Ddom-context-2d-textBaseline><a href=3D#dom-c=
ontext-2d-textbaseline>textBaseline</a></code> value &quot=
;<code title=3Ddom-context-2d-textBaseline-top><a href=3D#dom-co=
ntext-2d-textbaseline-top>top</a></code>") to the top=
 of the bounding rectangle when
+    the given text is just a single comma "<code title=3D"&=
quot;>,</code>" would likely (unless the font is
+    quite unusual) be negative.</p>
+
+   </dd>
+
+   <dt><dfn id=3Ddom-textmetrics-actualboundingboxdescent title=
=3Ddom-textmetrics-actualBoundingBoxDescent><code>actualBounding=
BoxDescent</code></dfn> attribute</dt>
+
+   <dd><p>The distance from the horizontal line indicated by=
 the <code title=3Ddom-context-2d-textBaseline><a href=3D#dom-co=
ntext-2d-textbaseline>textBaseline</a></code> attribute to=
 the bottom of the bounding
+   rectangle of the given text, in CSS pixels; positive numbers indicati=
ng a distance going down
+   from the given baseline.</dd>
+
+   <dt><dfn id=3Ddom-textmetrics-emheightascent title=3Ddom-tex=
tmetrics-emHeightAscent><code>emHeightAscent</code></df=
n> attribute</dt>
+
+   <dd><p>The distance from the horizontal line indicated by=
 the <code title=3Ddom-context-2d-textBaseline><a href=3D#dom-co=
ntext-2d-textbaseline>textBaseline</a></code> attribute to=
 the top of the em square in
+   the line box, in CSS pixels; positive numbers indicating that the giv=
en baseline is below the top
+   of the em square (so this value will usually be positive). Zero if th=
e given baseline is the top
+   of the em square; half the font size if the given baseline is the mid=
dle of the em
+   square.</dd>
+
+   <dt><dfn id=3Ddom-textmetrics-emheightdescent title=3Ddom-te=
xtmetrics-emHeightDescent><code>emHeightDescent</code><=
/dfn> attribute</dt>
+
+   <dd><p>The distance from the horizontal line indicated by=
 the <code title=3Ddom-context-2d-textBaseline><a href=3D#dom-co=
ntext-2d-textbaseline>textBaseline</a></code> attribute to=
 the bottom of the em square
+   in the line box, in CSS pixels; positive numbers indicating that the =
given baseline is below the
+   bottom of the em square (so this value will usually be negative). (Ze=
ro if the given baseline is
+   the top of the em square.)</dd>
+
+   <dt><dfn id=3Ddom-textmetrics-hangingbaseline title=3Ddom-te=
xtmetrics-hangingBaseline><code>hangingBaseline</code><=
/dfn> attribute</dt>
+
+   <dd><p>The distance from the horizontal line indicated by=
 the <code title=3Ddom-context-2d-textBaseline><a href=3D#dom-co=
ntext-2d-textbaseline>textBaseline</a></code> attribute to=
 the hanging baseline of the
+   line box, in CSS pixels; positive numbers indicating that the given b=
aseline is below the hanging
+   baseline. (Zero if the given baseline is the hanging baseline.)</d=
d>
+
+   <dt><dfn id=3Ddom-textmetrics-alphabeticbaseline title=3Ddom=
-textmetrics-alphabeticBaseline><code>alphabeticBaseline</cod=
e></dfn> attribute</dt>
+
+   <dd><p>The distance from the horizontal line indicated by=
 the <code title=3Ddom-context-2d-textBaseline><a href=3D#dom-co=
ntext-2d-textbaseline>textBaseline</a></code> attribute to=
 the alphabetic baseline of
+   the line box, in CSS pixels; positive numbers indicating that the giv=
en baseline is below the
+   alphabetic baseline. (Zero if the given baseline is the alphabetic ba=
seline.)</dd>
+
+   <dt><dfn id=3Ddom-textmetrics-ideographicbaseline title=3Ddo=
m-textmetrics-ideographicBaseline><code>ideographicBaseline</=
code></dfn> attribute</dt>
+
+   <dd><p>The distance from the horizontal line indicated by=
 the <code title=3Ddom-context-2d-textBaseline><a href=3D#dom-co=
ntext-2d-textbaseline>textBaseline</a></code> attribute to=
 the ideographic baseline of
+   the line box, in CSS pixels; positive numbers indicating that the giv=
en baseline is below the
+   ideographic baseline. (Zero if the given baseline is the ideographic =
baseline.)</dd>
+
+  </dl><p class=3Dnote>Glyphs rendered using <code title=3D=
dom-context-2d-fillText><a href=3D#dom-context-2d-filltext>fillT=
ext()</a></code> and
+  <code title=3Ddom-context-2d-strokeText><a href=3D#dom-contex=
t-2d-stroketext>strokeText()</a></code> can spill out of t=
he box given by the
+  font size (the em square size) and the width returned by <code titl=
e=3Ddom-context-2d-measureText><a href=3D#dom-context-2d-measuretex=
t>measureText()</a></code> (the text width). Authors are e=
ncouraged
+  to use the bounding box values described above if this is an issue.&lt=
;/p>
+
+  <p class=3Dnote>A future version of the 2D context API may provi=
de a way to render fragments of
+  documents, rendered using CSS, straight to the canvas. This would be p=
rovided in preference to a
+  dedicated way of doing multiline layout.</p>
+
+
+
+  <h6 id=3Ddrawing-paths-to-the-canvas><span class=3Dsecno>4=
.12.4.2.13 </span>Drawing paths to the canvas</h6>
+
+  <p>The context always has a <dfn id=3Dcurrent-default-path&gt=
;current default path</dfn>. There is only one <a href=3D#curren=
t-default-path>current
+  default path</a>, it is not part of the <a href=3D#drawing-st=
ate>drawing state</a>. The <a href=3D#current-default-path&gt=
;current default
+  path</a> is a <a href=3D#concept-path title=3Dconcept-path&gt=
;path</a>, as described above.</p>
+
+  <dl class=3Ddomintro><dt><var title=3D"">c=
ontext</var> . <code title=3Ddom-context-2d-beginPath><a h=
ref=3D#dom-context-2d-beginpath>beginPath</a></code>()<=
/dt>
+
+   <dd>
+
+    <p>Resets the <a href=3D#current-default-path>current de=
fault path</a>.</p>
+
+   </dd>
+
+   <dt><var title=3D"">context</var> . <c=
ode title=3Ddom-context-2d-fill><a href=3D#dom-context-2d-fill>f=
ill</a></code>()</dt>
+   <dt><var title=3D"">context</var> . <c=
ode title=3Ddom-context-2d-fill><a href=3D#dom-context-2d-fill>f=
ill</a></code>(<var title=3D"">path</var&g=
t;)</dt>
+
+   <dd>
+
+    <p>Fills the subpaths of the <a href=3D#current-default-pat=
h>current default path</a> or the given path with the
+    current fill style.</p>
+
+   </dd>
+
+
+   <dt><var title=3D"">context</var> . <c=
ode title=3Ddom-context-2d-stroke><a href=3D#dom-context-2d-stroke&=
gt;stroke</a></code>()</dt>
+   <dt><var title=3D"">context</var> . <c=
ode title=3Ddom-context-2d-stroke><a href=3D#dom-context-2d-stroke&=
gt;stroke</a></code>(<var title=3D"">path<=
/var>)</dt>
+
+   <dd>
+
+    <p>Strokes the subpaths of the <a href=3D#current-default-p=
ath>current default path</a> or the given path with the
+    current stroke style.</p>
+
+   </dd>
+
+
+   <dt><var title=3D"">context</var> . <c=
ode title=3Ddom-context-2d-drawSystemFocusRing><a href=3D#dom-conte=
xt-2d-drawsystemfocusring>drawSystemFocusRing</a></code>(&=
lt;var title=3D"">element</var>)</dt>
+   <dt><var title=3D"">context</var> . <c=
ode title=3Ddom-context-2d-drawSystemFocusRing><a href=3D#dom-conte=
xt-2d-drawsystemfocusring>drawSystemFocusRing</a></code>(&=
lt;var title=3D"">path</var>, <var title=3D"&q=
uot;>element</var>)</dt>
+
+   <dd>
+
+    <p>If the given element is focused, draws a focus ring around =
the <a href=3D#current-default-path>current default
+    path</a> or the given path, following the platform conventions=
 for focus rings.</p>
+
+   </dd>
+
+
+   <dt><var title=3D"">shouldDraw</var> =3D =
<var title=3D"">context</var> . <code title=3Ddo=
m-context-2d-drawCustomFocusRing><a href=3D#dom-context-2d-drawcust=
omfocusring>drawCustomFocusRing</a></code>(<var title=3D=
"">element</var>)</dt>
+   <dt><var title=3D"">shouldDraw</var> =3D =
<var title=3D"">context</var> . <code title=3Ddo=
m-context-2d-drawCustomFocusRing><a href=3D#dom-context-2d-drawcust=
omfocusring>drawCustomFocusRing</a></code>(<var title=3D=
"">path</var>, <var title=3D"">element=
</var>)</dt>
+
+   <dd>
+
+    <p>If the given element is focused, and the user has configure=
d his system to draw focus rings
+    in a particular manner (for example, high contrast focus rings), dra=
ws a focus ring around the
+    <a href=3D#current-default-path>current default path</a>=
 or the given path and returns false.</p>
+
+    <p>Otherwise, returns true if the given element is focused, an=
d false otherwise. This can thus
+    be used to determine when to draw a focus ring (see <a href=3D#dr=
awCustomFocusRingExample>the
+    example</a> below).</p>
+
+   </dd>
+
+
+   <dt><var title=3D"">context</var> . <c=
ode title=3Ddom-context-2d-scrollPathIntoView><a href=3D#dom-contex=
t-2d-scrollpathintoview>scrollPathIntoView</a></code>()&lt=
;/dt>
+   <dt><var title=3D"">context</var> . <c=
ode title=3Ddom-context-2d-scrollPathIntoView><a href=3D#dom-contex=
t-2d-scrollpathintoview>scrollPathIntoView</a></code>(<=
var title=3D"">path</var>)</dt>
+
+   <dd>
+
+    <p>Scrolls the <a href=3D#current-default-path>current d=
efault path</a> or the given path into view. This is especially
+    useful on devices with small screens, where the whole canvas might n=
ot be visible at once.</p>
+
+   </dd>
+
+
+   <dt><var title=3D"">context</var> . <c=
ode title=3Ddom-context-2d-clip><a href=3D#dom-context-2d-clip>c=
lip</a></code>()</dt>
+   <dt><var title=3D"">context</var> . <c=
ode title=3Ddom-context-2d-clip><a href=3D#dom-context-2d-clip>c=
lip</a></code>(<var title=3D"">path</var&g=
t;)</dt>
+
+   <dd>
+
+    <p>Further constrains the clipping region to the <a href=3D=
#current-default-path>current default path</a> or the given
+    path.</p>
+
+   </dd>
+
+
+   <dt><var title=3D"">context</var> . <c=
ode title=3Ddom-context-2d-resetClip><a href=3D#dom-context-2d-rese=
tclip>resetClip</a></code>()</dt>
+
+   <dd>
+
+    <p>Unconstrains the clipping region.</p>
+
+   </dd>
+
+
+   <dt><var title=3D"">context</var> . <c=
ode title=3Ddom-context-2d-isPointInPath><a href=3D#dom-context-2d-=
ispointinpath>isPointInPath</a></code>(<var title=3D&qu=
ot;">x</var>, <var title=3D"">y</var>=
)</dt>
+   <dt><var title=3D"">context</var> . <c=
ode title=3Ddom-context-2d-isPointInPath><a href=3D#dom-context-2d-=
ispointinpath>isPointInPath</a></code>(<var title=3D&qu=
ot;">path</var>, <var title=3D"">x</var&=
gt;, <var title=3D"">y</var>)</dt>
+
+   <dd>
+
+    <p>Returns true if the given point is in the <a href=3D#cur=
rent-default-path>current default path</a> or the given
+    path.</p>
+
+   </dd>
+
+
+   <dt><var title=3D"">context</var> . <c=
ode title=3Ddom-context-2d-isPointInStroke><a href=3D#dom-context-2=
d-ispointinstroke>isPointInStroke</a></code>(<var title=
=3D"">x</var>, <var title=3D"">y</v=
ar>)</dt>
+   <dt><var title=3D"">context</var> . <c=
ode title=3Ddom-context-2d-isPointInStroke><a href=3D#dom-context-2=
d-ispointinstroke>isPointInStroke</a></code>(<var title=
=3D"">path</var>, <var title=3D"">x&lt=
;/var>, <var title=3D"">y</var>)</dt>
+
+   <dd>
+
+    <p>Returns true if the given point would be in the region cove=
red by the stroke of the
+    <a href=3D#current-default-path>current default path</a>=
 or the given path, given the current stroke style.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-context-2d-beginpath title=3Ddom-context=
-2d-beginPath><code>beginPath()</code></dfn> method =
must empty the
+  list of subpaths in the context's <a href=3D#current-default-path&g=
t;current default path</a> so that the it once again has
+  zero subpaths.</p>
+
+  <p>Where the following method definitions use the term <i>=
intended path</i>, it means the
+  <code><a href=3D#path>Path</a></code> argument=
, if one was provided, or the <a href=3D#current-default-path>curre=
nt default path</a>
+  otherwise.</p>
+
+  <p>When the intended path is a <code><a href=3D#path&gt=
;Path</a></code> object, the coordinates and lines of its sub=
paths
+  must be transformed according to the <code><a href=3D#canvasr=
enderingcontext2d>CanvasRenderingContext2D</a></code> obje=
ct's <a href=3D#transformations title=3Ddom-context-2d-transformation&=
gt;current transformation matrix</a> when used by these
+  methods (without affecting the <code><a href=3D#path>Path&=
lt;/a></code> object itself). When the intended path is the
+  <a href=3D#current-default-path>current default path</a>, =
it is not affected by the transform. (This is because
+  transformations already affect the <a href=3D#current-default-path&=
gt;current default path</a> when it is constructed, so
+  applying it when it is painted as well would result in a double transf=
ormation.)</p>
+
+  <p>The <dfn id=3Ddom-context-2d-fill title=3Ddom-context-2d-f=
ill><code>fill()</code></dfn> method must fill all t=
he
+  subpaths of the intended path, using <code title=3Ddom-context-2d-f=
illStyle><a href=3D#dom-context-2d-fillstyle>fillStyle</a>=
</code>, and
+  using the <a href=3D#fill-rule>fill rule</a> indicated by =
the <var title=3D"">fillRule</var> argument. Open
+  subpaths must be implicitly closed when being filled (without affectin=
g the actual subpaths).</p>
+
+  <p>The <dfn id=3Ddom-context-2d-stroke title=3Ddom-context-2d=
-stroke><code>stroke()</code></dfn> method must <=
a href=3D#trace-a-path title=3D"trace a path">trace</a&gt=
; the intended path, using the
+  <code><a href=3D#canvasrenderingcontext2d>CanvasRenderingC=
ontext2D</a></code> object for the line styles, and then fill=
 the resulting path
+  using the <code title=3Ddom-context-2d-strokeStyle><a href=3D=
#dom-context-2d-strokestyle>strokeStyle</a></code> attribu=
te, using the <a href=3D#dom-context-2d-fillrule-nonzero title=3Ddom-c=
ontext-2d-fillRule-nonzero>non-zero winding rule</a>.</p>
+
+  <p class=3Dnote>As a result of how the algorithm to <a href=3D=
#trace-a-path>trace a path</a> is defined,
+  overlapping parts of the paths in one stroke operation are treated as =
if their union was what was
+  painted.</p>
+
+  <p class=3Dnote>The stroke <em><a href=3D#the-style-ele=
ment>style</a></em> is affected by the transformation duri=
ng painting, even
+  if the intended path is the <a href=3D#current-default-path>curr=
ent default path</a>.</p>
+
+  <p>Paths, when filled or stroked, must be painted without affect=
ing the <a href=3D#current-default-path>current default
+  path</a> or any <code><a href=3D#path>Path</a>=
</code> objects, and must be subject to <a href=3D#shadows title=
=3Dshadows>shadow
+  effects</a>, <a href=3D#dom-context-2d-globalalpha title=3Ddo=
m-context-2d-globalAlpha>global alpha</a>, the <a href=3D#cli=
pping-region>clipping
+  region</a>, and <a href=3D#dom-context-2d-globalcompositeoper=
ation title=3Ddom-context-2d-globalCompositeOperation>global compositi=
on
+  operators</a>. (The effect of transformations is described above=
 and varies based on which path
+  is being used.)</p>
+
+  <p>Zero-length line segments must be pruned before stroking a pa=
th. Subpaths with just one point
+  must be ignored.</p>
+
+  <hr><p id=3Ddom-context-2d-drawosfocusring>The <dfn id=3D=
dom-context-2d-drawsystemfocusring title=3Ddom-context-2d-drawSystemFocus=
Ring><code>drawSystemFocusRing(<var title=3D"">e=
lement</var>)</code></dfn> method, when invoked, must r=
un the following steps:</p>
+
+  <ol><li><p>If <var title=3D"">elemen=
t</var> is not focused or is not a descendant of the element with
+   whose context the method is associated, then abort these steps.</l=
i>
+
+   <li>
+
+    <p>If the user has requested the use of particular focus rings=
 (e.g. high-contrast focus rings),
+    or if the <var title=3D"">element</var> would =
have a focus ring drawn around it, then draw a focus
+    ring of the appropriate style along the intended path, following pla=
tform conventions.</p>
+
+    <p class=3Dnote>Some platforms only draw focus rings around el=
ements that have been focused from
+    the keyboard, and not those focused from the mouse. Other platforms =
simply don't draw focus
+    rings around some elements at all unless relevant accessibility feat=
ures are enabled. This API
+    is intended to follow these conventions. User agents that implement =
distinctions based on the
+    manner in which the element was focused are encouraged to classify f=
ocus driven by the <code title=3Ddom-focus><a href=3D#dom-focus&=
gt;focus()</a></code> method based on the kind of user intera=
ction event from which
+    the call was triggered (if any).</p>
+
+    <p>The focus ring should not be subject to the <a href=3D#s=
hadows title=3Dshadows>shadow effects</a>, the
+    <a href=3D#dom-context-2d-globalalpha title=3Ddom-context-2d-glob=
alAlpha>global alpha</a>, the <a href=3D#dom-context-2d-globa=
lcompositeoperation title=3Ddom-context-2d-globalCompositeOperation>gl=
obal composition operators</a>, the <code title=3Ddom-context-2d=
-fillStyle><a href=3D#dom-context-2d-fillstyle>fillStyle</a&g=
t;</code> attribute, the <code title=3Ddom-context-2d-strokeStyl=
e><a href=3D#dom-context-2d-strokestyle>strokeStyle</a>&lt=
;/code> attribute, or any of the
+    <code><a href=3D#canvasdrawingstyles>CanvasDrawingStyles=
</a></code> members, but <em>should</em> be subje=
ct to the <a href=3D#clipping-region>clipping
+    region</a>. (The effect of transformations is described above =
and varies based on which path
+    is being used.)</p>
+
+   </li>
+
+   <li>
+
+    <p>Optionally, run the appropriate step from the following lis=
t:</p>
+
+    <dl><dt>If the <code><a href=3D#canvasrendering=
context2d>CanvasRenderingContext2D</a></code> object's &lt=
;a href=3D#concept-canvas-context-bitmap-mode title=3Dconcept-canvas-cont=
ext-bitmap-mode>context bitmap mode</a> is <a href=3D#concept=
-canvas-fixed title=3Dconcept-canvas-fixed>fixed</a></dt>
+
+     <dd><p><a href=3D#inform>Inform the user</a&gt=
; that the focus is at the location given by the
+     intended path. User agents may wait until the next time the <a h=
ref=3D#event-loop>event loop</a> reaches its
+     "update the rendering" step to optionally inform the user=
.</dd>
+
+     <dt>Otherwise</dt>
+
+     <dd><p>Add instructions to the <a href=3D#scratch-bi=
tmap>scratch bitmap</a>'s <a href=3D#list-of-pending-interfac=
e-actions>list of pending interface
+     actions</a> that <a href=3D#inform>inform the user</=
a> that the focus is at the location of
+     the bitmap given by the intended path.</dd>
+
+    </dl></li>
+
+  </ol><p>The <dfn id=3Ddom-context-2d-drawcustomfocusrin=
g title=3Ddom-context-2d-drawCustomFocusRing><code>drawCustomFoc=
usRing(<var title=3D"">element</var>)</code>&=
lt;/dfn> method, when invoked, must run the following steps:</p>
+
+  <ol><li><p>If <var title=3D"">elemen=
t</var> is not focused or is not a descendant of the element with
+   whose context the method is associated, then return false and abort t=
hese steps.</li>
+
+   <li><p>Let <var title=3D"">result</var=
> be true.</li>
+
+   <li>
+
+    <p>If the user has requested the use of particular focus rings=
 (e.g. high-contrast focus rings),
+    then draw a focus ring of the appropriate style along the intended p=
ath, and set <var title=3D"">result</var> to false.=
</p>
+
+    <p>The focus ring should not be subject to the <a href=3D#s=
hadows title=3Dshadows>shadow effects</a>, the
+    <a href=3D#dom-context-2d-globalalpha title=3Ddom-context-2d-glob=
alAlpha>global alpha</a>, the <a href=3D#dom-context-2d-globa=
lcompositeoperation title=3Ddom-context-2d-globalCompositeOperation>gl=
obal composition operators</a>, the <code title=3Ddom-context-2d=
-fillStyle><a href=3D#dom-context-2d-fillstyle>fillStyle</a&g=
t;</code> attribute, the <code title=3Ddom-context-2d-strokeStyl=
e><a href=3D#dom-context-2d-strokestyle>strokeStyle</a>&lt=
;/code> attribute, or any of the
+    <code><a href=3D#canvasdrawingstyles>CanvasDrawingStyles=
</a></code> members, but <em>should</em> be subje=
ct to the <a href=3D#clipping-region>clipping
+    region</a>. (The effect of transformations is described above =
and varies based on which path
+    is being used.)</p>
+
+   </li>
+
+   <li>
+
+    <p>Optionally, run the appropriate step from the following lis=
t:</p>
+
+    <dl><dt>If the <code><a href=3D#canvasrendering=
context2d>CanvasRenderingContext2D</a></code> object's &lt=
;a href=3D#concept-canvas-context-bitmap-mode title=3Dconcept-canvas-cont=
ext-bitmap-mode>context bitmap mode</a> is <a href=3D#concept=
-canvas-fixed title=3Dconcept-canvas-fixed>fixed</a></dt>
+
+     <dd><p><a href=3D#inform>Inform the user</a&gt=
; that the focus is at the location given by the
+     intended path. The user agent may wait until the next time the <=
a href=3D#event-loop>event loop</a> reaches
+     its "update the rendering" step to optionally inform the =
user.</dd>
+
+     <dt>Otherwise</dt>
+
+     <dd><p>Add instructions to the <a href=3D#scratch-bi=
tmap>scratch bitmap</a>'s <a href=3D#list-of-pending-interfac=
e-actions>list of pending interface
+     actions</a> that <a href=3D#inform>inform the user</=
a> that the focus is at the location of
+     the bitmap given by the intended path.</dd>
+
+    </dl></li>
+
+   <li><p>Return <var title=3D"">result</=
var>.</li>
+
+  </ol><p>User agents should not implicitly close open subpa=
ths in the intended path when drawing the
+  focus ring.</p>
+
+  <p class=3Dnote>This might be a moot point, however. For example=
, if the focus ring is drawn as an
+  axis-aligned bounding rectangle around the points in the intended path=
, then whether the subpaths
+  are closed or not has no effect. This specification intentionally does=
 not specify precisely how
+  focus rings are to be drawn: user agents are expected to honor their p=
latform's native
+  conventions.</p>
+
+  <hr><p>The <dfn id=3Ddom-context-2d-scrollpathintoview =
title=3Ddom-context-2d-scrollPathIntoView><code>scrollPathIntoVi=
ew()</code></dfn>
+  method, when invoked, if the <code><a href=3D#canvasrendering=
context2d>CanvasRenderingContext2D</a></code> object's &lt=
;a href=3D#concept-canvas-context-bitmap-mode title=3Dconcept-canvas-cont=
ext-bitmap-mode>context bitmap mode</a> is <a href=3D#concept=
-canvas-fixed title=3Dconcept-canvas-fixed>fixed</a>, must run t=
he following steps; and otherwise, must add
+  instructions to the <a href=3D#scratch-bitmap>scratch bitmap<=
/a>'s <a href=3D#list-of-pending-interface-actions>list of pendi=
ng interface actions</a>
+  that run the following steps:</p>
+
+  <ol><li><p>Let <var title=3D"">the s=
pecified rectangle</var> be the rectangle of the bounding box of
+   the intended path.</li>
+
+   <li><p>Let <var title=3D"">notional child=
</var> be a hypothetical element that is a rendered child
+   of the <code><a href=3D#the-canvas-element>canvas</a&g=
t;</code> element whose dimensions are those of <var title=3D&qu=
ot;">the specified
+   rectangle</var>.</li>
+
+   <li><p><a href=3D#scroll-an-element-into-view title=3D=
"scroll an element into view">Scroll <var title=3D"&=
quot;>notional child</var> into
+   view</a> with the <var title=3D"">align to top =
flag</var> set.</p>
+
+   <li><p>Optionally, <a href=3D#inform>inform the use=
r</a> that the caret or selection (or both)
+   cover <var title=3D"">the specified rectangle</var=
> of the canvas. If the
+   <code><a href=3D#canvasrenderingcontext2d>CanvasRendering=
Context2D</a></code> object's <a href=3D#concept-canvas-co=
ntext-bitmap-mode title=3Dconcept-canvas-context-bitmap-mode>context b=
itmap mode</a> was <a href=3D#concept-canvas-fixed title=3Dconce=
pt-canvas-fixed>fixed</a> when the method was invoked, the user =
agent may wait
+   until the next time the <a href=3D#event-loop>event loop</a&=
gt; reaches its "update the rendering" step to
+   optionally inform the user.</li>
+
+  </ol><p class=3Dnote id=3Dinform>"Inform the user&quo=
t;, as used in this section, could mean calling a
+  system accessibility API, which would notify assistive technologies su=
ch as magnification tools.
+  To properly drive magnification based on a focus change, a system acce=
ssibility API driving a
+  screen magnifier needs the bounds for the newly focused object. The me=
thods above are intended to
+  enable this by allowing the user agent to report the bounding box of t=
he path used to render the
+  focus ring as the bounds of the <var title=3D"">elemen=
t</var> element passed as an argument, if that
+  element is focused, and the bounding box of the area to which the user=
 agent is scrolling as the
+  bounding box of the current selection.</p>
+
+  <hr><p>The <dfn id=3Ddom-context-2d-clip title=3Ddom-co=
ntext-2d-clip><code>clip()</code></dfn> method must =
create a new
+  <dfn id=3Dclipping-region>clipping region</dfn> by calcula=
ting the intersection of the current clipping region and the
+  area described by the intended path, using the <a href=3D#fill-rule=
>fill rule</a> indicated by the <var title=3D"">=
fillRule</var> argument. Open subpaths must be implicitly closed wh=
en computing the
+  clipping region, without affecting the actual subpaths. The new clippi=
ng region replaces the
+  current clipping region.</p>
+
+  <p>When the context is initialized, the clipping region must be =
set to the largest infinite
+  surface (i.e. by default, no clipping occurs).</p>
+
+  <!-- v6
+   Jordan OSETE suggests:
+    * support ways of extending the clipping region (union instead of in=
tersection)
+       - also "add", "subtract", "replace"=
, "intersect" and "xor"
+       - maybe just support creating unions, intersections, and other -i=
ons of paths
+  -->
+
+  <p>The <dfn id=3Ddom-context-2d-resetclip title=3Ddom-context=
-2d-resetClip><code>resetClip()</code></dfn> method =
must create a
+  new <a href=3D#clipping-region>clipping region</a> that is=
 the largest infinite surface. The new clipping region
+  replaces the current clipping region.</p>
+
+  <hr><p>The <dfn id=3Ddom-context-2d-ispointinpath title=
=3Ddom-context-2d-isPointInPath><code>isPointInPath()</code&g=
t;</dfn> method must
+  return true if the point given by the <var title=3D"">=
x</var> and <var title=3D"">y</var> coordinat=
es
+  passed to the method, when treated as coordinates in the canvas coordi=
nate space unaffected by the
+  current transformation, is inside the intended path as determined by t=
he <a href=3D#fill-rule>fill rule</a>
+  indicated by the <var title=3D"">fillRule</var> =
argument; and must return false otherwise. Open
+  subpaths must be implicitly closed when computing the area inside the =
path, without affecting the
+  actual subpaths. Points on the path itself must be considered to be in=
side the path. If either of
+  the arguments is infinite or NaN, then the method must return false.&l=
t;/p>
+
+  <hr><p>The <dfn id=3Ddom-context-2d-ispointinstroke tit=
le=3Ddom-context-2d-isPointInStroke><code>isPointInStroke()</=
code></dfn> method
+  must return true if the point given by the <var title=3D"&quot=
;>x</var> and <var title=3D"">y</var>
+  coordinates passed to the method, when treated as coordinates in the c=
anvas coordinate space
+  unaffected by the current transformation, is inside the path that resu=
lts from <a href=3D#trace-a-path title=3D"trace
+  a path">tracing</a> the intended path, using the <a h=
ref=3D#dom-context-2d-fillrule-nonzero title=3Ddom-context-2d-fillRule-no=
nzero>non-zero winding rule</a>, and using the
+  <code><a href=3D#canvasrenderingcontext2d>CanvasRenderingC=
ontext2D</a></code> object for the line styles; and must retu=
rn false otherwise.
+  Points on the resulting path must be considered to be inside the path.=
 If either of the arguments
+  is infinite or NaN, then the method must return false.</p>
+
+  <hr></div>
+
+  <div class=3Dexample id=3DdrawCustomFocusRingExample>
+
+   <p>This <code><a href=3D#the-canvas-element>canvas&=
lt;/a></code> element has a couple of checkboxes. The path-relat=
ed commands are
+   highlighted:</p>
+
+   <pre><canvas height=3D400 width=3D750>
+ <label><input type=3Dcheckbox id=3DshowA> S=
how As</label>
+ <label><input type=3Dcheckbox id=3DshowB> S=
how Bs</label>
+ <!-- ... -->
+</canvas>
+<script>
+ function drawCheckbox(context, element, x, y, paint) {
+   context.save();
+   context.font =3D '10px sans-serif';
+   context.textAlign =3D 'left';
+   context.textBaseline =3D 'middle';
+   var metrics =3D context.measureText(element.labels[0].textContent);
+   if (paint) {
+<strong>     context.beginPath();
+     context.strokeStyle =3D 'black';
+     context.rect(x-5, y-5, 10, 10);
+     context.stroke();
+</strong>     if (element.checked) {
+<strong>       context.fillStyle =3D 'black';
+       context.fill();
+</strong>     }
+     context.fillText(element.labels[0].textContent, x+5, y);
+   }
+<strong>   context.beginPath();
+   context.rect(x-7, y-7, 12 + metrics.width+2, 14);
+   if (paint && context.drawCustomFocusRing(element)) {
+     context.strokeStyle =3D 'silver';
+     context.stroke();
+   }
+</strong>   context.restore();
+ }
+ function drawBase() { /* ... */ }
+ function drawAs() { /* ... */ }
+ function drawBs() { /* ... */ }
+ function redraw() {
+   var canvas =3D document.getElementsByTagName('canvas')[0];
+   var context =3D canvas.getContext('2d');
+   context.clearRect(0, 0, canvas.width, canvas.height);
+   drawCheckbox(context, document.getElementById('showA'), 20, 40, true)=
;
+   drawCheckbox(context, document.getElementById('showB'), 20, 60, true)=
;
+   drawBase();
+   if (document.getElementById('showA').checked)
+     drawAs();
+   if (document.getElementById('showB').checked)
+     drawBs();
+ }
+ function processClick(event) {
+   var canvas =3D document.getElementsByTagName('canvas')[0];
+   var context =3D canvas.getContext('2d');
+   var x =3D event.clientX;
+   var y =3D event.clientY;
+   var node =3D event.target;
+   while (node) {
+     x -=3D node.offsetLeft - node.scrollLeft;
+     y -=3D node.offsetTop - node.scrollTop;
+     node =3D node.offsetParent;
+   }
+   drawCheckbox(context, document.getElementById('showA'), 20, 40, false=
);
+   if (<strong>context.isPointInPath(x, y)</strong>)
+     document.getElementById('showA').checked =3D !(document.getElementB=
yId('showA').checked);
+   drawCheckbox(context, document.getElementById('showB'), 20, 60, false=
);
+   if (<strong>context.isPointInPath(x, y)</strong>)
+     document.getElementById('showB').checked =3D !(document.getElementB=
yId('showB').checked);
+   redraw();
+ }
+ document.getElementsByTagName('canvas')[0].addEventListener('focus', re=
draw, true);
+ document.getElementsByTagName('canvas')[0].addEventListener('blur', red=
raw, true);
+ document.getElementsByTagName('canvas')[0].addEventListener('change', r=
edraw, true);
+ document.getElementsByTagName('canvas')[0].addEventListener('click', pr=
ocessClick, false);
+ redraw();
+</script></pre>
+<!-- http://software.hixie.ch/utilities/js/live-dom-viewer/saved/340 =
-->
+
+  </div>
+
+
+
+  <h6 id=3Ddrawing-images><span class=3Dsecno>4.12.4.2.14 &l=
t;/span>Drawing images</h6>
+
+  <p>To draw images, the <dfn id=3Ddom-context-2d-drawimage tit=
le=3Ddom-context-2d-drawImage><code>drawImage</code></d=
fn> method
+  can be used.</p>
+
+  <div class=3Dimpl>
+
+  <p>This method can be invoked with three different sets of argum=
ents:</p>
+
+  <ul class=3Dbrief><li><code title=3D"">dra=
wImage(<var title=3D"">image</var>, <var title=3D=
"">dx</var>, <var title=3D"">dy</va=
r>)</code>
+   <li><code title=3D"">drawImage(<var title=3D=
"">image</var>, <var title=3D"">dx<=
/var>, <var title=3D"">dy</var>, <var title=3D=
"">dw</var>, <var title=3D"">dh</va=
r>)</code>
+   <li><code title=3D"">drawImage(<var title=3D=
"">image</var>, <var title=3D"">sx<=
/var>, <var title=3D"">sy</var>, <var title=3D=
"">sw</var>, <var title=3D"">sh</va=
r>, <var title=3D"">dx</var>, <var title=3D&q=
uot;">dy</var>, <var title=3D"">dw</var&=
gt;, <var title=3D"">dh</var>)</code>
+  </ul></div>
+
+  <dl class=3Ddomintro><dt><var title=3D"">c=
ontext</var> . <code title=3Ddom-context-2d-drawImage><a h=
ref=3D#dom-context-2d-drawimage>drawImage</a></code>(<v=
ar title=3D"">image</var>, <var title=3D"&quot=
;>dx</var>, <var title=3D"">dy</var>)</=
dt>
+   <dt><var title=3D"">context</var> . <c=
ode title=3Ddom-context-2d-drawImage><a href=3D#dom-context-2d-draw=
image>drawImage</a></code>(<var title=3D""&gt=
;image</var>, <var title=3D"">dx</var>, <v=
ar title=3D"">dy</var>, <var title=3D""&g=
t;dw</var>, <var title=3D"">dh</var>)</dt&=
gt;
+   <dt><var title=3D"">context</var> . <c=
ode title=3Ddom-context-2d-drawImage><a href=3D#dom-context-2d-draw=
image>drawImage</a></code>(<var title=3D""&gt=
;image</var>, <var title=3D"">sx</var>, <v=
ar title=3D"">sy</var>, <var title=3D""&g=
t;sw</var>, <var title=3D"">sh</var>, <var=
 title=3D"">dx</var>, <var title=3D"">=
dy</var>, <var title=3D"">dw</var>, <var t=
itle=3D"">dh</var>)</dt>
+
+   <dd>
+
+    <p>Draws the given image onto the canvas. The arguments are
+    interpreted as follows:</p>
+
+    <p><img src=3Dhttp://images.whatwg.org/drawImage.png width=3D=
356 alt=3D"The sx and sy parameters give the x and y coordinates of =
the source rectangle; the sw and sh arguments give the width and height o=
f the source rectangle; the dx and dy give the x and y coordinates of the=
 destination rectangle; and the dw and dh arguments give the width and he=
ight of the destination rectangle." height=3D356></p>
+
+    <p>If the image isn't yet fully decoded, then nothing is drawn=
. If the image is a canvas with no
+    data, throws an <code><a href=3D#invalidstateerror>Inval=
idStateError</a></code> exception.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>When the <code title=3Ddom-context-2d-drawImage><a h=
ref=3D#dom-context-2d-drawimage>drawImage()</a></code> met=
hod is invoked, the user
+  agent must run the following steps:</p>
+
+  <ol><li><p><a href=3D#check-the-usability-of-the-=
image-argument>Check the usability of the <var title=3D""=
>image</var> argument</a>. If this
+   returns <i>aborted</i>, then an exception has been thrown=
 and the method doesn't return anything;
+   abort these steps. If it returns <i>bad</i>, then abort t=
hese steps without drawing anything.
+   Otherwise it returns <i>good</i>; continue with these ste=
ps.</li>
+
+   <li>
+
+    <p>Establish the source and destination rectangles as follows:=
</p>
+
+    <p>If not specified, the <var title=3D"">dw&lt=
;/var> and <var title=3D"">dh</var> arguments mu=
st
+    default to the values of <var title=3D"">sw</var&=
gt; and <var title=3D"">sh</var>, interpreted such
+    that one CSS pixel in the image is treated as one unit in the <a =
href=3D#scratch-bitmap>scratch bitmap</a>'s
+    coordinate space. If the <var title=3D"">sx</var&=
gt;, <var title=3D"">sy</var>, <var title=3D&quo=
t;">sw</var>,
+    and <var title=3D"">sh</var> arguments are omi=
tted, they must default to 0, 0, the image's
+    intrinsic width in image pixels, and the image's intrinsic height in=
 image pixels, respectively.
+    If the image has no intrinsic dimensions, the <i>concrete obje=
ct size</i> must be used instead,
+    as determined using the CSS "<a href=3Dhttp://dev.w3.org/css=
wg/css3-images/#default-sizing>Concrete Object Size Resolution</a&g=
t;"
+    algorithm, with the <i>specified size</i> having neither=
 a definite width nor height, nor any
+    additional contraints, the object's intrinsic properties being those=
 of the <var title=3D"">image</var> argument, and t=
he <i><a href=3D#default-object-size>default object size</=
a></i> being the size of the
+    <a href=3D#scratch-bitmap>scratch bitmap</a>. <a href=
=3D#refsCSSIMAGES>[CSSIMAGES]</a></p>
+
+    <p>The source rectangle is the rectangle whose corners are the=
 four points (<var title=3D"">sx</var>, <var tit=
le=3D"">sy</var>), (<span title=3D"">&=
lt;var title=3D"">sx</var>+<var title=3D"&quot=
;>sw</var></span>, <var title=3D"">sy</=
var>), (<span title=3D""><var title=3D""&=
gt;sx</var>+<var title=3D"">sw</var></span=
>, <span title=3D""><var title=3D"">sy=
</var>+<var title=3D"">sh</var></span>)=
,
+    (<var title=3D"">sx</var>, <span title=3D&q=
uot;"><var title=3D"">sy</var>+<var titl=
e=3D"">sh</var></span>).</p>
+
+    <p>The destination rectangle is the rectangle whose corners ar=
e the four points (<var title=3D"">dx</var>, <va=
r title=3D"">dy</var>), (<span title=3D""=
><var title=3D"">dx</var>+<var title=3D"=
">dw</var></span>, <var title=3D"">dy=
</var>), (<span title=3D""><var title=3D"&q=
uot;>dx</var>+<var title=3D"">dw</var><=
/span>, <span title=3D""><var title=3D""&=
gt;dy</var>+<var title=3D"">dh</var></span=
>),
+    (<var title=3D"">dx</var>, <span title=3D&q=
uot;"><var title=3D"">dy</var>+<var titl=
e=3D"">dh</var></span>).</p>
+
+    <p>When the source rectangle is outside the source image, the =
source rectangle must be clipped
+    to the source image and the destination rectangle must be clipped in=
 the same proportion.</p>
+
+    <p class=3Dnote>When the destination rectangle is outside the =
destination image (the
+    <a href=3D#scratch-bitmap>scratch bitmap</a>), the pixel=
s that land outside the <a href=3D#scratch-bitmap>scratch bitmap&lt=
;/a> are
+    discarded, as if the destination was an infinite canvas whose render=
ing was clipped to the
+    dimensions of the <a href=3D#scratch-bitmap>scratch bitmap<=
/a>.</p>
+
+   </li>
+
+   <li><p>If one of the <var title=3D"">sw&l=
t;/var> or <var title=3D"">sh</var> arguments is=
 zero, abort
+   these steps. Nothing is painted.</li>
+
+   <li>
+
+    <p>Paint the region of the <var title=3D"">ima=
ge</var> argument specified by the source rectangle
+    on the region of the rendering context's <a href=3D#scratch-bitma=
p>scratch bitmap</a> specified by the
+    destination rectangle, after applying the <a href=3D#transformati=
ons title=3Ddom-context-2d-transformation>current
+    transformation matrix</a> to the destination rectangle.</p&=
gt;
+
+    <p>The image data must be processed in the original direction,=
 even if the dimensions given are
+    negative. <!-- note: that last sentence has several times been ne=
eded to correct people who
+    suggested that 5,5,-2,-2 was different than 3,3,2,2 --></p>
+
+    <p>When scaling up, if the <code title=3Ddom-context-2d-ima=
geSmoothingEnabled><a href=3D#dom-context-2d-imagesmoothingenabled&=
gt;imageSmoothingEnabled</a></code>
+    attribute is set to true, the user agent should attempt to apply a s=
moothing algorithm to
+    the image data when it is scaled. Otherwise, the image must be rende=
red using nearest-neighbor
+    interpolation.</p>
+
+    <p class=3Dnote>This specification does not define the precise=
 algorithm to use when scaling an
+    image down, or when scaling an image up when the <code title=3Ddo=
m-context-2d-imageSmoothingEnabled><a href=3D#dom-context-2d-images=
moothingenabled>imageSmoothingEnabled</a></code>
+    attribute is set to true.</p>
+
+    <p class=3Dnote>When a <code><a href=3D#the-canvas-el=
ement>canvas</a></code> or <code><a href=3D#canva=
srenderingcontext2d>CanvasRenderingContext2D</a></code> ob=
ject is
+    drawn onto itself, the <a href=3D#drawing-model>drawing model&=
lt;/a> requires the source to be copied before the
+    image is drawn, so it is possible to copy parts of a <code>&lt=
;a href=3D#the-canvas-element>canvas</a></code> or <a h=
ref=3D#scratch-bitmap>scratch
+    bitmap</a> onto overlapping parts of itself.</p>
+
+    <p>If the original image data is a bitmap image, the value pai=
nted at a point in the destination
+    rectangle is computed by filtering the original image data. The user=
 agent may use any filtering
+    algorithm (for example bilinear interpolation or nearest-neighbor). =
When the filtering algorithm
+    requires a pixel value from outside the original image data, it must=
 instead use the value from
+    the nearest edge pixel. (That is, the filter uses 'clamp-to-edge' be=
havior.) When the filtering
+    algorithm requires a pixel value from outside the source rectangle b=
ut inside the original image
+    data, then the value from the original image data must be used.</=
p>
+    <!-- see CORE-32111 and:
+         http://krijnhoetmer.nl/irc-logs/whatwg/20100818#l-737
+         http://www.w3.org/Bugs/Public/show_bug.cgi?id=3D10799#c11
+    -->
+    <!-- createPattern() has a similar paragraph with different rules=
 -->
+
+    <p class=3Dnote>Thus, scaling an image in parts or in whole wi=
ll have the same effect. This does
+    mean that when sprites coming from a single sprite sheet are to be s=
caled, adjacent images in
+    the sprite sheet can interfere. This can be avoided by ensuring each=
 sprite in the sheet is
+    surrounded by a border of transparent black, or by copying sprites t=
o be scaled into temporary
+    <code><a href=3D#the-canvas-element>canvas</a><=
/code> elements and drawing the scaled sprites from there.</p>
+
+    <p>Images are painted without affecting the current path, and =
are subject to <a href=3D#shadows title=3Dshadows>shadow effects&lt=
;/a>, <a href=3D#dom-context-2d-globalalpha title=3Ddom-context-2d-=
globalAlpha>global
+    alpha</a>, the <a href=3D#clipping-region>clipping regio=
n</a>, and <a href=3D#dom-context-2d-globalcompositeoperation ti=
tle=3Ddom-context-2d-globalCompositeOperation>global composition opera=
tors</a>.</p>
+
+   </li>
+
+<!--ADD-TOPIC:Security-->
+   <li><p>If <a href=3D#the-image-argument-is-not-origin-=
clean>the <var title=3D"">image argument</var> i=
s not origin-clean</a>, set the
+   <a href=3D#scratch-bitmap>scratch bitmap</a>'s <a href=
=3D#concept-canvas-origin-clean title=3Dconcept-canvas-origin-clean>or=
igin-clean</a> flag
+   to false.</li>
+<!--REMOVE-TOPIC:Security-->
+
+  </ol></div>
+
+
+  <h6 id=3Dhit-regions><span class=3Dsecno>4.12.4.2.15 </=
span>Hit regions</h6>
+
+  <p>A <dfn id=3Dhit-region-list>hit region list</dfn>=
 is a list of <a href=3D#hit-region title=3D"hit region">=
hit regions</a> for a
+  bitmap.</p>
+
+  <p>Each <dfn id=3Dhit-region>hit region</dfn> consis=
ts of the following information:</p>
+
+  <ul><li><p>A <dfn id=3D"hit-region's-set-of-=
pixels" title=3D"hit region's set of pixels">set of pix=
els</dfn> on the bitmap for which this
+   region is responsible.</li>
+
+   <li><p>A <dfn id=3D"hit-region's-bounding-circumf=
erence" title=3D"hit region's bounding circumference">b=
ounding circumference</dfn> on the
+   bitmap that surrounds the <a href=3D"#hit-region's-set-of-pix=
els">hit region's set of pixels</a> as they stood when it w=
as
+   created.</li>
+
+   <li><p>Optionally, a non-empty string representing an &lt=
;dfn id=3D"hit-region's-id" title=3D"hit region's ID"=
>ID</dfn> for
+   distinguishing the region from others.</li> <!-- cannot be t=
he empty string -->
+
+   <li><p>Optionally, a reference to another region that act=
s as the <dfn id=3D"hit-region's-parent" title=3D"hit r=
egion's
+   parent">parent</dfn> for this one.</li>
+
+   <li><p>A count of regions that have this one as their &lt=
;a href=3D"#hit-region's-parent" title=3D"hit region's
+   parent">parent</a>, known as the <dfn id=3D"hit=
-region's-child-count">hit region's child count</dfn>.</=
li>
+
+   <li><p>A <dfn id=3D"hit-region's-cursor-specifica=
tion" title=3D"hit region's cursor specification">curso=
r specification</dfn>, in the form
+   of either a CSS cursor value, or the string "<code title=3D&q=
uot;">inherit</code>" meaning that the
+   cursor of the <a href=3D"#hit-region's-parent">hit re=
gion's parent</a>, if any, or of the <code><a href=3D#the-=
canvas-element>canvas</a></code> element, if
+   not, is to be used instead.</li>
+
+   <li>
+
+    <p>Optionally, either a <a href=3D"#hit-region's-contr=
ol" title=3D"hit region's control">control</a>, o=
r an <a href=3D"#hit-region's-unbacked-region-description" t=
itle=3D"hit region's unbacked region description">unbacked r=
egion description</a>.</p>
+
+    <p>A <dfn id=3D"hit-region's-control" title=3D&qu=
ot;hit region's control">control</dfn> is just a reference =
to an
+    <code><a href=3D#element>Element</a></code> =
node, to which, in certain conditions, the user agent will route events,
+    and from which the user agent will determine the state of the hit re=
gion for the purposes of
+    accessibility tools. (The control is ignored when it is not a descen=
dant of the
+    <code><a href=3D#the-canvas-element>canvas</a><=
/code> element.)</p>
+
+    <p>An <dfn id=3D"hit-region's-unbacked-region-descript=
ion" title=3D"hit region's unbacked region description"&gt=
;unbacked region description</dfn>
+    consists of the following:</p>
+
+    <ul class=3Dbrief><li><p>Optionally, a <dfn id=3D=
"hit-region's-label" title=3D"hit region's label">=
label</dfn>.</p>
+
+     <li><p>An <dfn id=3D"hit-region's-aria-role&quo=
t; title=3D"hit region's ARIA role">ARIA role</dfn>, w=
hich, if the <a href=3D"#hit-region's-unbacked-region-description=
" title=3D"hit
+     region's unbacked region description">unbacked region descr=
iption</a> also has a label,
+     could be the empty string.</li>
+
+    </ul></li>
+
+  </ul><dl class=3Ddomintro><dt><var title=3D"=
">context</var> . <code title=3Ddom-context-2d-addHitReg=
ion><a href=3D#dom-context-2d-addhitregion>addHitRegion</a&gt=
;</code>(<var title=3D"">options</var>)</d=
t>
+
+   <dd>
+
+    <p>Adds a hit region to the bitmap. The argument is an object =
with the following members:</p>
+
+    <dl><dt><code title=3Ddom-HitRegionOptions-path>pa=
th</code> (default null)
+
+     <dd>A <code><a href=3D#path>Path</a></co=
de> object that describes the pixels that form part of the region. If =
this
+     member is not provided or is set to null, the <a href=3D#current=
-default-path>current default path</a> is used
+     instead.</dd>
+
+     <dt><code title=3Ddom-HitRegionOptions-fillRule>fillRul=
e</code> (default "<code title=3Ddom-context-2d-fillRule-no=
nzero><a href=3D#dom-context-2d-fillrule-nonzero>nonzero</a&g=
t;</code>")
+
+     <dd>The <a href=3D#fill-rule>fill rule</a> to use=
 when determining which pixels are inside the path.</dd>
+
+<!--
+     <dt><code title=3D"dom-HitRegionOptions-transform&quo=
t;>transform</code> (default null)
+
+     <dd>An <code>SVGMatrix</code> object that describ=
es a
+     transformation to apply to the path described by the <code
+     title=3D"dom-HitRegionOptions-path">path</code> =
member.</dd>
+-->
+
+     <dt><code title=3Ddom-HitRegionOptions-id>id</code&g=
t; (default empty string) <!-- empty string is treated as null interna=
lly -->
+
+     <dd>The ID to use for this region. This is used in <code&g=
t;<a href=3D#mouseevent>MouseEvent</a></code> events on=
 the
+     <code><a href=3D#the-canvas-element>canvas</a>&lt=
;/code> (<code title=3Ddom-MouseEvent-region><a href=3D#dom-m=
ouseevent-region>event.region</a></code>) and as a way to
+     reference this region in later calls to <code title=3Ddom-contex=
t-2d-addHitRegion><a href=3D#dom-context-2d-addhitregion>addHitR=
egion()</a></code>.</dd>
+
+     <dt><code title=3Ddom-HitRegionOptions-parentID>parentI=
D</code> (default null)
+
+     <dd>The ID of the parent region, for purposes of navigation b=
y accessibility tools and for
+     cursor fallback.</dd>
+
+     <dt><code title=3Ddom-HitRegionOptions-cursor>cursor&lt=
;/code> (default "<code title=3D"">inherit</co=
de>")
+
+     <dd>The cursor to use when the mouse is over this region. The=
 value "<code title=3D"">inherit</code>" =
means to use the cursor for the parent region (as specified by the
+     <code title=3Ddom-HitRegionOptions-parentID>parentID</code=
> member), if any, or to use the
+     <code><a href=3D#the-canvas-element>canvas</a>&lt=
;/code> element's cursor if the region has no parent.</dd>
+
+     <dt><code title=3Ddom-HitRegionOptions-control>control&=
lt;/code> (default null)
+
+     <dd>An element (that is a descendant of the <code><a=
 href=3D#the-canvas-element>canvas</a></code>) to which ev=
ents are to be
+     routed, and which accessibility tools are to use as a surrogate for=
 describing and interacting
+     with this region.</dd>
+
+     <dt><code title=3Ddom-HitRegionOptions-label>label</=
code> (default null)
+
+     <dd>A text label for accessibility tools to use as a descript=
ion of this region, if there is no
+     control.</dd>
+
+     <dt><code title=3Ddom-HitRegionOptions-role>role</co=
de> (default null)
+
+     <dd>An ARIA role for accessibility tools to use to determine =
how to represent this region, if
+     there is no control.</dd>
+
+    </dl><p>Hit regions can be used for a variety of purpose=
s:</p>
+
+    <ul><li>With an ID, they can make hit detection easier b=
y having the user agent check which region
+     the mouse is over and include the ID in the mouse events.</li&gt=
;
+
+     <li>With a control, they can make routing events to DOM eleme=
nts automatic, allowing e.g.
+     clicks on a <code><a href=3D#the-canvas-element>canvas&=
lt;/a></code> to automatically submit a form via a <code>&=
lt;a href=3D#the-button-element>button</a></code>
+     element.</li>
+
+     <li>With a label, they can make it easier for users to explor=
e a <code><a href=3D#the-canvas-element>canvas</a></=
code> without
+     seeing it, e.g. by touch on a mobile device.</li>
+
+     <li>With a cursor, they can make it easier for different regi=
ons of the <code><a href=3D#the-canvas-element>canvas</a&g=
t;</code> to
+     have different cursors, with the user agent automatically switching=
 between them.</li>
+
+    </ul></dd>
+
+   <dt><var title=3D"">context</var> . <c=
ode title=3Ddom-context-2d-removeHitRegion><a href=3D#dom-context-2=
d-removehitregion>removeHitRegion</a></code>(<var title=
=3D"">id</var>)</dt>
+
+   <dd>
+
+    <p>Removes a hit region (and all its descendants) from the can=
vas bitmap. The argument is the ID
+    of a region added using <code title=3Ddom-context-2d-addHitRegion=
><a href=3D#dom-context-2d-addhitregion>addHitRegion()</a>=
</code>.</p>
+
+    <p>The pixels that were covered by this region and its descend=
ants are effectively cleared by
+    this operation, leaving the regions non-interactive. In particular, =
regions that occupied the
+    same pixels before the removed regions were added, overlapping them,=
 do not resume their
+    previous role.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>A <a href=3D#hit-region>hit region</a> <var ti=
tle=3D"">A</var> is an <dfn id=3Dancestor-region&gt=
;ancestor region</dfn> of a <a href=3D#hit-region>hit
+  region</a> <var title=3D"">B</var> if <=
var title=3D"">B</var> has a <a href=3D"#hit-r=
egion's-parent" title=3D"hit region's
+  parent">parent</a> and its <a href=3D"#hit-regio=
n's-parent" title=3D"hit region's parent">parent</a&=
gt; is either <var title=3D"">A</var> or another &l=
t;a href=3D#hit-region>hit region</a> for which <var title=3D=
"">A</var> is an
+  <a href=3D#ancestor-region>ancestor region</a>.</p>
+
+  <p><dfn id=3Dthe-region-identified-by-the-id>The region id=
entified by the ID</dfn> <var title=3D"">ID</var=
> in a bitmap <var title=3D"">bitmap</var> is th=
e value returned by the following algorithm (which can return a
+  <a href=3D#hit-region>hit region</a> or nothing):</p&gt=
;
+
+  <ol><li><p>If <var title=3D"">ID<=
/var> is null, return nothing and abort these steps.</li> <!-=
-
+   this step is redundant but makes sure people don't confuse 'null' for=
 'not having an ID' -->
+
+   <li><p>Let <var title=3D"">list</var&g=
t; be the <a href=3D#hit-region-list>hit region list</a> asso=
ciated with <var title=3D"">bitmap</var>.</li&gt=
;
+
+   <li><p>If there is a <a href=3D#hit-region>hit regi=
on</a> in <var title=3D"">list</var> whose &l=
t;a href=3D"#hit-region's-id" title=3D"hit
+   region's ID">ID</a> is a <a href=3D#case-sensitive&g=
t;case-sensitive</a> match for <var title=3D"">ID&l=
t;/var>, then
+   return that <a href=3D#hit-region>hit region</a> and abor=
t these steps.</li>
+
+   <li><p>Otherwise, return nothing.</li>
+
+  </ol><p><dfn id=3Dthe-region-representing-the-control&g=
t;The region representing the control</dfn> <var title=3D"&=
quot;>control</var> for a bitmap <var title=3D""&gt=
;bitmap</var> is the value returned by the following algorithm (whi=
ch can return a
+  <a href=3D#hit-region>hit region</a> or nothing):</p&gt=
;
+
+  <ol><li><p>Let <var title=3D"">list&=
lt;/var> be the <a href=3D#hit-region-list>hit region list</a=
> associated with <var title=3D"">bitmap</var>.&=
lt;/li>
+
+   <li><p>If there is a <a href=3D#hit-region>hit regi=
on</a> in <var title=3D"">list</var> whose &l=
t;a href=3D"#hit-region's-control" title=3D"hit
+   region's control">control</a> is <var title=3D"=
">control</var>, then return that <a href=3D#hit-region&=
gt;hit
+   region</a> and abort these steps.</li>
+
+   <li><p>Otherwise, return nothing.</li>
+
+  </ol><p><dfn id=3Dthe-control-represented-by-a-region&g=
t;The control represented by a region</dfn> <var title=3D"&=
quot;>region</var> for a
+  <code><a href=3D#the-canvas-element>canvas</a></c=
ode> element <var title=3D"">ancestor</var> is t=
he value returned by the following
+  algorithm (which can return an element or nothing):</p>
+
+  <ol><li><p>If <var title=3D"">region=
</var> has no <a href=3D"#hit-region's-control" title=3D=
"hit region's control">control</a>,
+   return nothing and abort these steps.</li>
+
+   <li><p>Let <var title=3D"">control</va=
r> be <var title=3D"">region</var>'s <a href=3D=
"#hit-region's-control" title=3D"hit region's
+   control">control</a>.</li>
+
+   <li><p>If <var title=3D"">control</var=
> is not a descendant of <var title=3D"">ancestor</=
var>, then
+   return nothing and abort these steps.</li>
+
+   <li><p>Otherwise, return <var title=3D"">=
control</var>.</li>
+
+  </ol><p><dfn id=3Dthe-cursor-for-a-hit-region>The cu=
rsor for a hit region</dfn> <var title=3D"">region&=
lt;/var> of a <code><a href=3D#the-canvas-element>canvas&l=
t;/a></code>
+  element <var title=3D"">ancestor</var> is the va=
lue returned by the following algorithm:</p>
+
+  <ol><li><p><i>Loop</i>: If <var title=
=3D"">region</var> has a <a href=3D"#hit-regio=
n's-cursor-specification" title=3D"hit region's cursor
+   specification">cursor specification</a> other than &quo=
t;<code title=3D"">inherit</code>", then
+   return that <a href=3D"#hit-region's-cursor-specification&quo=
t;>hit region's cursor specification</a> and abort these steps.&=
lt;/li>
+
+   <li><p>If <var title=3D"">region</var&=
gt; has a <a href=3D"#hit-region's-parent" title=3D"hit=
 region's parent">parent</a>, then
+   let <var title=3D"">region</var> be that <a =
href=3D"#hit-region's-parent">hit region's parent</a>,=
 and return to the step
+   labeled <i>loop</i>.</li>
+
+   <li><p>Otherwise, return the used value of the 'cursor' p=
roperty for the <code><a href=3D#the-canvas-element>canvas&lt=
;/a></code>
+   element, if any; if there isn't one, return 'auto'. <a href=3D#ref=
sCSSUI>[CSSUI]</a></li>
+
+  </ol><p><dfn id=3Dthe-region-for-a-pixel>The region =
for a pixel</dfn> <var title=3D"">pixel</var>=
 on a bitmap <var title=3D"">bitmap</var> is the va=
lue returned by the following algorithm (which can return a
+  <a href=3D#hit-region>hit region</a> or nothing):</p&gt=
;
+
+  <ol><li><p>Let <var title=3D"">list&=
lt;/var> be the <a href=3D#hit-region-list>hit region list</a=
> associated with <var title=3D"">bitmap</var>.&=
lt;/li>
+
+   <li><p>If there is a <a href=3D#hit-region>hit regi=
on</a> in <var title=3D"">list</var> whose &l=
t;a href=3D"#hit-region's-set-of-pixels" title=3D"hit
+   region's set of pixels">set of pixels</a> contains <=
var title=3D"">pixel</var>, then return that
+   <a href=3D#hit-region>hit region</a> and abort these step=
s.</li>
+
+   <li><p>Otherwise, return nothing.</li>
+
+  </ol><p>To <dfn id=3Dclear-regions-that-cover-the-pixel=
s>clear regions that cover the pixels</dfn> <var title=3D&quo=
t;">pixels</var> on a bitmap <var title=3D""&g=
t;bitmap</var>, the user agent must run the following steps:</p&=
gt;
+
+  <ol><li><p>Let <var title=3D"">list&=
lt;/var> be the <a href=3D#hit-region-list>hit region list</a=
> associated with <var title=3D"">bitmap</var>.&=
lt;/li>
+
+   <li><p>Remove all pixels in <var title=3D""&=
gt;pixels</var> from the <a href=3D"#hit-region's-set-of-pi=
xels" title=3D"hit region's set of
+   pixels">set of pixels</a> of each <a href=3D#hit-reg=
ion>hit region</a> in <var title=3D"">list</v=
ar>.</li>
+
+   <li><p><a href=3D#garbage-collect-the-regions>Garba=
ge-collect the regions</a> of <var title=3D"">bitma=
p</var>.</li>
+
+  </ol><p>To <dfn id=3Dgarbage-collect-the-regions>gar=
bage-collect the regions</dfn> of a bitmap <var title=3D"&q=
uot;>bitmap</var>, the user
+  agent must run the following steps:</p>
+
+  <ol><li><p>Let <var title=3D"">list&=
lt;/var> be the <a href=3D#hit-region-list>hit region list</a=
> associated with <var title=3D"">bitmap</var>.&=
lt;/li>
+
+   <li><p><i>Loop</i>: Let <var title=3D&quot=
;">victim</var> be the first <a href=3D#hit-region>hi=
t region</a> in <var title=3D"">list</var> to=
 have an empty <a href=3D"#hit-region's-set-of-pixels" title=
=3D"hit region's set of pixels">set of
+   pixels</a> and a zero <a href=3D"#hit-region's-child-co=
unt" title=3D"hit region's child count">child count<=
/a>, if any. If
+   there is no such <a href=3D#hit-region>hit region</a>, ab=
ort these steps.</li>
+
+   <li><p>If <var title=3D"">victim</var&=
gt; has a <a href=3D"#hit-region's-parent" title=3D"hit=
 region's parent">parent</a>, then
+   decrement that <a href=3D"#hit-region's-child-count">=
hit region's child count</a> by one.</li>
+
+   <li><p>Remove <var title=3D"">victim</=
var> from <var title=3D"">list</var>.</li>
+
+   <li><p>Jump back to the step labeled <i>loop</i&=
gt;.</li>
+
+  </ol><p class=3Dnote>Adding a new region and calling <c=
ode title=3Ddom-context-2d-clearRect><a href=3D#dom-context-2d-clea=
rrect>clearRect()</a></code> are the two ways this clearin=
g algorithm can
+  be invoked. The <a href=3D#hit-region-list>hit region list</a=
> itself is also reset when the rendering context is
+  reset, e.g. when a <code><a href=3D#canvasrenderingcontext2d&=
gt;CanvasRenderingContext2D</a></code> object is bound to or =
unbound from a
+  <code><a href=3D#the-canvas-element>canvas</a></c=
ode>, or when the dimensions of the bitmap are changed.</p>
+
+  <hr><p>When the <dfn id=3Ddom-context-2d-addhitregion t=
itle=3Ddom-context-2d-addHitRegion><code>addHitRegion()</code=
></dfn> method is
+  invoked, the user agent must run the following steps:</p>
+
+  <ol><li><p>Let <var title=3D"">argum=
ents</var> be the dictionary object provided as the method's
+   argument.</li>
+
+   <li><p>If the <var title=3D"">arguments&l=
t;/var> object's <code title=3Ddom-HitRegionOptions-path>path&lt=
;/code> member is not null, let <var title=3D"">source
+   path</var> be the <code title=3Ddom-HitRegionOptions-path&gt=
;path</code> member's value. Otherwise,
+   let it be the <code><a href=3D#canvasrenderingcontext2d>C=
anvasRenderingContext2D</a></code> object's <a href=3D#cur=
rent-default-path>current default
+   path</a>.</li>
+
+<!--
+   <li><p>If the <var title=3D"">arguments&l=
t;/var> object's <code
+   title=3D"dom-HitRegionOptions-path">path</code> me=
mber is null, but the <code
+   title=3D"dom-HitRegionOptions-transform">transform</c=
ode> member is not, then throw a
+   <code>NotSupportedError</code> exception and abort these =
steps.</p></li>
+
+   <li><p>Transform all the coordinates and lines in <var=
 title=3D"">source path</var> by the
+   transform matrix given by the <var title=3D"">argumen=
ts</var> object's <code
+   title=3D"dom-HitRegionOptions-transform">transform</c=
ode> member, if it is not null.</p></li>
+-->
+
+   <li><p>Transform all the coordinates and lines in <var=
 title=3D"">source path</var> by the current
+   transform matrix, if the <var title=3D"">arguments&lt=
;/var> object's <code title=3Ddom-HitRegionOptions-path>path<=
/code> member is not null.</li>
+
+   <li><p>Let <var title=3D"">specified pixe=
ls</var> be the pixels contained in <var title=3D""&gt=
;source
+   path</var>, using the <a href=3D#fill-rule>fill rule</=
a> indicated by the <code title=3Ddom-HitRegionOptions-fillRule>=
fillRule</code> member.</li>
+
+   <li><p>If the <var title=3D"">arguments&l=
t;/var> object's <code title=3Ddom-HitRegionOptions-id>id</co=
de> member is the empty string, let it be null
+   instead.</li>
+
+   <li><p>If the <var title=3D"">arguments&l=
t;/var> object's <code title=3Ddom-HitRegionOptions-id>id</co=
de> member is not null, then let <var title=3D"">previ=
ous
+   region for this ID</var> be <a href=3D#the-region-identified=
-by-the-id>the region identified by the ID</a> given by the <=
code title=3Ddom-HitRegionOptions-id>id</code> member's value in=
 this <a href=3D#scratch-bitmap>scratch bitmap</a>, if
+   any. If the <code title=3Ddom-HitRegionOptions-id>id</code&g=
t; member is null or no such region
+   currently exists, let <var title=3D"">previous region=
 for this ID</var> be null.</li>
+
+   <li><p>If the <var title=3D"">arguments&l=
t;/var> object's <code title=3Ddom-HitRegionOptions-parent>paren=
t</code> member is the empty string, let it be null
+   instead.</li>
+
+   <li><p>If the <var title=3D"">arguments&l=
t;/var> object's <code title=3Ddom-HitRegionOptions-parent>paren=
t</code> member is not null, then let <var title=3D""&=
gt;parent region</var> be <a href=3D#the-region-identified-by-th=
e-id>the region identified by the ID</a> given by the <code t=
itle=3Ddom-HitRegionOptions-parent>parent</code> member's value =
in the <a href=3D#scratch-bitmap>scratch
+   bitmap</a>, if any. If the <code title=3Ddom-HitRegionOption=
s-parent>parent</code> member is
+   null or no such region currently exists, let <var title=3D"&q=
uot;>parent region</var> be null.</li>
+
+   <li><p>If the <var title=3D"">arguments&l=
t;/var> object's <code title=3Ddom-HitRegionOptions-label>label&=
lt;/code> member is the empty string, let it be null
+   instead.</li>
+
+   <li>
+
+    <p>If any of the following conditions are met, throw a <cod=
e><a href=3D#notsupportederror>NotSupportedError</a></c=
ode> exception
+    and abort these steps.</p>
+
+    <ul class=3Dbrief><!--
+     <li>The <var title=3D"">arguments</var>=
 object's <code
+     title=3D"dom-HitRegionOptions-path">path</code> =
member is null, but its <code
+     title=3D"dom-HitRegionOptions-transform">transform<=
/code> member is not.</li>
+--><li>The <var title=3D"">arguments</var&gt=
; object's <code title=3Ddom-HitRegionOptions-control>control</c=
ode> and <code title=3Ddom-HitRegionOptions-label>label</code=
> members are both non-null.</li>
+
+     <li>The <var title=3D"">arguments</var>=
 object's <code title=3Ddom-HitRegionOptions-control>control</co=
de> and <code title=3Ddom-HitRegionOptions-role>role</code&gt=
; members are both non-null.</li>
+
+     <li>The <var title=3D"">arguments</var>=
 object's <code title=3Ddom-HitRegionOptions-role>role</code>=
 member's value is the empty string, and the <code title=3Ddom-HitRegi=
onOptions-label>label</code> member's value is either null or th=
e empty
+     string.</li>
+
+     <li>The <var title=3D"">specified pixels</=
var> has no pixels.</li>
+
+     <li>The <var title=3D"">arguments</var>=
 object's <code title=3Ddom-HitRegionOptions-control>control</co=
de> member is not null but is neither an
+     <code><a href=3D#the-a-element>a</a></code>=
 element that <a href=3D#represents>represents</a> a <a hr=
ef=3D#hyperlink>hyperlink</a>, a
+     <code><a href=3D#the-button-element>button</a>&lt=
;/code> element, an <code><a href=3D#the-input-element>inp=
ut</a></code> element whose <code title=3Dattr-input-type&=
gt;<a href=3D#attr-input-type>type</a></code> attribute=
 is in one of the <a href=3D"#checkbox-state-(type=3Dcheckbox)&qu=
ot; title=3Dattr-input-type-checkbox>Checkbox</a> or <a href=3D=
"#radio-button-state-(type=3Dradio)" title=3Dattr-input-type-ra=
dio>Radio
+     Button</a> states, nor an <code><a href=3D#the-input=
-element>input</a></code> element that is a <a href=3D#=
concept-button title=3Dconcept-button>button</a>.</li>
+
+     <li>The <var title=3D"">parent region</var=
> is not null but has a <a href=3D"#hit-region's-control"=
 title=3D"hit region's
+     control">control</a>.</li>
+
+     <li>The <var title=3D"">previous region for t=
his ID</var> is the same <a href=3D#hit-region>hit region<=
/a> as
+     the <var title=3D"">parent region</var>.</=
li>
+
+     <li>The <var title=3D"">previous region for t=
his ID</var> is an <a href=3D#ancestor-region>ancestor region=
</a> of
+     the <var title=3D"">parent region</var>.</=
li>
+
+    </ul></li>
+
+   <li><p>If the <code title=3Ddom-HitRegionOptions-paren=
t>parent</code> member is not null but <var title=3D"&qu=
ot;>parent region</var> is null, then throw a <code><a =
href=3D#notfounderror>NotFoundError</a></code> exception a=
nd abort
+   these steps.</li>
+
+   <li>
+
+    <p>If any of the following conditions are met, throw a <cod=
e><a href=3D#syntaxerror>SyntaxError</a></code> exce=
ption and
+    abort these steps.</p>
+
+    <ul class=3Dbrief><li>The <var title=3D""&g=
t;arguments</var> object's <code title=3Ddom-HitRegionOptions-cu=
rsor>cursor</code> member is not null but is neither an
+     <a href=3D#ascii-case-insensitive>ASCII case-insensitive</=
a> match for the string "<code title=3D"">inherit=
</code>", nor a
+     valid CSS 'cursor' property value. <a href=3D#refsCSSUI>[CSSU=
I]</a></li>
+
+     <li>The <var title=3D"">arguments</var>=
 object's <code title=3Ddom-HitRegionOptions-role>role</code>=
 member is not null but its value is not an
+     <a href=3D#ordered-set-of-unique-space-separated-tokens>order=
ed set of unique space-separated tokens</a> whose tokens are all
+     <a href=3D#case-sensitive>case-sensitive</a> matches fo=
r names of non-abstract WAI-ARIA roles. <a href=3D#refsARIA>[ARIA]&=
lt;/a></li>
+
+    </ul></li>
+
+   <li>
+
+    <p>Let <var title=3D"">region</var> be a=
 newly created <a href=3D#hit-region>hit region</a>, with its
+    information configured as follows:</p>
+
+    <dl><dt><a href=3D"#hit-region's-set-of-pixels&q=
uot;>Hit region's set of pixels</a>
+
+     <dd><p>The <var title=3D"">specified pi=
xels</var>
+
+
+     <dt><a href=3D"#hit-region's-bounding-circumference&q=
uot;>Hit region's bounding circumference</a>
+
+     <dd><p>A user-agent-defined shape that wraps the pixels=
 contained in <var title=3D"">source
+     path</var>. (In the simplest case, this can just be the bound=
ing rectangle; this specification
+     allows it to be any shape in order to allow other interfaces.)
+
+
+     <dt><a href=3D"#hit-region's-id">Hit region's=
 ID</a>
+
+     <dd><p>If the <var title=3D"">arguments=
</var> object's <code title=3Ddom-HitRegionOptions-id>id</=
code> member is not null: the value of the <code title=3Ddom-HitReg=
ionOptions-id>id</code> member. Otherwise, <var title=3D&quot=
;">region</var> has no
+     <a href=3D"#hit-region's-id" title=3D"hit region'=
s id">id</a>.
+
+
+     <dt><a href=3D"#hit-region's-parent">Hit regi=
on's parent</a>
+
+     <dd><p>If <var title=3D"">parent region=
</var> is not null: <var title=3D"">parent region&l=
t;/var>.
+     Otherwise, <var title=3D"">region</var> has n=
o <a href=3D"#hit-region's-parent" title=3D"hit region'=
s parent">parent</a>.
+
+
+     <dt><a href=3D"#hit-region's-child-count">Hit=
 region's child count</a>
+
+     <dd><p>Initially zero.
+
+
+     <dt><a href=3D"#hit-region's-cursor-specification&quo=
t;>Hit region's cursor specification</a>
+
+     <dd><p>If <var title=3D"">parent region=
</var> is not null: <var title=3D"">parent region&l=
t;/var>.
+     Otherwise, <var title=3D"">region</var> has n=
o <a href=3D"#hit-region's-parent" title=3D"hit region'=
s parent">parent</a>.
+
+
+     <dt><a href=3D"#hit-region's-control">Hit reg=
ion's control</a>
+
+     <dd><p>If the <var title=3D"">arguments=
</var> object's <code title=3Ddom-HitRegionOptions-control>co=
ntrol</code> member is not null: the value of the <code title=3D=
dom-HitRegionOptions-control>control</code> member. Otherwise, &=
lt;var title=3D"">region</var> has no <a href=3D&qu=
ot;#hit-region's-control" title=3D"hit region's control"&g=
t;control</a>.
+
+
+     <dt><a href=3D"#hit-region's-label">Hit regio=
n's label</a>
+
+     <dd><p>If the <var title=3D"">arguments=
</var> object's <code title=3Ddom-HitRegionOptions-label>labe=
l</code> member is not null: the value of the <code title=3Ddom-=
HitRegionOptions-label>label</code> member. Otherwise, <var t=
itle=3D"">region</var>
+     has no <a href=3D"#hit-region's-label" title=3D"h=
it region's label">label</a>.
+
+
+     <dt><a href=3D"#hit-region's-aria-role">Hit r=
egion's ARIA role</a>
+
+     <dd><p>If the <var title=3D"">arguments=
</var> object's <code title=3Ddom-HitRegionOptions-role>role&=
lt;/code> member is not null: the value of the <code title=3Ddom-Hi=
tRegionOptions-role>role</code> member (which might be the empty=
 string).
+     Otherwise, if the <var title=3D"">arguments</var=
> object's <code title=3Ddom-HitRegionOptions-label>label</co=
de> member is not null: the empty string.
+     Otherwise, <var title=3D"">region</var> has n=
o <a href=3D"#hit-region's-aria-role" title=3D"hit regi=
on's ARIA role">ARIA
+     role</a>.
+
+
+    </dl></li>
+
+   <li>
+
+    <p>If the <var title=3D"">arguments</var&gt=
; object's <code title=3Ddom-HitRegionOptions-cursor>cursor</cod=
e> member is not null, then act as if a CSS rule
+    for the <code><a href=3D#the-canvas-element>canvas</a=
></code> element setting its 'cursor' property had been seen, wh=
ose value was
+    the <a href=3D"#hit-region's-cursor-specification">h=
it region's cursor specification</a>.</p>
+
+    <p class=3Dnote>For example, if the user agent prefetches curs=
or values, this would cause that
+    to happen in response to an appropriately-formed <code title=3Ddo=
m-context-2d-addHitRegion><a href=3D#dom-context-2d-addhitregion&gt=
;addHitRegion()</a></code> call.</p>
+
+   </li>
+
+   <li><p>If the <var title=3D"">arguments&l=
t;/var> object's <code title=3Ddom-HitRegionOptions-control>cont=
rol</code> member is not null, then let <var title=3D"&quot=
;>previous region for the control</var> be <a href=3D#the-reg=
ion-representing-the-control>the region representing the
+   control</a> given by the <code title=3Ddom-HitRegionOptions-=
control>control</code> member's
+   value for this <a href=3D#scratch-bitmap>scratch bitmap</a&g=
t;, if any. If the <code title=3Ddom-HitRegionOptions-control>contr=
ol</code> member is null or no such region currently
+   exists, let <var title=3D"">previous region for the c=
ontrol</var> be null.</li>
+
+   <!-- the parent region can't have a control, because no region wit=
h a control can be a parent -
+   we check for that above. Thus, it is safe to remove the previous regi=
on for the control without
+   worrying that our parent is going to be affected.
+
+   It's also safe to remove the previous region with this ID and all its=
 descendants, as we know
+   that our parent isn't part of that subtree. -->
+
+   <li><p>If there is a <var title=3D"">prev=
ious region with this control</var>, remove it from the
+   <a href=3D#scratch-bitmap>scratch bitmap</a>'s <a href=
=3D#hit-region-list>hit region list</a>; then, if it had a <a=
 href=3D"#hit-region's-parent" title=3D"hit
+   region's parent">parent</a> region, decrement that <=
a href=3D"#hit-region's-child-count">hit region's child coun=
t</a> by
+   one.</li> <!-- we garbage collect the regions below -->
+
+   <li><p>If there is a <var title=3D"">prev=
ious region with this ID</var>, remove it, and all <a href=3D#hi=
t-region title=3D"hit region">hit regions</a> for whic=
h it is an <a href=3D#ancestor-region>ancestor region</a>, fr=
om the
+   <a href=3D#scratch-bitmap>scratch bitmap</a>'s <a href=
=3D#hit-region-list>hit region list</a>; then, if it had a <a=
 href=3D"#hit-region's-parent" title=3D"hit
+   region's parent">parent</a> region, decrement that <=
a href=3D"#hit-region's-child-count">hit region's child coun=
t</a> by
+   one.</li> <!-- we garbage collect the regions below -->
+
+   <li><p>If there is a <var title=3D"">pare=
nt region</var>, increment its <a href=3D"#hit-region's-chi=
ld-count">hit region's child
+   count</a> by one.</li>
+
+   <li><p><a href=3D#clear-regions-that-cover-the-pixels&=
gt;Clear regions that cover the pixels</a> in <var title=3D&quot=
;">region</var>'s <a href=3D"#hit-region's-set-of-p=
ixels" title=3D"hit region's set of pixels">set of pixe=
ls</a> on this <a href=3D#scratch-bitmap>scratch
+   bitmap</a>.</li> <!-- this is what garbage collects th=
e earlier regions -->
+
+   <li><p>Add <var title=3D"">region</var=
> to the <a href=3D#scratch-bitmap>scratch bitmap</a>'s el=
ement's <a href=3D#hit-region-list>hit
+   region list</a>.</li>
+
+  </ol><p>When the <dfn id=3Ddom-context-2d-removehitregi=
on title=3Ddom-context-2d-removeHitRegion><code>removeHitRegion(=
)</code></dfn>
+  method is invoked, the user agent must run the following steps:</p&=
gt;
+
+  <ol><li>
+
+    <p>Let <var title=3D"">region</var> be &=
lt;a href=3D#the-region-identified-by-the-id>the region identified by =
the ID</a> given by the
+    method's argument in the rendering context's <a href=3D#scratch-b=
itmap>scratch bitmap</a>. If no such region
+    currently exists, abort these steps.</p>
+
+    <p class=3Dnote>If the method's argument is the empty string, =
then no region will match.</p>
+
+   </li>
+
+   <li><p>Remove <var title=3D"">region</=
var>, and all <a href=3D#hit-region title=3D"hit region"&=
gt;hit regions</a> for
+   which it is an <a href=3D#ancestor-region>ancestor region</a=
>, from the rendering context's <a href=3D#scratch-bitmap>scratc=
h
+   bitmap</a>'s <a href=3D#hit-region-list>hit region list&l=
t;/a>; then, if it had a <a href=3D"#hit-region's-parent"=
 title=3D"hit region's
+   parent">parent</a> region, decrement that <a href=3D=
"#hit-region's-child-count">hit region's child count</a&g=
t; by
+   one.</li> <!-- we garbage collect the regions below -->
+
+   <li><p><a href=3D#garbage-collect-the-regions>Garba=
ge-collect the regions</a> of the rendering context's <a href=3D=
#scratch-bitmap>scratch
+   bitmap</a>.</li>
+
+  </ol></div>
+
+  <hr><p>The <code><a href=3D#mouseevent>MouseEv=
ent</a></code> interface is extended to support hit
+  regions:</p>
+
+  <pre class=3Didl>partial interface <a href=3D#mouseevent id=3D=
MouseEvent-partial>MouseEvent</a> {
+  readonly attribute DOMString? <a href=3D#dom-mouseevent-region titl=
e=3Ddom-MouseEvent-region>region</a>;
+};
+
+partial dictionary <a href=3D#mouseeventinit>MouseEventInit</a&=
gt; {
+  DOMString? region;
+};</pre>
+
+  <dl class=3Ddomintro><dt><var title=3D"">e=
vent</var> . <code title=3Ddom-MouseEvent-region><a href=3D=
#dom-mouseevent-region>region</a></code></dt>
+
+   <dd>
+
+    <p>If the mouse was over a <a href=3D#hit-region>hit reg=
ion</a>, then this returns the <a href=3D"#hit-region's-id&=
quot;>hit region's ID</a>, if it has one.</p>
+
+    <p>Otherwise, returns null.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-mouseevent-region title=3Ddom-MouseEvent=
-region><code>region</code></dfn> attribute on
+  <code><a href=3D#mouseevent>MouseEvent</a></code&=
gt; objects must return the value it was initialized to. When the object =
is
+  created, this attribute must be initialized to null. It represents the=
 <a href=3D"#hit-region's-id">hit region's
+  ID</a> if the mouse was over a hit region when the event was fir=
ed.</p>
+
+  <p>When a <code><a href=3D#mouseevent>MouseEvent<=
/a></code> is to be fired at a <code><a href=3D#the-can=
vas-element>canvas</a></code> element by the user
+  agent in response to a pointing device action, if the <code><=
a href=3D#the-canvas-element>canvas</a></code> element has=
 a <a href=3D#hit-region-list>hit
+  region list</a>, the user agent must instead follow these steps.=
 If these steps say to <i>act
+  as normal</i>, that means that the event must be fired as it wou=
ld have had these requirements not
+  been applied.</p>
+
+  <ol><li><p>If the pointing device is not indicating =
a pixel on the <code><a href=3D#the-canvas-element>canvas<=
/a></code>, act as normal
+   and abort these steps.</li>
+
+   <li><p>Let <var title=3D"">pixel</var&=
gt; be the pixel indicated by the pointing device.</li>
+
+   <li><p>Let <var title=3D"">region</var=
> be the <a href=3D#hit-region>hit region</a> that is <=
a href=3D#the-region-for-a-pixel title=3D"the
+   region for a pixel">the region for the pixel</a> <va=
r title=3D"">pixel</var> on this
+   <code><a href=3D#the-canvas-element>canvas</a></=
code> element's bitmap, if any.</li>
+
+   <li><p>If there is no <var title=3D"">reg=
ion</var>, then act as normal and abort these
+   steps.</li>
+
+   <li><p>Let <var title=3D"">id</var>=
 be the <var title=3D"">region</var>'s <a href=3D=
"#hit-region's-id" title=3D"hit region's
+   ID">ID</a>, if any.</li>
+
+   <li><p>If there is an <var title=3D"">id&=
lt;/var>, then initialize the event object's <code title=3Ddom-Mous=
eEvent-region><a href=3D#dom-mouseevent-region>region</a>&=
lt;/code> attribute to <var title=3D"">id</var>.=
</li>
+
+   <li><p>Let <var title=3D"">control</va=
r> be the <a href=3D#the-control-represented-by-a-region title=3D&q=
uot;the control represented by a
+   region">control represented by</a> <var title=3D&quo=
t;">region</var> for this <code><a href=3D#the-can=
vas-element>canvas</a></code>
+   element, if any.</li>
+
+   <li><p>If there is a <var title=3D"">cont=
rol</var>, then target the event object at <var title=3D"&q=
uot;>control</var> instead of the <code><a href=3D#the-=
canvas-element>canvas</a></code> element.</li>
+
+   <li><p>Continue dispatching the event, but with the updat=
ed event object and target as given in
+   the above steps.</li>
+
+  </ol><hr><p>When a user's pointing device cursor is =
positioned over a <code><a href=3D#the-canvas-element>canvas&=
lt;/a></code> element, user
+  agents should render the pointing device cursor according to the curso=
r specification described by
+  <a href=3D#the-cursor-for-a-hit-region title=3D"the cursor for=
 a hit region">the cursor for the hit region</a> that is &l=
t;a href=3D#the-region-for-a-pixel title=3D"the region for a pixel&q=
uot;>the region for the pixel</a> that the pointing device desig=
nates
+  on the <code><a href=3D#the-canvas-element>canvas</a&gt=
;</code> element's bitmap.</p>
+
+  <hr><p>User agents are encouraged to make use of the infor=
mation present in a <code><a href=3D#the-canvas-element>canva=
s</a></code>
+  element's <a href=3D#hit-region-list>hit region list</a> t=
o improve the accessibility of <code><a href=3D#the-canvas-eleme=
nt>canvas</a></code>
+  elements.</p>
+
+  <p>Each <a href=3D#hit-region>hit region</a> should =
be handled in a fashion equivalent to a node in a virtual
+  DOM tree rooted at the <code><a href=3D#the-canvas-element&gt=
;canvas</a></code> element. The hierarchy of this virtual DOM=
 tree must
+  match the hierarchy of the <a href=3D#hit-region title=3D"hit =
region">hit regions</a>, as described by the <a href=3D&=
quot;#hit-region's-parent" title=3D"hit region's parent"&g=
t;parent</a> of each region. Regions without a <a href=3D"#=
hit-region's-parent" title=3D"hit
+  region's parent">parent</a> must be treated as children =
of the <code><a href=3D#the-canvas-element>canvas</a>&l=
t;/code> element for
+  the purpose of this virtual DOM tree. For each node in such a DOM tree=
, the <a href=3D"#hit-region's-bounding-circumference">hi=
t region's
+  bounding circumference</a> gives the region of the screen to use=
 when representing the node (if
+  appropriate).</p>
+
+  <p>The semantics of a <a href=3D#hit-region>hit region<=
/a> for the purposes of this virtual DOM tree are those
+  of the <a href=3D#the-control-represented-by-a-region title=3D&quot=
;the control represented by a region">the control represented by =
the
+  region</a>, if it has one, or else of a non-interactive element =
whose ARIA role, if any, is
+  that given by the <a href=3D"#hit-region's-aria-role">=
hit region's ARIA role</a>, and whose textual representation, if an=
y,
+  is given by the <a href=3D"#hit-region's-label">hit re=
gion's label</a>.</p>
+
+  <p>For the purposes of accessibility tools, when an element <=
var title=3D"">C</var> is a descendant
+  of a <code><a href=3D#the-canvas-element>canvas</a>&=
lt;/code> element and there is <a href=3D#the-region-representing-t=
he-control title=3D"the region representing the control">a
+  region representing the control</a> <var title=3D""=
>C</var> for that <code><a href=3D#the-canvas-element&g=
t;canvas</a></code>
+  element's bitmap, then the element's position relative to the document=
 should be presented as if
+  it was that region in the <code><a href=3D#the-canvas-element=
>canvas</a></code> element's virtual DOM tree.</p>
+
+  <p>The semantics of a <a href=3D#hit-region>hit region<=
/a> for the purposes of this virtual DOM tree are those
+  of the <a href=3D#the-control-represented-by-a-region title=3D&quot=
;the control represented by a region">the control represented by =
the
+  region</a>, if it has one, or else of a non-interactive element =
whose ARIA role, if any, is
+  that given by the <a href=3D"#hit-region's-aria-role">=
hit region's ARIA role</a>, and whose textual representation, if an=
y,
+  is given by the <a href=3D"#hit-region's-label">hit re=
gion's label</a>.</p>
+
+  <p class=3Dnote>Thus, for instance, a user agent on a touch-scre=
en device could provide haptic
+  feedback when the user croses over a <a href=3D"#hit-region's-=
bounding-circumference">hit region's bounding circumference</a=
>, and then
+  read the <a href=3D"#hit-region's-label">hit region's =
label</a> to the user. Similarly, a desktop user agent with a
+  virtual accessibility focus separate from the keyboard input focus cou=
ld allow the user to
+  navigate through the hit regions, using the virtual DOM tree described=
 above to enable
+  hierarchical navigation. When an interactive control inside the <co=
de><a href=3D#the-canvas-element>canvas</a></code> e=
lement is
+  focused, if the control has a corresponding region, then that <a hr=
ef=3D"#hit-region's-bounding-circumference">hit region's bou=
nding
+  circumference</a> could be used to determine what area of the di=
splay to magnify.</p>
+
+  </div>
+
+
+  <h6 id=3Dpixel-manipulation><span class=3Dsecno>4.12.4.2.1=
6 </span><dfn>Pixel manipulation</dfn></h6>
+
+  <dl class=3Ddomintro><dt><var title=3D"">i=
magedata</var> =3D <var title=3D"">context</var&=
gt; . <code title=3Ddom-context-2d-createImageData><a href=3D#do=
m-context-2d-createimagedata>createImageData</a></code>(&l=
t;var title=3D"">sw</var>, <var title=3D"&quot=
;>sh</var>)</dt>
+
+   <dd>
+
+    <p>Returns an <code><a href=3D#imagedata>ImageData=
</a></code> object with the given dimensions. All the pixels =
in the
+    returned object are transparent black.</p>
+
+    <p>Throws an <code><a href=3D#indexsizeerror>Index=
SizeError</a></code> exception if the either of the width or =
height
+    arguments are zero.</p>
+
+   </dd>
+
+   <dt><var title=3D"">imagedata</var> =3D &=
lt;var title=3D"">context</var> . <code title=3Ddom=
-context-2d-createImageData><a href=3D#dom-context-2d-createimageda=
ta>createImageData</a></code>(<var title=3D""=
>imagedata</var>)</dt>
+
+   <dd>
+
+    <p>Returns an <code><a href=3D#imagedata>ImageData=
</a></code> object with the same dimensions as the argument. =
All the
+    pixels in the returned object are transparent black.</p>
+
+   </dd>
+
+   <dt><var title=3D"">imagedata</var> =3D &=
lt;var title=3D"">context</var> . <code title=3Ddom=
-context-2d-createImageDataHD><a href=3D#dom-context-2d-createimage=
datahd>createImageDataHD</a></code>(<var title=3D"=
">sw</var>, <var title=3D"">sh</var>)=
</dt>
+
+   <dd>
+
+    <p>Returns an <code><a href=3D#imagedata>ImageData=
</a></code> object whose dimensions equal the dimensions give=
n in the
+    arguments, multiplied by the number of pixels in the canvas bitmap t=
hat correspond to each
+    coordinate space unit. All the pixels in the returned object are tra=
nsparent black.</p>
+
+    <p>Throws an <code><a href=3D#indexsizeerror>Index=
SizeError</a></code> exception if the either of the width or =
height
+    arguments are zero.</p>
+
+   </dd>
+
+   <dt><var title=3D"">imagedata</var> =3D &=
lt;var title=3D"">context</var> . <code title=3Ddom=
-context-2d-getImageData><a href=3D#dom-context-2d-getimagedata>=
getImageData</a></code>(<var title=3D"">sx&lt=
;/var>, <var title=3D"">sy</var>, <var title=3D=
"">sw</var>, <var title=3D"">sh</va=
r>)</dt>
+
+   <dd>
+
+    <p>Returns an <code><a href=3D#imagedata>ImageData=
</a></code> object containing the image data for the given re=
ctangle of
+    the bitmap.</p>
+
+    <p>Throws an <code><a href=3D#indexsizeerror>Index=
SizeError</a></code> exception if the either of the width or =
height
+    arguments are zero.</p>
+
+    <p>The data will be returned with one pixel of image data for =
each coordinate space unit on the
+    canvas (ignoring transforms).</p>
+
+   </dd>
+
+   <dt><var title=3D"">imagedata</var> =3D &=
lt;var title=3D"">context</var> . <code title=3Ddom=
-context-2d-getImageDataHD><a href=3D#dom-context-2d-getimagedatahd=
>getImageDataHD</a></code>(<var title=3D""&gt=
;sx</var>, <var title=3D"">sy</var>, <var =
title=3D"">sw</var>, <var title=3D"">s=
h</var>)</dt>
+
+   <dd>
+
+    <p>Returns an <code><a href=3D#imagedata>ImageData=
</a></code> object containing the image data for the given re=
ctangle of
+    the bitmap.</p>
+
+    <p>Throws an <code><a href=3D#indexsizeerror>Index=
SizeError</a></code> exception if the either of the width or =
height
+    arguments are zero.</p>
+
+    <p>The data will be returned at the same resolution as the can=
vas bitmap.</p>
+
+   </dd>
+
+   <dt><var title=3D"">imagedata</var> . &lt=
;code title=3Ddom-imagedata-width><a href=3D#dom-imagedata-width&gt=
;width</a></code></dt>
+   <dt><var title=3D"">imagedata</var> . &lt=
;code title=3Ddom-imagedata-height><a href=3D#dom-imagedata-height&=
gt;height</a></code></dt>
+
+   <dd>
+
+    <p>Returns the actual dimensions of the data in the <code&g=
t;<a href=3D#imagedata>ImageData</a></code> object, in =
pixels.
+    For objects returned by the non-HD variants of the methods in this A=
PI, this will correspond to
+    the dimensions given to the methods. For the HD variants, the number=
 of pixels might be
+    different than the number of corresponding coordinate space units.&l=
t;/p>
+
+   </dd>
+
+   <dt><var title=3D"">imagedata</var> . &lt=
;code title=3Ddom-imagedata-resolution><a href=3D#dom-imagedata-res=
olution>resolution</a></code></dt>
+
+   <dd>
+
+    <p>Returns the theoretical number of pixels in the <code&gt=
;<a href=3D#imagedata>ImageData</a></code> object's dat=
a per
+    corresponding coordinate space unit. This value is automatically det=
ermined from the source
+    image when the <code><a href=3D#imagedata>ImageData</=
a></code> object is created. It is only used to ensure that
+    <code><a href=3D#imagebitmap>ImageBitmap</a></c=
ode> objects have the right pixel density when generated from
+    <code><a href=3D#imagedata>ImageData</a></code&=
gt; objects.</p>
+
+   </dd>
+
+   <dt><var title=3D"">imagedata</var> . &lt=
;code title=3Ddom-imagedata-data><a href=3D#dom-imagedata-data>d=
ata</a></code></dt>
+
+   <dd>
+
+    <p>Returns the one-dimensional array containing the data in RG=
BA order, as integers in the range
+    0 to 255.</p>
+
+   </dd>
+
+   <dt><var title=3D"">context</var> . <c=
ode title=3Ddom-context-2d-putImageData><a href=3D#dom-context-2d-p=
utimagedata>putImageData</a></code>(<var title=3D"=
">imagedata</var>, <var title=3D"">dx</v=
ar>, <var title=3D"">dy</var> [, <var title=3D=
"">dirtyX</var>, <var title=3D"">dirty=
Y</var>, <var title=3D"">dirtyWidth</var>, &l=
t;var title=3D"">dirtyHeight</var> ])</dt>
+
+   <dd>
+
+    <p>Paints the data from the given <code><a href=3D#im=
agedata>ImageData</a></code> object onto the bitmap. If a =
dirty
+    rectangle is provided, only the pixels from that rectangle are paint=
ed.</p>
+
+    <p>The <code title=3Ddom-context-2d-globalAlpha><a hr=
ef=3D#dom-context-2d-globalalpha>globalAlpha</a></code> an=
d <code title=3Ddom-context-2d-globalCompositeOperation><a href=3D=
#dom-context-2d-globalcompositeoperation>globalCompositeOperation</=
a></code> attributes, as
+    well as the shadow attributes, are ignored for the purposes of this =
method call; pixels in the
+    canvas are replaced wholesale, with no composition, alpha blending, =
no shadows, etc.</p>
+
+    <p>Throws a <code><a href=3D#notsupportederror>Not=
SupportedError</a></code> exception if any of the arguments a=
re not finite.</p>
+
+    <p>Each pixel in the image data is mapped to one coordinate sp=
ace unit on the bitmap, regardless
+    of the value of the <code title=3Ddom-imagedata-resolution>&lt=
;a href=3D#dom-imagedata-resolution>resolution</a></code> =
attribute.</p>
+
+   </dd>
+
+   <dt><var title=3D"">context</var> . <c=
ode title=3Ddom-context-2d-putImageDataHD><a href=3D#dom-context-2d=
-putimagedatahd>putImageDataHD</a></code>(<var title=3D=
"">imagedata</var>, <var title=3D"">dx=
</var>, <var title=3D"">dy</var> [, <var t=
itle=3D"">dirtyX</var>, <var title=3D""&g=
t;dirtyY</var>, <var title=3D"">dirtyWidth</var&=
gt;, <var title=3D"">dirtyHeight</var> ])</dt&gt=
;
+
+   <dd>
+
+    <p>Paints the data from the given <code><a href=3D#im=
agedata>ImageData</a></code> object onto the bitmap, at th=
e bitmap's
+    native pixel density (regardless of the value of the <code>&lt=
;a href=3D#imagedata>ImageData</a></code> object's <cod=
e title=3Ddom-imagedata-resolution><a href=3D#dom-imagedata-resolut=
ion>resolution</a></code> attribute). If a dirty rectangle=
 is provided,
+    only the pixels from that rectangle are painted.</p>
+
+    <p>The <code title=3Ddom-context-2d-globalAlpha><a hr=
ef=3D#dom-context-2d-globalalpha>globalAlpha</a></code> an=
d <code title=3Ddom-context-2d-globalCompositeOperation><a href=3D=
#dom-context-2d-globalcompositeoperation>globalCompositeOperation</=
a></code> attributes, as
+    well as the shadow attributes, are ignored for the purposes of this =
method call; pixels in the
+    canvas are replaced wholesale, with no composition, alpha blending, =
no shadows, etc.</p>
+
+    <p>Throws a <code><a href=3D#notsupportederror>Not=
SupportedError</a></code> exception if any of the arguments a=
re not finite.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>The <code title=3Ddom-context-2d-createImageData><a =
href=3D#dom-context-2d-createimagedata>createImageData()</a><=
/code> and <code title=3Ddom-context-2d-createImageDataHD><a =
href=3D#dom-context-2d-createimagedatahd>createImageDataHD()</a>=
</code> methods are used to
+  instantiate new blank <code><a href=3D#imagedata>ImageData=
</a></code> objects.</p>
+
+  <p>When the <dfn id=3Ddom-context-2d-createimagedata title=3D=
dom-context-2d-createImageData><code>createImageData()</code&=
gt;</dfn>
+  method is invoked with two arguments <var title=3D"">s=
w</var> and <var title=3D"">sh</var>, it must
+  return a new <code><a href=3D#imagedata>ImageData</a&gt=
;</code> object representing a rectangle with a width in equal to t=
he
+  absolute magnitude of <var title=3D"">sw</var> a=
nd a height equal to the absolute magnitude of <var title=3D"&quo=
t;>sh</var>, and with a 1.0 pixel density, if both <var title=
=3D"">sw</var> and <var title=3D"">sh&=
lt;/var> are non-zero. If one or both of <var title=3D""&=
gt;sw</var> and <var title=3D"">sh</var> are =
zero, then the method must throw an <code><a href=3D#indexsizeer=
ror>IndexSizeError</a></code> exception
+  instead. When invoked with a single <var title=3D"">im=
agedata</var> argument, it must return a new
+  <code><a href=3D#imagedata>ImageData</a></code&gt=
; object representing a rectangle with the same dimensions and pixel dens=
ity
+  as the <code><a href=3D#imagedata>ImageData</a></=
code> object passed as the argument. When the method returns an
+  <code><a href=3D#imagedata>ImageData</a></code&gt=
; object, it must be filled with transparent black.</p>
+
+  <p>When the <dfn id=3Ddom-context-2d-createimagedatahd title=3D=
dom-context-2d-createImageDataHD><code>createImageDataHD()</c=
ode></dfn>
+  method is invoked and both of its arguments (<var title=3D"&qu=
ot;>sw</var> and <var title=3D"">sh</var>)
+  are non-zero, it must return a new <code><a href=3D#imagedata=
>ImageData</a></code> object representing a rectangle with=
 a
+  width equal to the absolute magnitude of <var title=3D""&=
gt;sw</var> multiplied by <var title=3D"">scale<=
/var>, a height equal to the absolute magnitude of <var title=3D&qu=
ot;">sh</var>
+  multiplied by <var title=3D"">scale</var>, and a=
 pixel density equal to <var title=3D"">scale</var>=
,
+  where <var title=3D"">scale</var> is the number =
of pixels in the <a href=3D#scratch-bitmap>scratch bitmap</a>=
 per
+  coordinate space units. The <code><a href=3D#imagedata>Ima=
geData</a></code> object returned must be filled with transpa=
rent
+  black. If either or both of the arguments are zero, the method must in=
stead throw an
+  <code><a href=3D#indexsizeerror>IndexSizeError</a>&l=
t;/code> exception.</p>
+
+  <p>The <dfn id=3Ddom-context-2d-getimagedata title=3Ddom-cont=
ext-2d-getImageData><code>getImageData(<var title=3D"&qu=
ot;>sx</var>, <var title=3D"">sy</var>, &l=
t;var title=3D"">sw</var>, <var title=3D"&quot=
;>sh</var>)</code></dfn> method must, if
+  either the <var title=3D"">sw</var> or <var t=
itle=3D"">sh</var> arguments are zero, throw an
+  <code><a href=3D#indexsizeerror>IndexSizeError</a>&l=
t;/code> exception; otherwise,
+  <!--ADD-TOPIC:Security-->
+  if the <a href=3D#scratch-bitmap>scratch bitmap</a>'s <=
a href=3D#concept-canvas-origin-clean title=3Dconcept-canvas-origin-clean=
>origin-clean</a>
+  flag is set to false, it must throw a <code><a href=3D#securi=
tyerror>SecurityError</a></code> exception;
+  <!--REMOVE-TOPIC:Security-->
+  otherwise, it must return an <code><a href=3D#imagedata>Im=
ageData</a></code> object with width <var title=3D"&q=
uot;>sw</var> and
+  height <var title=3D"">sh</var> representing the=
 <a href=3D#scratch-bitmap>scratch bitmap</a> for the area of=
 that
+  bitmap denoted by the rectangle whose corners are the four points (&lt=
;var title=3D"">sx</var>, <var title=3D""=
>sy</var>), (<span title=3D""><var title=3D&q=
uot;">sx</var>+<var title=3D"">sw</var&g=
t;</span>, <var title=3D"">sy</var>), (<sp=
an title=3D""><var title=3D"">sx</var>=
+<var title=3D"">sw</var></span>, <span ti=
tle=3D""><var title=3D"">sy</var>+<=
var title=3D"">sh</var></span>), (<var title=3D=
"">sx</var>, <span title=3D""><var =
title=3D"">sy</var>+<var title=3D"">sh=
</var></span>), in the bitmap's coordinate space
+  units. If the bitmap does not represent each coordinate space unit squ=
are using exactly one pixel,
+  the value of each pixel in the returned object must be derived from th=
e value(s) of the pixel(s)
+  in the bitmap that correspond to the same coordinate. Pixels outside t=
he <a href=3D#scratch-bitmap>scratch
+  bitmap</a> must be returned as transparent black. Pixels must be=
 returned as non-premultiplied
+  alpha values. The pixel density of the object returned must be 1.0.&lt=
;/p>
+
+  <p>The <dfn id=3Ddom-context-2d-getimagedatahd title=3Ddom-co=
ntext-2d-getImageDataHD><code>getImageDataHD(<var title=3D&qu=
ot;">sx</var>,
+  <var title=3D"">sy</var>, <var title=3D"=
">sw</var>, <var title=3D"">sh</var>)=
</code></dfn> method must,
+  if either the <var title=3D"">sw</var> or <va=
r title=3D"">sh</var> arguments are zero, throw an
+  <code><a href=3D#indexsizeerror>IndexSizeError</a>&l=
t;/code> exception; otherwise,
+  <!--ADD-TOPIC:Security-->
+  if the <a href=3D#scratch-bitmap>scratch bitmap</a>'s <=
a href=3D#concept-canvas-origin-clean title=3Dconcept-canvas-origin-clean=
>origin-clean</a>
+  flag is set to false, it must throw a <code><a href=3D#securi=
tyerror>SecurityError</a></code> exception;
+  <!--REMOVE-TOPIC:Security-->
+  otherwise, it must return an <code><a href=3D#imagedata>Im=
ageData</a></code> object with width <var title=3D"&q=
uot;>sw</var>
+  multiplied by <var title=3D"">scale</var> and he=
ight <var title=3D"">sh</var> multiplied by <var=
 title=3D"">scale</var> representing the <a href=3D=
#scratch-bitmap>scratch bitmap</a> for the area of that bitmap
+  denoted by the rectangle whose corners are the four points (<var ti=
tle=3D"">sx</var>, <var title=3D"">sy&=
lt;/var>), (<span title=3D""><var title=3D"&qu=
ot;>sx</var>+<var title=3D"">sw</var></=
span>, <var title=3D"">sy</var>), (<span titl=
e=3D""><var title=3D"">sx</var>+<va=
r title=3D"">sw</var></span>, <span title=3D&=
quot;"><var title=3D"">sy</var>+<var tit=
le=3D"">sh</var></span>), (<var title=3D&quot=
;">sx</var>, <span title=3D""><var title=
=3D"">sy</var>+<var title=3D"">sh</=
var></span>), in the bitmap's coordinate space
+  units. Pixels outside the <a href=3D#scratch-bitmap>scratch bitm=
ap</a> must be returned as transparent black.
+  Pixels must be returned as non-premultiplied alpha values. The pixel d=
ensity of the object
+  returned must be <var title=3D"">scale</var>. Fo=
r the purposes of this paragraph, <var title=3D"">scale&l=
t;/var> is the number of pixels in the <a href=3D#scratch-bitmap&gt=
;scratch bitmap</a> per coordinate
+  space units.</p>
+
+  <p>New <code><a href=3D#imagedata>ImageData</a&gt=
;</code> objects must be initialized so that their <dfn id=3Ddom=
-imagedata-width title=3Ddom-imagedata-width><code>width</cod=
e></dfn> attribute is set to the number of pixels per
+  row in the image data, their <dfn id=3Ddom-imagedata-height title=3D=
dom-imagedata-height><code>height</code></dfn> attri=
bute
+  is set to the number of rows in the image data, their <dfn id=3Ddom=
-imagedata-resolution title=3Ddom-imagedata-resolution><code>res=
olution</code></dfn> is set to the object's pixel
+  density, and their <dfn id=3Ddom-imagedata-data title=3Ddom-imageda=
ta-data><code>data</code></dfn> attribute is
+  initialized to a <code><a href=3D#uint8clampedarray>Uint8C=
lampedArray</a></code> object. The <code><a href=3D#=
uint8clampedarray>Uint8ClampedArray</a></code> object
+  must use a <a href=3D#canvas-pixel-arraybuffer>Canvas Pixel <=
code>ArrayBuffer</code></a> for its storage, and must have=
 a
+  zero start offset and a length equal to the length of its storage, in =
bytes. The <a href=3D#canvas-pixel-arraybuffer>Canvas
+  Pixel <code>ArrayBuffer</code></a> must contain the =
image data. At least one pixel's worth of
+  image data must be returned. <a href=3D#refsTYPEDARRAY>[TYPEDARR=
AY]</a></p>
+
+  <p>A <dfn id=3Dcanvas-pixel-arraybuffer>Canvas Pixel <c=
ode>ArrayBuffer</code></dfn> is an <code><a href=3D=
#arraybuffer>ArrayBuffer</a></code> that whose
+  data is represented in left-to-right order, row by row top to bottom, =
starting with the top left,
+  with each pixel's red, green, blue, and alpha components being given i=
n that order for each pixel.
+  Each component of each pixel represented in this array must be in the =
range 0..255, representing
+  the 8 bit value for that component. The components must be assigned co=
nsecutive indices starting
+  with 0 for the top left pixel's red component. <a href=3D#refsTYPED=
ARRAY>[TYPEDARRAY]</a></p>
+
+  <p>The <dfn id=3Ddom-context-2d-putimagedata title=3Ddom-cont=
ext-2d-putImageData><code>putImageData()</code></dfn&gt=
; and <dfn id=3Ddom-context-2d-putimagedatahd title=3Ddom-context-2d-p=
utImageDataHD><code>putImageDataHD()</code></dfn> me=
thods write data from
+  <code><a href=3D#imagedata>ImageData</a></code&gt=
; structures back to the rendering context's <a href=3D#scratch-bitmap=
>scratch bitmap</a>.
+  Their arguments are: <var title=3D"">imagedata</var=
>, <var title=3D"">dx</var>, <var title=3D&qu=
ot;">dy</var>, <var title=3D"">dirtyX</v=
ar>, <var title=3D"">dirtyY</var>, <var title=
=3D"">dirtyWidth</var>, and <var title=3D"&quo=
t;>dirtyHeight</var>.</p>
+
+  <p>When the last four arguments to these methods are omitted, th=
ey must be assumed to have the
+  values 0, 0, the <code title=3Ddom-imagedata-width><a href=3D=
#dom-imagedata-width>width</a></code> member of the <va=
r title=3D"">imagedata</var> structure, and the <co=
de title=3Ddom-imagedata-height><a href=3D#dom-imagedata-height>=
height</a></code>
+  member of the <var title=3D"">imagedata</var> st=
ructure, respectively.</p>
+
+  <p>When invoked, these methods must act as follows:</p>
+
+  <ol><li>
+
+    <p>If <var title=3D"">dirtyWidth</var> i=
s negative, let <var title=3D"">dirtyX</var> be &lt=
;span title=3D""><var title=3D"">dirtyX</=
var>+<var title=3D"">dirtyWidth</var></span&g=
t;, and let <var title=3D"">dirtyWidth</var> be equ=
al to the absolute magnitude of <var title=3D"">dirtyWidt=
h</var>.</p>
+
+    <p>If <var title=3D"">dirtyHeight</var> =
is negative, let <var title=3D"">dirtyY</var> be &l=
t;span title=3D""><var title=3D"">dirtyY<=
/var>+<var title=3D"">dirtyHeight</var></span=
>, and let <var title=3D"">dirtyHeight</var> be =
equal to the absolute magnitude of <var title=3D"">dirtyH=
eight</var>.</p>
+
+   </li>
+
+   <li>
+
+    <p>If <var title=3D"">dirtyX</var> is ne=
gative, let <var title=3D"">dirtyWidth</var> be &lt=
;span title=3D""><var title=3D"">dirtyWidth&=
lt;/var>+<var title=3D"">dirtyX</var></span&g=
t;, and let <var title=3D"">dirtyX</var> be zero.&l=
t;/p>
+
+    <p>If <var title=3D"">dirtyY</var> is ne=
gative, let <var title=3D"">dirtyHeight</var> be &l=
t;span title=3D""><var title=3D"">dirtyHeigh=
t</var>+<var title=3D"">dirtyY</var></span=
>, and let <var title=3D"">dirtyY</var> be zero.=
</p>
+
+   </li>
+
+   <li>
+
+    <p>If <span title=3D""><var title=3D"&=
quot;>dirtyX</var>+<var title=3D"">dirtyWidth&lt=
;/var></span> is greater
+    than the <code title=3Ddom-imagedata-width><a href=3D#dom-i=
magedata-width>width</a></code> attribute of the <var t=
itle=3D"">imagedata</var> argument, let <var title=3D=
"">dirtyWidth</var> be the value of that <code titl=
e=3Ddom-imagedata-width><a href=3D#dom-imagedata-width>width<=
/a></code> attribute, minus the value of <var title=3D"&=
quot;>dirtyX</var>.</p>
+
+    <p>If <span title=3D""><var title=3D"&=
quot;>dirtyY</var>+<var title=3D"">dirtyHeight&l=
t;/var></span> is
+    greater than the <code title=3Ddom-imagedata-height><a href=
=3D#dom-imagedata-height>height</a></code> attribute of th=
e <var title=3D"">imagedata</var> argument, let &lt=
;var title=3D"">dirtyHeight</var> be the value of that
+    <code title=3Ddom-imagedata-height><a href=3D#dom-imagedata=
-height>height</a></code> attribute, minus the value of &l=
t;var title=3D"">dirtyY</var>.</p>
+
+   </li>
+
+   <li>
+
+    <p>If, after those changes, either <var title=3D"&quot=
;>dirtyWidth</var> or <var title=3D"">dirtyHeigh=
t</var> is negative or zero, stop these steps without affecting any
+    bitmaps.</p>
+
+   </li>
+
+   <li>
+
+    <p>Run the appropriate steps from the following list:</p&gt=
;
+
+    <dl class=3Dswitch><dt>If the method was <code title=3D=
dom-context-2d-putImageData><a href=3D#dom-context-2d-putimagedata&=
gt;putImageData()</a></code></dt>
+
+     <dd>
+
+      <p>Draw the region of the image data in the horizontal recta=
ngle whose top left corner is at
+      (<var title=3D"">dirtyX</var>,<var title=3D=
"">dirtyY</var>) and whose bottom right corner is at
+      (<span title=3D""><var title=3D"">=
dirtyX</var>+<var title=3D"">dirtyWidth</var>=
</span>,<span title=3D""><var title=3D"&quo=
t;>dirtyY</var>+<var title=3D"">dirtyHeight</=
var></span>) onto the rendering
+      context's <a href=3D#scratch-bitmap>scratch bitmap</a>=
, aligned such that the top left of the rectangle is at
+      coordinate (<var title=3D"">dx</var>,<var=
 title=3D"">dy</var>).</p>
+
+      <p>If the <code title=3Ddom-context-2d-imageSmoothingEnab=
led><a href=3D#dom-context-2d-imagesmoothingenabled>imageSmoothi=
ngEnabled</a></code>
+      attribute is set to true, then the user agent should attempt to ap=
ply a smoothing algorithm to
+      the image data if the <a href=3D#scratch-bitmap>scratch bitm=
ap</a> does not have exactly one device pixel per
+      coordinate space unit.</p>
+
+     </dd>
+
+     <dt>If the method was <code title=3Ddom-context-2d-putImag=
eDataHD><a href=3D#dom-context-2d-putimagedatahd>putImageDataHD(=
)</a></code></dt>
+
+     <dd>
+
+      <ol><li>
+
+        <p>Let <var title=3D"">dx<sub title=3D&=
quot;">device</sub></var> be the x-coordinate of the =
device pixel in
+        the <a href=3D#scratch-bitmap>scratch bitmap</a> cor=
responding to the <var title=3D"">dx</var> coordina=
te in
+        the <a href=3D#scratch-bitmap>scratch bitmap</a>'s c=
oordinate space.</p>
+
+        <p>Let <var title=3D"">dy<sub title=3D&=
quot;">device</sub></var> be the y-coordinate of the =
device pixel in
+        the <a href=3D#scratch-bitmap>scratch bitmap</a> cor=
responding to the <var title=3D"">dy</var> coordina=
te in
+        the <a href=3D#scratch-bitmap>scratch bitmap</a>'s c=
oordinate space.</p>
+
+       </li>
+
+       <li><p>For all integer values of <var title=3D&quo=
t;">x</var> and <var title=3D"">y</var&g=
t; where <span title=3D""><var title=3D""&gt=
;dirtyX</var> ≤ <var title=3D"&quo=
t;>x</var> < <span title=3D"&qu=
ot;><var title=3D"">dirtyX</var>+<var title=3D=
"">dirtyWidth</var></span></span> and <=
span title=3D""><var title=3D"">dirtyY</v=
ar> ≤ <var title=3D"">y</v=
ar> < <span title=3D""><va=
r title=3D"">dirtyY</var>+<var title=3D""=
>dirtyHeight</var></span></span>, copy the
+       four channels of the pixel with coordinate (<var title=3D&quot=
;">x</var>, <var title=3D"">y</var>) =
in
+       the <var title=3D"">imagedata</var> data st=
ructure to the pixel with coordinate (<span title=3D"">&l=
t;var title=3D"">dx<sub title=3D"">device&lt=
;/sub></var>+<var title=3D"">x</var></s=
pan>, <span title=3D""><var title=3D""&gt=
;dy<sub title=3D"">device</sub></var>+<var=
 title=3D"">y</var></span>) in the
+       rendering context's <a href=3D#scratch-bitmap>scratch bitma=
p</a>.</li>
+
+      </ol></dd>
+
+    </dl></li>
+
+  </ol><p>The handling of pixel rounding when the specified =
coordinates do not exactly map to the device
+  coordinate space is not defined by this specification, except that the=
 following must result in no
+  visible changes to the rendering:</p>
+
+  <pre>context.putImageDataHD(context.getImageDataHD(x, y, w, h), =
p, q);</pre>
+
+  <p>...for any value of <var title=3D"">x</var=
>, <var title=3D"">y</var>, <var title=3D&quo=
t;">w</var>, and
+  <var title=3D"">h</var> and where <var title=3D=
"">p</var> is the smaller of <var title=3D"&qu=
ot;>x</var> and
+  the sum of <var title=3D"">x</var> and <var t=
itle=3D"">w</var>, and <var title=3D""&gt=
;q</var> is the
+  smaller of <var title=3D"">y</var> and the sum o=
f <var title=3D"">y</var> and <var title=3D&quot=
;">h</var>;
+  and except that the following two calls:</p>
+
+  <pre>context.createImageData(w, h);
+context.getImageData(0, 0, w, h);</pre>
+
+  <p>...must return <code><a href=3D#imagedata>ImageDa=
ta</a></code> objects with the same dimensions as each other,=
 and the
+  following two calls:</p>
+
+  <pre>context.createImageDataHD(w, h);
+context.getImageDataHD(0, 0, w, h);</pre>
+
+  <p>...must also return <code><a href=3D#imagedata>Im=
ageData</a></code> objects with the same dimensions as each o=
ther, for
+  any value of <var title=3D"">w</var> and <var=
 title=3D"">h</var> in both cases. In other words, whi=
le
+  user agents may round the arguments of these methods so that they map =
to device pixel boundaries,
+  any rounding performed must be performed consistently for all of the m=
ethods described in this
+  section.</p>
+
+  <p class=3Dnote>Due to the lossy nature of converting to and fro=
m premultiplied alpha color
+  values, pixels that have just been set using <code title=3Ddom-cont=
ext-2d-putImageDataHD><a href=3D#dom-context-2d-putimagedatahd>p=
utImageDataHD()</a></code> might be returned to an equivalent
+  <code title=3Ddom-context-2d-getImageDataHD><a href=3D#dom-co=
ntext-2d-getimagedatahd>getImageDataHD()</a></code> as dif=
ferent values.</p>
+
+  <p>The current path, <a href=3D#transformations title=3Ddom-c=
ontext-2d-transformation>transformation matrix</a>,
+  <a href=3D#shadows title=3Dshadows>shadow attributes</a>, =
<a href=3D#dom-context-2d-globalalpha title=3Ddom-context-2d-globalAlp=
ha>global
+  alpha</a>, the <a href=3D#clipping-region>clipping region&=
lt;/a>, and <a href=3D#dom-context-2d-globalcompositeoperation titl=
e=3Ddom-context-2d-globalCompositeOperation>global composition operato=
r</a> must not affect
+  the methods described in this section.</p>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>In the following example, the script generates an <code&g=
t;<a href=3D#imagedata>ImageData</a></code> object so t=
hat it can
+   draw onto it.</p>
+
+   <pre>// canvas is a reference to a <canvas> eleme=
nt
+var context =3D canvas.getContext('2d');
+
+// create a blank slate
+var data =3D context.createImageDataHD(canvas.width, canvas.height);
+
+// create some plasma
+FillPlasma(data, 'green'); // green plasma
+
+// add a cloud to the plasma
+AddCloud(data, data.width/2, data.height/2); // put a cloud in the middl=
e
+
+// paint the plasma+cloud on the canvas
+context.putImageDataHD(data, 0, 0);
+
+// support methods
+function FillPlasma(data, color) { ... }
+function AddCloud(data, x, y) { ... }</pre>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>Here is an example of using <code title=3Ddom-context-2d-=
getImageDataHD><a href=3D#dom-context-2d-getimagedatahd>getImage=
DataHD()</a></code> and <code title=3Ddom-context-2d-putIm=
ageDataHD><a href=3D#dom-context-2d-putimagedatahd>putImageDataH=
D()</a></code> to implement an edge detection
+   filter.</p>
+
+   <pre><!DOCTYPE HTML>
+<html>
+ <head>
+  <title>Edge detection demo</title>
+  <script>
+   var image =3D new Image();
+   function init() {
+     image.onload =3D demo;
+     image.src =3D "image.jpeg";
+   }
+   function demo() {
+     var canvas =3D document.getElementsByTagName('canvas')[0];
+     var context =3D canvas.getContext('2d');
+
+     // draw the image onto the canvas
+     context.drawImage(image, 0, 0);
+
+     // get the image data to manipulate
+     var input =3D context.getImageDataHD(0, 0, canvas.width, canvas.hei=
ght);
+
+     // get an empty slate to put the data into
+     var output =3D context.createImageDataHD(canvas.width, canvas.heigh=
t);
+
+     // alias some variables for convenience
+     // notice that we are using input.width and input.height here
+     // as they might not be the same as canvas.width and canvas.height
+     // (in particular, they might be different on high-res displays)
+     var w =3D input.width, h =3D input.height;
+     var inputData =3D input.data;
+     var outputData =3D output.data;
+
+     // edge detection
+     for (var y =3D 1; y < h-1; y +=3D 1) {
+       for (var x =3D 1; x < w-1; x +=3D 1) {
+         for (var c =3D 0; c < 3; c +=3D 1) {
+           var i =3D (y*w + x)*4 + c;
+           outputData[i] =3D 127 + -inputData[i - w*4 - 4] -   inputData=
[i - w*4] - inputData[i - w*4 + 4] +
+                                 -inputData[i - 4]       + 8*inputData[i=
]       - inputData[i + 4] +
+                                 -inputData[i + w*4 - 4] -   inputData[i=
 + w*4] - inputData[i + w*4 + 4];
+         }
+         outputData[(y*w + x)*4 + 3] =3D 255; // alpha
+       }
+     }
+
+     // put the image data back after manipulation
+     context.putImageDataHD(output, 0, 0);
+   }
+  </script>
+ </head>
+ <body onload=3D"init()">
+  <canvas></canvas>
+ </body>
+</html></pre>
+
+  </div>
+
+
+
+
+  <h6 id=3Dcompositing><span class=3Dsecno>4.12.4.2.17 </=
span>Compositing</h6>
+
+  <dl class=3Ddomintro><dt><var title=3D"">c=
ontext</var> . <code title=3Ddom-context-2d-globalAlpha><a=
 href=3D#dom-context-2d-globalalpha>globalAlpha</a></code>=
 [ =3D <var title=3D"">value</var> ]</dt>
+
+   <dd>
+
+    <p>Returns the current alpha value applied to rendering operat=
ions.</p>
+
+    <p>Can be set, to change the alpha value. Values outside of th=
e range 0.0 .. 1.0 are
+    ignored.</p>
+
+   </dd>
+
+
+   <dt><var title=3D"">context</var> . <c=
ode title=3Ddom-context-2d-globalCompositeOperation><a href=3D#dom-=
context-2d-globalcompositeoperation>globalCompositeOperation</a>=
</code> [ =3D <var title=3D"">value</var> ]&l=
t;/dt>
+
+   <dd>
+
+    <p>Returns the current composition operation, from the values =
defined in the Compositing and
+    Blending specification. <a href=3D#refsCOMPOSITE>[COMPOSITE]&l=
t;/a>.</p>
+
+    <p>Can be set, to change the composition operation. Unknown va=
lues are ignored.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>All drawing operations are affected by the global compositing=
 attributes, <code title=3Ddom-context-2d-globalAlpha><a href=3D=
#dom-context-2d-globalalpha>globalAlpha</a></code> and &lt=
;code title=3Ddom-context-2d-globalCompositeOperation><a href=3D#do=
m-context-2d-globalcompositeoperation>globalCompositeOperation</a&g=
t;</code>.</p>
+
+  <!-- conformance criteria for painting are described in the "d=
rawing model" section below -->
+
+  <p>The <dfn id=3Ddom-context-2d-globalalpha title=3Ddom-conte=
xt-2d-globalAlpha><code>globalAlpha</code></dfn> att=
ribute gives an
+  alpha value that is applied to shapes and images before they are compo=
sited onto the <a href=3D#scratch-bitmap>scratch
+  bitmap</a>. The value must be in the range from 0.0 (fully trans=
parent) to 1.0 (no additional
+  transparency). If an attempt is made to set the attribute to a value o=
utside this range, including
+  Infinity and Not-a-Number (NaN) values, the attribute must retain its =
previous value. When the
+  context is created, the <code title=3Ddom-context-2d-globalAlpha&gt=
;<a href=3D#dom-context-2d-globalalpha>globalAlpha</a></co=
de> attribute must
+  initially have the value 1.0.</p>
+
+  <p>The <dfn id=3Ddom-context-2d-globalcompositeoperation titl=
e=3Ddom-context-2d-globalCompositeOperation><code>globalComposit=
eOperation</code></dfn>
+  attribute sets the current composition operator, which controls how sh=
apes and images are drawn
+  onto the <a href=3D#scratch-bitmap>scratch bitmap</a>, onc=
e they have had <code title=3Ddom-context-2d-globalAlpha><a href=
=3D#dom-context-2d-globalalpha>globalAlpha</a></code> and =
the current transformation matrix
+  applied. The possible values are those defined in the Compositing and =
Blending specification. <a href=3D#refsCOMPOSITE>[COMPOSITE]</a&=
gt;</p>
+
+  <p>These values are all case-sensitive — they must be =
used exactly as defined. User agents
+  must not recognize values that are not a <a href=3D#case-sensitive&=
gt;case-sensitive</a> match for one of the values
+  given in the Compositing and Blending specification. <a href=3D#ref=
sCOMPOSITE>[COMPOSITE]</a></p>
+
+  <p>On setting, if the user agent does not recognize the specifie=
d value, it must be ignored,
+  leaving the value of <code title=3Ddom-context-2d-globalCompositeOp=
eration><a href=3D#dom-context-2d-globalcompositeoperation>globa=
lCompositeOperation</a></code> unaffected.
+  Otherwise, the attribute must be set to the given new value.</p>
+
+  <p>When the context is created, the <code title=3Ddom-context=
-2d-globalCompositeOperation><a href=3D#dom-context-2d-globalcompos=
iteoperation>globalCompositeOperation</a></code> attribute=
 must
+  initially have the value <code>source-over</code>.</p&g=
t;
+
+  </div>
+
+
+
+  <h6 id=3Dimage-smoothing><span class=3Dsecno>4.12.4.2.18 &=
lt;/span>Image smoothing</h6>
+
+  <dl class=3Ddomintro><dt><var title=3D"">c=
ontext</var> . <code title=3Ddom-context-2d-imageSmoothingEnable=
d><a href=3D#dom-context-2d-imagesmoothingenabled>imageSmoothing=
Enabled</a></code> [ =3D <var title=3D"">valu=
e</var> ]</dt>
+
+   <dd>
+
+    <p>Returns whether pattern fills and the <code title=3Ddom-=
context-2d-drawImage><a href=3D#dom-context-2d-drawimage>drawIma=
ge()</a></code> method will attempt to smooth images if
+    their pixels don't line up exactly with the display, when scaling im=
ages up.</p>
+
+    <p>Can be set, to change whether images are smoothed (true) or=
 not (false).</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-context-2d-imagesmoothingenabled title=3D=
dom-context-2d-imageSmoothingEnabled><code>imageSmoothingEnabled=
</code></dfn>
+  attribute, on getting, must return the last value it was set to. On se=
tting, it must be set to the
+  new value. When the <code><a href=3D#canvasrenderingcontext2d=
>CanvasRenderingContext2D</a></code> object is created, th=
e attribute must be
+  set to true.</p>
+
+  </div>
+
+
+  <h6 id=3Dshadows><span class=3Dsecno>4.12.4.2.19 </span=
><dfn>Shadows</dfn></h6>
+
+  <p>All drawing operations are affected by the four global shadow=
 attributes.</p>
+
+  <dl class=3Ddomintro><dt><var title=3D"">c=
ontext</var> . <code title=3Ddom-context-2d-shadowColor><a=
 href=3D#dom-context-2d-shadowcolor>shadowColor</a></code>=
 [ =3D <var title=3D"">value</var> ]</dt>
+
+   <dd>
+
+    <p>Returns the current shadow color.</p>
+
+    <p>Can be set, to change the shadow color. Values that cannot =
be parsed as CSS colors are ignored.</p>
+
+   </dd>
+
+   <dt><var title=3D"">context</var> . <c=
ode title=3Ddom-context-2d-shadowOffsetX><a href=3D#dom-context-2d-=
shadowoffsetx>shadowOffsetX</a></code> [ =3D <var title=
=3D"">value</var> ]</dt>
+   <dt><var title=3D"">context</var> . <c=
ode title=3Ddom-context-2d-shadowOffsetY><a href=3D#dom-context-2d-=
shadowoffsety>shadowOffsetY</a></code> [ =3D <var title=
=3D"">value</var> ]</dt>
+
+   <dd>
+
+    <p>Returns the current shadow offset.</p>
+
+    <p>Can be set, to change the shadow offset. Values that are no=
t finite numbers are ignored.</p>
+
+   </dd>
+
+   <dt><var title=3D"">context</var> . <c=
ode title=3Ddom-context-2d-shadowBlur><a href=3D#dom-context-2d-sha=
dowblur>shadowBlur</a></code> [ =3D <var title=3D"=
">value</var> ]</dt>
+
+   <dd>
+
+    <p>Returns the current level of blur applied to shadows.</p=
>
+
+    <p>Can be set, to change the blur level. Values that are not f=
inite numbers greater than or
+    equal to zero are ignored.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-context-2d-shadowcolor title=3Ddom-conte=
xt-2d-shadowColor><code>shadowColor</code></dfn> att=
ribute sets the
+  color of the shadow.</p>
+
+  <p>When the context is created, the <code title=3Ddom-context=
-2d-shadowColor><a href=3D#dom-context-2d-shadowcolor>shadowColo=
r</a></code>
+  attribute initially must be fully-transparent black.</p>
+
+  <p>On getting, the <a href=3D#serialization-of-a-color title=3D=
"serialization of a color">serialization of the color</a&=
gt; must
+  be returned.</p>
+
+  <p>On setting, the new value must be <a href=3D#parsed-as-a-c=
ss-color-value>parsed as a CSS <color> value</a> a=
nd the
+  color assigned. If the value cannot be parsed as a CSS <color&a=
mp;gt; value then it must be
+  ignored, and the attribute must retain its previous value. <a href=3D=
#refsCSSCOLOR>[CSSCOLOR]</a></p>
+
+  <p>The <dfn id=3Ddom-context-2d-shadowoffsetx title=3Ddom-con=
text-2d-shadowOffsetX><code>shadowOffsetX</code></dfn&g=
t; and <dfn id=3Ddom-context-2d-shadowoffsety title=3Ddom-context-2d-s=
hadowOffsetY><code>shadowOffsetY</code></dfn> attrib=
utes specify the
+  distance that the shadow will be offset in the positive horizontal and=
 positive vertical distance
+  respectively. Their values are in coordinate space units. They are not=
 affected by the current
+  transformation matrix.</p>
+
+  <p>When the context is created, the shadow offset attributes mus=
t initially have the value
+  <code>0</code>.</p>
+
+  <p>On getting, they must return their current value. On setting,=
 the attribute being set must be
+  set to the new value, except if the value is infinite or NaN, in which=
 case the new value must be
+  ignored.</p>
+
+  <p>The <dfn id=3Ddom-context-2d-shadowblur title=3Ddom-contex=
t-2d-shadowBlur><code>shadowBlur</code></dfn> attrib=
ute specifies
+  the level of the blurring effect. (The units do not map to coordinate =
space units, and are not
+  affected by the current transformation matrix.)</p>
+
+  <p>When the context is created, the <code title=3Ddom-context=
-2d-shadowBlur><a href=3D#dom-context-2d-shadowblur>shadowBlur&l=
t;/a></code>
+  attribute must initially have the value <code>0</code>.&lt=
;/p>
+
+  <p>On getting, the attribute must return its current value. On s=
etting the attribute must be set
+  to the new value, except if the value is negative, infinite or NaN, in=
 which case the new value
+  must be ignored.</p>
+
+  <p><dfn id=3Dwhen-shadows-are-drawn title=3D"when shadow=
s are drawn">Shadows are only drawn if</dfn> the opacity co=
mponent of
+  the alpha component of the color of <code title=3Ddom-context-2d-sh=
adowColor><a href=3D#dom-context-2d-shadowcolor>shadowColor</=
a></code> is
+  non-zero and either the <code title=3Ddom-context-2d-shadowBlur>=
<a href=3D#dom-context-2d-shadowblur>shadowBlur</a></code&=
gt; is non-zero, or
+  the <code title=3Ddom-context-2d-shadowOffsetX><a href=3D#dom=
-context-2d-shadowoffsetx>shadowOffsetX</a></code> is non-=
zero, or the <code title=3Ddom-context-2d-shadowOffsetY><a href=3D=
#dom-context-2d-shadowoffsety>shadowOffsetY</a></code> is =
non-zero.</p>
+
+  <p class=3Dcritical>It is likely that this will change: browser =
vendors have indicated an interest
+  in changing the processing model for shadows such that they only draw =
when the composition
+  operator is "source-over" (the default). <a href=3Dhttp:/=
/lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2011-May/thread.html#31457&=
gt;Read
+  more...</a></p>
+
+  <p><a href=3D#when-shadows-are-drawn>When shadows are draw=
n</a>, they must be rendered as follows:</p>
+
+  <ol><li><p>Let <var title=3D"">A<=
/var> be an infinite transparent black bitmap on which the source
+   image for which a shadow is being created has been rendered.</li&g=
t;
+
+   <li><p>Let <var title=3D"">B</var> =
be an infinite transparent black bitmap, with a coordinate
+   space and an origin identical to <var title=3D"">A&lt=
;/var>.</li>
+
+   <li><p>Copy the alpha channel of <var title=3D"&q=
uot;>A</var> to <var title=3D"">B</var>, o=
ffset by <code title=3Ddom-context-2d-shadowOffsetX><a href=3D#d=
om-context-2d-shadowoffsetx>shadowOffsetX</a></code> in th=
e positive <var title=3D"">x</var>
+   direction, and <code title=3Ddom-context-2d-shadowOffsetY><a=
 href=3D#dom-context-2d-shadowoffsety>shadowOffsetY</a></code=
> in the positive
+   <var title=3D"">y</var> direction.</li>
+
+   <li>
+
+    <p>If <code title=3Ddom-context-2d-shadowBlur><a href=
=3D#dom-context-2d-shadowblur>shadowBlur</a></code> is gre=
ater than 0:</p>
+
+    <ol><li> <p>Let <var title=3D"">&a=
mp;sigma;</var> be half the value of <code title=3Ddom-context-2=
d-shadowBlur><a href=3D#dom-context-2d-shadowblur>shadowBlur<=
/a></code>.</li>
+
+     <li> <p>Perform a 2D Gaussian Blur on <var title=3D&=
quot;">B</var>, using <var title=3D"">&=
sigma;</var>
+     as the standard deviation.</p> <!-- wish i could find a re=
ference for this --> </li>
+
+    </ol><p>User agents may limit values of <var title=3D=
"">σ</var> to an implementation-specific
+    maximum value to avoid exceeding hardware limitations during the Gau=
ssian blur operation.</p>
+
+   </li>
+
+   <li><p>Set the red, green, and blue components of every p=
ixel in <var title=3D"">B</var> to the
+   red, green, and blue components (respectively) of the color of <co=
de title=3Ddom-context-2d-shadowColor><a href=3D#dom-context-2d-sha=
dowcolor>shadowColor</a></code>.</li>
+
+   <li><p>Multiply the alpha component of every pixel in &lt=
;var title=3D"">B</var> by the alpha
+   component of the color of <code title=3Ddom-context-2d-shadowColor=
><a href=3D#dom-context-2d-shadowcolor>shadowColor</a><=
/code>.</li>
+
+   <li><p>The shadow is in the bitmap <var title=3D"=
">B</var>, and is rendered as part of the
+   <a href=3D#drawing-model>drawing model</a> described belo=
w.</li>
+
+  </ol></div>
+
+  <p>If the current composition operation is <code title=3Dgcop=
-copy>copy</code>, shadows
+  effectively won't render (since the shape will overwrite the shadow).&=
lt;/p>
+
+
+
+  <div class=3Dimpl>
+
+  <h6 id=3Ddrawing-model><span class=3Dsecno>4.12.4.2.20 &lt=
;/span><dfn>Drawing model</dfn></h6>
+
+  <p>When a shape or image is painted, user agents must follow the=
se steps, in the order given (or
+  act as if they do):</p>
+
+  <ol><li><p>Render the shape or image onto an infinit=
e transparent black bitmap, creating image <var title=3D""&g=
t;A</var>, as described in the previous sections. For shapes, the c=
urrent fill, stroke,
+   and line styles must be honored, and the stroke must itself also be s=
ubjected to the current
+   transformation matrix.</li>
+
+   <li><p><a href=3D#when-shadows-are-drawn>When shado=
ws are drawn</a>, render the shadow from image <var title=3D&quo=
t;">A</var>,
+   using the current shadow styles, creating image <var title=3D&quot=
;">B</var>.</li>
+
+   <li><p><a href=3D#when-shadows-are-drawn>When shado=
ws are drawn</a>, multiply the alpha component of every pixel in &l=
t;var title=3D"">B</var> by <code title=3Ddom-conte=
xt-2d-globalAlpha><a href=3D#dom-context-2d-globalalpha>globalAl=
pha</a></code>.</li>
+
+   <li><p><a href=3D#when-shadows-are-drawn>When shado=
ws are drawn</a>, composite <var title=3D"">B</v=
ar> within the
+   <a href=3D#clipping-region>clipping region</a> over the c=
urrent <a href=3D#scratch-bitmap>scratch bitmap</a> using the=
 current
+   composition operator.</li>
+
+   <li><p>Multiply the alpha component of every pixel in &lt=
;var title=3D"">A</var> by <code title=3Ddom-contex=
t-2d-globalAlpha><a href=3D#dom-context-2d-globalalpha>globalAlp=
ha</a></code>.</li>
+
+   <li><p>Composite <var title=3D"">A</va=
r> within the <a href=3D#clipping-region>clipping region</a&g=
t; over the current
+   <a href=3D#scratch-bitmap>scratch bitmap</a> using the cu=
rrent composition operator.</li>
+
+  </ol><p>When compositing onto the <a href=3D#scratch-bi=
tmap>scratch bitmap</a>, pixels that would fall outside of the
+  <a href=3D#scratch-bitmap>scratch bitmap</a> must be disca=
rded.</p>
+
+  </div>
+
+
+
+
+  <h6 id=3Dbest-practices><span class=3Dsecno>4.12.4.2.21 &l=
t;/span>Best practices</h6>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <p>When a canvas is interactive, authors should include focusabl=
e elements in the element's
+  fallback content corresponding to each focusable part of the canvas, a=
s in the <a href=3D#drawCustomFocusRingExample>example above</a&=
gt;.</p>
+
+  <p>To indicate which focusable part of the canvas is currently f=
ocused, authors should use the
+  <code title=3Ddom-context-2d-drawSystemFocusRing><a href=3D#d=
om-context-2d-drawsystemfocusring>drawSystemFocusRing()</a></=
code> method, passing it
+  the element for which a ring is being drawn. This method only draws th=
e focus ring if the element
+  is focused, so that it can simply be called whenever drawing the eleme=
nt, without checking whether
+  the element is focused or not first.</p>
+
+  <p>Authors should avoid implementing text editing controls using=
 the <code><a href=3D#the-canvas-element>canvas</a><=
/code> element.
+  Doing so has a large number of disadvantages:</p>
+
+  <ul><li>Mouse placement of the caret has to be reimplement=
ed.</li>
+
+   <li>Keyboard movement of the caret has to be reimplemented (pos=
sibly across lines, for multiline
+   text input).</li>
+
+   <li>Scrolling of the text field has to be implemented (horizont=
ally for long lines, vertically
+   for multiline input).</li>
+
+   <li>Native features such as copy-and-paste have to be reimpleme=
nted.</li>
+
+   <li>Native features such as spell-checking have to be reimpleme=
nted.</li>
+
+   <li>Native features such as drag-and-drop have to be reimplemen=
ted.</li>
+
+   <li>Native features such as page-wide text search have to be re=
implemented.</li>
+
+   <li>Native features specific to the user, for example custom te=
xt services, have to be
+   reimplemented. This is close to impossible since each user might have=
 different services
+   installed, and there is an unbounded set of possible such services.&l=
t;/li>
+
+   <li>Bidirectional text editing has to be reimplemented.</li&=
gt;
+
+   <li>For multiline text editing, line wrapping has to be impleme=
nted for all relevant
+   languages.</li>
+
+   <li>Text selection has to be reimplemented.</li>
+
+   <li>Dragging of bidirectional text selections has to be reimple=
mented.</li>
+
+   <li>Platform-native keyboard shortcuts have to be reimplemented=
.</li>
+
+   <li>Platform-native input method editors (IMEs) have to be reim=
plemented.</li>
+
+   <li>Undo and redo functionality has to be reimplemented.</li=
>
+
+   <li>Accessibility features such as magnification following the =
caret or selection have to be
+   reimplemented.</li>
+
+  </ul><p>This is a huge amount of work, and authors are mos=
t strongly encouraged to avoid doing any of
+  it by instead using the <code><a href=3D#the-input-element&gt=
;input</a></code> element, the <code><a href=3D#the-=
textarea-element>textarea</a></code> element, or the
+  <code title=3Dattr-contenteditable><a href=3D#attr-contentedi=
table>contenteditable</a></code> attribute.</p>
+
+
+  <h6 id=3Dexamples-0><span class=3Dsecno>4.12.4.2.22 </s=
pan>Examples</h6>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <div class=3Dexample>
+
+  <p>Here is an example of a script that uses canvas to draw <a=
 href=3D"data:text/html;charset=3Dutf-8;base64,PCFET0NUWVBFIEhUTUw%2=
BDQo8aHRtbCBsYW5nPSJlbiI%2BDQogPGhlYWQ%2BDQogIDx0aXRsZT5QcmV0dHkgR2xvd2lu=
ZyBMaW5lczwvdGl0bGU%2BDQogPC9oZWFkPg0KIDxib2R5Pg0KPGNhbnZhcyB3aWR0aD0iODA=
wIiBoZWlnaHQ9IjQ1MCI%2BPC9jYW52YXM%2BDQo8c2NyaXB0Pg0KDQogdmFyIGNvbnRleHQg=
PSBkb2N1bWVudC5nZXRFbGVtZW50c0J5VGFnTmFtZSgnY2FudmFzJylbMF0uZ2V0Q29udGV4d=
CgnMmQnKTsNCg0KIHZhciBsYXN0WCA9IGNvbnRleHQuY2FudmFzLndpZHRoICogTWF0aC5yYW=
5kb20oKTsNCiB2YXIgbGFzdFkgPSBjb250ZXh0LmNhbnZhcy5oZWlnaHQgKiBNYXRoLnJhbmR=
vbSgpOw0KIHZhciBodWUgPSAwOw0KIGZ1bmN0aW9uIGxpbmUoKSB7DQogICBjb250ZXh0LnNh=
dmUoKTsNCiAgIGNvbnRleHQudHJhbnNsYXRlKGNvbnRleHQuY2FudmFzLndpZHRoLzIsIGNvb=
nRleHQuY2FudmFzLmhlaWdodC8yKTsNCiAgIGNvbnRleHQuc2NhbGUoMC45LCAwLjkpOw0KIC=
AgY29udGV4dC50cmFuc2xhdGUoLWNvbnRleHQuY2FudmFzLndpZHRoLzIsIC1jb250ZXh0LmN=
hbnZhcy5oZWlnaHQvMik7DQogICBjb250ZXh0LmJlZ2luUGF0aCgpOw0KICAgY29udGV4dC5s=
aW5lV2lkdGggPSA1ICsgTWF0aC5yYW5kb20oKSAqIDEwOw0KICAgY29udGV4dC5tb3ZlVG8ob=
GFzdFgsIGxhc3RZKTsNCiAgIGxhc3RYID0gY29udGV4dC5jYW52YXMud2lkdGggKiBNYXRoLn=
JhbmRvbSgpOw0KICAgbGFzdFkgPSBjb250ZXh0LmNhbnZhcy5oZWlnaHQgKiBNYXRoLnJhbmR=
vbSgpOw0KICAgY29udGV4dC5iZXppZXJDdXJ2ZVRvKGNvbnRleHQuY2FudmFzLndpZHRoICog=
TWF0aC5yYW5kb20oKSwNCiAgICAgICAgICAgICAgICAgICAgICAgICBjb250ZXh0LmNhbnZhc=
y5oZWlnaHQgKiBNYXRoLnJhbmRvbSgpLA0KICAgICAgICAgICAgICAgICAgICAgICAgIGNvbn=
RleHQuY2FudmFzLndpZHRoICogTWF0aC5yYW5kb20oKSwNCiAgICAgICAgICAgICAgICAgICA=
gICAgICBjb250ZXh0LmNhbnZhcy5oZWlnaHQgKiBNYXRoLnJhbmRvbSgpLA0KICAgICAgICAg=
ICAgICAgICAgICAgICAgIGxhc3RYLCBsYXN0WSk7DQoNCiAgIGh1ZSA9IGh1ZSArIDEwICogT=
WF0aC5yYW5kb20oKTsNCiAgIGNvbnRleHQuc3Ryb2tlU3R5bGUgPSAnaHNsKCcgKyBodWUgKy=
AnLCA1MCUsIDUwJSknOw0KICAgY29udGV4dC5zaGFkb3dDb2xvciA9ICd3aGl0ZSc7DQogICB=
jb250ZXh0LnNoYWRvd0JsdXIgPSAxMDsNCiAgIGNvbnRleHQuc3Ryb2tlKCk7DQogICBjb250=
ZXh0LnJlc3RvcmUoKTsNCiB9DQogc2V0SW50ZXJ2YWwobGluZSwgNTApOw0KDQogZnVuY3Rpb=
24gYmxhbmsoKSB7DQogICBjb250ZXh0LmZpbGxTdHlsZSA9ICdyZ2JhKDAsMCwwLDAuMSknOw=
0KICAgY29udGV4dC5maWxsUmVjdCgwLCAwLCBjb250ZXh0LmNhbnZhcy53aWR0aCwgY29udGV=
4dC5jYW52YXMuaGVpZ2h0KTsNCiB9DQogc2V0SW50ZXJ2YWwoYmxhbmssIDQwKTsNCg0KPC9z=
Y3JpcHQ%2BDQogPC9ib2R5Pg0KPC9odG1sPg0K">pretty glowing lines</=
a>.</p>
+
+  <pre><canvas width=3D"800" height=3D"450&q=
uot;></canvas>
+<script>
+
+ var context =3D document.getElementsByTagName('canvas')[0].getContext('=
2d');
+
+ var lastX =3D context.canvas.width * Math.random();
+ var lastY =3D context.canvas.height * Math.random();
+ var hue =3D 0;
+ function line() {
+   context.save();
+   context.translate(context.canvas.width/2, context.canvas.height/2);
+   context.scale(0.9, 0.9);
+   context.translate(-context.canvas.width/2, -context.canvas.height/2);
+   context.beginPath();
+   context.lineWidth =3D 5 + Math.random() * 10;
+   context.moveTo(lastX, lastY);
+   lastX =3D context.canvas.width * Math.random();
+   lastY =3D context.canvas.height * Math.random();
+   context.bezierCurveTo(context.canvas.width * Math.random(),
+                         context.canvas.height * Math.random(),
+                         context.canvas.width * Math.random(),
+                         context.canvas.height * Math.random(),
+                         lastX, lastY);
+
+   hue =3D hue + 10 * Math.random();
+   context.strokeStyle =3D 'hsl(' + hue + ', 50%, 50%)';
+   context.shadowColor =3D 'white';
+   context.shadowBlur =3D 10;
+   context.stroke();
+   context.restore();
+ }
+ setInterval(line, 50);
+
+ function blank() {
+   context.fillStyle =3D 'rgba(0,0,0,0.1)';
+   context.fillRect(0, 0, context.canvas.width, context.canvas.height);
+ }
+ setInterval(blank, 40);
+
+</script></pre>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>The 2D rendering context for <code><a href=3D#the-c=
anvas-element>canvas</a></code> is often used for sprite-b=
ased games. The
+   following example demonstrates this:</p>
+
+   <iframe src=3D/demos/canvas/blue-robot/index.html width=3D396 heig=
ht=3D216></iframe>
+
+   <p>Here is the source for this example:</p>
+
+   <pre><!DOCTYPE HTML>
+<title>Blue Robot Demo</title>
+<base href=3D"http://www.whatwg.org/demos/canvas/blue-robot/=
">
+<style>
+  html { overflow: hidden; min-height: 200px; min-width: 380px; }
+  body { height: 200px; position: relative; margin: 8px; }
+  .buttons { position: absolute; bottom: 0px; left: 0px; margin: 4px; }
+</style>
+<canvas width=3D"380" height=3D"200">&=
amp;lt;/canvas>
+<script>
+ var Landscape =3D function (context, width, height) {
+   this.offset =3D 0;
+   this.width =3D width;
+   this.advance =3D function (dx) {
+     this.offset +=3D dx;
+   };
+   this.horizon =3D height * 0.7;
+   // This creates the sky gradient (from a darker blue to white at the =
bottom)
+   this.sky =3D context.createLinearGradient(0, 0, 0, this.horizon);
+   this.sky.addColorStop(0.0, 'rgb(55,121,179)');
+   this.sky.addColorStop(0.7, 'rgb(121,194,245)');
+   this.sky.addColorStop(1.0, 'rgb(164,200,214)');
+   // this creates the grass gradient (from a darker green to a lighter =
green)
+   this.earth =3D context.createLinearGradient(0, this.horizon, 0, heigh=
t);
+   this.earth.addColorStop(0.0, 'rgb(81,140,20)');
+   this.earth.addColorStop(1.0, 'rgb(123,177,57)');
+   this.paintBackground =3D function (context, width, height) {
+     // first, paint the sky and grass rectangles
+     context.fillStyle =3D this.sky;
+     context.fillRect(0, 0, width, this.horizon);
+     context.fillStyle =3D this.earth;
+     context.fillRect(0, this.horizon, width, height-this.horizon);
+     // then, draw the cloudy banner
+     // we make it cloudy by having the draw text off the top of the
+     // canvas, and just having the blurred shadow shown on the canvas
+     context.save();
+     context.translate(width-((this.offset+(this.width*3.2)) % (this.wid=
th*4.0))+0, 0);
+     context.shadowColor =3D 'white';
+     context.shadowOffsetY =3D 30+this.horizon/3; // offset down on canv=
as
+     context.shadowBlur =3D '5';
+     context.fillStyle =3D 'white';
+     context.textAlign =3D 'left';
+     context.textBaseline =3D 'top';
+     context.font =3D '20px sans-serif';
+     context.fillText('WHATWG ROCKS', 10, -30); // text up above canvas
+     context.restore();    =20
+     // then, draw the background tree
+     context.save();
+     context.translate(width-((this.offset+(this.width*0.2)) % (this.wid=
th*1.5))+30, 0);
+     context.beginPath();
+     context.fillStyle =3D 'rgb(143,89,2)';
+     context.lineStyle =3D 'rgb(10,10,10)';
+     context.lineWidth =3D 2;
+     context.rect(0, this.horizon+5, 10, -50); // trunk
+     context.fill();
+     context.stroke();
+     context.beginPath();
+     context.fillStyle =3D 'rgb(78,154,6)';
+     context.arc(5, this.horizon-60, 30, 0, Math.PI*2); // leaves
+     context.fill();
+     context.stroke();
+     context.restore();
+   };
+   this.paintForeground =3D function (context, width, height) {
+     // draw the box that goes in front
+     context.save();
+     context.translate(width-((this.offset+(this.width*0.7)) % (this.wid=
th*1.1))+0, 0);
+     context.beginPath();
+     context.rect(0, this.horizon - 5, 25, 25);
+     context.fillStyle =3D 'rgb(220,154,94)';
+     context.lineStyle =3D 'rgb(10,10,10)';
+     context.lineWidth =3D 2;
+     context.fill();
+     context.stroke();
+     context.restore();
+   };
+ };
+</script>
+<script>
+ var BlueRobot =3D function () {
+   this.sprites =3D new Image();
+   this.sprites.src =3D 'blue-robot.png'; // this sprite sheet has 8 cel=
ls
+   this.targetMode =3D 'idle';
+   this.walk =3D function () {
+     this.targetMode =3D 'walk';
+   };
+   this.stop =3D function () {
+     this.targetMode =3D 'idle';
+   };
+   this.frameIndex =3D {
+     'idle': [0], // first cell is the idle frame
+     'walk': [1,2,3,4,5,6], // the walking animation is cells 1-6
+     'stop': [7], // last cell is the stopping animation
+   };
+   this.mode =3D 'idle';
+   this.frame =3D 0; // index into frameIndex
+   this.tick =3D function () {
+     // this advances the frame and the robot
+     // the return value is how many pixels the robot has moved
+     this.frame +=3D 1;
+     if (this.frame >=3D this.frameIndex[this.mode].length) {
+       // we've reached the end of this animation cycle
+       this.frame =3D 0;
+       if (this.mode !=3D this.targetMode) {
+         // switch to next cycle
+         if (this.mode =3D=3D 'walk') {
+           // we need to stop walking before we decide what to do next
+           this.mode =3D 'stop';
+         } else if (this.mode =3D=3D 'stop') {
+           if (this.targetMode =3D=3D 'walk')
+             this.mode =3D 'walk';
+           else
+             this.mode =3D 'idle';
+         } else if (this.mode =3D=3D 'idle') {
+           if (this.targetMode =3D=3D 'walk')
+             this.mode =3D 'walk';
+         }
+       }
+     }
+     if (this.mode =3D=3D 'walk')
+       return 8;
+     return 0;
+   },
+   this.paint =3D function (context, x, y) {
+     if (!this.sprites.complete) return;
+     // draw the right frame out of the sprite sheet onto the canvas
+     // we assume each frame is as high as the sprite sheet
+     // the x,y coordinates give the position of the bottom center of th=
e sprite
+     context.drawImage(this.sprites,
+                       this.frameIndex[this.mode][this.frame] * this.spr=
ites.height, 0, this.sprites.height, this.sprites.height,
+                       x-this.sprites.height/2, y-this.sprites.height, t=
his.sprites.height, this.sprites.height);
+   };
+ };
+</script>
+<script>
+ var canvas =3D document.getElementsByTagName('canvas')[0];
+ var context =3D canvas.getContext('2d');
+ var landscape =3D new Landscape(context, canvas.width, canvas.height);
+ var blueRobot =3D new BlueRobot();
+ // paint when the browser wants us to, using requestAnimationFrame()
+ function paint() {
+   context.clearRect(0, 0, canvas.width, canvas.height);
+   landscape.paintBackground(context, canvas.width, canvas.height);
+   blueRobot.paint(context, canvas.width/2, landscape.horizon*1.1);
+   landscape.paintForeground(context, canvas.width, canvas.height);
+   requestAnimationFrame(paint);
+ }
+ paint();
+ // but tick every 150ms, so that we don't slow down when we don't paint
+ setInterval(function () {
+   var dx =3D blueRobot.tick();
+   landscape.advance(dx);
+ }, 100);
+</script>
+<p class=3D"buttons">
+ <input type=3Dbutton value=3D"Walk" onclick=3D"bl=
ueRobot.walk()">
+ <input type=3Dbutton value=3D"Stop" onclick=3D"bl=
ueRobot.stop()">
+<footer>
+ <small> Blue Robot Player Sprite by <a href=3D&quo=
t;http://johncolburn.deviantart.com/">JohnColburn</a&a=
mp;gt;.
+ Licensed under the terms of the Creative Commons Attribution Share-Alik=
e 3.0 Unported license.</small>
+ <small> This work is itself licensed under a <a re=
l=3D"license" href=3D"http://creativecommons.org/licenses/=
by-sa/3.0/">Creative
+ Commons Attribution-ShareAlike 3.0 Unported License</a>.&=
amp;lt;/small>
+</footer>
+</pre>
+
+  </div>
+
+
+
+ =20
+
+
+  <h5 id=3Dpixel-density><span class=3Dsecno>4.12.4.3 </s=
pan>Pixel density</h5>
+
+  <p>The user agent may use any square pixel density for the bitma=
ps of a <code><a href=3D#the-canvas-element>canvas</a>&=
lt;/code> and
+  its rendering contexts. Once a <code><a href=3D#the-canvas-el=
ement>canvas</a></code> has a bitmap, that canvas must kee=
p its
+  resolution for its lifetime.</p>
+
+  <p class=3Dnote>In general, user agents are encouraged to use a =
pixel density equal to the screen
+  pixel density. Ideally, the number of device pixels per CSS pixel woul=
d be a multiple of two.
+  Several factors can affect the screen pixel density: most prominently =
the actual display pixel
+  density, but also important is the current zoom level.</p>
+
+  <p>All the bitmaps created during a single <a href=3D#concept=
-task title=3Dconcept-task>task</a> for
+  <code><a href=3D#the-canvas-element>canvas</a></c=
ode> elements and <code><a href=3D#canvasrenderingcontext2d&g=
t;CanvasRenderingContext2D</a></code> objects must have the s=
ame
+  pixel density.
+  <a href=3D#fingerprinting-vector class=3Dfingerprint title=3D"=
fingerprinting vector"><img src=3Dhttp://images.whatwg.org/fin=
gerprint.png width=3D46 alt=3D"(This is a fingerprinting vector.)&qu=
ot; height=3D64></a>
+  </p>
+
+  <pre class=3Didl>partial interface <a href=3D#screen id=3DScr=
een-partial>Screen</a> {
+  readonly attribute double <a href=3D#dom-screen-canvasresolution ti=
tle=3Ddom-screen-canvasResolution>canvasResolution</a>;
+};</pre>
+
+  <dl class=3Ddomintro><dt><var title=3D"">w=
indow</var> . <code title=3Ddom-Window-screen>screen</code=
> . <code title=3Ddom-screen-canvasResolution><a href=3D#dom-=
screen-canvasresolution>canvasResolution</a></code></dt=
>
+
+   <dd>
+
+    <p>Returns the pixel density that has been, or will be, used f=
or bitmaps during this <a href=3D#concept-task title=3Dconcept-task&gt=
;task</a>.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-screen-canvasresolution title=3Ddom-scre=
en-canvasResolution><code>canvasResolution</code></dfn&=
gt; attribute of
+  the <code><a href=3D#screen>Screen</a></code> =
object must return the pixel density, in image pixels per coordinate spac=
e
+  units, that any <code><a href=3D#the-canvas-element>canvas=
</a></code> and <code><a href=3D#canvasrenderingcont=
ext2d>CanvasRenderingContext2D</a></code> bitmaps created
+  during this <a href=3D#concept-task title=3Dconcept-task>task&lt=
;/a> will use (or have used). <a href=3D#refsCSSOMVIEW>[CSSOMVIE=
W]</a></p>
+
+  </div>
+
+
+
+  <div class=3Dimpl>
+
+  <h5 id=3Dcolor-spaces-and-color-correction><span class=3Dsecn=
o>4.12.4.4 </span>Color spaces and color correction</h5>
+
+  <p>The <code><a href=3D#the-canvas-element>canvas&lt=
;/a></code> APIs must perform color correction at only two point=
s: when rendering
+  images with their own gamma correction and color space information ont=
o a bitmap, to convert the
+  image to the color space used by the bitmaps (e.g. using the 2D Contex=
t's <code title=3Ddom-context-2d-drawImage><a href=3D#dom-contex=
t-2d-drawimage>drawImage()</a></code> method with an <c=
ode><a href=3D#htmlimageelement>HTMLImageElement</a></c=
ode>
+  object), and when rendering the actual canvas bitmap to the output dev=
ice.</p>
+
+  <p class=3Dnote>Thus, in the 2D context, colors used to draw sha=
pes onto the canvas will exactly
+  match colors obtained through the <code title=3Ddom-context-2d-getI=
mageDataHD><a href=3D#dom-context-2d-getimagedatahd>getImageData=
HD()</a></code> method.</p>
+
+  <p>The <code title=3Ddom-canvas-toDataURL><a href=3D#do=
m-canvas-todataurl>toDataURL()</a></code> and <code tit=
le=3Ddom-canvas-toDataURLHD><a href=3D#dom-canvas-todataurlhd>to=
DataURLHD()</a></code> methods must not include color space
+  information in the resources they return. Where the output format allo=
ws it, the color of pixels
+  in resources created by <code title=3Ddom-canvas-toDataURL><a=
 href=3D#dom-canvas-todataurl>toDataURL()</a></code> must =
match those
+  returned by the <code title=3Ddom-context-2d-getImageData><a =
href=3D#dom-context-2d-getimagedata>getImageData()</a></code&=
gt; method, and the
+  color of pixels in resources created by <code title=3Ddom-canvas-to=
DataURLHD><a href=3D#dom-canvas-todataurlhd>toDataURLHD()</a&=
gt;</code>
+  must match those returned by the <code title=3Ddom-context-2d-getIm=
ageDataHD><a href=3D#dom-context-2d-getimagedatahd>getImageDataH=
D()</a></code> method.</p>
+
+  <p>In user agents that support CSS, the color space used by a &l=
t;code><a href=3D#the-canvas-element>canvas</a></code&g=
t; element must
+  match the color space used for processing any colors for that element =
in CSS.</p>
+
+  <p>The gamma correction and color space information of images mu=
st be handled in such a way that
+  an image rendered directly using an <code><a href=3D#the-img-=
element>img</a></code> element would use the same colors a=
s one
+  painted on a <code><a href=3D#the-canvas-element>canvas&lt=
;/a></code> element that is then itself rendered. Furthermore, t=
he rendering
+  of images that have no color correction information (such as those ret=
urned by the <code title=3Ddom-canvas-toDataURL><a href=3D#dom-c=
anvas-todataurl>toDataURL()</a></code> method) must be ren=
dered with no color
+  correction.</p>
+
+  <p class=3Dnote>Thus, in the 2D context, calling the <code ti=
tle=3Ddom-context-2d-drawImage><a href=3D#dom-context-2d-drawimage&=
gt;drawImage()</a></code> method to render the output of the =
<code title=3Ddom-canvas-toDataURLHD><a href=3D#dom-canvas-todat=
aurlhd>toDataURLHD()</a></code> method to the canvas, give=
n the appropriate
+  dimensions, has no visible effect.</p>
+
+  </div>
+
+
+
+  <h5 id=3Dserializing-bitmaps-to-a-file><span class=3Dsecno&gt=
;4.12.4.5 </span>Serializing bitmaps to a file</h5>
+
+  <div class=3Dimpl>
+
+  <p>When a user agent is to create <dfn id=3Da-serialization-o=
f-the-bitmap-as-a-file>a serialization of the bitmap as a file</dfn=
>, optionally
+  with some given <var title=3D"">arguments</var>,=
 and optionally with a <var title=3D"">native</var>
+  flag set, it must create an image file in the format given by the firs=
t value of <var title=3D"">arguments</var>, or, if =
there are no <var title=3D"">arguments</var>, in th=
e PNG format. <a href=3D#refsPNG>[PNG]</a></p>
+
+  <p>If the <var title=3D"">native</var> fla=
g is set, or if the bitmap has one pixel per coordinate
+  space unit, then the image file must have the same pixel data (before =
compression, if applicable)
+  as the bitmap, and if the file format used supports encoding resolutio=
n metadata, the resolution
+  of that bitmap (device pixels per coordinate space units being interpr=
eted as image pixels per CSS
+  pixel) must be given as well.</p>
+
+  <p>Otherwise, the image file's pixel data must be the bitmap's p=
ixel data scaled to one image
+  pixel per coordinate space unit, and if the file format used supports =
encoding resolution
+  metadata, the resolution must be given as 96dpi (one image pixel per C=
SS pixel).</p>
+
+  <p>If <var title=3D"">arguments</var> is n=
ot empty, the first value must be interpreted as a <a href=3D#mime-typ=
e title=3D"MIME type">MIME type</a> giving the format =
to use. If the type has any parameters, it
+  must be treated as not supported.</p>
+
+  <p class=3Dexample>For example, the value "<code>imag=
e/png</code>" would mean to generate a PNG
+  image, the value "<code>image/jpeg</code>" would=
 mean to generate a JPEG image, and the value
+  "<code>image/svg+xml</code>" would mean to gener=
ate an SVG image (which would require that the
+  user agent track how the bitmap was generated, an unlikely, though pot=
entially awesome,
+  feature).</p>
+
+  <p>User agents must support PNG ("<code>image/png<=
/code>"). User agents may support other types.
+  If the user agent does not support the requested type, it must create =
the file using the PNG
+  format. <a href=3D#refsPNG>[PNG]</a></p>
+
+  <p>User agents must <a href=3D#converted-to-ascii-lowercase t=
itle=3D"converted to ASCII lowercase">convert the provided t=
ype to ASCII
+  lowercase</a> before establishing if they support that type.<=
/p>
+
+  <p>For image types that do not support an alpha channel, the ser=
ialized image must be the bitmap
+  image composited onto a solid black background using the source-over o=
perator.</p>
+
+  <p>If the first argument in <var title=3D"">argu=
ments</var> gives a type corresponding to one of the
+  types given in the first column of the following table, and the user a=
gent supports that type,
+  then the subsequent arguments, if any, must be treated as described in=
 the second cell of that
+  row.</p>
+
+  </div>
+
+  <table id=3Dcanvas-serialization-arguments><caption>Argume=
nts for serialization methods</caption>
+   <thead><tr><th> Type <th> Other arguments &lt=
;th> Reference
+   <tbody><tr><td> <code>image/jpeg</code>
+     <td> The second argument<span class=3Dimpl>, if it</=
span> is a number in the range 0.0 to 1.0
+     inclusive<span class=3Dimpl>, must be</span> treated as=
 the desired quality level. <span class=3Dimpl>If it is not a numbe=
r or is outside that range, the user agent must use its
+     default value, as if the argument had been omitted.</span>
+     <td> <a href=3D#refsJPEG>[JPEG]</a>
+  </table><div class=3Dimpl>
+
+  <p>For the purposes of these rules, an argument is considered to=
 be a number if it is converted to
+  an IDL double value by the rules for handling arguments of type <co=
de title=3D"">any</code> in the
+  Web IDL specification. <a href=3D#refsWEBIDL>[WEBIDL]</a>&=
lt;/p>
+
+  <p>Other arguments must be ignored and must not cause the user a=
gent to throw an exception. A
+  future version of this specification will probably define other parame=
ters to be passed to these
+  methods to allow authors to more carefully control compression setting=
s, image metadata, etc.</p>
+
+  </div>
+
+
+<!--ADD-TOPIC:Security-->
+  <div class=3Dimpl>
+
+  <h5 id=3Dsecurity-with-canvas-elements><span class=3Dsecno&gt=
;4.12.4.6 </span>Security with <code><a href=3D#the-canvas=
-element>canvas</a></code> elements</h5>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <p><strong>Information leakage</strong> can occur if=
 scripts from one <a href=3D#origin>origin</a> can
+  access information (e.g. read pixels) from images from another origin =
(one that isn't the <a href=3D#same-origin title=3D"same origin&q=
uot;>same</a>).</p>
+
+  <p>To mitigate this, bitmaps used with <code><a href=3D=
#the-canvas-element>canvas</a></code> elements are defined=
 to have a flag
+  indicating whether they are <a href=3D#concept-canvas-origin-clean =
title=3Dconcept-canvas-origin-clean>origin-clean</a>. All
+  bitmaps start with their <a href=3D#concept-canvas-origin-clean tit=
le=3Dconcept-canvas-origin-clean>origin-clean</a> set to
+  true. The flag is set to false when cross-origin images or fonts are u=
sed.</p>
+
+  <p>The <code title=3Ddom-canvas-toDataURL><a href=3D#do=
m-canvas-todataurl>toDataURL()</a></code>, <code title=3D=
dom-canvas-toDataURLHD><a href=3D#dom-canvas-todataurlhd>toDataU=
RLHD()</a></code>, <code title=3Ddom-canvas-toBlob><=
a href=3D#dom-canvas-toblob>toBlob()</a></code>, <code =
title=3Ddom-context-2d-getImageData><a href=3D#dom-context-2d-getim=
agedata>getImageData()</a></code>, and <code title=3Ddo=
m-context-2d-getImageDataHD><a href=3D#dom-context-2d-getimagedatah=
d>getImageDataHD()</a></code> methods check the flag and w=
ill
+  throw a <code><a href=3D#securityerror>SecurityError</a=
></code> exception rather than leak cross-origin data.</p>
+
+  <p>The flag can be reset in certain situations; for example, whe=
n a
+  <code><a href=3D#canvasrenderingcontext2d>CanvasRenderingC=
ontext2D</a></code> is bound to a new <code><a href=3D=
#the-canvas-element>canvas</a></code>, the bitmap is clear=
ed
+  and its flag reset.</p>
+
+  </div>
+<!--REMOVE-TOPIC:Security-->
+
+
+<!--TOPIC:HTML-->
+  <h3 id=3Dcommon-idioms><span class=3Dsecno>4.13 </span&=
gt;Common idioms without dedicated elements</h3>
+
+  <h4 id=3Dthe-main-part-of-the-content><span class=3Dsecno>=
4.13.1 </span>The main part of the content</h4>
+
+  <p>The main content of a page — not including headers =
and footers, navigation links,
+  sidebars, advertisements, and so forth — can be marked up in=
 a variety of ways, depending on
+  the needs of the author.</p>
+
+  <p>The simplest solution is to not mark up the main content at a=
ll, and just leave it as implicit.
+  Another way to think of this is that the <code><a href=3D#the=
-body-element>body</a></code> elements marks up the main c=
ontent of
+  the page, and the bits that aren't main content are excluded through t=
he use of more appropriate
+  elements like <code><a href=3D#the-aside-element>aside<=
/a></code> and <code><a href=3D#the-nav-element>nav&=
lt;/a></code>.</p>
+
+  <div class=3Dexample>
+
+   <p>Here is a short Web page marked up along this minimalistic s=
chool of thought. The main content
+   is highlighted. Notice how all the <em>other</em> content=
 in the <code><a href=3D#the-body-element>body</a></=
code> is marked up
+   with elements to indicate that it's not part of the main content, in =
this case
+   <code><a href=3D#the-header-element>header</a></=
code>, <code><a href=3D#the-nav-element>nav</a></=
code>, and <code><a href=3D#the-footer-element>footer</=
a></code>.</p>
+
+   <pre><!DOCTYPE HTML>
+<html>
+ <head>
+  <title> My Toys </title>
+ </head>
+ <body>
+  <header>
+   <h1>My toys</h1>
+  </header>
+  <nav>
+   <p><a href=3D"/">Home</a=
></p>
+   <p><a href=3D"/contact">Contact=
</a></p>
+  </nav>
+<strong>  <p>I really like my chained book and my te=
lephone. I'm not such a
+  fan of my big ball.</p>
+  <p>Another toy I like is my mirror.</p>&lt=
;/strong>
+  <footer>
+   <p>© copyright 2010 by the boy</p&g=
t;
+  </footer>
+ </body>
+</html></pre>
+
+  </div>
+
+  <p>If the main content is an independent unit of content that on=
e could imagine syndicating
+  independently, then the <code><a href=3D#the-article-element&=
gt;article</a></code> element would be appropriate to mark up=
 the main
+  content of the document.</p>
+
+  <div class=3Dexample>
+
+   <p>The document in the previous example is here recast as a blo=
g post:</p>
+
+   <pre><!DOCTYPE HTML>
+<html>
+ <head>
+  <title> The Boy Blog: My Toys </title>
+ </head>
+ <body>
+  <header>
+   <h1>The Boy Blog</h1>
+  </header>
+  <nav>
+   <p><a href=3D"/">Home</a=
></p>
+   <p><a href=3D"/contact">Contact=
</a></p>
+  </nav>
+<strong>  <article>
+   <header>
+    <h1>My toys</h1>
+    <p>Published August 4th</p>
+   </header>
+   <p>I really like my chained book and my telephone. I'm =
not such a
+   fan of my big ball.</p>
+   <p>Another toy I like is my mirror.</p>
+  </article></strong>
+  <footer>
+   <p>© copyright 2010 by the boy</p&g=
t;
+  </footer>
+ </body>
+</html></pre>
+
+  </div>
+
+  <p>If the main content is not an independent unit of content so =
much as a section of a larger
+  work, for instance a chapter, then the <code><a href=3D#the-s=
ection-element>section</a></code> element would be appropr=
iate to mark
+  up the main content of the document.</p>
+
+  <div class=3Dexample>
+
+   <p>Here is the same document, but as a chapter in an online boo=
k:</p>
+
+   <pre><!DOCTYPE HTML>
+<html>
+ <head>
+  <title> Chapter 2: My Toys — The Book of the B=
oy </title>
+ </head>
+ <body>
+  <header>
+   <hgroup>
+    <h1>The Book of the Boy</h1>
+    <h2>A book about boy stuff</h2>
+   </hgroup>
+  </header>
+  <nav>
+   <p><a href=3D"/">Front Page&amp=
;lt;/a></p>
+   <p><a href=3D"/toc">Table of Co=
ntents</a></p>
+   <p><a href=3D"/c1">Chapter 1&am=
p;lt;/a> — <a href=3D"/c3">Chapt=
er 3</a></p>
+  </nav>
+<strong>  <section>
+   <h1>Chapter 2: My Toys</h1>
+   <p>I really like my chained book and my telephone. I'm =
not such a
+   fan of my big ball.</p>
+   <p>Another toy I like is my mirror.</p>
+  </section></strong>
+ </body>
+</html></pre>
+
+  </div>
+
+  <p>If neither <code><a href=3D#the-article-element>a=
rticle</a></code> nor <code><a href=3D#the-section-e=
lement>section</a></code> would be appropriate, but the ma=
in
+  content still needs an explicit element, for example for styling purpo=
ses, then the
+  <code><a href=3D#the-main-element>main</a></code&=
gt; element can be used.</p>
+
+  <div class=3Dexample>
+
+   <p>This is the same as the original example, but using <code=
><a href=3D#the-main-element>main</a></code> for the=
 main content
+   instead of leaving it implied:</p>
+
+   <pre><!DOCTYPE HTML>
+<html>
+ <head>
+  <title> My Toys </title>
+  <style>
+   body > main { background: navy; color: yellow; }
+  </style>
+ </head>
+ <body>
+  <header>
+   <h1>My toys</h1>
+  </header>
+  <nav>
+   <p><a href=3D"/">Home</a=
></p>
+   <p><a href=3D"/contact">Contact=
</a></p>
+  </nav>
+<strong>  <main>
+   <p>I really like my chained book and my telephone. I'm =
not such a
+   fan of my big ball.</p>
+   <p>Another toy I like is my mirror.</p>
+  </main></strong>
+  <footer>
+   <p>© copyright 2010 by the boy</p&g=
t;
+  </footer>
+ </body>
+</html></pre>
+
+  </div>
+
+
+  <h4 id=3Drel-up><span class=3Dsecno>4.13.2 </span>Br=
ead crumb navigation</h4>
+
+  <p>This specification does not provide a machine-readable way of=
 describing bread-crumb navigation
+  menus. Authors are encouraged to just use a series of links in a parag=
raph. The <code><a href=3D#the-nav-element>nav</a></=
code>
+  element can be used to mark the section containing these paragraphs as=
 being navigation
+  blocks.</p>
+
+  <div class=3Dexample>
+
+   <p>In the following example, the current page can be reached vi=
a two paths. ("<code title=3D"">></cod=
e>" is the "<code title=3D"">></co=
de>" character.)</p>
+
+   <pre><nav>
+ <p>
+  <a href=3D"/">Main</a> &=
gt;
+  <a href=3D"/products/">Products</a&=
gt; >
+  <a href=3D"/products/dishwashers/">Dishwashers=
</a> >
+  <a>Second hand</a>
+ </p>
+ <p>
+  <a href=3D"/">Main</a> &=
gt;
+  <a href=3D"/second-hand/">Second hand</=
a> >
+  <a>Dishwashers</a>
+ </p>
+</nav></pre>
+
+  </div>
+
+
+  <h4 id=3Dtag-clouds><span class=3Dsecno>4.13.3 </span&g=
t;Tag clouds</h4>
+
+  <p id=3Dtag-cloud>This specification does not define any markup =
specifically for marking up lists
+  of keywords that apply to a group of pages (also known as <i>tag=
 clouds</i>). In general, authors
+  are encouraged to either mark up such lists using <code><a hr=
ef=3D#the-ul-element>ul</a></code> elements with explicit =
inline
+  counts that are then hidden and turned into a presentational effect us=
ing a style sheet, or to use
+  SVG.</p>
+
+  <div class=3Dexample>
+
+   <p>Here, three tags are included in a short tag cloud:</p&gt=
;
+
+   <pre><style>
+ at media screen, print, handheld, tv {
+  /* should be ignored by non-visual browsers */
+  .tag-cloud > li > span { display: none; }
+  .tag-cloud > li { display: inline; }
+  .tag-cloud-1 { font-size: 0.7em; }
+  .tag-cloud-2 { font-size: 0.9em; }
+  .tag-cloud-3 { font-size: 1.1em; }
+  .tag-cloud-4 { font-size: 1.3em; }
+  .tag-cloud-5 { font-size: 1.5em; }
+}
+</style>
+...
+<ul class=3D"tag-cloud">
+ <li class=3D"tag-cloud-4"><a title=3D&qu=
ot;28 instances" href=3D"/t/apple">apple</a&=
amp;gt; <span>(popular)</span>
+ <li class=3D"tag-cloud-2"><a title=3D&qu=
ot;6 instances"  href=3D"/t/kiwi">kiwi</a&am=
p;gt; <span>(rare)</span>
+ <li class=3D"tag-cloud-5"><a title=3D&qu=
ot;41 instances" href=3D"/t/pear">pear</a&am=
p;gt; <span>(very popular)</span>
+</ul></pre>
+
+   <p>The actual frequency of each tag is given using the <code=
 title=3Dattr-title><a href=3D#attr-title>title</a></co=
de>
+   attribute. A CSS style sheet is provided to convert the markup into a=
 cloud of differently-sized
+   words, but for user agents that do not support CSS or are not visual,=
 the markup contains
+   annotations like "(popular)" or "(rare)" to categ=
orize the various tags by frequency, thus
+   enabling all users to benefit from the information.</p>
+
+   <p>The <code><a href=3D#the-ul-element>ul</a>=
</code> element is used (rather than <code><a href=3D#the-=
ol-element>ol</a></code>) because the order is not
+   particularly important: while the list is in fact ordered alphabetica=
lly, it would convey the
+   same information if ordered by, say, the length of the tag.</p>
+
+   <p>The <code title=3Drel-tag><a href=3D#link-type-tag&=
gt;tag</a></code> <code title=3Dattr-hyperlink-rel><=
a href=3D#attr-hyperlink-rel>rel</a></code>-keyword is
+   <em>not</em> used on these <code><a href=3D#the-=
a-element>a</a></code> elements because they do not repres=
ent tags that apply
+   to the page itself; they are just part of an index listing the tags t=
hemselves.</p>
+
+  </div>
+
+
+  <h4 id=3Dconversations><span class=3Dsecno>4.13.4 </spa=
n>Conversations</h4>
+
+  <!-- http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-Septe=
mber/022576.html -->
+
+  <p>This specification does not define a specific element for mar=
king up conversations, meeting
+  minutes, chat transcripts, dialogues in screenplays, instant message l=
ogs, and other situations
+  where different players take turns in discourse.</p>
+
+  <p>Instead, authors are encouraged to mark up conversations usin=
g <code><a href=3D#the-p-element>p</a></code> ele=
ments and
+  punctuation. Authors who need to mark the speaker for styling purposes=
 are encouraged to use
+  <code><a href=3D#the-span-element>span</a></code&=
gt; or <code><a href=3D#the-b-element>b</a></code&gt=
;. Paragraphs with their text wrapped in the <code><a href=3D#th=
e-i-element>i</a></code>
+  element can be used for marking up stage directions.</p>
+
+  <div class=3Dexample>
+
+   <p>This example demonstrates this using an extract from Abbot a=
nd Costello's famous sketch,
+   <cite>Who's on first</cite>:</p>
+
+<pre><p> Costello: Look, you gotta first baseman?
+<p> Abbott: Certainly.
+<p> Costello: Who's playing first?
+<p> Abbott: That's right.
+<p> Costello becomes exasperated.
+<p> Costello: When you pay off the first baseman every mon=
th, who gets the money?
+<p> Abbott: Every dollar of it.</pre>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>The following extract shows how an IM conversation log could=
 be marked up, using the
+   <code><a href=3D#the-data-element>data</a></code=
> element to provide Unix timestamps for each line. Note that the time=
stamps are
+   provided in a format that the <code><a href=3D#the-time-elem=
ent>time</a></code> element does not support, so the
+   <code><a href=3D#the-data-element>data</a></code=
> element is used instead (namely, Unix <code title=3D""&=
gt;time_t</code> timestamps).
+   Had the author wished to mark up the data using one of the date and t=
ime formats supported by the
+   <code><a href=3D#the-time-element>time</a></code=
> element, that element could have been used instead of <code>&l=
t;a href=3D#the-data-element>data</a></code>. This
+   could be advantageous as it would allow data analysis tools to detect=
 the timestamps
+   unambiguously, without coordination with the page author.</p>
+
+   <pre><p> <data value=3D"1319898155&qu=
ot;>14:22</data> <b>egof</b&amp=
;gt; I'm not that nerdy, I've only seen 30% of the star trek episodes
+<p> <data value=3D"1319898192">14:=
23</data> <b>kaj</b> if you kno=
w what percentage of the star trek episodes you have seen, you are inargu=
ably nerdy
+<p> <data value=3D"1319898200">14:=
23</data> <b>egof</b> it's unar=
guably
+<p> <data value=3D"1319898228">14:=
23</data> <i>* kaj blinks</i>
+<p> <data value=3D"1319898260">14:=
24</data> <b>kaj</b> you are no=
t helping your case</pre>
+   <!-- with thanks to http://bash.org/?854262 -->
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>HTML does not have a good way to mark up graphs, so descript=
ions of interactive conversations
+   from games are more difficult to mark up. This example shows one poss=
ible convention using
+   <code><a href=3D#the-dl-element>dl</a></code>=
 elements to list the possible responses at each point in the conversatio=
n.
+   Another option to consider is describing the conversation in the form=
 of a DOT file, and
+   outputting the result as an SVG image to place in the document. <a=
 href=3D#refsDOT>[DOT]</a></p>
+
+   <pre><p> Next, you meet a fisherman. You can say =
one of several greetings:
+<dl>
+ <dt> "Hello there!"
+ <dd>
+  <p> He responds with "Hello, how may I help you?&qu=
ot;; you can respond with:
+  <dl>
+   <dt> "I would like to buy a fish."
+   <dd> <p> He sells you a fish and the conv=
ersation finishes.
+   <dt> "Can I borrow your boat?"
+   <dd>
+    <p> He is surprised and asks "What are you offeri=
ng in return?".
+    <dl>
+     <dt> "Five gold." (if you have enough)
+     <dt> "Ten gold." (if you have enough)
+     <dt> "Fifteen gold." (if you have enough)
+     <dd> <p> He lends you his boat. The con=
versation ends.
+     <dt> "A fish." (if you have one)
+     <dt> "A newspaper." (if you have one)
+     <dt> "A pebble." (if you have one)
+     <dd> <p> "No thanks", he repl=
ies. Your conversation options       =20
+     at this point are the same as they were after asking to borrow
+     his boat, minus any options you've suggested before.
+    </dl>
+   </dd>
+  </dl>
+ </dd>
+ <dt> "Vote for me in the next election!"
+ <dd> <p> He turns away. The conversation fi=
nishes.
+ <dt> "Sir, are you aware that your fish are running =
away?"
+ <dd>
+  <p> He looks at you skeptically and says "Fish cann=
ot run, sir".
+  <dl>
+   <dt> "You got me!"
+   <dd> <p> The fisherman sighs and the conv=
ersation ends.
+   <dt> "Only kidding."
+   <dd> <p> "Good one!" he retorts=
. Your conversation options at this
+   point are the same as those following "Hello there!" above.
+   <dt> "Oh, then what are they doing?"
+   <dd> <p> He looks at his fish, giving you=
 an opportunity to steal
+   his boat, which you do. The conversation ends.
+  </dl>
+ </dd>
+</dl></pre>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>In some games, conversations are simpler: each character mer=
ely has a fixed set of lines that
+   they say. In this example, a game FAQ/walkthrough lists some of the k=
nown possible responses for
+   each character:</p>
+
+   <pre><section>
+ <h1>Dialogue</h1>
+ <p><small>Some characters repeat their line=
s in order each time you interact
+ with them, others randomly pick from amongst their lines. Those who res=
pond in
+ order have numbered entries in the lists below.</small>
+ <h2>The Shopkeeper</h2>
+ <ul>
+  <li>How may I help you?
+  <li>Fresh apples!
+  <li>A loaf of bread for madam?
+ </ul>
+ <h2>The pilot</h2>
+ <p>Before the accident:
+ <ul>
+  </li>I'm about to fly out, sorry!
+  </li>Sorry, I'm just waiting for flight clearance and th=
en I'll be off!
+ </ul>
+ <p>After the accident:
+ <ol>
+  <li>I'm about to fly out, sorry!
+  <li>Ok, I'm not leaving right now, my plane is being cle=
aned.
+  <li>Ok, it's not being cleaned, it needs a minor repair =
first.
+  <li>Ok, ok, stop bothering me! Truth is, I had a crash.
+ </ol>
+ <h2>Clan Leader</h2>
+ <p>During the first clan meeting:
+ <ul>
+  <li>Hey, have you seen my daughter? I bet she's up to so=
mething nefarious again...
+  <li>Nice weather we're having today, eh?
+  <li>The name is Bailey, Jeff Bailey. How can I help you =
today?
+  <li>A glass of water? Fresh from the well!
+ </ul>
+ <p>After the earthquake:
+ <ol>
+  <li>Everyone is safe in the shelter, we just have to put=
 out the fire!
+  <li>I'll go and tell the fire brigade, you keep hosing i=
t down!
+ </ol>
+</section></pre>
+
+  </div>
+
+
+  <h4 id=3Dfootnotes><span class=3Dsecno>4.13.5 </span&gt=
;Footnotes</h4>
+
+  <p>HTML does not have a dedicated mechanism for marking up footn=
otes. Here are the suggested
+  alternatives.</p>
+
+  <hr><p>For short inline annotations, the <code title=3D=
attr-title><a href=3D#attr-title>title</a></code> at=
tribute could <!--
+  SHOULD, modulo title-warning --> be used.</p>
+
+  <div class=3Dexample>
+
+   <p>In this example, two parts of a dialogue are annotated with =
footnote-like content using the
+   <code title=3Dattr-title><a href=3D#attr-title>title</=
a></code> attribute.</p>
+
+   <pre><p> <b>Customer</b&=
gt;: Hello! I wish to register a complaint. Hello. Miss?
+<p> <b>Shopkeeper</b>: <str=
ong><span title=3D"Colloquial pronunciation of 'What do yo=
u'"</strong>
+>Watcha</span> mean, miss?
+<p> <b>Customer</b>: Uh, I'm s=
orry, I have a cold. I wish to make a complaint.
+<p> <b>Shopkeeper</b>: Sorry, =
<span <strong>title=3D"This is, of course, a lie."=
</strong>>we're
+closing for lunch</span>.</pre>
+
+  </div>
+
+  <!-- search for title-warning if modifying this paragraph -->
+  <p class=3Dnote>Unfortunately, relying on the <code title=3Da=
ttr-title><a href=3D#attr-title>title</a></code> att=
ribute is
+  currently discouraged as many user agents do not expose the attribute =
in an accessible manner as
+  required by this specification (e.g. requiring a pointing device such =
as a mouse to cause a
+  tooltip to appear, which excludes keyboard-only users and touch-only u=
sers, such as anyone with a
+  modern phone or tablet).</p>
+
+  <p class=3Dnote>If the <code title=3Dattr-title><a href=
=3D#attr-title>title</a></code> attribute is used, CSS can=
 used to
+  draw the reader's attention to the elements with the attribute.</p&=
gt;
+
+  <div class=3Dexample>
+
+   <p>For example, the following CSS places a dashed line below el=
ements that have a <code title=3Dattr-title><a href=3D#attr-titl=
e>title</a></code> attribute.</p>
+
+   <pre>[title] { border-bottom: thin dashed; }</pre>
+
+  </div>
+
+  <hr><p>For longer annotations, the <code><a href=3D=
#the-a-element>a</a></code> element should be used, pointi=
ng to an element later
+  in the document. The convention is that the contents of the link be a =
number in square
+  brackets.</p>
+
+  <div class=3Dexample>
+
+   <p>In this example, a footnote in the dialogue links to a parag=
raph below the dialogue. The
+   paragraph then reciprocally links back to the dialogue, allowing the =
user to return to the
+   location of the footnote.</p>
+
+   <pre><p> Announcer: Number 16: The <i&=
gt;hand</i>.
+<p> Interviewer: Good evening. I have with me in the studi=
o tonight
+Mr Norman St John Polevaulter, who for the past few years has been
+contradicting people. Mr Polevaulter, why <em>do</e=
m> you
+contradict people?
+<p> Norman: I don't. <sup><a href=3D&=
quot;#fn1" id=3D"r1">[1]</a></=
sup>
+<p> Interviewer: You told me you did!
+<em>...</em>
+<section>
+ <p id=3D"fn1"><a href=3D"#r1"&=
amp;gt;[1]</a> This is, naturally, a lie,
+ but paradoxically if it were true he could not say so without
+ contradicting the interviewer and thus making it false.</p&g=
t;
+</section></pre>
+
+  </div>
+
+  <hr><p>For side notes, longer annotations that apply to en=
tire sections of the text rather than just
+  specific words or sentences, the <code><a href=3D#the-aside-e=
lement>aside</a></code> element should be used.</p>
+
+  <div class=3Dexample>
+
+   <p>In this example, a sidebar is given after a dialogue, giving=
 it some context.</p>
+
+   <pre><p> <span class=3D"speaker"=
>Customer</span>: I will not buy this record, it is =
scratched.
+<p> <span class=3D"speaker">Shopke=
eper</span>: I'm sorry?
+<p> <span class=3D"speaker">Custom=
er</span>: I will not buy this record, it is scratched.
+<p> <span class=3D"speaker">Shopke=
eper</span>: No no no, this's'a tobacconist's.
+<aside>
+ <p>In 1970, the British Empire lay in ruins, and foreign
+ nationalists frequented the streets — many of them Hungarians
+ (not the streets — the foreign nationals). Sadly, Alexander
+ Yalt has been publishing incompetently-written phrase books.
+</aside></pre>
+
+  </div>
+
+  <hr><p>For figures or tables, footnotes can be included in=
 the relevant <code><a href=3D#the-figcaption-element>figcapt=
ion</a></code> or
+  <code><a href=3D#the-caption-element>caption</a><=
/code> element, or in surrounding prose.</p>
+
+  <div class=3Dexample>
+
+   <p>In this example, a <!-- round --> table has cells with=
 footnotes that are given in prose. A
+   <code><a href=3D#the-figure-element>figure</a></=
code> element is used to give a single legend to the combination of th=
e table and
+   its footnotes.</p>
+
+   <pre><figure>
+ <figcaption>Table 1. Alternative activities for knights.&=
amp;lt;/figcaption>
+ <table>
+  <tr>
+   <th> Activity
+   <th> Location
+   <th> Cost
+  <tr>
+   <td> Dance
+   <td> Wherever possible
+   <td> £0<sup><a href=3D&q=
uot;#fn1">1</a></sup>
+  <tr>
+   <td> Routines, chorus scenes<sup><=
a href=3D"#fn2">2</a></sup>
+   <td> Undisclosed
+   <td> Undisclosed
+  <tr>
+   <td> Dining<sup><a href=3D"#f=
n3">3</a></sup>
+   <td> Camelot
+   <td> Cost of ham, jam, and spam<sup>&=
lt;a href=3D"#fn4">4</a></sup&g=
t;
+ </table>
+ <p id=3D"fn1">1. Assumed.</p>
+ <p id=3D"fn2">2. Footwork impeccable.</p=
>
+ <p id=3D"fn3">3. Quality described as "wel=
l".</p>
+ <p id=3D"fn4">4. A lot.</p>
+</figure></pre>
+
+  </div>
+
+
+  <h3 id=3Ddisabled-elements><span class=3Dsecno>4.14 </s=
pan>Disabled elements</h3>
+
+  <p>An element is said to be <dfn id=3Dconcept-element-disable=
d title=3Dconcept-element-disabled>actually disabled</dfn> if it
+  falls into one of the following categories:</p>
+
+  <ul><li><code><a href=3D#the-button-element>bu=
tton</a></code> elements that are <a href=3D#concept-fe-di=
sabled title=3Dconcept-fe-disabled>disabled</a></li>
+
+   <li><code><a href=3D#the-input-element>input</a&=
gt;</code> elements that are <a href=3D#concept-fe-disabled titl=
e=3Dconcept-fe-disabled>disabled</a></li>
+
+   <li><code><a href=3D#the-select-element>select</=
a></code> elements that are <a href=3D#concept-fe-disabled ti=
tle=3Dconcept-fe-disabled>disabled</a></li>
+
+   <li><code><a href=3D#the-textarea-element>textarea&=
lt;/a></code> elements that are <a href=3D#concept-fe-disable=
d title=3Dconcept-fe-disabled>disabled</a></li>
+
+   <li><code><a href=3D#the-optgroup-element>optgroup&=
lt;/a></code> elements that have a <code title=3Dattr-optgrou=
p-disabled><a href=3D#attr-optgroup-disabled>disabled</a>&=
lt;/code> attribute</li>
+
+   <li><code><a href=3D#the-option-element>option</=
a></code> elements that are <a href=3D#concept-option-disable=
d title=3Dconcept-option-disabled>disabled</a></li>
+
+   <li><code><a href=3D#the-menuitem-element>menuitem&=
lt;/a></code> elements that have a <code title=3Dattr-menuite=
m-disabled><a href=3D#attr-menuitem-disabled>disabled</a>&=
lt;/code> attribute</li>
+
+   <li><code><a href=3D#the-fieldset-element>fieldset&=
lt;/a></code> elements that have a <code title=3Dattr-fieldse=
t-disabled><a href=3D#attr-fieldset-disabled>disabled</a>&=
lt;/code> attribute</li>
+
+  </ul><p class=3Dnote>This definition is used to determine =
what elements can be <a href=3D#specially-focusable title=3D"tabi=
ndex
+  focus flag">focused</a> and which elements match the &lt=
;code title=3Dselector-disabled><a href=3D#selector-disabled>:di=
sabled</a></code> pseudo-class.</p>
+
+
+  <div class=3Dimpl>
+
+<!--ADD-TOPIC:CSS-->
+
+  <h3 id=3Dselectors><span class=3Dsecno>4.15 </span>M=
atching HTML elements using selectors</h3>
+
+  <h4 id=3Dcase-sensitivity><span class=3Dsecno>4.15.1 </=
span>Case-sensitivity</h4>
+
+  <p>The Selectors specification leaves the case-sensitivity of ID=
s, classes, element names,
+  attribute names, and attribute values to be defined by the host langua=
ge. <a href=3D#refsSELECTORS>[SELECTORS]</a></p>
+
+  <p>The <a href=3D#concept-id title=3Dconcept-id>unique ide=
ntifier</a> of <a href=3D#html-elements>HTML elements</a&g=
t; in
+  documents that are in <a href=3D#quirks-mode>quirks mode</a&g=
t; must be treated as <a href=3D#ascii-case-insensitive>ASCII
+  case-insensitive</a> for the purposes of selector matching.</=
p>
+
+  <p>Classes from the <code title=3Dattr-class><a href=3D=
#classes>class</a></code> attribute of <a href=3D#html-=
elements>HTML elements</a>
+  in documents that are in <a href=3D#quirks-mode>quirks mode</=
a> must be treated as <a href=3D#ascii-case-insensitive>ASCII
+  case-insensitive</a> for the purposes of selector matching.</=
p>
+
+  <p>When comparing a CSS element type selector to the names of &l=
t;a href=3D#html-elements>HTML elements</a> in
+  <a href=3D#html-documents>HTML documents</a>, the CSS elem=
ent type selector must first be <a href=3D#converted-to-ascii-lowercas=
e>converted to ASCII
+  lowercase</a>. The same selector when compared to other elements=
 must be compared according to
+  its original case. In both cases, the comparison is <a href=3D#case=
-sensitive>case-sensitive</a>.</p>
+  <!-- http://software.hixie.ch/utilities/js/live-dom-viewer/?saved=3D=
2623 -->
+
+  <p>When comparing the name part of a CSS attribute selector to t=
he names of namespace-less
+  attributes on <a href=3D#html-elements>HTML elements</a> i=
n <a href=3D#html-documents>HTML documents</a>, the name part=
 of the CSS
+  attribute selector must first be <a href=3D#converted-to-ascii-lowe=
rcase>converted to ASCII lowercase</a>. The same selector when
+  compared to other attributes must be compared according to its origina=
l case. In both cases, the
+  comparison is <a href=3D#case-sensitive>case-sensitive</a>=
.</p>
+  <!-- http://software.hixie.ch/utilities/js/live-dom-viewer/?saved=3D=
2624 -->
+
+  <p>Everything else (attribute values on <a href=3D#html-eleme=
nts>HTML elements</a>, IDs and classes in
+  <a href=3D#no-quirks-mode>no-quirks mode</a> and <a hre=
f=3D#limited-quirks-mode>limited-quirks mode</a>, and element na=
mes, attribute
+  names, and attribute values in <a href=3D#xml-documents>XML docu=
ments</a>) must be treated as
+  <a href=3D#case-sensitive>case-sensitive</a> for the purpo=
ses of selector matching.</p>
+
+
+  <h4 id=3Dpseudo-classes><span class=3Dsecno>4.15.2 </sp=
an>Pseudo-classes</h4>
+
+  <p>There are a number of dynamic selectors that can be used with=
 HTML. This section defines when
+  these selectors match HTML elements. <a href=3D#refsSELECTORS>[S=
ELECTORS]</a> <a href=3D#refsCSSUI>[CSSUI]</a></p&gt=
;
+
+  <dl><dt><dfn id=3Dselector-link title=3Dselector-link&g=
t;<code>:link</code></dfn></dt>
+   <dt><dfn id=3Dselector-visited title=3Dselector-visited>&=
lt;code>:visited</code></dfn></dt>
+
+   <dd>
+
+    <p>All <code><a href=3D#the-a-element>a</a>&=
lt;/code> elements that have an <code title=3Dattr-hyperlink-href&g=
t;<a href=3D#attr-hyperlink-href>href</a></code>
+    attribute, all <code><a href=3D#the-area-element>area&lt=
;/a></code> elements that have an <code title=3Dattr-hyperlin=
k-href><a href=3D#attr-hyperlink-href>href</a></code&gt=
; attribute, and all <code><a href=3D#the-link-element>link&l=
t;/a></code> elements that have
+    an <code title=3Dattr-link-href><a href=3D#attr-link-href&g=
t;href</a></code> attribute, must match one of <code title=
=3Dselector-link><a href=3D#selector-link>:link</a></co=
de> and <code title=3Dselector-visited><a href=3D#selector-vi=
sited>:visited</a></code>.</p>
+
+    <p>Other specifications might apply more specific rules regard=
ing how these elements are to
+    match these pseudo-classes, to mitigate some privacy concerns that a=
pply with straightforward
+    implementations of this requirement.</p>
+
+   </dd>
+
+
+   <dt><dfn id=3Dselector-active title=3Dselector-active>&lt=
;code>:active</code></dfn></dt>
+
+   <dd>
+
+    <p>The <code title=3Dselector-active><a href=3D#selec=
tor-active>:active</a></code> pseudo-class is defined to m=
atch an element
+    <q cite=3Dhttp://dev.w3.org/csswg/selectors3/#the-user-action-pse=
udo-classes-hover-act>while an
+    element is <i>being activated</i> by the user</q>.=
 For the purposes of defining the <code title=3Dselector-active>&lt=
;a href=3D#selector-active>:active</a></code> pseudo-class=
 only, an HTML user agent must consider an
+    element as <i>being activated</i> if it is:</p>
+
+    <ul><li>
+
+      <p>An element falling into one of the following categories b=
etween the time the user begins to
+      indicate an intent to trigger the element's <a href=3D#activati=
on-behavior>activation behavior</a> and either the
+      time the user stops indicating an intent to trigger the element's =
<a href=3D#activation-behavior>activation
+      behavior</a>, or the time the element's <a href=3D#activa=
tion-behavior>activation behavior</a> has finished
+      running, which ever comes first:</p>
+
+      <ul><li><code><a href=3D#the-a-element>a&l=
t;/a></code> elements that have an <code title=3Dattr-hyperli=
nk-href><a href=3D#attr-hyperlink-href>href</a></code&g=
t;
+       attribute</li>
+
+       <li><code><a href=3D#the-area-element>area</=
a></code> elements that have an <code title=3Dattr-hyperlink-=
href><a href=3D#attr-hyperlink-href>href</a></code>
+       attribute</li>
+
+       <li><code><a href=3D#the-link-element>link</=
a></code> elements that have an <code title=3Dattr-link-href&=
gt;<a href=3D#attr-link-href>href</a></code>
+       attribute</li>
+
+       <li><code><a href=3D#the-button-element>button&=
lt;/a></code> elements that are not <a href=3D#concept-fe-dis=
abled title=3Dconcept-fe-disabled>disabled</a></li>
+
+       <li><code><a href=3D#the-input-element>input&lt=
;/a></code> elements whose <code title=3Dattr-input-type>&=
lt;a href=3D#attr-input-type>type</a></code> attribute is
+       in the <a href=3D"#submit-button-state-(type=3Dsubmit)&qu=
ot; title=3Dattr-input-type-submit>Submit Button</a>, <a href=
=3D"#image-button-state-(type=3Dimage)" title=3Dattr-input-type=
-image>Image Button</a>, <a href=3D"#reset-button-state-=
(type=3Dreset)" title=3Dattr-input-type-reset>Reset
+       Button</a>, or <a href=3D"#button-state-(type=3Dbut=
ton)" title=3Dattr-input-type-button>Button</a> state</l=
i>
+
+       <li><code><a href=3D#the-menuitem-element>menui=
tem</a></code> elements that do not have a <code title=3Da=
ttr-menuitem-disabled><a href=3D#attr-menuitem-disabled>disabled=
</a></code> attribute</li>
+
+       <li>elements that have their <a href=3D#specially-focusa=
ble>tabindex focus flag</a> set</li>
+
+      </ul><p class=3Dexample>For example, if the user is us=
ing a keyboard to push a <code><a href=3D#the-button-element>=
button</a></code>
+      element by pressing the space bar, the element would match this ps=
eudo-class in between the
+      time that the element received the <code title=3Devent-keydown&=
gt;keydown</code> event and the
+      time the element received the <code title=3Devent-keyup>keyu=
p</code> event.</p>
+
+     </li>
+
+     <li>
+
+      <p>An element that the user indicates using a pointing devic=
e while that pointing device is in
+      the "down" state (e.g. for a mouse, between the time the=
 mouse button is pressed and the time
+      it is depressed).</p>
+
+     </li>
+
+     <li>
+
+      <p>An element that has a descendant that is currently matchi=
ng the <code title=3Dselector-active><a href=3D#selector-active&=
gt;:active</a></code> pseudo-class.</p>
+
+     </li>
+
+    </ul></dd>
+
+
+   <dt><dfn id=3Dselector-hover title=3Dselector-hover><c=
ode>:hover</code></dfn></dt>
+
+   <dd>
+
+    <p>The <code title=3Dselector-hover><a href=3D#select=
or-hover>:hover</a></code> pseudo-class is defined to matc=
h an element <q cite=3Dhttp://dev.w3.org/csswg/selectors3/#the-user-ac=
tion-pseudo-classes-hover-act>while the
+    user <i>designates</i> an element with a pointing device=
</q>. For the purposes of defining the
+    <code title=3Dselector-hover><a href=3D#selector-hover>:=
hover</a></code> pseudo-class only, an HTML user agent must c=
onsider
+    an element as being one that the user <i>designates</i> =
if it is:</p>
+
+    <ul><li>
+
+      <p>An element that the user indicates using a pointing devic=
e.</p>
+
+     </li>
+
+     <li>
+
+      <p>An element that has a descendant that the user indicates =
using a pointing device.</p>
+
+     </li>
+
+     <li>
+
+      <p>An element that is the <a href=3D#labeled-control>l=
abeled control</a> of a <code><a href=3D#the-label-element=
>label</a></code> element that is
+      currently matching <a href=3D#selector-hover title=3Dselector-h=
over>:hover</a>.</p>
+
+     </li>
+
+    </ul><!--
+Demos:
+ http://software.hixie.ch/utilities/js/live-dom-viewer/saved/1315
+ http://software.hixie.ch/utilities/js/live-dom-viewer/saved/1316
+ http://software.hixie.ch/utilities/js/live-dom-viewer/saved/1317
+--><div class=3Dexample>
+
+     <p>Consider in particular a fragment such as:</p>
+
+     <pre><p> <label for=3Dc> <=
input id=3Da> </label> <span id=3Db> &=
amp;lt;input id=3Dc> </span> </p></=
pre>
+
+     <p>If the user designates the element with ID "<code =
title=3D"">a</code>" with their pointing
+     device, then the <code><a href=3D#the-p-element>p</a=
></code> element (and all its ancestors not shown in the snippet=
 above),
+     the <code><a href=3D#the-label-element>label</a>&=
lt;/code> element, the element with ID "<code title=3D"&q=
uot;>a</code>", and the element
+     with ID "<code title=3D"">c</code>"=
 will match the <a href=3D#selector-hover title=3Dselector-hover>:h=
over</a>
+     pseudo-class. The element with ID "<code title=3D"&quo=
t;>a</code>" matches it from condition 1, the
+     <code><a href=3D#the-label-element>label</a></=
code> and <code><a href=3D#the-p-element>p</a></c=
ode> elements match it because of condition 2 (one of their
+     descendants is designated), and the element with ID "<code =
title=3D"">c</code>" matches it
+     through condition 3 (its <code><a href=3D#the-label-elemen=
t>label</a></code> element matches <a href=3D#selector-=
hover title=3Dselector-hover>:hover</a>). However, the element w=
ith ID "<code title=3D"">b</code>"
+     does <em>not</em> match <a href=3D#selector-hover ti=
tle=3Dselector-hover>:hover</a>: its descendant is not
+     designated, even though it matches <a href=3D#selector-hover tit=
le=3Dselector-hover>:hover</a>.</p>
+
+    </div>
+
+   </dd>
+
+
+   <dt><dfn id=3Dselector-enabled title=3Dselector-enabled>&=
lt;code>:enabled</code></dfn></dt>
+
+   <dd>
+
+    <p>The <code title=3Dselector-enabled><a href=3D#sele=
ctor-enabled>:enabled</a></code> pseudo-class must match a=
ny element
+    falling into one of the following categories:</p>
+
+    <ul><li><code><a href=3D#the-a-element>a<=
/a></code> elements that have an <code title=3Dattr-hyperlink=
-href><a href=3D#attr-hyperlink-href>href</a></code>
+     attribute</li>
+
+     <li><code><a href=3D#the-area-element>area</a&=
gt;</code> elements that have an <code title=3Dattr-hyperlink-hr=
ef><a href=3D#attr-hyperlink-href>href</a></code>
+     attribute</li>
+
+     <li><code><a href=3D#the-link-element>link</a&=
gt;</code> elements that have an <code title=3Dattr-link-href&gt=
;<a href=3D#attr-link-href>href</a></code>
+     attribute</li>
+
+     <li><code><a href=3D#the-button-element>button&lt=
;/a></code> elements that are not <a href=3D#concept-fe-disab=
led title=3Dconcept-fe-disabled>disabled</a></li>
+
+     <li><code><a href=3D#the-input-element>input</=
a></code> elements that are not <a href=3D#concept-fe-disable=
d title=3Dconcept-fe-disabled>disabled</a></li>
+
+     <li><code><a href=3D#the-select-element>select&lt=
;/a></code> elements that are not <a href=3D#concept-fe-disab=
led title=3Dconcept-fe-disabled>disabled</a></li>
+
+     <li><code><a href=3D#the-textarea-element>textare=
a</a></code> elements that are not <a href=3D#concept-fe-d=
isabled title=3Dconcept-fe-disabled>disabled</a></li>
+
+     <li><code><a href=3D#the-optgroup-element>optgrou=
p</a></code> elements that do not have a <code title=3Datt=
r-optgroup-disabled><a href=3D#attr-optgroup-disabled>disabled&l=
t;/a></code> attribute</li>
+
+     <li><code><a href=3D#the-option-element>option&lt=
;/a></code> elements that are not <a href=3D#concept-option-d=
isabled title=3Dconcept-option-disabled>disabled</a></li>
+
+     <li><code><a href=3D#the-menuitem-element>menuite=
m</a></code> elements that do not have a <code title=3Datt=
r-menuitem-disabled><a href=3D#attr-menuitem-disabled>disabled&l=
t;/a></code> attribute</li>
+
+     <li><code><a href=3D#the-fieldset-element>fieldse=
t</a></code> elements that do not have a <code title=3Datt=
r-fieldset-disabled><a href=3D#attr-fieldset-disabled>disabled&l=
t;/a></code> attribute</li>
+
+    </ul></dd>
+
+
+   <dt><dfn id=3Dselector-disabled title=3Dselector-disabled&gt=
;<code>:disabled</code></dfn></dt>
+
+   <dd>
+
+    <p>The <code title=3Dselector-disabled><a href=3D#sel=
ector-disabled>:disabled</a></code> pseudo-class must matc=
h any element that
+    is <a href=3D#concept-element-disabled title=3Dconcept-element-di=
sabled>actually disabled</a>.</p>
+
+   </dd>
+
+
+   <dt><dfn id=3Dselector-checked title=3Dselector-checked>&=
lt;code>:checked</code></dfn></dt>
+
+   <dd>
+
+    <p>The <code title=3Dselector-checked><a href=3D#sele=
ctor-checked>:checked</a></code> pseudo-class must match a=
ny element
+    falling into one of the following categories:</p>
+
+    <ul><li><code><a href=3D#the-input-element>i=
nput</a></code> elements whose <code title=3Dattr-input-ty=
pe><a href=3D#attr-input-type>type</a></code> attrib=
ute is in
+     the <a href=3D"#checkbox-state-(type=3Dcheckbox)" titl=
e=3Dattr-input-type-checkbox>Checkbox</a> state and whose <a =
href=3D#concept-fe-checked title=3Dconcept-fe-checked>checkedness</=
a> state is true</li>
+
+     <li><code><a href=3D#the-input-element>input</=
a></code> elements whose <code title=3Dattr-input-type>&lt=
;a href=3D#attr-input-type>type</a></code> attribute is in
+     the <a href=3D"#radio-button-state-(type=3Dradio)" tit=
le=3Dattr-input-type-radio>Radio Button</a> state and whose <=
a href=3D#concept-fe-checked title=3Dconcept-fe-checked>checkedness&lt=
;/a> state is true</li>
+
+     <li><code><a href=3D#the-option-element>option&lt=
;/a></code> elements whose <a href=3D#concept-option-selected=
ness title=3Dconcept-option-selectedness>selectedness</a> is tru=
e</li>
+
+     <li><code><a href=3D#the-menuitem-element>menuite=
m</a></code> elements whose <code title=3Dattr-menuitem-ty=
pe><a href=3D#attr-menuitem-type>type</a></code> att=
ribute
+     is in the <a href=3D#attr-menuitem-type-state-checkbox title=3Da=
ttr-menuitem-type-state-checkbox>Checkbox</a> state and that hav=
e a
+     <code title=3Dattr-menuitem-checked><a href=3D#attr-menuit=
em-checked>checked</a></code> attribute</li>
+
+     <li><code><a href=3D#the-menuitem-element>menuite=
m</a></code> elements whose <code title=3Dattr-menuitem-ty=
pe><a href=3D#attr-menuitem-type>type</a></code> att=
ribute
+     is in the <a href=3D#attr-menuitem-type-state-radio title=3Dattr=
-menuitem-type-state-radio>Radio</a> state and that have a <c=
ode title=3Dattr-menuitem-checked><a href=3D#attr-menuitem-checked&=
gt;checked</a></code> attribute</li>
+
+    </ul></dd>
+
+
+   <dt><dfn id=3Dselector-indeterminate title=3Dselector-indete=
rminate><code>:indeterminate</code></dfn></dt>
+
+   <dd>
+
+    <p>The <code title=3Dselector-indeterminate><a href=3D=
#selector-indeterminate>:indeterminate</a></code> pseudo-c=
lass must match any
+    element falling into one of the following categories:</p>
+
+    <ul><li><code><a href=3D#the-input-element>i=
nput</a></code> elements whose <code title=3Dattr-input-ty=
pe><a href=3D#attr-input-type>type</a></code> attrib=
ute is in
+     the <a href=3D"#checkbox-state-(type=3Dcheckbox)" titl=
e=3Dattr-input-type-checkbox>Checkbox</a> state and whose <co=
de title=3Ddom-input-indeterminate><a href=3D#dom-input-indetermina=
te>indeterminate</a></code> IDL attribute is set to true&l=
t;/li>
+
+     <li><code><a href=3D#the-input-element>input</=
a></code> elements whose <code title=3Dattr-input-type>&lt=
;a href=3D#attr-input-type>type</a></code> attribute is in
+     the <a href=3D"#radio-button-state-(type=3Dradio)" tit=
le=3Dattr-input-type-radio>Radio Button</a> state and whose <=
a href=3D#radio-button-group>radio button
+     group</a> contains no <code><a href=3D#the-input-ele=
ment>input</a></code> elements whose <a href=3D#concept=
-fe-checked title=3Dconcept-fe-checked>checkedness</a> state is =
true.</li>
+
+     <li><code><a href=3D#the-progress-element>progres=
s</a></code> elements with no <code title=3Dattr-progress-=
value><a href=3D#attr-progress-value>value</a></code&gt=
;
+     content attribute</li>
+
+    </ul></dd>
+
+
+   <dt><dfn id=3Dselector-default title=3Dselector-default>&=
lt;code>:default</code></dfn></dt>
+
+   <dd>
+
+    <p>The <code title=3Dselector-default><a href=3D#sele=
ctor-default>:default</a></code> pseudo-class must match a=
ny element
+    falling into one of the following categories:</p>
+
+    <ul><li><code><a href=3D#the-button-element>=
button</a></code> elements that are their form's <a href=3D=
#default-button>default button</a></li>
+
+     <li><code><a href=3D#the-input-element>input</=
a></code> elements whose <code title=3Dattr-input-type>&lt=
;a href=3D#attr-input-type>type</a></code> attribute is in
+     the <a href=3D"#submit-button-state-(type=3Dsubmit)" t=
itle=3Dattr-input-type-submit>Submit Button</a> or <a href=3D=
"#image-button-state-(type=3Dimage)" title=3Dattr-input-type-im=
age>Image Button</a> state, and that are their form's
+     <a href=3D#default-button>default button</a></li>
+
+     <li><code><a href=3D#the-input-element>input</=
a></code> elements to which the <code title=3Dattr-input-chec=
ked><a href=3D#attr-input-checked>checked</a></code>
+     attribute applies and that have a <code title=3Dattr-input-check=
ed><a href=3D#attr-input-checked>checked</a></code>
+     attribute</li>
+
+     <li><code><a href=3D#the-option-element>option&lt=
;/a></code> elements that have a <code title=3Dattr-option-se=
lected><a href=3D#attr-option-selected>selected</a></co=
de>
+     attribute</li>
+
+<!--
+     <li><code>menuitem</code> elements that have a &l=
t;code
+     title=3D"attr-menuitem-default">default</code> a=
ttribute</li>
+-->
+    </ul></dd>
+
+
+   <dt><dfn id=3Dselector-valid title=3Dselector-valid><c=
ode>:valid</code></dfn></dt>
+
+   <dd>
+
+    <p>The <code title=3Dselector-valid><a href=3D#select=
or-valid>:valid</a></code> pseudo-class must match any ele=
ment falling
+    into one of the following categories:</p>
+
+    <ul><li>elements that are <a href=3D#candidate-for-co=
nstraint-validation title=3D"candidate for constraint validation&quo=
t;>candidates for
+     constraint validation</a> and that <a href=3D#concept-fv-v=
alid title=3Dconcept-fv-valid>satisfy their
+     constraints</a></li>
+
+     <li><code><a href=3D#the-form-element>form</a&=
gt;</code> elements that are not the <a href=3D#form-owner>fo=
rm owner</a> of any elements that
+     themselves are <a href=3D#candidate-for-constraint-validation ti=
tle=3D"candidate for constraint validation">candidates for c=
onstraint
+     validation</a> but do not <a href=3D#concept-fv-valid titl=
e=3Dconcept-fv-valid>satisfy their
+     constraints</a></li>
+
+     <li><code><a href=3D#the-fieldset-element>fieldse=
t</a></code> elements that have no descendant elements that t=
hemselves are <a href=3D#candidate-for-constraint-validation title=3D&=
quot;candidate for constraint validation">candidates for constrai=
nt validation</a> but do
+     not <a href=3D#concept-fv-valid title=3Dconcept-fv-valid>sati=
sfy their constraints</a></li>
+
+    </ul></dd>
+
+
+   <dt><dfn id=3Dselector-invalid title=3Dselector-invalid>&=
lt;code>:invalid</code></dfn></dt>
+
+   <dd>
+
+    <p>The <code title=3Dselector-invalid><a href=3D#sele=
ctor-invalid>:invalid</a></code> pseudo-class must match a=
ny element
+    falling into one of the following categories:</p>
+
+    <ul><li>elements that are <a href=3D#candidate-for-co=
nstraint-validation title=3D"candidate for constraint validation&quo=
t;>candidates for
+     constraint validation</a> but that do not <a href=3D#conce=
pt-fv-valid title=3Dconcept-fv-valid>satisfy their
+     constraints</a></li>
+
+     <li><code><a href=3D#the-form-element>form</a&=
gt;</code> elements that are the <a href=3D#form-owner>form o=
wner</a> of one or more elements
+     that themselves are <a href=3D#candidate-for-constraint-validati=
on title=3D"candidate for constraint validation">candidates =
for constraint
+     validation</a> but do not <a href=3D#concept-fv-valid titl=
e=3Dconcept-fv-valid>satisfy their
+     constraints</a></li>
+
+     <li><code><a href=3D#the-fieldset-element>fieldse=
t</a></code> elements that have of one or more descendant ele=
ments that themselves
+     are <a href=3D#candidate-for-constraint-validation title=3D&quot=
;candidate for constraint validation">candidates for constraint
+     validation</a> but do not <a href=3D#concept-fv-valid titl=
e=3Dconcept-fv-valid>satisfy their
+     constraints</a></li>
+
+    </ul></dd>
+
+
+   <dt><dfn id=3Dselector-in-range title=3Dselector-in-range&gt=
;<code>:in-range</code></dfn></dt>
+
+   <dd>
+
+    <p>The <code title=3Dselector-in-range><a href=3D#sel=
ector-in-range>:in-range</a></code> pseudo-class must matc=
h all elements
+    that are <a href=3D#candidate-for-constraint-validation title=3D&=
quot;candidate for constraint validation">candidates for constrai=
nt
+    validation</a>, <a href=3D#have-range-limitations>have r=
ange limitations</a>, and that are neither <a href=3D#suffering-=
from-an-underflow>suffering
+    from an underflow</a> nor <a href=3D#suffering-from-an-over=
flow>suffering from an overflow</a>.</p>
+
+   </dd>
+
+
+   <dt><dfn id=3Dselector-out-of-range title=3Dselector-out-of-=
range><code>:out-of-range</code></dfn></dt>
+
+   <dd>
+
+    <p>The <code title=3Dselector-out-of-range><a href=3D=
#selector-out-of-range>:out-of-range</a></code> pseudo-cla=
ss must match all
+    elements that are <a href=3D#candidate-for-constraint-validation =
title=3D"candidate for constraint validation">candidates for=
 constraint
+    validation</a>, <a href=3D#have-range-limitations>have r=
ange limitations</a>, and that are either <a href=3D#suffering-f=
rom-an-underflow>suffering from
+    an underflow</a> or <a href=3D#suffering-from-an-overflow&g=
t;suffering from an overflow</a>.</p>
+
+   </dd>
+
+
+   <dt><dfn id=3Dselector-required title=3Dselector-required&gt=
;<code>:required</code></dfn></dt>
+
+   <dd>
+
+    <p>The <code title=3Dselector-required><a href=3D#sel=
ector-required>:required</a></code> pseudo-class must matc=
h any element
+    falling into one of the following categories:</p>
+
+    <ul><li><code><a href=3D#the-input-element>i=
nput</a></code> elements that are <i title=3Dconcept-input=
-required><a href=3D#concept-input-required>required</a>&l=
t;/i></li>
+
+     <li><code><a href=3D#the-select-element>select&lt=
;/a></code> elements that have a <code title=3Dattr-select-re=
quired><a href=3D#attr-select-required>required</a></co=
de>
+     attribute</li>
+
+     <li><code><a href=3D#the-textarea-element>textare=
a</a></code> elements that have a <code title=3Dattr-texta=
rea-required><a href=3D#attr-textarea-required>required</a&gt=
;</code> attribute</li>
+
+    </ul></dd>
+
+
+   <dt><dfn id=3Dselector-optional title=3Dselector-optional&gt=
;<code>:optional</code></dfn></dt>
+
+   <dd>
+
+    <p>The <code title=3Dselector-optional><a href=3D#sel=
ector-optional>:optional</a></code> pseudo-class must matc=
h any element
+    falling into one of the following categories:</p>
+
+    <ul><li><code><a href=3D#the-input-element>i=
nput</a></code> elements to which the <code title=3Dattr-i=
nput-required><a href=3D#attr-input-required>required</a>&=
lt;/code>
+     attribute applies that are not <i title=3Dconcept-input-required=
><a href=3D#concept-input-required>required</a></i>&=
lt;/li>
+
+     <li><code><a href=3D#the-select-element>select&lt=
;/a></code> elements that do not have a <code title=3Dattr-se=
lect-required><a href=3D#attr-select-required>required</a>=
</code> attribute</li>
+
+     <li><code><a href=3D#the-textarea-element>textare=
a</a></code> elements that do not have a <code title=3Datt=
r-textarea-required><a href=3D#attr-textarea-required>required&l=
t;/a></code> attribute</li>
+
+    </ul></dd>
+
+
+   <dt><dfn id=3Dselector-read-only title=3Dselector-read-only&=
gt;<code>:read-only</code></dfn></dt>
+   <dt><dfn id=3Dselector-read-write title=3Dselector-read-writ=
e><code>:read-write</code></dfn></dt>
+
+   <dd>
+
+    <p>The <code title=3Dselector-read-write><a href=3D#s=
elector-read-write>:read-write</a></code> pseudo-class mus=
t match any element
+    falling into one of the following categories, which for the purposes=
 of Selectors are thus
+    considered <i>user-alterable</i>: <a href=3D#refsSELE=
CTORS>[SELECTORS]</a></p>
+
+    <ul><li><code><a href=3D#the-input-element>i=
nput</a></code> elements to which the <code title=3Dattr-i=
nput-readonly><a href=3D#attr-input-readonly>readonly</a>&=
lt;/code>
+     attribute applies, and that are <i title=3Dconcept-fe-mutable&gt=
;<a href=3D#concept-fe-mutable>mutable</a></i> (i.e. th=
at do not
+     have the <code title=3Dattr-input-readonly><a href=3D#attr=
-input-readonly>readonly</a></code> attribute specified an=
d that are not
+     <a href=3D#concept-fe-disabled title=3Dconcept-fe-disabled>di=
sabled</a>)</li>
+
+     <li><code><a href=3D#the-textarea-element>textare=
a</a></code> elements that do not have a <code title=3Datt=
r-textarea-readonly><a href=3D#attr-textarea-readonly>readonly&l=
t;/a></code> attribute, and that are not <a href=3D#concept-f=
e-disabled title=3Dconcept-fe-disabled>disabled</a></li>
+
+     <li>elements that are <a href=3D#editing-host title=3D&quo=
t;editing host">editing hosts</a> or <a href=3D#editable=
>editable</a>
+     and are neither <code><a href=3D#the-input-element>inpu=
t</a></code> elements nor <code><a href=3D#the-texta=
rea-element>textarea</a></code> elements</li>
+
+    </ul><p>The <code title=3Dselector-read-only><a=
 href=3D#selector-read-only>:read-only</a></code> pseudo-c=
lass must match all other
+    <a href=3D#html-elements>HTML elements</a>.</p>
+
+   </dd>
+
+
+   <dt><dfn id=3Dselector-ltr title=3Dselector-ltr><code&=
gt;:dir(ltr)</code></dfn></dt>
+
+   <dd>
+
+    <p>The <code title=3Dselector-ltr><a href=3D#selector=
-ltr>:dir(ltr)</a></code> pseudo-class must match all elem=
ents whose
+    <a href=3D#the-directionality title=3D"the directionality&qu=
ot;>directionality</a> is '<a href=3D#concept-ltr title=3Dcon=
cept-ltr>ltr</a>'.</p>
+
+   </dd>
+
+   <dt><dfn id=3Dselector-rtl title=3Dselector-rtl><code&=
gt;:dir(rtl)</code></dfn></dt>
+
+   <dd>
+
+    <p>The <code title=3Dselector-rtl><a href=3D#selector=
-rtl>:dir(rtl)</a></code> pseudo-class must match all elem=
ents whose
+    <a href=3D#the-directionality title=3D"the directionality&qu=
ot;>directionality</a> is '<a href=3D#concept-rtl title=3Dcon=
cept-rtl>rtl</a>'.</p>
+
+   </dd>
+
+  </dl><p class=3Dnote>Another section of this specification=
 defines the <i><a href=3D#target-element>target element</=
a></i> used with
+  the <code title=3Dselector-target>:target</code> pseudo-cl=
ass.</p>
+
+  <p class=3Dnote>This specification does not define when an eleme=
nt matches the <code title=3Dselector-focus>:focus</code> or =
<code title=3Dselector-lang()>:lang()</code> dynamic
+  pseudo-classes, as those are all defined in sufficient detail in a lan=
guage-agnostic fashion in
+  the Selectors specification. <a href=3D#refsSELECTORS>[SELECTORS=
]</a></p>
+
+<!--REMOVE-TOPIC:CSS-->
+
+  </div>
+
+
+<!--TOPIC:Microdata-->
+
+  <h2 id=3Dmicrodata><span class=3Dsecno>5 </span><=
dfn>Microdata</dfn></h2>
+
+<!-- USE CASES
+
+     Getting data out of poorly written Web pages
+     http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-May/019595=
.html
+
+     Allowing authors to keep track of where content originates
+     http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-May/019620=
.html
+
+     Helping people seaching for content filtered by license
+     http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-May/019668=
.html
+
+     Allowing authors to annotate their documents to explain things for =
readers
+     http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-May/019672=
.html
+
+     Annotating structured data that HTML has no semantics for
+     http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-May/019681=
.html
+
+     Exposing known data types in a reusable way
+     http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-May/019833=
.html
+
+     Providing enhanced search results
+     http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-May/019834=
.html
+
+     Dragging or copying data between sites
+     http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-May/019835=
.html
+
+     Writing authoring tools and validators for custom microdata vocabul=
aries
+     http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-May/019839=
.html
+
+     Removing the need for separate feeds
+     http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-May/019884=
.html
+
+     Use cases for which I haven't been able to find solutions
+     http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-May/019886=
.html    =20
+
+-->
+
+<!-- v2
+
+  * <itemref itemprop=3D"foo" src=3D"url#id"> =
to import the item with id=3D"id" from url into the current
+    microdata block as the value of property foo?
+
+  * splitting the 'content' part of a property into multiple sub-bits, a=
s in:
+
+     <span itemprop=3D"tel" item-content-in-bits>
+       Telephone:
+       <span content-bit>+44</span> (0) <span content-bit=
>1223 123 123</span>
+     </span>
+
+    maybe vocabs that need this can use a sub vocabulary specifically fo=
r this:
+
+     <span itemprop=3D"tel" itemscope itemtype=3D"http=
://bits.example/">
+       Telephone:
+       <span itemprop=3Dbit>+44</span> (0) <span itemprop=
=3Dbit>1223 123 123</span>
+     </span>
+
+-->
+
+  <h3 id=3Dintroduction-4><span class=3Dsecno>5.1 </span&=
gt;Introduction</h3>
+
+  <h4 id=3Doverview><span class=3Dsecno>5.1.1 </span>O=
verview</h4>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <p>Sometimes, it is desirable to annotate content with specific =
machine-readable labels, e.g. to
+  allow generic scripts to provide services that are customised to the p=
age, or to enable content
+  from a variety of cooperating authors to be processed by a single scri=
pt in a consistent
+  manner.</p>
+
+  <p>For this purpose, authors can use the microdata features desc=
ribed in this section. Microdata
+  allows nested groups of name-value pairs to be added to documents, in =
parallel with the existing
+  content.</p>
+
+
+  <h4 id=3Dthe-basic-syntax><span class=3Dsecno>5.1.2 </s=
pan>The basic syntax</h4>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <p>At a high level, microdata consists of a group of name-value =
pairs. The groups are called <a href=3D#concept-item title=3Dconcept-i=
tem>items</a>, and each name-value pair is a property. Items and=
 properties
+  are represented by regular elements.</p>
+
+  <p>To create an item, the <code title=3Dattr-itemscope>&lt=
;a href=3D#attr-itemscope>itemscope</a></code> attribute i=
s used.</p>
+
+  <p>To add a property to an item, the <code title=3Dattr-itemp=
rop><a href=3D#names:-the-itemprop-attribute>itemprop</a>&=
lt;/code> attribute is used
+  on one of the <a href=3D#concept-item title=3Dconcept-item>item'=
s</a> descendants.</p>
+
+  <div class=3Dexample>
+
+   <p>Here there are two items, each of which has the property &qu=
ot;name":</p>
+
+   <pre><div itemscope>
+ <p>My name is <span itemprop=3D"name"&am=
p;gt;Elizabeth</span>.</p>
+</div>
+
+<div itemscope>
+ <p>My name is <span itemprop=3D"name"&am=
p;gt;Daniel</span>.</p>
+</div></pre>
+
+  </div>
+
+  <p>Markup without microdata attributes has no effect on microdat=
a.</p>
+
+  <div class=3Dexample>
+
+   <p>These two examples are exactly equivalent, at a microdata le=
vel, as the previous two examples
+   respectively:</p>
+
+   <pre><div itemscope>
+ <p>My <em>name</em> is &l=
t;span itemprop=3D"name">E<strong>liz&=
lt;/strong>abeth</span>.</p>
+</div>
+
+<section>
+ <div itemscope>
+  <aside>
+   <p>My name is <span itemprop=3D"name"&=
amp;gt;<a href=3D"/?user=3Ddaniel">Daniel<=
/a></span>.</p>
+  </aside>
+ </div>
+</section></pre>
+
+  </div>
+
+  <p>Properties generally have values that are strings.</p>
+
+  <div class=3Dexample>
+
+   <p>Here the item has three properties:</p>
+
+   <pre><div itemscope>
+ <p>My name is <span itemprop=3D"name"&am=
p;gt;Neil</span>.</p>
+ <p>My band is called <span itemprop=3D"band&q=
uot;>Four Parts Water</span>.</p>
+ <p>I am <span itemprop=3D"nationality"&a=
mp;gt;British</span>.</p>
+</div></pre>
+
+  </div>
+
+  <p>When a string value is a <a href=3D#url>URL</a>, =
it is expressed using the <code><a href=3D#the-a-element>a&lt=
;/a></code> element and
+  its <code title=3Dattr-hyperlink-href><a href=3D#attr-hyperli=
nk-href>href</a></code> attribute, the <code><a h=
ref=3D#the-img-element>img</a></code> element and its
+  <code title=3Dattr-img-src><a href=3D#attr-img-src>src<=
/a></code> attribute, or other elements that link to or embed ex=
ternal
+  resources.</p>
+
+  <div class=3Dexample>
+
+   <p>In this example, the item has one property, "image&quot=
;, whose value is a URL:</p>
+
+   <pre><div itemscope>
+ <img itemprop=3D"image" src=3D"google-logo.png&qu=
ot; alt=3D"Google">
+</div></pre>
+
+  </div>
+
+  <p>When a string value is in some machine-readable format unsuit=
able for human consumption, it is
+  expressed using the <code title=3Dattr-data-value><a href=3D#=
attr-data-value>value</a></code> attribute of the <code=
><a href=3D#the-data-element>data</a></code>
+  element, with the human-readable version given in the element's conten=
ts.</p>
+
+  <div class=3Dexample>
+
+   <p>Here, there is an item with a property whose value is a prod=
uct ID. The ID is not
+   human-friendly, so the product's name is used the human-visible text =
instead of the ID.</p>
+
+   <pre><h1 itemscope>
+ <data itemprop=3D"product-id" value=3D"9678AOU879=
">The Instigator 2000</data>
+</h1></pre>
+
+  </div>
+
+  <p>For numeric data, the <code><a href=3D#the-meter-ele=
ment>meter</a></code> element and its <code title=3Datt=
r-meter-value><a href=3D#attr-meter-value>value</a></co=
de> attribute can be used instead.</p>
+
+  <div class=3Dexample>
+
+   <p>Here a rating is given using a <code><a href=3D#the=
-meter-element>meter</a></code> element.</p>
+
+   <pre><div itemscope itemtype=3D"http://schema.org/P=
roduct">
+ <span itemprop=3D"name">Panasonic White 60L Ref=
rigerator</span>
+ <img src=3D"panasonic-fridge-60l-white.jpg" alt=3D&quo=
t;">
+  <div itemprop=3D"aggregateRating"
+       itemscope itemtype=3D"http://schema.org/AggregateRating&quot=
;>
+   <meter itemprop=3D"ratingValue" min=3D0 value=3D3.5 =
max=3D5>Rated 3.5/5</meter>
+   (based on <span itemprop=3D"reviewCount">11&a=
mp;lt;/span> customer reviews)
+  </div>
+</div></pre>
+
+  </div>
+
+  <p>Similarly, for date- and time-related data, the <code>&=
lt;a href=3D#the-time-element>time</a></code> element and =
its <code title=3Dattr-time-datetime><a href=3D#attr-time-dateti=
me>datetime</a></code> attribute can be used instead.</=
p>
+
+  <div class=3Dexample>
+
+   <p>In this example, the item has one property, "birthday&q=
uot;, whose value is a date:</p>
+
+   <pre><div itemscope>
+ I was born on <time itemprop=3D"birthday" datetime=3D&=
quot;2009-05-10">May 10th 2009</time>.
+</div></pre>
+
+  </div>
+
+  <p>Properties can also themselves be groups of name-value pairs,=
 by putting the <code title=3Dattr-itemscope><a href=3D#attr-ite=
mscope>itemscope</a></code> attribute on the element that =
declares the property.</p>
+
+  <p>Items that are not part of others are called <a href=3D#to=
p-level-microdata-items>top-level microdata items</a>.</p>
+
+  <div class=3Dexample>
+
+   <p>In this example, the outer item represents a person, and the=
 inner one represents a band:</p>
+
+   <pre><div itemscope>
+ <p>Name: <span itemprop=3D"name">=
Amanda</span></p>
+ <p>Band: <span itemprop=3D"band" itemsco=
pe> <span itemprop=3D"name">Jazz Band&=
lt;/span> (<span itemprop=3D"size">12&=
lt;/span> players)</span></p>
+</div></pre>
+
+   <p>The outer item here has two properties, "name" and=
 "band". The "name" is "Amanda", and the
+   "band" is an item in its own right, with two properties, &q=
uot;name" and "size". The "name" of the
+   band is "Jazz Band", and the "size" is "12&q=
uot;.</p>
+
+   <p>The outer item in this example is a top-level microdata item=
.</p>
+
+  </div>
+
+  <p>Properties that are not descendants of the element with the &=
lt;code title=3Dattr-itemscope><a href=3D#attr-itemscope>itemsco=
pe</a></code> attribute can be associated with the <a href=
=3D#concept-item title=3Dconcept-item>item</a> using the <cod=
e title=3Dattr-itemref><a href=3D#attr-itemref>itemref</a>=
</code> attribute.
+  This attribute takes a list of IDs of elements to crawl in addition to=
 crawling the children of
+  the element with the <code title=3Dattr-itemscope><a href=3D#=
attr-itemscope>itemscope</a></code> attribute.</p>
+
+  <div class=3Dexample>
+
+   <p>This example is the same as the previous one, but all the pr=
operties are separated from their
+   <a href=3D#concept-item title=3Dconcept-item>items</a>:&l=
t;/p>
+
+   <pre><div itemscope id=3D"amanda" itemref=3D&q=
uot;a b"></div>
+<p id=3D"a">Name: <span itemprop=3D"=
name">Amanda</span></p>
+<div id=3D"b" itemprop=3D"band" itemscope ite=
mref=3D"c"></div>
+<div id=3D"c">
+ <p>Band: <span itemprop=3D"name">=
Jazz Band</span></p>
+ <p>Size: <span itemprop=3D"size">=
12</span> players</p>
+</div></pre>
+
+   <p>This gives the same result as the previous example. The firs=
t item has two properties, "name",
+   set to "Amanda", and "band", set to another item.=
 That second item has two further properties,
+   "name", set to "Jazz Band", and "size",=
 set to "12".</p>
+
+  </div>
+
+  <p>An <a href=3D#concept-item title=3Dconcept-item>item&lt=
;/a> can have multiple properties with the same name and
+  different values.</p>
+
+  <div class=3Dexample>
+
+   <p>This example describes an ice cream, with two flavors:</p=
>
+
+   <pre><div itemscope>
+ <p>Flavors in my favorite ice cream:</p>
+ <ul>
+  <li itemprop=3D"flavor">Lemon sorbet</l=
i>
+  <li itemprop=3D"flavor">Apricot sorbet<=
/li>
+ </ul>
+</div></pre>
+
+   <p>This thus results in an item with two properties, both &quot=
;flavor", having the values "Lemon
+   sorbet" and "Apricot sorbet".</p>
+
+  </div>
+
+  <p>An element introducing a property can also introduce multiple=
 properties at once, to avoid
+  duplication when some of the properties have the same value.</p>
+
+  <div class=3Dexample>
+
+   <p>Here we see an item with two properties, "favorite-colo=
r" and "favorite-fruit", both set to
+   the value "orange":</p>
+
+   <pre><div itemscope>
+ <span itemprop=3D"favorite-color favorite-fruit"&g=
t;orange</span>
+</div></pre>
+
+  </div>
+
+  <p>It's important to note that there is no relationship between =
the microdata and the content of
+  the document where the microdata is marked up.</p>
+
+  <div class=3Dexample>
+
+   <p>There is no semantic difference, for instance, between the f=
ollowing two examples:</p>
+
+   <pre><figure>
+ <img src=3D"castle.jpeg">
+ <figcaption><span itemscope><span it=
emprop=3D"name">The Castle</span></=
span> (1986)</figcaption>
+</figure></pre>
+
+   <pre><span itemscope><meta itemprop=3D&quo=
t;name" content=3D"The Castle"></span&gt=
;
+<figure>
+ <img src=3D"castle.jpeg">
+ <figcaption>The Castle (1986)</figcaption>
+</figure></pre>
+
+   <p>Both have a figure with a caption, and both, completely unre=
lated to the figure, have an item
+   with a name-value pair with the name "name" and the value &=
quot;The Castle". The only difference is
+   that if the user drags the caption out of the document, in the former=
 case, the item will be
+   included in the drag-and-drop data. In neither case is the image in a=
ny way associated with the
+   item.</p>
+
+  </div>
+
+
+  <h4 id=3Dtyped-items><span class=3Dsecno>5.1.3 </span&g=
t;Typed items</h4>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <p>The examples in the previous section show how information cou=
ld be marked up on a page that
+  doesn't expect its microdata to be re-used. Microdata is most useful, =
though, when it is used in
+  contexts where other authors and readers are able to cooperate to make=
 new uses of the markup.</p>
+
+  <p>For this purpose, it is necessary to give each <a href=3D#=
concept-item title=3Dconcept-item>item</a> a type,
+  such as "http://example.com/person", or "http://example=
.org/cat", or "http://band.example.net/".
+  Types are identified as <a href=3D#url title=3DURL>URLs</a&gt=
;.</p>
+
+  <p>The type for an <a href=3D#concept-item title=3Dconcept-it=
em>item</a> is given as the value of an <code title=3Dattr-it=
emtype><a href=3D#attr-itemtype>itemtype</a></code> =
attribute on the same element as the <code title=3Dattr-itemscope>&=
lt;a href=3D#attr-itemscope>itemscope</a></code> attribute=
.</p>
+
+  <div class=3Dexample>
+
+   <p>Here, the item's type is "http://example.org/animals#ca=
t":</p>
+
+<pre><section itemscope itemtype=3D"http://example.org=
/animals#cat">
+ <h1 itemprop=3D"name">Hedral</h1>
+ <p itemprop=3D"desc">Hedral is a male american =
domestic
+ shorthair, with a fluffy black fur with white paws and belly.</p=
>
+ <img itemprop=3D"img" src=3D"hedral.jpeg" al=
t=3D"" title=3D"Hedral, age 18 months">
+</section></pre>
+
+   <p>In this example the "http://example.org/animals#cat&quo=
t; item has three properties, a "name"
+   ("Hedral"), a "desc" ("Hedral is..."), =
and an "img" ("hedral.jpeg").</p>
+
+  </div>
+
+  <p>The type gives the context for the properties, thus selecting=
 a vocabulary: a property named
+  "class" given for an item with the type "http://census.=
example/person" might refer to the economic
+  class of an individual, while a property named "class" given=
 for an item with the type
+  "http://example.com/school/teacher" might refer to the class=
room a teacher has been assigned.
+  Several types can share a vocabulary. For example, the types "&lt=
;code title=3D"">http://example.org/people/teacher</code&=
gt;" and "<code title=3D"">http://example.org/p=
eople/engineer</code>" could be defined to use the same vocabu=
lary
+  (though maybe some properties would not be especially useful in both c=
ases, e.g. maybe the "<code title=3D"">http://exampl=
e.org/people/engineer</code>" type might not typically be used=
 with the
+  "<code title=3D"">classroom</code>" pr=
operty). Multiple types defined to use the same vocabulary can
+  be given for a single item by listing the URLs as a space-separated li=
st in the attribute' value.
+  An item cannot be given two types if they do not use the same vocabula=
ry, however.</p>
+
+
+  <h4 id=3Dglobal-identifiers-for-items><span class=3Dsecno>=
5.1.4 </span>Global identifiers for items</h4>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <p>Sometimes, an <a href=3D#concept-item title=3Dconcept-item=
>item</a> gives information about a topic that has a
+  global identifier. For example, books can be identified by their ISBN =
number.</p>
+
+  <p>Vocabularies (as identified by the <code title=3Dattr-item=
type><a href=3D#attr-itemtype>itemtype</a></code> at=
tribute) can
+  be designed such that <a href=3D#concept-item title=3Dconcept-item&=
gt;items</a> get associated with their global
+  identifier in an unambiguous way by expressing the global identifiers =
as <a href=3D#url title=3DURL>URLs</a> given in an <code t=
itle=3Dattr-itemid><a href=3D#attr-itemid>itemid</a></c=
ode> attribute.</p>
+
+  <p>The exact meaning of the <a href=3D#url title=3DURL>URL=
s</a> given in <code title=3Dattr-itemid><a href=3D#attr-i=
temid>itemid</a></code> attributes depends on the vocabula=
ry used.</p>
+
+  <div class=3Dexample>
+
+   <p>Here, an item is talking about a particular book:</p>
+
+<pre><dl itemscope
+    itemtype=3D"http://vocab.example.net/book"
+    <strong>itemid=3D"urn:isbn:0-330-34032-8"</strong=
>>
+ <dt>Title
+ <dd itemprop=3D"title">The Reality Dysfunction
+ <dt>Author
+ <dd itemprop=3D"author">Peter F. Hamilton
+ <dt>Publication date
+ <dd><time itemprop=3D"pubdate" datetime=3D=
"1996-01-26">26 January 1996</time>
+</dl></pre>
+
+   <p>The "<code title=3D"">http://vocab.exam=
ple.net/book</code>" vocabulary in this example would
+   define that the <code title=3Dattr-itemid><a href=3D#attr-it=
emid>itemid</a></code> attribute takes a <code title=3D=
"">urn:</code> <a href=3D#url>URL</a> poin=
ting to the ISBN of the book.</p>
+
+  </div>
+
+  <!-- (commented out since itemtype=3D"" defines the meani=
ng of the
+        identifier for now)
+  <p>Although it is common practice, authors are encouraged not to=
 use the same URL to identify
+  multiple topics; in particular, an HTTP URL usually identifies a speci=
fic resource (such as an
+  image or document), and authors are encouraged to not use them to iden=
tify people, non-Web
+  resources like companies, movies, and products, or other abstract conc=
epts. Using an HTTP URL as a
+  global identifier for something other than the resource actually desig=
nated by the URL leads to a
+  situation where it is ambiguous whether the identifier, and thus the s=
et of properties specified
+  in the microdata, references the page or something else.</p>
+  -->
+
+
+
+  <h4 id=3Dselecting-names-when-defining-vocabularies><span cla=
ss=3Dsecno>5.1.5 </span>Selecting names when defining vocabulari=
es</h4>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <p>Using microdata means using a vocabulary. For some purposes, =
an ad-hoc vocabulary is adequate.
+  For others, a vocabulary will need to be designed. Where possible, aut=
hors are encouraged to
+  re-use existing vocabularies, as this makes content re-use easier.<=
/p>
+
+  <p>When designing new vocabularies, identifiers can be created e=
ither using <a href=3D#url title=3DURL>URLs</a>, or, for prop=
erties, as plain words (with no dots or colons). For URLs,
+  conflicts with other vocabularies can be avoided by only using identif=
iers that correspond to
+  pages that the author has control over.</p>
+
+  <div class=3Dexample>
+
+   <p>For instance, if Jon and Adam both write content at <code=
 title=3D"">example.com</code>, at <code title=3D&q=
uot;">http://example.com/~jon/...</code> and <code title=
=3D"">http://example.com/~adam/...</code> respectively=
, then
+   they could select identifiers of the form
+   "http://example.com/~jon/name" and "http://example.com=
/~adam/name"
+   respectively.</p>
+
+  </div>
+
+  <p>Properties whose names are just plain words can only be used =
within the context of the types
+  for which they are intended; properties named using URLs can be reused=
 in items of any type. If an
+  item has no type, and is not part of another item, then if its propert=
ies have names that are just
+  plain words, they are not intended to be globally unique, and are inst=
ead only intended for
+  limited use. Generally speaking, authors are encouraged to use either =
properties with globally
+  unique names (URLs) or ensure that their items are typed.</p>
+
+  <div class=3Dexample>
+
+   <p>Here, an item is an "http://example.org/animals#cat&quo=
t;, and most of the properties have names
+   that are words defined in the context of that type. There are also a =
few additional properties
+   whose names come from other vocabularies.</p>
+
+<pre><section itemscope itemtype=3D"http://example.org=
/animals#cat">
+ <h1 itemprop=3D"name http://example.com/fn">Hed=
ral</h1>
+ <p itemprop=3D"desc">Hedral is a male american =
domestic
+ shorthair, with a fluffy <span
+ itemprop=3D"http://example.com/color">black</sp=
an> fur with <span
+ itemprop=3D"http://example.com/color">white</sp=
an> paws and belly.</p>
+ <img itemprop=3D"img" src=3D"hedral.jpeg" al=
t=3D"" title=3D"Hedral, age 18 months">
+</section></pre>
+
+   <p>This example has one item with the type "http://example=
.org/animals#cat" and the following
+   properties:</p>
+
+   <table><thead><tr><td>Property
+      <td>Value
+    <tbody><tr><td>name
+      <td>Hedral
+     <tr><td>http://example.com/fn
+      <td>Hedral
+     <tr><td>desc
+      <td>Hedral is a male american domestic shorthair, with a flu=
ffy black fur with white paws and belly.
+     <tr><td>http://example.com/color
+      <td>black
+     <tr><td>http://example.com/color
+      <td>white
+     <tr><td>img
+      <td>.../hedral.jpeg
+   </table></div>
+
+
+
+  <h4 id=3Dusing-the-microdata-dom-api><span class=3Dsecno>5=
.1.6 </span>Using the microdata DOM API</h4>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <p>The microdata becomes even more useful when scripts can use i=
t to expose information to the
+  user, for example offering it in a form that can be used by other appl=
ications.</p>
+
+  <p>The <code title=3Ddom-document-getItems><a href=3D#d=
om-document-getitems>document.getItems(<var title=3D""&gt=
;typeNames</var>)</a></code>
+  method provides access to the <a href=3D#top-level-microdata-items&=
gt;top-level microdata items</a>. It returns a
+  <code><a href=3D#nodelist>NodeList</a></code> =
containing the items with the specified types, or all types if no argumen=
t
+  is specified.</p>
+
+  <p>Each <a href=3D#concept-item title=3Dconcept-item>item&=
lt;/a> is represented in the DOM by the element on which
+  the relevant <code title=3Dattr-itemscope><a href=3D#attr-ite=
mscope>itemscope</a></code> attribute is found. These elem=
ents have
+  their <code title=3Ddom-itemScope><a href=3D#dom-itemscope&gt=
;element.itemScope</a></code> IDL attribute set to true.</=
p>
+
+  <p>The type(s) of <a href=3D#concept-item title=3Dconcept-ite=
m>items</a> can be obtained using the <code title=3Ddom-itemT=
ype><a href=3D#dom-itemtype>element.itemType</a></code&=
gt; IDL attribute on the element with the <code title=3Dattr-itemscope=
><a href=3D#attr-itemscope>itemscope</a></code> attr=
ibute.</p>
+
+  <div class=3Dexample>
+
+   <p>This sample shows how the <code title=3Ddom-document-getI=
tems><a href=3D#dom-document-getitems>getItems()</a></c=
ode> method can be
+   used to obtain a list of all the top-level microdata items of a parti=
cular type given in the
+   document:</p>
+
+   <pre>var cats =3D document.getItems("http://example.com/fe=
line");</pre>
+
+  </div>
+
+  <p>Once an element representing an <a href=3D#concept-item ti=
tle=3Dconcept-item>item</a> has been obtained, its
+  properties can be extracted using the <code title=3Ddom-properties&=
gt;<a href=3D#dom-properties>properties</a></code> IDL
+  attribute. This attribute returns an <code><a href=3D#htmlpro=
pertiescollection>HTMLPropertiesCollection</a></code>, whi=
ch can be
+  enumerated to go through each element that adds one or more properties=
 to the item. It can also be
+  indexed by name, which will return an object with a list of the elemen=
ts that add properties with
+  that name.</p>
+
+  <p>Each element that adds a property also has an <code title=3D=
dom-itemValue><a href=3D#dom-itemvalue>itemValue</a></c=
ode> IDL
+  attribute that returns its value.</p>
+
+  <div class=3Dexample>
+
+   <p>This sample gets the first item of type "http://example=
.net/user" and then pops up an alert
+   using the "name" property from that item.</p>
+
+   <pre>var user =3D document.getItems('http://example.net/user')[=
0];
+alert('Hello ' + user.properties['name'][0].itemValue + '!');</pre&gt=
;
+
+  </div>
+
+  <p>The <code><a href=3D#htmlpropertiescollection>HTM=
LPropertiesCollection</a></code> object, when indexed by name=
 in this way, actually
+  returns a <code><a href=3D#propertynodelist>PropertyNodeLi=
st</a></code> object with all the matching properties. The
+  <code><a href=3D#propertynodelist>PropertyNodeList</a&g=
t;</code> object can be used to obtain all the values at once using
+  <em>its</em> <code title=3Ddom-PropertyNodeList-getValu=
es><a href=3D#dom-propertynodelist-getvalues>getValues</a>=
</code> method, which returns
+  an array of all the values.</p>
+
+  <div class=3Dexample>
+
+   <p>In an earlier example, a "http://example.org/animals#ca=
t" item had two
+   "http://example.com/color" values. This script looks up the=
 first such item and then lists all
+   its values.</p>
+
+   <pre>var cat =3D document.getItems('http://example.org/animals#=
cat')[0];
+var colors =3D cat.properties['http://example.com/color'].getValues();
+var result;
+if (colors.length =3D=3D 0) {
+  result =3D 'Color unknown.';
+} else if (colors.length =3D=3D 1) {
+  result =3D 'Color: ' + colors[0];
+} else {
+  result =3D 'Colors:';
+  for (var i =3D 0; i < colors.length; i +=3D 1)
+    result +=3D ' ' + colors[i];
+}</pre>
+
+  </div>
+
+  <p>It's also possible to get a list of all the <a href=3D#pro=
perty-names>property names</a> using the object's
+  <code title=3Ddom-HTMLPropertiesCollection-names><a href=3D#d=
om-htmlpropertiescollection-names>names</a></code> IDL att=
ribute.</p>
+
+  <div class=3Dexample>
+
+   <p>This example creates a big list with a nested list for each =
item on the page, each with all of
+   the property names used in that item.</p>
+
+   <pre>var outer =3D document.createElement('ul');
+var items =3D document.getItems();
+for (var item =3D 0; item < items.length; item +=3D 1) {
+  var itemLi =3D document.createElement('li');
+  var inner =3D document.createElement('ul');
+  for (var name =3D 0; name < items[item].properties.names.length=
; name +=3D 1) {
+    var propLi =3D document.createElement('li');
+    propLi.appendChild(document.createTextNode(items[item].properties.na=
mes[name]));
+    inner.appendChild(propLi);
+  }
+  itemLi.appendChild(inner);
+  outer.appendChild(itemLi);
+}
+document.body.appendChild(outer);</pre>
+
+   <p>If faced with the following from an earlier example:</p&g=
t;
+
+   <pre><section itemscope itemtype=3D"http://example.=
org/animals#cat">
+ <h1 itemprop=3D"name http://example.com/fn">Hed=
ral</h1>
+ <p itemprop=3D"desc">Hedral is a male american =
domestic
+ shorthair, with a fluffy <span
+ itemprop=3D"http://example.com/color">black</sp=
an> fur with <span
+ itemprop=3D"http://example.com/color">white</sp=
an> paws and belly.</p>
+ <img itemprop=3D"img" src=3D"hedral.jpeg" al=
t=3D"" title=3D"Hedral, age 18 months">
+</section></pre>
+
+   <p>...it would result in the following output:</p>
+
+   <ul><li>
+     <ul><li>name</li>
+      <li>http://example.com/fn</li>
+      <li>desc</li>
+      <li>http://example.com/color</li>
+      <li>img</li>
+     </ul></li>
+   </ul><p>(The duplicate occurrence of "http://example=
.com/color" is not included in the list.)</p>
+
+  </div>
+
+
+  <h3 id=3Dencoding-microdata><span class=3Dsecno>5.2 </s=
pan>Encoding microdata</h3>
+
+
+  <h4 id=3Dthe-microdata-model><span class=3Dsecno>5.2.1 &lt=
;/span>The microdata model</h4>
+
+  <p>The microdata model consists of groups of name-value pairs kn=
own as <a href=3D#concept-item title=3Dconcept-item>items</a>=
.</p>
+
+  <p>Each group is known as an <a href=3D#concept-item title=3D=
concept-item>item</a>. Each <a href=3D#concept-item title=3Dc=
oncept-item>item</a> can have <a href=3D#item-types>item t=
ypes</a>, a <a href=3D#global-identifier>global
+  identifier</a> (if the vocabulary specified by the <a href=3D=
#item-types>item types</a> <a href=3D#support-global-identifi=
ers-for-items>support global
+  identifiers for items</a>), and a list of name-value pairs. Each=
 name in the name-value pair is
+  known as a <a href=3D#the-properties-of-an-item title=3D"the p=
roperties of an item">property</a>, and each <a href=3D#=
the-properties-of-an-item title=3D"the
+  properties of an item">property</a> has one or more <=
a href=3D#concept-property-value title=3Dconcept-property-value>values=
</a>. Each <a href=3D#concept-property-value title=3Dconcept-pro=
perty-value>value</a> is either a string or itself a group of na=
me-value
+  pairs (an <a href=3D#concept-item title=3Dconcept-item>item</=
a>). The names are unordered relative to each other,
+  but if a particular name has multiple values, they do have a relative =
order.</p>
+
+
+
+  <h4 id=3Ditems><span class=3Dsecno>5.2.2 </span>Item=
s</h4>
+
+  <p>Every <a href=3D#html-elements title=3D"HTML elements=
">HTML element</a> may have an <dfn id=3Dattr-itemscope =
title=3Dattr-itemscope><code>itemscope</code></dfn> =
attribute specified. The <code title=3Dattr-itemscope><a href=3D=
#attr-itemscope>itemscope</a></code> attribute is a <a =
href=3D#boolean-attribute>boolean attribute</a>.</p>
+
+  <p>An element with the <code title=3Dattr-itemscope><a =
href=3D#attr-itemscope>itemscope</a></code> attribute spec=
ified creates a
+  new <dfn id=3Dconcept-item title=3Dconcept-item>item</dfn>=
, a group of name-value pairs.</p>
+
+  <hr><p>Elements with an <code title=3Dattr-itemscope&gt=
;<a href=3D#attr-itemscope>itemscope</a></code> attribu=
te may have an <dfn id=3Dattr-itemtype title=3Dattr-itemtype><co=
de>itemtype</code></dfn> attribute specified, to give the =
<a href=3D#item-types>item
+  types</a> of the <a href=3D#concept-item title=3Dconcept-item=
>item</a>.</p>
+
+  <p>The <code title=3Dattr-itemtype><a href=3D#attr-item=
type>itemtype</a></code> attribute, if specified, must hav=
e a value that
+  is an <a href=3D#unordered-set-of-unique-space-separated-tokens>=
unordered set of unique space-separated tokens</a> that are
+  <a href=3D#case-sensitive>case-sensitive</a>, each of whic=
h is a <a href=3D#valid-url>valid URL</a> that is an <a hr=
ef=3D#absolute-url>absolute
+  URL</a>, and all of which are defined to use the same vocabulary=
. The attribute's value must
+  have at least one token.</p>
+
+  <p>The <dfn id=3Ditem-types>item types</dfn> of an &=
lt;a href=3D#concept-item title=3Dconcept-item>item</a> are the =
tokens obtained
+  by <a href=3D#split-a-string-on-spaces title=3D"split a string=
 on spaces">splitting the element's <code title=3Dattr-itemtyp=
e>itemtype</code> attribute's value on spaces</a>. If the =
<code title=3Dattr-itemtype><a href=3D#attr-itemtype>itemtype=
</a></code> attribute is missing or parsing it in this way fi=
nds no
+  tokens, the <a href=3D#concept-item title=3Dconcept-item>item&lt=
;/a> is said to have no <a href=3D#item-types>item types</a&g=
t;.</p>
+
+  <p>The <a href=3D#item-types>item types</a> must all=
 be types defined in <a href=3D#other-applicable-specifications title=3D=
"other applicable
+  specifications">applicable specifications</a> and must a=
ll be defined to use the same
+  vocabulary.</p>
+
+  <div class=3Dimpl>
+
+   <p>Except if otherwise specified by that specification, the &lt=
;a href=3D#url title=3DURL>URLs</a> given
+   as the <a href=3D#item-types>item types</a> should not be=
 automatically dereferenced.</p>
+
+   <p class=3Dnote>A specification could define that its <a hre=
f=3D#item-types title=3D"item types">item type</a>
+   can be derefenced to provide the user with help information, for exam=
ple. In fact, vocabulary
+   authors are encouraged to provide useful information at the given &lt=
;a href=3D#url>URL</a>.</p>
+
+   <p><a href=3D#item-types>Item types</a> are opaque =
identifiers, and user agents must not dereference unknown
+   <a href=3D#item-types>item types</a>, or otherwise decons=
truct them, in order to determine how to process
+   <a href=3D#concept-item title=3Dconcept-item>items</a> th=
at use them.</p>
+
+  </div>
+
+  <p>The <code title=3Dattr-itemtype><a href=3D#attr-item=
type>itemtype</a></code> attribute must not be specified o=
n elements
+  that do not have an <code title=3Dattr-itemscope><a href=3D#a=
ttr-itemscope>itemscope</a></code> attribute specified.&lt=
;/p>
+
+  <hr><p>An <a href=3D#concept-item title=3Dconcept-item&=
gt;item</a> is said to be a <dfn id=3Dtyped-item>typed item&l=
t;/dfn> when either it
+  has an <a href=3D#item-types title=3D"item types">item=
 type</a>, or it is the <a href=3D#concept-property-value title=3D=
concept-property-value>value</a> of a <a href=3D#the-properti=
es-of-an-item title=3D"the properties of an
+  item">property</a> of a <a href=3D#typed-item>type=
d item</a>. The <dfn id=3Drelevant-types>relevant types</d=
fn> for a
+  <a href=3D#typed-item>typed item</a> is the <a href=3D#=
concept-item title=3Dconcept-item>item</a>'s <a href=3D#item-=
types>item types</a>,
+  if it has any, or else is the <a href=3D#relevant-types>relevant=
 types</a> of the <a href=3D#concept-item title=3Dconcept-item&g=
t;item</a> for which it is a <a href=3D#the-properties-of-an-ite=
m title=3D"the properties of an
+  item">property</a>'s <a href=3D#concept-property-valu=
e title=3Dconcept-property-value>value</a>.</p>
+
+  <hr><p>Elements with an <code title=3Dattr-itemscope&gt=
;<a href=3D#attr-itemscope>itemscope</a></code> attribu=
te and an <code title=3Dattr-itemtype><a href=3D#attr-itemtype&g=
t;itemtype</a></code> attribute that references a vocabulary =
that is defined to
+  <dfn id=3Dsupport-global-identifiers-for-items>support global id=
entifiers for items</dfn> may also have an <dfn id=3Dattr-itemid=
 title=3Dattr-itemid><code>itemid</code></dfn> attri=
bute specified, to give a global identifier for
+  the <a href=3D#concept-item title=3Dconcept-item>item</a>,=
 so that it can be related to other <a href=3D#concept-item title=3Dco=
ncept-item>items</a> on pages elsewhere on the Web.</p>
+
+  <p>The <code title=3Dattr-itemid><a href=3D#attr-itemid=
>itemid</a></code> attribute, if specified, must have a va=
lue that is
+  a <a href=3D#valid-url-potentially-surrounded-by-spaces>valid UR=
L potentially surrounded by spaces</a>.</p>
+
+  <p>The <dfn id=3Dglobal-identifier>global identifier</d=
fn> of an <a href=3D#concept-item title=3Dconcept-item>item</=
a> is the value of
+  its element's <code title=3Dattr-itemid><a href=3D#attr-itemi=
d>itemid</a></code> attribute, if it has one, <a href=3D=
#resolve-a-url title=3D"resolve a url">resolved</a> re=
lative to the element on which the attribute is specified.
+  If the <code title=3Dattr-itemid><a href=3D#attr-itemid>it=
emid</a></code> attribute is missing or if resolving it fails=
, it
+  is said to have no <a href=3D#global-identifier>global identifie=
r</a>.</p>
+
+  <p>The <code title=3Dattr-itemid><a href=3D#attr-itemid=
>itemid</a></code> attribute must not be specified on elem=
ents that do
+  not have both an <code title=3Dattr-itemscope><a href=3D#attr=
-itemscope>itemscope</a></code> attribute and an <code =
title=3Dattr-itemtype><a href=3D#attr-itemtype>itemtype</a&gt=
;</code> attribute specified, and must not be specified on elements
+  with an <code title=3Dattr-itemscope><a href=3D#attr-itemscop=
e>itemscope</a></code> attribute whose <code title=3Dat=
tr-itemtype><a href=3D#attr-itemtype>itemtype</a></code=
> attribute specifies a vocabulary that does not <a href=3D#support=
-global-identifiers-for-items>support
+  global identifiers for items</a>, as defined by that vocabulary'=
s specification.</p>
+
+  <p>The exact meaning of a <a href=3D#global-identifier>glo=
bal identifier</a> is determined by the vocabulary's
+  specification. It is up to such specifications to define whether multi=
ple items with the same
+  global identifier (whether on the same page or on different pages) are=
 allowed to exist, and what
+  the processing rules for that vocabulary are with respect to handling =
the case of multiple items
+  with the same ID.</p>
+
+  <hr><p>Elements with an <code title=3Dattr-itemscope&gt=
;<a href=3D#attr-itemscope>itemscope</a></code> attribu=
te may have an <dfn id=3Dattr-itemref title=3Dattr-itemref><code=
>itemref</code></dfn> attribute specified, to give a list =
of additional
+  elements to crawl to find the name-value pairs of the <a href=3D#co=
ncept-item title=3Dconcept-item>item</a>.</p>
+
+  <p>The <code title=3Dattr-itemref><a href=3D#attr-itemr=
ef>itemref</a></code> attribute, if specified, must have a=
 value that
+  is an <a href=3D#unordered-set-of-unique-space-separated-tokens>=
unordered set of unique space-separated tokens</a> that are
+  <a href=3D#case-sensitive>case-sensitive</a>, consisting o=
f <a href=3D#concept-id title=3Dconcept-ID>IDs</a> of element=
s in the
+  same <a href=3D#home-subtree>home subtree</a>.</p>
+
+  <p>The <code title=3Dattr-itemref><a href=3D#attr-itemr=
ef>itemref</a></code> attribute must not be specified on e=
lements that
+  do not have an <code title=3Dattr-itemscope><a href=3D#attr-i=
temscope>itemscope</a></code> attribute specified.</p&g=
t;
+
+  <p class=3Dnote>The <code title=3Dattr-itemref><a href=3D=
#attr-itemref>itemref</a></code> attribute is not part of =
the
+  microdata data model. It is merely a syntactic construct to aid author=
s in adding annotations to
+  pages where the data to be annotated does not follow a convenient tree=
 structure. For example, it
+  allows authors to mark up data in a table so that each column defines =
a separate <a href=3D#concept-item title=3Dconcept-item>item</a&=
gt;, while keeping the properties in the cells.</p>
+
+  <div class=3Dexample>
+
+   <p>This example shows a simple vocabulary used to describe the =
products of a model railway
+   manufacturer. The vocabulary has just five property names:</p>
+
+   <dl><dt>product-code</dt>
+    <dd>An integer that names the product in the manufacturer's ca=
talog.</dd>
+    <dt>name</dt>
+    <dd>A brief description of the product.</dd>
+    <dt>scale</dt>
+    <dd>One of "HO", "1", or "Z" (po=
tentially with leading or trailing
+    whitespace), indicating the scale of the product.</dd>
+    <dt>digital</dt>
+    <dd>If present, one of "Digital", "Delta",=
 or "Systems"
+    (potentially with leading or trailing whitespace) indicating that
+    the product has a digital decoder of the given type.</dd>
+    <dt>track-type</dt>
+    <dd>For track-specific products, one of "K", "M=
", "C" (potentially
+    with leading or trailing whitespace) indicating the type of track
+    for which the product is intended.</dd>
+   </dl><p>This vocabulary has four defined <a href=3D#it=
em-types>item types</a>:</p>
+
+   <dl><dt>http://md.example.com/loco</dt>
+    <dd>Rolling stock with an engine</dd>
+    <dt>http://md.example.com/passengers</dt>
+    <dd>Passenger rolling stock</dd>
+    <dt>http://md.example.com/track</dt>
+    <dd>Track pieces</dd>
+    <dt>http://md.example.com/lighting</dt>
+    <dd>Equipment with lighting</dd>
+   </dl><p>Each <a href=3D#concept-item title=3Dconcept-i=
tem>item</a> that uses this vocabulary can be given one or more
+   of these types, depending on what the product is.</p>
+
+   <p>Thus, a locomotive might be marked up as:</p>
+
+<pre><dl itemscope itemtype=3D"http://md.example.com/l=
oco=20
+                        http://md.example.com/lighting">
+ <dt>Name:
+ <dd itemprop=3D"name">Tank Locomotive (DB 80)
+ <dt>Product code:
+ <dd itemprop=3D"product-code">33041
+ <dt>Scale:
+ <dd itemprop=3D"scale">HO
+ <dt>Digital:
+ <dd itemprop=3D"digital">Delta
+</dl></pre>
+
+   <p>A turnout lantern retrofit kit might be marked up as:</p&=
gt;
+
+   <pre><dl itemscope itemtype=3D"http://md.example.co=
m/track
+                       http://md.example.com/lighting">   =20
+ <dt>Name:
+ <dd itemprop=3D"name">Turnout Lantern Kit
+ <dt>Product code:
+ <dd itemprop=3D"product-code">74470
+ <dt>Purpose:
+ <dd>For retrofitting 2 <span itemprop=3D"trac=
k-type">C</span> Track=20
+ turnouts. <meta itemprop=3D"scale" content=3D"HO&=
quot;>
+</dl></pre>
+
+   <p>A passenger car with no lighting might be marked up as:</=
p>
+
+   <pre><dl itemscope itemtype=3D"http://md.example.co=
m/passengers">
+ <dt>Name:
+ <dd itemprop=3D"name">Express Train Passenger C=
ar (DB Am 203)
+ <dt>Product code:
+ <dd itemprop=3D"product-code">8710
+ <dt>Scale:
+ <dd itemprop=3D"scale">Z
+</dl></pre>
+
+   <p>Great care is necessary when creating new vocabularies. Ofte=
n, a hierarchical approach to
+   types can be taken that results in a vocabulary where each item only =
ever has a single type,
+   which is generally much simpler to manage.</p>
+
+  </div>
+
+
+  <h4 id=3Dnames:-the-itemprop-attribute><span class=3Dsecno&gt=
;5.2.3 </span>Names: the <dfn title=3Dattr-itemprop><code&=
gt;itemprop</code></dfn> attribute</h4>
+
+  <p>Every <a href=3D#html-elements title=3D"HTML elements=
">HTML element</a> may have an <code title=3Dattr-itempr=
op><a href=3D#names:-the-itemprop-attribute>itemprop</a>&l=
t;/code> attribute specified, if doing so <a href=3D#the-properties=
-of-an-item title=3D"the properties
+  of an item">adds one or more properties</a> to one or mo=
re <a href=3D#concept-item title=3Dconcept-item>items</a> (as=
 defined below).</p>
+
+  <p>The <code title=3Dattr-itemprop><a href=3D#names:-th=
e-itemprop-attribute>itemprop</a></code> attribute, if spe=
cified, must have a value that
+  is an <a href=3D#unordered-set-of-unique-space-separated-tokens>=
unordered set of unique space-separated tokens</a> that are
+  <a href=3D#case-sensitive>case-sensitive</a>, representing=
 the names of the name-value pairs that it adds. The
+  attribute's value must have at least one token.</p>
+
+  <p>Each token must be either:</p>
+
+  <ul><li>If the item is a <a href=3D#typed-item>typed=
 item</a>: a <dfn id=3Ddefined-property-name>defined property=
 name</dfn> allowed in this
+   situation according to the specification that defines the <a href=3D=
#relevant-types>relevant types</a> for the
+   item, or</li>
+
+   <li>A <a href=3D#valid-url>valid URL</a> that is an=
 <a href=3D#absolute-url>absolute URL</a> defined as an item =
property
+   name allowed in this situation by a vocabulary specification, or</=
li>
+
+   <li>A <a href=3D#valid-url>valid URL</a> that is an=
 <a href=3D#absolute-url>absolute URL</a>, used as a propriet=
ary item
+   property name (i.e. one used by the author for private purposes, not =
defined in a public
+   specification), or</li>
+
+   <li>If the item is not a <a href=3D#typed-item>typed item=
</a>: a string that contains no U+002E FULL STOP
+   characters (.) and no U+003A COLON characters (:), used as a propriet=
ary item property name (i.e.
+   one used by the author for private purposes, not defined in a public =
specification).</li>
+
+  </ul><p>Specifications that introduce <a href=3D#define=
d-property-name title=3D"defined property name">defined prop=
erty names</a>
+  must ensure all such property names contain no U+002E FULL STOP charac=
ters (.), no U+003A COLON
+  characters (:), and no <a href=3D#space-character title=3D"spa=
ce character">space characters</a>.</p>
+
+  <p>When an element with an <code title=3Dattr-itemprop>&lt=
;a href=3D#names:-the-itemprop-attribute>itemprop</a></code&g=
t; attribute <a href=3D#the-properties-of-an-item title=3D"the
+  properties of an item">adds a property</a> to multiple &=
lt;a href=3D#concept-item title=3Dconcept-item>items</a>,
+  the requirement above regarding the tokens applies for each <a href=
=3D#concept-item title=3Dconcept-item>item</a>
+  individually.</p>
+
+  <!--
+
+   e.g.:
+
+     <div itemscope itemtype=3D"http://example.com/a"> &=
lt;ref refid=3D"x"> </div>
+     <div itemscope itemtype=3D"http://example.com/b"> &=
lt;ref refid=3D"x"> </div>
+     <meta id=3D"x" itemprop=3D"z" content=3D&quo=
t;">
+
+     "z" had better be valid for both http://example.com/a and=
 http://example.com/b
+
+  -->
+
+  <p>The <dfn id=3Dproperty-names>property names</dfn>=
 of an element are the tokens that the element's <code title=3Dattr-it=
emprop><a href=3D#names:-the-itemprop-attribute>itemprop</a&g=
t;</code> attribute is found to contain when its value is <a hre=
f=3D#split-a-string-on-spaces title=3D"split a string on spaces&quot=
;>split on spaces</a>, with the order preserved but with
+  duplicates removed (leaving only the first occurrence of each name).&l=
t;/p>
+
+  <p>Within an <a href=3D#concept-item title=3Dconcept-item>=
item</a>, the properties are unordered with respect to
+  each other, except for properties with the same name, which are ordere=
d in the order they are
+  given by the algorithm that defines <a href=3D#the-properties-of-an=
-item>the properties of an item</a>.</p>
+
+  <div class=3Dexample>
+
+   <p>In the following example, the "a" property has the=
 values "1" and "2", <em>in that order</em&g=
t;,
+   but whether the "a" property comes before the "b"=
 property or not is not important:</p>
+
+   <pre><div itemscope>
+ <p itemprop=3D"a">1</p>
+ <p itemprop=3D"a">2</p>
+ <p itemprop=3D"b">test</p>
+</div></pre>
+
+   <p>Thus, the following is equivalent:</p>
+
+   <pre><div itemscope>
+ <p itemprop=3D"b">test</p>
+ <p itemprop=3D"a">1</p>
+ <p itemprop=3D"a">2</p>
+</div></pre>
+
+   <p>As is the following:</p>
+
+   <pre><div itemscope>
+ <p itemprop=3D"a">1</p>
+ <p itemprop=3D"b">test</p>
+ <p itemprop=3D"a">2</p>
+</div></pre>
+
+   <p>And the following:</p>
+
+   <pre><div id=3D"x">
+ <p itemprop=3D"a">1</p>
+</div>
+<div itemscope itemref=3D"x">
+ <p itemprop=3D"b">test</p>
+ <p itemprop=3D"a">2</p>
+</div>
+</pre>
+
+  </div>
+
+
+
+  <h4 id=3Dvalues><span class=3Dsecno>5.2.4 </span>Val=
ues</h4>
+
+  <p>The <dfn id=3Dconcept-property-value title=3Dconcept-prope=
rty-value>property value</dfn> of a name-value pair added by an
+  element with an <code title=3Dattr-itemprop><a href=3D#names:=
-the-itemprop-attribute>itemprop</a></code> attribute is a=
s given for the first
+  matching case in the following list:</p>
+
+  <dl class=3Dswitch><dt>If the element also has an <code=
 title=3Dattr-itemscope><a href=3D#attr-itemscope>itemscope</=
a></code> attribute</dt>
+
+   <dd>
+
+    <p>The value is the <a href=3D#concept-item title=3Dconcept=
-item>item</a> created by the element.</p>
+
+   </dd>
+
+
+   <dt>If the element is a <code><a href=3D#the-meta-elem=
ent>meta</a></code> element</dt>
+
+   <dd>
+
+    <p>The value is the value of the element's <code title=3Dat=
tr-content>content</code> attribute,
+    if any, or the empty string if there is no such attribute.</p>
+
+   </dd>
+
+
+   <dt>If the element is an <code><a href=3D#the-audio-el=
ement>audio</a></code>, <code><a href=3D#the-embe=
d-element>embed</a></code>, <code><a href=3D#the-=
iframe-element>iframe</a></code>,
+   <code><a href=3D#the-img-element>img</a></code&g=
t;, <code><a href=3D#the-source-element>source</a></=
code>, <code><a href=3D#the-track-element>track</a>&=
lt;/code>, or <code><a href=3D#the-video-element>video<=
/a></code> element</dt>
+
+   <dd>
+
+    <p>The value is the <a href=3D#absolute-url>absolute URL=
</a> that results from <a href=3D#resolve-a-url title=3D"re=
solve a
+    url">resolving</a> the value of the element's <code=
 title=3D"">src</code> attribute relative to
+    the element at the time the attribute is set, or the empty string if=
 there is no such attribute
+    or if <a href=3D#resolve-a-url title=3D"resolve a url"&=
gt;resolving</a> it results in an error.</p>
+
+   </dd>
+
+
+   <dt>If the element is an <code><a href=3D#the-a-elemen=
t>a</a></code>, <code><a href=3D#the-area-element=
>area</a></code>, or <code><a href=3D#the-link-el=
ement>link</a></code> element</dt>
+
+   <dd>
+
+    <p>The value is the <a href=3D#absolute-url>absolute URL=
</a> that results from <a href=3D#resolve-a-url title=3D"re=
solve a
+    url">resolving</a> the value of the element's <code=
 title=3D"">href</code> attribute relative
+    to the element at the time the attribute is set, or the empty string=
 if there is no such
+    attribute or if <a href=3D#resolve-a-url title=3D"resolve a =
url">resolving</a> it results in an error.</p>
+
+   </dd>
+
+
+   <dt>If the element is an <code><a href=3D#the-object-e=
lement>object</a></code> element</dt>
+
+   <dd>
+
+    <p>The value is the <a href=3D#absolute-url>absolute URL=
</a> that results from <a href=3D#resolve-a-url title=3D"re=
solve a
+    url">resolving</a> the value of the element's <code=
 title=3D"">data</code> attribute relative
+    to the element at the time the attribute is set, or the empty string=
 if there is no such
+    attribute or if <a href=3D#resolve-a-url title=3D"resolve a =
url">resolving</a> it results in an error.</p>
+
+   </dd>
+
+
+   <dt>If the element is a <code><a href=3D#the-data-elem=
ent>data</a></code> element</dt>
+
+   <dd>
+
+    <p>The value is the value of the element's <code title=3Dat=
tr-data-value><a href=3D#attr-data-value>value</a></cod=
e> attribute,
+    if it has one, or the empty string otherwise.</p>
+
+   </dd>
+
+
+   <dt>If the element is a <code><a href=3D#the-meter-ele=
ment>meter</a></code> element</dt>
+
+   <dd>
+
+    <p>The value is the value of the element's <code title=3Dat=
tr-meter-value><a href=3D#attr-meter-value>value</a></c=
ode> attribute,
+    if it has one, or the empty string otherwise.</p>
+
+   </dd>
+
+
+   <dt>If the element is a <code><a href=3D#the-time-elem=
ent>time</a></code> element</dt>
+
+   <dd>
+
+    <p>The value is the element's <a href=3D#datetime-value>=
datetime value</a>.</p>
+
+   </dd>
+
+
+   <dt>Otherwise</dt>
+
+   <dd>
+
+    <p>The value is the element's <code><a href=3D#textco=
ntent>textContent</a></code>.</p>
+
+   </dd>
+
+  </dl><p>The <dfn id=3Durl-property-elements>URL prop=
erty elements</dfn> are the <code><a href=3D#the-a-element=
>a</a></code>, <code><a href=3D#the-area-element&=
gt;area</a></code>,
+  <code><a href=3D#the-audio-element>audio</a></cod=
e>, <code><a href=3D#the-embed-element>embed</a><=
/code>, <code><a href=3D#the-iframe-element>iframe</a&g=
t;</code>, <code><a href=3D#the-img-element>img</a&g=
t;</code>, <code><a href=3D#the-link-element>link</a=
></code>,
+  <code><a href=3D#the-object-element>object</a></c=
ode>, <code><a href=3D#the-source-element>source</a>=
</code>, <code><a href=3D#the-track-element>track</a=
></code>, and <code><a href=3D#the-video-element>vid=
eo</a></code> elements.</p>
+
+  <p>If a property's <a href=3D#concept-property-value title=3D=
concept-property-value>value</a>, as defined by the property's
+  definition, is an <a href=3D#absolute-url>absolute URL</a>=
, the property must be specified using a <a href=3D#url-property-eleme=
nts title=3D"URL property elements">URL property element<=
/a>.</p>
+
+  <p class=3Dnote>These requirements do not apply just because a p=
roperty value happens to match the
+  syntax for a URL. They only apply if the property is explicitly define=
d as taking such a
+  value.</p>
+
+  <p class=3Dexample>For example, a book about the first moon land=
ing <!-- 1969-07-20 --> could be
+  called "mission:moon". A "title" property from a v=
ocabulary that defines a title as being a string
+  would not expect the title to be given in an <code><a href=3D=
#the-a-element>a</a></code> element, even though it looks =
like a
+  <a href=3D#url>URL</a>. On the other hand, if there was a =
(rather narrowly scoped!) vocabulary for
+  "books whose titles look like URLs" which had a "title&=
quot; property defined to take a URL, then the
+  property <em>would</em> expect the title to be given in an=
 <code><a href=3D#the-a-element>a</a></code> elem=
ent (or one of the
+  other <a href=3D#url-property-elements>URL property elements<=
/a>), because of the requirement above.</p>
+
+
+  <div class=3Dimpl>
+
+  <h4 id=3Dassociating-names-with-items><span class=3Dsecno>=
5.2.5 </span>Associating names with items</h4>
+
+  <p>To find <dfn id=3Dthe-properties-of-an-item>the propert=
ies of an item</dfn> defined by the element <var title=3D"&=
quot;>root</var>,
+  the user agent must run the following steps. These steps are also used=
 to flag <a href=3D#microdata-error title=3D"microdata error&quot=
;>microdata errors</a>.</p>
+
+  <ol><li><p>Let <var title=3D"">resul=
ts</var>, <var title=3D"">memory</var>, and &=
lt;var title=3D"">pending</var> be empty lists of elem=
ents.</li>
+
+   <li><p>Add the element <var title=3D"">ro=
ot</var> to <var title=3D"">memory</var>.<=
/li>
+
+   <li><p>Add the child elements of <var title=3D"&q=
uot;>root</var>, if any, to <var title=3D"">pend=
ing</var>.</li>
+
+   <li><p>If <var title=3D"">root</var&gt=
; has an <code title=3Dattr-itemref><a href=3D#attr-itemref>i=
temref</a></code> attribute,
+   <a href=3D#split-a-string-on-spaces title=3D"split a string o=
n spaces">split the value of that <code title=3Dattr-itemref&g=
t;itemref</code> attribute on spaces</a>. For each resulting =
token <var title=3D"">ID</var>, if there is an elem=
ent in the <a href=3D#home-subtree>home subtree</a> of <va=
r title=3D"">root</var> with the <a href=3D#concept=
-id title=3Dconcept-ID>ID</a> <var title=3D"">ID=
</var>, then add
+   the first such element to <var title=3D"">pending<=
/var>.</li>
+
+   <li><p><i>Loop</i>: If <var title=3D"=
">pending</var> is empty, jump to the step labeled <i&gt=
;end of
+   loop</i>.</li>
+
+   <li><p>Remove an element from <var title=3D"&quot=
;>pending</var> and let <var title=3D"">current&=
lt;/var> be
+   that element.</li>
+
+   <li><p>If <var title=3D"">current</var=
> is already in <var title=3D"">memory</var>, th=
ere is a
+   <a href=3D#microdata-error>microdata error</a>; return to=
 the step labeled <i>loop</i>.</li>
+
+   <li><p>Add <var title=3D"">current</va=
r> to <var title=3D"">memory</var>.</li>
+
+   <li><p>If <var title=3D"">current</var=
> does not have an <code title=3Dattr-itemscope><a href=3D#at=
tr-itemscope>itemscope</a></code> attribute, then: add all=
 the child elements of <var title=3D"">current</var&gt=
; to <var title=3D"">pending</var>.</li>
+
+   <li><p>If <var title=3D"">current</var=
> has an <code title=3Dattr-itemprop><a href=3D#names:-the-it=
emprop-attribute>itemprop</a></code>
+   attribute specified and has one or more <a href=3D#property-names&=
gt;property names</a>, then add <var title=3D"">cur=
rent</var> to <var title=3D"">results</var>.&=
lt;/li>
+
+   <li><p>Return to the step labeled <i>loop</i>=
.</li>
+
+   <li><p><i>End of loop</i>: Sort <var title=
=3D"">results</var> in <a href=3D#tree-order>tre=
e order</a>.</li>
+
+   <li><p>Return <var title=3D"">results<=
/var>.</li>
+
+  </ol><p>A document must not contain any <a href=3D#conc=
ept-item title=3Dconcept-item>items</a> for which the algorithm
+  to find <a href=3D#the-properties-of-an-item>the properties of a=
n item</a> finds any <dfn id=3Dmicrodata-error title=3D"mic=
rodata error">microdata
+  errors</dfn>.</p>
+
+  <p>An <a href=3D#concept-item title=3Dconcept-item>item&lt=
;/a> is a <dfn id=3Dtop-level-microdata-items title=3D"top-lev=
el microdata items">top-level
+  microdata item</dfn> if its element does not have an <code ti=
tle=3Dattr-itemprop><a href=3D#names:-the-itemprop-attribute>ite=
mprop</a></code>
+  attribute.</p>
+
+<!--(this is currently redundant with "requirement itemprop&quot=
; below)
+  <p>An <span title=3D"concept-item">item</span=
> is a <dfn title=3D"used microdata items">used microd=
ata
+  item</dfn> if it is a <span title=3D"top-level microdata=
 items">top-level microdata item</span>, or
+  if it has an <code title=3D"attr-itemprop">itemprop&lt=
;/code> attribute and would be <span title=3D"the
+  properties of an item">found to be the property</span> o=
f an <span
+  title=3D"concept-item">item</span> that is itself a=
 <span title=3D"used microdata items">used
+  microdata item</span>.</p>
+
+  <p>All <span title=3D"concept-item">items</sp=
an> in a document must be <span>used microdata
+  items</span>.</p>
+-->
+
+  <p>All <code title=3Dattr-itemref><a href=3D#attr-itemr=
ef>itemref</a></code> attributes in a <code><a hr=
ef=3D#document>Document</a></code> must be
+  such that there are no cycles in the graph formed from representing ea=
ch <a href=3D#concept-item title=3Dconcept-item>item</a> in t=
he <code><a href=3D#document>Document</a></code> =
as a node in the graph and each
+  <a href=3D#the-properties-of-an-item title=3D"the properties o=
f an item">property</a> of an item whose <a href=3D#conc=
ept-property-value title=3Dconcept-property-value>value</a> is a=
nother item as an edge in the graph connecting
+  those two items.</p>
+
+  <!-- "requirement itemprop" (see above) -->
+  <p>A document must not contain any elements that have an <cod=
e title=3Dattr-itemprop><a href=3D#names:-the-itemprop-attribute&gt=
;itemprop</a></code> attribute that would not be found to be =
a property of any of
+  the <a href=3D#concept-item title=3Dconcept-item>items</a>=
 in that document were their <a href=3D#the-properties-of-an-item titl=
e=3D"the
+  properties of an item">properties</a> all to be determin=
ed.</p>
+
+  <div class=3Dexample>
+
+   <p>In this example, a single license statement is applied to tw=
o works, using <code title=3Dattr-itemref><a href=3D#attr-itemre=
f>itemref</a></code> from the items representing the works=
:</p>
+
+   <pre><!DOCTYPE HTML>
+<html>
+ <head>
+  <title>Photo gallery</title>
+ </head>
+ <body>
+  <h1>My photos</h1>
+  <figure itemscope itemtype=3D"http://n.whatwg.org/work&quo=
t; itemref=3D"licenses">
+   <img itemprop=3D"work" src=3D"images/house.jpeg=
" alt=3D"A white house, boarded up, sits in a forest."&amp=
;gt;
+   <figcaption itemprop=3D"title">The house I fo=
und.</figcaption>
+  </figure>
+  <figure itemscope itemtype=3D"http://n.whatwg.org/work&quo=
t; itemref=3D"licenses">
+   <img itemprop=3D"work" src=3D"images/mailbox.jp=
eg" alt=3D"Outside the house is a mailbox. It has a leaflet ins=
ide.">
+   <figcaption itemprop=3D"title">The mailbox.&a=
mp;lt;/figcaption>
+  </figure>
+  <footer>
+   <p id=3D"licenses">All images licensed under =
the <a itemprop=3D"license"
+   href=3D"http://www.opensource.org/licenses/mit-license.php"=
>MIT
+   license</a>.</p>
+  </footer>
+ </body>
+</html></pre>
+
+   <p>The above results in two items with the type "<code =
title=3D"">http://n.whatwg.org/work</code>",
+   one with:</p>
+
+   <dl class=3Dbrief><dt>work
+    <dd><code title=3D"">images/house.jpeg</cod=
e>
+    <dt>title
+    <dd>The house I found.
+    <dt>license
+    <dd><code title=3D"">http://www.opensource.org=
/licenses/mit-license.php</code>
+   </dl><p>...and one with:</p>
+
+   <dl class=3Dbrief><dt>work
+    <dd><code title=3D"">images/mailbox.jpeg</c=
ode>
+    <dt>title
+    <dd>The mailbox.
+    <dt>license
+    <dd><code title=3D"">http://www.opensource.org=
/licenses/mit-license.php</code>
+   </dl></div>
+
+  </div> <!-- see comment above -->
+
+
+  <h4 id=3Dmicrodata-and-other-namespaces><span class=3Dsecno&g=
t;5.2.6 </span>Microdata and other namespaces</h4>
+
+  <p>Currently, the <code title=3Dattr-itemscope><a href=3D=
#attr-itemscope>itemscope</a></code>, <code title=3Datt=
r-itemprop><a href=3D#names:-the-itemprop-attribute>itemprop<=
/a></code>, and other microdata attributes are only defined for
+  <a href=3D#html-elements>HTML elements</a>. This means tha=
t attributes with the literal names "<code title=3D""&g=
t;itemscope</code>", "<code title=3D"">it=
emprop</code>", etc, do not cause microdata
+  processing to occur on elements in other namespaces, such as SVG.</=
p>
+
+  <div class=3Dexample>
+
+   <p>Thus, in the following example there is only one item, not
+   two.</p>
+
+   <pre class=3Dbad><p itemscope></p> =
<!-- this is an item (with no properties and no type) -->
+<svg itemscope></svg> <!-- this is no=
t, it's just an <code><a href=3D#svg>svg</a></code&g=
t; element with an invalid unknown attribute --></pre>
+
+  </div>
+
+
+  <h3 id=3Dmicrodata-dom-api><span class=3Dsecno>5.3 </sp=
an>Microdata DOM API</h3>
+
+  <dl class=3Ddomintro><dt><var title=3D"">d=
ocument</var> . <code title=3Ddom-document-getItems><a hre=
f=3D#dom-document-getitems>getItems</a></code>( [ <var =
title=3D"">types</var> ] )</dt>
+
+   <dd>
+
+    <p>Returns a <code><a href=3D#nodelist>NodeList&lt=
;/a></code> of the elements in the <code><a href=3D#doc=
ument>Document</a></code> that create
+    <a href=3D#concept-item title=3Dconcept-item>items</a>, =
that are not part of other <a href=3D#concept-item title=3Dconcept-ite=
m>items</a>, and that are of the types given in the argument, if=
 any are
+    listed.</p>
+
+    <p>The <var title=3D"">types</var> argum=
ent is interpreted as a space-separated list of types.</p>
+
+   </dd>
+
+   <dt><var title=3D"">element</var> . <c=
ode title=3Ddom-properties><a href=3D#dom-properties>properties&=
lt;/a></code></dt>
+
+   <dd>
+
+    <p>If the element has an <code title=3Dattr-itemscope>&l=
t;a href=3D#attr-itemscope>itemscope</a></code> attribute,=
 returns an
+    <code><a href=3D#htmlpropertiescollection>HTMLProperties=
Collection</a></code> object with all the element's propertie=
s. Otherwise, an
+    empty <code><a href=3D#htmlpropertiescollection>HTMLProp=
ertiesCollection</a></code> object.</p>
+
+   </dd>
+
+   <dt><var title=3D"">element</var> . <c=
ode title=3Ddom-itemValue><a href=3D#dom-itemvalue>itemValue<=
/a></code> [ =3D <var title=3D"">value</var&g=
t; ]</dt>
+
+   <dd>
+
+    <p>Returns the element's <a href=3D#concept-property-value =
title=3Dconcept-property-value>value</a>.</p>
+
+    <p>Can be set, to change the element's <a href=3D#concept-p=
roperty-value title=3Dconcept-property-value>value</a>.
+    Setting the <a href=3D#concept-property-value title=3Dconcept-pro=
perty-value>value</a> when the element has no <code title=3Da=
ttr-itemprop><a href=3D#names:-the-itemprop-attribute>itemprop&l=
t;/a></code> attribute or when the element's value is an <a h=
ref=3D#concept-item title=3Dconcept-item>item</a> throws an <=
code><a href=3D#invalidaccesserror>InvalidAccessError</a>&=
lt;/code> exception.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-document-getitems title=3Ddom-document-g=
etItems><code>document.getItems(<var title=3D"">=
typeNames</var>)</code></dfn> method takes a string tha=
t contains an
+  <a href=3D#unordered-set-of-unique-space-separated-tokens>unorde=
red set of unique space-separated tokens</a> that are <a href=3D=
#case-sensitive>case-sensitive</a>,
+  representing types. When called, the method must return a <a href=3D=
#live>live</a> <code><a href=3D#nodelist>NodeList&lt=
;/a></code>
+  object containing all the elements in the document, in <a href=3D#t=
ree-order>tree order</a>, that are each
+  <a href=3D#top-level-microdata-items>top-level microdata items&l=
t;/a> whose <a href=3D#item-types title=3D"item types"&gt=
;types</a> include all the
+  types specified in the method's argument, having obtained the types by=
 <a href=3D#split-a-string-on-spaces title=3D"split a string
+  on spaces">splitting the string on spaces</a>. If there =
are no tokens specified in the
+  argument, then the method must return a <code><a href=3D#node=
list>NodeList</a></code>
+  containing all the <a href=3D#top-level-microdata-items>top-leve=
l microdata items</a> in the document. When the method is
+  invoked on a <code><a href=3D#document>Document</a>&=
lt;/code> object again with the same argument, the user agent may retu=
rn
+  the same object as the object returned by the earlier call. In other c=
ases, a new
+  <code><a href=3D#nodelist>NodeList</a></code> =
object must be returned.</p>
+
+  <p>The <dfn id=3Ddom-itemscope title=3Ddom-itemScope><c=
ode>itemScope</code></dfn> IDL attribute on <a href=3D#=
html-elements>HTML
+  elements</a> must <a href=3D#reflect>reflect</a> the=
 <code title=3Dattr-itemscope><a href=3D#attr-itemscope>items=
cope</a></code>
+  content attribute. The <dfn id=3Ddom-itemtype title=3Ddom-itemType&=
gt;<code>itemType</code></dfn> IDL attribute on
+  <a href=3D#html-elements>HTML elements</a> must <a href=
=3D#reflect>reflect</a> the <code title=3Dattr-itemtype>&l=
t;a href=3D#attr-itemtype>itemtype</a></code> content attr=
ibute. The <dfn id=3Ddom-itemid title=3Ddom-itemId><code>item=
Id</code></dfn> IDL attribute on <a href=3D#html-elements&=
gt;HTML elements</a> must
+  <a href=3D#reflect>reflect</a> the <code title=3Dattr-i=
temid><a href=3D#attr-itemid>itemid</a></code> conte=
nt attribute. The <dfn id=3Ddom-itemprop title=3Ddom-itemProp><c=
ode>itemProp</code></dfn> IDL attribute on <a href=3D#h=
tml-elements>HTML elements</a> must
+  <a href=3D#reflect>reflect</a> the <code title=3Dattr-i=
temprop><a href=3D#names:-the-itemprop-attribute>itemprop</a&=
gt;</code> content attribute. The <dfn id=3Ddom-itemref title=3D=
dom-itemRef><code>itemRef</code></dfn> IDL attribute=
 on <a href=3D#html-elements>HTML elements</a> must
+  <a href=3D#reflect>reflect</a> the <code title=3Dattr-i=
temref><a href=3D#attr-itemref>itemref</a></code> co=
ntent attribute.</p>
+
+  <p>The <dfn id=3Ddom-properties title=3Ddom-properties>&lt=
;code>properties</code></dfn> IDL attribute on <a href=3D=
#html-elements>HTML
+  elements</a> must return an <code><a href=3D#htmlproper=
tiescollection>HTMLPropertiesCollection</a></code> rooted =
at the element's
+  <a href=3D#root-element>root element</a> (which element th=
is is might change during the collection's lifetime, as
+  the element moves between different subtrees), whose filter matches on=
ly elements that are <a href=3D#the-properties-of-an-item title=3D&quo=
t;the properties of an item">the properties of the item</a>=
 created by the element on
+  which the attribute was invoked, while that element is an <a href=3D=
#concept-item title=3Dconcept-item>item</a>,
+  and matches nothing the rest of the time.</p>
+
+  <p>The <dfn id=3Ddom-itemvalue title=3Ddom-itemValue><c=
ode>itemValue</code></dfn> IDL attribute's behavior depend=
s on
+  the element, as follows:</p>
+
+  <dl><dt>If the element has no <code title=3Dattr-itempr=
op><a href=3D#names:-the-itemprop-attribute>itemprop</a>&l=
t;/code> attribute</dt>
+
+   <dd><p>The attribute must return null on getting and must=
 throw an
+   <code><a href=3D#invalidaccesserror>InvalidAccessError&lt=
;/a></code> exception on setting.</p>
+
+
+   <dt>If the element has an <code title=3Dattr-itemscope>&l=
t;a href=3D#attr-itemscope>itemscope</a></code> attribute&=
lt;/dt>
+
+   <dd><p>The attribute must return the element itself on ge=
tting and must throw an
+   <code><a href=3D#invalidaccesserror>InvalidAccessError&lt=
;/a></code> exception on setting.</p>
+
+
+   <dt>If the element is a <code><a href=3D#the-meta-elem=
ent>meta</a></code> element</dt>
+
+   <dd><p>The attribute must act as it would if it was <a=
 href=3D#reflect title=3Dreflect>reflecting</a> the
+   element's <code title=3Dattr-meta-content><a href=3D#attr-me=
ta-content>content</a></code> content attribute.</dd&gt=
;
+
+
+   <dt>If the element is an <code><a href=3D#the-audio-el=
ement>audio</a></code>, <code><a href=3D#the-embe=
d-element>embed</a></code>, <code><a href=3D#the-=
iframe-element>iframe</a></code>,
+   <code><a href=3D#the-img-element>img</a></code&g=
t;, <code><a href=3D#the-source-element>source</a></=
code>, <code><a href=3D#the-track-element>track</a>&=
lt;/code>, or <code><a href=3D#the-video-element>video<=
/a></code> element</dt>
+
+   <dd><p>The attribute must act as it would if it was <a=
 href=3D#reflect title=3Dreflect>reflecting</a> the
+   element's <code title=3D"">src</code> content a=
ttribute.</dd>
+
+
+   <dt>If the element is an <code><a href=3D#the-a-elemen=
t>a</a></code>, <code><a href=3D#the-area-element=
>area</a></code>, or <code><a href=3D#the-link-el=
ement>link</a></code> element</dt>
+
+   <dd><p>The attribute must act as it would if it was <a=
 href=3D#reflect title=3Dreflect>reflecting</a> the
+   element's <code title=3D"">href</code> content =
attribute.</dd>
+
+
+   <dt>If the element is an <code><a href=3D#the-object-e=
lement>object</a></code> element</dt>
+
+   <dd><p>The attribute must act as it would if it was <a=
 href=3D#reflect title=3Dreflect>reflecting</a> the
+   element's <code title=3D"">data</code> content =
attribute.</dd>
+
+
+   <dt>If the element is a <code><a href=3D#the-data-elem=
ent>data</a></code> element</dt>
+
+   <dd><p>The attribute must act as it would if it was <a=
 href=3D#reflect title=3Dreflect>reflecting</a> the
+   element's <code title=3Dattr-data-value><a href=3D#attr-data=
-value>value</a></code> content attribute.</dd>
+
+
+   <dt>If the element is a <code><a href=3D#the-meter-ele=
ment>meter</a></code> element</dt>
+
+   <dd><p>The attribute must act as it would if it was <a=
 href=3D#reflect title=3Dreflect>reflecting</a> the
+   element's <code title=3Dattr-meter-value><a href=3D#attr-met=
er-value>value</a></code> content attribute.</dd>
+
+
+   <dt>If the element is a <code><a href=3D#the-time-elem=
ent>time</a></code> element</dt>
+
+   <dd><p>On getting, if the element has a <code title=3D=
attr-time-datetime><a href=3D#attr-time-datetime>datetime</a&=
gt;</code> content
+   attribute, the IDL attribute must return that content attribute's val=
ue; otherwise, it must
+   return the element's <code><a href=3D#textcontent>textCon=
tent</a></code>. On setting, the IDL attribute must act as it=
 would
+   if it was <a href=3D#reflect title=3Dreflect>reflecting</a&g=
t; the element's <code title=3Dattr-time-datetime><a href=3D#att=
r-time-datetime>datetime</a></code> content attribute.<=
/dd>
+
+
+   <dt>Otherwise</dt>
+
+   <dd><p>The attribute must act the same as the element's &=
lt;code><a href=3D#textcontent>textContent</a></code&gt=
;
+   attribute.</dd>
+
+  </dl><p>When the <code title=3Ddom-itemValue><a h=
ref=3D#dom-itemvalue>itemValue</a></code> IDL attribute is=
 <a href=3D#reflect title=3Dreflect>reflecting</a> a content =
attribute or acting like the element's
+  <code><a href=3D#textcontent>textContent</a></cod=
e> attribute, the user agent must, on setting, convert the new value t=
o the
+  IDL <code title=3D"">DOMString</code> value befo=
re using it according to the mappings described
+  above.</p>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>In this example, a script checks to see if a particular elem=
ent <var title=3D"">element</var> is
+   declaring a particular property, and if it is, it increments a counte=
r:</p>
+
+   <pre>if (element.itemProp.contains('color'))
+  count +=3D 1;</pre>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>This script iterates over each of the values of an element's=
 <code title=3Dattr-itemref><a href=3D#attr-itemref>itemref&l=
t;/a></code> attribute, calling a function for each referenced
+   element:</p>
+
+   <pre>for (var index =3D 0; index < element.itemRef.lengt=
h; index +=3D 1)
+  process(document.getElementById(element.itemRef[index]));</pre>
+
+  </div>
+
+
+  <h3 id=3Dmdvocabs><span class=3Dsecno>5.4 </span>Sam=
ple microdata vocabularies</h3>
+
+  <p>The vocabularies in this section are primarily intended to de=
monstrate how a vocabulary is
+  specified, though they are also usable in their own right.</p>
+
+
+  <h4 id=3Dvcard><span class=3Dsecno>5.4.1 </span>vCar=
d</h4>
+
+  <p>An item with the <a href=3D#item-types title=3D"item =
types">item type</a> <dfn id=3Dmd-vcard title=3Dmd-vcard=
><code>http://microformats.org/profile/hcard</code></df=
n> represents a person's or
+  organization's contact information.</p>
+
+  <p>This vocabulary does not <a href=3D#support-global-identif=
iers-for-items>support global identifiers for items</a>.</p&g=
t;
+
+  <p>The following are the type's <a href=3D#defined-property-n=
ame title=3D"defined property name">defined property names&l=
t;/a>.
+  They are based on the vocabulary defined in the vCard 4.0 specificatio=
n and its extensions, where
+  more information on how to interpret the values can be found. <a hr=
ef=3D#refsRFC6350>[RFC6350]</a></p>
+
+  <dl><dt><dfn id=3Dmd-vcard-kind title=3Dmd-vcard-kind&g=
t;<code>kind</code></dfn></dt>
+
+   <dd>
+
+    <p>Describes what kind of contact the item represents.</p&g=
t;
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be text that, when compared in a
+    <a href=3D#case-sensitive>case-sensitive</a> manner, is =
equal to one of the <a href=3D#kind-strings>kind strings</a>.=
</p>
+
+    <p>A single property with the name <code title=3Dmd-vcard-k=
ind><a href=3D#md-vcard-kind>kind</a></code> may be =
present within
+    each <a href=3D#concept-item title=3Dconcept-item>item</a&g=
t; with the type <code title=3Dmd-vcard><a href=3D#md-vcard>h=
ttp://microformats.org/profile/hcard</a></code>.</p>
+
+   </dd>
+
+
+   <!-- XML not included since there's no good way to do it here --&g=
t;
+   <!-- Note: vCard->microdata->vCard doesn't count as "pr=
opagating vCards" according to Tantek, so
+        we're not non-conforming when we drop it, despite vCard's requir=
ement -->
+
+
+   <dt><dfn id=3Dmd-vcard-fn title=3Dmd-vcard-fn><code&gt=
;fn</code></dfn></dt>
+
+   <dd>
+
+    <p>Gives the formatted text corresponding to the name of the p=
erson or organization.</p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be text.</p>
+
+    <p>Exactly one property with the name <code title=3Dmd-vcar=
d-fn><a href=3D#md-vcard-fn>fn</a></code> must be pr=
esent within
+    each <a href=3D#concept-item title=3Dconcept-item>item</a&g=
t; with the type <code title=3Dmd-vcard><a href=3D#md-vcard>h=
ttp://microformats.org/profile/hcard</a></code>.</p>
+
+   </dd>
+
+
+   <dt><dfn id=3Dmd-vcard-n title=3Dmd-vcard-n><code>n=
</code></dfn></dt>
+
+   <dd>
+
+    <p>Gives the structured name of the person or organization.&lt=
;/p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be an <a href=3D#concept-item tit=
le=3Dconcept-item>item</a> with zero or more of each of the <=
code title=3Dmd-vcard-n-family-name><a href=3D#md-vcard-n-family-na=
me>family-name</a></code>, <code title=3Dmd-vcard-n-giv=
en-name><a href=3D#md-vcard-n-given-name>given-name</a>&lt=
;/code>, <code title=3Dmd-vcard-n-additional-name><a href=3D#=
md-vcard-n-additional-name>additional-name</a></code>, &lt=
;code title=3Dmd-vcard-n-honorific-prefix><a href=3D#md-vcard-n-hon=
orific-prefix>honorific-prefix</a></code>, and <code ti=
tle=3Dmd-vcard-n-honorific-suffix><a href=3D#md-vcard-n-honorific-s=
uffix>honorific-suffix</a></code> properties.</p>
+
+    <p>Exactly one property with the name <code title=3Dmd-vcar=
d-n><a href=3D#md-vcard-n>n</a></code> must be prese=
nt within
+    each <a href=3D#concept-item title=3Dconcept-item>item</a&g=
t; with the type <code title=3Dmd-vcard><a href=3D#md-vcard>h=
ttp://microformats.org/profile/hcard</a></code>.</p>
+
+   </dd>
+
+   <dt><dfn id=3Dmd-vcard-n-family-name title=3Dmd-vcard-n-fami=
ly-name><code>family-name</code></dfn> (inside <c=
ode title=3Dmd-vcard-n><a href=3D#md-vcard-n>n</a></cod=
e>)</dt>
+
+   <dd>
+
+    <p>Gives the family name of the person, or the full name of th=
e organization.</p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be text.</p>
+
+    <p>Any number of properties with the name <code title=3Dmd-=
vcard-n-family-name><a href=3D#md-vcard-n-family-name>family-nam=
e</a></code> may be present within the <a href=3D#concept-=
item title=3Dconcept-item>item</a> that forms the <a href=3D#=
concept-property-value title=3Dconcept-property-value>value</a> =
of the <code title=3Dmd-vcard-n><a href=3D#md-vcard-n>n</a=
></code> property of
+    an <a href=3D#concept-item title=3Dconcept-item>item</a>=
 with the type <code title=3Dmd-vcard><a href=3D#md-vcard>htt=
p://microformats.org/profile/hcard</a></code>.</p>
+
+   </dd>
+
+   <dt><dfn id=3Dmd-vcard-n-given-name title=3Dmd-vcard-n-given=
-name><code>given-name</code></dfn> (inside <code=
 title=3Dmd-vcard-n><a href=3D#md-vcard-n>n</a></code&g=
t;)</dt>
+
+   <dd>
+
+    <p>Gives the given-name of the person.</p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be text.</p>
+
+    <p>Any number of properties with the name <code title=3Dmd-=
vcard-n-given-name><a href=3D#md-vcard-n-given-name>given-name&l=
t;/a></code>
+    may be present within the <a href=3D#concept-item title=3Dconcept=
-item>item</a> that forms the <a href=3D#concept-property-val=
ue title=3Dconcept-property-value>value</a> of the <code titl=
e=3Dmd-vcard-n><a href=3D#md-vcard-n>n</a></code> pr=
operty of
+    an <a href=3D#concept-item title=3Dconcept-item>item</a>=
 with the type <code title=3Dmd-vcard><a href=3D#md-vcard>htt=
p://microformats.org/profile/hcard</a></code>.</p>
+
+   </dd>
+
+   <dt><dfn id=3Dmd-vcard-n-additional-name title=3Dmd-vcard-n-=
additional-name><code>additional-name</code></dfn> (=
inside <code title=3Dmd-vcard-n><a href=3D#md-vcard-n>n</a=
></code>)</dt>
+
+   <dd>
+
+    <p>Gives the any additional names of the person.</p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be text.</p>
+
+    <p>Any number of properties with the name <code title=3Dmd-=
vcard-n-additional-name><a href=3D#md-vcard-n-additional-name>ad=
ditional-name</a></code> may be present within the <a href=
=3D#concept-item title=3Dconcept-item>item</a> that forms the &l=
t;a href=3D#concept-property-value title=3Dconcept-property-value>valu=
e</a> of the <code title=3Dmd-vcard-n><a href=3D#md-vcard-=
n>n</a></code> property of
+    an <a href=3D#concept-item title=3Dconcept-item>item</a>=
 with the type <code title=3Dmd-vcard><a href=3D#md-vcard>htt=
p://microformats.org/profile/hcard</a></code>.</p>
+
+   </dd>
+
+   <dt><dfn id=3Dmd-vcard-n-honorific-prefix title=3Dmd-vcard-n=
-honorific-prefix><code>honorific-prefix</code></dfn&gt=
; (inside <code title=3Dmd-vcard-n><a href=3D#md-vcard-n>n&lt=
;/a></code>)</dt>
+
+   <dd>
+
+    <p>Gives the honorific prefix of the person.</p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be text.</p>
+
+    <p>Any number of properties with the name <code title=3Dmd-=
vcard-n-honorific-prefix><a href=3D#md-vcard-n-honorific-prefix>=
honorific-prefix</a></code> may be present within the <a h=
ref=3D#concept-item title=3Dconcept-item>item</a> that forms the=
 <a href=3D#concept-property-value title=3Dconcept-property-value>v=
alue</a> of the <code title=3Dmd-vcard-n><a href=3D#md-vca=
rd-n>n</a></code> property of
+    an <a href=3D#concept-item title=3Dconcept-item>item</a>=
 with the type <code title=3Dmd-vcard><a href=3D#md-vcard>htt=
p://microformats.org/profile/hcard</a></code>.</p>
+
+   </dd>
+
+   <dt><dfn id=3Dmd-vcard-n-honorific-suffix title=3Dmd-vcard-n=
-honorific-suffix><code>honorific-suffix</code></dfn&gt=
; (inside <code title=3Dmd-vcard-n><a href=3D#md-vcard-n>n&lt=
;/a></code>)</dt>
+
+   <dd>
+
+    <p>Gives the honorific suffix of the person.</p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be text.</p>
+
+    <p>Any number of properties with the name <code title=3Dmd-=
vcard-n-honorific-suffix><a href=3D#md-vcard-n-honorific-suffix>=
honorific-suffix</a></code> may be present within the <a h=
ref=3D#concept-item title=3Dconcept-item>item</a> that forms the=
 <a href=3D#concept-property-value title=3Dconcept-property-value>v=
alue</a> of the <code title=3Dmd-vcard-n><a href=3D#md-vca=
rd-n>n</a></code> property of
+    an <a href=3D#concept-item title=3Dconcept-item>item</a>=
 with the type <code title=3Dmd-vcard><a href=3D#md-vcard>htt=
p://microformats.org/profile/hcard</a></code>.</p>
+
+   </dd>
+
+
+   <dt><dfn id=3Dmd-vcard-nickname title=3Dmd-vcard-nickname&gt=
;<code>nickname</code></dfn></dt>
+
+   <dd>
+
+    <p>Gives the nickname of the person or organization.</p>
+
+    <!-- copied from vCard -->
+    <p class=3Dnote>The nickname is the descriptive name given ins=
tead of or in addition to the one
+    belonging to a person, place, or thing. It can also be used to speci=
fy a familiar form of a
+    proper name specified by the <code title=3Dmd-vcard-fn><a h=
ref=3D#md-vcard-fn>fn</a></code> or <code title=3Dmd-vc=
ard-n><a href=3D#md-vcard-n>n</a></code> properties.=
</p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be text.</p>
+
+    <p>Any number of properties with the name <code title=3Dmd-=
vcard-nickname><a href=3D#md-vcard-nickname>nickname</a>&l=
t;/code> may be
+    present within each <a href=3D#concept-item title=3Dconcept-item&=
gt;item</a> with the type <code title=3Dmd-vcard><a href=3D=
#md-vcard>http://microformats.org/profile/hcard</a></code>=
.</p>
+
+   </dd>
+
+
+   <dt><dfn id=3Dmd-vcard-photo title=3Dmd-vcard-photo><c=
ode>photo</code></dfn></dt>
+
+   <dd>
+
+    <p>Gives a photograph of the person or organization.</p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be an <a href=3D#absolute-url>=
absolute
+    URL</a>.</p>
+
+    <p>Any number of properties with the name <code title=3Dmd-=
vcard-photo><a href=3D#md-vcard-photo>photo</a></code&g=
t; may be
+    present within each <a href=3D#concept-item title=3Dconcept-item&=
gt;item</a> with the type <code title=3Dmd-vcard><a href=3D=
#md-vcard>http://microformats.org/profile/hcard</a></code>=
.</p>
+
+   </dd>
+
+
+   <dt><dfn id=3Dmd-vcard-bday title=3Dmd-vcard-bday><cod=
e>bday</code></dfn></dt>
+
+   <dd>
+
+    <p>Gives the birth date of the person or organization.</p&g=
t;
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be a <a href=3D#valid-date-string=
>valid date
+    string</a>.</p>
+
+    <p>A single property with the name <code title=3Dmd-vcard-b=
day><a href=3D#md-vcard-bday>bday</a></code> may be =
present within
+    each <a href=3D#concept-item title=3Dconcept-item>item</a&g=
t; with the type <code title=3Dmd-vcard><a href=3D#md-vcard>h=
ttp://microformats.org/profile/hcard</a></code>.</p>
+
+   </dd>
+
+
+   <dt><dfn id=3Dmd-vcard-anniversary title=3Dmd-vcard-annivers=
ary><code>anniversary</code></dfn></dt>
+
+   <dd>
+
+    <p>Gives the birth date of the person or organization.</p&g=
t;
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be a <a href=3D#valid-date-string=
>valid date
+    string</a>.</p>
+
+    <p>A single property with the name <code title=3Dmd-vcard-a=
nniversary><a href=3D#md-vcard-anniversary>anniversary</a>=
</code> may be
+    present within each <a href=3D#concept-item title=3Dconcept-item&=
gt;item</a> with the type <code title=3Dmd-vcard><a href=3D=
#md-vcard>http://microformats.org/profile/hcard</a></code>=
.</p>
+
+   </dd>
+
+
+   <dt><dfn id=3Dmd-vcard-sex title=3Dmd-vcard-sex><code&=
gt;sex</code></dfn></dt>
+
+   <dd>
+
+    <p>Gives the biological sex of the person.</p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be one of
+    <code title=3D"">F</code>, meaning "femal=
e",
+    <code title=3D"">M</code>, meaning "male&=
quot;,
+    <code title=3D"">N</code>, meaning "none =
or not applicable",=20
+    <code title=3D"">O</code>, meaning "other=
", or
+    <code title=3D"">U</code>, meaning "unkno=
wn".</p>
+
+    <p>A single property with the name <code title=3Dmd-vcard-s=
ex><a href=3D#md-vcard-sex>sex</a></code> may be pre=
sent within
+    each <a href=3D#concept-item title=3Dconcept-item>item</a&g=
t; with the type <code title=3Dmd-vcard><a href=3D#md-vcard>h=
ttp://microformats.org/profile/hcard</a></code>.</p>
+
+   </dd>
+
+
+   <dt><dfn id=3Dmd-vcard-gender-identity title=3Dmd-vcard-gend=
er-identity><code>gender-identity</code></dfn></d=
t>
+
+   <dd>
+
+    <p>Gives the gender identity of the person.</p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be text.</p>
+
+    <p>A single property with the name <code title=3Dmd-vcard-g=
ender-identity><a href=3D#md-vcard-gender-identity>gender-identi=
ty</a></code>
+    may be present within each <a href=3D#concept-item title=3Dconcep=
t-item>item</a> with the type <code title=3Dmd-vcard><a=
 href=3D#md-vcard>http://microformats.org/profile/hcard</a></=
code>.</p>
+
+   </dd>
+
+
+   <dt><dfn id=3Dmd-vcard-adr title=3Dmd-vcard-adr><code&=
gt;adr</code></dfn></dt>
+
+   <dd>
+
+    <p>Gives the delivery address of the person or organization.&l=
t;/p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be an <a href=3D#concept-item tit=
le=3Dconcept-item>item</a> with zero or more <code title=3Dmd=
-vcard-adr-type><a href=3D#md-vcard-adr-type>type</a></=
code>,
+    <code title=3Dmd-vcard-adr-post-office-box><a href=3D#md-vc=
ard-adr-post-office-box>post-office-box</a></code>, <co=
de title=3Dmd-vcard-adr-extended-address><a href=3D#md-vcard-adr-ex=
tended-address>extended-address</a></code>, and <code t=
itle=3Dmd-vcard-adr-street-address><a href=3D#md-vcard-adr-street-a=
ddress>street-address</a></code> properties, and optionall=
y a <code title=3Dmd-vcard-adr-locality><a href=3D#md-vcard-adr-=
locality>locality</a></code> property, optionally a <co=
de title=3Dmd-vcard-adr-region><a href=3D#md-vcard-adr-region>re=
gion</a></code> property, optionally a <code title=3Dmd-vc=
ard-adr-postal-code><a href=3D#md-vcard-adr-postal-code>postal-c=
ode</a></code> property, and optionally a <code title=3Dmd=
-vcard-adr-country-name><a href=3D#md-vcard-adr-country-name>cou=
ntry-name</a></code> property.</p>
+
+    <p>If no <code title=3Dmd-vcard-adr-type><a href=3D#m=
d-vcard-adr-type>type</a></code> properties are present wi=
thin an <a href=3D#concept-item title=3Dconcept-item>item</a>=
 that forms the <a href=3D#concept-property-value title=3Dconcept-prop=
erty-value>value</a> of an <code title=3Dmd-vcard-adr><=
a href=3D#md-vcard-adr>adr</a></code> property
+    of an <a href=3D#concept-item title=3Dconcept-item>item</a&=
gt; with the type <code title=3Dmd-vcard><a href=3D#md-vcard>=
http://microformats.org/profile/hcard</a></code>, then the &l=
t;a href=3D#address-type-strings title=3D"address
+    type strings">address type string</a> <code title=3D=
md-vcard-type-adr-work><a href=3D#md-vcard-type-adr-work>work&lt=
;/a></code> is
+    implied.</p>
+
+    <p>Any number of properties with the name <code title=3Dmd-=
vcard-adr><a href=3D#md-vcard-adr>adr</a></code> may=
 be present
+    within each <a href=3D#concept-item title=3Dconcept-item>item&=
lt;/a> with the type <code title=3Dmd-vcard><a href=3D#md-vca=
rd>http://microformats.org/profile/hcard</a></code>.</p=
>
+
+   </dd>
+
+   <dt><dfn id=3Dmd-vcard-adr-type title=3Dmd-vcard-adr-type&gt=
;<code>type</code></dfn> (inside <code title=3Dmd-vc=
ard-adr><a href=3D#md-vcard-adr>adr</a></code>)</=
dt>
+
+   <dd>
+
+    <p>Gives the type of delivery address.</p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be text that, when compared in a
+    <a href=3D#case-sensitive>case-sensitive</a> manner, is =
equal to one of the <a href=3D#address-type-strings>address type
+    strings</a>.</p>
+
+    <p>Any number of properties with the name <code title=3Dmd-=
vcard-adr-type><a href=3D#md-vcard-adr-type>type</a></c=
ode> may be
+    present within the <a href=3D#concept-item title=3Dconcept-item&g=
t;item</a> that forms the <a href=3D#concept-property-value titl=
e=3Dconcept-property-value>value</a> of an <code title=3Dmd-v=
card-adr><a href=3D#md-vcard-adr>adr</a></code> prop=
erty
+    of an <a href=3D#concept-item title=3Dconcept-item>item</a&=
gt; with the type <code title=3Dmd-vcard><a href=3D#md-vcard>=
http://microformats.org/profile/hcard</a></code>, but within =
each such <code title=3Dmd-vcard-adr><a href=3D#md-vcard-adr>=
adr</a></code> property <a href=3D#concept-item title=3Dco=
ncept-item>item</a> there must only
+    be one <code title=3Dmd-vcard-adr-type><a href=3D#md-vcard-=
adr-type>type</a></code> property per distinct value.</=
p>
+
+   </dd>
+
+   <dt><dfn id=3Dmd-vcard-adr-post-office-box title=3Dmd-vcard-=
adr-post-office-box><code>post-office-box</code></dfn&g=
t; (inside <code title=3Dmd-vcard-adr><a href=3D#md-vcard-adr&gt=
;adr</a></code>)</dt>
+
+   <dd>
+
+    <p>Gives the post office box component of the delivery address=
 of the person or
+    organization.</p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be text.</p>
+
+    <p>Any number of properties with the name <code title=3Dmd-=
vcard-adr-post-office-box><a href=3D#md-vcard-adr-post-office-box&g=
t;post-office-box</a></code> may be present within the <a =
href=3D#concept-item title=3Dconcept-item>item</a> that forms th=
e <a href=3D#concept-property-value title=3Dconcept-property-value>=
value</a> of an <code title=3Dmd-vcard-adr><a href=3D#md-v=
card-adr>adr</a></code> property
+    of an <a href=3D#concept-item title=3Dconcept-item>item</a&=
gt; with the type <code title=3Dmd-vcard><a href=3D#md-vcard>=
http://microformats.org/profile/hcard</a></code>.</p>
+
+    <p class=3Dnote>The vCard specification urges authors not to u=
se this field.</p>
+
+   </dd>
+
+   <dt><dfn id=3Dmd-vcard-adr-extended-address title=3Dmd-vcard=
-adr-extended-address><code>extended-address</code></df=
n> (inside <code title=3Dmd-vcard-adr><a href=3D#md-vcard-adr=
>adr</a></code>)</dt>
+
+   <dd>
+
+    <p>Gives an additional component of the delivery address of th=
e person or organization.</p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be text.</p>
+
+    <p>Any number of properties with the name <code title=3Dmd-=
vcard-adr-extended-address><a href=3D#md-vcard-adr-extended-address=
>extended-address</a></code> may be present within the &lt=
;a href=3D#concept-item title=3Dconcept-item>item</a> that forms=
 the <a href=3D#concept-property-value title=3Dconcept-property-value&=
gt;value</a> of an <code title=3Dmd-vcard-adr><a href=3D#m=
d-vcard-adr>adr</a></code> property
+    of an <a href=3D#concept-item title=3Dconcept-item>item</a&=
gt; with the type <code title=3Dmd-vcard><a href=3D#md-vcard>=
http://microformats.org/profile/hcard</a></code>.</p>
+
+    <p class=3Dnote>The vCard specification urges authors not to u=
se this field.</p>
+
+   </dd>
+
+   <dt><dfn id=3Dmd-vcard-adr-street-address title=3Dmd-vcard-a=
dr-street-address><code>street-address</code></dfn> =
(inside <code title=3Dmd-vcard-adr><a href=3D#md-vcard-adr>ad=
r</a></code>)</dt>
+
+   <dd>
+
+    <p>Gives the street address component of the delivery address =
of the person or organization.</p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be text.</p>
+
+    <p>Any number of properties with the name <code title=3Dmd-=
vcard-adr-street-address><a href=3D#md-vcard-adr-street-address>=
street-address</a></code> may be present within the <a hre=
f=3D#concept-item title=3Dconcept-item>item</a> that forms the &=
lt;a href=3D#concept-property-value title=3Dconcept-property-value>val=
ue</a> of an <code title=3Dmd-vcard-adr><a href=3D#md-vcar=
d-adr>adr</a></code> property
+    of an <a href=3D#concept-item title=3Dconcept-item>item</a&=
gt; with the type <code title=3Dmd-vcard><a href=3D#md-vcard>=
http://microformats.org/profile/hcard</a></code>.</p>
+
+   </dd>
+
+   <dt><dfn id=3Dmd-vcard-adr-locality title=3Dmd-vcard-adr-loc=
ality><code>locality</code></dfn> (inside <code t=
itle=3Dmd-vcard-adr><a href=3D#md-vcard-adr>adr</a></co=
de>)</dt>
+
+   <dd>
+
+    <p>Gives the locality component (e.g. city) of the delivery ad=
dress of the person or
+    organization.</p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be text.</p>
+
+    <p>A single property with the name <code title=3Dmd-vcard-a=
dr-locality><a href=3D#md-vcard-adr-locality>locality</a>&=
lt;/code> may be
+    present within the <a href=3D#concept-item title=3Dconcept-item&g=
t;item</a> that forms the <a href=3D#concept-property-value titl=
e=3Dconcept-property-value>value</a> of an <code title=3Dmd-v=
card-adr><a href=3D#md-vcard-adr>adr</a></code> prop=
erty
+    of an <a href=3D#concept-item title=3Dconcept-item>item</a&=
gt; with the type <code title=3Dmd-vcard><a href=3D#md-vcard>=
http://microformats.org/profile/hcard</a></code>.</p>
+
+   </dd>
+
+   <dt><dfn id=3Dmd-vcard-adr-region title=3Dmd-vcard-adr-regio=
n><code>region</code></dfn> (inside <code title=3D=
md-vcard-adr><a href=3D#md-vcard-adr>adr</a></code>)=
</dt>
+
+   <dd>
+
+    <p>Gives the region component (e.g. state or province) of the =
delivery address of the person or
+    organization.</p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be text.</p>
+
+    <p>A single property with the name <code title=3Dmd-vcard-a=
dr-region><a href=3D#md-vcard-adr-region>region</a></co=
de> may be
+    present within the <a href=3D#concept-item title=3Dconcept-item&g=
t;item</a> that forms the <a href=3D#concept-property-value titl=
e=3Dconcept-property-value>value</a> of an <code title=3Dmd-v=
card-adr><a href=3D#md-vcard-adr>adr</a></code> prop=
erty
+    of an <a href=3D#concept-item title=3Dconcept-item>item</a&=
gt; with the type <code title=3Dmd-vcard><a href=3D#md-vcard>=
http://microformats.org/profile/hcard</a></code>.</p>
+
+   </dd>
+
+   <dt><dfn id=3Dmd-vcard-adr-postal-code title=3Dmd-vcard-adr-=
postal-code><code>postal-code</code></dfn> (inside &=
lt;code title=3Dmd-vcard-adr><a href=3D#md-vcard-adr>adr</a&g=
t;</code>)</dt>
+
+   <dd>
+
+    <p>Gives the postal code component of the delivery address of =
the person or organization.</p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be text.</p>
+
+    <p>A single property with the name <code title=3Dmd-vcard-a=
dr-postal-code><a href=3D#md-vcard-adr-postal-code>postal-code&l=
t;/a></code> may
+    be present within the <a href=3D#concept-item title=3Dconcept-ite=
m>item</a> that forms the <a href=3D#concept-property-value t=
itle=3Dconcept-property-value>value</a> of an <code title=3Dm=
d-vcard-adr><a href=3D#md-vcard-adr>adr</a></code> p=
roperty
+    of an <a href=3D#concept-item title=3Dconcept-item>item</a&=
gt; with the type <code title=3Dmd-vcard><a href=3D#md-vcard>=
http://microformats.org/profile/hcard</a></code>.</p>
+
+   </dd>
+
+   <dt><dfn id=3Dmd-vcard-adr-country-name title=3Dmd-vcard-adr=
-country-name><code>country-name</code></dfn> (insid=
e <code title=3Dmd-vcard-adr><a href=3D#md-vcard-adr>adr</=
a></code>)</dt>
+
+   <dd>
+
+    <p>Gives the country name component of the delivery address of=
 the person or organization.</p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be text.</p>
+
+    <p>A single property with the name <code title=3Dmd-vcard-a=
dr-country-name><a href=3D#md-vcard-adr-country-name>country-nam=
e</a></code>
+    may be present within the <a href=3D#concept-item title=3Dconcept=
-item>item</a> that forms the <a href=3D#concept-property-val=
ue title=3Dconcept-property-value>value</a> of an <code title=
=3Dmd-vcard-adr><a href=3D#md-vcard-adr>adr</a></code&g=
t; property
+    of an <a href=3D#concept-item title=3Dconcept-item>item</a&=
gt; with the type <code title=3Dmd-vcard><a href=3D#md-vcard>=
http://microformats.org/profile/hcard</a></code>.</p>
+
+   </dd>
+
+
+   <dt><dfn id=3Dmd-vcard-tel title=3Dmd-vcard-tel><code&=
gt;tel</code></dfn></dt>
+
+   <dd>
+
+    <p>Gives the telephone number of the person or organization.&l=
t;/p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be either text that can be
+    interpreted as a telephone number as defined in the CCITT specificat=
ions E.163 and X.121, or an
+    <a href=3D#concept-item title=3Dconcept-item>item</a> wi=
th zero or more <code title=3Dmd-vcard-tel-type><a href=3D#md-vc=
ard-tel-type>type</a></code> properties and exactly one &l=
t;code title=3Dmd-vcard-tel-value><a href=3D#md-vcard-tel-value>=
value</a></code> property. <a href=3D#refsE163>[E163]&l=
t;/a> <a href=3D#refsX121>[X121]</a></p>
+
+    <p>If no <code title=3Dmd-vcard-tel-type><a href=3D#m=
d-vcard-tel-type>type</a></code> properties are present wi=
thin an <a href=3D#concept-item title=3Dconcept-item>item</a>=
 that forms the <a href=3D#concept-property-value title=3Dconcept-prop=
erty-value>value</a> of a <code title=3Dmd-vcard-tel><a=
 href=3D#md-vcard-tel>tel</a></code> property
+    of an <a href=3D#concept-item title=3Dconcept-item>item</a&=
gt; with the type <code title=3Dmd-vcard><a href=3D#md-vcard>=
http://microformats.org/profile/hcard</a></code>, or if the &=
lt;a href=3D#concept-property-value title=3Dconcept-property-value>val=
ue</a> of such a <code title=3Dmd-vcard-tel><a href=3D#md-=
vcard-tel>tel</a></code>
+    property is text, then the <a href=3D#telephone-type-strings titl=
e=3D"telephone type strings">telephone type string</a>
+    <code title=3Dmd-vcard-type-tel-voice><a href=3D#md-vcard-t=
ype-tel-voice>voice</a></code> is implied.</p>
+
+    <p>Any number of properties with the name <code title=3Dmd-=
vcard-tel><a href=3D#md-vcard-tel>tel</a></code> may=
 be present
+    within each <a href=3D#concept-item title=3Dconcept-item>item&=
lt;/a> with the type <code title=3Dmd-vcard><a href=3D#md-vca=
rd>http://microformats.org/profile/hcard</a></code>.</p=
>
+
+   </dd>
+
+   <dt><dfn id=3Dmd-vcard-tel-type title=3Dmd-vcard-tel-type&gt=
;<code>type</code></dfn> (inside <code title=3Dmd-vc=
ard-tel><a href=3D#md-vcard-tel>tel</a></code>)</=
dt>
+
+   <dd>
+
+    <p>Gives the type of telephone number.</p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be text that, when compared in a
+    <a href=3D#case-sensitive>case-sensitive</a> manner, is =
equal to one of the <a href=3D#telephone-type-strings>telephone typ=
e
+    strings</a>.</p>
+
+    <p>Any number of properties with the name <code title=3Dmd-=
vcard-tel-type><a href=3D#md-vcard-tel-type>type</a></c=
ode> may be
+    present within the <a href=3D#concept-item title=3Dconcept-item&g=
t;item</a> that forms the <a href=3D#concept-property-value titl=
e=3Dconcept-property-value>value</a> of a <code title=3Dmd-vc=
ard-tel><a href=3D#md-vcard-tel>tel</a></code> prope=
rty
+    of an <a href=3D#concept-item title=3Dconcept-item>item</a&=
gt; with the type <code title=3Dmd-vcard><a href=3D#md-vcard>=
http://microformats.org/profile/hcard</a></code>, but within =
each such <code title=3Dmd-vcard-tel><a href=3D#md-vcard-tel>=
tel</a></code> property <a href=3D#concept-item title=3Dco=
ncept-item>item</a> there must only
+    be one <code title=3Dmd-vcard-tel-type><a href=3D#md-vcard-=
tel-type>type</a></code> property per distinct value.</=
p>
+
+   </dd>
+
+   <dt><dfn id=3Dmd-vcard-tel-value title=3Dmd-vcard-tel-value&=
gt;<code>value</code></dfn> (inside <code title=3Dmd=
-vcard-tel><a href=3D#md-vcard-tel>tel</a></code>)&l=
t;/dt>
+
+   <dd>
+
+    <p>Gives the actual telephone number of the person or organiza=
tion.</p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be text that can be interpreted as
+    a telephone number as defined in the CCITT specifications E.163 and =
X.121. <a href=3D#refsE163>[E163]</a> <a href=3D#refsX121&=
gt;[X121]</a></p>
+
+    <p>Exactly one property with the name <code title=3Dmd-vcar=
d-tel-value><a href=3D#md-vcard-tel-value>value</a></co=
de> must be
+    present within the <a href=3D#concept-item title=3Dconcept-item&g=
t;item</a> that forms the <a href=3D#concept-property-value titl=
e=3Dconcept-property-value>value</a> of a <code title=3Dmd-vc=
ard-tel><a href=3D#md-vcard-tel>tel</a></code> prope=
rty
+    of an <a href=3D#concept-item title=3Dconcept-item>item</a&=
gt; with the type <code title=3Dmd-vcard><a href=3D#md-vcard>=
http://microformats.org/profile/hcard</a></code>.</p>
+
+   </dd>
+
+
+   <dt><dfn id=3Dmd-vcard-email title=3Dmd-vcard-email><c=
ode>email</code></dfn></dt>
+
+   <dd>
+
+    <p>Gives the e-mail address of the person or organization.<=
/p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be text.</p>
+
+    <p>Any number of properties with the name <code title=3Dmd-=
vcard-email><a href=3D#md-vcard-email>email</a></code&g=
t; may be
+    present within each <a href=3D#concept-item title=3Dconcept-item&=
gt;item</a> with the type <code title=3Dmd-vcard><a href=3D=
#md-vcard>http://microformats.org/profile/hcard</a></code>=
.</p>
+
+   </dd>
+
+
+   <dt><dfn id=3Dmd-vcard-impp title=3Dmd-vcard-impp><cod=
e>impp</code></dfn></dt>
+
+   <dd>
+
+    <p>Gives a <a href=3D#url>URL</a> for instant mess=
aging and presence protocol communications with the
+    person or organization.</p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be an <a href=3D#absolute-url>=
absolute
+    URL</a>.</p>
+
+    <p>Any number of properties with the name <code title=3Dmd-=
vcard-impp><a href=3D#md-vcard-impp>impp</a></code> =
may be present
+    within each <a href=3D#concept-item title=3Dconcept-item>item&=
lt;/a> with the type <code title=3Dmd-vcard><a href=3D#md-vca=
rd>http://microformats.org/profile/hcard</a></code>.</p=
>
+
+   </dd>
+
+
+   <dt><dfn id=3Dmd-vcard-lang title=3Dmd-vcard-lang><cod=
e>lang</code></dfn></dt>
+
+   <dd>
+
+    <p>Gives a language understood by the person or organization.&=
lt;/p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be a valid BCP 47 language tag. <=
a href=3D#refsBCP47>[BCP47]</a>.</p>
+
+    <p>Any number of properties with the name <code title=3Dmd-=
vcard-lang><a href=3D#md-vcard-lang>lang</a></code> =
may be present
+    within each <a href=3D#concept-item title=3Dconcept-item>item&=
lt;/a> with the type <code title=3Dmd-vcard><a href=3D#md-vca=
rd>http://microformats.org/profile/hcard</a></code>.</p=
>
+
+   </dd>
+
+
+   <dt><dfn id=3Dmd-vcard-tz title=3Dmd-vcard-tz><code&gt=
;tz</code></dfn></dt>
+
+   <dd>
+
+    <p>Gives the time zone of the person or organization.</p&gt=
;
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be text and must match the
+    following syntax:</p>
+
+    <ol><li>Either a U+002B PLUS SIGN character (+) or a U+0=
02D HYPHEN-MINUS character (-).</li>
+
+     <li>A <a href=3D#valid-non-negative-integer>valid non-n=
egative integer</a> that is exactly two digits long and that
+     represents a number in the range 00..23.</li>
+
+     <li>A U+003A COLON character (:).</li>
+
+     <li>A <a href=3D#valid-non-negative-integer>valid non-n=
egative integer</a> that is exactly two digits long and that
+     represents a number in the range 00..59.</li>
+
+    </ol><p>Any number of properties with the name <code =
title=3Dmd-vcard-tz><a href=3D#md-vcard-tz>tz</a></code=
> may be present
+    within each <a href=3D#concept-item title=3Dconcept-item>item&=
lt;/a> with the type <code title=3Dmd-vcard><a href=3D#md-vca=
rd>http://microformats.org/profile/hcard</a></code>.</p=
>
+
+   </dd>
+
+
+   <dt><dfn id=3Dmd-vcard-geo title=3Dmd-vcard-geo><code&=
gt;geo</code></dfn></dt>
+
+   <dd>
+
+    <p>Gives the geographical position of the person or organizati=
on.</p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be text and must match the
+    following syntax:</p>
+
+    <ol><li>Optionally, either a U+002B PLUS SIGN character =
(+) or a U+002D HYPHEN-MINUS character
+     (-).</li>
+
+     <li>One or more <a href=3D#ascii-digits>ASCII digits&lt=
;/a>.</li>
+
+     <li>Optionally*, a U+002E FULL STOP character (.) followed by=
 one or more <a href=3D#ascii-digits>ASCII
+     digits</a>.</li>
+
+     <li>A U+003B SEMICOLON character (;).</li>
+
+     <li>Optionally, either a U+002B PLUS SIGN character (+) or a =
U+002D HYPHEN-MINUS character
+     (-).</li>
+
+     <li>One or more <a href=3D#ascii-digits>ASCII digits&lt=
;/a>.</li>
+
+     <li>Optionally*, a U+002E FULL STOP character (.) followed by=
 one or more <a href=3D#ascii-digits>ASCII
+     digits</a>.</li>
+
+    </ol><p>The optional components marked with an asterisk =
(*) should be included, and should have six
+    digits each.</p>
+
+    <!-- copied from vCard -->
+    <p class=3Dnote>The value specifies latitude and longitude, in=
 that order (i.e., "LAT LON"
+    ordering), in decimal degrees. The longitude represents the location=
 east and west of the prime
+    meridian as a positive or negative real number, respectively. The la=
titude represents the
+    location north and south of the equator as a positive or negative re=
al number, respectively.</p>
+
+    <p>Any number of properties with the name <code title=3Dmd-=
vcard-geo><a href=3D#md-vcard-geo>geo</a></code> may=
 be present
+    within each <a href=3D#concept-item title=3Dconcept-item>item&=
lt;/a> with the type <code title=3Dmd-vcard><a href=3D#md-vca=
rd>http://microformats.org/profile/hcard</a></code>.</p=
>
+
+   </dd>
+
+
+   <dt><dfn id=3Dmd-vcard-title title=3Dmd-vcard-title><c=
ode>title</code></dfn></dt>
+
+   <dd>
+
+    <p>Gives the job title, functional position or function of the=
 person or organization.</p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be text.</p>
+
+    <p>Any number of properties with the name <code title=3Dmd-=
vcard-title><a href=3D#md-vcard-title>title</a></code&g=
t; may be
+    present within each <a href=3D#concept-item title=3Dconcept-item&=
gt;item</a> with the type <code title=3Dmd-vcard><a href=3D=
#md-vcard>http://microformats.org/profile/hcard</a></code>=
.</p>
+
+   </dd>
+
+
+   <dt><dfn id=3Dmd-vcard-role title=3Dmd-vcard-role><cod=
e>role</code></dfn></dt>
+
+   <dd>
+
+    <p>Gives the role, occupation, or business category of the per=
son or organization.</p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be text.</p>
+
+    <p>Any number of properties with the name <code title=3Dmd-=
vcard-role><a href=3D#md-vcard-role>role</a></code> =
may be present
+    within each <a href=3D#concept-item title=3Dconcept-item>item&=
lt;/a> with the type <code title=3Dmd-vcard><a href=3D#md-vca=
rd>http://microformats.org/profile/hcard</a></code>.</p=
>
+
+   </dd>
+
+
+   <dt><dfn id=3Dmd-vcard-logo title=3Dmd-vcard-logo><cod=
e>logo</code></dfn></dt>
+
+   <dd>
+
+    <p>Gives the logo of the person or organization.</p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be an <a href=3D#absolute-url>=
absolute
+    URL</a>.</p>
+
+    <p>Any number of properties with the name <code title=3Dmd-=
vcard-logo><a href=3D#md-vcard-logo>logo</a></code> =
may be present
+    within each <a href=3D#concept-item title=3Dconcept-item>item&=
lt;/a> with the type <code title=3Dmd-vcard><a href=3D#md-vca=
rd>http://microformats.org/profile/hcard</a></code>.</p=
>
+
+   </dd>
+
+
+   <dt><dfn id=3Dmd-vcard-agent title=3Dmd-vcard-agent><c=
ode>agent</code></dfn></dt>
+
+   <dd>
+
+    <p>Gives the contact information of another person who will ac=
t on behalf of the person or
+    organization.</p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be either an <a href=3D#concept-i=
tem title=3Dconcept-item>item</a> with the type <code title=3D=
md-vcard><a href=3D#md-vcard>http://microformats.org/profile/hca=
rd</a></code>, or an <a href=3D#absolute-url>absolute U=
RL</a>,
+    or text.</p>
+
+    <p>Any number of properties with the name <code title=3Dmd-=
vcard-agent><a href=3D#md-vcard-agent>agent</a></code&g=
t; may be
+    present within each <a href=3D#concept-item title=3Dconcept-item&=
gt;item</a> with the type <code title=3Dmd-vcard><a href=3D=
#md-vcard>http://microformats.org/profile/hcard</a></code>=
.</p>
+
+   </dd>
+
+
+   <dt><dfn id=3Dmd-vcard-org title=3Dmd-vcard-org><code&=
gt;org</code></dfn></dt>
+
+   <dd>
+
+    <p>Gives the name and units of the organization.</p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be either text or an <a href=3D#c=
oncept-item title=3Dconcept-item>item</a> with one <code titl=
e=3Dmd-vcard-org-organization-name><a href=3D#md-vcard-org-organiza=
tion-name>organization-name</a></code> property and zero o=
r more <code title=3Dmd-vcard-n-organization-unit>organization-unit=
</code> properties.</p>
+
+    <p>Any number of properties with the name <code title=3Dmd-=
vcard-org><a href=3D#md-vcard-org>org</a></code> may=
 be present
+    within each <a href=3D#concept-item title=3Dconcept-item>item&=
lt;/a> with the type <code title=3Dmd-vcard><a href=3D#md-vca=
rd>http://microformats.org/profile/hcard</a></code>.</p=
>
+
+   </dd>
+
+   <dt><dfn id=3Dmd-vcard-org-organization-name title=3Dmd-vcar=
d-org-organization-name><code>organization-name</code><=
/dfn> (inside <code title=3Dmd-vcard-org><a href=3D#md-vcard-=
org>org</a></code>)</dt>
+
+   <dd>
+
+    <p>Gives the name of the organization.</p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be text.</p>
+
+    <p>Exactly one property with the name <code title=3Dmd-vcar=
d-org-organization-name><a href=3D#md-vcard-org-organization-name&g=
t;organization-name</a></code> must be present within the &lt=
;a href=3D#concept-item title=3Dconcept-item>item</a> that forms=
 the <a href=3D#concept-property-value title=3Dconcept-property-value&=
gt;value</a> of an <code title=3Dmd-vcard-org><a href=3D#m=
d-vcard-org>org</a></code> property
+    of an <a href=3D#concept-item title=3Dconcept-item>item</a&=
gt; with the type <code title=3Dmd-vcard><a href=3D#md-vcard>=
http://microformats.org/profile/hcard</a></code>.</p>
+
+   </dd>
+
+   <dt><dfn id=3Dmd-vcard-org-organization-unit title=3Dmd-vcar=
d-org-organization-unit><code>organization-unit</code><=
/dfn> (inside <code title=3Dmd-vcard-org><a href=3D#md-vcard-=
org>org</a></code>)</dt>
+
+   <dd>
+
+    <p>Gives the name of the organization unit.</p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be text.</p>
+
+    <p>Any number of properties with the name <code title=3Dmd-=
vcard-org-organization-unit><a href=3D#md-vcard-org-organization-un=
it>organization-unit</a></code> may be present within the =
<a href=3D#concept-item title=3Dconcept-item>item</a> that fo=
rms the <a href=3D#concept-property-value title=3Dconcept-property-val=
ue>value</a> of the <code title=3Dmd-vcard-org><a href=3D=
#md-vcard-org>org</a></code>
+    property of an <a href=3D#concept-item title=3Dconcept-item>it=
em</a> with the type <code title=3Dmd-vcard><a href=3D#md-=
vcard>http://microformats.org/profile/hcard</a></code>.&lt=
;/p>
+
+   </dd>
+
+
+   <dt><dfn id=3Dmd-vcard-member title=3Dmd-vcard-member>&lt=
;code>member</code></dfn></dt>
+
+   <dd>
+
+    <p>Gives a <a href=3D#url>URL</a> that represents =
a member of the group.</p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be an <a href=3D#absolute-url>=
absolute
+    URL</a>.</p>
+
+    <p>Any number of properties with the name <code title=3Dmd-=
vcard-member><a href=3D#md-vcard-member>member</a></cod=
e> may be
+    present within each <a href=3D#concept-item title=3Dconcept-item&=
gt;item</a> with the type <code title=3Dmd-vcard><a href=3D=
#md-vcard>http://microformats.org/profile/hcard</a></code>=
 if the <a href=3D#concept-item title=3Dconcept-item>item</a>=
 also has a property with the name <code title=3Dmd-vcard-kind><=
a href=3D#md-vcard-kind>kind</a></code> whose value is &qu=
ot;<code title=3Dmd-vcard-kind-group><a href=3D#md-vcard-kind-gr=
oup>group</a></code>".</p>
+
+   </dd>
+
+
+   <dt><dfn id=3Dmd-vcard-related title=3Dmd-vcard-related>&=
lt;code>related</code></dfn></dt>
+
+   <dd>
+
+    <p>Gives a relationship to another entity.</p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must an <a href=3D#concept-item title=3D=
concept-item>item</a> with one <code title=3Dmd-vcard-org-rel=
ated-url><a href=3D#md-vcard-org-related-url>url</a></c=
ode>
+    property and one <code title=3Dmd-vcard-org-related-rel><a =
href=3D#md-vcard-org-related-rel>rel</a></code> properties=
.</p>
+
+    <p>Any number of properties with the name <code title=3Dmd-=
vcard-related><a href=3D#md-vcard-related>orrelated</a>&lt=
;/code> may be
+    present within each <a href=3D#concept-item title=3Dconcept-item&=
gt;item</a> with the type <code title=3Dmd-vcard><a href=3D=
#md-vcard>http://microformats.org/profile/hcard</a></code>=
.</p>
+
+   </dd>
+
+   <dt><dfn id=3Dmd-vcard-org-related-url title=3Dmd-vcard-org-=
related-url><code>url</code></dfn> (inside <code =
title=3Dmd-vcard-related><a href=3D#md-vcard-related>related<=
/a></code>)</dt>
+
+   <dd>
+
+    <p>Gives the <a href=3D#url>URL</a> for the relate=
d entity.</p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be an <a href=3D#absolute-url>=
absolute
+    URL</a>.</p>
+
+    <p>Exactly one property with the name <code title=3Dmd-vcar=
d-org-url>url</code> must be present
+    within the <a href=3D#concept-item title=3Dconcept-item>item&l=
t;/a> that forms the <a href=3D#concept-property-value title=3Dconc=
ept-property-value>value</a> of a <code title=3Dmd-vcard-rela=
ted><a href=3D#md-vcard-related>related</a></code>
+    property of an <a href=3D#concept-item title=3Dconcept-item>it=
em</a> with the type <code title=3Dmd-vcard><a href=3D#md-=
vcard>http://microformats.org/profile/hcard</a></code>.&lt=
;/p>
+
+   </dd>
+
+   <dt><dfn id=3Dmd-vcard-org-related-rel title=3Dmd-vcard-org-=
related-rel><code>rel</code></dfn> (inside <code =
title=3Dmd-vcard-related><a href=3D#md-vcard-related>related<=
/a></code>)</dt>
+
+   <dd>
+
+    <p>Gives the relationship between the entity and the related e=
ntity.</p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be text that, when compared in a
+    <a href=3D#case-sensitive>case-sensitive</a> manner, is =
equal to one of the <a href=3D#relationship-strings>relationship
+    strings</a>.</p>
+
+    <p>Exactly one property with the name <code title=3Dmd-vcar=
d-org-rel>rel</code> must be present
+    within the <a href=3D#concept-item title=3Dconcept-item>item&l=
t;/a> that forms the <a href=3D#concept-property-value title=3Dconc=
ept-property-value>value</a> of a <code title=3Dmd-vcard-rela=
ted><a href=3D#md-vcard-related>related</a></code>
+    property of an <a href=3D#concept-item title=3Dconcept-item>it=
em</a> with the type <code title=3Dmd-vcard><a href=3D#md-=
vcard>http://microformats.org/profile/hcard</a></code>.&lt=
;/p>
+
+   </dd>
+
+
+   <dt><dfn id=3Dmd-vcard-categories title=3Dmd-vcard-categorie=
s><code>categories</code></dfn></dt>
+
+   <dd>
+
+    <p>Gives the name of a category or tag that the person or orga=
nization could be classified
+    as.</p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be text.</p>
+
+    <p>Any number of properties with the name <code title=3Dmd-=
vcard-categories><a href=3D#md-vcard-categories>categories</a=
></code>
+    may be present within each <a href=3D#concept-item title=3Dconcep=
t-item>item</a> with the type <code title=3Dmd-vcard><a=
 href=3D#md-vcard>http://microformats.org/profile/hcard</a></=
code>.</p>
+
+   </dd>
+
+
+   <dt><dfn id=3Dmd-vcard-note title=3Dmd-vcard-note><cod=
e>note</code></dfn></dt>
+
+   <dd>
+
+    <p>Gives supplemental information or a comment about the perso=
n or organization.</p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be text.</p>
+
+    <p>Any number of properties with the name <code title=3Dmd-=
vcard-note><a href=3D#md-vcard-note>note</a></code> =
may be present
+    within each <a href=3D#concept-item title=3Dconcept-item>item&=
lt;/a> with the type <code title=3Dmd-vcard><a href=3D#md-vca=
rd>http://microformats.org/profile/hcard</a></code>.</p=
>
+
+   </dd>
+
+
+   <!-- PRODID not included -->
+
+
+   <dt><dfn id=3Dmd-vcard-rev title=3Dmd-vcard-rev><code&=
gt;rev</code></dfn></dt>
+
+   <dd>
+
+    <p>Gives the revision date and time of the contact information=
.</p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be text that is a <a href=3D#vali=
d-global-date-and-time-string>valid
+    global date and time string</a>.</p>
+
+    <!-- copied from vCard -->
+    <p class=3Dnote>The value distinguishes the current revision o=
f the information for other
+    renditions of the information.</p>
+
+    <p>Any number of properties with the name <code title=3Dmd-=
vcard-rev><a href=3D#md-vcard-rev>rev</a></code> may=
 be present
+    within each <a href=3D#concept-item title=3Dconcept-item>item&=
lt;/a> with the type <code title=3Dmd-vcard><a href=3D#md-vca=
rd>http://microformats.org/profile/hcard</a></code>.</p=
>
+
+   </dd>
+
+
+   <dt><dfn id=3Dmd-vcard-sound title=3Dmd-vcard-sound><c=
ode>sound</code></dfn></dt>
+
+   <dd>
+
+    <p>Gives a sound file relating to the person or organization.&=
lt;/p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be an <a href=3D#absolute-url>=
absolute
+    URL</a>.</p>
+
+    <p>Any number of properties with the name <code title=3Dmd-=
vcard-sound><a href=3D#md-vcard-sound>sound</a></code&g=
t; may be
+    present within each <a href=3D#concept-item title=3Dconcept-item&=
gt;item</a> with the type <code title=3Dmd-vcard><a href=3D=
#md-vcard>http://microformats.org/profile/hcard</a></code>=
.</p>
+
+   </dd>
+
+
+   <dt><dfn id=3Dmd-vcard-uid title=3Dmd-vcard-uid><code&=
gt;uid</code></dfn></dt>
+
+   <dd>
+
+    <p>Gives a globally unique identifier corresponding to the per=
son or organization.</p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be text.</p>
+
+    <p>A single property with the name <code title=3Dmd-vcard-u=
id><a href=3D#md-vcard-uid>uid</a></code> may be pre=
sent within
+    each <a href=3D#concept-item title=3Dconcept-item>item</a&g=
t; with the type <code title=3Dmd-vcard><a href=3D#md-vcard>h=
ttp://microformats.org/profile/hcard</a></code>.</p>
+
+   </dd>
+
+
+   <!-- CLIENTPIDMAP not included since the global parameters are not=
 included -->
+
+
+   <dt><dfn id=3Dmd-vcard-url title=3Dmd-vcard-url><code&=
gt;url</code></dfn></dt>
+
+   <dd>
+
+    <p>Gives a <a href=3D#url>URL</a> relating to the =
person or organization.</p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be an <a href=3D#absolute-url>=
absolute
+    URL</a>.</p>
+
+    <p>Any number of properties with the name <code title=3Dmd-=
vcard-url><a href=3D#md-vcard-url>url</a></code> may=
 be present
+    within each <a href=3D#concept-item title=3Dconcept-item>item&=
lt;/a> with the type <code title=3Dmd-vcard><a href=3D#md-vca=
rd>http://microformats.org/profile/hcard</a></code>.</p=
>
+
+   </dd>
+
+
+   <!-- VERSION not included - always 4.0 -->
+
+   <!-- KEY not included - no way to include binary data at this time=
 -->
+
+   <!-- FBURL, CALADRURI, CALURI not included - unclear how calendars=
 would be exposed on the web -->
+
+  </dl><p>The <dfn id=3Dkind-strings>kind strings</=
dfn> are:</p>
+
+  <dl><dt><dfn id=3Dmd-vcard-kind-individual title=3Dmd-v=
card-kind-individual><code>individual</code></dfn>&l=
t;/dt>
+   <dd>
+    <p>Indicates a single entity (e.g. a person).</p>
+   </dd>
+
+   <dt><dfn id=3Dmd-vcard-kind-group title=3Dmd-vcard-kind-grou=
p><code>group</code></dfn></dt>
+   <dd>
+    <p>Indicates multiple entities (e.g. a mailing list).</p&gt=
;
+   </dd>
+
+   <dt><dfn id=3Dmd-vcard-kind-org title=3Dmd-vcard-kind-org&gt=
;<code>org</code></dfn></dt>
+   <dd>
+    <p>Indicates a single entity that is not a person (e.g. a comp=
any).</p>
+   </dd>
+
+   <dt><dfn id=3Dmd-vcard-kind-location title=3Dmd-vcard-kind-l=
ocation><code>location</code></dfn></dt>
+   <dd>
+    <p>Indicates a geographical place (e.g. an office building).&l=
t;/p>
+   </dd>
+
+   <!-- update this when http://www.iana.org/assignments/vcard-elemen=
ts/vcard-elements.xml#property-values is updated -->
+
+  </dl><p>The <dfn id=3Daddress-type-strings>address t=
ype strings</dfn> are:</p>
+
+  <dl><dt><dfn id=3Dmd-vcard-type-adr-home title=3Dmd-vca=
rd-type-adr-home><code>home</code></dfn></dt>
+   <dd>
+    <p>Indicates a delivery address for a residence.</p>
+   </dd>
+
+   <dt><dfn id=3Dmd-vcard-type-adr-work title=3Dmd-vcard-type-a=
dr-work><code>work</code></dfn></dt>
+   <dd>
+    <p>Indicates a delivery address for a place of work.</p>
+   </dd>
+
+  </dl><p>The <dfn id=3Dtelephone-type-strings>telepho=
ne type strings</dfn> are:</p>
+
+  <dl><dt><dfn id=3Dmd-vcard-type-tel-home title=3Dmd-vca=
rd-type-tel-home><code>home</code></dfn></dt>
+   <dd>
+    <p>Indicates a residential number.</p>
+   </dd>
+
+   <dt><dfn id=3Dmd-vcard-type-tel-work title=3Dmd-vcard-type-t=
el-work><code>work</code></dfn></dt>
+   <dd>
+    <p>Indicates a telephone number for a place of work.</p>
+   </dd>
+
+   <dt><dfn id=3Dmd-vcard-type-tel-text title=3Dmd-vcard-type-t=
el-text><code>text</code></dfn></dt>
+   <dd>
+    <p>Indicates that the telephone number supports text messages =
(SMS).</p>
+   </dd>
+
+   <dt><dfn id=3Dmd-vcard-type-tel-voice title=3Dmd-vcard-type-=
tel-voice><code>voice</code></dfn></dt>
+   <dd>
+    <p>Indicates a voice telephone number.</p>
+   </dd>
+
+   <dt><dfn id=3Dmd-vcard-type-tel-fax title=3Dmd-vcard-type-te=
l-fax><code>fax</code></dfn></dt>
+   <dd>
+    <p>Indicates a facsimile telephone number.</p>
+   </dd>
+
+   <dt><dfn id=3Dmd-vcard-type-tel-cell title=3Dmd-vcard-type-t=
el-cell><code>cell</code></dfn></dt>
+   <dd>
+    <p>Indicates a cellular telephone number.</p>
+   </dd>
+
+   <dt><dfn id=3Dmd-vcard-type-tel-video title=3Dmd-vcard-type-=
tel-video><code>video</code></dfn></dt>
+   <dd>
+    <p>Indicates a video conferencing telephone number.</p>
+   </dd>
+
+   <dt><dfn id=3Dmd-vcard-type-tel-pager title=3Dmd-vcard-type-=
tel-pager><code>pager</code></dfn></dt>
+   <dd>
+    <p>Indicates a paging device telephone number.</p>
+   </dd>
+
+   <dt><dfn id=3Dmd-vcard-type-tel-textphone title=3Dmd-vcard-t=
ype-tel-textphone><code>textphone</code></dfn></d=
t>
+   <dd>
+    <p>Indicates a telecommunication device for people with hearin=
g or speech difficulties.</p>
+   </dd>
+
+  </dl><p>The <dfn id=3Drelationship-strings>relations=
hip strings</dfn> are:</p>
+
+  <dl><dt><dfn id=3Dmd-vcard-rel-emergency title=3Dmd-vca=
rd-rel-emergency><code>emergency</code></dfn></dt=
>
+   <dd>
+    <p>An emergency contact.</p>
+   </dd>
+
+   <dt><dfn id=3Dmd-vcard-rel-agent title=3Dmd-vcard-rel-agent&=
gt;<code>agent</code></dfn></dt>
+   <dd>
+    <p>Another entity that acts on behalf of this entity.</p&gt=
;
+   </dd>
+
+   <dt><dfn id=3Dmd-vcard-rel-contact title=3Dmd-vcard-rel-cont=
act>contact</dfn></dt>
+   <dt><dfn id=3Dmd-vcard-rel-acquaintance title=3Dmd-vcard-rel=
-acquaintance>acquaintance</dfn></dt>
+   <dt><dfn id=3Dmd-vcard-rel-friend title=3Dmd-vcard-rel-frien=
d>friend</dfn></dt>
+   <dt><dfn id=3Dmd-vcard-rel-met title=3Dmd-vcard-rel-met>m=
et</dfn></dt>
+   <dt><dfn id=3Dmd-vcard-rel-co-worker title=3Dmd-vcard-rel-co=
-worker>worker</dfn></dt>
+   <dt><dfn id=3Dmd-vcard-rel-colleague title=3Dmd-vcard-rel-co=
lleague>colleague</dfn></dt>
+   <dt><dfn id=3Dmd-vcard-rel-co-resident title=3Dmd-vcard-rel-=
co-resident>resident</dfn></dt>
+   <dt><dfn id=3Dmd-vcard-rel-neighbor title=3Dmd-vcard-rel-nei=
ghbor>neighbor</dfn></dt>
+   <dt><dfn id=3Dmd-vcard-rel-child title=3Dmd-vcard-rel-child&=
gt;child</dfn></dt>
+   <dt><dfn id=3Dmd-vcard-rel-parent title=3Dmd-vcard-rel-paren=
t>parent</dfn></dt>
+   <dt><dfn id=3Dmd-vcard-rel-sibling title=3Dmd-vcard-rel-sibl=
ing>sibling</dfn></dt>
+   <dt><dfn id=3Dmd-vcard-rel-spouse title=3Dmd-vcard-rel-spous=
e>spouse</dfn></dt>
+   <dt><dfn id=3Dmd-vcard-rel-kin title=3Dmd-vcard-rel-kin>k=
in</dfn></dt>
+   <dt><dfn id=3Dmd-vcard-rel-muse title=3Dmd-vcard-rel-muse&gt=
;muse</dfn></dt>
+   <dt><dfn id=3Dmd-vcard-rel-crush title=3Dmd-vcard-rel-crush&=
gt;crush</dfn></dt>
+   <dt><dfn id=3Dmd-vcard-rel-date title=3Dmd-vcard-rel-date&gt=
;date</dfn></dt>
+   <dt><dfn id=3Dmd-vcard-rel-sweetheart title=3Dmd-vcard-rel-s=
weetheart>sweetheart</dfn></dt>
+   <dt><dfn id=3Dmd-vcard-rel-me title=3Dmd-vcard-rel-me>me&=
lt;/dfn></dt>
+   <dd>
+    <p>Has the meaning defined in XFN. <a href=3D#refsXFN>[X=
FN]</a></p>
+   </dd>
+
+   <!-- update this when http://www.iana.org/assignments/vcard-elemen=
ts/vcard-elements.xml#parameter-values is updated -->
+  </dl><h5 id=3Dconversion-to-vcard><span class=3Dsecno&g=
t;5.4.1.1 </span>Conversion to vCard</h5>
+
+  <p>Given a list of nodes <var title=3D"">nodes&l=
t;/var> in a <code><a href=3D#document>Document</a>&=
lt;/code>, a user agent must
+  run the following algorithm to <dfn id=3Dextracting-a-vcard title=3D=
"extracting a vCard">extract any vCard data represented
+  by those nodes</dfn> (only the first vCard is returned):</p&g=
t;
+
+  <ol><li><p>If none of the nodes in <var title=3D&=
quot;">nodes</var> are <a href=3D#concept-item title=3Dc=
oncept-item>items</a> with the <a href=3D#item-types title=3D=
"item types">item type</a> <code title=3Dmd-vcard&g=
t;<a href=3D#md-vcard>http://microformats.org/profile/hcard</a&g=
t;</code>, then there is no vCard. Abort the
+   algorithm, returning nothing.</li>
+
+   <li><p>Let <var title=3D"">node</var&g=
t; be the first node in <var title=3D"">nodes</var>=
 that is an
+   <a href=3D#concept-item title=3Dconcept-item>item</a> wit=
h the <a href=3D#item-types title=3D"item types">item typ=
e</a> <code title=3Dmd-vcard><a href=3D#md-vcard>http:/=
/microformats.org/profile/hcard</a></code>.</li>
+
+   <li><p>Let <var title=3D"">output</var=
> be an empty string.</li>
+
+   <li><p><a href=3D#add-a-vcard-line>Add a vCard line=
</a> with the type "<code title=3D"">BEGIN<=
/code>" and the value
+   "<code title=3D"">VCARD</code>" to &l=
t;var title=3D"">output</var>.</li>
+
+   <li><p><a href=3D#add-a-vcard-line>Add a vCard line=
</a> with the type "<code title=3D"">PROFILE&l=
t;/code>" and the value
+   "<code title=3D"">VCARD</code>" to &l=
t;var title=3D"">output</var>.</li>
+
+   <li><p><a href=3D#add-a-vcard-line>Add a vCard line=
</a> with the type "<code title=3D"">VERSION&l=
t;/code>" and the value
+   "<code title=3D"">4.0</code>" to <=
var title=3D"">output</var>.</li>
+
+   <li><p><a href=3D#add-a-vcard-line>Add a vCard line=
</a> with the type "<code title=3D"">SOURCE&lt=
;/code>" and the result
+   of <a href=3D#escaping-the-vcard-text-string>escaping the vCard=
 text string</a> that is <a href=3D"#the-document's-address=
">the document's address</a> as the
+   value to <var title=3D"">output</var>.</li&g=
t;
+
+   <li><p>If <a href=3D#the-title-element-0>the <co=
de>title</code> element</a> is not null, <a href=3D#add=
-a-vcard-line>add a vCard line</a>
+   with the type "<code title=3D"">NAME</code&gt=
;" and with the result of <a href=3D#escaping-the-vcard-text-stri=
ng>escaping the vCard text
+   string</a> obtained from the <code><a href=3D#textcont=
ent>textContent</a></code> of <a href=3D#the-title-elem=
ent-0>the <code>title</code>
+   element</a> as the value to <var title=3D"">out=
put</var>.</li>
+
+   <li><p>Let <var title=3D"">sex</var&gt=
; be the empty string.</li>
+
+   <li><p>Let <var title=3D"">gender-identit=
y</var> be the empty string.</li>
+
+   <li>
+
+    <p>For each element <var title=3D"">element&lt=
;/var> that is <a href=3D#the-properties-of-an-item title=3D"t=
he properties of an
+    item">a property of the item</a> <var title=3D&quot=
;">node</var>: for each name <var title=3D""&g=
t;name</var> in <var title=3D"">element</var>=
's <a href=3D#property-names>property names</a>, run the
+    following substeps:</p>
+
+    <ol><li><p>Let <var title=3D"">par=
ameters</var> be an empty set of name-value pairs.</li>
+
+     <li>
+
+      <p>Run the appropriate set of substeps from the following li=
st. The steps will set a variable
+      <var title=3D"">value</var>, which is used i=
n the next step.</p>
+
+      <dl><dt>If the property's <a href=3D#concept-proper=
ty-value title=3Dconcept-property-value>value</a> is an <a hr=
ef=3D#concept-item title=3Dconcept-item>item</a> <var title=3D=
"">subitem</var> and <var title=3D"">n=
ame</var> is
+       <code title=3Dmd-vcard-n><a href=3D#md-vcard-n>n</=
a></code></dt>
+
+       <dd>
+
+        <ol><li><p>Let <var title=3D""&gt=
;value</var> be the empty string.</li>
+
+         <li><p>Append to <var title=3D"">va=
lue</var> the result of <a href=3D#collecting-the-first-vcard-su=
bproperty>collecting the first vCard
+         subproperty</a> named <code title=3Dmd-vcard-n-family-=
name><a href=3D#md-vcard-n-family-name>family-name</a><=
/code> in <var title=3D"">subitem</var>.</p&g=
t;
+
+         <li>Append a U+003B SEMICOLON character (;) to <var ti=
tle=3D"">value</var>.</li>
+
+         <li><p>Append to <var title=3D"">va=
lue</var> the result of <a href=3D#collecting-the-first-vcard-su=
bproperty>collecting the first vCard
+         subproperty</a> named <code title=3Dmd-vcard-n-given-n=
ame><a href=3D#md-vcard-n-given-name>given-name</a></co=
de> in <var title=3D"">subitem</var>.</p>
+
+         <li>Append a U+003B SEMICOLON character (;) to <var ti=
tle=3D"">value</var>.</li>
+
+         <li><p>Append to <var title=3D"">va=
lue</var> the result of <a href=3D#collecting-the-first-vcard-su=
bproperty>collecting the first vCard
+         subproperty</a> named <code title=3Dmd-vcard-n-additio=
nal-name><a href=3D#md-vcard-n-additional-name>additional-name&l=
t;/a></code> in
+         <var title=3D"">subitem</var>.</p>
+
+         <li>Append a U+003B SEMICOLON character (;) to <var ti=
tle=3D"">value</var>.</li>
+
+         <li><p>Append to <var title=3D"">va=
lue</var> the result of <a href=3D#collecting-the-first-vcard-su=
bproperty>collecting the first vCard
+         subproperty</a> named <code title=3Dmd-vcard-n-honorif=
ic-prefix><a href=3D#md-vcard-n-honorific-prefix>honorific-prefi=
x</a></code>
+         in <var title=3D"">subitem</var>.</p&g=
t;
+
+         <li>Append a U+003B SEMICOLON character (;) to <var ti=
tle=3D"">value</var>.</li>
+
+         <li><p>Append to <var title=3D"">va=
lue</var> the result of <a href=3D#collecting-the-first-vcard-su=
bproperty>collecting the first vCard
+         subproperty</a> named <code title=3Dmd-vcard-n-honorif=
ic-suffix><a href=3D#md-vcard-n-honorific-suffix>honorific-suffi=
x</a></code>
+         in <var title=3D"">subitem</var>.</p&g=
t;
+
+        </ol></dd>
+
+       <dt>If the property's <a href=3D#concept-property-value =
title=3Dconcept-property-value>value</a> is an <a href=3D#con=
cept-item title=3Dconcept-item>item</a> <var title=3D"&q=
uot;>subitem</var> and <var title=3D"">name</=
var> is
+       <code title=3Dmd-vcard-adr><a href=3D#md-vcard-adr>ad=
r</a></code></dt>
+
+       <dd>
+
+        <ol><li><p>Let <var title=3D""&gt=
;value</var> be the empty string.</li>
+
+         <li><p>Append to <var title=3D"">va=
lue</var> the result of <a href=3D#collecting-vcard-subpropertie=
s>collecting vCard
+         subproperties</a> named <code title=3Dmd-vcard-adr-pos=
t-office-box><a href=3D#md-vcard-adr-post-office-box>post-office=
-box</a></code> in <var title=3D"">subitem&lt=
;/var>.</p>
+
+         <li>Append a U+003B SEMICOLON character (;) to <var ti=
tle=3D"">value</var>.</li>
+
+         <li><p>Append to <var title=3D"">va=
lue</var> the result of <a href=3D#collecting-vcard-subpropertie=
s>collecting vCard
+         subproperties</a> named <code title=3Dmd-vcard-adr-ext=
ended-address><a href=3D#md-vcard-adr-extended-address>extended-=
address</a></code> in <var title=3D"">subitem=
</var>.</p>
+
+         <li>Append a U+003B SEMICOLON character (;) to <var ti=
tle=3D"">value</var>.</li>
+
+         <li><p>Append to <var title=3D"">va=
lue</var> the result of <a href=3D#collecting-vcard-subpropertie=
s>collecting vCard
+         subproperties</a> named <code title=3Dmd-vcard-adr-str=
eet-address><a href=3D#md-vcard-adr-street-address>street-addres=
s</a></code>
+         in <var title=3D"">subitem</var>.</p&g=
t;
+
+         <li>Append a U+003B SEMICOLON character (;) to <var ti=
tle=3D"">value</var>.</li>
+
+         <li><p>Append to <var title=3D"">va=
lue</var> the result of <a href=3D#collecting-the-first-vcard-su=
bproperty>collecting the first vCard
+         subproperty</a> named <code title=3Dmd-vcard-adr-local=
ity><a href=3D#md-vcard-adr-locality>locality</a></code=
> in <var title=3D"">subitem</var>.</p>
+
+         <li>Append a U+003B SEMICOLON character (;) to <var ti=
tle=3D"">value</var>.</li>
+
+         <li><p>Append to <var title=3D"">va=
lue</var> the result of <a href=3D#collecting-the-first-vcard-su=
bproperty>collecting the first vCard
+         subproperty</a> named <code title=3Dmd-vcard-adr-regio=
n><a href=3D#md-vcard-adr-region>region</a></code> i=
n <var title=3D"">subitem</var>.</p>
+
+         <li>Append a U+003B SEMICOLON character (;) to <var ti=
tle=3D"">value</var>.</li>
+
+         <li><p>Append to <var title=3D"">va=
lue</var> the result of <a href=3D#collecting-the-first-vcard-su=
bproperty>collecting the first vCard
+         subproperty</a> named <code title=3Dmd-vcard-adr-posta=
l-code><a href=3D#md-vcard-adr-postal-code>postal-code</a>=
</code> in <var title=3D"">subitem</var>.<=
/p>
+
+         <li>Append a U+003B SEMICOLON character (;) to <var ti=
tle=3D"">value</var>.</li>
+
+         <li><p>Append to <var title=3D"">va=
lue</var> the result of <a href=3D#collecting-the-first-vcard-su=
bproperty>collecting the first vCard
+         subproperty</a> named <code title=3Dmd-vcard-adr-count=
ry-name><a href=3D#md-vcard-adr-country-name>country-name</a&=
gt;</code> in
+         <var title=3D"">subitem</var>.</p>
+
+         <li><p>If there is a property named <code title=3D=
md-vcard-adr-type><a href=3D#md-vcard-adr-type>type</a>&lt=
;/code> in <var title=3D"">subitem</var>, and th=
e first such property has a <a href=3D#concept-property-value title=3D=
concept-property-value>value</a> that is not an <a href=3D#co=
ncept-item title=3Dconcept-item>item</a> and whose value consist=
s only of <a href=3D#alphanumeric-ascii-characters>alphanumeric ASC=
II
+         characters</a>, then add a parameter named "<code=
 title=3D"">TYPE</code>" whose value is
+         the <a href=3D#concept-property-value title=3Dconcept-proper=
ty-value>value</a> of that property to <var title=3D"&qu=
ot;>parameters</var>.</li>
+
+        </ol></dd>
+
+       <dt>If the property's <a href=3D#concept-property-value =
title=3Dconcept-property-value>value</a> is an <a href=3D#con=
cept-item title=3Dconcept-item>item</a> <var title=3D"&q=
uot;>subitem</var> and <var title=3D"">name</=
var> is
+       <code title=3Dmd-vcard-org><a href=3D#md-vcard-org>or=
g</a></code></dt>
+
+       <dd>
+
+        <ol><li><p>Let <var title=3D""&gt=
;value</var> be the empty string.</li>
+
+         <li><p>Append to <var title=3D"">va=
lue</var> the result of <a href=3D#collecting-the-first-vcard-su=
bproperty>collecting the first vCard
+         subproperty</a> named <code title=3Dmd-vcard-org-organ=
ization-name><a href=3D#md-vcard-org-organization-name>organizat=
ion-name</a></code> in <var title=3D"">subite=
m</var>.</p>
+
+         <li>
+
+          <p>For each property named <code title=3Dmd-vcard-org=
-organization-unit><a href=3D#md-vcard-org-organization-unit>org=
anization-unit</a></code> in <var title=3D"">=
subitem</var>, run the following steps:</p>
+
+          <ol><li><p>If the <a href=3D#concept-prop=
erty-value title=3Dconcept-property-value>value</a> of the prope=
rty is an
+           <a href=3D#concept-item title=3Dconcept-item>item</a=
>, then skip this property.</li>
+
+           <li><p>Append a U+003B SEMICOLON character (;) to=
 <var title=3D"">value</var>.</li>
+
+           <li><p>Append the result of <a href=3D#escapin=
g-the-vcard-text-string>escaping the vCard text string</a> given=
 by the
+           <a href=3D#concept-property-value title=3Dconcept-property=
-value>value</a> of the property to <var title=3D""=
>value</var>.</li>
+
+          </ol></li>
+
+        </ol></dd>
+
+       <dt>If the property's <a href=3D#concept-property-value =
title=3Dconcept-property-value>value</a> is an <a href=3D#con=
cept-item title=3Dconcept-item>item</a> <var title=3D"&q=
uot;>subitem</var> with the <a href=3D#item-types title=3D&qu=
ot;item
+       types">item type</a> <code title=3Dmd-vcard>&=
lt;a href=3D#md-vcard>http://microformats.org/profile/hcard</a>&=
lt;/code>
+       and <var title=3D"">name</var> is <code =
title=3Dmd-vcard-related><a href=3D#md-vcard-related>related<=
/a></code></dt>
+
+       <dd>
+
+        <ol><li><p>Let <var title=3D""&gt=
;value</var> be the empty string.</li>
+
+         <li><p>If there is a property named <code title=3D=
md-vcard-related-url>url</code> in <var title=3D""&=
gt;subitem</var>, and its element is a <a href=3D#url-property-e=
lements title=3D"URL property elements">URL
+         property element</a>, then append the result of <a hre=
f=3D#escaping-the-vcard-text-string>escaping the vCard text
+         string</a> given by the <a href=3D#concept-property-va=
lue title=3Dconcept-property-value>value</a> of the first
+         such property to <var title=3D"">value</var&=
gt;, and add a parameter with the name "<code title=3D"&quot=
;>VALUE</code>" and the value "<code title=3D"=
">URI</code>" to <var title=3D"">param=
eters</var>.</li>
+
+         <li><p>If there is a property named <code title=3D=
md-vcard-related-rel>rel</code> in <var title=3D""&=
gt;subitem</var>, and the first such property has a <a href=3D#c=
oncept-property-value title=3Dconcept-property-value>value</a> t=
hat is not an <a href=3D#concept-item title=3Dconcept-item>item<=
/a> and whose value consists only of <a href=3D#alphanumeric-ascii-=
characters>alphanumeric ASCII
+         characters</a>, then add a parameter named "<code=
 title=3D"">RELATION</code>" whose value
+         is the <a href=3D#concept-property-value title=3Dconcept-pro=
perty-value>value</a> of that property to <var title=3D"=
">parameters</var>.</li>
+
+        </ol></dd>
+
+       <dt>If the property's <a href=3D#concept-property-value =
title=3Dconcept-property-value>value</a> is an <a href=3D#con=
cept-item title=3Dconcept-item>item</a> and <var title=3D&quo=
t;">name</var> is none of the above</dt>
+
+       <!-- tel, adr -->
+
+       <dd>
+
+        <ol><li><p>Let <var title=3D""&gt=
;value</var> be the result of <a href=3D#collecting-the-first-vc=
ard-subproperty>collecting the first vCard
+         subproperty</a> named <code title=3D"">va=
lue</code> in <var title=3D"">subitem</var>.&=
lt;/p>
+
+         <li><p>If there is a property named <code title=3D=
"">type</code> in <var title=3D"">subi=
tem</var>, and the first such property has a <a href=3D#concept-=
property-value title=3Dconcept-property-value>value</a> that is =
not an <a href=3D#concept-item title=3Dconcept-item>item</a> =
and whose value consists only of <a href=3D#alphanumeric-ascii-charact=
ers>alphanumeric ASCII
+         characters</a>, then add a parameter named "<code=
 title=3D"">TYPE</code>" whose value is
+         the <a href=3D#concept-property-value title=3Dconcept-proper=
ty-value>value</a> of that property to <var title=3D"&qu=
ot;>parameters</var>.</li>
+
+        </ol></dd>
+
+
+       <dt>If the property's <a href=3D#concept-property-value =
title=3Dconcept-property-value>value</a> is not an <a href=3D=
#concept-item title=3Dconcept-item>item</a> and its <var titl=
e=3D"">name</var> is <code title=3Dmd-vcard-sex>=
<a href=3D#md-vcard-sex>sex</a></code></dt>
+
+       <dd>
+
+        <p>If this is the first such property to be found, set &lt=
;var title=3D"">sex</var> to the
+        property's <a href=3D#concept-property-value title=3Dconcept-=
property-value>value</a>.</p>
+
+       </dd>
+
+
+       <dt>If the property's <a href=3D#concept-property-value =
title=3Dconcept-property-value>value</a> is not an <a href=3D=
#concept-item title=3Dconcept-item>item</a> and its <var titl=
e=3D"">name</var> is <code title=3Dmd-vcard-gender-=
identity><a href=3D#md-vcard-gender-identity>gender-identity<=
/a></code></dt>
+
+       <dd>
+
+        <p>If this is the first such property to be found, set &lt=
;var title=3D"">gender-identity</var>
+        to the property's <a href=3D#concept-property-value title=3Dc=
oncept-property-value>value</a>.</p>
+
+       </dd>
+
+
+       <dt>Otherwise (the property's <a href=3D#concept-propert=
y-value title=3Dconcept-property-value>value</a> is not an
+       <a href=3D#concept-item title=3Dconcept-item>item</a>=
)</dt>
+
+       <dd>
+
+        <ol><li><p>Let <var title=3D""&gt=
;value</var> be the property's <a href=3D#concept-property-value=
 title=3Dconcept-property-value>value</a>.</li>
+
+         <li><p>If <var title=3D"">element&l=
t;/var> is one of the <a href=3D#url-property-elements>URL prope=
rty elements</a>, add
+         a parameter with the name "<code title=3D""&g=
t;VALUE</code>" and the value "<code title=3D"&qu=
ot;>URI</code>" to <var title=3D"">paramete=
rs</var>.</li>
+
+         <li><p>Otherwise, if <var title=3D""&g=
t;name</var> is <code title=3Dmd-vcard-bday><a href=3D#md-=
vcard-bday>bday</a></code> or
+         <code title=3Dmd-vcard-anniversary><a href=3D#md-vcard=
-anniversary>anniversary</a></code> and the <var title=3D=
"">value</var> is
+         a <a href=3D#valid-date-string>valid date string</a&gt=
;, add a parameter with the name "<code title=3D"">V=
ALUE</code>" and the value "<code title=3D""=
>DATE</code>" to <var title=3D"">parameters=
</var>.</li>
+
+         <li><p>Otherwise, if <var title=3D""&g=
t;name</var> is <code title=3Dmd-vcard-rev><a href=3D#md-v=
card-rev>rev</a></code> and
+         the <var title=3D"">value</var> is a <=
a href=3D#valid-global-date-and-time-string>valid global date and time=
 string</a>, add a
+         parameter with the name "<code title=3D"">=
VALUE</code>" and the value "<code title=3D"&quot=
;>DATE-TIME</code>" to <var title=3D"">para=
meters</var>.</li>
+
+         <li><p>Prefix every U+005C REVERSE SOLIDUS characte=
r (\) in <var title=3D"">value</var> with
+         another U+005C REVERSE SOLIDUS character (\).</li>
+
+         <li><p>Prefix every U+002C COMMA character (,) in &=
lt;var title=3D"">value</var> with a U+005C
+         REVERSE SOLIDUS character (\).</li>
+
+         <li><p>Unless <var title=3D"">name&=
lt;/var> is <code title=3Dmd-vcard-geo><a href=3D#md-vcard-ge=
o>geo</a></code>, prefix
+         every U+003B SEMICOLON character (;) in <var title=3D"&=
quot;>value</var> with a U+005C REVERSE
+         SOLIDUS character (\).</li>
+
+         <li><p>Replace every U+000D CARRIAGE RETURN U+000A =
LINE FEED character pair (CRLF) in <var title=3D"">value&=
lt;/var> with a U+005C REVERSE SOLIDUS character (\) followed by a U+0=
06E LATIN
+         SMALL LETTER N character (n).</li>
+
+         <li><p>Replace every remaining U+000D CARRIAGE RETU=
RN (CR) or U+000A LINE FEED (LF)
+         character in <var title=3D"">value</var> =
with a U+005C REVERSE SOLIDUS character (\) followed
+         by a U+006E LATIN SMALL LETTER N character (n).</li>
+
+        </ol></dd>
+
+      </dl></li>
+
+     <li>
+
+      <p><a href=3D#add-a-vcard-line>Add a vCard line</a&=
gt; with the type <var title=3D"">name</var>, the p=
arameters <var title=3D"">parameters</var>, and the=
 value <var title=3D"">value</var> to <var title=
=3D"">output</var>.</p>
+
+     </li>
+
+    </ol></li>
+
+   <li><p>If either <var title=3D"">sex</=
var> or <var title=3D"">gender-identity</var> ha=
s a value that
+   is not the empty string, <a href=3D#add-a-vcard-line>add a vCar=
d line</a> with the type "<code title=3D"">GEN=
DER</code>" and the value consisting of the concatenation of &=
lt;var title=3D"">sex</var>,
+   a U+003B SEMICOLON character (;), and <var title=3D""&gt=
;gender-identity</var> to <var title=3D"">output&lt=
;/var>.</li>
+
+   <li><p><a href=3D#add-a-vcard-line>Add a vCard line=
</a> with the type "<code title=3D"">END</c=
ode>" and the value
+   "<code title=3D"">VCARD</code>" to &l=
t;var title=3D"">output</var>.</li>
+
+  </ol><p>When the above algorithm says that the user agent =
is to <dfn id=3Dadd-a-vcard-line>add a vCard line</dfn> consi=
sting
+  of a type <var title=3D"">type</var>, optionally=
 some parameters, and a value <var title=3D"">value</v=
ar> to a string <var title=3D"">output</var>, it=
 must run the following steps:</p>
+
+  <ol><li><p>Let <var title=3D"">line&=
lt;/var> be an empty string.
+
+   <li><p>Append <var title=3D"">type</va=
r>, <a href=3D#converted-to-ascii-uppercase>converted to ASCII u=
ppercase</a>, to <var title=3D"">line</var>.&=
lt;/li>
+
+   <li>
+
+    <p>If there are any parameters, then for each parameter, in th=
e order that they were added, run
+    these substeps:</p>
+
+    <ol><li><p>Append a U+003B SEMICOLON character (;)=
 to <var title=3D"">line</var>.</li>
+
+     <li><p>Append the parameter's name to <var title=3D&=
quot;">line</var>.</li>
+
+     <li><p>Append a U+003D EQUALS SIGN character (=3D) to &=
lt;var title=3D"">line</var>.</li>
+
+     <li><p>Append the parameter's value to <var title=3D=
"">line</var>.</li>
+
+    </ol></li>
+
+   <li><p>Append a U+003A COLON character (:) to <var tit=
le=3D"">line</var>.</li>
+
+   <li><p>Append <var title=3D"">value</v=
ar> to <var title=3D"">line</var>.</li>
+
+   <li><p>Let <var title=3D"">maximum length=
</var> be 75.</li>
+
+   <li>
+
+    <p>If and while <var title=3D"">line</var&g=
t; is longer than <var title=3D"">maximum length</var&=
gt;
+    Unicode code points long, run the following substeps:</p>
+
+    <ol><li><p>Append the first <var title=3D"=
">maximum length</var> Unicode code points of <var title=
=3D"">line</var> to <var title=3D"">ou=
tput</var>.</li>
+
+     <li><p>Remove the first <var title=3D""&gt=
;maximum length</var> Unicode code points from <var title=3D&quo=
t;">line</var>.</li>
+
+     <li><p>Append a U+000D CARRIAGE RETURN character (CR) t=
o <var title=3D"">output</var>.</li>
+
+     <li><p>Append a U+000A LINE FEED character (LF) to <=
var title=3D"">output</var>.</li>
+
+     <li><p>Append a U+0020 SPACE character to <var title=
=3D"">output</var>.</li>
+
+     <li><p>Let <var title=3D"">maximum leng=
th</var> be 74.</li>
+
+    </ol></li>
+
+   <li><p>Append (what remains of) <var title=3D"&qu=
ot;>line</var> to <var title=3D"">output</var=
>.</li>
+
+   <li><p>Append a U+000D CARRIAGE RETURN character (CR) to =
<var title=3D"">output</var>.</li>
+
+   <li><p>Append a U+000A LINE FEED character (LF) to <va=
r title=3D"">output</var>.</li>
+
+  </ol><p>When the steps above require the user agent to obt=
ain the result of <dfn id=3Dcollecting-vcard-subproperties>collecti=
ng vCard
+  subproperties</dfn> named <var title=3D"">subnam=
e</var> in <var title=3D"">subitem</var>, the=
 user
+  agent must run the following steps:</p>
+
+  <ol><li><p>Let <var title=3D"">value=
</var> be the empty string.</li>
+
+   <li>
+
+    <p>For each property named <var title=3D"">sub=
name</var> in the item <var title=3D"">subitem</=
var>,
+    run the following substeps:</p>
+
+    <ol><li><p>If the <a href=3D#concept-property-v=
alue title=3Dconcept-property-value>value</a> of the property is=
 itself an
+     <a href=3D#concept-item title=3Dconcept-item>item</a>, =
then skip this property.</li>
+
+     <li><p>If this is not the first property named <var =
title=3D"">subname</var> in <var title=3D"&quo=
t;>subitem</var> (ignoring any that were skipped by the previous=
 step), then append a
+     U+002C COMMA character (,) to <var title=3D"">value=
</var>.</li>
+
+     <li><p>Append the result of <a href=3D#escaping-the-=
vcard-text-string>escaping the vCard text string</a> given by th=
e <a href=3D#concept-property-value title=3Dconcept-property-value>=
value</a> of the property to <var title=3D"">value&=
lt;/var>.</li>
+
+    </ol></li>
+
+   <li><p>Return <var title=3D"">value</v=
ar>.</li>
+
+  </ol><p>When the steps above require the user agent to obt=
ain the result of <dfn id=3Dcollecting-the-first-vcard-subproperty>=
collecting the first
+  vCard subproperty</dfn> named <var title=3D"">su=
bname</var> in <var title=3D"">subitem</var>,=
 the user
+  agent must run the following steps:</p>
+
+  <ol><li><p>If there are no properties named <var =
title=3D"">subname</var> in <var title=3D"&quo=
t;>subitem</var>, then abort these substeps, returning the empty=
 string.</li>
+
+   <li><p>If the <a href=3D#concept-property-value title=3D=
concept-property-value>value</a> of the first property named &lt=
;var title=3D"">subname</var> in <var title=3D&quot=
;">subitem</var> is an <a href=3D#concept-item title=3Dc=
oncept-item>item</a>, then abort these substeps, returning the e=
mpty string.</li>
+
+   <li><p>Return the result of <a href=3D#escaping-the-vc=
ard-text-string>escaping the vCard text string</a> given by the =
<a href=3D#concept-property-value title=3Dconcept-property-value>va=
lue</a> of the first property named <var title=3D""&gt=
;subname</var> in <var title=3D"">subitem</var&g=
t;.</li>
+
+  </ol><p>When the above algorithms say the user agent is to=
 <dfn id=3Descaping-the-vcard-text-string title=3D"escaping the v=
Card text
+  string">escape the vCard text string</dfn> <var title=
=3D"">value</var>, the user agent must use the
+  following steps:</p>
+
+  <ol><li><p>Prefix every U+005C REVERSE SOLIDUS chara=
cter (\) in <var title=3D"">value</var> with
+   another U+005C REVERSE SOLIDUS character (\).</li>
+
+   <li><p>Prefix every U+002C COMMA character (,) in <var=
 title=3D"">value</var> with a U+005C REVERSE
+   SOLIDUS character (\).</li>
+
+   <li><p>Prefix every U+003B SEMICOLON character (;) in &lt=
;var title=3D"">value</var> with a U+005C
+   REVERSE SOLIDUS character (\).</li>
+
+   <li><p>Replace every U+000D CARRIAGE RETURN U+000A LINE F=
EED character pair (CRLF) in <var title=3D"">value</va=
r> with a U+005C REVERSE SOLIDUS character (\) followed by a U+006E LA=
TIN SMALL
+   LETTER N character (n).</li>
+
+   <li><p>Replace every remaining U+000D CARRIAGE RETURN (CR=
) or U+000A LINE FEED (LF) character in
+   <var title=3D"">value</var> with a U+005C REVER=
SE SOLIDUS character (\) followed by a U+006E LATIN
+   SMALL LETTER N character (n).</li>
+
+   <li><p>Return the mutated <var title=3D""&gt=
;value</var>.</li>
+
+  </ol><p class=3Dnote>This algorithm can generate invalid v=
Card output, if the input does not conform to
+  the rules described for the <code title=3Dmd-vcard><a href=3D=
#md-vcard>http://microformats.org/profile/hcard</a></code>
+  <a href=3D#item-types title=3D"item types">item type&l=
t;/a> and <a href=3D#defined-property-name title=3D"defined pr=
operty name">defined property
+  names</a>.</p> <!-- of course since vcard doesn't defin=
e error handling, this is somewhat
+  problematic. -->
+
+
+
+  <h5 id=3Dexamples-1><span class=3Dsecno>5.4.1.2 </span&=
gt;Examples</h5>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <div class=3Dexample>
+
+   <p>Here is a long example vCard for a fictional character calle=
d "Jack Bauer":</p>
+
+   <pre><section id=3D"jack" itemscope itemtype=3D=
"http://microformats.org/profile/hcard">
+ <h1 itemprop=3D"fn">
+  <span itemprop=3D"n" itemscope>
+   <span itemprop=3D"given-name">Jack</sp=
an>
+   <span itemprop=3D"family-name">Bauer</=
span>
+  </span>
+ </h1>
+ <img itemprop=3D"photo" alt=3D"" src=3D&quot=
;jack-bauer.jpg">
+ <p itemprop=3D"org" itemscope>
+  <span itemprop=3D"organization-name">Counter-T=
errorist Unit</span>
+  (<span itemprop=3D"organization-unit">Los Ange=
les Division</span>)
+ </p>
+ <p>
+  <span itemprop=3D"adr" itemscope>
+   <span itemprop=3D"street-address">10201 W. Pi=
co Blvd.</span><br>
+   <span itemprop=3D"locality">Los Angeles&l=
t;/span>,
+   <span itemprop=3D"region">CA</span&amp=
;gt;
+   <span itemprop=3D"postal-code">90064</=
span><br>
+   <span itemprop=3D"country-name">United States=
</span><br>
+  </span>
+  <span itemprop=3D"geo">34.052339;-118.410623&a=
mp;lt;/span>
+ </p>
+ <h2>Assorted Contact Methods</h2>
+ <ul>
+  <li itemprop=3D"tel" itemscope>
+   <span itemprop=3D"value">+1 (310) 597 3781&am=
p;lt;/span> <span itemprop=3D"type">work&a=
mp;lt;/span>
+   <meta itemprop=3D"type" content=3D"voice"&=
amp;gt;
+  </li>
+  <li><a itemprop=3D"url" href=3D"ht=
tp://en.wikipedia.org/wiki/Jack_Bauer">I'm on Wikipedia&l=
t;/a>
+  so you can leave a message on my user talk page.</li>
+  <li><a itemprop=3D"url" href=3D"ht=
tp://www.jackbauerfacts.com/">Jack Bauer Facts</a&=
gt;</li>
+  <li itemprop=3D"email"><a href=3D"=
mailto:j.bauer at la.ctu.gov.invalid">j.bauer at la.ctu.gov.invalid=
</a></li>
+  <li itemprop=3D"tel" itemscope>
+   <span itemprop=3D"value">+1 (310) 555 3781&am=
p;lt;/span> <span>
+   <meta itemprop=3D"type" content=3D"cell"&a=
mp;gt;mobile phone</span>
+  </li>
+ </ul>
+ <ins datetime=3D"2008-07-20 21:00:00+01:00">
+  <meta itemprop=3D"rev" content=3D"2008-07-20 21:=
00:00+01:00">
+  <p itemprop=3D"tel" itemscope><strong&a=
mp;gt;Update!</strong>
+  My new <span itemprop=3D"type">home</sp=
an> phone number is
+  <span itemprop=3D"value">01632 960 123<=
/span>.</p>
+ </ins>
+</section></pre>
+
+   <p>The odd line wrapping is needed because newlines are meaning=
ful in microdata: newlines would
+   be preserved in a conversion to, for example, the vCard format.</p=
>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>This example shows a site's contact details (using the <c=
ode><a href=3D#the-address-element>address</a></code&gt=
; element)
+   containing an address with two street components:</p>
+
+   <pre><address itemscope itemtype=3D"http://microfor=
mats.org/profile/hcard">
+ <strong itemprop=3D"fn"><span itemprop=3D=
"n" itemscope><span itemprop=3D"given-name&q=
uot;>Alfred</span>
+ <span itemprop=3D"family-name">Person</s=
pan></span></strong> <br&gt=
;
+ <span itemprop=3D"adr" itemscope>
+  <span itemprop=3D"street-address">1600 Amphith=
eatre Parkway</span> <br>
+  <span itemprop=3D"street-address">Building 43,=
 Second Floor</span> <br>
+  <span itemprop=3D"locality">Mountain View&=
lt;/span>,
+   <span itemprop=3D"region">CA</span&amp=
;gt; <span itemprop=3D"postal-code">94043<=
/span>
+ </span>
+</address></pre>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>The vCard vocabulary can be used to just mark up people's na=
mes:</p>
+
+   <pre><span itemscope itemtype=3D"http://microformat=
s.org/profile/hcard"
+><span itemprop=3Dfn><span itemprop=3D"=
n" itemscope><span itemprop=3D"given-name"
+>George</span> <span itemprop=3D"family=
-name">Washington</span></span
+></span></span></pre>
+
+   <p>This creates a single item with a two name-value pairs, one =
with the name "fn" and the value
+   "George Washington", and the other with the name "n&qu=
ot; and a second item as its value, the second
+   item having the two name-value pairs "given-name" and &quot=
;family-name" with the values "George" and
+   "Washington" respectively. This is defined to map to the fo=
llowing vCard:</p>
+
+   <pre>BEGIN:VCARD
+PROFILE:VCARD
+VERSION:4.0
+SOURCE:<var title=3D"">document's address</var>
+FN:George Washington
+N:Washington;George;;;
+END:VCARD</pre>
+
+  </div>
+
+
+  <h4 id=3Dvevent><span class=3Dsecno>5.4.2 </span>vEv=
ent</h4>
+
+  <p>An item with the <a href=3D#item-types title=3D"item =
types">item type</a> <dfn id=3Dmd-vevent title=3Dmd-veve=
nt><code>http://microformats.org/profile/hcalendar#vevent</co=
de></dfn> represents
+  an event.</p>
+
+  <p>This vocabulary does not <a href=3D#support-global-identif=
iers-for-items>support global identifiers for items</a>.</p&g=
t;
+
+  <p>The following are the type's <a href=3D#defined-property-n=
ame title=3D"defined property name">defined property names&l=
t;/a>.
+  They are based on the vocabulary defined in the iCalendar specificatio=
n, where more information on
+  how to interpret the values can be found. <a href=3D#refsRFC2445&gt=
;[RFC2445]</a></p>
+
+  <p class=3Dnote>Only the parts of the iCalendar vocabulary relat=
ing to events are used here; this
+  vocabulary cannot express a complete iCalendar instance.</p>
+
+  <dl><dt><dfn id=3Dmd-vevent-attach title=3Dmd-vevent-at=
tach><code>attach</code></dfn></dt>
+
+   <dd>
+
+    <p>Gives the address of an associated document for the event.&=
lt;/p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be an <a href=3D#absolute-url>=
absolute
+    URL</a>.</p>
+
+    <p>Any number of properties with the name <code title=3Dmd-=
vevent-attach><a href=3D#md-vevent-attach>attach</a></c=
ode> may be
+    present within each <a href=3D#concept-item title=3Dconcept-item&=
gt;item</a> with the type <code title=3Dmd-vevent><a href=3D=
#md-vevent>http://microformats.org/profile/hcalendar#vevent</a>&=
lt;/code>.</p>
+
+   </dd>
+
+
+   <dt><dfn id=3Dmd-vevent-categories title=3Dmd-vevent-categor=
ies><code>categories</code></dfn></dt>
+
+   <dd>
+
+    <p>Gives the name of a category or tag that the event could be=
 classified as.</p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be text.</p>
+
+    <p>Any number of properties with the name <code title=3Dmd-=
vevent-categories><a href=3D#md-vevent-categories>categories<=
/a></code>
+    may be present within each <a href=3D#concept-item title=3Dconcep=
t-item>item</a> with the type <code title=3Dmd-vevent><=
a href=3D#md-vevent>http://microformats.org/profile/hcalendar#vevent&l=
t;/a></code>.</p>
+
+   </dd>
+
+
+   <dt><dfn id=3Dmd-vevent-class title=3Dmd-vevent-class>&lt=
;code>class</code></dfn></dt>
+
+   <dd>
+
+    <p>Gives the access classification of the information regardin=
g the event.</p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be text with one of the following
+    values:</p>
+
+    <ul class=3Dbrief><li><code title=3D"">p=
ublic</code></li>
+     <li><code title=3D"">private</code><=
/li>
+     <li><code title=3D"">confidential</code&gt=
;</li>
+    </ul><p class=3Dwarning>This is merely advisory and cann=
ot be considered a confidentiality
+    measure.</p>
+
+    <p>A single property with the name <code title=3Dmd-vevent-=
class><a href=3D#md-vevent-class>class</a></code> ma=
y be present
+    within each <a href=3D#concept-item title=3Dconcept-item>item&=
lt;/a> with the type <code title=3Dmd-vevent><a href=3D#md-ve=
vent>http://microformats.org/profile/hcalendar#vevent</a></co=
de>.</p>
+
+   </dd>
+
+
+   <dt><dfn id=3Dmd-vevent-comment title=3Dmd-vevent-comment&gt=
;<code>comment</code></dfn></dt>
+
+   <dd>
+
+    <p>Gives a comment regarding the event.</p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be text.</p>
+
+    <p>Any number of properties with the name <code title=3Dmd-=
vevent-comment><a href=3D#md-vevent-comment>comment</a>&lt=
;/code> may be
+    present within each <a href=3D#concept-item title=3Dconcept-item&=
gt;item</a> with the type <code title=3Dmd-vevent><a href=3D=
#md-vevent>http://microformats.org/profile/hcalendar#vevent</a>&=
lt;/code>.</p>
+
+   </dd>
+
+
+   <dt><dfn id=3Dmd-vevent-description title=3Dmd-vevent-descri=
ption><code>description</code></dfn></dt>
+
+   <dd>
+
+    <p>Gives a detailed description of the event.</p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be text.</p>
+
+    <p>A single property with the name <code title=3Dmd-vevent-=
description><a href=3D#md-vevent-description>description</a&g=
t;</code> may be
+    present within each <a href=3D#concept-item title=3Dconcept-item&=
gt;item</a> with the type <code title=3Dmd-vevent><a href=3D=
#md-vevent>http://microformats.org/profile/hcalendar#vevent</a>&=
lt;/code>.</p>
+
+   </dd>
+
+
+   <dt><dfn id=3Dmd-vevent-geo title=3Dmd-vevent-geo><cod=
e>geo</code></dfn></dt>
+
+   <dd>
+
+    <p>Gives the geographical position of the event.</p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be text and must match the
+    following syntax:</p>
+
+    <ol><li>Optionally, either a U+002B PLUS SIGN character =
(+) or a U+002D HYPHEN-MINUS character
+     (-).</li>
+
+     <li>One or more <a href=3D#ascii-digits>ASCII digits&lt=
;/a>.</li>
+
+     <li>Optionally*, a U+002E FULL STOP character (.) followed by=
 one or more <a href=3D#ascii-digits>ASCII
+     digits</a>.</li>
+
+     <li>A U+003B SEMICOLON character (;).</li>
+
+     <li>Optionally, either a U+002B PLUS SIGN character (+) or a =
U+002D HYPHEN-MINUS character
+     (-).</li>
+
+     <li>One or more <a href=3D#ascii-digits>ASCII digits&lt=
;/a>.</li>
+
+     <li>Optionally*, a U+002E FULL STOP character (.) followed by=
 one or more <a href=3D#ascii-digits>ASCII
+     digits</a>.</li>
+
+    </ol><p>The optional components marked with an asterisk =
(*) should be included, and should have six
+    digits each.</p> <!-- iCalendar actually limits the range t=
o -91.0 < lat < 91.0; -181.0 < long <
+    181.0, which seems weird. It also gives special meanings to +90/-90 =
lat, and +180 long. -->
+
+    <!-- copied from vcard (not icalendar!) -->
+    <p class=3Dnote>The value specifies latitude and longitude, in=
 that order (i.e., "LAT LON"
+    ordering), in decimal degrees. The longitude represents the location=
 east and west of the prime
+    meridian as a positive or negative real number, respectively. The la=
titude represents the
+    location north and south of the equator as a positive or negative re=
al number, respectively.</p>
+
+    <p>A single property with the name <code title=3Dmd-vevent-=
geo><a href=3D#md-vevent-geo>geo</a></code> may be p=
resent within
+    each <a href=3D#concept-item title=3Dconcept-item>item</a&g=
t; with the type <code title=3Dmd-vevent><a href=3D#md-vevent&gt=
;http://microformats.org/profile/hcalendar#vevent</a></code>.=
</p>
+
+   </dd>
+
+
+   <dt><dfn id=3Dmd-vevent-location title=3Dmd-vevent-location&=
gt;<code>location</code></dfn></dt>
+
+   <dd>
+
+    <p>Gives the location of the event.</p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be text.</p> <!-- v2: suppo=
rt
+    vcard here -->
+
+    <p>A single property with the name <code title=3Dmd-vevent-=
location><a href=3D#md-vevent-location>location</a></co=
de> may be
+    present within each <a href=3D#concept-item title=3Dconcept-item&=
gt;item</a> with the type <code title=3Dmd-vevent><a href=3D=
#md-vevent>http://microformats.org/profile/hcalendar#vevent</a>&=
lt;/code>.</p>
+
+   </dd>
+
+
+   <!-- PRIORITY not included - always 0 - doesn't make sense for sin=
gle events -->
+
+
+   <dt><dfn id=3Dmd-vevent-resources title=3Dmd-vevent-resource=
s><code>resources</code></dfn></dt>
+
+   <dd>
+
+    <p>Gives a resource that will be needed for the event.</p&g=
t;
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be text.</p> <!-- v2: suppo=
rt
+    vcard here -->
+
+    <p>Any number of properties with the name <code title=3Dmd-=
vevent-resources><a href=3D#md-vevent-resources>resources</a&=
gt;</code> may
+    be present within each <a href=3D#concept-item title=3Dconcept-it=
em>item</a> with the type <code title=3Dmd-vevent><a hr=
ef=3D#md-vevent>http://microformats.org/profile/hcalendar#vevent</a=
></code>.</p>
+
+   </dd>
+
+
+   <dt><dfn id=3Dmd-vevent-status title=3Dmd-vevent-status>&=
lt;code>status</code></dfn></dt>
+
+   <dd>
+
+    <p>Gives the confirmation status of the event.</p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be text with one of the following
+    values:</p>
+
+    <ul class=3Dbrief><li><code title=3D"">t=
entative</code></li>
+     <li><code title=3D"">confirmed</code>&l=
t;/li>
+     <li><code title=3D"">cancelled</code>&l=
t;/li> <!-- two Ls as per iCalendar spec -->
+    </ul><p>A single property with the name <code title=3D=
md-vevent-status><a href=3D#md-vevent-status>status</a>&lt=
;/code> may be present
+    within each <a href=3D#concept-item title=3Dconcept-item>item&=
lt;/a> with the type <code title=3Dmd-vevent><a href=3D#md-ve=
vent>http://microformats.org/profile/hcalendar#vevent</a></co=
de>.</p>
+
+   </dd>
+
+
+   <dt><dfn id=3Dmd-vevent-summary title=3Dmd-vevent-summary&gt=
;<code>summary</code></dfn></dt>
+
+   <dd>
+
+    <p>Gives a short summary of the event.</p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be text.</p>
+
+    <p>User agents should replace U+000A LINE FEED (LF) characters=
 in the <a href=3D#concept-property-value title=3Dconcept-property-val=
ue>value</a> by U+0020 SPACE characters when using the value.&lt=
;/p>
+
+    <p>A single property with the name <code title=3Dmd-vevent-=
summary><a href=3D#md-vevent-summary>summary</a></code&=
gt; may be present
+    within each <a href=3D#concept-item title=3Dconcept-item>item&=
lt;/a> with the type <code title=3Dmd-vevent><a href=3D#md-ve=
vent>http://microformats.org/profile/hcalendar#vevent</a></co=
de>.</p>
+
+   </dd>
+
+
+   <dt><dfn id=3Dmd-vevent-dtend title=3Dmd-vevent-dtend>&lt=
;code>dtend</code></dfn></dt>
+
+   <dd>
+
+    <p>Gives the date and time by which the event ends.</p>
+
+    <p>If the property with the name <code title=3Dmd-vevent-dt=
end><a href=3D#md-vevent-dtend>dtend</a></code> is p=
resent within an
+    <a href=3D#concept-item title=3Dconcept-item>item</a> wi=
th the type <code title=3Dmd-vevent><a href=3D#md-vevent>http=
://microformats.org/profile/hcalendar#vevent</a></code> that =
has a property
+    with the name <code title=3Dmd-vevent-dtstart><a href=3D#md=
-vevent-dtstart>dtstart</a></code> whose value is a <a =
href=3D#valid-date-string>valid date
+    string</a>, then the <a href=3D#concept-property-value titl=
e=3Dconcept-property-value>value</a> of the property with
+    the name <code title=3Dmd-vevent-dtend><a href=3D#md-vevent=
-dtend>dtend</a></code> must be text that is a <a href=3D=
#valid-date-string>valid date
+    string</a> also. Otherwise, the <a href=3D#concept-property=
-value title=3Dconcept-property-value>value</a> of the
+    property must be text that is a <a href=3D#valid-global-date-and-=
time-string>valid global date and time string</a>.</p>
+
+    <p>In either case, the <a href=3D#concept-property-value ti=
tle=3Dconcept-property-value>value</a> be later in time than
+    the value of the <code title=3Dmd-event-dtstart>dtstart</co=
de> property of the same <a href=3D#concept-item title=3Dconcept-it=
em>item</a>.</p>
+
+    <p class=3Dnote>The time given by the <code title=3Dmd-veve=
nt-dtend><a href=3D#md-vevent-dtend>dtend</a></code>=
 property is not
+    inclusive. For day-long events, therefore, the <code title=3Dmd-v=
event-dtend><a href=3D#md-vevent-dtend>dtend</a></code&=
gt;
+    property's <a href=3D#concept-property-value title=3Dconcept-prop=
erty-value>value</a> will be the day <em>after</em> =
the
+    end of the event.</p>
+
+    <p>A single property with the name <code title=3Dmd-vevent-=
dtend><a href=3D#md-vevent-dtend>dtend</a></code> ma=
y be present
+    within each <a href=3D#concept-item title=3Dconcept-item>item&=
lt;/a> with the type <code title=3Dmd-vevent><a href=3D#md-ve=
vent>http://microformats.org/profile/hcalendar#vevent</a></co=
de>, so long as that <code title=3Dmd-vevent><a href=3D#md-ve=
vent>http://microformats.org/profile/hcalendar#vevent</a></co=
de> does not have a
+    property with the name <code title=3Dmd-vevent-duration><a =
href=3D#md-vevent-duration>duration</a></code>.</p>
+
+   </dd>
+
+
+   <dt><dfn id=3Dmd-vevent-dtstart title=3Dmd-vevent-dtstart&gt=
;<code>dtstart</code></dfn></dt>
+
+   <dd>
+
+    <p>Gives the date and time at which the event starts.</p&gt=
;
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be text that is either a
+    <a href=3D#valid-date-string>valid date string</a> or a =
<a href=3D#valid-global-date-and-time-string>valid global date and =
time string</a>.</p>
+
+    <p>Exactly one property with the name <code title=3Dmd-veve=
nt-dtstart><a href=3D#md-vevent-dtstart>dtstart</a></co=
de> must be
+    present within each <a href=3D#concept-item title=3Dconcept-item&=
gt;item</a> with the type <code title=3Dmd-vevent><a href=3D=
#md-vevent>http://microformats.org/profile/hcalendar#vevent</a>&=
lt;/code>.</p>
+
+   </dd>
+
+
+   <dt><dfn id=3Dmd-vevent-duration title=3Dmd-vevent-duration&=
gt;<code>duration</code></dfn></dt>
+
+   <dd>
+
+    <p>Gives the duration of the event.</p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be text that is a <a href=3D#vali=
d-vevent-duration-string>valid
+    vevent duration string</a>.</p>
+
+    <p>The duration represented is the sum of all the durations re=
presented by integers in the
+    value.</p>
+
+    <p>A single property with the name <code title=3Dmd-vevent-=
duration><a href=3D#md-vevent-duration>duration</a></co=
de> may be
+    present within each <a href=3D#concept-item title=3Dconcept-item&=
gt;item</a> with the type <code title=3Dmd-vevent><a href=3D=
#md-vevent>http://microformats.org/profile/hcalendar#vevent</a>&=
lt;/code>, so long as that <code title=3Dmd-vevent><a href=3D=
#md-vevent>http://microformats.org/profile/hcalendar#vevent</a>&=
lt;/code> does not have a
+    property with the name <code title=3Dmd-vevent-dtend><a hre=
f=3D#md-vevent-dtend>dtend</a></code>.</p>
+
+   </dd>
+
+
+   <dt><dfn id=3Dmd-vevent-transp title=3Dmd-vevent-transp>&=
lt;code>transp</code></dfn></dt>
+
+   <dd>
+
+    <p>Gives whether the event is to be considered as consuming ti=
me on a calendar, for the purpose
+    of free-busy time searches.</p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be text with one of the following
+    values:</p>
+
+    <ul class=3Dbrief><li><code title=3D"">o=
paque</code></li>
+     <li><code title=3D"">transparent</code>=
</li>
+    </ul><p>A single property with the name <code title=3D=
md-vevent-transp><a href=3D#md-vevent-transp>transp</a>&lt=
;/code> may be present
+    within each <a href=3D#concept-item title=3Dconcept-item>item&=
lt;/a> with the type <code title=3Dmd-vevent><a href=3D#md-ve=
vent>http://microformats.org/profile/hcalendar#vevent</a></co=
de>.</p>
+
+   </dd>
+
+
+   <!-- ATTENDEE not included; iCalendar says MUST NOT be included in
+   published events -->
+
+
+   <dt><dfn id=3Dmd-vevent-contact title=3Dmd-vevent-contact&gt=
;<code>contact</code></dfn></dt>
+
+   <dd>
+
+    <p>Gives the contact information for the event.</p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be text.</p> <!-- v2: suppo=
rt
+    vcard here -->
+
+    <p>Any number of properties with the name <code title=3Dmd-=
vevent-contact><a href=3D#md-vevent-contact>contact</a>&lt=
;/code> may be
+    present within each <a href=3D#concept-item title=3Dconcept-item&=
gt;item</a> with the type <code title=3Dmd-vevent><a href=3D=
#md-vevent>http://microformats.org/profile/hcalendar#vevent</a>&=
lt;/code>.</p>
+
+   </dd>
+
+
+   <!-- ORGANIZER not included, as it is calendar-system-specific (gi=
ves a CAL-ADDRESS value); use
+   CONTACT instead -->
+
+
+   <!-- RECURRENCE-ID not included... unclear how to make it usefully=
 work here -->
+
+
+   <!-- RELATED-TO not included, as it only makes sense for complete =
calendars -->
+
+
+   <dt><dfn id=3Dmd-vevent-url title=3Dmd-vevent-url><cod=
e>url</code></dfn></dt>
+
+   <dd>
+
+    <p>Gives a <a href=3D#url>URL</a> for the event.&l=
t;/p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be an <a href=3D#absolute-url>=
absolute
+    URL</a>.</p>
+
+    <p>A single property with the name <code title=3Dmd-vevent-=
url><a href=3D#md-vevent-url>url</a></code> may be p=
resent within
+    each <a href=3D#concept-item title=3Dconcept-item>item</a&g=
t; with the type <code title=3Dmd-vevent><a href=3D#md-vevent&gt=
;http://microformats.org/profile/hcalendar#vevent</a></code>.=
</p>
+
+   </dd>
+
+                                  =20
+   <dt><dfn id=3Dmd-vevent-uid title=3Dmd-vevent-uid><cod=
e>uid</code></dfn></dt>
+
+   <dd>
+
+    <p>Gives a globally unique identifier corresponding to the eve=
nt.</p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be text.</p>
+
+    <p>A single property with the name <code title=3Dmd-vevent-=
uid><a href=3D#md-vevent-uid>uid</a></code> may be p=
resent within
+    each <a href=3D#concept-item title=3Dconcept-item>item</a&g=
t; with the type <code title=3Dmd-vevent><a href=3D#md-vevent&gt=
;http://microformats.org/profile/hcalendar#vevent</a></code>.=
</p>
+
+   </dd>
+
+
+   <dt><dfn id=3Dmd-vevent-exdate title=3Dmd-vevent-exdate>&=
lt;code>exdate</code></dfn></dt>
+
+   <dd>
+
+    <p>Gives a date and time at which the event does not occur des=
pite the recurrence rules.</p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be text that is either a
+    <a href=3D#valid-date-string>valid date string</a> or a =
<a href=3D#valid-global-date-and-time-string>valid global date and =
time string</a>.</p>
+
+    <p>Any number of properties with the name <code title=3Dmd-=
vevent-exdate><a href=3D#md-vevent-exdate>exdate</a></c=
ode> may be
+    present within each <a href=3D#concept-item title=3Dconcept-item&=
gt;item</a> with the type <code title=3Dmd-vevent><a href=3D=
#md-vevent>http://microformats.org/profile/hcalendar#vevent</a>&=
lt;/code>.</p>
+
+   </dd>
+
+
+   <dt><dfn id=3Dmd-vevent-exrule title=3Dmd-vevent-exrule>&=
lt;code>exrule</code></dfn></dt>
+
+   <dd>
+
+    <p>Gives a rule for finding dates and times at which the event=
 does not occur despite the
+    recurrence rules.</p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be text that matches the RECUR
+    value type defined in the iCalendar specification. <a href=3D#ref=
sRFC2445>[RFC2445]</a></p>
+
+    <p>Any number of properties with the name <code title=3Dmd-=
vevent-exrule><a href=3D#md-vevent-exrule>exrule</a></c=
ode> may be
+    present within each <a href=3D#concept-item title=3Dconcept-item&=
gt;item</a> with the type <code title=3Dmd-vevent><a href=3D=
#md-vevent>http://microformats.org/profile/hcalendar#vevent</a>&=
lt;/code>.</p>
+
+   </dd>
+
+
+   <dt><dfn id=3Dmd-vevent-rdate title=3Dmd-vevent-rdate>&lt=
;code>rdate</code></dfn></dt>
+
+   <dd>
+
+    <p>Gives a date and time at which the event recurs.</p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be text that is one of the
+    following:
+
+    <ul><li>A <a href=3D#valid-date-string>valid date =
string</a>.</li>
+
+     <li>A <a href=3D#valid-global-date-and-time-string>vali=
d global date and time string</a>.</li>
+
+     <li>A <a href=3D#valid-global-date-and-time-string>vali=
d global date and time string</a> followed by a U+002F SOLIDUS char=
acter (/)
+     followed by a second <a href=3D#valid-global-date-and-time-strin=
g>valid global date and time string</a> representing a later
+     time.</li>
+
+     <li>A <a href=3D#valid-global-date-and-time-string>vali=
d global date and time string</a> followed by a U+002F SOLIDUS char=
acter (/)
+     followed by a <a href=3D#valid-vevent-duration-string>valid v=
event duration string</a>.</li>
+
+    </ul><p>Any number of properties with the name <code =
title=3Dmd-vevent-rdate><a href=3D#md-vevent-rdate>rdate</a&g=
t;</code> may be
+    present within each <a href=3D#concept-item title=3Dconcept-item&=
gt;item</a> with the type <code title=3Dmd-vevent><a href=3D=
#md-vevent>http://microformats.org/profile/hcalendar#vevent</a>&=
lt;/code>.</p>
+
+   </dd>
+
+
+   <dt><dfn id=3Dmd-vevent-rrule title=3Dmd-vevent-rrule>&lt=
;code>rrule</code></dfn></dt>
+
+   <dd>
+
+    <p>Gives a rule for finding dates and times at which the event=
 occurs.</p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be text that matches the RECUR
+    value type defined in the iCalendar specification. <a href=3D#ref=
sRFC2445>[RFC2445]</a></p>
+
+    <p>Any number of properties with the name <code title=3Dmd-=
vevent-rrule><a href=3D#md-vevent-rrule>rrule</a></code=
> may be
+    present within each <a href=3D#concept-item title=3Dconcept-item&=
gt;item</a> with the type <code title=3Dmd-vevent><a href=3D=
#md-vevent>http://microformats.org/profile/hcalendar#vevent</a>&=
lt;/code>.</p>
+
+   </dd>
+
+
+   <dt><dfn id=3Dmd-vevent-created title=3Dmd-vevent-created&gt=
;<code>created</code></dfn></dt>
+
+   <dd>
+
+    <p>Gives the date and time at which the event information was =
first created in a calendaring
+    system.</p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be text that is a <a href=3D#vali=
d-global-date-and-time-string>valid
+    global date and time string</a>.</p>
+
+    <p>A single property with the name <code title=3Dmd-vevent-=
created><a href=3D#md-vevent-created>created</a></code&=
gt; may be present
+    within each <a href=3D#concept-item title=3Dconcept-item>item&=
lt;/a> with the type <code title=3Dmd-vevent><a href=3D#md-ve=
vent>http://microformats.org/profile/hcalendar#vevent</a></co=
de>.</p>
+
+   </dd>
+
+
+   <!-- DTSTAMP not included, it gets added when serialising -->
+
+
+   <dt><dfn id=3Dmd-vevent-last-modified title=3Dmd-vevent-last=
-modified><code>last-modified</code></dfn></dt&gt=
;
+
+   <dd>
+
+    <p>Gives the date and time at which the event information was =
last modified in a calendaring
+    system.</p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be text that is a <a href=3D#vali=
d-global-date-and-time-string>valid
+    global date and time string</a>.</p>
+
+    <p>A single property with the name <code title=3Dmd-vevent-=
last-modified><a href=3D#md-vevent-last-modified>last-modified&l=
t;/a></code>
+    may be present within each <a href=3D#concept-item title=3Dconcep=
t-item>item</a> with the type <code title=3Dmd-vevent><=
a href=3D#md-vevent>http://microformats.org/profile/hcalendar#vevent&l=
t;/a></code>.</p>
+
+   </dd>
+
+
+   <dt><dfn id=3Dmd-vevent-sequence title=3Dmd-vevent-sequence&=
gt;<code>sequence</code></dfn></dt>
+
+   <dd>
+
+    <p>Gives a revision number for the event information.</p&gt=
;
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be text that is a <a href=3D#vali=
d-non-negative-integer>valid
+    non-negative integer</a>.</p>
+
+    <p>A single property with the name <code title=3Dmd-vevent-=
sequence><a href=3D#md-vevent-sequence>sequence</a></co=
de> may be
+    present within each <a href=3D#concept-item title=3Dconcept-item&=
gt;item</a> with the type <code title=3Dmd-vevent><a href=3D=
#md-vevent>http://microformats.org/profile/hcalendar#vevent</a>&=
lt;/code>.</p>
+
+   </dd>
+
+
+   <!-- REQUEST-STATUS not included, calendaring system interop
+   feature -->
+
+
+  </dl><p>A string is a <dfn id=3Dvalid-vevent-duration-s=
tring>valid vevent duration string</dfn> if it matches the follo=
wing pattern:</p>
+
+  <ol><li>A U+0050 LATIN CAPITAL LETTER P character (P).<=
/li>
+
+   <li>One of the following:
+
+    <ul><li> A <a href=3D#valid-non-negative-integer>v=
alid non-negative integer</a> followed by a U+0057 LATIN CAPITAL LE=
TTER W
+     character (W). The integer represents a duration of that number of =
weeks. </li>
+
+     <li> At least one, and possible both in this order, of the fo=
llowing:
+
+      <ol><li> A <a href=3D#valid-non-negative-integer&gt=
;valid non-negative integer</a> followed by a U+0044 LATIN CAPITAL =
LETTER D
+       character (D). The integer represents a duration of that number o=
f days. </li>
+
+       <li> A U+0054 LATIN CAPITAL LETTER T character (T) followed=
 by any one of the following, or
+       the first and second of the following in that order, or the secon=
d and third of the following
+       in that order, or all three of the following in this order:
+
+        <ol><li> A <a href=3D#valid-non-negative-integer&=
gt;valid non-negative integer</a> followed by a U+0048 LATIN CAPITA=
L LETTER H
+         character (H). The integer represents a duration of that number=
 of hours. </li>
+
+         <li> A <a href=3D#valid-non-negative-integer>valid =
non-negative integer</a> followed by a U+004D LATIN CAPITAL LETTER =
M
+         character (M). The integer represents a duration of that number=
 of minutes. </li>
+
+         <li> A <a href=3D#valid-non-negative-integer>valid =
non-negative integer</a> followed by a U+0053 LATIN CAPITAL LETTER =
S
+         character (S). The integer represents a duration of that number=
 of seconds. </li>
+
+        </ol></ol></li>
+
+    </ul></li>
+
+  </ol><h5 id=3Dconversion-to-icalendar><span class=3Dsec=
no>5.4.2.1 </span>Conversion to iCalendar</h5>
+
+  <p>Given a list of nodes <var title=3D"">nodes&l=
t;/var> in a <code><a href=3D#document>Document</a>&=
lt;/code>, a user agent must
+  run the following algorithm to <dfn id=3Dextracting-vevent-data tit=
le=3D"extracting vEvent data">extract any vEvent data
+  represented by those nodes</dfn>:</p>
+
+  <ol><li><p>If none of the nodes in <var title=3D&=
quot;">nodes</var> are <a href=3D#concept-item title=3Dc=
oncept-item>items</a> with the type <code title=3Dmd-vevent&g=
t;<a href=3D#md-vevent>http://microformats.org/profile/hcalendar#ve=
vent</a></code>, then there is no
+   vEvent data. Abort the algorithm, returning nothing.</li>
+
+   <li><p>Let <var title=3D"">output</var=
> be an empty string.</li>
+
+   <li><p><a href=3D#add-an-icalendar-line>Add an iCal=
endar line</a> with the type "<code title=3D""&gt=
;BEGIN</code>" and the
+   value "<code title=3D"">VCALENDAR</code>&q=
uot; to <var title=3D"">output</var>.</li>
+
+   <li><p><a href=3D#add-an-icalendar-line>Add an iCal=
endar line</a> with the type "<code title=3D""&gt=
;PRODID</code>" and the
+   value equal to a user-agent-specific string representing the user age=
nt to <var title=3D"">output</var>.</li>
+
+   <li><p><a href=3D#add-an-icalendar-line>Add an iCal=
endar line</a> with the type "<code title=3D""&gt=
;VERSION</code>" and the
+   value "<code title=3D"">2.0</code>" t=
o <var title=3D"">output</var>.</li>
+
+   <li>
+
+    <p>For each node <var title=3D"">node</var&=
gt; in <var title=3D"">nodes</var> that is an <a=
 href=3D#concept-item title=3Dconcept-item>item</a> with the typ=
e <code title=3Dmd-vevent><a href=3D#md-vevent>http://microfo=
rmats.org/profile/hcalendar#vevent</a></code>, run the follow=
ing
+    steps:</p>
+
+    <ol><li><p><a href=3D#add-an-icalendar-line>=
Add an iCalendar line</a> with the type "<code title=3D&quo=
t;">BEGIN</code>" and the
+     value "<code title=3D"">VEVENT</code>&qu=
ot; to <var title=3D"">output</var>.</li>
+
+     <li><p><a href=3D#add-an-icalendar-line>Add an iC=
alendar line</a> with the type "<code title=3D""&=
gt;DTSTAMP</code>" and a
+     value consisting of an iCalendar DATE-TIME string representing the =
current date and time, with
+     the annotation "<code title=3D"">VALUE=3DDATE-=
TIME</code>", to <var title=3D"">output</va=
r>. <a href=3D#refsRFC2445>[RFC2445]</a></li>
+
+     <li>
+
+      <p>For each element <var title=3D"">element&=
lt;/var> that is <a href=3D#the-properties-of-an-item title=3D&quot=
;the properties of an
+      item">a property of the item</a> <var title=3D&qu=
ot;">node</var>: for each name <var title=3D""=
>name</var> in <var title=3D"">element</var&g=
t;'s <a href=3D#property-names>property names</a>, run the
+      appropriate set of substeps from the following list:</p>
+
+      <dl><dt>If the property's <a href=3D#concept-proper=
ty-value title=3Dconcept-property-value>value</a> is an <a hr=
ef=3D#concept-item title=3Dconcept-item>item</a></dt>
+
+       <dd>
+
+        <p>Skip the property.</p>
+
+       </dd>
+
+
+       <dt>If the property is <code title=3Dmd-event-dtend>d=
tend</code></dt>
+       <dt>If the property is <code title=3Dmd-event-dtstart&gt=
;dtstart</code></dt>
+       <dt>If the property is <code title=3Dmd-event-exdate>=
exdate</code></dt>
+       <dt>If the property is <code title=3Dmd-event-rdate>r=
date</code></dt>
+       <dt>If the property is <code title=3Dmd-event-created&gt=
;created</code></dt>
+       <dt>If the property is <code title=3Dmd-event-last-modif=
ied>last-modified</code></dt>
+
+       <dd>
+
+        <p>Let <var title=3D"">value</var> b=
e the result of stripping all U+002D HYPHEN-MINUS (-) and
+        U+003A COLON (:) characters from the property's <a href=3D#co=
ncept-property-value title=3Dconcept-property-value>value</a>.&l=
t;/p>
+
+        <p>If the property's <a href=3D#concept-property-value =
title=3Dconcept-property-value>value</a> is a <a href=3D#vali=
d-date-string>valid date
+        string</a> then <a href=3D#add-an-icalendar-line>add=
 an iCalendar line</a> with the type <var title=3D""&g=
t;name</var>
+        and the value <var title=3D"">value</var> =
to <var title=3D"">output</var>, with the annotatio=
n
+        "<code title=3D"">VALUE=3DDATE</code>=
".</p>
+
+        <p>Otherwise, if the property's <a href=3D#concept-prop=
erty-value title=3Dconcept-property-value>value</a> is a
+        <a href=3D#valid-global-date-and-time-string>valid global =
date and time string</a> then <a href=3D#add-an-icalendar-line&g=
t;add an iCalendar line</a> with
+        the type <var title=3D"">name</var> and th=
e value <var title=3D"">value</var> to <var titl=
e=3D"">output</var>, with the annotation "<cod=
e title=3D"">VALUE=3DDATE-TIME</code>".</p>
+
+        <p>Otherwise skip the property.</p>
+
+       </dd>
+
+
+       <dt>Otherwise</dt>
+
+       <dd>
+
+        <p><a href=3D#add-an-icalendar-line>Add an iCalendar=
 line</a> with the type <var title=3D"">name</va=
r> and the
+        property's <a href=3D#concept-property-value title=3Dconcept-=
property-value>value</a> to <var title=3D"">outp=
ut</var>.</p>
+
+       </dd>
+
+      </dl></li>
+
+     <li><p><a href=3D#add-an-icalendar-line>Add an iC=
alendar line</a> with the type "<code title=3D""&=
gt;END</code>" and the
+     value "<code title=3D"">VEVENT</code>&qu=
ot; to <var title=3D"">output</var>.</li>
+
+    </ol></li>
+
+   <li><p><a href=3D#add-an-icalendar-line>Add an iCal=
endar line</a> with the type "<code title=3D""&gt=
;END</code>" and the value
+   "<code title=3D"">VCALENDAR</code>" t=
o <var title=3D"">output</var>.</li>
+
+  </ol><p>When the above algorithm says that the user agent =
is to <dfn id=3Dadd-an-icalendar-line>add an iCalendar line</dfn=
>
+  consisting of a type <var title=3D"">type</var>,=
 a value <var title=3D"">value</var>, and optionall=
y
+  an annotation, to a string <var title=3D"">output</=
var>, it must run the following steps:</p>
+
+  <ol><li><p>Let <var title=3D"">line&=
lt;/var> be an empty string.</li>
+
+   <li><p>Append <var title=3D"">type</va=
r>, <a href=3D#converted-to-ascii-uppercase>converted to ASCII u=
ppercase</a>, to <var title=3D"">line</var>.&=
lt;/li>
+
+   <li>
+
+    <p>If there is an annotation:</p>
+
+    <ol><li><p>Append a U+003B SEMICOLON character (;)=
 to <var title=3D"">line</var>.</li>
+
+     <li><p>Append the annotation to <var title=3D"&=
quot;>line</var>.</li>
+
+    </ol></li>
+
+   <li><p>Append a U+003A COLON character (:) to <var tit=
le=3D"">line</var>.</li>
+
+   <li><p>Prefix every U+005C REVERSE SOLIDUS character (\) =
in <var title=3D"">value</var> with
+   another U+005C REVERSE SOLIDUS character (\).</li>
+
+   <li><p>Prefix every U+002C COMMA character (,) in <var=
 title=3D"">value</var> with a U+005C REVERSE
+   SOLIDUS character (\).</li>
+
+   <li><p>Prefix every U+003B SEMICOLON character (;) in &lt=
;var title=3D"">value</var> with a U+005C
+   REVERSE SOLIDUS character (\).</li>
+
+   <li><p>Replace every U+000D CARRIAGE RETURN U+000A LINE F=
EED character pair (CRLF) in <var title=3D"">value</va=
r> with a U+005C REVERSE SOLIDUS character (\) followed by a U+006E LA=
TIN SMALL
+   LETTER N character (n).</li>
+
+   <li><p>Replace every remaining U+000D CARRIAGE RETURN (CR=
) or U+000A LINE FEED (LF) character in
+   <var title=3D"">value</var> with a U+005C REVER=
SE SOLIDUS character (\) followed by a U+006E LATIN
+   SMALL LETTER N character (n).</li>
+
+   <li><p>Append <var title=3D"">value</v=
ar> to <var title=3D"">line</var>.</li>
+
+   <li><p>Let <var title=3D"">maximum length=
</var> be 75.</li>
+
+   <li>
+
+    <p>If and while <var title=3D"">line</var&g=
t; is longer than <var title=3D"">maximum length</var&=
gt;
+    Unicode code points long, run the following substeps:</p>
+
+    <ol><li><p>Append the first <var title=3D"=
">maximum length</var> Unicode code points of <var title=
=3D"">line</var> to <var title=3D"">ou=
tput</var>.</li>
+
+     <li><p>Remove the first <var title=3D""&gt=
;maximum length</var> Unicode code points from <var title=3D&quo=
t;">line</var>.</li>
+
+     <li><p>Append a U+000D CARRIAGE RETURN character (CR) t=
o <var title=3D"">output</var>.</li>
+
+     <li><p>Append a U+000A LINE FEED character (LF) to <=
var title=3D"">output</var>.</li>
+
+     <li><p>Append a U+0020 SPACE character to <var title=
=3D"">output</var>.</li>
+
+     <li><p>Let <var title=3D"">maximum leng=
th</var> be 74.</li>
+
+    </ol></li>
+
+   <li><p>Append (what remains of) <var title=3D"&qu=
ot;>line</var> to <var title=3D"">output</var=
>.</li>
+
+   <li><p>Append a U+000D CARRIAGE RETURN character (CR) to =
<var title=3D"">output</var>.</li>
+
+   <li><p>Append a U+000A LINE FEED character (LF) to <va=
r title=3D"">output</var>.</li>
+
+  </ol><p class=3Dnote>This algorithm can generate invalid i=
Calendar output, if the input does not
+  conform to the rules described for the <code title=3Dmd-vevent>&=
lt;a href=3D#md-vevent>http://microformats.org/profile/hcalendar#veven=
t</a></code> <a href=3D#item-types title=3D"item
+  types">item type</a> and <a href=3D#defined-property-=
name title=3D"defined property name">defined property names&=
lt;/a>.</p>
+  <!-- of course since iCalendar doesn't define error handling, this =
is somewhat problematic. -->
+
+
+
+  <h5 id=3Dexamples-2><span class=3Dsecno>5.4.2.2 </span&=
gt;Examples</h5>
+
+  <p><i>This section is non-normative.</i></p>
+
+<!-- get more from http://tools.ietf.org/html/rfc2445 -->
+
+  <div class=3Dexample>
+
+   <p>Here is an example of a page that uses the vEvent vocabulary=
 to mark up an event:</p>
+
+   <pre><body itemscope itemtype=3D"http://microformat=
s.org/profile/hcalendar#vevent">
+ ...
+ <h1 itemprop=3D"summary">Bluesday Tuesday: Mone=
y Road</h1>
+ ...
+ <time itemprop=3D"dtstart" datetime=3D"2009-05-05=
T19:00:00Z">May 5th @ 7pm</time>
+ (until <time itemprop=3D"dtend" datetime=3D"2009-=
05-05T21:00:00Z">9pm</time>)
+ ...
+ <a href=3D"http://livebrum.co.uk/2009/05/05/bluesday-tuesda=
y-money-road"
+    rel=3D"bookmark" itemprop=3D"url">Link to=
 this page</a>
+ ...
+ <p>Location: <span itemprop=3D"location"=
>The RoadHouse</span></p>
+ ...
+ <p><input type=3Dbutton value=3D"Add to Calen=
dar"
+           onclick=3D"location =3D getCalendar(this)">&=
amp;lt;/p>
+ ...
+ <meta itemprop=3D"description" content=3D"via liv=
ebrum.co.uk">
+</body></pre>
+
+   <p>The "<code title=3D"">getCalendar()<=
/code>" method could look like
+   this:</p>
+
+   <pre>function getCalendar(node) {
+  // This function assumes the content is valid.
+  // It is not a compliant implementation of the algorithm for <a hre=
f=3D#extracting-vevent-data>extracting vEvent data</a>.
+  while (node && (!node.itemScope || !node.itemType.cont=
ains('http://microformats.org/profile/hcalendar#vevent')))
+    node =3D node.parentNode;
+  if (!node) {
+    alert('No event data found.');
+    return;
+  }
+  var stamp =3D new Date();
+  var stampString =3D '' + stamp.getUTCFullYear() + (stamp.getUTCMonth()=
 + 1) + stamp.getUTCDate() + 'T' +
+                         stamp.getUTCHours() + stamp.getUTCMinutes() + s=
tamp.getUTCSeconds() + 'Z';
+  var calendar =3D 'BEGIN:VCALENDAR\r\nPRODID:HTML\r\nVERSION:2.0\r\nBEG=
IN:VEVENT\r\nDTSTAMP:' + stampString + '\r\n';
+  for (var propIndex =3D 0; propIndex < node.properties.length; p=
ropIndex +=3D 1) {
+    var prop =3D node.properties[propIndex];
+    var value =3D prop.itemValue;
+    var parameters =3D '';
+    if (prop.localName =3D=3D 'time') {
+      value =3D value.replace(/[:-]/g, '');
+      if (value.match(/T/))
+        parameters =3D ';VALUE=3DDATE';
+      else
+        parameters =3D ';VALUE=3DDATE-TIME';
+    } else {
+      value =3D value.replace(/\\/g, '\\n');
+      value =3D value.replace(/;/g, '\\;');
+      value =3D value.replace(/,/g, '\\,');
+      value =3D value.replace(/\n/g, '\\n');
+    }
+    for (var nameIndex =3D 0; nameIndex < prop.itemProp.length; n=
ameIndex +=3D 1) {
+      var name =3D prop.itemProp[nameIndex];
+      if (!name.match(/:/) && !name.match(/\./))
+        calendar +=3D name.toUpperCase() + parameters + ':' + value + '\=
r\n';
+    }
+  }
+  calendar +=3D 'END:VEVENT\r\nEND:VCALENDAR\r\n';
+  return 'data:text/calendar;component=3Dvevent,' + encodeURI(calendar);
+}</pre>
+
+   <p>The same page could offer some markup, such as the following=
,
+   for copy-and-pasting into blogs:</p>
+
+   <pre><div itemscope itemtype=3D"http://microformats=
.org/profile/hcalendar#vevent">
+ <p>I'm going to
+ <strong itemprop=3D"summary">Bluesday Tuesday: =
Money Road</strong>,
+ <time itemprop=3D"dtstart" datetime=3D"2009-05-05=
T19:00:00Z">May 5th at 7pm</time>
+ to <time itemprop=3D"dtend" datetime=3D"2009-05-0=
5T21:00:00Z">9pm</time>,
+ at <span itemprop=3D"location">The RoadHouse&am=
p;lt;/span>!</p>
+ <p><a href=3D"http://livebrum.co.uk/2009/05/0=
5/bluesday-tuesday-money-road"
+       itemprop=3D"url">See this event on livebrum.co.u=
k</a>.</p>
+ <meta itemprop=3D"description" content=3D"via liv=
ebrum.co.uk">
+</div></pre>
+
+  </div>
+
+
+  <h4 id=3Dlicensing-works><span class=3Dsecno>5.4.3 </sp=
an>Licensing works</h4>
+
+  <p>An item with the <a href=3D#item-types title=3D"item =
types">item type</a> <dfn id=3Dmd-work title=3Dmd-work&g=
t;<code>http://n.whatwg.org/work</code></dfn> represent=
s a work (e.g. an article, an
+  image, a video, a song, etc). This type is primarily intended to allow=
 authors to include
+  licensing information for works.</p>
+
+  <p>The following are the type's <a href=3D#defined-property-n=
ame title=3D"defined property name">defined property
+  names</a>.</p>
+
+  <dl><dt><dfn id=3Dmd-work-work title=3Dmd-work-work>=
<code>work</code></dfn></dt>
+
+   <dd>
+
+    <p>Identifies the work being described.</p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be an <a href=3D#absolute-url>=
absolute
+    URL</a>.</p>
+
+    <p>Exactly one property with the name <code title=3Dmd-work=
-work><a href=3D#md-work-work>work</a></code> must b=
e present
+    within each <a href=3D#concept-item title=3Dconcept-item>item&=
lt;/a> with the type <code title=3Dmd-work><a href=3D#md-work=
>http://n.whatwg.org/work</a></code>.</p>
+
+   </dd>
+
+
+   <dt><dfn id=3Dmd-work-title title=3Dmd-work-title><cod=
e>title</code></dfn></dt>
+
+   <dd>
+
+    <p>Gives the name of the work.</p>
+
+    <p>A single property with the name <code title=3Dmd-work-ti=
tle><a href=3D#md-work-title>title</a></code> may be=
 present
+    within each <a href=3D#concept-item title=3Dconcept-item>item&=
lt;/a> with the type <code title=3Dmd-work><a href=3D#md-work=
>http://n.whatwg.org/work</a></code>.</p>
+
+   </dd>
+
+
+   <dt><dfn id=3Dmd-work-author title=3Dmd-work-author><c=
ode>author</code></dfn></dt>
+
+   <dd>
+
+    <p>Gives the name or contact information of one of the authors=
 or creators of the work.</p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be either an <a href=3D#concept-i=
tem title=3Dconcept-item>item</a> with the type <code title=3D=
md-vcard><a href=3D#md-vcard>http://microformats.org/profile/hca=
rd</a></code>, or text.</p>
+
+    <p>Any number of properties with the name <code title=3Dmd-=
work-author><a href=3D#md-work-author>author</a></code&=
gt; may be
+    present within each <a href=3D#concept-item title=3Dconcept-item&=
gt;item</a> with the type <code title=3Dmd-work><a href=3D=
#md-work>http://n.whatwg.org/work</a></code>.</p>
+
+   </dd>
+
+
+   <dt><dfn id=3Dmd-work-license title=3Dmd-work-license>&lt=
;code>license</code></dfn></dt>
+
+   <dd>
+
+    <p>Identifies one of the licenses under which the work is avai=
lable.</p>
+
+    <p>The <a href=3D#concept-property-value title=3Dconcept-pr=
operty-value>value</a> must be an <a href=3D#absolute-url>=
absolute
+    URL</a>.</p>
+
+    <p>Any number of properties with the name <code title=3Dmd-=
work-license><a href=3D#md-work-license>license</a></co=
de> may be
+    present within each <a href=3D#concept-item title=3Dconcept-item&=
gt;item</a> with the type <code title=3Dmd-work><a href=3D=
#md-work>http://n.whatwg.org/work</a></code>.</p>
+
+   </dd>
+
+  </dl><h5 id=3Dexamples-3><span class=3Dsecno>5.4.3.1=
 </span>Examples</h5>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <div class=3Dexample>
+
+   <p>This example shows an embedded image entitled <cite>My=
 Pond</cite>, licensed under the
+   Creative Commons Attribution-Share Alike 3.0 United States License an=
d the MIT license
+   simultaneously.</p>
+
+   <pre><figure <strong>itemscope itemtype=3D"ht=
tp://n.whatwg.org/work"</strong>>
+ <img <strong>itemprop=3D"work"</strong> sr=
c=3D"mypond.jpeg">
+ <figcaption>
+  <p><cite <strong>itemprop=3D"title&quo=
t;</strong>>My Pond</cite></p>
+  <p><small>Licensed under the <a &lt=
;strong>itemprop=3D"license"</strong>
+  href=3D"http://creativecommons.org/licenses/by-sa/3.0/us/"&a=
mp;gt;Creative
+  Commons Attribution-Share Alike 3.0 United States License</a&am=
p;gt;
+  and the <a <strong>itemprop=3D"license"</str=
ong>
+  href=3D"http://www.opensource.org/licenses/mit-license.php"&=
amp;gt;MIT
+  license</a>.</small>
+ </figcaption>
+</figure></pre>
+
+  </div>
+
+
+  <div class=3Dimpl>
+
+  <h3 id=3Dconverting-html-to-other-formats><span class=3Dsecno=
>5.5 </span>Converting HTML to other formats</h3>
+
+  <h4 id=3Djson><span class=3Dsecno>5.5.1 </span>JSON&=
lt;/h4>
+
+  <p>Given a list of nodes <var title=3D"">nodes&l=
t;/var> in a <code><a href=3D#document>Document</a>&=
lt;/code>, a user agent must
+  run the following algorithm to <dfn id=3Dextracting-json title=3D&q=
uot;extracting JSON">extract the microdata from those nodes
+  into a JSON form</dfn>:</p>
+
+  <ol><li><p>Let <var title=3D"">resul=
t</var> be an empty object.</li>
+
+   <li><p>Let <var title=3D"">items</var&=
gt; be an empty array.</li>
+
+   <li><p>For each <var title=3D"">node</=
var> in <var title=3D"">nodes</var>, check if th=
e element is a
+   <a href=3D#top-level-microdata-items title=3D"top-level micro=
data items">top-level microdata item</a>, and if it is then
+   <a href=3D#get-the-object>get the object</a> for that ele=
ment and add it to <var title=3D"">items</var>.<=
/li>
+
+   <li><p>Add an entry to <var title=3D"">re=
sult</var> called "<code title=3D"">items</=
code>" whose
+   value is the array <var title=3D"">items</var>.=
</li>
+
+   <li><p>Return the result of serializing <var title=3D&=
quot;">result</var> to JSON in the shortest
+   possible way (meaning no whitespace between tokens, no unnecessary ze=
ro digits in numbers, and
+   only using Unicode escapes in strings for characters that do not have=
 a dedicated escape
+   sequence), and with a lowercase "<code title=3D""&g=
t;e</code>" used, when appropriate, in the
+   representation of any numbers. <a href=3D#refsJSON>[JSON]</a=
></li>
+
+  </ol><p class=3Dnote>This algorithm returns an object with=
 a single property that is an array, instead
+  of just returning an array, so that it is possible to extend the algor=
ithm in the future if
+  necessary.</p>
+
+  <p>When the user agent is to <dfn id=3Dget-the-object>get =
the object</dfn> for an item <var title=3D"">item&l=
t;/var>,
+  optionally with a list of elements <var title=3D"">mem=
ory</var>, it must run the following
+  substeps:</p>
+
+  <ol><li><p>Let <var title=3D"">resul=
t</var> be an empty object.</li>
+
+   <li><p>If no <var title=3D"">memory</v=
ar> was passed to the algorithm, let <var title=3D"">m=
emory</var> be an empty list.</li>
+
+   <li><p>Add <var title=3D"">item</var&g=
t; to <var title=3D"">memory</var>.</li>
+
+   <li><p>If the <var title=3D"">item</va=
r> has any <a href=3D#item-types>item types</a>, add an en=
try to <var title=3D"">result</var> called "&l=
t;code title=3D"">type</code>" whose value is an =
array listing the
+   <a href=3D#item-types>item types</a> of <var title=3D&=
quot;">item</var>, in the order they were specified on the
+   <code title=3Dattr-itemtype><a href=3D#attr-itemtype>item=
type</a></code> attribute.</p>
+
+   <li><p>If the <var title=3D"">item</va=
r> has a <a href=3D#global-identifier>global identifier</a&gt=
;, add an entry to <var title=3D"">result</var> cal=
led "<code title=3D"">id</code>" whose va=
lue is the <a href=3D#global-identifier>global
+   identifier</a> of <var title=3D"">item</var&=
gt;.</li>
+
+   <li><p>Let <var title=3D"">properties<=
/var> be an empty object.</li>
+
+   <li>
+
+    <p>For each element <var title=3D"">element&lt=
;/var> that has one or more <a href=3D#property-names>property n=
ames</a>
+    and is one of <a href=3D#the-properties-of-an-item title=3D"=
the properties of an item">the properties of the item</a> &=
lt;var title=3D"">item</var>, in the order those eleme=
nts are given by the algorithm that returns
+    <a href=3D#the-properties-of-an-item>the properties of an item=
</a>, run the following substeps:</p>
+
+    <ol><li><p>Let <var title=3D"">val=
ue</var> be the <a href=3D#concept-property-value title=3Dconcep=
t-property-value>property
+     value</a> of <var title=3D"">element</var&=
gt;.</li>
+
+     <li><p>If <var title=3D"">value</var=
> is an <a href=3D#concept-item title=3Dconcept-item>item</a&=
gt;, then: If <var title=3D"">value</var> is in &lt=
;var title=3D"">memory</var>, then let <var title=3D=
"">value</var> be
+     the string "<code title=3D"">ERROR</code&gt=
;". Otherwise, <a href=3D#get-the-object>get the object</a&=
gt; for <var title=3D"">value</var>, passing a copy=
 of <var title=3D"">memory</var>, and then replace =
<var title=3D"">value</var> with the object returne=
d from those steps.</li>
+
+     <li>
+
+      <p>For each name <var title=3D"">name</va=
r> in <var title=3D"">element</var>'s <a href=
=3D#property-names>property
+      names</a>, run the following substeps:</p>
+
+      <ol><li><p>If there is no entry named <var ti=
tle=3D"">name</var> in <var title=3D""&gt=
;properties</var>,
+       then add an entry named <var title=3D"">name</=
var> to <var title=3D"">properties</var> whose
+       value is an empty array.</li>
+
+       <li><p>Append <var title=3D"">value&l=
t;/var> to the entry named <var title=3D"">name</va=
r> in <var title=3D"">properties</var>.</li&g=
t;
+
+      </ol></li>
+
+    </ol></li>
+
+   <li><p>Add an entry to <var title=3D"">re=
sult</var> called "<code title=3D"">properties=
</code>" whose
+   value is the object <var title=3D"">properties</va=
r>.</li>
+
+   <li><p>Return <var title=3D"">result</=
var>.</li>
+
+  </ol><div class=3Dexample>
+
+   <p>For example, take this markup:</p>
+
+   <pre><!DOCTYPE HTML>
+<title>My Blog</title>
+<article itemscope itemtype=3D"http://schema.org/BlogPosting=
">
+ <header>
+  <h1 itemprop=3D"headline">Progress report&=
lt;/h1>
+  <p><time itemprop=3D"datePublished" dat=
etime=3D"2013-08-29">today</time></=
p>
+  <link itemprop=3D"url" href=3D"?comments=3D0&quo=
t;>
+ </header>
+ <p>All in all, he's doing well with his swim lessons. The=
 biggest thing was he had trouble
+ putting his head in, but we got it down.</p>
+ <section>
+  <h1>Comments</h1>
+  <article itemprop=3D"comment" itemscope itemtype=3D&q=
uot;http://schema.org/UserComments" id=3D"c1">
+   <link itemprop=3D"url" href=3D"#c1"&gt=
;
+   <footer>
+    <p>Posted by: <span itemprop=3D"creator&qu=
ot; itemscope itemtype=3D"http://schema.org/Person">
+     <span itemprop=3D"name">Greg</span&a=
mp;gt;
+    </span></p>
+    <p><time itemprop=3D"commentTime" dat=
etime=3D"2013-08-29">15 minutes ago</time>=
</p>
+   </footer>
+   <p>Ha!</p>
+  </article>
+  <article itemprop=3D"comment" itemscope itemtype=3D&q=
uot;http://schema.org/UserComments" id=3D"c2">
+   <link itemprop=3D"url" href=3D"#c2"&gt=
;
+   <footer>
+    <p>Posted by: <span itemprop=3D"creator&qu=
ot; itemscope itemtype=3D"http://schema.org/Person">
+     <span itemprop=3D"name">Charlotte</s=
pan>
+    </span></p>
+    <p><time itemprop=3D"commentTime" dat=
etime=3D"2013-08-29">5 minutes ago</time>&=
amp;lt;/p>
+   </footer>
+   <p>When you say "we got it down"...</p=
>
+  </article>
+ </section>
+</article></pre>
+
+   <p>It would be turned into the following JSON by the algorithm =
above (supposing that the page's
+   URL was <code>http://blog.example.com/progress-report</code&=
gt;):</p>
+
+   <pre>{
+  "items": [
+    {
+      "type": [ "http://schema.org/BlogPosting" ],
+      "properties": {
+        "headline": [ "Progress report" ],
+        "datePublished": [ "2013-08-29" ],
+        "url": [ "http://blog.example.com/progress-report=
?comments=3D0" ],
+        "comment": [
+          {
+            "type": [ "http://schema.org/UserComments&quo=
t; ],
+            "properties": {
+              "url": [ "http://blog.example.com/progress-=
report#c1" ],
+              "creator": [
+                {
+                  "type": [ "http://schema.org/Person&quo=
t; ],
+                  "properties": {
+                    "name": [ "Greg" ]
+                  }
+                }
+              ],
+              "commentTime": [ "2013-08-29" ]
+            }
+          },
+          {
+            "type": [ "http://schema.org/UserComments&quo=
t; ],
+            "properties": {
+              "url": [ "http://blog.example.com/progress-=
report#c2" ],
+              "creator": [
+                {
+                  "type": [ "http://schema.org/Person&quo=
t; ],
+                  "properties": {
+                    "name": [ "Charlotte" ]
+                  }
+                }
+              ],
+              "commentTime": [ "2013-08-29" ]
+            }
+          }
+        ]
+      }
+    }
+  ]
+}</pre>
+
+  </div>
+
+  </div>
+
+
+
+
+<!--TOPIC:HTML-->
+
+  <h2 id=3Dbrowsers><span class=3Dsecno>6 </span>Loadi=
ng Web pages</h2>
+
+  <div class=3Dimpl>
+
+  <p>This section describes features that apply most directly to W=
eb browsers. Having said that,
+  except where specified otherwise, the requirements defined in this sec=
tion <em>do</em> apply to
+  all user agents, whether they are Web browsers or not.</p>
+
+  </div>
+
+
+
+  <h3 id=3Dwindows><span class=3Dsecno>6.1 </span>Brow=
sing contexts</h3>
+
+  <p>A <dfn id=3Dbrowsing-context>browsing context</dfn&g=
t; is an environment in which <code><a href=3D#document>Docum=
ent</a></code> objects are
+  presented to the user.</p>
+
+  <p class=3Dnote>A tab or window in a Web browser typically conta=
ins a <a href=3D#browsing-context>browsing
+  context</a>, as does an <code><a href=3D#the-iframe-ele=
ment>iframe</a></code><span class=3Dimpl> or <cod=
e><a href=3D#frame>frame</a></code>s in a
+  <code><a href=3D#frameset>frameset</a></code>&=
lt;/span>.</p>
+
+  <p>Each <a href=3D#browsing-context>browsing context</a=
> has a corresponding <code><a href=3D#windowproxy>WindowP=
roxy</a></code> object.</p>
+
+  <p>A <a href=3D#browsing-context>browsing context</a&gt=
; has a <a href=3D#session-history>session history</a>, which=
 lists the
+  <code><a href=3D#document>Document</a></code> =
objects that that <a href=3D#browsing-context>browsing context</=
a> has presented, is
+  presenting, or will present. At any time, one <code><a href=3D=
#document>Document</a></code> in each <a href=3D#browsi=
ng-context>browsing
+  context</a> is designated the <dfn id=3Dactive-document>ac=
tive document</dfn>. A <code><a href=3D#document>Docume=
nt</a></code>'s
+  <a href=3D#browsing-context>browsing context</a> is that &=
lt;a href=3D#browsing-context>browsing context</a> whose <a h=
ref=3D#session-history>session
+  history</a> contains the <code><a href=3D#document>D=
ocument</a></code>, if any. (A <code><a href=3D#docu=
ment>Document</a></code> created using
+  an API such as <code title=3Ddom-DOMImplementation-createDocument&g=
t;<a href=3D#dom-domimplementation-createdocument>createDocument()&=
lt;/a></code> has no
+  <a href=3D#browsing-context>browsing context</a>.)</p&g=
t;
+
+  <p>Each <code><a href=3D#document>Document</a>=
</code> in a <a href=3D#browsing-context>browsing context<=
/a> is <dfn id=3Dconcept-document-window title=3Dconcept-document-w=
indow>associated</dfn> with a <code><a href=3D#window&g=
t;Window</a></code> object. A
+  <a href=3D#browsing-context>browsing context</a>'s <cod=
e><a href=3D#windowproxy>WindowProxy</a></code> obje=
ct forwards everything to the
+  <a href=3D#browsing-context>browsing context</a>'s <a h=
ref=3D#active-document>active document</a>'s <code><a h=
ref=3D#window>Window</a></code> object.</p>
+
+  <p class=3Dnote>In general, there is a 1-to-1 mapping from the &=
lt;code><a href=3D#window>Window</a></code> object t=
o the
+  <code><a href=3D#document>Document</a></code> =
object. There are two exceptions. First, a <code><a href=3D#wind=
ow>Window</a></code> can be reused
+  for the presentation of a second <code><a href=3D#document&gt=
;Document</a></code> in the same <a href=3D#browsing-conte=
xt>browsing context</a>,
+  such that the mapping is then 1-to-2. This occurs when a <a href=3D=
#browsing-context>browsing context</a> is <a href=3D#navigate=
 title=3Dnavigate>navigated</a> from the initial <code>&lt=
;a href=3D#about:blank>about:blank</a></code> <code>=
<a href=3D#document>Document</a></code>
+  to another, with <a href=3D#replacement-enabled>replacement enab=
led</a>. Second, a <code><a href=3D#document>Document&l=
t;/a></code> can end up
+  being reused for several <code><a href=3D#window>Window&lt=
;/a></code> objects when the <code title=3Ddom-document-open&=
gt;<a href=3D#dom-document-open>document.open()</a></code&=
gt; method is used, such that the mapping is then
+  many-to-1.</p>
+
+  <p class=3Dnote>A <code><a href=3D#document>Document=
</a></code> does not necessarily have a <a href=3D#browsin=
g-context>browsing context</a>
+  associated with it. In particular, data mining tools are likely to nev=
er instantiate browsing
+  contexts.</p>
+
+  <hr><p>A <a href=3D#browsing-context>browsing contex=
t</a> can have a <dfn id=3Dcreator-browsing-context>creator b=
rowsing context</dfn>, the
+  <a href=3D#browsing-context>browsing context</a> that was =
responsible for its creation. If a <a href=3D#browsing-context>brow=
sing
+  context</a> has a <a href=3D#parent-browsing-context>paren=
t browsing context</a>, then that is its <a href=3D#creator-brow=
sing-context>creator browsing
+  context</a>. Otherwise, if the <a href=3D#browsing-context&gt=
;browsing context</a> has an <a href=3D#opener-browsing-context&=
gt;opener browsing
+  context</a>, then <em>that</em> is its <a href=3D=
#creator-browsing-context>creator browsing context</a>. Otherwis=
e, the
+  <a href=3D#browsing-context>browsing context</a> has no &l=
t;a href=3D#creator-browsing-context>creator browsing context</a&gt=
;.</p>
+
+  <p>If a <a href=3D#browsing-context>browsing context</a=
> <var title=3D"">A</var> has a <a href=3D#cr=
eator-browsing-context>creator browsing
+  context</a>, then the <code><a href=3D#document>Docu=
ment</a></code> that was the <a href=3D#active-document&gt=
;active document</a> of that
+  <a href=3D#creator-browsing-context>creator browsing context<=
/a> at the time <var title=3D"">A</var> was crea=
ted is the
+  <dfn id=3Dcreator-document>creator <code>Document</code=
></dfn>.</p>
+
+  <div class=3Dimpl>
+
+  <p>When a <a href=3D#browsing-context>browsing context<=
/a> is first created, it must be created with a single
+  <code><a href=3D#document>Document</a></code> =
in its session history, whose <a href=3D"#the-document's-address&=
quot; title=3D"the document's
+  address">address</a> is <code><a href=3D#about:=
blank>about:blank</a></code>, which is marked as being an =
<a href=3D#html-documents title=3D"HTML
+  documents">HTML document</a>, whose <a href=3D"#=
document's-character-encoding" title=3D"document's character en=
coding">character
+  encoding</a> is UTF-8, and which is both <a href=3D#ready-for=
-post-load-tasks>ready for post-load tasks</a> and
+  <a href=3D#completely-loaded>completely loaded</a> immedia=
tely. The <code><a href=3D#document>Document</a></co=
de> must have a single child
+  <code><a href=3D#the-html-element>html</a></code&=
gt; node, which itself has a single child <code><a href=3D#the-b=
ody-element>body</a></code> node. As soon as this
+  <code><a href=3D#document>Document</a></code> =
is created, the user agent must <a href=3D#implement-the-sandboxing&gt=
;implement the sandboxing</a> for
+  it. If the <a href=3D#browsing-context>browsing context</a&gt=
; has a <a href=3D#creator-document>creator <code>Document&lt=
;/code></a>, then
+  the <a href=3D#browsing-context>browsing context</a>'s &lt=
;code><a href=3D#document>Document</a></code>'s <=
a href=3D"#the-document's-referrer" title=3D"the document'=
s
+  referrer">referrer</a> must be set to <a href=3D&quot=
;#the-document's-address" title=3D"the document's address"=
>the address</a>
+  of that <a href=3D#creator-document>creator <code>Document=
</code></a> at the time of the <a href=3D#browsing-context=
>browsing
+  context</a>'s creation.</p>
+
+  <p class=3Dnote>If the <a href=3D#browsing-context>browsin=
g context</a> is created specifically to be immediately
+  navigated, then that initial navigation will have <a href=3D#replac=
ement-enabled>replacement enabled</a>.</p>
+
+  <p id=3Dabout-blank-origin>The <a href=3D#origin>origin&lt=
;/a> and <a href=3D#effective-script-origin>effective script ori=
gin</a> of the
+  <code><a href=3D#about:blank>about:blank</a></cod=
e> <code><a href=3D#document>Document</a></code&g=
t; are set when the <code><a href=3D#document>Document</a&=
gt;</code> is created.
+  If the new <a href=3D#browsing-context>browsing context</a&gt=
; has a <a href=3D#creator-browsing-context>creator browsing contex=
t</a>, then the
+  <a href=3D#origin>origin</a> of the <code><a href=
=3D#about:blank>about:blank</a></code> <code><a h=
ref=3D#document>Document</a></code> is an <a href=3D#co=
ncept-origin-alias title=3Dconcept-origin-alias>alias</a> to the=
 <a href=3D#origin>origin</a> of the <a href=3D#creator-do=
cument>creator
+  <code>Document</code></a> and the <a href=3D#effe=
ctive-script-origin>effective script origin</a> of the
+  <code><a href=3D#about:blank>about:blank</a></cod=
e> <code><a href=3D#document>Document</a></code&g=
t; is initially an <a href=3D#concept-origin-alias title=3Dconcept-ori=
gin-alias>alias</a> to the <a href=3D#effective-script-origin=
>effective script origin</a> of the
+  <a href=3D#creator-document>creator <code>Document</cod=
e></a>. Otherwise, the <a href=3D#origin>origin</a> =
of the
+  <code><a href=3D#about:blank>about:blank</a></cod=
e> <code><a href=3D#document>Document</a></code&g=
t; is a globally unique identifier assigned when the
+  new <a href=3D#browsing-context>browsing context</a> is cr=
eated and the <a href=3D#effective-script-origin>effective script o=
rigin</a> of the
+  <code><a href=3D#about:blank>about:blank</a></cod=
e> <code><a href=3D#document>Document</a></code&g=
t; is initially an <a href=3D#concept-origin-alias title=3Dconcept-ori=
gin-alias>alias</a> to its <a href=3D#origin>origin</a&=
gt;.</p>
+
+  </div>
+
+
+  <h4 id=3Dnested-browsing-contexts><span class=3Dsecno>6.1.=
1 </span>Nested browsing contexts</h4>
+
+  <p>Certain elements (for example, <code><a href=3D#the-=
iframe-element>iframe</a></code> elements) can instantiate=
 further <a href=3D#browsing-context title=3D"browsing context&qu=
ot;>browsing contexts</a>. These are called <dfn id=3Dnested-=
browsing-context title=3D"nested browsing
+  context">nested browsing contexts</dfn>. If a browsing c=
ontext <var title=3D"">P</var> has a
+  <code><a href=3D#document>Document</a></code> =
<var title=3D"">D</var> with an element <var tit=
le=3D"">E</var> that nests
+  another browsing context <var title=3D"">C</var>=
 inside it, then <var title=3D"">C</var> is said to=
 be
+  <dfn id=3Dbrowsing-context-nested-through title=3D"browsing co=
ntext nested through">nested through</dfn> <var title=3D=
"">D</var>, and <var title=3D"">E</=
var> is said to be the <dfn id=3Dbrowsing-context-container>brow=
sing context container</dfn> of <var title=3D"">C&l=
t;/var>.
+  If the <a href=3D#browsing-context-container>browsing context co=
ntainer</a> element <var title=3D"">E</var> i=
s <a href=3D#in-a-document title=3D"in a
+  Document">in</a> the <code><a href=3D#document&=
gt;Document</a></code> <var title=3D"">D</=
var>, then <var title=3D"">P</var> is
+  said to be the <dfn id=3Dparent-browsing-context>parent browsing=
 context</dfn> of <var title=3D"">C</var> and=
 <var title=3D"">C</var> is said to be a <dfn id=
=3Dchild-browsing-context>child browsing context</dfn> of <va=
r title=3D"">P</var>.
+  Otherwise, the <a href=3D#nested-browsing-context>nested browsin=
g context</a> <var title=3D"">C</var> has no =
<a href=3D#parent-browsing-context>parent
+  browsing context</a>.</p>
+
+  <p>A browsing context <var title=3D"">A</var&=
gt; is said to be an <dfn id=3Dancestor-browsing-context title=3D&quot=
;ancestor browsing
+  context">ancestor</dfn> of a browsing context <var ti=
tle=3D"">B</var> if there exists a browsing
+  context <var title=3D"">A'</var> that is a <a=
 href=3D#child-browsing-context>child browsing context</a> of &l=
t;var title=3D"">A</var> and that is itself an <a h=
ref=3D#ancestor-browsing-context title=3D"ancestor browsing context&=
quot;>ancestor</a> of
+  <var title=3D"">B</var>, or if the browsing cont=
ext <var title=3D"">A</var> is the
+  <a href=3D#parent-browsing-context>parent browsing context</a=
> of <var title=3D"">B</var>.</p>
+
+  <p>A browsing context that is not a <a href=3D#nested-browsin=
g-context>nested browsing context</a> has no <a href=3D#paren=
t-browsing-context>parent
+  browsing context</a>, and is the <dfn id=3Dtop-level-browsing=
-context>top-level browsing context</dfn> of all the browsing
+  contexts for which it is an <a href=3D#ancestor-browsing-context&gt=
;ancestor browsing context</a>.</p>
+
+  <p>The transitive closure of <a href=3D#parent-browsing-conte=
xt title=3D"parent browsing context">parent browsing context=
s</a>
+  for a <a href=3D#nested-browsing-context>nested browsing context=
</a> gives the list of <a href=3D#ancestor-browsing-context titl=
e=3D"ancestor browsing
+  context">ancestor browsing contexts</a>.</p>
+
+  <p>The <dfn id=3Dlist-of-the-descendant-browsing-contexts>=
list of the descendant browsing contexts</dfn> of a <code>&lt=
;a href=3D#document>Document</a></code> <var title=3D&q=
uot;">d</var> is the (ordered) list returned by the followi=
ng algorithm:</p>
+
+  <ol><li><p>Let <var title=3D"">list&=
lt;/var> be an empty list.</li>
+
+   <li>
+
+    <p>For each <a href=3D#child-browsing-context>child brow=
sing context</a> of <var title=3D"">d</var> t=
hat is <a href=3D#browsing-context-nested-through title=3D"browsi=
ng context nested through">nested through</a> an element th=
at is <a href=3D#in-a-document title=3D"in
+    a document">in the <code>Document</code></a&g=
t; <var title=3D"">d</var>, in the <a href=3D#tr=
ee-order>tree
+    order</a> of the elements nesting those <a href=3D#browsing=
-context title=3D"browsing context">browsing
+    contexts</a>, run these substeps:</p>
+
+    <ol><li><p>Append that <a href=3D#child-browsin=
g-context>child browsing context</a> to the list <var title=3D=
"">list</var>.</p>
+
+     <li><p>Append the <a href=3D#list-of-the-descendant-=
browsing-contexts>list of the descendant browsing contexts</a> o=
f the <a href=3D#active-document>active
+     document</a> of that <a href=3D#child-browsing-context>=
child browsing context</a> to the list <var title=3D""=
>list</var>.</li>
+
+    </ol></li>
+
+   <li><p>Return the constructed <var title=3D"&quot=
;>list</var>.</li>
+
+  </ol><p>A <code><a href=3D#document>Document&l=
t;/a></code> is said to be <dfn id=3Dfully-active>fully ac=
tive</dfn> when it is the <a href=3D#active-document>active
+  document</a> of its <a href=3D#browsing-context>browsing c=
ontext</a>, and either its browsing context is a
+  <a href=3D#top-level-browsing-context>top-level browsing context=
</a>, or it has a <a href=3D#parent-browsing-context>parent b=
rowsing context</a> and the
+  <code><a href=3D#document>Document</a></code> =
<a href=3D#browsing-context-nested-through title=3D"browsing cont=
ext nested through">through which</a> it is
+  <a href=3D#nested-browsing-context title=3D"nested browsing co=
ntext">nested</a> is itself <a href=3D#fully-active>f=
ully active</a>.</p>
+
+  <p>Because they are nested through an element, <a href=3D#chi=
ld-browsing-context title=3D"child browsing context">child b=
rowsing
+  contexts</a> are always tied to a specific <code><a hre=
f=3D#document>Document</a></code> in their <a href=3D#p=
arent-browsing-context>parent browsing
+  context</a>. User agents must not allow the user to interact wit=
h <a href=3D#child-browsing-context title=3D"child browsing
+  context">child browsing contexts</a> of elements that ar=
e in <code><a href=3D#document>Document</a></code&gt=
;s that are
+  not themselves <a href=3D#fully-active>fully active</a>.&l=
t;/p>
+
+  <p>A <a href=3D#nested-browsing-context>nested browsing co=
ntext</a> can have a <a href=3D#seamless-browsing-context-flag&g=
t;seamless browsing context flag</a>
+  set, if it is embedded through an <code><a href=3D#the-iframe=
-element>iframe</a></code> element with a <code title=3D=
attr-iframe-seamless><a href=3D#attr-iframe-seamless>seamless&lt=
;/a></code> attribute.</p>
+
+  <p>A <a href=3D#nested-browsing-context>nested browsing co=
ntext</a> can be put into a <dfn id=3Ddelaying-load-events-mode&=
gt;delaying <code title=3Devent-load>load</code> events mode&=
lt;/dfn>. This is used when it is <a href=3D#navigate title=3Dnavig=
ate>navigated</a>, to <a href=3D#delay-the-load-event>dela=
y the load event</a> of the <a href=3D#browsing-context-containe=
r>browsing
+  context container</a> <code><a href=3D#the-iframe-eleme=
nt>iframe</a></code> element before the new <code>&l=
t;a href=3D#document>Document</a></code> is
+  created.</p>
+
+<!--(There's no current way for this to happen, since removing an ifr=
ame from a document discards its browsing context)
+  <p class=3D"note">A <span>nested browsing contex=
t</span> can in some cases be taken out of its
+  <span>parent browsing context</span> (e.g. if an <code&=
gt;iframe</code> element is removed from its
+  <code>Document</code>). In such a situation, the <span&=
gt;nested browsing context</span> has no
+  <span>parent browsing context</span>, but it still has the=
 same <span>browsing context
+  container</span> and is still <span title=3D"browsing co=
ntext nested through">nested through</span>
+  that element's <code>Document</code>. Such a <span>n=
ested browsing context</span> is <em>not</em>
+  a <span>top-level browsing context</span>, and cannot cont=
ain <code>Document</code>s that are
+  <span>fully active</span>. Furthermore, if a <span>b=
rowsing context container</span> (such as an
+  <code>iframe</code>) is moved to another <code>Docum=
ent</code>, then the <span>parent browsing
+  context</span> of its <span>nested browsing context</sp=
an> will change.</p>
+-->
+
+  <p>The <dfn id=3Ddocument-family>document family</dfn&g=
t; of a <a href=3D#browsing-context>browsing context</a> cons=
ists of the union of all
+  the <code><a href=3D#document>Document</a></code&=
gt; objects in that <a href=3D#browsing-context>browsing context&lt=
;/a>'s <a href=3D#session-history>session
+  history</a> and the <a href=3D#document-family title=3D"=
document family">document families</a> of all those
+  <code><a href=3D#document>Document</a></code> =
objects. The <a href=3D#document-family>document family</a> o=
f a <code><a href=3D#document>Document</a></code>=
 object
+  consists of the union of all the <a href=3D#document-family title=3D=
"document family">document families</a> of the
+  <a href=3D#browsing-context title=3D"browsing context"&gt=
;browsing contexts</a> that are <a href=3D#browsing-context-nest=
ed-through title=3D"browsing context
+  nested through">nested through</a> the <code><a=
 href=3D#document>Document</a></code> object.</p>
+
+
+  <h5 id=3Dnavigating-nested-browsing-contexts-in-the-dom><span=
 class=3Dsecno>6.1.1.1 </span>Navigating nested browsing context=
s in the DOM</h5>
+
+  <dl class=3Ddomintro><dt><var title=3D"">w=
indow</var> . <code title=3Ddom-top><a href=3D#dom-top>=
top</a></code></dt>
+
+   <dd>
+
+    <p>Returns the <code><a href=3D#windowproxy>Window=
Proxy</a></code> for the <a href=3D#top-level-browsing-con=
text>top-level browsing context</a>.</p>
+
+   </dd>
+
+   <dt><var title=3D"">window</var> . <co=
de title=3Ddom-parent><a href=3D#dom-parent>parent</a><=
/code></dt>
+
+   <dd>
+
+    <p>Returns the <code><a href=3D#windowproxy>Window=
Proxy</a></code> for the <a href=3D#parent-browsing-contex=
t>parent browsing context</a>.</p>
+
+   </dd>
+
+   <dt><var title=3D"">window</var> . <co=
de title=3Ddom-frameElement><a href=3D#dom-frameelement>frameEle=
ment</a></code></dt>
+
+   <dd>
+
+    <p>Returns the <code><a href=3D#element>Element&lt=
;/a></code> for the <a href=3D#browsing-context-container>=
browsing context container</a>.</p>
+
+    <p>Returns null if there isn't one.</p>
+
+    <p>Throws a <code><a href=3D#securityerror>Securit=
yError</a></code> exception in cross-origin situations.</p=
>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-top title=3Ddom-top><code>top&l=
t;/code></dfn> IDL attribute on the <code><a href=3D#wi=
ndow>Window</a></code> object
+  of a <code><a href=3D#document>Document</a></code=
> in a <a href=3D#browsing-context>browsing context</a> &l=
t;var title=3D"">b</var> must return
+  the <code><a href=3D#windowproxy>WindowProxy</a><=
/code> object of its <a href=3D#top-level-browsing-context>top-l=
evel browsing context</a> (which would be
+  its own <code><a href=3D#windowproxy>WindowProxy</a>=
</code> object if it was a <a href=3D#top-level-browsing-context=
>top-level browsing context</a>
+  itself), if it has one, or its own <code><a href=3D#windowpro=
xy>WindowProxy</a></code> object otherwise (e.g. if it was=
 a
+  detached <a href=3D#nested-browsing-context>nested browsing cont=
ext</a>).</p>
+
+  <p>The <dfn id=3Ddom-parent title=3Ddom-parent><code&gt=
;parent</code></dfn> IDL attribute on the <code><a h=
ref=3D#window>Window</a></code>
+  object of a <code><a href=3D#document>Document</a>&l=
t;/code> in a <a href=3D#browsing-context>browsing context</a=
> <var title=3D"">b</var> must
+  return the <code><a href=3D#windowproxy>WindowProxy</a&=
gt;</code> object of the <a href=3D#parent-browsing-context>p=
arent browsing context</a>, if there
+  is one (i.e. if <var title=3D"">b</var> is a &lt=
;a href=3D#child-browsing-context>child browsing context</a>), o=
r the
+  <code><a href=3D#windowproxy>WindowProxy</a></cod=
e> object of the <a href=3D#browsing-context>browsing context&lt=
;/a> <var title=3D"">b</var> itself,
+  otherwise (i.e. if it is a <a href=3D#top-level-browsing-context&gt=
;top-level browsing context</a> or a detached <a href=3D#nested-=
browsing-context>nested
+  browsing context</a>).</p>
+
+  <p>The <dfn id=3Ddom-frameelement title=3Ddom-frameElement&gt=
;<code>frameElement</code></dfn> IDL attribute on the
+  <code><a href=3D#window>Window</a></code> obje=
ct of a <code><a href=3D#document>Document</a></code=
> <var title=3D"">d</var>, on getting, must run
+  the following algorithm:</p>
+
+  <ol><li><p>If <var title=3D"">d</=
var> is not a <code><a href=3D#document>Document</a>=
</code> in a <a href=3D#nested-browsing-context>nested browsi=
ng
+   context</a>, return null and abort these steps.</li>
+
+<!--CLEANUP-->
+   <li><p>If the <a href=3D#browsing-context-container&gt=
;browsing context container</a>'s <code><a href=3D#documen=
t>Document</a></code> does not have the
+   <a href=3D#same-origin title=3D"same origin">same<=
/a> <a href=3D#effective-script-origin>effective script origin&l=
t;/a> as the <a href=3D#effective-script-origin>effective script=
 origin</a> specified by the <a href=3D#entry-settings-object&gt=
;entry
+   settings object</a>, then throw a <code><a href=3D#sec=
urityerror>SecurityError</a></code> exception and abort th=
ese steps.</li>
+
+   <li><p>Return the <a href=3D#browsing-context-containe=
r>browsing context container</a> for <var title=3D"&quot=
;>b</var>.</li>
+
+  </ol></div>
+
+
+
+  <h4 id=3Dauxiliary-browsing-contexts><span class=3Dsecno>6=
.1.2 </span>Auxiliary browsing contexts</h4>
+
+  <p>It is possible to create new browsing contexts that are relat=
ed to a <a href=3D#top-level-browsing-context>top-level browsing
+  context</a> without being nested through an element. Such browsi=
ng contexts are called <dfn id=3Dauxiliary-browsing-context title=3D&q=
uot;auxiliary browsing context">auxiliary browsing contexts</d=
fn>. Auxiliary browsing contexts
+  are always <a href=3D#top-level-browsing-context title=3D"top-=
level browsing context">top-level browsing contexts</a>.&lt=
;/p>
+
+  <p>An <a href=3D#auxiliary-browsing-context>auxiliary brow=
sing context</a> has an <dfn id=3Dopener-browsing-context>ope=
ner browsing context</dfn>, which is
+  the <a href=3D#browsing-context>browsing context</a> from =
which the <a href=3D#auxiliary-browsing-context>auxiliary browsing =
context</a> was
+  created.</p>
+
+
+  <h5 id=3Dnavigating-auxiliary-browsing-contexts-in-the-dom><s=
pan class=3Dsecno>6.1.2.1 </span>Navigating auxiliary browsing c=
ontexts in the DOM</h5>
+
+  <p>The <dfn id=3Ddom-opener title=3Ddom-opener><code&gt=
;opener</code></dfn> IDL attribute on the <code><a h=
ref=3D#window>Window</a></code>
+  object, on getting, must return the <code><a href=3D#windowpr=
oxy>WindowProxy</a></code> object of the <a href=3D#bro=
wsing-context>browsing
+  context</a> from which the current <a href=3D#browsing-contex=
t>browsing context</a> was created (its <a href=3D#opener-bro=
wsing-context>opener
+  browsing context</a>), if there is one, if it is still available=
, and if the current
+  <a href=3D#browsing-context>browsing context</a> has not &=
lt;i><a href=3D#disowned-its-opener>disowned its opener</a&gt=
;</i>; otherwise, it must return null.
+  On setting, if the new value is null then the current <a href=3D#br=
owsing-context>browsing context</a> must <dfn id=3Ddisowned-i=
ts-opener title=3D"disowned its opener">disown its opener&lt=
;/dfn>; if the new value is anything else then the
+  user agent must
+
+    <!-- dark magic incantation begins -->
+    call the [[DefineOwnProperty]] internal method of the <code>&l=
t;a href=3D#window>Window</a></code> object, passing the
+    property name "<code title=3D"">opener</code=
>" as the property key, and the Property Descriptor {
+    [[Value]]: <var title=3D"">value</var>, [[Writ=
able]]: true, [[Enumerable]]: true,
+    [[Configurable]]: true } as the property descriptor,
+    <!-- dark magic incantation ends -->
+
+  where <var title=3D"">value</var> is the new val=
ue.</p>
+
+
+
+  <h4 id=3Dsecondary-browsing-contexts><span class=3Dsecno>6=
.1.3 </span>Secondary browsing contexts</h4>
+
+  <p>User agents may support <dfn id=3Dsecondary-browsing-conte=
xt title=3D"secondary browsing context">secondary browsing
+  contexts</dfn>, which are <a href=3D#browsing-context title=3D=
"browsing context">browsing contexts</a> that form par=
t
+  of the user agent's interface, apart from the main content area.</p=
>
+
+  <p class=3Dnote>The <code title=3Drel-sidebar><a href=3D=
#link-type-sidebar>sidebar</a></code> link type uses <a=
 href=3D#secondary-browsing-context title=3D"secondary
+  browsing context">secondary browsing contexts</a>.</p=
>
+
+
+<!--ADD-TOPIC:Security-->
+  <div class=3Dimpl>
+
+  <h4 id=3Dsecurity-nav><span class=3Dsecno>6.1.4 </span&=
gt;Security</h4>
+
+  <p id=3Dsecurity-1>A <a href=3D#browsing-context>browsing =
context</a> <var title=3D"">A</var> is <df=
n id=3Dfamiliar-with>familiar
+  with</dfn> a second <a href=3D#browsing-context>browsing c=
ontext</a> <var title=3D"">B</var> if one of =
the following
+  conditions is true:</p>
+
+  <ul><li>Either the <a href=3D#origin>origin</a&gt=
; of the <a href=3D#active-document>active document</a> of &l=
t;var title=3D"">A</var>
+   is the <a href=3D#same-origin title=3D"same origin">s=
ame</a> as the <a href=3D#origin>origin</a> of the <=
a href=3D#active-document>active
+   document</a> of <var title=3D"">B</var>, =
or</li>
+
+   <li>The browsing context <var title=3D"">A</=
var> is a <a href=3D#nested-browsing-context>nested browsing con=
text</a> with a
+   <a href=3D#top-level-browsing-context>top-level browsing contex=
t</a>, and its <a href=3D#top-level-browsing-context>top-leve=
l browsing context</a> is <var title=3D"">B</var=
>, or</li>
+
+   <li>The browsing context <var title=3D"">B</=
var> is an <a href=3D#auxiliary-browsing-context>auxiliary brows=
ing context</a> and
+   <var title=3D"">A</var> is <a href=3D#famili=
ar-with>familiar with</a> <var title=3D"">B</=
var>'s <a href=3D#opener-browsing-context>opener
+   browsing context</a>, or</li>
+
+   <li>The browsing context <var title=3D"">B</=
var> is not a <a href=3D#top-level-browsing-context>top-level br=
owsing context</a>,
+   but there exists an <a href=3D#ancestor-browsing-context>ancest=
or browsing context</a> of <var title=3D"">B</va=
r> whose
+   <a href=3D#active-document>active document</a> has the &l=
t;a href=3D#same-origin title=3D"same origin">same</a>=
 <a href=3D#origin>origin</a> as
+   the <a href=3D#active-document>active document</a> of &lt=
;var title=3D"">A</var> (possibly in fact being <va=
r title=3D"">A</var> itself).</li>
+
+  </ul><hr><p>A <a href=3D#browsing-context>brow=
sing context</a> <var title=3D"">A</var> is &=
lt;dfn id=3Dallowed-to-navigate>allowed to navigate</dfn> a
+  second <a href=3D#browsing-context>browsing context</a> &l=
t;var title=3D"">B</var> if the following algorithm te=
rminates
+  positively:</p>
+
+  <ol><li><p>If <var title=3D"">A</=
var> is not the same <a href=3D#browsing-context>browsing contex=
t</a> as <var title=3D"">B</var>, and <var=
 title=3D"">A</var> is not one of the <a href=3D#an=
cestor-browsing-context title=3D"ancestor browsing
+   context">ancestor browsing contexts</a> of <var titl=
e=3D"">B</var>, and <var title=3D"">B&=
lt;/var>
+   is not a <a href=3D#top-level-browsing-context>top-level browsi=
ng context</a>, and <var title=3D"">A</var>'s=
 <a href=3D#active-document>active
+   document</a>'s <a href=3D#active-sandboxing-flag-set>acti=
ve sandboxing flag set</a> has its <a href=3D#sandboxed-navigati=
on-browsing-context-flag>sandboxed navigation
+   browsing context flag</a> set, then abort these steps negativel=
y.</li>
+
+   <li><p>Otherwise, if <var title=3D"">B&lt=
;/var> is a <a href=3D#top-level-browsing-context>top-level brow=
sing context</a>, and is
+   one of the <a href=3D#ancestor-browsing-context title=3D"ance=
stor browsing context">ancestor browsing contexts</a> of &l=
t;var title=3D"">A</var>, and <var title=3D"&q=
uot;>A</var>'s <code><a href=3D#document>Document&lt=
;/a></code>'s <a href=3D#active-sandboxing-flag-set>active=
 sandboxing
+   flag set</a> has its <a href=3D#sandboxed-top-level-navigati=
on-browsing-context-flag>sandboxed top-level navigation browsing conte=
xt flag</a> set,
+   then abort these steps negatively.</li>
+
+   <li><p>Otherwise, if <var title=3D"">B&lt=
;/var> is a <a href=3D#top-level-browsing-context>top-level brow=
sing context</a>, and is
+   not one of the <a href=3D#ancestor-browsing-context title=3D"=
ancestor browsing context">ancestor browsing contexts</a> o=
f <var title=3D"">A</var>, and <var title=3D&quo=
t;">A</var>'s <code><a href=3D#document>Documen=
t</a></code>'s <a href=3D#active-sandboxing-flag-set>ac=
tive sandboxing
+   flag set</a> has its <a href=3D#sandboxed-navigation-browsin=
g-context-flag>sandboxed navigation browsing context flag</a> se=
t, and <var title=3D"">A</var> is not the <a hre=
f=3D#one-permitted-sandboxed-navigator>one permitted sandboxed navigat=
or</a> of <var title=3D"">B</var>, then abort=
 these steps negatively.</li> <!-- we do not check the
+   /sandboxed auxiliary navigation browsing context flag/ here, that's o=
nly for actually opening
+   the new top-level browsing context. -->
+
+   <li><p>Otherwise, terminate positively!</li>
+
+  </ol><hr><p>An element has a <dfn id=3Dbrowsing-c=
ontext-scope-origin>browsing context scope origin</dfn> if its &=
lt;code><a href=3D#document>Document</a></code>'s
+  <a href=3D#browsing-context>browsing context</a> is a <=
a href=3D#top-level-browsing-context>top-level browsing context</a&=
gt; or if all of its
+  <code><a href=3D#document>Document</a></code>'=
s <a href=3D#ancestor-browsing-context title=3D"ancestor browsing=
 context">ancestor browsing contexts</a>
+  all have <a href=3D#active-document title=3D"active document&q=
uot;>active documents</a> whose <a href=3D#origin>origin&l=
t;/a> are the
+  <a href=3D#same-origin>same origin</a> as the element's &l=
t;code><a href=3D#document>Document</a></code>'s &lt=
;a href=3D#origin>origin</a>. If an
+  element has a <a href=3D#browsing-context-scope-origin>browsing =
context scope origin</a>, then its value is the
+  <a href=3D#origin>origin</a> of the element's <code>=
<a href=3D#document>Document</a></code>.</p>
+
+  </div>
+<!--REMOVE-TOPIC:Security-->
+
+
+  <div class=3Dimpl>
+
+  <h4 id=3Dgroupings-of-browsing-contexts><span class=3Dsecno&g=
t;6.1.5 </span>Groupings of browsing contexts</h4>
+
+  <p>Each <a href=3D#browsing-context>browsing context</a=
> is defined as having a list of one or more <dfn id=3Ddirectly-rea=
chable-browsing-contexts>directly
+  reachable browsing contexts</dfn>. These are:</p>
+
+  <ul><li>The <a href=3D#browsing-context>browsing con=
text</a> itself.</li>
+
+   <li>All the <a href=3D#browsing-context>browsing context&=
lt;/a>'s <a href=3D#child-browsing-context title=3D"child brow=
sing context">child browsing
+   contexts</a>.</li>
+
+   <li>The <a href=3D#browsing-context>browsing context</=
a>'s <a href=3D#parent-browsing-context>parent browsing context&=
lt;/a>.</li>
+
+   <li>All the <a href=3D#browsing-context title=3D"browsi=
ng context">browsing contexts</a> that have the <a href=3D=
#browsing-context>browsing
+   context</a> as their <a href=3D#opener-browsing-context>o=
pener browsing context</a>.</li>
+
+   <li>The <a href=3D#browsing-context>browsing context</=
a>'s <a href=3D#opener-browsing-context>opener browsing context&=
lt;/a>.</li>
+
+  </ul><p>The transitive closure of all the <a href=3D#br=
owsing-context title=3D"browsing context">browsing contexts&=
lt;/a> that
+  are <a href=3D#directly-reachable-browsing-contexts>directly rea=
chable browsing contexts</a> forms a <dfn id=3Dunit-of-related-b=
rowsing-contexts>unit of related browsing
+  contexts</dfn>.</p>
+
+  <p>Each <a href=3D#unit-of-related-browsing-contexts>unit =
of related browsing contexts</a> is then further divided into the s=
mallest
+  number of groups such that every member of each group has an <a hre=
f=3D#active-document>active document</a> with an
+  <a href=3D#effective-script-origin>effective script origin</a=
> that, through appropriate manipulation of the <code title=3Ddom-d=
ocument-domain><a href=3D#dom-document-domain>document.domain&lt=
;/a></code> attribute, could be made to be the same as
+  other members of the group, but could not be made the same as members =
of any other group. Each
+  such group is a <dfn id=3Dunit-of-related-similar-origin-browsing-c=
ontexts>unit of related similar-origin browsing contexts</dfn>.&=
lt;/p>
+
+  <p class=3Dnote>There is also at most one <a href=3D#event-lo=
op>event loop</a> per <a href=3D#unit-of-related-similar-orig=
in-browsing-contexts>unit of related
+  similar-origin browsing contexts</a> (though several <a href=3D=
#unit-of-related-similar-origin-browsing-contexts title=3D"unit of r=
elated
+  similar-origin browsing contexts">units of related similar-ori=
gin browsing contexts</a> can
+  have a shared <a href=3D#event-loop>event loop</a>).</p=
>
+
+  </div>
+
+
+
+  <h4 id=3Dbrowsing-context-names><span class=3Dsecno>6.1.6 =
</span>Browsing context names</h4>
+
+  <p>Browsing contexts can have a <dfn id=3Dbrowsing-context-na=
me>browsing context name</dfn>. By default, a browsing context
+  has no name (its name is not set).</p>
+
+  <p>A <dfn id=3Dvalid-browsing-context-name>valid browsing =
context name</dfn> is any string with at least one character that d=
oes
+  not start with a U+005F LOW LINE character. (Names starting with an un=
derscore are reserved for
+  special keywords.)</p>
+
+  <p>A <dfn id=3Dvalid-browsing-context-name-or-keyword>vali=
d browsing context name or keyword</dfn> is any string that is eith=
er a <a href=3D#valid-browsing-context-name>valid
+  browsing context name</a> or that is an <a href=3D#ascii-case=
-insensitive>ASCII case-insensitive</a> match for one of:
+  <code title=3D"">_blank</code>, <code title=3D=
"">_self</code>, <code title=3D"">_par=
ent</code>, or <code title=3D"">_top</code>.&=
lt;/p>
+
+  <p>These values have different meanings based on whether the pag=
e is sandboxed or not, as
+  summarized in the following (non-normative) table. In this table, &quo=
t;current" means the
+  <a href=3D#browsing-context>browsing context</a> that the =
link or script is in, "parent" means the <a href=3D#parent-b=
rowsing-context>parent
+  browsing context</a> of the one the link or script is in, "=
master" means the nearest
+  <a href=3D#ancestor-browsing-context>ancestor browsing context&l=
t;/a> of the one the link or script is in that is not itself in a
+  <a href=3D#attr-iframe-seamless title=3Dattr-iframe-seamless>sea=
mless iframe</a>, "top" means the <a href=3D#top-level=
-browsing-context>top-level
+  browsing context</a> of the one the link or script is in, "=
new" means a new <a href=3D#top-level-browsing-context>top-lev=
el
+  browsing context</a> or <a href=3D#auxiliary-browsing-context=
>auxiliary browsing context</a> is to be created, subject to
+  various user preferences and user agent policies, "none" mea=
ns that nothing will happen, and
+  "maybe new" means the same as "new" if the "&=
lt;code title=3Dattr-iframe-sandbox-allow-popups><a href=3D#attr-if=
rame-sandbox-allow-popups>allow-popups</a></code>" ke=
yword is also specified on the
+  <code title=3Dattr-iframe-sandbox><a href=3D#attr-iframe-sand=
box>sandbox</a></code> attribute (or if the user overrode =
the
+  sandboxing), and the same as "none" otherwise.</p>
+
+  <table><thead><tr><th rowspan=3D2>Keyword
+     <th rowspan=3D2>Ordinary effect
+     <th colspan=3D5>Effect in an <code><a href=3D#the-if=
rame-element>iframe</a></code> with...
+    <tr><!-- nothing --><th><code title=3D"&qu=
ot;>seamless=3D""</code>
+     <th><code title=3D"">sandbox=3D""&l=
t;/code>
+     <th><code title=3D"">sandbox=3D"" s=
eamless=3D""</code>
+     <th><code title=3D"">sandbox=3D"allow-to=
p-navigation"</code>
+     <th><code title=3D"">sandbox=3D"allow-to=
p-navigation" seamless=3D""</code>
+
+   <tbody><tr><td>none specified, for links and form s=
ubmissions <!-- same as empty string -->
+     <td>current
+     <td>master
+     <td>current
+     <td>master
+     <td>current
+     <td>master
+
+    <tr><td>empty string
+     <td>current
+     <td>master
+     <td>current
+     <td>master
+     <td>current
+     <td>master
+
+    <tr><td><code title=3D"">_blank</code=
>
+     <td>new
+     <td>new
+     <td>maybe new
+     <td>maybe new
+     <td>maybe new
+     <td>maybe new
+
+    <tr><td><code title=3D"">_self</code&=
gt;
+     <td>current
+     <td>current
+     <td>current
+     <td>current
+     <td>current
+     <td>current
+
+    <tr><td><code title=3D"">_parent</cod=
e> if there isn't a parent
+     <td>current
+     <td>current
+     <td>current
+     <td>current
+     <td>current
+     <td>current
+
+    <tr><td><code title=3D"">_parent</cod=
e> if parent is also top
+     <td>parent/top
+     <td>parent/top
+     <td>none
+     <td>none
+     <td>parent/top
+     <td>parent/top
+
+    <tr><td><code title=3D"">_parent</cod=
e> if there is one and it's not top
+     <td>parent
+     <td>parent
+     <td>none
+     <td>none
+     <td>none
+     <td>none
+
+    <tr><td><code title=3D"">_top</code&g=
t; if top is current
+     <td>current
+     <td>current
+     <td>current
+     <td>current
+     <td>current
+     <td>current
+
+    <tr><td><code title=3D"">_top</code&g=
t; if top is not current
+     <td>top
+     <td>top
+     <td>none
+     <td>none
+     <td>top
+     <td>top
+
+    <tr><td>name that doesn't exist
+     <td>new
+     <td>new
+     <td>maybe new
+     <td>maybe new
+     <td>maybe new
+     <td>maybe new
+
+    <tr><td>name that exists and is a descendant
+     <td>specified descendant
+     <td>specified descendant
+     <td>specified descendant
+     <td>specified descendant
+     <td>specified descendant
+     <td>specified descendant
+
+    <tr><td>name that exists and is current
+     <td>current
+     <td>current
+     <td>current
+     <td>current
+     <td>current
+     <td>current
+
+    <tr><td>name that exists and is an ancestor that is top
+     <td>specified ancestor
+     <td>specified ancestor
+     <td>none
+     <td>none
+     <td>specified ancestor/top
+     <td>specified ancestor/top
+
+    <tr><td>name that exists and is an ancestor that is not =
top
+     <td>specified ancestor
+     <td>specified ancestor
+     <td>none
+     <td>none
+     <td>none
+     <td>none
+
+    <tr><td>other name that exists with common top
+     <td>specified
+     <td>specified
+     <td>none
+     <td>none
+     <td>none
+     <td>none
+
+    <tr><td>name that exists with different top, if <a hr=
ef=3D#familiar-with title=3D"familiar with">familiar</a&g=
t; and <a href=3D#one-permitted-sandboxed-navigator>one permitted s=
andboxed navigator</a>
+     <td>specified
+     <td>specified
+     <td>specified
+     <td>specified
+     <td>specified
+     <td>specified
+
+    <tr><td>name that exists with different top, if <a hr=
ef=3D#familiar-with title=3D"familiar with">familiar</a&g=
t; but not <a href=3D#one-permitted-sandboxed-navigator>one permitt=
ed sandboxed navigator</a>
+     <td>specified
+     <td>specified
+     <td>none
+     <td>none
+     <td>none
+     <td>none
+
+    <tr><td>name that exists with different top, not <a h=
ref=3D#familiar-with title=3D"familiar with">familiar</a&=
gt;
+     <td>new
+     <td>new
+     <td>maybe new
+     <td>maybe new
+     <td>maybe new
+     <td>maybe new
+
+  </table><p class=3Dtablenote><small>Most of the rest=
rictions on sandboxed browsing contexts are applied by
+  other algorithms, e.g. the <a href=3D#navigate title=3Dnavigate>=
navigation</a> algorithm, not <a href=3D#the-rules-for-choosing-=
a-browsing-context-given-a-browsing-context-name>the rules
+  for choosing a browsing context given a browsing context name</a&gt=
; given below.</small></p>
+
+  <div class=3Dimpl>
+
+  <hr><p>An algorithm is <dfn id=3Dallowed-to-show-a-popu=
p>allowed to show a popup</dfn> if any of the following conditio=
ns is
+  true:</p>
+
+  <ul><li><p>The <a href=3D#concept-task title=3Dco=
ncept-task>task</a> in which the algorithm is running is current=
ly
+   processing an <a href=3D#activation-behavior>activation behavio=
r</a> whose <code title=3Devent-click><a href=3D#event-cli=
ck>click</a></code> event
+   was <a href=3D#concept-events-trusted title=3Dconcept-events-trust=
ed>trusted</a>.</li>
+
+   <li>
+
+    <p>The <a href=3D#concept-task title=3Dconcept-task>task=
</a> in which the algorithm is running is currently
+    running the event listener for a <a href=3D#concept-events-truste=
d title=3Dconcept-events-trusted>trusted</a> event whose
+    type is in the following list:</p>
+
+    <ul class=3Dbrief><li><code title=3Devent-change>c=
hange</code></li>
+     <li><code title=3Devent-click><a href=3D#event-click=
>click</a></code></li>
+     <li><code title=3Devent-dblclick>dblclick</code>&=
lt;/li>
+     <li><code title=3Devent-mouseup>mouseup</code>&lt=
;/li>
+     <li><code title=3Devent-reset>reset</code></li=
>
+     <li><code title=3Devent-submit>submit</code></=
li>
+    </ul></li>
+
+   <li>
+
+    <p>The <a href=3D#concept-task title=3Dconcept-task>task=
</a> in which the algorithm is running was <a href=3D#queue-a-ta=
sk title=3D"queue a task">queued</a> by an algorithm t=
hat was <a href=3D#allowed-to-show-a-popup>allowed to show a popup&=
lt;/a>,
+    and the chain of such algorithms started within a user-agent defined=
 timeframe.</p>
+
+    <p class=3Dexample>For example, if a user clicked a button, it=
 might be acceptable for a popup
+    to result from that after 4 seconds, but it would likely not be acce=
ptable for a popup to result
+    from that after 4 hours.</p>
+
+   </li>
+
+  </ul><hr><p><dfn id=3Dthe-rules-for-choosing-a-br=
owsing-context-given-a-browsing-context-name>The rules for choosing a =
browsing context given a browsing context name</dfn> are as
+  follows. The rules assume that they are being applied in the context o=
f a <a href=3D#browsing-context>browsing
+  context</a>, as part of the execution of a <a href=3D#concept=
-task title=3Dconcept-task>task</a>.</p>
+
+  <ol><li>
+
+    <p>If the given browsing context name is the empty string or &=
lt;code title=3D"">_self</code>, then
+    the chosen browsing context must be the current one.</p>
+
+    <p>If the given browsing context name is <code title=3D&quo=
t;">_self</code>, then this is an
+    <a href=3D#explicit-self-navigation-override>explicit self-nav=
igation override</a>, which overrides the behavior of the
+    <a href=3D#seamless-browsing-context-flag>seamless browsing co=
ntext flag</a> set by the <code title=3Dattr-iframe-seamless>=
<a href=3D#attr-iframe-seamless>seamless</a></code> att=
ribute on <code><a href=3D#the-iframe-element>iframe</a&gt=
;</code> elements.</p>
+
+   </li>
+
+   <li><p>If the given browsing context name is <code tit=
le=3D"">_parent</code>, then the chosen
+   browsing context must be the <a href=3D#parent-browsing-context&gt=
;<em>parent</em> browsing context</a> of the current on=
e,
+   unless there isn't one, in which case the chosen browsing context mus=
t be the current browsing
+   context.</li>
+
+   <li><p>If the given browsing context name is <code tit=
le=3D"">_top</code>, then the chosen browsing
+   context must be the <a href=3D#top-level-browsing-context>top-l=
evel browsing context</a> of the current one, if there is one,
+   or else the current browsing context.</li>
+
+   <li>
+
+    <p>If the given browsing context name is not <code title=3D=
"">_blank</code> and there exists a
+    browsing context whose <a href=3D#browsing-context-name title=3D&=
quot;browsing context name">name</a> is the same as the giv=
en
+    browsing context name, and the current browsing context is <a hre=
f=3D#familiar-with>familiar with</a> that
+    browsing context, and the user agent determines that the two browsin=
g contexts are related
+    enough that it is ok if they reach each other, then that browsing co=
ntext must be the chosen
+    one. If there are multiple matching browsing contexts, the user agen=
t should select one in some
+    arbitrary consistent manner, such as the most recently opened, most =
recently focused, or more
+    closely related.</p>
+
+    <p>If the browsing context is chosen by this step to be the cu=
rrent browsing context, then this
+    is also an <a href=3D#explicit-self-navigation-override>explic=
it self-navigation override</a>.</p>
+
+   </li>
+
+   <li>
+
+    <p>Otherwise, a new browsing context is being requested, and w=
hat happens depends on the user
+    agent's configuration and abilities — it is determined by =
the rules given for the first
+    applicable option from the following list:</p>
+
+    <dl class=3Dswitch><dt id=3Dpopup-blocker>If the algorit=
hm is not <a href=3D#allowed-to-show-a-popup>allowed to show a popu=
p</a> and the
+     user agent has been configured to not show popups (i.e. the user ag=
ent has a "popup blocker"
+     enabled)</dt>
+
+     <dd>
+
+      <p>There is no chosen browsing context. The user agent may i=
nform the user that a popup has
+      been blocked.</p>
+
+     </dd>
+
+     <dt id=3DsandboxWindowOpen>If the current browsing context's =
<a href=3D#active-document>active document</a>'s
+     <a href=3D#active-sandboxing-flag-set>active sandboxing flag =
set</a> has the <a href=3D#sandboxed-auxiliary-navigation-browsi=
ng-context-flag>sandboxed auxiliary navigation browsing
+     context flag</a> set.</dt>
+
+     <dd>
+
+      <p>Typically, there is no chosen browsing context.</p>
+
+      <p>The user agent may offer to create a new <a href=3D#to=
p-level-browsing-context>top-level browsing context</a> or reuse
+      an existing <a href=3D#top-level-browsing-context>top-level =
browsing context</a>. If the user picks one of those options,
+      then the designated browsing context must be the chosen one (the b=
rowsing context's name isn't
+      set to the given browsing context name). The default behaviour (if=
 the user agent doesn't
+      offer the option to the user, or if the user declines to allow a b=
rowsing context to be used)
+      must be that there must not be a chosen browsing context.</p&gt=
;
+
+      <p class=3Dwarning>If this case occurs, it means that an aut=
hor has explicitly sandboxed the
+      document that is trying to open a link.</p>
+
+     </dd>
+
+
+     <dt id=3Dnoopener>If the user agent has been configured such =
that in this instance it will
+     create a new browsing context, and the browsing context is being re=
quested as part of <a href=3D#following-hyperlinks title=3D"follo=
wing hyperlinks">following a hyperlink</a> whose <a href=
=3D#linkTypes>link
+     types</a> include the <code title=3Drel-noreferrer><=
a href=3D#link-type-noreferrer>noreferrer</a></code> keywo=
rd</dt>
+
+     <dd><p>A new <a href=3D#top-level-browsing-context&g=
t;top-level browsing context</a> must be created. If the given brow=
sing
+     context name is not <code title=3D"">_blank</cod=
e>, then the new top-level browsing context's
+     name must be the given browsing context name (otherwise, it has no =
name). The chosen browsing
+     context must be this new browsing context. The creation of such a &=
lt;a href=3D#browsing-context>browsing context</a>
+     is <dfn id=3Da-new-start-for-session-storage>a new start for =
session storage</dfn>.</p>
+
+     <p class=3Dnote>If it is immediately <a href=3D#navigate t=
itle=3Dnavigate>navigated</a>, then the
+     navigation will be done with <a href=3D#replacement-enabled>r=
eplacement enabled</a>.</dd>
+
+
+     <dt>If the user agent has been configured such that in this i=
nstance it will create a new
+     browsing context, and the <code title=3Drel-noreferrer><a =
href=3D#link-type-noreferrer>noreferrer</a></code> keyword=
 doesn't
+     apply</dt>
+
+     <dd><p>A new <a href=3D#auxiliary-browsing-context&g=
t;auxiliary browsing context</a> must be created, with the <a hr=
ef=3D#opener-browsing-context>opener
+     browsing context</a> being the current one. If the given brow=
sing context name is not <code title=3D"">_blank</code=
>, then the new auxiliary browsing context's name must be the given
+     browsing context name (otherwise, it has no name). The chosen brows=
ing context must be this new
+     browsing context.</p>
+
+     <p class=3Dnote>If it is immediately <a href=3D#navigate t=
itle=3Dnavigate>navigated</a>, then the
+     navigation will be done with <a href=3D#replacement-enabled>r=
eplacement enabled</a>.</dd>
+
+
+     <dt>If the user agent has been configured such that in this i=
nstance it will reuse the current
+     browsing context</dt>
+
+     <dd><p>The chosen browsing context is the current brows=
ing context.</dd>
+
+
+     <dt>If the user agent has been configured such that in this i=
nstance it will not find a
+     browsing context</dt>
+
+     <dd><p>There must not be a chosen browsing context.<=
/dd>
+
+    </dl><p>User agent implementors are encouraged to provid=
e a way for users to configure the user agent
+    to always reuse the current browsing context.</p>
+
+    <p>If the current browsing context's <a href=3D#active-docu=
ment>active document</a>'s <a href=3D#active-sandboxing-flag-=
set>active sandboxing flag
+    set</a> has the <a href=3D#sandboxed-navigation-browsing-co=
ntext-flag>sandboxed navigation browsing context flag</a> set an=
d the chosen
+    browsing context picked above, if any, is a new browsing context (wh=
ether top-level or
+    auxiliary), then all the flags that are set in the current browsing =
context's <a href=3D#active-document>active
+    document</a>'s <a href=3D#active-sandboxing-flag-set>act=
ive sandboxing flag set</a> when the new browsing context is
+    created must be set in the new browsing context's <a href=3D#popu=
p-sandboxing-flag-set>popup sandboxing flag set</a>, and
+    the current browsing context must be set as the new browsing context=
's <a href=3D#one-permitted-sandboxed-navigator>one permitted
+    sandboxed navigator</a>.</p>
+
+   </li>
+
+  </ol></div>
+
+
+
+<!--TOPIC:DOM APIs-->
+  <h3 id=3Dthe-window-object><span class=3Dsecno>6.2 </sp=
an>The <code><a href=3D#window>Window</a></code&g=
t; object</h3>
+
+  <pre class=3Didl>[Global]
+/*sealed*/ interface <dfn id=3Dwindow>Window</dfn> : <a h=
ref=3D#eventtarget>EventTarget</a> {
+  // the current browsing context
+  [Unforgeable] readonly attribute <a href=3D#windowproxy>WindowPr=
oxy</a> <a href=3D#dom-window title=3Ddom-window>window</a=
>;
+  [Replaceable] readonly attribute <a href=3D#windowproxy>WindowPr=
oxy</a> <a href=3D#dom-self title=3Ddom-self>self</a>;
+  [Unforgeable] readonly attribute <a href=3D#document>Document&lt=
;/a> <a href=3D#dom-document-0 title=3Ddom-document>document<=
/a>;
+           attribute DOMString <a href=3D#dom-name title=3Ddom-name&g=
t;name</a>; <!-- not [Replaceable] per WebKit and IE8 -->
+  [PutForwards=3D<a href=3D#dom-url-href title=3Ddom-url-href>href=
</a>, Unforgeable] readonly attribute <a href=3D#location>Loc=
ation</a> <a href=3D#dom-location title=3Ddom-location>locati=
on</a>;
+  readonly attribute <a href=3D#history-0>History</a> <a =
href=3D#dom-history title=3Ddom-history>history</a>;
+  [Replaceable] readonly attribute <a href=3D#barprop>BarProp</=
a> <a href=3D#dom-window-locationbar title=3Ddom-window-locationbar=
>locationbar</a>;
+  [Replaceable] readonly attribute <a href=3D#barprop>BarProp</=
a> <a href=3D#dom-window-menubar title=3Ddom-window-menubar>menu=
bar</a>;
+  [Replaceable] readonly attribute <a href=3D#barprop>BarProp</=
a> <a href=3D#dom-window-personalbar title=3Ddom-window-personalbar=
>personalbar</a>;
+  [Replaceable] readonly attribute <a href=3D#barprop>BarProp</=
a> <a href=3D#dom-window-scrollbars title=3Ddom-window-scrollbars&g=
t;scrollbars</a>;
+  [Replaceable] readonly attribute <a href=3D#barprop>BarProp</=
a> <a href=3D#dom-window-statusbar title=3Ddom-window-statusbar>=
statusbar</a>;
+  [Replaceable] readonly attribute <a href=3D#barprop>BarProp</=
a> <a href=3D#dom-window-toolbar title=3Ddom-window-toolbar>tool=
bar</a>;<!--
+  [Replaceable] readonly attribute <span>BarProp</span> <=
span title=3D"dom-window-directories">directories</span&g=
t;; // legacy (Gecko-only) -->
+           attribute DOMString <a href=3D#dom-window-status title=3Dd=
om-window-status>status</a>;
+  void <a href=3D#dom-window-close title=3Ddom-window-close>close&=
lt;/a>();
+  readonly attribute boolean <a href=3D#dom-window-closed title=3Ddom=
-window-closed>closed</a>;
+  void <a href=3D#dom-window-stop title=3Ddom-window-stop>stop<=
/a>();
+  void <a href=3D#dom-window-focus title=3Ddom-window-focus>focus&=
lt;/a>();
+  void <a href=3D#dom-window-blur title=3Ddom-window-blur>blur<=
/a>();
+
+  // other browsing contexts
+  [Replaceable] readonly attribute <a href=3D#windowproxy>WindowPr=
oxy</a> <a href=3D#dom-frames title=3Ddom-frames>frames</a=
>;
+  [Replaceable] readonly attribute unsigned long <a href=3D#dom-lengt=
h title=3Ddom-length>length</a>;
+  [Unforgeable] readonly attribute <a href=3D#windowproxy>WindowPr=
oxy</a> <a href=3D#dom-top title=3Ddom-top>top</a>;
+           attribute <a href=3D#windowproxy>WindowProxy</a>?=
 <a href=3D#dom-opener title=3Ddom-opener>opener</a>;
+  readonly attribute <a href=3D#windowproxy>WindowProxy</a> =
<a href=3D#dom-parent title=3Ddom-parent>parent</a>;
+  readonly attribute <a href=3D#element>Element</a>? <a h=
ref=3D#dom-frameelement title=3Ddom-frameElement>frameElement</a&gt=
;;
+  <a href=3D#windowproxy>WindowProxy</a> <a href=3D#dom-o=
pen title=3Ddom-open>open</a>(optional DOMString url =3D "a=
bout:blank", optional DOMString target =3D "_blank", optio=
nal DOMString features =3D "", optional boolean replace =3D fal=
se);
+  <a href=3D#dom-window-item title=3Ddom-window-item>getter</a&=
gt; <a href=3D#windowproxy>WindowProxy</a> (unsigned long ind=
ex);
+  <a href=3D#dom-window-nameditem title=3Ddom-window-namedItem>get=
ter</a> object (DOMString name);
+
+  // the user agent
+  readonly attribute <a href=3D#navigator>Navigator</a> <=
a href=3D#dom-navigator title=3Ddom-navigator>navigator</a>; &lt=
;!-- IE also has window.clientInformation =3D=3D=3D window.navigator --&g=
t;
+  readonly attribute <a href=3D#external>External</a> <a =
href=3D#dom-external title=3Ddom-external>external</a>;
+  readonly attribute <a href=3D#applicationcache>ApplicationCache&=
lt;/a> <a href=3D#dom-applicationcache title=3Ddom-applicationCache=
>applicationCache</a>;
+
+  // user prompts
+  void <a href=3D#dom-alert title=3Ddom-alert>alert</a>(opti=
onal DOMString message =3D "");
+  boolean <a href=3D#dom-confirm title=3Ddom-confirm>confirm</a=
>(optional DOMString message =3D "");
+  DOMString? <a href=3D#dom-prompt title=3Ddom-prompt>prompt</a=
>(optional DOMString message =3D "", optional DOMString defa=
ult =3D "");
+  void <a href=3D#dom-print title=3Ddom-print>print</a>();
+  any <a href=3D#dom-showmodaldialog title=3Ddom-showModalDialog>s=
howModalDialog</a>(DOMString url, optional any argument<!--, opt=
ional DOMString features-->);
+
+  void <a href=3D#dom-window-postmessage title=3Ddom-window-postMessa=
ge>postMessage</a>(any message, DOMString targetOrigin, optional=
 sequence<<a href=3D#transferable>Transferable</a>&amp=
;gt; transfer);
+
+  // <a href=3D"#Window-partial">also has obsolete membe=
rs</a>
+};
+<a href=3D#window>Window</a> implements <a href=3D#global=
eventhandlers>GlobalEventHandlers</a>;
+<a href=3D#window>Window</a> implements <a href=3D#window=
eventhandlers>WindowEventHandlers</a>;</pre>
+
+<!-- for more features to add here, look here:
+ http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/obj_w=
indow.asp
+ http://www.mozilla.org/docs/dom/domref/dom_window_ref.html
+ http://lxr.mozilla.org/mozilla/source/dom/public/idl/base/nsIDOMWindow.=
idl - scrollBy, etc
+ http://lxr.mozilla.org/mozilla/source/dom/public/idl/base/nsIDOMWindowI=
nternal.idl - DOM level 0
+-->
+
+  <dl class=3Ddomintro><dt><var title=3D"">w=
indow</var> . <code title=3Ddom-window><a href=3D#dom-wind=
ow>window</a></code></dt>
+   <dt><var title=3D"">window</var> . <co=
de title=3Ddom-frames><a href=3D#dom-frames>frames</a><=
/code></dt>
+   <dt><var title=3D"">window</var> . <co=
de title=3Ddom-self><a href=3D#dom-self>self</a></code&=
gt;</dt>
+
+   <dd>
+
+    <p>These attributes all return <var title=3D""&gt=
;window</var>.</p>
+
+   </dd>
+
+
+   <dt><var title=3D"">window</var> . <co=
de title=3Ddom-document><a href=3D#dom-document-0>document</a=
></code></dt>
+
+   <dd>
+
+    <p>Returns the <code><a href=3D#document>Document&=
lt;/a></code> associated with <var title=3D"">wi=
ndow</var>.</p>
+
+   </dd>
+
+
+   <dt><var title=3D"">document</var> . <=
code title=3Ddom-document-defaultView><a href=3D#dom-document-defau=
ltview>defaultView</a></code></dt>
+
+   <dd>
+
+    <p>Returns the <code><a href=3D#window>Window</=
a></code> object of the <a href=3D#active-document>active =
document</a>.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>The <code><a href=3D#window>Window</a></=
code> interface must only be <a href=3D#exposed-to-javascript>ex=
posed to JavaScript</a> if the
+  <a href=3D#javascript-global-environment>JavaScript global envir=
onment</a> is a <a href=3D#document-environment>document envi=
ronment</a>.</p>
+
+  <p>The <dfn id=3Ddom-window title=3Ddom-window><code&gt=
;window</code></dfn>, <dfn id=3Ddom-frames title=3Ddom-fra=
mes><code>frames</code></dfn>, and <dfn id=3Ddom-=
self title=3Ddom-self><code>self</code></dfn>
+  IDL attributes must all return the <code><a href=3D#window&gt=
;Window</a></code> object's <a href=3D#browsing-context&gt=
;browsing context</a>'s
+  <code><a href=3D#windowproxy>WindowProxy</a></cod=
e> object.</p>
+
+  <p>The <dfn id=3Ddom-document-0 title=3Ddom-document><c=
ode>document</code></dfn> IDL attribute must return
+  <a href=3D#concept-document-window title=3Dconcept-document-window&=
gt;the <code>Window</code> object's newest <code>Docume=
nt</code> object</a>.</p>
+
+  <p>The <dfn id=3Ddom-document-defaultview title=3Ddom-documen=
t-defaultView><code>defaultView</code></dfn> IDL att=
ribute of the
+  <code><a href=3D#document>Document</a></code> =
interface must return the <code><a href=3D#document>Document&=
lt;/a></code>'s <a href=3D#browsing-context>browsing
+  context</a>'s <code><a href=3D#windowproxy>WindowPro=
xy</a></code> object, if there is one, or null otherwise.<=
/p>
+
+  <hr><p>For historical reasons, <code><a href=3D#w=
indow>Window</a></code> objects must also have a writable,=
 configurable,
+  non-enumerable property named <dfn id=3Dhtmldocument><code&gt=
;HTMLDocument</code></dfn> whose value is the
+  <code><a href=3D#document>Document</a></code> =
interface object.</p>
+
+  </div>
+
+
+<!--ADD-TOPIC:Security-->
+  <div class=3Dimpl>
+
+  <h4 id=3Dsecurity-window><span class=3Dsecno>6.2.1 </sp=
an>Security</h4>
+
+  <p class=3Dcritical>This section describes a security model that=
 is underdefined, imperfect, and
+  does not match implementations. Work is ongoing to attempt to resolve =
this, but in the meantime,
+  please do not rely on this section for precision. Implementors are urg=
ed to send their feedback on
+  how cross-origin cross-global access to <code><a href=3D#wind=
ow>Window</a></code> and <code><a href=3D#locatio=
n>Location</a></code> objects
+  should work. See <a href=3D"https://www.w3.org/Bugs/Public/sho=
w_bug.cgi?id=3D20701">bug 20701</a>.</p>
+
+<!--CLEANUP-->
+  <p id=3Dsecurity-2>User agents must throw a <code><a hr=
ef=3D#securityerror>SecurityError</a></code> exception whe=
never any
+  properties of a <code><a href=3D#window>Window</a>&l=
t;/code> object are accessed when the <a href=3D#incumbent-settings=
-object>incumbent settings object</a> specifies
+  an <a href=3D#effective-script-origin>effective script origin&lt=
;/a> that is not the <a href=3D#same-origin title=3D"same orig=
in">same</a> as
+  <a href=3D#concept-document-window title=3Dconcept-document-window&=
gt;the <code>Window</code> object's
+  <code>Document</code></a>'s <a href=3D#effective-=
script-origin>effective script origin</a>, with the following
+  exceptions:</p>
+
+  <ul><li>The <code title=3Ddom-location><a href=3D=
#dom-location>location</a></code> attribute
+
+   <li>The <code title=3Ddom-window-postMessage><a href=3D=
#dom-window-postmessage>postMessage()</a></code> method
+
+   <li>The <code title=3Ddom-window><a href=3D#dom-window=
>window</a></code> attribute
+
+   <li>The <code title=3Ddom-frames><a href=3D#dom-frames=
>frames</a></code> attribute
+
+   <li>The <code title=3Ddom-self><a href=3D#dom-self>=
self</a></code> attribute
+
+   <li>The <code title=3Ddom-top><a href=3D#dom-top>to=
p</a></code> attribute
+
+   <li>The <code title=3Ddom-parent><a href=3D#dom-parent=
>parent</a></code> attribute
+
+   <li>The <code title=3Ddom-opener><a href=3D#dom-opener=
>opener</a></code> attribute
+
+   <li>The <code title=3Ddom-window-closed><a href=3D#dom=
-window-closed>closed</a></code> attribute
+
+   <li>The <code title=3Ddom-window-close><a href=3D#dom-=
window-close>close()</a></code> method
+
+   <li>The <code title=3Ddom-window-blur><a href=3D#dom-w=
indow-blur>blur()</a></code> method
+
+   <li>The <code title=3Ddom-window-focus><a href=3D#dom-=
window-focus>focus()</a></code> method
+
+   <li>The <a href=3D#dynamic-nested-browsing-context-propertie=
s>dynamic nested browsing context properties</a>
+
+  </ul><!--CLEANUP--><p>When the <a href=3D#incumbe=
nt-settings-object>incumbent settings object</a> specifies an &l=
t;a href=3D#effective-script-origin>effective script origin</a> =
that is different than
+  a <a href=3D#concept-document-window title=3Dconcept-document-windo=
w><code>Window</code> object's
+  <code>Document</code></a>'s <a href=3D#effective-=
script-origin>effective script origin</a>, the user agent must a=
ct as if
+  any changes to that <code><a href=3D#window>Window</a&g=
t;</code> object's properties, getters, setters, etc, were not
+  present, and as if all the properties of that <code><a href=3D=
#window>Window</a></code> object had their [[Enumerable]]
+  attribute set to false.</p>
+
+<!--CLEANUP-->
+  <p>For members that return objects (including function objects),=
 each distinct <a href=3D#effective-script-origin>effective
+  script origin</a> that is not the same as the <code><a =
href=3D#window>Window</a></code> object's
+  <code><a href=3D#document>Document</a></code>'=
s <a href=3D#effective-script-origin>effective script origin</a&=
gt; must be provided with a separate set
+  of objects. These objects must have the prototype chain appropriate fo=
r the script for which the
+  objects are created (not those that would be appropriate for scripts w=
hose <a href=3D#global-object>global
+  object</a>, as specified by their <a href=3D#settings-object&=
gt;settings object</a>,
+  is the <code><a href=3D#window>Window</a></code&g=
t; object in question).</p>
+
+  <div class=3Dexample>
+
+   <p>For instance, if two frames containing <code><a hre=
f=3D#document>Document</a></code>s from different <a hr=
ef=3D#origin title=3Dorigin>origins</a> access the same <code=
><a href=3D#window>Window</a></code> object's <co=
de title=3Ddom-window-postMessage><a href=3D#dom-window-postmessage=
>postMessage()</a></code> method, they will get distinct o=
bjects that
+   are not equal.</p>
+
+  </div>
+
+  </div>
+<!--REMOVE-TOPIC:Security-->
+
+
+
+  <h4 id=3Dapis-for-creating-and-navigating-browsing-contexts-by-name=
><span class=3Dsecno>6.2.2 </span>APIs for creating and na=
vigating browsing contexts by name</h4>
+
+  <dl class=3Ddomintro><dt><var title=3D"">w=
indow</var> =3D <var title=3D"">window</var> =
. <code title=3Ddom-open><a href=3D#dom-open>open</a>&l=
t;/code>( [ <var title=3D"">url</var> [, <var=
 title=3D"">target</var> [, <var title=3D"&quo=
t;>features</var> [, <var title=3D"">replace<=
/var> ] ] ] ] )</dt>
+
+   <dd>
+
+    <p>Opens a window to show <var title=3D"">url&=
lt;/var> (defaults to <code><a href=3D#about:blank>about:b=
lank</a></code>), and
+    returns it. The <var title=3D"">target</var> a=
rgument gives the name of the new window. If a
+    window exists with that name already, it is reused. The <var titl=
e=3D"">replace</var> attribute,
+    if true, means that whatever page is currently open in that window w=
ill be removed from the
+    window's session history. The <var title=3D"">featur=
es</var> argument is ignored.</p>
+
+   </dd>
+
+   <dt><var title=3D"">window</var> . <co=
de title=3Ddom-name><a href=3D#dom-name>name</a></code&=
gt; [ =3D <var title=3D"">value</var> ]</dt>
+
+   <dd>
+
+    <p>Returns the name of the window.</p>
+
+    <p>Can be set, to change the name.</p>
+
+   </dd>
+
+   <dt><var title=3D"">window</var> . <co=
de title=3Ddom-window-close><a href=3D#dom-window-close>close&lt=
;/a></code>()</dt>
+
+   <dd>
+
+    <p>Closes the window.</p>
+
+   </dd>
+
+   <dt><var title=3D"">window</var> . <co=
de title=3Ddom-window-closed><a href=3D#dom-window-closed>closed=
</a></code></dt>
+
+   <dd>
+
+    <p>Returns true if the window has been closed, false otherwise=
.</p>
+
+   </dd>
+
+   <dt><var title=3D"">window</var> . <co=
de title=3Ddom-window-stop><a href=3D#dom-window-stop>stop</a=
></code>()</dt>
+
+   <dd>
+
+    <p>Cancels the document load.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <!-- This whole section should be rewritten to use algorithmic styl=
e -->
+
+  <p>The <dfn id=3Ddom-open title=3Ddom-open><code>ope=
n()</code></dfn> method on <code><a href=3D#window&g=
t;Window</a></code> objects
+  provides a mechanism for <a href=3D#navigate title=3Dnavigate>na=
vigating</a> an existing <a href=3D#browsing-context>browsing
+  context</a> or opening and navigating an <a href=3D#auxiliary=
-browsing-context>auxiliary browsing context</a>.</p>
+
+  <p>The method has four arguments, though they are all optional.&=
lt;/p>
+
+<!--CLEANUP-->
+  <p>The first argument, <var title=3D"">url</v=
ar>, must be a <a href=3D#valid-non-empty-url>valid non-empty UR=
L</a> for a
+  page to load in the browsing context. If the first argument is the emp=
ty string, then the <var title=3D"">url</var> argum=
ent must be interpreted as "<code><a href=3D#about:blank&gt=
;about:blank</a></code>". Otherwise, the
+  argument must be <a href=3D#resolve-a-url title=3D"resolve a u=
rl">resolved</a> to an <a href=3D#absolute-url>absolu=
te URL</a> (or
+  an error), relative to the <a href=3D#api-base-url>API base URL&=
lt;/a> specified by the <a href=3D#entry-settings-object>entry s=
ettings=20
+  object</a> when the method was invoked.</p>
+
+  <p>The second argument, <var title=3D"">target&l=
t;/var>, specifies the <a href=3D#browsing-context-name title=3D&qu=
ot;browsing context
+  name">name</a> of the browsing context that is to be nav=
igated. It must be a <a href=3D#valid-browsing-context-name-or-keyword=
>valid
+  browsing context name or keyword</a>.</p>
+
+  <p>The third argument, <var title=3D"">features&=
lt;/var>, has no defined effect and is mentioned for
+  historical reasons only. User agents may interpret this argument as in=
structions to set the size
+  and position of the browsing context, but are encouraged to instead ig=
nore the argument
+  entirely.</p>
+
+  <p>The fourth argument, <var title=3D"">replace&=
lt;/var>, specifies whether or not the new page will
+  <a href=3D#replacement-enabled title=3D"replacement enabled&qu=
ot;>replace</a> the page currently loaded in the browsing
+  context, when <var title=3D"">target</var> ident=
ifies an existing browsing context (as opposed to
+  leaving the current page in the browsing context's <a href=3D#sessi=
on-history>session history</a>).</p>
+
+  <p>When the method is invoked, the user agent must first select =
a <a href=3D#browsing-context>browsing context</a> to
+  navigate by applying <a href=3D#the-rules-for-choosing-a-browsing-c=
ontext-given-a-browsing-context-name>the rules for choosing a browsing=
 context given a browsing context
+  name</a> using the <var title=3D"">target</va=
r> argument as the name and the <a href=3D#browsing-context>brow=
sing
+  context</a> of the script as the context in which the algorithm =
is executed, unless the user
+  has indicated a preference, in which case the browsing context to navi=
gate may instead be the one
+  indicated by the user.</p>
+
+  <p class=3Dexample>For example, suppose there is a user agent th=
at supports control-clicking a
+  link to open it in a new tab. If a user clicks in that user agent on a=
n element whose <code title=3Dhandler-onclick><a href=3D#handler=
-onclick>onclick</a></code> handler uses the <code titl=
e=3Ddom-open><a href=3D#dom-open>window.open()</a></cod=
e> API to open a page in an iframe, but, while doing so, holds
+  the control key down, the user agent could override the selection of t=
he target browsing context
+  to instead target a new tab.</p>
+
+  <p>If applying <a href=3D#the-rules-for-choosing-a-browsing-c=
ontext-given-a-browsing-context-name>the rules for choosing a browsing=
 context given a browsing context
+  name</a> using the <var title=3D"">target</va=
r> argument would result in there not being a chosen
+  browsing context, then throw an <code><a href=3D#invalidacces=
serror>InvalidAccessError</a></code> exception and abort t=
hese
+  steps.</p>
+
+<!--CLEANUP-->
+  <p>Otherwise, if <var title=3D"">url</var>=
 is not "<code><a href=3D#about:blank>about:blank</a&=
gt;</code>", the user agent must
+  <a href=3D#navigate>navigate</a><!--DONAV window.open()=
--> the selected <a href=3D#browsing-context>browsing context&lt=
;/a> to the
+  <a href=3D#absolute-url>absolute URL</a> obtained from &lt=
;a href=3D#resolve-a-url title=3D"resolve a url">resolving&l=
t;/a> <var title=3D"">url</var> earlier. If the =
<var title=3D"">replace</var> is true or if the &lt=
;a href=3D#browsing-context>browsing
+  context</a> was just created as part of <a href=3D#the-rules-=
for-choosing-a-browsing-context-given-a-browsing-context-name>the rule=
s for choosing a browsing context given a
+  browsing context name</a>, then <a href=3D#replacement-enable=
d title=3D"replacement enabled">replacement must be
+  enabled</a>. The navigation must be done with the <a href=3D#=
responsible-browsing-context>responsible
+  browsing context</a> specified by the <a href=3D#incumbent-se=
ttings-object>incumbent settings object</a> as the <a href=3D=
#source-browsing-context>source browsing
+  context</a>. If the <a href=3D#resolve-a-url>resolve a URL=
</a> algorithm failed, then the user agent may either
+  instead <a href=3D#navigate>navigate</a> to an inline erro=
r page, using the same replacement behavior and
+  source browsing context behavior as described earlier in this paragrap=
h; or treat the <var title=3D"">url</var> as "=
<code><a href=3D#about:blank>about:blank</a></code&g=
t;", acting as described in the next paragraph.</p>
+
+  <p>If <var title=3D"">url</var> <em>=
is</em> "<code><a href=3D#about:blank>about:blank&=
lt;/a></code>", and the <a href=3D#browsing-context>b=
rowsing
+  context</a> was just created as part of <a href=3D#the-rules-=
for-choosing-a-browsing-context-given-a-browsing-context-name>the rule=
s for choosing a browsing context given a
+  browsing context name</a>, then the user agent must instead <=
a href=3D#queue-a-task>queue a task</a> to
+  <a href=3D#fire-a-simple-event>fire a simple event</a> nam=
ed <code title=3Devent-load>load</code> at the selected
+  <a href=3D#browsing-context>browsing context</a>'s <cod=
e><a href=3D#window>Window</a></code> object, but wi=
th its <code title=3Ddom-event-target><a href=3D#dom-event-targe=
t>target</a></code> set to the selected <a href=3D#brow=
sing-context>browsing context</a>'s <a href=3D#concept-docume=
nt-window title=3Dconcept-document-window><code>Window</code&=
gt; object's <code>Document</code></a> object
+  (and the <code title=3Ddom-event-currentTarget>currentTarget<=
/code> set to the <code><a href=3D#window>Window</a>=
</code>
+  object).</p>
+
+  <p>The method must return the <code><a href=3D#windowpr=
oxy>WindowProxy</a></code> object of the <a href=3D#bro=
wsing-context>browsing context</a>
+  that was navigated, or null if no browsing context was navigated.</=
p>
+
+  <hr><p>The <dfn id=3Ddom-name title=3Ddom-name><c=
ode>name</code></dfn> attribute of the <code><a h=
ref=3D#window>Window</a></code> object
+  must, on getting, return the current <a href=3D#browsing-context-na=
me title=3D"browsing context name">name</a> of the
+  <a href=3D#browsing-context>browsing context</a>, and, on =
setting, set the <a href=3D#browsing-context-name title=3D"browsi=
ng context
+  name">name</a> of the <a href=3D#browsing-context>=
browsing context</a> to the new value.</p>
+
+  <p class=3Dnote>The name <a href=3D#resetBCName>gets reset=
</a> when the browsing context is
+  navigated to another domain.</p>
+
+  <hr><p>The <dfn id=3Ddom-window-close title=3Ddom-windo=
w-close><code>close()</code></dfn> method on <cod=
e><a href=3D#window>Window</a></code>
+  objects should, if all the following conditions are met, <a href=3D=
#close-a-browsing-context title=3D"close a browsing
+  context">close</a> the <a href=3D#browsing-context&gt=
;browsing context</a> <var title=3D"">A</var>=
:
+
+  <ul class=3Dbrief><li>The corresponding <a href=3D#brow=
sing-context>browsing context</a> <var title=3D""&g=
t;A</var> is
+   <a href=3D#script-closable>script-closable</a>.</li&gt=
;
+
+<!--CLEANUP-->
+   <li>The <a href=3D#responsible-browsing-context>responsib=
le browsing context</a> specified by the <a href=3D#incumbent-se=
ttings-object>incumbent
+   settings object</a> is <a href=3D#familiar-with>familiar
+   with</a> the <a href=3D#browsing-context>browsing context=
</a> <var title=3D"">A</var>.</li>
+
+<!--CLEANUP-->
+   <li id=3DsandboxClose>The <a href=3D#responsible-browsing-co=
ntext>responsible browsing context</a> specified by the
+   <a href=3D#incumbent-settings-object>incumbent settings object&=
lt;/a>
+   is <a href=3D#allowed-to-navigate>allowed to navigate</a>=
 the <a href=3D#browsing-context>browsing
+   context</a> <var title=3D"">A</var>.</=
li>
+
+  </ul><p>A <a href=3D#browsing-context>browsing conte=
xt</a> is <dfn id=3Dscript-closable>script-closable</dfn&g=
t; if it is an <a href=3D#auxiliary-browsing-context>auxiliary
+  browsing context</a> that was created by a script (as opposed to=
 by an action of the user), or
+  if it is a <a href=3D#browsing-context>browsing context</a&gt=
; whose <a href=3D#session-history>session history</a> contai=
ns only one
+  <code><a href=3D#document>Document</a></code>.=
</p>
+
+  <p>The <dfn id=3Ddom-window-closed title=3Ddom-window-closed&=
gt;<code>closed</code></dfn> attribute on <code>&=
lt;a href=3D#window>Window</a></code>
+  objects must return true if the <code><a href=3D#window>Wi=
ndow</a></code> object's <a href=3D#browsing-context>br=
owsing context</a> has
+  been <a href=3D#a-browsing-context-is-discarded title=3D"a bro=
wsing context is discarded">discarded</a>, and false otherw=
ise.</p>
+
+  <p>The <dfn id=3Ddom-window-stop title=3Ddom-window-stop>&=
lt;code>stop()</code></dfn> method on <code><a hr=
ef=3D#window>Window</a></code>
+  objects should, if there is an existing attempt to <a href=3D#navig=
ate>navigate</a> the <a href=3D#browsing-context>browsing
+  context</a> and that attempt is not currently running the <a =
href=3D#unload-a-document>unload a document</a>
+  algorithm, cancel that <a href=3D#navigate title=3Dnavigate>navi=
gation</a>; then, it must <a href=3D#abort-a-document title=3D&q=
uot;abort
+  a document">abort</a> the <a href=3D#active-document&=
gt;active document</a> of the <a href=3D#browsing-context>bro=
wsing context</a> of
+  the <code><a href=3D#window>Window</a></code> =
object on which it was invoked.</p>
+
+  </div>
+
+
+  <h4 id=3Daccessing-other-browsing-contexts><span class=3Dsecn=
o>6.2.3 </span>Accessing other browsing contexts</h4>
+
+  <dl class=3Ddomintro><dt><var title=3D"">w=
indow</var> . <code title=3Ddom-length><a href=3D#dom-leng=
th>length</a></code></dt>
+
+   <dd>
+
+    <p>Returns the number of <a href=3D#child-browsing-context =
title=3D"child browsing context">child browsing
+    contexts</a>.</p>
+
+   </dd>
+
+   <dt><var title=3D"">window</var>[<var =
title=3D"">index</var>]</dt>
+
+   <dd>
+
+    <p>Returns the indicated <a href=3D#child-browsing-context&=
gt;child browsing context</a>.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+<!--CLEANUP-->
+  <p>The <dfn id=3Ddom-length title=3Ddom-length><code&gt=
;length</code></dfn> IDL attribute on the <code><a h=
ref=3D#window>Window</a></code>
+  interface must return the number of <a href=3D#child-browsing-conte=
xt title=3D"child browsing context">child browsing
+  contexts</a> that are <a href=3D#browsing-context-nested-thro=
ugh title=3D"browsing context nested through">nested through=
</a>
+  elements that are <a href=3D#in-a-document title=3D"in a docum=
ent">in the <code>Document</code></a> that is t=
he
+  <a href=3D#active-document>active document</a> of that &lt=
;code><a href=3D#window>Window</a></code> object, if=
 that <code><a href=3D#window>Window</a></code>'s
+  <a href=3D#browsing-context>browsing context</a> shares th=
e same <a href=3D#event-loop>event loop</a> as the <a href=
=3D#responsible-document>responsible
+  document</a> specified by the <a href=3D#entry-settings-objec=
t>entry settings object</a> accessing the IDL attribute; otherwi=
se,
+  it must return zero.</p>
+
+  <!-- in other words, frames are only accessible to same-thread proc=
esses -->
+
+  <p>The <a href=3D#supported-property-indices>supported pro=
perty indices</a> on the <code><a href=3D#window>Window=
</a></code> object at any instant
+  are the numbers in the range 0 .. <span title=3D"">&lt=
;var title=3D"">n</var>-1</span>, where <var =
title=3D"">n</var> is the number returned by the <c=
ode title=3Ddom-length><a href=3D#dom-length>length</a>&lt=
;/code> IDL
+  attribute. If <var title=3D"">n</var> is zero th=
en there are no <a href=3D#supported-property-indices>supported pro=
perty
+  indices</a>.</p>
+
+  <p>To <dfn id=3Ddom-window-item title=3Ddom-window-item>de=
termine the value of an indexed property</dfn> <var title=3D&quo=
t;">index</var> of a <code><a href=3D#window>Wi=
ndow</a></code> object, the user agent must return the
+  <code><a href=3D#windowproxy>WindowProxy</a></cod=
e> object of the <var title=3D"">index</var>th &=
lt;a href=3D#child-browsing-context>child browsing
+  context</a> of the <code><a href=3D#document>Documen=
t</a></code> that is nested through an element that is <a =
href=3D#in-a-document title=3D"in a document">in the <cod=
e>Document</code></a>, sorted in the <a href=3D#tree-or=
der>tree order</a>
+  of the elements nesting those <a href=3D#browsing-context title=3D&=
quot;browsing context">browsing contexts</a>.</p>
+
+  <p>These properties are the <dfn id=3Ddynamic-nested-browsing=
-context-properties>dynamic nested browsing context properties</dfn=
>.</p>
+
+  </div>
+
+
+
+  <h4 id=3Dnamed-access-on-the-window-object><span class=3Dsecn=
o>6.2.4 </span>Named access on the <code><a href=3D#win=
dow>Window</a></code> object</h4>
+
+  <dl class=3Ddomintro><dt><var title=3D"">w=
indow</var>[<var title=3D"">name</var>]</d=
t>
+
+   <dd>
+
+    <p>Returns the indicated element or collection of elements.&lt=
;/p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>The <code><a href=3D#window>Window</a></=
code> interface <a href=3D#support-named-properties title=3D"s=
upport named properties">supports named
+  properties</a>. The <a href=3D#supported-property-names>su=
pported property names</a> at any moment consist of the
+  following, in <a href=3D#tree-order>tree order</a>, ignori=
ng later duplicates:</p>
+
+  <ul><li>the <a href=3D#browsing-context-name>browsin=
g context name</a> of any <a href=3D#child-browsing-context>c=
hild browsing context</a> of the
+   <a href=3D#active-document>active document</a> whose name=
 is not the empty string,</li>
+
+   <li>the value of the <code title=3D"">name</=
code> content attribute for all <code><a href=3D#the-a-elemen=
t>a</a></code>,
+   <code><a href=3D#the-applet-element>applet</a></=
code>, <code><a href=3D#the-area-element>area</a>&lt=
;/code>, <code><a href=3D#the-embed-element>embed</a&gt=
;</code>, <code><a href=3D#the-form-element>form</a&=
gt;</code>,
+   <code><a href=3D#frameset>frameset</a></code>=
, <code><a href=3D#the-img-element>img</a></code>=
, and <code><a href=3D#the-object-element>object</a>&lt=
;/code> elements in the <a href=3D#active-document>active
+   document</a> that have a non-empty <code title=3D"&quot=
;>name</code> content attribute, and</li>
+
+   <li>the value of the <code title=3Dattr-id><a href=3D#=
the-id-attribute>id</a></code> content attribute of any &l=
t;a href=3D#html-elements title=3D"HTML
+   elements">HTML element</a> in the <a href=3D#active-=
document>active document</a> with a non-empty <code title=3Da=
ttr-id><a href=3D#the-id-attribute>id</a></code> con=
tent attribute.</li>
+
+  </ul><p>To <a href=3D#determine-the-value-of-a-named-pr=
operty>determine the value of a named property</a> <var title=
=3D"">name</var> when <dfn id=3Ddom-window-namedite=
m title=3Ddom-window-namedItem>the <code>Window</code> obj=
ect is indexed for property
+  retrieval</dfn>, the user agent must return the value obtained u=
sing the following steps:</p>
+
+  <ol><!-- http://software.hixie.ch/utilities/js/live-dom-viewe=
r/saved/1716 --><li>
+
+    <p>Let <var title=3D"">objects</var> be =
the list of <a href=3D#dom-window-nameditem-filter title=3Ddom-window-=
namedItem-filter>named objects</a> with the name <var title=3D=
"">name</var>
+    in the <a href=3D#active-document>active document</a>.
+
+    <p class=3Dnote>There will be at least one such object, by def=
inition.<!-- (If there wasn't,
+    then this algorithm wouldn't have been invoked by Web IDL.) -->&l=
t;/p>
+
+   </li>
+
+   <li>
+
+    <p>If <var title=3D"">objects</var> cont=
ains a <a href=3D#nested-browsing-context>nested browsing context&l=
t;/a>, then return
+    the <code><a href=3D#windowproxy>WindowProxy</a>&l=
t;/code> object of the <a href=3D#nested-browsing-context>nested=
 browsing context</a> corresponding to
+    the first <a href=3D#browsing-context-container>browsing conte=
xt container</a> in <a href=3D#tree-order>tree order</a&gt=
; whose
+    <a href=3D#browsing-context>browsing context</a> is in &=
lt;var title=3D"">objects</var>, and abort these steps=
.</p>
+
+   </li>
+
+   <li>
+
+    <p>Otherwise, if <var title=3D"">objects</v=
ar> has only one element, return that element and
+    abort these steps.</p>
+
+   </li>
+
+   <li>
+
+    <p>Otherwise return an <code><a href=3D#htmlcollectio=
n>HTMLCollection</a></code> rooted at the <code><=
a href=3D#document>Document</a></code> node,
+    whose filter matches only <a href=3D#dom-window-nameditem-filter =
title=3Ddom-window-namedItem-filter>named objects</a> with
+    the name <var title=3D"">name</var>. (By defin=
ition, these will all be elements.)</p> <!-- the
+    same one each time is returned, because of the rule under collection=
s -->
+
+   </li>
+
+  </ol><p><dfn id=3Ddom-window-nameditem-filter title=3Dd=
om-window-nameditem-filter>Named objects</dfn> with the name &lt=
;var title=3D"">name</var>, for the purposes of the ab=
ove algorithm, are those that are either:</p>
+
+  <ul><li><a href=3D#child-browsing-context title=3D&quot=
;child browsing context">child browsing contexts</a> of the=
 <a href=3D#active-document>active
+   document</a> whose name is <var title=3D"">name=
</var>,</li>
+
+   <li><code><a href=3D#the-a-element>a</a></=
code>, <code><a href=3D#the-applet-element>applet</a&gt=
;</code>, <code><a href=3D#the-area-element>area</a&=
gt;</code>, <code><a href=3D#the-embed-element>embed&lt=
;/a></code>,
+   <code><a href=3D#the-form-element>form</a></code=
>, <code><a href=3D#frameset>frameset</a></code&g=
t;, <code><a href=3D#the-img-element>img</a></code&g=
t;, or <code><a href=3D#the-object-element>object</a>&l=
t;/code> elements that
+   have a <code title=3Dattr-name>name</code> content attrib=
ute whose value is <var title=3D"">name</var>, or&l=
t;/li>
+
+   <li><a href=3D#html-elements>HTML elements</a> that=
 have an <code title=3Dattr-id><a href=3D#the-id-attribute>id=
</a></code> content attribute
+   whose value is <var title=3D"">name</var>.</=
li>
+
+  </ul></div>
+
+
+  <div class=3Dimpl>
+
+  <h4 id=3Dgarbage-collection-and-browsing-contexts><span class=
=3Dsecno>6.2.5 </span>Garbage collection and browsing contexts&l=
t;/h4>
+
+  <p>A <a href=3D#browsing-context>browsing context</a&gt=
; has a strong reference to each of its <code><a href=3D#documen=
t>Document</a></code>s
+  and its <code><a href=3D#windowproxy>WindowProxy</a>=
</code> object, and the user agent itself has a strong reference to=
 its
+  <a href=3D#top-level-browsing-context title=3D"top-level brows=
ing context">top-level browsing contexts</a>.</p>
+
+  <p>A <code><a href=3D#document>Document</a>&lt=
;/code> has a strong reference to its <code><a href=3D#window=
>Window</a></code> object.</p>
+
+  <p class=3Dnote>A <code><a href=3D#window>Window<=
/a></code> object <a href=3D#implied-strong-reference title=3D=
"implied strong reference">has a strong
+  reference</a> to its <code><a href=3D#document>Docum=
ent</a></code> object through its <code title=3Ddom-docume=
nt><a href=3D#dom-document-0>document</a></code> att=
ribute. Thus, references from other scripts to either of
+  those objects will keep both alive. Similarly, both <code><a =
href=3D#document>Document</a></code> and <code><a=
 href=3D#window>Window</a></code>
+  objects have <a href=3D#implied-strong-reference title=3D"impl=
ied strong reference">implied strong references</a> to the
+  <code><a href=3D#windowproxy>WindowProxy</a></cod=
e> object.</p>
+
+<!--CLEANUP-->
+  <p>Each <a href=3D#concept-script title=3Dconcept-script>s=
cript</a> has a strong reference to its <a href=3D#settings-obje=
ct>settings
+  object</a>, and each <a href=3D#script-settings-object>scr=
ipt settings object</a>
+  has strong references to its <a href=3D#global-object>global obj=
ect</a>, <a href=3D#responsible-browsing-context>responsible =
browsing context</a>, and <a href=3D#responsible-document>res=
ponsible document</a>.</p>
+
+  <!-- discard a document -->
+  <p>When a <a href=3D#browsing-context>browsing context<=
/a> is to <dfn id=3Ddiscard-a-document>discard a <code>Doc=
ument</code></dfn>, the user
+  agent must run the following steps:</p>
+
+  <ol><li><p>Set the <code><a href=3D#documen=
t>Document</a></code>'s <i title=3Dconcept-document-sal=
vageable><a href=3D#concept-document-salvageable>salvageable<=
/a></i> state to false.</li>
+
+   <li><p>Run any <a href=3D#unloading-document-cleanup-s=
teps>unloading document cleanup steps</a> for the <code>&l=
t;a href=3D#document>Document</a></code> that
+   are defined by this specification and <a href=3D#other-applicable-=
specifications>other applicable specifications</a>.</li>
+
+   <li><p><a href=3D#abort-a-document title=3D"abort=
 a document">Abort the <code>Document</code></a&gt=
;.</li>
+
+   <li><p>Remove any <a href=3D#concept-task title=3Dconc=
ept-task>tasks</a> associated with the
+   <code><a href=3D#document>Document</a></code>=
 in any <a href=3D#task-source>task source</a>, without runni=
ng those tasks.</li>
+
+   <li><p><a href=3D#a-browsing-context-is-discarded titl=
e=3D"a browsing context is discarded">Discard</a> all =
the <a href=3D#child-browsing-context title=3D"child
+   browsing context">child browsing contexts</a> of the &l=
t;code><a href=3D#document>Document</a></code>.</=
li>
+
+   <li><p>Lose the strong reference from the <code>&lt=
;a href=3D#document>Document</a></code>'s <a href=3D#br=
owsing-context>browsing context</a>
+   to the <code><a href=3D#document>Document</a></c=
ode>.</li>
+
+  </ol><p class=3Dnote>Whenever a <code><a href=3D#=
document>Document</a></code> object is <a href=3D#disca=
rd-a-document title=3D"discard a
+  Document">discarded</a>, it is also removed from the lis=
t of <a href=3D"#the-worker's-documents">the worker's
+  <code>Document</code>s</a> of each worker whose list=
 contains that <code><a href=3D#document>Document</a>&l=
t;/code>.</p>
+
+  <p>When <dfn id=3Da-browsing-context-is-discarded>a <em=
><span>browsing context</span></em> is discarded<=
/dfn>, the strong reference
+  from the user agent itself to the <a href=3D#browsing-context>br=
owsing context</a> must be severed, and all the
+  <code><a href=3D#document>Document</a></code> =
objects for all the entries in the <a href=3D#browsing-context>brow=
sing context</a>'s session
+  history must be <a href=3D#discard-a-document title=3D"discard=
 a document">discarded</a> as well.</p>
+
+  <p>User agents may <a href=3D#a-browsing-context-is-discarded=
 title=3D"a browsing context is discarded">discard</a>=
 <a href=3D#top-level-browsing-context title=3D"top-level browsin=
g context">top-level browsing contexts</a> at any time (typ=
ically, in
+  response to user requests, e.g. when a user force-closes a window cont=
aining one or more <a href=3D#top-level-browsing-context title=3D&quot=
;top-level browsing context">top-level browsing contexts</a&gt=
;). Other <a href=3D#browsing-context title=3D"browsing context&q=
uot;>browsing contexts</a> must be discarded once their
+  <code><a href=3D#windowproxy>WindowProxy</a></cod=
e> object is eligible for garbage collection.</p>
+
+  </div>
+
+
+  <h4 id=3Dclosing-browsing-contexts><span class=3Dsecno>6.2=
.6 </span>Closing browsing contexts</h4>
+
+  <p>When the user agent is required to <dfn id=3Dclose-a-brows=
ing-context>close a browsing context</dfn>, it must run the
+  following steps:</p>
+
+  <ol><li><p>Let <var title=3D"">speci=
fied browsing context</var> be the <a href=3D#browsing-context&g=
t;browsing context</a>
+   being closed.</li>
+
+   <li><p><a href=3D#prompt-to-unload-a-document title=3D=
"prompt to unload a document">Prompt to unload</a> the=
 <a href=3D#active-document>active
+   document</a> of the <var title=3D"">specified b=
rowsing context</var>. If the user <a href=3D#refused-to-allow-t=
he-document-to-be-unloaded>refused
+   to allow the document to be unloaded</a>, then abort these step=
s.</li>
+
+   <li><p><a href=3D#unload-a-document title=3D"unlo=
ad a document">Unload</a> the <a href=3D#active-document=
>active document</a> of the <var title=3D"">spec=
ified browsing context</var> with the <var title=3D""&=
gt;recycle</var> parameter set to
+   false.</li>
+
+   <li><p>Remove the <var title=3D"">specifi=
ed browsing context</var> from the user interface (e.g.
+   close or hide its tab in a tabbed browser).</li>
+
+   <li><p><a href=3D#a-browsing-context-is-discarded titl=
e=3D"a browsing context is discarded">Discard</a> the =
<var title=3D"">specified
+   browsing context</var>.</li>
+
+  </ol><p>User agents should offer users the ability to arbi=
trarily <a href=3D#close-a-browsing-context title=3D"close a brow=
sing
+  context">close</a> any <a href=3D#top-level-browsing-=
context>top-level browsing context</a>.</p>
+
+
+
+  <h4 id=3Dbrowser-interface-elements><span class=3Dsecno>6.=
2.7 </span>Browser interface elements</h4>
+
+  <p>To allow Web pages to integrate with Web browsers, certain We=
b browser interface elements are
+  exposed in a limited way to scripts in Web pages.</p>
+
+  <p>Each interface element is represented by a <code><a =
href=3D#barprop>BarProp</a></code> object:</p>
+
+  <pre class=3Didl>interface <dfn id=3Dbarprop>BarProp</d=
fn> {
+           attribute boolean <a href=3D#dom-barprop-visible title=3Dd=
om-BarProp-visible>visible</a>;
+};</pre>
+
+  <dl class=3Ddomintro><dt><var title=3D"">w=
indow</var> . <code title=3Ddom-window-locationbar><a href=
=3D#dom-window-locationbar>locationbar</a></code> . <co=
de title=3Ddom-BarProp-visible><a href=3D#dom-barprop-visible>vi=
sible</a></code></dt>
+   <dd>
+    <p>Returns true if the location bar is visible; otherwise, ret=
urns false.</p>
+   </dd>
+
+   <dt><var title=3D"">window</var> . <co=
de title=3Ddom-window-menubar><a href=3D#dom-window-menubar>menu=
bar</a></code> . <code title=3Ddom-BarProp-visible><=
a href=3D#dom-barprop-visible>visible</a></code></dt&gt=
;
+   <dd>
+    <p>Returns true if the menu bar is visible; otherwise, returns=
 false.</p>
+   </dd>
+
+   <dt><var title=3D"">window</var> . <co=
de title=3Ddom-window-personalbar><a href=3D#dom-window-personalbar=
>personalbar</a></code> . <code title=3Ddom-BarProp-vis=
ible><a href=3D#dom-barprop-visible>visible</a></code&g=
t;</dt>
+   <!--<dt><var title=3D"">window</var> .=
 <code title=3D"dom-window-directories">directories</c=
ode> . <code title=3D"dom-BarProp-visible">visible<=
/code></dt>-->
+   <dd>
+    <p>Returns true if the personal bar is visible; otherwise, ret=
urns false.</p>
+   </dd>
+
+   <dt><var title=3D"">window</var> . <co=
de title=3Ddom-window-scrollbars><a href=3D#dom-window-scrollbars&g=
t;scrollbars</a></code> . <code title=3Ddom-BarProp-visibl=
e><a href=3D#dom-barprop-visible>visible</a></code>&=
lt;/dt>
+   <dd>
+    <p>Returns true if the scroll bars are visible; otherwise, ret=
urns false.</p>
+   </dd>
+
+   <dt><var title=3D"">window</var> . <co=
de title=3Ddom-window-statusbar><a href=3D#dom-window-statusbar>=
statusbar</a></code> . <code title=3Ddom-BarProp-visible&g=
t;<a href=3D#dom-barprop-visible>visible</a></code><=
/dt>
+   <dd>
+    <p>Returns true if the status bar is visible; otherwise, retur=
ns false.</p>
+   </dd>
+
+   <dt><var title=3D"">window</var> . <co=
de title=3Ddom-window-toolbar><a href=3D#dom-window-toolbar>tool=
bar</a></code> . <code title=3Ddom-BarProp-visible><=
a href=3D#dom-barprop-visible>visible</a></code></dt&gt=
;
+   <dd>
+    <p>Returns true if the toolbar is visible; otherwise, returns =
false.</p>
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-barprop-visible title=3Ddom-BarProp-visi=
ble>visible</dfn> attribute, on getting, must return either
+  true or a value determined by the user agent to most accurately repres=
ent the visibility state of
+  the user interface element that the object represents, as described be=
low. On setting, the new
+  value must be discarded.</p>
+
+  <p>The following <code><a href=3D#barprop>BarProp&lt=
;/a></code> objects exist for each <code><a href=3D#doc=
ument>Document</a></code> object in a
+  <a href=3D#browsing-context>browsing context</a>. Some of =
the user interface elements represented by these objects
+  might have no equivalent in some user agents; for those user agents, e=
xcept when otherwise
+  specified, the object must act as if it was present and visible (i.e. =
its <code title=3Ddom-BarProp-visible><a href=3D#dom-barprop-vis=
ible>visible</a></code> attribute must return true).</p=
>
+
+  <dl><dt><dfn id=3Dthe-location-bar-barprop-object>Th=
e location bar <code>BarProp</code> object</dfn></dt=
>
+
+   <dd>Represents the user interface element that contains a contr=
ol that displays the
+   <a href=3D#url>URL</a> of the <a href=3D#active-docume=
nt>active document</a>, or some similar interface concept.</d=
d>
+
+   <dt><dfn id=3Dthe-menu-bar-barprop-object>The menu bar &l=
t;code>BarProp</code> object</dfn></dt>
+
+   <dd>Represents the user interface element that contains a list =
of commands in menu form, or some
+   similar interface concept.</dd>
+
+   <dt><dfn id=3Dthe-personal-bar-barprop-object>The persona=
l bar <code>BarProp</code> object</dfn></dt>
+
+   <dd>Represents the user interface element that contains links t=
o the user's favorite pages, or
+   some similar interface concept.</dd>
+
+   <dt><dfn id=3Dthe-scrollbar-barprop-object>The scrollbar =
<code>BarProp</code> object</dfn></dt>
+
+   <dd>Represents the user interface element that contains a scrol=
ling mechanism, or some similar
+   interface concept.</dd>
+
+   <dt><dfn id=3Dthe-status-bar-barprop-object>The status ba=
r <code>BarProp</code> object</dfn></dt>
+
+   <dd>Represents a user interface element found immediately below=
 or after the document, as
+   appropriate for the user's media. If the user agent has no such user =
interface element, then the
+   object may act as if the corresponding user interface element was abs=
ent (i.e. its <code title=3Ddom-BarProp-visible><a href=3D#dom-b=
arprop-visible>visible</a></code> attribute may return fal=
se).</dd>
+
+   <dt><dfn id=3Dthe-toolbar-barprop-object>The toolbar <=
code>BarProp</code> object</dfn></dt>
+
+   <dd>Represents the user interface element found immediately abo=
ve or before the document, as
+   appropriate for the user's media. If the user agent has no such user =
interface element, then the
+   object may act as if the corresponding user interface element was abs=
ent (i.e. its <code title=3Ddom-BarProp-visible><a href=3D#dom-b=
arprop-visible>visible</a></code> attribute may return fal=
se).</dd>
+
+  </dl><p>The <dfn id=3Ddom-window-locationbar title=3Ddo=
m-window-locationbar><code>locationbar</code></dfn> =
attribute must return
+  <a href=3D#the-location-bar-barprop-object>the location bar <=
code>BarProp</code> object</a>.</p>
+
+  <p>The <dfn id=3Ddom-window-menubar title=3Ddom-window-menuba=
r><code>menubar</code></dfn> attribute must return &=
lt;a href=3D#the-menu-bar-barprop-object>the
+  menu bar <code>BarProp</code> object</a>.</p>
+
+  <p>The <dfn id=3Ddom-window-personalbar title=3Ddom-window-pe=
rsonalbar><code>personalbar</code></dfn> attribute m=
ust return
+  <a href=3D#the-personal-bar-barprop-object>the personal bar <=
code>BarProp</code> object</a>.</p>
+
+  <p>The <dfn id=3Ddom-window-scrollbars title=3Ddom-window-scr=
ollbars><code>scrollbars</code></dfn> attribute must=
 return
+  <a href=3D#the-scrollbar-barprop-object>the scrollbar <code&g=
t;BarProp</code> object</a>.</p>
+
+  <p>The <dfn id=3Ddom-window-statusbar title=3Ddom-window-stat=
usbar><code>statusbar</code></dfn> attribute must re=
turn
+  <a href=3D#the-status-bar-barprop-object>the status bar <code=
>BarProp</code> object</a>.</p>
+
+  <p>The <dfn id=3Ddom-window-toolbar title=3Ddom-window-toolba=
r><code>toolbar</code></dfn> attribute must return &=
lt;a href=3D#the-toolbar-barprop-object>the
+  toolbar <code>BarProp</code> object</a>.</p>
+
+<!--
+  <p>For legacy reasons, the <dfn title=3D"dom-window-dire=
ctories"><code>directories</code></dfn>
+  attribute must also return <span>the personal bar <code>Ba=
rProp</code> object</span>.</p>
+-->
+
+  <hr><p>For historical reasons, the <dfn id=3Ddom-window=
-status title=3Ddom-window-status><code>status</code></=
dfn> attribute
+  on the <code><a href=3D#window>Window</a></code&g=
t; object must, on getting, return the last string it was set to, and on
+  setting, must set itself to the new value. When the <code><a =
href=3D#window>Window</a></code> object is created, the
+  attribute must be set to the empty string. It does not do anything els=
e.</p>
+
+  </div>
+
+
+  <div class=3Dimpl>
+
+  <h4 id=3Dthe-windowproxy-object><span class=3Dsecno>6.2.8 =
</span>The <code><a href=3D#windowproxy>WindowProxy<=
/a></code> object</h4>
+
+
+  <p>As mentioned earlier, each <a href=3D#browsing-context>=
browsing context</a> has a
+  <dfn id=3Dwindowproxy><code>WindowProxy</code></d=
fn> object. This object is unusual in that all operations that
+  would be performed on it must be performed on the <code><a hr=
ef=3D#window>Window</a></code> object of the <a href=3D=
#browsing-context>browsing
+  context</a>'s <a href=3D#active-document>active document&l=
t;/a> instead. It is thus indistinguishable from that
+  <code><a href=3D#window>Window</a></code> obje=
ct in every way until the <a href=3D#browsing-context>browsing cont=
ext</a> is navigated.</p>
+
+  <p>There is no <code><a href=3D#windowproxy>WindowPr=
oxy</a></code> interface object.</p>
+
+  <p class=3Dnote>The <code><a href=3D#windowproxy>Win=
dowProxy</a></code> object allows scripts to act as if each
+  <a href=3D#browsing-context>browsing context</a> had a sin=
gle <code><a href=3D#window>Window</a></code> obj=
ect, while still keeping
+  separate <code><a href=3D#window>Window</a></code=
> objects for each <code><a href=3D#document>Document</=
a></code>.</p>
+
+  <div class=3Dexample>
+
+   <p>In the following example, the variable <var title=3D&quot=
;">x</var> is set to the
+   <code><a href=3D#windowproxy>WindowProxy</a></co=
de> object returned by the <code title=3Ddom-window><a href=3D=
#dom-window>window</a></code> accessor
+   on the global object. All of the expressions following the assignment=
 return true, because in
+   every respect, the <code><a href=3D#windowproxy>WindowPro=
xy</a></code> object acts like the underlying <code>&lt=
;a href=3D#window>Window</a></code>
+   object.</p>
+
+   <pre>var x =3D window;
+x instanceof Window; // true
+x =3D=3D=3D this; // true</pre>
+
+  </div>
+
+  </div>
+<!--TOPIC:HTML-->
+
+
+
+<!--TOPIC:Security-->
+  <h3 id=3Dorigin-0><span class=3Dsecno>6.3 </span>Ori=
gin</h3>
+  <!-- Hallowed are the Ori -->
+
+  <p>Origins are the fundamental currency of the Web's security mo=
del. Two actors in the Web
+  platform that share an origin are assumed to trust each other and to h=
ave the same authority.
+  Actors with differing origins are considered potentially hostile versu=
s each other, and are
+  isolated from each other to varying degrees.</p>
+
+  <p class=3Dexample>For example, if Example Bank's Web site, host=
ed at <code title=3D"">bank.example.com</code>, tri=
es to examine the DOM of Example Charity's Web site, hosted
+  at <code title=3D"">charity.example.org</code>, =
a <code><a href=3D#securityerror>SecurityError</a></=
code> exception will be
+  raised.</p>
+
+  <hr><p>The <dfn id=3Dorigin>origin</dfn> of a =
resource and the <dfn id=3Deffective-script-origin>effective script=
 origin</dfn> of a resource
+  are both either opaque identifiers or tuples consisting of a scheme co=
mponent, a host component, a
+  port component, and optionally extra data.</p>
+
+  <p class=3Dnote>The extra data could include the certificate of =
the site when using encrypted
+  connections, to ensure that if the site's secure certificate changes, =
the origin is considered to
+  change as well.</p>
+
+  <div class=3Dimpl>
+
+  <p>An <a href=3D#origin>origin</a> or <a href=3D#=
effective-script-origin>effective script origin</a> can be defin=
ed as an <dfn id=3Dconcept-origin-alias title=3Dconcept-origin-alias&g=
t;alias</dfn> to another <a href=3D#origin>origin</a> o=
r <a href=3D#effective-script-origin>effective script
+  origin</a>. The value of the <a href=3D#origin>origin</=
a> or <a href=3D#effective-script-origin>effective script origin=
</a> is
+  then the value of the <a href=3D#origin>origin</a> or <=
a href=3D#effective-script-origin>effective script origin</a> to=
 which it is
+  an alias.</p>
+
+  <p>These characteristics are defined as follows:</p>
+
+  <dl><dt>For URLs</dt>
+
+   <dd>
+
+    <p>The <a href=3D#origin>origin</a> and <a href=
=3D#effective-script-origin>effective script origin</a> of the &=
lt;a href=3D#url>URL</a> are
+    the origin defined in <cite>The Web Origin Concept</cite&gt=
;. <a href=3D#refsORIGIN>[ORIGIN]</a></p>
+
+   </dd>
+
+
+   <dt>For <code><a href=3D#document>Document</a&gt=
;</code> objects</dt>
+
+   <dd>
+
+    <dl class=3Dswitch><dt id=3DsandboxOrigin>If a <code&=
gt;<a href=3D#document>Document</a></code>'s <a href=
=3D#active-sandboxing-flag-set>active sandboxing flag set</a> ha=
s
+     its <a href=3D#sandboxed-origin-browsing-context-flag>sandbox=
ed origin browsing context flag</a> set</dt>
+
+     <dd>
+
+      <p>The <a href=3D#origin>origin</a> is a globall=
y unique identifier assigned when the
+      <code><a href=3D#document>Document</a></code&=
gt; is created.</p>
+
+      <p>The <a href=3D#effective-script-origin>effective sc=
ript origin</a> is initially an <a href=3D#concept-origin-alias =
title=3Dconcept-origin-alias>alias</a> to the <a href=3D#orig=
in>origin</a> of the
+      <code><a href=3D#document>Document</a></code&=
gt;.</p>
+
+     </dd>
+
+
+     <dt>If a <code><a href=3D#document>Document</a=
></code> was generated from a <a href=3D#javascript-protocol =
title=3D"javascript
+     protocol"><code>javascript:</code> URL</a&gt=
;</dt>
+
+     <dd>
+
+      <p>The <a href=3D#origin>origin</a> is an <a =
href=3D#concept-origin-alias title=3Dconcept-origin-alias>alias</a&=
gt; to the
+      <a href=3D#origin>origin</a> of the script of that &lt=
;a href=3D#javascript-protocol title=3D"javascript
+      protocol"><code>javascript:</code> URL</a&g=
t;.</p>
+
+      <p>The <a href=3D#effective-script-origin>effective sc=
ript origin</a> is initially an <a href=3D#concept-origin-alias =
title=3Dconcept-origin-alias>alias</a> to the <a href=3D#orig=
in>origin</a> of the
+      <code><a href=3D#document>Document</a></code&=
gt;.</p>
+
+     </dd>
+
+
+     <dt>If a <code><a href=3D#document>Document</a=
></code> was served over the network and has an address that use=
s a URL
+     scheme with a server-based naming authority</dt>
+
+     <dd>
+
+      <p>The <a href=3D#origin>origin</a> is an <a =
href=3D#concept-origin-alias title=3Dconcept-origin-alias>alias</a&=
gt; to the
+      <a href=3D#origin>origin</a> of <a href=3D"#th=
e-document's-address">the <code>Document</code>'s add=
ress</a>.</p>
+
+      <p>The <a href=3D#effective-script-origin>effective sc=
ript origin</a> is initially an <a href=3D#concept-origin-alias =
title=3Dconcept-origin-alias>alias</a> to the <a href=3D#orig=
in>origin</a> of the
+      <code><a href=3D#document>Document</a></code&=
gt;.</p>
+
+     </dd>
+
+
+     <dt>If a <code><a href=3D#document>Document</a=
></code> was generated from a <a href=3D#data-protocol title=3D=
"data protocol"><code title=3D"">data:</c=
ode> URL</a> found in another <code><a href=3D#document=
>Document</a></code> or in a script</dt>
+
+     <dd>
+
+      <p>The <a href=3D#origin>origin</a> is an <a =
href=3D#concept-origin-alias title=3Dconcept-origin-alias>alias</a&=
gt; to the
+      <a href=3D#origin>origin</a> specified by the <a hr=
ef=3D#incumbent-settings-object>incumbent settings object</a> wh=
en the <a href=3D#navigate>navigate</a>
+      algorithm was invoked, or, if no <a href=3D#concept-script titl=
e=3Dconcept-script>script</a> was involved, of
+      the <code><a href=3D#document>Document</a></c=
ode> of the element that initiated the <a href=3D#navigate title=3D=
navigate>navigation</a> to that <a href=3D#url>URL</a&g=
t;.</p>
+
+      <p>The <a href=3D#effective-script-origin>effective sc=
ript origin</a> is initially an <a href=3D#concept-origin-alias =
title=3Dconcept-origin-alias>alias</a> to the <a href=3D#effe=
ctive-script-origin>effective script origin</a> of that
+      same <a href=3D#script-settings-object>script settings objec=
t</a> or <code><a href=3D#document>Document</a>&l=
t;/code>.</p>
+
+     </dd>
+
+
+     <dt>If a <code><a href=3D#document>Document</a=
></code> has the <a href=3D"#the-document's-address&quot=
; title=3D"the document's address">address</a>
+     "<code><a href=3D#about:blank>about:blank</a&gt=
;</code>"</dt>
+
+     <dd>
+
+      <p>The <a href=3D#origin>origin</a> and <a hr=
ef=3D#effective-script-origin>effective script origin</a> of the
+      <code><a href=3D#document>Document</a></code&=
gt; are <a href=3D#about-blank-origin>those it was assigned when it=
s
+      browsing context was created</a>.</p>
+
+     </dd>
+
+
+     <dt>If a <code><a href=3D#document>Document</a=
></code> is <a href=3D#an-iframe-srcdoc-document>an <co=
de>iframe</code> <code title=3Dattr-iframe-srcdoc>srcdoc&l=
t;/code> document</a></dt>
+
+     <dd>
+
+      <p>The <a href=3D#origin>origin</a> of the <c=
ode><a href=3D#document>Document</a></code> is an &l=
t;a href=3D#concept-origin-alias title=3Dconcept-origin-alias>alias&lt=
;/a> to the <a href=3D#origin>origin</a> of the
+      <code><a href=3D#document>Document</a></code&=
gt;'s <a href=3D#browsing-context>browsing context</a>'s <=
a href=3D#browsing-context-container>browsing context
+      container</a>'s <code><a href=3D#document>Docume=
nt</a></code>.</p>
+
+      <p>The <a href=3D#effective-script-origin>effective sc=
ript origin</a> is initially an <a href=3D#concept-origin-alias =
title=3Dconcept-origin-alias>alias</a> to the <a href=3D#effe=
ctive-script-origin>effective script origin</a> of the
+      <code><a href=3D#document>Document</a></code&=
gt;'s <a href=3D#browsing-context>browsing context</a>'s <=
a href=3D#browsing-context-container>browsing context
+      container</a>'s <code><a href=3D#document>Docume=
nt</a></code>.</p>
+
+     </dd>
+
+
+     <dt>If a <code><a href=3D#document>Document</a=
></code> was obtained in some other manner (e.g. a <a href=3D=
#data-protocol title=3D"data
+     protocol"><code title=3D"">data:</code&g=
t; URL</a> typed in by the user or that was returned as
+     the location of an HTTP redirect (<a href=3D#concept-http-equiva=
lent-codes title=3Dconcept-http-equivalent-codes>or
+     equivalent</a> in other protocols), a <code><a href=3D=
#document>Document</a></code> created using the <code t=
itle=3Ddom-DOMImplementation-createDocument><a href=3D#dom-domimple=
mentation-createdocument>createDocument()</a></code> API, =
etc)</dt>
+
+     <dd>
+
+      <p>The default behavior as defined in the DOM standard appli=
es. <a href=3D#refsDOM>[DOM]</a>.</p>
+
+      <p class=3Dnote>The <a href=3D#origin>origin</a>=
 is a globally unique identifier assigned when the
+      <code><a href=3D#document>Document</a></code&=
gt; is created, and the <a href=3D#effective-script-origin>effectiv=
e script origin</a> is initially an
+      <a href=3D#concept-origin-alias title=3Dconcept-origin-alias&gt=
;alias</a> to the <a href=3D#origin>origin</a> of the
+      <code><a href=3D#document>Document</a></code&=
gt;.</p>
+
+     </dd>
+
+    </dl><p class=3Dnote>The <a href=3D#effective-script-=
origin>effective script origin</a> of a <code><a href=3D=
#document>Document</a></code> can be
+    manipulated using the <code title=3Ddom-document-domain><a =
href=3D#dom-document-domain>document.domain</a></code> IDL
+    attribute.</p>
+
+   </dd>
+
+
+   <dt>For images</dt>
+
+   <dd>
+
+    <dl class=3Dswitch><dt>If an image is the image of an &l=
t;code><a href=3D#the-img-element>img</a></code> ele=
ment and its image data is
+     <a href=3D#cors-cross-origin>CORS-cross-origin</a></=
dt>
+
+     <dd>The <a href=3D#origin>origin</a> is a globall=
y unique identifier assigned when the image is
+     created.</dd>
+
+
+     <dt>If an image is the image of an <code><a href=3D#=
the-img-element>img</a></code> element and its image data =
is
+     <a href=3D#cors-same-origin>CORS-same-origin</a></dt=
>
+
+     <dd>The <a href=3D#origin>origin</a> is an <a =
href=3D#concept-origin-alias title=3Dconcept-origin-alias>alias</a&=
gt; to the
+     <a href=3D#origin>origin</a> of the <code><a h=
ref=3D#the-img-element>img</a></code> element's <code&g=
t;<a href=3D#document>Document</a></code>.</dd>
+
+     <!-- all image loads go through the "potentially CORS-enabl=
ed fetch" algorithm so they're all
+     either CORS-cross-origin or CORS-same-origin if they succeed at all=
 -->
+
+    </dl><p>Images do not have an <a href=3D#effective-sc=
ript-origin>effective script origin</a>.</p>
+
+   </dd>
+
+
+   <dt>For <code><a href=3D#the-audio-element>audio&lt=
;/a></code> and <code><a href=3D#the-video-element>v=
ideo</a></code> elements</dt>
+
+   <dd>
+
+    <dl class=3Dswitch><dt>If the <a href=3D#media-data&g=
t;media data</a> is <a href=3D#cors-cross-origin>CORS-cross-o=
rigin</a></dt>
+
+     <dd>The <a href=3D#origin>origin</a> is a globall=
y unique identifier assigned when the <a href=3D#media-data>media
+     data</a> is <a href=3D#fetch title=3Dfetch>fetched</=
a>.</dd>
+
+
+     <dt>If the <a href=3D#media-data>media data</a> i=
s <a href=3D#cors-same-origin>CORS-same-origin</a></dt>
+
+     <dd>The <a href=3D#origin>origin</a> is an <a =
href=3D#concept-origin-alias title=3Dconcept-origin-alias>alias</a&=
gt; to the
+     <a href=3D#origin>origin</a> of the <a href=3D#media=
-element>media element</a>'s <code><a href=3D#document&=
gt;Document</a></code>.</dd>
+
+    </dl><p><a href=3D#media-element title=3D"media =
element">Media elements</a> do not have an <a href=3D#ef=
fective-script-origin>effective script
+    origin</a>.</p>
+
+   </dd>
+
+
+   <dt>For fonts</dt>
+
+   <dd>
+
+    <p>The <a href=3D#origin>origin</a> of a downloada=
ble Web font is an <a href=3D#concept-origin-alias title=3Dconcept-ori=
gin-alias>alias</a> to the <a href=3D#origin>origin</a&=
gt; of the <a href=3D#absolute-url>absolute
+    URL</a> used to obtain the font (after any redirects). <a h=
ref=3D#refsCSSFONTS>[CSSFONTS]</a>
+    <a href=3D#refsCSSFONTLOAD>[CSSFONTLOAD]</a></p> &=
lt;!-- this means you can get data from a remote
+    site if you can make it redirect to your own site in some fashion co=
ntrolled by the data you
+    want to read -->
+
+    <p>The <a href=3D#origin>origin</a> of a locally i=
nstalled system font is an <a href=3D#concept-origin-alias title=3Dcon=
cept-origin-alias>alias</a> to the <a href=3D#origin>origi=
n</a> of the
+    <code><a href=3D#document>Document</a></code&gt=
; in which that font is being used.</p>
+
+    <p>Fonts do not have an <a href=3D#effective-script-origin&=
gt;effective script origin</a>.</p>
+
+   </dd>
+
+  </dl><p>Other specifications can override the above defini=
tions by themselves specifying the origin of
+  a particular <a href=3D#url>URL</a>, <code><a hre=
f=3D#document>Document</a></code>, image, <a href=3D#me=
dia-element>media element</a>, or
+  font.</p>
+
+  <!-- e.g.:
+
+    <p>The <span>origin</span> of a <code>Docume=
nt</code> object returned by the
+    <code>XMLHttpRequest</code> API is an <span title=3D&=
quot;concept-origin-alias">alias</span> to the
+    <span>XMLHttpRequest origin</span> of the <code>XM=
LHttpRequest</code> object.</p>
+
+  -->
+
+  <hr><p>The <dfn id=3Dunicode-serialization-of-an-origin=
>Unicode serialization of an origin</dfn> is the string obtained=
 by applying the
+  following algorithm to the given <a href=3D#origin>origin</a&=
gt;:</p>
+
+  <ol><li><p>If the <a href=3D#origin>origin<=
/a> in question is not a scheme/host/port tuple, then return the
+   literal string "<code title=3D"">null</code&g=
t;" and abort these steps.</li>
+
+   <li><p>Otherwise, let <var title=3D"">res=
ult</var> be the scheme part of the <a href=3D#origin>origin&=
lt;/a>
+   tuple.</li>
+
+   <li><p>Append the string "<code title=3D"&qu=
ot;>://</code>" to <var title=3D"">result&l=
t;/var>.</li>
+
+   <li><p>Apply the IDNA ToUnicode algorithm to each compone=
nt of the host part of the
+   <a href=3D#origin>origin</a> tuple, and append the result=
s — each component, in the same order,
+   separated by U+002E FULL STOP characters (.) — to <var t=
itle=3D"">result</var>. <a href=3D#refsRFC3490>[=
RFC3490]</a></li>
+
+   <li><p>If the port part of the <a href=3D#origin>or=
igin</a> tuple gives a port that is different from the
+   default port for the protocol given by the scheme part of the <a h=
ref=3D#origin>origin</a> tuple, then
+   append a U+003A COLON character (:) and the given port, in base ten, =
to <var title=3D"">result</var>.</li>
+
+   <li><p>Return <var title=3D"">result</=
var>.</li>
+
+  </ol><p>The <dfn id=3Dascii-serialization-of-an-origin&=
gt;ASCII serialization of an origin</dfn> is the string obtained by=
 applying the
+  following algorithm to the given <a href=3D#origin>origin</a&=
gt;:</p>
+
+  <ol><li><p>If the <a href=3D#origin>origin<=
/a> in question is not a scheme/host/port tuple, then return the
+   literal string "<code title=3D"">null</code&g=
t;" and abort these steps.</li>
+
+   <li><p>Otherwise, let <var title=3D"">res=
ult</var> be the scheme part of the <a href=3D#origin>origin&=
lt;/a>
+   tuple.</li>
+
+   <li><p>Append the string "<code title=3D"&qu=
ot;>://</code>" to <var title=3D"">result&l=
t;/var>.</li>
+
+   <li>
+
+    <p>Apply the IDNA ToASCII algorithm to the host part of the &l=
t;a href=3D#origin>origin</a> tuple, with both
+    the AllowUnassigned and UseSTD3ASCIIRules flags set, and append the =
results to <var title=3D"">result</var>.</p>
+
+    <p>If ToASCII fails to convert one of the components of the st=
ring, e.g. because it is too long
+    or because it contains invalid characters, then return the empty str=
ing and abort these steps.
+    <a href=3D#refsRFC3490>[RFC3490]</a></p>
+
+   </li>
+
+   <li><p>If the port part of the <a href=3D#origin>or=
igin</a> tuple gives a port that is different from the
+   default port for the protocol given by the scheme part of the <a h=
ref=3D#origin>origin</a> tuple, then
+   append a U+003A COLON character (:) and the given port, in base ten, =
to <var title=3D"">result</var>.</li>
+
+   <li><p>Return <var title=3D"">result</=
var>.</li>
+
+  </ol><p>Two <a href=3D#origin title=3Dorigin>origins=
</a> are said to be the <dfn id=3Dsame-origin>same origin<=
/dfn> if the
+  following algorithm returns true:</p>
+
+  <ol><li><p>Let <var title=3D"">A<=
/var> be the first <a href=3D#origin>origin</a> being comp=
ared, and <var title=3D"">B</var> be the second &lt=
;a href=3D#origin>origin</a> being compared.</li>
+
+   <li><p>If <var title=3D"">A</var> a=
nd <var title=3D"">B</var> are both opaque identifi=
ers, and their
+   value is equal, then return true.</li>
+
+   <li><p>Otherwise, if either <var title=3D""&=
gt;A</var> or <var title=3D"">B</var> or both=
 are opaque
+   identifiers, return false.</li>
+
+   <li><p>If <var title=3D"">A</var> a=
nd <var title=3D"">B</var> have scheme components t=
hat are not
+   identical, return false.</li>
+
+   <li><p>If <var title=3D"">A</var> a=
nd <var title=3D"">B</var> have host components tha=
t are not
+   identical, return false.</li>
+
+   <li><p>If <var title=3D"">A</var> a=
nd <var title=3D"">B</var> have port components tha=
t are not
+   identical, return false.</li>
+
+   <li><p>If either <var title=3D"">A</va=
r> or <var title=3D"">B</var> have additional da=
ta, but that
+   data is not identical for both, return false.</li>
+
+   <li><p>Return true.</li>
+
+  </ol></div>
+
+
+  <h4 id=3Drelaxing-the-same-origin-restriction><span class=3Ds=
ecno>6.3.1 </span>Relaxing the same-origin restriction</h4&gt=
;
+
+  <dl class=3Ddomintro><dt><var title=3D"">d=
ocument</var> . <code title=3Ddom-document-domain><a href=3D=
#dom-document-domain>domain</a></code> [ =3D <var title=
=3D"">domain</var> ]</dt>
+
+   <dd>
+
+    <p>Returns the current domain used for security checks.</p&=
gt;
+
+    <p>Can be set to a value that removes subdomains, to change th=
e <a href=3D#effective-script-origin>effective script
+    origin</a> to allow pages on other subdomains of the same doma=
in (if they do the same thing)
+    to access each other.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-document-domain title=3Ddom-document-dom=
ain><code>domain</code></dfn> attribute on
+  <code><a href=3D#document>Document</a></code> =
objects must be initialized to <a href=3D"#the-document's-domain&=
quot;>the document's domain</a>, if it has
+  one, and the empty string otherwise. If <a href=3D"#the-docume=
nt's-domain">the document's domain</a> starts with a U+005B
+  LEFT SQUARE BRACKET character ([) and ends with a U+005D RIGHT SQUARE =
BRACKET character (]), it is
+  an IPv6 address; these square brackets must be omitted when initializi=
ng the attribute's
+  value.</p>
+
+  <p>On getting, the attribute must return its current value, unle=
ss the <code><a href=3D#document>Document</a></code&=
gt; has
+  no <a href=3D#browsing-context>browsing context</a>, in wh=
ich case it must return the empty string.</p>
+
+  <p>On setting, the user agent must run the following algorithm:&=
lt;/p>
+
+  <ol><li>
+
+    <p>If the <code><a href=3D#document>Document</a=
></code> has no <a href=3D#browsing-context>browsing conte=
xt</a>, throw a
+    <code><a href=3D#securityerror>SecurityError</a>&l=
t;/code> exception and abort these steps.</p>
+
+   </li>
+
+   <li>
+
+    <p>If the new value is an IPv4 or IPv6 address, let <var ti=
tle=3D"">new value</var> be the new
+    value. Otherwise, apply the IDNA ToASCII algorithm to the new value,=
 with both the
+    AllowUnassigned and UseSTD3ASCIIRules flags set, and let <var tit=
le=3D"">new value</var> be the
+    result of the ToASCII algorithm.</p>
+
+    <p>If ToASCII fails to convert one of the components of the st=
ring, e.g. because it is too long
+    or because it contains invalid characters, then throw a <code>=
<a href=3D#securityerror>SecurityError</a></code> excep=
tion and
+    abort these steps. <a href=3D#refsRFC3490>[RFC3490]</a>&=
lt;/p>
+
+   </li>
+
+   <li>
+
+    <p>If <var title=3D"">new value</var> is=
 not exactly equal to the current value of the <code title=3Ddom-docum=
ent-domain><a href=3D#dom-document-domain>document.domain</a&=
gt;</code> attribute, then run these substeps:</p>
+
+    <ol><li>
+
+      <p>If the current value is an IPv4 or IPv6 address, throw a =
<code><a href=3D#securityerror>SecurityError</a></co=
de>
+      exception and abort these steps.</p>
+
+     </li>
+
+     <li>
+
+      <p>If <var title=3D"">new value</var>,=
 prefixed by a U+002E FULL STOP (.), does not exactly
+      match the end of the current value, throw a <code><a href=
=3D#securityerror>SecurityError</a></code> exception and a=
bort
+      these steps.</p>
+
+      <p class=3Dnote>If the <var title=3D"">new v=
alue</var> is an IPv4 or IPv6 address, it cannot
+      match the <var title=3D"">new value</var> in=
 this way and thus an exception will be thrown
+      here.</p>
+
+      <!-- this is the step that prevents us from ever setting docume=
nt.domain if the >effective
+      script origin< isn't a scheme/host/port tuple -->
+
+     </li>
+
+     <li>
+
+      <p>If <var title=3D"">new value</var> =
matches a suffix in the Public Suffix List, or, if <var title=3D"=
">new value</var>, prefixed by a U+002E FULL STOP (.), matc=
hes the end of a suffix in
+      the Public Suffix List, then throw a <code><a href=3D#sec=
urityerror>SecurityError</a></code> exception and abort th=
ese
+      steps. <a href=3D#refsPSL>[PSL]</a></p>
+
+      <p>Suffixes must be compared after applying the IDNA ToASCII=
 algorithm to them, with both the
+      AllowUnassigned and UseSTD3ASCIIRules flags set, in an <a href=3D=
#ascii-case-insensitive>ASCII case-insensitive</a>
+      manner. <a href=3D#refsRFC3490>[RFC3490]</a></p>
+
+     </li>
+
+    </ol></li>
+
+   <li><p>Release the <a href=3D#storage-mutex>storage=
 mutex</a>.</li>
+
+   <li>
+
+    <p>Set the attribute's value to <var title=3D""&g=
t;new value</var>.</p>
+
+   </li>
+
+   <li>
+
+    <p>If the <a href=3D#effective-script-origin>effective s=
cript origin</a> of the <code><a href=3D#document>Docum=
ent</a></code> is an <a href=3D#concept-origin-alias title=
=3Dconcept-origin-alias>alias</a>, set it to the value of the &l=
t;a href=3D#effective-script-origin>effective script
+    origin</a> (essentially de-aliasing the <a href=3D#effectiv=
e-script-origin>effective script origin</a>).</p>
+
+   </li>
+
+   <li>
+
+    <p>If <var title=3D"">new value</var> is=
 not the empty string, then run these substeps:</p>
+
+    <ol><li>
+
+      <p>Set the host part of the <a href=3D#effective-script-o=
rigin>effective script origin</a> tuple of the
+      <code><a href=3D#document>Document</a></code&=
gt; to <var title=3D"">new value</var>.</p>
+
+     </li>
+
+     <li>
+
+      <p>Set the port part of the <a href=3D#effective-script-o=
rigin>effective script origin</a> tuple of the
+      <code><a href=3D#document>Document</a></code&=
gt; to "manual override" (a value that, for the purposes of &lt=
;a href=3D#same-origin title=3D"same origin">comparing origi=
ns</a>, is identical to "manual override" but not
+      identical to any other value).</p>
+
+     </li>
+
+    </ol></li>
+
+  </ol><p>The <dfn id=3D"the-document's-domain"=
 title=3D"the document's domain">domain</dfn> of a &lt=
;code><a href=3D#document>Document</a></code> is the=
 host part
+  of the document's <a href=3D#origin>origin</a>, if the val=
ue of that <a href=3D#origin>origin</a> is a
+  scheme/host/port tuple. If it isn't, then the document does not have a=
 domain.</p>
+
+  </div>
+
+  <p class=3Dnote>The <code title=3Ddom-document-domain><=
a href=3D#dom-document-domain>domain</a></code> attribute =
is used to enable
+  pages on different hosts of a domain to access each others' DOMs.</=
p>
+
+  <p class=3Dwarning>Do not use the <code title=3Ddom-document-=
domain><a href=3D#dom-document-domain>document.domain</a>&=
lt;/code>
+  attribute when using shared hosting. If an untrusted third party is ab=
le to host an HTTP server at
+  the same IP address but on a different port, then the same-origin prot=
ection that normally
+  protects two different sites on the same host will fail, as the ports =
are ignored when comparing
+  origins after the <code title=3Ddom-document-domain><a href=3D=
#dom-document-domain>document.domain</a></code> attribute =
has been
+  used.</p>
+
+
+
+<!--TOPIC:HTML-->
+
+  <h3 id=3Dsandboxing><span class=3Dsecno>6.4 </span>S=
andboxing</h3>
+
+  <p>A <dfn id=3Dsandboxing-flag-set>sandboxing flag set<=
/dfn> is a set of zero or more of the following flags, which are
+  used to restrict the abilities that potentially untrusted resources ha=
ve:</p>
+
+  <dl><dt>The <dfn id=3Dsandboxed-navigation-browsing-con=
text-flag>sandboxed navigation browsing context flag</dfn></d=
t>
+
+   <dd>
+
+    <p>This flag <a href=3D#sandboxLinks>prevents content fr=
om navigating browsing contexts other
+    than the sandboxed browsing context itself</a> (or browsing co=
ntexts further nested inside it),
+    <a href=3D#auxiliary-browsing-context title=3D"auxiliary bro=
wsing context">auxiliary browsing contexts</a> (which are p=
rotected
+    by the <a href=3D#sandboxed-auxiliary-navigation-browsing-context=
-flag>sandboxed auxiliary navigation browsing context flag</a> d=
efined next), and the
+    <a href=3D#top-level-browsing-context>top-level browsing conte=
xt</a> (which is protected by the <a href=3D#sandboxed-top-level=
-navigation-browsing-context-flag>sandboxed top-level
+    navigation browsing context flag</a> defined below).</p>
+
+    <p>If the <a href=3D#sandboxed-auxiliary-navigation-browsin=
g-context-flag>sandboxed auxiliary navigation browsing context flag&lt=
;/a> is not set, then in
+    certain cases the restrictions nonetheless allow popups (new <a h=
ref=3D#top-level-browsing-context title=3D"top-level browsing
+    context">top-level browsing contexts</a>) to be opened=
. These <a href=3D#browsing-context title=3D"browsing
+    context">browsing contexts</a> always have <dfn id=3D=
one-permitted-sandboxed-navigator>one permitted sandboxed navigator&lt=
;/dfn>, set
+    when the browsing context is created, which allows the <a href=3D=
#browsing-context>browsing context</a> that
+    created them to actually navigate them. (Otherwise, the <a href=3D=
#sandboxed-navigation-browsing-context-flag>sandboxed navigation brows=
ing
+    context flag</a> would prevent them from being navigated even =
if they were opened.)</p>
+
+   </dd>
+
+
+   <dt>The <dfn id=3Dsandboxed-auxiliary-navigation-browsing-co=
ntext-flag>sandboxed auxiliary navigation browsing context flag</df=
n></dt>
+
+   <dd>
+
+    <p>This flag <a href=3D#sandboxWindowOpen>prevents conte=
nt from creating new auxiliary browsing
+    contexts</a>, e.g. using the <code title=3Dattr-hyperlink-t=
arget><a href=3D#attr-hyperlink-target>target</a></code=
> attribute, the
+    <code title=3Ddom-open><a href=3D#dom-open>window.open()=
</a></code> method, or the <code title=3Ddom-showModalDial=
og><a href=3D#dom-showmodaldialog>showModalDialog()</a>&lt=
;/code> method.</p>
+
+   </dd>
+
+
+   <dt>The <dfn id=3Dsandboxed-top-level-navigation-browsing-co=
ntext-flag>sandboxed top-level navigation browsing context flag</df=
n></dt>
+
+   <dd>
+
+    <p>This flag <a href=3D#sandboxLinks>prevents content fr=
om navigating their <span>top-level
+    browsing context</span></a> and <a href=3D#sandboxClo=
se>prevents content from closing their
+    <span>top-level browsing context</span></a>.</p=
>
+
+    <p>When the <a href=3D#sandboxed-top-level-navigation-brows=
ing-context-flag>sandboxed top-level navigation browsing context flag&=
lt;/a> is <em>not</em>
+    set, content can navigate its <a href=3D#top-level-browsing-conte=
xt>top-level browsing context</a>, but other <a href=3D#brows=
ing-context title=3D"browsing context">browsing contexts<=
/a> are still protected by the <a href=3D#sandboxed-navigation-brow=
sing-context-flag>sandboxed
+    navigation browsing context flag</a> and possibly the <a hr=
ef=3D#sandboxed-auxiliary-navigation-browsing-context-flag>sandboxed a=
uxiliary navigation
+    browsing context flag</a>.</p>
+
+   </dd>
+
+
+   <dt>The <dfn id=3Dsandboxed-plugins-browsing-context-flag&gt=
;sandboxed plugins browsing context flag</dfn></dt>
+
+   <dd>
+
+    <p>This flag prevents content from instantiating <a href=3D=
#plugin title=3Dplugin>plugins</a>, whether
+    using <a href=3D#sandboxPluginEmbed>the <code>embed</=
code> element</a>, <a href=3D#sandboxPluginObject>the <=
code>object</code> element</a>, <a href=3D#sandboxPlugi=
nApplet>the <code>applet</code> element</a>, or thro=
ugh <a href=3D#sandboxPluginNavigate>navigation</a> of a <=
a href=3D#nested-browsing-context>nested browsing context</a>, u=
nless
+    those <a href=3D#plugin title=3Dplugin>plugins</a> can b=
e <a href=3D#concept-plugin-secure title=3Dconcept-plugin-secure>se=
cured</a>.</p>
+
+   </dd>
+
+
+   <dt>The <dfn id=3Dsandboxed-seamless-iframes-flag>sandbox=
ed seamless iframes flag</dfn></dt>
+
+   <dd>
+
+    <p>This flag prevents content from using the <code title=3D=
attr-iframe-seamless><a href=3D#attr-iframe-seamless>seamless&lt=
;/a></code>
+    attribute on descendant <code><a href=3D#the-iframe-element=
>iframe</a></code> elements.</p>
+
+    <p class=3Dnote>This prevents a page inserted using the <co=
de title=3Dattr-iframe-sandbox-allow-same-origin><a href=3D#attr-if=
rame-sandbox-allow-same-origin>allow-same-origin</a></code&gt=
; keyword from using a
+    CSS-selector-based method of probing the DOM of other pages on the s=
ame site (in particular,
+    pages that contain user-sensitive information).</p>
+
+    <!-- http://lists.w3.org/Archives/Public/public-web-security/2009=
Dec/thread.html#msg51 -->
+
+   </dd>
+
+
+   <dt>The <dfn id=3Dsandboxed-origin-browsing-context-flag>=
sandboxed origin browsing context flag</dfn></dt>
+
+   <dd>
+
+    <p>This flag <a href=3D#sandboxOrigin>forces content int=
o a unique origin</a>, thus preventing
+    it from accessing other content from the same <a href=3D#origin&g=
t;origin</a>.</p>
+
+    <p>This flag also <a href=3D#sandboxCookies>prevents scr=
ipt from reading from or writing to the
+    <code title=3Ddom-document-cookie>document.cookie</code>=
 IDL attribute</a>, and blocks access to
+    <code title=3Ddom-localStorage><a href=3D#dom-localstorage&=
gt;localStorage</a></code>.
+    </p>
+
+   </dd>
+
+
+   <dt>The <dfn id=3Dsandboxed-forms-browsing-context-flag>s=
andboxed forms browsing context flag</dfn></dt>
+
+   <dd>
+
+    <p>This flag <a href=3D#sandboxSubmitBlocked>blocks form=
 submission</a>.</p>
+
+   </dd>
+
+
+   <dt>The <dfn id=3Dsandboxed-pointer-lock-browsing-context-fl=
ag>sandboxed pointer lock browsing context flag</dfn></dt>
+
+   <dd>
+
+    <p>This flag disables the Pointer Lock API. <a href=3D#refs=
POINTERLOCK>[POINTERLOCK]</a></p>
+
+   </dd>
+
+
+   <dt>The <dfn id=3Dsandboxed-scripts-browsing-context-flag&gt=
;sandboxed scripts browsing context flag</dfn></dt>
+
+   <dd>
+
+    <p>This flag <a href=3D#sandboxScriptBlocked>blocks scri=
pt execution</a>.</p>
+
+   </dd>
+
+
+   <dt>The <dfn id=3Dsandboxed-automatic-features-browsing-cont=
ext-flag>sandboxed automatic features browsing context flag</dfn&gt=
;</dt>
+
+   <dd>
+
+    <p>This flag blocks features that trigger automatically, such =
as <a href=3D#attr-media-autoplay title=3Dattr-media-autoplay>autom=
atically playing a video</a> or <a href=3D#attr-fe-autofocus tit=
le=3Dattr-fe-autofocus>automatically focusing a form control</a>=
.</p>
+
+   </dd>
+
+
+   <dt>The <dfn id=3Dsandboxed-fullscreen-browsing-context-flag=
>sandboxed fullscreen browsing context flag</dfn></dt>
+
+   <dd>
+
+    <p>This flag prevents content from using the <code title=3D=
dom-element-requestFullscreen><a href=3D#dom-element-requestfullscr=
een>requestFullscreen()</a></code> method.</p>
+
+   </dd>
+
+  </dl><p>When the user agent is to <dfn id=3Dparse-a-san=
dboxing-directive>parse a sandboxing directive</dfn>, given a st=
ring <var title=3D"">input</var>, a <a href=3D#s=
andboxing-flag-set>sandboxing flag set</a> <var title=3D&quot=
;">output</var>, and
+  optionally an <var title=3D"">allow fullscreen flag&lt=
;/var>, it must run the following steps:</p>
+
+  <ol><li><p><a href=3D#split-a-string-on-spaces ti=
tle=3D"split a string on spaces">Split <var title=3D&quot=
;">input</var> on spaces</a>,
+   to obtain <var title=3D"">tokens</var>.</li&=
gt;
+
+   <li><p>Let <var title=3D"">output</var=
> be empty.</li>
+
+   <li>
+
+    <p>Add the following flags to <var title=3D"">=
output</var>:</p>
+
+    <ul><li><p>The <a href=3D#sandboxed-navigation-=
browsing-context-flag>sandboxed navigation browsing context flag</a=
>.</li>
+
+     <li><p>The <a href=3D#sandboxed-auxiliary-navigation=
-browsing-context-flag>sandboxed auxiliary navigation browsing context=
 flag</a>, unless <var title=3D"">tokens</var&gt=
; contains the <dfn id=3Dattr-iframe-sandbox-allow-popups title=3Dattr=
-iframe-sandbox-allow-popups><code>allow-popups</code><=
/dfn> keyword.</li>
+
+     <li><p>The <a href=3D#sandboxed-top-level-navigation=
-browsing-context-flag>sandboxed top-level navigation browsing context=
 flag</a>, unless <var title=3D"">tokens</var&gt=
; contains the <dfn id=3Dattr-iframe-sandbox-allow-top-navigation titl=
e=3Dattr-iframe-sandbox-allow-top-navigation><code>allow-top-nav=
igation</code></dfn>
+     keyword.</li>
+
+     <li><p>The <a href=3D#sandboxed-plugins-browsing-con=
text-flag>sandboxed plugins browsing context flag</a>.</li&gt=
;
+
+     <li><p>The <a href=3D#sandboxed-seamless-iframes-fla=
g>sandboxed seamless iframes flag</a>.</li>
+
+     <li>
+
+      <p>The <a href=3D#sandboxed-origin-browsing-context-flag&=
gt;sandboxed origin browsing context flag</a>, unless the <var t=
itle=3D"">tokens</var> contains the <dfn id=3Dattr-=
iframe-sandbox-allow-same-origin title=3Dattr-iframe-sandbox-allow-same-o=
rigin><code>allow-same-origin</code></dfn>
+      keyword.</p>
+
+      <div class=3Dnote>
+
+       <p>The <code title=3Dattr-iframe-sandbox-allow-same-orig=
in><a href=3D#attr-iframe-sandbox-allow-same-origin>allow-same-o=
rigin</a></code> keyword
+       is intended for two cases.</p>
+
+       <p>First, it can be used to allow content from the same sit=
e to be sandboxed to disable
+       scripting, while still allowing access to the DOM of the sandboxe=
d content.</p>
+
+       <p>Second, it can be used to embed content from a third-par=
ty site, sandboxed to prevent that
+       site from opening pop-up windows, etc, without preventing the emb=
edded page from
+       communicating back to its originating site, using the database AP=
Is to store data, etc.</p>
+
+      </div>
+
+     </li>
+
+     <li><p>The <a href=3D#sandboxed-forms-browsing-conte=
xt-flag>sandboxed forms browsing context flag</a>, unless <va=
r title=3D"">tokens</var> contains the <dfn id=3Dat=
tr-iframe-sandbox-allow-forms title=3Dattr-iframe-sandbox-allow-forms>=
<code>allow-forms</code></dfn> keyword.</li>
+
+     <li><p>The <a href=3D#sandboxed-pointer-lock-browsin=
g-context-flag>sandboxed pointer lock browsing context flag</a>,=
 unless <var title=3D"">tokens</var> contains the &=
lt;dfn id=3Dattr-iframe-sandbox-allow-pointer-lock title=3Dattr-iframe-sa=
ndbox-allow-pointer-lock><code>allow-pointer-lock</code>&l=
t;/dfn>
+     keyword.</li>
+
+     <li><p>The <a href=3D#sandboxed-scripts-browsing-con=
text-flag>sandboxed scripts browsing context flag</a>, unless &l=
t;var title=3D"">tokens</var> contains the <dfn id=3D=
attr-iframe-sandbox-allow-scripts title=3Dattr-iframe-sandbox-allow-scrip=
ts><code>allow-scripts</code></dfn> keyword.</li&=
gt;
+
+     <li>
+
+      <p>The <a href=3D#sandboxed-automatic-features-browsing-c=
ontext-flag>sandboxed automatic features browsing context flag</a&g=
t;, unless <var title=3D"">tokens</var> contains th=
e <code title=3Dattr-iframe-sandbox-allow-scripts><a href=3D#att=
r-iframe-sandbox-allow-scripts>allow-scripts</a></code> ke=
yword (defined above).</p>
+
+      <p class=3Dnote>This flag is relaxed by the same keyword as =
scripts, because when scripts are
+      enabled these features are trivially possible anyway, and it would=
 be unfortunate to force
+      authors to use script to do them when sandboxed rather than allowi=
ng them to use the
+      declarative features.</p>
+
+     </li>
+
+     <li><p>The <a href=3D#sandboxed-fullscreen-browsing-=
context-flag>sandboxed fullscreen browsing context flag</a>, unl=
ess the <var title=3D"">allow fullscreen flag</var>=
 was passed to the <a href=3D#parse-a-sandboxing-directive>parse a =
sandboxing
+     directive</a> flag.</li>
+
+    </ul></li>
+
+  </ol><hr><p>Every <a href=3D#top-level-browsing-c=
ontext>top-level browsing context</a> has a <dfn id=3Dpopup-s=
andboxing-flag-set>popup sandboxing flag set</dfn>, which
+  is a <a href=3D#sandboxing-flag-set>sandboxing flag set</a&gt=
;. When a <a href=3D#browsing-context>browsing context</a> is=
 created, its
+  <a href=3D#popup-sandboxing-flag-set>popup sandboxing flag set&l=
t;/a> must be empty. It is populated by <a href=3D#the-rules-for-ch=
oosing-a-browsing-context-given-a-browsing-context-name>the rules for
+  choosing a browsing context given a browsing context name</a>.&l=
t;/p>
+
+  <p>Every <a href=3D#nested-browsing-context>nested browsin=
g context</a> has an <dfn id=3Diframe-sandboxing-flag-set>&lt=
;code>iframe</code> sandboxing flag
+  set</dfn>, which is a <a href=3D#sandboxing-flag-set>sandb=
oxing flag set</a>. Which flags in a <a href=3D#nested-browsing-=
context>nested browsing
+  context</a>'s <a href=3D#iframe-sandboxing-flag-set><co=
de>iframe</code> sandboxing flag set</a> are set at any pa=
rticular
+  time is determined by the <code><a href=3D#the-iframe-element=
>iframe</a></code> element's <code title=3Dattr-iframe-=
sandbox><a href=3D#attr-iframe-sandbox>sandbox</a></cod=
e> attribute.</p>
+
+  <p>Every <code><a href=3D#document>Document</a&gt=
;</code> has an <dfn id=3Dactive-sandboxing-flag-set>active s=
andboxing flag set</dfn>, which is a
+  <a href=3D#sandboxing-flag-set>sandboxing flag set</a>. Wh=
en the <code><a href=3D#document>Document</a></code&=
gt; is created, its <a href=3D#active-sandboxing-flag-set>active
+  sandboxing flag set</a> must be empty. It is populated by the &l=
t;a href=3D#navigate title=3Dnavigate>navigation
+  algorithm</a>.</p>
+
+  <p>Every resource that is obtained by the <a href=3D#navigate=
 title=3Dnavigate>navigation algorithm</a> has a
+  <dfn id=3Dforced-sandboxing-flag-set>forced sandboxing flag set&=
lt;/dfn>, which is a <a href=3D#sandboxing-flag-set>sandboxing f=
lag set</a>. A resource by
+  default has no flags set in its <a href=3D#forced-sandboxing-flag-s=
et>forced sandboxing flag set</a>, but other specifications
+  can define that certain flags are set.</p>
+
+  <p class=3Dnote>In particular, the <a href=3D#forced-sandboxi=
ng-flag-set>forced sandboxing flag set</a> is used by the Conten=
t
+  Security Policy specification. <a href=3D#refsCSP>[CSP]</a&gt=
;</p>
+
+  <hr><p>When a user agent is to <dfn id=3Dimplement-the-=
sandboxing>implement the sandboxing</dfn> for a <code><=
a href=3D#document>Document</a></code>, it
+  must populate <code><a href=3D#document>Document</a>=
</code>'s <a href=3D#active-sandboxing-flag-set>active sandbo=
xing flag set</a> with the union of
+  the flags that are present in the following <a href=3D#sandboxing-f=
lag-set title=3D"sandboxing flag set">sandboxing flag
+  sets</a> at the time the <code><a href=3D#document>D=
ocument</a></code> object is created:</p>
+
+  <ul><li><p>If the <code><a href=3D#document=
>Document</a></code>'s <a href=3D#browsing-context>b=
rowsing context</a> is a <a href=3D#top-level-browsing-context&g=
t;top-level browsing
+   context</a>, then: the flags set on the <a href=3D#browsing-=
context>browsing context</a>'s <a href=3D#popup-sandboxing-fl=
ag-set>popup sandboxing
+   flag set</a>.</li>
+
+   <li><p>If the <code><a href=3D#document>Docum=
ent</a></code>'s <a href=3D#browsing-context>browsing c=
ontext</a> is a <a href=3D#nested-browsing-context>nested bro=
wsing
+   context</a>, then: the flags set on the <a href=3D#browsing-=
context>browsing context</a>'s
+   <a href=3D#iframe-sandboxing-flag-set><code>iframe</co=
de> sandboxing flag set</a>.</li>
+
+   <li><p>If the <code><a href=3D#document>Docum=
ent</a></code>'s <a href=3D#browsing-context>browsing c=
ontext</a> is a <a href=3D#nested-browsing-context>nested bro=
wsing
+   context</a>, then: the flags set on the <a href=3D#browsing-=
context>browsing context</a>'s <a href=3D#parent-browsing-con=
text>parent browsing
+   context</a>'s <a href=3D#active-document>active document&=
lt;/a>'s <a href=3D#active-sandboxing-flag-set>active sandboxing=
 flag set</a>.</li>
+
+   <li><p>The flags set on the <code><a href=3D#doc=
ument>Document</a></code>'s resource's <a href=3D#force=
d-sandboxing-flag-set>forced sandboxing flag
+   set</a>, if it has one.</li>
+
+  </ul><h3 id=3Dhistory><span class=3Dsecno>6.5 </s=
pan>Session history and navigation</h3>
+
+  <h4 id=3Dthe-session-history-of-browsing-contexts><span class=
=3Dsecno>6.5.1 </span>The session history of browsing contexts&l=
t;/h4>
+
+  <p>The sequence of <code><a href=3D#document>Documen=
t</a></code>s in a <a href=3D#browsing-context>browsing=
 context</a> is its <dfn id=3Dsession-history>session
+  history</dfn>.</p>
+
+  <p><code><a href=3D#history-0>History</a></=
code> objects provide a representation of the pages in the session his=
tory of
+  <a href=3D#browsing-context title=3D"browsing context"&gt=
;browsing contexts</a>. Each <a href=3D#browsing-context>brow=
sing context</a>,
+  including <a href=3D#nested-browsing-context title=3D"nested b=
rowsing context">nested browsing contexts</a>, has a distin=
ct
+  session history.</p>
+
+  <p>Each <code><a href=3D#document>Document</a>=
</code> object in a <a href=3D#browsing-context>browsing cont=
ext</a>'s <a href=3D#session-history>session
+  history</a> is associated with a unique instance of the <code=
><a href=3D#history-0>History</a></code> object, alt=
hough
+  they all must model the same underlying <a href=3D#session-history&=
gt;session history</a>.</p>
+
+  <div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-history title=3Ddom-history><code&=
gt;history</code></dfn> attribute of the <code><a hr=
ef=3D#window>Window</a></code>
+  interface must return the object implementing the <code><a hr=
ef=3D#history-0>History</a></code> interface for that <=
a href=3D#concept-document-window title=3Dconcept-document-window><=
code>Window</code> object's newest
+  <code>Document</code></a>.</p>
+
+  </div>
+
+  <p><code><a href=3D#history-0>History</a></=
code> objects represent their <a href=3D#browsing-context>browsi=
ng context</a>'s session history as
+  a flat list of <a href=3D#session-history-entry title=3D"sessi=
on history entry">session history entries</a>. Each
+  <dfn id=3Dsession-history-entry>session history entry</dfn&gt=
; consists of a <a href=3D#url>URL</a> and optionally a <a=
 href=3D#state-object>state
+  object</a><span class=3Dimpl>, and may in addition have a =
title, a <code><a href=3D#document>Document</a></cod=
e>
+  object, form data, a scroll position, and other information associated=
 with it</span>.</p>
+
+  <div class=3Dimpl>
+
+  <p class=3Dnote>This does not imply that the user interface need=
 be linear. See the <a href=3D#history-notes>notes below</a>.=
</p>
+
+  </div>
+
+  <p class=3Dnote>Titles associated with <a href=3D#session-his=
tory-entry title=3D"session history entry">session history
+  entries</a> need not have any relation with the current <code=
><a href=3D#the-title-element>title</a></code> of th=
e
+  <code><a href=3D#document>Document</a></code>.=
 The title of a <a href=3D#session-history-entry>session history en=
try</a> is intended to explain
+  the state of the document at that point, so that the user can navigate=
 the document's history.</p>
+
+  <p>URLs without associated <a href=3D#state-object title=3D&q=
uot;state object">state objects</a> are added to the
+  session history as the user (or script) navigates from page to page.&l=
t;/p>
+
+  <p>A <dfn id=3Dstate-object>state object</dfn> is an=
 object representing a user interface state.</p>
+
+  <p>Pages can <a href=3D#dom-history-pushstate title=3Ddom-his=
tory-pushState>add</a> <a href=3D#state-object title=3D"=
state object">state
+  objects</a> to the session history. These are then <a href=3D=
#event-popstate title=3Devent-popstate>returned to the
+  script</a> when the user (or script) goes back in the history, t=
hus enabling authors to use the
+  "navigation" metaphor even in one-page applications.</p&g=
t;
+
+  <div class=3Dnote>
+
+   <p><a href=3D#state-object title=3D"state object"&=
gt;State objects</a> are intended to be used for two main purposes:
+   first, storing a preparsed description of the state in the <a href=
=3D#url>URL</a> so that in the simple
+   case an author doesn't have to do the parsing (though one would still=
 need the parsing for
+   handling <a href=3D#url title=3DURL>URLs</a> passed aroun=
d by users, so it's only a minor
+   optimization), and second, so that the author can store state that on=
e wouldn't store in the URL
+   because it only applies to the current <code><a href=3D#docu=
ment>Document</a></code> instance and it would have to be
+   reconstructed if a new <code><a href=3D#document>Document=
</a></code> were opened.</p>
+
+   <p>An example of the latter would be something like keeping tra=
ck of the precise coordinate from
+   which a pop-up <code><a href=3D#the-div-element>div</a=
></code> was made to animate, so that if the user goes back, it =
can be
+   made to animate to the same location. Or alternatively, it could be u=
sed to keep a pointer into a
+   cache of data that would be fetched from the server based on the info=
rmation in the
+   <a href=3D#url>URL</a>, so that when going back and forwa=
rd, the information doesn't have to be fetched
+   again.</p>
+
+  </div>
+
+  <hr><p>At any point, one of the entries in the session his=
tory is the <dfn id=3Dcurrent-entry>current entry</dfn>. This
+  is the entry representing the <a href=3D#active-document>active =
document</a> of the <a href=3D#browsing-context>browsing cont=
ext</a>.
+  Which entry is the <a href=3D#current-entry>current entry</a&=
gt; is changed by the algorithms defined in this
+  specification, e.g. during <a href=3D#traverse-the-history title=3D=
"traverse the history">session history
+  traversal</a>.</p>
+
+  <p class=3Dnote>The <a href=3D#current-entry>current entry=
</a> is usually an entry for the <a href=3D"#the-document's=
-address" title=3D"the
+  document's address">address</a> of the <code><a=
 href=3D#document>Document</a></code>. However, it can als=
o be one of
+  the entries for <a href=3D#state-object title=3D"state object&=
quot;>state objects</a> added to the history by that
+  document.</p>
+
+  <p><dfn id=3Dan-entry-with-persisted-user-state>An entry w=
ith persisted user state</dfn> is one that also has user-agent defi=
ned state.
+  This specification does not specify what kind of state can be stored.&=
lt;/p>
+ =20
+  <p class=3Dexample>For example, some user agents might want to p=
ersist the scroll position, or the
+  values of form controls.</p>
+
+  <p class=3Dnote>User agents that persist the value of form contr=
ols are encouraged to also persist
+  their directionality (the value of the element's <code title=3Dattr=
-dir><a href=3D#the-dir-attribute>dir</a></code> att=
ribute).
+  This prevents values from being displayed incorrectly after a history =
traversal when the user had
+  originally entered the values with an explicit, non-default directiona=
lity.</p>
+
+  <p>Entries that consist of <a href=3D#state-object title=3D&q=
uot;state object">state objects</a> share the same
+  <code><a href=3D#document>Document</a></code> =
as the entry for the page that was active when they were added.</p>
+
+  <p>Contiguous entries that differ just by fragment identifier al=
so share the same
+  <code><a href=3D#document>Document</a></code>.=
</p>
+
+  <p class=3Dnote>All entries that share the same <code><=
a href=3D#document>Document</a></code> (and that are there=
fore
+  merely different states of one particular document) are contiguous by =
definition.</p>
+
+  <p>Each <code><a href=3D#document>Document</a>=
</code> in a <a href=3D#browsing-context>browsing context<=
/a> can also have a <dfn id=3Dlatest-entry>latest
+  entry</dfn>. This is the entry or that <code><a href=3D=
#document>Document</a></code> that was most the recently t=
raversed
+  to. When a <code><a href=3D#document>Document</a>&lt=
;/code> is created, it initially has no <a href=3D#latest-entry>=
latest entry</a>.</p>
+
+  <div class=3Dimpl>
+
+  <p>User agents may <a href=3D#discard-a-document title=3D&quo=
t;discard a Document">discard</a> the <code><a hre=
f=3D#document>Document</a></code>
+  objects of entries other than the <a href=3D#current-entry>curre=
nt entry</a> that are not referenced from any
+  script, reloading the pages afresh when the user or script navigates b=
ack to such pages. This
+  specification does not specify when user agents should discard <cod=
e><a href=3D#document>Document</a></code> objects an=
d
+  when they should cache them.</p>
+
+  <p>Entries that have had their <code><a href=3D#documen=
t>Document</a></code> objects discarded must, for the purp=
oses of
+  the algorithms given below, act as if they had not. When the user or s=
cript navigates back or
+  forwards to a page which has no in-memory DOM objects, any other entri=
es that shared the same
+  <code><a href=3D#document>Document</a></code> =
object with it must share the new object as well.</p>
+
+  </div>
+
+
+
+<!--TOPIC:DOM APIs-->
+  <h4 id=3Dthe-history-interface><span class=3Dsecno>6.5.2 &=
lt;/span>The <code><a href=3D#history-0>History</a>&=
lt;/code> interface</h4>
+
+  <pre class=3Didl>interface <dfn id=3Dhistory-0>History<=
/dfn> {
+  readonly attribute long <a href=3D#dom-history-length title=3Ddom-h=
istory-length>length</a>;
+  readonly attribute any <a href=3D#dom-history-state title=3Ddom-his=
tory-state>state</a>;
+  void <a href=3D#dom-history-go title=3Ddom-history-go>go</a&g=
t;(optional long delta);
+  void <a href=3D#dom-history-back title=3Ddom-history-back>back&l=
t;/a>();
+  void <a href=3D#dom-history-forward title=3Ddom-history-forward>=
forward</a>();
+  void <a href=3D#dom-history-pushstate title=3Ddom-history-pushState=
>pushState</a>(any data, DOMString title, optional DOMString? ur=
l =3D null);
+  void <a href=3D#dom-history-replacestate title=3Ddom-history-replac=
eState>replaceState</a>(any data, DOMString title, optional DOMS=
tring? url =3D null);
+};</pre>
+
+  <dl class=3Ddomintro><dt><var title=3D"">w=
indow</var> . <code title=3Ddom-history><a href=3D#dom-his=
tory>history</a></code> . <code title=3Ddom-history-len=
gth><a href=3D#dom-history-length>length</a></code>&=
lt;/dt>
+
+   <dd>
+
+    <p>Returns the number of entries in the <a href=3D#joint-se=
ssion-history>joint session history</a>.</p>
+
+   </dd>
+
+   <dt><var title=3D"">window</var> . <co=
de title=3Ddom-history><a href=3D#dom-history>history</a>&=
lt;/code> . <code title=3Ddom-history-state><a href=3D#dom-hi=
story-state>state</a></code></dt>
+
+   <dd>
+
+    <p>Returns the current <a href=3D#state-object>state obj=
ect</a>.</p>
+
+   </dd>
+
+   <dt><var title=3D"">window</var> . <co=
de title=3Ddom-history><a href=3D#dom-history>history</a>&=
lt;/code> . <code title=3Ddom-history-go><a href=3D#dom-histo=
ry-go>go</a></code>( [ <var title=3D"">del=
ta</var> ] )</dt>
+
+   <dd>
+
+    <p>Goes back or forward the specified number of steps in the &=
lt;a href=3D#joint-session-history>joint session history</a>.&lt=
;/p>
+
+    <p>A zero delta will reload the current page.</p>
+
+    <p>If the delta is out of range, does nothing.</p>
+
+   </dd>
+
+   <dt><var title=3D"">window</var> . <co=
de title=3Ddom-history><a href=3D#dom-history>history</a>&=
lt;/code> . <code title=3Ddom-history-back><a href=3D#dom-his=
tory-back>back</a></code>()</dt>
+
+   <dd>
+
+    <p>Goes back one step in the <a href=3D#joint-session-histo=
ry>joint session history</a>.</p>
+
+    <p>If there is no previous page, does nothing.</p>
+
+   </dd>
+
+   <dt><var title=3D"">window</var> . <co=
de title=3Ddom-history><a href=3D#dom-history>history</a>&=
lt;/code> . <code title=3Ddom-history-forward><a href=3D#dom-=
history-forward>forward</a></code>()</dt>
+
+   <dd>
+
+    <p>Goes forward one step in the <a href=3D#joint-session-hi=
story>joint session history</a>.</p>
+
+    <p>If there is no next page, does nothing.</p>
+
+   </dd>
+
+   <dt><var title=3D"">window</var> . <co=
de title=3Ddom-history><a href=3D#dom-history>history</a>&=
lt;/code> . <code title=3Ddom-history-pushState><a href=3D#do=
m-history-pushstate>pushState</a></code>(<var title=3D&=
quot;">data</var>, <var title=3D"">title&lt=
;/var> [, <var title=3D"">url</var> ] )</dt&g=
t;
+
+   <dd>
+
+    <p>Pushes the given data onto the session history, with the gi=
ven title, and, if provided and
+    not null, the given URL.</p>
+
+   </dd>
+
+   <dt><var title=3D"">window</var> . <co=
de title=3Ddom-history><a href=3D#dom-history>history</a>&=
lt;/code> . <code title=3Ddom-history-replaceState><a href=3D=
#dom-history-replacestate>replaceState</a></code>(<var =
title=3D"">data</var>, <var title=3D""&gt=
;title</var> [, <var title=3D"">url</var> ] )=
</dt>
+
+   <dd>
+
+    <p>Updates the current entry in the session history to have th=
e given data, title, and, if
+    provided and not null, URL.</p>
+
+   </dd>
+
+  </dl><!--TOPIC:HTML--><p>The <dfn id=3Djoint-sess=
ion-history>joint session history</dfn> of a <a href=3D#top-l=
evel-browsing-context>top-level browsing context</a> is the unio=
n
+  of all the <a href=3D#session-history title=3D"session history=
">session histories</a> of all <a href=3D#browsing-conte=
xt title=3D"browsing
+  context">browsing contexts</a> of all the <a href=3D#=
fully-active>fully active</a> <code><a href=3D#document=
>Document</a></code>
+  objects that share that <a href=3D#top-level-browsing-context>to=
p-level browsing context</a>, with all the entries that are
+  <a href=3D#current-entry title=3D"current entry">curre=
nt entries</a> in their respective <a href=3D#session-history ti=
tle=3D"session
+  history">session histories</a> removed except for the &l=
t;a href=3D#current-entry-of-the-joint-session-history>current entry o=
f the joint session
+  history</a>.</p>
+
+  <p>The <dfn id=3Dcurrent-entry-of-the-joint-session-history&g=
t;current entry of the joint session history</dfn> is the entry tha=
t most recently
+  became a <a href=3D#current-entry>current entry</a> in its=
 <a href=3D#session-history>session history</a>.</p>
+
+  <p>Entries in the <a href=3D#joint-session-history>joint s=
ession history</a> are ordered chronologically by the time they
+  were added to their respective <a href=3D#session-history title=3D&=
quot;session history">session histories</a>. Each entry
+  has an index; the earliest entry has index 0, and the subsequent entri=
es are numbered with
+  consecutively increasing integers (1, 2, 3, etc).</p>
+
+  <p class=3Dnote>Since each <code><a href=3D#document&gt=
;Document</a></code> in a <a href=3D#browsing-context>b=
rowsing context</a> might have a
+  different <a href=3D#event-loop>event loop</a>, the actual=
 state of the <a href=3D#joint-session-history>joint session histor=
y</a> can
+  be someone nebulous. For example, two sibling <code><a href=3D=
#the-iframe-element>iframe</a></code> elements could both =
<a href=3D#traverse-the-history title=3D"traverse the history&quo=
t;>traverse</a> from one unique origin to another at the same ti=
me,
+  so their precise order might not be well-defined; similarly, since the=
y might only find out about
+  each other later, they might disagree about the length of the <a hr=
ef=3D#joint-session-history>joint session
+  history</a>.</p>
+
+<!--TOPIC:DOM APIs-->
+
+  <div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-history-length title=3Ddom-history-lengt=
h><code>length</code></dfn> attribute of the
+  <code><a href=3D#history-0>History</a></code> =
interface must return the number of entries in the <a href=3D#top-leve=
l-browsing-context>top-level browsing
+  context</a>'s <a href=3D#joint-session-history>joint sessi=
on history</a>.</p>
+
+  <p>The actual entries are not accessible from script.</p>
+
+  <p>The <dfn id=3Ddom-history-state title=3Ddom-history-state&=
gt;<code>state</code></dfn> attribute of the
+  <code><a href=3D#history-0>History</a></code> =
interface must return the last value it was set to by the user agent.
+  Initially, its value must be null.</p>
+
+  <p>When the <dfn id=3Ddom-history-go title=3Ddom-history-go&g=
t;<code>go(<var title=3D"">delta</var>)</c=
ode></dfn> method is
+  invoked, if the argument to the method was omitted or has the value ze=
ro, the user agent must act
+  as if the <code title=3Ddom-location-reload><a href=3D#dom-lo=
cation-reload>location.reload()</a></code> method was call=
ed instead.
+  Otherwise, the user agent must <a href=3D#traverse-the-history-by-a=
-delta>traverse the history by a delta</a> whose value is the
+  value of the method's argument.</p>
+
+  <p>When the <dfn id=3Ddom-history-back title=3Ddom-history-ba=
ck><code>back()</code></dfn> method is invoked, the =
user
+  agent must <a href=3D#traverse-the-history-by-a-delta>traverse t=
he history by a delta</a> −1.</p>
+
+  <p>When the <dfn id=3Ddom-history-forward title=3Ddom-history=
-forward><code>forward()</code></dfn>method is invok=
ed, the
+  user agent must <a href=3D#traverse-the-history-by-a-delta>trave=
rse the history by a delta</a> +1.</p>
+
+<!--TOPIC:HTML-->
+
+  <hr><p>Each <a href=3D#top-level-browsing-context>to=
p-level browsing context</a> has a <dfn id=3Dsession-history-tra=
versal-queue>session history traversal queue</dfn>,
+  initially empty, to which <a href=3D#concept-task title=3Dconcept-t=
ask>tasks</a> can be added.</p>
+
+  <p>Each <a href=3D#top-level-browsing-context>top-level br=
owsing context</a>, when created, must asynchronously begin running
+  the following algorithm, known as the <dfn id=3Dsession-history-eve=
nt-loop>session history event loop</dfn> for that
+  <a href=3D#top-level-browsing-context>top-level browsing context=
</a>:</p>
+
+  <ol><li><p>Wait until this <a href=3D#top-level-b=
rowsing-context>top-level browsing context</a>'s <a href=3D#s=
ession-history-traversal-queue>session history traversal
+   queue</a> is not empty.</li>
+
+   <li><p>Pull the first <a href=3D#concept-task title=3D=
concept-task>task</a> from this <a href=3D#top-level-browsing=
-context>top-level browsing
+   context</a>'s <a href=3D#session-history-traversal-queue>=
session history traversal queue</a>, and execute it.</li>
+
+   <li><p>Return to the first step of this algorithm.</p&=
gt;
+
+  </ol><p>The <a href=3D#session-history-event-loop>se=
ssion history event loop</a> helps coordinate cross-browsing-contex=
t transitions
+  of the <a href=3D#joint-session-history>joint session history&lt=
;/a>: since each <a href=3D#browsing-context>browsing context&lt=
;/a> might, at any
+  particular time, have a different <a href=3D#event-loop>event lo=
op</a> (this can happen if the user agent has
+  more than one <a href=3D#event-loop>event loop</a> per &lt=
;a href=3D#unit-of-related-browsing-contexts>unit of related browsing =
contexts</a>),
+  transitions would otherwise have to involve cross-event-loop synchroni=
sation.</p>
+
+  <hr><p>To <dfn id=3Dtraverse-the-history-by-a-delta>=
traverse the history by a delta</dfn> <var title=3D""&=
gt;delta</var>, the user agent must
+  append a <a href=3D#concept-task title=3Dconcept-task>task</a=
> to this <a href=3D#top-level-browsing-context>top-level browsi=
ng context</a>'s
+  <a href=3D#session-history-traversal-queue>session history trave=
rsal queue</a>, the <a href=3D#concept-task title=3Dconcept-task=
>task</a>
+  consisting of running the following steps:</p>
+
+  <ol><li><p>Let <var title=3D"">delta=
</var> be the argument to the method.</li>
+
+   <li><p>If the index of the <a href=3D#current-entry-of=
-the-joint-session-history>current entry of the joint session history&=
lt;/a> plus <var title=3D"">delta</var> is less =
than zero or greater than or equal to the number of items in the
+   <a href=3D#joint-session-history>joint session history</a&gt=
;, then abort these steps.</p>
+
+   <li><p>Let <var title=3D"">specified entr=
y</var> be the entry in the <a href=3D#joint-session-history>=
joint session
+   history</a> whose index is the sum of <var title=3D"&qu=
ot;>delta</var> and the index of the
+   <a href=3D#current-entry-of-the-joint-session-history>current e=
ntry of the joint session history</a>.</li>
+
+   <li><p>Let <var title=3D"">specified brow=
sing context</var> be the <a href=3D#browsing-context>browsin=
g context</a> of
+   the <var title=3D"">specified entry</var>.</=
li>
+
+   <li><p>If the <var title=3D"">specified b=
rowsing context</var>'s <a href=3D#active-document>active doc=
ument</a>'s
+   <a href=3D#unload-a-document>unload a document</a> algori=
thm is currently running, abort these steps.</li>
+
+   <li>
+
+    <p><a href=3D#queue-a-task>Queue a task</a> that c=
onsists of running the following substeps. The relevant
+    <a href=3D#event-loop>event loop</a> is that of the <=
var title=3D"">specified browsing context</var>'s
+    <a href=3D#active-document>active document</a>. The <=
a href=3D#task-source>task source</a> for the queued task is the
+    <a href=3D#history-traversal-task-source>history traversal tas=
k source</a>.</p>
+
+    <ol><li><p>If there is an ongoing attempt to navig=
ate <var title=3D"">specified browsing context</var&gt=
;
+     that has not yet <a href=3D#concept-navigate-mature title=3Dconc=
ept-navigate-mature>matured</a> (i.e. it has not passed the
+     point of making its <code><a href=3D#document>Document&=
lt;/a></code> the <a href=3D#active-document>active docume=
nt</a>), then cancel that
+     attempt to navigate the <a href=3D#browsing-context>browsing =
context</a>.</li>
+
+     <li>
+
+      <p>If the <var title=3D"">specified browsing=
 context</var>'s <a href=3D#active-document>active document&l=
t;/a> is not
+      the same <code><a href=3D#document>Document</a>&=
lt;/code> as the <code><a href=3D#document>Document</a&=
gt;</code> of the <var title=3D"">specified
+      entry</var>, then run these substeps:</p>
+
+      <ol><li><p><a href=3D#fully-exit-fullscreen&g=
t;Fully exit fullscreen</a>.</li>
+
+       <li><p><a href=3D#prompt-to-unload-a-document titl=
e=3D"prompt to unload a document">Prompt to unload</a>=
 the <a href=3D#active-document>active
+       document</a> of the <var title=3D"">specifi=
ed browsing context</var>. If the user
+       <a href=3D#refused-to-allow-the-document-to-be-unloaded>ref=
used to allow the document to be unloaded</a>, then abort these ste=
ps.</li>
+
+       <li><p><a href=3D#unload-a-document title=3D"=
unload a document">Unload</a> the <a href=3D#active-docu=
ment>active document</a> of the
+       <var title=3D"">specified browsing context</va=
r> with the <var title=3D"">recycle</var> parame=
ter
+       set to false.</li>
+
+      </ol></li>
+
+     <li><p><a href=3D#traverse-the-history>Traverse t=
he history</a> of the <var title=3D"">specified bro=
wsing context</var> to
+     the <var title=3D"">specified entry</var>.&lt=
;/p>
+
+    </ol></li>
+
+  </ol><p>When the user navigates through a <a href=3D#br=
owsing-context>browsing context</a>, e.g. using a browser's back
+  and forward buttons, the user agent must <a href=3D#traverse-the-hi=
story-by-a-delta>traverse the history by a delta</a> equivalent
+  to the action specified by the user.</p>
+
+  <hr><!--TOPIC:DOM APIs--><p>The <dfn id=3Ddom-his=
tory-pushstate title=3Ddom-history-pushState><code>pushState(&lt=
;var title=3D"">data</var>, <var title=3D"&quo=
t;>title</var>, <var title=3D"">url</var>)=
</code></dfn> method adds a state object entry to
+  the history.</p>
+
+  <p>The <dfn id=3Ddom-history-replacestate title=3Ddom-history=
-replaceState><code>replaceState(<var title=3D""&gt=
;data</var>, <var title=3D"">title</var>, &lt=
;var title=3D"">url</var>)</code></dfn> me=
thod updates the state object,
+  title, and optionally the <a href=3D#url>URL</a> of the &l=
t;a href=3D#current-entry>current entry</a> in the history.</=
p>
+
+  <p>When either of these methods is invoked, the user agent must =
run the following steps:</p>
+
+  <ol><li><p>Let <var title=3D"">clone=
d data</var> be a <a href=3D#structured-clone>structured clon=
e</a> of the specified
+   <var title=3D"">data</var>. If this throws an e=
xception, then rethrow that exception and abort
+   these steps.</li>
+
+   <li>
+
+    <p>If the third argument is not null, run these substeps:</=
p>
+
+    <ol><!--CLEANUP--><li><a href=3D#resolve-a-url =
title=3D"resolve a url">Resolve</a> the value of the t=
hird argument, relative to the
+     <a href=3D#api-base-url>API base URL</a> specified by t=
he
+     <a href=3D#entry-settings-object>entry settings object</a&=
gt;.</li>
+
+     <li>If that fails, throw a <code><a href=3D#security=
error>SecurityError</a></code> exception and abort these s=
teps.</li>
+
+     <li>Compare the resulting <a href=3D#parsed-url>parsed =
URL</a> to the result of applying the <a href=3D#url-parser>U=
RL
+     parser</a> algorithm to <a href=3D"#the-document's-ad=
dress">the document's address</a>. If any component of thes=
e two
+     <a href=3D#url title=3DURL>URLs</a> differ other than t=
he <a href=3D#concept-url-path title=3Dconcept-url-path>path</a&=
gt;,
+     <a href=3D#concept-url-query title=3Dconcept-url-query>query&=
lt;/a>, and <a href=3D#concept-url-fragment title=3Dconcept-url-fra=
gment>fragment</a> components, then throw a
+     <code><a href=3D#securityerror>SecurityError</a>&=
lt;/code> exception and abort these steps.</li>
+
+<!--CLEANUP-->
+     <li>If the <a href=3D#origin>origin</a> of the re=
sulting <a href=3D#absolute-url>absolute URL</a> is not the s=
ame as
+     the <a href=3D#origin>origin</a> of the <a href=3D#r=
esponsible-document>responsible document</a> specified by the &l=
t;a href=3D#entry-settings-object>entry
+     settings object</a>, and either the <a href=3D#concept-url=
-path title=3Dconcept-url-path>path</a> or <a href=3D#concept=
-url-query title=3Dconcept-url-query>query</a> components of the=
 two <a href=3D#parsed-url title=3D"parsed URL">parsed
+     URLs</a> compared in the previous step differ, throw a <co=
de><a href=3D#securityerror>SecurityError</a></code>=
 exception
+     and abort these steps. (This prevents sandboxed content from spoofi=
ng other pages on the same
+     origin.)</li>
+
+     <li><p>Let <var title=3D"">new URL</=
var> be the resulting <a href=3D#absolute-url>absolute URL</a=
>.</li>
+
+    </ol><p>For the purposes of the comparisons in the above=
 substeps, the <a href=3D#concept-url-path title=3Dconcept-url-path&gt=
;path</a> and <a href=3D#concept-url-query title=3Dconcept-url-q=
uery>query</a> components
+    can only be the same if the <a href=3D#concept-url-scheme title=3D=
concept-url-scheme>scheme</a> component of both
+    <a href=3D#parsed-url title=3D"parsed URL">parsed UR=
Ls</a> are <a href=3D#concept-url-scheme-relative title=3Dconcep=
t-url-scheme-relative>relative schemes</a>.</p>
+
+   </li>
+
+   <li>
+
+    <p>If the third argument is null, then let <var title=3D&qu=
ot;">new URL</var> be the <a href=3D#url>URL</a&gt=
;
+    of the <a href=3D#current-entry>current entry</a>.</p=
>
+
+   <li>
+
+    <p>If the method invoked was the <code title=3Ddom-history-=
pushState><a href=3D#dom-history-pushstate>pushState()</a>=
</code>
+    method:</p>
+
+    <ol><li>
+
+      <p>Remove all the entries in the <a href=3D#browsing-cont=
ext>browsing context</a>'s <a href=3D#session-history>sess=
ion history</a>
+      after the <a href=3D#current-entry>current entry</a>. =
If the <a href=3D#current-entry>current entry</a> is the last=
 entry in
+      the session history, then no entries are removed.</p>
+
+      <p class=3Dnote>This <a href=3D#history-notes>doesn't =
necessarily have to affect</a> the user
+      agent's user interface.</p>
+
+     </li>
+
+     <li><p>Remove any <a href=3D#concept-task title=3Dco=
ncept-task>tasks</a> queued by the <a href=3D#history-travers=
al-task-source>history traversal
+     task source</a> that are associated with any <code><=
a href=3D#document>Document</a></code> objects in the
+     <a href=3D#top-level-browsing-context>top-level browsing cont=
ext</a>'s <a href=3D#document-family>document family</a&gt=
;.</li>
+
+     <li><p>If appropriate, update the <a href=3D#current=
-entry>current entry</a> to reflect any state that the user
+     agent wishes to persist. The entry is then said to be <a href=3D=
#an-entry-with-persisted-user-state>an entry with persisted user
+     state</a>.</li>
+
+     <li><p>Add a <a href=3D#state-object>state object=
</a> entry to the session history, after the <a href=3D#current-=
entry>current
+     entry</a>, with <var title=3D"">cloned data&l=
t;/var> as the <a href=3D#state-object>state object</a>, t=
he given
+     <var title=3D"">title</var> as the title, and=
 <var title=3D"">new URL</var> as the <a href=3D=
#url>URL</a>
+     of the entry.</li>
+
+     <li><p>Update the <a href=3D#current-entry>curren=
t entry</a> to be this newly added entry.</li>
+
+    </ol><p>Otherwise, if the method invoked was the <cod=
e title=3Ddom-history-replaceState><a href=3D#dom-history-replacest=
ate>replaceState()</a></code> method:</p>
+
+    <ol><li><p>Update the <a href=3D#current-entry&=
gt;current entry</a> in the session history so that <var title=3D=
"">cloned data</var> is the entry's new state object, =
the given <var title=3D"">title</var>
+     is the new title, and <var title=3D"">new URL</v=
ar> is the entry's new <a href=3D#url>URL</a>.</li>
+
+    </ol></li>
+
+   <li><p>If the <a href=3D#current-entry>current entr=
y</a> in the session history represents a non-GET request
+   (e.g. it was the result of a POST submission) then update it to inste=
ad represent a GET request
+   (<a href=3D#concept-http-equivalent-get title=3Dconcept-http-equiv=
alent-get>or equivalent</a>).</li>
+
+   <li>
+
+    <p>Set <a href=3D"#the-document's-address">the=
 document's address</a> to <var title=3D"">new URL&=
lt;/var>.</p>
+
+    <p class=3Dnote>Since this is neither a <a href=3D#navigate=
 title=3Dnavigate>navigation</a> of the
+    <a href=3D#browsing-context>browsing context</a> nor a &=
lt;a href=3D#traverse-the-history title=3D"traverse the history&quot=
;>history traversal</a>,
+    it does not cause a <code title=3Devent-hashchange><a href=3D=
#event-hashchange>hashchange</a></code> event to be fired.=
</p>
+
+   </li>
+
+   <li>
+
+    <p>Set <code title=3Ddom-history-state><a href=3D#dom=
-history-state>history.state</a></code> to a <a href=3D=
#structured-clone>structured clone</a>
+    of <var title=3D"">cloned data</var>.</p&gt=
; <!-- it's a clone of /cloned data/, not /data/, so that
+    there's no risk of running scripts again -->
+
+   </li>
+
+   <li>
+
+    <p>Let the <a href=3D#latest-entry>latest entry</a&gt=
; of the <code><a href=3D#document>Document</a></cod=
e> of the <a href=3D#current-entry>current
+    entry</a> be the <a href=3D#current-entry>current entry&=
lt;/a>.</p>
+
+   </li>
+
+  </ol><p class=3Dnote>The <var title=3D"">t=
itle</var> is purely advisory. User agents might use the title
+  in the user interface.</p>
+
+  <p>User agents may limit the number of state objects added to th=
e session history per page. If a
+  page hits the UA-defined limit, user agents must remove the entry imme=
diately after the first
+  entry for that <code><a href=3D#document>Document</a&gt=
;</code> object in the session history after having added the new
+  entry. (Thus the state history acts as a FIFO buffer for eviction, but=
 as a LIFO buffer for
+  navigation.)</p>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>Consider a game where the user can navigate along a line, su=
ch that the user is always at some
+   coordinate, and such that the user can bookmark the page correspondin=
g to a particular
+   coordinate, to return to it later.</p>
+
+   <p>A static page implementing the x=3D5 position in such a game=
 could look like the following:</p>
+
+   <pre><!DOCTYPE HTML>
+<!-- this is http://example.com/line?x=3D5 -->
+<title>Line Game - 5</title>
+<p>You are at coordinate 5 on the line.</p>
+<p>
+ <a href=3D"?x=3D6">Advance to 6</a&g=
t; or
+ <a href=3D"?x=3D4">retreat to 4</a&g=
t;?
+</p></pre>
+
+   <p>The problem with such a system is that each time the user cl=
icks, the whole page has to be
+   reloaded. Here instead is another way of doing it, using script:</=
p>
+
+   <pre><!DOCTYPE HTML>
+<!-- this starts off as http://example.com/line?x=3D5 -->
+<title>Line Game - 5</title>
+<p>You are at coordinate <span id=3D"coord&quo=
t;>5</span> on the line.</p>
+<p>
+ <a href=3D"?x=3D6" onclick=3D"go(1); return false=
;">Advance to 6</a> or
+ <a href=3D"?x=3D4" onclick=3D"go(-1); return fals=
e;">retreat to 4</a>?
+</p>
+<script>
+ var currentPage =3D 5; // prefilled by server
+ function go(d) {
+   setupPage(currentPage + d);
+   history.pushState(currentPage, document.title, '?x=3D' + currentPage)=
;
+ }
+ onpopstate =3D function(event) {
+   setupPage(event.state);
+ }
+ function setupPage(page) {
+   currentPage =3D page;
+   document.title =3D 'Line Game - ' + currentPage;
+   document.getElementById('coord').textContent =3D currentPage;
+   document.links[0].href =3D '?x=3D' + (currentPage+1);
+   document.links[0].textContent =3D 'Advance to ' + (currentPage+1);
+   document.links[1].href =3D '?x=3D' + (currentPage-1);
+   document.links[1].textContent =3D 'retreat to ' + (currentPage-1);
+ }
+</script></pre>
+
+   <p>In systems without script, this still works like the previou=
s example. However, users that
+   <em>do</em> have script support can now navigate much fas=
ter, since there is no network access
+   for the same experience. Furthermore, contrary to the experience the =
user would have with just a
+   naïve script-based approach, bookmarking and navigating the =
session history still work.</p>
+
+   <p>In the example above, the <var title=3D"">da=
ta</var> argument to the <code title=3Ddom-history-pushState>=
<a href=3D#dom-history-pushstate>pushState()</a></code>=
 method is the same information as would be sent
+   to the server, but in a more convenient form, so that the script does=
n't have to parse the URL
+   each time the user navigates.</p>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>Applications might not use the same title for a <a href=3D=
#session-history-entry>session history entry</a> as the
+   value of the document's <code><a href=3D#the-title-element&g=
t;title</a></code> element at that time. For example, here is=
 a simple
+   page that shows a block in the <code><a href=3D#the-title-el=
ement>title</a></code> element. Clearly, when navigating b=
ackwards to
+   a previous state the user does not go back in time, and therefore it =
would be inappropriate to
+   put the time in the session history title.</p>
+
+   <pre><!DOCTYPE HTML>
+<TITLE>Line</TITLE>
+<SCRIPT>
+ setInterval(function () { document.title =3D 'Line - ' + new Date(); },=
 1000);
+ var i =3D 1;
+ function inc() {
+   set(i+1);
+   history.pushState(i, 'Line - ' + i);
+ }
+ function set(newI) {
+   i =3D newI;
+   document.forms.F.I.value =3D newI;
+ }
+</SCRIPT>
+<BODY ONPOPSTATE=3D"set(event.state)">
+<FORM NAME=3DF>
+State: <OUTPUT NAME=3DI>1</OUTPUT> <I=
NPUT VALUE=3D"Increment" TYPE=3DBUTTON ONCLICK=3D"inc()&qu=
ot;>
+</FORM></pre>
+
+  </div>
+
+
+
+  <h4 id=3Dthe-location-interface><span class=3Dsecno>6.5.3 =
</span>The <code><a href=3D#location>Location</a>=
</code> interface</h4>
+
+  <p>Each <code><a href=3D#document>Document</a>=
</code> object in a <a href=3D#browsing-context>browsing cont=
ext</a>'s session history is
+  associated with a unique instance of a <code><a href=3D#locat=
ion>Location</a></code> object.</p>
+
+  <dl class=3Ddomintro><dt><var title=3D"">d=
ocument</var> . <code title=3Ddom-document-location><a hre=
f=3D#dom-document-location>location</a></code> [ =3D <v=
ar title=3D"">value</var> ]</dt>
+   <dt><var title=3D"">window</var> . <co=
de title=3Ddom-location><a href=3D#dom-location>location</a&g=
t;</code> [ =3D <var title=3D"">value</var> ]=
</dt>
+
+   <dd>
+
+    <p>Returns a <code><a href=3D#location>Location&lt=
;/a></code> object with the current page's location.</p>
+
+    <p>Can be set, to navigate to another page.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-document-location title=3Ddom-document-l=
ocation><code>location</code></dfn> attribute of the
+  <code><a href=3D#document>Document</a></code> =
interface must return the <code><a href=3D#location>Location&=
lt;/a></code> object for that
+  <code><a href=3D#document>Document</a></code> =
object, if it is in a <a href=3D#browsing-context>browsing context&=
lt;/a>, and null otherwise.</p>
+
+  <p>The <dfn id=3Ddom-location title=3Ddom-location><cod=
e>location</code></dfn> attribute of the <code><a=
 href=3D#window>Window</a></code>
+  interface must return the <code><a href=3D#location>Locati=
on</a></code> object for that <code><a href=3D#windo=
w>Window</a></code> object's
+  <code><a href=3D#document>Document</a></code>.=
</p>
+
+  </div>
+
+  <p><code><a href=3D#location>Location</a></=
code> objects provide a representation of <a href=3D"#the-docu=
ment's-address" title=3D"the document's
+  address">the address</a> of the <a href=3D#active-doc=
ument>active document</a> of their <code><a href=3D#doc=
ument>Document</a></code>'s
+  <a href=3D#browsing-context>browsing context</a>, and allo=
w the <a href=3D#current-entry>current entry</a> of the <a=
 href=3D#browsing-context>browsing
+  context</a>'s session history to be changed, by adding or replac=
ing entries in the <code title=3Ddom-history><a href=3D#dom-hist=
ory>history</a></code> object.</p>
+
+  <pre class=3Didl>[Unforgeable] interface <dfn id=3Dlocation&g=
t;Location</dfn> {
+  void <a href=3D#dom-location-assign title=3Ddom-location-assign>=
assign</a>(DOMString url);
+  void <a href=3D#dom-location-replace title=3Ddom-location-replace&g=
t;replace</a>(DOMString url);
+  void <a href=3D#dom-location-reload title=3Ddom-location-reload>=
reload</a>();
+};
+<a href=3D#location>Location</a> implements <a href=3D#ur=
lutils>URLUtils</a>;</pre>
+
+  <dl class=3Ddomintro><dt><var title=3D"">l=
ocation</var> . <code title=3Ddom-location-assign><a href=3D=
#dom-location-assign>assign</a></code>(<var title=3D&qu=
ot;">url</var>)</dt>
+
+   <dd>
+
+    <p>Navigates to the given page.</p>
+
+   </dd>
+
+   <dt><var title=3D"">location</var> . <=
code title=3Ddom-location-replace><a href=3D#dom-location-replace&g=
t;replace</a></code>(<var title=3D"">url</=
var>)</dt>
+
+   <dd>
+
+    <p>Removes the current page from the session history and navig=
ates to the given page.</p>
+
+   </dd>
+
+   <dt><var title=3D"">location</var> . <=
code title=3Ddom-location-reload><a href=3D#dom-location-reload>=
reload</a></code>()</dt>
+
+   <dd>
+
+    <p>Reloads the current page.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>The <i>relevant <code><a href=3D#document>D=
ocument</a></code></i> is the <code><a href=3D=
#location>Location</a></code> object's associated
+  <code><a href=3D#document>Document</a></code> =
object's <a href=3D#browsing-context>browsing context</a>'s &=
lt;a href=3D#active-document>active document</a>.</p>
+
+<!--CLEANUP-->
+  <p>When the <dfn id=3Ddom-location-assign title=3Ddom-locatio=
n-assign><code>assign(<var title=3D"">url</va=
r>)</code></dfn>
+  method is invoked, the UA must <a href=3D#resolve-a-url title=3D&qu=
ot;resolve a url">resolve</a> the argument, relative
+  to the <a href=3D#api-base-url>API base URL</a> specified =
by the <a href=3D#entry-settings-object>entry settings object</a=
>, and if that is
+  successful, must <a href=3D#navigate>navigate</a><!--DO=
NAV location.href/assign--> the <a href=3D#browsing-context>brow=
sing
+  context</a> to the specified <var title=3D"">url=
</var>. If the <a href=3D#browsing-context>browsing context&l=
t;/a>'s
+  <a href=3D#session-history>session history</a> contains on=
ly one <code><a href=3D#document>Document</a></code&=
gt;, and that was the
+  <code><a href=3D#about:blank>about:blank</a></cod=
e> <code><a href=3D#document>Document</a></code&g=
t; created when the <a href=3D#browsing-context>browsing context&lt=
;/a> was
+  created, then the navigation must be done with <a href=3D#replaceme=
nt-enabled>replacement enabled</a>.</p> <!-- READ ME
+  WHEN EDITING THIS: IE and Firefox only seem to treat it that way if th=
e DOM is still a virgin DOM;
+  Safari doesn't check that. Thus this might need changing if testing sh=
ows the IE/Firefox behaviour
+  is required here. -->
+
+<!--CLEANUP-->
+  <p>When the <dfn id=3Ddom-location-replace title=3Ddom-locati=
on-replace><code>replace(<var title=3D"">url<=
/var>)</code></dfn>
+  method is invoked, the UA must <a href=3D#resolve-a-url title=3D&qu=
ot;resolve a url">resolve</a> the argument, relative
+  to the <a href=3D#api-base-url>API base URL</a> specified =
by the <a href=3D#entry-settings-object>entry settings object</a=
>, and if that is
+  successful, <a href=3D#navigate>navigate</a><!--DONAV l=
ocation.href/replace--> the <a href=3D#browsing-context>browsing
+  context</a> to the specified <var title=3D"">url=
</var> with <a href=3D#replacement-enabled>replacement enable=
d</a>.</p>
+
+<!--CLEANUP-->
+  <p>Navigation for the <code title=3Ddom-location-assign>&l=
t;a href=3D#dom-location-assign>assign()</a></code> and &l=
t;code title=3Ddom-location-replace><a href=3D#dom-location-replace=
>replace()</a></code> methods must be done with the <a =
href=3D#responsible-browsing-context>responsible browsing context</=
a> specified by
+  the <a href=3D#incumbent-settings-object>incumbent settings obje=
ct</a> as the <a href=3D#source-browsing-context>source
+  browsing context</a>.</p>
+
+  <p>If the <a href=3D#resolve-a-url title=3D"resolve a ur=
l">resolving</a> step of the <code title=3Ddom-location-=
assign><a href=3D#dom-location-assign>assign()</a></cod=
e> and <code title=3Ddom-location-replace><a href=3D#dom-loca=
tion-replace>replace()</a></code> methods is not successfu=
l, then the user agent must
+  instead throw a <code><a href=3D#syntaxerror>SyntaxError&l=
t;/a></code> exception.</p>
+
+  <p>When the <dfn id=3Ddom-location-reload title=3Ddom-locatio=
n-reload><code>reload()</code></dfn> method is invok=
ed, the
+  user agent must run the appropriate steps from the following list:<=
/p>
+
+  <dl class=3Dswitch><dt>If the currently executing <a hr=
ef=3D#concept-task title=3Dconcept-task>task</a> is the dispatch=
 of a <code title=3Devent-resize>resize</code> event in respo=
nse to the user resizing the <a href=3D#browsing-context>browsing
+   context</a></dt>
+
+   <dd><p>Repaint the <a href=3D#browsing-context>brow=
sing context</a> and abort these steps.</dd> <!-- this
+   theoretically would have no effect but in practice can be useful to w=
ork around rendering bugs.
+   -->
+
+   <dt>If the <a href=3D#browsing-context>browsing context&l=
t;/a>'s <a href=3D#active-document>active document</a> is =
<a href=3D#an-iframe-srcdoc-document>an
+   <code>iframe</code> <code title=3Dattr-iframe-srcdoc&g=
t;srcdoc</code> document</a></dt>
+
+   <dd><p><a href=3D#process-the-iframe-attributes title=3D=
"process the iframe attributes">Reprocess the <code>if=
rame</code>
+   attributes</a> of the <a href=3D#browsing-context>browsin=
g context</a>'s <a href=3D#browsing-context-container>browsin=
g context
+   container</a>.</dd>
+
+   <dt>If the <a href=3D#browsing-context>browsing context&l=
t;/a>'s <a href=3D#active-document>active document</a> has=
 its <a href=3D#reload-override-flag>reload
+   override flag</a> set</dt>
+
+   <dd><p>Perform <a href=3D#an-overridden-reload>an o=
verridden reload</a>.</dd>
+
+   <dt>Otherwise</dt>
+
+   <dd><p><a href=3D#navigate>Navigate</a><!-=
-DONAV location.reload()--> the
+   <a href=3D#browsing-context>browsing context</a> to <a=
 href=3D"#the-document's-address">the document's
+   address</a> with <a href=3D#replacement-enabled>replaceme=
nt enabled</a>. The
+   <a href=3D#source-browsing-context>source browsing context</=
a> must be the <a href=3D#browsing-context>browsing
+   context</a> being navigated.</dd> <!-- it appears that
+   document.reload() always uses GET and does not, e.g., re-POST. -->
+
+   <!-- http://software.hixie.ch/utilities/js/live-dom-viewer/saved/1=
41 -->
+
+  </dl><p>When a user requests that the <a href=3D#active=
-document>active document</a> of a <a href=3D#browsing-contex=
t>browsing context</a>
+  be reloaded through a user interface element, the user agent should &l=
t;a href=3D#navigate>navigate</a><!--DONAV
+  user reload--> the <a href=3D#browsing-context>browsing conte=
xt</a> to the same resource as that
+  <code><a href=3D#document>Document</a></code>,=
 with <a href=3D#replacement-enabled>replacement enabled</a>.=
 In the case of non-idempotent
+  methods (e.g. HTTP POST), the user agent should prompt the user to con=
firm the operation first,
+  since otherwise transactions (e.g. purchases or database modifications=
) could be repeated. User
+  agents may allow the user to explicitly override any caches when reloa=
ding. If <a href=3D#browsing-context>browsing
+  context</a>'s <a href=3D#active-document>active document&l=
t;/a>'s <a href=3D#reload-override-flag>reload override flag<=
/a> is set, then the
+  user agent may instead perform <a href=3D#an-overridden-reload>a=
n overridden reload</a> rather than the navigation
+  described in this paragraph.</p>
+
+  <hr></div>
+
+  <!-- concept-uu -->
+
+  <p>The <code><a href=3D#location>Location</a>&=
lt;/code> interface also supports the <code><a href=3D#urluti=
ls>URLUtils</a></code> interface. <a href=3D#refsURL&gt=
;[URL]</a></p>
+
+  <div class=3Dimpl>
+
+  <p>When the object is created, and whenever the <a href=3D&qu=
ot;#the-document's-address" title=3D"the document's address&quo=
t;>the
+  address</a> of the <i>relevant <code><a href=3D#d=
ocument>Document</a></code></i> changes, the user ag=
ent must invoke
+  the element's <code><a href=3D#urlutils>URLUtils</a>=
</code> interface's <a href=3D#concept-uu-set-the-input title=3D=
concept-uu-set-the-input>set the
+  input</a> algorithm with <a href=3D"#the-document's-addr=
ess" title=3D"the document's address">the address</a=
> of the
+  <i>relevant <code><a href=3D#document>Document</a=
></code></i> as the given value.</p>
+
+<!--CLEANUP-->
+  <p>The element's <code><a href=3D#urlutils>URLUtils&=
lt;/a></code> interface's <a href=3D#concept-uu-get-the-base =
title=3Dconcept-uu-get-the-base>get the
+  base</a> algorithm must return the <a href=3D#api-base-url&gt=
;API base URL</a> specified by the <a href=3D#entry-settings-obj=
ect>entry
+  settings object</a>, if there is one, or null otherwise.</p&g=
t;
+
+  <p>The element's <code><a href=3D#urlutils>URLUtils&=
lt;/a></code> interface's <a href=3D#concept-uu-query-encodin=
g title=3Dconcept-uu-query-encoding>query
+  encoding</a> is the <a href=3D"#document's-character-enc=
oding">document's character encoding</a>.</p>
+
+  <p>When the element's <code><a href=3D#urlutils>URLU=
tils</a></code> interface invokes its <a href=3D#concept-u=
u-update title=3Dconcept-uu-update>update steps</a> with the str=
ing <var title=3D"">value</var>, the user
+  agent must run the following steps:</p>
+
+  <ol><li>
+
+    <p>If any of the following conditions are met, let <var tit=
le=3D"">mode</var> be <i>normal
+    navigation</i>; otherwise, let it be <i>replace navigati=
on</i>:</p>
+
+    <ul class=3Dbrief><li>The <code><a href=3D#loca=
tion>Location</a></code> object's <i>relevant <co=
de><a href=3D#document>Document</a></code></i>=
 has
+     <a href=3D#completely-loaded>completely loaded</a>, or&=
lt;/li>
+
+     <li>In the <a href=3D#concept-task title=3Dconcept-task&gt=
;task</a> in which the algorithm is running, an
+     <a href=3D#activation-behavior>activation behavior</a> =
is currently being processed whose <code title=3Devent-click><a =
href=3D#event-click>click</a></code> event was <a href=3D=
#concept-events-trusted title=3Dconcept-events-trusted>trusted</a&g=
t;,
+     or</li>
+
+     <li>In the <a href=3D#concept-task title=3Dconcept-task&gt=
;task</a> in which the algorithm is running, the event
+     listener for a <a href=3D#concept-events-trusted title=3Dconcept=
-events-trusted>trusted</a> <code title=3Devent-click><=
a href=3D#event-click>click</a></code> event is being hand=
led.</li>
+
+    </ul></li>
+
+   <li><p>If <var title=3D"">mode</var&gt=
; is <i>normal navigation</i>, then act as if the <code ti=
tle=3Ddom-location-assign><a href=3D#dom-location-assign>assign(=
)</a></code> method had been called with <var title=3D&quo=
t;">value</var>
+   as its argument. Otherwise, act as if the <code title=3Ddom-locati=
on-replace><a href=3D#dom-location-replace>replace()</a>&l=
t;/code>
+   method had been called with <var title=3D"">value<=
/var> as its argument.</li>
+   <!--DONAV location.href, defined in terms of the paragraphs far ab=
ove-->
+
+  </ol></div>
+
+
+
+<!--ADD-TOPIC:Security-->
+  <div class=3Dimpl>
+
+  <h5 id=3Dsecurity-location><span class=3Dsecno>6.5.3.1 &lt=
;/span>Security</h5>
+
+  <p class=3Dcritical>This section describes a security model that=
 is underdefined, imperfect, and
+  does not match implementations. Work is ongoing to attempt to resolve =
this, but in the meantime,
+  please do not rely on this section for precision. Implementors are urg=
ed to send their feedback on
+  how cross-origin cross-global access to <code><a href=3D#wind=
ow>Window</a></code> and <code><a href=3D#locatio=
n>Location</a></code> objects
+  should work. See <a href=3D"https://www.w3.org/Bugs/Public/sho=
w_bug.cgi?id=3D20701">bug 20701</a>.</p>
+
+  <p id=3Dsecurity-3>User agents must throw a <code><a hr=
ef=3D#securityerror>SecurityError</a></code> exception whe=
never any
+  properties of a <code><a href=3D#location>Location</a&g=
t;</code> object are accessed when the <a href=3D#entry-settings=
-object>entry settings object</a> specifies
+  an <a href=3D#effective-script-origin>effective script origin&lt=
;/a> that is not the <a href=3D#same-origin title=3D"same orig=
in">same</a> as
+  the <code><a href=3D#location>Location</a></code&=
gt; object's associated <code><a href=3D#document>Document&lt=
;/a></code>'s <a href=3D#browsing-context>browsing
+  context</a>'s <a href=3D#active-document>active document&l=
t;/a>'s <a href=3D#effective-script-origin>effective script orig=
in</a>, with the
+  following exceptions:</p>
+
+  <ul><!--CLEANUP--><li>The <code title=3Ddom-url-h=
ref><a href=3D#dom-url-href>href</a></code> setter, =
if the <a href=3D#responsible-browsing-context>responsible browsing=
 context</a>
+   specified by the <a href=3D#entry-settings-object>entry
+   settings object</a> is <a href=3D#familiar-with>familiar =
with</a> the <a href=3D#browsing-context>browsing
+   context</a> with which the <code><a href=3D#location&g=
t;Location</a></code> object is associated
+
+<!--CLEANUP-->
+   <li>The <code title=3Ddom-location-replace><a href=3D#=
dom-location-replace>replace()</a></code> method, if the &=
lt;a href=3D#responsible-browsing-context>responsible
+   browsing context</a> specified by the <a href=3D#entry-setti=
ngs-object>entry=20
+   settings object</a> is <a href=3D#familiar-with>familiar =
with</a> the
+   <a href=3D#browsing-context>browsing context</a> with whi=
ch the <code><a href=3D#location>Location</a></code&=
gt; object is associated
+
+<!--CLEANUP-->
+   <li>Any properties not defined in the IDL for the <code>&=
lt;a href=3D#location>Location</a></code> object or indire=
ctly via
+   one of those properties (e.g. <code title=3D"">toStri=
ng()</code>, which is defined via the <code title=3D""=
>stringifier</code> keyword), if the <a href=3D#effective-scr=
ipt-origin>effective script
+   origin</a> specified by the <a href=3D#entry-settings-object=
>entry settings object</a> is the <a href=3D#same-origin>s=
ame origin</a> as the <code><a href=3D#location>Locatio=
n</a></code> object's associated
+   <code><a href=3D#document>Document</a></code>=
's <a href=3D#effective-script-origin>effective script origin</a=
>
+
+  </ul><p>When the <a href=3D#effective-script-origin>=
effective script origin</a> specified by the <a href=3D#entry-se=
ttings-object>entry settings object</a> is different than a
+  <code><a href=3D#location>Location</a></code> =
object's associated <code><a href=3D#document>Document</a&=
gt;</code>'s <a href=3D#effective-script-origin>effective scr=
ipt
+  origin</a>, the user agent must act as if any changes to that &l=
t;code><a href=3D#location>Location</a></code> objec=
t's
+  properties, getters, setters, etc, were not present, and as if all the=
 properties of that
+  <code><a href=3D#location>Location</a></code> =
object had their [[Enumerable]] attribute set to false.</p>
+
+<!--CLEANUP-->
+  <p>For members that return objects (including function objects),=
 each distinct <a href=3D#effective-script-origin>effective
+  script origin</a> that is not the <a href=3D#same-origin>s=
ame origin</a> as the <code><a href=3D#location>Locatio=
n</a></code>
+  object's <code><a href=3D#document>Document</a></=
code>'s <a href=3D#effective-script-origin>effective script orig=
in</a> must be provided with a
+  separate set of objects. These objects must have the prototype chain a=
ppropriate for the script
+  for which the objects are created (not those that would be appropriate=
 for scripts whose
+  <a href=3D#settings-object>settings object</a> specifies a=
 <a href=3D#global-object>global object</a> that is the <c=
ode><a href=3D#location>Location</a></code> object's=
 <code><a href=3D#document>Document</a></code>'s
+  <code><a href=3D#window>Window</a></code> obje=
ct).</p>
+
+  </div>
+<!--REMOVE-TOPIC:Security-->
+
+
+  <div class=3Dimpl>
+
+  <h4 id=3Dhistory-notes><span class=3Dsecno>6.5.4 </span=
>Implementation notes for session history</h4>
+  <!-- don't change the ID without updating multiple internal links -=
->
+
+  <p><i>This section is non-normative.</i></p>
+
+  <p>The <code><a href=3D#history-0>History</a>&=
lt;/code> interface is not meant to place restrictions on how implemen=
tations
+  represent the session history to the user.</p>
+
+  <p>For example, session history could be implemented in a tree-l=
ike manner, with each page having
+  multiple "forward" pages. This specification doesn't define =
how the linear list of pages in the
+  <code title=3Ddom-history><a href=3D#dom-history>history&l=
t;/a></code> object are derived from the actual session history =
as
+  seen from the user's perspective.</p>
+
+  <p>Similarly, a page containing two <code><a href=3D#th=
e-iframe-element>iframe</a></code>s has a <code title=3D=
dom-history><a href=3D#dom-history>history</a></code&gt=
; object distinct from the <code><a href=3D#the-iframe-element&g=
t;iframe</a></code>s' <code title=3Ddom-history><a h=
ref=3D#dom-history>history</a></code> objects, despite the=
 fact that typical Web browsers present the
+  user with just one "Back" button, with a session history tha=
t interleaves the navigation of the
+  two inner frames and the outer page.</p>
+
+<!--ADD-TOPIC:Security-->
+  <p><strong>Security</strong>: It is suggested that t=
o avoid letting a page "hijack" the history
+  navigation facilities of a UA by abusing <code title=3Ddom-history-=
pushState><a href=3D#dom-history-pushstate>pushState()</a>=
</code>,
+  the UA provide the user with a way to jump back to the previous page (=
rather than just going back
+  to the previous state). For example, the back button could have a drop=
 down showing just the pages
+  in the session history, and not showing any of the states. Similarly, =
an aural browser could have
+  two "back" commands, one that goes back to the previous stat=
e, and one that jumps straight back to
+  the previous page.</p>
+
+  <p>In addition, a user agent could ignore calls to <code titl=
e=3Ddom-history-pushState><a href=3D#dom-history-pushstate>pushS=
tate()</a></code> that are invoked on a timer, or from event
+  listeners that are not triggered in response to a clear user action, o=
r that are invoked in rapid
+  succession.</p>
+<!--REMOVE-TOPIC:Security-->
+
+  </div>
+
+
+<!--TOPIC:HTML-->
+  <h3 id=3Dbrowsing-the-web><span class=3Dsecno>6.6 </spa=
n>Browsing the Web</h3>
+
+  <div class=3Dimpl>
+
+  <h4 id=3Dnavigating-across-documents><span class=3Dsecno>6=
.6.1 </span>Navigating across documents</h4>
+
+  <p>Certain actions cause the <a href=3D#browsing-context>b=
rowsing context</a> to <i><a href=3D#navigate>navigate&=
lt;/a></i> to a new resource.
+  Navigation always involves <dfn id=3Dsource-browsing-context>sou=
rce browsing context</dfn>, which is the browsing context which
+  was responsible for starting the navigation.</p>
+
+  <p class=3Dexample>For example, <a href=3D#following-hyperlin=
ks title=3D"following hyperlinks">following a hyperlink</=
a>,
+  <a href=3D#concept-form-submit title=3Dconcept-form-submit>form =
submission</a>, and the <code title=3Ddom-open><a href=3D#=
dom-open>window.open()</a></code> and <code title=3Ddom=
-location-assign><a href=3D#dom-location-assign>location.assign(=
)</a></code> methods can all cause a browsing context to
+  navigate.</p>
+
+  <p>A user agent may provide various ways for the user to explici=
tly cause a browsing context to
+  navigate, in addition to those defined in this specification.</p&gt=
;
+
+  <p class=3Dnote>A <i>resource</i> has a URL, but tha=
t might not be the only information necessary
+  to identify it. For example, a form submission that uses HTTP POST wou=
ld also have the HTTP method
+  and payload. Similarly, <a href=3D#an-iframe-srcdoc-document>an =
<code>iframe</code> <code title=3Dattr-iframe-srcdoc>sr=
cdoc</code> document</a> needs to know the data it is to use.=
</p>
+
+  <!-- NAVIGATE <dfn>navigate</dfn> -->
+  <!-- For places that _call_ this, as opposed to just referring to
+  it, search for "DONAV" -->
+  <p>When a browsing context is <dfn id=3Dnavigate title=3Dnavi=
gate>navigated</dfn> to a new resource, the user
+  agent must run the following steps:</p>
+
+  <ol><li><p>Release the <a href=3D#storage-mutex&g=
t;storage mutex</a>.</li>
+
+   <li id=3DsandboxLinks>
+
+    <p>If the <a href=3D#source-browsing-context>source brow=
sing context</a> is not <a href=3D#allowed-to-navigate>allowe=
d to navigate</a> the
+    <a href=3D#browsing-context>browsing context</a> being n=
avigated, then abort these steps.</p>
+
+    <p>If these steps are aborted here, the user agent may instead=
 offer to open the new resource in
+    a new <a href=3D#top-level-browsing-context>top-level browsing=
 context</a> or in the <a href=3D#top-level-browsing-context>=
top-level browsing context</a>
+    of the <a href=3D#source-browsing-context>source browsing cont=
ext</a>, at the user's option, in which case the user agent
+    must <a href=3D#navigate>navigate</a><!--DONAV sandbo=
x manual load--> that designated <a href=3D#top-level-browsing-cont=
ext>top-level
+    browsing context</a> to the new resource as if the user had re=
quested it independently.</p>
+
+    <p class=3Dnote>Doing so, however, can be dangerous, as it mea=
ns that the user is overriding the
+    author's explicit request to sandbox the content.</p>
+
+   </li>
+
+   <li id=3DseamlessLinks><p>If the <a href=3D#source-bro=
wsing-context>source browsing context</a> is the same as the
+   <a href=3D#browsing-context>browsing context</a> being na=
vigated, and this browsing context has its <a href=3D#seamless-browsin=
g-context-flag>seamless
+   browsing context flag</a> set, and the <a href=3D#browsing-c=
ontext>browsing context</a> being navigated was not
+   chosen using an <dfn id=3Dexplicit-self-navigation-override>exp=
licit self-navigation override</dfn>, then find the nearest
+   <a href=3D#ancestor-browsing-context>ancestor browsing context&=
lt;/a> that does not have its <a href=3D#seamless-browsing-context-=
flag>seamless browsing context
+   flag</a> set, and continue these steps as if <em>that<=
/em> <a href=3D#browsing-context>browsing context</a> was
+   the one that was going to be <a href=3D#navigate title=3Dnavigate&=
gt;navigated</a> instead.</li>
+
+   <li><p>If there is a preexisting attempt to navigate the =
<a href=3D#browsing-context>browsing context</a>, and the
+   <a href=3D#source-browsing-context>source browsing context</=
a> is the same as the <a href=3D#browsing-context>browsing conte=
xt</a> being
+   navigated, and that attempt is currently running the <a href=3D#un=
load-a-document>unload a document</a> algorithm,
+   and the <a href=3D#origin>origin</a> of the <a href=3D=
#url>URL</a> of the resource being loaded in that
+   navigation is not the <a href=3D#same-origin>same origin</a&=
gt; as the <a href=3D#origin>origin</a> of the <a href=3D#=
url>URL</a>
+   of the resource being loaded in <em>this</em> navigation,=
 then abort these steps without
+   affecting the preexisting attempt to navigate the <a href=3D#brows=
ing-context>browsing context</a>.</li> <!--
+   http://www.hixie.ch/tests/adhoc/html/navigation/unload/ -->
+
+   <li><p>If a <a href=3D#concept-task title=3Dconcept-ta=
sk>task</a> queued by the <a href=3D#traverse-the-history-by-=
a-delta>traverse the history by a
+   delta</a> algorithm is running the <a href=3D#unload-a-docum=
ent>unload a document</a> algorithm for the
+   <a href=3D#active-document>active document</a> of the &lt=
;a href=3D#browsing-context>browsing context</a> being navigated=
, then abort
+   these steps without affecting the <a href=3D#unload-a-document>=
unload a document</a> algorithm or the aforementioned
+   history traversal task.</li> <!-- this stops pages from hija=
cking the back/forward button -->
+
+   <li><p>If the <a href=3D#prompt-to-unload-a-document&g=
t;prompt to unload a document</a> algorithm is being run for the
+   <a href=3D#active-document>active document</a> of the &lt=
;a href=3D#browsing-context>browsing context</a> being navigated=
, then abort
+   these steps without affecting the <a href=3D#prompt-to-unload-a-do=
cument>prompt to unload a document</a> algorithm.</li>
+   <!-- http://software.hixie.ch/utilities/js/live-dom-viewer/saved/1=
946 to 1955 -->
+
+   <li>
+
+    <p>Let <var title=3D"">gone async</var> =
be false.</p>
+
+    <p class=3Dnote>The <a href=3D#navigate-redirect-step>&l=
t;i>handle redirects</i></a> step later in
+    this algorithm can in certain cases jump back to the step labeled &l=
t;a href=3D#navigate-fragid-step><i>fragment identifiers</i&g=
t;</a>. Since, between those two steps,
+    this algorithm goes from operating synchronously in the context of t=
he calling <a href=3D#concept-task title=3Dconcept-task>task</a&=
gt; to operating asynchronously independent of the <a href=3D#event-lo=
op>event
+    loop</a>, some of the intervening steps need to be able to han=
dle both being synchronous and
+    being asynchronous. The <var title=3D"">gone async&l=
t;/var> flag is thus used to make these steps
+    aware of which mode they are operating in.</p>
+
+   </li>
+
+   <li id=3Dnavigate-fragid-step><p><i>Fragment identi=
fiers</i>: Apply the <a href=3D#url-parser>URL parser</a&g=
t;
+   algorithm to the <a href=3D#absolute-url>absolute URL</a>=
 of the new resource and the <a href=3D"#the-document's-address&q=
uot; title=3D"the
+   document's address">address</a> of the <a href=3D#ac=
tive-document>active document</a> of the <a href=3D#browsing-=
context>browsing
+   context</a> being navigated. If all the components of the resul=
ting <a href=3D#parsed-url title=3D"parsed
+   URL">parsed URLs</a>, ignoring any <a href=3D#concep=
t-url-fragment title=3Dconcept-url-fragment>fragment</a>
+   components, are identical, and the new resource is to be fetched usin=
g HTTP GET <a href=3D#concept-http-equivalent-get title=3Dconcept-http=
-equivalent-get>or equivalent</a>, and the <a href=3D#parsed-=
url>parsed URL</a> of the
+   new resource has a <a href=3D#concept-url-fragment title=3Dconcept=
-url-fragment>fragment</a> component that is not null
+   (even if it is empty), then <a href=3D#scroll-to-fragid title=3Dna=
vigate-fragid>navigate to that fragment
+   identifier</a> and abort these steps.</li>
+
+   <li><p>If <var title=3D"">gone async</=
var> is false, cancel any preexisting but not yet <a href=3D#concep=
t-navigate-mature title=3Dconcept-navigate-mature>mature</a> att=
empt to navigate the <a href=3D#browsing-context>browsing
+   context</a>, including canceling any instances of the <a hre=
f=3D#fetch>fetch</a> algorithm started by
+   those attempts. If one of those attempts has already <a href=3D#cr=
eate-a-document-object title=3D"create a document
+   object">created a new <code>Document</code> objec=
t</a>, <a href=3D#abort-a-document title=3D"abort a
+   document">abort</a> that <code><a href=3D#docu=
ment>Document</a></code> also. (Navigation attempts that h=
ave <a href=3D#concept-navigate-mature title=3Dconcept-navigate-mature=
>matured</a> already have session history entries, and are
+   therefore handled during the <a href=3D#update-the-session-history=
-with-the-new-page>update the session history with the new page</a&=
gt; algorithm,
+   later.)</li>
+
+   <li><p>If the new resource is to be handled using a mecha=
nism that does not affect the browsing
+   context, e.g. ignoring the navigation request altogether because the =
specified scheme is not one
+   of the supported protocols, then abort these steps and proceed with t=
hat mechanism
+   instead.</li>
+
+   <li>
+
+    <p>If <var title=3D"">gone async</var> i=
s false, <a href=3D#prompt-to-unload-a-document title=3D"prompt t=
o unload a document">prompt
+    to unload</a> the <code><a href=3D#document>Docume=
nt</a></code> object. If the user <a href=3D#refused-to-al=
low-the-document-to-be-unloaded>refused to allow the
+    document to be unloaded</a>, then abort these steps.</p>
+
+    <p>If this instance of the <a href=3D#navigate title=3Dnavi=
gate>navigation</a> algorithm gets canceled
+    while this step is running, the <a href=3D#prompt-to-unload-a-doc=
ument>prompt to unload a document</a> algorithm must
+    nonetheless be run to completion.</p>
+
+   </li>
+
+   <li><p>If <var title=3D"">gone async</=
var> is false, <a href=3D#abort-a-document title=3D"abort a do=
cument">abort</a>
+   the <a href=3D#active-document>active document</a> of the=
 <a href=3D#browsing-context>browsing context</a>.</li>
+
+   <li>
+
+    <p>If the new resource is to be handled by displaying some sor=
t of inline content, e.g. an error
+    message because the specified scheme is not one of the supported pro=
tocols, or an inline prompt
+    to allow the user to select <a href=3D#dom-navigator-registerprot=
ocolhandler title=3Ddom-navigator-registerProtocolHandler>a registered
+    handler</a> for the given scheme, then <a href=3D#read-ua-i=
nline title=3Dnavigate-ua-inline>display the inline
+    content</a> and abort these steps.</p>
+
+    <p class=3Dnote>In the case of a registered handler being used=
, the algorithm will be reinvoked
+    with a new URL to handle the request.</p>
+
+   </li>
+
+   <li>
+
+    <p>If the resource has already been obtained (e.g. because it =
is being used to populate an
+    <code><a href=3D#the-object-element>object</a><=
/code> element's new <a href=3D#child-browsing-context>child bro=
wsing context</a>), then skip this step.</p>
+
+    <p>Otherwise:</p>
+
+    <p>If the new resource is to be fetched using HTTP GET <a h=
ref=3D#concept-http-equivalent-get title=3Dconcept-http-equivalent-get&gt=
;or equivalent</a>, and there are <a href=3D#relevant-applicatio=
n-cache title=3D"relevant
+    application cache">relevant application caches</a> tha=
t are identified by a URL with the
+    <a href=3D#same-origin>same origin</a> as the URL in que=
stion, and that have this URL as one of their entries,
+    excluding entries marked as <a href=3D#concept-appcache-foreign t=
itle=3Dconcept-appcache-foreign>foreign</a>, and whose
+    <a href=3D#concept-appcache-mode title=3Dconcept-appcache-mode&gt=
;mode</a> is <a href=3D#concept-appcache-mode-fast title=3Dconce=
pt-appcache-mode-fast>fast</a>, and the user agent is not in a m=
ode where it
+    will avoid using <a href=3D#application-cache title=3D"appli=
cation cache">application caches</a> then
+    <a href=3D#fetch>fetch</a> the resource from the <a h=
ref=3D#concept-appcache-selection title=3Dconcept-appcache-selection>m=
ost
+    appropriate application cache</a> of those that match.</p&g=
t;
+
+    <p class=3Dexample>For example, imagine an HTML page with an a=
ssociated application cache
+    displaying an image and a form, where the image is also used by seve=
ral other application
+    caches. If the user right-clicks on the image and chooses "View=
 Image", then the user agent
+    could decide to show the image from any of those caches, but it is l=
ikely that the most useful
+    cache for the user would be the one that was used for the aforementi=
oned HTML page. On the other
+    hand, if the user submits the form, and the form does a POST submiss=
ion, then the user agent
+    will not use an application cache at all; the submission will be mad=
e to the network.</p>
+
+    <p>Otherwise, <a href=3D#fetch>fetch</a><!--FET=
CH--> the new resource, with the <i>manual redirect
+    flag</i> set.</p>
+
+    <p>If the resource is being fetched using a method other than =
one <a href=3D#concept-http-equivalent-get title=3Dconcept-http-equiva=
lent-get>equivalent to</a> HTTP's GET<!-- or HEAD (but that c=
an't
+    happen) -->, or, if the <a href=3D#navigate title=3Dnavigate&g=
t;navigation algorithm</a> was invoked as a
+    result of the <a href=3D#concept-form-submit title=3Dconcept-form=
-submit>form submission algorithm</a>, then the <a href=3D#fe=
tch title=3Dfetch>fetching algorithm</a> must be invoked from th=
e <a href=3D#origin>origin</a> of the
+    <a href=3D#active-document>active document</a> of the &l=
t;a href=3D#source-browsing-context>source browsing context</a>,=
 if any.</p> <!--
+    potentially http-origin privacy sensitive -->
+
+    <p>If the <a href=3D#browsing-context>browsing context&l=
t;/a> being navigated is a <a href=3D#child-browsing-context>chi=
ld browsing context</a>
+    for an <code><a href=3D#the-iframe-element>iframe</a&=
gt;</code> or <code><a href=3D#the-object-element>objec=
t</a></code> element, then the <a href=3D#fetch title=3Dfe=
tch>fetching
+    algorithm</a> must be invoked from the <code><a href=3D=
#the-iframe-element>iframe</a></code> or <code><a=
 href=3D#the-object-element>object</a></code> element's
+    <a href=3D#browsing-context-scope-origin>browsing context scop=
e origin</a>, if it has one.</p> <!-- potentially http-ori=
gin
+    privacy sensitive -->
+
+    <p>If the <a href=3D#browsing-context>browsing context&l=
t;/a> is a <a href=3D#nested-browsing-context>nested browsing co=
ntext</a>, then in the
+    time between the <a href=3D#fetch>fetch</a> algorithm be=
ing started by this step, and either the
+    creation of a <code><a href=3D#document>Document</a&g=
t;</code> object or the canceling of the <a href=3D#fetch>fet=
ch</a> or <a href=3D#navigate title=3Dnavigate>navigation<=
/a> algorithms, the <a href=3D#browsing-context>browsing context=
</a> must be put in
+    the <a href=3D#delaying-load-events-mode>delaying <code tit=
le=3Devent-load>load</code> events mode</a>.</p> &lt=
;!-- this is
+    what makes <iframe> elements delay the load event of their par=
ent browsing context when their
+    child browsing context is in between this step and the step that sta=
rts the parser. -->
+
+   </li>
+
+   <li>
+
+    <!-- *********************************** ASYNC BOUNDARY *********=
************************** -->
+
+    <p>If <var title=3D"">gone async</var> i=
s false, return to whatever algorithm invoked the
+    navigation steps and continue running these steps asynchronously.&lt=
;/p>
+
+   </li>
+
+   <li><p>Let <var title=3D"">gone async<=
/var> be true.</li>
+
+   <li id=3Dnavigate-redirect-step>
+
+    <!--CLEANUP-->
+    <p><i>Handle redirects</i>: If fetching the resour=
ce results in a redirect, and either the <a href=3D#url>URL</a&g=
t; of the target
+    of the redirect has the <a href=3D#same-origin>same origin<=
/a> as the original resource, or the resource is
+    being obtained using the POST method or a safe method (in HTTP terms=
), return to <a href=3D#navigate-fragid-step>the step labeled <i=
>fragment identifiers</i></a> with the new
+    resource, except that if the <a href=3D#url>URL</a> of t=
he target of the redirect does not have a
+    fragment identifier and the <a href=3D#url>URL</a> of th=
e resource that led to the redirect does, then
+    the fragment identifier of the resource that led to the redirect mus=
t be propagated to the
+    <a href=3D#url>URL</a> of the target of the redirect.&lt=
;/p>
+
+    <p class=3Dexample>So for instance, if the original URL was &q=
uot;<code title=3D"">http://example.com/#!sample</code=
>" and "<code title=3D"">http://example.com/=
</code>" is
+    found to redirect to "<code title=3D"">https://=
example.com/</code>", the URL of the new resource
+    will be "<code title=3D"">https://example.com/#=
!sample</code>".</p>
+
+    <p>Otherwise, if fetching the resource results in a redirect b=
ut the <a href=3D#url>URL</a> of the
+    target of the redirect does not have the <a href=3D#same-origin&g=
t;same origin</a> as the original resource and
+    the resource is being obtained using a method that is neither the PO=
ST method nor a safe method
+    (in HTTP terms), then abort these steps. The user agent may indicate=
 to the user that the
+    navigation has been aborted for security reasons.</p>
+
+   </li>
+
+   <!--CLEANUP: should move this step to above the "handle redir=
ects" step-->
+   <li><p>Wait for one or more bytes to be available or for =
the user agent to establish that the
+   resource in question is empty. During this time, the user agent may a=
llow the user to cancel this
+   navigation attempt or start other navigation attempts.</li>
+
+   <li>
+
+    <p><strong>Fallback in prefer-online mode</strong>=
: If the resource was not fetched from an
+    <a href=3D#application-cache>application cache</a>, and =
was to be fetched using HTTP GET <a href=3D#concept-http-equivalent-ge=
t title=3Dconcept-http-equivalent-get>or equivalent</a>, and the=
re are <a href=3D#relevant-application-cache title=3D"relevant
+    application cache">relevant application caches</a> tha=
t are identified by a URL with the
+    <a href=3D#same-origin>same origin</a> as the URL in que=
stion, and that have this URL as one of their entries,
+    excluding entries marked as <a href=3D#concept-appcache-foreign t=
itle=3Dconcept-appcache-foreign>foreign</a>, and whose
+    <a href=3D#concept-appcache-mode title=3Dconcept-appcache-mode&gt=
;mode</a> is <a href=3D#concept-appcache-mode-prefer-online titl=
e=3Dconcept-appcache-mode-prefer-online>prefer-online</a>, and t=
he user didn't cancel the
+    navigation attempt during the earlier step, and the navigation attem=
pt failed (e.g. the server
+    returned a 4xx or 5xx status code <a href=3D#concept-http-equival=
ent-codes title=3Dconcept-http-equivalent-codes>or
+    equivalent</a>, or there was a DNS error), then:</p>
+
+    <p>Let <var title=3D"">candidate</var> b=
e the resource identified by the URL in question from the
+    <a href=3D#concept-appcache-selection title=3Dconcept-appcache-se=
lection>most appropriate application cache</a> of those that
+    match.</p> <!-- note that a redirect can never reach this p=
oint as it is handled earlier,
+    meaning that a captive portal captures URLs in "prefer-online&q=
uot; caches and you can't ever get to
+    the cached resource of a prefer-online cache if you have a captive p=
ortal -->
+
+    <p>If <var title=3D"">candidate</var> is=
 not marked as <a href=3D#concept-appcache-foreign title=3Dconcept-app=
cache-foreign>foreign</a>, then the user agent must discard the =
failed
+    load and instead continue along these steps using <var title=3D&q=
uot;">candidate</var> as the resource.
+    The user agent may indicate to the user that the original page load =
failed, and that the page
+    used was a previously cached resource.</p>
+
+    <p class=3Dnote>This does not affect the <i>address of t=
he resource from which Request-URIs are
+    obtained</i>, as used to set <a href=3D"#the-document'=
s-referrer">the document's referrer</a> in the <a href=3D=
#create-a-document-object>create a Document
+    object</a> steps below; they still use the value as computed b=
y the original
+    <a href=3D#fetch>fetch</a> algorithm.</p>
+
+   </li>
+
+   <li>
+
+    <p><strong>Fallback for fallback entries</strong>:=
 If the resource was not fetched from an
+    <a href=3D#application-cache>application cache</a>, and =
was to be fetched using HTTP GET <a href=3D#concept-http-equivalent-ge=
t title=3Dconcept-http-equivalent-get>or equivalent</a>, and its=
 URL <a href=3D#concept-appcache-matches-fallback title=3Dconcept-appc=
ache-matches-fallback>matches the fallback namespace</a> of one =
or more
+    <a href=3D#relevant-application-cache title=3D"relevant appl=
ication cache">relevant application caches</a>, and the &lt=
;a href=3D#concept-appcache-selection title=3Dconcept-appcache-selection&=
gt;most appropriate application cache</a> of those that match
+    does not have an entry in its <a href=3D#concept-appcache-onlinew=
hitelist title=3Dconcept-appcache-onlinewhitelist>online
+    whitelist</a> that has the <a href=3D#same-origin>same o=
rigin</a> as the resource's URL and that is a
+    <a href=3D#prefix-match>prefix match</a> for the resourc=
e's URL, and the user didn't cancel the navigation
+    attempt during the previous step, and the navigation attempt failed =
(e.g. the server returned a
+    4xx or 5xx status code <a href=3D#concept-http-equivalent-codes t=
itle=3Dconcept-http-equivalent-codes>or equivalent</a>, or
+    there was a DNS error), then:</p> <!-- note that a redirect=
 can never reach this point as it is
+    handled earlier, meaning that a captive portal captures URLs in fall=
back namespaces and you
+    can't ever get to the fallback file of a resource if you have a capt=
ive portal -->
+
+    <p>Let <var title=3D"">candidate</var> b=
e the <a href=3D#concept-appcache-fallback title=3Dconcept-appcache-fa=
llback>fallback
+    resource</a> specified for the <a href=3D#concept-appcache-=
fallback-ns title=3Dconcept-appcache-fallback-ns>fallback
+    namespace</a> in question. If multiple application caches matc=
h, the user agent must use the
+    fallback of the <a href=3D#concept-appcache-selection title=3Dcon=
cept-appcache-selection>most appropriate application
+    cache</a> of those that match.</p>
+
+    <p>If <var title=3D"">candidate</var> is=
 not marked as <a href=3D#concept-appcache-foreign title=3Dconcept-app=
cache-foreign>foreign</a>, then the user agent must discard the =
failed
+    load and instead continue along these steps using <var title=3D&q=
uot;">candidate</var> as the resource.
+    <a href=3D"#the-document's-address">The document's a=
ddress</a>, if appropriate, will still be the originally requested =
URL,
+    not the fallback URL, but the user agent may indicate to the user th=
at the original page load
+    failed, that the page used was a fallback resource, and what the URL=
 of the fallback resource
+    actually is.</p>
+
+    <p class=3Dnote>This does not affect the <i>address of t=
he resource from which Request-URIs are
+    obtained</i>, as used to set <a href=3D"#the-document'=
s-referrer">the document's referrer</a> in the <a href=3D=
#create-a-document-object>create a Document
+    object</a> steps below; they still use the value as computed b=
y the original
+    <a href=3D#fetch>fetch</a> algorithm.</p>
+
+   </li>
+
+   <li>
+
+    <p><i>Resource handling</i>: If the resource's out=
-of-band metadata (e.g. HTTP headers), not
+    counting any <a href=3D#content-type title=3DContent-Type>type=
 information</a> (such as the Content-Type HTTP
+    header), requires some sort of processing that will not affect the b=
rowsing context, then
+    perform that processing and abort these steps.</p>
+
+    <div class=3Dnote>
+     <p>Such processing might be triggered by, amongst other thing=
s, the following:</p>
+     <ul class=3Dbrief><li>HTTP status codes (e.g. 204 No Co=
ntent or 205 Reset Content)</li>
+      <li>Network errors (e.g. the network interface being unavail=
able)</li>
+      <li>Cryptographic protocol failures (e.g. an incorrect TLS c=
ertificate)</li>
+      <!-- Other schemes are handled earlier -->
+      <!-- Content-Disposition is handled below -->
+      <!-- Content-Type is handled in subsequent steps -->
+      <!-- ...and I can't think of any others. -->
+     </ul></div>
+
+    <p>Responses with HTTP <code title=3Dhttp-content-dispositi=
on>Content-Disposition</code> headers
+    specifying the <code title=3D"">attachment</code&=
gt; disposition type must be handled <a href=3D#as-a-download>as a
+    download</a>.</p>
+
+    <!-- theoretically, HTTP 205 processing would occur here, resetti=
ng all forms with no other
+    effect. However, it seems nobody actually wants to use this ability,=
 so requiring it here seems
+    like unnecessary work. -->
+
+    <p>HTTP 401 responses that do not include a challenge recogniz=
ed by the user agent must be
+    processed as if they had no challenge, e.g. rendering the entity bod=
y as if the response had
+    been 200 OK.</p>
+
+    <p>User agents may show the entity body of an HTTP 401 respons=
e even when the response does
+    include a recognized challenge, with the option to login being inclu=
ded in a non-modal fashion,
+    to enable the information provided by the server to be used by the u=
ser before authenticating.
+    Similarly, user agents should allow the user to authenticate (in a n=
on-modal fashion) against
+    authentication challenges included in other responses such as HTTP 2=
00 OK responses, effectively
+    allowing resources to present HTTP login forms without requiring the=
ir use.</p>
+
+   </li>
+
+   <li><p>Let <var title=3D"">type</var&g=
t; be <a href=3D#content-type-sniffing-0 title=3D"Content-Type sn=
iffing">the sniffed type of
+   the resource</a>.</li>
+
+   <li><p>If the user agent has been configured to process r=
esources of the given <var title=3D"">type</var> us=
ing some mechanism other than rendering the content in a <a href=3D#br=
owsing-context>browsing
+   context</a>, then skip this step. Otherwise, if the <var tit=
le=3D"">type</var> is one of the
+   following types, jump to the appropriate entry in the following list,=
 and process the resource as
+   described there:</p>
+
+    <dl class=3Dswitch><!-- an <span>HTML MIME type</s=
pan> --><dt>"<code><a href=3D#text/html>text=
/html</a></code>"</dt>
+     <dd>Follow the steps given in the <a href=3D#read-html tit=
le=3Dnavigate-html>HTML document</a> section, and
+     abort these steps.</dd>
+
+     <!-- an <span>XML MIME type</span> -->
+     <dt>"<code>application/xml</code>"</=
dt>
+     <dt>"<code>text/xml</code>"</dt>
+     <dt>"<code>image/svg+xml</code>"</dt=
>
+     <dt>"<code><a href=3D#application/xhtml+xml>=
application/xhtml+xml</a></code>"</dt>
+     <dt>Any other type ending in "<code title=3D"&qu=
ot;>+xml</code>" that is not an <a href=3D#explicitly-su=
pported-xml-type>explicitly
+     supported XML type</a></dt> <!-- no need to say that=
 the _subtype_ ends in "+xml" so long as
+     the "sniffed type" algorithm continues to drop parameters=
 -->
+     <dd>Follow the steps given in the <a href=3D#read-xml titl=
e=3Dnavigate-xml>XML document</a> section. If
+     that section determines that the content is <em>not</em&gt=
; to be displayed as a generic XML
+     document, then proceed to the next step in this overall set of step=
s. Otherwise, abort these
+     steps.</dd>
+
+     <dt>"<code>text/plain</code>"</dt&gt=
;
+     <dd>Follow the steps given in the <a href=3D#read-text tit=
le=3Dnavigate-text>plain text file</a> section,
+     and abort these steps.</dd>
+
+     <dt>"<code><a href=3D#multipart/x-mixed-replace=
>multipart/x-mixed-replace</a></code>"</dt>
+     <dd>Follow the steps given in the <a href=3D#read-multipar=
t-x-mixed-replace title=3Dnavigate-multipart-x-mixed-replace>multipart=
/x-mixed-replace</a> section, and abort
+     these steps.</dd>
+
+     <dt>A supported image, video, or audio type</dt>
+     <dd>Follow the steps given in the <a href=3D#read-media ti=
tle=3Dnavigate-media>media</a> section, and abort
+     these steps.</dd>
+
+     <dt>A type that will use an external application to render th=
e content in the <a href=3D#browsing-context>browsing
+     context</a></dt>
+     <dd>Follow the steps given in the <a href=3D#read-plugin t=
itle=3Dnavigate-plugin>plugin</a> section, and
+     abort these steps.</dd>
+
+    </dl><p>An <dfn id=3Dexplicitly-supported-xml-type&gt=
;explicitly supported XML type</dfn> is one for which the user agen=
t is configured to
+    use an external application to render the content (either a <a hr=
ef=3D#plugin>plugin</a> rendering
+    directly in the <a href=3D#browsing-context>browsing context&l=
t;/a>, or a separate application), or one for which the
+    user agent has dedicated processing rules (e.g. a Web browser with a=
 built-in Atom feed viewer
+    would be said to explicitly support the <code>application/atom=
+xml</code> MIME type), or one for
+    which the user agent has a dedicated handler (e.g. one registered us=
ing <code title=3Ddom-navigator-registerContentHandler><a href=3D=
#dom-navigator-registercontenthandler>registerContentHandler()</a&g=
t;</code>).</p>
+
+    <p><dfn id=3D"set-the-document's-address" title=3D=
"set the document's address">Setting the document's address&=
lt;/dfn>: If there is no
+    <dfn id=3Doverride-url>override URL</dfn>, then any <=
code><a href=3D#document>Document</a></code> created=
 by these steps must have its
+    <a href=3D"#the-document's-address" title=3D"the d=
ocument's address">address</a> set to the <a href=3D#url=
>URL</a> that was
+    originally to be <a href=3D#fetch title=3Dfetch>fetched</a&=
gt;, ignoring any other data that was used to
+    obtain the resource (e.g. the entity body in the case of a POST subm=
ission is not part of
+    <a href=3D"#the-document's-address">the document's a=
ddress</a>, nor is the URL of the fallback resource in the case of =
the
+    original load having failed and that URL having been found to match =
a <a href=3D#concept-appcache-fallback-ns title=3Dconcept-appcache-fal=
lback-ns>fallback namespace</a>). However, if there <em>is=
</em>
+    an <a href=3D#override-url>override URL</a>, then any &l=
t;code><a href=3D#document>Document</a></code> creat=
ed by these steps must have
+    its <a href=3D"#the-document's-address" title=3D"t=
he document's address">address</a> set to that <a href=3D=
#url>URL</a>
+    instead.</p>
+
+    <p class=3Dnote>An <a href=3D#override-url title=3D"ov=
erride URL">override URL</a> is set when <a href=3D#conc=
ept-js-deref title=3Dconcept-js-deref>dereferencing a <code>java=
script:</code> URL</a> and when performing
+    <a href=3D#an-overridden-reload>an overridden reload</a>=
.</p>
+
+    <p><dfn id=3Dcreate-a-document-object title=3D"create =
a Document object">Creating a new <code>Document</code&g=
t; object</dfn>: when
+    a <code><a href=3D#document>Document</a></code&=
gt; is created as part of the above steps, the user agent must additional=
ly
+    run the following algorithm as part of creating the new object:</=
p>
+
+    <ol><li><p>Create a new <code><a href=3D#=
window>Window</a></code> object, and associate it with the
+     <code><a href=3D#document>Document</a></code&g=
t;, with one exception: if the <a href=3D#browsing-context>browsing=
 context</a>'s only entry in
+     its <a href=3D#session-history>session history</a> is t=
he <code><a href=3D#about:blank>about:blank</a></cod=
e> <code><a href=3D#document>Document</a></code&g=
t; that was
+     added when the <a href=3D#browsing-context>browsing context&l=
t;/a> was created, and navigation is occurring with
+     <a href=3D#replacement-enabled>replacement enabled</a>,=
 and that <code><a href=3D#document>Document</a></co=
de> has the <a href=3D#same-origin>same
+     origin</a> as the new <code><a href=3D#document>D=
ocument</a></code>, then use the <code><a href=3D#wi=
ndow>Window</a></code> object of that
+     <code><a href=3D#document>Document</a></code&g=
t; instead, and change the <code title=3Ddom-document><a href=3D=
#dom-document-0>document</a></code>
+     attribute of the <code><a href=3D#window>Window</a&g=
t;</code> object to point to the new <code><a href=3D#docu=
ment>Document</a></code>.</p>
+
+     <li><p>Set <a href=3D"#the-document's-referrer&=
quot;>the document's referrer</a> to the <i>address of the=
 resource from which
+     Request-URIs are obtained</i> as determined when the <a hr=
ef=3D#fetch>fetch</a> algorithm obtained the
+     resource, if that algorithm was used and determined such a value; o=
therwise, set it to the
+     empty string.</li>
+
+     <li><p><a href=3D#implement-the-sandboxing>Implem=
ent the sandboxing</a> for the <code><a href=3D#document&g=
t;Document</a></code>.</li>
+
+     <li id=3Dfullscreen-logic>
+
+      <p>If the <a href=3D#active-sandboxing-flag-set>active=
 sandboxing flag set</a> of the <code><a href=3D#document&=
gt;Document</a></code>'s
+      <a href=3D#browsing-context>browsing context</a> or an=
y of its <a href=3D#ancestor-browsing-context title=3D"ancestor b=
rowsing context">ancestor
+      browsing contexts</a> (if any) have the <a href=3D#sandbo=
xed-fullscreen-browsing-context-flag>sandboxed fullscreen browsing con=
text
+      flag</a> set, then skip this step.</p>
+
+      <p>If the <code><a href=3D#document>Document<=
/a></code>'s <a href=3D#browsing-context>browsing context&=
lt;/a> has a <a href=3D#browsing-context-container>browsing cont=
ext
+      container</a> and either it is not an <code><a href=
=3D#the-iframe-element>iframe</a></code> element, or it do=
es not have the
+      <code title=3Dattr-iframe-allowfullscreen><a href=3D#attr=
-iframe-allowfullscreen>allowfullscreen</a></code> attribu=
te specified, or its
+      <code><a href=3D#document>Document</a></code&=
gt; does not have the <a href=3D#fullscreen-enabled-flag>fullscreen=
 enabled flag</a> set, then also
+      skip this step.</p>
+
+      <p>Otherwise, set the <code><a href=3D#document>=
Document</a></code>'s <a href=3D#fullscreen-enabled-flag&g=
t;fullscreen enabled flag</a>.</p>
+
+    </ol></li>
+
+   <li id=3Dnavigate-non-Document>
+
+    <p><i>Non-document content</i>: If, given <var =
title=3D"">type</var>, the new resource is to be
+    handled by displaying some sort of inline content, e.g. a native ren=
dering of the content, an
+    error message because the specified type is not supported, or an inl=
ine prompt to allow the user
+    to select <a href=3D#dom-navigator-registercontenthandler title=3D=
dom-navigator-registerContentHandler>a registered handler</a> fo=
r the
+    given type, then <a href=3D#read-ua-inline title=3Dnavigate-ua-in=
line>display the inline content</a> and abort
+    these steps.</p>
+
+    <p class=3Dnote>In the case of a registered handler being used=
, the algorithm will be reinvoked
+    with a new URL to handle the request.</p>
+
+   </li>
+
+   <li><p>Otherwise, the document's <var title=3D"&q=
uot;>type</var> is such that the resource will not
+   affect the browsing context, e.g. because the resource is to be hande=
d to an external application
+   or because it is an unknown type that will be processed <a href=3D=
#as-a-download>as a download</a>. Process the
+   resource appropriately.</p>
+
+  </ol><hr><p>Some of the sections below, to which the=
 above algorithm defers in certain cases, require the
+  user agent to <dfn id=3Dupdate-the-session-history-with-the-new-pag=
e>update the session history with the new page</dfn>. When a use=
r agent is
+  required to do this, it must <a href=3D#queue-a-task>queue a tas=
k</a> (associated with the <code><a href=3D#document>Do=
cument</a></code>
+  object of the <a href=3D#current-entry>current entry</a>, =
not the new one) to run the following steps:</p>
+
+  <ol><li>
+
+    <p><a href=3D#unload-a-document title=3D"unload a docu=
ment">Unload</a> the <code><a href=3D#document>=
Document</a></code> object of the
+    <a href=3D#current-entry>current entry</a>, with the &lt=
;var title=3D"">recycle</var> parameter set to false.&=
lt;/p>
+
+    <p>If this instance of the <a href=3D#navigate title=3Dnavi=
gate>navigation</a> algorithm is canceled while
+    this step is running the <a href=3D#unload-a-document>unload a=
 document</a> algorithm, then the <a href=3D#unload-a-document&g=
t;unload a
+    document</a> algorithm must be allowed to run to completion, b=
ut this instance of the <a href=3D#navigate title=3Dnavigate>naviga=
tion</a> algorithm must not run beyond this step. (In particular, f=
or
+    instance, the cancelation of this algorithm does not abort any event=
 dispatch or script
+    execution occurring as part of unloading the document or its descend=
ants.)</p>
+
+   </li>
+
+   <li>
+
+    <dl><dt>If the navigation was initiated for <dfn id=3D=
entry-update>entry update</dfn> of an entry</dt>
+
+     <dd>
+
+      <ol><li><p>Replace the <code><a href=3D=
#document>Document</a></code> of the entry being updated, =
and any other entries
+       that referenced the same document as that entry, with the new &lt=
;code><a href=3D#document>Document</a></code>.</l=
i>
+
+       <li><p><a href=3D#traverse-the-history>Traverse=
 the history</a> to the new entry.</li>
+
+      </ol><p class=3Dnote>This can only happen if the entry=
 being updated is not the <a href=3D#current-entry>current
+      entry</a>, and can never happen with <a href=3D#replaceme=
nt-enabled>replacement enabled</a>. (It happens when the
+      user tried to traverse to a session history entry that no longer h=
ad a <code><a href=3D#document>Document</a></code&gt=
;
+      object.)</p>
+
+     </dd>
+
+
+     <dt>Otherwise</dt>
+
+     <dd>
+
+      <ol><li>
+
+        <p>Remove all the entries in the <a href=3D#browsing-co=
ntext>browsing context</a>'s <a href=3D#session-history>se=
ssion
+        history</a> after the <a href=3D#current-entry>curre=
nt entry</a>. If the <a href=3D#current-entry>current entry&l=
t;/a> is
+        the last entry in the session history, then no entries are remov=
ed.</p>
+
+        <p class=3Dnote>This <a href=3D#history-notes>doesn'=
t necessarily have to affect</a> the
+        user agent's user interface.</p>
+
+       </li>
+
+       <li><p>Append a new entry at the end of the <code&=
gt;<a href=3D#history-0>History</a></code> object repre=
senting the new
+       resource and its <code><a href=3D#document>Document&l=
t;/a></code> object and related state.</li>
+
+       <li><p><a href=3D#traverse-the-history>Traverse=
 the history</a> to the new entry. If the navigation was initiated
+       with <a href=3D#replacement-enabled>replacement enabled<=
/a>, then the traversal must itself be initiated with
+       <a href=3D#replacement-enabled>replacement enabled</a&gt=
;.</p>
+
+       </li>
+
+      </ol></dd>
+
+    </dl></li>
+
+   <li><p>The <a href=3D#navigate title=3Dnavigate>nav=
igation algorithm</a> has now <dfn id=3Dconcept-navigate-mature =
title=3Dconcept-navigate-mature>matured</dfn>.</li>
+
+   <li><p><i>Fragment identifier loop</i>: <a=
 href=3D#spin-the-event-loop>Spin the event loop</a> for a user-=
agent-defined
+   amount of time, as desired by the user agent implementor. (This is in=
tended to allow the user
+   agent to optimize the user experience in the face of performance conc=
erns.)</li>
+
+   <li><p>If the <code><a href=3D#document>Docum=
ent</a></code> object has no parser, or its parser has <a =
href=3D#stop-parsing title=3D"stop
+   parsing">stopped parsing</a>, or the user agent has rea=
son to believe the user is no longer
+   interested in scrolling to the fragment identifier, then abort these =
steps.</li>
+
+   <li><p><a href=3D#scroll-to-the-fragment-identifier&gt=
;Scroll to the fragment identifier</a> given in <a href=3D"=
#the-document's-address">the document's
+   address</a>. If this fails to find <a href=3D#the-indicated-=
part-of-the-document title=3D"the indicated part of the document&quo=
t;>an
+   indicated part of the document</a>, then return to the <i&gt=
;fragment identifier loop</i>
+   step.</li>
+
+  </ol><p>The <a href=3D#task-source>task source</a=
> for this <a href=3D#concept-task title=3Dconcept-task>task<=
/a> is the
+  <a href=3D#networking-task-source>networking task source</a&g=
t;.</p>
+
+
+  <h4 id=3Dread-html><span class=3Dsecno>6.6.2 </span>=
<dfn title=3Dnavigate-html>Page load processing model for HTML file=
s</dfn></h4>
+
+  <p>When an HTML document is to be loaded in a <a href=3D#brow=
sing-context>browsing context</a>, the user agent must
+  <a href=3D#queue-a-task>queue a task</a> to <a href=3D#=
create-a-document-object>create a <code>Document</code> ob=
ject</a>, mark it as being
+  an <a href=3D#html-documents title=3D"HTML documents">=
HTML document</a>, set its <a href=3D#concept-document-content-t=
ype title=3Dconcept-document-content-type>content type</a> to &q=
uot;<code title=3D"">text/html</code>",
+  create an <a href=3D#html-parser>HTML parser</a>, and asso=
ciate it with the document. Each <a href=3D#concept-task title=3Dconce=
pt-task>task</a> that the <a href=3D#networking-task-source&g=
t;networking task source</a> places on the
+  <a href=3D#task-queue>task queue</a> while the <a href=3D=
#fetch title=3Dfetch>fetching algorithm</a> runs must then
+  fill the parser's <a href=3D#the-input-byte-stream>input byte st=
ream</a> with the fetched bytes and cause the <a href=3D#html-pa=
rser>HTML
+  parser</a> to perform the appropriate processing of the input st=
ream.</p>
+
+  <p class=3Dnote>The <a href=3D#the-input-byte-stream>input=
 byte stream</a> converts bytes into characters for use in the
+  <a href=3D#tokenization title=3Dtokenization>tokenizer</a>=
. This process relies, in part, on character encoding
+  information found in the real <a href=3D#content-type title=3DConte=
nt-Type>Content-Type metadata</a> of the
+  resource; the "sniffed type" is not used for this purpose.&l=
t;/p>
+
+  <!-- next two paragraphs are nearly identical to the navigate-text =
section, keep them in sync -->
+
+  <p>When no more bytes are available, the user agent must <a h=
ref=3D#queue-a-task>queue a task</a> for the parser
+  to process the implied EOF character, which eventually causes a <co=
de title=3Devent-load>load</code> event to be fired.</p>
+
+  <p>After creating the <code><a href=3D#document>Docu=
ment</a></code> object, but before any script execution, cert=
ainly
+  before the parser <a href=3D#stop-parsing title=3D"stop parsin=
g">stops</a>, the user agent must <a href=3D#update-the-=
session-history-with-the-new-page>update the
+  session history with the new page</a>.</p>
+
+  <p class=3Dnote><a href=3D#concept-appcache-init title=3Dconc=
ept-appcache-init>Application cache selection</a> happens <a =
href=3D#parser-appcache>in the HTML parser</a>.</p>
+
+  <p>The <a href=3D#task-source>task source</a> for th=
e two tasks mentioned in this section must be the
+  <a href=3D#networking-task-source>networking task source</a&g=
t;.</p>
+
+
+
+  <h4 id=3Dread-xml><span class=3Dsecno>6.6.3 </span>&=
lt;dfn title=3Dnavigate-xml>Page load processing model for XML files&l=
t;/dfn></h4>
+
+  <p>When faced with displaying an XML file inline, user agents mu=
st first <a href=3D#create-a-document-object>create a
+  <code>Document</code> object</a>, following the requ=
irements of the XML and Namespaces in XML
+  recommendations, RFC 3023, DOM, and other relevant specifications. &lt=
;a href=3D#refsXML>[XML]</a> <a href=3D#refsXMLNS>[XMLNS]&=
lt;/a> <a href=3D#refsRFC3023>[RFC3023]</a> <a href=3D#=
refsDOM>[DOM]</a></p>
+
+  <p>The actual HTTP headers and other metadata, not the headers a=
s mutated or implied by the
+  algorithms given in this specification, are the ones that must be used=
 when determining the
+  character encoding according to the rules given in the above specifica=
tions. Once the character
+  encoding is established, the <a href=3D"#document's-character-=
encoding">document's character encoding</a> must be set to =
that
+  character encoding.</p>
+
+  <p>If the root element, as parsed according to the XML specifica=
tions cited above, is found to be
+  an <code><a href=3D#the-html-element>html</a></co=
de> element with an attribute <code title=3Dattr-html-manifest>&=
lt;a href=3D#attr-html-manifest>manifest</a></code>
+  whose value is not the empty string, then, as soon as the element is &=
lt;a href=3D#insert-an-element-into-a-document title=3D"insert an
+  element into a document">inserted into the document</a>,=
 the user agent must <a href=3D#resolve-a-url title=3D"resolve a =
url">resolve</a> the value of that attribute relative to th=
at element, and if
+  that is successful, must apply the <a href=3D#concept-url-serialize=
r title=3Dconcept-url-serializer>URL serializer</a>
+  algorithm to the resulting <a href=3D#parsed-url>parsed URL</=
a> with the <i>exclude fragment flag</i> set to
+  obtain <var title=3D"">manifest URL</var>, and t=
hen run the <a href=3D#concept-appcache-init title=3Dconcept-appcache-=
init>application cache selection algorithm</a> with <var titl=
e=3D"">manifest URL</var> as the manifest URL, passing=
 in the newly-created
+  <code><a href=3D#document>Document</a></code>.=
 Otherwise, if the attribute is absent, its value is the empty string, or
+  resolving its value fails, then as soon as the root element is <a h=
ref=3D#insert-an-element-into-a-document title=3D"insert an element =
into
+  a document">inserted into the document</a>, the user age=
nt must run the <a href=3D#concept-appcache-init title=3Dconcept-appca=
che-init>application cache selection algorithm</a> with no manif=
est, and
+  passing in the <code><a href=3D#document>Document</a&gt=
;</code>.</p>
+
+  <p class=3Dnote>Because the processing of the <code title=3Da=
ttr-html-manifest><a href=3D#attr-html-manifest>manifest</a&g=
t;</code>
+  attribute happens only once the root element is parsed, any URLs refer=
enced by processing
+  instructions before the root element (such as <code title=3D"&=
quot;><?xml-stylesheet?></code> and
+  <code title=3D""><?xbl?></code> PI=
s) will be fetched from the network and cannot be
+  cached.</p><!-- v2: fix this somehow -->
+
+  <p>User agents may examine the namespace of the root <code&gt=
;<a href=3D#element>Element</a></code> node of this
+  <code><a href=3D#document>Document</a></code> =
object to perform namespace-based dispatch to alternative processing tool=
s,
+  e.g. determining that the content is actually a syndication feed and p=
assing it to a feed handler.
+  If such processing is to take place, abort the steps in this section, =
and jump to <a href=3D#navigate-non-Document>the next step</a&gt=
; (labeled <i>non-document content</i>) in the
+  <a href=3D#navigate>navigate</a> steps above.</p>
+
+  <p>Otherwise, then, with the newly created <code><a hre=
f=3D#document>Document</a></code>, the user agent must &lt=
;a href=3D#update-the-session-history-with-the-new-page>update
+  the session history with the new page</a>. User agents may do th=
is before the complete document
+  has been parsed (thus achieving <i>incremental rendering</i&g=
t;), and must do this before any scripts
+  are to be executed.</p>
+
+  <p>Error messages from the parse process (e.g. XML namespace wel=
l-formedness errors) may be
+  reported inline by mutating the <code><a href=3D#document>=
Document</a></code>.</p>
+
+
+  <h4 id=3Dread-text><span class=3Dsecno>6.6.4 </span>=
<dfn title=3Dnavigate-text>Page load processing model for text file=
s</dfn></h4>
+
+  <p>When a plain text document is to be loaded in a <a href=3D=
#browsing-context>browsing context</a>, the user agent
+  must <a href=3D#queue-a-task>queue a task</a> to <a hre=
f=3D#create-a-document-object>create a <code>Document</code&g=
t; object</a>, mark it as
+  being an <a href=3D#html-documents title=3D"HTML documents&quo=
t;>HTML document</a>, set its <a href=3D#concept-document-con=
tent-type title=3Dconcept-document-content-type>content type</a>=
 to "<code title=3D"">text/plain</code>",
+  create an <a href=3D#html-parser>HTML parser</a>, associat=
e it with the document, act as if the tokenizer had
+  emitted a start tag token with the tag name "pre" followed b=
y a single U+000A LINE FEED (LF)
+  character<!-- to get eaten, so that a leading LF in the text/plain =
stream doesn't get eaten
+  itself-->, and switch the <a href=3D#html-parser>HTML parser&=
lt;/a>'s tokenizer to the <a href=3D#plaintext-state>PLAINTEXT
+  state</a>. Each <a href=3D#concept-task title=3Dconcept-task&=
gt;task</a> that the <a href=3D#networking-task-source>networ=
king task
+  source</a> places on the <a href=3D#task-queue>task queue&=
lt;/a> while the <a href=3D#fetch title=3Dfetch>fetching
+  algorithm</a> runs must then fill the parser's <a href=3D#the=
-input-byte-stream>input byte stream</a> with the fetched
+  bytes and cause the <a href=3D#html-parser>HTML parser</a>=
 to perform the appropriate processing of the input
+  stream.</p>
+
+  <p>The rules for how to convert the bytes of the plain text docu=
ment into actual characters, and
+  the rules for actually rendering the text to the user, are defined in =
RFC 2046, RFC 3676, and
+  subsequent versions thereof. <a href=3D#refsRFC2046>[RFC2046]&lt=
;/a> <a href=3D#refsRFC3676>[RFC3676]</a></p>
+
+  <p>The <a href=3D"#document's-character-encoding"&g=
t;document's character encoding</a> must be set to the character en=
coding used to
+  decode the document.</p>
+
+  <p>Upon creation of the <code><a href=3D#document>Do=
cument</a></code> object, the user agent must run the <a h=
ref=3D#concept-appcache-init title=3Dconcept-appcache-init>application=
 cache selection algorithm</a> with no manifest, and
+  passing in the newly-created <code><a href=3D#document>Doc=
ument</a></code>.</p>
+
+  <!-- next two paragraphs are nearly identical to the navigate-html =
section and similar to the
+  "navigate-ua-inline" section, and the next three are similar=
 to the navigate-media and
+  navigate-plugin sections; keep them all in sync -->
+
+  <p>When no more bytes are available, the user agent must <a h=
ref=3D#queue-a-task>queue a task</a> for the parser
+  to process the implied EOF character, which eventually causes a <co=
de title=3Devent-load>load</code> event to be fired.</p>
+
+  <p>After creating the <code><a href=3D#document>Docu=
ment</a></code> object, but potentially before the page has f=
inished
+  parsing, the user agent must <a href=3D#update-the-session-history-=
with-the-new-page>update the session history with the new page</a&g=
t;.</p>
+
+  <p>User agents may add content to the <code><a href=3D#=
the-head-element>head</a></code> element of the <code&g=
t;<a href=3D#document>Document</a></code>, e.g.
+  linking to a style sheet or an XBL binding, providing script, giving t=
he document a
+  <code><a href=3D#the-title-element>title</a></cod=
e>, etc.</p>
+
+  <p class=3Dnote>In particular, if the user agent supports the &l=
t;code title=3D"">Format=3DFlowed</code>
+  feature of RFC 3676 then the user agent would need to apply extra styl=
ing to cause the text to
+  wrap correctly and to handle the quoting feature. This could be perfor=
med using, e.g., an XBL
+  binding or a CSS extension.</p>
+
+  <p>The <a href=3D#task-source>task source</a> for th=
e two tasks mentioned in this section must be the
+  <a href=3D#networking-task-source>networking task source</a&g=
t;.</p>
+
+
+  <h4 id=3Dread-multipart-x-mixed-replace><span class=3Dsecno&g=
t;6.6.5 </span><dfn title=3Dnavigate-multipart-x-mixed-replace&g=
t;Page load processing model for <code>multipart/x-mixed-replace&lt=
;/code> resources</dfn></h4>
+
+  <p>When a resource with the type <code><a href=3D#multi=
part/x-mixed-replace>multipart/x-mixed-replace</a></code> =
is to be loaded in a
+  <a href=3D#browsing-context>browsing context</a>, the user=
 agent must parse the resource using the rules for
+  multipart types. <a href=3D#refsRFC2046>[RFC2046]</a></=
p>
+
+  <p>For each body part obtained from the resource, the user agent=
 must run a new instance of the
+  <a href=3D#navigate>navigate</a> algorithm, starting from =
the <i>resource handling</i> step, using the new
+  body part as the resource being navigated, with <a href=3D#replacem=
ent-enabled>replacement enabled</a> if a previous
+  body part from the same resource resulted in a <code><a href=3D=
#document>Document</a></code> object being <a href=3D#c=
reate-a-document-object title=3D"create a document object">c=
reated</a>, and otherwise using the same setup as the
+  <a href=3D#navigate>navigate</a> attempt that caused this =
section to be invoked in the first place.</p>
+
+  <p>For the purposes of algorithms processing these body parts as=
 if they were complete stand-alone
+  resources, the user agent must act as if there were no more bytes for =
those resources whenever the
+  boundary following the body part is reached.</p>
+
+  <p class=3Dnote>Thus, <code title=3Devent-load>load</co=
de> events (and for that matter <code title=3Devent-unload>unloa=
d</code> events) do fire for each body part loaded.</p>
+
+
+  <h4 id=3Dread-media><span class=3Dsecno>6.6.6 </span&gt=
;<dfn title=3Dnavigate-media>Page load processing model for media&l=
t;/dfn></h4>
+
+  <p>When an image, video, or audio resource is to be loaded in a =
<a href=3D#browsing-context>browsing context</a>, the
+  user agent should <a href=3D#create-a-document-object>create a &=
lt;code>Document</code> object</a>, mark it as being an &l=
t;a href=3D#html-documents title=3D"HTML documents">HTML doc=
ument</a>, set its <a href=3D#concept-document-content-type titl=
e=3Dconcept-document-content-type>content type</a> to the sniffe=
d MIME type of the resource
+  (<var title=3D"">type</var> in the <a href=3D=
#navigate>navigate</a> algorithm), append an <code><a h=
ref=3D#the-html-element>html</a></code>
+  element to the <code><a href=3D#document>Document</a&gt=
;</code>, append a <code><a href=3D#the-head-element>he=
ad</a></code> element and a <code><a href=3D#the-bod=
y-element>body</a></code>
+  element to the <code><a href=3D#the-html-element>html</=
a></code> element, append an element <var title=3D"&quot=
;>host element</var> for
+  the media, as described below, to the <code><a href=3D#the-bo=
dy-element>body</a></code> element, and set the appropriat=
e attribute
+  of the element <var title=3D"">host element</var&gt=
;, as described below, to the address of the image,
+  video, or audio resource.</p>
+
+  <p>The element <var title=3D"">host element</=
var> to create for the media is the element given in
+  the table below in the second cell of the row whose first cell describ=
es the media. The
+  appropriate attribute to set is the one given by the third cell in tha=
t same row.</p>
+
+  <table><thead><tr><th> Type of media
+         <th> Element for the media
+         <th> Appropriate attribute
+    <tr><td> Image
+         <td> <code><a href=3D#the-img-element>img<=
/a></code>
+         <td> <code title=3Dattr-img-src><a href=3D#attr-=
img-src>src</a></code>
+    <tr><td> Video
+         <td> <code><a href=3D#the-video-element>video=
</a></code>
+         <td> <code title=3Dattr-media-src><a href=3D#att=
r-media-src>src</a></code>
+    <tr><td> Audio
+         <td> <code><a href=3D#the-audio-element>audio=
</a></code>
+         <td> <code title=3Dattr-media-src><a href=3D#att=
r-media-src>src</a></code>
+  </thead></table><!-- next three paragraphs are similar =
to the navigate-text section, keep them in sync --><p>Then, the =
user agent must act as if it had <a href=3D#stop-parsing title=3D&quot=
;stop parsing">stopped
+  parsing</a>.</p>
+
+  <p>Upon creation of the <code><a href=3D#document>Do=
cument</a></code> object, the user agent must run the <a h=
ref=3D#concept-appcache-init title=3Dconcept-appcache-init>application=
 cache selection algorithm</a> with no manifest, and
+  passing in the newly-created <code><a href=3D#document>Doc=
ument</a></code>.</p>
+
+  <p>After creating the <code><a href=3D#document>Docu=
ment</a></code> object, but potentially before the page has f=
inished
+  fully loading, the user agent must <a href=3D#update-the-session-hi=
story-with-the-new-page>update the session history with the new page&l=
t;/a>.</p>
+
+  <p>User agents may add content to the <code><a href=3D#=
the-head-element>head</a></code> element of the <code&g=
t;<a href=3D#document>Document</a></code>, or
+  attributes to the element <var title=3D"">host element=
</var>, e.g. to link to a style sheet or an
+  XBL binding, to provide a script, to give the document a <code>&=
lt;a href=3D#the-title-element>title</a></code>, to make t=
he media
+  <a href=3D#attr-media-autoplay title=3Dattr-media-autoplay>autop=
lay</a>, etc.</p>
+
+
+  <h4 id=3Dread-plugin><span class=3Dsecno>6.6.7 </span&g=
t;<dfn title=3Dnavigate-plugin>Page load processing model for conte=
nt that uses plugins</dfn></h4>
+
+  <p>When a resource that requires an external resource to be rend=
ered is to be loaded in a
+  <a href=3D#browsing-context>browsing context</a>, the user=
 agent should <a href=3D#create-a-document-object>create a <code=
>Document</code>
+  object</a>, mark it as being an <a href=3D#html-documents tit=
le=3D"HTML documents">HTML document</a> and mark it
+  as being a <dfn id=3Dplugin-document>plugin document</dfn>=
, set its <a href=3D#concept-document-content-type title=3Dconcept-doc=
ument-content-type>content
+  type</a> to the sniffed MIME type of the resource (<var title=
=3D"">type</var> in the
+  <a href=3D#navigate>navigate</a> algorithm), append an &lt=
;code><a href=3D#the-html-element>html</a></code> el=
ement to the
+  <code><a href=3D#document>Document</a></code>,=
 append a <code><a href=3D#the-head-element>head</a>&lt=
;/code> element and a <code><a href=3D#the-body-element>bo=
dy</a></code> element to the
+  <code><a href=3D#the-html-element>html</a></code&=
gt; element, append an <code><a href=3D#the-embed-element>emb=
ed</a></code> to the <code><a href=3D#the-body-eleme=
nt>body</a></code> element, and set
+  the <code title=3Dattr-embed-src><a href=3D#attr-embed-src&gt=
;src</a></code> attribute of the <code><a href=3D#th=
e-embed-element>embed</a></code> element to the
+  address of the resource.</p>
+
+  <p class=3Dnote>The term <a href=3D#plugin-document>plugin=
 document</a> is used by the Content Security Policy
+  specification as part of the mechanism that ensures <code><a =
href=3D#the-iframe-element>iframe</a></code>s can't be use=
d to evade
+  <code title=3D"">plugin-types</code> directives.=
 <a href=3D#refsCSP>[CSP]</a></p>
+
+  <!-- next three paragraphs are similar to the navigate-text section=
, keep them in sync -->
+
+  <p>Then, the user agent must act as if it had <a href=3D#stop=
-parsing title=3D"stop parsing">stopped
+  parsing</a>.</p>
+
+  <p>Upon creation of the <code><a href=3D#document>Do=
cument</a></code> object, the user agent must run the <a h=
ref=3D#concept-appcache-init title=3Dconcept-appcache-init>application=
 cache selection algorithm</a> with no manifest, and
+  passing in the newly-created <code><a href=3D#document>Doc=
ument</a></code>.</p>
+
+  <p>After creating the <code><a href=3D#document>Docu=
ment</a></code> object, but potentially before the page has f=
inished
+  fully loading, the user agent must <a href=3D#update-the-session-hi=
story-with-the-new-page>update the session history with the new page&l=
t;/a>.</p>
+
+  <p>User agents may add content to the <code><a href=3D#=
the-head-element>head</a></code> element of the <code&g=
t;<a href=3D#document>Document</a></code>, or
+  attributes to the <code><a href=3D#the-embed-element>embed=
</a></code> element, e.g. to link to a style sheet or an XBL =
binding, or
+  to give the document a <code><a href=3D#the-title-element>=
title</a></code>.</p>
+
+  <p class=3Dnote id=3DsandboxPluginNavigate>If the <code>&l=
t;a href=3D#document>Document</a></code>'s <a href=3D#a=
ctive-sandboxing-flag-set>active sandboxing
+  flag set</a> has its <a href=3D#sandboxed-plugins-browsing-co=
ntext-flag>sandboxed plugins browsing context flag</a> set, the =
synthesized
+  <code><a href=3D#the-embed-element>embed</a></cod=
e> element will <a href=3D#sandboxPluginEmbed>fail to render the=
 content</a> if
+  the relevant <a href=3D#plugin>plugin</a> cannot be <a =
href=3D#concept-plugin-secure title=3Dconcept-plugin-secure>secured&lt=
;/a>.</p>
+
+
+  <h4 id=3Dread-ua-inline><span class=3Dsecno>6.6.8 </spa=
n><dfn title=3Dnavigate-ua-inline>Page load processing model for=
 inline
+  content that doesn't have a DOM</dfn></h4>
+
+  <p>When the user agent is to display a user agent page inline in=
 a <a href=3D#browsing-context>browsing context</a>,
+  the user agent should <a href=3D#create-a-document-object>create=
 a <code>Document</code> object</a>, mark it as being a=
n
+  <a href=3D#html-documents title=3D"HTML documents">HTM=
L document</a>, set its <a href=3D#concept-document-content-type=
 title=3Dconcept-document-content-type>content type</a> to &quot=
;<code title=3D"">text/html</code>",
+  and then either associate that <code><a href=3D#document>D=
ocument</a></code> with a custom rendering that is not render=
ed
+  using the normal <code><a href=3D#document>Document</a&=
gt;</code> rendering rules, or mutate that <code><a href=3D=
#document>Document</a></code> until
+  it represents the content the user agent wants to render.</p>
+
+  <!-- next two paragraphs are similar to the navigate-text section, =
keep them in sync -->
+
+  <p>Once the page has been set up, the user agent must act as if =
it had <a href=3D#stop-parsing title=3D"stop
+  parsing">stopped parsing</a>.</p>
+
+  <p>Upon creation of the <code><a href=3D#document>Do=
cument</a></code> object, the user agent must run the <a h=
ref=3D#concept-appcache-init title=3Dconcept-appcache-init>application=
 cache selection algorithm</a> with no manifest,
+  passing in the newly-created <code><a href=3D#document>Doc=
ument</a></code>.</p>
+
+  <p>After creating the <code><a href=3D#document>Docu=
ment</a></code> object, but potentially before the page has b=
een
+  completely set up, the user agent must <a href=3D#update-the-sessio=
n-history-with-the-new-page>update the session history with the new
+  page</a>.</p>
+
+
+
+  <h4 id=3Dscroll-to-fragid><span class=3Dsecno>6.6.9 </s=
pan><dfn title=3Dnavigate-fragid>Navigating to a fragment identi=
fier</dfn></h4>
+
+  <p>When a user agent is supposed to navigate to a fragment ident=
ifier, then the user agent must
+  run the following steps:</p>
+
+  <ol><li>
+
+    <p>Remove all the entries in the <a href=3D#browsing-contex=
t>browsing context</a>'s <a href=3D#session-history>sessio=
n history</a>
+    after the <a href=3D#current-entry>current entry</a>. If=
 the <a href=3D#current-entry>current entry</a> is the last e=
ntry in the
+    session history, then no entries are removed.</p>
+
+    <p class=3Dnote>This <a href=3D#history-notes>doesn't ne=
cessarily have to affect</a> the user
+    agent's user interface.</p>
+
+   </li>
+
+   <li><p>Remove any <a href=3D#concept-task title=3Dconc=
ept-task>tasks</a> queued by the <a href=3D#history-traversal=
-task-source>history traversal
+   task source</a> that are associated with any <code><a =
href=3D#document>Document</a></code> objects in the
+   <a href=3D#top-level-browsing-context>top-level browsing contex=
t</a>'s <a href=3D#document-family>document family</a>.=
</li>
+
+   <li><p>Append a new entry at the end of the <code>&=
lt;a href=3D#history-0>History</a></code> object represent=
ing the new
+   resource and its <code><a href=3D#document>Document</a=
></code> object and related state. Its <a href=3D#url>URL&=
lt;/a> must be set
+   to the address to which the user agent was <a href=3D#navigate tit=
le=3Dnavigate>navigating</a>. The title
+   must be left unset.</li>
+
+   <li><p><a href=3D#traverse-the-history>Traverse the=
 history</a> to the new entry, with the <i>asynchronous event=
s</i> flag
+   set. This will <a href=3D#scroll-to-the-fragment-identifier>scr=
oll to the fragment
+   identifier</a> given in what is now <a href=3D"#the-doc=
ument's-address">the document's address</a>.</li>
+
+  </ol><p class=3Dnote>If the scrolling fails because the re=
levant <a href=3D#concept-id title=3Dconcept-id>ID</a> has
+  not yet been parsed, then the original <a href=3D#navigate title=3D=
navigate>navigation</a> algorithm will
+  take care of the scrolling instead, as the last few steps of its <a=
 href=3D#update-the-session-history-with-the-new-page>update the sessi=
on history
+  with the new page</a> algorithm.</p>
+
+  <hr><p>When the user agent is required to <dfn id=3Dscr=
oll-to-the-fragment-identifier>scroll to the fragment identifier</d=
fn> and <a href=3D#the-indicated-part-of-the-document>the
+  indicated part of the document</a>, if any, is <a href=3D#bei=
ng-rendered>being rendered</a>, the user agent must
+  either change the scrolling position of the document using the followi=
ng algorithm, or perform
+  some other action such that <a href=3D#the-indicated-part-of-the-do=
cument>the indicated part of the document</a> is brought to the
+  user's attention. If there is no indicated part, or if the indicated p=
art is not <a href=3D#being-rendered>being
+  rendered</a>, then the user agent must do nothing. The aforement=
ioned algorithm is as
+  follows:</p>
+
+  <ol><li><p>Let <var title=3D"">targe=
t</var> be <a href=3D#the-indicated-part-of-the-document>the =
indicated part of the
+   document</a>, as defined below.</li>
+
+   <li><p>If <var title=3D"">target</var&=
gt; is the top of the document, then <a href=3D#scroll-to-the-beginnin=
g-of-the-document>scroll to the
+   beginning of the document</a> for the <code><a href=3D=
#document>Document</a></code>. <a href=3D#refsCSSOMVIEW=
>[CSSOMVIEW]</a></li>
+
+   <li><p>Otherwise, use the <a href=3D#scroll-an-element=
-into-view>scroll an element into view</a> algorithm to scroll &=
lt;var title=3D"">target</var> into view, with the &lt=
;var title=3D"">align to top flag</var> set. <a hre=
f=3D#refsCSSOMVIEW>[CSSOMVIEW]</a></li>
+
+  </ol><p><dfn id=3Dthe-indicated-part-of-the-document&gt=
;The indicated part of the document</dfn> is the one that the fragm=
ent identifier, if any,
+  identifies. The semantics of the fragment identifier in terms of mappi=
ng it to a specific DOM Node
+  is defined by the specification that defines the <a href=3D#mime-ty=
pe>MIME type</a> used by the
+  <code><a href=3D#document>Document</a></code> =
(for example, the processing of fragment identifiers for <a href=3D#xm=
l-mime-type title=3D"XML
+  MIME type">XML MIME types</a> is the responsibility of R=
FC3023). <a href=3D#refsRFC3023>[RFC3023]</a></p>
+
+  <p>For HTML documents (and <a href=3D#html-mime-type title=3D=
"HTML MIME type">HTML MIME types</a>), the following
+  processing model must be followed to determine what <a href=3D#the-=
indicated-part-of-the-document>the indicated part of the
+  document</a> is.</p>
+
+  <ol><li><p>Apply the <a href=3D#url-parser>URL=
 parser</a> algorithm to the <a href=3D#url>URL</a>, an=
d let <var title=3D"">fragid</var> be the <a hre=
f=3D#concept-url-fragment title=3Dconcept-url-fragment>fragment</a&=
gt; component of the
+   resulting <a href=3D#parsed-url>parsed URL</a>.</li&gt=
;<!-- parsing can't fail, since we checked earlier on
+   when navigating -->
+
+   <li><p>If <var title=3D"">fragid</var&=
gt; is the empty string, then <a href=3D#the-indicated-part-of-the-doc=
ument>the indicated part of the
+   document</a> is the top of the document; stop the algorithm her=
e.</li>
+
+   <li><p>Let <var title=3D"">fragid bytes&l=
t;/var> be the result of <a href=3D#percent-decode title=3D"pe=
rcent
+   decode">percent-decoding</a> <var title=3D"&quo=
t;>fragid</var>.</li>
+
+   <li><p>Let <var title=3D"">decoded fragid=
</var> be the result of applying the <a href=3D#utf-8-decoder&gt=
;UTF-8
+   decoder</a> algorithm to <var title=3D"">fragid=
 bytes</var>. If the <a href=3D#utf-8-decoder>UTF-8 decoder&l=
t;/a>
+   emits a <a href=3D#decoder-error>decoder error</a>, abort=
 the decoder and instead jump to the step labeled <i>no
+   decoded fragid</i>.</li>
+
+   <li><p>If there is an element in the DOM that has an <=
a href=3D#concept-id title=3Dconcept-id>ID</a> exactly
+   equal to <var title=3D"">decoded fragid</var>, =
then the first such element in tree order is
+   <a href=3D#the-indicated-part-of-the-document>the indicated par=
t of the document</a>; stop the algorithm here.</li>
+
+   <li><p><i>No decoded fragid</i>: If there is =
an <code><a href=3D#the-a-element>a</a></code> el=
ement in the DOM that has a <code title=3Dattr-a-name><a href=3D=
#attr-a-name>name</a></code> attribute whose value is exac=
tly equal to <var title=3D"">fragid</var> (<em&g=
t;not</em> <var title=3D"">decoded fragid</var&g=
t;), then the first such
+   element in tree order is <a href=3D#the-indicated-part-of-the-docu=
ment>the indicated part of the document</a>; stop the algorithm
+   here.</li>
+
+   <li><p>If <var title=3D"">fragid</var&=
gt; is an <a href=3D#ascii-case-insensitive>ASCII case-insensitive&=
lt;/a> match for the
+   string <code title=3D"">top</code>, then <a =
href=3D#the-indicated-part-of-the-document>the indicated part of the d=
ocument</a> is the top
+   of the document; stop the algorithm here.</li>
+
+   <li><p>Otherwise, there is no <a href=3D#the-indicated=
-part-of-the-document title=3D"the indicated part of the document&qu=
ot;>indicated part of
+   the document</a>.</li>
+
+  </ol><p>For the purposes of the interaction of HTML with S=
electors' <code title=3Dselector-target>:target</code> pseudo=
-class, the <dfn id=3Dtarget-element><i>target element</i&=
gt;</dfn> is
+  <a href=3D#the-indicated-part-of-the-document>the indicated part=
 of the document</a>, if that is an element; otherwise there is no
+  <i><a href=3D#target-element>target element</a></=
i>. <a href=3D#refsSELECTORS>[SELECTORS]</a></p>
+
+  <p>The <a href=3D#task-source>task source</a> for th=
e task mentioned in this section must be the <a href=3D#dom-manipulati=
on-task-source>DOM
+  manipulation task source</a>.</p>
+
+  </div>
+
+
+
+  <h4 id=3Dhistory-traversal><span class=3Dsecno>6.6.10 <=
/span>History traversal</h4> <!-- session history -->
+
+  <div class=3Dimpl>
+
+  <p>When a user agent is required to <dfn id=3Dtraverse-the-hi=
story>traverse the history</dfn> to a <var title=3D"&quo=
t;>specified
+  entry</var>, optionally with <a href=3D#replacement-enabled&g=
t;replacement enabled</a>, and optionally with the
+  <i>asynchronous events</i> flag set, the user agent must a=
ct as follows.</p>
+
+  <p class=3Dnote>This algorithm is not just invoked when <a hr=
ef=3D#traverse-the-history-by-a-delta title=3D"traverse the history =
by a
+  delta">explicitly going back or forwards in the session histor=
y</a> — it is also invoked
+  in other situations, for example when <a href=3D#navigate title=3Dn=
avigate>navigating a browsing context</a>,
+  as part of <a href=3D#update-the-session-history-with-the-new-page =
title=3D"update the session history with the new page">updat=
ing the session history
+  with the new page</a>.</p>
+
+  <ol><li>
+
+    <p>If there is no longer a <code><a href=3D#document&=
gt;Document</a></code> object for the entry in question,
+    <a href=3D#navigate>navigate</a><!--DONAV history tra=
versal after eviction--> the <a href=3D#browsing-context>browsin=
g
+    context</a> to the resource for that entry to perform an <a=
 href=3D#entry-update>entry update</a> of that
+    entry, and abort these steps. The "<a href=3D#navigate>na=
vigate</a>" algorithm reinvokes this "traverse"
+    algorithm to complete the traversal, at which point there <em>=
is</em> a <code><a href=3D#document>Document</a>&=
lt;/code>
+    object and so this step gets skipped. The navigation must be done us=
ing the same <a href=3D#source-browsing-context>source
+    browsing context</a> as was used the first time this entry was=
 created. (This can never
+    happen with <a href=3D#replacement-enabled>replacement enabled=
</a>.)</p>
+
+    <p class=3Dnote>If the resource was obtained usign a non-idemp=
otent action, for example a POST
+    form submission, or if the resource is no longer available, for exam=
ple because the computer is
+    now offline and the page wasn't cached, navigating to it again might=
 not be possible. In this
+    case, the navigation will result in a different page than previously=
; for example, it might be
+    an error message explaining the problem or offering to resubmit the =
form.</p>
+
+   </li>
+
+   <li><p>If the <a href=3D#current-entry>current entr=
y</a>'s title was not set by the <code title=3Ddom-history-pushS=
tate><a href=3D#dom-history-pushstate>pushState()</a></=
code> or <code title=3Ddom-history-replaceState><a href=3D#do=
m-history-replacestate>replaceState()</a></code> methods, =
then set its title to the value
+   returned by the <code title=3Ddom-document-title><a href=3D#=
document.title>document.title</a></code> IDL attribute.&lt=
;/li>
+
+   <li><p>If appropriate, update the <a href=3D#current-e=
ntry>current entry</a> in the <a href=3D#browsing-context>=
browsing
+   context</a>'s <code><a href=3D#document>Document&lt=
;/a></code> object's <code><a href=3D#history-0>Hist=
ory</a></code> object to reflect any state
+   that the user agent wishes to persist. The entry is then said to be &=
lt;a href=3D#an-entry-with-persisted-user-state>an entry with persiste=
d
+   user state</a>.</li>
+
+   <li><p>If the <var title=3D"">specified e=
ntry</var> has a different <code><a href=3D#document>Do=
cument</a></code> object
+   than the <a href=3D#current-entry>current entry</a>, then=
 run the following substeps:</p>
+
+    <ol><li><p>Remove any <a href=3D#concept-task t=
itle=3Dconcept-task>tasks</a> queued by the <a href=3D#histor=
y-traversal-task-source>history traversal
+     task source</a> that are associated with any <code><=
a href=3D#document>Document</a></code> objects in the
+     <a href=3D#top-level-browsing-context>top-level browsing cont=
ext</a>'s <a href=3D#document-family>document family</a&gt=
;.</li> <!-- so the
+     network is racing history.back(), in the case of setting location.h=
ref=3D"" and then calling
+     history.back() -->
+
+     <li>
+
+      <p>If the <a href=3D#origin>origin</a> of the &l=
t;code><a href=3D#document>Document</a></code> of th=
e <var title=3D"">specified
+      entry</var> is not the <a href=3D#same-origin title=3D&qu=
ot;same origin">same</a> as the <a href=3D#origin>ori=
gin</a> of the
+      <code><a href=3D#document>Document</a></code&=
gt; of the <a href=3D#current-entry>current entry</a>, then r=
un the following
+      sub-sub-steps:</p>
+
+      <ol><li><p>The current <a href=3D#browsing-co=
ntext-name>browsing context name</a> must be stored with all the=
 entries in
+       the history that are associated with <code><a href=3D#do=
cument>Document</a></code> objects with the <a href=3D#=
same-origin>same
+       origin</a> as the <a href=3D#active-document>active d=
ocument</a> <em>and</em> that are contiguous with the
+       <a href=3D#current-entry>current entry</a>.</li&gt=
;
+
+       <li id=3DresetBCName><p>If the browsing context is a =
<a href=3D#top-level-browsing-context>top-level browsing context&lt=
;/a>,
+       but not an <a href=3D#auxiliary-browsing-context>auxiliary =
browsing context</a>, then the browsing context's
+       <a href=3D#browsing-context-name>browsing context name</=
a> must be unset.</li>
+
+      </ol></li>
+
+     <li id=3Dappcache-history-2><p>Make the <var title=3D=
"">specified entry</var>'s
+     <code><a href=3D#document>Document</a></code&g=
t; object the <a href=3D#active-document>active document</a> =
of the <a href=3D#browsing-context>browsing
+     context</a>.</li>
+
+     <li>
+
+      <p>If the <var title=3D"">specified entry&lt=
;/var> has a <a href=3D#browsing-context-name>browsing context n=
ame</a> stored
+      with it, then run the following sub-sub-steps:</p>
+
+      <ol><li><p>Set the browsing context's <a href=
=3D#browsing-context-name>browsing context name</a> to the name =
stored with
+       the specified entry.</li>
+
+       <li><p>Clear any <a href=3D#browsing-context-name =
title=3D"browsing context name">browsing context names</a=
> stored
+       with all entries in the history that are associated with <code=
><a href=3D#document>Document</a></code> objects wit=
h
+       the <a href=3D#same-origin>same origin</a> as the new=
 <a href=3D#active-document>active document</a> and that are =
contiguous
+       with the specified entry.</li>
+
+      </ol></li>
+
+     <li id=3Dhistory-autocomplete><p>If the <var title=3D=
"">specified entry</var>'s
+     <code><a href=3D#document>Document</a></code&g=
t; has any form controls whose <a href=3D#autofill-field-name>autof=
ill field name</a> is "<code title=3Dattr-fe-autocomplete-o=
ff><a href=3D#attr-fe-autocomplete-off>off</a></code&gt=
;", invoke the <a href=3D#concept-form-reset-control title=3Dconc=
ept-form-reset-control>reset algorithm</a> of each of those elem=
ents.</li>
+
+     <li>
+
+      <p>If the <a href=3D#current-document-readiness>curren=
t document readiness</a> of the <var title=3D"">spe=
cified entry</var>'s
+      <code><a href=3D#document>Document</a></code&=
gt; is "<code title=3D"">complete</code>"=
, <a href=3D#queue-a-task>queue a task</a> to run
+      the following sub-sub-steps:</p>
+
+      <ol><li><p>If the <code><a href=3D#docu=
ment>Document</a></code>'s <a href=3D#page-showing>p=
age showing</a> flag is true, then abort this
+       task (i.e. don't fire the event below).</li>
+
+       <li><p>Set the <code><a href=3D#document>=
Document</a></code>'s <a href=3D#page-showing>page show=
ing</a> flag to true.</li>
+
+       <li>
+
+        <p>Run any <dfn id=3Dsession-history-document-visibilit=
y-change-steps>session history document visibility change steps</df=
n> for <code><a href=3D#document>Document</a></co=
de> that
+        are defined by <a href=3D#other-applicable-specifications>=
other applicable specifications</a>.</p>
+
+        <p class=3Dnote>This is specifically intended for use by t=
he Page Visibility specification. <a href=3D#refsPAGEVIS>[PAGEVIS]&=
lt;/a></p>
+
+       </li>
+
+       <li><p><a href=3D#concept-event-fire title=3Dconce=
pt-event-fire>Fire</a> a <a href=3D#concept-events-trusted ti=
tle=3Dconcept-events-trusted>trusted</a> event with the name &lt=
;code title=3Devent-pageshow><a href=3D#event-pageshow>pageshow&=
lt;/a></code> at the <code><a href=3D#window>Window&=
lt;/a></code> object of that
+       <code><a href=3D#document>Document</a></code=
>, but with its <code title=3Ddom-event-target><a href=3D#dom=
-event-target>target</a></code> set to the
+       <code><a href=3D#document>Document</a></code=
> object (and the <code title=3Ddom-event-currentTarget>currentT=
arget</code> set to the <code><a href=3D#window>Window&=
lt;/a></code> object),
+       using the <code><a href=3D#pagetransitionevent>PageTr=
ansitionEvent</a></code> interface, with the <code title=3D=
dom-PageTransitionEvent-persisted><a href=3D#dom-pagetransitioneven=
t-persisted>persisted</a></code> attribute initialized to =
true.
+       This event must not bubble, must not be cancelable, and has no de=
fault action.</li>
+
+      </ol><!-- an interesting thing to test would be to traver=
se back during onload, before the first
+      pageshow has fired, and then to traverse forward again, and see if=
 we get _two_ pageshows. If
+      so, it indicates that browsers don't have a "page showing&quo=
t; flag like this and that the history
+      traversal task source has a higher priority than the DOM manipulat=
ion task source. --></li>
+
+    </ol></li>
+
+   <li><p>Set <a href=3D"#the-document's-address&quo=
t;>the document's address</a> to the URL of the <var title=3D=
"">specified
+   entry</var>.</li>
+
+   <li><p>If the <var title=3D"">specified e=
ntry</var> has a URL whose fragment identifier differs
+   from that of the <a href=3D#current-entry>current entry</a&g=
t;'s when compared in a <a href=3D#case-sensitive>case-sensitive&lt=
;/a>
+   manner, and the two share the same <code><a href=3D#document=
>Document</a></code> object, then let <var title=3D&quo=
t;">hash
+   changed</var> be true, and let <var title=3D"">=
old URL</var> be the URL of the <a href=3D#current-entry>curr=
ent
+   entry</a> and <var title=3D"">new URL</var&g=
t; be the URL of the <var title=3D"">specified
+   entry</var>. Otherwise, let <var title=3D"">has=
h changed</var> be false.</li>
+
+   <li><p>If the traversal was initiated with <dfn id=3Dr=
eplacement-enabled>replacement enabled</dfn>, remove the entry
+   immediately before the <var title=3D"">specified entr=
y</var> in the session history.</p>
+
+   <li><p>If the <var title=3D"">specified e=
ntry</var> is not <a href=3D#an-entry-with-persisted-user-state&=
gt;an entry with persisted user
+   state</a>, but its URL has a fragment identifier, <a href=3D=
#scroll-to-the-fragment-identifier>scroll to the fragment
+   identifier</a>.</li>
+
+   <li>
+
+    <p>If the entry is <a href=3D#an-entry-with-persisted-user-=
state>an entry with persisted user state</a>, the user agent may=
 update
+    aspects of the document and its rendering, for instance the scroll p=
osition or values of form
+    fields, that it had previously recorded.</p>
+
+    <!-- see similar paragraphs in the textarea and input sections --=
>
+    <p class=3Dnote>This can even include updating the <code ti=
tle=3Dattr-dir><a href=3D#the-dir-attribute>dir</a></co=
de> attribute
+    of <code><a href=3D#the-textarea-element>textarea</a&=
gt;</code> elements or <code><a href=3D#the-input-element&=
gt;input</a></code> elements whose <code title=3Dattr-inpu=
t-type><a href=3D#attr-input-type>type</a></code> at=
tribute is in either the <a href=3D"#text-(type=3Dtext)-state-and=
-search-state-(type=3Dsearch)" title=3Dattr-input-type-text>Text&=
lt;/a> state or the <a href=3D"#text-(type=3Dtext)-state-and-s=
earch-state-(type=3Dsearch)" title=3Dattr-input-type-search>Searc=
h</a> state, if the persisted state includes the
+    directionality of user input in such controls.</p>
+
+   </li>
+
+   <li><p>If the entry is a <a href=3D#state-object>st=
ate object</a> entry, let <var title=3D"">state<=
/var> be a
+   <a href=3D#structured-clone>structured clone</a> of that =
state object. Otherwise, let <var title=3D"">state</va=
r> be
+   null.</li>
+
+   <li><p>Set <code title=3Ddom-history-state><a hr=
ef=3D#dom-history-state>history.state</a></code> to <va=
r title=3D"">state</var>.</li>
+
+   <li><p>Let <var title=3D"">state changed&=
lt;/var> be true if the <code><a href=3D#document>Document=
</a></code> of the <var title=3D"">specified =
entry</var> has a <a href=3D#latest-entry>latest entry</a&=
gt;, and that entry is not the <var title=3D"">specified =
entry</var>; otherwise let it be false.</p>
+
+   <li><p>Let the <a href=3D#latest-entry>latest entry=
</a> of the <code><a href=3D#document>Document</a&gt=
;</code> of the <var title=3D"">specified entry<=
/var> be the <var title=3D"">specified entry</var&g=
t;.</li>
+
+   <li>
+
+    <p>If the <i>asynchronous events</i> flag is not s=
et, then run the following steps
+    synchronously. Otherwise, the <i>asynchronous events</i>=
 flag is set; <a href=3D#queue-a-task>queue a task</a>
+    to run the following substeps.</p>
+
+    <ol><li><p>If <var title=3D"">stat=
e changed</var> is true, <a href=3D#concept-event-fire title=3Dc=
oncept-event-fire>fire</a> a <a href=3D#concept-events-truste=
d title=3Dconcept-events-trusted>trusted</a>
+     event with the name <code title=3Devent-popstate><a href=3D=
#event-popstate>popstate</a></code> at the <code>&lt=
;a href=3D#window>Window</a></code>
+     object of the <code><a href=3D#document>Document</a&=
gt;</code>, using the <code><a href=3D#popstateevent>Po=
pStateEvent</a></code> interface, with the
+     <code title=3Ddom-PopStateEvent-state><a href=3D#dom-popst=
ateevent-state>state</a></code> attribute initialized to t=
he value of <var title=3D"">state</var>. This event=
 must bubble but not be cancelable and has no default
+     action.</li>
+
+     <li><p>If <var title=3D"">hash changed&=
lt;/var> is true, then <a href=3D#concept-event-fire title=3Dconcep=
t-event-fire>fire</a> a <a href=3D#concept-events-trusted tit=
le=3Dconcept-events-trusted>trusted</a>
+     event with the name <code title=3Devent-hashchange><a href=
=3D#event-hashchange>hashchange</a></code> at the <a hr=
ef=3D#browsing-context>browsing
+     context</a>'s <code><a href=3D#window>Window</=
a></code> object, using the <code><a href=3D#hashchange=
event>HashChangeEvent</a></code> interface,
+     with the <code title=3Ddom-HashChangeEvent-oldURL><a href=3D=
#dom-hashchangeevent-oldurl>oldURL</a></code> attribute in=
itialized to <var title=3D"">old URL</var> and the =
<code title=3Ddom-HashChangeEvent-newURL><a href=3D#dom-hashchan=
geevent-newurl>newURL</a></code> attribute
+     initialized to <var title=3D"">new URL</var>.=
 This event must bubble but not be cancelable and
+     has no default action.</li>
+
+    </ol></li>
+
+   <li><p>The <a href=3D#current-entry>current entry&l=
t;/a> is now the <var title=3D"">specified entry</v=
ar>.</li>
+
+  </ol><p>The <a href=3D#task-source>task source</a=
> for the tasks mentioned above is the <a href=3D#dom-manipulation-=
task-source>DOM manipulation task
+  source</a>.</p>
+
+
+  <h5 id=3Devent-definitions-1><span class=3Dsecno>6.6.10.1 =
</span>Event definitions</h5>
+
+  </div>
+
+  <p>The <dfn id=3Devent-popstate title=3Devent-popstate>&lt=
;code>popstate</code></dfn> event is fired in certain case=
s
+  when navigating to a <a href=3D#session-history-entry>session hi=
story entry</a>.</p>
+
+  <pre class=3Didl>[Constructor(DOMString type, optional <a hre=
f=3D#popstateeventinit>PopStateEventInit</a> eventInitDict)]
+interface <dfn id=3Dpopstateevent>PopStateEvent</dfn> : <=
a href=3D#event>Event</a> {
+  readonly attribute any <a href=3D#dom-popstateevent-state title=3Dd=
om-PopStateEvent-state>state</a>;
+};
+
+dictionary <dfn id=3Dpopstateeventinit>PopStateEventInit</dfn&g=
t; : <a href=3D#eventinit>EventInit</a> {
+  any state;
+};</pre>
+
+  <dl class=3Ddomintro><dt><var title=3D"">e=
vent</var> . <code title=3Ddom-PopStateEvent-state><a href=
=3D#dom-popstateevent-state>state</a></code></dt>
+
+   <dd>
+
+    <p>Returns a copy of the information that was provided to <=
code title=3Ddom-history-pushState><a href=3D#dom-history-pushstate=
>pushState()</a></code> or <code title=3Ddom-history-re=
placeState><a href=3D#dom-history-replacestate>replaceState()&lt=
;/a></code>.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-popstateevent-state title=3Ddom-PopState=
Event-state><code>state</code></dfn> attribute must =
return the
+  value it was initialized to. When the object is created, this attribut=
e must be initialized to
+  null. It represents the context information for the event, or null, if=
 the state represented is
+  the initial state of the <code><a href=3D#document>Documen=
t</a></code>.</p>
+
+  </div>
+
+  <hr><p>The <dfn id=3Devent-hashchange title=3Devent-has=
hchange><code>hashchange</code></dfn> event is fired=
 when navigating
+  to a <a href=3D#session-history-entry>session history entry</=
a> whose <a href=3D#url>URL</a> differs from that of the p=
revious
+  one only in the fragment identifier.</p>
+
+  <pre class=3Didl>[Constructor(DOMString type, optional <a hre=
f=3D#hashchangeeventinit>HashChangeEventInit</a> eventInitDict)]
+interface <dfn id=3Dhashchangeevent>HashChangeEvent</dfn> : =
<a href=3D#event>Event</a> {
+  readonly attribute DOMString <a href=3D#dom-hashchangeevent-oldurl =
title=3Ddom-HashChangeEvent-oldURL>oldURL</a>;
+  readonly attribute DOMString <a href=3D#dom-hashchangeevent-newurl =
title=3Ddom-HashChangeEvent-newURL>newURL</a>;
+};
+
+dictionary <dfn id=3Dhashchangeeventinit>HashChangeEventInit</d=
fn> : <a href=3D#eventinit>EventInit</a> {
+  DOMString oldURL;
+  DOMString newURL;
+};</pre>
+
+  <dl class=3Ddomintro><dt><var title=3D"">e=
vent</var> . <code title=3Ddom-HashChangeEvent-oldURL><a h=
ref=3D#dom-hashchangeevent-oldurl>oldURL</a></code></dt=
>
+
+   <dd>
+
+    <p>Returns the <a href=3D#url>URL</a> of the <a=
 href=3D#session-history-entry>session history entry</a> that wa=
s previously
+    current.</p>
+
+   </dd>
+
+
+   <dt><var title=3D"">event</var> . <cod=
e title=3Ddom-HashChangeEvent-newURL><a href=3D#dom-hashchangeevent=
-newurl>newURL</a></code></dt>
+
+   <dd>
+
+    <p>Returns the <a href=3D#url>URL</a> of the <a=
 href=3D#session-history-entry>session history entry</a> that is=
 now
+    current.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-hashchangeevent-oldurl title=3Ddom-HashC=
hangeEvent-oldURL><code>oldURL</code></dfn> attribut=
e must return the
+  value it was initialized to. When the object is created, this attribut=
e must be initialized to
+  null. It represents context information for the event, specifically th=
e URL of the <a href=3D#session-history-entry>session
+  history entry</a> that was traversed from.</p>
+
+  <p>The <dfn id=3Ddom-hashchangeevent-newurl title=3Ddom-HashC=
hangeEvent-newURL><code>newURL</code></dfn> attribut=
e must return the
+  value it was initialized to. When the object is created, this attribut=
e must be initialized to
+  null. It represents context information for the event, specifically th=
e URL of the <a href=3D#session-history-entry>session
+  history entry</a> that was traversed to.</p>
+
+  </div>
+
+  <hr><p>The <dfn id=3Devent-pageshow title=3Devent-pages=
how><code>pageshow</code></dfn> event is fired when =
<a href=3D#traverse-the-history title=3D"traverse the history&quo=
t;>traversing</a> <em>to</em> a <a href=3D#sessio=
n-history-entry>session history entry</a>.
+  The <dfn id=3Devent-pagehide title=3Devent-pagehide><code>=
pagehide</code></dfn> event is fired when traversing
+  <em>from</em> a <a href=3D#session-history-entry>ses=
sion history entry</a>. The specification uses the <a href=3D#pa=
ge-showing>page
+  showing</a> flag to ensure that scripts receive these events in =
a consistent manner (e.g. that
+  they never receive two <code title=3Devent-pagehide><a href=3D=
#event-pagehide>pagehide</a></code> events in a row withou=
t an
+  intervening <code title=3Devent-pageshow><a href=3D#event-pag=
eshow>pageshow</a></code>, or vice versa).</p>
+
+  <pre class=3Didl>[Constructor(DOMString type, optional <a hre=
f=3D#pagetransitioneventinit>PageTransitionEventInit</a> eventIn=
itDict)]
+interface <dfn id=3Dpagetransitionevent>PageTransitionEvent</df=
n> : <a href=3D#event>Event</a> {
+  readonly attribute boolean <a href=3D#dom-pagetransitionevent-persi=
sted title=3Ddom-PageTransitionEvent-persisted>persisted</a>;
+};
+
+dictionary <dfn id=3Dpagetransitioneventinit>PageTransitionEventIn=
it</dfn> : <a href=3D#eventinit>EventInit</a> {
+  boolean persisted;
+};</pre>
+
+  <dl class=3Ddomintro><dt><var title=3D"">e=
vent</var> . <code title=3Ddom-PageTransitionEvent-persisted>=
<a href=3D#dom-pagetransitionevent-persisted>persisted</a>&lt=
;/code></dt>
+
+   <dd>
+
+    <p>For the <code title=3Devent-pageshow><a href=3D#ev=
ent-pageshow>pageshow</a></code> event, returns false if t=
he page is
+    newly being loaded (and the <code title=3Devent-load>load</=
code> event will fire). Otherwise,
+    returns true.</p>
+
+    <p>For the <code title=3Devent-pagehide><a href=3D#ev=
ent-pagehide>pagehide</a></code> event, returns false if t=
he page is
+    going away for the last time. Otherwise, returns true, meaning that =
(if nothing conspires to
+    make the page unsalvageable) the page might be reused if the user na=
vigates back to this
+    page.</p>
+
+    <p>Things that can cause the page to be unsalvageable include:=
</p>
+
+    <ul class=3Dbrief><li><code title=3Ddom-document-open=
><a href=3D#dom-document-open>document.open()</a></code=
>
+     <li>Listening for <code title=3Devent-beforeunload>befo=
reunload</code> events
+     <li>Listening for <code title=3Devent-unload>unload<=
/code> events
+     <li>Having <code><a href=3D#the-iframe-element>if=
rame</a></code>s that are not salvageable
+     <li>Active <code><a href=3D#websocket>WebSocket&l=
t;/a></code> objects
+     <li><a href=3D#abort-a-document title=3D"abort a docu=
ment">Aborting a <code>Document</code></a>
+    </ul></dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-pagetransitionevent-persisted title=3Ddo=
m-PageTransitionEvent-persisted><code>persisted</code><=
/dfn> attribute must
+  return the value it was initialized to. When the object is created, th=
is attribute must be
+  initialized to false. It represents the context information for the ev=
ent.</p>
+
+  </div>
+
+
+
+  <h4 id=3Dunloading-documents><span class=3Dsecno>6.6.11 &l=
t;/span>Unloading documents</h4>
+
+  <div class=3Dimpl>
+
+  <p>A <code><a href=3D#document>Document</a>&lt=
;/code> has a <dfn id=3Dconcept-document-salvageable title=3Dconcep=
t-document-salvageable><i>salvageable</i></dfn> stat=
e, which must initially be true,
+  a <dfn id=3Dfired-unload>fired unload</dfn> flag, which mu=
st initially be false, and a <dfn id=3Dpage-showing>page showing&lt=
;/dfn> flag,
+  which must initially be false.</p>
+
+  <p><a href=3D#event-loop title=3D"event loop">Ev=
ent loops</a> have a <dfn id=3Dtermination-nesting-level>term=
ination nesting level</dfn>
+  counter, which must initially be zero.</p>
+
+  <p>When a user agent is to <dfn id=3Dprompt-to-unload-a-docum=
ent>prompt to unload a document</dfn>, it must run the following
+  steps.</p>
+
+  <ol><li><p>Increase the <a href=3D#event-loop>=
event loop</a>'s <a href=3D#termination-nesting-level>termina=
tion nesting level</a> by
+   one.</li>
+
+   <li><p>Increase the <code><a href=3D#document&gt=
;Document</a></code>'s <a href=3D#ignore-opens-during-unlo=
ad-counter>ignore-opens-during-unload counter</a> by
+   one.</li>
+
+   <li><p>Let <var title=3D"">event</var&=
gt; be a new <a href=3D#concept-events-trusted title=3Dconcept-events-=
trusted>trusted</a>
+   <code><a href=3D#beforeunloadevent>BeforeUnloadEvent</=
a></code> event object with the name <code title=3Devent-befo=
reunload>beforeunload</code>, which does not bubble but is cance=
lable.</li>
+
+   <li><p><i>Dispatch</i>: <a href=3D#concept=
-event-dispatch title=3Dconcept-event-dispatch>Dispatch</a> <=
var title=3D"">event</var> at the <code><a hr=
ef=3D#document>Document</a></code>'s <code><a hre=
f=3D#window>Window</a></code> object.</li>
+
+   <li><p>Decrease the <a href=3D#event-loop>event loo=
p</a>'s <a href=3D#termination-nesting-level>termination nest=
ing level</a> by
+   one.</li>
+
+   <li><p>Release the <a href=3D#storage-mutex>storage=
 mutex</a>.</li>
+
+   <li><p>If any event listeners were triggered by the earli=
er <i>dispatch</i> step, then set the
+   <code><a href=3D#document>Document</a></code>=
's <i title=3Dconcept-document-salvageable><a href=3D#concept-do=
cument-salvageable>salvageable</a></i> state to
+   false.</li>
+
+   <li>
+
+    <p>If the <code title=3Ddom-BeforeUnloadEvent-returnValue&g=
t;<a href=3D#dom-beforeunloadevent-returnvalue>returnValue</a&gt=
;</code> attribute of the
+    <var title=3D"">event</var> object is not the =
empty string, or if the event was canceled, then the
+    user agent should ask the user to confirm that they wish to unload t=
he document.</p>
+
+    <p>The prompt shown by the user agent may include the string o=
f the <code title=3Ddom-BeforeUnloadEvent-returnValue><a href=3D=
#dom-beforeunloadevent-returnvalue>returnValue</a></code> =
attribute, or some leading subset
+    thereof. (A user agent may want to truncate the string to 1024 chara=
cters for display, for
+    instance.)</p>
+
+    <p>The user agent must <a href=3D#pause>pause</a> =
while waiting for the user's response.</p>
+
+    <p>If the user did not confirm the page navigation, then the u=
ser agent <dfn id=3Drefused-to-allow-the-document-to-be-unloaded>re=
fused to allow
+    the document to be unloaded</dfn>.</p>
+
+   </li>
+
+   <li><p>If this algorithm was invoked by another instance =
of the "prompt to unload a document"
+   algorithm (i.e. through the steps below that invoke this algorithm fo=
r all descendant browsing
+   contexts), then jump to the step labeled <i>end</i>.</=
li>
+
+   <li><p>Let <var title=3D"">descendants&lt=
;/var> be the <a href=3D#list-of-the-descendant-browsing-contexts&g=
t;list of the descendant browsing
+   contexts</a> of the <code><a href=3D#document>Docum=
ent</a></code>.</li>
+
+   <li>
+
+    <p>If <var title=3D"">descendants</var> =
is not an empty list, then for each <a href=3D#browsing-context>bro=
wsing
+    context</a> <var title=3D"">b</var> in &=
lt;var title=3D"">descendants</var> run the following
+    substeps:</p>
+
+    <ol><li><p><a href=3D#prompt-to-unload-a-docume=
nt title=3D"prompt to unload a document">Prompt to unload&lt=
;/a> the <a href=3D#active-document>active
+     document</a> of the <a href=3D#browsing-context>browsin=
g context</a> <var title=3D"">b</var>. If the=
 user
+     <a href=3D#refused-to-allow-the-document-to-be-unloaded>refus=
ed to allow the document to be unloaded</a>, then the user implicit=
ly also <a href=3D#refused-to-allow-the-document-to-be-unloaded title=3D=
"refused to allow the document to be unloaded">refused to al=
low <em>this</em> document to
+     be unloaded</a>; jump to the step labeled <i>end</i&=
gt;.</p>
+
+     <li><p>If the <i title=3Dconcept-document-salvageabl=
e><a href=3D#concept-document-salvageable>salvageable</a>&=
lt;/i> state of the <a href=3D#active-document>active
+     document</a> of the <a href=3D#browsing-context>browsin=
g context</a> <var title=3D"">b</var> is fals=
e, then set
+     the <i title=3Dconcept-document-salvageable><a href=3D#con=
cept-document-salvageable>salvageable</a></i> state of &lt=
;em>this</em> document to
+     false also.</li>
+
+    </ol></li>
+
+   <li><p><i>End</i>: Decrease the <code>&=
lt;a href=3D#document>Document</a></code>'s <a href=3D#=
ignore-opens-during-unload-counter>ignore-opens-during-unload
+   counter</a> by one.</li>
+
+  </ol><p>When a user agent is to <dfn id=3Dunload-a-docu=
ment>unload a document</dfn>, it must run the following steps. T=
hese
+  steps are passed an argument, <var title=3D"">recycle&=
lt;/var>, which is either true or false,
+  indicating whether the <code><a href=3D#document>Document&=
lt;/a></code> object is going to be re-used. (This is set by the
+  <code title=3Ddom-document-open><a href=3D#dom-document-open&=
gt;document.open()</a></code> method.)</p>
+
+  <ol><li><p>Increase the <a href=3D#event-loop>=
event loop</a>'s <a href=3D#termination-nesting-level>termina=
tion nesting level</a> by
+   one.</li>
+
+   <li><p>Increase the <code><a href=3D#document&gt=
;Document</a></code>'s <a href=3D#ignore-opens-during-unlo=
ad-counter>ignore-opens-during-unload counter</a> by
+   one.</li>
+
+   <li><p>If the <code><a href=3D#document>Docum=
ent</a></code>'s <a href=3D#page-showing>page showing&l=
t;/a> flag is false, then jump to the
+   step labeled <i>unload event</i> below (i.e. skip firing =
the <code title=3Devent-pagehide><a href=3D#event-pagehide>pa=
gehide</a></code> event and don't rerun the <a href=3D#unl=
oading-document-visibility-change-steps>unloading document
+   visibility change steps</a>).</li>
+
+   <li><p>Set the <code><a href=3D#document>Docu=
ment</a></code>'s <a href=3D#page-showing>page showing&=
lt;/a> flag to false.</li>
+
+   <li><p><a href=3D#concept-event-fire title=3Dconcept-e=
vent-fire>Fire</a> a <a href=3D#concept-events-trusted title=3D=
concept-events-trusted>trusted</a> event with the name <code =
title=3Devent-pagehide><a href=3D#event-pagehide>pagehide</a&=
gt;</code> at the <code><a href=3D#window>Window</a&=
gt;</code> object of the
+   <code><a href=3D#document>Document</a></code>=
, but with its <code title=3Ddom-event-target><a href=3D#dom-eve=
nt-target>target</a></code> set to the
+   <code><a href=3D#document>Document</a></code>=
 object (and the <code title=3Ddom-event-currentTarget>currentTarge=
t</code>
+   set to the <code><a href=3D#window>Window</a></c=
ode> object), using the <code><a href=3D#pagetransitionevent&=
gt;PageTransitionEvent</a></code> interface,
+   with the <code title=3Ddom-PageTransitionEvent-persisted><a =
href=3D#dom-pagetransitionevent-persisted>persisted</a></code=
> attribute initialized
+   to true if the <code><a href=3D#document>Document</a&g=
t;</code> object's <i title=3Dconcept-document-salvageable>&l=
t;a href=3D#concept-document-salvageable>salvageable</a></i&g=
t; state is true, and false otherwise. This
+   event must not bubble, must not be cancelable, and has no default act=
ion.</li>
+
+   <li>
+
+    <p>Run any <dfn id=3Dunloading-document-visibility-change-s=
teps>unloading document visibility change steps</dfn> for <co=
de><a href=3D#document>Document</a></code> that
+    are defined by <a href=3D#other-applicable-specifications>othe=
r applicable specifications</a>.</p>
+
+    <p class=3Dnote>This is specifically intended for use by the P=
age Visibility specification. <a href=3D#refsPAGEVIS>[PAGEVIS]</=
a></p>
+
+   </li>
+
+   <li><p><i>Unload event</i>: If the <code&g=
t;<a href=3D#document>Document</a></code>'s <a href=3D=
#fired-unload>fired unload</a> flag is
+   false, <a href=3D#fire-a-simple-event>fire a simple event</a=
> named <code title=3Devent-unload>unload</code> at the
+   <code><a href=3D#document>Document</a></code>=
's <code><a href=3D#window>Window</a></code> obje=
ct.</li>
+
+   <li><p>Decrease the <a href=3D#event-loop>event loo=
p</a>'s <a href=3D#termination-nesting-level>termination nest=
ing level</a> by
+   one.</li>
+
+   <li><p>Release the <a href=3D#storage-mutex>storage=
 mutex</a>.</li>
+
+   <li><p>If any event listeners were triggered by the earli=
er <i>unload event</i> step, then set
+   the <code><a href=3D#document>Document</a></code=
> object's <i title=3Dconcept-document-salvageable><a href=3D=
#concept-document-salvageable>salvageable</a></i> state
+   to false and set the <code><a href=3D#document>Document&l=
t;/a></code>'s <a href=3D#fired-unload>fired unload</a&=
gt; flag to true.</li>
+
+   <li><p>Run any <a href=3D#unloading-document-cleanup-s=
teps>unloading document cleanup steps</a> for <code><a =
href=3D#document>Document</a></code> that are
+   defined by this specification and <a href=3D#other-applicable-spec=
ifications>other applicable specifications</a>.</li>
+
+   <li><p>If this algorithm was invoked by another instance =
of the "unload a document" algorithm
+   (i.e. by the steps below that invoke this algorithm for all descendan=
t browsing contexts), then
+   jump to the step labeled <i>end</i>.</li>
+
+   <li><p>Let <var title=3D"">descendants&lt=
;/var> be the <a href=3D#list-of-the-descendant-browsing-contexts&g=
t;list of the descendant browsing
+   contexts</a> of the <code><a href=3D#document>Docum=
ent</a></code>.</li>
+
+   <li>
+
+    <p>If <var title=3D"">descendants</var> =
is not an empty list, then for each <a href=3D#browsing-context>bro=
wsing
+    context</a> <var title=3D"">b</var> in &=
lt;var title=3D"">descendants</var> run the following
+    substeps:</p>
+
+    <ol><li><p><a href=3D#unload-a-document title=3D=
"unload a document">Unload</a> the <a href=3D#activ=
e-document>active document</a> of the
+     <a href=3D#browsing-context>browsing context</a> <va=
r title=3D"">b</var> with the <var title=3D"&q=
uot;>recycle</var>
+     parameter set to false.</li>
+
+     <li><p>If the <i title=3Dconcept-document-salvageabl=
e><a href=3D#concept-document-salvageable>salvageable</a>&=
lt;/i> state of the <a href=3D#active-document>active
+     document</a> of the <a href=3D#browsing-context>browsin=
g context</a> <var title=3D"">b</var> is fals=
e, then set
+     the <i title=3Dconcept-document-salvageable><a href=3D#con=
cept-document-salvageable>salvageable</a></i> state of &lt=
;em>this</em> document to
+     false also.</li>
+
+    </ol></li>
+
+   <li><p>If both the <code><a href=3D#document>=
Document</a></code>'s <i title=3Dconcept-document-salvagea=
ble><a href=3D#concept-document-salvageable>salvageable</a&gt=
;</i> state and <var title=3D"">recycle</var>=
 are
+   false, then the <code><a href=3D#document>Document</a&=
gt;</code>'s <a href=3D#browsing-context>browsing context<=
/a> must <a href=3D#discard-a-document title=3D"discard a
+   document">discard the <code>Document</code></a=
>.</li>
+
+   <li><p><i>End</i>: Decrease the <code>&=
lt;a href=3D#document>Document</a></code>'s <a href=3D#=
ignore-opens-during-unload-counter>ignore-opens-during-unload
+   counter</a> by one.</li>
+
+  </ol><p>This specification defines the following <dfn i=
d=3Dunloading-document-cleanup-steps>unloading document cleanup steps&=
lt;/dfn>. Other
+  specifications can define more.</p>
+
+  <ol><li>
+
+    <p><a href=3D#make-disappear>Make disappear</a> an=
y <code><a href=3D#websocket>WebSocket</a></code>=
 objects that were created by the <code title=3Ddom-WebSocket><a=
 href=3D#dom-websocket>WebSocket()</a></code> constructor =
from the
+    <code><a href=3D#document>Document</a></code&gt=
;'s <code><a href=3D#window>Window</a></code> obj=
ect.</p>
+
+    <p>If this affected any <code><a href=3D#websocket&gt=
;WebSocket</a></code> objects, then set <code><a hre=
f=3D#document>Document</a></code>'s <i title=3Dconcept-=
document-salvageable><a href=3D#concept-document-salvageable>sal=
vageable</a></i> state to false.</p>
+
+   </li>
+
+   <li><p>If the <code><a href=3D#document>Docum=
ent</a></code>'s <i title=3Dconcept-document-salvageable&g=
t;<a href=3D#concept-document-salvageable>salvageable</a><=
/i>
+   state is false, <a href=3D#concept-eventsource-forcibly-close titl=
e=3Dconcept-EventSource-forcibly-close>forcibly close</a> any
+   <code><a href=3D#eventsource>EventSource</a></co=
de> objects that whose constructor was invoked from the
+   <code><a href=3D#document>Document</a></code>=
's <code><a href=3D#window>Window</a></code> obje=
ct.</li>
+
+   <li><p>If the <code><a href=3D#document>Docum=
ent</a></code>'s <i title=3Dconcept-document-salvageable&g=
t;<a href=3D#concept-document-salvageable>salvageable</a><=
/i>
+   state is false, empty the <code><a href=3D#document>Docum=
ent</a></code>'s <code><a href=3D#window>Window&l=
t;/a></code>'s <a href=3D#list-of-active-timers>list of ac=
tive
+   timers</a>.</li>
+
+  </ol><h5 id=3Devent-definition><span class=3Dsecno>6=
.6.11.1 </span>Event definition</h5>
+
+  </div>
+
+  <pre class=3Didl>interface <dfn id=3Dbeforeunloadevent>Bef=
oreUnloadEvent</dfn> : <a href=3D#event>Event</a> {
+           attribute DOMString <a href=3D#dom-beforeunloadevent-retur=
nvalue title=3Ddom-BeforeUnloadEvent-returnValue>returnValue</a>=
;
+};</pre>
+
+  <dl class=3Ddomintro><dt><var title=3D"">e=
vent</var> . <code title=3Ddom-BeforeUnloadEvent-returnValue>=
<a href=3D#dom-beforeunloadevent-returnvalue>returnValue</a>&=
lt;/code> [ =3D <var title=3D"">value</var> ]&lt=
;/dt>
+
+   <dd>
+
+    <p>Returns the current return value of the event (the message =
to show the user).</p>
+
+    <p>Can be set, to update the message.</p>
+
+   </dd>
+
+  </dl><p class=3Dnote>There are no <code><a href=3D=
#beforeunloadevent>BeforeUnloadEvent</a></code>-specific i=
nitialization methods.</p>
+
+  <div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-beforeunloadevent-returnvalue title=3Ddo=
m-BeforeUnloadEvent-returnValue><code>returnValue</code>&l=
t;/dfn> attribute
+  represents the message to show the user. When the event is created, th=
e attribute must be set to
+  the empty string. On getting, it must return the last value it was set=
 to. On setting, the
+  attribute must be set to the new value.</p>
+
+  </div>
+
+
+  <div class=3Dimpl>
+
+  <h4 id=3Daborting-a-document-load><span class=3Dsecno>6.6.=
12 </span>Aborting a document load</h4>
+
+  <p>If a <code><a href=3D#document>Document</a>=
</code> is <dfn id=3Dabort-a-document title=3D"abort a docu=
ment">aborted</dfn>, the user agent must
+  run the following steps:</p>
+
+  <ol><li><p><a href=3D#abort-a-document title=3D&q=
uot;abort a document">Abort</a> the <a href=3D#active-do=
cument title=3D"active document">active
+   documents</a> of every <a href=3D#child-browsing-context>=
child browsing context</a>. If this results in any of those
+   <code><a href=3D#document>Document</a></code>=
 objects having their <i title=3Dconcept-document-salvageable><a=
 href=3D#concept-document-salvageable>salvageable</a></i> =
state set to false, then set this
+   <code><a href=3D#document>Document</a></code>=
's <i title=3Dconcept-document-salvageable><a href=3D#concept-do=
cument-salvageable>salvageable</a></i> state to false
+   also.</li>
+
+   <li><p>Cancel any instances of the <a href=3D#fetch ti=
tle=3Dfetch>fetch</a> algorithm in the context of
+   this <code><a href=3D#document>Document</a></cod=
e>, discarding any <a href=3D#concept-task title=3Dconcept-task>=
tasks</a> <a href=3D#queue-a-task title=3D"queue a task&quo=
t;>queued</a> for them, and discarding any further data received=
 from the
+   network for them. If this resulted in any instances of the <a href=
=3D#fetch title=3Dfetch>fetch</a>
+   algorithm being canceled or any <a href=3D#queue-a-task title=3D&q=
uot;queue a task">queued</a> <a href=3D#concept-task tit=
le=3Dconcept-task>tasks</a> or any network data getting discarde=
d, then set the
+   <code><a href=3D#document>Document</a></code>=
's <i title=3Dconcept-document-salvageable><a href=3D#concept-do=
cument-salvageable>salvageable</a></i> state to
+   false.</li>
+
+   <li><p>If the <code><a href=3D#document>Docum=
ent</a></code> has an <a href=3D#active-parser>active p=
arser</a>, then <a href=3D#abort-a-parser title=3D"abort a
+   parser">abort that parser</a> and set the <code>&=
lt;a href=3D#document>Document</a></code>'s <i title=3D=
concept-document-salvageable><a href=3D#concept-document-salvageabl=
e>salvageable</a></i> state to false.</li>
+
+   <!-- we could also stop all script, or stop animations -->
+
+  </ol><p>User agents may allow users to explicitly invoke t=
he <a href=3D#abort-a-document title=3D"abort a document"&gt=
;abort a
+  document</a> algorithm for a <code><a href=3D#document&=
gt;Document</a></code>. If the user does so, then, if that
+  <code><a href=3D#document>Document</a></code> =
is an <a href=3D#active-document>active document</a>, the use=
r agent should <a href=3D#queue-a-task>queue a
+  task</a> to <a href=3D#fire-a-simple-event>fire a simple e=
vent</a> named <code title=3Devent-abort>abort</code> a=
t
+  that <code><a href=3D#document>Document</a></code=
>'s <code><a href=3D#window>Window</a></code> =
object before invoking the <a href=3D#abort-a-document title=3D"a=
bort a
+  document">abort</a> algorithm.</p>
+
+  <!-- I'd love to make this more precise, anyone have any suggestion=
s on what it should say? -->
+
+  </div>
+
+
+<!--TOPIC:Offline Web Applications-->
+  <h3 id=3Doffline><span class=3Dsecno>6.7 </span>Offl=
ine Web applications</h3>
+
+  <!-- v2 ideas for appcache:
+
+     * A way to limit what gets download when the user agent is updating=
 the application cache and
+       it turns out the server has changed EVERY page because every page=
 has a dynamic "site last
+       modified" date on it.
+
+       http://groups.google.com/group/gears-users/browse_thread/thread/e=
fbd808325df607a/c73adb34f9b63cf7?hl=3Den&q=3Dwhatwg#c73adb34f9b63cf7
+
+
+     * Multiuser appcaches.
+
+       If the application code (HTML, JS, CSS) is all the same for two u=
sers, then appcache works
+       for multiple users by just having the data for the users separate=
 from the logic.
+
+       This is the expected model for most apps. For example, your typic=
al blog has just one set of
+       CSS for all users.
+
+       For systems where the user affects what HTML, JS, and CSS is serv=
ed back, the spec as written
+       pretty much requires that there be one app per user, and one gene=
ric "login" app that then
+       redirects to one of those other apps - and where each app has a d=
ifferent base URL, separate
+       manifest, etc.
+
+       An alternative that we could explore in a future version is to ha=
ve the manifest include a
+       manifest name, and then have script that allows you to "acti=
vate" a particular manifest name
+       for a given appcache.
+
+       So each appcache group would be further subdivided into named sub=
groups, and for a given
+       manifest URL with such a group of subgroups, one subgroup would b=
e the default one at a time.
+       The inactive ones would just lie dormant, but and the active ones=
 would act like now, but
+       there'd be a scripted way to change the default (and maybe query =
what available variants
+       exist for the current appcache), so that you could log back in as=
 someone else by just making
+       the script pick the other user's variant, and then reloading.
+
+
+     * Add and remove specific additional files from the cache (e.g. pre=
caching new master entries).
+
+  -->
+
+  <h4 id=3Dintroduction-5><span class=3Dsecno>6.7.1 </spa=
n>Introduction</h4>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <p>In order to enable users to continue interacting with Web app=
lications and documents even when
+  their network connection is unavailable — for instance, beca=
use they are traveling outside
+  of their ISP's coverage area — authors can provide a manifes=
t which lists the files that are
+  needed for the Web application to work offline and which causes the us=
er's browser to keep a copy
+  of the files for use offline.</p>
+
+  <p>To illustrate this, consider a simple clock applet consisting=
 of an HTML page "<code title=3D"">clock.html</co=
de>", a CSS style sheet "<code title=3D"">cl=
ock.css</code>", and a JavaScript
+  script "<code title=3D"">clock.js</code>&qu=
ot;.</p>
+
+  <p>Before adding the manifest, these three files might look like=
 this:</p>
+
+  <pre><!-- clock.html -->
+<!DOCTYPE HTML>
+<html>
+ <head>
+  <title>Clock</title>
+  <script src=3D"clock.js"></script&g=
t;
+  <link rel=3D"stylesheet" href=3D"clock.css"=
>
+ </head>
+ <body>
+  <p>The time is: <output id=3D"clock"&am=
p;gt;</output></p>
+ </body>
+</html></pre>
+  <pre>/* clock.css */
+output { font: 2em sans-serif; }</pre>
+  <pre>/* clock.js */
+setInterval(function () {
+    document.getElementById('clock').value =3D new Date();
+}, 1000);</pre>
+
+  <p>If the user tries to open the "<code title=3D"&q=
uot;>clock.html</code>" page while offline, though,
+  the user agent (unless it happens to have it still in the local cache)=
 will fail with an
+  error.</p>
+
+  <p>The author can instead provide a manifest of the three files,=
 say "<code title=3D"">clock.appcache</code>&q=
uot;:</p>
+
+  <pre>CACHE MANIFEST
+clock.html
+clock.css
+clock.js
+</pre>
+
+  <p>With a small change to the HTML file, the manifest (served as=
 <code><a href=3D#text/cache-manifest>text/cache-manifest<=
/a></code>)
+  is linked to the application:</p>
+
+  <pre><!-- clock.html -->
+<!DOCTYPE HTML>
+<html manifest=3D"clock.appcache">
+ <head>
+  <title>Clock</title>
+  <script src=3D"clock.js"></script&g=
t;
+  <link rel=3D"stylesheet" href=3D"clock.css"=
>
+ </head>
+ <body>
+  <p>The time is: <output id=3D"clock"&am=
p;gt;</output></p>
+ </body>
+</html></pre>
+
+  <p>Now, if the user goes to the page, the browser will cache the=
 files and make them available
+  even when the user is offline.</p>
+
+  <p class=3Dnote>Authors are encouraged to include the main page =
in the manifest also, but in
+  practice the page that referenced the manifest is automatically cached=
 even if it isn't explicitly
+  mentioned.</p>
+
+  <p class=3Dnote>With the exception of "no-store" direc=
tive, HTTP cache headers and restrictions on
+  caching pages served over TLS (encrypted, using <code title=3D&quot=
;">https:</code>) are overridden by
+  manifests. Thus, pages will not expire from an application cache befor=
e the user agent has updated
+  it, and even applications served over TLS can be made to work offline.=
</p>
+
+  <p><a href=3Dhttp://www.whatwg.org/demos/offline/clock/live-d=
emo/clock.html>View this example online</a>.</p>
+
+
+
+  <h5 id=3Dsupporting-offline-caching-for-legacy-applications><=
span class=3Dsecno>6.7.1.1 </span>Supporting offline caching for=
 legacy applications</h5>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <p>The application cache feature works best if the application l=
ogic is separate from the
+  application and user data, with the logic (markup, scripts, style shee=
ts, images, etc) listed in
+  the manifest and stored in the application cache, with a finite number=
 of static HTML pages for
+  the application, and with the application and user data stored in Web =
Storage or a client-side
+  Indexed Database, updated dynamically using Web Sockets, <code>X=
MLHttpRequest</code>, server-sent
+  events, or some other similar mechanism.</p>
+
+  <p>This model results in a fast experience for the user: the app=
lication immediately loads, and
+  fresh data is obtained as fast as the network will allow it (possibly =
while stale data shows).</p>
+
+  <p>Legacy applications, however, tend to be designed so that the=
 user data and the logic are mixed
+  together in the HTML, with each operation resulting in a new HTML page=
 from the server.</p>
+
+  <div class=3Dexample>
+
+   <p>For example, consider a news application. The typical archit=
ecture of such an application,
+   when not using the application cache feature, is that the user fetche=
s the main page, and the
+   server returns a dynamically-generated page with the current headline=
s and the user interface
+   logic mixed together.</p>
+
+   <p>A news application designed for the application cache featur=
e, however, would instead have the
+   main page just consist of the logic, and would then have the main pag=
e fetch the data separately
+   from the server, e.g. using <code>XMLHttpRequest</code>.&=
lt;/p>
+
+  </div>
+
+  <p>The mixed-content model does not work well with the applicati=
on cache feature: since the
+  content is cached, it would result in the user always seeing the stale=
 data from the previous time
+  the cache was updated.</p>
+
+  <p>While there is no way to make the legacy model work as fast a=
s the separated model, it
+  <em>can</em> at least be retrofitted for offline use using=
 the <a href=3D#concept-appcache-mode-prefer-online title=3Dconcept-ap=
pcache-mode-prefer-online>prefer-online</a> <a href=3D#concep=
t-appcache-mode title=3Dconcept-appcache-mode>application cache mode&l=
t;/a>. To do so, list all the static
+  resources used by the HTML page you want to have work offline in an &l=
t;a href=3D#concept-appcache-manifest title=3Dconcept-appcache-manifest&g=
t;application cache manifest</a>, use the <code title=3Dattr-htm=
l-manifest><a href=3D#attr-html-manifest>manifest</a></=
code> attribute to select that manifest from the HTML file,
+  and then add the following line at the bottom of the manifest:</p&g=
t;
+
+  <pre>SETTINGS:
+prefer-online
+NETWORK:
+*</pre>
+
+  <p>This causes the <a href=3D#application-cache>applicatio=
n cache</a> to only be used for <a href=3D#concept-appcache-mast=
er title=3Dconcept-appcache-master>master entries</a> when the u=
ser is offline, and causes the
+  application cache to be used as an atomic HTTP cache (essentially pinn=
ing resources listed in the
+  manifest), while allowing all resources not listed in the manifest to =
be accessed normally when
+  the user is online.</p>
+
+
+
+  <h5 id=3Dappcacheevents><span class=3Dsecno>6.7.1.2 </s=
pan>Event summary</h5>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <p>When the user visits a page that declares a manifest, the bro=
wser will try to update the cache.
+  It does this by fetching a copy of the manifest and, if the manifest h=
as changed since the user
+  agent last saw it, redownloading all the resources it mentions and cac=
hing them anew.</p>
+
+  <p>As this is going on, a number of events get fired on the <=
code><a href=3D#applicationcache>ApplicationCache</a></=
code> object
+  to keep the script updated as to the state of the cache update, so tha=
t the user can be notified
+  appropriately. The events are as follows:</p>
+
+  <table><thead><tr><th> Event name
+     <th> Interface
+     <th> Fired when...
+     <th> Next events
+   <tbody><tr><td> <dfn id=3Devent-appcache-checkin=
g title=3Devent-appcache-checking><code>checking</code>&lt=
;/dfn>
+     <td> <code><a href=3D#event>Event</a></c=
ode>
+     <td> The user agent is checking for an update, or attempting =
to download the manifest for the
+          first time. <strong>This is always the first event in th=
e sequence.</strong>
+     <td> <code title=3Devent-appcache-noupdate><a href=3D=
#event-appcache-noupdate>noupdate</a></code>, <code tit=
le=3Devent-appcache-downloading><a href=3D#event-appcache-downloadi=
ng>downloading</a></code>, <code title=3Devent-appcache=
-obsolete><a href=3D#event-appcache-obsolete>obsolete</a>&=
lt;/code>, <code title=3Devent-appcache-error><a href=3D#even=
t-appcache-error>error</a></code>
+
+    <tr><td> <dfn id=3Devent-appcache-noupdate title=3Dev=
ent-appcache-noupdate><code>noupdate</code></dfn>
+     <td> <code><a href=3D#event>Event</a></c=
ode>
+     <td> The manifest hadn't changed.
+     <td> Last event in sequence.
+
+    <tr><td> <dfn id=3Devent-appcache-downloading title=3D=
event-appcache-downloading><code>downloading</code></df=
n>
+     <td> <code><a href=3D#event>Event</a></c=
ode>
+     <td> The user agent has found an update and is fetching it, o=
r is downloading the resources
+          listed by the manifest for the first time.
+     <td> <code title=3Devent-appcache-progress><a href=3D=
#event-appcache-progress>progress</a></code>, <code tit=
le=3Devent-appcache-error><a href=3D#event-appcache-error>error&=
lt;/a></code>, <code title=3Devent-appcache-cached><a h=
ref=3D#event-appcache-cached>cached</a></code>, <code t=
itle=3Devent-appcache-updateready><a href=3D#event-appcache-updater=
eady>updateready</a></code>
+
+    <tr><td> <dfn id=3Devent-appcache-progress title=3Dev=
ent-appcache-progress><code>progress</code></dfn>
+     <td> <code><a href=3D#progressevent>ProgressEvent=
</a></code>
+     <td> The user agent is downloading resources listed by the ma=
nifest.
+          The event object's <code title=3Ddom-ProgressEvents-total&g=
t;total</code> attribute returns the total number of files to be do=
wnloaded.
+          The event object's <code title=3Ddom-ProgressEvents-loaded&=
gt;loaded</code> attribute returns the number of files processed so=
 far.
+     <td> <code title=3Devent-appcache-progress><a href=3D=
#event-appcache-progress>progress</a></code>, <code tit=
le=3Devent-appcache-error><a href=3D#event-appcache-error>error&=
lt;/a></code>, <code title=3Devent-appcache-cached><a h=
ref=3D#event-appcache-cached>cached</a></code>, <code t=
itle=3Devent-appcache-updateready><a href=3D#event-appcache-updater=
eady>updateready</a></code>
+
+    <tr><td> <dfn id=3Devent-appcache-cached title=3Deven=
t-appcache-cached><code>cached</code></dfn>
+     <td> <code><a href=3D#event>Event</a></c=
ode>
+     <td> The resources listed in the manifest have been downloade=
d, and the application is now cached.
+     <td> Last event in sequence.
+
+    <tr><td> <dfn id=3Devent-appcache-updateready title=3D=
event-appcache-updateready><code>updateready</code></df=
n>
+     <td> <code><a href=3D#event>Event</a></c=
ode>
+     <td> The resources listed in the manifest have been newly red=
ownloaded, and the script can use
+          <code title=3Ddom-appcache-swapCache><a href=3D#dom-a=
ppcache-swapcache>swapCache()</a></code> to switch to the =
new cache.
+     <td> Last event in sequence.
+
+    <tr><td> <dfn id=3Devent-appcache-obsolete title=3Dev=
ent-appcache-obsolete><code>obsolete</code></dfn>
+     <td> <code><a href=3D#event>Event</a></c=
ode>
+     <td> The manifest was found to have become a 404 or 410 page,=
 so the application cache is being deleted.
+     <td> Last event in sequence.
+
+    <tr><td rowspan=3D4> <dfn id=3Devent-appcache-error t=
itle=3Devent-appcache-error><code>error</code></dfn>
+     <td rowspan=3D4> <code><a href=3D#event>Event<=
/a></code>
+     <td> The manifest was a 404 or 410 page, so the attempt to ca=
che the application has been aborted.
+     <td rowspan=3D3> Last event in sequence.
+
+    <tr><td> The manifest hadn't changed, but the page refer=
encing the manifest failed to download properly.
+
+    <tr><td> A fatal error occurred while fetching the resou=
rces listed in the manifest.
+
+    <tr><td> The manifest changed while the update was being=
 run.
+     <td> The user agent will try fetching the files again momenta=
rily.
+
+  </table><p>These events are cancelable; their default acti=
on is for the user agent to show download
+  progress information. If the page shows its own update UI, canceling t=
he events will prevent the
+  user agent from showing redundant progress information.</p>
+
+
+
+  <div class=3Dimpl>
+
+  <h4 id=3Dappcache><span class=3Dsecno>6.7.2 </span>A=
pplication caches</h4> <!--APPCACHE-->
+
+  <p>An <dfn id=3Dapplication-cache>application cache</df=
n> is a set of cached resources consisting of:</p>
+
+  <ul><li>
+
+    <p>One or more resources (including their out-of-band metadata=
, such as HTTP headers, if any),
+    identified by URLs, each falling into one (or more) of the following=
 categories:</p>
+
+    <dl><dt><dfn id=3Dconcept-appcache-master title=3Dcon=
cept-appcache-master>Master entries</dfn>
+
+     <dd><p class=3Dnote>These are documents that were added=
 to the cache because a <a href=3D#browsing-context>browsing
+     context</a> was <a href=3D#navigate title=3Dnavigate>na=
vigated</a> to that document and the document
+     indicated that this was its cache, using the <code title=3Dattr-=
html-manifest><a href=3D#attr-html-manifest>manifest</a>&l=
t;/code>
+     attribute.</p>
+
+
+     <dt><dfn id=3Dconcept-appcache-manifest title=3Dconcept-ap=
pcache-manifest>The manifest</dfn>
+
+     <dd><p class=3Dnote>This is the resource corresponding =
to the URL that was given in a master
+     entry's <code><a href=3D#the-html-element>html</a&gt=
;</code> element's <code title=3Dattr-html-manifest><a hre=
f=3D#attr-html-manifest>manifest</a></code> attribute.
+     The manifest is fetched and processed during the <a href=3D#appl=
ication-cache-download-process>application cache download
+     process</a>. All the <a href=3D#concept-appcache-master ti=
tle=3Dconcept-appcache-master>master entries</a> have the
+     <a href=3D#same-origin title=3D"same origin">same o=
rigin</a> as the manifest.</p>
+
+
+     <dt><dfn id=3Dconcept-appcache-explicit title=3Dconcept-ap=
pcache-explicit>Explicit entries</dfn>
+
+     <dd><p class=3Dnote>These are the resources that were l=
isted in the cache's <a href=3D#concept-appcache-manifest title=3Dconc=
ept-appcache-manifest>manifest</a> in an <a href=3D#concept-a=
ppcache-manifest-explicit title=3Dconcept-appcache-manifest-explicit>e=
xplicit section</a>.</p>
+
+
+     <dt><dfn id=3Dconcept-appcache-fallback title=3Dconcept-ap=
pcache-fallback>Fallback entries</dfn>
+
+     <dd><p class=3Dnote>These are the resources that were l=
isted in the cache's <a href=3D#concept-appcache-manifest title=3Dconc=
ept-appcache-manifest>manifest</a> in a <a href=3D#concept-ap=
pcache-manifest-fallback title=3Dconcept-appcache-manifest-fallback>fa=
llback section</a>.</p>
+
+
+    </dl><p><a href=3D#concept-appcache-explicit title=3D=
concept-appcache-explicit>Explicit entries</a> and <a href=3D=
#concept-appcache-fallback title=3Dconcept-appcache-fallback>Fallback =
entries</a> can be marked as <dfn id=3Dconcept-appcache-foreign =
title=3Dconcept-appcache-foreign>foreign</dfn>, which means that=
 they have a <code title=3Dattr-html-manifest><a href=3D#attr-ht=
ml-manifest>manifest</a></code> attribute but that it does=
n't point at this cache's
+    <a href=3D#concept-appcache-manifest title=3Dconcept-appcache-man=
ifest>manifest</a>.</p>
+
+    <p class=3Dnote>A URL in the list can be flagged with multiple=
 different types, and thus an
+    entry can end up being categorized as multiple entries. For example,=
 an entry can be a manifest
+    entry and an explicit entry at the same time, if the manifest is lis=
ted within the manifest.</p>
+
+   </li>
+
+   <li>
+
+    <p>Zero or more <dfn id=3Dconcept-appcache-fallback-ns titl=
e=3Dconcept-appcache-fallback-ns>fallback namespaces</dfn>, each=
 of
+    which is mapped to a <a href=3D#concept-appcache-fallback title=3D=
concept-appcache-fallback>fallback entry</a>.</p>
+
+    <p class=3Dnote>These are URLs used as <a href=3D#concept-a=
ppcache-matches-fallback title=3Dconcept-appcache-matches-fallback>pre=
fix
+    match patterns</a> for resources that are to be fetched from t=
he network if possible, or to
+    be replaced by the corresponding <a href=3D#concept-appcache-fall=
back title=3Dconcept-appcache-fallback>fallback entry</a>
+    if not. Each namespace URL has the <a href=3D#same-origin>same=
 origin</a> as <a href=3D#concept-appcache-manifest title=3Dconc=
ept-appcache-manifest>the manifest</a>.</p>
+
+   </li>
+
+   <li>
+
+    <p>Zero or more URLs that form the <dfn id=3Dconcept-appcac=
he-onlinewhitelist title=3Dconcept-appcache-onlinewhitelist>online
+    whitelist namespaces</dfn>.</p>
+
+    <p class=3Dnote>These are used as prefix match patterns, and d=
eclare URLs for which the user
+    agent will ignore the application cache, instead fetching them norma=
lly (i.e. from the network
+    or local HTTP cache as appropriate).</p>
+
+   </li>
+
+   <li>
+
+    <p>An <dfn id=3Dconcept-appcache-onlinewhitelist-wildcard t=
itle=3Dconcept-appcache-onlinewhitelist-wildcard>online whitelist wild=
card
+    flag</dfn>, which is either <i title=3D"">open=
</i> or <i title=3D"">blocking</i>.</p>
+
+    <p class=3Dnote>The <i title=3D"">open</i&g=
t; state indicates that any URL not listed as cached is to
+    be implicitly treated as being in the <a href=3D#concept-appcache=
-onlinewhitelist title=3Dconcept-appcache-onlinewhitelist>online
+    whitelist namespaces</a>; the <i title=3D"">bl=
ocking</i> state indicates that URLs not listed
+    explicitly in the manifest are to be treated as unavailable.</p&g=
t;
+
+   </li>
+
+   <li>
+
+    <p>A <dfn id=3Dconcept-appcache-mode title=3Dconcept-appcac=
he-mode>cache mode flag</dfn>, which is either in the <dfn id=
=3Dconcept-appcache-mode-fast title=3Dconcept-appcache-mode-fast><i=
>fast</i></dfn> state or the <dfn id=3Dconcept-appcache=
-mode-prefer-online title=3Dconcept-appcache-mode-prefer-online><i&=
gt;prefer-online</i></dfn> state.</p>
+
+   </li>
+
+  </ul><p>Each <a href=3D#application-cache>applicatio=
n cache</a> has a <dfn id=3Dconcept-appcache-completeness title=3D=
concept-appcache-completeness>completeness flag</dfn>, which is =
either <i>complete</i> or
+  <i>incomplete</i>.</p>
+
+  <hr><p>An <dfn id=3Dapplication-cache-group>applicat=
ion cache group</dfn> is a group of <a href=3D#application-cache=
 title=3D"application cache">application
+  caches</a>, identified by the <a href=3D#absolute-url>abso=
lute URL</a> of a resource <a href=3D#concept-appcache-manifest =
title=3Dconcept-appcache-manifest>manifest</a> which is used to =
populate the caches in the
+  group.</p>
+
+  <p>An <a href=3D#application-cache>application cache</a=
> is <dfn id=3Dconcept-appcache-newer title=3Dconcept-appcache-newe=
r>newer</dfn> than
+  another if it was created after the other (in other words, <a href=3D=
#application-cache title=3D"application
+  cache">application caches</a> in an <a href=3D#applic=
ation-cache-group>application cache group</a> have a chronologic=
al
+  order).</p>
+
+  <p>Only the newest <a href=3D#application-cache>applicatio=
n cache</a> in an <a href=3D#application-cache-group>applicat=
ion cache group</a> can
+  have its <a href=3D#concept-appcache-completeness title=3Dconcept-a=
ppcache-completeness>completeness flag</a> set to
+  <i>incomplete</i>; the others are always all <i>comp=
lete</i>.</p>
+
+  <p>Each <a href=3D#application-cache-group>application cac=
he group</a> has an <dfn id=3Dconcept-appcache-status title=3Dco=
ncept-appcache-status>update
+  status</dfn>, which is one of the following: <i>idle</i=
>, <i>checking</i>, <i>downloading</i>.</p&=
gt;
+
+  <p>A <dfn id=3Drelevant-application-cache>relevant applica=
tion cache</dfn> is an <a href=3D#application-cache>applicati=
on cache</a> that is the <a href=3D#concept-appcache-newer title=
=3Dconcept-appcache-newer>newest</a> in its <a href=3D#applic=
ation-cache-group title=3D"application cache
+  group">group</a> to be <i>complete</i>.</=
p>
+
+  <p>Each <a href=3D#application-cache-group>application cac=
he group</a> has a <dfn id=3Dconcept-appcache-pending-masters ti=
tle=3Dconcept-appcache-pending-masters>list of pending master entries&=
lt;/dfn>. Each entry in this
+  list consists of a resource and a corresponding <code><a href=
=3D#document>Document</a></code> object. It is used during
+  the <a href=3D#application-cache-download-process>application ca=
che download process</a> to ensure that new master entries are cach=
ed
+  even if the <a href=3D#application-cache-download-process>applic=
ation cache download process</a> was already running for their
+  <a href=3D#application-cache-group>application cache group</a=
> when they were loaded.</p>
+
+  <p>An <a href=3D#application-cache-group>application cache=
 group</a> can be marked as <dfn id=3Dconcept-appcache-obsolete =
title=3Dconcept-appcache-obsolete>obsolete</dfn>, meaning that i=
t must be ignored when looking at
+  what <a href=3D#application-cache-group title=3D"application c=
ache group">application cache groups</a> exist.</p>
+
+  <hr><p>A <dfn id=3Dcache-host>cache host</dfn>=
 is a <code><a href=3D#document>Document</a></code&g=
t; or a <code><a href=3D#sharedworkerglobalscope>SharedWorker=
GlobalScope</a></code>
+  object. A <a href=3D#cache-host>cache host</a> can be asso=
ciated with an <a href=3D#application-cache>application cache</a=
>.
+  </p>
+
+  <p>A <code><a href=3D#document>Document</a>&lt=
;/code> initially is not associated with an <a href=3D#application-=
cache>application cache</a>, but
+  can become associated with one early during the page load process, whe=
n steps <a href=3D#parser-appcache>in the parser</a> and in t=
he <a href=3D#navigate title=3Dnavigate>navigation</a>
+  sections cause <a href=3D#concept-appcache-init title=3Dconcept-app=
cache-init>cache selection</a> to occur.</p>
+
+  <p>A <code><a href=3D#sharedworkerglobalscope>Shared=
WorkerGlobalScope</a></code> can be associated with an <a =
href=3D#application-cache>application cache</a>
+  when it is created.
+  </p>
+
+  <p>Each <a href=3D#cache-host>cache host</a> has an =
associated <code><a href=3D#applicationcache>ApplicationCache=
</a></code> object.</p>
+
+  <hr><p>Multiple <a href=3D#application-cache title=3D&q=
uot;application cache">application caches</a> in different =
<a href=3D#application-cache-group title=3D"application cache gro=
up">application cache groups</a> can contain the same resou=
rce,
+  e.g. if the manifests all reference that resource. If the user agent i=
s to <dfn id=3Dconcept-appcache-selection title=3Dconcept-appcache-sel=
ection>select an application cache</dfn> from a list of <a hr=
ef=3D#relevant-application-cache title=3D"relevant application cache=
">relevant application caches</a> that contain a resource, =
the
+  user agent must use the application cache that the user most likely wa=
nts to see the resource
+  from, taking into account the following:</p>
+
+  <ul><li>which application cache was most recently updated,
+
+   <li>which application cache was being used to display the resou=
rce from which the user decided to
+   look at the new resource, and
+
+   <li>which application cache the user prefers.
+
+  </ul><hr><p>A URL <dfn id=3Dconcept-appcache-matc=
hes-fallback title=3Dconcept-appcache-matches-fallback>matches a fallb=
ack namespace</dfn> if
+  there exists a <a href=3D#relevant-application-cache>relevant ap=
plication cache</a> whose <a href=3D#concept-appcache-manifest t=
itle=3Dconcept-appcache-manifest>manifest</a>'s URL has the <=
a href=3D#same-origin>same origin</a> as the
+  URL in question, and that has a <a href=3D#concept-appcache-fallbac=
k-ns title=3Dconcept-appcache-fallback-ns>fallback
+  namespace</a> that is a <a href=3D#prefix-match>prefix mat=
ch</a> for the URL being examined. If multiple
+  fallback namespaces match the same URL, the longest one is the one tha=
t matches. A URL looking for
+  a fallback namespace can match more than one application cache at a ti=
me, but only matches one
+  namespace in each cache.</p>
+
+  <div class=3Dexample>
+
+   <p>If a manifest <code title=3D"">http://exampl=
e.com/app1/manifest</code> declares that <code title=3D"&qu=
ot;>http://example.com/resources/images</code> is a fallback nam=
espace, and the user
+   navigates to <code title=3D"">HTTP://EXAMPLE.COM:80/r=
esources/images/cat.png</code>, then the user
+   agent will decide that the application cache identified by <code t=
itle=3D"">http://example.com/app1/manifest</code> cont=
ains a namespace with a match for that
+   URL.</p>
+
+   <!-- "resolve a url" canonicalises the case for the sche=
me and host and removes the port if it is
+   the default -->
+
+  </div>
+
+  </div>
+
+
+
+  <h4 id=3Dmanifests><span class=3Dsecno>6.7.3 </span>=
The cache manifest syntax</h4>
+
+
+  <h5 id=3Dsome-sample-manifests><span class=3Dsecno>6.7.3.1=
 </span>Some sample manifests</h5>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <div class=3Dexample>
+
+   <p>This example manifest requires two images and a style sheet =
to be cached and whitelists a CGI
+   script.</p>
+
+   <pre>CACHE MANIFEST
+# the above line is required
+
+# this is a comment
+# there can be as many of these anywhere in the file
+# they are all ignored
+  # comments can have spaces before them
+  # but must be alone on the line
+
+# blank lines are ignored too
+
+# these are files that need to be cached they can either be listed
+# first, or a "CACHE:" header could be put before them, as is =
done
+# lower down.
+images/sound-icon.png
+images/background.png
+# note that each file has to be put on its own line
+
+# here is a file for the online whitelist -- it isn't cached, and
+# references to this file will bypass the cache, always hitting the
+# network (or trying to, if the user is offline).
+NETWORK:
+comm.cgi
+
+# here is another set of files to cache, this time just the CSS file.
+CACHE:
+style/default.css</pre>
+
+   <p>It could equally well be written as follows:</p>
+
+   <pre>CACHE MANIFEST
+NETWORK:
+comm.cgi
+CACHE:
+style/default.css
+images/sound-icon.png
+images/background.png</pre>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>Offline application cache manifests can use absolute paths o=
r even absolute URLs:</p>
+
+   <pre>CACHE MANIFEST
+
+/main/home
+/main/app.js
+/settings/home
+/settings/app.js
+http://img.example.com/logo.png
+http://img.example.com/check.png
+http://img.example.com/cross.png</pre>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>The following manifest defines a catch-all error page that i=
s displayed for any page on the
+   site while the user is offline. It also specifies that the <a href=
=3D#concept-appcache-onlinewhitelist-wildcard title=3Dconcept-appcache-on=
linewhitelist-wildcard>online whitelist wildcard flag</a> is &lt=
;i title=3D"">open</i>, meaning that accesses to resou=
rces on other sites will not be blocked.
+   (Resources on the same site are already not blocked because of the ca=
tch-all fallback
+   namespace.)</p>
+
+   <p>So long as all pages on the site reference this manifest, th=
ey will get cached locally as they
+   are fetched, so that subsequent hits to the same page will load the p=
age immediately from the
+   cache. Until the manifest is changed, those pages will not be fetched=
 from the server again. When
+   the manifest changes, then all the files will be redownloaded.</p&=
gt;
+
+   <p>Subresources, such as style sheets, images, etc, would only =
be cached using the regular HTTP
+   caching semantics, however.</p>
+
+   <pre>CACHE MANIFEST
+FALLBACK:
+/ /offline.html
+NETWORK:
+*</pre>
+
+  </div>
+
+
+  <h5 id=3Dwriting-cache-manifests><span class=3Dsecno>6.7.3=
.2 </span>Writing cache manifests</h5>
+
+  <p>Manifests must be served using the <code><a href=3D#=
text/cache-manifest>text/cache-manifest</a></code> <a h=
ref=3D#mime-type>MIME type</a>. All
+  resources served using the <code><a href=3D#text/cache-manife=
st>text/cache-manifest</a></code> <a href=3D#mime-type&=
gt;MIME type</a> must follow the
+  syntax of application cache manifests, as described in this section.&l=
t;/p>
+
+  <p>An application cache manifest is a text file, whose text is e=
ncoded using UTF-8. Data in
+  application cache manifests is line-based. Newlines must be represente=
d by U+000A LINE FEED (LF)
+  characters, U+000D CARRIAGE RETURN (CR) characters, or U+000D CARRIAGE=
 RETURN (CR) U+000A LINE
+  FEED (LF) pairs. <a href=3D#refsRFC3629>[RFC3629]</a></=
p>
+
+  <p class=3Dnote>This is a <a href=3D#willful-violation>wil=
lful violation</a> of RFC 2046, which requires all <code title=3D=
"">text/*</code> types to only allow CRLF line breaks.=
 This requirement, however, is
+  outdated; the use of CR, LF, and CRLF line breaks is commonly supporte=
d and indeed sometimes CRLF
+  is <em>not</em> supported by text editors. <a href=3D#r=
efsRFC2046>[RFC2046]</a></p>
+
+  <p>The first line of an application cache manifest must consist =
of the string "CACHE", a single
+  U+0020 SPACE character, the string "MANIFEST", and either a =
U+0020 SPACE character, a U+0009
+  CHARACTER TABULATION (tab) character, a U+000A LINE FEED (LF) characte=
r, or a U+000D CARRIAGE
+  RETURN (CR) character. The first line may optionally be preceded by a =
U+FEFF BYTE ORDER MARK (BOM)
+  character. If any other text is found on the first line, it is ignored=
.</p>
+
+  <p>Subsequent lines, if any, must all be one of the following:&l=
t;/p>
+
+  <dl><dt>A blank line
+   <dd>
+    <p>Blank lines must consist of zero or more U+0020 SPACE and
+    U+0009 CHARACTER TABULATION (tab) characters only.</p>
+
+   <dt>A comment
+   <dd>
+    <p>Comment lines must consist of zero or more U+0020 SPACE and=
 U+0009 CHARACTER TABULATION (tab)
+    characters, followed by a single U+0023 NUMBER SIGN character (#), f=
ollowed by zero or more
+    characters other than U+000A LINE FEED (LF) and U+000D CARRIAGE RETU=
RN (CR) characters.</p>
+
+    <p class=3Dnote>Comments must be on a line on their own. If th=
ey were to be included on a line
+    with a URL, the "#" would be mistaken for part of a fragme=
nt identifier.</p>
+
+   <dt>A section header
+   <dd>
+
+    <p>Section headers change the current section. There are four =
possible section headers:
+
+    <dl><dt><code>CACHE:</code>
+     <dd>Switches to the <dfn id=3Dconcept-appcache-manifest-ex=
plicit title=3Dconcept-appcache-manifest-explicit>explicit section<=
/dfn>.
+
+     <dt><code>FALLBACK:</code>
+     <dd>Switches to the <dfn id=3Dconcept-appcache-manifest-fa=
llback title=3Dconcept-appcache-manifest-fallback>fallback section<=
/dfn>.
+
+     <dt><code>NETWORK:</code>
+     <dd>Switches to the <dfn id=3Dconcept-appcache-manifest-ne=
twork title=3Dconcept-appcache-manifest-network>online whitelist secti=
on</dfn>.
+
+     <dt><code>SETTINGS:</code>
+     <dd>Switches to the <dfn id=3Dconcept-appcache-manifest-se=
ttings title=3Dconcept-appcache-manifest-settings>settings section<=
/dfn>.
+
+    </dl><p>Section header lines must consist of zero or mor=
e U+0020 SPACE and U+0009 CHARACTER
+    TABULATION (tab) characters, followed by one of the names above (inc=
luding the U+003A COLON
+    character (:)) followed by zero or more U+0020 SPACE and U+0009 CHAR=
ACTER TABULATION (tab)
+    characters.</p>
+
+    <p>Ironically, by default, the current section is the <a hr=
ef=3D#concept-appcache-manifest-explicit title=3Dconcept-appcache-manifes=
t-explicit>explicit section</a>.</p>
+
+   <dt>Data for the current section
+   <dd>
+
+    <p>The format that data lines must take depends on the current=
 section.</p>
+
+    <p>When the current section is the <a href=3D#concept-appca=
che-manifest-explicit title=3Dconcept-appcache-manifest-explicit>expli=
cit
+    section</a>, data lines must consist of zero or more U+0020 SP=
ACE and U+0009 CHARACTER
+    TABULATION (tab) characters, a <a href=3D#valid-url>valid URL&=
lt;/a> identifying a resource other than the
+    manifest itself, and then zero or more U+0020 SPACE and U+0009 CHARA=
CTER TABULATION (tab)
+    characters.</p>
+
+    <p>When the current section is the <a href=3D#concept-appca=
che-manifest-fallback title=3Dconcept-appcache-manifest-fallback>fallb=
ack
+    section</a>, data lines must consist of zero or more U+0020 SP=
ACE and U+0009 CHARACTER
+    TABULATION (tab) characters, a <a href=3D#valid-url>valid URL&=
lt;/a> identifying a resource other than the
+    manifest itself, one or more U+0020 SPACE and U+0009 CHARACTER TABUL=
ATION (tab) characters,
+    another <a href=3D#valid-url>valid URL</a> identifying a=
 resource other than the manifest itself, and then
+    zero or more U+0020 SPACE and U+0009 CHARACTER TABULATION (tab) char=
acters.</p>
+
+    <p>When the current section is the <a href=3D#concept-appca=
che-manifest-network title=3Dconcept-appcache-manifest-network>online
+    whitelist section</a>, data lines must consist of zero or more=
 U+0020 SPACE and U+0009
+    CHARACTER TABULATION (tab) characters, either a single U+002A ASTERI=
SK character (*) <!--
+    concept-appcache-onlinewhitelist-wildcard --> or a <a href=3D#=
valid-url>valid URL</a> identifying a resource
+    other than the manifest itself, and then zero or more U+0020 SPACE a=
nd U+0009 CHARACTER
+    TABULATION (tab) characters.</p>
+
+    <p>When the current section is the <a href=3D#concept-appca=
che-manifest-settings title=3Dconcept-appcache-manifest-settings>setti=
ngs
+    section</a>, data lines must consist of zero or more U+0020 SP=
ACE and U+0009 CHARACTER
+    TABULATION (tab) characters, a <a href=3D#concept-appcache-manife=
st-setting title=3Dconcept-appcache-manifest-setting>setting</a>=
,
+    and then zero or more U+0020 SPACE and U+0009 CHARACTER TABULATION (=
tab) characters.</p>
+
+    <p>Currently only one <dfn id=3Dconcept-appcache-manifest-s=
etting title=3Dconcept-appcache-manifest-setting>setting</dfn> i=
s
+    defined:</p>
+
+    <dl><dt>The cache mode setting</dt>
+
+     <dd>This consists of the string "<code title=3D"=
">prefer-online</code>". It sets the <a href=3D#con=
cept-appcache-mode title=3Dconcept-appcache-mode>cache mode</a> =
to <a href=3D#concept-appcache-mode-prefer-online title=3Dconcept-appc=
ache-mode-prefer-online>prefer-online</a>. (The <a href=3D#co=
ncept-appcache-mode title=3Dconcept-appcache-mode>cache mode</a>=
 defaults to <a href=3D#concept-appcache-mode-fast title=3Dconcept-app=
cache-mode-fast>fast</a>.)</dd>
+
+    </dl><p>Within a <a href=3D#concept-appcache-manifest=
-settings title=3Dconcept-appcache-manifest-settings>settings section&=
lt;/a>, each <a href=3D#concept-appcache-manifest-setting title=3Dc=
oncept-appcache-manifest-setting>setting</a> must occur no more =
than once.</p>
+
+<!--
+    <p class=3D"note">The URLs in data lines can't be em=
pty strings, since those would be relative
+    URLs to the manifest itself. Such lines would be confused with blank=
 or invalid lines,
+    anyway.</p>
+-->
+
+  </dl><p>Manifests may contain sections more than once. Sec=
tions may be empty.</p>
+
+  <p>URLs that are to be fallback pages associated with <a href=
=3D#concept-appcache-fallback-ns title=3Dconcept-appcache-fallback-ns>=
fallback namespaces</a>, and those namespaces themselves,
+  must be given in <a href=3D#concept-appcache-manifest-fallback titl=
e=3Dconcept-appcache-manifest-fallback>fallback sections</a>, wi=
th
+  the namespace being the first URL of the data line, and the correspond=
ing fallback page being the
+  second URL. All the other pages to be cached must be listed in <a h=
ref=3D#concept-appcache-manifest-explicit title=3Dconcept-appcache-manife=
st-explicit>explicit sections</a>.</p>
+
+  <p><a href=3D#concept-appcache-fallback-ns title=3Dconcept-ap=
pcache-fallback-ns>Fallback namespaces</a> and <a href=3D#con=
cept-appcache-fallback title=3Dconcept-appcache-fallback>fallback entr=
ies</a> must have the <a href=3D#same-origin>same origin</=
a>
+  as the manifest itself.</p>
+
+  <p>A <a href=3D#concept-appcache-fallback-ns title=3Dconcept-=
appcache-fallback-ns>fallback namespace</a> must not be listed m=
ore
+  than once.</p>
+
+  <p>Namespaces that the user agent is to put into the <a href=3D=
#concept-appcache-onlinewhitelist title=3Dconcept-appcache-onlinewhitelis=
t>online whitelist</a> must all be specified in <a href=3D#co=
ncept-appcache-manifest-network title=3Dconcept-appcache-manifest-network=
>online whitelist sections</a>. (This is needed for
+  any URL that the page is intending to use to communicate back to the s=
erver.) To specify that all
+  URLs are automatically whitelisted in this way, a U+002A ASTERISK char=
acter (*) may be specified
+  as one of the URLs. <!-- concept-appcache-onlinewhitelist-wildcard =
--></p>
+
+  <p>Authors should not include namespaces in the <a href=3D#co=
ncept-appcache-onlinewhitelist title=3Dconcept-appcache-onlinewhitelist&g=
t;online whitelist</a> for which another namespace in
+  the <a href=3D#concept-appcache-onlinewhitelist title=3Dconcept-app=
cache-onlinewhitelist>online whitelist</a> is a <a href=3D#pr=
efix-match>prefix
+  match</a>.</p>
+
+  <p><a href=3D#relative-url title=3D"relative URL"&g=
t;Relative URLs</a> must be given relative to the manifest's own
+  URL. All URLs in the manifest must have the same <a href=3D#concept=
-url-scheme title=3Dconcept-url-scheme>scheme</a> as
+  the manifest itself (either explicitly or implicitly, through the use =
of <a href=3D#relative-url title=3D"relative
+  URL">relative URLs</a>). <a href=3D#refsURL>[URL]&=
lt;/a></p>
+
+  <p>URLs in manifests must not have fragment identifiers (i.e. th=
e U+0023 NUMBER SIGN character
+  isn't allowed in URLs in manifests).</p>
+
+  <p><a href=3D#concept-appcache-fallback-ns title=3Dconcept-ap=
pcache-fallback-ns>Fallback namespaces</a> and namespaces in the
+  <a href=3D#concept-appcache-onlinewhitelist title=3Dconcept-appcach=
e-onlinewhitelist>online whitelist</a> are matched by <a href=
=3D#prefix-match>prefix
+  match</a>.</p>
+
+
+  <div class=3Dimpl>
+
+  <h5 id=3Dparsing-cache-manifests><span class=3Dsecno>6.7.3=
.3 </span>Parsing cache manifests</h5>
+
+  <p>When a user agent is to <dfn id=3Dparse-a-manifest>pars=
e a manifest</dfn>, it means that the user agent must run the
+  following steps:</p>
+
+  <ol><li>
+
+    <p><a href=3D#utf-8-decode>UTF-8 decode</a> the by=
te stream corresponding with the manifest to be parsed.</p>
+
+    <p class=3Dnote>The <a href=3D#utf-8-decode>UTF-8 decode=
</a> algorithm strips a leading BOM, if any.</p>
+
+    <!--All U+0000 NULL characters must be replaced by U+FFFD REPLACE=
MENT CHARACTERs. (this isn't
+    black-box testable since neither U+0000 nor U+FFFD are valid anywher=
e in the syntax and thus
+    both will be treated the same anyway)-->
+
+   </li>
+
+   <li><p>Let <var title=3D"">base URL</v=
ar> be the <a href=3D#absolute-url>absolute URL</a> repres=
enting the
+   manifest.</li>
+
+   <li><p>Apply the <a href=3D#url-parser>URL parser&l=
t;/a> steps to the <var title=3D"">base URL</var&gt=
;, so that the
+   components from its <a href=3D#parsed-url>parsed URL</a> =
can be used by the subseqent steps of this
+   algorithm.</li>
+
+   <li><p>Let <var title=3D"">explicit URLs&=
lt;/var> be an initially empty list of <a href=3D#absolute-url titl=
e=3D"absolute
+   URL">absolute URLs</a> for <a href=3D#concept-appcac=
he-explicit title=3Dconcept-appcache-explicit>explicit
+   entries</a>.</li>
+
+   <li><p>Let <var title=3D"">fallback URLs&=
lt;/var> be an initially empty mapping of <a href=3D#concept-appcac=
he-fallback-ns title=3Dconcept-appcache-fallback-ns>fallback namespace=
s</a> to <a href=3D#absolute-url title=3D"absolute
+   URL">absolute URLs</a> for <a href=3D#concept-appcac=
he-fallback title=3Dconcept-appcache-fallback>fallback
+   entries</a>.</li>
+
+   <li><p>Let <var title=3D"">online whiteli=
st namespaces</var> be an initially empty list of <a href=3D#abs=
olute-url title=3D"absolute URL">absolute URLs</a> for=
 an <a href=3D#concept-appcache-onlinewhitelist title=3Dconcept-appcac=
he-onlinewhitelist>online whitelist</a>.</li>
+
+   <li><p>Let <var title=3D"">online whiteli=
st wildcard flag</var> be <i title=3D"">blocking&lt=
;/i>. <!--
+   concept-appcache-onlinewhitelist-wildcard --></li>
+
+   <li><p>Let <var title=3D"">cache mode fla=
g</var> be <i title=3D"">fast</i>. <!--
+   concept-appcache-mode-fast --></li>
+
+   <li><p>Let <var title=3D"">input</var&=
gt; be the decoded text of the manifest's byte stream.</li>
+
+   <li><p>Let <var title=3D"">position</v=
ar> be a pointer into <var title=3D"">input</var&gt=
;, initially
+   pointing at the first character.</li>
+
+   <li><p>If the characters starting from <var title=3D&q=
uot;">position</var> are "CACHE", followed by a
+   U+0020 SPACE character, followed by "MANIFEST", then advanc=
e <var title=3D"">position</var> to the
+   next character after those. Otherwise, this isn't a cache manifest; a=
bort this algorithm with a
+   failure while checking for the magic signature.</li>
+
+   <li><p>If the character at <var title=3D""&g=
t;position</var> is neither a U+0020 SPACE character, a
+   U+0009 CHARACTER TABULATION (tab) character, U+000A LINE FEED (LF) ch=
aracter, nor a U+000D
+   CARRIAGE RETURN (CR) character, then this isn't a cache manifest; abo=
rt this algorithm with a
+   failure while checking for the magic signature.</li>
+
+   <li><p>This is a cache manifest. The algorithm cannot fai=
l beyond
+   this point (though bogus lines can get ignored).</li>
+
+   <li><p><a href=3D#collect-a-sequence-of-characters>=
Collect a sequence of characters</a> that are <em>not</em&=
gt; U+000A LINE FEED (LF)
+   or U+000D CARRIAGE RETURN (CR) characters, and ignore those character=
s. (Extra text on the first
+   line, after the signature, is ignored.)</li>
+
+   <li><p>Let <var title=3D"">mode</var&g=
t; be "explicit".</li>
+
+   <li><p><i>Start of line</i>: If <var title=
=3D"">position</var> is past the end of <var title=3D=
"">input</var>, then jump to the last step. Otherwise,=
 <a href=3D#collect-a-sequence-of-characters>collect a sequence of
+   characters</a> that are U+000A LINE FEED (LF), U+000D CARRIAGE =
RETURN (CR), U+0020 SPACE, or
+   U+0009 CHARACTER TABULATION (tab) characters.</li>
+   <!-- strips leading spaces, ignores space-only lines, ignores blan=
k lines -->
+
+   <li><p>Now, <a href=3D#collect-a-sequence-of-character=
s>collect a sequence of characters</a> that are <em>not&lt=
;/em> U+000A LINE FEED
+   (LF) or U+000D CARRIAGE RETURN (CR) characters, and let the result be=
 <var title=3D"">line</var>.</li>
+
+   <li><p>Drop any trailing U+0020 SPACE and U+0009 CHARACTE=
R TABULATION (tab) characters at the end
+   of <var title=3D"">line</var>.</li>
+
+   <li><p>If <var title=3D"">line</var&gt=
; is the empty string, then jump back to the step labeled <i>start
+   of line</i>.</li>
+
+   <li><p>If the first character in <var title=3D"&q=
uot;>line</var> is a U+0023 NUMBER SIGN character (#),
+   then jump back to the step labeled <i>start of line</i>.&=
lt;/li>
+
+   <li><p>If <var title=3D"">line</var&gt=
; equals "CACHE:" (the word "CACHE" followed by a U+0=
03A COLON
+   character (:)), then set <var title=3D"">mode</var=
> to "explicit" and jump back to the step labeled
+   <i>start of line</i>.</li>
+
+   <li><p>If <var title=3D"">line</var&gt=
; equals "FALLBACK:" (the word "FALLBACK" followed by=
 a U+003A
+   COLON character (:)), then set <var title=3D"">mode&l=
t;/var> to "fallback" and jump back to the step
+   labeled <i>start of line</i>.</li>
+
+   <li><p>If <var title=3D"">line</var&gt=
; equals "NETWORK:" (the word "NETWORK" followed by a=
 U+003A
+   COLON character (:)), then set <var title=3D"">mode&l=
t;/var> to "online whitelist" and jump back to
+   the step labeled <i>start of line</i>.</li>
+
+   <li><p>If <var title=3D"">line</var&gt=
; equals "SETTINGS:" (the word "SETTINGS" followed by=
 a U+003A
+   COLON character (:)), then set <var title=3D"">mode&l=
t;/var> to "settings" and jump back to the step
+   labeled <i>start of line</i>.</li>
+
+   <li><p>If <var title=3D"">line</var&gt=
; ends with a U+003A COLON character (:), then set <var title=3D"=
">mode</var> to "unknown" and jump back to the st=
ep labeled <i>start of line</i>.</li>
+
+   <li><p>This is either a data line or it is syntactically =
incorrect.</li>
+
+   <li><p>Let <var title=3D"">position</v=
ar> be a pointer into <var title=3D"">line</var>=
, initially
+   pointing at the start of the string.</li>
+
+   <li><p>Let <var title=3D"">tokens</var=
> be a list of strings, initially empty.</li>
+
+   <li>
+
+    <p>While <var title=3D"">position</var> =
doesn't point past the end of <var title=3D"">line</va=
r>:</p>
+
+    <ol><li><p>Let <var title=3D"">cur=
rent token</var> be an empty string.</li>
+
+     <li><p>While <var title=3D"">position&l=
t;/var> doesn't point past the end of <var title=3D"">=
line</var> and the character at <var title=3D"">pos=
ition</var> is neither a U+0020 SPACE
+     nor a U+0009 CHARACTER TABULATION (tab) character, add the characte=
r at <var title=3D"">position</var> to <var titl=
e=3D"">current token</var> and advance <var title=3D=
"">position</var> to the next character in <var tit=
le=3D"">input</var>.</li>
+
+     <li><p>Add <var title=3D"">current toke=
n</var> to the <var title=3D"">tokens</var> l=
ist.</li>
+
+     <li><p>While <var title=3D"">position&l=
t;/var> doesn't point past the end of <var title=3D"">=
line</var> and the character at <var title=3D"">pos=
ition</var> is either a U+0020 SPACE
+     or a U+0009 CHARACTER TABULATION (tab) character, advance <var t=
itle=3D"">position</var> to the
+     next character in <var title=3D"">input</var>=
.</li>
+
+    </ol></li>
+
+   <li>
+
+    <p>Process <var title=3D"">tokens</var> =
as follows:</p>
+
+    <dl class=3Dswitch><dt>If <var title=3D""&g=
t;mode</var> is "explicit"</dt>
+
+     <dd>
+
+      <p><a href=3D#resolve-a-url title=3D"resolve a url&q=
uot;>Resolve</a> the first item in <var title=3D""&=
gt;tokens</var>,
+      relative to <var title=3D"">base URL</var>; =
ignore the rest.</p>
+
+      <p>If this fails, then jump back to the step labeled <i&g=
t;start of line</i>.</p>
+
+      <p>If the resulting <a href=3D#parsed-url>parsed URL&l=
t;/a> has a different <a href=3D#concept-url-scheme title=3Dconcept=
-url-scheme>scheme</a> component than <var title=3D"&quo=
t;>base URL</var> (the
+      manifest's URL), then jump back to the step labeled <i>start=
 of line</i>.</p>
+
+      <p>Let <var title=3D"">new URL</var> b=
e the result of applying the <a href=3D#concept-url-serializer title=3D=
concept-url-serializer>URL serializer</a> algorithm to the resul=
ting <a href=3D#parsed-url>parsed
+      URL</a>, with the <i>exclude fragment flag</i> s=
et.</p>
+
+      <p>Add <var title=3D"">new URL</var> t=
o the <var title=3D"">explicit URLs</var>.</p&gt=
;
+
+     </dd>
+
+     <dt>If <var title=3D"">mode</var> is &q=
uot;fallback"</dt>
+
+     <dd>
+
+      <p>Let <var title=3D"">part one</var> =
be the first token in <var title=3D"">tokens</var>,=
 and let
+      <var title=3D"">part two</var> be the second=
 token in <var title=3D"">tokens</var>.</p>
+
+      <p><a href=3D#resolve-a-url title=3D"resolve a url&q=
uot;>Resolve</a> <var title=3D"">part one</va=
r> and <var title=3D"">part two</var>, relative =
to <var title=3D"">base URL</var>.</p>
+
+      <p>If either fails, then jump back to the step labeled <i=
>start of line</i>.</p>
+
+      <p>If the <a href=3D#absolute-url>absolute URL</a&g=
t; corresponding to either <var title=3D"">part one</v=
ar> or
+      <var title=3D"">part two</var> does not have=
 the <a href=3D#same-origin>same origin</a> as the manifest's=
 URL,
+      then jump back to the step labeled <i>start of line</i&gt=
;.</p> <!-- SECURITY -->
+
+      <p>Let <var title=3D"">part one</var> =
be the result of applying the <a href=3D#concept-url-serializer title=3D=
concept-url-serializer>URL serializer</a> algorithm to the first=
 resulting
+      <a href=3D#parsed-url>parsed URL</a>, with the <i&g=
t;exclude fragment flag</i> set.</p>
+
+      <p>Let <var title=3D"">part two</var> =
be the result of applying the <a href=3D#concept-url-serializer title=3D=
concept-url-serializer>URL serializer</a> algorithm to the secon=
d resulting
+      <a href=3D#parsed-url>parsed URL</a>, with the <i&g=
t;exclude fragment flag</i> set.</p>
+
+      <p>If <var title=3D"">part one</var> i=
s already in the <var title=3D"">fallback URLs</var&gt=
; mapping
+      as a <a href=3D#concept-appcache-fallback-ns title=3Dconcept-ap=
pcache-fallback-ns>fallback namespace</a>, then jump back to
+      the step labeled <i>start of line</i>.</p>
+
+      <p>Otherwise, add <var title=3D"">part one&l=
t;/var> to the <var title=3D"">fallback URLs</var&g=
t;
+      mapping as a <a href=3D#concept-appcache-fallback-ns title=3Dco=
ncept-appcache-fallback-ns>fallback namespace</a>, mapped to
+      <var title=3D"">part two</var> as the <a =
href=3D#concept-appcache-fallback title=3Dconcept-appcache-fallback>fa=
llback
+      entry</a>.</p>
+
+     </dd>
+
+     <dt>If <var title=3D"">mode</var> is &q=
uot;online whitelist"</dt>
+
+     <dd>
+
+      <p>If the first item in <var title=3D"">toke=
ns</var> is a U+002A ASTERISK character (*), then
+      set <var title=3D"">online whitelist wildcard flag=
</var> to <i title=3D"">open</i> and jump bac=
k
+      to the step labeled <i>start of line</i>.</p>
+
+      <p>Otherwise, <a href=3D#resolve-a-url title=3D"reso=
lve a url">resolve</a> the first item in <var title=3D&q=
uot;">tokens</var>, relative to <var title=3D"&quot=
;>base URL</var>; ignore the rest.</p>
+
+      <p>If this fails, then jump back to the step labeled <i&g=
t;start of line</i>.</p>
+
+      <p>If the resulting <a href=3D#parsed-url>parsed URL&l=
t;/a> has a different <a href=3D#concept-url-scheme title=3Dconcept=
-url-scheme>scheme</a> component than <var title=3D"&quo=
t;>base URL</var> (the
+      manifest's URL), then jump back to the step labeled <i>start=
 of line</i>.</p>
+
+      <p>Let <var title=3D"">new URL</var> b=
e the result of applying the <a href=3D#concept-url-serializer title=3D=
concept-url-serializer>URL serializer</a> algorithm to the resul=
ting <a href=3D#parsed-url>parsed
+      URL</a>, with the <i>exclude fragment flag</i> s=
et.</p>
+
+      <p>Add <var title=3D"">new URL</var> t=
o the <var title=3D"">online whitelist namespaces</var=
>.</p>
+
+     </dd>
+
+     <dt>If <var title=3D"">mode</var> is &q=
uot;settings"</dt>
+
+     <dd>
+
+      <p>If <var title=3D"">tokens</var> con=
tains a single token, and that token is a
+      <a href=3D#case-sensitive>case-sensitive</a> match for=
 the string "<code title=3D"">prefer-online</code=
>", then
+      set <var title=3D"">cache mode flag</var> to=
 <i title=3D"">prefer-online</i> and jump back to t=
he
+      step labeled <i>start of line</i>.</p>
+
+      <p>Otherwise, the line is an unsupported setting: do nothing=
; the line is ignored.</p>
+
+     </dd>
+
+     <dt>If <var title=3D"">mode</var> is &q=
uot;unknown"</dt>
+
+     <dd>
+
+      <p>Do nothing. The line is ignored.</p>
+
+     </dd>
+
+    </dl></li>
+
+   <li><p>Jump back to the step labeled <i>start of li=
ne</i>. (That step jumps to the next, and last,
+   step when the end of the file is reached.)</li>
+
+   <li><p>Return the <var title=3D"">explici=
t URLs</var> list, the <var title=3D"">fallback URL=
s</var>
+   mapping, the <var title=3D"">online whitelist namespa=
ces</var>, the <var title=3D"">online whitelist
+   wildcard flag</var>, and the <var title=3D"">ca=
che mode flag</var>.</li>
+
+  </ol><div class=3Dnote>
+
+   <p>The resource that declares the manifest (with the <code t=
itle=3Dattr-html-manifest><a href=3D#attr-html-manifest>manifest=
</a></code> attribute) will always get taken from the cache,
+   whether it is listed in the cache or not, even if it is listed in an =
<a href=3D#concept-appcache-onlinewhitelist title=3Dconcept-appcache-o=
nlinewhitelist>online whitelist namespace</a>.</p>
+
+   <p>If a resource is listed in the <a href=3D#concept-appcach=
e-manifest-explicit title=3Dconcept-appcache-manifest-explicit>explici=
t
+   section</a> or as a <a href=3D#concept-appcache-fallback tit=
le=3Dconcept-appcache-fallback>fallback entry</a> in the <a h=
ref=3D#concept-appcache-manifest-fallback title=3Dconcept-appcache-manife=
st-fallback>fallback section</a>, the resource will always be
+   taken from the cache, regardless of any other matching entries in the=
 <a href=3D#concept-appcache-fallback-ns title=3Dconcept-appcache-fall=
back-ns>fallback namespaces</a> or <a href=3D#concept-appcach=
e-onlinewhitelist title=3Dconcept-appcache-onlinewhitelist>online whit=
elist namespaces</a>.</p>
+
+   <p>When a <a href=3D#concept-appcache-fallback-ns title=3Dco=
ncept-appcache-fallback-ns>fallback namespace</a> and an <a h=
ref=3D#concept-appcache-onlinewhitelist title=3Dconcept-appcache-onlinewh=
itelist>online whitelist namespace</a> overlap, the <a href=3D=
#concept-appcache-onlinewhitelist title=3Dconcept-appcache-onlinewhitelis=
t>online whitelist namespace</a> has priority.</p>
+
+   <p>The <a href=3D#concept-appcache-onlinewhitelist-wildcard =
title=3Dconcept-appcache-onlinewhitelist-wildcard>online whitelist wil=
dcard
+   flag</a> is applied last, only for URLs that match neither the =
<a href=3D#concept-appcache-onlinewhitelist title=3Dconcept-appcache-o=
nlinewhitelist>online whitelist namespace</a> nor the <a href=
=3D#concept-appcache-fallback-ns title=3Dconcept-appcache-fallback-ns>=
fallback namespace</a> and that are not listed in the
+   <a href=3D#concept-appcache-manifest-explicit title=3Dconcept-appc=
ache-manifest-explicit>explicit section</a>.</p>
+
+  </div>
+
+
+  <h4 id=3Ddownloading-or-updating-an-application-cache><span c=
lass=3Dsecno>6.7.4 </span>Downloading or updating an application=
 cache</h4>
+
+  <p>When the user agent is required (by other parts of this speci=
fication) to start the
+  <dfn id=3Dapplication-cache-download-process>application cache d=
ownload process</dfn> for an <a href=3D#absolute-url>absolute=
 URL</a> purported to
+  identify a <a href=3D#concept-appcache-manifest title=3Dconcept-app=
cache-manifest>manifest</a>, or for an <a href=3D#application=
-cache-group>application
+  cache group</a>, potentially given a particular <a href=3D#ca=
che-host>cache host</a>, and potentially given
+  a <a href=3D#concept-appcache-master title=3Dconcept-appcache-maste=
r>master</a> resource, the user agent must run the steps
+  below. These steps are always run asynchronously, in parallel with the=
 <a href=3D#event-loop>event loop</a>
+  <a href=3D#concept-task title=3Dconcept-task>tasks</a>.&lt=
;/p>
+
+  <p>Some of these steps have requirements that only apply if the =
user agent <dfn id=3Dshows-caching-progress>shows caching
+  progress</dfn>. Support for this is optional. Caching progress U=
I could consist of a progress bar
+  or message panel in the user agent's interface, or an overlay, or some=
thing else. Certain events
+  fired during the <a href=3D#application-cache-download-process>a=
pplication cache download process</a> allow the script to override =
the
+  display of such an interface. (Such events are delayed until after the=
 <code title=3Devent-load>load</code> event has fired.)
+
+  The goal of this is to allow Web applications to provide more
+  seamless update mechanisms, hiding from the user the mechanics of the =
application cache mechanism.
+  User agents may display user interfaces independent of this, but are e=
ncouraged to not show
+  prominent update progress notifications for applications that cancel t=
he relevant events.</p>
+
+  <p>The <a href=3D#application-cache-download-process>appli=
cation cache download process</a> steps are as follows:
+
+  <ol><li><p>Optionally, wait until the permission to =
start the <a href=3D#application-cache-download-process>application=
 cache download
+   process</a> has been obtained from the user and until the user =
agent is confident that the
+   network is available. This could include doing nothing until the user=
 explicitly opts-in to
+   caching the site, or could involve prompting the user for permission.=
 The algorithm might never
+   get past this point. (This step is particularly intended to be used b=
y user agents running on
+   severely space-constrained devices or in highly privacy-sensitive env=
ironments).</li>
+
+   <li>
+
+    <p>Atomically, so as to avoid race conditions, perform the fol=
lowing substeps:</p>
+
+    <ol><li>
+
+      <p>Pick the appropriate substeps:</p>
+
+      <dl class=3Dswitch><dt>If these steps were invoked wit=
h an <a href=3D#absolute-url>absolute URL</a> purported to id=
entify a
+       <a href=3D#concept-appcache-manifest title=3Dconcept-appcache-=
manifest>manifest</a></dt>
+
+       <dd>
+
+        <p>Let <var title=3D"">manifest URL</va=
r> be that <a href=3D#absolute-url>absolute URL</a>.</p=
>
+
+        <p>If there is no <a href=3D#application-cache-group&gt=
;application cache group</a> identified by <var title=3D"&q=
uot;>manifest
+        URL</var>, then create a new <a href=3D#application-cac=
he-group>application cache group</a> identified by <var title=
=3D"">manifest URL</var>. Initially, it has no <a h=
ref=3D#application-cache title=3D"application
+        cache">application caches</a>. One will be created=
 later in this algorithm.</p>
+
+       </dd>
+
+
+       <dt>If these steps were invoked with an <a href=3D#appli=
cation-cache-group>application cache group</a></dt>
+
+       <dd>
+
+        <p>Let <var title=3D"">manifest URL</va=
r> be the <a href=3D#absolute-url>absolute URL</a> of the =
<a href=3D#concept-appcache-manifest title=3Dconcept-appcache-manifest=
>manifest</a> used to identify the <a href=3D#application-cac=
he-group>application
+        cache group</a> to be updated.</p>
+
+        <p>If that <a href=3D#application-cache-group>applic=
ation cache group</a> is <a href=3D#concept-appcache-obsolete ti=
tle=3Dconcept-appcache-obsolete>obsolete</a>, then abort this in=
stance of the
+        <a href=3D#application-cache-download-process>application =
cache download process</a>. This can happen if another instance of =
this
+        algorithm found the manifest to be 404 or 410 while this algorit=
hm was waiting in the first
+        step above.</p>
+
+       </dd>
+
+      </dl></li>
+
+     <li><p>Let <var title=3D"">cache group&=
lt;/var> be the <a href=3D#application-cache-group>application c=
ache group</a>
+     identified by <var title=3D"">manifest URL</var&=
gt;.</li>
+
+     <li><p>If these steps were invoked with a <a href=3D=
#concept-appcache-master title=3Dconcept-appcache-master>master</a&=
gt;
+     resource, then add the resource, along with the resource's <code=
><a href=3D#document>Document</a></code>, to <var=
 title=3D"">cache group</var>'s <a href=3D#concept-=
appcache-pending-masters title=3Dconcept-appcache-pending-masters>list=
 of pending
+     master entries</a>.</li>
+
+     <li><p>If these steps were invoked with a <a href=3D=
#cache-host>cache host</a>, and the <a href=3D#concept-appcac=
he-status title=3Dconcept-appcache-status>status</a> of <var =
title=3D"">cache group</var> is
+     <i>checking</i> or <i>downloading</i>, then=
 <a href=3D#queue-a-post-load-task>queue a post-load task</a>=
 to <a href=3D#fire-a-simple-event>fire a
+     simple event</a> named <code title=3Devent-appcache-checki=
ng><a href=3D#event-appcache-checking>checking</a></cod=
e> that is
+     cancelable at the <code><a href=3D#applicationcache>App=
licationCache</a></code> singleton of that <a href=3D#cach=
e-host>cache host</a>. The
+     default action of this event must be, if the user agent <a href=3D=
#shows-caching-progress>shows caching progress</a>,
+     the display of some sort of user interface indicating to the user t=
hat the user agent is
+     checking to see if it can download the application.</li>
+
+     <li><p>If these steps were invoked with a <a href=3D=
#cache-host>cache host</a>, and the <a href=3D#concept-appcac=
he-status title=3Dconcept-appcache-status>status</a> of <var =
title=3D"">cache group</var> is
+     <i>downloading</i>, then also <a href=3D#queue-a-pos=
t-load-task>queue a post-load task</a> to <a href=3D#fire-a-s=
imple-event>fire a simple
+     event</a> named <code title=3Devent-appcache-downloading&g=
t;<a href=3D#event-appcache-downloading>downloading</a></c=
ode> that is
+     cancelable at the <code><a href=3D#applicationcache>App=
licationCache</a></code> singleton of that <a href=3D#cach=
e-host>cache host</a>. The
+     default action of this event must be, if the user agent <a href=3D=
#shows-caching-progress>shows caching progress</a>,
+     the display of some sort of user interface indicating to the user t=
he application is being
+     downloaded.</li>
+
+     <li><p>If the <a href=3D#concept-appcache-status tit=
le=3Dconcept-appcache-status>status</a> of the <var title=3D&=
quot;">cache
+     group</var> is either <i>checking</i> or <i&gt=
;downloading</i>, then abort this instance of the
+     <a href=3D#application-cache-download-process>application cac=
he download process</a>, as an update is already in progress.</l=
i>
+
+     <li><p>Set the <a href=3D#concept-appcache-status ti=
tle=3Dconcept-appcache-status>status</a> of <var title=3D&quo=
t;">cache
+     group</var> to <i>checking</i>.</p>
+
+     <li><p>For each <a href=3D#cache-host>cache host&=
lt;/a> associated with an <a href=3D#application-cache>applicati=
on cache</a> in
+     <var title=3D"">cache group</var>, <a href=
=3D#queue-a-post-load-task>queue a post-load task</a> to <a h=
ref=3D#fire-a-simple-event>fire a simple
+     event</a> that is cancelable named <code title=3Devent-app=
cache-checking><a href=3D#event-appcache-checking>checking</a=
></code> at
+     the <code><a href=3D#applicationcache>ApplicationCache&=
lt;/a></code> singleton of the <a href=3D#cache-host>cache=
 host</a>. The default action
+     of these events must be, if the user agent <a href=3D#shows-cach=
ing-progress>shows caching progress</a>, the display of
+     some sort of user interface indicating to the user that the user ag=
ent is checking for the
+     availability of updates.</li>
+
+    </ol><p class=3Dnote>The remainder of the steps run asyn=
chronously.</p>
+
+    <p>If <var title=3D"">cache group</var> =
already has an <a href=3D#application-cache>application cache</a=
> in it, then
+    this is an <dfn id=3Dconcept-appcache-upgrade title=3Dconcept-app=
cache-upgrade>upgrade attempt</dfn>. Otherwise, this is a
+    <dfn id=3Dconcept-appcache-cache title=3Dconcept-appcache-cache&g=
t;cache attempt</dfn>.</p>
+
+   </li>
+
+   <li><p>If this is a <a href=3D#concept-appcache-cache =
title=3Dconcept-appcache-cache>cache attempt</a>, then this
+   algorithm was invoked with a <a href=3D#cache-host>cache host&l=
t;/a>; <a href=3D#queue-a-post-load-task>queue a post-load task&=
lt;/a> to
+   <a href=3D#fire-a-simple-event>fire a simple event</a> na=
med <code title=3Devent-appcache-checking><a href=3D#event-appca=
che-checking>checking</a></code> that
+   is cancelable at the <code><a href=3D#applicationcache>Ap=
plicationCache</a></code> singleton of that <a href=3D#cac=
he-host>cache host</a>. The
+   default action of this event must be, if the user agent <a href=3D=
#shows-caching-progress>shows caching progress</a>, the
+   display of some sort of user interface indicating to the user that th=
e user agent is checking for
+   the availability of updates.</li>
+
+   <li>
+
+    <p><i>Fetching the manifest</i>: <a href=3D#fet=
ch>Fetch</a><!--FETCH--> the resource from <var title=3D=
"">manifest URL</var> with the <i>synchronous fl=
ag</i> set, and let <var title=3D"">manifest</va=
r> be that resource. HTTP caching semantics should be honored for this
+    request.</p> <!-- http-origin privacy sensitive, though it =
doesn't matter, since this can never
+    be cross-origin -->
+
+    <p>Parse <var title=3D"">manifest</var> =
according to the <a href=3D#parse-a-manifest title=3D"parse a man=
ifest">rules for
+    parsing manifests</a>, obtaining a list of <a href=3D#conce=
pt-appcache-explicit title=3Dconcept-appcache-explicit>explicit
+    entries</a>, <a href=3D#concept-appcache-fallback title=3Dc=
oncept-appcache-fallback>fallback entries</a> and the <a href=
=3D#concept-appcache-fallback-ns title=3Dconcept-appcache-fallback-ns>=
fallback namespaces</a> that map to them, entries for
+    the <a href=3D#concept-appcache-onlinewhitelist title=3Dconcept-a=
ppcache-onlinewhitelist>online whitelist</a>, and values for the
+    <a href=3D#concept-appcache-onlinewhitelist-wildcard title=3Dconc=
ept-appcache-onlinewhitelist-wildcard>online whitelist wildcard flag&l=
t;/a>
+    and the <a href=3D#concept-appcache-mode title=3Dconcept-appcache=
-mode>cache mode flag</a>.</p>
+
+    <p class=3Dnote>The <a href=3D#mime-type>MIME type</a=
> of the resource is ignored — it is assumed to
+    be <code><a href=3D#text/cache-manifest>text/cache-manif=
est</a></code>. In the future, if new manifest formats are su=
pported, the
+    different types will probably be distinguished on the basis of the f=
ile signatures (for the
+    current format, that is the "<code title=3D"">C=
ACHE MANIFEST</code>" string at the top of the
+    file).</p>
+
+   </li>
+
+   <li>
+
+    <p>If <i>fetching the manifest</i> fails due to a =
404 or 410 response <a href=3D#concept-http-equivalent-codes title=3Dc=
oncept-http-equivalent-codes>or equivalent</a>, then run these s=
ubsteps:</p>
+
+    <ol><li><p>Mark <var title=3D"">ca=
che group</var> as <a href=3D#concept-appcache-obsolete title=3D=
concept-appcache-obsolete>obsolete</a>. This <var title=3D&qu=
ot;">cache group</var> no
+     longer exists for any purpose other than the processing of <code=
><a href=3D#document>Document</a></code> objects
+     already associated with an <a href=3D#application-cache>appli=
cation cache</a> in the <var title=3D"">cache
+     group</var>.</li>
+
+     <li><p>Let <var title=3D"">task list&lt=
;/var> be an empty list of <a href=3D#concept-task title=3Dconcept-=
task>tasks</a>.</p>
+
+     <li><p>For each <a href=3D#cache-host>cache host&=
lt;/a> associated with an <a href=3D#application-cache>applicati=
on cache</a> in
+     <var title=3D"">cache group</var>, create a &=
lt;a href=3D#concept-task title=3Dconcept-task>task</a> to <a=
 href=3D#fire-a-simple-event>fire
+     a simple event</a> named <code title=3Devent-appcache-obso=
lete><a href=3D#event-appcache-obsolete>obsolete</a></c=
ode> that is
+     cancelable at the <code><a href=3D#applicationcache>App=
licationCache</a></code> singleton of the <a href=3D#cache=
-host>cache host</a>, and
+     append it to <var title=3D"">task list</var>.=
 The default action of these events must be, if the
+     user agent <a href=3D#shows-caching-progress>shows caching pr=
ogress</a>, the display of some sort of user interface
+     indicating to the user that the application is no longer available =
for offline use.</li>
+
+     <li><p>For each entry in <var title=3D""&g=
t;cache group</var>'s <a href=3D#concept-appcache-pending-master=
s title=3Dconcept-appcache-pending-masters>list of pending master entr=
ies</a>, create a <a href=3D#concept-task title=3Dconcept-task&g=
t;task</a> to <a href=3D#fire-a-simple-event>fire a simple ev=
ent</a> that is cancelable named
+     <code title=3Devent-appcache-error><a href=3D#event-appcac=
he-error>error</a></code> (not <code title=3Devent-appc=
ache-obsolete><a href=3D#event-appcache-obsolete>obsolete</a&=
gt;</code>!) at the <code><a href=3D#applicationcache>A=
pplicationCache</a></code>
+     singleton of the <code><a href=3D#document>Document<=
/a></code> for this entry, if there still is one, and append it =
to
+     <var title=3D"">task list</var>. The default =
action of this event must be, if the user agent
+     <a href=3D#shows-caching-progress>shows caching progress</=
a>, the display of some sort of user interface indicating to
+     the user that the user agent failed to save the application for off=
line use.</li>
+
+     <li><p>If <var title=3D"">cache group&l=
t;/var> has an <a href=3D#application-cache>application cache&lt=
;/a> whose <a href=3D#concept-appcache-completeness title=3Dconcept=
-appcache-completeness>completeness flag</a> is <i>incompl=
ete</i>, then
+     discard that <a href=3D#application-cache>application cache&l=
t;/a>.</p>
+
+     <li><p>If appropriate, remove any user interface indica=
ting that an update for this cache is in
+     progress.</li>
+
+     <li><p>Let the <a href=3D#concept-appcache-status ti=
tle=3Dconcept-appcache-status>status</a> of <var title=3D&quo=
t;">cache
+     group</var> be <i>idle</i>.</li>
+
+     <li><p>For each <a href=3D#concept-task title=3Dconc=
ept-task>task</a> in <var title=3D"">task list&l=
t;/var>, <a href=3D#queue-a-post-load-task title=3D"queue a po=
st-load task">queue that task as a post-load task</a>.</=
li>
+
+     <li><p>Abort the <a href=3D#application-cache-downlo=
ad-process>application cache download process</a>.</li>
+
+    </ol></li>
+
+   <li>
+
+    <p>Otherwise, if <i>fetching the manifest</i> fail=
s in some other way (e.g. the server returns
+    another 4xx or 5xx response <a href=3D#concept-http-equivalent-co=
des title=3Dconcept-http-equivalent-codes>or equivalent</a>, or
+    there is a DNS error, or the connection times out, or the user cance=
ls the download, or the
+    parser for manifests fails when checking the magic signature), or if=
 the server returned a
+    redirect, then run the <a href=3D#cache-failure-steps>cache fa=
ilure steps</a>. <a href=3D#refsHTTP>[HTTP]</a></p&g=
t;
+
+   </li>
+
+   <li>
+
+    <p>If this is an <a href=3D#concept-appcache-upgrade title=3D=
concept-appcache-upgrade>upgrade attempt</a> and the newly
+    downloaded <var title=3D"">manifest</var> is b=
yte-for-byte identical to the manifest found in the
+    <a href=3D#concept-appcache-newer title=3Dconcept-appcache-newer&=
gt;newest</a> <a href=3D#application-cache>application cache&=
lt;/a> in <var title=3D"">cache group</var>, or =
the server reported it as "304 Not Modified" <a href=3D#conc=
ept-http-equivalent-codes title=3Dconcept-http-equivalent-codes>or equ=
ivalent</a>, then run these substeps:</p>
+
+    <ol><li><p>Let <var title=3D"">cac=
he</var> be the <a href=3D#concept-appcache-newer title=3Dconcep=
t-appcache-newer>newest</a>
+     <a href=3D#application-cache>application cache</a> in &=
lt;var title=3D"">cache group</var>.</li>
+
+     <li><p>Let <var title=3D"">task list&lt=
;/var> be an empty list of <a href=3D#concept-task title=3Dconcept-=
task>tasks</a>.</p>
+
+     <li>
+
+      <p>For each entry in <var title=3D"">cache g=
roup</var>'s <a href=3D#concept-appcache-pending-masters title=3D=
concept-appcache-pending-masters>list of pending master entries</a&=
gt;, wait for the
+      resource for this entry to have either completely downloaded or fa=
iled.</p>
+
+      <p>If the download failed (e.g. the server returns a 4xx or =
5xx response <a href=3D#concept-http-equivalent-codes title=3Dconcept-=
http-equivalent-codes>or equivalent</a>, or there is a DNS error=
, the
+      connection times out, or the user cancels the download), or if the=
 resource is labeled with
+      the "no-store" cache directive, then create a <a href=
=3D#concept-task title=3Dconcept-task>task</a> to
+      <a href=3D#fire-a-simple-event>fire a simple event</a>=
 that is cancelable named <code title=3Devent-appcache-error><a =
href=3D#event-appcache-error>error</a></code> at the <c=
ode><a href=3D#applicationcache>ApplicationCache</a></c=
ode> singleton of
+      the <code><a href=3D#document>Document</a></c=
ode> for this entry, if there still is one, and append it to <var t=
itle=3D"">task list</var>. The default action of this =
event must be, if the user agent
+      <a href=3D#shows-caching-progress>shows caching progress<=
/a>, the display of some sort of user interface indicating to
+      the user that the user agent failed to save the application for of=
fline use.</p>
+
+      <p>Otherwise, associate the <code><a href=3D#docume=
nt>Document</a></code> for this entry with <var title=3D=
"">cache</var>; store the resource for this entry in &=
lt;var title=3D"">cache</var>, if it
+      isn't already there, and categorize its entry as a <a href=3D#c=
oncept-appcache-master title=3Dconcept-appcache-master>master entry&lt=
;/a>. If applying the <a href=3D#url-parser>URL parser</a>
+      algorithm to the resource's <a href=3D#url>URL</a> res=
ults in a <a href=3D#parsed-url>parsed URL</a> that has a
+      non-null <a href=3D#concept-url-fragment title=3Dconcept-url-fr=
agment>fragment</a> component, the <a href=3D#url>URL</=
a>
+      used for the entry in <var title=3D"">cache</va=
r> must instead be the <a href=3D#absolute-url>absolute URL</=
a>
+      obtained from applying the <a href=3D#concept-url-serializer ti=
tle=3Dconcept-url-serializer>URL serializer</a>
+      algorithm to the <a href=3D#parsed-url>parsed URL</a> =
with the <i>exclude fragment flag</i> set
+      (application caches never include fragment identifiers).</p>
+
+     </li>
+
+     <li><p>For each <a href=3D#cache-host>cache host&=
lt;/a> associated with an <a href=3D#application-cache>applicati=
on cache</a> in
+     <var title=3D"">cache group</var>, create a &=
lt;a href=3D#concept-task title=3Dconcept-task>task</a> to <a=
 href=3D#fire-a-simple-event>fire
+     a simple event</a> that is cancelable named <code title=3D=
event-appcache-noupdate><a href=3D#event-appcache-noupdate>noupd=
ate</a></code> at the <code><a href=3D#applicationca=
che>ApplicationCache</a></code> singleton
+     of the <a href=3D#cache-host>cache host</a>, and append=
 it to <var title=3D"">task list</var>. The default
+     action of these events must be, if the user agent <a href=3D#sho=
ws-caching-progress>shows caching progress</a>, the
+     display of some sort of user interface indicating to the user that =
the application is up to
+     date.</li>
+
+     <li><p>Empty <var title=3D"">cache grou=
p</var>'s <a href=3D#concept-appcache-pending-masters title=3Dco=
ncept-appcache-pending-masters>list of pending master entries</a&gt=
;.</li>
+
+     <li><p>If appropriate, remove any user interface indica=
ting that an update for this cache is in
+     progress.</li>
+
+     <li><p>Let the <a href=3D#concept-appcache-status ti=
tle=3Dconcept-appcache-status>status</a> of <var title=3D&quo=
t;">cache
+     group</var> be <i>idle</i>.</li>
+
+     <li><p>For each <a href=3D#concept-task title=3Dconc=
ept-task>task</a> in <var title=3D"">task list&l=
t;/var>, <a href=3D#queue-a-post-load-task title=3D"queue a po=
st-load task">queue that task as a post-load task</a>.</=
li>
+
+     <li><p>Abort the <a href=3D#application-cache-downlo=
ad-process>application cache download process</a>.</li>
+
+    </ol></li>
+
+   <li><p>Let <var title=3D"">new cache</=
var> be a newly created <a href=3D#application-cache>application=
 cache</a> in
+   <var title=3D"">cache group</var>. Set its <=
a href=3D#concept-appcache-completeness title=3Dconcept-appcache-complete=
ness>completeness
+   flag</a> to <i>incomplete</i>.</li>
+
+   <li><p>For each entry in <var title=3D"">=
cache group</var>'s <a href=3D#concept-appcache-pending-masters =
title=3Dconcept-appcache-pending-masters>list of pending master entrie=
s</a>, associate the
+   <code><a href=3D#document>Document</a></code>=
 for this entry with <var title=3D"">new cache</var&gt=
;.</li>
+
+   <li><p>Set the <a href=3D#concept-appcache-status titl=
e=3Dconcept-appcache-status>status</a> of <var title=3D"=
">cache
+   group</var> to <i>downloading</i>.</li>
+
+   <li><p>For each <a href=3D#cache-host>cache host&lt=
;/a> associated with an <a href=3D#application-cache>application=
 cache</a> in <var title=3D"">cache group</var&g=
t;, <a href=3D#queue-a-post-load-task>queue a post-load task</a&=
gt; to <a href=3D#fire-a-simple-event>fire a simple
+   event</a> that is cancelable named <code title=3Devent-appca=
che-downloading><a href=3D#event-appcache-downloading>downloadin=
g</a></code>
+   at the <code><a href=3D#applicationcache>ApplicationCache=
</a></code> singleton of the <a href=3D#cache-host>cach=
e host</a>. The default action
+   of these events must be, if the user agent <a href=3D#shows-cachin=
g-progress>shows caching progress</a>, the display of
+   some sort of user interface indicating to the user that a new version=
 is being
+   downloaded.</li>
+
+   <li><p>Let <var title=3D"">file list</=
var> be an empty list of URLs with flags.</li>
+
+   <li><p>Add all the URLs in the list of <a href=3D#conc=
ept-appcache-explicit title=3Dconcept-appcache-explicit>explicit
+   entries</a> obtained by parsing <var title=3D""&gt=
;manifest</var> to <var title=3D"">file list</va=
r>,
+   each flagged with "explicit entry".</li>
+
+   <li><p>Add all the URLs in the list of <a href=3D#conc=
ept-appcache-fallback title=3Dconcept-appcache-fallback>fallback
+   entries</a> obtained by parsing <var title=3D""&gt=
;manifest</var> to <var title=3D"">file list</va=
r>,
+   each flagged with "fallback entry".</li>
+
+   <li><p>If this is an <a href=3D#concept-appcache-upgra=
de title=3Dconcept-appcache-upgrade>upgrade attempt</a>, then ad=
d all
+   the URLs of <a href=3D#concept-appcache-master title=3Dconcept-app=
cache-master>master entries</a> in the <a href=3D#concept-app=
cache-newer title=3Dconcept-appcache-newer>newest</a> <a href=
=3D#application-cache>application cache</a> in <var title=3D&=
quot;">cache group</var> whose <a href=3D#concept-appcac=
he-completeness title=3Dconcept-appcache-completeness>completeness
+   flag</a> is <i>complete</i> to <var title=3D&quo=
t;">file list</var>, each flagged with "master
+   entry".</li>
+
+   <li><p>If any URL is in <var title=3D"">f=
ile list</var> more than once, then merge the entries into
+   one entry for that URL, that entry having all the flags that the orig=
inal entries had.</li>
+
+   <li>
+
+    <p>For each URL in <var title=3D"">file list&l=
t;/var>, run the following steps. These steps may be
+    run in parallel for two or more of the URLs at a time. If, while run=
ning these steps, the
+    <code><a href=3D#applicationcache>ApplicationCache</a=
></code> object's <code title=3Ddom-appcache-abort><a h=
ref=3D#dom-appcache-abort>abort()</a></code> method
+    <a href=3D#send-a-signal title=3D"send a signal">sen=
ds a signal</a> to this instance of the <a href=3D#application-c=
ache-download-process>application
+    cache download process</a> algorithm, then run the <a href=3D=
#cache-failure-steps>cache failure steps</a>
+    instead.</p>
+
+    <ol><li>
+
+      <p>If the resource URL being processed was flagged as neithe=
r an "explicit entry" nor or a
+      "fallback entry", then the user agent may skip this URL.=
</p>
+
+      <p class=3Dnote>This is intended to allow user agents to exp=
ire resources not listed in the
+      manifest from the cache. Generally, implementors are urged to use =
an approach that expires
+      lesser-used resources first.</p>
+
+     </li>
+
+     <li><p>For each <a href=3D#cache-host>cache host&=
lt;/a> associated with an <a href=3D#application-cache>applicati=
on cache</a> in
+     <var title=3D"">cache group</var>, <a href=
=3D#queue-a-post-load-task>queue a post-load task</a> to <a h=
ref=3D#concept-event-fire title=3Dconcept-event-fire>fire</a> a =
<a href=3D#concept-events-trusted title=3Dconcept-events-trusted>tr=
usted</a>
+     event with the name <code title=3Devent-appcache-progress>&lt=
;a href=3D#event-appcache-progress>progress</a></code>, wh=
ich does not
+     bubble, which is cancelable, and which uses the <code><a h=
ref=3D#progressevent>ProgressEvent</a></code> interface, a=
t the
+     <code><a href=3D#applicationcache>ApplicationCache</=
a></code> singleton of the <a href=3D#cache-host>cache hos=
t</a>. The <code title=3Ddom-ProgressEvents-lengthComputable>=
lengthComputable</code> attribute must be set to
+     true, the <code title=3Ddom-ProgressEvents-total>total</co=
de> attribute must be set to the
+     number of files in <var title=3D"">file list</va=
r>, and the <code title=3Ddom-ProgressEvents-loaded>loaded</c=
ode> attribute must be set to the number of files in
+     <var title=3D"">file list</var> that have bee=
n either downloaded or skipped so far. The default
+     action of these events must be, if the user agent <a href=3D#sho=
ws-caching-progress>shows caching progress</a>, the
+     display of some sort of user interface indicating to the user that =
a file is being downloaded
+     in preparation for updating the application. <a href=3D#refsXHR&=
gt;[XHR]</a></li>
+
+     <li>
+
+      <p><a href=3D#fetch>Fetch</a><!--FETCH--> =
the resource, from the <a href=3D#origin>origin</a> of the
+      <a href=3D#url>URL</a> <var title=3D""&gt=
;manifest URL</var>, with the <i>synchronous flag</i> s=
et and
+      the <i>manual redirect flag</i> set. If this is an &lt=
;a href=3D#concept-appcache-upgrade title=3Dconcept-appcache-upgrade>u=
pgrade attempt</a>, then use the <a href=3D#concept-appcache-new=
er title=3Dconcept-appcache-newer>newest</a> <a href=3D#appli=
cation-cache>application cache</a> in <var title=3D"&quo=
t;>cache group</var> as an HTTP cache, and honor HTTP caching se=
mantics (such as
+      expiration, ETags, and so forth) with respect to that cache. User =
agents may also have other
+      caches in place that are also honored.</p> <!-- not http-=
origin privacy sensitive -->
+
+      <p class=3Dnote>If the resource in question is already being=
 downloaded for other reasons then
+      the existing download process can sometimes be used for the purpos=
es of this step, as defined
+      by the <a href=3D#fetch title=3Dfetch>fetching</a> alg=
orithm.</p>
+
+      <p class=3Dexample>An example of a resource that might alrea=
dy be being downloaded is a large
+      image on a Web page that is being seen for the first time. The ima=
ge would get downloaded to
+      satisfy the <code><a href=3D#the-img-element>img</a=
></code> element on the page, as well as being listed in the cac=
he
+      manifest. According to the rules for <a href=3D#fetch title=3Df=
etch>fetching</a> that image only need
+      be downloaded once, and it can be used both for the cache and for =
the rendered Web page.</p>
+
+     </li>
+
+     <li>
+
+      <p>If the previous step fails (e.g. the server returns a 4xx=
 or 5xx response <a href=3D#concept-http-equivalent-codes title=3Dconc=
ept-http-equivalent-codes>or equivalent</a>, or there is a DNS e=
rror, or the
+      connection times out, or the user cancels the download), or if the=
 server returned a redirect,
+      or if the resource is labeled with the "no-store" cache =
directive, then run the first
+      appropriate step from the following list: <a href=3D#refsHTTP&g=
t;[HTTP]</a></p>
+
+      <dl class=3Dswitch><dt>If the URL being processed was =
flagged as an "explicit entry" or a "fallback entry"&=
lt;/dt>
+
+       <dd>
+
+        <p>If these steps are being run in parallel for any other =
URLs in <var title=3D"">file
+        list</var>, then abort these steps for those other URLs. R=
un the <a href=3D#cache-failure-steps>cache failure
+        steps</a>.</p>
+
+        <p class=3Dnote>Redirects are fatal because they are eithe=
r indicative of a network problem
+        (e.g. a captive portal); or would allow resources to be added to=
 the cache under URLs that
+        differ from any URL that the networking model will allow access =
to, leaving orphan entries;
+        or would allow resources to be stored under URLs different than =
their true URLs. All of
+        these situations are bad.</p>
+
+       </dd>
+
+       <dt>If the error was a 404 or 410 HTTP response <a href=3D=
#concept-http-equivalent-codes title=3Dconcept-http-equivalent-codes>o=
r equivalent</a></dt>
+
+       <dt>If the resource was labeled with the "no-store&quo=
t; cache directive</dt>
+
+       <dd>
+
+        <p>Skip this resource. It is dropped from the cache.</p=
>
+
+       </dd>
+
+       <dt>Otherwise</dt>
+
+       <dd>
+
+        <p>Copy the resource and its metadata from the <a href=3D=
#concept-appcache-newer title=3Dconcept-appcache-newer>newest</a&gt=
; <a href=3D#application-cache>application cache</a> in <v=
ar title=3D"">cache group</var> whose <a href=3D#co=
ncept-appcache-completeness title=3Dconcept-appcache-completeness>comp=
leteness
+        flag</a> is <i>complete</i>, and act as if tha=
t was the fetched resource, ignoring the
+        resource obtained from the network.</p>
+
+       </dd>
+
+      </dl><p>User agents may warn the user of these errors =
as an aid to development.</p>
+
+      <p class=3Dnote>These rules make errors for resources listed=
 in the manifest fatal, while
+      making it possible for other resources to be removed from caches w=
hen they are removed from
+      the server, without errors, and making non-manifest resources surv=
ive server-side errors.</p>
+
+      <p class=3Dnote>Except for the "no-store" directiv=
e, HTTP caching rules that would cause a
+      file to be expired or otherwise not cached are ignored for the pur=
poses of the
+      <a href=3D#application-cache-download-process>application ca=
che download process</a>.</p>
+
+     </li>
+
+     <li>
+
+      <p>Otherwise, the fetching succeeded. Store the resource in =
the <var title=3D"">new
+      cache</var>.</p>
+
+      <p>If the user agent is not able to store the resource (e.g.=
 because of quota restrictions),
+      the user agent may prompt the user or try to resolve the problem i=
n some other manner (e.g.
+      automatically pruning content in other caches). If the problem can=
not be resolved, the user
+      agent must run the <a href=3D#cache-failure-steps>cache fail=
ure steps</a>.</p>
+
+     </li>
+
+     <li><p>If the URL being processed was flagged as an &qu=
ot;explicit entry" in <var title=3D"">file
+     list</var>, then categorize the entry as an <a href=3D#con=
cept-appcache-explicit title=3Dconcept-appcache-explicit>explicit
+     entry</a>.</li>
+
+     <li><p>If the URL being processed was flagged as a &quo=
t;fallback entry" in <var title=3D"">file
+     list</var>, then categorize the entry as a <a href=3D#conc=
ept-appcache-fallback title=3Dconcept-appcache-fallback>fallback
+     entry</a>.</li>
+
+     <li><p>If the URL being processed was flagged as an &qu=
ot;master entry" in <var title=3D"">file
+     list</var>, then categorize the entry as a <a href=3D#conc=
ept-appcache-master title=3Dconcept-appcache-master>master
+     entry</a>.</li>
+
+     <li><p>As an optimization, if the resource is an HTML o=
r XML file whose root element is an
+     <code><a href=3D#the-html-element>html</a></co=
de> element with a <code title=3Dattr-html-manifest><a href=3D=
#attr-html-manifest>manifest</a></code> attribute
+     whose value doesn't match the manifest URL of the application cache=
 being processed, then the
+     user agent should mark the entry as being <a href=3D#concept-app=
cache-foreign title=3Dconcept-appcache-foreign>foreign</a>.</=
p>
+
+    </ol></li>
+
+   <li><p>For each <a href=3D#cache-host>cache host&lt=
;/a> associated with an <a href=3D#application-cache>application=
 cache</a> in <var title=3D"">cache group</var&g=
t;, <a href=3D#queue-a-post-load-task>queue a post-load task</a&=
gt; to <a href=3D#concept-event-fire title=3Dconcept-event-fire>fir=
e</a> a <a href=3D#concept-events-trusted title=3Dconcept-events=
-trusted>trusted</a>
+   event with the name <code title=3Devent-appcache-progress><a=
 href=3D#event-appcache-progress>progress</a></code>, whic=
h does not bubble,
+   which is cancelable, and which uses the <code><a href=3D#pro=
gressevent>ProgressEvent</a></code> interface, at the
+   <code><a href=3D#applicationcache>ApplicationCache</a&=
gt;</code> singleton of the <a href=3D#cache-host>cache host&=
lt;/a>. The <code title=3Ddom-ProgressEvents-lengthComputable>le=
ngthComputable</code> attribute must be set to
+   true, the <code title=3Ddom-ProgressEvents-total>total</code=
> and the <code title=3Ddom-ProgressEvents-loaded>loaded</cod=
e> attributes must be set to the number of files in
+   <var title=3D"">file list</var>. The default ac=
tion of these events must be, if the user agent
+   <a href=3D#shows-caching-progress>shows caching progress</a&=
gt;, the display of some sort of user interface indicating to the
+   user that all the files have been downloaded. <a href=3D#refsXHR&g=
t;[XHR]</a></li>
+
+   <li><p>Store the list of <a href=3D#concept-appcache-f=
allback-ns title=3Dconcept-appcache-fallback-ns>fallback namespaces&lt=
;/a>,
+   and the URLs of the <a href=3D#concept-appcache-fallback title=3Dc=
oncept-appcache-fallback>fallback entries</a> that they map
+   to, in <var title=3D"">new cache</var>.</li&=
gt;
+
+   <li><p>Store the URLs that form the new <a href=3D#con=
cept-appcache-onlinewhitelist title=3Dconcept-appcache-onlinewhitelist&gt=
;online
+   whitelist</a> in <var title=3D"">new cache</=
var>.</li>
+
+   <li><p>Store the value of the new <a href=3D#concept-a=
ppcache-onlinewhitelist-wildcard title=3Dconcept-appcache-onlinewhitelist=
-wildcard>online
+   whitelist wildcard flag</a> in <var title=3D"">=
new cache</var>.</li>
+
+   <li><p>Store the value of the new <a href=3D#concept-a=
ppcache-mode title=3Dconcept-appcache-mode>cache mode flag</a> i=
n
+   <var title=3D"">new cache</var>.</li>
+
+   <li>
+
+    <p>For each entry in <var title=3D"">cache gro=
up</var>'s <a href=3D#concept-appcache-pending-masters title=3Dc=
oncept-appcache-pending-masters>list of pending master entries</a&g=
t;, wait for the
+    resource for this entry to have either completely downloaded or fail=
ed.</p>
+
+    <p>If the download failed (e.g. the server returns a 4xx or 5x=
x response <a href=3D#concept-http-equivalent-codes title=3Dconcept-ht=
tp-equivalent-codes>or equivalent</a>, or there is a DNS error, =
the
+    connection times out, or the user cancels the download), or if the r=
esource is labeled with the
+    "no-store" cache directive, then run these substeps:</p=
>
+
+    <ol><li><p>Unassociate the <code><a href=3D=
#document>Document</a></code> for this entry from <var =
title=3D"">new
+     cache</var>.</li>
+
+     <li><p><a href=3D#queue-a-post-load-task>Queue a =
post-load task</a> to <a href=3D#fire-a-simple-event>fire a s=
imple event</a> that is
+     cancelable named <code title=3Devent-appcache-error><a hre=
f=3D#event-appcache-error>error</a></code> at the
+     <code><a href=3D#applicationcache>ApplicationCache</=
a></code> singleton of the <code><a href=3D#document&gt=
;Document</a></code> for this entry, if there
+     still is one. The default action of this event must be, if the user=
 agent <a href=3D#shows-caching-progress>shows caching
+     progress</a>, the display of some sort of user interface indi=
cating to the user that the
+     user agent failed to save the application for offline use.</p&gt=
;
+
+     <li>
+
+      <p>If this is a <a href=3D#concept-appcache-cache title=3D=
concept-appcache-cache>cache attempt</a> and this entry is
+      the last entry in <var title=3D"">cache group</=
var>'s <a href=3D#concept-appcache-pending-masters title=3Dconcept-=
appcache-pending-masters>list of pending master entries</a>, the=
n run these
+      further substeps:</p>
+
+      <ol><li><p>Discard <var title=3D""&=
gt;cache group</var> and its only <a href=3D#application-cache&g=
t;application cache</a>,
+       <var title=3D"">new cache</var>.</p>
+
+       <li><p>If appropriate, remove any user interface indi=
cating that an update for this cache is
+       in progress.</li>
+
+       <li><p>Abort the <a href=3D#application-cache-down=
load-process>application cache download process</a>.</li>
+
+      </ol></li>
+
+     <li><p>Otherwise, remove this entry from <var title=3D=
"">cache group</var>'s <a href=3D#concept-appcache-=
pending-masters title=3Dconcept-appcache-pending-masters>list of pendi=
ng master entries</a>.</li>
+
+    </ol><p>Otherwise, store the resource for this entry in =
<var title=3D"">new cache</var>, if it isn't
+    already there, and categorize its entry as a <a href=3D#concept-a=
ppcache-master title=3Dconcept-appcache-master>master
+    entry</a>.</p>
+
+   </li>
+
+   <li>
+
+    <p><a href=3D#fetch>Fetch</a><!--FETCH--> th=
e resource from <var title=3D"">manifest URL</var> =
again, with
+    the <i>synchronous flag</i> set, and let <var title=3D=
"">second manifest</var> be that resource.
+    HTTP caching semantics should again be honored for this request.<=
/p> <!-- http-origin privacy
+    sensitive, though it doesn't matter, since this can never be cross-o=
rigin -->
+
+    <p class=3Dnote>Since caching can be honored, authors are enco=
uraged to avoid setting the cache
+    headers on the manifest in such a way that the user agent would simp=
ly not contact the network
+    for this second request; otherwise, the user agent would not notice =
if the cache had changed
+    during the cache update process.</p>
+
+   </li>
+
+   <li>
+
+    <p>If the previous step failed for any reason, or if the fetch=
ing attempt involved a redirect,
+    or if <var title=3D"">second manifest</var> an=
d <var title=3D"">manifest</var> are not byte-for-b=
yte
+    identical, then schedule a rerun of the entire algorithm with the sa=
me parameters after a short
+    delay, and run the <a href=3D#cache-failure-steps>cache failur=
e steps</a>.</p>
+
+   </li>
+
+   <li>
+
+    <p>Otherwise, store <var title=3D"">manifest&l=
t;/var> in <var title=3D"">new cache</var>, if i=
t's not
+    there already, and categorize its entry as <a href=3D#concept-app=
cache-manifest title=3Dconcept-appcache-manifest>the
+    manifest</a>.</p>
+
+   </li>
+
+   <li><p>Set the <a href=3D#concept-appcache-completenes=
s title=3Dconcept-appcache-completeness>completeness flag</a> of=
 <var title=3D"">new cache</var> to <i>comple=
te</i>.</li>
+
+   <li><p>Let <var title=3D"">task list</=
var> be an empty list of <a href=3D#concept-task title=3Dconcept-ta=
sk>tasks</a>.</p>
+
+   <li>
+
+    <p>If this is a <a href=3D#concept-appcache-cache title=3Dc=
oncept-appcache-cache>cache attempt</a>, then for each
+    <a href=3D#cache-host>cache host</a> associated with an =
<a href=3D#application-cache>application cache</a> in <var=
 title=3D"">cache
+    group</var>, create a <a href=3D#concept-task title=3Dconce=
pt-task>task</a> to <a href=3D#fire-a-simple-event>fire a =
simple event</a>
+    that is cancelable named <code title=3Devent-appcache-cached>&=
lt;a href=3D#event-appcache-cached>cached</a></code> at th=
e
+    <code><a href=3D#applicationcache>ApplicationCache</a=
></code> singleton of the <a href=3D#cache-host>cache host=
</a>, and append it to <var title=3D"">task list&lt=
;/var>. The default action of these events must be, if the user agent
+    <a href=3D#shows-caching-progress>shows caching progress</a=
>, the display of some sort of user interface indicating to
+    the user that the application has been cached and that they can now =
use it offline.</p>
+
+    <p>Otherwise, it is an <a href=3D#concept-appcache-upgrade =
title=3Dconcept-appcache-upgrade>upgrade attempt</a>. For each
+    <a href=3D#cache-host>cache host</a> associated with an =
<a href=3D#application-cache>application cache</a> in <var=
 title=3D"">cache
+    group</var>, create a <a href=3D#concept-task title=3Dconce=
pt-task>task</a> to <a href=3D#fire-a-simple-event>fire a =
simple event</a>
+    that is cancelable named <code title=3Devent-appcache-updateready=
><a href=3D#event-appcache-updateready>updateready</a><=
/code> at the
+    <code><a href=3D#applicationcache>ApplicationCache</a=
></code> singleton of the <a href=3D#cache-host>cache host=
</a>, and append it to <var title=3D"">task list&lt=
;/var>. The default action of these events must be, if the user agent
+    <a href=3D#shows-caching-progress>shows caching progress</a=
>, the display of some sort of user interface indicating to
+    the user that a new version is available and that they can activate =
it by reloading the
+    page.</p>
+
+   </li>
+
+   <li><p>If appropriate, remove any user interface indicati=
ng that an update for this cache is in
+   progress.</li>
+
+   <li><p>Set the <a href=3D#concept-appcache-status titl=
e=3Dconcept-appcache-status>update status</a> of <var title=3D=
"">cache
+   group</var> to <i>idle</i>.</li>
+
+   <li><p>For each <a href=3D#concept-task title=3Dconcep=
t-task>task</a> in <var title=3D"">task list<=
/var>, <a href=3D#queue-a-post-load-task title=3D"queue a post=
-load task">queue that task as a post-load task</a>.</li=
>
+
+  </ol><p>The <dfn id=3Dcache-failure-steps>cache fail=
ure steps</dfn> are as follows:</p>
+
+  <ol><li><p>Let <var title=3D"">task =
list</var> be an empty list of <a href=3D#concept-task title=3Dc=
oncept-task>tasks</a>.</p>
+
+   <li>
+
+    <p>For each entry in <var title=3D"">cache gro=
up</var>'s <a href=3D#concept-appcache-pending-masters title=3Dc=
oncept-appcache-pending-masters>list of pending master entries</a&g=
t;, run the
+    following further substeps. These steps may be run in parallel for t=
wo or more entries at a
+    time.</p>
+
+    <ol><li><p>Wait for the resource for this entry to=
 have either completely downloaded or failed.</p>
+
+     <li><p>Unassociate the <code><a href=3D#docume=
nt>Document</a></code> for this entry from its <a href=3D=
#application-cache>application
+     cache</a>, if it has one.</li>
+
+     <li><p>Create a <a href=3D#concept-task title=3Dconc=
ept-task>task</a> to <a href=3D#fire-a-simple-event>fire a=
 simple event</a> that
+     is cancelable named <code title=3Devent-appcache-error><a =
href=3D#event-appcache-error>error</a></code> at the
+     <code><a href=3D#applicationcache>ApplicationCache</=
a></code> singleton of the <code><a href=3D#document&gt=
;Document</a></code> for this entry, if there
+     still is one, and append it to <var title=3D"">task=
 list</var>. The default action of these
+     events must be, if the user agent <a href=3D#shows-caching-progr=
ess>shows caching progress</a>, the display of some sort
+     of user interface indicating to the user that the user agent failed=
 to save the application for
+     offline use.</p>
+
+    </ol></li>
+
+   <li><p>For each <a href=3D#cache-host>cache host&lt=
;/a> still associated with an <a href=3D#application-cache>appli=
cation cache</a>
+   in <var title=3D"">cache group</var>, create a =
<a href=3D#concept-task title=3Dconcept-task>task</a> to <=
a href=3D#fire-a-simple-event>fire
+   a simple event</a> that is cancelable named <code title=3Dev=
ent-appcache-error><a href=3D#event-appcache-error>error</a&g=
t;</code> at
+   the <code><a href=3D#applicationcache>ApplicationCache&lt=
;/a></code> singleton of the <a href=3D#cache-host>cache h=
ost</a>, and append it to <var title=3D"">task list=
</var>. The default action of these events must be, if the user age=
nt
+   <a href=3D#shows-caching-progress>shows caching progress</a&=
gt;, the display of some sort of user interface indicating to the
+   user that the user agent failed to save the application for offline u=
se.</li>
+
+   <li><p>Empty <var title=3D"">cache group&=
lt;/var>'s <a href=3D#concept-appcache-pending-masters title=3Dconc=
ept-appcache-pending-masters>list of pending master entries</a>.=
</li>
+
+   <li><p>If <var title=3D"">cache group<=
/var> has an <a href=3D#application-cache>application cache</=
a> whose <a href=3D#concept-appcache-completeness title=3Dconcept-a=
ppcache-completeness>completeness flag</a> is <i>incomplet=
e</i>, then discard
+   that <a href=3D#application-cache>application cache</a>.&=
lt;/p>
+
+   <li><p>If appropriate, remove any user interface indicati=
ng that an update for this cache is in
+   progress.</li>
+
+   <li><p>Let the <a href=3D#concept-appcache-status titl=
e=3Dconcept-appcache-status>status</a> of <var title=3D"=
">cache
+   group</var> be <i>idle</i>.</li>
+
+   <li><p>If this was a <a href=3D#concept-appcache-cache=
 title=3Dconcept-appcache-cache>cache attempt</a>, discard <v=
ar title=3D"">cache group</var> altogether.</p>
+
+   <li><p>For each <a href=3D#concept-task title=3Dconcep=
t-task>task</a> in <var title=3D"">task list<=
/var>, <a href=3D#queue-a-post-load-task title=3D"queue a post=
-load task">queue that task as a post-load task</a>.</li=
>
+
+   <li><p>Abort the <a href=3D#application-cache-download=
-process>application cache download process</a>.</li>
+
+  </ol><p>Attempts to <a href=3D#fetch>fetch</a>=
 resources as part of the <a href=3D#application-cache-download-proces=
s>application cache download
+  process</a> may be done with cache-defeating semantics, to avoid=
 problems with stale or
+  inconsistent intermediary caches.</p>
+
+  <hr><p>User agents may invoke the <a href=3D#applicatio=
n-cache-download-process>application cache download process</a>,=
 in the background,
+  for any <a href=3D#application-cache-group>application cache gro=
up</a>, at any time (with no <a href=3D#cache-host>cache host=
</a>). This
+  allows user agents to keep caches primed and to update caches even bef=
ore the user visits a
+  site.</p>
+
+  <hr><p>Each <code><a href=3D#document>Document=
</a></code> has a list of <dfn id=3Dpending-application-ca=
che-download-process-tasks>pending application cache download process
+  tasks</dfn> that is used to delay events fired by the algorithm =
above until the document's <code title=3Devent-load>load</code&g=
t; event has fired. When the <code><a href=3D#document>Docume=
nt</a></code> is created, the
+  list must be empty.</p>
+
+  <p>When the steps above say to <dfn id=3Dqueue-a-post-load-ta=
sk>queue a post-load task</dfn> <var title=3D"">=
task</var>, where
+  <var title=3D"">task</var> is a <a href=3D#co=
ncept-task title=3Dconcept-task>task</a> that dispatches an even=
t on a
+  target <code><a href=3D#applicationcache>ApplicationCache&=
lt;/a></code> object <var title=3D"">target</=
var>, the user agent must run
+  the appropriate steps from the following list:</p>
+
+  <dl><dt>If <var title=3D"">target</var&=
gt;'s <code><a href=3D#document>Document</a></code&g=
t; is
+   <a href=3D#ready-for-post-load-tasks>ready for post-load tasks&=
lt;/a></dt>
+
+   <dd><p><a href=3D#queue-a-task title=3D"queue a t=
ask">Queue</a> the task <var title=3D"">tas=
k</var>.</dd>
+
+   <dt>Otherwise</dt>
+
+   <dd><p>Add <var title=3D"">task</var&g=
t; to <var title=3D"">target</var>'s <code>&l=
t;a href=3D#document>Document</a></code>'s list
+   of <a href=3D#pending-application-cache-download-process-tasks>=
pending application cache download process tasks</a>.</dd>
+
+  </dl><p>The <a href=3D#task-source>task source</a=
> for these <a href=3D#concept-task title=3Dconcept-task>tasks&l=
t;/a> is the
+  <a href=3D#networking-task-source>networking task source</a&g=
t;.</p>
+
+
+
+
+  <h4 id=3Dthe-application-cache-selection-algorithm><span clas=
s=3Dsecno>6.7.5 </span>The application cache selection algorithm=
</h4>
+
+  <p>When the <dfn id=3Dconcept-appcache-init title=3Dconcept-a=
ppcache-init>application cache selection algorithm</dfn>
+  algorithm is invoked with a <code><a href=3D#document>Docu=
ment</a></code> <var title=3D"">document</=
var> and optionally a
+  manifest <a href=3D#url>URL</a> <var title=3D"&quo=
t;>manifest URL</var>, the user agent must run the first
+  applicable set of steps from the following list:</p>
+
+  <dl class=3Dswitch><dt>If there is a <var title=3D&quot=
;">manifest URL</var>, and <var title=3D"">=
document</var> was loaded
+   from an <a href=3D#application-cache>application cache</a&gt=
;, and the URL of the <a href=3D#concept-appcache-manifest title=3Dcon=
cept-appcache-manifest>manifest</a> of that cache's <a href=3D=
#application-cache-group>application cache
+   group</a> is <em>not</em> the same as <var title=
=3D"">manifest URL</var></dt>
+
+   <dd>
+
+    <p>Mark the entry for the resource from which <var title=3D=
"">document</var> was taken in the
+    <a href=3D#application-cache>application cache</a> from =
which it was loaded as <a href=3D#concept-appcache-foreign title=3Dcon=
cept-appcache-foreign>foreign</a>.</p>
+
+    <p>Restart the current navigation from the top of the <a hr=
ef=3D#navigate title=3Dnavigate>navigation
+    algorithm</a>, undoing any changes that were made as part of t=
he initial load (changes can be
+    avoided by ensuring that the step to <a href=3D#update-the-sessio=
n-history-with-the-new-page>update the session history with the new pa=
ge</a>
+    is only ever completed <em>after</em> this <a href=3D=
#concept-appcache-init title=3Dconcept-appcache-init>application cache
+    selection algorithm</a> is run, though this is not required).&=
lt;/p>
+
+    <p class=3Dnote>The navigation will not result in the same res=
ource being loaded, because
+    "foreign" entries are never picked during navigation.</=
p>
+
+    <p>User agents may notify the user of the inconsistency betwee=
n the cache manifest and the
+    document's own metadata, to aid in application development.</p&gt=
;
+
+   </dd>
+
+
+   <dt>If <var title=3D"">document</var> was=
 loaded from an <a href=3D#application-cache>application cache</=
a>, and that
+   <a href=3D#application-cache>application cache</a> still =
exists (it is not now <a href=3D#concept-appcache-obsolete title=3Dcon=
cept-appcache-obsolete>obsolete</a>)<!--[redundant], and eith=
er there is no <var
+   title=3D"">manifest URL</var>, or the URL of the &=
lt;span
+   title=3D"concept-appcache-manifest">manifest</span&gt=
; of the cache's <span>application cache
+   group</span> is the same as <var title=3D"">man=
ifest URL</var>--></dt>
+
+   <dd>
+
+    <p>Associate <var title=3D"">document</var&=
gt; with the <a href=3D#application-cache>application cache</a&g=
t; from which it
+    was loaded. Invoke, in the background, the <a href=3D#application=
-cache-download-process>application cache download process</a> f=
or
+    that <a href=3D#application-cache>application cache</a>'=
s <a href=3D#application-cache-group>application cache group</a&=
gt;, with <var title=3D"">document</var> as the &lt=
;a href=3D#cache-host>cache host</a>.</p>
+
+   </dd>
+
+
+   <dt>If <var title=3D"">document</var> &lt=
;!--[redundant] was not loaded from an <span>application
+   cache</span>, but it--> was loaded using HTTP GET <a href=
=3D#concept-http-equivalent-get title=3Dconcept-http-equivalent-get>or
+   equivalent</a>, and, there is a <var title=3D""&gt=
;manifest URL</var>, and <var title=3D"">manifest
+   URL</var> has the <a href=3D#same-origin>same origin</=
a> as <var title=3D"">document</var></dt>
+
+   <dd>
+
+    <p>Invoke, in the background, the <a href=3D#application-ca=
che-download-process>application cache download process</a> for =
<var title=3D"">manifest URL</var>, with <var ti=
tle=3D"">document</var> as the <a href=3D#cache-hos=
t>cache host</a>
+    and with the resource from which <var title=3D"">doc=
ument</var> was parsed as the <a href=3D#concept-appcache-master=
 title=3Dconcept-appcache-master>master</a> resource.</p>
+
+    <p>If there are <a href=3D#relevant-application-cache title=
=3D"relevant application cache">relevant application caches&=
lt;/a> that
+    are identified by a URL with the <a href=3D#same-origin>same o=
rigin</a> as the URL of <var title=3D"">document&lt=
;/var>, and that have this URL as one of their entries, excluding entr=
ies
+    marked as <a href=3D#concept-appcache-foreign title=3Dconcept-app=
cache-foreign>foreign</a>, then the user agent should use
+    the <a href=3D#concept-appcache-selection title=3Dconcept-appcach=
e-selection>most appropriate application cache</a> of those
+    that match as an HTTP cache for any subresource loads. User agents m=
ay also have other caches in
+    place that are also honored.</p>
+
+   </dd>
+
+
+   <dt>Otherwise</dt> <!-- not from cache and either no &=
lt;var title=3D"">manifest URL</var>, or
+   non-GET, or wrong-origin manifest -->
+
+   <dd>
+
+    <p>The <code><a href=3D#document>Document</a&gt=
;</code> is not associated with any <a href=3D#application-cache=
>application cache</a>.</p>
+
+    <p>If there was a <var title=3D"">manifest URL=
</var>, the user agent may report to the user that
+    it was ignored, to aid in application development.</p>
+
+   </dd>
+
+  </dl><h4 id=3DchangesToNetworkingModel><span class=3Dse=
cno>6.7.6 </span>Changes to the networking model</h4>
+
+  <p>When a <a href=3D#cache-host>cache host</a> is as=
sociated with an <a href=3D#application-cache>application cache<=
/a> whose <a href=3D#concept-appcache-completeness title=3Dconcept-=
appcache-completeness>completeness flag</a> is <i>complete=
</i>, any and all
+  loads for resources related to that <a href=3D#cache-host>cache =
host</a> other than those for <a href=3D#child-browsing-context =
title=3D"child browsing context">child browsing contexts<=
/a> must go through the following steps
+  instead of immediately invoking the mechanisms appropriate to that res=
ource's scheme:</p>
+
+  <ol><!--FETCH--><li><p>If the resource is not =
to be fetched using the HTTP GET mechanism <a href=3D#concept-http-equ=
ivalent-get title=3Dconcept-http-equivalent-get>or equivalent</a&gt=
;, or if applying the <a href=3D#url-parser>URL
+   parser</a> algorithm to both its <a href=3D#url>URL</a=
> and the <a href=3D#application-cache>application cache</a&g=
t;'s
+   <a href=3D#concept-appcache-manifest title=3Dconcept-appcache-mani=
fest>manifest</a>'s URL results in two <a href=3D#parsed-url =
title=3D"parsed
+   URL">parsed URLs</a> with different <a href=3D#conce=
pt-url-scheme title=3Dconcept-url-scheme>scheme</a> components,
+   then <a href=3D#fetch>fetch</a> the resource normally and=
 abort these steps.</li>
+
+   <li><p>If the resource's URL is <a href=3D#concept-app=
cache-master title=3Dconcept-appcache-master>a master entry</a>,
+   <a href=3D#concept-appcache-manifest title=3Dconcept-appcache-mani=
fest>the manifest</a>, <a href=3D#concept-appcache-explicit t=
itle=3Dconcept-appcache-explicit>an explicit entry</a>, or <a=
 href=3D#concept-appcache-fallback title=3Dconcept-appcache-fallback>a=
 fallback entry</a> in the <a href=3D#application-cache>appli=
cation cache</a>,
+   then get the resource from the cache (instead of fetching it), and ab=
ort these steps.</li>
+
+   <li><p>If there is an entry in the <a href=3D#applicat=
ion-cache>application cache</a>'s <a href=3D#concept-appcache=
-onlinewhitelist title=3Dconcept-appcache-onlinewhitelist>online white=
list</a> that has the <a href=3D#same-origin>same
+   origin</a> as the resource's URL and that is a <a href=3D#pr=
efix-match>prefix match</a> for the resource's
+   URL, then <a href=3D#fetch>fetch</a> the resource normall=
y and abort these steps.</li>
+
+   <li>
+
+    <p>If the resource's URL has the <a href=3D#same-origin>=
same origin</a> as the manifest's URL, and there is a
+    <a href=3D#concept-appcache-fallback-ns title=3Dconcept-appcache-=
fallback-ns>fallback namespace</a> <var title=3D""&=
gt;f</var> in
+    the <a href=3D#application-cache>application cache</a> t=
hat is a <a href=3D#prefix-match>prefix match</a> for the res=
ource's URL,
+    then:</p>
+
+    <p><a href=3D#fetch>Fetch</a> the resource normall=
y. If this results in a redirect to a resource with
+    another <a href=3D#origin>origin</a> (indicative of a ca=
ptive portal), or a 4xx or 5xx status code <a href=3D#concept-http-equ=
ivalent-codes title=3Dconcept-http-equivalent-codes>or equivalent</=
a>, or if there were network errors (but
+    not if the user canceled the download), then instead get, from the c=
ache, the resource of the
+    <a href=3D#concept-appcache-fallback title=3Dconcept-appcache-fal=
lback>fallback entry</a> corresponding to the <a href=3D#conc=
ept-appcache-fallback-ns title=3Dconcept-appcache-fallback-ns>fallback=
 namespace</a> <var title=3D"">f</var>. Abort
+    these steps.</p>
+
+   </li>
+
+   <li><p>If the <a href=3D#application-cache>applicat=
ion cache</a>'s <a href=3D#concept-appcache-onlinewhitelist-wild=
card title=3Dconcept-appcache-onlinewhitelist-wildcard>online whitelis=
t wildcard flag</a> is <i title=3D"">open</i>=
, then <a href=3D#fetch>fetch</a> the resource normally and a=
bort these steps.</li>
+
+   <li><p>Fail the resource load as if there had been a gene=
ric network error.</li>
+
+  </ol><p class=3Dnote>The above algorithm ensures that so l=
ong as the <a href=3D#concept-appcache-onlinewhitelist-wildcard title=3D=
concept-appcache-onlinewhitelist-wildcard>online whitelist wildcard fl=
ag</a> is <i title=3D"">blocking</i>, resourc=
es that are not present in the <a href=3D#concept-appcache-manifest ti=
tle=3Dconcept-appcache-manifest>manifest</a> will always fail to=
 load (at least, after the
+  <a href=3D#application-cache>application cache</a> has bee=
n primed the first time), making the testing of offline
+  applications simpler.</p>
+
+  </div>
+
+
+  <div class=3Dimpl>
+
+  <h4 id=3Dexpiring-application-caches><span class=3Dsecno>6=
.7.7 </span>Expiring application caches</h4>
+
+  <p>As a general rule, user agents should not expire application =
caches, except on request from the
+  user, or after having been left unused for an extended period of time.=
</p>
+
+  <p>Application caches and cookies have similar implications with=
 respect to privacy (e.g. if the
+  site can identify the user when providing the cache, it can store data=
 in the cache that can be
+  used for cookie resurrection). Implementors are therefore encouraged t=
o expose application caches
+  in a manner related to HTTP cookies, allowing caches to be expunged to=
gether with cookies and
+  other origin-specific data.</p>
+
+  <p class=3Dexample>For example, a user agent could have a "=
delete site-specific data" feature that
+  clears all cookies, application caches, local storage, databases, etc,=
 from an origin all at
+  once.</p>
+
+  </div>
+
+
+  <div class=3Dimpl>
+
+  <h4 id=3Ddisk-space><span class=3Dsecno>6.7.8 </span&gt=
;Disk space</h4>
+
+  <p>User agents should consider applying constraints on disk usag=
e of <a href=3D#application-cache title=3D"application
+  cache">application caches</a>, and care should be taken =
to ensure that the restrictions cannot
+  be easily worked around using subdomains.</p>
+
+  <p>User agents should allow users to see how much space each dom=
ain is using, and may offer the
+  user the ability to delete specific <a href=3D#application-cache ti=
tle=3D"application cache">application caches</a>.</=
p>
+
+  <p>For predictability, quotas should be based on the uncompresse=
d size of data stored.</p>
+  <!-- see https://www.w3.org/Bugs/Public/show_bug.cgi?id=3D21319#c3 =
-->
+
+  <p class=3Dnote>How quotas are presented to the user is not defi=
ned by this specification. User
+  agents are encouraged to provide features such as allowing a user to i=
ndicate that certain sites
+  are trusted to use more than the default quota, e.g. by asynchronously=
 presenting a user interface
+  while a cache is being updated, or by having an explicit whitelist in =
the user agent's
+  configuration interface.</p>
+
+  </div>
+
+
+
+  <h4 id=3Dapplication-cache-api><span class=3Dsecno>6.7.9 &=
lt;/span>Application cache API</h4>
+
+  <pre class=3Didl>interface <dfn id=3Dapplicationcache>Appl=
icationCache</dfn> : <a href=3D#eventtarget>EventTarget</a=
> {
+
+  // <a href=3D#concept-appcache-status title=3Dconcept-appcache-stat=
us>update status</a>
+  const unsigned short <a href=3D#dom-appcache-uncached title=3Ddom-a=
ppcache-UNCACHED>UNCACHED</a> =3D 0;
+  const unsigned short <a href=3D#dom-appcache-idle title=3Ddom-appca=
che-IDLE>IDLE</a> =3D 1;
+  const unsigned short <a href=3D#dom-appcache-checking title=3Ddom-a=
ppcache-CHECKING>CHECKING</a> =3D 2;
+  const unsigned short <a href=3D#dom-appcache-downloading title=3Ddo=
m-appcache-DOWNLOADING>DOWNLOADING</a> =3D 3;
+  const unsigned short <a href=3D#dom-appcache-updateready title=3Ddo=
m-appcache-UPDATEREADY>UPDATEREADY</a> =3D 4;
+  const unsigned short <a href=3D#dom-appcache-obsolete title=3Ddom-a=
ppcache-OBSOLETE>OBSOLETE</a> =3D 5;
+  readonly attribute unsigned short <a href=3D#dom-appcache-status ti=
tle=3Ddom-appcache-status>status</a>;
+
+  // updates
+  void <a href=3D#dom-appcache-update title=3Ddom-appcache-update>=
update</a>();
+  void <a href=3D#dom-appcache-abort title=3Ddom-appcache-abort>ab=
ort</a>();
+  void <a href=3D#dom-appcache-swapcache title=3Ddom-appcache-swapCac=
he>swapCache</a>();
+
+  // events
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-appcache-onchecking title=3Dhandler-appcache-onch=
ecking>onchecking</a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-appcache-onerror title=3Dhandler-appcache-onerror=
>onerror</a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-appcache-onnoupdate title=3Dhandler-appcache-onno=
update>onnoupdate</a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-appcache-ondownloading title=3Dhandler-appcache-o=
ndownloading>ondownloading</a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-appcache-onprogress title=3Dhandler-appcache-onpr=
ogress>onprogress</a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-appcache-onupdateready title=3Dhandler-appcache-o=
nupdateready>onupdateready</a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-appcache-oncached title=3Dhandler-appcache-oncach=
ed>oncached</a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-appcache-onobsolete title=3Dhandler-appcache-onob=
solete>onobsolete</a>;
+};</pre>
+
+  <dl class=3Ddomintro><dt><var title=3D"">c=
ache</var> =3D <var title=3D"">window</var> .=
 <code title=3Ddom-applicationCache><a href=3D#dom-applicationca=
che>applicationCache</a></code></dt>
+   <dd>
+
+    <p>(In a window.) Returns the <code><a href=3D#applic=
ationcache>ApplicationCache</a></code> object that applies=
 to the
+    <a href=3D#active-document>active document</a> of that &=
lt;code><a href=3D#window>Window</a></code>.</p&g=
t;
+
+   </dd>
+
+   <dt><var title=3D"">cache</var> =3D <v=
ar title=3D"">self</var> . <code title=3Ddom-applic=
ationCache><a href=3D#dom-applicationcache>applicationCache</=
a></code></dt> <dd>
+
+    <p>(In a shared worker.) Returns the <code><a href=3D=
#applicationcache>ApplicationCache</a></code> object that =
applies to the
+    current shared worker.</p>
+
+   </dd>
+
+   <dt><var title=3D"">cache</var> . <cod=
e title=3Ddom-appcache-status><a href=3D#dom-appcache-status>sta=
tus</a></code></dt>
+   <dd>
+
+    <p>Returns the current status of the application cache, as giv=
en by the constants defined
+    below.</p>
+
+   </dd>
+
+   <dt><var title=3D"">cache</var> . <cod=
e title=3Ddom-appcache-update><a href=3D#dom-appcache-update>upd=
ate</a></code>()</dt>
+   <dd>
+
+    <p>Invokes the <a href=3D#application-cache-download-proces=
s>application cache download process</a>.</p>
+
+    <p>Throws an <code><a href=3D#invalidstateerror>In=
validStateError</a></code> exception if there is no applicati=
on cache to
+    update.</p>
+
+    <p>Calling this method is not usually necessary, as user agent=
s will generally take care of
+    updating <a href=3D#application-cache title=3D"application c=
ache">application caches</a> automatically.</p>
+
+    <p>The method can be useful in situations such as long-lived a=
pplications. For example, a Web
+    mail application might stay open in a browser tab for weeks at a tim=
e. Such an application could
+    want to test for updates each day.</p>
+
+   </dd>
+
+   <dt><var title=3D"">cache</var> . <cod=
e title=3Ddom-appcache-abort><a href=3D#dom-appcache-abort>abort=
</a></code>()</dt>
+   <dd>
+
+    <p>Cancels the <a href=3D#application-cache-download-proces=
s>application cache download process</a>.</p>
+
+    <p>This method is intended to be used by Web application showi=
ng their own caching progress UI,
+    in case the user wants to stop the update (e.g. because bandwidth is=
 limited).</p>
+
+   </dd>
+
+   <dt><var title=3D"">cache</var> . <cod=
e title=3Ddom-appcache-swapCache><a href=3D#dom-appcache-swapcache&=
gt;swapCache</a></code>()</dt>
+   <dd>
+
+    <p>Switches to the most recent application cache, if there is =
a newer one. If there isn't,
+    throws an <code><a href=3D#invalidstateerror>InvalidStat=
eError</a></code> exception.</p>
+
+    <p>This does not cause previously-loaded resources to be reloa=
ded; for example, images do not
+    suddenly get reloaded and style sheets and scripts do not get repars=
ed or reevaluated. The only
+    change is that subsequent requests for cached resources will obtain =
the newer copies.</p>
+
+    <p>The <code title=3Devent-appcache-updateready><a hr=
ef=3D#event-appcache-updateready>updateready</a></code> ev=
ent will fire before this
+    method can be called. Once it fires, the Web application can, at its=
 leisure, call this method
+    to switch the underlying cache to the one with the more recent updat=
es. To make proper use of
+    this, applications have to be able to bring the new features into pl=
ay; for example, reloading
+    scripts to enable new features.</p>
+
+    <p>An easier alternative to <code title=3Ddom-appcache-swap=
Cache><a href=3D#dom-appcache-swapcache>swapCache()</a>&lt=
;/code> is just to
+    reload the entire page at a time suitable for the user, using <co=
de title=3Ddom-location-reload><a href=3D#dom-location-reload>lo=
cation.reload()</a></code>.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>There is a one-to-one mapping from <a href=3D#cache-host t=
itle=3D"cache host">cache hosts</a> to
+  <code><a href=3D#applicationcache>ApplicationCache</a&g=
t;</code> objects. The <dfn id=3Ddom-applicationcache title=3Ddo=
m-applicationCache><code>applicationCache</code></dfn&g=
t; attribute on <code><a href=3D#window>Window</a></=
code>
+  objects must return the <code><a href=3D#applicationcache>=
ApplicationCache</a></code> object associated with the
+  <code><a href=3D#window>Window</a></code> obje=
ct's <a href=3D#active-document>active document</a>. The <=
dfn id=3Ddom-sharedworkerglobalscope-applicationcache title=3Ddom-SharedW=
orkerGlobalScope-applicationCache><code>applicationCache</cod=
e></dfn> attribute
+  on <code><a href=3D#sharedworkerglobalscope>SharedWorkerGl=
obalScope</a></code> objects must return the <code><=
a href=3D#applicationcache>ApplicationCache</a></code>
+  object associated with the worker.</p>
+
+  <p class=3Dnote>A <code><a href=3D#window>Window<=
/a></code> or <code><a href=3D#sharedworkerglobalscope&=
gt;SharedWorkerGlobalScope</a></code> object has an
+  associated <code><a href=3D#applicationcache>ApplicationCa=
che</a></code> object even if that <a href=3D#cache-host&g=
t;cache host</a> has no actual
+  <a href=3D#application-cache>application cache</a>.</p&=
gt;
+
+  <hr><p>The <dfn id=3Ddom-appcache-status title=3Ddom-ap=
pcache-status><code>status</code></dfn> attribute, o=
n getting, must
+  return the current state of the <a href=3D#application-cache>app=
lication cache</a> that the
+  <code><a href=3D#applicationcache>ApplicationCache</a&g=
t;</code> object's <a href=3D#cache-host>cache host</a>=
 is associated with, if any. This
+  must be the appropriate value from the following list:</p>
+
+  </div>
+
+  <dl><dt><dfn id=3Ddom-appcache-uncached title=3Ddom-app=
cache-UNCACHED><code>UNCACHED</code></dfn> (numeric =
value 0)</dt>
+
+   <dd><p>The <code><a href=3D#applicationcache>=
ApplicationCache</a></code> object's <a href=3D#cache-host=
>cache host</a> is not associated with
+   an <a href=3D#application-cache>application cache</a> at =
this time.</dd>
+
+   <dt><dfn id=3Ddom-appcache-idle title=3Ddom-appcache-IDLE&gt=
;<code>IDLE</code></dfn> (numeric value 1)</dt>
+
+   <dd><p>The <code><a href=3D#applicationcache>=
ApplicationCache</a></code> object's <a href=3D#cache-host=
>cache host</a> is associated with an
+   <a href=3D#application-cache>application cache</a> whose =
<a href=3D#application-cache-group>application cache group</a&gt=
;'s <a href=3D#concept-appcache-status title=3Dconcept-appcache-status=
>update status</a> is <i>idle</i>, and that <a hr=
ef=3D#application-cache>application
+   cache</a> is the <a href=3D#concept-appcache-newer title=3Dc=
oncept-appcache-newer>newest</a> cache in its
+   <a href=3D#application-cache-group>application cache group</=
a>, and the <a href=3D#application-cache-group>application cache=
 group</a> is not marked
+   as <a href=3D#concept-appcache-obsolete title=3Dconcept-appcache-o=
bsolete>obsolete</a>.</dd>
+
+   <dt><dfn id=3Ddom-appcache-checking title=3Ddom-appcache-CHE=
CKING><code>CHECKING</code></dfn> (numeric value 2)&=
lt;/dt>
+
+   <dd><p>The <code><a href=3D#applicationcache>=
ApplicationCache</a></code> object's <a href=3D#cache-host=
>cache host</a> is associated with an
+   <a href=3D#application-cache>application cache</a> whose =
<a href=3D#application-cache-group>application cache group</a&gt=
;'s <a href=3D#concept-appcache-status title=3Dconcept-appcache-status=
>update status</a> is <i>checking</i>.</dd>
+
+   <dt><dfn id=3Ddom-appcache-downloading title=3Ddom-appcache-=
DOWNLOADING><code>DOWNLOADING</code></dfn> (numeric =
value 3)</dt>
+
+   <dd><p>The <code><a href=3D#applicationcache>=
ApplicationCache</a></code> object's <a href=3D#cache-host=
>cache host</a> is associated with an
+   <a href=3D#application-cache>application cache</a> whose =
<a href=3D#application-cache-group>application cache group</a&gt=
;'s <a href=3D#concept-appcache-status title=3Dconcept-appcache-status=
>update status</a> is <i>downloading</i>.</dd>
+
+   <dt><dfn id=3Ddom-appcache-updateready title=3Ddom-appcache-=
UPDATEREADY><code>UPDATEREADY</code></dfn> (numeric =
value 4)</dt>
+
+   <dd><p>The <code><a href=3D#applicationcache>=
ApplicationCache</a></code> object's <a href=3D#cache-host=
>cache host</a> is associated with an
+   <a href=3D#application-cache>application cache</a> whose =
<a href=3D#application-cache-group>application cache group</a&gt=
;'s <a href=3D#concept-appcache-status title=3Dconcept-appcache-status=
>update status</a> is <i>idle</i>, and whose <a h=
ref=3D#application-cache-group>application
+   cache group</a> is not marked as <a href=3D#concept-appcache=
-obsolete title=3Dconcept-appcache-obsolete>obsolete</a>, but
+   that <a href=3D#application-cache>application cache</a> i=
s <em>not</em> the <a href=3D#concept-appcache-newer title=
=3Dconcept-appcache-newer>newest</a> cache in its group.</dd&=
gt;
+
+   <dt><dfn id=3Ddom-appcache-obsolete title=3Ddom-appcache-OBS=
OLETE><code>OBSOLETE</code></dfn> (numeric value 5)&=
lt;/dt>
+
+   <dd><p>The <code><a href=3D#applicationcache>=
ApplicationCache</a></code> object's <a href=3D#cache-host=
>cache host</a> is associated with an
+   <a href=3D#application-cache>application cache</a> whose =
<a href=3D#application-cache-group>application cache group</a&gt=
; is marked as <a href=3D#concept-appcache-obsolete title=3Dconcept-ap=
pcache-obsolete>obsolete</a>.</dd>
+
+  </dl><div class=3Dimpl>
+
+  <hr><p>If the <dfn id=3Ddom-appcache-update title=3Ddom=
-appcache-update><code>update()</code></dfn> method =
is invoked, the user
+  agent must invoke the <a href=3D#application-cache-download-process=
>application cache download process</a>, in the background, for =
the
+  <a href=3D#application-cache-group>application cache group</a=
> of the <a href=3D#application-cache>application cache</a&gt=
; with which the
+  <code><a href=3D#applicationcache>ApplicationCache</a&g=
t;</code> object's <a href=3D#cache-host>cache host</a>=
 is associated, but without giving
+  that <a href=3D#cache-host>cache host</a> to the algorithm=
. If there is no such <a href=3D#application-cache>application cach=
e</a>,
+  or if its <a href=3D#application-cache-group>application cache g=
roup</a> is marked as <a href=3D#concept-appcache-obsolete title=
=3Dconcept-appcache-obsolete>obsolete</a>, then the method must =
throw an
+  <code><a href=3D#invalidstateerror>InvalidStateError</a=
></code> exception instead.</p>
+
+  <p>If the <dfn id=3Ddom-appcache-abort title=3Ddom-appcache-a=
bort><code>abort()</code></dfn> method is invoked, t=
he user
+  agent must <dfn id=3Dsend-a-signal>send a signal</dfn> to =
the current <a href=3D#application-cache-download-process>applicati=
on cache download process</a>
+  for the <a href=3D#application-cache-group>application cache gro=
up</a> of the <a href=3D#application-cache>application cache&=
lt;/a> with which the
+  <code><a href=3D#applicationcache>ApplicationCache</a&g=
t;</code> object's <a href=3D#cache-host>cache host</a>=
 is associated, if any. If there is
+  no such <a href=3D#application-cache>application cache</a>=
, or it does not have a current <a href=3D#application-cache-download-=
process>application cache
+  download process</a>, then do nothing.</p>
+
+  <p>If the <dfn id=3Ddom-appcache-swapcache title=3Ddom-appcac=
he-swapCache><code>swapCache()</code></dfn> method i=
s invoked,
+  the user agent must run the following steps:
+
+  <ol><li><p>Check that <code><a href=3D#appl=
icationcache>ApplicationCache</a></code> object's <a hr=
ef=3D#cache-host>cache host</a> is associated
+   with an <a href=3D#application-cache>application cache</a&gt=
;. If it is not, then throw an
+   <code><a href=3D#invalidstateerror>InvalidStateError</=
a></code> exception and abort these steps.</li>
+
+   <li><p>Let <var title=3D"">cache</var&=
gt; be the <a href=3D#application-cache>application cache</a>=
 with which the
+   <code><a href=3D#applicationcache>ApplicationCache</a&=
gt;</code> object's <a href=3D#cache-host>cache host</a&gt=
; is associated. (By definition,
+   this is the same as the one that was found in the previous step.)<=
/li>
+
+   <li><p>If <var title=3D"">cache</var&g=
t;'s <a href=3D#application-cache-group>application cache group<=
/a> is marked as <a href=3D#concept-appcache-obsolete title=3Dconce=
pt-appcache-obsolete>obsolete</a>, then unassociate the
+   <code><a href=3D#applicationcache>ApplicationCache</a&=
gt;</code> object's <a href=3D#cache-host>cache host</a&gt=
; from <var title=3D"">cache</var> and
+   abort these steps. (Resources will now load from the network instead =
of the cache.)</li>
+
+   <li><p>Check that there is an application cache in the sa=
me <a href=3D#application-cache-group>application cache group</a=
>
+   as <var title=3D"">cache</var> whose <a href=
=3D#concept-appcache-completeness title=3Dconcept-appcache-completeness&g=
t;completeness
+   flag</a> is <i>complete</i> and that is <a href=3D=
#concept-appcache-newer title=3Dconcept-appcache-newer>newer</a>=
 than
+   <var title=3D"">cache</var>. If there is not, t=
hen throw an <code><a href=3D#invalidstateerror>InvalidStateE=
rror</a></code>
+   exception and abort these steps.</li>
+
+   <li><p>Let <var title=3D"">new cache</=
var> be the <a href=3D#concept-appcache-newer title=3Dconcept-appca=
che-newer>newest</a> <a href=3D#application-cache>applicat=
ion cache</a> in the same
+   <a href=3D#application-cache-group>application cache group</=
a> as <var title=3D"">cache</var> whose <a hr=
ef=3D#concept-appcache-completeness title=3Dconcept-appcache-completeness=
>completeness flag</a> is <i>complete</i>.</li&gt=
;
+
+   <li><p>Unassociate the <code><a href=3D#applicat=
ioncache>ApplicationCache</a></code> object's <a href=3D=
#cache-host>cache host</a> from <var title=3D"">=
cache</var> and instead associate it with <var title=3D"&qu=
ot;>new cache</var>.</li>
+
+  </ol><p>The following are the <a href=3D#event-handlers=
>event handlers</a> (and their corresponding <a href=3D#event=
-handler-event-type title=3D"event
+  handler event type">event handler event types</a>) <s=
pan class=3Dimpl>that must be</span>
+  supported, as <a href=3D#event-handler-idl-attributes>event hand=
ler IDL attributes</a>, by all objects implementing the
+  <code><a href=3D#applicationcache>ApplicationCache</a&g=
t;</code> interface:</p>
+
+  <table><thead><tr><th><a href=3D#event-hand=
lers title=3D"event handlers">Event handler</a> <th=
><a href=3D#event-handler-event-type>Event handler event type&lt=
;/a>
+   <tbody><tr><td><dfn id=3Dhandler-appcache-onchec=
king title=3Dhandler-appcache-onchecking><code>onchecking</co=
de></dfn> <td> <code title=3Devent-appcache-checking&gt=
;<a href=3D#event-appcache-checking>checking</a></code>
+    <tr><td><dfn id=3Dhandler-appcache-onerror title=3Dha=
ndler-appcache-onerror><code>onerror</code></dfn> &l=
t;td> <code title=3Devent-appcache-error><a href=3D#event-app=
cache-error>error</a></code>
+    <tr><td><dfn id=3Dhandler-appcache-onnoupdate title=3D=
handler-appcache-onnoupdate><code>onnoupdate</code></df=
n> <td> <code title=3Devent-appcache-noupdate><a href=3D=
#event-appcache-noupdate>noupdate</a></code>
+    <tr><td><dfn id=3Dhandler-appcache-ondownloading titl=
e=3Dhandler-appcache-ondownloading><code>ondownloading</code&=
gt;</dfn> <td> <code title=3Devent-appcache-downloading&gt=
;<a href=3D#event-appcache-downloading>downloading</a></co=
de>
+    <tr><td><dfn id=3Dhandler-appcache-onprogress title=3D=
handler-appcache-onprogress><code>onprogress</code></df=
n> <td> <code title=3Devent-appcache-progress><a href=3D=
#event-appcache-progress>progress</a></code>
+    <tr><td><dfn id=3Dhandler-appcache-onupdateready titl=
e=3Dhandler-appcache-onupdateready><code>onupdateready</code&=
gt;</dfn> <td> <code title=3Devent-appcache-updateready&gt=
;<a href=3D#event-appcache-updateready>updateready</a></co=
de>
+    <tr><td><dfn id=3Dhandler-appcache-oncached title=3Dh=
andler-appcache-oncached><code>oncached</code></dfn>=
 <td> <code title=3Devent-appcache-cached><a href=3D#event=
-appcache-cached>cached</a></code>
+    <tr><td><dfn id=3Dhandler-appcache-onobsolete title=3D=
handler-appcache-onobsolete><code>onobsolete</code></df=
n> <td> <code title=3Devent-appcache-obsolete><a href=3D=
#event-appcache-obsolete>obsolete</a></code>
+  </table></div>
+
+
+  <h4 id=3Dbrowser-state><span class=3Dsecno>6.7.10 </spa=
n>Browser state</h4>
+
+  <pre class=3Didl>[NoInterfaceObject]
+interface <dfn id=3Dnavigatoronline>NavigatorOnLine</dfn> {
+  readonly attribute boolean <a href=3D#dom-navigator-online title=3D=
dom-navigator-onLine>onLine</a>;
+};</pre>
+
+  <dl class=3Ddomintro><dt><var title=3D"">w=
indow</var> . <code title=3Ddom-navigator><a href=3D#dom-n=
avigator>navigator</a></code> . <code title=3Ddom-navig=
ator-onLine><a href=3D#dom-navigator-online>onLine</a><=
/code></dt>
+
+   <dd>
+
+    <p>Returns false if the user agent is definitely offline (disc=
onnected from the network).
+    Returns true if the user agent might be online.</p>
+
+    <p>The events <code title=3Devent-online><a href=3D#e=
vent-online>online</a></code> and <code title=3Devent-o=
ffline><a href=3D#event-offline>offline</a></code> a=
re fired when the value of this attribute changes.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-navigator-online title=3Ddom-navigator-o=
nLine><code>navigator.onLine</code></dfn> attribute =
must return
+  false if the user agent will not contact the network when the user fol=
lows links or when a script
+  requests a remote page (or knows that such an attempt would fail), and=
 must return true
+  otherwise.</p>
+
+  <p>When the value that would be returned by the <code title=3D=
dom-navigator-onLine><a href=3D#dom-navigator-online>navigator.o=
nLine</a></code> attribute of a <code><a href=3D#win=
dow>Window</a></code> or
+  <code><a href=3D#workerglobalscope>WorkerGlobalScope</a=
></code> changes from true to false, the user agent must <a h=
ref=3D#queue-a-task>queue a
+  task</a> to <a href=3D#fire-a-simple-event>fire a simple e=
vent</a> named <dfn id=3Devent-offline title=3Devent-offline>=
<code>offline</code></dfn> at the <code><a hre=
f=3D#window>Window</a></code> or
+  <code><a href=3D#workerglobalscope>WorkerGlobalScope</a=
></code> object.</p>
+
+  <p>On the other hand, when the value that would be returned by t=
he <code title=3Ddom-navigator-onLine><a href=3D#dom-navigator-o=
nline>navigator.onLine</a></code> attribute of a <code&=
gt;<a href=3D#window>Window</a></code> or
+  <code><a href=3D#workerglobalscope>WorkerGlobalScope</a=
></code> changes from false to true, the user agent must <a h=
ref=3D#queue-a-task>queue a
+  task</a> to <a href=3D#fire-a-simple-event>fire a simple e=
vent</a> named <dfn id=3Devent-online title=3Devent-online>&l=
t;code>online</code></dfn> at the <code><a href=3D=
#window>Window</a></code> or
+  <code><a href=3D#workerglobalscope>WorkerGlobalScope</a=
></code> object.</p>
+
+  <p>The <a href=3D#task-source>task source</a> for th=
ese <a href=3D#concept-task title=3Dconcept-task>tasks</a> is=
 the
+  <a href=3D#networking-task-source>networking task source</a&g=
t;.</p>
+
+  </div>
+
+  <p class=3Dnote>This attribute is inherently unreliable. A compu=
ter can be connected to a network
+  without having Internet access.</p>
+
+  <div class=3Dexample>
+
+   <p>In this example, an indicator is updated as the browser goes=
 online and offline.</p>
+
+   <pre><!DOCTYPE HTML>
+<html>
+ <head>
+  <title>Online status</title>
+  <script>
+   function updateIndicator() {
+     document.getElementById('indicator').textContent =3D navigator.onLi=
ne ? 'online' : 'offline';
+   }
+  </script>
+ </head>
+ <body onload=3D"updateIndicator()" ononline=3D"up=
dateIndicator()" onoffline=3D"updateIndicator()">
+  <p>The network is: <span id=3D"indicator&quo=
t;>(state unknown)</span>
+ </body>
+</html></pre>
+
+  </div>
+
+<!--TOPIC:DOM APIs-->
+
+  <h2 id=3Dwebappapis><span class=3Dsecno>7 </span>Web=
 application APIs</h2>
+
+  <h3 id=3Dscripting><span class=3Dsecno>7.1 </span>Sc=
ripting</h3>
+
+  <h4 id=3Dintroduction-6><span class=3Dsecno>7.1.1 </spa=
n>Introduction</h4>
+
+  <p>Various mechanisms can cause author-provided executable code =
to run in the context of a
+  document. These mechanisms include, but are probably not limited to:&l=
t;/p>
+
+  <ul><li>Processing of <code><a href=3D#the-script=
-element>script</a></code> elements.</li>
+
+   <li>Processing of inline <code title=3D"javascript prot=
ocol"><a href=3D#javascript-protocol>javascript:</a>&=
lt;/code> URLs (e.g. the
+   <code title=3Dattr-img-src><a href=3D#attr-img-src>src&lt=
;/a></code> attribute of <code><a href=3D#the-img-eleme=
nt>img</a></code> elements, or an <code title=3D"&=
quot;>@import</code> rule in a CSS <code><a href=3D#the=
-style-element>style</a></code> element block).</li>
+
+   <li>Event handlers, whether registered through the DOM using &l=
t;code title=3D"">addEventListener()</code>, by explic=
it <a href=3D#event-handler-content-attributes>event handler conten=
t attributes</a>, by
+   <a href=3D#event-handler-idl-attributes>event handler IDL attri=
butes</a>, or otherwise.</li>
+
+   <li>Processing of technologies like XBL or SVG that have their =
own scripting features.</li>
+
+  </ul><div class=3Dimpl>
+
+  <h4 id=3Denabling-and-disabling-scripting><span class=3Dsecno=
>7.1.2 </span>Enabling and disabling scripting</h4>
+
+  <p><dfn id=3Dconcept-bc-script title=3Dconcept-bc-script>S=
cripting is enabled</dfn> in a <em><a href=3D#browsing-con=
text><span>browsing
+  context</span></a></em> when all of the following co=
nditions are true:</p>
+
+  <ul><li>The user agent supports scripting.</li>
+
+   <li>The user has not disabled scripting for this <a href=3D#=
browsing-context>browsing context</a> at this time.
+   (User agents may provide users with the option to disable scripting g=
lobally, or in a
+   finer-grained manner, e.g. on a per-origin basis.)
+   <a href=3D#fingerprinting-vector class=3Dfingerprint title=3D&quot=
;fingerprinting vector"><img src=3Dhttp://images.whatwg.org/fi=
ngerprint.png width=3D46 alt=3D"(This is a fingerprinting vector.)&q=
uot; height=3D64></a>
+   </li>
+
+   <li id=3DsandboxScriptBlocked>The <a href=3D#browsing-contex=
t>browsing context</a>'s <a href=3D#active-document>active=
 document</a>'s
+   <a href=3D#active-sandboxing-flag-set>active sandboxing flag se=
t</a> does not have its <a href=3D#sandboxed-scripts-browsing-co=
ntext-flag>sandboxed scripts browsing
+   context flag</a> set.</li>
+
+  </ul><p><dfn id=3Dconcept-bc-noscript title=3Dconcept-b=
c-noscript>Scripting is disabled</dfn> in a <a href=3D#browsi=
ng-context>browsing context</a>
+  when any of the above conditions are false (i.e. when scripting is not=
 <a href=3D#concept-bc-script title=3Dconcept-bc-script>enabled<=
/a>).</p>
+
+  <hr><p><dfn id=3Dconcept-n-script title=3Dconcept-n-scr=
ipt>Scripting is enabled</dfn> for a <em><a href=3D#nod=
e>node</a></em> if the
+  <code><a href=3D#document>Document</a></code> =
object of the node (the node itself, if it is itself a <code><a =
href=3D#document>Document</a></code>
+  object) has an associated <a href=3D#browsing-context>browsing c=
ontext</a>, and <a href=3D#concept-bc-script title=3Dconcept-bc-=
script>scripting is enabled</a> in that <a href=3D#browsing-c=
ontext>browsing context</a>.</p>
+
+  <p><dfn id=3Dconcept-n-noscript title=3Dconcept-n-noscript&gt=
;Scripting is disabled</dfn> for a node if there is no such
+  <a href=3D#browsing-context>browsing context</a>, or if &l=
t;a href=3D#concept-bc-noscript title=3Dconcept-bc-noscript>scripting =
is
+  disabled</a> in that <a href=3D#browsing-context>browsing =
context</a>.</p>
+
+  </div>
+
+
+  <div class=3Dimpl>
+
+  <!-- SCRIPT EXEC (marks areas related to creation of scripts) --&gt=
;
+  <h4 id=3Dprocessing-model-3><span class=3Dsecno>7.1.3 <=
/span>Processing model</h4>
+
+  <h5 id=3Ddefinitions-0><span class=3Dsecno>7.1.3.1 </sp=
an>Definitions</h5>
+
+  <p>This specification describes three kinds of <a href=3D#jav=
ascript-global-environment title=3D"JavaScript global
+  environment">JavaScript global environments</a>: the &lt=
;dfn id=3Ddocument-environment>document environment</dfn>, the
+  <dfn id=3Ddedicated-worker-environment>dedicated worker environm=
ent</dfn>, and the <dfn id=3Dshared-worker-environment>shared=
 worker environment</dfn>. The
+  <a href=3D#dedicated-worker-environment>dedicated worker environ=
ment</a> and the <a href=3D#shared-worker-environment>shared =
worker environment</a> are both
+  types of <dfn id=3Dworker-environment title=3D"worker environm=
ent">worker environments</dfn>.</p>
+
+  <p>Except where otherwise specified, a <a href=3D#javascript-=
global-environment>JavaScript global environment</a> is a
+  <a href=3D#document-environment>document environment</a>.&=
lt;/p> <!-- note that we never actually say where one of these is
+  created... -->
+
+  <hr><p>A <dfn id=3Dconcept-script title=3Dconcept-scrip=
t>script</dfn> has:</p>
+
+  <dl><dt>A <dfn id=3Dcode-entry-point>code entry-poin=
t</dfn></dt>
+
+   <dd>
+
+    <p>A code entry-point represents a block of executable code th=
at the script exposes to other
+    scripts and to the user agent. Typically, the code corresponding to =
the code entry-point is
+    executed immediately after the script is parsed, but for event handl=
ers, it is called each time
+    the handler is invoked.</p>
+
+    <p class=3Dexample>In JavaScript <code><a href=3D#the=
-script-element>script</a></code> blocks, this corresponds=
 to the execution
+    context of the global code.</p>
+
+   </dd>
+
+   <dt>Optionally, a <dfn id=3Dmuted-errors>muted errors<=
/dfn> flag</dt>
+
+   <dd>
+
+    <p>A flag which, if set, means that error information will not=
 be provided for errors in this
+    script (used to mute errors for cross-origin scripts, since that can=
 leak private
+    information).</p>
+
+   </dd>
+
+   <dt>A <dfn id=3Dsettings-object>settings object</dfn&g=
t;</dt>
+
+   <dd>
+
+    <p>A <a href=3D#script-settings-object>script settings o=
bject</a>, various settings that are shared with other scripts in
+    the same context.</p>
+
+   </dd>
+
+  </dl><hr><p>A <dfn id=3Dscript-settings-object&gt=
;script settings object</dfn> specifies algorithms for obtaining th=
e following:</p>
+
+  <dl><dt>A <dfn id=3Dscript-execution-environment>scr=
ipt execution environment</dfn> for each language supported by the =
user agent</dt>
+
+   <dd>
+
+    <p>The characteristics of the script execution environment dep=
end on the language, and are not
+    defined by this specification.</p>
+
+    <p class=3Dexample>In JavaScript, the script execution environ=
ment consists of the interpreter,
+    the stack of <i>execution contexts</i>, the <i>glo=
bal code</i> and <i>function code</i> and the
+    <code>Function</code> objects resulting, and so forth.&l=
t;/p>
+
+   </dd>
+
+   <dt>A <dfn id=3Dglobal-object>global object</dfn>&l=
t;/dt>
+   <dd>
+
+    <p>An object that provides the APIs that can be called by the =
code in scripts that use this
+    <a href=3D#script-settings-object title=3D"script settings o=
bject">settings object</a>.</p>
+
+    <p class=3Dnote>This is typically a <code><a href=3D#=
window>Window</a></code> object or a
+    <code><a href=3D#workerglobalscope>WorkerGlobalScope<=
/a></code> object. When a <a href=3D#global-object>global =
object</a> is an empty object, it
+    can't do anything that interacts with the environment.</p>
+
+<!--CLEANUP-->
+    <p>If the <a href=3D#global-object>global object</a&g=
t; is a <code><a href=3D#window>Window</a></code>=
 object, then, in
+    JavaScript, the ThisBinding of the global execution context for this=
 script must be the
+    <code><a href=3D#window>Window</a></code> ob=
ject's <code><a href=3D#windowproxy>WindowProxy</a><=
/code> object, rather than the global object. <a href=3D#refsECMA26=
2>[ECMA262]</a></p>
+
+    <p class=3Dnote>This is a <a href=3D#willful-violation>w=
illful violation</a> of the JavaScript specification current
+    at the time of writing (ECMAScript edition 5, as defined in section =
10.4.1.1 Initial Global
+    Execution Context, step 3). The JavaScript specification requires th=
at the <code title=3D"">this</code> keyword in the =
global scope return the global object, but this is not
+    compatible with the security design prevalent in implementations as =
specified herein. <a href=3D#refsECMA262>[ECMA262]</a></p&=
gt;
+
+   </dd>
+
+   <dt>A <dfn id=3Dresponsible-browsing-context>responsible =
browsing context</dfn></dt>
+
+   <dd>
+
+    <p>A <a href=3D#browsing-context>browsing context</a&=
gt; that is assigned responsibility for actions taken by the
+    scripts that use this <a href=3D#script-settings-object>script=
 settings object</a>.</p>
+
+    <p class=3Dexample>When a script creates and <a href=3D#nav=
igate title=3Dnavigate>navigates</a> a new
+    <a href=3D#top-level-browsing-context>top-level browsing conte=
xt</a>, the <code title=3Ddom-opener><a href=3D#dom-opener=
>opener</a></code> attribute
+    of the new <a href=3D#browsing-context>browsing context</a&=
gt;'s <code><a href=3D#window>Window</a></code> o=
bject will be set to the
+    <a href=3D#responsible-browsing-context>responsible browsing c=
ontext</a>'s <code><a href=3D#windowproxy>WindowProxy&l=
t;/a></code> object.</p>
+
+   </dd>
+
+   <dt>A <dfn id=3Dresponsible-document>responsible document=
</dfn></dt>
+
+   <dd>
+
+    <p>A <code><a href=3D#document>Document</a>&=
lt;/code> that is assigned responsibility for actions taken by the scr=
ipts that
+    use this <a href=3D#script-settings-object>script settings obj=
ect</a>.</p>
+
+<!--CLEANUP-->
+    <p class=3Dexample>For example, the <a href=3D"#the-do=
cument's-address" title=3D"the document's address">addr=
ess</a> of the
+    <a href=3D#responsible-document>responsible document</a>=
 is used to set the <a href=3D"#the-document's-address" titl=
e=3D"the document's
+    address">address</a> of any <code><a href=3D#=
document>Document</a></code>s created using <code title=
=3Ddom-DOMImplementation-createDocument><a href=3D#dom-domimplement=
ation-createdocument>createDocument()</a></code>.</p&gt=
;
+
+   </dd>
+
+   <dt>A <dfn id=3Dresponsible-event-loop>responsible event =
loop</dfn></dt>
+
+   <dd>
+
+    <p>An <a href=3D#event-loop>event loop</a> that is=
 used when it would not be immediately clear what event
+    loop to use.</p>
+
+   </dd>
+
+   <dt>An <dfn id=3Dapi-referrer-source>API referrer source&=
lt;/dfn></dt>
+
+   <dd>
+
+    <p>Either a <code><a href=3D#document>Document<=
/a></code> (specifically, the <a href=3D#responsible-document=
>responsible document</a>), or a
+    <a href=3D#url>URL</a>, which is used by some APIs to de=
termine what value to use for the <code title=3Dhttp-referer>Refere=
r</code> (sic) header in calls to the <a href=3D#fetch title=3Df=
etch>fetching</a> algorithm.</p>
+
+   </dd>
+
+   <dt>An <dfn id=3Dapi-url-character-encoding>API URL chara=
cter encoding</dfn></dt>
+
+   <dd>
+
+<!--CLEANUP-->
+    <p>A character encoding used to encode URLs by APIs called by =
scripts that use
+    this <a href=3D#script-settings-object>script settings object&=
lt;/a>.</p>
+
+   </dd>
+
+   <dt>An <dfn id=3Dapi-base-url>API base URL</dfn>&lt=
;/dt>
+
+   <dd>
+
+<!--CLEANUP-->
+    <p>An <a href=3D#absolute-url>absolute URL</a> use=
d by APIs called by scripts that use
+    this <a href=3D#script-settings-object>script settings object&=
lt;/a> to resolve <a href=3D#relative-url title=3D"relative
+    URL">relative URLs</a>.</p>
+
+   </dd>
+
+   <dt>An <a href=3D#origin>origin</a> and an <a hr=
ef=3D#effective-script-origin>effective script origin</a></dt=
>
+
+   <dd>
+
+    <p>An instrument used in security checks.</p>
+
+   </dd>
+
+  </dl><p>The <dfn id=3Drelevant-settings-object-for-a-gl=
obal-object>relevant settings object for a global object</dfn> &=
lt;var title=3D"">o</var> is the
+  <a href=3D#script-settings-object>script settings object</a&g=
t; whose <a href=3D#global-object>global object</a> is <va=
r title=3D"">o</var>.
+  (There is always a 1:1 mapping of global objects to script settings ob=
jects.)</p>
+
+  <p>The <dfn id=3Drelevant-settings-object-for-a-script>rel=
evant settings object for a script</dfn> <var title=3D"&quo=
t;>s</var> is the
+  <a href=3D#settings-object>settings object</a> of <var =
title=3D"">s</var>.</p>
+
+
+
+  <h5 id=3Dscript-settings-for-browsing-contexts><span class=3D=
secno>7.1.3.2 </span>Script settings for browsing contexts</h=
5>
+
+  <p>Whenever a new <code><a href=3D#window>Window<=
/a></code> object is created, it must also create a <a href=3D=
#script-settings-object>script
+  settings object</a> whose algorithms are defined as follows:<=
/p>
+
+  <dl><dt>The <a href=3D#script-execution-environment tit=
le=3D"script execution environment">script execution environ=
ments</a></dt>
+   <dd>
+
+    <p>When the <a href=3D#script-settings-object>script set=
tings object</a> is created, for each language supported by the
+    user agent, create an appropriate execution environment as defined b=
y the relevant
+    specification.</p>
+
+    <p>When a <a href=3D#script-execution-environment>script=
 execution environment</a> is needed, return the appropriate one fr=
om
+    those created when the <a href=3D#script-settings-object>scrip=
t settings object</a> was created.</p>
+
+   </dd>
+
+   <dt>The <a href=3D#global-object>global object</a>&=
lt;/dt>
+   <dd>
+
+    <p>Return the <code><a href=3D#window>Window</a=
></code> object itself.</p>
+
+   </dd>
+
+   <dt>The <a href=3D#responsible-browsing-context>responsib=
le browsing context</a></dt>
+   <dd>
+
+    <p>Return the <a href=3D#browsing-context>browsing conte=
xt</a> with which the <code><a href=3D#window>Window&lt=
;/a></code> object is
+    associated.</p>
+
+   </dd>
+
+   <dt>The <a href=3D#responsible-document>responsible docum=
ent</a></dt>
+   <dd>
+
+    <p>Return the <code><a href=3D#document>Document&l=
t;/a></code> with which the <code><a href=3D#window>=
Window</a></code> is currently
+    associated.</p>
+
+   </dd>
+
+   <dt>The <a href=3D#responsible-event-loop>responsible eve=
nt loop</a></dt>
+   <dd>
+
+    <p>Return the <a href=3D#event-loop>event loop</a>=
 that is associated with the <a href=3D#unit-of-related-similar-origin=
-browsing-contexts>unit of related
+    similar-origin browsing contexts</a> to which the <code>=
<a href=3D#window>Window</a></code> object's <a href=
=3D#browsing-context>browsing
+    context</a> belongs.</p>
+
+   </dd>
+
+   <dt>The <a href=3D#api-referrer-source>API referrer sourc=
e</a></dt>
+   <dd>
+
+    <p>Return the <code><a href=3D#document>Document&l=
t;/a></code> with which the <code><a href=3D#window>=
Window</a></code> is currently
+    associated.</p>
+
+   </dd>
+
+   <dt>The <a href=3D#api-url-character-encoding>API URL cha=
racter encoding</a></dt>
+   <dd>
+
+    <p>Return the current <a href=3D"#document's-character=
-encoding" title=3D"document's character encoding">char=
acter encoding</a> of
+    the <code><a href=3D#document>Document</a></cod=
e> with which the <code><a href=3D#window>Window</a>=
</code> is currently associated.</p>
+
+   </dd>
+
+   <dt>The <a href=3D#api-base-url>API base URL</a>&lt=
;/dt>
+   <dd>
+
+    <p>Return the current <a href=3D#document-base-url title=3D=
"document base URL">base URL</a> of the
+    <code><a href=3D#document>Document</a></code&gt=
; with which the <code><a href=3D#window>Window</a><=
/code> is currently associated.</p>
+
+   </dd>
+
+   <dt>The <a href=3D#origin>origin</a></dt>
+   <dd>
+
+    <p>Return the <a href=3D#origin>origin</a> of the =
<code><a href=3D#document>Document</a></code> wit=
h which the
+    <code><a href=3D#window>Window</a></code> is=
 currently associated.</p>
+
+   </dd>
+
+   <dt>The <a href=3D#effective-script-origin>effective scri=
pt origin</a></dt>
+   <dd>
+
+    <p>Return the <a href=3D#effective-script-origin>effecti=
ve script origin</a> of the <code><a href=3D#document>D=
ocument</a></code> with which the
+    <code><a href=3D#window>Window</a></code> is=
 currently associated.</p>
+
+   </dd>
+
+  </dl><h5 id=3Dcalling-scripts><span class=3Dsecno>7.=
1.3.3 </span>Calling scripts</h5>
+
+<!--CLEANUP-->
+  <p>Each <a href=3D#unit-of-related-similar-origin-browsing-co=
ntexts>unit of related similar-origin browsing contexts</a> has =
a <dfn id=3Dstack-of-script-settings-objects>stack of
+  script settings objects</dfn>, which must be initially empty. Wh=
en a new <a href=3D#script-settings-object>script settings object&l=
t;/a> is <i>pushed</i> onto
+  this stack, the specified <a href=3D#script-settings-object>scri=
pt settings object</a> is to be added to the stack; when the <a =
href=3D#script-settings-object>script settings object</a> on thi=
s stack that
+  was most recently pushed onto it is to be <i>popped</i> fr=
om the stack, it must be removed.
+  Entries on this stack can be labeled as <dfn id=3Dcandidate-entry-s=
ettings-object title=3D"candidate entry settings object">can=
didate entry settings objects</dfn>.</p>
+
+<!--CLEANUP-->
+  <p>When a user agent is to <dfn id=3Djump-to-a-code-entry-poi=
nt>jump to a code entry-point</dfn> for a <a href=3D#concept-=
script title=3Dconcept-script>script</a> <var title=3D"&=
quot;>s</var>, the user agent must run the
+  following steps:</p>
+
+  <ol><li><p>Let <var title=3D"">conte=
xt</var> be the
+   <a href=3D#settings-object>settings object</a> of <var=
 title=3D"">s</var>.</li>
+
+<!--CLEANUP-->
+   <li><p><a href=3D#prepare-to-run-a-callback>Prepare=
 to run a callback</a> with <var title=3D"">context=
</var> as
+   the <a href=3D#script-settings-object>script settings object&lt=
;/a>. If this returns "do not run" then abort these
+   steps.</li>
+
+<!--CLEANUP-->
+   <li><p>Make the appropriate <a href=3D#script-executio=
n-environment>script execution environment</a>
+   specified by <var title=3D"">context</var> exec=
ute the <var title=3D"">s</var>'s <a href=3D#cod=
e-entry-point>code
+   entry-point</a>.</li>
+
+   <li><p><a href=3D#clean-up-after-running-a-callback&gt=
;Clean up after running a callback</a>.</li>
+
+  </ol><!--CLEANUP--><p>The steps to <dfn id=3Dprep=
are-to-run-a-callback>prepare to run a callback</dfn> with
+  a <a href=3D#script-settings-object>script settings object</a=
> <var title=3D"">o</var> are as follows. They
+  return either "run" or "do
+  not run".</p>
+
+  <ol><!--CLEANUP--><li><p>If the <a href=3D#=
global-object>global object</a> specified by <var title=3D&qu=
ot;">o</var>
+   is a <code><a href=3D#window>Window</a></code&gt=
; object whose <code><a href=3D#document>Document</a>&l=
t;/code> object is not <a href=3D#fully-active>fully
+   active</a>, then return "do not run" and abort these =
steps.</p>
+
+<!--CLEANUP-->
+   <li><p>If <a href=3D#concept-bc-noscript title=3Dconce=
pt-bc-noscript>scripting is disabled</a> for the <a href=3D#r=
esponsible-browsing-context>responsible browsing context</a> spe=
cified by <var title=3D"">o</var>, then return
+   "do not run" and abort these steps.</p>
+
+<!--CLEANUP-->
+   <li><p>Push <var title=3D"">o</var>=
 onto the <a href=3D#stack-of-script-settings-objects>stack of scri=
pt settings objects</a>, and label it
+   as a <a href=3D#candidate-entry-settings-object>candidate entry=
 settings object</a>.</li>
+
+   <li><p>Return "run".</li>
+
+  </ol><p>The steps to <dfn id=3Dclean-up-after-running-a=
-callback>clean up after running a callback</dfn> are as follows=
:</p>
+
+  <ol><!--CLEANUP--><li><p>Pop the current <a=
 href=3D#incumbent-settings-object>incumbent settings object</a>=
 from the <a href=3D#stack-of-script-settings-objects>stack of scri=
pt settings
+   objects</a>.</li>
+
+<!--CLEANUP-->
+   <li><p>If the <a href=3D#stack-of-script-settings-obje=
cts>stack of script settings objects</a> is now empty, <a hre=
f=3D#run-the-global-script-clean-up-jobs>run the global script
+   clean-up jobs</a>. (These cannot run scripts.)</li>
+
+<!--CLEANUP-->
+   <li><p>If the <a href=3D#stack-of-script-settings-obje=
cts>stack of script settings objects</a> is now empty, <a hre=
f=3D#perform-a-microtask-checkpoint>perform a microtask
+   checkpoint</a>. (If this runs scripts, these algorithms will be=
 invoked reentrantly.)</li>
+
+  </ol><p class=3Dnote>These algorithms are not invoked by o=
ne script directly calling another, but they
+  can be invoked reentrantly in an indirect manner, e.g. if a script dis=
patches an event which has
+  event listeners registered.</p>
+
+<!--CLEANUP-->
+  <p>When a JavaScript <i>SourceElements</i> productio=
n is to be evaluated, the <a href=3D#settings-object>settings objec=
t</a> of the <a href=3D#concept-script title=3Dconcept-script&gt=
;script</a> corresponding to that <i>SourceElements</i>=
 must be pushed
+  onto the <a href=3D#stack-of-script-settings-objects>stack of sc=
ript settings objects</a> before the evaluation begins, and popped =
when the
+  evaluation ends (regardless of whether it's an abrupt completion or no=
t).</p>
+
+<!--CLEANUP-->
+  <p>The <dfn id=3Dentry-settings-object>entry settings obje=
ct</dfn> is the most-recently added <a href=3D#script-settings-o=
bject>script settings object</a>
+  in the <a href=3D#stack-of-script-settings-objects>stack of scri=
pt settings objects</a> that is
+  labeled as a <a href=3D#candidate-entry-settings-object>candidat=
e entry settings object</a>. If the stack is
+  empty, or has no entries labeled as such, then there is no <a href=3D=
#entry-settings-object>entry settings object</a>. It is used
+  to obtain, amongst other things, the <a href=3D#api-base-url>API=
 base URL</a> to <a href=3D#resolve-a-url title=3D"resolve =
a
+  url">resolve</a> relative <a href=3D#url title=3DURL&=
gt;URLs</a> used in scripts running in that
+  <a href=3D#unit-of-related-similar-origin-browsing-contexts>unit=
 of related similar-origin browsing contexts</a>.</p>
+
+<!--CLEANUP-->
+  <p>The <dfn id=3Dincumbent-settings-object>incumbent setti=
ngs object</dfn> is the <a href=3D#script-settings-object>scr=
ipt settings object</a> in the
+  <a href=3D#stack-of-script-settings-objects>stack of script sett=
ings objects</a> that was most-recently added (i.e. the last one on=
 the
+  stack). If the stack is empty, then there is no <a href=3D#incumben=
t-settings-object>incumbent settings object</a>. It is used in s=
ome
+  security checks.</p>
+
+  <p class=3Dnote>The WebIDL specification also uses these algorit=
hms. <a href=3D#refsWEBIDL>[WEBIDL]</a></p>
+
+  <hr><!--CLEANUP--><p>Each <a href=3D#unit-of-rela=
ted-similar-origin-browsing-contexts>unit of related similar-origin br=
owsing contexts</a> has a <dfn id=3Dperforming-a-microtask-check=
point>performing
+  a microtask checkpoint</dfn> flag, which must initially be false=
. It is used to prevent reentrant invocation of
+  the algorithm to <a href=3D#concept-mo-invoke title=3Dconcept-mo-in=
voke>invoke <code>MutationObserver</code>
+  objects</a>. For the purposes of <code><a href=3D#mutat=
ionobserver>MutationObserver</a></code> objects, each <=
a href=3D#unit-of-related-similar-origin-browsing-contexts>unit of
+  related similar-origin browsing contexts</a> is a distinct <v=
ar title=3D"MutationObserver
+  scripting environment"><a href=3D#mutationobserver-scriptin=
g-environment>scripting environment</a></var>.</p>
+
+  <p>Each <a href=3D#unit-of-related-similar-origin-browsing-co=
ntexts>unit of related similar-origin browsing contexts</a> has =
a <dfn id=3Dglobal-script-clean-up-jobs-list>global script
+  clean-up jobs list</dfn>, which must initially be empty. A globa=
l script clean-up job cannot run
+  scripts, and cannot be sensitive to the order in which other clean-up =
jobs are executed. The File
+  API uses this to release <code title=3D"">blob:</co=
de> URLs. <a href=3D#refsFILEAPI>[FILEAPI]</a></p>
+
+  <p>When the user agent is to <dfn id=3Drun-the-global-script-=
clean-up-jobs>run the global script clean-up jobs</dfn>, the use=
r agent must
+  perform each of the jobs in the <a href=3D#global-script-clean-up-j=
obs-list>global script clean-up jobs list</a> and then empty the
+  list.</p>
+
+  </div>
+
+
+  <div class=3Dimpl>
+
+  <h5 id=3Dcreating-scripts><span class=3Dsecno>7.1.3.4 <=
/span>Creating scripts</h5>
+
+  <p>When the specification says that a <a href=3D#concept-scri=
pt title=3Dconcept-script>script</a> is to be <dfn id=3Dcreat=
e-a-script title=3D"create a script">created</dfn>, gi=
ven some script source, a script source URL, its
+  scripting language, a <a href=3D#script-settings-object>script s=
ettings object</a>, and optionally a <var title=3D""&g=
t;muted
+  errors</var> flag, the user agent must run the following steps:&=
lt;/p>
+
+  <ol><li><p>Let <var title=3D"">scrip=
t</var> be a new <a href=3D#concept-script title=3Dconcept-scrip=
t>script</a> that
+   this algorithm will subsequently initialize.</li>
+
+   <li><p>If <a href=3D#concept-bc-noscript title=3Dconce=
pt-bc-noscript>scripting is disabled</a> for <a href=3D#brows=
ing-context>browsing
+   context</a> passed to this algorithm, then abort these steps, a=
s if the script source
+   described a program that did nothing but return void.</p>
+
+   <li><p>Obtain the appropriate <a href=3D#script-execut=
ion-environment>script execution environment</a> for the given s=
cripting
+   language from the <a href=3D#script-settings-object>script sett=
ings object</a> provided.</li>
+
+   <li><p>Parse/compile/initialize the source of the script =
using the <a href=3D#script-execution-environment>script execution
+   environment</a>, as appropriate for the scripting language, and=
 thus obtain <var title=3D"">script</var>'s <a h=
ref=3D#code-entry-point>code entry-point</a>.</li>
+
+   <li><p>Let <var title=3D"">script</var=
>'s <a href=3D#settings-object>settings object</a> be the =
<a href=3D#script-settings-object>script
+   settings object</a> provided.</li>
+
+   <li><p>If the <var title=3D"">muted error=
s</var> flag was set, then set <var title=3D"">scri=
pt</var>'s <a href=3D#muted-errors>muted errors</a> fla=
g.</li>
+
+   <li>
+=20
+    <p>If all the steps above succeeded (in particular, if the scr=
ipt was compiled successfully),
+    <a href=3D#jump-to-a-code-entry-point title=3D"jump to a cod=
e entry-point">Jump</a> to <var title=3D"">=
script</var>'s <a href=3D#code-entry-point>code
+    entry-point</a>.</p>
+
+<!--CLEANUP-->
+    <p>Otherwise, <a href=3D#report-the-error>report the err=
or</a> for <var title=3D"">script</var>, with=
 the problematic
+    position (line number and column number), using the <a href=3D#gl=
obal-object>global object</a> specified by the <a href=3D#scr=
ipt-settings-object>script settings object</a> as the
+    target. If the error is still <i title=3Dconcept-error-nothandled=
><a href=3D#concept-error-nothandled>not handled</a></i=
> after this,
+    then the error may be reported to the user.</p>
+
+   </li>
+
+  </ol></div>
+
+
+  <div class=3Dimpl>
+
+  <h5 id=3Dkilling-scripts><span class=3Dsecno>7.1.3.5 </=
span>Killing scripts</h5>
+
+  <p>User agents may impose resource limitations on scripts, for e=
xample CPU quotas, memory limits,
+  total execution time limits, or bandwidth limitations. When a script e=
xceeds a limit, the user
+  agent may either throw a <code><a href=3D#quotaexceedederror&=
gt;QuotaExceededError</a></code> exception, abort the script =
without an
+  exception, prompt the user, or throttle script execution.</p>
+
+  <div class=3Dexample>
+
+   <p>For example, the following script never terminates. A user a=
gent could, after waiting for a
+   few seconds, prompt the user to either terminate the script or let it=
 continue.</p>
+
+   <pre><script>
+ while (true) { /* loop */ }
+</script></pre>
+
+  </div>
+
+  <p>User agents are encouraged to allow users to disable scriptin=
g whenever the user is prompted
+  either by a script (e.g. using the <code title=3Ddom-alert><a=
 href=3D#dom-alert>window.alert()</a></code> API) or becau=
se
+  of a script's actions (e.g. because it has exceeded a time limit).<=
/p>
+
+  <p>If scripting is disabled while a script is executing, the scr=
ipt should be terminated
+  immediately.</p>
+
+  <p>User agents may allow users to specifically disable scripts j=
ust for the purposes of closing a
+  <a href=3D#browsing-context>browsing context</a>.</p&gt=
;
+
+  <p class=3Dexample>For example, the prompt mentioned in the exam=
ple above could also offer the
+  user with a mechanism to just close the page entirely, without running=
 any <code title=3Devent-unload>unload</code> event handlers.=
</p>
+
+  </div>
+
+
+  <div class=3Dimpl>
+
+  <h5 id=3Druntime-script-errors><span class=3Dsecno>7.1.3.6=
 </span>Runtime script errors</h5>
+
+  <p>When the user agent is required to <dfn id=3Dreport-the-er=
ror title=3D"report the error">report an error</dfn> f=
or a
+  particular <a href=3D#concept-script title=3Dconcept-script>scri=
pt</a> <var title=3D"">script</var> with a pa=
rticular
+  position <var title=3D"">line</var>:<var titl=
e=3D"">col</var>, using a particular target <var ti=
tle=3D"">target</var>, it must run these steps, after =
which the error is either <dfn id=3Dconcept-error-handled title=3Dconc=
ept-error-handled><i>handled</i></dfn> or <dfn id=
=3Dconcept-error-nothandled title=3Dconcept-error-nothandled><i>=
not
+  handled</i></dfn>:</p>
+
+  <ol><li><p>If <var title=3D"">target=
</var> is <a href=3D#in-error-reporting-mode>in error reporti=
ng mode</a>, then abort these
+   steps; the error is <i title=3Dconcept-error-nothandled><a h=
ref=3D#concept-error-nothandled>not handled</a></i>.</l=
i>
+
+   <li><p>Let <var title=3D"">target</var=
> be <dfn id=3Din-error-reporting-mode>in error reporting mode&l=
t;/dfn>.</li>
+
+   <li><p>Let <var title=3D"">message</va=
r> be a user-agent-defined string describing the error in a
+   helpful manner.
+   <a href=3D#fingerprinting-vector class=3Dfingerprint title=3D&quot=
;fingerprinting vector"><img src=3Dhttp://images.whatwg.org/fi=
ngerprint.png width=3D46 alt=3D"(This is a fingerprinting vector.)&q=
uot; height=3D64></a>
+   </li>
+
+   <li><p>Let <var title=3D"">error object&l=
t;/var> be the object that represents the error: in the case
+   of an uncaught exception, that would be the object that was thrown; i=
n the case of a JavaScript
+   error that would be an <code>Error</code> object. If ther=
e is no corresponding object, then the
+   null value must be used instead.</li>
+
+   <li>
+
+    <p>Let <var title=3D"">location</var> be=
 an <a href=3D#absolute-url>absolute URL</a> that corresponds=
 to the
+    resource from which <var title=3D"">script</var&g=
t; was obtained.</p>
+
+    <p class=3Dnote>The resource containing the script will typica=
lly be the file from which the
+    <code><a href=3D#document>Document</a></code&gt=
; was parsed, e.g. for inline <code><a href=3D#the-script-elemen=
t>script</a></code> elements or <a href=3D#event-handle=
r-content-attributes>event
+    handler content attributes</a>; or the JavaScript file that th=
e script was in, for external
+    scripts. Even for dynamically-generated scripts, user agents are str=
ongly encouraged to attempt
+    to keep track of the original source of a script. For example, if an=
 external script uses the
+    <code title=3Ddom-document-write><a href=3D#dom-document-wr=
ite>document.write()</a></code> API to insert an inline
+    <code><a href=3D#the-script-element>script</a><=
/code> element during parsing, the URL of the resource containing the =
script would
+    ideally be reported as being the external script, and the line numbe=
r might ideally be reported
+    as the line with the <code title=3Ddom-document-write><a hr=
ef=3D#dom-document-write>document.write()</a></code> call =
or where the
+    string passed to that call was first constructed. Naturally, impleme=
nting this can be somewhat
+    non-trivial.</p>
+
+    <p class=3Dnote>User agents are similarly encouraged to keep c=
areful track of the original line
+    numbers, even in the face of <code title=3Ddom-document-write>=
<a href=3D#dom-document-write>document.write()</a></code&g=
t; calls
+    mutating the document as it is parsed, or <a href=3D#event-handle=
r-content-attributes>event handler content attributes</a> spanni=
ng
+    multiple lines.</p>
+
+   </li>
+
+   <li><p>If <var title=3D"">script</var&=
gt; has <a href=3D#muted-errors>muted errors</a>, then set &l=
t;var title=3D"">message</var> to "<code title=
=3D"">Script error.</code>", set <var title=3D=
"">location</var>
+   to the empty string, set <var title=3D"">line</var=
> and <var title=3D"">col</var> to 0, and set &l=
t;var title=3D"">error object</var> to null.</li&gt=
;
+
+   <li><p>Let <var title=3D"">event</var&=
gt; be a new <a href=3D#concept-events-trusted title=3Dconcept-events-=
trusted>trusted</a>
+   <code><a href=3D#errorevent>ErrorEvent</a></code=
> object that does not bubble but is cancelable, and which has the eve=
nt
+   name <code title=3Devent-error>error</code>.</li>
+
+   <li><p>Initialize <var title=3D"">event&l=
t;/var>'s <code title=3Ddom-ErrorEvent-message><a href=3D#dom=
-errorevent-message>message</a></code>
+   attribute to <var title=3D"">message</var>.<=
/li>
+
+   <li><p>Initialize <var title=3D"">event&l=
t;/var>'s <code title=3Ddom-ErrorEvent-filename><a href=3D#do=
m-errorevent-filename>filename</a></code> attribute to &lt=
;var title=3D"">location</var>.</li>
+
+   <li><p>Initialize <var title=3D"">event&l=
t;/var>'s <code title=3Ddom-ErrorEvent-lineno><a href=3D#dom-=
errorevent-lineno>lineno</a></code>
+   attribute to <var title=3D"">line</var>.</li=
>
+
+   <li><p>Initialize <var title=3D"">event&l=
t;/var>'s <code title=3Ddom-ErrorEvent-colno><a href=3D#dom-e=
rrorevent-colno>colno</a></code>
+   attribute to <var title=3D"">col</var>.</li&=
gt;
+
+   <li><p>Initialize <var title=3D"">event&l=
t;/var>'s <code title=3Ddom-ErrorEvent-error><a href=3D#dom-e=
rrorevent-error>error</a></code>
+   attribute to <var title=3D"">error object</var>=
.</li>
+
+   <li><p><a href=3D#concept-event-dispatch title=3Dconce=
pt-event-dispatch>Dispatch</a> <var title=3D"">e=
vent</var> at <var title=3D"">target</var>.&l=
t;/li>
+
+   <li><p>Let <var title=3D"">target</var=
> no longer be <a href=3D#in-error-reporting-mode>in error repor=
ting mode</a>.</li>
+
+   <li><p>If <var title=3D"">event</var&g=
t; was canceled, then the error is <i title=3Dconcept-error-handled&gt=
;<a href=3D#concept-error-handled>handled</a></i>. Othe=
rwise, the error is <i title=3Dconcept-error-nothandled><a href=3D=
#concept-error-nothandled>not handled</a></i>.</p>
+
+  </ol><h6 id=3Druntime-script-errors-in-documents><span =
class=3Dsecno>7.1.3.6.1 </span>Runtime script errors in document=
s</h6>
+
+<!--CLEANUP-->
+  <p>Whenever an uncaught runtime script error occurs in one of th=
e scripts associated with a
+  <code><a href=3D#document>Document</a></code>,=
 the user agent must <a href=3D#report-the-error>report the error&l=
t;/a> for the relevant <a href=3D#concept-script title=3Dconcept-sc=
ript>script</a>, with the problematic position (line number and =
column
+  number) in the resource containing the script, using the <a href=3D=
#global-object>global object</a> specified by the script's <a=
 href=3D#settings-object>settings object</a> as
+  the target. If the error is still <i title=3Dconcept-error-nothandl=
ed><a href=3D#concept-error-nothandled>not handled</a><=
/i> after this,
+  then the error may be reported to the user.</p>
+
+  </div>
+
+
+
+  <h6 id=3Dthe-errorevent-interface><span class=3Dsecno>7.1.=
3.6.2 </span>The <code><a href=3D#errorevent>ErrorEvent=
</a></code> interface</h6>
+
+  <pre class=3Didl>[Constructor(DOMString type, optional <a hre=
f=3D#erroreventinit>ErrorEventInit</a> eventInitDict)]
+interface <dfn id=3Derrorevent>ErrorEvent</dfn> : <a href=
=3D#event>Event</a> {
+  readonly attribute DOMString <a href=3D#dom-errorevent-message titl=
e=3Ddom-ErrorEvent-message>message</a>;
+  readonly attribute DOMString <a href=3D#dom-errorevent-filename tit=
le=3Ddom-ErrorEvent-filename>filename</a>;
+  readonly attribute unsigned long <a href=3D#dom-errorevent-lineno t=
itle=3Ddom-ErrorEvent-lineno>lineno</a>;
+  readonly attribute unsigned long <a href=3D#dom-errorevent-colno ti=
tle=3Ddom-ErrorEvent-colno>colno</a>;
+  readonly attribute any <a href=3D#dom-errorevent-error title=3Ddom-=
ErrorEvent-error>error</a>;
+};
+
+dictionary <dfn id=3Derroreventinit>ErrorEventInit</dfn> : &=
lt;a href=3D#eventinit>EventInit</a> {
+  DOMString message;
+  DOMString filename;
+  unsigned long lineno;
+  unsigned long colno;
+  any error;
+};</pre>
+
+  <p>The <dfn id=3Ddom-errorevent-message title=3Ddom-ErrorEven=
t-message><code>message</code></dfn> attribute must =
return the
+  value it was initialized to. When the object is created, this attribut=
e must be initialized to the
+  empty string. It represents the error message.</p>
+
+  <p>The <dfn id=3Ddom-errorevent-filename title=3Ddom-ErrorEve=
nt-filename><code>filename</code></dfn> attribute mu=
st return the
+  value it was initialized to. When the object is created, this attribut=
e must be initialized to the
+  empty string. It represents the <a href=3D#absolute-url>absolute=
 URL</a> of the script in which the error
+  originally occurred.</p>
+
+  <p>The <dfn id=3Ddom-errorevent-lineno title=3Ddom-ErrorEvent=
-lineno><code>lineno</code></dfn> attribute must ret=
urn the
+  value it was initialized to. When the object is created, this attribut=
e must be initialized to
+  zero. It represents the line number where the error occurred in the sc=
ript.</p>
+
+  <p>The <dfn id=3Ddom-errorevent-colno title=3Ddom-ErrorEvent-=
colno><code>colno</code></dfn> attribute must return=
 the value
+  it was initialized to. When the object is created, this attribute must=
 be initialized to zero. It
+  represents the column number where the error occurred in the script.&l=
t;/p>
+
+  <p>The <dfn id=3Ddom-errorevent-error title=3Ddom-ErrorEvent-=
error><code>error</code></dfn> attribute must return=
 the value
+  it was initialized to. When the object is created, this attribute must=
 be initialized to null.
+  Where appropriate, it is set to the object representing the error (e.g=
. the exception object in
+  the case of an uncaught DOM exception).</p>
+
+
+
+  <div class=3Dimpl>
+
+  <h4 id=3Devent-loops><span class=3Dsecno>7.1.4 </span&g=
t;Event loops</h4>
+
+  <h5 id=3Ddefinitions-1><span class=3Dsecno>7.1.4.1 </sp=
an>Definitions</h5>
+
+  <p>To coordinate events, user interaction, scripts, rendering, n=
etworking, and so forth, user
+  agents must use <dfn id=3Devent-loop title=3D"event loop"=
>event loops</dfn> as described in this section.</p>
+
+  <p>There must be at least one <a href=3D#event-loop>event =
loop</a> per user agent, and at most one <a href=3D#event-loop&g=
t;event
+  loop</a> per <a href=3D#unit-of-related-similar-origin-browsi=
ng-contexts>unit of related similar-origin browsing contexts</a>=
.</p>
+
+  <p class=3Dnote>When there is more than one <a href=3D#event-=
loop>event loop</a> for a <a href=3D#unit-of-related-browsing=
-contexts>unit of related
+  browsing contexts</a>, complications arise when a <a href=3D#=
browsing-context>browsing context</a> in that group
+  is <a href=3D#navigate title=3Dnavigate>navigated</a> such=
 that it switches from one <a href=3D#unit-of-related-similar-origin-b=
rowsing-contexts>unit of related
+  similar-origin browsing contexts</a> to another. This specificat=
ion does not currently describe
+  how to handle these complications.</p>
+
+  <p>An <a href=3D#event-loop>event loop</a> always ha=
s at least one <a href=3D#browsing-context>browsing context</a&g=
t;. If an
+  <a href=3D#event-loop>event loop</a>'s <a href=3D#brows=
ing-context title=3D"browsing context">browsing contexts<=
/a> all go away,
+  then the <a href=3D#event-loop>event loop</a> goes away as=
 well. A <a href=3D#browsing-context>browsing context</a> alw=
ays has an
+  <a href=3D#event-loop>event loop</a> coordinating its acti=
vities.</p>
+
+  <p>An <a href=3D#event-loop>event loop</a> has one o=
r more <dfn id=3Dtask-queue title=3D"task queue">task que=
ues</dfn>. A
+  <a href=3D#task-queue>task queue</a> is an ordered list of=
 <dfn id=3Dconcept-task title=3Dconcept-task>tasks</dfn>, whi=
ch are
+  algorithms that are responsible for such work as:</p>
+
+  <dl><dt>Events</dt>
+
+   <dd>
+
+    <p>Asynchronously dispatching an <code><a href=3D#eve=
nt>Event</a></code> object at a particular
+    <code><a href=3D#eventtarget>EventTarget</a></c=
ode> object is often done by a dedicated task.</p>
+
+    <p class=3Dnote>Not all events are dispatched using the <a =
href=3D#task-queue>task queue</a>, many are
+    dispatched synchronously during other tasks.</p>
+
+   </dd>
+
+
+   <dt>Parsing</dt>
+
+   <dd><p>The <a href=3D#html-parser>HTML parser</a=
> tokenizing one or more bytes, and then processing any
+   resulting tokens, is typically a task.</dd>
+
+
+   <dt>Callbacks</dt>
+
+   <dd><p>Calling a callback asynchronously is often done by=
 a dedicated task.</dd>
+
+
+   <dt>Using a resource</dt>
+
+   <dd><p>When an algorithm <a href=3D#fetch title=3Dfetc=
h>fetches</a> a resource, if the fetching occurs
+   asynchronously then the processing of the resource once some or all o=
f the resource is available
+   is performed by a task.</dd>
+
+
+   <dt>Reacting to DOM manipulation</dt>
+
+   <dd><p>Some elements have tasks that trigger in response =
to DOM manipulation, e.g. when that
+   element is <a href=3D#insert-an-element-into-a-document title=3D&q=
uot;insert an element into a document">inserted into the document=
</a>.</p>
+
+  </dl><p>Each <a href=3D#concept-task title=3Dconcept-ta=
sk>task</a> is associated with a <code><a href=3D#docum=
ent>Document</a></code>; if the
+  task was queued in the context of an element, then it is the element's=
 <code><a href=3D#document>Document</a></code>; i=
f
+  the task was queued in the context of a <a href=3D#browsing-context=
>browsing context</a>, then it is the
+  <a href=3D#browsing-context>browsing context</a>'s <a h=
ref=3D#active-document>active document</a> at the time the task =
was queued; if
+  the task was queued by or for a <a href=3D#concept-script title=3Dc=
oncept-script>script</a> then the document is
+  the <a href=3D#responsible-document>responsible document</a&g=
t; specified by the script's <a href=3D#settings-object>settings ob=
ject</a>.</p>
+
+  <p>A <a href=3D#concept-task title=3Dconcept-task>task<=
/a> is intended for a specific <a href=3D#event-loop>event loop&=
lt;/a>:
+  the <a href=3D#event-loop>event loop</a> that is handling =
<a href=3D#concept-task title=3Dconcept-task>tasks</a> for th=
e <a href=3D#concept-task title=3Dconcept-task>task</a>'s ass=
ociated <code><a href=3D#document>Document</a></code=
>.</p>
+
+  <p>When a user agent is to <dfn id=3Dqueue-a-task>queue a =
task</dfn>, it must add the given task to one of the <a href=3D#=
task-queue title=3D"task queue">task queues</a> of the=
 relevant <a href=3D#event-loop>event loop</a>.</p>
+
+  <p>Each <a href=3D#concept-task title=3Dconcept-task>task&=
lt;/a> is defined as coming from a specific <dfn id=3Dtask-source&g=
t;task
+  source</dfn>. All the tasks from one particular <a href=3D#ta=
sk-source>task source</a> and destined to a
+  particular <a href=3D#event-loop>event loop</a> (e.g. the =
callbacks generated by timers of a
+  <code><a href=3D#document>Document</a></code>,=
 the events fired for mouse movements over that <code><a href=3D=
#document>Document</a></code>, the
+  tasks queued for the parser of that <code><a href=3D#document=
>Document</a></code>) must always be added to the same
+  <a href=3D#task-queue>task queue</a>, but <a href=3D#co=
ncept-task title=3Dconcept-task>tasks</a> from different <a h=
ref=3D#task-source title=3D"task source">task sources</a&=
gt; may be placed in different <a href=3D#task-queue title=3D"tas=
k queue">task
+  queues</a>.</p>
+
+  <p class=3Dexample>For example, a user agent could have one <=
a href=3D#task-queue>task queue</a> for mouse and
+  key events (the <a href=3D#user-interaction-task-source>user int=
eraction task source</a>), and another for everything else. The
+  user agent could then give keyboard and mouse events preference over o=
ther tasks three quarters of
+  the time, keeping the interface responsive but not starving other task=
 queues, and never
+  processing events from any one <a href=3D#task-source>task sourc=
e</a> out of order.</p>
+
+  <hr><p>A user agent may have one <dfn id=3Dstorage-mute=
x>storage mutex</dfn>. This mutex is used to control access to
+  shared state like cookies. At any one point, the <a href=3D#storage=
-mutex>storage mutex</a> is either free, or
+  owned by a particular <a href=3D#event-loop>event loop</a>=
 or instance of the <a href=3D#fetch title=3Dfetch>fetching</a&g=
t; algorithm.</p>
+
+  <p>If a user agent does not implement a <a href=3D#storage-mu=
tex>storage mutex</a>, it is exempt from implementing
+  the requirements that require it to acquire or release it.</p>
+
+  <p class=3Dnote>User agent implementors have to make a choice be=
tween two evils. On the one hand,
+  not implementing the storage mutex means that there is a risk of data =
corruption: a site could,
+  for instance, try to read a cookie, increment its value, then write it=
 back out, using the new
+  value of the cookie as a unique identifier for the session; if the sit=
e does this twice in two
+  different browser windows at the same time, it might end up using the =
same "unique" identifier for
+  both sessions, with potentially disastrous effects. On the other hand,=
 implementing the storage
+  mutex has potentially serious performance implications: whenever a sit=
e uses Web Storage or
+  cookies, all other sites that try to use Web Storage or cookies are bl=
ocked until the first site
+  finishes.</p>
+
+  <p>Whenever a <a href=3D#concept-script title=3Dconcept-scrip=
t>script</a> calls into a <a href=3D#plugin>plugin</a&g=
t;, and
+  whenever a <a href=3D#plugin>plugin</a> calls into a <a=
 href=3D#concept-script title=3Dconcept-script>script</a>, the u=
ser
+  agent must release the <a href=3D#storage-mutex>storage mutex&lt=
;/a>.</p>
+
+
+  <h5 id=3Dprocessing-model-4><span class=3Dsecno>7.1.4.2 &l=
t;/span>Processing model</h5>
+
+  <p>An <a href=3D#event-loop>event loop</a> must cont=
inually run through the following steps for as long as it
+  exists:</p>
+
+  <ol><!-- if you add a step here, make sure to go through the =
spec updating references to the "first
+   step" or "step 1" of the event loop --><li>&l=
t;p>Run the oldest <a href=3D#concept-task title=3Dconcept-task>=
task</a> on one of the <a href=3D#event-loop>event
+   loop</a>'s <a href=3D#task-queue title=3D"task queue&qu=
ot;>task queues</a>, if any, ignoring tasks whose
+   associated <code><a href=3D#document>Document</a>&l=
t;/code>s are not <a href=3D#fully-active>fully active</a>=
. The user agent may pick any
+   <a href=3D#task-queue>task queue</a>.</li>
+
+   <!-- warning! if you renumber these steps, make sure to update the=
 "spin the event loop"
+   algorithm below! -->
+
+   <li><p>If the <a href=3D#storage-mutex>storage mute=
x</a> is now owned by the <a href=3D#event-loop>event loop&lt=
;/a>, release it
+   so that it is once again free.</li>
+
+   <li><p>If a task was run in the first step above, remove =
that task from its <a href=3D#task-queue>task
+   queue</a>.</li>
+
+   <li>
+
+    <p>If this <a href=3D#event-loop>event loop</a> is=
 not a worker's <a href=3D#event-loop>event loop</a>, run the=
se
+    substeps:</p>
+
+    <ol><li><p><a href=3D#perform-a-microtask-check=
point>Perform a microtask checkpoint</a>.</li>
+
+     <li><p><a href=3D#provide-a-stable-state>Provide =
a stable state</a>.</li>
+
+     <li><p>If necessary, update the rendering or user inter=
face of any <code><a href=3D#document>Document</a></=
code> or
+     <a href=3D#browsing-context>browsing context</a> to ref=
lect the current state.</li>
+
+    </ol></li>
+
+   <li><p>Otherwise, if this <a href=3D#event-loop>eve=
nt loop</a> is running for a
+   <code><a href=3D#workerglobalscope>WorkerGlobalScope</=
a></code>, but there are no events in the <a href=3D#event-lo=
op>event loop</a>'s <a href=3D#task-queue title=3D"task =
queue">task queues</a> and the <code><a href=3D#wo=
rkerglobalscope>WorkerGlobalScope</a></code> object's <=
a href=3D#dom-workerglobalscope-closing title=3Ddom-WorkerGlobalScope-clo=
sing>closing</a> flag is true, then destroy the <a href=3D#ev=
ent-loop>event
+   loop</a>, aborting these steps.</li>
+
+   <li><p>Return to the first step of the <a href=3D#even=
t-loop>event loop</a>.</li>
+
+  </ol><hr><!--CLEANUP--><p>When a user agent is=
 to <dfn id=3Dperform-a-microtask-checkpoint>perform a microtask ch=
eckpoint</dfn>, if the <a href=3D#performing-a-microtask-checkpo=
int>performing a microtask checkpoint</a> flag is false, then th=
e user agent must run the following steps:</p>
+
+  <ol><!--CLEANUP--><li><p>Let the <a href=3D=
#performing-a-microtask-checkpoint>performing a microtask checkpoint&l=
t;/a> flag be true.</li>
+
+   <li><p><dfn id=3Dperform-a-custom-elements-checkpoint&=
gt;Perform a custom elements checkpoint</dfn>. <a href=3D#refsCU=
STOM>[CUSTOM]</a></li>
+
+   <li><p><a href=3D#sort-the-tables-with-pending-sorts&g=
t;Sort the tables with pending sorts</a>.</li>
+
+   <li>
+
+<!--CLEANUP-->
+    <p><a href=3D#concept-mo-invoke title=3Dconcept-mo-invoke&g=
t;Invoke <code>MutationObserver</code> objects</a> for =
the
+    <a href=3D#unit-of-related-similar-origin-browsing-contexts>un=
it of related similar-origin browsing contexts</a> to which the &lt=
;a href=3D#responsible-browsing-context>responsible
+    browsing context</a> specified by the script's <a href=3D#s=
ettings-object>settings object</a> belongs, using the <a href=
=3D#task-wrapper-algorithm>task wrapper algorithm</a> as the ste=
ps to
+    invoke each callback.</p>
+
+<!--CLEANUP-->
+    <p class=3Dnote>This will typically invoke scripted callbacks,=
=20
+    which eventually calls the <a href=3D#clean-up-after-running-a-ca=
llback>clean up after running a callback</a> steps,
+    which call this <a href=3D#perform-a-microtask-checkpoint>perf=
orm a microtask checkpoint</a>
+    algorithm again, which is why we use the <a href=3D#performing-a-=
microtask-checkpoint>performing a microtask checkpoint</a> flag =
to avoid
+    reentrancy.</p>
+
+   </li>
+
+<!--CLEANUP-->
+   <li><p>Let the <a href=3D#performing-a-microtask-check=
point>performing a microtask checkpoint</a> flag be false.</l=
i>
+
+  </ol><hr><p>When the user agent is to <dfn id=3Dp=
rovide-a-stable-state>provide a stable state</dfn>, if any async=
hronously-running
+  algorithms are <dfn id=3Dawait-a-stable-state title=3D"await a=
 stable state">awaiting a stable state</dfn>, then the user
+  agent must run their <dfn id=3Dsynchronous-section>synchronous s=
ection</dfn> and then resume running their asynchronous
+  algorithm (if appropriate).</p>
+
+  <p class=3Dnote>A <a href=3D#synchronous-section>synchrono=
us section</a> never mutates the DOM, runs any script, or has
+  any side-effects detectable from another <a href=3D#synchronous-sec=
tion>synchronous section</a>, and thus <a href=3D#synchronous=
-section title=3D"synchronous section">synchronous sections&=
lt;/a> can be run in any order, and cannot
+  <a href=3D#spin-the-event-loop>spin the event loop</a>.&lt=
;/p>
+
+  <p class=3Dnote>Steps in <a href=3D#synchronous-section title=
=3D"synchronous section">synchronous sections</a> are =
marked
+  with ⌛.</p>
+
+  <hr><p>The <dfn id=3Dtask-wrapper-algorithm>task wra=
pper algorithm</dfn>, which is implicitly invoked in the context of=
 an
+  <a href=3D#event-loop>event loop</a> and is used to invoke=
 a given <var title=3D"">callback</var> in a specif=
ic
+  way, is as follows:</p>
+
+  <ol><li><p>Invoke <var title=3D"">ca=
llback</var> as specified.</li>
+
+  </ol><p class=3Dcritical>The above will change in due cour=
se; see <a href=3D"https://www.w3.org/Bugs/Public/show_bug.cgi?id=
=3D20821">bug 20821</a>.</p>
+
+  <hr><p>When an algorithm says to <dfn id=3Dspin-the-eve=
nt-loop>spin the event loop</dfn> until a condition <var titl=
e=3D"">goal</var> is met, the user agent must run the =
following steps:</p>
+
+  <ol><li><p>Let <var title=3D"">task =
source</var> be the <a href=3D#task-source>task source</a&=
gt; of the currently
+   running <a href=3D#concept-task title=3Dconcept-task>task</a=
>.</li>
+
+<!--CLEANUP-->
+   <li><p>Let <var title=3D"">old stack of s=
cript settings objects</var> be a copy of the <a href=3D#stack-o=
f-script-settings-objects>stack of
+   script settings objects</a>.</li>
+
+   <li><p>Empty the <a href=3D#stack-of-script-settings-o=
bjects>stack of script settings objects</a>.</li>
+
+   <li><p><a href=3D#run-the-global-script-clean-up-jobs&=
gt;Run the global script clean-up jobs</a>.</li>
+
+   <li><p><a href=3D#perform-a-microtask-checkpoint>Pe=
rform a microtask checkpoint</a>.</li>
+
+   <li>
+
+    <p>Stop the currently running <a href=3D#concept-task title=
=3Dconcept-task>task</a>, allowing the <a href=3D#event-loop&=
gt;event
+    loop</a> to resume, but continue these steps asynchronously.&l=
t;/p>
+
+    <p class=3Dnote>This causes the <a href=3D#event-loop>ev=
ent loop</a> to move on to the second step of its
+    processing model (defined above).</p>
+
+   </li>
+
+   <li><p>Wait until the condition <var title=3D"&qu=
ot;>goal</var> is met.</li>
+
+   <li><p><a href=3D#queue-a-task>Queue a task</a&g=
t; to continue running these steps, using the <a href=3D#task-source&g=
t;task
+   source</a> <var title=3D"">task source</var&=
gt;. Wait until this task runs before continuing these
+   steps.</li>
+
+<!--CLEANUP-->
+   <li><p>Replace the <a href=3D#stack-of-script-settings=
-objects>stack of script settings objects</a> with the <var t=
itle=3D"">old stack of
+   script settings objects</var>.</li>
+
+   <li><p>Return to the caller.</li>
+
+  </ol><hr><p>Some of the algorithms in this specifica=
tion, for historical reasons, require the user agent to
+  <dfn id=3Dpause>pause</dfn> while running a <a href=3D#=
concept-task title=3Dconcept-task>task</a> until a condition &lt=
;var title=3D"">goal</var> is met. This means running =
the following steps:</p>
+
+  <ol><li><p>If any asynchronously-running algorithms =
are <a href=3D#await-a-stable-state title=3D"await a stable state=
">awaiting a
+   stable state</a>, then run their <a href=3D#synchronous-sect=
ion>synchronous section</a> and then resume running
+   their asynchronous algorithm. (See the <a href=3D#event-loop>ev=
ent loop</a> processing model definition above
+   for details.)</p>
+
+   <li><p>If necessary, update the rendering or user interfa=
ce of any <code><a href=3D#document>Document</a></co=
de> or
+   <a href=3D#browsing-context>browsing context</a> to refle=
ct the current state.</li>
+
+   <li><p>Wait until the condition <var title=3D"&qu=
ot;>goal</var> is met. While a user agent has a paused
+   <a href=3D#concept-task title=3Dconcept-task>task</a>, th=
e corresponding <a href=3D#event-loop>event loop</a> must not=
 run
+   further <a href=3D#concept-task title=3Dconcept-task>tasks</=
a>, and any script in the currently running <a href=3D#concept-task=
 title=3Dconcept-task>task</a> must block. User agents should re=
main responsive to user input
+   while paused, however, albeit in a reduced capacity since the <a h=
ref=3D#event-loop>event loop</a> will not be
+   doing anything.</li>
+
+  </ol><hr><p>When a user agent is to <dfn id=3Dobt=
ain-the-storage-mutex>obtain the storage mutex</dfn> as part of =
running a <a href=3D#concept-task title=3Dconcept-task>task</a&g=
t;, it must run through the following steps:</p>
+
+  <ol><li><p>If the <a href=3D#storage-mutex>sto=
rage mutex</a> is already owned by this <a href=3D#concept-task =
title=3Dconcept-task>task</a>'s <a href=3D#event-loop>even=
t loop</a>, then abort these steps.</li>
+
+   <li><p>Otherwise, <a href=3D#pause>pause</a> =
until the <a href=3D#storage-mutex>storage mutex</a> can be t=
aken by the
+   <a href=3D#event-loop>event loop</a>.</li>
+
+   <li><p>Take ownership of the <a href=3D#storage-mutex&=
gt;storage mutex</a>.</li>
+
+  </ol></div>
+
+
+  <div class=3Dimpl>
+
+  <h5 id=3Dgeneric-task-sources><span class=3Dsecno>7.1.4.3 =
</span>Generic task sources</h5>
+
+  <p>The following <a href=3D#task-source title=3D"task so=
urce">task sources</a> are used by a number of mostly
+  unrelated features in this and other specifications.</p>
+
+  <dl><dt>The <dfn id=3Ddom-manipulation-task-source>D=
OM manipulation task source</dfn></dt>
+
+   <dd>
+
+    <p>This <a href=3D#task-source>task source</a> is =
used for features that react to DOM manipulations, such as
+    things that happen asynchronously when an element is <a href=3D#i=
nsert-an-element-into-a-document title=3D"insert an element into a
+    document">inserted into the document</a>.</p>
+
+   </dd>
+
+   <dt>The <dfn id=3Duser-interaction-task-source>user inter=
action task source</dfn></dt>
+
+   <dd>
+
+    <p>This <a href=3D#task-source>task source</a> is =
used for features that react to user interaction, for
+    example keyboard or mouse input.</p>
+
+    <p>Asynchronous events sent in response to user input (e.g. &l=
t;code title=3Devent-click><a href=3D#event-click>click</a&gt=
;</code> events) must be fired using <a href=3D#concept-task tit=
le=3Dconcept-task>tasks</a> <a href=3D#queue-a-task title=3D&=
quot;queue a task">queued</a> with the <a href=3D#user-i=
nteraction-task-source>user
+    interaction task source</a>. <a href=3D#refsDOMEVENTS>[D=
OMEVENTS]</a></p> <!-- user
+    interaction events integration point -->
+
+   </dd>
+
+   <dt>The <dfn id=3Dnetworking-task-source>networking task =
source</dfn></dt>
+
+   <dd>
+
+    <p>This <a href=3D#task-source>task source</a> is =
used for features that trigger in response to network
+    activity.</p>
+
+   </dd>
+
+   <dt>The <dfn id=3Dhistory-traversal-task-source>history t=
raversal task source</dfn></dt>
+
+   <dd>
+
+    <p>This <a href=3D#task-source>task source</a> is =
used to queue calls to <code title=3Ddom-history-back><a href=3D=
#dom-history-back>history.back()</a></code> and similar AP=
Is.</p>
+
+   </dd>
+
+  </dl></div>
+
+
+  <div class=3Dimpl>
+
+  <!-- SCRIPT EXEC -->
+  <h4 id=3Djavascript-protocol><span class=3Dsecno>7.1.5 &lt=
;/span><dfn title=3D"javascript protocol">The <code=
 title=3D"">javascript:</code> URL scheme</dfn>&=
lt;/h4>
+
+  <p>When a <a href=3D#url>URL</a> using the <code =
title=3D"">javascript:</code> scheme is <dfn id=3Dc=
oncept-js-deref title=3Dconcept-js-deref>dereferenced</dfn>, the=
 user agent must run the following steps:</p>
+
+  <ol><li><p>Let the script source be the string obtai=
ned using the content retrieval operation defined
+   for <code title=3D"">javascript:</code> URLs. &=
lt;a href=3D#refsJSURL>[JSURL]</a></li>
+
+   <li>
+
+    <p>Use the appropriate step from the following list:</p>
+
+    <dl><dt>If a <a href=3D#browsing-context>browsing =
context</a> is being <a href=3D#navigate title=3Dnavigate>nav=
igated</a> to a
+     <code>javascript:</code> URL, and the <a href=3D#sou=
rce-browsing-context>source browsing context</a> for that naviga=
tion,
+     if any, has <a href=3D#concept-bc-noscript title=3Dconcept-bc-no=
script>scripting disabled</a></dt>
+
+     <dd>
+
+      <p>Let <var title=3D"">result</var> be=
 void.</p>
+
+     </dd>
+
+     <dt>If a <a href=3D#browsing-context>browsing context&l=
t;/a> is being <a href=3D#navigate title=3Dnavigate>navigated&lt=
;/a> to a
+     <code>javascript:</code> URL, and the <a href=3D#act=
ive-document>active document</a> of that browsing context has
+     the <a href=3D#same-origin>same origin</a> as the scrip=
t given by that URL</dt>
+
+     <dd>
+
+      <!-- http://www.hixie.ch/tests/adhoc/html/navigation/javascript=
-url/ -->
+
+      <p>Let <var title=3D"">address</var> b=
e the <a href=3D"#the-document's-address" title=3D"the =
document's address">address</a>
+      of the <a href=3D#active-document>active document</a> =
of the <a href=3D#browsing-context>browsing context</a> being=
 navigated.</p>
+
+      <p>If <var title=3D"">address</var> is=
 <code><a href=3D#about:blank>about:blank</a></code&=
gt;, and the <a href=3D#browsing-context>browsing
+      context</a> being navigated has a <a href=3D#creator-brow=
sing-context>creator browsing context</a>, then let <var titl=
e=3D"">address</var> be the <a href=3D"#the-do=
cument's-address" title=3D"the document's address">addr=
ess</a> of the
+      <a href=3D#creator-document>creator <code>Document<=
/code></a> instead.</p>
+
+      <p><a href=3D#create-a-script>Create a script</a&gt=
;, using the aforementioned script source, the <a href=3D#url>URL&l=
t;/a>
+      of the resource where the <code>javascript:</code> URL=
, was found, JavaScript as the scripting
+      language, and the <a href=3D#script-settings-object>script s=
ettings object</a> of the <code><a href=3D#window>Windo=
w</a></code> object of the
+      <a href=3D#active-document>active document</a>.</p&=
gt;
+
+      <p>Let <var title=3D"">result</var> be=
 the return value of the <a href=3D#code-entry-point>code entry-poi=
nt</a>
+      of this <a href=3D#concept-script title=3Dconcept-script>scr=
ipt</a>. If an exception was thrown, let <var title=3D"&quo=
t;>result</var> be void instead. (The result will be void also i=
f <a href=3D#concept-bc-noscript title=3Dconcept-bc-noscript>script=
ing is disabled</a>.)</p>
+
+      <p>When it comes time to <a href=3D"#set-the-documen=
t's-address">set the document's address</a> in the <a hr=
ef=3D#navigate title=3Dnavigate>navigation algorithm</a>, use &l=
t;var title=3D"">address</var> as the
+      <a href=3D#override-url>override URL</a>.</p>
+
+     </dd>
+
+     <dt>Otherwise</dt>
+
+     <dd>
+
+      <p>Let <var title=3D"">result</var> be=
 void.</p>
+
+     </dd>
+
+    </dl></li>
+
+   <li>
+
+    <p>If the result of executing the script is void (there is no =
return value), then the URL must
+    be treated in a manner equivalent to an HTTP resource with an HTTP 2=
04 No Content response.</p>
+
+    <p>Otherwise, the URL must be treated in a manner equivalent t=
o an HTTP resource with a 200 OK
+    response whose <a href=3D#content-type title=3DContent-Type>Co=
ntent-Type metadata</a> is <code><a href=3D#text/html>t=
ext/html</a></code>
+    and whose response body is the return value converted to a string va=
lue.</p>
+
+    <p class=3Dnote>Certain contexts, in particular <code>&l=
t;a href=3D#the-img-element>img</a></code> elements, ignor=
e the <a href=3D#content-type title=3DContent-Type>Content-Type met=
adata</a>.</p>
+
+   </li>
+
+  </ol><div class=3Dexample>
+
+   <p>So for example a <code title=3D"">javascript=
:</code> URL for a <code title=3Dattr-img-src><a href=3D#a=
ttr-img-src>src</a></code> attribute of an <code>&lt=
;a href=3D#the-img-element>img</a></code> element would be=
 evaluated in
+   the context of an empty object as soon as the attribute is set; it wo=
uld then be sniffed to
+   determine the image type and decoded as an image.</p>
+
+   <p>A <code title=3D"">javascript:</code> =
URL in an <code title=3Dattr-hyperlink-href><a href=3D#attr-hype=
rlink-href>href</a></code>
+   attribute of an <code><a href=3D#the-a-element>a</a&gt=
;</code> element would only be evaluated when the link was <a hr=
ef=3D#following-hyperlinks title=3D"following hyperlinks">fo=
llowed</a>.</p>
+
+   <p>The <code title=3Dattr-iframe-src><a href=3D#attr-i=
frame-src>src</a></code> attribute of an <code><a=
 href=3D#the-iframe-element>iframe</a></code> element woul=
d
+   be evaluated in the context of the <code><a href=3D#the-ifra=
me-element>iframe</a></code>'s own <a href=3D#browsing-=
context>browsing context</a>; once
+   evaluated, its return value (if it was not void) would replace that &=
lt;a href=3D#browsing-context>browsing
+   context</a>'s document, thus changing the variables visible in =
that <a href=3D#browsing-context>browsing
+   context</a>.</p>
+
+  </div>
+
+  </div>
+
+
+
+  <h4 id=3Devents><span class=3Dsecno>7.1.6 </span>Eve=
nts</h4>
+
+  <h5 id=3Devent-handler-attributes><span class=3Dsecno>7.1.=
6.1 </span>Event handlers</h5>
+
+  <!--test: <a href=3D"http://software.hixie.ch/utilities/js/=
live-dom-viewer/?%3C!DOCTYPE%20html%3E%0A...%3Cscript%3E%0Aw(a%3Ddocument=
.implementation.createDocument(null%2C%20null%2C%20null))%3B%0Aw(a.append=
Child(a.createElementNS('http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml'%2C%20'ht=
ml')))%3B%0Aw(b%3Da.firstChild.appendChild(a.createElementNS('http%3A%2F%=
2Fwww.w3.org%2F1999%2Fxhtml'%2C%20'body')))%3B%0Aw(b.test%20%3D%20w)%3B%0=
Aw(b.setAttribute('onclick'%2C%20'test(%22fire%3A%20%22%20%2B%20event)'))=
%3B%0Aw(b.onclick)%3B%0Aw(e%3Da.createEvent('Event'))%3B%0Aw(e.initEvent(=
'click'%2C%20false%2C%20false))%3B%0Aw(b.dispatchEvent(e))%3B%0A%3C%2Fscr=
ipt%3E">test</a>-->
+
+  <p>Many objects can have <dfn id=3Devent-handlers>event ha=
ndlers</dfn> specified. These act as non-capture event
+  listeners for the object on which they are specified. <a href=3D#re=
fsDOM>[DOM]</a></p>
+
+  <p>An <a href=3D#event-handlers title=3D"event handlers&=
quot;>event handler</a> has a name, which always starts with
+  "<code title=3D"">on</code>" and is fo=
llowed by the name of the event for which it is intended.</p>
+
+  <p>An <a href=3D#event-handlers title=3D"event handlers&=
quot;>event handler</a> can either have the value null or be set
+  to a callback object. This is defined using the <code><a href=
=3D#eventhandler>EventHandler</a></code> callback function=
 type.
+  <span class=3Dimpl>Initially, event handlers must be set to null=
.</span></p>
+
+  <p>Event handlers are exposed in one of two ways.</p>
+
+  <p>The first way, common to all event handlers, is as an <a h=
ref=3D#event-handler-idl-attributes title=3D"event handler IDL
+  attributes">event handler IDL attribute</a>.</p>
+
+  <p>The second way is as an <a href=3D#event-handler-content-a=
ttributes title=3D"event handler content attributes">event h=
andler content
+  attribute</a>. Event handlers on <a href=3D#html-elements>=
HTML elements</a> and some of the event handlers on
+  <code><a href=3D#window>Window</a></code> obje=
cts are exposed in this way.</p>
+
+  <div class=3Dimpl>
+
+  <hr><p>An <dfn id=3Devent-handler-idl-attributes title=3D=
"event handler IDL attributes">event handler IDL attribute&l=
t;/dfn> is an IDL
+  attribute for a specific <a href=3D#event-handlers title=3D"ev=
ent handlers">event handler</a>. The name of the IDL
+  attribute is the same as the name of the <a href=3D#event-handlers =
title=3D"event handlers">event handler</a>.</p>
+
+  <p><a href=3D#event-handler-idl-attributes>Event handler I=
DL attributes</a>, on setting, must set the corresponding event han=
dler
+  to their new value, and on getting, must return whatever the current v=
alue of the corresponding
+  event handler is (possibly null).</p>
+
+  <p>If an <a href=3D#event-handler-idl-attributes title=3D&quo=
t;event handler IDL attributes">event handler IDL attribute</a=
> exposes an
+  <a href=3D#event-handlers title=3D"event handlers">eve=
nt handler</a> of an object that doesn't exist, it must always
+  return null on getting and must do nothing on setting.</p>
+
+  <p class=3Dnote>This can happen in particular for <a href=3D#=
event-handler-idl-attributes title=3D"event handler IDL attributes&q=
uot;>event
+  handler IDL attribute</a> on <code><a href=3D#the-body-=
element>body</a></code> elements that do not have correspo=
nding
+  <code><a href=3D#window>Window</a></code> obje=
cts.</p>
+
+  <p class=3Dnote>Certain event handler IDL attributes have additi=
onal requirements, in particular
+  the <code title=3Dhandler-MessagePort-onmessage><a href=3D#ha=
ndler-messageport-onmessage>onmessage</a></code> attribute=
 of
+  <code><a href=3D#messageport>MessagePort</a></cod=
e> objects.</p>
+
+  <p>On getting, <a href=3D#event-handler-idl-attributes>eve=
nt handler IDL attributes</a> must return the value of their
+  corresponding <a href=3D#event-handlers>event handlers</a>=
, except when the value is an <a href=3D#concept-handler-error title=3D=
concept-handler-error>internal error value</a>, in which case th=
e user agent must set
+  the corresponding event handler to null, and then throw an exception c=
orresponding to the error
+  condition.</p>
+
+  <hr></div>
+
+  <p>An <dfn id=3Devent-handler-content-attributes title=3D&quo=
t;event handler content attributes">event handler content attribu=
te</dfn> is a
+  content attribute for a specific <a href=3D#event-handlers title=3D=
"event handlers">event handler</a>. The name of
+  the content attribute is the same as the name of the <a href=3D#eve=
nt-handlers title=3D"event handlers">event
+  handler</a>.</p>
+
+  <p><a href=3D#event-handler-content-attributes>Event handl=
er content attributes</a>, when specified, must contain valid JavaS=
cript
+  code which, when parsed, would match the <code title=3D""=
>FunctionBody</code> production after
+  automatic semicolon insertion. <a href=3D#refsECMA262>[ECMA262]&=
lt;/a></p>
+
+  <div class=3Dimpl>
+
+  <!-- SCRIPT EXEC -->
+  <p>When an <a href=3D#event-handler-content-attributes title=3D=
"event handler content attributes">event handler content att=
ribute</a>
+  is set, if the element is owned by a <code><a href=3D#documen=
t>Document</a></code> that is in a <a href=3D#browsing-=
context>browsing
+  context</a>, and <a href=3D#concept-bc-script title=3Dconcept=
-bc-script>scripting is enabled</a> for that
+  <a href=3D#browsing-context>browsing context</a>, the user=
 agent must run the following steps to create a <a href=3D#concept-scr=
ipt title=3Dconcept-script>script</a> after setting the content =
attribute to its new value:</p>
+
+  <ol><li><p>Set the corresponding <a href=3D#event=
-handlers title=3D"event handlers">event handler</a> t=
o null.</li>
+
+   <li><p>Let <var title=3D"">script setting=
s</var> be the <a href=3D#script-settings-object>script setti=
ngs object</a> of the
+   <code><a href=3D#window>Window</a></code> obj=
ect associated with the <a href=3D#browsing-context>browsing contex=
t</a> to which belongs the
+   <code><a href=3D#document>Document</a></code>=
 of the element in question.</li>
+
+   <li><p>Obtain the <a href=3D#script-execution-environm=
ent>script execution environment</a> for JavaScript from <var=
 title=3D"">script settings</var>.</li>
+
+   <li><p>Let <var title=3D"">body</var&g=
t; be the <a href=3D#event-handler-content-attributes title=3D"ev=
ent handler content attributes">event
+   handler content attribute</a>'s new value.</li>
+
+   <li>
+
+    <p>If <var title=3D"">body</var> is not =
parsable as <i>FunctionBody</i> or if parsing detects an
+    <i>early error</i> then <a href=3D#set-the-event-hand=
ler-content-attribute-to-an-error>set the event handler content attrib=
ute to an error</a> as
+    defined below, and abort these steps.</p>
+
+    <p class=3Dnote><i>FunctionBody</i> is defined in =
ECMAScript edition 5 section 13 Function
+    Definition. <i>Early error</i> is defined in ECMAScript =
edition 5 section 16 Errors. <a href=3D#refsECMA262>[ECMA262]</a=
></p>
+
+   </li>
+
+   <li>
+
+    <p>If <var title=3D"">body</var> begins =
with a Directive Prologue that contains a Use Strict
+    Directive then let <var title=3D"">strict</var&gt=
; be true, otherwise let <var title=3D"">strict</var&g=
t;
+    be false.</p> <!-- we can't defer to 10.1.1 since we're not=
 using a Function constructor but
+    doing it ourselves. -->
+
+    <p class=3Dnote>The terms "Directive Prologue" and &=
quot;Use Strict Directive" are defined in
+    ECMAScript edition 5 section 14.1 Directive Prologues and the Use St=
rict Directive. <a href=3D#refsECMA262>[ECMA262]</a></p&gt=
;
+
+   </li>
+
+<!--
+currently this is unnecessary: http://www.w3.org/Bugs/Public/show_bug.cg=
i?id=3D11977#c4
+   <li>
+
+    <p>If <var title=3D"">strict</var> is tr=
ue, and anything in <var title=3D"">body</var> is a
+    <code>SyntaxError</code> according to the Strict Mode Re=
strictions, then <span>set the event
+    handler content attribute to an error</span> as defined below,=
 and abort these steps.</p>
+
+    <p class=3D"note">The Strict Mode Restrictions are t=
hose listed in ECMAScript edition 5 section
+    13.1 Strict Mode Restrictions. <a href=3D"#refsECMA262"=
>[ECMA262]</a></p>
+
+   </li>
+-->
+
+   <li>
+
+<!--CLEANUP-->
+    <p>Using the <a href=3D#script-execution-environment>scr=
ipt execution environment</a> obtained above, create a function obj=
ect (as defined in
+    ECMAScript edition 5 section 13.2 Creating Function Objects), with:&=
lt;/p>
+
+    <dl><dt>Parameter list <var title=3D"">F=
ormalParameterList</var></dt>
+
+     <dd>
+
+      <dl class=3Dswitch><dt>If the attribute is an <code=
 title=3Dhandler-onerror><a href=3D#handler-onerror>onerror</=
a></code> content attribute
+       corresponding to an <span>event handler</span> of a &=
lt;code><a href=3D#window>Window</a></code> object (=
that is, the
+       <code title=3Dhandler-onerror><a href=3D#handler-onerror=
>onerror</a></code> content attributes on <code><=
a href=3D#the-body-element>body</a></code> and
+       <code><a href=3D#frameset>frameset</a></code=
> elements)</dt>
+
+       <dd>Let the function have five arguments, named <code ti=
tle=3D"">event</code>, <code title=3D""&g=
t;source</code>, <code title=3D"">lineno</code&g=
t;, <code title=3D"">colno</code>,
+       and <code title=3D"">error</code>.</dd&g=
t;
+       <!-- /colno/ is new as of 2012; see https://www.w3.org/Bugs/Pu=
blic/show_bug.cgi?id=3D13319 and 22800 -->
+       <!-- /error/ is new as of 2013; see http://lists.w3.org/Archiv=
es/Public/public-whatwg-archive/2013Jul/0313.html -->
+
+       <dt>Otherwise</dt>
+
+       <dd>Let the function have a single argument called <code=
 title=3D"">event</code>.</dd>
+
+      </dl></dd>
+
+     <dt>Function body <var title=3D"">FunctionBod=
y</var></dt>
+
+     <dd>The result of parsing <var title=3D"">bod=
y</var> above.</dd>
+
+     <dt>Lexical Environment <var title=3D"">Scope=
</var></dt>
+
+     <dd>
+
+      <ol><li>Let <var title=3D"">Scope</=
var> be the result of NewObjectEnvironment(the element's
+       <code><a href=3D#document>Document</a></code=
>, the <var title=3D"">global environment</var>)=
.</li>
+
+       <li>If the element has a <a href=3D#form-owner>form o=
wner</a>, let <var title=3D"">Scope</var> be =
the result
+       of NewObjectEnvironment(the element's <a href=3D#form-owner&gt=
;form owner</a>, <var title=3D"">Scope</var>)=
.</li>
+
+       <li>Let <var title=3D"">Scope</var> b=
e the result of NewObjectEnvironment(the element's object,
+       <var title=3D"">Scope</var>).</li>
+
+      </ol><p class=3Dnote>NewObjectEnvironment() is defined=
 in ECMAScript edition 5 section 10.2.2.3
+      NewObjectEnvironment (O, E). <a href=3D#refsECMA262>[ECMA262=
]</a></p>
+
+     </dd>
+
+     <dt>Boolean flag <var title=3D"">Strict</v=
ar></dt>
+
+     <dd>The value of <var title=3D"">strict</v=
ar>.</dd>
+
+    </dl><!--CLEANUP--><p>Let this new function be a n=
ew <a href=3D#concept-script title=3Dconcept-script>script</a&gt=
;'s <a href=3D#code-entry-point>code entry-point</a>.</p&g=
t;
+
+   </li>
+
+   <li><p>Let that <a href=3D#concept-script title=3Dconc=
ept-script>script</a>'s <a href=3D#settings-object>setting=
s object</a> be
+   <var title=3D"">script settings</var>.</li&g=
t;
+
+   <li><p>Set the corresponding <a href=3D#event-handlers=
 title=3D"event handlers">event handler</a> to the
+   aforementioned function.</li>
+
+  </ol><p>When a user agent is required, by the steps above,=
 to <dfn id=3Dset-the-event-handler-content-attribute-to-an-error>s=
et the event handler content
+  attribute to an error</dfn>, the user agent must set the corresp=
onding <a href=3D#event-handlers title=3D"event
+  handlers">event handler</a> to an <dfn id=3Dconcept-h=
andler-error title=3Dconcept-handler-error>internal error value</df=
n>
+  representing the error condition, keeping track of the <a href=3D#u=
rl>URL</a> of the resource where the
+  <a href=3D#event-handler-content-attributes title=3D"event han=
dler content attributes">event handler content attribute</a&gt=
; was set, and
+  the relevant line number inside that resource where the error occurred=
.</p>
+
+  <p>When an event handler content attribute is removed, the user =
agent must set the corresponding
+  <a href=3D#event-handlers title=3D"event handlers">eve=
nt handler</a> to null.</p>
+  <!--
+  http://software.hixie.ch/utilities/js/live-dom-viewer/saved/245 onload
+  http://software.hixie.ch/utilities/js/live-dom-viewer/saved/247 onclic=
k
+  see http://www.w3.org/Bugs/Public/show_bug.cgi?id=3D7626#c5 for reason=
ing
+  -->
+
+  </div>
+
+  <p class=3Dnote>When an <a href=3D#event-handler-content-attr=
ibutes title=3D"event handler content attributes">event hand=
ler content
+  attribute</a> is set on an element owned by a <code><a =
href=3D#document>Document</a></code> that is not in a
+  <a href=3D#browsing-context>browsing context</a>, the corr=
esponding event handler is not changed.</p>
+
+  <!-- v2: we should probably support HTML4's Content-Script-Type hea=
der here. -->
+
+  <div class=3Dimpl>
+
+  <hr><p>When an <a href=3D#event-handlers title=3D"=
event handlers">event handler</a> <var title=3D"&qu=
ot;>H</var> of an element
+  or object <var title=3D"">T</var> implementing t=
he <code><a href=3D#eventtarget>EventTarget</a></cod=
e> interface is first set
+  to a non-null value, the user agent must append an <a href=3D#conce=
pt-event-listener title=3Dconcept-event-listener>event
+  listener</a> to the list of <a href=3D#concept-event-listener=
 title=3Dconcept-event-listener>event listeners</a>
+  associated with <var title=3D"">T</var> with &lt=
;i>type</i> set to the <dfn id=3Devent-handler-event-type>=
event handler event
+  type</dfn> corresponding to <var title=3D"">H&lt=
;/var>, <i>capture</i> set to false, and
+  <i>listener</i> set to <a href=3D#the-event-handler-pro=
cessing-algorithm>the event handler processing algorithm</a> def=
ined below. <a href=3D#refsDOM>[DOM]</a></p>
+
+  <p class=3Dnote>The <i>listener</i> is emphatically =
<em>not</em> the <a href=3D#event-handlers title=3D"e=
vent
+  handlers">event handler</a> itself. Every event handler =
ends up registering the same
+  <i>listener</i>, the algorithm defined below, which takes =
care of invoking the right callback, and
+  processing the callback's return value.</p>
+
+  <p class=3Dnote>This only happens the first time the <a href=3D=
#event-handlers title=3D"event handlers">event
+  handler</a>'s value is set. Since listeners are called in the or=
der they were registered, the
+  order of event listeners for a particular event type will always be fi=
rst the event listeners
+  registered with <code title=3Ddom-EventTarget-addEventListener>a=
ddEventListener()</code> before
+  the first time the <a href=3D#event-handlers title=3D"event ha=
ndlers">event handler</a> was set to a non-null value,
+  then the callback to which it is currently set, if any, and finally th=
e event listeners registered
+  with <code title=3Ddom-EventTarget-addEventListener>addEventList=
ener()</code> <em>after</em> the
+  first time the <a href=3D#event-handlers title=3D"event handle=
rs">event handler</a> was set to a non-null value.</p&gt=
;
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>This example demonstrates the order in which event listeners=
 are invoked. If the button in
+   this example is clicked by the user, the page will show four alerts, =
with the text "ONE", "TWO",
+   "THREE", and "FOUR" respectively.</p>
+
+   <pre><button id=3D"test">Start Demo&amp=
;lt;/button>
+<script>
+ var button =3D document.getElementById('test');
+ button.addEventListener('click', function () { alert('ONE') }, false);
+ button.setAttribute('onclick', "alert('NOT CALLED')"); // eve=
nt handler listener is registered here
+ button.addEventListener('click', function () { alert('THREE') }, false)=
;
+ button.onclick =3D function () { alert('TWO'); };
+ button.addEventListener('click', function () { alert('FOUR') }, false);
+</script></pre>
+
+  </div>
+
+  <div class=3Dimpl>
+
+  <p class=3Dnote>The interfaces implemented by the event object d=
o not influence whether an <a href=3D#event-handlers title=3D"eve=
nt handlers">event handler</a> is triggered or not.</p&g=
t;
+
+  <p><dfn id=3Dthe-event-handler-processing-algorithm>The ev=
ent handler processing algorithm</dfn> for an <a href=3D#event-h=
andlers title=3D"event handlers">event
+  handler</a> <var title=3D"">H</var> and an=
 <code><a href=3D#event>Event</a></code> object &=
lt;var title=3D"">E</var> is as
+  follows:</p>
+
+  <ol><li><p>If <var title=3D"">H</=
var>'s value is null, then abort these steps.</li>
+
+   <li><p>If <var title=3D"">H</var>'s=
 value is an <a href=3D#concept-handler-error title=3Dconcept-handler-=
error>internal error
+   value</a>, then: set the <a href=3D#event-handlers title=3D&=
quot;event handlers">event handler</a> to null and then
+   <a href=3D#report-the-error>report the error</a> for the =
appropriate <a href=3D#concept-script title=3Dconcept-script>script=
</a> and
+   with the appropriate position (line number and column number), as est=
ablished when the error was
+   detected, using the <code><a href=3D#window>Window</a&=
gt;</code> object of that <code><a href=3D#document>Doc=
ument</a></code> as the target. If
+   the error is still <i title=3Dconcept-error-nothandled><a hr=
ef=3D#concept-error-nothandled>not handled</a></i> after t=
his, then the error
+   may be reported to the user. Finally, abort these steps.</li>
+
+   <li><p>Let <var title=3D"">callback</v=
ar> be <var title=3D"">H</var>'s value, the call=
back that the
+   <a href=3D#event-handlers title=3D"event handlers">ev=
ent handler</a> was last set to.</li>
+
+   <li>
+
+    <p>Process the <code><a href=3D#event>Event</a&=
gt;</code> object <var title=3D"">E</var> as =
follows:</p>
+
+    <dl class=3Dswitch><dt>If <var title=3D""&g=
t;E</var> is an <code><a href=3D#errorevent>ErrorEvent&=
lt;/a></code> object and the <a href=3D#event-handler-idl-att=
ributes title=3D"event
+     handler IDL attributes">event handler IDL attribute</a&g=
t;'s type is
+     <code><a href=3D#onerroreventhandler>OnErrorEventHandle=
r</a></code></dt>
+
+     <dd>
+
+      <p><a href=3D#concept-invoke-event-handler title=3Dconcep=
t-invoke-event-handler>Invoke</a> <var title=3D""&g=
t;callback</var> with five arguments,
+      the first one having the value of <var title=3D"">=
E</var>'s <code title=3Ddom-ErrorEvent-message><a href=3D#=
dom-errorevent-message>message</a></code> attribute,
+      the second having the value of <var title=3D"">E&l=
t;/var>'s <code title=3Ddom-ErrorEvent-filename><a href=3D#do=
m-errorevent-filename>filename</a></code> attribute,
+      the third having the value of <var title=3D"">E&lt=
;/var>'s <code title=3Ddom-ErrorEvent-lineno><a href=3D#dom-e=
rrorevent-lineno>lineno</a></code> attribute,
+      the fourth having the value of <var title=3D"">E&l=
t;/var>'s <code title=3Ddom-ErrorEvent-colno><a href=3D#dom-e=
rrorevent-colno>colno</a></code> attribute,
+      the fifth having the value of <var title=3D"">E&lt=
;/var>'s <code title=3Ddom-ErrorEvent-error><a href=3D#dom-er=
rorevent-error>error</a></code> attribute, and
+      with the <i title=3Ddfn-callback-this-value>callback this va=
lue</i> set to <var title=3D"">E</var>'s <=
code title=3Ddom-Event-currentTarget>currentTarget</code>. Let=20
+      <var title=3D"">return value</var> be the ca=
llback's return value. <a href=3D#refsWEBIDL>[WEBIDL]</a><=
/p>
+
+     </dd>
+
+     <dt>Otherwise</dt>
+
+     <dd>
+
+      <p><a href=3D#concept-invoke-event-handler title=3Dconcep=
t-invoke-event-handler>Invoke</a> <var title=3D""&g=
t;callback</var> with one argument, the value of which is the
+      <code><a href=3D#event>Event</a></code> ob=
ject <var title=3D"">E</var>, with the <i title=3D=
dfn-callback-this-value>callback this value</i> set to <var t=
itle=3D"">E</var>'s <code title=3Ddom-Event-current=
Target>currentTarget</code>. Let <var title=3D""&gt=
;return value</var> be the callback's return value. <a href=3D#r=
efsWEBIDL>[WEBIDL]</a></p>
+
+     </dd>
+
+    </dl><p class=3DXXX>In this step, <dfn id=3Dconcept-i=
nvoke-event-handler title=3Dconcept-invoke-event-handler>invoke</df=
n> means to run the
+    <a href=3D#jump-to-a-code-entry-point>jump to a code entry-poi=
nt</a> algorithm.</p> <!-- bug 19211 / bug 23744 -->
+
+   </li>
+
+   <li>
+
+    <p>Process <var title=3D"">return value</va=
r> as follows:</p>
+
+    <dl class=3Dswitch><dt>If the event type is <code cla=
ss=3Devent-mouseover>mouseover</code></dt>
+     <dt>If the event type is <code class=3Devent-error>erro=
r</code> and <var title=3D"">E</var> is an &l=
t;code><a href=3D#errorevent>ErrorEvent</a></code> o=
bject</dt>
+
+     <dd><p>If <var title=3D"">return value&=
lt;/var> is a WebIDL boolean true value, then cancel the event.</dd=
>
+
+
+     <dt>If the event type is <code class=3Devent-beforeunload&=
gt;beforeunload</code></dt>
+
+     <dd>
+
+      <p class=3Dnote>The <a href=3D#event-handler-idl-attribut=
es title=3D"event handler IDL attributes">event handler IDL
+      attribute</a>'s type is <code><a href=3D#onbeforeun=
loadeventhandler>OnBeforeUnloadEventHandler</a></code>, an=
d the <var title=3D"">return value</var> will there=
fore have been coerced into either the value null or a
+      DOMString.</p>
+
+      <p>If the <var title=3D"">return value</v=
ar> is null, then cancel the event.</p>
+
+      <p>Otherwise, If the <code><a href=3D#event>Even=
t</a></code> object <var title=3D"">E</var=
> is a
+      <code><a href=3D#beforeunloadevent>BeforeUnloadEvent&l=
t;/a></code> object, and the <code><a href=3D#event>=
Event</a></code> object <var title=3D"">E<=
/var>'s <code title=3Ddom-BeforeUnloadEvent-returnValue><a hr=
ef=3D#dom-beforeunloadevent-returnvalue>returnValue</a></code=
>
+      attribute's value is the empty string, then set the <code title=
=3Ddom-BeforeUnloadEvent-returnValue><a href=3D#dom-beforeunloadeve=
nt-returnvalue>returnValue</a></code> attribute's value to=
 <var title=3D"">return value</var>.</p>
+
+     </dd>
+
+     <dt>Otherwise</dt>
+
+     <dd><p>If <var title=3D"">return value&=
lt;/var> is a WebIDL boolean false value, then cancel the
+     event.</dd>
+
+     <!-- IE actually uncancels the event if the function returns tru=
e -->
+
+    </dl></li>
+
+  </ol></div>
+
+  <hr><p>The <code><a href=3D#eventhandler>Event=
Handler</a></code> callback function type represents a callba=
ck used for event
+  handlers. It is represented in Web IDL as follows:</p>
+
+  <pre class=3Didl>[TreatNonCallableAsNull]
+callback <dfn id=3Deventhandlernonnull>EventHandlerNonNull</dfn=
> =3D any (<a href=3D#event>Event</a> event);
+typedef <a href=3D#eventhandlernonnull>EventHandlerNonNull</a&g=
t;? <dfn id=3Deventhandler>EventHandler</dfn>;</pre>
+
+  <p class=3Dnote>In JavaScript, any <code>Function</code=
> object implements this interface.</p>
+
+  <div class=3Dexample>
+
+   <p>For example, the following document fragment:</p>
+
+   <pre><body onload=3D"alert(this)" onclick=3D&q=
uot;alert(this)"></pre>
+
+   <p>...leads to an alert saying "<code title=3D"&qu=
ot;>[object Window]</code>" when the document is
+   loaded, and an alert saying "<code title=3D"">[o=
bject HTMLBodyElement]</code>" whenever the
+   user clicks something in the page.</p>
+
+  </div>
+
+  <p class=3Dnote>The return value of the function affects whether=
 the event is canceled or not:
+  <span class=3Dimpl>as described above,</span> if the retur=
n value is false, the event is canceled
+  (except for <code class=3Devent-mouseover>mouseover</code>=
 events, where the return value has to
+  be true to cancel the event). With <code title=3Devent-beforeunload=
>beforeunload</code> events,
+  the value is instead used to determine the message to show the user.&l=
t;/p>
+
+  <p>For historical reasons, the <code title=3Dhandler-onerror&=
gt;<a href=3D#handler-onerror>onerror</a></code> handle=
r has different
+  arguments:</p>
+
+  <pre class=3Didl>[TreatNonCallableAsNull]
+callback <dfn id=3Donerroreventhandlernonnull>OnErrorEventHandlerN=
onNull</dfn> =3D any ((<a href=3D#event>Event</a> or DO=
MString) event, optional DOMString source, optional unsigned long lineno,=
 optional unsigned long column, optional any error);
+typedef <a href=3D#onerroreventhandlernonnull>OnErrorEventHandlerN=
onNull</a>? <dfn id=3Donerroreventhandler>OnErrorEventHandler=
</dfn>;</pre>
+
+  <p>Similarly, the <code title=3Dhandler-window-onbeforeunload=
><a href=3D#handler-window-onbeforeunload>onbeforeunload</a&g=
t;</code> handler has a
+  different return value:</p>
+
+  <pre class=3Didl>[TreatNonCallableAsNull]
+callback <dfn id=3Donbeforeunloadeventhandlernonnull>OnBeforeUnloa=
dEventHandlerNonNull</dfn> =3D DOMString (<a href=3D#event>Ev=
ent</a> event);
+typedef <a href=3D#onbeforeunloadeventhandlernonnull>OnBeforeUnloa=
dEventHandlerNonNull</a>? <dfn id=3Donbeforeunloadeventhandler&g=
t;OnBeforeUnloadEventHandler</dfn>;</pre>
+
+  <!-- onreadystatechange is also defined specially, using [LenientTh=
is]; see IDL -->
+
+
+  <h5 id=3Devent-handlers-on-elements,-document-objects,-and-window-o=
bjects><span class=3Dsecno>7.1.6.2 </span>Event handlers o=
n elements, <code><a href=3D#document>Document</a></=
code> objects, and <code><a href=3D#window>Window</a&gt=
;</code> objects</h5>
+
+  <p>The following are the <a href=3D#event-handlers>event h=
andlers</a> (and their corresponding <a href=3D#event-handler-ev=
ent-type title=3D"event
+  handler event type">event handler event types</a>) <s=
pan class=3Dimpl>that must be</span>
+  supported by all <a href=3D#html-elements>HTML elements</a&gt=
;, as both <a href=3D#event-handler-content-attributes>event handle=
r content attributes</a>
+  and <a href=3D#event-handler-idl-attributes>event handler IDL at=
tributes</a>; and <span class=3Dimpl>that must be</span&gt=
;
+  supported by all <code><a href=3D#document>Document</a&=
gt;</code> and <code><a href=3D#window>Window</a>=
</code> objects, as <a href=3D#event-handler-idl-attributes>e=
vent handler IDL
+  attributes</a>:</p>
+
+  <table><thead><tr><th><a href=3D#event-hand=
lers title=3D"event handlers">Event handler</a> <th=
><a href=3D#event-handler-event-type>Event handler event type&lt=
;/a>
+   <tbody><tr><td><dfn id=3Dhandler-onabort title=3D=
handler-onabort><code>onabort</code></dfn> <td&gt=
; <code title=3Devent-abort>abort</code>
+    <tr><td><dfn id=3Dhandler-oncancel title=3Dhandler-on=
cancel><code>oncancel</code></dfn> <td> <co=
de title=3Devent-cancel><a href=3D#event-cancel>cancel</a>=
</code>
+    <tr><td><dfn id=3Dhandler-oncanplay title=3Dhandler-o=
ncanplay><code>oncanplay</code></dfn> <td> &lt=
;code title=3Devent-media-canplay><a href=3D#event-media-canplay&gt=
;canplay</a></code>
+    <tr><td><dfn id=3Dhandler-oncanplaythrough title=3Dha=
ndler-oncanplaythrough><code>oncanplaythrough</code></d=
fn> <td> <code title=3Devent-media-canplaythrough><a hr=
ef=3D#event-media-canplaythrough>canplaythrough</a></code>
+    <tr><td><dfn id=3Dhandler-onchange title=3Dhandler-on=
change><code>onchange</code></dfn> <td> <co=
de title=3Devent-change>change</code> <!-- widely used -->
+    <tr><td><dfn id=3Dhandler-onclick title=3Dhandler-onc=
lick><code>onclick</code></dfn> <td> <code =
title=3Devent-click><a href=3D#event-click>click</a></c=
ode> <!-- widely used -->
+    <tr><td><dfn id=3Dhandler-onclose title=3Dhandler-onc=
lose><code>onclose</code></dfn> <td> <code =
title=3Devent-close><a href=3D#event-close>close</a></c=
ode> <!-- new for <dialog> -->
+    <tr><td><dfn id=3Dhandler-oncontextmenu title=3Dhandl=
er-oncontextmenu><code>oncontextmenu</code></dfn> &l=
t;td> <code title=3Devent-contextmenu>contextmenu</code> &=
lt;!-- widely used -->
+    <tr><td><dfn id=3Dhandler-oncuechange title=3Dhandler=
-oncuechange><code>oncuechange</code></dfn> <td&g=
t; <code title=3Devent-cuechange>cuechange</code>
+    <tr><td><dfn id=3Dhandler-ondblclick title=3Dhandler-=
ondblclick><code>ondblclick</code></dfn> <td> =
<code title=3Devent-dblclick>dblclick</code> <!-- widely u=
sed -->
+    <tr><td><dfn id=3Dhandler-ondrag title=3Dhandler-ondr=
ag><code>ondrag</code></dfn> <td> <code tit=
le=3Devent-drag><a href=3D#event-drag>drag</a></code&gt=
;
+    <tr><td><dfn id=3Dhandler-ondragend title=3Dhandler-o=
ndragend><code>ondragend</code></dfn> <td> &lt=
;code title=3Devent-dragend><a href=3D#event-dragend>dragend<=
/a></code>
+    <tr><td><dfn id=3Dhandler-ondragenter title=3Dhandler=
-ondragenter><code>ondragenter</code></dfn> <td&g=
t; <code title=3Devent-dragenter><a href=3D#event-dragenter>d=
ragenter</a></code>
+    <tr><td><dfn id=3Dhandler-ondragexit title=3Dhandler-=
ondragexit><code>ondragexit</code></dfn> <td> =
<code title=3Devent-dragexit><a href=3D#event-dragexit>dragex=
it</a></code>
+    <tr><td><dfn id=3Dhandler-ondragleave title=3Dhandler=
-ondragleave><code>ondragleave</code></dfn> <td&g=
t; <code title=3Devent-dragleave><a href=3D#event-dragleave>d=
ragleave</a></code>
+    <tr><td><dfn id=3Dhandler-ondragover title=3Dhandler-=
ondragover><code>ondragover</code></dfn> <td> =
<code title=3Devent-dragover><a href=3D#event-dragover>dragov=
er</a></code>
+    <tr><td><dfn id=3Dhandler-ondragstart title=3Dhandler=
-ondragstart><code>ondragstart</code></dfn> <td&g=
t; <code title=3Devent-dragstart><a href=3D#event-dragstart>d=
ragstart</a></code> <!-- widely used -->
+    <tr><td><dfn id=3Dhandler-ondrop title=3Dhandler-ondr=
op><code>ondrop</code></dfn> <td> <code tit=
le=3Devent-drop><a href=3D#event-drop>drop</a></code&gt=
;
+    <tr><td><dfn id=3Dhandler-ondurationchange title=3Dha=
ndler-ondurationchange><code>ondurationchange</code></d=
fn> <td> <code title=3Devent-media-durationchange><a hr=
ef=3D#event-media-durationchange>durationchange</a></code>
+    <tr><td><dfn id=3Dhandler-onemptied title=3Dhandler-o=
nemptied><code>onemptied</code></dfn> <td> &lt=
;code title=3Devent-media-emptied><a href=3D#event-media-emptied&gt=
;emptied</a></code>
+    <tr><td><dfn id=3Dhandler-onended title=3Dhandler-one=
nded><code>onended</code></dfn> <td> <code =
title=3Devent-media-ended><a href=3D#event-media-ended>ended<=
/a></code>
+    <tr><td><dfn id=3Dhandler-oninput title=3Dhandler-oni=
nput><code>oninput</code></dfn> <td> <code =
title=3Devent-input>input</code>
+    <tr><td><dfn id=3Dhandler-oninvalid title=3Dhandler-o=
ninvalid><code>oninvalid</code></dfn> <td> &lt=
;code title=3Devent-invalid>invalid</code>
+    <tr><td><dfn id=3Dhandler-onkeydown title=3Dhandler-o=
nkeydown><code>onkeydown</code></dfn> <td> &lt=
;code title=3Devent-keydown>keydown</code> <!-- widely used -=
->
+    <tr><td><dfn id=3Dhandler-onkeypress title=3Dhandler-=
onkeypress><code>onkeypress</code></dfn> <td> =
<code title=3Devent-keypress>keypress</code> <!-- widely u=
sed -->
+    <tr><td><dfn id=3Dhandler-onkeyup title=3Dhandler-onk=
eyup><code>onkeyup</code></dfn> <td> <code =
title=3Devent-keyup>keyup</code> <!-- widely used -->
+    <tr><td><dfn id=3Dhandler-onloadeddata title=3Dhandle=
r-onloadeddata><code>onloadeddata</code></dfn> <t=
d> <code title=3Devent-media-loadeddata><a href=3D#event-medi=
a-loadeddata>loadeddata</a></code>
+    <tr><td><dfn id=3Dhandler-onloadedmetadata title=3Dha=
ndler-onloadedmetadata><code>onloadedmetadata</code></d=
fn> <td> <code title=3Devent-media-loadedmetadata><a hr=
ef=3D#event-media-loadedmetadata>loadedmetadata</a></code>
+    <tr><td><dfn id=3Dhandler-onloadstart title=3Dhandler=
-onloadstart><code>onloadstart</code></dfn> <td&g=
t; <code title=3Devent-media-loadstart><a href=3D#event-media-lo=
adstart>loadstart</a></code>
+    <tr><td><dfn id=3Dhandler-onmousedown title=3Dhandler=
-onmousedown><code>onmousedown</code></dfn> <td&g=
t; <code title=3Devent-mousedown>mousedown</code> <!-- wid=
ely used -->
+    <tr><td><dfn id=3Dhandler-onmouseenter title=3Dhandle=
r-onmouseenter><code>onmouseenter</code></dfn> <t=
d> <code title=3Devent-mouseenter>mouseenter</code> <!-=
- compat -->
+    <tr><td><dfn id=3Dhandler-onmouseleave title=3Dhandle=
r-onmouseleave><code>onmouseleave</code></dfn> <t=
d> <code title=3Devent-mouseleave>mouseleave</code> <!-=
- compat -->
+    <tr><td><dfn id=3Dhandler-onmousemove title=3Dhandler=
-onmousemove><code>onmousemove</code></dfn> <td&g=
t; <code title=3Devent-mousemove>mousemove</code> <!-- wid=
ely used -->
+    <tr><td><dfn id=3Dhandler-onmouseout title=3Dhandler-=
onmouseout><code>onmouseout</code></dfn> <td> =
<code title=3Devent-mouseout>mouseout</code> <!-- widely u=
sed -->
+    <tr><td><dfn id=3Dhandler-onmouseover title=3Dhandler=
-onmouseover><code>onmouseover</code></dfn> <td&g=
t; <code title=3Devent-mouseover>mouseover</code> <!-- wid=
ely used -->
+    <tr><td><dfn id=3Dhandler-onmouseup title=3Dhandler-o=
nmouseup><code>onmouseup</code></dfn> <td> &lt=
;code title=3Devent-mouseup>mouseup</code> <!-- widely used -=
->
+    <tr><td><dfn id=3Dhandler-onmousewheel title=3Dhandle=
r-onmousewheel><code>onmousewheel</code></dfn> <t=
d> <code title=3Devent-mousewheel>mousewheel</code> <!-=
- widely used -->
+    <tr><td><dfn id=3Dhandler-onpause title=3Dhandler-onp=
ause><code>onpause</code></dfn> <td> <code =
title=3Devent-media-pause><a href=3D#event-media-pause>pause<=
/a></code>
+    <tr><td><dfn id=3Dhandler-onplay title=3Dhandler-onpl=
ay><code>onplay</code></dfn> <td> <code tit=
le=3Devent-media-play><a href=3D#event-media-play>play</a>=
</code>
+    <tr><td><dfn id=3Dhandler-onplaying title=3Dhandler-o=
nplaying><code>onplaying</code></dfn> <td> &lt=
;code title=3Devent-media-playing><a href=3D#event-media-playing&gt=
;playing</a></code>
+    <tr><td><dfn id=3Dhandler-onprogress title=3Dhandler-=
onprogress><code>onprogress</code></dfn> <td> =
<code title=3Devent-media-progress><a href=3D#event-media-progre=
ss>progress</a></code>
+    <tr><td><dfn id=3Dhandler-onratechange title=3Dhandle=
r-onratechange><code>onratechange</code></dfn> <t=
d> <code title=3Devent-media-ratechange><a href=3D#event-medi=
a-ratechange>ratechange</a></code>
+    <tr><td><dfn id=3Dhandler-onreset title=3Dhandler-onr=
eset><code>onreset</code></dfn> <td> <code =
title=3Devent-reset>reset</code>
+    <tr><td><dfn id=3Dhandler-onseeked title=3Dhandler-on=
seeked><code>onseeked</code></dfn> <td> <co=
de title=3Devent-media-seeked><a href=3D#event-media-seeked>seek=
ed</a></code>
+    <tr><td><dfn id=3Dhandler-onseeking title=3Dhandler-o=
nseeking><code>onseeking</code></dfn> <td> &lt=
;code title=3Devent-media-seeking><a href=3D#event-media-seeking&gt=
;seeking</a></code>
+    <tr><td><dfn id=3Dhandler-onselect title=3Dhandler-on=
select><code>onselect</code></dfn> <td> <co=
de title=3Devent-select>select</code> <!-- widely used -->=
 <!-- [CSSOM] -->
+    <tr><td><dfn id=3Dhandler-onshow title=3Dhandler-onsh=
ow><code>onshow</code></dfn> <td> <code tit=
le=3Devent-show>show</code>
+    <tr><td><dfn id=3Dhandler-onsort title=3Dhandler-onso=
rt><code>onsort</code></dfn> <td> <code tit=
le=3Devent-sort>sort</code>
+    <tr><td><dfn id=3Dhandler-onstalled title=3Dhandler-o=
nstalled><code>onstalled</code></dfn> <td> &lt=
;code title=3Devent-media-stalled><a href=3D#event-media-stalled&gt=
;stalled</a></code>
+    <tr><td><dfn id=3Dhandler-onsubmit title=3Dhandler-on=
submit><code>onsubmit</code></dfn> <td> <co=
de title=3Devent-submit>submit</code> <!-- widely used -->
+    <tr><td><dfn id=3Dhandler-onsuspend title=3Dhandler-o=
nsuspend><code>onsuspend</code></dfn> <td> &lt=
;code title=3Devent-media-suspend><a href=3D#event-media-suspend&gt=
;suspend</a></code>
+    <tr><td><dfn id=3Dhandler-ontimeupdate title=3Dhandle=
r-ontimeupdate><code>ontimeupdate</code></dfn> <t=
d> <code title=3Devent-media-timeupdate><a href=3D#event-medi=
a-timeupdate>timeupdate</a></code>
+    <tr><td><dfn id=3Dhandler-ontoggle title=3Dhandler-on=
toggle><code>ontoggle</code></dfn> <td> <co=
de title=3Devent-toggle>toggle</code>
+    <tr><td><dfn id=3Dhandler-onvolumechange title=3Dhand=
ler-onvolumechange><code>onvolumechange</code></dfn>=
 <td> <code title=3Devent-media-volumechange><a href=3D#ev=
ent-media-volumechange>volumechange</a></code>
+    <tr><td><dfn id=3Dhandler-onwaiting title=3Dhandler-o=
nwaiting><code>onwaiting</code></dfn> <td> &lt=
;code title=3Devent-media-waiting><a href=3D#event-media-waiting&gt=
;waiting</a></code>
+
+<!-- not supported, use dnd: -->
+<!--<tr><td><dfn title=3D"handler-onbeforecopy&qu=
ot;><code>onbeforecopy</code></dfn> <td> <c=
ode title=3D"event-beforecopy">beforecopy</code>-->=
 <!-- widely used -->
+<!--<tr><td><dfn title=3D"handler-oncopy"&gt=
;<code>oncopy</code></dfn> <td> <code title=3D=
"event-copy">copy</code>--> <!-- widely used --&=
gt;
+<!--<tr><td><dfn title=3D"handler-onpaste"&g=
t;<code>onpaste</code></dfn> <td> <code title=3D=
"event-paste">paste</code>--> <!-- widely used -=
->
+<!-- not supported yet (v2?): -->
+<!--<tr><td><dfn title=3D"handler-onselectstart&q=
uot;><code>onselectstart</code></dfn> <td> &lt=
;code title=3D"event-selectstart">selectstart</code>--=
> <!-- widely used -->
+  </table><hr><p>The following are the <a href=3D#e=
vent-handlers>event handlers</a> (and their corresponding <a =
href=3D#event-handler-event-type title=3D"event
+  handler event type">event handler event types</a>) <s=
pan class=3Dimpl>that must be</span>
+  supported by all <a href=3D#html-elements>HTML elements</a&gt=
; other than <code><a href=3D#the-body-element>body</a>=
</code> and <code><a href=3D#frameset>frameset</a&gt=
;</code>
+  elements, as both <a href=3D#event-handler-content-attributes>ev=
ent handler content attributes</a> and <a href=3D#event-handler-=
idl-attributes>event handler IDL
+  attributes</a>; <span class=3Dimpl>that must be</span&g=
t; supported by all <code><a href=3D#document>Document</a&=
gt;</code>
+  objects, as <a href=3D#event-handler-idl-attributes>event handle=
r IDL attributes</a>; and <span class=3Dimpl>that must be<=
/span>
+  supported by all <code><a href=3D#window>Window</a>&=
lt;/code> objects, as <a href=3D#event-handler-idl-attributes>ev=
ent handler IDL attributes</a> on the
+  <code><a href=3D#window>Window</a></code> obje=
cts themselves, and with corresponding <a href=3D#event-handler-conten=
t-attributes>event handler content
+  attributes</a> and <a href=3D#event-handler-idl-attributes&gt=
;event handler IDL attributes</a> exposed on all <code><a =
href=3D#the-body-element>body</a></code>
+  and <code><a href=3D#frameset>frameset</a></code&=
gt; elements that are owned by <a href=3D#concept-document-window titl=
e=3Dconcept-document-window>that
+  <code>Window</code> object's <code>Document</code=
>s</a>:</p>
+
+  <table><thead><tr><th><a href=3D#event-hand=
lers title=3D"event handlers">Event handler</a> <th=
><a href=3D#event-handler-event-type>Event handler event type&lt=
;/a>
+   <tbody><tr><td><dfn id=3Dhandler-onblur title=3D=
handler-onblur><code>onblur</code></dfn> <td> =
<code title=3Devent-blur>blur</code> <!-- widely used --&g=
t;
+    <tr><td><dfn id=3Dhandler-onerror title=3Dhandler-one=
rror><code>onerror</code></dfn> <td> <code =
title=3Devent-error>error</code>
+    <tr><td><dfn id=3Dhandler-onfocus title=3Dhandler-onf=
ocus><code>onfocus</code></dfn> <td> <code =
title=3Devent-focus>focus</code> <!-- widely used -->
+    <tr><td><dfn id=3Dhandler-onload title=3Dhandler-onlo=
ad><code>onload</code></dfn> <td> <code tit=
le=3Devent-load>load</code>
+    <tr><td><dfn id=3Dhandler-onscroll title=3Dhandler-on=
scroll><code>onscroll</code></dfn> <td> <co=
de title=3Devent-scroll>scroll</code>
+  </table><hr><p>The following are the <a href=3D#e=
vent-handlers>event handlers</a> (and their corresponding <a =
href=3D#event-handler-event-type title=3D"event
+  handler event type">event handler event types</a>) <s=
pan class=3Dimpl>that must be</span>
+  supported by <code><a href=3D#window>Window</a></=
code> objects, as <a href=3D#event-handler-idl-attributes>event =
handler IDL attributes</a> on the
+  <code><a href=3D#window>Window</a></code> obje=
cts themselves, and with corresponding <a href=3D#event-handler-conten=
t-attributes>event handler content
+  attributes</a> and <a href=3D#event-handler-idl-attributes&gt=
;event handler IDL attributes</a> exposed on all <code><a =
href=3D#the-body-element>body</a></code>
+  and <code><a href=3D#frameset>frameset</a></code&=
gt; elements that are owned by <a href=3D#concept-document-window titl=
e=3Dconcept-document-window>that
+  <code>Window</code> object's <code>Document</code=
>s</a>:</p>
+
+  <table><thead><tr><th><a href=3D#event-hand=
lers title=3D"event handlers">Event handler</a> <th=
><a href=3D#event-handler-event-type>Event handler event type&lt=
;/a>
+   <tbody><tr><td><dfn id=3Dhandler-window-onafterp=
rint title=3Dhandler-window-onafterprint><code>onafterprint</=
code></dfn> <td> <code title=3Devent-afterprint>afte=
rprint</code>
+    <tr><td><dfn id=3Dhandler-window-onbeforeprint title=3D=
handler-window-onbeforeprint><code>onbeforeprint</code>&lt=
;/dfn> <td> <code title=3Devent-beforeprint>beforeprint&lt=
;/code>
+    <tr><td><dfn id=3Dhandler-window-onbeforeunload title=
=3Dhandler-window-onbeforeunload><code>onbeforeunload</code&g=
t;</dfn> <td> <code title=3Devent-beforeunload>beforeun=
load</code>
+    <tr><td><dfn id=3Dhandler-window-onhashchange title=3D=
handler-window-onhashchange><code>onhashchange</code></=
dfn> <td> <code title=3Devent-hashchange><a href=3D#eve=
nt-hashchange>hashchange</a></code> <!-- new -->
+    <tr><td><dfn id=3Dhandler-window-onmessage title=3Dha=
ndler-window-onmessage><code>onmessage</code></dfn> =
<td> <code title=3Devent-message><a href=3D#event-message&=
gt;message</a></code> <!-- new for postMessage -->
+    <tr><td><dfn id=3Dhandler-window-onoffline title=3Dha=
ndler-window-onoffline><code>onoffline</code></dfn> =
<td> <code title=3Devent-offline><a href=3D#event-offline&=
gt;offline</a></code> <!-- new -->
+    <tr><td><dfn id=3Dhandler-window-ononline title=3Dhan=
dler-window-ononline><code>ononline</code></dfn> &lt=
;td> <code title=3Devent-online><a href=3D#event-online>on=
line</a></code> <!-- new -->
+    <tr><td><dfn id=3Dhandler-window-onpagehide title=3Dh=
andler-window-onpagehide><code>onpagehide</code></dfn&g=
t; <td> <code title=3Devent-pagehide><a href=3D#event-page=
hide>pagehide</a></code> <!-- new -->
+    <tr><td><dfn id=3Dhandler-window-onpageshow title=3Dh=
andler-window-onpageshow><code>onpageshow</code></dfn&g=
t; <td> <code title=3Devent-pageshow><a href=3D#event-page=
show>pageshow</a></code> <!-- new -->
+    <tr><td><dfn id=3Dhandler-window-onpopstate title=3Dh=
andler-window-onpopstate><code>onpopstate</code></dfn&g=
t; <td> <code title=3Devent-popstate><a href=3D#event-pops=
tate>popstate</a></code> <!-- new -->
+    <tr><td><dfn id=3Dhandler-window-onresize title=3Dhan=
dler-window-onresize><code>onresize</code></dfn> &lt=
;td> <code title=3Devent-resize>resize</code> <!-- wide=
ly used --> <!-- [CSSOM] -->
+    <tr><td><dfn id=3Dhandler-window-onstorage title=3Dha=
ndler-window-onstorage><code>onstorage</code></dfn> =
<td> <code title=3Devent-storage><a href=3D#event-storage&=
gt;storage</a></code> <!-- new -->
+    <tr><td><dfn id=3Dhandler-window-onunload title=3Dhan=
dler-window-onunload><code>onunload</code></dfn> &lt=
;td> <code title=3Devent-unload>unload</code> <!-- wide=
ly used -->
+  </table><hr><!-- this guy is only on Document and not o=
n HTMLElement because otherwise HTMLScriptElement would
+  have it and that causes compatibility issues since IE fires readystate=
change events on <script>,
+  not load events, and we can't fire both, and some sites try to decide =
which to look for based on
+  the presence of script.onreadystatechange on HTMLScriptElement.
+     http://www.w3.org/Bugs/Public/show_bug.cgi?id=3D13965
+     http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2011-September/=
033136.html
+  --><p>The following are the <a href=3D#event-handlers>e=
vent handlers</a> (and their corresponding <a href=3D#event-hand=
ler-event-type title=3D"event
+  handler event type">event handler event types</a>) <s=
pan class=3Dimpl>that must be</span>
+  supported on <code><a href=3D#document>Document</a>&=
lt;/code> objects as <a href=3D#event-handler-idl-attributes>eve=
nt handler IDL attributes</a>:</p>
+
+  <table><thead><tr><th><a href=3D#event-hand=
lers title=3D"event handlers">Event handler</a> <th=
><a href=3D#event-handler-event-type>Event handler event type&lt=
;/a>
+   <tbody><tr><td><dfn id=3Dhandler-onreadystatecha=
nge title=3Dhandler-onreadystatechange><code>onreadystatechange&=
lt;/code></dfn> <td> <code title=3Devent-readystatechan=
ge><a href=3D#event-readystatechange>readystatechange</a>&=
lt;/code>
+  </table><h6 id=3Didl-definitions><span class=3Dsecno&gt=
;7.1.6.2.1 </span>IDL definitions</h6>
+
+  <pre class=3Didl>[NoInterfaceObject]
+interface <dfn id=3Dglobaleventhandlers>GlobalEventHandlers</df=
n> {
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-onabort title=3Dhandler-onabort>onabort</a&=
gt;;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-onblur title=3Dhandler-onblur>onblur</a>=
;
+           attribute <a href=3D#onerroreventhandler>OnErrorEventHa=
ndler</a> <a href=3D#handler-onerror title=3Dhandler-onerror>=
onerror</a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-onfocus title=3Dhandler-onfocus>onfocus</a&=
gt;;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-oncancel title=3Dhandler-oncancel>oncancel<=
/a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-oncanplay title=3Dhandler-oncanplay>oncanplay&=
lt;/a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-oncanplaythrough title=3Dhandler-oncanplaythrough=
>oncanplaythrough</a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-onchange title=3Dhandler-onchange>onchange<=
/a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-onclick title=3Dhandler-onclick>onclick</a&=
gt;;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-onclose title=3Dhandler-onclose>onclose</a&=
gt;;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-oncontextmenu title=3Dhandler-oncontextmenu>on=
contextmenu</a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-oncuechange title=3Dhandler-oncuechange>oncuec=
hange</a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-ondblclick title=3Dhandler-ondblclick>ondblcli=
ck</a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-ondrag title=3Dhandler-ondrag>ondrag</a>=
;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-ondragend title=3Dhandler-ondragend>ondragend&=
lt;/a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-ondragenter title=3Dhandler-ondragenter>ondrag=
enter</a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-ondragexit title=3Dhandler-ondragexit>ondragex=
it</a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-ondragleave title=3Dhandler-ondragleave>ondrag=
leave</a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-ondragover title=3Dhandler-ondragover>ondragov=
er</a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-ondragstart title=3Dhandler-ondragstart>ondrag=
start</a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-ondrop title=3Dhandler-ondrop>ondrop</a>=
;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-ondurationchange title=3Dhandler-ondurationchange=
>ondurationchange</a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-onemptied title=3Dhandler-onemptied>onemptied&=
lt;/a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-onended title=3Dhandler-onended>onended</a&=
gt;;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-oninput title=3Dhandler-oninput>oninput</a&=
gt;;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-oninvalid title=3Dhandler-oninvalid>oninvalid&=
lt;/a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-onkeydown title=3Dhandler-onkeydown>onkeydown&=
lt;/a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-onkeypress title=3Dhandler-onkeypress>onkeypre=
ss</a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-onkeyup title=3Dhandler-onkeyup>onkeyup</a&=
gt;;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-onload title=3Dhandler-onload>onload</a>=
;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-onloadeddata title=3Dhandler-onloadeddata>onlo=
adeddata</a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-onloadedmetadata title=3Dhandler-onloadedmetadata=
>onloadedmetadata</a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-onloadstart title=3Dhandler-onloadstart>onload=
start</a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-onmousedown title=3Dhandler-onmousedown>onmous=
edown</a>;
+  [LenientThis] attribute <a href=3D#eventhandler>EventHandler<=
/a> <a href=3D#handler-onmouseenter title=3Dhandler-onmouseenter&gt=
;onmouseenter</a>;
+  [LenientThis] attribute <a href=3D#eventhandler>EventHandler<=
/a> <a href=3D#handler-onmouseleave title=3Dhandler-onmouseleave&gt=
;onmouseleave</a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-onmousemove title=3Dhandler-onmousemove>onmous=
emove</a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-onmouseout title=3Dhandler-onmouseout>onmouseo=
ut</a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-onmouseover title=3Dhandler-onmouseover>onmous=
eover</a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-onmouseup title=3Dhandler-onmouseup>onmouseup&=
lt;/a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-onmousewheel title=3Dhandler-onmousewheel>onmo=
usewheel</a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-onpause title=3Dhandler-onpause>onpause</a&=
gt;;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-onplay title=3Dhandler-onplay>onplay</a>=
;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-onplaying title=3Dhandler-onplaying>onplaying&=
lt;/a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-onprogress title=3Dhandler-onprogress>onprogre=
ss</a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-onratechange title=3Dhandler-onratechange>onra=
techange</a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-onreset title=3Dhandler-onreset>onreset</a&=
gt;;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-onscroll title=3Dhandler-onscroll>onscroll<=
/a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-onseeked title=3Dhandler-onseeked>onseeked<=
/a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-onseeking title=3Dhandler-onseeking>onseeking&=
lt;/a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-onselect title=3Dhandler-onselect>onselect<=
/a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-onshow title=3Dhandler-onshow>onshow</a>=
;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-onsort title=3Dhandler-onsort>onsort</a>=
;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-onstalled title=3Dhandler-onstalled>onstalled&=
lt;/a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-onsubmit title=3Dhandler-onsubmit>onsubmit<=
/a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-onsuspend title=3Dhandler-onsuspend>onsuspend&=
lt;/a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-ontimeupdate title=3Dhandler-ontimeupdate>onti=
meupdate</a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-ontoggle title=3Dhandler-ontoggle>ontoggle<=
/a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-onvolumechange title=3Dhandler-onvolumechange>=
onvolumechange</a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-onwaiting title=3Dhandler-onwaiting>onwaiting&=
lt;/a>;
+};
+
+[NoInterfaceObject]
+interface <dfn id=3Dwindoweventhandlers>WindowEventHandlers</df=
n> {
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-window-onafterprint title=3Dhandler-window-onafte=
rprint>onafterprint</a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-window-onbeforeprint title=3Dhandler-window-onbef=
oreprint>onbeforeprint</a>;
+           attribute <a href=3D#onbeforeunloadeventhandler>OnBefor=
eUnloadEventHandler</a> <a href=3D#handler-window-onbeforeunload=
 title=3Dhandler-window-onbeforeunload>onbeforeunload</a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-window-onhashchange title=3Dhandler-window-onhash=
change>onhashchange</a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-window-onmessage title=3Dhandler-window-onmessage=
>onmessage</a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-window-onoffline title=3Dhandler-window-onoffline=
>onoffline</a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-window-ononline title=3Dhandler-window-ononline&g=
t;ononline</a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-window-onpagehide title=3Dhandler-window-onpagehi=
de>onpagehide</a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-window-onpageshow title=3Dhandler-window-onpagesh=
ow>onpageshow</a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-window-onpopstate title=3Dhandler-window-onpopsta=
te>onpopstate</a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-window-onresize title=3Dhandler-window-onresize&g=
t;onresize</a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-window-onstorage title=3Dhandler-window-onstorage=
>onstorage</a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-window-onunload title=3Dhandler-window-onunload&g=
t;onunload</a>;
+};</pre>
+
+
+
+  <div class=3Dimpl>
+
+  <h5 id=3Devent-firing><span class=3Dsecno>7.1.6.3 </spa=
n>Event firing</h5>
+
+  <p>Certain operations and methods are defined as firing events o=
n elements. For example, the <code title=3Ddom-click><a href=3D#=
dom-click>click()</a></code> method on the <code>&lt=
;a href=3D#htmlelement>HTMLElement</a></code> interface is=
 defined as
+  firing a <code title=3Devent-click><a href=3D#event-click>=
click</a></code> event on the element. <a href=3D#refsDOME=
VENTS>[DOMEVENTS]</a></p>
+
+  <p><dfn id=3Dfire-a-simple-event title=3D"fire a simple =
event">Firing a simple event named <var title=3D""&g=
t;e</var></dfn> means
+  that a <a href=3D#concept-events-trusted title=3Dconcept-events-tru=
sted>trusted</a> event with the name <var title=3D"&quot=
;>e</var>, which does not bubble (except where otherwise stated)=
 and is not cancelable
+  (except where otherwise stated), and which uses the <code><a =
href=3D#event>Event</a></code> interface, must be created
+  and dispatched at the given target.</p>
+
+  <p><dfn id=3Dfire-a-synthetic-mouse-event title=3D"fire =
a synthetic mouse event">Firing a synthetic mouse event named &lt=
;var title=3D"">e</var></dfn> means that an even=
t with the name <var title=3D"">e</var>, which is &=
lt;a href=3D#concept-events-trusted title=3Dconcept-events-trusted>tru=
sted</a> (except where otherwise stated), does not bubble
+  (except where otherwise stated), is not cancelable (except where other=
wise stated), and which uses
+  the <code><a href=3D#mouseevent>MouseEvent</a></c=
ode> interface, must be created and dispatched at the given target. Th=
e
+  event object must have its <code title=3D"">screenX&lt=
;/code>, <code title=3D"">screenY</code>, <co=
de title=3D"">clientX</code>, <code title=3D"&=
quot;>clientY</code>, and <code title=3D"">butto=
n</code>
+  attributes initialized to 0, its <code title=3D"">ctrl=
Key</code>, <code title=3D"">shiftKey</code>,
+  <code title=3D"">altKey</code>, and <code tit=
le=3D"">metaKey</code> attributes initialized accordin=
g
+  to the current state of the key input device, if any (false for any ke=
ys that are not available),
+  its <code title=3D"">detail</code> attribute ini=
tialized to 1, and its <code title=3D"">relatedTarget<=
/code> attribute initialized to null (except where otherwise stated). =
The
+  <code title=3D"">getModifierState()</code> metho=
d on the object must return values appropriately
+  describing the state of the key input device at the time the event is =
created.</p>
+
+  <p><dfn id=3Dfire-a-click-event title=3D"fire a click ev=
ent">Firing a <code title=3Devent-click>click</code> =
event</dfn>
+  means <a href=3D#fire-a-synthetic-mouse-event title=3D"fire a =
synthetic mouse event">firing a synthetic mouse event named <c=
ode title=3Devent-click>click</code></a>, which bubbles an=
d is cancelable.</p>
+
+  <p>The default action of these events is to do nothing except wh=
ere otherwise stated.</p>
+
+  </div>
+
+
+  <div class=3Dimpl>
+
+  <h5 id=3Devents-and-the-window-object><span class=3Dsecno>=
7.1.6.4 </span>Events and the <code><a href=3D#window>W=
indow</a></code> object</h5>
+
+  <p>When an event is dispatched at a DOM node in a <code>&l=
t;a href=3D#document>Document</a></code> in a <a href=3D=
#browsing-context>browsing
+  context</a>, if the event is not a <code title=3Devent-load&g=
t;load</code> event, the user agent
+  must act as if, for the purposes of <a href=3D#concept-event-dispat=
ch title=3Dconcept-event-dispatch>event dispatching</a>,
+  the <code><a href=3D#window>Window</a></code> =
object is the parent of the <code><a href=3D#document>Documen=
t</a></code> object. <a href=3D#refsDOM>[DOM]</a>=
</p>
+
+  <!-- If Anne does this: http://krijnhoetmer.nl/irc-logs/whatwg/2012=
1205#l-4 (see bug 18780)
+  <p>If a <code>Document</code> object is associated w=
ith a <code>Window</code> object, its
+  <span>event parent</span> is that <code>Window</c=
ode> object.</p>
+  -->
+
+  </div>
+
+
+  <h3 id=3Datob><span class=3Dsecno>7.2 </span>Base64 =
utility methods</h3>
+
+  <p>The <code title=3Ddom-windowbase64-atob><a href=3D#d=
om-windowbase64-atob>atob()</a></code> and <code title=3D=
dom-windowbase64-btoa><a href=3D#dom-windowbase64-btoa>btoa()&lt=
;/a></code> methods allow authors to transform content to and fr=
om
+  the base64 encoding.</p>
+
+  <!-- v2: actual binary support -->
+
+  <pre class=3Didl>[NoInterfaceObject]
+interface <dfn id=3Dwindowbase64>WindowBase64</dfn> {
+  DOMString <a href=3D#dom-windowbase64-btoa title=3Ddom-windowbase64=
-btoa>btoa</a>(DOMString btoa);
+  DOMString <a href=3D#dom-windowbase64-atob title=3Ddom-windowbase64=
-atob>atob</a>(DOMString atob);
+};
+<a href=3D#window>Window</a> implements <a href=3D#window=
base64>WindowBase64</a>;</pre>
+
+  <p class=3Dnote>In these APIs, for mnemonic purposes, the "=
b" can be considered to stand for
+  "binary", and the "a" for "ASCII". In pr=
actice, though, for primarily historical reasons, both the
+  input and output of these functions are Unicode strings.</p>
+
+  <dl class=3Ddomintro><dt><var title=3D"">r=
esult</var> =3D <var title=3D"">window</var> =
. <code title=3Ddom-windowbase64-btoa><a href=3D#dom-windowbase6=
4-btoa>btoa</a></code>( <var title=3D"">da=
ta</var> )</dt>
+
+   <dd>
+
+    <p>Takes the input data, in the form of a Unicode string conta=
ining only characters in the range
+    U+0000 to U+00FF, each representing a binary byte with values 0x00 t=
o 0xFF respectively, and
+    converts it to its base64 representation, which it returns.</p&gt=
;
+
+    <p>Throws an <code><a href=3D#invalidcharactererror&g=
t;InvalidCharacterError</a></code> exception if the input str=
ing contains any
+    out-of-range characters.</p>
+
+   </dd>
+
+   <dt><var title=3D"">result</var> =3D <=
var title=3D"">window</var> . <code title=3Ddom-win=
dowbase64-atob><a href=3D#dom-windowbase64-atob>atob</a>&l=
t;/code>( <var title=3D"">data</var> )</dt&gt=
;
+
+   <dd>
+
+    <p>Takes the input data, in the form of a Unicode string conta=
ining base64-encoded binary data,
+    decodes it, and returns a string consisting of characters in the ran=
ge U+0000 to U+00FF, each
+    representing a binary byte with values 0x00 to 0xFF respectively, co=
rresponding to that binary
+    data.</p>
+
+    <p>Throws an <code><a href=3D#invalidcharactererror&g=
t;InvalidCharacterError</a></code> exception if the input str=
ing is not valid
+    base64 data.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p class=3Dnote>The <code><a href=3D#windowbase64>Wi=
ndowBase64</a></code> interface adds to the <code><a=
 href=3D#window>Window</a></code> interface
+  and the <code><a href=3D#workerglobalscope>WorkerGlobalSco=
pe</a></code> interface (part of Web Workers).</p>
+
+  <p>The <dfn id=3Ddom-windowbase64-btoa title=3Ddom-windowbase=
64-btoa><code>btoa()</code></dfn> method must throw =
an
+  <code><a href=3D#invalidcharactererror>InvalidCharacterErr=
or</a></code> exception if the method's first argument contai=
ns any character
+  whose code point is greater than U+00FF. Otherwise, the user agent mus=
t convert that argument to a
+  sequence of octets whose <var title=3D"">n</var>=
th octet is the eight-bit representation of the code
+  point of the <var title=3D"">n</var>th character=
 of the argument, and then must apply the base64
+  algorithm to that sequence of octets, and return the result. <a hre=
f=3D#refsRFC4648>[RFC4648]</a><!--base64--></p> <=
!-- Aryeh says: This seems to be what all
+  browsers do as of January 2011 (except IE, which doesn't support these=
 functions at all). -->
+
+
+  <p>The <dfn id=3Ddom-windowbase64-atob title=3Ddom-windowbase=
64-atob><code>atob()</code></dfn> method must run th=
e following
+  steps to parse the string passed in the method's first argument:</p=
>
+
+  <ol><!-- Aryeh says: Copies Firefox behavior as of January 20=
11 (4.0b8). WebKit is somewhat laxer,
+   and Opera throws no exceptions at all. gsnedders reports Opera's beha=
vior causes site-compat
+   problems, and I figure most sites depend on Firefox if on anything, s=
o go with that. --><!-- Since updated to drop whitespace, based on =
the arguments here:
+      http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2011-May/03161=
3.html
+   --><li><p>Let <var title=3D"">input&lt=
;/var> be the string being parsed.</li>
+
+   <li><p>Let <var title=3D"">position</v=
ar> be a pointer into <var title=3D"">input</var&gt=
;, initially
+   pointing at the start of the string.</li>
+
+   <li><p>Remove all <a href=3D#space-character title=3D&=
quot;space character">space characters</a> from <var tit=
le=3D"">input</var>.</li>
+
+   <li><p>If the length of <var title=3D"">i=
nput</var> divides by 4 leaving no remainder, then: if
+   <var title=3D"">input</var> ends with one or tw=
o U+003D EQUALS SIGN (=3D) characters, remove them
+   from <var title=3D"">input</var>.</li>
+
+   <li><p>If the length of <var title=3D"">i=
nput</var> divides by 4 leaving a remainder of 1, throw an
+   <code><a href=3D#invalidcharactererror>InvalidCharacterEr=
ror</a></code> exception and abort these steps.</p>
+
+   <li>
+
+    <p>If <var title=3D"">input</var> contai=
ns a character that is not in the following list of
+    characters and character ranges, throw an <code><a href=3D#=
invalidcharactererror>InvalidCharacterError</a></code> exc=
eption and abort
+    these steps:</p>
+
+    <ul class=3Dbrief><li>U+002B PLUS SIGN (+)
+     <li>U+002F SOLIDUS (/)
+     <li><a href=3D#alphanumeric-ascii-characters>Alphanumer=
ic ASCII characters</a>
+    </ul></li>
+
+   <li><p>Let <var title=3D"">output</var=
> be a string, initially empty.</li>
+
+   <li><p>Let <var title=3D"">buffer</var=
> be a buffer that can have bits appended to it, initially
+   empty.</li>
+
+   <li>
+
+    <p>While <var title=3D"">position</var> =
does not point past the end of <var title=3D"">input</=
var>,
+    run these substeps:</p>
+
+    <ol><li>
+
+      <p>Find the character pointed to by <var title=3D"&q=
uot;>position</var> in the first column of the
+      following table. Let <var title=3D"">n</var>=
 be the number given in the second cell of the same
+      row.</p>
+
+      <div id=3Dbase64-table>
+       <table><thead><tr><th>Character
+          <th>Number
+        <tbody><tr><td>A<td>0
+         <tr><td>B<td>1
+         <tr><td>C<td>2
+         <tr><td>D<td>3
+         <tr><td>E<td>4
+         <tr><td>F<td>5
+         <tr><td>G<td>6
+         <tr><td>H<td>7
+         <tr><td>I<td>8
+         <tr><td>J<td>9
+         <tr><td>K<td>10
+         <tr><td>L<td>11
+         <tr><td>M<td>12
+         <tr><td>N<td>13
+         <tr><td>O<td>14
+         <tr><td>P<td>15
+         <tr><td>Q<td>16
+         <tr><td>R<td>17
+         <tr><td>S<td>18
+         <tr><td>T<td>19
+         <tr><td>U<td>20
+         <tr><td>V<td>21
+         <tr><td>W<td>22
+         <tr><td>X<td>23
+         <tr><td>Y<td>24
+         <tr><td>Z<td>25
+         <tr><td>a<td>26
+         <tr><td>b<td>27
+         <tr><td>c<td>28
+         <tr><td>d<td>29
+         <tr><td>e<td>30
+         <tr><td>f<td>31
+         <tr><td>g<td>32
+         <tr><td>h<td>33
+         <tr><td>i<td>34
+         <tr><td>j<td>35
+         <tr><td>k<td>36
+         <tr><td>l<td>37
+         <tr><td>m<td>38
+         <tr><td>n<td>39
+         <tr><td>o<td>40
+         <tr><td>p<td>41
+         <tr><td>q<td>42
+         <tr><td>r<td>43
+         <tr><td>s<td>44
+         <tr><td>t<td>45
+         <tr><td>u<td>46
+         <tr><td>v<td>47
+         <tr><td>w<td>48
+         <tr><td>x<td>49
+         <tr><td>y<td>50
+         <tr><td>z<td>51
+         <tr><td>0<td>52
+         <tr><td>1<td>53
+         <tr><td>2<td>54
+         <tr><td>3<td>55
+         <tr><td>4<td>56
+         <tr><td>5<td>57
+         <tr><td>6<td>58
+         <tr><td>7<td>59
+         <tr><td>8<td>60
+         <tr><td>9<td>61
+         <tr><td>+<td>62
+         <tr><td>/<td>63
+       </table></div>
+
+     </li>
+
+     <li><p>Append to <var title=3D"">buffer=
</var> the six bits corresponding to <var title=3D""&g=
t;number</var>, most significant bit first.</li>
+
+     <li><p>If <var title=3D"">buffer</va=
r> has accumulated 24 bits, interpret them as three 8-bit
+     big-endian numbers. Append the three characters with code points eq=
ual to those numbers to <var title=3D"">output</var&gt=
;, in the same order, and then empty <var title=3D"">buff=
er</var>.</li>
+
+     <li><p>Advance <var title=3D"">position=
</var> by one character.</li>
+
+    </ol></li>
+
+   <li>
+
+    <p>If <var title=3D"">buffer</var> is no=
t empty, it contains either 12 or 18 bits. If it contains
+    12 bits, discard the last four and interpret the remaining eight as =
an 8-bit big-endian number.
+    If it contains 18 bits, discard the last two and interpret the remai=
ning 16 as two 8-bit
+    big-endian numbers. Append the one or two characters with code point=
s equal to those one or two
+    numbers to <var title=3D"">output</var>, in th=
e same order.</p>
+
+    <p class=3Dnote>The discarded bits mean that, for instance, &l=
t;code title=3D"">atob("YQ")</code> and
+    <code title=3D"">atob("YR")</code> b=
oth return "<code title=3D"">a</code>".&l=
t;/p>
+
+   </li>
+
+   <li><p>Return <var title=3D"">output</=
var>.</li>
+
+  </ol><!-- Note: this function is defined explicitly here beca=
use RFC4648 does not specify how to handle
+  erroneous input, and no preexisting browser implementation simply thro=
ws an exception on all
+  erroneous input. --></div>
+
+
+<!--TOPIC:HTML Syntax and Parsing-->
+  <h3 id=3Ddynamic-markup-insertion><span class=3Dsecno>7.3 =
</span><dfn>Dynamic markup insertion</dfn></h3>
+
+  <p class=3Dnote>APIs for dynamically inserting markup into the d=
ocument interact with the parser,
+  and thus their behavior varies depending on whether they are used with=
 <a href=3D#html-documents>HTML documents</a>
+  (and the <a href=3D#html-parser>HTML parser</a>) or XHTML =
in <a href=3D#xml-documents>XML documents</a> (and the <a =
href=3D#xml-parser>XML
+  parser</a>).</p>
+
+
+
+  <h4 id=3Dopening-the-input-stream><span class=3Dsecno>7.3.=
1 </span>Opening the input stream</h4>
+
+  <p>The <dfn id=3Ddom-document-open title=3Ddom-document-open&=
gt;<code>open()</code></dfn> method comes in several va=
riants
+  with different numbers of arguments.</p>
+
+  <dl class=3Ddomintro><dt><var title=3D"">d=
ocument</var> =3D <var title=3D"">document</var&=
gt; . <code title=3Ddom-document-open><a href=3D#dom-document-op=
en>open</a></code>( [ <var title=3D"">type=
</var> [, <var title=3D"">replace</var> ] ] )=
</dt>
+
+   <dd>
+
+    <p>Causes the <code><a href=3D#document>Document&l=
t;/a></code> to be replaced in-place, as if it was a new
+    <code><a href=3D#document>Document</a></code&gt=
; object, but reusing the previous object, which is then returned.</p&=
gt;
+
+    <p>If the <var title=3D"">type</var> arg=
ument is omitted or has the value
+    "<code><a href=3D#text/html>text/html</a><=
/code>", then the resulting <code><a href=3D#document&gt=
;Document</a></code> has an HTML parser associated
+    with it, which can be given data to parse using <code title=3Ddom=
-document-write><a href=3D#dom-document-write>document.write()&l=
t;/a></code>. Otherwise, all content passed to <code title=3D=
dom-document-write><a href=3D#dom-document-write>document.write(=
)</a></code> will be parsed as plain text.</p>
+
+    <p>If the <var title=3D"">replace</var> =
argument is present and has the value "<code title=3D""=
>replace</code>", the existing entries in the session histo=
ry for the
+    <code><a href=3D#document>Document</a></code&gt=
; object are removed.</p>
+
+    <p>The method has no effect if the <code><a href=3D#d=
ocument>Document</a></code> is still being parsed.</p&g=
t;
+
+    <p>Throws an <code><a href=3D#invalidstateerror>In=
validStateError</a></code> exception if the <code><a=
 href=3D#document>Document</a></code> is an <a href=3D#=
xml-documents title=3D"XML documents">XML document</a>=
.</p>
+
+   </dd>
+
+   <dt><var title=3D"">window</var> =3D <=
var title=3D"">document</var> . <code title=3Ddom-d=
ocument-open><a href=3D#dom-document-open>open</a></cod=
e>( <var title=3D"">url</var>, <var title=3D&=
quot;">name</var>, <var title=3D"">features=
</var> [, <var title=3D"">replace</var> ] )&l=
t;/dt>
+
+   <dd>
+
+    <p>Works like the <code title=3Ddom-open><a href=3D#d=
om-open>window.open()</a></code> method.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p><code><a href=3D#document>Document</a></=
code> objects have an <dfn id=3Dignore-opens-during-unload-counter&=
gt;ignore-opens-during-unload counter</dfn>, which is
+  used to prevent scripts from invoking the <code title=3Ddom-documen=
t-open><a href=3D#dom-document-open>document.open()</a>&lt=
;/code>
+  method (directly or indirectly) while the document is <a href=3D#un=
load-a-document title=3D"unload a document">being
+  unloaded</a>. Initially, the counter must be set to zero.</p&=
gt; <!--
+  http://www.hixie.ch/tests/adhoc/dom/level0/document/open/unload/ --&gt=
;
+
+  <p>When called with two arguments, the <code title=3Ddom-docu=
ment-open><a href=3D#dom-document-open>document.open()</a>=
</code>
+  method must act as follows:</p>
+
+  <ol><li><p>If the <code><a href=3D#document=
>Document</a></code> object is not flagged as an <a hre=
f=3D#html-documents title=3D"HTML documents">HTML
+   document</a>, throw an <code><a href=3D#invalidstateer=
ror>InvalidStateError</a></code> exception and abort these=
 steps.</li>
+
+   <li><p>If the <code><a href=3D#document>Docum=
ent</a></code> object is not an <a href=3D#active-document=
>active document</a>, then abort
+   these steps.</li>
+
+   <li><p>Let <var title=3D"">type</var&g=
t; be the value of the first argument.</li>
+
+   <li>
+
+    <p>If the second argument is an <a href=3D#ascii-case-insen=
sitive>ASCII case-insensitive</a> match for the value
+    "replace", then let <var title=3D"">replac=
e</var> be true.</p>
+
+    <p>Otherwise, if the <a href=3D#browsing-context>browsin=
g context</a>'s <a href=3D#session-history>session history&lt=
;/a> contains only
+    one <code><a href=3D#document>Document</a></cod=
e>, and that was the <code><a href=3D#about:blank>about:bl=
ank</a></code> <code><a href=3D#document>Document=
</a></code>
+    created when the <a href=3D#browsing-context>browsing context&=
lt;/a> was created, and that <code><a href=3D#document>Doc=
ument</a></code> has
+    never had the <a href=3D#unload-a-document>unload a document&l=
t;/a> algorithm invoked on it (e.g. by a previous call to
+    <code title=3Ddom-document-open><a href=3D#dom-document-ope=
n>document.open()</a></code>), then let <var title=3D&q=
uot;">replace</var> be
+    true.</p>
+
+    <p>Otherwise, let <var title=3D"">replace</=
var> be false.</p>
+
+   </li>
+
+   <li>
+
+    <p>If the <code><a href=3D#document>Document</a=
></code> has an <a href=3D#active-parser>active parser<=
/a> whose <a href=3D#script-nesting-level>script nesting
+    level</a> is greater than zero, then the method does nothing. =
Abort these steps and return
+    the <code><a href=3D#document>Document</a></cod=
e> object on which the method was invoked.</p>
+
+    <p class=3Dnote>This basically causes <code title=3Ddom-doc=
ument-open><a href=3D#dom-document-open>document.open()</a&gt=
;</code> to
+    be ignored when it's called in an inline script found during parsing=
, while still letting it
+    have an effect when called asynchronously.</p>
+
+   </li>
+
+   <li>
+
+    <p>Similarly, if the <code><a href=3D#document>Doc=
ument</a></code>'s <a href=3D#ignore-opens-during-unload-c=
ounter>ignore-opens-during-unload counter</a> is
+    greater than zero, then the method does nothing. Abort these steps a=
nd return the
+    <code><a href=3D#document>Document</a></code&gt=
; object on which the method was invoked.</p>
+
+    <p class=3Dnote>This basically causes <code title=3Ddom-doc=
ument-open><a href=3D#dom-document-open>document.open()</a&gt=
;</code> to
+    be ignored when it's called from a <code title=3Devent-beforeunlo=
ad>beforeunload</code> <code title=3Devent-pagehide><a =
href=3D#event-pagehide>pagehide</a></code>, or <code ti=
tle=3Devent-unload>unload</code> event
+    handler while the <code><a href=3D#document>Document<=
/a></code> is being unloaded.</p>
+
+   </li>
+
+   <li><p>Release the <a href=3D#storage-mutex>storage=
 mutex</a>.</li>
+
+   <li><p>Set the <code><a href=3D#document>Docu=
ment</a></code>'s <i title=3Dconcept-document-salvageable&=
gt;<a href=3D#concept-document-salvageable>salvageable</a>&lt=
;/i> state to false.</li>
+
+   <li><p><a href=3D#prompt-to-unload-a-document title=3D=
"prompt to unload a document">Prompt to unload</a> the
+   <code><a href=3D#document>Document</a></code>=
 object. If the user <a href=3D#refused-to-allow-the-document-to-be-un=
loaded>refused to allow the document to be
+   unloaded</a>, then abort these steps and return the <code&gt=
;<a href=3D#document>Document</a></code> object on whic=
h the
+   method was invoked.</li>
+
+   <li><p><a href=3D#unload-a-document title=3D"unlo=
ad a document">Unload</a> the <code><a href=3D#doc=
ument>Document</a></code> object, with the
+   <var title=3D"">recycle</var> parameter set to =
true.</li>
+
+   <li><p><a href=3D#abort-a-document title=3D"abort=
 a document">Abort</a> the <code><a href=3D#docume=
nt>Document</a></code>.</li>
+
+   <li><p>Unregister all event listeners registered on the &=
lt;code><a href=3D#document>Document</a></code> node=
 and its
+   descendants.</p>
+
+   <li><p>Remove any <a href=3D#concept-task title=3Dconc=
ept-task>tasks</a> associated with the
+   <code><a href=3D#document>Document</a></code>=
 in any <a href=3D#task-source>task source</a>.</li> &l=
t;!-- removes callbacks that fired
+   between this algorithm starting and the times and databases being abo=
rted in the "unload" step
+   above -->
+
+   <li><p>Remove all child nodes of the document, without fi=
ring any mutation events.</li> <!--
+   as of 2009-03-30, only WebKit fired mutation events here. -->
+
+   <li>
+
+    <p>Replace the <code><a href=3D#document>Document&=
lt;/a></code>'s singleton objects with new instances of those ob=
jects.
+    (This includes in particular the <code><a href=3D#window&gt=
;Window</a></code>, <code><a href=3D#location>Loc=
ation</a></code>,
+    <code><a href=3D#history-0>History</a></code&gt=
;, <code><a href=3D#applicationcache>ApplicationCache</a&g=
t;</code>, and <code><a href=3D#navigator>Navigator<=
/a></code>, objects, the
+    various <code><a href=3D#barprop>BarProp</a></c=
ode> objects, the two <code><a href=3D#storage-0>Storage&l=
t;/a></code> objects, the various
+    <code><a href=3D#htmlcollection>HTMLCollection</a>=
</code> objects, and objects defined by other specifications, like
+    <code>Selection</code> and the document's <code>Un=
doManager</code>. It also includes all the Web
+    IDL prototypes in the JavaScript binding, including the <code>=
<a href=3D#document>Document</a></code> object's
+    prototype.)</p>
+
+    <p class=3Dnote>The new <code><a href=3D#window>Wi=
ndow</a></code> object has a new <a href=3D#script-setting=
s-object>script settings
+    object</a>.</p>
+
+   </li>
+
+   <!-- http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DO=
CTYPE%20html%3E...%3Ciframe%20src%3D%22document%22%3E%3C%2Fiframe%3E%0A%3=
Cscript%3Eonload%20%3D%20function%20()%20%7B%20f%20%3D%20document.getElem=
entsByTagName('iframe')%5B0%5D%3B%20d%20%3D%20f.contentWindow.document%3B=
%20%7D%3C%2Fscript%3E%0A%3Cinput%20type%3Dbutton%20onclick%3D%22w(d.docum=
entElement.innerHTML)%22%20value%3D%22dump%22%3E%0A%3Cinput%20type%3Dbutt=
on%20onclick%3D%22d.open()%3B%20d.write('%3Cscript%3Evar%20x%20%3D%20new%=
20XMLHttpRequest()%3Bx.open(%26quot%3BGET%26quot%3B%2C%20%26quot%3BGET%26=
quot%3B)%3Bx.onreadystatechange%3Dfunction()%20%7B%20alert(x.readyState)%=
3B%20%7D%3Bx.send(null)%3B%3C%2Fscript%3E')%3Bd.close()%3B%20setTimeout(f=
unction()%20%7B%20d.open()%3B%20d.write('%3Cp%3Etest%3C%2Fp%3E')%3B%20d.c=
lose()%20%7D%2C%200)%3B%22%20value%3D%22xhr%22%3E%0A%3Cinput%20type%3Dbut=
ton%20onclick%3D%22d.onclick%20%3D%20function()%20%7B%20w('click')%20%7D%=
22%20value%3D%22add%20click%20handler%22%3E%0A%3Cinput%20type%3Dbutton%20=
onclick%3D%22d.open()%3B%20d.write('%3Cp%3Etest%3C%2Fp%3E')%3B%20d.close(=
)%22%20value%3D%22replace%22%3E%0A%3Cinput%20type%3Dbutton%20onclick%3D%2=
2d.open()%3B%20d.write('%3Cp%3E%3Cscript%3Ei%20%3D%200%3B%20setTimeout(%2=
6quot%3Bparent.w(i%2B%2B)%26quot%3B%2C%202000)%3C%2Fscript%3E%3C%2Fp%3E')=
%3B%20d.close()%22%20value%3D%22replace%20with%20timer%22%3E -->
+   <!-- http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DO=
CTYPE%20html%3E%0D%0A...%3Ciframe%3E%3C%2Fiframe%3E%0D%0A%3Cscript%3E%0D%=
0Aonload%20%3D%20function%20()%20%7B%0D%0A%20frames%5B0%5D.test%20%3D%201=
%0D%0A%20w(frames%5B0%5D.test)%3B%0D%0A%20var%20a%20%3D%20frames%5B0%5D.d=
ocument.location.assign%3B%0D%0A%20w(a)%3B%0D%0A%20w(frames%5B0%5D.docume=
nt.location.assign%20%3D%3D%3D%20a)%3B%0D%0A%20frames%5B0%5D.document.ope=
n()%3B%0D%0A%20frames%5B0%5D.document.write('%3Cscript%3Edocument.write(t=
est)%3C%5C%2Fscript%3E')%3B%0D%0A%20frames%5B0%5D.document.close()%3B%0D%=
0A%20w(frames%5B0%5D.test)%3B%0D%0A%20w(frames%5B0%5D.document.location.a=
ssign%20%3D%3D%3D%20a)%3B%0D%0A%7D%0D%0A%3C%2Fscript%3E -->
+
+   <li><p>Change the <a href=3D"#document's-characte=
r-encoding">document's character encoding</a> to UTF-8.<=
/li>
+
+   <li><p>If the <code><a href=3D#document>Docum=
ent</a></code> is <a href=3D#ready-for-post-load-tasks>=
ready for post-load tasks</a>, then set the
+   <code><a href=3D#document>Document</a></code>=
 object's <a href=3D#reload-override-flag>reload override flag</=
a> and set the
+   <code><a href=3D#document>Document</a></code>=
's <a href=3D#reload-override-buffer>reload override buffer</a&g=
t; to the empty string.</li>
+
+   <li><p>Set the <code><a href=3D#document>Docu=
ment</a></code>'s <i title=3Dconcept-document-salvageable&=
gt;<a href=3D#concept-document-salvageable>salvageable</a>&lt=
;/i> state back to true.</li>
+
+<!--CLEANUP-->
+   <li><p>Change <a href=3D"#the-document's-address&=
quot;>the document's address</a> to the <a href=3D"#the-=
document's-address" title=3D"the document's
+   address">address</a> of the <a href=3D#responsible-d=
ocument>responsible document</a> specified by
+   the <a href=3D#entry-settings-object>entry settings object</=
a>.</li>
+
+   <!-- <span>the document's referrer</span> stays the sa=
me -->
+
+   <li><p>If the <code><a href=3D#document>Docum=
ent</a></code>'s <a href=3D#iframe-load-in-progress>ifr=
ame load in progress</a> flag is set, set the
+   <code><a href=3D#document>Document</a></code>=
's <a href=3D#mute-iframe-load>mute iframe load</a> flag.<=
/li>
+
+   <li><p>Create a new <a href=3D#html-parser>HTML par=
ser</a> and associate it with the document. This is a
+   <dfn id=3Dscript-created-parser>script-created parser</dfn&g=
t; (meaning that it can be closed by the <code title=3Ddom-document-op=
en><a href=3D#dom-document-open>document.open()</a></co=
de> and <code title=3Ddom-document-close><a href=3D#dom-docum=
ent-close>document.close()</a></code> methods, and that th=
e tokenizer will wait for
+   an explicit call to <code title=3Ddom-document-close><a href=
=3D#dom-document-close>document.close()</a></code> before =
emitting an
+   end-of-file token). The encoding <a href=3D#concept-encoding-confi=
dence title=3Dconcept-encoding-confidence>confidence</a> is
+   <i>irrelevant</i>.</li>
+
+   <li><p>Set the <a href=3D#current-document-readiness&g=
t;current document readiness</a> of the document to "<code =
title=3D"">loading</code>".</li>
+
+   <li>
+
+    <!-- text/plain handling -->
+
+    <p>If <var title=3D"">type</var> is an &=
lt;a href=3D#ascii-case-insensitive>ASCII case-insensitive</a> m=
atch for the string
+    "<code>replace</code>", then, for historical r=
easons, set it to the string "<code title=3D"">text/=
html</code>".</p>
+
+    <p>Otherwise:</p>
+
+    <p>If the <var title=3D"">type</var> str=
ing contains a U+003B SEMICOLON character (;), remove the
+    first such character and all characters from it up to the end of the=
 string.</p>
+
+    <p><a href=3D#strip-leading-and-trailing-whitespace>Stri=
p leading and trailing whitespace</a> from <var title=3D"&q=
uot;>type</var>.</p>
+
+   </li>
+
+   <li>
+
+    <p>If <var title=3D"">type</var> is <=
em>not</em> now an <a href=3D#ascii-case-insensitive>ASCII=
 case-insensitive</a> match
+    for the string "<code><a href=3D#text/html>text/htm=
l</a></code>", then act as if the tokenizer had emitted =
a start tag
+    token with the tag name "pre" followed by a single U+000A =
LINE FEED (LF) character<!-- to get
+    eaten, so that a leading LF in the written text doesn't get eaten it=
self-->, then switch the
+    <a href=3D#html-parser>HTML parser</a>'s tokenizer to th=
e <a href=3D#plaintext-state>PLAINTEXT state</a>.</p>
+
+    <!--
+ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20ht=
ml%3E...%3Ciframe%3E%3C%2Fiframe%3E%3Cscript%3Eonload%20%3D%20function%20=
()%20%7B%20%0D%0A%20%20var%20d%20%3D%20document.getElementsByTagName('ifr=
ame')%5B0%5D.contentDocument%3B%0D%0A%20%20d.open('image%2Fsvg%2Bxml')%3B=
%0D%0A%20%20d.write(%22%3Cinput%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F1999=
%2Fxhtml'%20value%3D'(x)html'%2F%3E%22)%3B%0D%0A%20%20d.close()%3B%0D%0A%=
7D%3B%3C%2Fscript%3E
+ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20ht=
ml%3E...%3Ciframe%3E%3C%2Fiframe%3E%3Cscript%3Eonload%20%3D%20function%20=
()%20%7B%20%0D%0A%20%20var%20d%20%3D%20document.getElementsByTagName('ifr=
ame')%5B0%5D.contentDocument%3B%0D%0A%20%20d.open('image%2Fgif')%3B%0D%0A=
%20%20var%20a%20%3D%20%5B%200x47%2C%200x49%2C%200x46%2C%200x38%2C%200x39%=
2C%200x61%2C%200x01%2C%200x00%2C%200x01%2C%200x00%2C%0D%0A%20%20%20%20%20=
%20%20%20%20%20%20%200x80%2C%200xff%2C%200x00%2C%200xc0%2C%200xc0%2C%200x=
c0%2C%200x00%2C%200x00%2C%200x00%2C%200x21%2C%0D%0A%20%20%20%20%20%20%20%=
20%20%20%20%200xf9%2C%200x04%2C%200x01%2C%200x00%2C%200x00%2C%200x00%2C%2=
00x00%2C%200x2c%2C%200x00%2C%200x00%2C%0D%0A%20%20%20%20%20%20%20%20%20%2=
0%20%200x00%2C%200x00%2C%200x01%2C%200x00%2C%200x01%2C%200x00%2C%200x00%2=
C%200x02%2C%200x02%2C%200x44%2C%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20=
0x01%2C%200x00%2C%200x3b%20%5D%3B%0D%0A%20%20var%20s%20%3D%20%22%22%3B%0D=
%0A%20%20for%20(var%20i%20%3D%200%3B%20i%20%3C%20a.length%3B%20i%20%2B%3D=
%201)%0D%0A%20%20%20%20s%20%2B%3D%20String.fromCharCode(a%5Bi%5D)%3B%0D%0=
A%20%20d.write(s)%3B%0D%0A%20%20d.close()%3B%0D%0A%7D%3B%3C%2Fscript%3E
+ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20ht=
ml%3E...%3Ciframe%3E%3C%2Fiframe%3E%3Cscript%3Eonload%20%3D%20function%20=
()%20{%20%0A%20%20var%20d%20%3D%20document.getElementsByTagName(%27iframe=
%27)[0].contentDocument%3B%0A%20%20d.open(%27Text%2Fplain%27)%3B%0A%20%20=
d.write(%27%3Cb%3Etest%27)%3B%0A%20%20d.close()%3B%0A}%3B%3C%2Fscript%3E
+ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20ht=
ml%3E...%3Ciframe%3E%3C%2Fiframe%3E%3Cscript%3Eonload%20%3D%20function%20=
()%20{%20%0A%20%20var%20d%20%3D%20document.getElementsByTagName(%27iframe=
%27)[0].contentDocument%3B%0A%20%20d.open(%27%20text%2Fplain%27)%3B%0A%20=
%20d.write(%27%3Cb%3Etest%27)%3B%0A%20%20d.close()%3B%0A}%3B%3C%2Fscript%=
3E
+ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20ht=
ml%3E...%3Ciframe%3E%3C%2Fiframe%3E%3Cscript%3Eonload%20%3D%20function%20=
()%20{%20%0A%20%20var%20d%20%3D%20document.getElementsByTagName(%27iframe=
%27)[0].contentDocument%3B%0A%20%20d.open(%27text%2Fplain%3B%27)%3B%0A%20=
%20d.write(%27%3Cb%3Etest%27)%3B%0A%20%20d.close()%3B%0A}%3B%3C%2Fscript%=
3E
+    -->
+
+   </li>
+
+   <li>
+
+    <p>Remove all the entries in the <a href=3D#browsing-contex=
t>browsing context</a>'s <a href=3D#session-history>sessio=
n history</a>
+    after the <a href=3D#current-entry>current entry</a>. If=
 the <a href=3D#current-entry>current entry</a> is the last e=
ntry in the
+    session history, then no entries are removed.</p>
+
+    <p class=3Dnote>This <a href=3D#history-notes>doesn't ne=
cessarily have to affect</a> the user
+    agent's user interface.</p>
+
+   </li>
+
+   <li><p>Remove any <a href=3D#concept-task title=3Dconc=
ept-task>tasks</a> queued by the <a href=3D#history-traversal=
-task-source>history traversal
+   task source</a> that are associated with any <code><a =
href=3D#document>Document</a></code> objects in the
+   <a href=3D#top-level-browsing-context>top-level browsing contex=
t</a>'s <a href=3D#document-family>document family</a>.=
</li>
+
+   <li>Remove any earlier entries that share the same <code>=
<a href=3D#document>Document</a></code>.</li>
+
+   <li><p>If <var title=3D"">replace</var=
> is false, then add a new entry, just before the last entry,
+   and associate with the new entry the text that was parsed by the prev=
ious parser associated with
+   the <code><a href=3D#document>Document</a></code=
> object, as well as the state of the document at the start of these
+   steps. This allows the user to step backwards in the session history =
to see the page before it
+   was blown away by the <code title=3Ddom-document-open><a hre=
f=3D#dom-document-open>document.open()</a></code> call. Th=
is new entry
+   does not have a <code><a href=3D#document>Document</a&=
gt;</code> object, so a new one will be created if the session hist=
ory
+   is traversed to that entry.</li>
+
+   <li><p>Finally, set the <a href=3D#insertion-point>=
insertion point</a> to point at just before the end of the
+   <a href=3D#input-stream>input stream</a> (which at this p=
oint will be empty).</li>
+
+   <li><p>Return the <code><a href=3D#document>D=
ocument</a></code> on which the method was invoked.</li&gt=
;
+
+  </ol><p class=3Dnote>The <code title=3Ddom-document-ope=
n><a href=3D#dom-document-open>document.open()</a></cod=
e> method does not affect
+  whether a <code><a href=3D#document>Document</a><=
/code> is <a href=3D#ready-for-post-load-tasks>ready for post-lo=
ad tasks</a> or <a href=3D#completely-loaded>completely
+  loaded</a>.</p>
+
+  <p>When called with four arguments, the <code title=3Ddom-doc=
ument-open><a href=3D#dom-document-open>open()</a></cod=
e> method on
+  the <code><a href=3D#document>Document</a></code&=
gt; object must call the <code title=3Ddom-open><a href=3D#dom-o=
pen>open()</a></code> method on the
+  <code><a href=3D#window>Window</a></code> obje=
ct of the <code><a href=3D#document>Document</a></co=
de> object, with the same arguments as the
+  original call to the <code title=3Ddom-document-open><a href=3D=
#dom-document-open>open()</a></code> method, and return wh=
atever
+  that method returned. If the <code><a href=3D#document>Doc=
ument</a></code> object has no <code><a href=3D#wind=
ow>Window</a></code> object, then
+  the method must throw an <code><a href=3D#invalidaccesserror&=
gt;InvalidAccessError</a></code> exception.</p>
+
+  </div>
+
+
+
+  <h4 id=3Dclosing-the-input-stream><span class=3Dsecno>7.3.=
2 </span>Closing the input stream</h4>
+
+  <dl class=3Ddomintro><dt><var title=3D"">d=
ocument</var> . <code title=3Ddom-document-close><a href=3D=
#dom-document-close>close</a></code>()</dt>
+
+   <dd>
+
+    <p>Closes the input stream that was opened by the <code tit=
le=3Ddom-document-open><a href=3D#dom-document-open>document.ope=
n()</a></code> method.</p>
+
+    <p>Throws an <code><a href=3D#invalidstateerror>In=
validStateError</a></code> exception if the
+    <code><a href=3D#document>Document</a></code&gt=
; is an <a href=3D#xml-documents title=3D"XML documents">=
XML
+    document</a>.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-document-close title=3Ddom-document-clos=
e><code>close()</code></dfn> method must run the fol=
lowing
+  steps:</p>
+
+  <ol><li><p>If the <code><a href=3D#document=
>Document</a></code> object is not flagged as an <a hre=
f=3D#html-documents title=3D"HTML documents">HTML
+   document</a>, throw an <code><a href=3D#invalidstateer=
ror>InvalidStateError</a></code> exception and abort these
+   steps.</li>
+
+   <li><p>If there is no <a href=3D#script-created-parser=
>script-created parser</a> associated with the document, then ab=
ort
+   these steps.</li>
+
+   <li><p>Insert an <a href=3D#explicit-eof-character>=
explicit "EOF" character</a> at the end of the parser's &=
lt;a href=3D#input-stream>input
+   stream</a>.</li>
+
+   <li><p>If there is a <a href=3D#pending-parsing-blocki=
ng-script>pending parsing-blocking script</a>, then abort these
+   steps.</li>
+
+   <li><p>Run the tokenizer, processing resulting tokens as =
they are emitted, and stopping when the
+   tokenizer reaches the <a href=3D#explicit-eof-character>explici=
t "EOF" character</a> or <a href=3D#spin-the-event-loo=
p title=3D"spin the event
+   loop">spins the event loop</a>.</li>
+
+  </ol></div>
+
+
+
+  <h4 id=3Ddocument.write()><span class=3Dsecno>7.3.3 </s=
pan><code title=3Ddom-document-write><a href=3D#dom-document-=
write>document.write()</a></code></h4>
+
+  <dl class=3Ddomintro><dt><var title=3D"">d=
ocument</var> . <code title=3Ddom-document-write><a href=3D=
#dom-document-write>write</a></code>(<var title=3D&quot=
;">text</var>...)</dt>
+
+   <dd>
+
+    <p>In general, adds the given string(s) to the <code>&lt=
;a href=3D#document>Document</a></code>'s input stream.&lt=
;/p>
+
+    <p class=3Dwarning>This method has very idiosyncratic behavior=
. In some cases, this method can
+    affect the state of the <a href=3D#html-parser>HTML parser<=
/a> while the parser is running, resulting in a DOM
+    that does not correspond to the source of the document (e.g. if the =
string written is the string
+    "<code title=3D""><plaintext><=
/code>" or "<code title=3D""><!--<=
/code>"). In other cases,
+    the call can clear the current page first, as if <code title=3Ddo=
m-document-open><a href=3D#dom-document-open>document.open()<=
/a></code> had been called. In yet more cases, the method
+    is simply ignored, or throws an exception. To make matters worse, th=
e exact behavior of this
+    method can in some cases be dependent on network latency<!--
+
+     Namely, in the following case:
+
+        <script>
+         document.write('<link rel=3Dstylesheet href=3Dfoo.css>&lt=
;script></script>x');
+         // at this point, whether the DOM contains an "x" or =
not depends on how quickly the foo.css file could be processed
+        </script>
+
+    -->, which can lead to failures that are very hard to debug. <=
strong>For all these reasons, use
+    of this method is strongly discouraged.</strong></p>
+
+    <p>This method throws an <code><a href=3D#invalidstat=
eerror>InvalidStateError</a></code> exception when invoked=
 on <a href=3D#xml-documents>XML
+    documents</a>.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p><code><a href=3D#document>Document</a></=
code> objects have an <dfn id=3Dignore-destructive-writes-counter&g=
t;ignore-destructive-writes counter</dfn>, which is
+  used in conjunction with the processing of <code><a href=3D#t=
he-script-element>script</a></code> elements to prevent ex=
ternal
+  scripts from being able to use <code title=3Ddom-document-write>=
<a href=3D#dom-document-write>document.write()</a></code&g=
t; to blow
+  away the document by implicitly calling <code title=3Ddom-document-=
open><a href=3D#dom-document-open>document.open()</a></=
code>.
+  Initially, the counter must be set to zero.</p>
+
+  <p>The <dfn id=3Ddom-document-write title=3Ddom-document-writ=
e><code>document.write(...)</code></dfn> method must=
 act as
+  follows:</p>
+
+  <ol><li>
+
+    <p>If the method was invoked on an <a href=3D#xml-documents=
 title=3D"XML documents">XML document</a>, throw an
+    <code><a href=3D#invalidstateerror>InvalidStateError<=
/a></code> exception and abort these steps.</p>
+
+    <!--
+    Where would document.write() insert?
+    Consider: data:text/xml,<script xmlns=3D"http://www.w3.org/1=
999/xhtml"><![CDATA[ document.write('<foo>Test</foo&g=
t;'); ]]></script>
+    -->
+
+   </li>
+
+   <li><p>If the <code><a href=3D#document>Docum=
ent</a></code> object is not an <a href=3D#active-document=
>active document</a>, then abort
+   these steps.</li>
+
+   <li>
+
+    <p>If the <a href=3D#insertion-point>insertion point<=
/a> is undefined and either the <code><a href=3D#document>=
Document</a></code>'s
+    <a href=3D#ignore-opens-during-unload-counter>ignore-opens-dur=
ing-unload counter</a> is greater than zero or the
+    <code><a href=3D#document>Document</a></code&gt=
;'s <a href=3D#ignore-destructive-writes-counter>ignore-destructive=
-writes counter</a> is greater than zero,
+    abort these steps.</p>
+
+   </li>
+
+   <li>
+
+    <p>If the <a href=3D#insertion-point>insertion point<=
/a> is undefined, call the <code title=3Ddom-document-open><a=
 href=3D#dom-document-open>open()</a></code> method on the=
 <code title=3DDocument><a href=3D#document>document</a&gt=
;</code>
+    object (with no arguments). If the user <a href=3D#refused-to-all=
ow-the-document-to-be-unloaded>refused to allow the document to be
+    unloaded</a>, then abort these steps. Otherwise, the <a hre=
f=3D#insertion-point>insertion point</a> will point
+    at just before the end of the (empty) <a href=3D#input-stream>=
input stream</a>.</p>
+
+   </li>
+
+   <li>
+
+    <p>Insert the string consisting of the concatenation of all th=
e arguments to the method into the
+    <a href=3D#input-stream>input stream</a> just before the=
 <a href=3D#insertion-point>insertion point</a>.</p>
+
+   </li>
+
+   <li>
+
+    <p>If the <code><a href=3D#document>Document</a=
></code> object's <a href=3D#reload-override-flag>reload o=
verride flag</a> is set, then append
+    the string consisting of the concatenation of all the arguments to t=
he method to the
+    <code><a href=3D#document>Document</a></code&gt=
;'s <a href=3D#reload-override-buffer>reload override buffer</a&=
gt;.</p>
+
+   </li>
+
+   <li>
+
+    <p>If there is no <a href=3D#pending-parsing-blocking-scrip=
t>pending parsing-blocking script</a>, have the <a href=3D#ht=
ml-parser>HTML
+    parser</a> process the characters that were inserted, one at a=
 time, processing resulting
+    tokens as they are emitted, and stopping when the tokenizer reaches =
the insertion point or when
+    the processing of the tokenizer is aborted by the tree construction =
stage (this can happen if a
+    <code><a href=3D#the-script-element>script</a><=
/code> end tag token is emitted by the tokenizer).
+
+    <p class=3Dnote>If the <code title=3Ddom-document-write>=
<a href=3D#dom-document-write>document.write()</a></code&g=
t; method was
+    called from script executing inline (i.e. executing because the pars=
er parsed a set of
+    <code><a href=3D#the-script-element>script</a><=
/code> tags), then this is a <a href=3D#nestedParsing>reentrant =
invocation of the
+    parser</a>.</p>
+
+   </li>
+
+   <li>
+
+    <p>Finally, return from the method.</p>
+
+   </li>
+
+  </ol></div>
+
+
+  <h4 id=3Ddocument.writeln()><span class=3Dsecno>7.3.4 <=
/span><code title=3Ddom-document-writeln><a href=3D#dom-docum=
ent-writeln>document.writeln()</a></code></h4>
+
+  <dl class=3Ddomintro><dt><var title=3D"">d=
ocument</var> . <code title=3Ddom-document-writeln><a href=
=3D#dom-document-writeln>writeln</a></code>(<var title=3D=
"">text</var>...)</dt>
+
+   <dd>
+
+    <p>Adds the given string(s) to the <code><a href=3D#d=
ocument>Document</a></code>'s input stream, followed by a =
newline
+    character. If necessary, calls the <code title=3Ddom-document-ope=
n><a href=3D#dom-document-open>open()</a></code> met=
hod
+    implicitly first.</p>
+
+    <p>This method throws an <code><a href=3D#invalidstat=
eerror>InvalidStateError</a></code> exception when invoked=
 on <a href=3D#xml-documents>XML
+    documents</a>.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-document-writeln title=3Ddom-document-wr=
iteln><code>document.writeln(...)</code></dfn> metho=
d, when
+  invoked, must act as if the <code title=3Ddom-document-write>&lt=
;a href=3D#dom-document-write>document.write()</a></code> =
method had
+  been invoked with the same argument(s), plus an extra argument consist=
ing of a string containing a
+  single line feed character (U+000A).</p>
+
+  </div>
+
+
+
+  <h3 id=3Dtimers><span class=3Dsecno>7.4 </span>Timer=
s</h3>
+
+  <p>The <code title=3Ddom-windowtimers-setTimeout><a hre=
f=3D#dom-windowtimers-settimeout>setTimeout()</a></code>
+  and <code title=3Ddom-windowtimers-setInterval><a href=3D#dom=
-windowtimers-setinterval>setInterval()</a></code>
+  methods allow authors to schedule timer-based callbacks.</p>
+
+  <pre class=3Didl>[NoInterfaceObject]
+interface <dfn id=3Dwindowtimers>WindowTimers</dfn> {
+  long <a href=3D#dom-windowtimers-settimeout title=3Ddom-windowtimer=
s-setTimeout>setTimeout</a>(<span>Function</span> ha=
ndler, optional long timeout, any... arguments);
+  long <a href=3D#dom-windowtimers-settimeout title=3Ddom-windowtimer=
s-setTimeout>setTimeout</a>(DOMString handler, optional long tim=
eout, any... arguments);
+  void <a href=3D#dom-windowtimers-cleartimeout title=3Ddom-windowtim=
ers-clearTimeout>clearTimeout</a>(long handle);
+  long <a href=3D#dom-windowtimers-setinterval title=3Ddom-windowtime=
rs-setInterval>setInterval</a>(<span>Function</span>=
 handler, optional long timeout, any... arguments);
+  long <a href=3D#dom-windowtimers-setinterval title=3Ddom-windowtime=
rs-setInterval>setInterval</a>(DOMString handler, optional long =
timeout, any... arguments);
+  void <a href=3D#dom-windowtimers-clearinterval title=3Ddom-windowti=
mers-clearInterval>clearInterval</a>(long handle);
+};
+<a href=3D#window>Window</a> implements <a href=3D#window=
timers>WindowTimers</a>;</pre>
+
+  <!-- Demonstrating the need for wrapping of the timeout argument va=
lue treated as long rather than clamping or treating as double:
+          http://software.hixie.ch/utilities/js/live-dom-viewer/saved/12=
28
+       Demonstrating the need for the timeout argument to be signed rath=
er than unsigned:
+          http://software.hixie.ch/utilities/js/live-dom-viewer/saved/12=
29
+  -->
+
+  <dl class=3Ddomintro><dt><var title=3D"">h=
andle</var> =3D <var title=3D"">window</var> =
. <code title=3Ddom-windowtimers-setTimeout><a href=3D#dom-windo=
wtimers-settimeout>setTimeout</a></code>( <var title=3D=
"">handler</var> [, <var title=3D"">ti=
meout</var> [, <var title=3D"">arguments</var&gt=
;... ] ] )</dt>
+
+   <dd>
+
+    <p>Schedules a timeout to run <var title=3D"">=
handler</var> after <var title=3D"">timeout</var=
>
+    milliseconds. Any <var title=3D"">arguments</var&=
gt; are passed straight through to the <var title=3D"">ha=
ndler</var>.</p>
+
+   </dd>
+
+   <dt><var title=3D"">handle</var> =3D <=
var title=3D"">window</var> . <code title=3Ddom-win=
dowtimers-setTimeout><a href=3D#dom-windowtimers-settimeout>setT=
imeout</a></code>( <var title=3D"">code</v=
ar> [, <var title=3D"">timeout</var> ] )</dt&=
gt;
+
+   <dd>
+
+    <p>Schedules a timeout to compile and run <var title=3D&quo=
t;">code</var> after <var title=3D"">timeou=
t</var> milliseconds.</p>
+
+   </dd>
+
+   <dt><var title=3D"">window</var> . <co=
de title=3Ddom-windowtimers-clearTimeout><a href=3D#dom-windowtimer=
s-cleartimeout>clearTimeout</a></code>( <var title=3D&q=
uot;">handle</var> )</dt>
+
+   <dd>
+
+    <p>Cancels the timeout set with <code title=3Ddom-windowtim=
ers-setTimeout><a href=3D#dom-windowtimers-settimeout>setTimeout=
()</a></code>
+    identified by <var title=3D"">handle</var>.&lt=
;/p>
+
+   </dd>
+
+   <dt><var title=3D"">handle</var> =3D <=
var title=3D"">window</var> . <code title=3Ddom-win=
dowtimers-setInterval><a href=3D#dom-windowtimers-setinterval>se=
tInterval</a></code>( <var title=3D"">handler=
</var> [, <var title=3D"">timeout</var> [, &l=
t;var title=3D"">arguments</var>... ] ] )</dt>
+
+   <dd>
+
+    <p>Schedules a timeout to run <var title=3D"">=
handler</var> every <var title=3D"">timeout</var=
>
+    milliseconds. Any <var title=3D"">arguments</var&=
gt; are passed straight through to the <var title=3D"">ha=
ndler</var>.</p>
+
+   </dd>
+
+   <dt><var title=3D"">handle</var> =3D <=
var title=3D"">window</var> . <code title=3Ddom-win=
dowtimers-setInterval><a href=3D#dom-windowtimers-setinterval>se=
tInterval</a></code>( <var title=3D"">code&lt=
;/var> [, <var title=3D"">timeout</var> ] )</=
dt>
+
+   <dd>
+
+    <p>Schedules a timeout to compile and run <var title=3D&quo=
t;">code</var> every <var title=3D"">timeou=
t</var> milliseconds.</p>
+
+   </dd>
+
+   <dt><var title=3D"">window</var> . <co=
de title=3Ddom-windowtimers-clearInterval><a href=3D#dom-windowtime=
rs-clearinterval>clearInterval</a></code>( <var title=3D=
"">handle</var> )</dt>
+
+   <dd>
+
+    <p>Cancels the timeout set with <code title=3Ddom-windowtim=
ers-setInterval><a href=3D#dom-windowtimers-setinterval>setInter=
val()</a></code> identified by <var title=3D""&g=
t;handle</var>.</p>
+
+   </dd>
+
+  </dl><p class=3Dnote>Timers can be nested; after five such=
 nested timers, however, the interval is
+  forced to be at least four milliseconds.</p>
+
+  <p class=3Dnote>This API does not guarantee that timers will run=
 exactly on schedule. Delays due
+  to CPU load, other tasks, etc, are to be expected.</p>
+
+  <div class=3Dimpl>
+
+  <p class=3Dnote>The <code><a href=3D#windowtimers>Wi=
ndowTimers</a></code> interface adds to the <code><a=
 href=3D#window>Window</a></code> interface
+  and the <code><a href=3D#workerglobalscope>WorkerGlobalSco=
pe</a></code> interface (part of Web Workers).</p>
+
+  <p>Each object that implements the <code><a href=3D#win=
dowtimers>WindowTimers</a></code> interface has a <dfn =
id=3Dlist-of-active-timers>list of active
+  timers</dfn>. Each entry in this lists is identified by a number=
, which must be unique within the
+  list for the lifetime of the object that implements the <code>&l=
t;a href=3D#windowtimers>WindowTimers</a></code> interface=
.</p>
+
+  <hr><p>The <dfn id=3Ddom-windowtimers-settimeout title=3D=
dom-windowtimers-setTimeout><code>setTimeout()</code></=
dfn> method must return
+  the value returned by the <a href=3D#timer-initialization-steps>=
timer initialization steps</a>, passing them the method's
+  arguments, the object on which the method for which the algorithm is r=
unning is implemented (a
+  <code><a href=3D#window>Window</a></code> or &=
lt;code><a href=3D#workerglobalscope>WorkerGlobalScope</a>=
</code> object) as the <var title=3D"">method
+  context</var>, and the <var title=3D"">repeat&lt=
;/var> flag set to false.</p>
+
+  <p>The <dfn id=3Ddom-windowtimers-setinterval title=3Ddom-win=
dowtimers-setInterval><code>setInterval()</code></dfn&g=
t; method must
+  return the value returned by the <a href=3D#timer-initialization-st=
eps>timer initialization steps</a>, passing them the
+  method's arguments, the object on which the method for which the algor=
ithm is running is
+  implemented (a <code><a href=3D#window>Window</a>&lt=
;/code> or <code><a href=3D#workerglobalscope>WorkerGlobal=
Scope</a></code> object) as the <var title=3D""&=
gt;method context</var>, and the <var title=3D"">re=
peat</var> flag set to true.</p>
+
+  <p>The <dfn id=3Ddom-windowtimers-cleartimeout title=3Ddom-wi=
ndowtimers-clearTimeout><code>clearTimeout()</code></df=
n> and <dfn id=3Ddom-windowtimers-clearinterval title=3Ddom-windowt=
imers-clearInterval><code>clearInterval()</code></dfn&g=
t; methods must clear the
+  entry identified as <var title=3D"">handle</var>=
 from the <a href=3D#list-of-active-timers>list of active timers&lt=
;/a> of the
+  <code><a href=3D#windowtimers>WindowTimers</a></c=
ode> object on which the method was invoked, where <var title=3D&qu=
ot;">handle</var>
+  is the argument passed to the method, if any. (If <var title=3D&quo=
t;">handle</var> does not identify an
+  entry in the <a href=3D#list-of-active-timers>list of active tim=
ers</a> of the <code><a href=3D#windowtimers>WindowTime=
rs</a></code> object on which
+  the method was invoked, the method does nothing.)</p>
+
+  <hr><p>The <dfn id=3Dtimer-initialization-steps>time=
r initialization steps</dfn>, which are invoked with some method ar=
guments, a <var title=3D"">method context</var>, a =
<var title=3D"">repeat</var> flag which can be true=
 or false, and
+  optionally (and only if the <var title=3D"">repeat<=
/var> flag is true) a <var title=3D"">previous
+  handle</var>, are as follows:</p>
+
+  <ol><li><p>Let <var title=3D"">metho=
d context proxy</var> be <var title=3D"">method con=
text</var> if that
+   is a <code><a href=3D#workerglobalscope>WorkerGlobalScope=
</a></code> object, or else the <code><a href=3D#win=
dowproxy>WindowProxy</a></code> that corresponds
+   to <var title=3D"">method context</var>.</li=
>
+
+   <li><p>If <var title=3D"">previous handle=
</var> was provided, let <var title=3D"">handle<=
/var> be
+   <var title=3D"">previous handle</var>; otherwis=
e, let <var title=3D"">handle</var> be a
+   user-agent-defined integer that is greater than zero that will identi=
fy the timeout to be set by
+   this call in the <a href=3D#list-of-active-timers>list of activ=
e timers</a>.</li>
+
+   <li><p>If <var title=3D"">previous handle=
</var> was not provided, add an entry to the <a href=3D#list-of-=
active-timers>list of
+   active timers</a> for <var title=3D"">handle&lt=
;/var>.</li>
+
+   <li>
+
+    <p>Let <var title=3D"">task</var> be a &=
lt;a href=3D#concept-task title=3Dconcept-task>task</a> that run=
s the
+    following substeps:</p>
+
+    <ol><li>
+
+      <p>If the entry for <var title=3D"">handle&l=
t;/var> in the <a href=3D#list-of-active-timers>list of active t=
imers</a> has
+      been cleared, then abort this <a href=3D#concept-task title=3Dc=
oncept-task>task</a>'s substeps.</p>
+
+     </li>
+
+     <li>
+
+      <p>Run the appropriate set of steps from the following list:=
</p>
+
+      <dl class=3Dswitch><dt>If the first method argument is=
 a <code>Function</code></dt>
+
+       <dd>
+
+        <p>Call the <code>Function</code>. Use the thi=
rd and subsequent method arguments (if any) as
+        the arguments for invoking the <code>Function</code>=
. Use <var title=3D"">method context
+        proxy</var> as the <var title=3D"">thisArg=
</var> for invoking the <code>Function</code>. <a hr=
ef=3D#refsECMA262>[ECMA262]</a></p>
+
+       </dd>
+
+       <dt>Otherwise</dt>
+
+       <dd>
+
+        <ol><li><p>Let <var title=3D""&gt=
;script source</var> be the first method argument.</li>
+
+         <li><p>Let <var title=3D"">script l=
anguage</var> be JavaScript.</li>
+
+         <li><p>Let <var title=3D"">settings=
 object</var> be <var title=3D"">method context<=
/var>'s
+         <a href=3D#script-settings-object>script settings object&=
lt;/a>.</li>
+
+         <li><!--CLEANUP--><!--no need for all this white=
space-->
+
+          <p><a href=3D#create-a-script>Create a script</=
a> using <var title=3D"">script source</var> as =
the script
+          source, the <a href=3D#url>URL</a> where <var t=
itle=3D"">script source</var> can be found, <var ti=
tle=3D"">scripting language</var> as the scripting lan=
guage, and <var title=3D"">settings
+          object</var> as the <a href=3D#script-settings-object=
>script settings object</a>.</p>
+
+         </li>
+
+        </ol></dd>
+
+      </dl></li>
+
+     <li><!--CLEANUP--><!--no need for all this whitespac=
e-->
+
+      <p>If the <var title=3D"">repeat</var>=
 flag is true, then call <a href=3D#timer-initialization-steps>time=
r initialization
+      steps</a> again, passing them the same method arguments, the=
 same <var title=3D"">method
+      context</var>, with the <var title=3D"">repe=
at</var> flag still set to true, and with the <var title=3D&quot=
;">previous handle</var> set to <var title=3D"&quot=
;>handler</var>.</p>
+
+     </li>
+
+    </ol></li>
+
+   <li><p>Let <var title=3D"">timeout</va=
r> be the second method argument, or zero if the argument was
+   omitted.</li>
+
+   <li><p>If the currently running <a href=3D#concept-tas=
k title=3Dconcept-task>task</a> is a task that was created
+   by this algorithm, then let <var title=3D"">nesting l=
evel</var> be the <a href=3D#concept-task title=3Dconcept-task&g=
t;task</a>'s <a href=3D#timer-nesting-level>timer nesting lev=
el</a>. Otherwise, let <var title=3D"">nesting leve=
l</var> be zero.</li>
+
+   <li><p>If <var title=3D"">nesting level&l=
t;/var> is greater than 5, and <var title=3D"">timeout=
</var> is
+   less than 4, then increase <var title=3D"">timeout&lt=
;/var> to 4.</li>
+
+   <li><p>Increment <var title=3D"">nesting =
level</var> by one.</li>
+
+   <li><p>Let <var title=3D"">task</var&g=
t;'s <dfn id=3Dtimer-nesting-level>timer nesting level</dfn> =
be <var title=3D"">nesting
+   level</var>.</li>
+
+   <li><p>Return <var title=3D"">handle</=
var>, and then continue running this algorithm
+   asynchronously.</li>
+
+   <li>
+
+    <p>If <var title=3D"">method context</var&g=
t; is a <code><a href=3D#window>Window</a></code>=
 object, wait until the
+    <code><a href=3D#document>Document</a></code&gt=
; associated with <var title=3D"">method context</var&=
gt; has been <a href=3D#fully-active>fully
+    active</a> for a further <var title=3D"">timeo=
ut</var> milliseconds (not necessarily
+    consecutively).</p>
+
+    <p>Otherwise, <var title=3D"">method context&l=
t;/var> is a <code><a href=3D#workerglobalscope>WorkerGlob=
alScope</a></code> object;
+    wait until <var title=3D"">timeout</var> milli=
seconds have passed with the worker not suspended
+    (not necessarily consecutively).</p>
+
+   </li>
+
+   <li>
+
+    <p>Wait until any invocations of this algorithm that had the s=
ame <var title=3D"">method
+    context</var>, that started before this one, and whose <var=
 title=3D"">timeout</var> is equal to
+    or less than this one's, have completed.</p>
+
+    <p class=3Dnote>Argument conversion as defined by Web IDL (for=
 example, invoking <code title=3D"">toString()</code&g=
t; methods on objects passed as the first argument) happens in the
+    algorithms defined in Web IDL, before this algorithm is invoked.<=
/p>
+
+    <div class=3Dexample>
+
+     <p>So for example, the following rather silly code will resul=
t in the log containing "<code title=3D"">ONE&nb=
sp;TWO </code>":</p>
+
+     <pre>var log =3D '';
+function logger(s) { log +=3D s + ' '; }
+
+setTimeout({ toString: function () {
+  setTimeout("logger('ONE')", 100);
+  return "logger('TWO')";
+} }, 100);</pre>
+
+    </div>
+
+   </li>
+
+   <li>
+
+    <p>Optionally, wait a further user-agent defined length of tim=
e.</p>
+
+    <p class=3Dnote>This is intended to allow user agents to pad t=
imeouts as needed to optimise the
+    power usage of the device. For example, some processors have a low-p=
ower mode where the
+    granularity of timers is reduced; on such platforms, user agents can=
 slow timers down to fit
+    this schedule instead of requiring the processor to use the more acc=
urate mode with its
+    associated higher power usage.</p>
+
+   </li>
+
+   <li>
+
+    <p><a href=3D#queue-a-task title=3D"queue a task"=
>Queue</a> the <a href=3D#concept-task title=3Dconcept-task&g=
t;task</a> <var title=3D"">task</var>.</p&=
gt;
+
+    <p class=3Dnote>Once the task has been processed, if the <v=
ar title=3D"">repeat</var> flag is
+    false, it is safe to remove the entry for <var title=3D"&quo=
t;>handle</var> from the <a href=3D#list-of-active-timers>=
list of
+    active timers</a> (there is no way for the entry's existence t=
o be detected past this point,
+    so it does not technically matter one way or the other).</p>
+
+   </li>
+
+  </ol><p>The <a href=3D#task-source>task source</a=
> for these <a href=3D#concept-task title=3Dconcept-task>tasks&l=
t;/a> is the
+  <dfn id=3Dtimer-task-source>timer task source</dfn>.</p=
>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>To run tasks of several milliseconds back to back without an=
y delay, while still yielding back
+   to the browser to avoid starving the user interface (and to avoid the=
 browser killing the script
+   for hogging the CPU), simply queue the next timer before performing w=
ork:</p>
+
+   <pre>function doExpensiveWork() {
+  var done =3D false;
+  // ...
+  // this part of the function takes up to five milliseconds
+  // set done to true if we're done
+  // ...
+  return done;
+}
+
+function rescheduleWork() {
+  var handle =3D setTimeout(rescheduleWork, 0); // preschedule next iter=
ation
+  if (doExpensiveWork())
+    clearTimeout(handle); // clear the timeout if we don't need it
+}
+
+function scheduleWork() {
+  setTimeout(rescheduleWork, 0);
+}
+
+scheduleWork(); // queues a task to do lots of work</pre>
+
+  </div>
+
+
+  <h3 id=3Duser-prompts><span class=3Dsecno>7.5 </span&gt=
;User prompts</h3>
+
+  <!--
+   v2 ideas:
+    * in-window modal dialogs
+       - escape/enter handling
+       - dragging the window out of the tab
+    * in-window non-modal palettes
+       - with a solution for the mobile space
+  -->
+
+  <h4 id=3Dsimple-dialogs><span class=3Dsecno>7.5.1 </spa=
n>Simple dialogs</h4>
+
+  <dl class=3Ddomintro><dt><var title=3D"">w=
indow</var> . <code title=3Ddom-alert><a href=3D#dom-alert=
>alert</a></code>(<var title=3D"">message&=
lt;/var>)</dt>
+   <dd>
+
+    <p>Displays a modal alert with the given message, and waits fo=
r the user to dismiss it.</p>
+
+    <p>A call to the <code title=3Ddom-navigator-yieldForStorag=
eUpdates><a href=3D#dom-navigator-yieldforstorageupdates>navigat=
or.yieldForStorageUpdates()</a></code> method is
+    implied when this method is invoked.</p>
+
+   </dd>
+
+   <dt><var title=3D"">result</var> =3D <=
var title=3D"">window</var> . <code title=3Ddom-con=
firm><a href=3D#dom-confirm>confirm</a></code>(<v=
ar title=3D"">message</var>)</dt>
+   <dd>
+
+    <p>Displays a modal OK/Cancel prompt with the given message, w=
aits for the user to dismiss it,
+    and returns true if the user clicks OK and false if the user clicks =
Cancel.</p>
+
+    <p>A call to the <code title=3Ddom-navigator-yieldForStorag=
eUpdates><a href=3D#dom-navigator-yieldforstorageupdates>navigat=
or.yieldForStorageUpdates()</a></code> method is
+    implied when this method is invoked.</p>
+
+   </dd>
+
+   <dt><var title=3D"">result</var> =3D <=
var title=3D"">window</var> . <code title=3Ddom-pro=
mpt><a href=3D#dom-prompt>prompt</a></code>(<var =
title=3D"">message</var> [, <var title=3D"&quo=
t;>default</var>] )</dt>
+   <dd>
+
+    <p>Displays a modal text field prompt with the given message, =
waits for the user to dismiss it,
+    and returns the value that the user entered. If the user cancels the=
 prompt, then returns null
+    instead. If the second argument is present, then the given value is =
used as a default.</p>
+
+    <p>A call to the <code title=3Ddom-navigator-yieldForStorag=
eUpdates><a href=3D#dom-navigator-yieldforstorageupdates>navigat=
or.yieldForStorageUpdates()</a></code> method is
+    implied when this method is invoked.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-alert title=3Ddom-alert><code>a=
lert(<var title=3D"">message</var>)</code>&lt=
;/dfn> method, when
+  invoked, must run the following steps:</p>
+
+  <ol><li><p>If the <a href=3D#event-loop>event =
loop</a>'s <a href=3D#termination-nesting-level>termination n=
esting level</a> is non-zero,
+   optionally abort these steps.</li>
+
+   <li><p>Release the <a href=3D#storage-mutex>storage=
 mutex</a>.</li>
+
+   <li><p>Optionally, abort these steps. (For example, the u=
ser agent might give the user the option
+   to ignore all alerts, and would thus abort at this step whenever the =
method was
+   invoked.)</li>
+
+   <li><p>Show the given <var title=3D"">mes=
sage</var> to the user.</li>
+
+   <li><p>Optionally, <a href=3D#pause>pause</a>=
 while waiting for the user to acknowledge the
+   message.</li>
+
+  </ol><p>The <dfn id=3Ddom-confirm title=3Ddom-confirm&g=
t;<code>confirm(<var title=3D"">message</var>=
)</code></dfn> method,
+  when invoked, must run the following steps:</p>
+
+  <ol><li><p>If the <a href=3D#event-loop>event =
loop</a>'s <a href=3D#termination-nesting-level>termination n=
esting level</a> is non-zero,
+   optionally abort these steps, returning false.</li>
+
+   <li><p>Release the <a href=3D#storage-mutex>storage=
 mutex</a>.</li>
+
+   <li><p>Optionally, return false and abort these steps. (F=
or example, the user agent might give
+   the user the option to ignore all prompts, and would thus abort at th=
is step whenever the method
+   was invoked.)</li>
+
+   <li><p>Show the given <var title=3D"">mes=
sage</var> to the user, and ask the user to respond with a
+   positive or negative response.</li>
+
+   <li><p><a href=3D#pause>Pause</a> until the u=
ser responds either positively or negatively.</li>
+
+   <li><p>If the user responded positively, return true; oth=
erwise, the user responded negatively:
+   return false.</li>
+
+  </ol><p>The <dfn id=3Ddom-prompt title=3Ddom-prompt>=
<code>prompt(<var title=3D"">message</var>, &=
lt;var title=3D"">default</var>)</code></dfn&=
gt; method, when invoked, must run the following steps:</p>
+
+  <ol><li><p>If the <a href=3D#event-loop>event =
loop</a>'s <a href=3D#termination-nesting-level>termination n=
esting level</a> is non-zero,
+   optionally abort these steps, returning null.</li>
+
+   <li><p>Release the <a href=3D#storage-mutex>storage=
 mutex</a>.</li>
+
+   <li><p>Optionally, return null and abort these steps. (Fo=
r example, the user agent might give the
+   user the option to ignore all prompts, and would thus abort at this s=
tep whenever the method was
+   invoked.)</li>
+
+   <li><p>Show the given <var title=3D"">mes=
sage</var> to the user, and ask the user to either respond
+   with a string value or abort. The response must be defaulted to the v=
alue given by
+   <var title=3D"">default</var>.</li>
+
+   <li><p><a href=3D#pause>Pause</a> while waiti=
ng for the user's response.</li>
+
+   <li><p>If the user aborts, then return null; otherwise, r=
eturn the string that the user responded
+   with.</li>
+
+  </ol></div>
+
+
+  <h4 id=3Dprinting><span class=3Dsecno>7.5.2 </span>P=
rinting</h4>
+
+  <dl class=3Ddomintro><dt><var title=3D"">w=
indow</var> . <code title=3Ddom-print><a href=3D#dom-print=
>print</a></code>()</dt>
+
+   <dd>
+
+    <p>Prompts the user to print the page.</p>
+
+    <p>A call to the <code title=3Ddom-navigator-yieldForStorag=
eUpdates><a href=3D#dom-navigator-yieldforstorageupdates>navigat=
or.yieldForStorageUpdates()</a></code> method is
+    implied when this method is invoked.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>When the <dfn id=3Ddom-print title=3Ddom-print><code=
>print()</code></dfn> method is invoked, if the
+  <code><a href=3D#document>Document</a></code> =
is <a href=3D#ready-for-post-load-tasks>ready for post-load tasks&l=
t;/a>, then the user agent must
+  synchronously run the <a href=3D#printing-steps>printing steps&l=
t;/a>. Otherwise, the user agent must only set the
+  <dfn id=3Dprint-when-loaded>print when loaded</dfn> flag o=
n the <code><a href=3D#document>Document</a></code&g=
t;.</p>
+
+<!--TOPIC:HTML-->
+
+  <p>User agents should also run the <a href=3D#printing-steps&=
gt;printing steps</a> whenever the user asks for the
+  opportunity to <a href=3D#obtain-a-physical-form>obtain a physic=
al form</a> (e.g. printed copy), or the representation of a
+  physical form (e.g. PDF copy), of a document.</p>
+
+  <p>The <dfn id=3Dprinting-steps>printing steps</dfn>=
 are as follows:</p>
+
+  <ol><li>
+
+    <p>The user agent may display a message to the user or abort t=
hese steps (or both).</p>
+
+    <p class=3Dexample>For instance, a kiosk browser could silentl=
y ignore any invocations of the
+    <code title=3Ddom-print><a href=3D#dom-print>print()<=
/a></code> method.</p>
+
+    <p class=3Dexample>For instance, a browser on a mobile device =
could detect that there are no
+    printers in the vicinity and display a message saying so before cont=
inuing to offer a "save to
+    PDF" option.</p>
+
+   </li>
+
+   <li>
+
+    <p>The user agent must <a href=3D#fire-a-simple-event>fi=
re a simple event</a> named <code title=3Devent-beforeprint>b=
eforeprint</code> at the <code><a href=3D#window>Window=
</a></code> object of the
+    <code><a href=3D#document>Document</a></code&gt=
; that is being printed, as well as any <a href=3D#nested-browsing-con=
text title=3D"nested browsing
+    context">nested browsing contexts</a> in it.</p>
+
+    <p class=3Dexample>The <code title=3Devent-beforeprint>b=
eforeprint</code> event can be used to
+    annotate the printed copy, for instance adding the time at which the=
 document was printed.</p>
+
+   </li>
+
+   <li>
+
+    <p>The user agent must release the <a href=3D#storage-mutex=
>storage mutex</a>.</p>
+
+   </li>
+
+   <li>
+
+    <p>The user agent should offer the user the opportunity to &lt=
;a href=3D#obtain-a-physical-form>obtain a physical form</a>
+    (or the representation of a physical form) of the document. The user=
 agent may wait for the user
+    to either accept or decline before returning; if so, the user agent =
must <a href=3D#pause>pause</a>
+    while the method is waiting. Even if the user agent doesn't wait at =
this point, the user agent
+    must use the state of the relevant documents as they are at this poi=
nt in the algorithm if and
+    when it eventually creates the alternate form.</p>
+
+   </li>
+
+   <li>
+
+    <p>The user agent must <a href=3D#fire-a-simple-event>fi=
re a simple event</a> named <code title=3Devent-afterprint>af=
terprint</code> at the <code><a href=3D#window>Window&l=
t;/a></code> object of the
+    <code><a href=3D#document>Document</a></code&gt=
; that is being printed, as well as any <a href=3D#nested-browsing-con=
text title=3D"nested browsing
+    context">nested browsing contexts</a> in it.</p>
+
+    <p class=3Dexample>The <code title=3Devent-afterprint>af=
terprint</code> event can be used to
+    revert annotations added in the earlier event, as well as showing po=
st-printing UI. For
+    instance, if a page is walking the user through the steps of applyin=
g for a home loan, the
+    script could automatically advance to the next step after having pri=
nted a form or other.</p>
+
+   </li>
+
+  </ol></div>
+
+
+<!--TOPIC:DOM APIs-->
+  <h4 id=3Ddialogs-implemented-using-separate-documents><span c=
lass=3Dsecno>7.5.3 </span>Dialogs implemented using separate doc=
uments</h4>
+
+  <dl class=3Ddomintro><dt><var title=3D"">r=
esult</var> =3D <var title=3D"">window</var> =
. <code title=3Ddom-showModalDialog><a href=3D#dom-showmodaldial=
og>showModalDialog</a></code>(<var title=3D""=
>url</var> [, <var title=3D"">argument</var&g=
t;] )</dt>
+
+   <dd>
+
+    <p>Prompts the user with the given page, waits for that page t=
o
+    close, and returns the return value.</p>
+
+    <p>A call to the <code title=3Ddom-navigator-yieldForStorag=
eUpdates><a href=3D#dom-navigator-yieldforstorageupdates>navigat=
or.yieldForStorageUpdates()</a></code>
+    method is implied when this method is invoked.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-showmodaldialog title=3Ddom-showModalDia=
log><code>showModalDialog(<var title=3D"">url&lt=
;/var>, <var title=3D"">argument</var><!--, &=
lt;var title=3D"">features</var>-->)</code>&l=
t;/dfn> method, when invoked,
+  must cause the user agent to run the following steps:</p>
+
+  <ol><li>
+
+<!--CLEANUP-->
+    <p><a href=3D#resolve-a-url title=3D"resolve a url&quo=
t;>Resolve</a> <var title=3D"">url</var> r=
elative to the
+    <a href=3D#api-base-url>API base URL</a> specified by
+    the <a href=3D#entry-settings-object>entry settings object<=
/a>.</p>
+
+    <p>If this fails, then throw a <code><a href=3D#synta=
xerror>SyntaxError</a></code> exception and abort these st=
eps.</p>
+
+   </li>
+
+   <li><p>If the <a href=3D#event-loop>event loop</=
a>'s <a href=3D#termination-nesting-level>termination nesting le=
vel</a> is non-zero,
+   optionally abort these steps, returning the empty string.</li>
+
+   <li>
+
+    <p>Release the <a href=3D#storage-mutex>storage mutex&lt=
;/a>.</p>
+
+   </li>
+
+   <li>
+
+    <p>If the user agent is configured such that this invocation o=
f <code title=3Ddom-showModalDialog><a href=3D#dom-showmodaldial=
og>showModalDialog()</a></code> is somehow disabled, then =
return the empty
+    string and abort these steps.</p>
+
+    <p class=3Dnote>User agents are expected to disable this metho=
d in certain cases to avoid user
+    annoyance (e.g. as part of their popup blocker feature). For instanc=
e, a user agent could
+    require that a site be white-listed before enabling this method, or =
the user agent could be
+    configured to only allow one modal dialog at a time.</p>
+
+   </li>
+
+   <li>
+
+<!--CLEANUP-->
+    <p>If the <a href=3D#active-sandboxing-flag-set>active s=
andboxing flag set</a> of the <a href=3D#active-document>acti=
ve document</a> of the
+    <a href=3D#responsible-browsing-context>responsible browsing c=
ontext</a> specified by the <a href=3D#incumbent-settings-object=
>incumbent
+    settings object</a> has its <a href=3D#sandboxed-auxiliary-=
navigation-browsing-context-flag>sandboxed auxiliary navigation browsi=
ng context flag</a> set,
+    then return the empty string and abort these steps.</p>
+
+   </li>
+
+   <li>
+
+<!--CLEANUP-->
+    <p>Let <var title=3D"">incumbent origin</va=
r> be the <a href=3D#effective-script-origin>effective script or=
igin</a> specified by the
+    <a href=3D#incumbent-settings-object>incumbent settings object=
</a> at the time the <code title=3Ddom-showModalDialog><a =
href=3D#dom-showmodaldialog>showModalDialog()</a></code> m=
ethod was called.</p>
+
+   </li>
+
+   <li>
+
+    <p>Let <var title=3D"">the list of background =
browsing contexts</var> be a list of all the
+    browsing contexts that:</p>
+
+    <ul><li>are part of the same <a href=3D#unit-of-relat=
ed-browsing-contexts>unit of related browsing contexts</a> as th=
e browsing context
+     of the <code><a href=3D#window>Window</a></cod=
e> object on which the <code title=3Ddom-showModalDialog><a h=
ref=3D#dom-showmodaldialog>showModalDialog()</a></code> me=
thod was called, and that</li>
+
+     <li>have an <a href=3D#active-document>active document&=
lt;/a> whose <a href=3D#origin>origin</a> is the <a hre=
f=3D#same-origin title=3D"same
+     origin">same</a> as <var title=3D"">i=
ncumbent origin</var>,</li> <!-- Note that changing
+     document.domain to talk to another domain doesn't make you able to =
block that domain -->
+
+    </ul><p>...as well as any browsing contexts that are nes=
ted inside any of the browsing contexts
+    matching those conditions.</p>
+
+   </li>
+
+   <li>
+
+    <p>Disable the user interface for all the browsing contexts in=
 <var title=3D"">the list of
+    background browsing contexts</var>. This should prevent the us=
er from navigating those browsing
+    contexts, causing events to be sent to those browsing context, or ed=
iting any content in those
+    browsing contexts. However, it does not prevent those browsing conte=
xts from receiving events
+    from sources other than the user, from running scripts, from running=
 animations, and so
+    forth.</p>
+
+   </li>
+
+   <li>
+
+    <p>Create a new <a href=3D#auxiliary-browsing-context>au=
xiliary browsing context</a>, with the <a href=3D#opener-browsin=
g-context>opener browsing
+    context</a> being the browsing context of the <code><=
a href=3D#window>Window</a></code> object on which the &lt=
;code title=3Ddom-showModalDialog><a href=3D#dom-showmodaldialog&gt=
;showModalDialog()</a></code> method was called. The new auxi=
liary
+    browsing context has no name.</p>
+
+    <p class=3Dnote>This <a href=3D#browsing-context>browsin=
g context</a>'s <code><a href=3D#document>Document</=
a></code>s' <code><a href=3D#window>Window</a>=
</code>
+    objects all implement the <code><a href=3D#windowmodal>W=
indowModal</a></code> interface.</p>
+
+   </li>
+
+   <li>
+
+<!--CLEANUP-->
+    <p>Set all the flags in the new browsing context's <a href=3D=
#popup-sandboxing-flag-set>popup sandboxing flag set</a> that
+    are set in the <a href=3D#active-sandboxing-flag-set>active sa=
ndboxing flag set</a> of the <a href=3D#active-document>activ=
e document</a> of
+    the <a href=3D#responsible-browsing-context>responsible browsi=
ng context</a> specified by the <a href=3D#incumbent-settings-ob=
ject>incumbent
+    settings object</a>. The <a href=3D#responsible-browsing-co=
ntext>responsible browsing context</a> specified by the <a hr=
ef=3D#incumbent-settings-object>incumbent settings object</a>
+    must be set as the new browsing context's <a href=3D#one-permitte=
d-sandboxed-navigator>one permitted sandboxed
+    navigator</a>.</p>
+
+   </li>
+
+   <li>
+
+    <p>Let the <a href=3D#dialog-arguments>dialog arguments&=
lt;/a> of the new browsing context be set to the value of <var titl=
e=3D"">argument</var>, or the <i>undefined</i=
> value if the argument was omitted.</p>
+
+   </li>
+
+   <li>
+
+    <p>Let the <a href=3D"#dialog-arguments'-origin"&=
gt;dialog arguments' origin</a> be <var title=3D"">=
incumbent origin</var>.</p>
+
+   </li>
+
+   <li>
+
+    <p>Let the <a href=3D#return-value>return value</a&gt=
; of the new browsing context be the <i>undefined</i> value.&=
lt;/p>
+
+   </li>
+
+   <li>
+
+    <p>Let the <a href=3D#return-value-origin>return value o=
rigin</a> be <var title=3D"">incumbent origin</v=
ar>.</p>
+
+   </li>
+
+   <li>
+
+<!--CLEANUP-->
+    <p><a href=3D#navigate>Navigate</a><!--DONAV sh=
owModalDialog--> the new <a href=3D#browsing-context>browsing co=
ntext</a> to
+    the <a href=3D#absolute-url>absolute URL</a> that result=
ed from <a href=3D#resolve-a-url title=3D"resolve a url">=
resolving</a>
+    <var title=3D"">url</var> earlier, with <a =
href=3D#replacement-enabled>replacement enabled</a>, and with th=
e <a href=3D#responsible-browsing-context>responsible
+    browsing context</a> specified by the <a href=3D#incumbent-=
settings-object>incumbent settings object</a>
+    as the <a href=3D#source-browsing-context>source browsing cont=
ext</a>.</p>
+
+   </li>
+
+   <li>
+
+    <p><a href=3D#spin-the-event-loop>Spin the event loop&lt=
;/a> until the new <a href=3D#browsing-context>browsing context&=
lt;/a> is <a href=3D#close-a-browsing-context title=3D"close a=
 browsing context">closed</a>. The user agent must allow th=
e user to indicate
+    that the <a href=3D#browsing-context>browsing context</a&gt=
; is to be closed.</p>
+
+   </li>
+
+   <li>
+
+    <p>Reenable the user interface for all the browsing contexts i=
n <var title=3D"">the list of
+    background browsing contexts</var>.</p>
+
+   </li>
+
+   <li>
+
+    <p>If the <a href=3D#auxiliary-browsing-context>auxiliar=
y browsing context</a>'s <a href=3D#return-value-origin>retur=
n value origin</a> at the time
+    the browsing context was <a href=3D#close-a-browsing-context titl=
e=3D"close a browsing context">closed</a> was the <=
a href=3D#same-origin title=3D"same origin">same</a> a=
s <var title=3D"">incumbent origin</var>, then let =
<var title=3D"">return value</var> be the <a hre=
f=3D#auxiliary-browsing-context>auxiliary browsing context</a>'s=
 <a href=3D#return-value>return
+    value</a> as it stood when the browsing context was <a href=
=3D#close-a-browsing-context title=3D"close a browsing
+    context">closed</a>.</p>
+
+    <p>Otherwise, let <var title=3D"">return value=
</var> be undefined.</p>
+
+   </li>
+
+   <li>
+
+    <p>Return <var title=3D"">return value</var=
>.</p>
+
+   </li>
+
+  </ol><p>The <code><a href=3D#window>Window<=
/a></code> objects of <code><a href=3D#document>Docu=
ment</a></code>s hosted by <a href=3D#browsing-context tit=
le=3D"browsing
+  context">browsing contexts</a> created by the above algo=
rithm must also implement the
+  <code><a href=3D#windowmodal>WindowModal</a></cod=
e> interface.</p>
+
+  <p class=3Dnote>When this happens, the members of the <code&g=
t;<a href=3D#windowmodal>WindowModal</a></code> interfa=
ce, in
+  JavaScript environments, appear to actually be part of the <code&gt=
;<a href=3D#window>Window</a></code> interface (e.g.
+  they are on the same prototype chain as the <code title=3Ddom-alert=
><a href=3D#dom-alert>window.alert()</a></code>
+  method).</p>
+
+  </div>
+
+  <pre class=3Didl>[NoInterfaceObject] interface <dfn id=3Dwind=
owmodal>WindowModal</dfn> {
+  readonly attribute any <a href=3D#dom-windowmodal-dialogarguments t=
itle=3Ddom-WindowModal-dialogArguments>dialogArguments</a>;
+           attribute any <a href=3D#dom-windowmodal-returnvalue title=
=3Ddom-WindowModal-returnValue>returnValue</a>;
+};</pre>
+
+  <dl class=3Ddomintro><dt><var title=3D"">w=
indow</var> . <code title=3Ddom-WindowModal-dialogArguments>&=
lt;a href=3D#dom-windowmodal-dialogarguments>dialogArguments</a>=
</code></dt>
+
+   <dd>
+
+    <p>Returns the <var title=3D"">argument</va=
r> argument that was passed to the <code title=3Ddom-showModalDialo=
g><a href=3D#dom-showmodaldialog>showModalDialog()</a><=
/code> method.</p>
+
+   </dd>
+
+   <dt><var title=3D"">window</var> . <co=
de title=3Ddom-WindowModal-returnValue><a href=3D#dom-windowmodal-r=
eturnvalue>returnValue</a></code> [ =3D <var title=3D&q=
uot;">value</var> ]</dt>
+
+   <dd>
+
+    <p>Returns the current return value for the window.</p>
+
+    <p>Can be set, to change the value that will be returned by th=
e <code title=3Ddom-showModalDialog><a href=3D#dom-showmodaldial=
og>showModalDialog()</a></code> method.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>Such browsing contexts have associated <dfn id=3Ddialog-ar=
guments>dialog arguments</dfn>, which are stored along with
+  the <dfn id=3D"dialog-arguments'-origin">dialog argume=
nts' origin</dfn>. These values are set by the <code title=3Ddom=
-showModalDialog><a href=3D#dom-showmodaldialog>showModalDialog(=
)</a></code> method in the algorithm above, when the
+  browsing context is created, based on the arguments provided to the me=
thod.</p>
+
+  <p>The <dfn id=3Ddom-windowmodal-dialogarguments title=3Ddom-=
WindowModal-dialogArguments><code>dialogArguments</code>&l=
t;/dfn> IDL
+  attribute, on getting, must check whether its browsing context's <a=
 href=3D#active-document>active document</a>'s
+  <a href=3D#effective-script-origin>effective script origin</a=
> is the <a href=3D#same-origin title=3D"same origin">=
same</a> as the <a href=3D"#dialog-arguments'-origin"&=
gt;dialog arguments'
+  origin</a>. If it is, then the browsing context's <a href=3D#=
dialog-arguments>dialog arguments</a> must be
+  returned unchanged. Otherwise, the IDL attribute must return <i>=
undefined</i>.</p>
+
+  <p>These browsing contexts also have an associated <dfn id=3D=
return-value>return value</dfn> and <dfn id=3Dreturn-value-or=
igin>return value
+  origin</dfn>. As with the previous two values, these values are =
set by the <code title=3Ddom-showModalDialog><a href=3D#dom-show=
modaldialog>showModalDialog()</a></code> method in the alg=
orithm above, when the
+  browsing context is created.</p>
+
+  <p>The <dfn id=3Ddom-windowmodal-returnvalue title=3Ddom-Wind=
owModal-returnValue><code>returnValue</code></dfn> I=
DL attribute, on
+  getting, must check whether its browsing context's <a href=3D#activ=
e-document>active document</a>'s <a href=3D#effective-script-=
origin>effective
+  script origin</a> is the <a href=3D#same-origin title=3D&quot=
;same origin">same</a> as the current <a href=3D#return-=
value-origin>return
+  value origin</a>. If it is, then the browsing context's <a hr=
ef=3D#return-value>return value</a> must be
+  returned unchanged. Otherwise, the IDL attribute must return <i>=
undefined</i>. On setting, the
+  attribute must set the <a href=3D#return-value>return value</=
a> to the given new value, and the <a href=3D#return-value-origin&g=
t;return
+  value origin</a> to the browsing context's <a href=3D#active-=
document>active document</a>'s <a href=3D#effective-script-or=
igin>effective
+  script origin</a>.</p>
+
+  </div>
+
+  <p class=3Dnote>The <code title=3Ddom-window-close><a h=
ref=3D#dom-window-close>window.close()</a></code> method c=
an be used to
+  close the browsing context.</p>
+
+
+  <h3 id=3Dsystem-state-and-capabilities><span class=3Dsecno&gt=
;7.6 </span>System state and capabilities</h3>
+
+  <h4 id=3Dthe-navigator-object><span class=3Dsecno>7.6.1 &l=
t;/span>The <code><a href=3D#navigator>Navigator</a>=
</code> object</h4>
+
+  <div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-navigator title=3Ddom-navigator><c=
ode>navigator</code></dfn> attribute of the
+  <code><a href=3D#window>Window</a></code> inte=
rface must return an instance of the <code><a href=3D#navigator&=
gt;Navigator</a></code> interface,
+  which represents the identity and state of the user agent (the client)=
, and allows Web pages to
+  register themselves as potential protocol and content handlers:</p&=
gt;
+
+  </div>
+
+  <pre class=3Didl>interface <dfn id=3Dnavigator>Navigator&l=
t;/dfn> {
+  // objects implementing this interface also implement the interfaces g=
iven below
+};
+<a href=3D#navigator>Navigator</a> implements <a href=3D#=
navigatorid>NavigatorID</a>;
+<a href=3D#navigator>Navigator</a> implements <a href=3D#=
navigatorlanguage>NavigatorLanguage</a>;
+<a href=3D#navigator>Navigator</a> implements <a href=3D#=
navigatoronline>NavigatorOnLine</a>;
+<a href=3D#navigator>Navigator</a> implements <a href=3D#=
navigatorcontentutils>NavigatorContentUtils</a>;
+<a href=3D#navigator>Navigator</a> implements <a href=3D#=
navigatorstorageutils>NavigatorStorageUtils</a>;
+<a href=3D#navigator>Navigator</a> implements <a href=3D#=
navigatorplugins>NavigatorPlugins</a>;</pre>
+
+<!-- v2:
+  geolocator mozIsLocallyAvailable preference
+-->
+
+  <div class=3Dimpl>
+
+  <p>These interfaces are defined separately so that other specifi=
cations can re-use parts of the
+  <code><a href=3D#navigator>Navigator</a></code&gt=
; interface.</p>
+
+  </div>
+
+
+  <h5 id=3Dclient-identification><span class=3Dsecno>7.6.1.1=
 </span>Client identification</h5>
+
+  <pre class=3Didl>[NoInterfaceObject]
+interface <dfn id=3Dnavigatorid>NavigatorID</dfn> {
+  readonly attribute DOMString <a href=3D#dom-navigator-appcodename t=
itle=3Ddom-navigator-appCodeName>appCodeName</a>; // constant &q=
uot;Mozilla"
+  readonly attribute DOMString <a href=3D#dom-navigator-appname title=
=3Ddom-navigator-appName>appName</a>;
+  readonly attribute DOMString <a href=3D#dom-navigator-appversion ti=
tle=3Ddom-navigator-appVersion>appVersion</a>;
+  readonly attribute DOMString <a href=3D#dom-navigator-platform titl=
e=3Ddom-navigator-platform>platform</a>;
+  readonly attribute DOMString <a href=3D#dom-navigator-product title=
=3Ddom-navigator-product>product</a>; // constant "Gecko&qu=
ot;
+  boolean <a href=3D#dom-navigator-taintenabled title=3Ddom-navigator=
-taintEnabled>taintEnabled</a>(); // constant false
+  readonly attribute DOMString <a href=3D#dom-navigator-useragent tit=
le=3Ddom-navigator-userAgent>userAgent</a>;
+};</pre>
+
+  <p>In certain cases, despite the best efforts of the entire indu=
stry, Web browsers have bugs and
+  limitations that Web authors are forced to work around.</p>
+
+  <p>This section defines a collection of attributes that can be u=
sed to determine, from script, the
+  kind of user agent in use, in order to work around these issues.</p=
>
+
+  <p>Client detection should always be limited to detecting known =
current versions; future versions
+  and unknown versions should always be assumed to be fully compliant.&l=
t;/p>
+
+  <dl class=3Ddomintro><dt><var title=3D"">w=
indow</var> . <code title=3Ddom-navigator><a href=3D#dom-n=
avigator>navigator</a></code> . <code title=3Ddom-navig=
ator-appCodeName><a href=3D#dom-navigator-appcodename>appCodeNam=
e</a></code></dt>
+   <dd>
+    <p>Returns the string "<code title=3D"">M=
ozilla</code>".</p>
+   </dd>
+
+   <dt><var title=3D"">window</var> . <co=
de title=3Ddom-navigator><a href=3D#dom-navigator>navigator</=
a></code> . <code title=3Ddom-navigator-appName><a href=
=3D#dom-navigator-appname>appName</a></code></dt>
+   <dd>
+    <p>Returns the name of the browser.</p>
+   </dd>
+
+   <dt><var title=3D"">window</var> . <co=
de title=3Ddom-navigator><a href=3D#dom-navigator>navigator</=
a></code> . <code title=3Ddom-navigator-appVersion><a h=
ref=3D#dom-navigator-appversion>appVersion</a></code></=
dt>
+   <dd>
+    <p>Returns the version of the browser.</p>
+   </dd>
+
+   <dt><var title=3D"">window</var> . <co=
de title=3Ddom-navigator><a href=3D#dom-navigator>navigator</=
a></code> . <code title=3Ddom-navigator-platform><a hre=
f=3D#dom-navigator-platform>platform</a></code></dt>
+   <dd>
+    <p>Returns the name of the platform.</p>
+   </dd>
+
+   <dt><var title=3D"">window</var> . <co=
de title=3Ddom-navigator><a href=3D#dom-navigator>navigator</=
a></code> . <code title=3Ddom-navigator-product><a href=
=3D#dom-navigator-product>product</a></code></dt>
+   <dd>
+    <p>Returns the string "<code title=3D"">G=
ecko</code>".</p>
+   </dd>
+
+   <dt><var title=3D"">window</var> . <co=
de title=3Ddom-navigator><a href=3D#dom-navigator>navigator</=
a></code> . <code title=3Ddom-navigator-taintEnabled><a=
 href=3D#dom-navigator-taintenabled>taintEnabled</a></code&gt=
;()</dt>
+   <dd>
+    <p>Returns false.</p>
+   </dd>
+
+   <dt><var title=3D"">window</var> . <co=
de title=3Ddom-navigator><a href=3D#dom-navigator>navigator</=
a></code> . <code title=3Ddom-navigator-userAgent><a hr=
ef=3D#dom-navigator-useragent>userAgent</a></code></dt&=
gt;
+   <dd>
+    <p>Returns the complete User-Agent header.</p>
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <dl><dt><dfn id=3Ddom-navigator-appcodename title=3Ddom=
-navigator-appCodeName><code>appCodeName</code></dfn&gt=
;</dt>
+   <dd><p>Must return the string "<code title=3D&quo=
t;">Mozilla</code>".</dd>
+
+   <!-- appMinorVersion: IE only. In IE8b1, returns " Beta"=
 (with the space) -->
+
+   <dt><dfn id=3Ddom-navigator-appname title=3Ddom-navigator-ap=
pName><code>appName</code></dfn></dt>
+   <dd><p>Must return either the string "<code title=
=3D"">Netscape</code>" or the full name of the
+   browser, e.g. "<code title=3D"">Mellblom Browser=
nator</code>".</dd>
+
+   <dt><dfn id=3Ddom-navigator-appversion title=3Ddom-navigator=
-appVersion><code>appVersion</code></dfn></dt>
+   <dd><p>Must return either the string "<code title=
=3D"">4.0</code>" or a string representing the
+   version of the browser in detail, e.g. "<code title=3D"&=
quot;>1.0 (VMS; en-US)
+   Mellblomenator/9000</code>".</dd>
+
+   <!-- buildID: Mozilla only -->
+
+   <!-- oscpu: Mozilla only -->
+
+   <dt><dfn id=3Ddom-navigator-platform title=3Ddom-navigator-p=
latform><code>platform</code></dfn></dt>
+   <dd><p>Must return either the empty string or a string re=
presenting the platform on which the
+   browser is executing, e.g. "<code title=3D"">Mac=
Intel</code>", "<code title=3D"">Win32&lt=
;/code>",
+   "<code title=3D"">FreeBSD i386</code>&quot=
;, "<code title=3D"">WebTV OS</code>".&lt=
;/dd>
+
+   <dt><dfn id=3Ddom-navigator-product title=3Ddom-navigator-pr=
oduct><code>product</code></dfn></dt>
+   <dd><p>Must return the string "<code title=3D&quo=
t;">Gecko</code>".</dd>
+
+   <!-- productSub: Mozilla and Safari only; returns same as buildID =
in Mozilla, and returns the fixed string "20030107" in Safari -=
->
+
+   <!-- securityPolicy: Mozilla only; always returns "" --&=
gt;
+
+   <dt><dfn id=3Ddom-navigator-taintenabled title=3Ddom-navigat=
or-taintEnabled><code>taintEnabled()</code></dfn>&lt=
;/dt>
+   <dd><p>Must return false.</dd>
+
+   <dt><dfn id=3Ddom-navigator-useragent title=3Ddom-navigator-=
userAgent><code>userAgent</code></dfn></dt>
+   <dd><p>Must return the string used for the value of the &=
quot;<code title=3D"">User-Agent</code>" heade=
r
+   in HTTP requests, or the empty string if no such header is ever sent.=
</dd>
+
+   <!-- vendor: Mozilla and Safari only; always returns "" =
in Mozilla, and returns the fixed string "Apple Computer, Inc."=
 in Safari -->
+
+   <!-- vendorSub: Mozilla and Safari only; always returns "&quo=
t; -->
+
+  </dl><!-- similar paragraph in next section --><p class=
=3Dwarning>Any information in this API that varies from user to user c=
an be used to
+  profile the user. In fact, if enough such information is available, a =
user can actually be
+  uniquely identified. For this reason, user agent implementors are stro=
ngly urged to include as
+  little information in this API as possible.
+  <a href=3D#fingerprinting-vector class=3Dfingerprint title=3D"=
fingerprinting vector"><img src=3Dhttp://images.whatwg.org/fin=
gerprint.png width=3D46 alt=3D"(This is a fingerprinting vector.)&qu=
ot; height=3D64></a>
+  </p>
+
+  </div>
+
+  <!-- next section refers to previous section as "previous sect=
ion" -->
+
+  <h5 id=3Dlanguage-preferences><span class=3Dsecno>7.6.1.2 =
</span>Language preferences</h5>
+
+  <pre class=3Didl>[NoInterfaceObject]
+interface <dfn id=3Dnavigatorlanguage>NavigatorLanguage</dfn&gt=
; {
+  readonly attribute DOMString? <a href=3D#dom-navigator-language tit=
le=3Ddom-navigator-language>language</a>;
+};</pre>
+
+  <dl class=3Ddomintro><dt><var title=3D"">w=
indow</var> . <code title=3Ddom-navigator><a href=3D#dom-n=
avigator>navigator</a></code> . <code title=3Ddom-navig=
ator-language><a href=3D#dom-navigator-language>language</a&g=
t;</code></dt>
+   <dd>
+    <p>Returns a language tag representing the user's preferred la=
nguage.</p>
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <dl><!--
+   <dt><dfn title=3D"dom-navigator-browserLanguage"&g=
t;<code>browserLanguage</code></dfn></dt> <!- =
- Opera and IE only - ->
+   <dd><p>Must return a language tag representing either &lt=
;span>a plausible language</span> or the
+   language the browser uses in its interface.</p></dd>
+
+
+   <dt><dfn title=3D"dom-navigator-userLanguage">&=
lt;code>userLanguage</code></dfn></dt> <!- - Oper=
a and IE only - ->
+   --><!-- at time of testing, this was supported by Opera, Safari=
, and Mozilla only --><dt><dfn id=3Ddom-navigator-language ti=
tle=3Ddom-navigator-language><code>language</code></dfn=
></dt>
+   <dd><p>Must return a valid BCP 47 language tag representi=
ng either <a href=3D#a-plausible-language>a plausible
+   language</a> or the user's preferred language. <a href=3D#re=
fsBCP47>[BCP47]</a></dd>
+
+  </dl><p>To determine <dfn id=3Da-plausible-language>=
a plausible language</dfn>, the user agent should bear in mind the =
following:</p>
+
+  <ul><li>Any information in this API that varies from user =
to user can be used to profile or identify
+   the user.
+   <a href=3D#fingerprinting-vector class=3Dfingerprint title=3D&quot=
;fingerprinting vector"><img src=3Dhttp://images.whatwg.org/fi=
ngerprint.png width=3D46 alt=3D"(This is a fingerprinting vector.)&q=
uot; height=3D64></a>
+   </li>
+
+   <li>If the user is not using a service that obfuscates the user=
's point of origin (e.g. the Tor
+   anonymity network), then the value that is least likely to distinguis=
h the user from other users
+   with similar origins (e.g. from the same IP address block) is the lan=
guage used by the majority
+   of such users. <a href=3D#refsTOR>[TOR]</a></li>
+
+   <li>If the user is using an anonymizing service, then the value=
 "<code title=3D"">en-US</code>" is
+   suggested; if all users of the service use that same value, that redu=
ces the possibility of
+   distinguishing the users from each other.</li>
+
+  </ul></div>
+
+
+
+  <h5 id=3Dcustom-handlers><span class=3Dsecno>7.6.1.3 </=
span>Custom scheme and content handlers</h5>
+
+  <pre class=3Didl>[NoInterfaceObject]
+interface <dfn id=3Dnavigatorcontentutils>NavigatorContentUtils&lt=
;/dfn> {
+  // content handler registration
+  void <a href=3D#dom-navigator-registerprotocolhandler title=3Ddom-n=
avigator-registerProtocolHandler>registerProtocolHandler</a>(DOM=
String scheme, DOMString url, DOMString title);
+  void <a href=3D#dom-navigator-registercontenthandler title=3Ddom-na=
vigator-registerContentHandler>registerContentHandler</a>(DOMStr=
ing mimeType, DOMString url, DOMString title);
+  DOMString <a href=3D#dom-navigator-isprotocolhandlerregistered titl=
e=3Ddom-navigator-isProtocolHandlerRegistered>isProtocolHandlerRegiste=
red</a>(DOMString scheme, DOMString url);
+  DOMString <a href=3D#dom-navigator-iscontenthandlerregistered title=
=3Ddom-navigator-isContentHandlerRegistered>isContentHandlerRegistered=
</a>(DOMString mimeType, DOMString url);
+  void <a href=3D#dom-navigator-unregisterprotocolhandler title=3Ddom=
-navigator-unregisterProtocolHandler>unregisterProtocolHandler</a&g=
t;(DOMString scheme, DOMString url);
+  void <a href=3D#dom-navigator-unregistercontenthandler title=3Ddom-=
navigator-unregisterContentHandler>unregisterContentHandler</a>(=
DOMString mimeType, DOMString url);
+};</pre>
+
+  <p>The <dfn id=3Ddom-navigator-registerprotocolhandler title=3D=
dom-navigator-registerProtocolHandler><code>registerProtocolHand=
ler()</code></dfn> method
+  allows Web sites to register themselves as possible handlers for parti=
cular schemes. For example,
+  an online telephone messaging service could register itself as a handl=
er of the <code>sms:</code>
+  scheme, so that if the user clicks on such a link, he is given the opp=
ortunity to use that Web
+  site. Analogously, the <dfn id=3Ddom-navigator-registercontenthandl=
er title=3Ddom-navigator-registerContentHandler><code>registerCo=
ntentHandler()</code></dfn> method
+  allows Web sites to register themselves as possible handlers for conte=
nt in a particular
+  <a href=3D#mime-type>MIME type</a>. For example, the same =
online telephone messaging service could register
+  itself as a handler for <code>text/vcard</code> files, so =
that if the user has no native
+  application capable of handling vCards, his Web browser can instead su=
ggest he use that site to
+  view contact information stored on vCards that he opens. <a href=3D=
#refsRFC5724>[RFC5724]</a> <a href=3D#refsRFC6350>[RFC6350=
]</a></p>
+
+  <dl class=3Ddomintro><dt><var title=3D"">w=
indow</var> . <code title=3Ddom-navigator><a href=3D#dom-n=
avigator>navigator</a></code> . <code title=3Ddom-navig=
ator-registerProtocolHandler><a href=3D#dom-navigator-registerproto=
colhandler>registerProtocolHandler</a></code>(<var titl=
e=3D"">scheme</var>, <var title=3D"">u=
rl</var>, <var title=3D"">title</var>)</dt=
>
+   <dt><var title=3D"">window</var> . <co=
de title=3Ddom-navigator><a href=3D#dom-navigator>navigator</=
a></code> . <code title=3Ddom-navigator-registerContentHandle=
r><a href=3D#dom-navigator-registercontenthandler>registerConten=
tHandler</a></code>(<var title=3D"">mimeType&=
lt;/var>, <var title=3D"">url</var>, <var tit=
le=3D"">title</var>)</dt>
+
+   <dd>
+
+    <p>Registers a handler for the given scheme or content type, a=
t the given URL, with the given
+    title.</p>
+
+    <p>The string "<code title=3D"">%s</co=
de>" in the URL is used as a placeholder for where to put
+    the URL of the content to be handled.</p>
+
+    <p>Throws a <code><a href=3D#securityerror>Securit=
yError</a></code> exception if the user agent blocks the regi=
stration (this
+    might happen if trying to register as a handler for "http"=
, for instance).</p>
+
+    <p>Throws a <code><a href=3D#syntaxerror>SyntaxErr=
or</a></code> exception if the "<code title=3D"&=
quot;>%s</code>" string is
+    missing in the URL.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>User agents may, within the constraints described in this sec=
tion, do whatever they like when
+  the methods are called. A UA could, for instance, prompt the user and =
offer the user the
+  opportunity to add the site to a shortlist of handlers, or make the ha=
ndlers his default, or
+  cancel the request. UAs could provide such a UI through modal UI or th=
rough a non-modal transient
+  notification interface. UAs could also simply silently collect the inf=
ormation, providing it only
+  when relevant to the user.</p>
+
+  <p>User agents should keep track of which sites have registered =
handlers (even if the user has
+  declined such registrations) so that the user is not repeatedly prompt=
ed with the same
+  request.</p>
+
+  <p>The arguments to the methods have the following meanings and =
corresponding implementation
+  requirements. The requirements that involve throwing exceptions must b=
e processed in the order
+  given below, stopping at the first exception thrown. (So the exception=
s for the first argument
+  take precedence over the exceptions for the second argument.)</p&gt=
;
+
+  <dl><dt><var title=3D"">scheme</var>=
 (<code title=3Ddom-navigator-registerProtocolHandler><a href=3D=
#dom-navigator-registerprotocolhandler>registerProtocolHandler()</a=
></code> only)</dt>
+
+   <dd>
+
+    <p>A scheme, such as <code>mailto</code> or <co=
de>web+auth</code>. The scheme must be compared
+    in an <a href=3D#ascii-case-insensitive>ASCII case-insensitive=
</a> manner by user agents for the purposes of comparing
+    with the scheme part of URLs that they consider against the list of =
registered handlers.</p>
+
+    <p>The <var title=3D"">scheme</var> valu=
e, if it contains a colon (as in "<code>mailto:</code>&q=
uot;),
+    will never match anything, since schemes don't contain colons.</p=
>
+
+    <p>If the <code title=3Ddom-navigator-registerProtocolHandl=
er><a href=3D#dom-navigator-registerprotocolhandler>registerProt=
ocolHandler()</a></code>
+    method is invoked with a scheme that is neither a <a href=3D#whit=
elisted-scheme>whitelisted scheme</a> nor a scheme
+    whose value starts with the substring "<code title=3D"&=
quot;>web+</code>" and otherwise contains only
+    <a href=3D#lowercase-ascii-letters>lowercase ASCII letters<=
/a>, and whose length is at least five characters (including
+    the "<code title=3D"">web+</code>" p=
refix), the user agent must throw a <code><a href=3D#securityerr=
or>SecurityError</a></code>
+    exception.</p>
+
+    <p>The following schemes are the <dfn id=3Dwhitelisted-sche=
me title=3D"whitelisted scheme">whitelisted schemes</dfn&=
gt;:</p>
+
+    <ul class=3Dbrief><li><code title=3D"">b=
itcoin</code></li> <!-- https://en.bitcoin.it/wiki/BIP_002=
1 -->
+     <li><code title=3D"">geo</code></li&=
gt;
+     <li><code title=3D"">im</code></li&g=
t;
+     <li><code title=3D"">irc</code></li&=
gt;
+     <li><code title=3D"">ircs</code></li=
>
+     <li><code title=3D"">magnet</code></=
li>
+     <li><code title=3D"">mailto</code></=
li>
+     <li><code title=3D"">mms</code></li&=
gt;
+     <li><code title=3D"">news</code></li=
>
+     <li><code title=3D"">nntp</code></li=
>
+     <li><code title=3D"">sip</code></li&=
gt;
+     <li><code title=3D"">sms</code></li&=
gt;
+     <li><code title=3D"">smsto</code></l=
i>
+     <li><code title=3D"">ssh</code></li&=
gt;
+     <li><code title=3D"">tel</code></li&=
gt;
+     <li><code title=3D"">urn</code></li&=
gt;
+     <li><code title=3D"">webcal</code></=
li>
+     <li><code title=3D"">wtai</code></li=
>
+     <li><code title=3D"">xmpp</code></li=
>
+    </ul><p class=3Dnote>This list can be changed. If there =
are schemes that should be added, please send
+    feedback.</p>
+
+    <p class=3Dnote>This list excludes any schemes that could reas=
onably be expected to be supported
+    inline, e.g. in an <code><a href=3D#the-iframe-element>i=
frame</a></code>, such as <code title=3D"">ht=
tp</code> or (more
+    theoretically) <code title=3D"">gopher</code>.=
 If those were supported, they could potentially be
+    used in man-in-the-middle attacks, by replacing pages that have fram=
es with such content with
+    content under the control of the protocol handler. If the user agent=
 has native support for the
+    schemes, this could further be used for cookie-theft attacks.</p&=
gt;
+
+   </dd>
+
+   <dt><var title=3D"">mimeType</var> (<c=
ode title=3Ddom-navigator-registerContentHandler><a href=3D#dom-nav=
igator-registercontenthandler>registerContentHandler()</a></c=
ode> only)</dt>
+
+   <dd>
+
+    <p>A <a href=3D#mime-type>MIME type</a>, such as &=
lt;code>model/vnd.flatland.3dml</code> or
+    <code>application/vnd.google-earth.kml+xml</code>. The &=
lt;a href=3D#mime-type>MIME type</a> must be compared
+    in an <a href=3D#ascii-case-insensitive>ASCII case-insensitive=
</a> manner by user agents for the purposes of comparing
+    with MIME types of documents that they consider against the list of =
registered handlers.</p>
+
+    <p>User agents must compare the given values only to the MIME =
type/subtype parts of content
+    types, not to the complete type including parameters. Thus, if <v=
ar title=3D"">mimeType</var>
+    values passed to this method include characters such as commas or wh=
itespace, or include MIME
+    parameters, then the handler being registered will never be used.&lt=
;/p>
+
+    <p class=3Dnote>The type is compared to the <a href=3D#mime=
-type>MIME type</a> used by the user agent
+    <em>after</em> the sniffing algorithms have been applied=
.</p>
+
+    <p>If the <code title=3Ddom-navigator-registerContentHandle=
r><a href=3D#dom-navigator-registercontenthandler>registerConten=
tHandler()</a></code>
+    method is invoked with a <a href=3D#mime-type>MIME type</a&=
gt; that is in the <a href=3D#type-blacklist>type blacklist</a&g=
t; or
+    that the user agent has deemed a privileged type, the user agent mus=
t throw a
+    <code><a href=3D#securityerror>SecurityError</a>&l=
t;/code> exception.</p>
+
+    <p>The following <a href=3D#mime-type title=3D"MIME ty=
pe">MIME types</a> are in the <dfn id=3Dtype-blacklist&g=
t;type
+    blacklist</dfn>:</p>
+
+    <ul class=3Dbrief><li><code><a href=3D#applicat=
ion/x-www-form-urlencoded>application/x-www-form-urlencoded</a>&=
lt;/code></li>
+     <li><code><a href=3D#application/xhtml+xml>applic=
ation/xhtml+xml</a></code></li>
+     <li><code>application/xml</code></li>
+     <li><code>image/gif</code></li>
+     <li><code>image/jpeg</code></li>
+     <li><code>image/png</code></li>
+     <li><code>image/svg+xml</code></li>
+     <li><code><a href=3D#multipart/x-mixed-replace>mu=
ltipart/x-mixed-replace</a></code></li>
+     <li><code><a href=3D#text/cache-manifest>text/cac=
he-manifest</a></code></li>
+     <li><code>text/css</code></li>
+     <li><code><a href=3D#text/html>text/html</a&gt=
;</code></li>
+     <li><code><a href=3D#text/ping>text/ping</a&gt=
;</code></li>
+     <li><code>text/plain</code></li>
+     <li><code>text/xml</code></li>
+     <li>All types that the user agent supports displaying nativel=
y in a <a href=3D#browsing-context>browsing context</a> durin=
g <a href=3D#navigate title=3Dnavigate>navigation</a>, except=
 for <code>application/rss+xml</code> and <code>applica=
tion/atom+xml</code></li>
+
+    </ul><p class=3Dnote>This list can be changed. If there =
are MIME types that should be added, please
+    send feedback.</p>
+
+   </dd>
+
+
+   <dt><var title=3D"">url</var></dt>
+
+   <dd>
+
+    <p>A string used to build the <a href=3D#url>URL</a&g=
t; of the page that will handle the requests.</p>
+
+    <p>User agents must throw a <code><a href=3D#syntaxer=
ror>SyntaxError</a></code> exception if the <var title=3D=
"">url</var>
+    argument passed to one of these methods does not contain the exact l=
iteral string
+    "<code>%s</code>".</p>
+
+<!--CLEANUP-->
+    <p>User agents must throw a <code><a href=3D#syntaxer=
ror>SyntaxError</a></code> exception if <a href=3D#reso=
lve-a-url title=3D"resolve a
+    url">resolving</a> the <var title=3D""&gt=
;url</var> argument relative to the
+    <a href=3D#api-base-url>API base URL</a> specified by th=
e <a href=3D#entry-settings-object>entry settings object</a> =
is not successful.</p>
+
+    <p class=3Dnote>The resulting <a href=3D#absolute-url>ab=
solute URL</a> would by definition not be a <a href=3D#valid-url=
>valid
+    URL</a> as it would include the string "<code title=3D=
"">%s</code>" which is not a valid
+    component in a URL.</p>
+
+<!--CLEANUP-->
+    <p>User agents must throw a <code><a href=3D#security=
error>SecurityError</a></code> exception if the resulting =
<a href=3D#absolute-url>absolute
+    URL</a> has an <a href=3D#origin>origin</a> that d=
iffers from the <a href=3D#origin>origin</a> specified by the
+    <a href=3D#entry-settings-object>entry settings object</a&g=
t;.</p>
+
+    <p class=3Dnote>This is forcibly the case if the <code titl=
e=3D"">%s</code> placeholder is in the
+    scheme, host, or port parts of the URL.</p>
+
+    <p>The resulting <a href=3D#absolute-url>absolute URL&lt=
;/a> is the <dfn id=3Dproto-url>proto-URL</dfn>. It identi=
fies the
+    handler for the purposes of the methods described below.</p>
+
+<!--CLEANUP-->
+    <p>When the user agent uses this handler, it must replace the =
first occurrence of the exact
+    literal string "<code title=3D"">%s</code&gt=
;" in the <var title=3D"">url</var> argument w=
ith an
+    escaped version of the <a href=3D#absolute-url>absolute URL&lt=
;/a> of the content in question (as defined below),
+    then <a href=3D#resolve-a-url title=3D"resolve a url"&g=
t;resolve</a> the resulting URL, relative to the <a href=3D#api-=
base-url>API
+    base URL</a> specified by the <a href=3D#entry-settings-obj=
ect>entry settings object</a> at the time the <code title=3Dd=
om-navigator-registerContentHandler><a href=3D#dom-navigator-regist=
ercontenthandler>registerContentHandler()</a></code> or &l=
t;code title=3Ddom-navigator-registerProtocolHandler><a href=3D#dom=
-navigator-registerprotocolhandler>registerProtocolHandler()</a>=
</code> methods were
+    invoked, and then <a href=3D#navigate>navigate</a><!-=
-DONAV user--> an appropriate <a href=3D#browsing-context>browsi=
ng
+    context</a> to the resulting URL using the GET method (<a h=
ref=3D#concept-http-equivalent-get title=3Dconcept-http-equivalent-get&gt=
;or equivalent</a> for non-HTTP URLs).</p>
+
+    <p>To get the escaped version of the <a href=3D#absolute-ur=
l>absolute URL</a> of the content in question, the
+    user agent must replace every character in that <a href=3D#absolu=
te-url>absolute URL</a> that is not a
+    character in the URL <a href=3D#default-encode-set>default enc=
ode set</a> with the result of <a href=3D#utf-8-percent-encode t=
itle=3D"UTF-8
+    percent encode">UTF-8 percent encoding</a> that charac=
ter.</p>
+
+    <div class=3Dexample>
+
+     <p>If the user had visited a site at <code title=3D"&=
quot;>http://example.com/</code> that made the
+     following call:</p>
+
+     <pre>navigator.registerContentHandler('application/x-soup', '=
soup?url=3D%s', 'SoupWeb™')</pre>
+
+     <p>...and then, much later, while visiting <code title=3D&=
quot;">http://www.example.net/</code>,
+     clicked on a link such as:</p>
+
+     <pre><a href=3D"chickenkïwi.soup"&a=
mp;gt;Download our Chicken Kïwi soup!</a></pre&=
gt;
+
+     <p>...then, assuming this <code>chickenkïwi.so=
up</code> file was served with the
+     <a href=3D#mime-type>MIME type</a> <code>applicat=
ion/x-soup</code>, the UA might navigate to the following
+     URL:</p>
+
+     <pre>http://example.com/soup?url=3Dhttp://www.example.net/chi=
ckenk%C3%AFwi.soup</pre>
+
+     <p>This site could then fetch the <code>chickenk&iu=
ml;wi.soup</code> file and do whatever it is
+     that it does with soup (synthesize it and ship it to the user, or w=
hatever).</p>
+
+    </div>
+
+   </dd>
+
+   <dt><var title=3D"">title</var></dt&gt=
;
+
+   <dd>
+
+    <p>A descriptive title of the handler, which the UA might use =
to remind the user what the site
+    in question is.</p>
+
+   </dd>
+
+  </dl><p>This section does not define how the pages registe=
red by these methods are used, beyond the
+  requirements on how to process the <var title=3D"">url=
</var> value (see above). To some extent, the
+  <a href=3D#navigate title=3Dnavigate>processing model for naviga=
ting across documents</a> defines some cases
+  where these methods are relevant, but in general UAs may use this info=
rmation wherever they would
+  otherwise consider handing content to native plugins or helper applica=
tions.</p>
+
+  <p>UAs must not use registered content handlers to handle conten=
t that was returned as part of a
+  non-GET transaction (or rather, as part of any non-idempotent transact=
ion), as the remote site
+  would not be able to fetch the same data.</p>
+
+  <hr></div>
+
+  <p>In addition to the registration methods, there are also metho=
ds for determining if particular
+  handlers have been registered, and for unregistering handlers.</p&g=
t;
+
+  <dl class=3Ddomintro><dt><var title=3D"">s=
tate</var> =3D <var title=3D"">window</var> .=
 <code title=3Ddom-navigator><a href=3D#dom-navigator>navigat=
or</a></code> . <code title=3Ddom-navigator-isProtocolHand=
lerRegistered><a href=3D#dom-navigator-isprotocolhandlerregistered&=
gt;isProtocolHandlerRegistered</a></code>(<var title=3D&qu=
ot;">scheme</var>, <var title=3D"">url</=
var>)</dt>
+   <dt><var title=3D"">state</var> =3D <v=
ar title=3D"">window</var> . <code title=3Ddom-navi=
gator><a href=3D#dom-navigator>navigator</a></code> =
. <code title=3Ddom-navigator-isContentHandlerRegistered><a href=
=3D#dom-navigator-iscontenthandlerregistered>isContentHandlerRegistere=
d</a></code>(<var title=3D"">mimeType</var=
>, <var title=3D"">url</var>)</dt>
+
+   <dd>
+
+    <p>Returns one of the following strings describing the state o=
f the handler given by the
+    arguments:</p>
+
+    <dl><dt><code title=3D"">new</code&gt=
;
+
+     <dd>Indicates that no attempt has been made to register the g=
iven handler (or that the handler
+     has been unregistered). It would be appropriate to promote the avai=
lability of the handler or
+     to just automatically register the handler.
+
+     <dt><code title=3D"">registered</code>
+
+     <dd>Indicates that the given handler has been registered or t=
hat the site is blocked from
+     registering the handler. Trying to register the handler again would=
 have no effect.
+
+     <dt><code title=3D"">declined</code>
+
+     <dd>Indicates that the given handler has been offered but was=
 rejected. Trying to register the
+     handler again may prompt the user again.
+
+    </dl></dd>
+
+   <dt><var title=3D"">state</var> =3D <v=
ar title=3D"">window</var> . <code title=3Ddom-navi=
gator><a href=3D#dom-navigator>navigator</a></code> =
. <code title=3Ddom-navigator-unregisterProtocolHandler><a href=3D=
#dom-navigator-unregisterprotocolhandler>unregisterProtocolHandler<=
/a></code>(<var title=3D"">scheme</var>, &=
lt;var title=3D"">url</var>)</dt>
+   <dt><var title=3D"">state</var> =3D <v=
ar title=3D"">window</var> . <code title=3Ddom-navi=
gator><a href=3D#dom-navigator>navigator</a></code> =
. <code title=3Ddom-navigator-unregisterContentHandler><a href=3D=
#dom-navigator-unregistercontenthandler>unregisterContentHandler</a=
></code>(<var title=3D"">mimeType</var>, &=
lt;var title=3D"">url</var>)</dt>
+
+   <dd>
+
+    <p>Unregisters the handler given by the arguments.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-navigator-isprotocolhandlerregistered ti=
tle=3Ddom-navigator-isProtocolHandlerRegistered><code>isProtocol=
HandlerRegistered()</code></dfn>
+  method must return the <a href=3D#handler-state-string>handler s=
tate string</a> that most closely describes the current
+  state of the handler described by the two arguments to the method, whe=
re the first argument gives
+  the scheme and the second gives the string used to build the <a hre=
f=3D#url>URL</a> of the page that
+  will handle the requests.
+  <a href=3D#fingerprinting-vector class=3Dfingerprint title=3D"=
fingerprinting vector"><img src=3Dhttp://images.whatwg.org/fin=
gerprint.png width=3D46 alt=3D"(This is a fingerprinting vector.)&qu=
ot; height=3D64></a>
+  </p>
+
+  <p>The first argument must be compared to the schemes for which =
custom protocol handlers are
+  registered in an <a href=3D#ascii-case-insensitive>ASCII case-in=
sensitive</a> manner to find the relevant handlers.</p>
+
+  <p>The second argument must be preprocessed as described below, =
and if that is successful, must
+  then be matched against the <a href=3D#proto-url title=3Dproto-URL&=
gt;proto-URLs</a> of the relevant handlers to
+  find the described handler.</p>
+
+  <hr><p>The <dfn id=3Ddom-navigator-iscontenthandlerregi=
stered title=3Ddom-navigator-isContentHandlerRegistered><code>is=
ContentHandlerRegistered()</code></dfn>
+  method must return the <a href=3D#handler-state-string>handler s=
tate string</a> that most closely describes the current
+  state of the handler described by the two arguments to the method, whe=
re the first argument gives
+  the <a href=3D#mime-type>MIME type</a> and the second give=
s the string used to build the <a href=3D#url>URL</a> of
+  the page that will handle the requests.
+  <a href=3D#fingerprinting-vector class=3Dfingerprint title=3D"=
fingerprinting vector"><img src=3Dhttp://images.whatwg.org/fin=
gerprint.png width=3D46 alt=3D"(This is a fingerprinting vector.)&qu=
ot; height=3D64></a>
+  </p>
+
+  <p>The first argument must be compared to the <a href=3D#mime=
-type title=3D"MIME type">MIME types</a> for which
+  custom content handlers are registered in an <a href=3D#ascii-case-=
insensitive>ASCII case-insensitive</a> manner to find
+  the relevant handlers.</p>
+
+  <p>The second argument must be preprocessed as described below, =
and if that is successful, must
+  then be matched against the <a href=3D#proto-url title=3Dproto-URL&=
gt;proto-URLs</a> of the relevant handlers to
+  find the described handler.</p>
+
+  <hr><p>The <dfn id=3Dhandler-state-string title=3D&quot=
;handler state string">handler state strings</dfn> are the =
following strings.
+  Each string describes several situations, as given by the following li=
st.</p>
+
+  <dl><dt><code title=3D"">new</code>
+
+   <dd>The described handler has never been registered for the giv=
en scheme or type.
+
+   <dd>The described handler was once registered for the given sch=
eme or type, but the site has
+   since unregistered it. If the handler were to be reregistered, the us=
er would be notified
+   accordingly.
+
+   <dd>The described handler was once registered for the given sch=
eme or type, but the site has
+   since unregistered it, but the user has indicated that the site is to=
 be blocked from registering
+   the type again, so the user agent would ignore further registration a=
ttempts.
+
+
+   <dt><code title=3D"">registered</code>
+
+   <dd>An attempt was made to register the described handler for t=
he given scheme or type, but the
+   user has not yet been notified, and the user agent would ignore furth=
er registration attempts.
+   (Maybe the user agent batches registration requests to display them w=
hen the user requests to be
+   notified about them, and the user has not yet requested that the user=
 agent notify it of the
+   previous registration attempt.)
+
+   <dd>The described handler is registered for the given scheme or=
 type (maybe, or maybe not, as the
+   default handler).
+
+   <dd>The described handler is permanently blocked from being (re=
)registered. (Maybe the user
+   marked the registration attempt as spam, or blocked the site for othe=
r reasons.)
+
+
+   <dt><code title=3D"">declined</code>
+
+   <dd>An attempt was made to register the described handler for t=
he given scheme or type, but the
+   user has not yet been notified; however, the user might be notified i=
f another registration
+   attempt were to be made. (Maybe the last registration attempt was mad=
e while the page was in the
+   background and the user closed the page without looking at it, and th=
e user agent requires
+   confirmation for this registration attempt.)
+
+   <dd>An attempt was made to register the described handler for t=
he given scheme or type, but the
+   user has not yet responded.
+
+   <dd>An attempt was made to register the described handler for t=
he given scheme or type, but the
+   user declined the offer. The user has not indicated that the handler =
is to be permanently
+   blocked, however, so another attempt to register the described handle=
r might result in the user
+   being prompted again.
+
+   <dd>The described handler was once registered for the given sch=
eme or type, but the user has
+   since removed it. The user has not indicated that the handler is to b=
e permanently blocked,
+   however, so another attempt to register the described handler might r=
esult in the user being
+   prompted again.
+
+  </dl><hr><p>The <dfn id=3Ddom-navigator-unregiste=
rprotocolhandler title=3Ddom-navigator-unregisterProtocolHandler><c=
ode>unregisterProtocolHandler()</code></dfn>
+  method must unregister the handler described by the two arguments to t=
he method, where the first
+  argument gives the scheme and the second gives the string used to buil=
d the <a href=3D#url>URL</a> of
+  the page that will handle the requests.</p>
+
+  <p>The first argument must be compared to the schemes for which =
custom protocol handlers are
+  registered in an <a href=3D#ascii-case-insensitive>ASCII case-in=
sensitive</a> manner to find the relevant handlers.</p>
+
+  <p>The second argument must be preprocessed as described below, =
and if that is successful, must
+  then be matched against the <a href=3D#proto-url title=3Dproto-URL&=
gt;proto-URLs</a> of the relevant handlers to
+  find the described handler.</p>
+
+  <hr><p>The <dfn id=3Ddom-navigator-unregistercontenthan=
dler title=3Ddom-navigator-unregisterContentHandler><code>unregi=
sterContentHandler()</code></dfn>
+  method must unregister the handler described by the two arguments to t=
he method, where the first
+  argument gives the <a href=3D#mime-type>MIME type</a> and =
the second gives the string used to build the
+  <a href=3D#url>URL</a> of the page that will handle the re=
quests.</p>
+
+  <p>The first argument must be compared to the <a href=3D#mime=
-type title=3D"MIME type">MIME types</a> for which
+  custom content handlers are registered in an <a href=3D#ascii-case-=
insensitive>ASCII case-insensitive</a> manner to find
+  the relevant handlers.</p>
+
+  <p>The second argument must be preprocessed as described below, =
and if that is successful, must
+  then be matched against the <a href=3D#proto-url title=3Dproto-URL&=
gt;proto-URLs</a> of the relevant handlers to
+  find the described handler.</p>
+
+  <hr><p>The second argument of the four methods described a=
bove must be preprocessed as follows:</p>
+
+  <ol><li><p>If the string does not contain the substr=
ing "<code title=3D"">%s</code>", abort t=
hese
+   steps. There's no matching handler.</li>
+
+<!--CLEANUP-->
+   <li><p><a href=3D#resolve-a-url title=3D"resolve =
a URL">Resolve</a> the string relative to the <a href=3D=
#api-base-url>API base URL</a>
+   specified by the <a href=3D#entry-settings-object>entry setting=
s object</a>.</li>
+
+   <li><p>If this fails, then throw a <code><a href=
=3D#syntaxerror>SyntaxError</a></code> exception, aborting=
 the
+   method.</li>
+
+<!--CLEANUP-->
+   <li><p>If the resulting <a href=3D#absolute-url>abs=
olute URL</a>'s <a href=3D#origin>origin</a> is not the=
 <a href=3D#same-origin>same
+   origin</a> as the <a href=3D#origin>origin</a> spec=
ified by the <a href=3D#entry-settings-object>entry settings object=
</a>, throw a <code><a href=3D#securityerror>SecurityEr=
ror</a></code>
+   exception, aborting the method.</li>
+
+   <li><p>Return the resulting <a href=3D#absolute-url&gt=
;absolute URL</a> as the result of preprocessing the
+   argument.</li>
+
+  </ol></div>
+
+
+
+<!--ADD-TOPIC:Security-->
+  <div class=3Dimpl>
+
+  <h6 id=3Dsecurity-and-privacy><span class=3Dsecno>7.6.1.3.=
1 </span>Security and privacy</h6>
+
+  <p>These mechanisms can introduce a number of concerns, in parti=
cular privacy concerns.</p>
+
+  <p><strong>Hijacking all Web usage.</strong> User ag=
ents should not allow schemes that are key to
+  its normal operation, such as <code>http</code> or <cod=
e>https</code>, to be rerouted through
+  third-party sites. This would allow a user's activities to be triviall=
y tracked, and would allow
+  user information, even in secure connections, to be collected.</p&g=
t;
+
+  <p><strong>Hijacking defaults.</strong> User agents =
are strongly urged to not automatically change
+  any defaults, as this could lead the user to send data to remote hosts=
 that the user is not
+  expecting. New handlers registering themselves should never automatica=
lly cause those sites to be
+  used.</p>
+
+  <p><strong>Registration spamming.</strong> User agen=
ts should consider the possibility that a site
+  will attempt to register a large number of handlers, possibly from mul=
tiple domains (e.g. by
+  redirecting through a series of pages each on a different domain, and =
each registering a handler
+  for <code>video/mpeg</code> — analogous practice=
s abusing other Web browser features have
+  been used by pornography Web sites for many years). User agents should=
 gracefully handle such
+  hostile attempts, protecting the user.</p>
+
+  <p><strong>Misleading titles.</strong> User agents s=
hould not rely wholly on the <var title=3D"">title</va=
r> argument to the methods when presenting the registered handlers to =
the user,
+  since sites could easily lie. For example, a site <code>hostile.=
example.net</code> could claim
+  that it was registering the "Cuddly Bear Happy Content Handler&qu=
ot;. User agents should therefore use
+  the handler's domain in any UI along with any title.</p>
+
+  <p><strong>Hostile handler metadata.</strong> User a=
gents should protect against typical attacks
+  against strings embedded in their interface, for example ensuring that=
 markup or escape characters
+  in such strings are not executed, that null bytes are properly handled=
, that over-long strings do
+  not cause crashes or buffer overruns, and so forth.</p>
+
+  <p><strong>Leaking Intranet URLs.</strong> The mecha=
nism described in this section can result in
+  secret Intranet URLs being leaked, in the following manner:</p>
+
+  <ol><li>The user registers a third-party content handler a=
s the default handler for a content
+   type.</li>
+
+   <li>The user then browses his corporate Intranet site and acces=
ses a document that uses that
+   content type.</li>
+
+   <li>The user agent contacts the third party and hands the third=
 party the URL to the Intranet
+   content.</li>
+
+  </ol><p>No actual confidential file data is leaked in this=
 manner, but the URLs themselves could
+  contain confidential information. For example, the URL could be
+  <code>http://www.corp.example.com/upcoming-aquisitions/the-sampl=
e-company.egf</code>, which might
+  tell the third party that Example Corporation is intending to merge wi=
th The Sample Company.
+  Implementors might wish to consider allowing administrators to disable=
 this feature for certain
+  subdomains, content types, or schemes.</p>
+
+  <p><strong>Leaking secure URLs.</strong> User agents=
 should not send HTTPS URLs to third-party
+  sites registered as content handlers without the user's informed conse=
nt, for the same reason that
+  user agents sometimes avoid sending <code title=3Dhttp-referer>R=
eferer</code> (sic) HTTP headers
+  from secure sites to third-party sites.</p>
+
+  <p><strong>Leaking credentials.</strong> User agents=
 must never send username or password
+  information in the URLs that are escaped and included sent to the hand=
ler sites. User agents may
+  even avoid attempting to pass to Web-based handlers the URLs of resour=
ces that are known to
+  require authentication to access, as such sites would be unable to acc=
ess the resources in
+  question without prompting the user for credentials themselves (a prac=
tice that would require the
+  user to know whether to trust the third-party handler, a decision many=
 users are unable to make or
+  even understand).</p>
+
+  <p><strong>Interface interference.</strong> User age=
nts should be prepared to handle intentionally
+  long arguments to the methods. For example, if the user interface expo=
sed consists of an "accept"
+  button and a "deny" button, with the "accept" bind=
ing containing the name of the handler, it's
+  important that a long name not cause the "deny" button to be=
 pushed off the screen.</p>
+
+  <p><strong>Fingerprinting users.</strong> Since a si=
te can detect if it has attempted to register
+  a particular handler or not, whether or not the user responds, the mec=
hanism can be used to store
+  data. User agents are therefore strongly urged to treat registrations =
in the same manner as
+  cookies: clearing cookies for a site should also clear all registratio=
ns for that site, and
+  disabling cookies for a site should also disable registrations.</p&=
gt;
+
+  </div>
+<!--REMOVE-TOPIC:Security-->
+
+
+  <div class=3Dimpl>
+
+  <h6 id=3Dsample-handler-impl><span class=3Dsecno>7.6.1.3.2=
 </span>Sample user interface</h6>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <p>A simple implementation of this feature for a desktop Web bro=
wser might work as follows.</p>
+
+  <p>The <code title=3Ddom-navigator-registerContentHandler>=
<a href=3D#dom-navigator-registercontenthandler>registerContentHand=
ler()</a></code> method
+  could display a modal dialog box:</p>
+
+  <p><img src=3Dhttp://images.whatwg.org/sample-content-handler=
-registration.png width=3D534 alt=3D"The modal dialog box could have=
 the title 'Content Handler Registration', and could say 'This Web page: =
Kittens at work http://kittens.example.org/ ...would like permission to h=
andle files of type: application/x-meowmeow using the following Web-based=
 application: Kittens-at-work displayer http://kittens.example.org/?show=3D=
%s Do you trust the administrators of the "kittens.example.org&a=
mp;quot; domain?' with two buttons, 'Trust kittens.example.org' and 'Canc=
el'." height=3D374></p>
+
+  <p>In this dialog box, "Kittens at work" is the title =
of the page that invoked the method,
+  "http://kittens.example.org/" is the URL of that page, &quot=
;application/x-meowmeow" is the string that
+  was passed to the <code title=3Ddom-navigator-registerContentHandle=
r><a href=3D#dom-navigator-registercontenthandler>registerConten=
tHandler()</a></code> method as its first
+  argument (<var title=3D"">mimeType</var>), &quot=
;http://kittens.example.org/?show=3D%s" was the second
+  argument (<var title=3D"">url</var>), and "=
Kittens-at-work displayer" was the third argument (<var title=3D&=
quot;">title</var>).</p>
+
+  <p>If the user clicks the Cancel button, then nothing further ha=
ppens. If the user clicks the
+  "Trust" button, then the handler is remembered.</p>
+
+  <p>When the user then attempts to fetch a URL that uses the &quo=
t;application/x-meowmeow" <a href=3D#mime-type>MIME
+  type</a>, then it might display a dialog as follows:</p>
+
+  <p><img src=3Dhttp://images.whatwg.org/sample-content-handler=
.png width=3D577 alt=3D"The dialog box could have the title 'Unknown=
 File Type' and could say 'You have attempted to access:' followed by a U=
RL, followed by a prompt such as 'How would you like FerretBrowser to han=
dle this resource?' with three radio buttons, one saying 'Contact the Fer=
retBrowser plugin registry to see if there is an official way to handle t=
his resource.', one saying 'Pass this URL to a local application' with an=
 application selector, and one saying 'Pass this URL to the "Kit=
tens-at-work displayer" application at "kittens.example=
.org"', with a checkbox labeled 'Always do this for resources us=
ing the "application/x-meowmeow" type in future.', and =
with two buttons, 'Ok' and 'Cancel'." height=3D428></p>
+
+  <p>In this dialog, the third option is the one that was primed b=
y the site registering itself
+  earlier.</p>
+
+  <p>If the user does select that option, then the browser, in acc=
ordance with the requirements
+  described in the previous two sections, will redirect the user to
+  "http://kittens.example.org/?show=3Ddata%3Aapplication/x-meowmeow=
;base64,S2l0dGVucyBhcmUgdGhlIGN1dGVzdCE%253D".</p>
+
+  <p>The <code title=3Ddom-navigator-registerProtocolHandler&gt=
;<a href=3D#dom-navigator-registerprotocolhandler>registerProtocolH=
andler()</a></code> method
+  would work equivalently, but for schemes instead of unknown content ty=
pes.</p>
+
+  </div>
+
+
+
+  <h5 id=3Dmanually-releasing-the-storage-mutex><span class=3Ds=
ecno>7.6.1.4 </span>Manually releasing the storage mutex</h5&=
gt;
+
+  <pre class=3Didl>[NoInterfaceObject]
+interface <dfn id=3Dnavigatorstorageutils>NavigatorStorageUtils&lt=
;/dfn> {
+  readonly attribute boolean <a href=3D#dom-navigator-cookieenabled t=
itle=3Ddom-navigator-cookieEnabled>cookieEnabled</a>;
+  void <a href=3D#dom-navigator-yieldforstorageupdates title=3Ddom-na=
vigator-yieldForStorageUpdates>yieldForStorageUpdates</a>();
+};</pre>
+
+  <dl class=3Ddomintro><dt><var title=3D"">w=
indow</var> . <code title=3Ddom-navigator><a href=3D#dom-n=
avigator>navigator</a></code> . <code title=3Ddom-navig=
ator-cookieEnabled><a href=3D#dom-navigator-cookieenabled>cookie=
Enabled</a></code></dt>
+
+   <dd>
+
+    <p>Returns false if setting a cookie will be ignored, and true=
 otherwise.</p>
+
+   </dd>
+
+
+   <dt><var title=3D"">window</var> . <co=
de title=3Ddom-navigator><a href=3D#dom-navigator>navigator</=
a></code> . <code title=3Ddom-navigator-yieldForStorageUpdate=
s><a href=3D#dom-navigator-yieldforstorageupdates>yieldForStorag=
eUpdates</a></code>()</dt>
+
+   <dd>
+
+    <p>If a script uses the <code title=3Ddom-document-cookie&g=
t;<a href=3D#dom-document-cookie>document.cookie</a></code=
> API, or the
+    <code title=3Ddom-localStorage><a href=3D#dom-localstorage&=
gt;localStorage</a></code> API, the browser will block other =
scripts
+    from accessing cookies or storage until the first script finishes.
+    </p>
+
+    <p>Calling the <code title=3Ddom-navigator-yieldForStorageU=
pdates><a href=3D#dom-navigator-yieldforstorageupdates>navigator=
.yieldForStorageUpdates()</a></code> method
+    tells the user agent to unblock any other scripts that may be blocke=
d, even though the script
+    hasn't returned.</p>
+
+    <p>Values of cookies and items in the <code><a href=3D=
#storage-0>Storage</a></code> objects of <code title=3D=
dom-localStorage><a href=3D#dom-localstorage>localStorage</a&=
gt;</code> attributes can change after calling this method,
+    whence its name.
+    </p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+   <p>The <dfn id=3Ddom-navigator-cookieenabled title=3Ddom-nav=
igator-cookieEnabled><code>cookieEnabled</code></dfn&gt=
; attribute must
+   return true if the user agent attempts to handle cookies according to=
 the cookie specification,
+   and false if it ignores cookie change requests. <a href=3D#refsCOO=
KIES>[COOKIES]</a></p>
+
+   <p>The <dfn id=3Ddom-navigator-yieldforstorageupdates title=3D=
dom-navigator-yieldForStorageUpdates><code>yieldForStorageUpdate=
s()</code></dfn> method,
+   when invoked, must, if the <a href=3D#storage-mutex>storage mut=
ex</a> is owned by the <a href=3D#event-loop>event loop</a=
> of
+   the <a href=3D#concept-task title=3Dconcept-task>task</a>=
 that resulted in the method being called, release the
+   <a href=3D#storage-mutex>storage mutex</a> so that it is =
once again free. Otherwise, it must do nothing.</p>
+
+  </div>
+
+
+
+  <h5 id=3Dplugins-0><span class=3Dsecno>7.6.1.5 </span&g=
t;Plugins</h5>
+
+  <pre class=3Didl>[NoInterfaceObject]
+interface <dfn id=3Dnavigatorplugins>NavigatorPlugins</dfn> =
{
+  readonly attribute <a href=3D#pluginarray>PluginArray</a> =
<a href=3D#dom-navigator-plugins title=3Ddom-navigator-plugins>plug=
ins</a>;
+  readonly attribute <a href=3D#mimetypearray>MimeTypeArray</a&=
gt; <a href=3D#dom-navigator-mimetypes title=3Ddom-navigator-mimeTypes=
>mimeTypes</a>;
+  readonly attribute boolean <a href=3D#dom-navigator-javaenabled tit=
le=3Ddom-navigator-javaEnabled>javaEnabled</a>;
+};
+
+interface <dfn id=3Dpluginarray>PluginArray</dfn> {
+  void <a href=3D#dom-pluginarray-refresh title=3Ddom-PluginArray-ref=
resh>refresh</a>(optional boolean reload =3D false);
+  readonly attribute unsigned long <a href=3D#dom-pluginarray-length =
title=3Ddom-PluginArray-length>length</a>;
+  getter <a href=3D#dom-plugin title=3Ddom-Plugin>Plugin</a>=
? <a href=3D#dom-pluginarray-item title=3Ddom-PluginArray-item>item=
</a>(unsigned long index);
+  getter <a href=3D#dom-plugin title=3Ddom-Plugin>Plugin</a>=
? <a href=3D#dom-pluginarray-nameditem title=3Ddom-PluginArray-namedIt=
em>namedItem</a>(DOMString name);
+};
+
+interface <dfn id=3Dmimetypearray>MimeTypeArray</dfn> {
+  readonly attribute unsigned long <a href=3D#dom-mimetypearray-lengt=
h title=3Ddom-MimeTypeArray-length>length</a>;
+  getter <a href=3D#mimetype>MimeType</a>? <a href=3D#dom=
-mimetypearray-item title=3Ddom-MimeTypeArray-item>item</a>(unsi=
gned long index);
+  getter <a href=3D#mimetype>MimeType</a>? <a href=3D#dom=
-mimetypearray-nameditem title=3Ddom-MimeTypeArray-namedItem>namedItem=
</a>(DOMString name);
+};
+
+interface <dfn id=3Ddom-plugin title=3Ddom-Plugin>Plugin</dfn&g=
t; {
+  readonly attribute DOMString <a href=3D#dom-plugin-name title=3Ddom=
-Plugin-name>name</a>;
+  readonly attribute DOMString <a href=3D#dom-plugin-description titl=
e=3Ddom-Plugin-description>description</a>;
+  readonly attribute DOMString <a href=3D#dom-plugin-filename title=3D=
dom-Plugin-filename>filename</a>;
+  readonly attribute unsigned long <a href=3D#dom-plugin-length title=
=3Ddom-Plugin-length>length</a>;
+  getter <a href=3D#mimetype>MimeType</a>? <a href=3D#dom=
-plugin-item title=3Ddom-Plugin-item>item</a>(unsigned long inde=
x);
+  getter <a href=3D#mimetype>MimeType</a>? <a href=3D#dom=
-plugin-nameditem title=3Ddom-Plugin-namedItem>namedItem</a>(DOM=
String name);
+};
+
+interface <dfn id=3Dmimetype>MimeType</dfn> {
+  readonly attribute DOMString <a href=3D#dom-mimetype-type title=3Dd=
om-MimeType-type>type</a>;
+  readonly attribute DOMString <a href=3D#dom-mimetype-description ti=
tle=3Ddom-MimeType-description>description</a>;
+  readonly attribute DOMString <a href=3D#dom-mimetype-suffixes title=
=3Ddom-MimeType-suffixes>suffixes</a>; // comma-separated
+  readonly attribute <a href=3D#dom-plugin title=3Ddom-Plugin>Plug=
in</a> <a href=3D#dom-mimetype-enabledplugin title=3Ddom-MimeTyp=
e-enabledPlugin>enabledPlugin</a>;
+};</pre>
+
+  <dl class=3Ddomintro><dt><var title=3D"">w=
indow</var> . <code title=3Ddom-navigator><a href=3D#dom-n=
avigator>navigator</a></code> . <code title=3Ddom-navig=
ator-plugins><a href=3D#dom-navigator-plugins>plugins</a>&=
lt;/code> . <code title=3Ddom-PluginArray-refresh><a href=3D#=
dom-pluginarray-refresh>refresh</a></code>( [ <var titl=
e=3D"">refresh</var> ] )</dt>
+   <dd>
+    <p>Updates the lists of supported plugins and MIME types for t=
his page, and reloads the page if the lists have changed.</p>
+    <!-- that's not quite what all browsers have always done -->
+   </dd>
+
+   <dt><var title=3D"">window</var> . <co=
de title=3Ddom-navigator><a href=3D#dom-navigator>navigator</=
a></code> . <code title=3Ddom-navigator-plugins><a href=
=3D#dom-navigator-plugins>plugins</a></code> . <code ti=
tle=3Ddom-PluginArray-length><a href=3D#dom-pluginarray-length>l=
ength</a></code></dt>
+   <dd>
+    <p>Returns the number of plugins, represented by <code titl=
e=3Ddom-Plugin><a href=3D#dom-plugin>Plugin</a></code&g=
t; objects, that the user agent reports.</p>
+   </dd>
+
+   <dt><var title=3D"">plugin</var> =3D <=
var title=3D"">window</var> . <code title=3Ddom-nav=
igator><a href=3D#dom-navigator>navigator</a></code>=
 . <code title=3Ddom-navigator-plugins><a href=3D#dom-navigator-=
plugins>plugins</a></code> . <code title=3Ddom-PluginAr=
ray-item><a href=3D#dom-pluginarray-item>item</a></code=
>(<var title=3D"">index</var>)</dt>
+   <dt><var title=3D"">window</var> . <co=
de title=3Ddom-navigator><a href=3D#dom-navigator>navigator</=
a></code> . <code title=3Ddom-navigator-plugins><a href=
=3D#dom-navigator-plugins>plugins</a></code>[<var title=
=3D"">index</var>]</dt>
+   <dd>
+    <p>Returns the specified <code title=3Ddom-Plugin><a =
href=3D#dom-plugin>Plugin</a></code> object.</p>
+   </dd>
+
+   <dt><var title=3D"">plugin</var> =3D <=
var title=3D"">window</var> . <code title=3Ddom-nav=
igator><a href=3D#dom-navigator>navigator</a></code>=
 . <code title=3Ddom-navigator-plugins><a href=3D#dom-navigator-=
plugins>plugins</a></code> . <code title=3Ddom-PluginAr=
ray-item><a href=3D#dom-pluginarray-item>item</a></code=
>(<var title=3D"">name</var>)</dt>
+   <dt><var title=3D"">window</var> . <co=
de title=3Ddom-navigator><a href=3D#dom-navigator>navigator</=
a></code> . <code title=3Ddom-navigator-plugins><a href=
=3D#dom-navigator-plugins>plugins</a></code>[<var title=
=3D"">name</var>]</dt>
+   <dd>
+    <p>Returns the <code title=3Ddom-Plugin><a href=3D#do=
m-plugin>Plugin</a></code> object for the plugin with the =
given name.</p>
+   </dd>
+
+   <dt><var title=3D"">window</var> . <co=
de title=3Ddom-navigator><a href=3D#dom-navigator>navigator</=
a></code> . <code title=3Ddom-mimeTypes>mimeTypes</code=
> . <code title=3Ddom-MimeTypeArray-length><a href=3D#dom-mim=
etypearray-length>length</a></code></dt>
+   <dd>
+    <p>Returns the number of MIME types, represented by <code&g=
t;<a href=3D#mimetype>MimeType</a></code> objects, supp=
orted by the plugins that the user agent reports.</p>
+   </dd>
+
+   <dt><var title=3D"">mimeType</var> =3D &l=
t;var title=3D"">window</var> . <code title=3Ddom-n=
avigator><a href=3D#dom-navigator>navigator</a></code&g=
t; . <code title=3Ddom-mimeTypes>mimeTypes</code> . <code =
title=3Ddom-MimeTypeArray-item><a href=3D#dom-mimetypearray-item&gt=
;item</a></code>(<var title=3D"">index</va=
r>)</dt>
+   <dt><var title=3D"">window</var> . <co=
de title=3Ddom-navigator><a href=3D#dom-navigator>navigator</=
a></code> . <code title=3Ddom-mimeTypes>mimeTypes</code=
>[<var title=3D"">index</var>]</dt>
+   <dd>
+    <p>Returns the specified <code><a href=3D#mimetype&gt=
;MimeType</a></code> object.</p>
+   </dd>
+
+   <dt><var title=3D"">mimeType</var> =3D &l=
t;var title=3D"">window</var> . <code title=3Ddom-n=
avigator><a href=3D#dom-navigator>navigator</a></code&g=
t; . <code title=3Ddom-mimeTypes>mimeTypes</code> . <code =
title=3Ddom-MimeTypeArray-item><a href=3D#dom-mimetypearray-item&gt=
;item</a></code>(<var title=3D"">name</var=
>)</dt>
+   <dt><var title=3D"">window</var> . <co=
de title=3Ddom-navigator><a href=3D#dom-navigator>navigator</=
a></code> . <code title=3Ddom-mimeTypes>mimeTypes</code=
>[<var title=3D"">name</var>]</dt>
+   <dd>
+    <p>Returns the <code><a href=3D#mimetype>MimeType&=
lt;/a></code> object for the given MIME type.</p>
+   </dd>
+
+   <dt><var title=3D"">plugin</var> . <co=
de title=3Ddom-Plugin-name><a href=3D#dom-plugin-name>name</a=
></code>
+   <dd>
+    <p>Returns the plugin's name.</p>
+   </dd>
+
+   <dt><var title=3D"">plugin</var> . <co=
de title=3Ddom-Plugin-description><a href=3D#dom-plugin-description=
>description</a></code>
+   <dd>
+    <p>Returns the plugin's description.</p>
+   </dd>
+
+   <dt><var title=3D"">plugin</var> . <co=
de title=3Ddom-Plugin-filename><a href=3D#dom-plugin-filename>fi=
lename</a></code>
+   <dd>
+    <p>Returns the plugin library's filename, if applicable on the=
 current platform.</p>
+   </dd>
+
+   <dt><var title=3D"">plugin</var> . <co=
de title=3Ddom-Plugin-length><a href=3D#dom-plugin-length>length=
</a></code></dt>
+   <dd>
+    <p>Returns the number of MIME types, represented by <code&g=
t;<a href=3D#mimetype>MimeType</a></code> objects, supp=
orted by the plugin.</p>
+   </dd>
+
+   <dt><var title=3D"">mimeType</var> =3D &l=
t;var title=3D"">plugin</var> . <code title=3Ddom-P=
lugin-item><a href=3D#dom-plugin-item>item</a></code&gt=
;(<var title=3D"">index</var>)</dt>
+   <dt><var title=3D"">plugin</var>[<var =
title=3D"">index</var>]</dt>
+   <dd>
+    <p>Returns the specified <code><a href=3D#mimetype&gt=
;MimeType</a></code> object.</p>
+   </dd>
+
+   <dt><var title=3D"">mimeType</var> =3D &l=
t;var title=3D"">plugin</var> . <code title=3Ddom-P=
lugin-item><a href=3D#dom-plugin-item>item</a></code&gt=
;(<var title=3D"">name</var>)</dt>
+   <dt><var title=3D"">plugin</var>[<var =
title=3D"">name</var>]</dt>
+   <dd>
+    <p>Returns the <code><a href=3D#mimetype>MimeType&=
lt;/a></code> object for the given MIME type.</p>
+   </dd>
+
+   <dt><var title=3D"">mimeType</var> . <=
code title=3Ddom-MimeType-type><a href=3D#dom-mimetype-type>type=
</a></code>
+   <dd>
+    <p>Returns the MIME type.</p>
+   </dd>
+
+   <dt><var title=3D"">mimeType</var> . <=
code title=3Ddom-MimeType-description><a href=3D#dom-mimetype-descr=
iption>description</a></code>
+   <dd>
+    <p>Returns the MIME type's description.</p>
+   </dd>
+
+   <dt><var title=3D"">mimeType</var> . <=
code title=3Ddom-MimeType-suffixes><a href=3D#dom-mimetype-suffixes=
>suffixes</a></code>
+   <dd>
+    <p>Returns the MIME type's typical file extensions, in a comma=
-separated list.</p>
+   </dd>
+
+   <dt><var title=3D"">mimeType</var> . <=
code title=3Ddom-MimeType-enabledPlugin><a href=3D#dom-mimetype-ena=
bledplugin>enabledPlugin</a></code>
+   <dd>
+    <p>Returns the <code title=3Ddom-Plugin><a href=3D#do=
m-plugin>Plugin</a></code> object that implements this MIM=
E type.</p>
+   </dd>
+
+   <dt><var title=3D"">window</var> . <co=
de title=3Ddom-navigator><a href=3D#dom-navigator>navigator</=
a></code> . <code title=3Ddom-navigator-javaEnabled><a =
href=3D#dom-navigator-javaenabled>javaEnabled</a></code>&l=
t;/dt>
+   <dd>
+    <p>Returns true if there's a plugin that supports the MIME typ=
e "<code title=3D"">application/x-java-vm</code&g=
t;".</p>
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-navigator-plugins title=3Ddom-navigator-=
plugins><code>navigator.plugins</code></dfn> attribu=
te must
+  return a <code><a href=3D#pluginarray>PluginArray</a&gt=
;</code> object. The same object must be returned each time.</p&=
gt;
+
+  <p>The <dfn id=3Ddom-navigator-mimetypes title=3Ddom-navigato=
r-mimeTypes><code>navigator.mimeTypes</code></dfn> a=
ttribute must
+  return a <code><a href=3D#mimetypearray>MimeTypeArray</=
a></code> object. The same object must be returned each time.&lt=
;/p>
+
+  <hr><p>A <code><a href=3D#pluginarray>PluginAr=
ray</a></code> object represents none, some, or all of the &l=
t;a href=3D#plugin title=3Dplugin>plugins</a> supported by the u=
ser agent, each of which is represented by a <code title=3Ddom-Plugin&=
gt;<a href=3D#dom-plugin>Plugin</a></code> object. Each=
 of these <code title=3Ddom-Plugin><a href=3D#dom-plugin>Plug=
in</a></code>
+  objects may be <dfn id=3Dhidden-plugin title=3D"hidden plugin&=
quot;>hidden plugins</dfn>. A <a href=3D#hidden-plugin>hid=
den plugin</a> can't
+  be enumerated, but can still be inspected by using its name.</p>
+
+  <p class=3Dnote>The fewer <a href=3D#plugin title=3Dplugin&gt=
;plugins</a> are represented by the
+  <code><a href=3D#pluginarray>PluginArray</a></cod=
e> object, and of those, the more that are <a href=3D#hidden-plugin=
 title=3D"hidden
+  plugin">hidden</a>, the more the user's privacy will be =
protected. Each exposed plugin
+  increases the number of bits that can be derived for fingerprinting. H=
iding a plugin helps, but
+  unless it is an extremely rare plugin, it is likely that a site attemp=
ting to derive the list of
+  plugins can still determine whether the plugin is supported or not by =
probing for it by name (the
+  names of popular plugins are widely known). Therefore not exposing a p=
lugin at all is preferred.
+  Unfortunately, many legacy sites use this feature to determine, for ex=
ample, which plugin to use
+  to play video. Not exposing any plugins at all might therefore not be =
entirely plausible.</p>
+
+  <p>The <code><a href=3D#pluginarray>PluginArray</=
a></code> objects created by a user agent must not be <a href=
=3D#live>live</a>. The
+  set of plugins represented by the objects must not change once an obje=
ct is created, except when
+  it is updated by the <code title=3Ddom-PluginArray-refresh><a=
 href=3D#dom-pluginarray-refresh>refresh()</a></code> meth=
od.</p>
+
+  <p>Each <a href=3D#plugin>plugin</a> represented by =
a <code><a href=3D#pluginarray>PluginArray</a></code=
> can support a number of
+  <a href=3D#mime-type title=3D"MIME type">MIME types&lt=
;/a>. For each such <a href=3D#plugin>plugin</a>, the user=
 agent must
+  pick one or more of these <a href=3D#mime-type title=3D"MIME t=
ype">MIME types</a> to be those that are
+  <dfn id=3Dexplicitly-supported>explicitly supported</dfn>.=
</p>
+
+  <p class=3Dnote>The <a href=3D#explicitly-supported>explic=
itly supported</a> <a href=3D#mime-type title=3D"MIME type&=
quot;>MIME types</a> of
+  a <a href=3D#plugin>plugin</a> are those that are exposed =
through the <code title=3Ddom-Plugin><a href=3D#dom-plugin>Pl=
ugin</a></code> and <code><a href=3D#mimetypearray&g=
t;MimeTypeArray</a></code> interfaces. As with <a href=3D#=
plugin title=3Dplugin>plugins</a> themselves, any variation betw=
een users regarding what is exposed
+  allows sites to fingerprint users. User agents are therefore encourage=
d to expose the same <a href=3D#mime-type title=3D"MIME type&quot=
;>MIME types</a> for all users of a <a href=3D#plugin>plug=
in</a>, regardless of the
+  actual types supported... at least, within the constraints imposed by =
compatibility with legacy
+  content.</p>
+
+  <p>The <a href=3D#supported-property-indices>supported pro=
perty indices</a> of a <code><a href=3D#pluginarray>Plu=
ginArray</a></code> object are the
+  numbers from zero to the number of non-<a href=3D#hidden-plugin tit=
le=3D"hidden plugin">hidden</a> <a href=3D#plugin t=
itle=3Dplugin>plugins</a> represented by the object, if any.
+  <a href=3D#fingerprinting-vector class=3Dfingerprint title=3D"=
fingerprinting vector"><img src=3Dhttp://images.whatwg.org/fin=
gerprint.png width=3D46 alt=3D"(This is a fingerprinting vector.)&qu=
ot; height=3D64></a>
+  </p>
+
+  <p>The <dfn id=3Ddom-pluginarray-length title=3Ddom-PluginArr=
ay-length><code>length</code></dfn> attribute must r=
eturn the
+  number of non-<a href=3D#hidden-plugin title=3D"hidden plugin&=
quot;>hidden</a> <a href=3D#plugin title=3Dplugin>plugins&=
lt;/a>
+  represented by the object.
+  <a href=3D#fingerprinting-vector class=3Dfingerprint title=3D"=
fingerprinting vector"><img src=3Dhttp://images.whatwg.org/fin=
gerprint.png width=3D46 alt=3D"(This is a fingerprinting vector.)&qu=
ot; height=3D64></a>
+  </p>
+
+  <p>The <dfn id=3Ddom-pluginarray-item title=3Ddom-PluginArray=
-item><code>item()</code></dfn> method of a
+  <code><a href=3D#pluginarray>PluginArray</a></cod=
e> object must return null if the argument is not one of the object's
+  <a href=3D#supported-property-indices>supported property indices=
</a>, and otherwise must return the result of running the
+  following steps, using the method's argument as <var title=3D"=
">index</var>:</p>
+
+  <ol><li><p>Let <var title=3D"">list&=
lt;/var> be the <code title=3Ddom-Plugin><a href=3D#dom-plugi=
n>Plugin</a></code> objects
+   representing the non-<a href=3D#hidden-plugin title=3D"hidden=
 plugin">hidden</a> <a href=3D#plugin title=3Dplugin>=
plugins</a> represented by the <code><a href=3D#pluginarra=
y>PluginArray</a></code> object.</li>
+
+   <li><p>Sort <var title=3D"">list</var&=
gt; alphabetically by the <code title=3Ddom-Plugin-name><a href=3D=
#dom-plugin-name>name</a></code> of each <code title=3D=
dom-Plugin><a href=3D#dom-plugin>Plugin</a></code>.&=
lt;/li>
+
+   <li><p>Return the <var title=3D"">index&l=
t;/var>th entry in <var title=3D"">list</var>.&l=
t;/li>
+
+  </ol><p class=3Dnote>It is important <a href=3D#fingerp=
rinting-vector class=3Dno-backref title=3D"fingerprinting vector&quo=
t;>for
+  privacy</a> that the order of plugins not leak additional inform=
ation, e.g. the order in which
+  plugins were installed.</p>
+
+  <p>The <a href=3D#supported-property-names>supported prope=
rty names</a> of a <code><a href=3D#pluginarray>PluginA=
rray</a></code> object are the values
+  of the <code title=3Ddom-Plugin-name><a href=3D#dom-plugin-na=
me>name</a></code> attributes of all the <code title=3D=
dom-Plugin><a href=3D#dom-plugin>Plugin</a></code> o=
bjects represented by the <code><a href=3D#pluginarray>Plugin=
Array</a></code> object. The
+  properties exposed in this way must not be enumerable.
+  <a href=3D#fingerprinting-vector class=3Dfingerprint title=3D"=
fingerprinting vector"><img src=3Dhttp://images.whatwg.org/fin=
gerprint.png width=3D46 alt=3D"(This is a fingerprinting vector.)&qu=
ot; height=3D64></a>
+  </p>
+
+  <p>The <dfn id=3Ddom-pluginarray-nameditem title=3Ddom-Plugin=
Array-namedItem><code>namedItem()</code></dfn> metho=
d of a
+  <code><a href=3D#pluginarray>PluginArray</a></cod=
e> object must return null if the argument is not one of the object's
+  <a href=3D#supported-property-names>supported property names<=
/a>, and otherwise must return the <code title=3Ddom-Plugin><=
a href=3D#dom-plugin>Plugin</a></code> object, of those re=
presented by the <code><a href=3D#pluginarray>PluginArray<=
/a></code>
+  object, that has a <code title=3Ddom-Plugin-name><a href=3D#d=
om-plugin-name>name</a></code> equal to the method's argum=
ent.</p>
+
+  <p>The <dfn id=3Ddom-pluginarray-refresh title=3Ddom-PluginAr=
ray-refresh><code>refresh()</code></dfn> method of t=
he
+  <code><a href=3D#pluginarray>PluginArray</a></cod=
e> object of a <code><a href=3D#navigator>Navigator</a&=
gt;</code> object, when invoked, must check to
+  see if any <a href=3D#plugin title=3Dplugin>plugins</a> ha=
ve been installed or reconfigured since the user
+  agent created the <code><a href=3D#pluginarray>PluginArray=
</a></code> object. If so, and the method's argument is true,=
 then
+  the user agent must act as if the <code title=3Ddom-location-reload=
><a href=3D#dom-location-reload>location.reload()</a></=
code>
+  method was called instead. Otherwise, the user agent must update the &=
lt;code><a href=3D#pluginarray>PluginArray</a></code&gt=
;
+  object and <code><a href=3D#mimetypearray>MimeTypeArray&lt=
;/a></code> object created for attributes of that <code>&l=
t;a href=3D#navigator>Navigator</a></code>
+  object, and the <code title=3Ddom-Plugin><a href=3D#dom-plugi=
n>Plugin</a></code> and <code><a href=3D#mimetype=
>MimeType</a></code> objects created
+  for those <code><a href=3D#pluginarray>PluginArray</a&g=
t;</code> and <code><a href=3D#mimetypearray>MimeTypeAr=
ray</a></code> objects, using the same <code title=3Ddom-P=
lugin><a href=3D#dom-plugin>Plugin</a></code> object=
s for cases where the <code title=3Ddom-Plugin-name><a href=3D#d=
om-plugin-name>name</a></code> is the same, and the same &=
lt;code><a href=3D#mimetype>MimeType</a></code> obje=
cts for
+  cases where the <code title=3Ddom-MimeType-type><a href=3D#do=
m-mimetype-type>type</a></code> is the same, and creating =
new objects
+  for cases where there were no matching objects immediately prior to th=
e <code title=3Ddom-PluginArray-refresh><a href=3D#dom-pluginarr=
ay-refresh>refresh()</a></code> call. Old <code title=3D=
dom-Plugin><a href=3D#dom-plugin>Plugin</a></code>
+  and <code><a href=3D#mimetype>MimeType</a></code&=
gt; objects must continue to return the same values that they had prior t=
o
+  the update, though naturally now the data is stale and may appear inco=
nsistent (for example, an
+  old <code><a href=3D#mimetype>MimeType</a></code&=
gt; entry might list as its <code title=3Ddom-MimeType-enabledPlugin&g=
t;<a href=3D#dom-mimetype-enabledplugin>enabledPlugin</a><=
/code> a <code title=3Ddom-Plugin><a href=3D#dom-plugin>Pl=
ugin</a></code>
+  object that no longer lists that <code><a href=3D#mimetype&gt=
;MimeType</a></code> as a supported <code><a href=3D=
#mimetype>MimeType</a></code>).</p>
+
+  <hr><p>A <code><a href=3D#mimetypearray>MimeTy=
peArray</a></code> object represents the <a href=3D#mime-t=
ype title=3D"MIME type">MIME types</a>
+  <a href=3D#explicitly-supported>explicitly supported</a> b=
y <a href=3D#plugin title=3Dplugin>plugins</a> supported by t=
he user
+  agent, each of which is represented by a <code><a href=3D#mim=
etype>MimeType</a></code> object.</p>
+
+  <p>The <code><a href=3D#mimetypearray>MimeTypeArray&=
lt;/a></code> objects created by a user agent must not be <a =
href=3D#live>live</a>.
+  The set of MIME types represented by the objects must not change once =
an object is created, except
+  when it is updated by the <code><a href=3D#pluginarray>Plu=
ginArray</a></code> object's <code title=3Ddom-PluginArray=
-refresh><a href=3D#dom-pluginarray-refresh>refresh()</a>&=
lt;/code> method.</p>
+
+  <p>The <a href=3D#supported-property-indices>supported pro=
perty indices</a> of a <code><a href=3D#mimetypearray>M=
imeTypeArray</a></code> object are the
+  numbers from zero to the number of <a href=3D#mime-type title=3D&qu=
ot;MIME type">MIME types</a> <a href=3D#explicitly-suppo=
rted>explicitly
+  supported</a> by non-<a href=3D#hidden-plugin title=3D"h=
idden plugin">hidden</a> <a href=3D#plugin title=3Dplugi=
n>plugins</a> represented by the corresponding <code><a=
 href=3D#pluginarray>PluginArray</a></code> object, if
+  any.
+  <a href=3D#fingerprinting-vector class=3Dfingerprint title=3D"=
fingerprinting vector"><img src=3Dhttp://images.whatwg.org/fin=
gerprint.png width=3D46 alt=3D"(This is a fingerprinting vector.)&qu=
ot; height=3D64></a>
+  </p>
+
+  <p>The <dfn id=3Ddom-mimetypearray-length title=3Ddom-MimeTyp=
eArray-length><code>length</code></dfn> attribute mu=
st return the
+  number of <a href=3D#mime-type title=3D"MIME type">MIM=
E types</a> <a href=3D#explicitly-supported>explicitly suppor=
ted</a> by non-<a href=3D#hidden-plugin title=3D"hidden plu=
gin">hidden</a> <a href=3D#plugin title=3Dplugin>plug=
ins</a> represented by the
+  corresponding <code><a href=3D#pluginarray>PluginArray<=
/a></code> object, if any.
+  <a href=3D#fingerprinting-vector class=3Dfingerprint title=3D"=
fingerprinting vector"><img src=3Dhttp://images.whatwg.org/fin=
gerprint.png width=3D46 alt=3D"(This is a fingerprinting vector.)&qu=
ot; height=3D64></a>
+  </p>
+
+  <p>The <dfn id=3Ddom-mimetypearray-item title=3Ddom-MimeTypeA=
rray-item><code>item()</code></dfn> method of a
+  <code><a href=3D#mimetypearray>MimeTypeArray</a><=
/code> object must return null if the argument is not one of the objec=
t's
+  <a href=3D#supported-property-indices>supported property indices=
</a>, and otherwise must return the result of running the
+  following steps, using the method's argument as <var title=3D"=
">index</var>:</p>
+
+  <ol><li><p>Let <var title=3D"">list&=
lt;/var> be the <code><a href=3D#mimetype>MimeType</a&g=
t;</code> objects representing the <a href=3D#mime-type title=3D=
"MIME type">MIME types</a> <a href=3D#explicitly-su=
pported>explicitly supported</a> by non-<a href=3D#hidden-plu=
gin title=3D"hidden
+   plugin">hidden</a> <a href=3D#plugin title=3Dplugin&=
gt;plugins</a> represented by the corresponding
+   <code><a href=3D#pluginarray>PluginArray</a></co=
de> object, if any.</li>
+
+   <li><p>Sort <var title=3D"">list</var&=
gt; alphabetically by the <code title=3Ddom-MimeType-type><a hre=
f=3D#dom-mimetype-type>type</a></code> of each <code&gt=
;<a href=3D#mimetype>MimeType</a></code>.</li>
+
+   <li><p>Return the <var title=3D"">index&l=
t;/var>th entry in <var title=3D"">list</var>.&l=
t;/li>
+
+  </ol><p class=3Dnote>It is important <a href=3D#fingerp=
rinting-vector class=3Dno-backref title=3D"fingerprinting vector&quo=
t;>for
+  privacy</a> that the order of MIME types not leak additional inf=
ormation, e.g. the order in
+  which plugins were installed.</p>
+
+  <p>The <a href=3D#supported-property-names>supported prope=
rty names</a> of a <code><a href=3D#mimetypearray>MimeT=
ypeArray</a></code> object are the values
+  of the <code title=3Ddom-MimeType-type><a href=3D#dom-mimetyp=
e-type>type</a></code> attributes of all the <code>&=
lt;a href=3D#mimetype>MimeType</a></code>
+  objects represented by the <code><a href=3D#mimetypearray>=
MimeTypeArray</a></code> object. The properties exposed in th=
is way
+  must not be enumerable.
+  <a href=3D#fingerprinting-vector class=3Dfingerprint title=3D"=
fingerprinting vector"><img src=3Dhttp://images.whatwg.org/fin=
gerprint.png width=3D46 alt=3D"(This is a fingerprinting vector.)&qu=
ot; height=3D64></a>
+  </p>
+
+  <p>The <dfn id=3Ddom-mimetypearray-nameditem title=3Ddom-Mime=
TypeArray-namedItem><code>namedItem()</code></dfn> m=
ethod of a
+  <code><a href=3D#mimetypearray>MimeTypeArray</a><=
/code> object must return null if the argument is not one of the objec=
t's
+  <a href=3D#supported-property-names>supported property names<=
/a>, and otherwise must return the <code><a href=3D#mimetype&=
gt;MimeType</a></code> object
+  that has a <code title=3Ddom-MimeType-type><a href=3D#dom-mim=
etype-type>type</a></code> equal to the method's argument.=
</p>
+
+  <hr><p>A <code title=3Ddom-Plugin><a href=3D#dom-=
plugin>Plugin</a></code> object represents a <a href=3D=
#plugin>plugin</a>. It has
+  several attributes to provide details about the plugin, and can be enu=
merated to obtain the list
+  of <a href=3D#mime-type title=3D"MIME type">MIME types=
</a> that it <a href=3D#explicitly-supported title=3D"expli=
citly supported">explicitly
+  supports</a>.</p>
+
+  <p>The <code title=3Ddom-Plugin><a href=3D#dom-plugin&g=
t;Plugin</a></code> objects created by a user agent must not =
be
+  <a href=3D#live>live</a>. The set of MIME types represente=
d by the objects, and the values of the
+  objects' attributes, must not change once an object is created, except=
 when updated by the
+  <code><a href=3D#pluginarray>PluginArray</a></cod=
e> object's <code title=3Ddom-PluginArray-refresh><a href=3D#=
dom-pluginarray-refresh>refresh()</a></code>
+  method.</p>
+
+  <p>The <dfn id=3Dreported-mime-types>reported MIME types&l=
t;/dfn> for a <code title=3Ddom-Plugin><a href=3D#dom-plugin&=
gt;Plugin</a></code> object are the
+  <a href=3D#mime-type title=3D"MIME type">MIME types&lt=
;/a> <a href=3D#explicitly-supported>explicitly supported</a&=
gt; by the corresponding
+  <a href=3D#plugin>plugin</a> when this object was last cre=
ated or updated by <code title=3Ddom-PluginArray-refresh><a href=
=3D#dom-pluginarray-refresh>PluginArray.refresh()</a></code&g=
t;, whichever happened most
+  recently.</p>
+
+  <p>The <a href=3D#supported-property-indices>supported pro=
perty indices</a> of a <code title=3Ddom-Plugin><a href=3D=
#dom-plugin>Plugin</a></code> object
+  are the numbers from zero to the number of <a href=3D#reported-mime=
-types>reported MIME types</a>.
+  <a href=3D#fingerprinting-vector class=3Dfingerprint title=3D"=
fingerprinting vector"><img src=3Dhttp://images.whatwg.org/fin=
gerprint.png width=3D46 alt=3D"(This is a fingerprinting vector.)&qu=
ot; height=3D64></a>
+  </p>
+
+  <p>The <dfn id=3Ddom-plugin-length title=3Ddom-Plugin-length&=
gt;<code>length</code></dfn> attribute must return the =
number
+  of <a href=3D#reported-mime-types>reported MIME types</a>.
+  <a href=3D#fingerprinting-vector class=3Dfingerprint title=3D"=
fingerprinting vector"><img src=3Dhttp://images.whatwg.org/fin=
gerprint.png width=3D46 alt=3D"(This is a fingerprinting vector.)&qu=
ot; height=3D64></a>
+  </p>
+
+  <p>The <dfn id=3Ddom-plugin-item title=3Ddom-Plugin-item>&=
lt;code>item()</code></dfn> method of a <code title=3Dd=
om-Plugin><a href=3D#dom-plugin>Plugin</a></code> ob=
ject must return null if the argument is not one of the
+  object's <a href=3D#supported-property-indices>supported propert=
y indices</a>, and otherwise must return the result of running
+  the following steps, using the method's argument as <var title=3D&q=
uot;">index</var>:</p>
+
+  <ol><li><p>Let <var title=3D"">list&=
lt;/var> be the <code><a href=3D#mimetype>MimeType</a&g=
t;</code> objects representing the
+   <a href=3D#reported-mime-types>reported MIME types</a>.&l=
t;/li>
+
+   <li><p>Sort <var title=3D"">list</var&=
gt; alphabetically by the <code title=3Ddom-MimeType-type><a hre=
f=3D#dom-mimetype-type>type</a></code> of each <code&gt=
;<a href=3D#mimetype>MimeType</a></code>.</li>
+
+   <li><p>Return the <var title=3D"">index&l=
t;/var>th entry in <var title=3D"">list</var>.&l=
t;/li>
+
+  </ol><p class=3Dnote>It is important <a href=3D#fingerp=
rinting-vector class=3Dno-backref title=3D"fingerprinting vector&quo=
t;>for
+  privacy</a> that the order of MIME types not leak additional inf=
ormation, e.g. the order in
+  which plugins were installed.</p>
+
+  <p>The <a href=3D#supported-property-names>supported prope=
rty names</a> of a <code title=3Ddom-Plugin><a href=3D#dom=
-plugin>Plugin</a></code> object
+  are the values of the <code title=3Ddom-MimeType-type><a href=
=3D#dom-mimetype-type>type</a></code> attributes of the
+  <code><a href=3D#mimetype>MimeType</a></code> =
objects representing the <a href=3D#reported-mime-types>reported MI=
ME types</a>. The properties
+  exposed in this way must not be enumerable.
+  <a href=3D#fingerprinting-vector class=3Dfingerprint title=3D"=
fingerprinting vector"><img src=3Dhttp://images.whatwg.org/fin=
gerprint.png width=3D46 alt=3D"(This is a fingerprinting vector.)&qu=
ot; height=3D64></a>
+  </p>
+
+  <p>The <dfn id=3Ddom-plugin-nameditem title=3Ddom-Plugin-name=
dItem><code>namedItem()</code></dfn> method of a &lt=
;code title=3Ddom-Plugin><a href=3D#dom-plugin>Plugin</a>&=
lt;/code> object must return null if the argument is not one of the
+  object's <a href=3D#supported-property-names>supported property =
names</a>, and otherwise must return the
+  <code><a href=3D#mimetype>MimeType</a></code> =
object that has a <code title=3Ddom-MimeType-type><a href=3D#dom=
-mimetype-type>type</a></code> equal to the
+  method's argument.</p>
+
+  <p>The <dfn id=3Ddom-plugin-name title=3Ddom-Plugin-name>&=
lt;code>name</code></dfn> attribute must return the
+  <a href=3D#plugin>plugin</a>'s name.</p>
+
+  <p>The <dfn id=3Ddom-plugin-description title=3Ddom-Plugin-de=
scription><code>description</code></dfn> and <dfn=
 id=3Ddom-plugin-filename title=3Ddom-Plugin-filename><code>file=
name</code></dfn> attributes must return user-agent-defined
+  (or, in all likelihood, <a href=3D#plugin>plugin</a>-defin=
ed) strings. In each case, the same string must
+  be returned each time, except that the strings returned may change whe=
n the <code title=3Ddom-PluginArray-refresh><a href=3D#dom-plugi=
narray-refresh>PluginArray.refresh()</a></code> method upd=
ates the object.</p>
+
+  <p class=3Dwarning>If the values returned by the <code title=3D=
dom-Plugin-description><a href=3D#dom-plugin-description>descrip=
tion</a></code> or <code title=3Ddom-Plugin-filename>&l=
t;a href=3D#dom-plugin-filename>filename</a></code> attrib=
utes vary between versions of a
+  <a href=3D#plugin>plugin</a>, they can be used both as a f=
ingerprinting vector and, even more importantly,
+  as a trivial way to determine what security vulnerabilities a <a hr=
ef=3D#plugin>plugin</a> (and thus a
+  browser) may have. It is thus highly recommended that the <code tit=
le=3Ddom-Plugin-description><a href=3D#dom-plugin-description>de=
scription</a></code> attribute just return the same value as =
the
+  <code title=3Ddom-Plugin-name><a href=3D#dom-plugin-name>n=
ame</a></code> attribute, and that the <code title=3Ddom-P=
lugin-filename><a href=3D#dom-plugin-filename>filename</a>=
</code> attribute return the empty string.
+  <a href=3D#fingerprinting-vector class=3Dfingerprint title=3D"=
fingerprinting vector"><img src=3Dhttp://images.whatwg.org/fin=
gerprint.png width=3D46 alt=3D"(This is a fingerprinting vector.)&qu=
ot; height=3D64></a>
+  </p>
+
+  <hr><p>A <code><a href=3D#mimetype>MimeType&lt=
;/a></code> object represents a <a href=3D#mime-type>MIME =
type</a> that is, or was,
+  <a href=3D#explicitly-supported>explicitly supported</a> b=
y a <a href=3D#plugin>plugin</a>.</p>
+
+  <p>The <code><a href=3D#mimetype>MimeType</a>&=
lt;/code> objects created by a user agent must not be <a href=3D#li=
ve>live</a>. The
+  values of the objects' attributes must not change once an object is cr=
eated, except when updated
+  by the <code><a href=3D#pluginarray>PluginArray</a>&=
lt;/code> object's <code title=3Ddom-PluginArray-refresh><a h=
ref=3D#dom-pluginarray-refresh>refresh()</a></code>
+  method.</p>
+
+  <p>The <dfn id=3Ddom-mimetype-type title=3Ddom-MimeType-type&=
gt;<code>type</code></dfn> attribute must return the
+  <a href=3D#valid-mime-type-with-no-parameters>valid MIME type wi=
th no parameters</a> describing the <a href=3D#mime-type>MIME=
 type</a>.</p>
+
+  <p>The <dfn id=3Ddom-mimetype-description title=3Ddom-MimeTyp=
e-description><code>description</code></dfn> and &lt=
;dfn id=3Ddom-mimetype-suffixes title=3Ddom-MimeType-suffixes><code=
>suffixes</code></dfn> attributes must return
+  user-agent-defined (or, in all likelihood, <a href=3D#plugin>plu=
gin</a>-defined) strings. In each case, the
+  same string must be returned each time, except that the strings return=
ed may change when the <code title=3Ddom-PluginArray-refresh><a =
href=3D#dom-pluginarray-refresh>PluginArray.refresh()</a></co=
de> method updates the object.</p>
+
+  <p class=3Dwarning>If the values returned by the <code title=3D=
dom-MimeType-description><a href=3D#dom-mimetype-description>des=
cription</a></code> or <code title=3Ddom-MimeType-suffixes=
><a href=3D#dom-mimetype-suffixes>suffxies</a></code&gt=
; attributes vary between versions of a
+  <a href=3D#plugin>plugin</a>, they can be used both as a f=
ingerprinting vector and, even more importantly,
+  as a trivial way to determine what security vulnerabilities a <a hr=
ef=3D#plugin>plugin</a> (and thus a
+  browser) may have. It is thus highly recommended that the <code tit=
le=3Ddom-MimeType-description><a href=3D#dom-mimetype-description&g=
t;description</a></code> attribute just return the same value=
 as the
+  <code title=3Ddom-MimeType-type><a href=3D#dom-mimetype-type&=
gt;type</a></code> attribute, and that the <code title=3Dd=
om-MimeType-suffixes><a href=3D#dom-mimetype-suffixes>suffixes&l=
t;/a></code> attribute return the empty string.
+  <a href=3D#fingerprinting-vector class=3Dfingerprint title=3D"=
fingerprinting vector"><img src=3Dhttp://images.whatwg.org/fin=
gerprint.png width=3D46 alt=3D"(This is a fingerprinting vector.)&qu=
ot; height=3D64></a>
+  </p>
+
+  <p class=3Dnote>Commas in the <code title=3Ddom-MimeType-suff=
ixes><a href=3D#dom-mimetype-suffixes>suffixes</a></cod=
e> attribute are
+  interpreted as separating subsequent filename extensions, as in "=
<code title=3D"">htm,html</code>".</p>
+
+  <p>The <dfn id=3Ddom-mimetype-enabledplugin title=3Ddom-MimeT=
ype-enabledPlugin><code>enabledPlugin</code></dfn> a=
ttribute must
+  return the <code title=3Ddom-Plugin><a href=3D#dom-plugin>=
Plugin</a></code> object that represents the <a href=3D#pl=
ugin>plugin</a>
+  that <a href=3D#explicitly-supported>explicitly supported</a&=
gt; the <a href=3D#mime-type>MIME type</a> that this <code=
><a href=3D#mimetype>MimeType</a></code>
+  object represents when this object was last created or updated by <=
code title=3Ddom-PluginArray-refresh><a href=3D#dom-pluginarray-ref=
resh>PluginArray.refresh()</a></code>, whichever happened =
most
+  recently.</p>
+
+  <hr><p>The <dfn id=3Ddom-navigator-javaenabled title=3D=
dom-navigator-javaEnabled><code>navigator.javaEnabled</code&g=
t;</dfn> attribute
+  must return true if the user agent supports a <a href=3D#plugin>=
plugin</a> that supports the <a href=3D#mime-type>MIME
+  type</a> "<code title=3D"">application/x-ja=
va-vm</code>".
+  <a href=3D#fingerprinting-vector class=3Dfingerprint title=3D"=
fingerprinting vector"><img src=3Dhttp://images.whatwg.org/fin=
gerprint.png width=3D46 alt=3D"(This is a fingerprinting vector.)&qu=
ot; height=3D64></a>
+  </p>
+
+  </div>
+
+
+
+  <h4 id=3Dthe-external-interface><span class=3Dsecno>7.6.2 =
</span>The <code><a href=3D#external>External</a>=
</code> interface</h4>
+
+  <div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-external title=3Ddom-external><cod=
e>external</code></dfn> attribute of the <code><a=
 href=3D#window>Window</a></code>
+  interface must return an instance of the <code><a href=3D#ext=
ernal>External</a></code> interface. The same object must =
be
+  returned each time.</p>
+
+  </div>
+
+  <pre class=3Didl>interface <dfn id=3Dexternal>External<=
/dfn> {
+  void <a href=3D#dom-external-addsearchprovider title=3Ddom-external=
-AddSearchProvider>AddSearchProvider</a>(DOMString engineURL);
+  unsigned long <a href=3D#dom-external-issearchproviderinstalled tit=
le=3Ddom-external-IsSearchProviderInstalled>IsSearchProviderInstalled&=
lt;/a>(DOMString engineURL);
+};</pre>
+
+  <dl class=3Ddomintro><dt><var title=3D"">w=
indow</var> . <code title=3Ddom-external><a href=3D#dom-ex=
ternal>external</a></code> . <code title=3Ddom-external=
-AddSearchProvider><a href=3D#dom-external-addsearchprovider>Add=
SearchProvider</a></code>( <var title=3D"">ur=
l</var> )</dt>
+   <dd>
+
+    <p>Adds the search engine described by the OpenSearch descript=
ion document at <var title=3D"">url</var>. <a hr=
ef=3D#refsOPENSEARCH>[OPENSEARCH]</a></p>
+
+    <p>The OpenSearch description document has to be on the same s=
erver as the script that calls
+    this method.</p>
+
+   </dd>
+
+   <dt><var title=3D"">installed</var> =3D &=
lt;var title=3D"">window</var> . <code title=3Ddom-=
external><a href=3D#dom-external>external</a></code>=
 . <code title=3Ddom-external-IsSearchProviderInstalled><a href=3D=
#dom-external-issearchproviderinstalled>IsSearchProviderInstalled</=
a></code>( <var title=3D"">url</var> )<=
/dt>
+   <dd>
+
+    <p>Returns a value based on comparing <var title=3D"&q=
uot;>url</var> to the URLs of the results pages
+    of the installed search engines.</p>
+
+    <dl><dt>0 <dd>None of the installed search engines=
 match <var title=3D"">url</var>.
+     <dt>1 <dd>One or more installed search engines match &l=
t;var title=3D"">url</var>, but none are the user's de=
fault search engine.
+     <dt>2 <dd>The user's default search engine matches <=
var title=3D"">url</var>.
+    </dl><p>The <var title=3D"">url</var&=
gt; is compared to the URLs of the results pages of the installed
+    search engines using a prefix match. Only results pages on the same =
domain as the script that
+    calls this method are checked.</p>
+
+   </dd>
+
+  </dl><p class=3Dnote>Another way of exposing search engine=
s using OpenSearch description documents is
+  using a <code><a href=3D#the-link-element>link</a>&l=
t;/code> element with the <code title=3Drel-search><a href=3D=
#link-type-search>search</a></code> link type.</p>
+
+  <div class=3Dimpl>
+
+   <p>The <dfn id=3Ddom-external-addsearchprovider title=3Ddom-=
external-AddSearchProvider><code>AddSearchProvider()</code&gt=
;</dfn> method,
+   when invoked, must run the following steps:</p>
+
+   <ol><li><p>Optionally, abort these steps. User agen=
ts may implement the method as a stub method that
+    never does anything, or may arbitrarily ignore invocations with part=
icular arguments for
+    security, privacy, or usability reasons.</li>
+
+<!--CLEANUP-->
+    <li><p><a href=3D#resolve-a-url title=3D"resolve=
 a url">Resolve</a> the value of the method's first argumen=
t
+    relative to the <a href=3D#api-base-url>API base URL</a>=
 specified by the <a href=3D#entry-settings-object>entry settings o=
bject</a>.</li>
+
+    <li><p>If this fails, abort these steps.</li>
+
+    <li><p>Process the resulting <a href=3D#absolute-url&=
gt;absolute URL</a> as the <a href=3D#url>URL</a> to an=
 OpenSearch
+    description document. <a href=3D#refsOPENSEARCH>[OPENSEARCH]&l=
t;/a></li>
+
+   </ol><p>The <dfn id=3Ddom-external-issearchproviderins=
talled title=3Ddom-external-IsSearchProviderInstalled><code>IsSe=
archProviderInstalled()</code></dfn>
+   method, when invoked, must run the following steps:
+   <a href=3D#fingerprinting-vector class=3Dfingerprint title=3D&quot=
;fingerprinting vector"><img src=3Dhttp://images.whatwg.org/fi=
ngerprint.png width=3D46 alt=3D"(This is a fingerprinting vector.)&q=
uot; height=3D64></a>
+   </p>
+
+   <ol><li><p>Optionally, return 0 and abort these ste=
ps. User agents may implement the method as a
+    stub method that never returns a non-zero value, or may arbitrarily =
ignore invocations with
+    particular arguments for security, privacy, or usability reasons.&lt=
;/li>
+
+<!--CLEANUP-->
+    <li><p>If the <a href=3D#origin>origin</a> s=
pecified by the <a href=3D#entry-settings-object>entry settings obj=
ect</a> is an opaque identifier (i.e.
+    it has no host component), then return 0 and abort these steps.</=
li>
+
+<!--CLEANUP-->
+    <li><p>Let <var title=3D"">host1</var=
> be the host component of the <a href=3D#origin>origin</a&gt=
; specified by the
+    <a href=3D#entry-settings-object>entry settings object</a&g=
t;.</li>
+
+<!--CLEANUP-->
+    <li><p><a href=3D#resolve-a-url title=3D"resolve=
 a url">Resolve</a> the <var title=3D"">scr=
iptURL</var> argument
+    relative to the <a href=3D#api-base-url>API base URL</a>=
 specified by the <a href=3D#entry-settings-object>entry settings
+    object</a>.</li>
+
+    <li><p>If this fails, return 0 and abort these steps.&lt=
;/li>
+
+    <li><p>Let <var title=3D"">host2</var=
> be the <a href=3D#concept-url-host title=3Dconcept-url-host>ho=
st</a> component
+    of the resulting <a href=3D#parsed-url>parsed URL</a>.&l=
t;/li>
+
+    <li>
+
+     <p>If the longest suffix in the Public Suffix List that match=
es the end of <var title=3D"">host1</var> is differ=
ent than the longest suffix in the Public Suffix List that
+     matches the end of <var title=3D"">host2</var&gt=
;, then return 0 and abort these steps. <a href=3D#refsPSL>[PSL]&lt=
;/a></p>
+
+     <p>If the next domain component of <var title=3D"&quo=
t;>host1</var> and <var title=3D"">host2</var=
>
+     after their common suffix are not the same, then return 0 and abort=
 these steps.</p>
+
+     <!-- host1 is ascii here because origins are ascii. host2 is asc=
ii because resolve urls
+     punycodes idna. -->
+
+    </li>
+
+    <li><p>Let <var title=3D"">search engine=
s</var> be the list of search engines known by the user
+    agent and made available to the user by the user agent for which the=
 resulting <a href=3D#absolute-url>absolute
+    URL</a> is a <a href=3D#prefix-match>prefix match</a&=
gt; of the search engine's <a href=3D#url>URL</a>, if any. Fo=
r
+    search engines registered using OpenSearch description documents, th=
e <a href=3D#url>URL</a> of the
+    search engine corresponds to the URL given in a <code title=3D&qu=
ot;">Url</code> element whose <code title=3D""=
>rel</code> attribute is "<code title=3D"">=
results</code>" (the default). <a href=3D#refsOPENSEARCH&gt=
;[OPENSEARCH]</a></li>
+
+    <li><p>If <var title=3D"">search engines=
</var> is empty, return 0 and abort these steps.</li>
+
+    <li><p>If the user's default search engine (as determine=
d by the user agent) is one of the
+    search engines in <var title=3D"">search engines<=
/var>, then return 2 and abort these
+    steps.</li>
+
+    <li><p>Return 1.</li>
+
+   </ol></div>
+
+
+<!--TOPIC:Canvas-->
+
+  <h3 id=3Dimages><span class=3Dsecno>7.7 </span>Image=
s</h3>
+
+  <pre class=3Didl>interface <dfn id=3Dimagebitmap>ImageBitm=
ap</dfn> {
+  readonly attribute unsigned long <a href=3D#dom-imagebitmap-width t=
itle=3Ddom-ImageBitmap-width>width</a>;
+  readonly attribute unsigned long <a href=3D#dom-imagebitmap-height =
title=3Ddom-ImageBitmap-height>height</a>;
+  readonly attribute double <a href=3D#dom-imagebitmap-resolution tit=
le=3Ddom-ImageBitmap-resolution>resolution</a>;
+};
+
+typedef (<a href=3D#htmlimageelement>HTMLImageElement</a> or
+         <a href=3D#htmlvideoelement>HTMLVideoElement</a> or
+         <a href=3D#htmlcanvaselement>HTMLCanvasElement</a> =
or
+         <a href=3D#blob>Blob</a> or
+         <a href=3D#imagedata>ImageData</a> or
+         <a href=3D#canvasrenderingcontext2d>CanvasRenderingContex=
t2D</a> or
+         <a href=3D#imagebitmap>ImageBitmap</a>) <dfn id=3D=
imagebitmapsource>ImageBitmapSource</dfn>;
+
+[NoInterfaceObject]
+interface <dfn id=3Dimagebitmapfactories>ImageBitmapFactories</=
dfn> {
+  <a href=3D#promise>Promise</a> <a href=3D#dom-createima=
gebitmap title=3Ddom-createImageBitmap>createImageBitmap</a>(&lt=
;a href=3D#imagebitmapsource>ImageBitmapSource</a> image, option=
al long sx, long sy, long sw, long sh);
+};
+<a href=3D#window>Window</a> implements <a href=3D#imageb=
itmapfactories>ImageBitmapFactories</a>;
+<a href=3D#workerglobalscope>WorkerGlobalScope</a> implement=
s <a href=3D#imagebitmapfactories>ImageBitmapFactories</a>;&l=
t;/pre>
+
+  <p>An <code><a href=3D#imagebitmap>ImageBitmap</a=
></code> object represents a bitmap image that can be painted to=
 a canvas
+  without undue latency.</p>
+
+  <p class=3Dnote>The exact judgement of what is undue latency of =
this is left up to the
+  implementer, but in general if making use of the bitmap requires netwo=
rk I/O, or even local disk
+  I/O, then the latency is probably undue; whereas if it only requires a=
 blocking read from a GPU or
+  system RAM, the latency is probably acceptable.</p>
+
+  <dl class=3Ddomintro><dt><var title=3D"">p=
romise</var> =3D <var title=3D"">Window</var>=
 . <code title=3Ddom-createImageBitmap><a href=3D#dom-createimag=
ebitmap>createImageBitmap</a></code>(<var title=3D&quot=
;">image</var> [, <var title=3D"">sx</va=
r>, <var title=3D"">sy</var>, <var title=3D&q=
uot;">sw</var>, <var title=3D"">sh</var&=
gt; ] )</dt>
+
+   <dd>
+
+    <p>Takes <var title=3D"">image</var>, wh=
ich can be an <code><a href=3D#the-img-element>img</a>&=
lt;/code> element,
+    <code><a href=3D#the-video-element>video</a></c=
ode>, or <code><a href=3D#the-canvas-element>canvas</a&=
gt;</code> element, a <code><a href=3D#blob>Blob</a&=
gt;</code> object, an
+    <code><a href=3D#imagedata>ImageData</a></code&=
gt; object, a <code><a href=3D#canvasrenderingcontext2d>Canva=
sRenderingContext2D</a></code> object, or another
+    <code><a href=3D#imagebitmap>ImageBitmap</a></c=
ode> object, and returns a <code><a href=3D#promise>Promis=
e</a></code> that is resolved when a
+    new <code><a href=3D#imagebitmap>ImageBitmap</a>&l=
t;/code> is created.</p>
+
+    <p>If no <code><a href=3D#imagebitmap>ImageBitmap&=
lt;/a></code> object can be constructed, for example because the=
 provided
+    <var title=3D"">image</var> data is not actual=
ly an image, then the promise is rejected instead.</p>
+
+    <p>If <var title=3D"">sx</var>, <var =
title=3D"">sy</var>, <var title=3D"">s=
w</var>, and <var title=3D"">sh</var> argumen=
ts are provided, the source image is cropped to the given pixels, with
+    any pixels missing in the original replaced by transparent black. Th=
ese coordinates are in the
+    source image's pixel coordinate space, <em>not</em> in C=
SS pixels.</p>
+
+    <p>Throws an <code><a href=3D#invalidstateerror>In=
validStateError</a></code> exception if the source image is n=
ot in a valid
+    state (e.g. an <code><a href=3D#the-img-element>img</=
a></code> element that hasn't finished loading, or a
+    <code><a href=3D#canvasrenderingcontext2d>CanvasRenderin=
gContext2D</a></code> object whose bitmap data has zero lengt=
h along one or both
+    dimensions). Throws a <code><a href=3D#securityerror>Sec=
urityError</a></code> exception if the script is not allowed =
to
+    access the image data of the source image (e.g. a <code><a =
href=3D#the-video-element>video</a></code> that is
+    <a href=3D#cors-cross-origin>CORS-cross-origin</a>, or a=
 <code><a href=3D#the-canvas-element>canvas</a></cod=
e> being drawn on by a script in a worker
+    from another <a href=3D#origin>origin</a>).</p>
+
+   </dd>
+
+   <dt><var title=3D"">imageBitmap</var> . &=
lt;code title=3Ddom-ImageBitmap-width><a href=3D#dom-imagebitmap-wi=
dth>width</a></code></dt>
+
+   <dd>
+
+    <p>Returns the intrinsic width of the image, in CSS pixels.&lt=
;/p>
+
+   </dd>
+
+   <dt><var title=3D"">imageBitmap</var> . &=
lt;code title=3Ddom-ImageBitmap-height><a href=3D#dom-imagebitmap-h=
eight>height</a></code></dt>
+
+   <dd>
+
+    <p>Returns the intrinsic height of the image, in CSS pixels.&l=
t;/p>
+
+   </dd>
+
+   <dt><var title=3D"">imageBitmap</var> . &=
lt;code title=3Ddom-ImageBitmap-resolution><a href=3D#dom-imagebitm=
ap-resolution>resolution</a></code></dt>
+
+   <dd>
+
+    <p>Returns the intrinsic linear pixel density of the image, in=
 image pixels per CSS pixels.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>An <code><a href=3D#imagebitmap>ImageBitmap</a=
></code> object always has associated bitmap data, with a width,=
 a
+  height, and a pixel density. However, it is possible for this data to =
be corrupted. If an <code><a href=3D#imagebitmap>ImageBitmap&=
lt;/a></code>
+  object's media data can be decoded without errors, it is said to be &l=
t;dfn id=3Dconcept-imagebitmap-good title=3Dconcept-ImageBitmap-good>f=
ully decodable</dfn>.</p>
+
+  <p>An <code><a href=3D#imagebitmap>ImageBitmap</a=
></code> object can be obtained from a variety of different obje=
cts, using
+  the <dfn id=3Ddom-createimagebitmap title=3Ddom-createImageBitmap&g=
t;<code>createImageBitmap()</code></dfn> method. When i=
nvoked, the
+  method must act as follows:</p>
+  <!-- the canvas createPattern() and drawImage() methods have simila=
r requirements -->
+
+  <dl><dt>If <var title=3D"">image</var&g=
t; is an <code><a href=3D#the-img-element>img</a></c=
ode> element
+
+   <dd>
+
+    <ol><li><p>If either the <var title=3D"&qu=
ot;>sw</var> or <var title=3D"">sh</var> a=
rguments are specified
+     but zero, throw an <code><a href=3D#indexsizeerror>Inde=
xSizeError</a></code> exception and abort these steps.</li=
>
+
+     <li><p>If the <code><a href=3D#the-img-element=
>img</a></code> element is not <a href=3D#img-all title=
=3Dimg-all>completely
+     available</a>, then throw an <code><a href=3D#invali=
dstateerror>InvalidStateError</a></code> exception and abo=
rt these
+     steps.</li>
+
+<!--ADD-TOPIC:Security-->
+<!--CLEANUP-->
+     <li><p>If the <a href=3D#origin>origin</a> =
of the <code><a href=3D#the-img-element>img</a></cod=
e> element's image is not the <a href=3D#same-origin>same
+     origin</a> as the <a href=3D#origin>origin</a> sp=
ecified by the <a href=3D#entry-settings-object>entry settings obje=
ct</a>, then throw a
+     <code><a href=3D#securityerror>SecurityError</a>&=
lt;/code> exception and abort these steps.</li>
+<!--REMOVE-TOPIC:Security-->
+
+     <li><p>If the <code><a href=3D#the-img-element=
>img</a></code> element's media data is not a bitmap (e.g.=
 it's a vector
+     graphic), then throw an <code><a href=3D#invalidstateerror=
>InvalidStateError</a></code> exception and abort these
+     steps.</li>
+
+     <li><p>Create a new <code><a href=3D#imagebitm=
ap>ImageBitmap</a></code> object.</li>
+
+     <li><p>Let the <code><a href=3D#imagebitmap&gt=
;ImageBitmap</a></code> object's bitmap data be a copy of the=
 <code><a href=3D#the-img-element>img</a></code>
+     element's media data, <a href=3D#cropped-to-the-source-rectangle=
>cropped to the source rectangle</a>. If this is an animated
+     image, the <code><a href=3D#imagebitmap>ImageBitmap<=
/a></code> object's bitmap data must only be taken from the defa=
ult
+     image of the animation (the one that the format defines is to be us=
ed when animation is not
+     supported or is disabled), or, if there is no such image, the first=
 frame of the
+     animation.</li>
+
+     <li><p>Return a new <code><a href=3D#promise&g=
t;Promise</a></code>, but continue running these steps
+     asynchronously.</li>
+
+     <li><p><a href=3D#concept-resolver-fulfill title=3Dc=
oncept-resolver-fulfill>Fulfill</a> the <code><a href=3D=
#promise>Promise</a></code>'s
+     associated <a href=3D#concept-resolver title=3Dconcept-resolver&=
gt;resolver</a>, with the new
+     <code><a href=3D#imagebitmap>ImageBitmap</a></=
code> object as the value.</li>
+
+    </ol></dd>
+
+   <dt>If <var title=3D"">image</var> is a &=
lt;code><a href=3D#the-video-element>video</a></code&gt=
; element
+
+   <dd>
+
+    <ol><li><p>If either the <var title=3D"&qu=
ot;>sw</var> or <var title=3D"">sh</var> a=
rguments are specified
+     but zero, throw an <code><a href=3D#indexsizeerror>Inde=
xSizeError</a></code> exception and abort these steps.</li=
>
+
+     <li><p>If the <code><a href=3D#the-video-eleme=
nt>video</a></code> element's <code title=3Ddom-media-n=
etworkState><a href=3D#dom-media-networkstate>networkState</a=
></code> attribute is <code title=3Ddom-media-NETWORK_EMPTY&g=
t;<a href=3D#dom-media-network_empty>NETWORK_EMPTY</a></co=
de>, then throw an
+     <code><a href=3D#invalidstateerror>InvalidStateError&lt=
;/a></code> exception and abort these steps.</li>
+
+<!--ADD-TOPIC:Security-->
+<!--CLEANUP-->
+     <li><p>If the <a href=3D#origin>origin</a> =
of the <code><a href=3D#the-video-element>video</a><=
/code> element is not the <a href=3D#same-origin>same
+     origin</a> as the <a href=3D#origin>origin</a> sp=
ecified by the <a href=3D#entry-settings-object>entry settings obje=
ct</a>, then throw a
+     <code><a href=3D#securityerror>SecurityError</a>&=
lt;/code> exception and abort these steps.</li>
+<!--REMOVE-TOPIC:Security-->
+
+     <li><p>If the <code><a href=3D#the-video-eleme=
nt>video</a></code> element's <code title=3Ddom-media-r=
eadyState><a href=3D#dom-media-readystate>readyState</a>&l=
t;/code>
+     attribute is either <code title=3Ddom-media-HAVE_NOTHING><=
a href=3D#dom-media-have_nothing>HAVE_NOTHING</a></code> o=
r <code title=3Ddom-media-HAVE_METADATA><a href=3D#dom-media-hav=
e_metadata>HAVE_METADATA</a></code>, then throw an
+     <code><a href=3D#invalidstateerror>InvalidStateError&lt=
;/a></code> exception and abort these steps.</li>
+
+     <li><p>Create a new <code><a href=3D#imagebitm=
ap>ImageBitmap</a></code> object.</li>
+
+     <li><p>Let the <code><a href=3D#imagebitmap&gt=
;ImageBitmap</a></code> object's bitmap data be a copy of the=
 frame at the
+     <a href=3D#current-playback-position>current playback positio=
n</a>, at the <a href=3D#media-resource>media resource</a&=
gt;'s <a href=3D#concept-video-intrinsic-width title=3Dconcept-video-i=
ntrinsic-width>intrinsic width</a> and <a href=3D#concept-vid=
eo-intrinsic-height title=3Dconcept-video-intrinsic-height>intrinsic h=
eight</a> (i.e. after any aspect-ratio
+     correction has been applied), <a href=3D#cropped-to-the-source-r=
ectangle>cropped to the source rectangle</a>.</p>
+
+     <li><p>Return a new <code><a href=3D#promise&g=
t;Promise</a></code>, but continue running these steps asynch=
ronously.</li>
+
+     <li><p><a href=3D#concept-resolver-fulfill title=3Dc=
oncept-resolver-fulfill>Fulfill</a> the <code><a href=3D=
#promise>Promise</a></code>'s
+     associated <a href=3D#concept-resolver title=3Dconcept-resolver&=
gt;resolver</a>, with the new
+     <code><a href=3D#imagebitmap>ImageBitmap</a></=
code> object as the value.</li>
+
+    </ol></dd>
+
+   <dt>If <var title=3D"">image</var> is a &=
lt;code><a href=3D#the-canvas-element>canvas</a></code&=
gt; element
+
+   <dd>
+
+    <ol><li><p>If either the <var title=3D"&qu=
ot;>sw</var> or <var title=3D"">sh</var> a=
rguments are specified
+     but zero, throw an <code><a href=3D#indexsizeerror>Inde=
xSizeError</a></code> exception and abort these steps.</li=
>
+
+<!--ADD-TOPIC:Security-->
+     <li><p>If the <code><a href=3D#the-canvas-elem=
ent>canvas</a></code> element's bitmap data does not have =
its <a href=3D#concept-canvas-origin-clean title=3Dconcept-canvas-orig=
in-clean>origin-clean</a> flag set, then throw an
+     <code><a href=3D#invalidstateerror>InvalidStateError&lt=
;/a></code> exception and abort these steps.</li>
+<!--REMOVE-TOPIC:Security-->
+
+     <li><p>If the <code><a href=3D#the-canvas-elem=
ent>canvas</a></code> element's bitmap has either a horizo=
ntal dimension or a
+     vertical dimension equal to zero, then throw an <code><a h=
ref=3D#invalidstateerror>InvalidStateError</a></code> exce=
ption and
+     abort these steps.</li>
+
+     <li><p>Create a new <code><a href=3D#imagebitm=
ap>ImageBitmap</a></code> object.</li>
+
+     <li><p>Let the <code><a href=3D#imagebitmap&gt=
;ImageBitmap</a></code> object's bitmap data be a copy of the
+     <code><a href=3D#the-canvas-element>canvas</a>&lt=
;/code> element's bitmap data, <a href=3D#cropped-to-the-source-rec=
tangle>cropped to the source
+     rectangle</a>.</li>
+
+     <li><p>Return a new <code><a href=3D#promise&g=
t;Promise</a></code>, but continue running these steps asynch=
ronously.</li>
+
+     <li><p><a href=3D#concept-resolver-fulfill title=3Dc=
oncept-resolver-fulfill>Fulfill</a> the <code><a href=3D=
#promise>Promise</a></code>'s
+     associated <a href=3D#concept-resolver title=3Dconcept-resolver&=
gt;resolver</a>, with the new
+     <code><a href=3D#imagebitmap>ImageBitmap</a></=
code> object as the value.</li>
+
+    </ol></dd>
+
+
+   <dt>If <var title=3D"">image</var> is a &=
lt;code><a href=3D#blob>Blob</a></code> object
+
+   <dd>
+
+    <ol><li><p>If either the <var title=3D"&qu=
ot;>sw</var> or <var title=3D"">sh</var> a=
rguments are specified
+     but zero, throw an <code><a href=3D#indexsizeerror>Inde=
xSizeError</a></code> exception and abort these steps.</li=
>
+
+     <li><p>If the <code><a href=3D#blob>Blob&lt=
;/a></code> object has been neutered through the <code title=3D=
dom-Blob-close>close</code> method, then throw an <code>&l=
t;a href=3D#invalidstateerror>InvalidStateError</a></code>
+     exception and abort these steps.</li>
+
+     <li><p>Return a new <code><a href=3D#promise&g=
t;Promise</a></code>, but continue running these steps asynch=
ronously.</li>
+
+     <li><p>Read the <code><a href=3D#blob>Blob&=
lt;/a></code> object's data. If an <a href=3D#file-error-read=
 title=3Dfile-error-read>error
+     occurs during reading of the object</a>, then <a href=3D#c=
oncept-resolver-reject title=3Dconcept-resolver-reject>reject</a&gt=
; the <code><a href=3D#promise>Promise</a></code>=
's associated <a href=3D#concept-resolver title=3Dconcept-resolver>=
resolver</a>, with null as the value, and abort these
+     steps.</li>
+
+     <li><p>Apply the <a href=3D#content-type-sniffing:-i=
mage title=3D"Content-Type sniffing: image">image sniffing r=
ules</a> to
+     determine the file format of the image data, with MIME type of the =
<code><a href=3D#blob>Blob</a></code> (as given
+     by the <code><a href=3D#blob>Blob</a></code&gt=
; object's <code title=3Ddom-Blob-type>type</code> attribute)=
 giving the
+     official type.</li>
+
+     <li><p>If the image data is not in a supported file for=
mat (e.g. it's not actually an image at
+     all), or if the image data is corrupted in some fatal way such that=
 the image dimensions cannot
+     be obtained, then <a href=3D#concept-resolver-reject title=3Dcon=
cept-resolver-reject>reject</a> the
+     <code><a href=3D#promise>Promise</a></code>=
's associated <a href=3D#concept-resolver title=3Dconcept-resolver>=
resolver</a>, with null as
+     the value, and abort these steps.</li>
+
+     <li><p>Create a new <code><a href=3D#imagebitm=
ap>ImageBitmap</a></code> object.</li>
+
+     <li><p>Let the <code><a href=3D#imagebitmap&gt=
;ImageBitmap</a></code> object's bitmap data be the image dat=
a read from the
+     <code><a href=3D#blob>Blob</a></code> objec=
t, <a href=3D#cropped-to-the-source-rectangle>cropped to the source=
 rectangle</a>. If this is an animated
+     image, the <code><a href=3D#imagebitmap>ImageBitmap<=
/a></code> object's bitmap data must only be taken from the defa=
ult
+     image of the animation (the one that the format defines is to be us=
ed when animation is not
+     supported or is disabled), or, if there is no such image, the first=
 frame of the
+     animation.</li>
+
+     <li><p><a href=3D#concept-resolver-fulfill title=3Dc=
oncept-resolver-fulfill>Fulfill</a> the <code><a href=3D=
#promise>Promise</a></code>'s
+     associated <a href=3D#concept-resolver title=3Dconcept-resolver&=
gt;resolver</a>, with the new
+     <code><a href=3D#imagebitmap>ImageBitmap</a></=
code> object as the value.</li>
+
+    </ol></dd>
+
+
+   <dt>If <var title=3D"">image</var> is an =
<code><a href=3D#imagedata>ImageData</a></code> o=
bject
+
+   <dd>
+
+    <ol><li><p>If either the <var title=3D"&qu=
ot;>sw</var> or <var title=3D"">sh</var> a=
rguments are specified
+     but zero, throw an <code><a href=3D#indexsizeerror>Inde=
xSizeError</a></code> exception and abort these steps.</li=
>
+
+     <li><p>Create a new <code><a href=3D#imagebitm=
ap>ImageBitmap</a></code> object.</li>
+
+     <li><p>Let the <code><a href=3D#imagebitmap&gt=
;ImageBitmap</a></code> object's bitmap data be the image dat=
a given by the
+     <code><a href=3D#imagedata>ImageData</a></code=
> object, <a href=3D#cropped-to-the-source-rectangle>cropped to =
the source rectangle</a>, using the value
+     of the object's <code title=3Ddom-imagedata-resolution><a =
href=3D#dom-imagedata-resolution>resolution</a></code> att=
ribute as the
+     object's pixel density.</li>
+
+     <li><p>Return a new <code><a href=3D#promise&g=
t;Promise</a></code>, but continue running these steps asynch=
ronously.</li>
+
+     <li><p><a href=3D#concept-resolver-fulfill title=3Dc=
oncept-resolver-fulfill>Fulfill</a> the <code><a href=3D=
#promise>Promise</a></code>'s
+     associated <a href=3D#concept-resolver title=3Dconcept-resolver&=
gt;resolver</a>, with the new
+     <code><a href=3D#imagebitmap>ImageBitmap</a></=
code> object as the value.</li>
+
+    </ol></dd>
+
+   <dt>If <var title=3D"">image</var> is a &=
lt;code><a href=3D#canvasrenderingcontext2d>CanvasRenderingConte=
xt2D</a></code> object
+
+   <dd>
+
+    <ol><li><p>If either the <var title=3D"&qu=
ot;>sw</var> or <var title=3D"">sh</var> a=
rguments are specified
+     but zero, throw an <code><a href=3D#indexsizeerror>Inde=
xSizeError</a></code> exception and abort these steps.</li=
>
+
+<!--ADD-TOPIC:Security-->
+     <li><p>If the <code><a href=3D#canvasrendering=
context2d>CanvasRenderingContext2D</a></code> object's &lt=
;a href=3D#scratch-bitmap>scratch bitmap</a> does
+     not have its <a href=3D#concept-canvas-origin-clean title=3Dconc=
ept-canvas-origin-clean>origin-clean</a> flag set, then throw
+     an <code><a href=3D#invalidstateerror>InvalidStateError=
</a></code> exception and abort these steps.</li>
+<!--REMOVE-TOPIC:Security-->
+
+     <li><p>If the <code><a href=3D#canvasrendering=
context2d>CanvasRenderingContext2D</a></code> object's &lt=
;a href=3D#scratch-bitmap>scratch bitmap</a> has
+     either a horizontal dimension or a vertical dimension equal to zero=
, then throw an
+     <code><a href=3D#invalidstateerror>InvalidStateError&lt=
;/a></code> exception and abort these steps.</li>
+
+     <li><p>Create a new <code><a href=3D#imagebitm=
ap>ImageBitmap</a></code> object.</li>
+
+     <li><p>Let the <code><a href=3D#imagebitmap&gt=
;ImageBitmap</a></code> object's bitmap data be a copy of the
+     <code><a href=3D#canvasrenderingcontext2d>CanvasRenderi=
ngContext2D</a></code> object's <a href=3D#scratch-bitmap&=
gt;scratch bitmap</a>, <a href=3D#cropped-to-the-source-rectangl=
e>cropped to
+     the source rectangle</a>.</li>
+
+     <li><p>Return a new <code><a href=3D#promise&g=
t;Promise</a></code>, but continue running these steps
+     asynchronously.</li>
+
+     <li><p><a href=3D#concept-resolver-fulfill title=3Dc=
oncept-resolver-fulfill>Fulfill</a> the <code><a href=3D=
#promise>Promise</a></code>'s
+     associated <a href=3D#concept-resolver title=3Dconcept-resolver&=
gt;resolver</a>, with the new
+     <code><a href=3D#imagebitmap>ImageBitmap</a></=
code> object as the value.</li>
+
+    </ol></dd>
+
+
+   <dt>If <var title=3D"">image</var> is an =
<code><a href=3D#imagebitmap>ImageBitmap</a></code&g=
t; object
+
+   <dd>
+
+    <ol><li><p>If either the <var title=3D"&qu=
ot;>sw</var> or <var title=3D"">sh</var> a=
rguments are specified
+     but zero, throw an <code><a href=3D#indexsizeerror>Inde=
xSizeError</a></code> exception and abort these steps.</li=
>
+
+     <li><p>Create a new <code><a href=3D#imagebitm=
ap>ImageBitmap</a></code> object.</li>
+
+     <li><p>Let the <code><a href=3D#imagebitmap&gt=
;ImageBitmap</a></code> object's bitmap data be a copy of the=
 <var title=3D"">image</var> argument's bitmap data=
, <a href=3D#cropped-to-the-source-rectangle>cropped to the source
+     rectangle</a>.</li>
+
+     <li><p>Return a new <code><a href=3D#promise&g=
t;Promise</a></code>, but continue running these steps
+     asynchronously.</li>
+
+     <li><p><a href=3D#concept-resolver-fulfill title=3Dc=
oncept-resolver-fulfill>Fulfill</a> the <code><a href=3D=
#promise>Promise</a></code>'s
+     associated <a href=3D#concept-resolver title=3Dconcept-resolver&=
gt;resolver</a>, with the new
+     <code><a href=3D#imagebitmap>ImageBitmap</a></=
code> object as the value.</li>
+
+    </ol></dd>
+
+
+  </dl><p>When the steps above require that the user agent &=
lt;dfn id=3Dcropped-to-the-source-rectangle title=3D"cropped to the =
source
+  rectangle">crop bitmap data to the source rectangle</dfn&gt=
;, the user agent must run the following
+  steps:</p>
+
+  <ol><li><p>Let <var title=3D"">input=
</var> be the image data being cropped.</li>
+
+   <li><p>If the <var title=3D"">sx</var&=
gt;, <var title=3D"">sy</var>, <var title=3D&quo=
t;">sw</var>, and <var title=3D"">sh</va=
r> arguments are omitted, return <var title=3D"">input=
</var>.</li>
+
+   <li><p>Place <var title=3D"">input</va=
r> on an infinite transparent black grid plane, positioned so
+   that it's top left corner is at the origin of the plane, with the &lt=
;var title=3D"">x</var>-coordinate increasing to the r=
ight, and the <var title=3D"">y</var>-coordinate
+   increasing down, and with each pixel in the <var title=3D"&qu=
ot;>input</var> image data occupying a cell
+   on the plane's grid.</li>
+
+   <li>
+
+    <p>Let <var title=3D"">output</var> be t=
he rectangle on the plane denoted by the rectangle whose
+    corners are the four points (<var title=3D"">sx</=
var>, <var title=3D"">sy</var>), (<span title=
=3D""><var title=3D"">sx</var>+<var=
 title=3D"">sw</var></span>, <var title=3D&qu=
ot;">sy</var>), (<span title=3D""><var t=
itle=3D"">sx</var>+<var title=3D"">sw&=
lt;/var></span>, <span title=3D""><var title=3D=
"">sy</var>+<var title=3D"">sh</var=
></span>), (<var title=3D"">sx</var>, <=
span title=3D""><var title=3D"">sy</var&g=
t;+<var title=3D"">sh</var></span>).</p&gt=
;
+
+    <p class=3Dnote>If either <var title=3D"">sw&l=
t;/var> or <var title=3D"">sh</var> are negative=
, then
+    the top-left corner of this rectangle will be to the left or above t=
he (<var title=3D"">sx</var>,
+    <var title=3D"">sy</var>) point. If any of the=
 pixels on this rectangle are outside the area where
+    the <var title=3D"">input</var> bitmap was pla=
ced, then they will be transparent black in <var title=3D""&=
gt;output</var>.</p>
+
+   </li>
+
+   <li><p>Let <var title=3D"">output</var=
>'s pixel density be <var title=3D"">input</var>=
's pixel
+   density.</li>
+
+   <li><p>Return <var title=3D"">output</=
var>.</li>
+
+  </ol><p>The <dfn id=3Ddom-imagebitmap-width title=3Ddom=
-ImageBitmap-width><code>width</code></dfn> attribut=
e must return the
+  <code><a href=3D#imagebitmap>ImageBitmap</a></cod=
e> object's width, in CSS pixels.</p>
+
+  <p>The <dfn id=3Ddom-imagebitmap-height title=3Ddom-ImageBitm=
ap-height><code>height</code></dfn> attribute must r=
eturn the
+  <code><a href=3D#imagebitmap>ImageBitmap</a></cod=
e> object's height, in CSS pixels.</p>
+
+  <p>The <dfn id=3Ddom-imagebitmap-resolution title=3Ddom-Image=
Bitmap-resolution><code>resolution</code></dfn> attr=
ibute must return the
+  <code><a href=3D#imagebitmap>ImageBitmap</a></cod=
e> object's linear pixel density, in image data pixels per CSS pixel.&=
lt;/p>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>Using this API, a sprite sheet can be precut and prepared:&l=
t;/p>
+
+   <pre>var sprites =3D {};
+function loadMySprites() {
+  var image =3D new Image();
+  image.src =3D 'mysprites.png';
+  var resolver;
+  var promise =3D new Promise(function (arg) { resolver =3D arg });
+  image.onload =3D function () {
+    resolver.resolve(Promise.every(
+      createImageBitmap(image,  0,  0, 40, 40).then(function (image) { s=
prites.woman =3D image }),
+      createImageBitmap(image, 40,  0, 40, 40).then(function (image) { s=
prites.man   =3D image }),
+      createImageBitmap(image, 80,  0, 40, 40).then(function (image) { s=
prites.tree  =3D image }),
+      createImageBitmap(image,  0, 40, 40, 40).then(function (image) { s=
prites.hut   =3D image }),
+      createImageBitmap(image, 40, 40, 40, 40).then(function (image) { s=
prites.apple =3D image }),
+      createImageBitmap(image, 80, 40, 40, 40).then(function (image) { s=
prites.snake =3D image }),
+    ));
+  };
+  return promise;
+}
+
+function runDemo() {
+  var canvas =3D document.querySelector('canvas#demo');
+  var context =3D canvas.getContext('2d');
+  context.drawImage(sprites.tree, 30, 10);
+  context.drawImage(sprites.snake, 70, 10);
+}
+
+loadMySprites().then(runDemo);</pre>
+
+  </div>
+
+
+<!--TOPIC:HTML-->
+
+  <h2 id=3Dediting><span class=3Dsecno>8 </span><df=
n>User interaction</dfn></h2>
+
+
+  <h3 id=3Dthe-hidden-attribute><span class=3Dsecno>8.1 <=
/span>The <dfn title=3Dattr-hidden><code>hidden</code&g=
t;</dfn> attribute</h3>
+
+  <p>All <a href=3D#html-elements>HTML elements</a> ma=
y have the <code title=3Dattr-hidden><a href=3D#the-hidden-attri=
bute>hidden</a></code> content
+  attribute set. The <code title=3Dattr-hidden><a href=3D#the-h=
idden-attribute>hidden</a></code> attribute is a <a hre=
f=3D#boolean-attribute>boolean
+  attribute</a>. When specified on an element, it indicates that t=
he element is not yet, or is no
+  longer, directly relevant to the page's current state, or that it is b=
eing used to declare content
+  to be reused by other parts of the page as opposed to being directly a=
ccessed by the user. <span class=3Dimpl>User agents should not rend=
er elements that have the <code title=3Dattr-hidden><a href=3D#t=
he-hidden-attribute>hidden</a></code> attribute specified.=
 This requirement may be implemented
+  indirectly through the style layer. For example, an HTML+CSS user agen=
t could implement these
+  requirements <a href=3D#hiddenCSS>using the rules suggested in t=
he Rendering
+  section</a>.</span></p>
+
+  <div class=3Dexample>
+
+   <p>In the following skeletal example, the attribute is used to =
hide the Web game's main screen
+   until the user logs in:</p>
+
+   <pre>  <h1>The Example Game</h1>
+  <section id=3D"login">
+   <h2>Login</h2>
+   <form>
+    ...
+    <!-- calls login() once the user's credentials have been chec=
ked -->
+   </form>
+   <script>
+    function login() {
+      // switch screens
+      document.getElementById('login').hidden =3D true;
+      document.getElementById('game').hidden =3D false;
+    }
+   </script>
+  </section>
+  <section id=3D"game" hidden>
+   ...
+  </section></pre>
+
+  </div>
+
+  <p>The <code title=3Dattr-hidden><a href=3D#the-hidden-=
attribute>hidden</a></code> attribute must not be used to =
hide content that
+  could legitimately be shown in another presentation. For example, it i=
s incorrect to use <code title=3Dattr-hidden><a href=3D#the-hidd=
en-attribute>hidden</a></code> to hide panels in a tabbed =
dialog, because the tabbed interface
+  is merely a kind of overflow presentation — one could equall=
y well just show all the form
+  controls in one big page with a scrollbar. It is similarly incorrect t=
o use this attribute to hide
+  content just from one presentation — if something is marked =
<code title=3Dattr-hidden><a href=3D#the-hidden-attribute>hid=
den</a></code>, it is hidden from all presentations, includin=
g, for instance,
+  screen readers.</p>
+
+  <!-- for example, "<a hidden href=3D#content>Skip to con=
tent</a>" would be inappropriate. -->
+  <!-- (but only add that example if you first add some more good val=
id examples -->
+
+  <p>Elements that are not themselves <code title=3Dattr-hidden=
><a href=3D#the-hidden-attribute>hidden</a></code> m=
ust not
+  <a href=3D#hyperlink>hyperlink</a> to elements that are &l=
t;code title=3Dattr-hidden><a href=3D#the-hidden-attribute>hidde=
n</a></code>. The <code title=3D"">for</co=
de> attributes of <code><a href=3D#the-label-element>label=
</a></code> and <code><a href=3D#the-output-element&=
gt;output</a></code> elements that are not
+  themselves <code title=3Dattr-hidden><a href=3D#the-hidden-at=
tribute>hidden</a></code> must similarly not refer to elem=
ents that are
+  <code title=3Dattr-hidden><a href=3D#the-hidden-attribute>=
hidden</a></code>. In both cases, such references would cause=
 user
+  confusion.</p>
+
+  <p>Elements and scripts may, however, refer to elements that are=
 <code title=3Dattr-hidden><a href=3D#the-hidden-attribute>hi=
dden</a></code> in other contexts.</p>
+
+  <div class=3Dexample>
+
+   <p>For example, it would be incorrect to use the <code title=
=3Dattr-hyperlink-href><a href=3D#attr-hyperlink-href>href</a=
></code>
+   attribute to link to a section marked with the <code title=3Dattr-=
hidden><a href=3D#the-hidden-attribute>hidden</a></code=
> attribute.
+   If the content is not applicable or relevant, then there is no reason=
 to link to it.</p>
+
+   <p>It would be fine, however, to use the ARIA <code title=3D=
attr-aria-describedby>aria-describedby</code> attribute to refer=
 to descriptions that are
+   themselves <code title=3Dattr-hidden><a href=3D#the-hidden-a=
ttribute>hidden</a></code>. While hiding the descriptions =
implies that
+   they are not useful alone, they could be written in such a way that t=
hey are useful in the
+   specific context of being referenced from the images that they descri=
be.</p>
+
+   <p>Similarly, a <code><a href=3D#the-canvas-element&gt=
;canvas</a></code> element with the <code title=3Dattr-hid=
den><a href=3D#the-hidden-attribute>hidden</a></code&gt=
;
+   attribute could be used by a scripted graphics engine as an off-scree=
n buffer, and a form control
+   could refer to a hidden <code><a href=3D#the-form-element&gt=
;form</a></code> element using its <code title=3Dattr-fae-=
form><a href=3D#attr-fae-form>form</a></code> attrib=
ute.</p>
+
+  </div>
+
+  <p>Elements in a section hidden by the <code title=3Dattr-hid=
den><a href=3D#the-hidden-attribute>hidden</a></code&gt=
; attribute are still
+  active, e.g. scripts and form controls in such sections still execute =
and submit respectively.
+  Only their presentation to the user changes.</p>
+
+  <div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-hidden title=3Ddom-hidden><code&gt=
;hidden</code></dfn> IDL attribute must <a href=3D#reflect=
>reflect</a>
+  the content attribute of the same name.</p>
+
+  </div>
+
+
+
+  <h3 id=3Dinert-subtrees><span class=3Dsecno>8.2 </span&=
gt;Inert subtrees</h3>
+
+  <p>A subtree of a <code><a href=3D#document>Document=
</a></code> can be marked as <dfn id=3Dinert>inert</=
dfn>. When a node or one of
+  its ancestors is <a href=3D#inert>inert</a>, then the user=
 agent must act as if the element was absent for
+  the purposes of targeting user interaction events, may ignore the node=
 for the purposes of text
+  search user interfaces (commonly known as "find in page"), a=
nd may prevent the user from selecting
+  text in that node. User agents should allow the user to override the r=
estrictions on search and
+  text selection, however.</p>
+
+  <p class=3Dexample>For example, consider a page that consists of=
 just a single <a href=3D#inert>inert</a>
+  paragraph positioned in the middle of a <code><a href=3D#the-=
body-element>body</a></code>. If a user moves their pointi=
ng device
+  from the <code><a href=3D#the-body-element>body</a>&=
lt;/code> over to the <a href=3D#inert>inert</a> paragraph=
 and clicks on the paragraph,
+  no <code title=3Devent-mouseover>mouseover</code> event wo=
uld be fired, and the <code title=3Devent-mousemove>mousemove</c=
ode> and <code title=3Devent-click><a href=3D#event-click>=
click</a></code> events would
+  be fired on the <code><a href=3D#the-body-element>body<=
/a></code> element rather than the paragraph.</p>
+
+  <p class=3Dnote>When a node or one of its ancestors is inert, it=
 also can't be
+  <a href=3D#focusable>focusable</a>, and it is disabled if =
it is a <a href=3D#concept-command title=3Dconcept-command>command&=
lt;/a>.</p>
+
+  <p>An entire <code><a href=3D#document>Document</=
a></code> can be marked as <dfn id=3Dblocked-by-a-modal-dialo=
g>blocked by a modal dialog</dfn> <var title=3D""&g=
t;subject</var>. While a <code><a href=3D#document>Docu=
ment</a></code> is so marked, every node that is <a href=3D=
#in-a-document title=3D"in a Document">in the <code>Do=
cument</code></a>, with the exception of the <var title=3D=
"">subject</var> element, its ancestors, and its desce=
ndants, must be marked
+  <a href=3D#inert>inert</a>. (The elements excepted by this=
 paragraph can additionally be marked
+  <a href=3D#inert>inert</a> through other means; being part=
 of a modal dialog does not "protect" a node
+  from being marked <a href=3D#inert>inert</a>.)</p>
+
+  <p>Only one element at a time can mark a <code><a href=3D=
#document>Document</a></code> as being <a href=3D#block=
ed-by-a-modal-dialog>blocked by a modal
+  dialog</a>. When a new <code><a href=3D#the-dialog-elem=
ent>dialog</a></code> is made to <a href=3D#blocked-by-=
a-modal-dialog title=3D"blocked by a modal
+  dialog">block</a> a <code><a href=3D#document&g=
t;Document</a></code>, the previous element, if any, stops bl=
ocking the
+  <code><a href=3D#document>Document</a></code>.=
</p>
+
+  <p class=3Dnote>The <code><a href=3D#the-dialog-element=
>dialog</a></code> element's <code title=3Ddom-dialog-s=
howModal><a href=3D#dom-dialog-showmodal>showModal()</a>&l=
t;/code> method makes use of this mechanism.</p>
+
+
+  <h4 id=3Dthe-inert-attribute><span class=3Dsecno>8.2.1 &lt=
;/span>The <dfn title=3Dattr-inert><code>inert</code&gt=
;</dfn> attribute</h4>
+
+  <p>The <code title=3Dattr-inert><a href=3D#the-inert-at=
tribute>inert</a></code> attribute is a <a href=3D#bool=
ean-attribute>boolean attribute</a> that
+  indicates, by its presence, that the element is to be made <a href=3D=
#inert>inert</a>.</p>
+
+  <div class=3Dimpl>
+
+  <p>When an element has an <code title=3Dattr-inert><a h=
ref=3D#the-inert-attribute>inert</a></code> attribute, the=
 user agent must
+  mark that element as <a href=3D#inert>inert</a>.</p>
+
+  </div>
+
+  <p class=3Dnote>By default, there is no visual indication of a s=
ubtree being inert. Authors are
+  encouraged to clearly mark what parts of their document are active and=
 which are inert, to avoid
+  user confusion. In particular, it is worth remembering that not all us=
ers can see all parts of a
+  page at once; for example, users of screen readers, users on small dev=
ices or with magnifiers, and
+  even users just using particularly small windows might not be able to =
see the active part of a
+  page and may get frustrated if inert sections are not obviously inert.=
 For individual controls,
+  the <code title=3Dattr-input-disabled>disabled</code> attr=
ibute is probably more appropriate.</p>
+
+  <p>The <dfn id=3Ddom-inert title=3Ddom-inert><code>i=
nert</code></dfn> IDL attribute must <a href=3D#reflect&gt=
;reflect</a> the
+  content attribute of the same name.</p>
+
+
+<!--TOPIC:DOM APIs-->
+  <h3 id=3Dactivation><span class=3Dsecno>8.3 </span>A=
ctivation</h3>
+
+  <!-- v2 idea: HTMLImageElement.click(x, y); or clickPoint(), if cli=
ck() can't be done in IE; can
+       this be emulated in IE by posting a synthetic mouse click event w=
ith those X and Y coords?
+       (ack Csaba Gabor)
+  -->
+
+  <dl class=3Ddomintro><dt><var title=3D"">e=
lement</var> . <code title=3Ddom-click><a href=3D#dom-clic=
k>click</a></code>()</dt>
+
+   <dd>
+
+    <p>Acts as if the element was clicked.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-click title=3Ddom-click><code>c=
lick()</code></dfn> method must <a href=3D#run-synthetic-c=
lick-activation-steps>run synthetic click
+  activation steps</a> on the element.</p>
+
+  </div>
+<!--TOPIC:HTML-->
+
+
+  <h3 id=3Dfocus><span class=3Dsecno>8.4 </span>Focus&=
lt;/h3>
+
+  <!-- http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOC=
TYPE%20html%3E%20%0A...%3Cform%3E%3Cinput%20name%3Da%20onfocus%3D%22value=
%2B%3D1%3Bd.name%3D%27a%27%3Bname%3D%27d%27%3Bb.focus()%22%3E%0A%3Cinput%=
20name%3Db%20onfocus%3D%22value%2B%3D1%3Bc.focus()%22%3E%0A%3Cinput%20nam=
e%3Dc%20onfocus%3D%22value%2B%3D1%3Bd.focus()%22%3E%0A%3Cinput%20name%3Dd=
%20onfocus%3D%22value%2B%3D1%3Ba.focus()%22%3E -->
+
+  <!-- http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOC=
TYPE%20html%3E%0A...%3Cform%3E%0A%3Ctextarea%20name%3Dt%20cols%3D100%20ro=
ws%3D3%3E%3C%2Ftextarea%3E%3Cp%3E%0A%3Cinput%20name%3Da%20onfocus%3D%22t.=
value%2B%3D%27af1%20%27%3Bb.focus()%3Balert(document.activeElement.name)%=
3Bt.value%2B%3D%27af2%20%27%3B%22%20onblur%3D%22t.value%2B%3D%27ab%20%27%=
3B%22%3E%0A%3Cinput%20name%3Db%20onfocus%3D%22t.value%2B%3D%27bf1%20%27%3=
Bc.focus()%3Bt.value%2B%3D%27bf2%20%27%3B%22%20onblur%3D%22t.value%2B%3D%=
27bb%20%27%3B%22%3E%0A%3Cinput%20name%3Dc%20onfocus%3D%22t.value%2B%3D%27=
cf1%20%27%3Bc.focus()%3Bt.value%2B%3D%27cf2%20%27%3B%22%20onblur%3D%22t.v=
alue%2B%3D%27cb%20%27%3B%22%3E%0A -->
+
+  <!-- http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOC=
TYPE%20html%3E%3Cbody%20onload%3D%22document.forms%5B0%5D.a.focus()%22%3E=
%0A...%3Cform%3E%0A%3Ctextarea%20name%3Dt%20cols%3D100%20rows%3D3%3E%3C%2=
Ftextarea%3E%3Cp%3E%0A%3Cinput%20name%3Da%20onblur%3D%22t.value%2B%3D'ab%=
20'%3B%20b.focus()%3B%22%3E%0A%3Cinput%20name%3Db%20onfocus%3D%22t.value%=
2B%3D'bf1%20'%3Ba.focus()%3Bt.value%2B%3D'bf2%20'%3B%22%20onblur%3D%22t.v=
alue%2B%3D'bb%20'%3B%22%3E -->
+
+  <!-- http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOC=
TYPE%20html%3E%3Cbody%3E...%3Cform%3E%0A%3Ctextarea%20name%3Dt%20cols%3D1=
00%20rows%3D3%3E%3C%2Ftextarea%3E%3Cp%3E%0A%3Cinput%20name%3Da%20onfocus%=
3D%22t.value%2B%3D%27af%20%27%3B%22%20onblur%3D%22t.value%2B%3D%27ab1%20%=
27%3Bb.focus()%3Bt.value%2B%3D%27ab2%20%27%3B%22%3E%0A%3Cinput%20name%3Db=
%20onfocus%3D%22t.value%2B%3D%27bf1%20%27%3Ba.focus()%3Bt.value%2B%3D%27b=
f2%20%27%3B%22%20onblur%3D%22t.value%2B%3D%27bb%20%27%3B%22%3E -->
+
+  <!-- v2: more things to define, if no other specs define them:
+   - define onfocus/onblur behaviour for Window
+   - Other things to look at are IE's focus APIs (HTMLElement.setActive(=
),
+     onBeforeActivate, onActivate, onBeforeDeactivate, onDeactivate):
+       https://bugzilla.mozilla.org/show_bug.cgi?id=3D296471
+       https://bugzilla.mozilla.org/show_bug.cgi?id=3D296469
+       http://msdn.microsoft.com/workshop/author/dhtml/reference/methods=
/setactive.asp
+       http://msdn.microsoft.com/workshop/author/dhtml/reference/events/=
onbeforeactivate.asp
+  -->
+
+  <div class=3Dimpl>
+
+  <p>When an element is <i>focused</i>, key events rec=
eived by the document must be targeted at that
+  element. There may be no element focused; when no element is focused, =
key events received by the
+  document must be targeted at <a href=3D#the-body-element-0>the b=
ody element</a>, if there is one, or else at the
+  <code><a href=3D#document>Document</a></code>'=
s root element, if there is one. If there is no root element, key events
+  must not be fired.</p>
+
+  <p>User agents may track focus for each <a href=3D#browsing-c=
ontext>browsing context</a> or <code><a href=3D#documen=
t>Document</a></code>
+  individually, or may support only one focused element per <a href=3D=
#top-level-browsing-context>top-level browsing context</a>
+  — user agents should follow platform conventions in this reg=
ard.</p>
+
+  <p>Which elements within a <a href=3D#top-level-browsing-cont=
ext>top-level browsing context</a> currently have focus must be
+  independent of whether or not the <a href=3D#top-level-browsing-con=
text>top-level browsing context</a> itself has the <i>syst=
em
+  focus</i>.</p>
+
+  <p id=3Dbc-focus-ergo-bcc-focus>When a <a href=3D#child-brows=
ing-context>child browsing context</a> is focused, its
+  <a href=3D#browsing-context-container>browsing context container=
</a> must also have focus.</p>
+
+  <p class=3Dnote>When an element is focused, the element matches =
the CSS <code>:focus</code>
+  pseudo-class.</p>
+
+  </div>
+
+
+  <h4 id=3Dsequential-focus-navigation-and-the-tabindex-attribute>=
<span class=3Dsecno>8.4.1 </span>Sequential focus navigation =
and the <code title=3Dattr-tabindex><a href=3D#attr-tabindex>=
tabindex</a></code> attribute</h4>
+
+  <p>The <dfn id=3Dattr-tabindex title=3Dattr-tabindex><c=
ode>tabindex</code></dfn> content attribute allows authors=
 to
+  control whether an element is supposed to be focusable, whether it is =
supposed to be reachable
+  using sequential focus navigation, and what is to be the relative orde=
r of the element for the
+  purposes of sequential focus navigation. The name "tab index&quot=
; comes from the common use of the
+  "tab" key to navigate through the focusable elements. The te=
rm "tabbing" refers to moving forward
+  through the focusable elements that can be reached using sequential fo=
cus navigation.</p>
+
+  <p>The <code title=3Dattr-tabindex><a href=3D#attr-tabi=
ndex>tabindex</a></code> attribute, if specified, must hav=
e a value that
+  is a <a href=3D#valid-integer>valid integer</a>.</p>
+
+  <div class=3Dimpl>
+
+  <p>Each element can have a <dfn id=3Dspecially-focusable>t=
abindex focus flag</dfn> set, as defined
+  below. This flag is a factor that contributes towards determining whet=
her an element is
+  <a href=3D#focusable>focusable</a>, as described in the ne=
xt section.</p>
+
+  <p>If the attribute is specified, it must be parsed using the &l=
t;a href=3D#rules-for-parsing-integers>rules for parsing
+  integers</a>. The attribute's values have the following meanings=
:</p>
+
+  <dl><dt>If the attribute is omitted or parsing the value r=
eturns an error</dt>
+
+   <dd>
+
+    <p>The user agent should follow platform conventions to determ=
ine if the element's
+    <a href=3D#specially-focusable>tabindex focus flag</a> i=
s set and, if so, whether the element can be reached using
+    sequential focus navigation, and if so, what its relative order shou=
ld be.</p>
+
+    <p>Modulo platform conventions, it is suggested that for the f=
ollowing elements, the
+    <a href=3D#specially-focusable>tabindex focus flag</a> b=
e set:</p>
+
+    <ul><li><code><a href=3D#the-a-element>a<=
/a></code> elements that have an <code title=3Dattr-hyperlink=
-href><a href=3D#attr-hyperlink-href>href</a></code>
+     attribute</li>
+
+     <li><code><a href=3D#the-link-element>link</a&=
gt;</code> elements that have an <code title=3Dattr-link-href&gt=
;<a href=3D#attr-link-href>href</a></code> attribute&lt=
;/li>
+
+     <li><code><a href=3D#the-button-element>button&lt=
;/a></code> elements</li>
+
+     <li><code><a href=3D#the-input-element>input</=
a></code> elements whose <code title=3Dattr-input-type>&lt=
;a href=3D#attr-input-type>type</a></code> attribute are
+     not in the <a href=3D"#hidden-state-(type=3Dhidden)" t=
itle=3Dattr-input-type-hidden>Hidden</a> state</li>
+
+     <li><code><a href=3D#the-select-element>select&lt=
;/a></code> elements</li>
+
+     <li><code><a href=3D#the-textarea-element>textare=
a</a></code> elements</li>
+
+     <li><code><a href=3D#the-menuitem-element>menuite=
m</a></code> elements</li>
+
+     <li>Elements with a <code title=3Dattr-draggable><a =
href=3D#the-draggable-attribute>draggable</a></code> attri=
bute set, if that would
+     enable the user agent to allow the user to begin a drag operations =
for those elements without
+     the use of a pointing device</li>
+
+     <li><a href=3D#editing-host title=3D"editing host&quo=
t;>Editing hosts</a></li>
+
+     <li><a href=3D#browsing-context-container title=3D"br=
owsing context container">Browsing context containers</a>&l=
t;/li> <!-- like
+     <iframe>s -->
+
+     <li><a href=3D#sorting-interface-th-element title=3D"=
sorting interface th element">Sorting interface <code>th&lt=
;/code>
+     elements</a></li>
+
+    </ul><p class=3Dnote>One valid reason to ignore the plat=
form conventions and always allow an element
+    to be focused (by setting its <a href=3D#specially-focusable>t=
abindex focus flag</a>) would be if the user's only
+    mechanism for activating an element is through a keyboard action tha=
t triggers the focused
+    element.</p>
+
+   </dd>
+
+   <dt id=3Dnegative-tabindex>If the value is a negative integer&l=
t;/dt>
+
+   <dd>
+
+    <p>The user agent must set the element's <a href=3D#special=
ly-focusable>tabindex focus flag</a>, but should not allow
+    the element to be reached using sequential focus navigation.</p&g=
t;
+
+    <p class=3Dnote>One valid reason to ignore the requirement tha=
t sequential focus navigation not
+    allow the author to lead to the element would be if the user's only =
mechanism for moving the
+    focus is sequential focus navigation. For instance, a keyboard-only =
user would be unable to
+    click on a text field with a negative <code title=3Dattr-tabindex=
><a href=3D#attr-tabindex>tabindex</a></code>, so th=
at
+    user's user agent would be well justified in allowing the user to ta=
b to the control
+    regardless.</p>
+
+   </dd>
+
+   <dt>If the value is a zero</dt>
+
+   <dd>
+
+    <p>The user agent must set the element's <a href=3D#special=
ly-focusable>tabindex focus flag</a>, should allow the
+    element to be reached using sequential focus navigation, and should =
follow platform conventions
+    to determine the element's relative order.</p>
+
+   </dd>
+
+   <dt>If the value is greater than zero</dt>
+
+   <dd>
+
+    <p>The user agent must set the element's <a href=3D#special=
ly-focusable>tabindex focus flag</a>, should allow the
+    element to be reached using sequential focus navigation, and should =
place the element in the
+    sequential focus navigation order so that it is:</p>
+
+    <ul><li>before any <a href=3D#focusable>focusable&=
lt;/a> element whose <code title=3Dattr-tabindex><a href=3D#a=
ttr-tabindex>tabindex</a></code>
+     attribute has been omitted or whose value, when parsed, returns an =
error,</li>
+
+     <li>before any <a href=3D#focusable>focusable</a>=
 element whose <code title=3Dattr-tabindex><a href=3D#attr-tabin=
dex>tabindex</a></code>
+     attribute has a value equal to or less than zero,</li>
+
+     <li>after any element whose <code title=3Dattr-tabindex&gt=
;<a href=3D#attr-tabindex>tabindex</a></code> attribute=
 has a value
+     greater than zero but less than the value of the <code title=3Da=
ttr-tabindex><a href=3D#attr-tabindex>tabindex</a></cod=
e>
+     attribute on the element,</li>
+
+     <li>after any element whose <code title=3Dattr-tabindex&gt=
;<a href=3D#attr-tabindex>tabindex</a></code> attribute=
 has a value
+     equal to the value of the <code title=3Dattr-tabindex><a h=
ref=3D#attr-tabindex>tabindex</a></code> attribute on the =
element
+     but that is earlier in the document in <a href=3D#tree-order>=
tree order</a> than the element,</li>
+
+     <li>before any element whose <code title=3Dattr-tabindex&g=
t;<a href=3D#attr-tabindex>tabindex</a></code> attribut=
e has a value
+     equal to the value of the <code title=3Dattr-tabindex><a h=
ref=3D#attr-tabindex>tabindex</a></code> attribute on the =
element
+     but that is later in the document in <a href=3D#tree-order>tr=
ee order</a> than the element, and</li>
+
+     <li>before any element whose <code title=3Dattr-tabindex&g=
t;<a href=3D#attr-tabindex>tabindex</a></code> attribut=
e has a value
+     greater than the value of the <code title=3Dattr-tabindex>&lt=
;a href=3D#attr-tabindex>tabindex</a></code> attribute on =
the
+     element.</li>
+
+    </ul></dd>
+
+  </dl><p>An element that has its <a href=3D#specially-fo=
cusable>tabindex focus flag</a> set but does not otherwise have =
an
+  <a href=3D#activation-behavior>activation behavior</a> def=
ined has an <a href=3D#activation-behavior>activation behavior</=
a> that does
+  nothing.</p>
+
+  <p class=3Dnote>This means that an element that is only focusabl=
e because of its <code title=3Dattr-tabindex><a href=3D#attr-tab=
index>tabindex</a></code> attribute will fire a <code t=
itle=3Devent-click><a href=3D#event-click>click</a></co=
de>
+  event in response to a non-mouse activation (e.g. hitting the "en=
ter" key while the element is
+  focused).</p>
+
+  <p>The <dfn id=3Ddom-tabindex title=3Ddom-tabIndex><cod=
e>tabIndex</code></dfn> IDL attribute must
+  <a href=3D#reflect>reflect</a> the value of the <code t=
itle=3Dattr-tabindex><a href=3D#attr-tabindex>tabindex</a>=
</code> content
+  attribute. Its default value is 0 for elements that are focusable and =
−1 for elements that
+  are not focusable.</p>
+
+  </div>
+
+
+
+  <div class=3Dimpl>
+
+  <h4 id=3Dfocus-management><span class=3Dsecno>8.4.2 </s=
pan>Focus management</h4>
+
+  <p>An element is <dfn id=3Dfocusable>focusable</dfn>=
 if all of the following conditions are met:</p>
+
+  <ul><li>The element's <a href=3D#specially-focusable&gt=
;tabindex focus flag</a> is set.</li>
+
+   <li>The element is either <a href=3D#being-rendered>being=
 rendered</a> or <!-- CANVAS-FOCUS-FALLBACK --> is a
+   descendant of a <code><a href=3D#the-canvas-element>canva=
s</a></code> element that <a href=3D#represents>represe=
nts</a> <a href=3D#embedded-content>embedded
+   content</a>.</li>
+
+   <li>Neither the element nor any of its ancestors are <a href=
=3D#inert>inert</a>.</li>
+
+   <li>The element is not <a href=3D#concept-element-disabled t=
itle=3Dconcept-element-disabled>disabled</a>.</li>
+
+  </ul><p>In addition, each shape that is generated for an &=
lt;code><a href=3D#the-area-element>area</a></code> =
element, any
+  user-agent-provided interface components of <a href=3D#media-elemen=
t title=3D"media element">media elements</a>
+  (e.g. a play button), and distinct user interface components of form c=
ontrols (e.g. "up" and
+  "down" buttons on an <code title=3Dattr-input-type-number=
><a href=3D"#number-state-(type=3Dnumber)"><inp=
ut type=3Dnumber></a></code> spin
+  control), should be <a href=3D#focusable>focusable</a>, un=
less platform conventions dictate otherwise or
+  unless their corresponding element is <a href=3D#concept-element-di=
sabled title=3Dconcept-element-disabled>disabled</a>. (A
+  single <code><a href=3D#the-area-element>area</a>&lt=
;/code> element can correspond to multiple shapes, since image maps ca=
n be reused
+  with multiple images on a page.)</p>
+
+  <p>The user agent may also make part of a <code><a href=
=3D#the-details-element>details</a></code> element's rende=
ring
+  <a href=3D#focusable>focusable</a>, to enable the element =
to be opened or closed using keyboard input.
+  However, this is distinct from the <code><a href=3D#the-detai=
ls-element>details</a></code> or <code><a href=3D=
#the-summary-element>summary</a></code> element being
+  focusable.</p>
+
+  <p>Notwithstanding the above, user agents may make <em>any=
</em> element or part of an element
+  focusable, especially to aid with accessibility or to better match pla=
tform conventions.</p>
+
+  <hr><p>The <dfn id=3Dfocusing-steps>focusing steps&l=
t;/dfn> for an element are as follows:</p>
+
+  <ol><li><p>If the element is not <a href=3D#in-a-=
document title=3D"in a Document">in a <code>Document&l=
t;/code></a>, or if
+   the element's <code><a href=3D#document>Document</a&gt=
;</code> has no <a href=3D#browsing-context>browsing context&=
lt;/a>, or if the element's
+   <code><a href=3D#document>Document</a></code>=
's <a href=3D#browsing-context>browsing context</a> has no &l=
t;a href=3D#top-level-browsing-context>top-level browsing
+   context</a>, or if the element is not <a href=3D#focusable&g=
t;focusable</a>, or if the element is already
+   focused, then abort these steps.</p>
+
+   <li><p>If focusing the element will remove the focus from=
 another element, then run the
+   <a href=3D#unfocusing-steps>unfocusing steps</a> for that=
 element.</li>
+
+   <li>
+
+    <p>Make the element the currently focused element in its <a=
 href=3D#top-level-browsing-context>top-level browsing
+    context</a>.</p>
+
+    <p>Some elements, most notably <code><a href=3D#the-a=
rea-element>area</a></code>, can correspond to more than o=
ne distinct
+    focusable area. If a particular area was indicated when the element =
was focused, then that is
+    the area that must get focus; otherwise, e.g. when using the <cod=
e title=3Ddom-focus><a href=3D#dom-focus>focus()</a></c=
ode> method, the first such region in tree order is the one that
+    must be focused.</p>
+
+   </li>
+
+   <li>
+
+    <p>The user agent may apply relevant platform-specific convent=
ions for focusing widgets.</p>
+
+    <p class=3Dnote>For example, some platforms select the content=
s of a text field when that field
+    is focused.</p>
+
+   </li>
+
+   <li><p><a href=3D#fire-a-simple-event>Fire a simple=
 event</a> named <code title=3Devent-focus>focus</code>=
 at the element.</li>
+   <!-- http://software.hixie.ch/utilities/js/live-dom-viewer/saved/7=
23 -->
+
+  </ol><p>User agents must synchronously run the <a href=3D=
#focusing-steps>focusing steps</a> for an element whenever the
+  user moves the focus to a <a href=3D#focusable>focusable</a&g=
t; element.</p>
+
+  <p>The <dfn id=3Dunfocusing-steps>unfocusing steps</dfn=
> for an element are as follows:</p>
+
+  <ol><li><p>If the element is an <code><a hr=
ef=3D#the-input-element>input</a></code> element, and the =
<code title=3Devent-input-change><a href=3D#event-input-change&g=
t;change</a></code> event applies to the element, and the ele=
ment does not
+   have a defined <a href=3D#activation-behavior>activation behavi=
or</a>, and the user has changed the element's <a href=3D#concep=
t-fe-value title=3Dconcept-fe-value>value</a> or its list of &lt=
;a href=3D#concept-input-type-file-selected title=3Dconcept-input-type-fi=
le-selected>selected files</a> while the control was focused
+   without committing that change, then <a href=3D#fire-a-simple-even=
t>fire a simple event</a> that bubbles named <code title=3Dev=
ent-change>change</code> at the element.</p>
+
+   <li><p>Unfocus the element.</li>
+
+   <li><p><a href=3D#fire-a-simple-event>Fire a simple=
 event</a> named <code title=3Devent-blur>blur</code> a=
t the element.</li>
+   <!-- http://software.hixie.ch/utilities/js/live-dom-viewer/saved/7=
23 -->
+
+  </ol><p>When an element that is focused stops being a <=
a href=3D#focusable>focusable</a> element, or stops being
+  focused without another element being explicitly focused in its stead,=
 the user agent should
+  synchronously run the <a href=3D#unfocusing-steps>unfocusing ste=
ps</a> for the affected element only.</p>
+
+  <p class=3Dexample>For example, this might happen because the el=
ement is removed from its
+  <code><a href=3D#document>Document</a></code>,=
 or has a <code title=3Dattr-hidden><a href=3D#the-hidden-attrib=
ute>hidden</a></code> attribute added. It would
+  also happen to an <code><a href=3D#the-input-element>input=
</a></code> element when the element gets <a href=3D#conce=
pt-fe-disabled title=3Dconcept-fe-disabled>disabled</a>.</p&g=
t;
+
+  </div>
+
+
+<!--TOPIC:DOM APIs-->
+  <h4 id=3Ddocument-level-focus-apis><span class=3Dsecno>8.4=
.3 </span>Document-level focus APIs</h4>
+
+  <dl class=3Ddomintro><dt><var title=3D"">d=
ocument</var> . <code title=3Ddom-document-activeElement><=
a href=3D#dom-document-activeelement>activeElement</a></code&=
gt;</dt>
+
+   <dd>
+
+    <p>Returns the currently focused element.</p>
+
+   </dd>
+
+   <dt><var title=3D"">document</var> . <=
code title=3Ddom-document-hasFocus><a href=3D#dom-document-hasfocus=
>hasFocus</a></code>()</dt>
+
+   <dd>
+
+    <p>Returns true if the document has focus; otherwise, returns =
false.</p>
+
+   </dd>
+
+   <dt><var title=3D"">window</var> . <co=
de title=3Ddom-window-focus><a href=3D#dom-window-focus>focus&lt=
;/a></code>()</dt>
+
+   <dd>
+
+    <p>Focuses the window. Use of this method is discouraged. Allo=
w the user to control window focus
+    instead.</p>
+
+   </dd>
+
+   <dt><var title=3D"">window</var> . <co=
de title=3Ddom-window-blur><a href=3D#dom-window-blur>blur</a=
></code>()</dt>
+
+   <dd>
+
+    <p>Unfocuses the window. Use of this method is discouraged. Al=
low the user to control window
+    focus instead.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-document-activeelement title=3Ddom-docum=
ent-activeElement><code>activeElement</code></dfn> a=
ttribute on
+  <code><a href=3D#document>Document</a></code> =
objects must return the element in the document that is focused. If no
+  element in the <code><a href=3D#document>Document</a&gt=
;</code> is focused, this must return <a href=3D#the-body-elemen=
t-0>the body
+  element</a>.</p>
+
+  <p class=3Dnote>When a <a href=3D#child-browsing-context>c=
hild browsing context</a> is focused, its <a href=3D#browsing-co=
ntext-container>browsing context
+  container</a> is also focused, <a href=3D#bc-focus-ergo-bcc-f=
ocus>by definition</a>. For
+  example, if the user moves the focus to a text field in an <code&gt=
;<a href=3D#the-iframe-element>iframe</a></code>, the
+  <code><a href=3D#the-iframe-element>iframe</a></c=
ode> is the element with focus in the <a href=3D#parent-browsing-co=
ntext>parent browsing context</a>.</p>
+
+  <p>The <dfn id=3Ddom-document-hasfocus title=3Ddom-document-h=
asFocus><code>hasFocus()</code></dfn> method on
+  <code><a href=3D#document>Document</a></code> =
objects must return true if the <code><a href=3D#document>Doc=
ument</a></code>'s <a href=3D#browsing-context>browsing
+  context</a> is focused, and all its <a href=3D#ancestor-brows=
ing-context title=3D"ancestor browsing context">ancestor bro=
wsing
+  contexts</a> are also focused, and the <a href=3D#top-level-b=
rowsing-context>top-level browsing context</a> has the
+  <i>system focus</i>. If the <code><a href=3D#docu=
ment>Document</a></code> has no <a href=3D#browsing-con=
text>browsing context</a> or if its
+  <a href=3D#browsing-context>browsing context</a> has no &l=
t;a href=3D#top-level-browsing-context>top-level browsing context</=
a>, then the method will
+  always return false.</p>
+
+  <p>The <dfn id=3Ddom-window-focus title=3Ddom-window-focus&gt=
;<code>focus()</code></dfn> method on the <code>&=
lt;a href=3D#window>Window</a></code>
+  object, when invoked, provides a hint to the user agent that the scrip=
t believes the user might be
+  interested in the contents of the <a href=3D#browsing-context>br=
owsing context</a> of the <code><a href=3D#window>Windo=
w</a></code> object
+  on which the method was invoked.</p>
+
+  <p>User agents are encouraged to have this <code title=3Ddom-=
window-focus><a href=3D#dom-window-focus>focus()</a></c=
ode> method
+  trigger some kind of notification.</p>
+
+  <p>The <dfn id=3Ddom-window-blur title=3Ddom-window-blur>&=
lt;code>blur()</code></dfn> method on the <code><=
a href=3D#window>Window</a></code>
+  object, when invoked, provides a hint to the user agent that the scrip=
t believes the user probably
+  is not currently interested in the contents of the <a href=3D#brows=
ing-context>browsing context</a> of the
+  <code><a href=3D#window>Window</a></code> obje=
ct on which the method was invoked, but that the contents might become
+  interesting again in the future.</p>
+
+  <p>User agents are encouraged to ignore calls to this <code t=
itle=3Ddom-window-blur><a href=3D#dom-window-blur>blur()</a&g=
t;</code>
+  method entirely.</p>
+
+  <p class=3Dnote>Historically the <code title=3Ddom-window-blu=
r><a href=3D#dom-window-blur>focus()</a></code> and =
<code title=3Ddom-window-blur><a href=3D#dom-window-blur>blur=
()</a></code> methods actually affected the system focus, but=
 hostile
+  sites widely abuse this behavior to the user's detriment.</p>
+
+  </div>
+
+
+  <h4 id=3Delement-level-focus-apis><span class=3Dsecno>8.4.=
4 </span>Element-level focus APIs</h4>
+
+  <dl class=3Ddomintro><dt><var title=3D"">e=
lement</var> . <code title=3Ddom-focus><a href=3D#dom-focu=
s>focus</a></code>()</dt>
+
+   <dd>
+
+    <p>Focuses the element.</p>
+
+   </dd>
+
+   <dt><var title=3D"">element</var> . <c=
ode title=3Ddom-blur><a href=3D#dom-blur>blur</a></code=
>()</dt>
+
+   <dd>
+
+    <p>Unfocuses the element. Use of this method is discouraged. F=
ocus another element instead.</p>
+
+    <p>Do not use this method to hide the focus ring if you find t=
he focus ring unsightly. Instead,
+    use a CSS rule to override the 'outline' property. Be aware, however=
, that if an alternative
+    focusing style isn't made available instead, the page will be signif=
icantly less usable for
+    people who primarily navigate pages using a keyboard, or those with =
reduced vision who use focus
+    outlines to help them navigate the page.</p>
+
+    <!-- we suggest using CSS here because users can override CSS, so=
 it's no the end of the world,
+    unlike using .blur(), which cannot be easily overridden by users and=
 completely breaks tab
+    navigation. -->
+
+    <div class=3Dexample>
+
+     <p>For example, to hide the outline from links and instead us=
e a yellow background, you could
+     use:</p>
+
+     <pre>:link:focus, :visited:focus { outline: none; background:=
 yellow; color: black; }</pre>
+
+    </div>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-focus title=3Ddom-focus><code>f=
ocus()</code></dfn> method, when invoked, must run the
+  following algorithm:</p>
+
+  <ol><li><p>If the element is marked as <i><=
a href=3D#locked-for-focus>locked for focus</a></i>, then =
abort these steps.</li>
+
+   <li><p>Mark the element as <dfn id=3Dlocked-for-focus&=
gt;locked for focus</dfn>.</li>
+
+   <li><p>Run the <a href=3D#focusing-steps>focusing s=
teps</a> for the element.</li>
+
+   <li><p>Unmark the element as <i><a href=3D#locke=
d-for-focus>locked for focus</a></i>.</li>
+
+  </ol><p>The <dfn id=3Ddom-blur title=3Ddom-blur><=
code>blur()</code></dfn> method, when invoked, should run =
the
+  <a href=3D#unfocusing-steps>unfocusing steps</a> for the e=
lement on which the method was called instead. User agents
+  may selectively or uniformly ignore calls to this method for usability=
 reasons.</p>
+
+  <p class=3Dexample>For example, if the <code title=3Ddom-blur=
><a href=3D#dom-blur>blur()</a></code> method is unw=
isely
+  being used to remove the focus ring for aesthetics reasons, the page w=
ould become unusable by
+  keyboard users. Ignoring calls to this method would thus allow keyboar=
d users to interact with the
+  page.</p>
+
+  </div>
+<!--TOPIC:HTML-->
+
+
+
+  <h3 id=3Dassigning-keyboard-shortcuts><span class=3Dsecno>=
8.5 </span>Assigning keyboard shortcuts</h3>
+
+  <h4 id=3Dintroduction-7><span class=3Dsecno>8.5.1 </spa=
n>Introduction</h4>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <p>Each element that can be activated or focused can be assigned=
 a single key combination to
+  activate it, using the <code title=3Dattr-accesskey><a href=3D=
#the-accesskey-attribute>accesskey</a></code> attribute.&l=
t;/p>
+
+  <p>The exact shortcut is determined by the user agent, based on =
information about the user's
+  keyboard, what keyboard shortcuts already exist on the platform, and w=
hat other shortcuts have
+  been specified on the page, using the information provided in the <=
code title=3Dattr-accesskey><a href=3D#the-accesskey-attribute>a=
ccesskey</a></code> attribute as a guide.</p>
+
+  <p>In order to ensure that a relevant keyboard shortcut is avail=
able on a wide variety of input
+  devices, the author can provide a number of alternatives in the <co=
de title=3Dattr-accesskey><a href=3D#the-accesskey-attribute>acc=
esskey</a></code> attribute.</p>
+
+  <p>Each alternative consists of a single character, such as a le=
tter or digit.</p>
+
+  <p>User agents can provide users with a list of the keyboard sho=
rtcuts, but authors are encouraged
+  to do so also. The <code title=3Ddom-accessKeyLabel><a href=3D=
#dom-accesskeylabel>accessKeyLabel</a></code> IDL attribut=
e returns a
+  string representing the actual key combination assigned by the user ag=
ent.</p>
+
+  <div class=3Dexample>
+
+   <p>In this example, an author has provided a button that can be=
 invoked using a shortcut key. To
+   support full keyboards, the author has provided "C" as a po=
ssible key. To support devices
+   equipped only with numeric keypads, the author has provided "1&q=
uot; as another possibly key.</p>
+
+   <pre><input type=3Dbutton value=3DCollect onclick=3D&quo=
t;collect()"
+       <strong>accesskey=3D"C 1"</strong> id=3Dc&a=
mp;gt;</pre>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>To tell the user what the shortcut key is, the author has th=
is script here opted to explicitly
+   add the key combination to the button's label:</p>
+
+   <pre>function addShortcutKeyLabel(button) {
+<strong>  if (button.accessKeyLabel !=3D '')
+    button.value +=3D ' (' + button.accessKeyLabel + ')';</strong>
+}
+addShortcutKeyLabel(document.getElementById('c'));</pre>
+
+   <p>Browsers on different platforms will show different labels, =
even for the same key combination,
+   based on the convention prevalent on that platform. For example, if t=
he key combination is the
+   Control key, the Shift key, and the letter C, a Windows browser might=
 display
+   "<samp>Ctrl+Shift+C</samp>", whereas a Mac brow=
ser might display "<samp>^⇧C</samp>", wh=
ile
+   an Emacs browser might just display "<samp>C-C</samp&gt=
;". Similarly, if the key combination is the
+   Alt key and the Escape key, Windows might use "<samp>Alt+E=
sc</samp>", Mac might use
+   "<samp>⌥⎋</samp>", and an=
 Emacs browser might use "<samp>M-ESC</samp>" or
+   "<samp>ESC ESC</samp>".</p>
+
+   <p>In general, therefore, it is unwise to attempt to parse the =
value returned from the <code title=3Ddom-accessKeyLabel><a href=
=3D#dom-accesskeylabel>accessKeyLabel</a></code> IDL attri=
bute.</p>
+
+  </div>
+
+
+  <h4 id=3Dthe-accesskey-attribute><span class=3Dsecno>8.5.2=
 </span>The <dfn title=3Dattr-accesskey><code>accesskey=
</code></dfn> attribute</h4>
+
+  <p>All <a href=3D#html-elements>HTML elements</a> ma=
y have the <code title=3Dattr-accesskey><a href=3D#the-accesskey=
-attribute>accesskey</a></code>
+  content attribute set. The <code title=3Dattr-accesskey><a hr=
ef=3D#the-accesskey-attribute>accesskey</a></code> attribu=
te's value is used
+  by the user agent as a guide for creating a keyboard shortcut that act=
ivates or focuses the
+  element.</p>
+
+  <p>If specified, the value must be an <a href=3D#ordered-set-=
of-unique-space-separated-tokens>ordered set of unique space-separated=
 tokens</a>
+  that are <a href=3D#case-sensitive>case-sensitive</a>, eac=
h of which must be exactly one Unicode code point in
+  length.</p>
+
+  <div class=3Dexample>
+
+   <p>In the following example, a variety of links are given with =
access keys so that keyboard users
+   familiar with the site can more quickly navigate to the relevant page=
s:</p>
+
+   <pre><nav>
+ <p>
+  <a title=3D"Consortium Activities" accesskey=3D"=
A" href=3D"/Consortium/activities">Activities&l=
t;/a> |
+  <a title=3D"Technical Reports and Recommendations" ac=
cesskey=3D"T" href=3D"/TR/">Technical Reports&=
amp;lt;/a> |
+  <a title=3D"Alphabetical Site Index" accesskey=3D&quo=
t;S" href=3D"/Consortium/siteindex">Site Index&=
lt;/a> |
+  <a title=3D"About This Site" accesskey=3D"B&quot=
; href=3D"/Consortium/">About Consortium</a&g=
t; |
+  <a title=3D"Contact Consortium" accesskey=3D"C&q=
uot; href=3D"/Consortium/contact">Contact</a&=
gt;
+ </p>
+</nav></pre>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>In the following example, the search field is given two poss=
ible access keys, "s" and "0" (in
+   that order). A user agent on a device with a full keyboard might pick
+   <kbd><kbd>Ctrl</kbd>+<kbd>Alt</kbd>+&lt=
;kbd><a href=3D#the-s-element>S</a></kbd></kbd&gt=
; as the shortcut key, while a user agent on
+   a small device with just a numeric keypad might pick just the plain u=
nadorned key
+   <kbd><kbd>0</kbd></kbd>:</p>
+
+   <pre><form action=3D"/search">
+ <label>Search: <input type=3D"search" na=
me=3D"q" accesskey=3D"s 0"></label&=
gt;
+ <input type=3D"submit">
+</form></pre>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>In the following example, a button has possible access keys =
described. A script then tries to
+   update the button's label to advertise the key combination the user a=
gent selected.</p>
+
+   <pre><input type=3Dsubmit accesskey=3D"N @ 1" =
value=3D"Compose">
+...
+<script>
+ function labelButton(button) {
+   if (button.accessKeyLabel)
+     button.value +=3D ' (' + button.accessKeyLabel + ')';
+ }
+ var inputs =3D document.getElementsByTagName('input');
+ for (var i =3D 0; i < inputs.length; i +=3D 1) {
+   if (inputs[i].type =3D=3D "submit")
+     labelButton(inputs[i]);
+ }
+</script></pre>
+
+   <p>On one user agent, the button's label might become "&lt=
;samp>Compose (⌘N)</samp>". On
+   another, it might become "<samp>Compose (Alt+⇧+=
1)</samp>". If the user agent doesn't
+   assign a key, it will be just "<samp>Compose</samp>&=
quot;. The exact string depends on what the
+   <a href=3D#assigned-access-key>assigned access key</a> is=
, and on how the user agent represents that key
+   combination.</p>
+
+  </div>
+
+
+  <div class=3Dimpl>
+
+  <h4 id=3Dprocessing-model-5><span class=3Dsecno>8.5.3 <=
/span>Processing model</h4>
+
+  <p>An element's <dfn id=3Dassigned-access-key>assigned acc=
ess key</dfn> is a key combination derived from the element's
+  <code title=3Dattr-accesskey><a href=3D#the-accesskey-attribu=
te>accesskey</a></code> content attribute. Initially, an e=
lement must not
+  have an <a href=3D#assigned-access-key>assigned access key</a=
>.</p>
+
+  <p>Whenever an element's <code title=3Dattr-accesskey><=
a href=3D#the-accesskey-attribute>accesskey</a></code> att=
ribute is set, changed,
+  or removed, the user agent must update the element's <a href=3D#ass=
igned-access-key>assigned access key</a> by running
+  the following steps:</p>
+
+  <ol><li><p>If the element has no <code title=3Dat=
tr-accesskey><a href=3D#the-accesskey-attribute>accesskey</a&=
gt;</code> attribute, then skip
+   to the <i>fallback</i> step below.</li>
+
+   <li><p>Otherwise, <a href=3D#split-a-string-on-spaces =
title=3D"split a string on spaces">split the attribute's val=
ue on
+   spaces</a>, and let <var title=3D"">keys</va=
r> be the resulting tokens.</li>
+
+   <li>
+
+    <p>For each value in <var title=3D"">keys</=
var> in turn, in the order the tokens appeared in the
+    attribute's value, run the following substeps:</p>
+
+    <ol><li><p>If the value is not a string exactly on=
e Unicode code point in length, then skip the
+     remainder of these steps for this value.</li>
+
+     <li><p>If the value does not correspond to a key on the=
 system's keyboard, then skip the
+     remainder of these steps for this value.</li>
+
+     <li><p>If the user agent can find a mix of zero or more=
 modifier keys that, combined with the
+     key that corresponds to the value given in the attribute, can be us=
ed as the access key, then
+     the user agent may assign that combination of keys as the element's=
 <a href=3D#assigned-access-key>assigned access
+     key</a> and abort these steps.</li>
+
+    </ol></li>
+
+   <li><p><i>Fallback</i>: Optionally, the user =
agent may assign a key combination of its choosing
+   as the element's <a href=3D#assigned-access-key>assigned access=
 key</a> and then abort these steps.</li>
+
+   <li><p>If this step is reached, the element has no <a =
href=3D#assigned-access-key>assigned access key</a>.</li>
+
+  </ol><p>Once a user agent has selected and assigned an acc=
ess key for an element, the user agent should
+  not change the element's <a href=3D#assigned-access-key>assigned=
 access key</a> unless the <code title=3Dattr-accesskey><a=
 href=3D#the-accesskey-attribute>accesskey</a></code> cont=
ent attribute is changed or the element is moved to
+  another <code><a href=3D#document>Document</a></c=
ode>.</p>
+
+  <p>When the user presses the key combination corresponding to th=
e <a href=3D#assigned-access-key>assigned access key</a>
+  for an element, if the element <a href=3D#concept-command title=3Dc=
oncept-command>defines a command</a>, the
+  command's <a href=3D#command-facet-hiddenstate title=3Dcommand-face=
t-HiddenState>Hidden State</a> facet is false (visible),
+  the command's <a href=3D#command-facet-disabledstate title=3Dcomman=
d-facet-DisabledState>Disabled State</a> facet is also false
+  (enabled), the element is <a href=3D#in-a-document>in a <code=
>Document</code></a> that has an associated
+  <a href=3D#browsing-context>browsing context</a>, and neit=
her the element nor any of its ancestors has a <code title=3Dattr-hidd=
en><a href=3D#the-hidden-attribute>hidden</a></code>=
 attribute specified, then the user agent must trigger the <a href=3D#=
command-facet-action title=3Dcommand-facet-Action>Action</a> of =
the command.</p>
+
+  <p class=3Dnote>User agents <a href=3D#expose-commands-in-ui&=
gt;might expose</a> elements that have
+  an <code title=3Dattr-accesskey><a href=3D#the-accesskey-attr=
ibute>accesskey</a></code> attribute in other ways as well=
, e.g. in a menu
+  displayed in response to a specific key combination.</p> <!--=
 the actual conformance criteria for
+  this is in the section that defines commands -->
+
+  <hr><p>The <dfn id=3Ddom-accesskey title=3Ddom-accessKe=
y><code>accessKey</code></dfn> IDL attribute must
+  <a href=3D#reflect>reflect</a> the <code title=3Dattr-a=
ccesskey><a href=3D#the-accesskey-attribute>accesskey</a>&=
lt;/code> content attribute.</p>
+
+  <p>The <dfn id=3Ddom-accesskeylabel title=3Ddom-accessKeyLabe=
l><code>accessKeyLabel</code></dfn> IDL attribute mu=
st return
+  a string that represents the element's <a href=3D#assigned-access-k=
ey>assigned access key</a>, if any. If the element
+  does not have one, then the IDL attribute must return the empty string=
.</p>
+
+  </div>
+
+
+
+  <h3 id=3Dediting-0><span class=3Dsecno>8.6 </span>Ed=
iting</h3>
+
+  <h4 id=3Dcontenteditable><span class=3Dsecno>8.6.1 </sp=
an>Making document regions editable: The <code title=3Dattr-content=
editable><a href=3D#attr-contenteditable>contenteditable</a&g=
t;</code> content attribute</h4>
+
+  <p>The <dfn id=3Dattr-contenteditable title=3Dattr-contentedi=
table><code>contenteditable</code></dfn> attribute i=
s an
+  <a href=3D#enumerated-attribute>enumerated attribute</a> w=
hose keywords are the empty string, <code title=3D"">true=
</code>,
+  and <code title=3D"">false</code>. The empty str=
ing and the <code title=3D"">true</code> keyword ma=
p
+  to the <i>true</i> state. The <code title=3D"&quot=
;>false</code> keyword maps to the <i>false</i> stat=
e.
+  In addition, there is a third state, the <i>inherit</i> st=
ate, which is the <i>missing value
+  default</i> (and the <i>invalid value default</i>).&=
lt;/p>
+
+  <p>The <i>true</i> state indicates that the element =
is editable. The <i>inherit</i> state
+  indicates that the element is editable if its parent is. The <i>=
false</i> state indicates that the
+  element is not editable.</p>
+
+  <dl class=3Ddomintro><dt><var title=3D"">e=
lement</var> . <code title=3Ddom-contentEditable><a href=3D=
#dom-contenteditable>contentEditable</a></code> [ =3D <=
var title=3D"">value</var> ]</dt>
+
+   <dd>
+
+    <p>Returns "<code title=3D"">true</cod=
e>", "<code title=3D"">false</code>&qu=
ot;, or "<code title=3D"">inherit</code>"=
, based on the state of the <code title=3Dattr-contenteditable><=
a href=3D#attr-contenteditable>contenteditable</a></code> =
attribute.</p>
+
+    <p>Can be set, to change that state.</p>
+
+    <p>Throws a <code><a href=3D#syntaxerror>SyntaxErr=
or</a></code> exception if the new value isn't one of those s=
trings.</p>
+
+   </dd>
+
+   <dt><var title=3D"">element</var> . <c=
ode title=3Ddom-isContentEditable><a href=3D#dom-iscontenteditable&=
gt;isContentEditable</a></code></dt>
+
+   <dd>
+
+    <p>Returns true if the element is editable; otherwise, returns=
 false.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-contenteditable title=3Ddom-contentEdita=
ble><code>contentEditable</code></dfn> IDL attribute=
, on
+  getting, must return the string "<code title=3D""&gt=
;true</code>" if the content attribute is set to
+  the true state, "<code title=3D"">false</code&=
gt;" if the content attribute is set to the false state,
+  and "<code title=3D"">inherit</code>" =
otherwise. On setting, if the new value is an <a href=3D#ascii-case-in=
sensitive>ASCII
+  case-insensitive</a> match for the string "<code title=3D=
"">inherit</code>" then the content
+  attribute must be removed, if the new value is an <a href=3D#ascii-=
case-insensitive>ASCII case-insensitive</a> match for
+  the string "<code title=3D"">true</code>&qu=
ot; then the content attribute must be set to the string
+  "<code title=3D"">true</code>", if the=
 new value is an <a href=3D#ascii-case-insensitive>ASCII case-insen=
sitive</a> match for
+  the string "<code title=3D"">false</code>&q=
uot; then the content attribute must be set to the string
+  "<code title=3D"">false</code>", and o=
therwise the attribute setter must throw a
+  <code><a href=3D#syntaxerror>SyntaxError</a></cod=
e> exception.</p>
+
+  <p>The <dfn id=3Ddom-iscontenteditable title=3Ddom-isContentE=
ditable><code>isContentEditable</code></dfn> IDL att=
ribute, on
+  getting, must return true if the element is either an <a href=3D#ed=
iting-host>editing host</a> or
+  <a href=3D#editable>editable</a>, and false otherwise.<=
/p>
+
+  </div>
+
+
+  <h4 id=3Dmaking-entire-documents-editable:-the-designmode-idl-attri=
bute><span class=3Dsecno>8.6.2 </span>Making entire docume=
nts editable: The <code title=3Ddom-document-designMode><a href=3D=
#designMode>designMode</a></code> IDL attribute</h4>
+
+  <div class=3Dimpl>
+
+  <p>Documents have a <dfn id=3DdesignMode title=3Ddom-document=
-designMode><code>designMode</code></dfn>, which can=
 be either enabled or
+  disabled.</p>
+
+  </div>
+
+  <dl class=3Ddomintro><dt><var title=3D"">d=
ocument</var> . <code title=3Ddom-document-designMode><a h=
ref=3D#designMode>designMode</a></code> [ =3D <var titl=
e=3D"">value</var> ]</dt>
+
+   <dd>
+
+    <p>Returns "<code title=3D"">on</code&=
gt;" if the document is editable, and "<code title=3D"&=
quot;>off</code>" if it isn't.</p>
+
+    <p>Can be set, to change the document's current state. This fo=
cuses the document and resets the
+    selection in that document.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>The <code title=3Ddom-document-designMode><a href=3D=
#designMode>designMode</a></code> IDL attribute on the
+  <code><a href=3D#document>Document</a></code> =
object takes two values, "<code title=3D"">on</co=
de>" and "<code title=3D"">off</code>&=
quot;. On setting, the new value must be compared in an <a href=3D#asc=
ii-case-insensitive>ASCII
+  case-insensitive</a> manner to these two values; if it matches t=
he "<code title=3D"">on</code>"
+  value, then <code title=3Ddom-document-designMode><a href=3D#=
designMode>designMode</a></code> must be enabled, and if i=
t
+  matches the "<code title=3D"">off</code>&qu=
ot; value, then <code title=3Ddom-document-designMode><a href=3D=
#designMode>designMode</a></code> must be disabled. Other =
values must be
+  ignored.</p>
+
+  <p>On getting, if <code title=3Ddom-document-designMode>&l=
t;a href=3D#designMode>designMode</a></code> is enabled, t=
he IDL
+  attribute must return the value "<code title=3D""&gt=
;on</code>"; otherwise it is disabled, and the
+  attribute must return the value "<code title=3D""&gt=
;off</code>".</p>
+
+  <p>The last state set must persist until the document is destroy=
ed or the state is changed.
+  Initially, documents must have their <code title=3Ddom-document-des=
ignMode><a href=3D#designMode>designMode</a></code>
+  disabled.</p>
+
+  <p>When the <code title=3Ddom-document-designMode><a hr=
ef=3D#designMode>designMode</a></code> changes from being =
disabled to
+  being enabled, the user agent must synchronously reset the document's =
<a href=3D#active-range>active range</a>'s
+  start and end boundary points to be at the start of the <code>&l=
t;a href=3D#document>Document</a></code> and then run the
+  <a href=3D#focusing-steps>focusing steps</a> for the root =
element of the <code><a href=3D#document>Document</a>&l=
t;/code>, if any.</p>
+
+  </div>
+
+
+  <h4 id=3Dbest-practices-for-in-page-editors><span class=3Dsec=
no>8.6.3 </span>Best practices for in-page editors</h4>
+
+  <p>Authors are encouraged to set the 'white-space' property on &=
lt;a href=3D#editing-host title=3D"editing host">editing
+  hosts</a> and on markup that was originally created through thes=
e editing mechanisms to the
+  value 'pre-wrap'. Default HTML whitespace handling is not well suited =
to WYSIWYG editing, and line
+  wrapping will not work correctly in some corner cases if 'white-space'=
 is left at its default
+  value.</p>
+
+  <div class=3Dexample>
+
+   <p>As an example of problems that occur if the default 'normal'=
 value is used instead, consider
+   the case of the user typing "<kbd>yellow␣&bl=
ank;ball</kbd>", with two spaces (here
+   represented by "␣") between the words. With the e=
diting rules in place for the default
+   value of 'white-space' ('normal'), the resulting markup will either c=
onsist of
+   "<samp>yellow  ball</samp>&quo=
t; or "<samp>yellow  ball</samp>&q=
uot;; i.e.,
+   there will be a non-breaking space between the two words in addition =
to the regular space. This
+   is necessary because the 'normal' value for 'white-space' requires ad=
jacent regular spaces to be
+   collapsed together.</p>
+
+   <p>In the former case, "<samp>yellow⍽<=
/samp>" might wrap to the next line ("⍽"
+   being used here to represent a non-breaking space) even though "=
<samp>yellow</samp>" alone might
+   fit at the end of the line; in the latter case, "<samp>&am=
p;#x237d;ball</samp>", if wrapped to the
+   start of the line, would have visible indentation from the non-breaki=
ng space.</p>
+
+   <p>When 'white-space' is set to 'pre-wrap', however, the editin=
g rules will instead simply put
+   two regular spaces between the words, and should the two words be spl=
it at the end of a line, the
+   spaces would be neatly removed from the rendering.</p>
+
+  </div>
+
+
+
+  <h4 id=3Dediting-apis><span class=3Dsecno>8.6.4 </span&=
gt;Editing APIs</h4>
+
+  <p>The definition of the terms <dfn id=3Dactive-range>acti=
ve range</dfn>, <dfn id=3Dediting-host>editing host</dfn&g=
t;, and
+  <dfn id=3Deditable>editable</dfn>, the user interface requ=
irements of elements that are <a href=3D#editing-host title=3D"ed=
iting
+  host">editing hosts</a> or <a href=3D#editable>edi=
table</a>, the
+
+  <dfn id=3DexecCommand title=3Ddom-document-execCommand><code&=
gt;execCommand()</code></dfn>,
+  <dfn id=3Ddom-document-querycommandenabled title=3Ddom-document-que=
ryCommandEnabled><code>queryCommandEnabled()</code></df=
n>,
+  <dfn id=3Ddom-document-querycommandindeterm title=3Ddom-document-qu=
eryCommandIndeterm><code>queryCommandIndeterm()</code><=
/dfn>,
+  <dfn id=3Ddom-document-querycommandstate title=3Ddom-document-query=
CommandState><code>queryCommandState()</code></dfn>,
+  <dfn id=3Ddom-document-querycommandsupported title=3Ddom-document-q=
ueryCommandSupported><code>queryCommandSupported()</code>&=
lt;/dfn>, and
+  <dfn id=3Ddom-document-querycommandvalue title=3Ddom-document-query=
CommandValue><code>queryCommandValue()</code></dfn>
+
+  methods, text selections, and the <dfn id=3Ddelete-the-selection&gt=
;delete the selection</dfn> algorithm are defined in the
+  HTML Editing APIs specification. The interaction of editing and the un=
do/redo features in user
+  agents is defined by the UndoManager and DOM Transaction specification=
. <a href=3D#refsEDITING>[EDITING]</a> <a href=3D#refsUNDO=
>[UNDO]</a></p>
+
+  <!-- those might get merged in here eventually -->
+
+
+
+  <h4 id=3Dspelling-and-grammar-checking><span class=3Dsecno&gt=
;8.6.5 </span>Spelling and grammar checking</h4>
+
+  <div class=3Dimpl>
+
+  <p>User agents can support the checking of spelling and grammar =
of editable text, either in form
+  controls (such as the value of <code><a href=3D#the-textarea-=
element>textarea</a></code> elements), or in elements in a=
n <a href=3D#editing-host>editing
+  host</a> (e.g. using <code title=3Dattr-contenteditable>&l=
t;a href=3D#attr-contenteditable>contenteditable</a></code&gt=
;).</p>
+
+  <p>For each element, user agents must establish a <dfn id=3Dc=
oncept-spellcheck-default title=3Dconcept-spellcheck-default>default
+  behavior</dfn>, either through defaults or through preferences e=
xpressed by the user. There are
+  three possible default behaviors for each element:</p>
+
+  <dl><dt><dfn id=3Dconcept-spellcheck-default-true title=
=3Dconcept-spellcheck-default-true>true-by-default</dfn>
+
+   <dd>The element will be checked for spelling and grammar if its=
 contents are editable.
+
+   <dt><dfn id=3Dconcept-spellcheck-default-false title=3Dconce=
pt-spellcheck-default-false>false-by-default</dfn>
+
+   <dd>The element will never be checked for spelling and grammar.
+
+   <dt><dfn id=3Dconcept-spellcheck-default-inherit title=3Dcon=
cept-spellcheck-default-inherit>inherit-by-default</dfn>
+
+   <dd>The element's default behavior is the same as its parent el=
ement's. Elements that have no
+   parent element cannot have this as their default behavior.
+
+  </dl><hr></div>
+
+  <p>The <dfn id=3Dattr-spellcheck title=3Dattr-spellcheck>&=
lt;code>spellcheck</code></dfn> attribute is an <a href=
=3D#enumerated-attribute>enumerated
+  attribute</a> whose keywords are the empty string, <code titl=
e=3D"">true</code> and <code title=3D""&g=
t;false</code>. The empty string and the <code title=3D"&qu=
ot;>true</code> keyword map to the
+  <i>true</i> state. The <code title=3D"">fa=
lse</code> keyword maps to the <i>false</i> state. In
+  addition, there is a third state, the <i>default</i> state=
, which is the <i>missing value
+  default</i> (and the <i>invalid value default</i>).&=
lt;/p>
+
+  <p class=3Dnote>The <i>true</i> state indicates that=
 the element is to have its spelling and
+  grammar checked. The <i>default</i> state indicates that t=
he element is to act according to a
+  default behavior, possibly based on the parent element's own <code =
title=3Dattr-spellcheck><a href=3D#attr-spellcheck>spellcheck&lt=
;/a></code> state, as defined below. The <i>false</i&gt=
; state
+  indicates that the element is not to be checked.</p>
+
+  <div class=3Dimpl>
+
+  <hr></div>
+
+  <dl class=3Ddomintro><dt><var title=3D"">e=
lement</var> . <code title=3Ddom-spellcheck><a href=3D#dom=
-spellcheck>spellcheck</a></code> [ =3D <var title=3D&q=
uot;">value</var> ]</dt>
+
+   <dd>
+
+    <p>Returns true if the element is to have its spelling and gra=
mmar checked; otherwise, returns
+    false.</p>
+
+    <p>Can be set, to override the default and set the <code ti=
tle=3Dattr-spellcheck><a href=3D#attr-spellcheck>spellcheck</=
a></code> content attribute.</p>
+
+   </dd>
+
+
+   <dt><var title=3D"">element</var> . <c=
ode title=3Ddom-forceSpellCheck><a href=3D#dom-forcespellcheck>f=
orceSpellCheck</a></code>()</dt>
+
+   <dd>
+
+    <p>Forces the user agent to report spelling and grammar errors=
 on the element (if checking is
+    enabled), even if the user has never focused the element. (If the me=
thod is not invoked, user
+    agents can hide errors in text that wasn't just entered by the user.=
)</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-spellcheck title=3Ddom-spellcheck>&lt=
;code>spellcheck</code></dfn> IDL attribute, on getting, m=
ust
+  return true if the element's <code title=3Dattr-spellcheck><a=
 href=3D#attr-spellcheck>spellcheck</a></code> content att=
ribute is
+  in the <i>true</i> state, or if the element's <code tit=
le=3Dattr-spellcheck><a href=3D#attr-spellcheck>spellcheck</a=
></code>
+  content attribute is in the <i>default</i> state and the e=
lement's <a href=3D#concept-spellcheck-default title=3Dconcept-spellch=
eck-default>default behavior</a> is <a href=3D#concept-spellc=
heck-default-true title=3Dconcept-spellcheck-default-true>true-by-defa=
ult</a>, or if the element's <code title=3Dattr-spellcheck>&l=
t;a href=3D#attr-spellcheck>spellcheck</a></code> content =
attribute is in the <i>default</i> state and the
+  element's <a href=3D#concept-spellcheck-default title=3Dconcept-spe=
llcheck-default>default behavior</a> is <a href=3D#concept-sp=
ellcheck-default-inherit title=3Dconcept-spellcheck-default-inherit>in=
herit-by-default</a> and the element's parent
+  element's <code title=3Ddom-spellcheck><a href=3D#dom-spellch=
eck>spellcheck</a></code> IDL attribute would return true;
+  otherwise, if none of those conditions applies, then the attribute mus=
t instead return false.</p>
+
+  <p class=3Dnote>The <code title=3Ddom-spellcheck><a hre=
f=3D#dom-spellcheck>spellcheck</a></code> IDL attribute is=
 not affected
+  by user preferences that override the <code title=3Dattr-spellcheck=
><a href=3D#attr-spellcheck>spellcheck</a></code> co=
ntent
+  attribute, and therefore might not reflect the actual spellchecking st=
ate.</p>
+
+  <p>On setting, if the new value is true, then the element's <=
code title=3Dattr-spellcheck><a href=3D#attr-spellcheck>spellche=
ck</a></code> content attribute must be set to the literal st=
ring
+  "<code title=3D"">true</code>", otherw=
ise it must be set to the literal string "<code title=3D"&qu=
ot;>false</code>".
+
+  <hr><p>User agents must only consider the following pieces=
 of text as checkable for the purposes of
+  this feature:</p>
+
+  <ul><li>The <a href=3D#concept-fe-value title=3Dconcept=
-fe-value>value</a> of <code><a href=3D#the-input-eleme=
nt>input</a></code> elements whose <code title=3Dattr-i=
nput-type><a href=3D#attr-input-type>type</a></code>=
 attributes are in the <a href=3D"#text-(type=3Dtext)-state-and-s=
earch-state-(type=3Dsearch)" title=3Dattr-input-type-text>Text&lt=
;/a>, <a href=3D"#text-(type=3Dtext)-state-and-search-state-(t=
ype=3Dsearch)" title=3Dattr-input-type-search>Search</a>,
+   <a href=3D"#url-state-(type=3Durl)" title=3Dattr-input-t=
ype-url>URL</a>, or <a href=3D"#e-mail-state-(type=3Dema=
il)" title=3Dattr-input-type-email>E-mail</a> states and th=
at are <i title=3Dconcept-fe-mutable><a href=3D#concept-fe-mutab=
le>mutable</a></i> (i.e. that do not have the <code tit=
le=3Dattr-input-readonly><a href=3D#attr-input-readonly>readonly=
</a></code> attribute specified and that are not <a href=3D=
#concept-fe-disabled title=3Dconcept-fe-disabled>disabled</a>).&=
lt;/li>
+
+   <li>The <a href=3D#concept-fe-value title=3Dconcept-fe-value=
>value</a> of <code><a href=3D#the-textarea-element>=
textarea</a></code> elements that do not
+   have a <code title=3Dattr-textarea-readonly><a href=3D#attr-=
textarea-readonly>readonly</a></code> attribute and that a=
re not <a href=3D#concept-fe-disabled title=3Dconcept-fe-disabled>d=
isabled</a>.</li>
+
+   <li>Text in <code><a href=3D#text>Text</a>&lt=
;/code> nodes that are children of <a href=3D#editing-host title=3D=
"editing host">editing
+   hosts</a> or <a href=3D#editable>editable</a> eleme=
nts.</li>
+
+   <li>Text in attributes of <a href=3D#editable>editable&lt=
;/a> elements.</li>
+
+  </ul><p>For text that is part of a <code><a href=3D=
#text>Text</a></code> node, the element with which the tex=
t is
+  associated is the element that is the immediate parent of the first ch=
aracter of the word,
+  sentence, or other piece of text. For text in attributes, it is the at=
tribute's element. For the
+  values of <code><a href=3D#the-input-element>input</a&g=
t;</code> and <code><a href=3D#the-textarea-element>tex=
tarea</a></code> elements, it is the element itself.</p&gt=
;
+
+  <p>To determine if a word, sentence, or other piece of text in a=
n applicable element (as defined
+  above) is to have spelling- and grammar-checking enabled, the UA must =
use the following
+  algorithm:</p>
+
+  <ol><!-- user override --><li>If the user has disabl=
ed the checking for this text, then the checking is disabled.</li>
+
+   <li>Otherwise, if the user has forced the checking for this tex=
t to always be enabled, then the
+   checking is enabled.</li>
+
+   <!-- content attribute: on, off -->
+
+   <li>Otherwise, if the element with which the text is associated=
 has a <code title=3Dattr-spellcheck><a href=3D#attr-spellcheck&=
gt;spellcheck</a></code> content attribute, then: if that att=
ribute is in the
+   <i>true</i> state, then checking is enabled; otherwise, i=
f that attribute is in the <i>false</i>
+   state, then checking is disabled.</li>
+
+   <!-- inherit, if there is one to inherit from -->
+
+   <li>Otherwise, if there is an ancestor element with a <code =
title=3Dattr-spellcheck><a href=3D#attr-spellcheck>spellcheck&lt=
;/a></code> content attribute that is not in the <i>defaul=
t</i>
+   state, then: if the nearest such ancestor's <code title=3Dattr-spe=
llcheck><a href=3D#attr-spellcheck>spellcheck</a></code=
>
+   content attribute is in the <i>true</i> state, then check=
ing is enabled; otherwise, checking is
+   disabled.</li>
+
+   <!-- default -->
+
+   <li>Otherwise, if the element's <a href=3D#concept-spellchec=
k-default title=3Dconcept-spellcheck-default>default behavior</a&gt=
;
+   is <a href=3D#concept-spellcheck-default-true title=3Dconcept-spel=
lcheck-default-true>true-by-default</a>, then checking is
+   enabled.</li>
+
+   <li>Otherwise, if the element's <a href=3D#concept-spellchec=
k-default title=3Dconcept-spellcheck-default>default behavior</a&gt=
;
+   is <a href=3D#concept-spellcheck-default-false title=3Dconcept-spe=
llcheck-default-false>false-by-default</a>, then checking is
+   disabled.</li>
+
+   <!-- default inheritance -->
+
+   <li>Otherwise, if the element's parent element has <em>it=
s</em> checking enabled, then checking
+   is enabled.</li>
+
+   <li>Otherwise, checking is disabled.</li>
+
+  </ol><p>If the checking is enabled for a word/sentence/tex=
t, the user agent should indicate spelling
+  and grammar errors in that text. User agents should take into account =
the other semantics given in
+  the document when suggesting spelling and grammar corrections. User ag=
ents may use the language of
+  the element to determine what spelling and grammar rules to use, or ma=
y use the user's preferred
+  language settings. UAs should use <code><a href=3D#the-input-=
element>input</a></code> element attributes such as <co=
de title=3Dattr-input-pattern><a href=3D#attr-input-pattern>patt=
ern</a></code> to ensure that the resulting value is valid, w=
here
+  possible.</p>
+
+  <p>If checking is disabled, the user agent should not indicate s=
pelling or grammar errors for that
+  text.</p>
+
+  <p>Even when checking is enabled, user agents may opt to not rep=
ort spelling or grammar errors in
+  text that the user agent deems the user has no interest in having chec=
ked (e.g. text that was
+  already present when the page was loaded, or that the user did not typ=
e, or text in controls that
+  the user has not focused, or in parts of e-mail addresses that the use=
r agent is not confident
+  were misspelt). The <dfn id=3Ddom-forcespellcheck title=3Ddom-force=
SpellCheck><code>forceSpellCheck()</code></dfn> meth=
od,
+  when invoked on an element, must override this behavior, forcing the u=
ser agent to consider all
+  spelling and grammar errors in text in that element for which checking=
 is enabled to be of
+  interest to the user.</p>
+
+  <div class=3Dexample>
+
+   <p>The element with ID "a" in the following example w=
ould be the one used to determine if the
+   word "Hello" is checked for spelling errors. In this exampl=
e, it would not be.</p>
+
+   <pre><div contenteditable=3D"true">
+ <span spellcheck=3D"false" id=3D"a">H=
ell</span><em>o!</em>
+</div></pre>
+
+   <p>The element with ID "b" in the following example w=
ould have checking enabled (the leading
+   space character in the attribute's value on the <code><a hre=
f=3D#the-input-element>input</a></code> element causes the=
 attribute
+   to be ignored, so the ancestor's value is used instead, regardless of=
 the default).</p>
+
+   <pre class=3Dbad><p spellcheck=3D"true"&gt=
;
+ <label>Name: <input spellcheck=3D" false&quot=
; id=3D"b"></label>
+</p></pre>
+
+  </div>
+
+  </div>
+
+  <p class=3Dnote>This specification does not define the user inte=
rface for spelling and grammar
+  checkers. A user agent could offer on-demand checking, could perform c=
ontinuous checking while the
+  checking is enabled, or could use other interfaces.</p>
+
+
+  <h3 id=3Ddnd><span class=3Dsecno>8.7 </span><dfn&=
gt;Drag and drop</dfn></h3>
+
+<!-- v2: ideas for drag and drop:
+
+     * being able to animate a drop target:
+
+       > To implement this with simple interface I've proposed, event=
s should be handled either by
+       > existing elements (like list items that compare their size a=
nd position of dragged element
+       > to decide whether element should be dropped before or after)=
 or handled by container that
+       > would probably need to calculate positions of it's children =
and create new element to show
+       > drop target. Smooth Mac-like drag'n'drop can be implemented =
by animating drop target's
+       > padding/margin. So that's quite a bit of code that's going t=
o be reinvented each time
+       > someone implements reordering.
+
+       <hyatt> :droptarget
+       <hyatt> or something
+       <hyatt> we don't support a pseudo-class for the drop target=
 but that's a great idea
+       <Hixie_> yeah, thinking about that too
+       <Hixie_> :drop-target, :drop-target(above), :drop-target(be=
low) and having ondragover be able to say "not on me, but next to me=
 maybe"
+
+       - some way to be able to match an element that is being dragged o=
ver.
+
+       - some way to be able to animate an element as it goes into and o=
ut of this state (CSS
+         transitions?), e.g. to be able to animate something "getti=
ng out of the way" to let you
+         drop an item between others.
+
+       - as an extension to the previous feature, a way to distinguish b=
eing dragged above or to the
+         left of the drag target vs below or to the right of the drag ta=
rget.
+
+     * We should let drop targets communicate back to drag sources if th=
ey want to communicate.
+       (e.g. expose Window, and thus postMessage(), on the dataTransfer =
object on drop.) Or maybe
+       just use a MessagePort!
+
+       We should let drag sources provide a set of options via a context=
 menu when the drop happens.
+       (So that, e.g., the source can know whether a capabilities URI th=
at it is passing along is
+       supposed to be read-write access or read-only access to the objec=
t being dragged.)
+
+       We should let potential drop targets see the types (but not the c=
ontents!) of dragged data so
+       they can establish if they care or not. (dataTransfer.hasType())
+
+       Ack: Ben Laurie (@g)
+
+     * Interop with native apps. In particular, we probably want to whit=
elist the list of types that
+       a Web page can see, since otherwise we'll end up exposing things =
like the username (if a user
+       drags a file from their desktop, the path is exposed on some OSes=
).
+
+     * Alex Velkov suggests that drags to and from the same origin shoul=
d be able to read the data
+       even before the drop.
+
+     Other things listed below:
+      DND-v2: more native support: text/html from selections, etc
+      DND-v3: add Blob support
+      DND-v4: add structured clone support
+      DND-v5: add promises (should be able to say "if you accept th=
is
+              drop, then I can provide the File object that
+              corresponds to it eventually")
+
+         DataTransferPromise.type =3D 'string' or 'file' or 'blob' or 'd=
ata'
+                            .onneeddata - can wait until this fires to p=
rovide data
+                            .setData() - call this once you have data, m=
ust be the right type
+
+-->
+
+  <p>This section defines an event-based drag-and-drop mechanism.&=
lt;/p>
+
+  <p>This specification does not define exactly what a <em>d=
rag-and-drop operation</em> actually
+  is.</p>
+
+  <p>On a visual medium with a pointing device, a drag operation c=
ould be the default action of a
+  <code title=3Devent-mousedown>mousedown</code> event that =
is followed by a series of <code title=3Devent-mousemove>mousemove&=
lt;/code> events, and the drop could be triggered by the mouse
+  being released.</p>
+
+  <p>When using an input modality other than a pointing device, us=
ers would probably have to
+  explicitly indicate their intention to perform a drag-and-drop operati=
on, stating what they wish
+  to drag and where they wish to drop it, respectively.</p>
+
+  <div class=3Dimpl>
+
+  <p>However it is implemented, drag-and-drop operations must have=
 a starting point (e.g. where the
+  mouse was clicked, or the start of the selection or element that was s=
elected for the drag), may
+  have any number of intermediate steps (elements that the mouse moves o=
ver during a drag, or
+  elements that the user picks as possible drop points as he cycles thro=
ugh possibilities), and must
+  either have an end point (the element above which the mouse button was=
 released, or the element
+  that was finally selected), or be canceled. The end point must be the =
last element selected as a
+  possible drop point before the drop occurs (so if the operation is not=
 canceled, there must be at
+  least one element in the middle step).</p>
+
+  </div>
+
+
+  <h4 id=3Dintroduction-8><span class=3Dsecno>8.7.1 </spa=
n>Introduction</h4>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <p>To make an element draggable is simple: give the element a &l=
t;code title=3Dattr-draggable><a href=3D#the-draggable-attribute&gt=
;draggable</a></code> attribute, and set an event listener fo=
r <code title=3Devent-dragstart><a href=3D#event-dragstart>dr=
agstart</a></code> that stores the data being dragged.</p&=
gt;
+
+  <p>The event handler typically needs to check that it's not a te=
xt selection that is being
+  dragged, and then needs to store data into the <code><a href=3D=
#datatransfer>DataTransfer</a></code> object and set the
+  allowed effects (copy, move, link, or some combination).</p>
+
+  <p>For example:</p>
+
+  <pre><p>What fruits do you like?</p>
+<ol ondragstart=3D"dragStartHandler(event)">
+ <li draggable=3D"true" data-value=3D"fruit-apple&=
quot;>Apples</li>
+ <li draggable=3D"true" data-value=3D"fruit-orange=
">Oranges</li>
+ <li draggable=3D"true" data-value=3D"fruit-pear&q=
uot;>Pears</li>
+</ol>
+<script>
+  var internalDNDType =3D 'text/x-example'; // set this to something spe=
cific to your site
+  function dragStartHandler(event) {
+    if (event.target instanceof HTMLLIElement) {
+      // use the element's data-value=3D"" attribute as the va=
lue to be moving:
+      event.dataTransfer.setData(internalDNDType, event.target.dataset.v=
alue);
+      event.dataTransfer.effectAllowed =3D 'move'; // only allow moves
+    } else {
+      event.preventDefault(); // don't allow selection to be dragged
+    }
+  }
+</script></pre>
+
+  <hr><p>To accept a drop, the drop target has to have a &lt=
;code title=3Dattr-dropzone><a href=3D#the-dropzone-attribute>dr=
opzone</a></code>
+  attribute and listen to the <code title=3Ddrop-event>drop</co=
de> event.</p>
+
+  <p>The value of the <code title=3Dattr-dropzone><a href=
=3D#the-dropzone-attribute>dropzone</a></code> attribute s=
pecifies what kind of
+  data to accept (e.g. "<code title=3D"">string:tex=
t/plain</code>" to accept any text strings, or
+  "<code>file:image/png</code>" to accept a PNG im=
age file) and what kind of feedback to give (e.g.
+  "<code>move</code>" to indicate that the data wi=
ll be moved).</p>
+
+  <p class=3Dnote>Instead of using the <code title=3Dattr-dropz=
one><a href=3D#the-dropzone-attribute>dropzone</a></cod=
e> attribute, a drop
+  target can handle the <code title=3Devent-dragenter><a href=3D=
#event-dragenter>dragenter</a></code> event (to report whe=
ther or
+  not the drop target is to accept the drop) and the <code title=3Dev=
ent-dragover><a href=3D#event-dragover>dragover</a></co=
de>
+  event (to specify what feedback is to be shown to the user).</p>
+
+  <p>The <code title=3Devent-drop><a href=3D#event-drop&g=
t;drop</a></code> event allows the actual drop to be performe=
d. This
+  event needs to be canceled, so that the <code title=3Ddom-DataTrans=
fer-DropEffect><a href=3D#dom-datatransfer-dropeffect>dropEffect=
</a></code> attribute's value can be used by the source
+  (otherwise it's reset).</p>
+
+  <p>For example:</p>
+
+  <pre><p>Drop your favorite fruits below:</p=
>
+<ol dropzone=3D"move string:text/x-example" ondrop=3D&q=
uot;dropHandler(event)">
+ <!-- don't forget to change the "text/x-example" type =
to something
+ specific to your site -->
+</ol>
+<script>
+  var internalDNDType =3D 'text/x-example'; // set this to something spe=
cific to your site
+  function dropHandler(event) {
+    var li =3D document.createElement('li');
+    var data =3D event.dataTransfer.getData(internalDNDType);
+    if (data =3D=3D 'fruit-apple') {
+      li.textContent =3D 'Apples';
+    } else if (data =3D=3D 'fruit-orange') {
+      li.textContent =3D 'Oranges';
+    } else if (data =3D=3D 'fruit-pear') {
+      li.textContent =3D 'Pears';
+    } else {
+      li.textContent =3D 'Unknown Fruit';
+    }
+    event.target.appendChild(li);
+  }
+</script></pre>
+
+  <hr><p>To remove the original element (the one that was dr=
agged) from the display, the <code title=3Devent-dragend><a href=
=3D#event-dragend>dragend</a></code> event can be used.&lt=
;/p>
+
+  <p>For our example here, that means updating the original markup=
 to handle that event:</p>
+
+  <pre><p>What fruits do you like?</p>
+<ol ondragstart=3D"dragStartHandler(event)" ondragend=3D=
"dragEndHandler(event)">
+ <em>...as before...</em>
+</ol>
+<script>
+  function dragStartHandler(event) {
+    // <em>...as before...</em>
+  }
+  function dragEndHandler(event) {
+    if (event.dataTransfer.dropEffect =3D=3D 'move') {
+      // remove the dragged element
+      event.target.parentNode.removeChild(event.target);
+    }
+  }
+</script></pre>
+
+
+
+  <h4 id=3Dthe-drag-data-store><span class=3Dsecno>8.7.2 &lt=
;/span>The drag data store</h4>
+
+  <p>The data that underlies a drag-and-drop operation, known as t=
he <dfn id=3Ddrag-data-store>drag data store</dfn>,
+  consists of the following information:</p>
+
+  <ul><li><p>A <dfn id=3Ddrag-data-store-item-list&=
gt;drag data store item list</dfn>, which is a list of items repres=
enting the dragged
+   data, each consisting of the following information:</p>
+
+    <dl><dt><dfn id=3Dthe-drag-data-item-kind>The drag=
 data item kind</dfn></dt>
+
+     <dd>
+
+      <p>The kind of data:</p>
+
+      <dl><dt><i>Plain Unicode string</i></dt=
>
+       <dd>
+        <p>Text.</p>
+       </dd>
+
+<!-- DND-v3:
+       <dt><i title=3D"">Blob</i></dt>
+       <dd>
+        <p>Binary data.</p>
+       </dd>
+-->
+
+       <dt><i title=3D"">File</i></dt>
+       <dd>
+        <p>Binary data with a file name.</p>
+       </dd>
+
+<!-- DND-v4:
+       <dt><i>Structured object</i></dt>
+       <dd>
+        <p>An object that will be cloned using the <span>str=
uctured clone</span> algorithm.</p>
+       </dd>
+-->
+
+      </dl></dd>
+
+     <dt><dfn id=3Dthe-drag-data-item-type-string>The drag d=
ata item type string</dfn></dt>
+
+     <dd>
+
+      <p>A Unicode string giving the type or format of the data, g=
enerally given by a <a href=3D#mime-type>MIME
+      type</a>. Some values that are not <a href=3D#mime-type t=
itle=3D"MIME type">MIME types</a> are
+      special-cased for legacy reasons. The API does not enforce the use=
 of <a href=3D#mime-type title=3D"MIME
+      type">MIME types</a>; other values can be used as we=
ll. In all cases, however, the values
+      are all <a href=3D#converted-to-ascii-lowercase>converted to=
 ASCII lowercase</a> by the API.</p>
+
+      <p class=3Dnote>Strings that contain <a href=3D#space-cha=
racter title=3D"space character">space characters</a>
+      cannot be used with the <code title=3Dattr-dropzone><a hr=
ef=3D#the-dropzone-attribute>dropzone</a></code> attribute=
, so authors are
+      encouraged to use only <a href=3D#mime-type title=3D"MIME =
type">MIME types</a> or custom strings (without
+      spaces).</p>
+
+      <p>There is a limit of one <i>Plain Unicode string<=
/i> item per <a href=3D#the-drag-data-item-type-string title=3D&quo=
t;The drag data
+      item type string">item type string</a>.</p> &l=
t;!-- DND-v4: consider limiting the structured
+      objects too -->
+
+     </dd>
+
+     <dt>The actual data</dt>
+
+     <dd><p>A Unicode or binary string, in some cases with a=
 file name (itself a Unicode string),
+     <!-- (DND-v4:) or an object, --> as per <a href=3D#the-dra=
g-data-item-kind>the drag data item kind</a>.</dd>
+
+    </dl><p>The <a href=3D#drag-data-store-item-list>d=
rag data store item list</a> is ordered in the order that the items=
 were added
+    to the list; most recently added last.</p>
+
+   </li>
+
+   <li>
+
+    <p>The following information, used to generate the UI feedback=
 during the drag:</p>
+
+    <ul><li>User-agent-defined default feedback information,=
 known as the <dfn id=3Ddrag-data-store-default-feedback>drag data =
store default
+     feedback</dfn>.</li>
+
+     <li>Optionally, a bitmap image and the coordinate of a point =
within that image, known as the
+     <dfn id=3Ddrag-data-store-bitmap>drag data store bitmap</d=
fn> and <dfn id=3Ddrag-data-store-hot-spot-coordinate>drag data =
store hot spot coordinate</dfn>.</li>
+
+    </ul></li>
+
+   <li>
+
+    <p>A <dfn id=3Ddrag-data-store-mode>drag data store mode=
</dfn>, which is one of the following:</p>
+
+    <dl><dt><dfn id=3Dconcept-dnd-rw title=3Dconcept-dnd-=
rw>Read/write mode</dfn></dt>
+     <dd>
+
+      <p>For the <code title=3Devent-dragstart><a href=3D=
#event-dragstart>dragstart</a></code> event. New data can =
be added to the
+      <a href=3D#drag-data-store>drag data store</a>.</p&=
gt;
+
+     </dd>
+
+     <dt><dfn id=3Dconcept-dnd-ro title=3Dconcept-dnd-ro>Rea=
d-only mode</dfn></dt>
+     <dd>
+
+      <p>For the <code title=3Devent-drop><a href=3D#even=
t-drop>drop</a></code> event. The list of items representi=
ng dragged
+      data can be read, including the data. No new data can be added.&lt=
;/p>
+
+     </dd>
+
+     <dt><dfn id=3Dconcept-dnd-p title=3Dconcept-dnd-p>Prote=
cted mode</dfn></dt>
+     <dd>
+
+      <p>For all other events. The formats and kinds in the <a =
href=3D#drag-data-store>drag data store</a> list of
+      items representing dragged data can be enumerated, but the data it=
self is unavailable and no
+      new data can be added.</p>
+
+     </dd>
+
+    </dl></li>
+
+   <li>
+
+    <p>A <dfn id=3Ddrag-data-store-allowed-effects-state>dra=
g data store allowed effects state</dfn>, which is a string.</p&=
gt;
+
+   </li>
+
+  </ul><p>When a <a href=3D#drag-data-store>drag data =
store</a> is <dfn id=3Dcreate-a-drag-data-store title=3D"cr=
eate a drag data store">created</dfn>, it
+  must be initialized such that its <a href=3D#drag-data-store-item-l=
ist>drag data store item list</a> is empty, it has no
+  <a href=3D#drag-data-store-default-feedback>drag data store defa=
ult feedback</a>, it has no <a href=3D#drag-data-store-bitmap&gt=
;drag data store bitmap</a> and
+  <a href=3D#drag-data-store-hot-spot-coordinate>drag data store h=
ot spot coordinate</a>, its <a href=3D#drag-data-store-mode>d=
rag data store mode</a> is <a href=3D#concept-dnd-p title=3Dconc=
ept-dnd-p>protected mode</a>, and its <a href=3D#drag-data-st=
ore-allowed-effects-state>drag data store allowed effects
+  state</a> is the string "<code title=3D"">u=
ninitialized</code>".</p>
+
+
+  <h4 id=3Dthe-datatransfer-interface><span class=3Dsecno>8.=
7.3 </span>The <code><a href=3D#datatransfer>DataTransf=
er</a></code> interface</h4>
+
+  <p><code><a href=3D#datatransfer>DataTransfer</a&=
gt;</code> objects are used to expose the <a href=3D#drag-data-s=
tore>drag data store</a> that
+  underlies a drag-and-drop operation.</p>
+
+  <pre class=3Didl>interface <dfn id=3Ddatatransfer>DataTran=
sfer</dfn> {
+           attribute DOMString <a href=3D#dom-datatransfer-dropeffect=
 title=3Ddom-DataTransfer-dropEffect>dropEffect</a>;
+           attribute DOMString <a href=3D#dom-datatransfer-effectallo=
wed title=3Ddom-DataTransfer-effectAllowed>effectAllowed</a>;
+
+  readonly attribute <a href=3D#datatransferitemlist>DataTransferI=
temList</a> <a href=3D#dom-datatransfer-items title=3Ddom-DataTr=
ansfer-items>items</a>;
+
+  void <a href=3D#dom-datatransfer-setdragimage title=3Ddom-DataTrans=
fer-setDragImage>setDragImage</a>(Element image, long x, long y)=
;
+
+  /* old interface */
+  readonly attribute DOMString[] <a href=3D#dom-datatransfer-types ti=
tle=3Ddom-DataTransfer-types>types</a>;
+  DOMString <a href=3D#dom-datatransfer-getdata title=3Ddom-DataTrans=
fer-getData>getData</a>(DOMString format);
+  void <a href=3D#dom-datatransfer-setdata title=3Ddom-DataTransfer-s=
etData>setData</a>(DOMString format, DOMString data);
+  void <a href=3D#dom-datatransfer-cleardata title=3Ddom-DataTransfer=
-clearData>clearData</a>(optional DOMString format);
+  readonly attribute <a href=3D#filelist>FileList</a> <a =
href=3D#dom-datatransfer-files title=3Ddom-DataTransfer-files>files&lt=
;/a>;
+};</pre>
+
+  <dl class=3Ddomintro><dt><var title=3D"">d=
ataTransfer</var> . <code title=3Ddom-DataTransfer-dropEffect&gt=
;<a href=3D#dom-datatransfer-dropeffect>dropEffect</a></co=
de> [ =3D <var title=3D"">value</var> ]</dt&g=
t;
+
+   <dd>
+
+    <p>Returns the kind of operation that is currently selected. I=
f the kind of operation isn't one
+    of those that is allowed by the <code title=3Ddom-DataTransfer-ef=
fectAllowed><a href=3D#dom-datatransfer-effectallowed>effectAllo=
wed</a></code> attribute, then the operation will
+    fail.</p>
+
+    <p>Can be set, to change the selected operation.</p>
+
+    <p>The possible values are "<code title=3D""=
>none</code>", "<code title=3D"">copy&=
lt;/code>", "<code title=3D"">link</code&=
gt;", and "<code title=3D"">move</code>&q=
uot;.</p>
+
+   </dd>
+
+
+   <dt><var title=3D"">dataTransfer</var> . =
<code title=3Ddom-DataTransfer-effectAllowed><a href=3D#dom-data=
transfer-effectallowed>effectAllowed</a></code> [ =3D <=
var title=3D"">value</var> ]</dt>
+
+   <dd>
+
+    <p>Returns the kinds of operations that are to be allowed.<=
/p>
+
+    <p>Can be set (during the <code title=3Devent-dragstart>=
<a href=3D#event-dragstart>dragstart</a></code> event),=
 to change the
+    allowed operations.</p>
+
+    <p>The possible values are "<code title=3D""=
>none</code>", "<code title=3D"">copy&=
lt;/code>", "<code title=3D"">copyLink</c=
ode>", "<code title=3D"">copyMove</code&g=
t;", "<code title=3D"">link</code>",
+    "<code title=3D"">linkMove</code>", =
"<code title=3D"">move</code>", "&lt=
;code title=3D"">all</code>", and
+    "<code title=3D"">uninitialized</code>&qu=
ot;,</p>
+
+   </dd>
+
+
+   <dt><var title=3D"">dataTransfer</var> . =
<code title=3Ddom-DataTransfer-items><a href=3D#dom-datatransfer=
-items>items</a></code></dt>
+
+   <dd>
+
+    <p>Returns a <code><a href=3D#datatransferitemlist&gt=
;DataTransferItemList</a></code> object, with the drag data.&=
lt;/p>
+
+   </dd>
+
+
+   <dt><var title=3D"">dataTransfer</var> . =
<code title=3Ddom-DataTransfer-setDragImage><a href=3D#dom-datat=
ransfer-setdragimage>setDragImage</a></code>(<var title=
=3D"">element</var>, <var title=3D"">x=
</var>, <var title=3D"">y</var>)</dt>
+
+   <dd>
+
+    <p>Uses the given element to update the drag feedback, replaci=
ng any previously specified
+    feedback.</p>
+
+   </dd>
+  =20
+
+   <dt><var title=3D"">dataTransfer</var> . =
<code title=3Ddom-DataTransfer-types><a href=3D#dom-datatransfer=
-types>types</a></code></dt>
+
+   <dd>
+
+    <p>Returns an array listing the formats that were set in the &=
lt;code title=3Devent-dragstart><a href=3D#event-dragstart>drags=
tart</a></code> event. In addition, if any files are being dr=
agged,
+    then one of the types will be the string "<code title=3D&quo=
t;">Files</code>".</p>
+
+   </dd>
+
+
+   <dt><var title=3D"">data</var> =3D <va=
r title=3D"">dataTransfer</var> . <code title=3Ddom=
-DataTransfer-getData><a href=3D#dom-datatransfer-getdata>getDat=
a</a></code>(<var title=3D"">format</var&g=
t;)</dt>
+
+   <dd>
+
+    <p>Returns the specified data. If there is no such data, retur=
ns the empty string.</p>
+
+   </dd>
+
+
+   <dt><var title=3D"">dataTransfer</var> . =
<code title=3Ddom-DataTransfer-setData><a href=3D#dom-datatransf=
er-setdata>setData</a></code>(<var title=3D""=
>format</var>, <var title=3D"">data</var>)=
</dt>
+
+   <dd>
+
+    <p>Adds the specified data.</p>
+
+   </dd>
+
+
+   <dt><var title=3D"">dataTransfer</var> . =
<code title=3Ddom-DataTransfer-clearData><a href=3D#dom-datatran=
sfer-cleardata>clearData</a></code>( [ <var title=3D&qu=
ot;">format</var> ] )</dt>
+
+   <dd>
+
+    <p>Removes the data of the specified formats. Removes all data=
 if the argument is omitted.</p>
+
+   </dd>
+
+
+   <dt><var title=3D"">dataTransfer</var> . =
<code title=3Ddom-DataTransfer-files><a href=3D#dom-datatransfer=
-files>files</a></code></dt>
+
+   <dd>
+
+    <p>Returns a <code><a href=3D#filelist>FileList&lt=
;/a></code> of the files being dragged, if any.</p>
+
+   </dd>
+
+  </dl><p><code><a href=3D#datatransfer>DataTran=
sfer</a></code> objects are used during the <a href=3D#dnd=
events>drag-and-drop
+  events</a>, and are only valid while those events are being fire=
d.</p>
+
+  <div class=3Dimpl>
+
+  <p>A <code><a href=3D#datatransfer>DataTransfer</=
a></code> object is associated with a <a href=3D#drag-data-st=
ore>drag data store</a> while it
+  is valid.</p>
+
+  <p>The <dfn id=3Ddom-datatransfer-dropeffect title=3Ddom-Data=
Transfer-dropEffect><code>dropEffect</code></dfn> at=
tribute controls
+  the drag-and-drop feedback that the user is given during a drag-and-dr=
op operation. When the
+  <code><a href=3D#datatransfer>DataTransfer</a></c=
ode> object is created, the <code title=3Ddom-DataTransfer-dropEffe=
ct><a href=3D#dom-datatransfer-dropeffect>dropEffect</a>&l=
t;/code> attribute is set to a string value. On
+  getting, it must return its current value. On setting, if the new valu=
e is one of "<code title=3D"">none</code>&quot=
;, "<code title=3D"">copy</code>", "=
<code title=3D"">link</code>", or "<co=
de title=3D"">move</code>", then the attribute's =
current value must be set to the new value. Other
+  values must be ignored.</p>
+
+  <p>The <dfn id=3Ddom-datatransfer-effectallowed title=3Ddom-D=
ataTransfer-effectAllowed><code>effectAllowed</code></d=
fn> attribute is
+  used in the drag-and-drop processing model to initialize the <code =
title=3Ddom-DataTransfer-dropEffect><a href=3D#dom-datatransfer-dro=
peffect>dropEffect</a></code> attribute during the <cod=
e title=3Devent-dragenter><a href=3D#event-dragenter>dragenter&l=
t;/a></code> and <code title=3Devent-dragover><a href=3D=
#event-dragover>dragover</a></code> events.
+  When the <code><a href=3D#datatransfer>DataTransfer</a&=
gt;</code> object is created, the <code title=3Ddom-DataTransfer=
-effectAllowed><a href=3D#dom-datatransfer-effectallowed>effectA=
llowed</a></code> attribute is set to a string value. On
+  getting, it must return its current value. On setting, if <a href=3D=
#drag-data-store>drag data store</a>'s <a href=3D#drag-data-s=
tore-mode title=3D"drag data store mode">mode</a> is t=
he <a href=3D#concept-dnd-rw title=3Dconcept-dnd-rw>read/write
+  mode</a> and the new value is one of "<code title=3D&quo=
t;">none</code>", "<code title=3D""&=
gt;copy</code>", "<code title=3D"">copyLi=
nk</code>", "<code title=3D"">copyMove&lt=
;/code>", "<code title=3D"">link</code&gt=
;", "<code title=3D"">linkMove</code>&quo=
t;, "<code title=3D"">move</code>", &quot=
;<code title=3D"">all</code>", or "<co=
de title=3D"">uninitialized</code>", then the att=
ribute's current value
+  must be set to the new value. Otherwise it must be left unchanged.<=
/p>
+
+  <p>The <dfn id=3Ddom-datatransfer-items title=3Ddom-DataTrans=
fer-items><code>items</code></dfn> attribute must re=
turn a
+  <code><a href=3D#datatransferitemlist>DataTransferItemList=
</a></code> object associated with the <code><a href=
=3D#datatransfer>DataTransfer</a></code> object. The
+  same object must be returned each time.</p>
+
+  <p>The <dfn id=3Ddom-datatransfer-setdragimage title=3Ddom-Da=
taTransfer-setDragImage><code>setDragImage(<var title=3D&quot=
;">element</var>,
+  <var title=3D"">x</var>, <var title=3D"&=
quot;>y</var>)</code></dfn> method must run the foll=
owing
+  steps:</p>
+
+  <ol><li><p>If the <code><a href=3D#datatran=
sfer>DataTransfer</a></code> object is no longer associate=
d with a <a href=3D#drag-data-store>drag data
+   store</a>, abort these steps. Nothing happens.</li>
+
+   <li><p>If the <a href=3D#drag-data-store>drag data =
store</a>'s <a href=3D#drag-data-store-mode title=3D"drag d=
ata store mode">mode</a> is
+   not the <a href=3D#concept-dnd-rw title=3Dconcept-dnd-rw>read/w=
rite mode</a>, abort these steps. Nothing
+   happens.</li>
+
+   <li><p>If the <var title=3D"">element<=
/var> argument is an <code><a href=3D#the-img-element>img&=
lt;/a></code> element, then set the
+   <a href=3D#drag-data-store-bitmap>drag data store bitmap</a&=
gt; to the element's image (at its intrinsic size); otherwise,
+   set the <a href=3D#drag-data-store-bitmap>drag data store bitma=
p</a> to an image generated from the given element (the
+   exact mechanism for doing so is not currently specified).</li>
+
+   <li><p>Set the <a href=3D#drag-data-store-hot-spot-coo=
rdinate>drag data store hot spot coordinate</a> to the given &lt=
;var title=3D"">x</var>, <var title=3D""&=
gt;y</var> coordinate.</li>
+
+  </ol><p>The <dfn id=3Ddom-datatransfer-types title=3Ddo=
m-DataTransfer-types><code>types</code></dfn> attrib=
ute must return a
+  <a href=3D#live>live</a> <a href=3D#dfn-read-only-array=
 title=3Ddfn-read-only-array>read only</a> array giving the stri=
ngs that
+  the following steps would produce. The same object must be returned ea=
ch time.</p>
+
+  <ol><li><p>Start with an empty list <var title=3D=
"">L</var>.</li>
+
+   <li><p>If the <code><a href=3D#datatransfer>D=
ataTransfer</a></code> object is no longer associated with a =
<a href=3D#drag-data-store>drag data
+   store</a>, the array is empty. Abort these steps; return the em=
pty list <var title=3D"">L</var>.</li>
+
+   <li><p>For each item in the <a href=3D#drag-data-store=
-item-list>drag data store item list</a> <!-- in some order..=
.? -->
+   whose <a href=3D#the-drag-data-item-kind title=3D"the drag da=
ta item kind">kind</a> is <i>Plain Unicode string<=
/i>, add an
+   entry to the list <var title=3D"">L</var> consi=
sting of the item's <a href=3D#the-drag-data-item-type-string title=3D=
"the drag data item
+   type string">type string</a>.</li>
+
+   <li><p>If there are any items in the <a href=3D#drag-d=
ata-store-item-list>drag data store item list</a> whose <a hr=
ef=3D#the-drag-data-item-kind title=3D"the drag data item kind"=
>kind</a> is <i><a href=3D#file>File</a></i=
>, then add an entry to the list <var title=3D"">L<=
/var> consisting of the string "<code title=3D"">=
Files</code>". (This value can be
+   distinguished from the other values because it is not lowercase.)<=
/li>
+
+   <!-- <li><p>Sort the list...?</p></li> --&=
gt;
+
+   <li><p>The strings produced by these steps are those in t=
he list <var title=3D"">L</var>.</li>
+
+  </ol><p>The <dfn id=3Ddom-datatransfer-getdata title=3D=
dom-DataTransfer-getData><code>getData(<var title=3D"&qu=
ot;>format</var>)</code></dfn> method must run the f=
ollowing steps:</p>
+
+  <ol><li><p>If the <code><a href=3D#datatran=
sfer>DataTransfer</a></code> object is no longer associate=
d with a <a href=3D#drag-data-store>drag data
+   store</a>, return the empty string and abort these steps.</l=
i>
+
+   <li><p>If the <a href=3D#drag-data-store>drag data =
store</a>'s <a href=3D#drag-data-store-mode title=3D"drag d=
ata store mode">mode</a> is
+   the <a href=3D#concept-dnd-p title=3Dconcept-dnd-p>protected mo=
de</a>, return the empty string and abort these
+   steps.</li>
+
+   <li><p>Let <var title=3D"">format</var=
> be the first argument, <a href=3D#converted-to-ascii-lowercase&gt=
;converted to ASCII
+   lowercase</a>.</li>
+
+   <li><p>Let <var title=3D"">convert-to-URL=
</var> be false.</li>
+
+   <li><p>If <var title=3D"">format</var&=
gt; equals "<code title=3D"">text</code>"=
, change it to "<code title=3D"">text/plain</code=
>".</li>
+
+   <li><p>If <var title=3D"">format</var&=
gt; equals "<code title=3D"">url</code>",=
 change it to "<code title=3D"">text/uri-list</co=
de>" and set <var title=3D"">convert-to-URL</v=
ar> to true.</li>
+
+   <li><p>If there is no item in the <a href=3D#drag-data=
-store-item-list>drag data store item list</a> whose <a href=3D=
#the-drag-data-item-kind title=3D"the
+   drag data item kind">kind</a> is <i>Plain Unicode=
 string</i> and whose <a href=3D#the-drag-data-item-type-string =
title=3D"the drag
+   data item type string">type string</a> is equal to <=
var title=3D"">format</var>, return the
+   empty string and abort these steps.</li>
+
+   <li><p>Let <var title=3D"">result</var=
> be the data of the item in the <a href=3D#drag-data-store-item-li=
st>drag data store item
+   list</a> whose <a href=3D#the-drag-data-item-kind title=3D&q=
uot;the drag data item kind">kind</a> is <i>Plain Uni=
code
+   string</i> and whose <a href=3D#the-drag-data-item-type-stri=
ng title=3D"the drag data item type string">type string</=
a> is equal to
+   <var title=3D"">format</var>.</li>
+
+   <li><p>If <var title=3D"">convert-to-URL&=
lt;/var> is true, then parse <var title=3D"">result&lt=
;/var> as
+   appropriate for <code title=3D"">text/uri-list</co=
de> data, and then set <var title=3D"">result</var&=
gt;
+   to the first URL from the list, if any, or the empty string otherwise=
. <a href=3D#refsRFC2483>[RFC2483]</a></li>
+
+   <li><p>Return <var title=3D"">result</=
var>.</li>
+
+  </ol><p>The <dfn id=3Ddom-datatransfer-setdata title=3D=
dom-DataTransfer-setData><code>setData(<var title=3D"&qu=
ot;>format</var>, <var title=3D"">data</var&g=
t;)</code></dfn> method must run the following steps:</p&g=
t;
+
+  <ol><li><p>If the <code><a href=3D#datatran=
sfer>DataTransfer</a></code> object is no longer associate=
d with a <a href=3D#drag-data-store>drag data
+   store</a>, abort these steps. Nothing happens.</li>
+
+   <li><p>If the <a href=3D#drag-data-store>drag data =
store</a>'s <a href=3D#drag-data-store-mode title=3D"drag d=
ata store mode">mode</a> is
+   not the <a href=3D#concept-dnd-rw title=3Dconcept-dnd-rw>read/w=
rite mode</a>, abort these steps. Nothing
+   happens.</li>
+
+   <li><p>Let <var title=3D"">format</var=
> be the first argument, <a href=3D#converted-to-ascii-lowercase&gt=
;converted to ASCII
+   lowercase</a>.</li>
+
+   <li>
+
+    <p>If <var title=3D"">format</var> equal=
s "<code title=3D"">text</code>", change =
it to "<code title=3D"">text/plain</code>&quot=
;.</p>
+
+    <p>If <var title=3D"">format</var> equal=
s "<code title=3D"">url</code>", change i=
t to "<code title=3D"">text/uri-list</code>&qu=
ot;.</p>
+
+   </li>
+
+   <li><p>Remove the item in the <a href=3D#drag-data-sto=
re-item-list>drag data store item list</a> whose <a href=3D#t=
he-drag-data-item-kind title=3D"the drag
+   data item kind">kind</a> is <i>Plain Unicode stri=
ng</i> and whose <a href=3D#the-drag-data-item-type-string title=
=3D"the drag data
+   item type string">type string</a> is equal to <var t=
itle=3D"">format</var>, if there is
+   one.</li>
+
+   <li><p>Add an item to the <a href=3D#drag-data-store-i=
tem-list>drag data store item list</a> whose <a href=3D#the-d=
rag-data-item-kind title=3D"the drag data
+   item kind">kind</a> is <i>Plain Unicode string&lt=
;/i>, whose <a href=3D#the-drag-data-item-type-string title=3D&quot=
;the drag data item type
+   string">type string</a> is equal to <var title=3D&qu=
ot;">format</var>, and whose data is the string
+   given by the method's second argument.</li>
+
+  </ol><p>The <dfn id=3Ddom-datatransfer-cleardata title=3D=
dom-DataTransfer-clearData><code>clearData()</code></df=
n> method must run the
+  following steps:</p>
+
+  <ol><li><p>If the <code><a href=3D#datatran=
sfer>DataTransfer</a></code> object is no longer associate=
d with a <a href=3D#drag-data-store>drag data
+   store</a>, abort these steps. Nothing happens.</li>
+
+   <li><p>If the <a href=3D#drag-data-store>drag data =
store</a>'s <a href=3D#drag-data-store-mode title=3D"drag d=
ata store mode">mode</a> is
+   not the <a href=3D#concept-dnd-rw title=3Dconcept-dnd-rw>read/w=
rite mode</a>, abort these steps. Nothing
+   happens.</li>
+
+   <li><p>If the method was called with no arguments, remove=
 each item in the <a href=3D#drag-data-store-item-list>drag data st=
ore
+   item list</a> whose <a href=3D#the-drag-data-item-kind title=
=3D"the drag data item kind">kind</a> is <i>Plai=
n Unicode
+   string</i>, and abort these steps.</li>
+
+   <li><p>Let <var title=3D"">format</var=
> be the first argument, <a href=3D#converted-to-ascii-lowercase&gt=
;converted to ASCII
+   lowercase</a>.</li>
+
+   <li>
+
+    <p>If <var title=3D"">format</var> equal=
s "<code title=3D"">text</code>", change =
it to "<code title=3D"">text/plain</code>&quot=
;.</p>
+
+    <p>If <var title=3D"">format</var> equal=
s "<code title=3D"">url</code>", change i=
t to "<code title=3D"">text/uri-list</code>&qu=
ot;.</p>
+
+   </li>
+
+   <li><p>Remove the item in the <a href=3D#drag-data-sto=
re-item-list>drag data store item list</a> whose <a href=3D#t=
he-drag-data-item-kind title=3D"the drag
+   data item kind">kind</a> is <i>Plain Unicode stri=
ng</i> and whose <a href=3D#the-drag-data-item-type-string title=
=3D"the drag data
+   item type string">type string</a> is equal to <var t=
itle=3D"">format</var>, if there is
+   one.</li>
+
+  </ol><p class=3Dnote>The <code title=3Ddom-DataTransfer=
-clearData><a href=3D#dom-datatransfer-cleardata>clearData()<=
/a></code> method does not
+  affect whether any files were included in the drag, so the <code ti=
tle=3Ddom-DataTransfer-types><a href=3D#dom-datatransfer-types>t=
ypes</a></code> attribute's list might still not be empty aft=
er
+  calling <code title=3Ddom-DataTransfer-clearData><a href=3D#d=
om-datatransfer-cleardata>clearData()</a></code> (it would=
 still contain the
+  "<code title=3D"">Files</code>" string=
 if any files were included in the drag).</p>
+
+  <p>The <dfn id=3Ddom-datatransfer-files title=3Ddom-DataTrans=
fer-files><code>files</code></dfn> attribute must re=
turn a
+  <a href=3D#live>live</a> <code><a href=3D#filelis=
t>FileList</a></code> sequence consisting of <code>&=
lt;a href=3D#file>File</a></code> objects
+  representing the files found by the following steps. The same object m=
ust be returned each time.
+  Furthermore, for a given <code><a href=3D#filelist>FileLis=
t</a></code> object and a given underlying file, the same
+  <code><a href=3D#file>File</a></code> object m=
ust be used each time.</p>
+
+  <ol><li><p>Start with an empty list <var title=3D=
"">L</var>.</li>
+
+   <li><p>If the <code><a href=3D#datatransfer>D=
ataTransfer</a></code> object is no longer associated with a =
<a href=3D#drag-data-store>drag data
+   store</a>, the <code><a href=3D#filelist>FileList&l=
t;/a></code> is empty. Abort these steps; return the empty list =
<var title=3D"">L</var>.</li>
+
+   <li><p>If the <a href=3D#drag-data-store>drag data =
store</a>'s <a href=3D#drag-data-store-mode title=3D"drag d=
ata store mode">mode</a> is
+   the <a href=3D#concept-dnd-p title=3Dconcept-dnd-p>protected mo=
de</a>, abort these steps; return the empty list
+   <var title=3D"">L</var>.</li>
+
+   <li><p>For each item in the <a href=3D#drag-data-store=
-item-list>drag data store item list</a> <!-- in some order..=
.? -->
+   whose <a href=3D#the-drag-data-item-kind title=3D"the drag da=
ta item kind">kind</a> is <i><a href=3D#file>Fi=
le</a></i> <!-- DND-v3: (not
+   <i>Blob</i>) -->, add the item's data (the file, in pa=
rticular its name and contents, as well as
+   its <a href=3D#the-drag-data-item-type-string title=3D"the dr=
ag data item type string">type</a>) to the list <var tit=
le=3D"">L</var>.</li>
+
+   <!-- <li><p>Sort the list...?</p></li> --&=
gt;
+
+   <li><p>The files found by these steps are those in the li=
st <var title=3D"">L</var>.</li>
+
+  </ol><p class=3Dnote>This version of the API does not expo=
se the types of the files during the
+  drag.</p>
+
+  </div>
+
+
+  <h5 id=3Dthe-datatransferitemlist-interface><span class=3Dsec=
no>8.7.3.1 </span>The <code><a href=3D#datatransferitem=
list>DataTransferItemList</a></code> interface</h5>
+
+  <p>Each <code><a href=3D#datatransfer>DataTransfer&l=
t;/a></code> object is associated with a <code><a href=3D=
#datatransferitemlist>DataTransferItemList</a></code>
+  object.</p>
+
+  <pre class=3Didl>interface <dfn id=3Ddatatransferitemlist>=
DataTransferItemList</dfn> {
+  readonly attribute unsigned long <a href=3D#dom-datatransferitemlis=
t-length title=3Ddom-DataTransferItemList-length>length</a>;
+  <a href=3D#dom-datatransferitemlist-item title=3Ddom-DataTransferIt=
emList-item>getter</a> <a href=3D#datatransferitem>DataTra=
nsferItem</a> (unsigned long index);
+  <a href=3D#datatransferitem>DataTransferItem</a>? <a hr=
ef=3D#dom-datatransferitemlist-add title=3Ddom-DataTransferItemList-add&g=
t;add</a>(DOMString data, DOMString type);<!--
+DND-v3:  <span>DataTransferItem</span>? <span title=3D&qu=
ot;dom-DataTransferItemList-add">add</span>(<span>Blo=
b</span> data);-->
+  <a href=3D#datatransferitem>DataTransferItem</a>? <a hr=
ef=3D#dom-datatransferitemlist-add title=3Ddom-DataTransferItemList-add&g=
t;add</a>(<a href=3D#file>File</a> data);<!--
+DND-v4:  <span>DataTransferItem</span>? <span title=3D&qu=
ot;dom-DataTransferItemList-add">add</span>(any data, DOMSt=
ring type);--><!--
+DND-v5:  <span>DataTransferItem</span>? <span title=3D&qu=
ot;dom-DataTransferItemList-add">add</span>(<span>Dat=
aTransferPromise</span> data);-->
+  void <a href=3D#dom-datatransferitemlist-remove title=3Ddom-DataTra=
nsferItemList-remove>remove</a>(unsigned long index);
+  void <a href=3D#dom-datatransferitemlist-clear title=3Ddom-DataTran=
sferItemList-clear>clear</a>();
+};</pre>
+
+  <dl class=3Ddomintro><dt><var title=3D"">i=
tems</var> . <code title=3Ddom-DataTransferItemList-length>&l=
t;a href=3D#dom-datatransferitemlist-length>length</a></code&=
gt;</dt>
+
+   <dd><p>Returns the number of items in the <a href=3D#d=
rag-data-store>drag data store</a>.</dd>
+
+
+   <dt><var title=3D"">items</var>[<var t=
itle=3D"">index</var>]</dt>
+
+   <dd>
+
+    <p>Returns the <code><a href=3D#datatransferitem>D=
ataTransferItem</a></code> object representing the <var ti=
tle=3D"">index</var>th
+    entry in the <a href=3D#drag-data-store>drag data store</a&=
gt;.</p>
+
+   </dd>
+
+
+   <dt><var title=3D"">items</var> . <cod=
e title=3Ddom-DataTransferItemList-remove><a href=3D#dom-datatransf=
eritemlist-remove>remove</a></code>(<var title=3D"=
">index</var>)</dt>
+
+   <dd>
+
+    <p>Removes the <var title=3D"">index</var&g=
t;th entry in the <a href=3D#drag-data-store>drag data store</a&=
gt;.</p>
+
+   </dd>
+
+
+   <dt><var title=3D"">items</var> . <cod=
e title=3Ddom-DataTransferItemList-clear><a href=3D#dom-datatransfe=
ritemlist-clear>clear</a></code>()</dt>
+
+   <dd>
+
+    <p>Removes all the entries in the <a href=3D#drag-data-stor=
e>drag data store</a>.</p>
+
+   </dd>
+
+
+   <dt><var title=3D"">items</var> . <cod=
e title=3Ddom-DataTransferItemList-add><a href=3D#dom-datatransferi=
temlist-add>add</a></code>(<var title=3D""&gt=
;data</var>)</dt>
+   <dt><var title=3D"">items</var> . <cod=
e title=3Ddom-DataTransferItemList-add><a href=3D#dom-datatransferi=
temlist-add>add</a></code>(<var title=3D""&gt=
;data</var>, <var title=3D"">type</var>)</=
dt>
+
+   <dd>
+
+    <p>Adds a new entry for the given data to the <a href=3D#dr=
ag-data-store>drag data store</a>. If the data is plain
+    text <!-- DND-v4: or an object --> then a <var title=3D&quo=
t;">type</var> string has to be provided
+    also.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>While the <code><a href=3D#datatransferitemlist>D=
ataTransferItemList</a></code> object's <code><a hre=
f=3D#datatransfer>DataTransfer</a></code> object is
+  associated with a <a href=3D#drag-data-store>drag data store<=
/a>, the <code><a href=3D#datatransferitemlist>DataTransfe=
rItemList</a></code> object's
+  <i>mode</i> is the same as the <a href=3D#drag-data-sto=
re-mode>drag data store mode</a>. When the
+  <code><a href=3D#datatransferitemlist>DataTransferItemList=
</a></code> object's <code><a href=3D#datatransfer&g=
t;DataTransfer</a></code> object is <em>not</em>
+  associated with a <a href=3D#drag-data-store>drag data store<=
/a>, the <code><a href=3D#datatransferitemlist>DataTransfe=
rItemList</a></code> object's
+  <i>mode</i> is the <i>disabled mode</i>. The &=
lt;a href=3D#drag-data-store>drag data store</a> referenced in t=
his
+  section (which is used only when the <code><a href=3D#datatra=
nsferitemlist>DataTransferItemList</a></code> object is no=
t in the
+  <i>disabled mode</i>) is the <a href=3D#drag-data-store=
>drag data store</a> with which the
+  <code><a href=3D#datatransferitemlist>DataTransferItemList=
</a></code> object's <code><a href=3D#datatransfer&g=
t;DataTransfer</a></code> object is associated.</p>
+
+  <p>The <dfn id=3Ddom-datatransferitemlist-length title=3Ddom-=
DataTransferItemList-length><code>length</code></dfn&gt=
; attribute must
+  return zero if the object is in the <i>disabled mode</i>; =
otherwise it must return the number of
+  items in the <a href=3D#drag-data-store-item-list>drag data stor=
e item list</a>.</p>
+
+  <p>When a <code><a href=3D#datatransferitemlist>Data=
TransferItemList</a></code> object is not in the <i>dis=
abled mode</i>, its
+  <a href=3D#supported-property-indices>supported property indices=
</a> are the numbers in the range
+
+    <span title=3D"">0 .. <var title=3D""&g=
t;n</var>-1</span>,
+
+  where <var title=3D"">n</var> is the number of i=
tems in the <a href=3D#drag-data-store-item-list>drag data store it=
em
+  list</a>.</p>
+
+  <p>To <dfn id=3Ddom-datatransferitemlist-item title=3Ddom-Dat=
aTransferItemList-item>determine the value of an indexed property</=
dfn>
+  <var title=3D"">i</var> of a <code><a h=
ref=3D#datatransferitemlist>DataTransferItemList</a></code&gt=
; object, the user agent must return a
+  <code><a href=3D#datatransferitem>DataTransferItem</a&g=
t;</code> object representing the <var title=3D"">i=
</var>th item in the
+  <a href=3D#drag-data-store>drag data store</a>. The same o=
bject must be returned each time a particular item is
+  obtained from this <code><a href=3D#datatransferitemlist>D=
ataTransferItemList</a></code> object. The <code><a =
href=3D#datatransferitem>DataTransferItem</a></code>
+  object must be associated with the same <code><a href=3D#data=
transfer>DataTransfer</a></code> object as the
+  <code><a href=3D#datatransferitemlist>DataTransferItemList=
</a></code> object when it is first created.</p>
+
+  <p>The <dfn id=3Ddom-datatransferitemlist-add title=3Ddom-Dat=
aTransferItemList-add><code>add()</code></dfn> metho=
d must run the
+  following steps:</p>
+
+  <ol><li><p>If the <code><a href=3D#datatran=
sferitemlist>DataTransferItemList</a></code> object is not=
 in the <i title=3Dconcept-dnd-rw><a href=3D#concept-dnd-rw>r=
ead/write mode</a></i>, return null and abort these steps.&lt=
;/li>
+
+   <li>
+
+    <p>Jump to the appropriate set of steps from the following lis=
t:</p>
+
+    <dl class=3Dswitch><dt>If the first argument to the meth=
od is a string</dt>
+
+     <dd>
+
+      <p>If there is already an item in the <a href=3D#drag-dat=
a-store-item-list>drag data store item list</a> whose <a href=
=3D#the-drag-data-item-kind title=3D"the drag data item kind"&g=
t;kind</a> is <i>Plain Unicode string</i> and whose &lt=
;a href=3D#the-drag-data-item-type-string title=3D"the drag data ite=
m type string">type string</a> is equal to the value of the
+      method's second argument, <a href=3D#converted-to-ascii-lowerca=
se>converted to ASCII lowercase</a>, then throw a
+      <code><a href=3D#notsupportederror>NotSupportedError&l=
t;/a></code> exception and abort these steps.</p>
+
+      <p>Otherwise, add an item to the <a href=3D#drag-data-sto=
re-item-list>drag data store item list</a> whose <a href=3D#t=
he-drag-data-item-kind title=3D"the
+      drag data item kind">kind</a> is <i>Plain Unic=
ode string</i>, whose <a href=3D#the-drag-data-item-type-string =
title=3D"the drag
+      data item type string">type string</a> is equal to t=
he value of the method's second
+      argument, <a href=3D#converted-to-ascii-lowercase>converted =
to ASCII lowercase</a>, and whose data is the string given by the
+      method's first argument.</p>
+
+     </dd>
+
+<!--DND-v3:
+     <dt>If the first argument to the method is a <code>Blob=
</code></dt>
+
+     <dd>
+
+      <p>Add an item to the <span>drag data store item list&=
lt;/span> whose <span title=3D"the drag data
+      item kind">kind</span> is <i>Blob</i>, w=
hose <span title=3D"the drag data item type string">type
+      string</span> is the <code title=3D"dom-Blob-type&qu=
ot;>type</code> of the <code>Blob</code>,
+      <span>converted to ASCII lowercase</span>, and whose d=
ata is the same as the
+      <code>Blob</code>'s data.</p>
+
+     </dd>
+-->
+
+     <dt>If the first argument to the method is a <code><=
a href=3D#file>File</a></code></dt>
+
+     <dd>
+
+      <p>Add an item to the <a href=3D#drag-data-store-item-lis=
t>drag data store item list</a> whose <a href=3D#the-drag-dat=
a-item-kind title=3D"the drag data
+      item kind">kind</a> is <i><a href=3D#file&g=
t;File</a></i>, whose <a href=3D#the-drag-data-item-type-s=
tring title=3D"the drag data item type string">type
+      string</a> is the <code title=3Ddom-Blob-type>type<=
/code> of the <code><a href=3D#file>File</a></cod=
e>,
+      <a href=3D#converted-to-ascii-lowercase>converted to ASCII l=
owercase</a>, and whose data is the same as the
+      <code><a href=3D#file>File</a></code>'s da=
ta.</p>
+
+     </dd>
+
+<!--DND-v4: (might want to prevent duplicates like for strings; see a=
bove)
+[make sure that the cloning happens before any side-effects can happen]
+     <dt>Otherwise
+
+     <dd>
+
+      <p>Add an item to the <span>drag data store item list&=
lt;/span> whose <span title=3D"the drag data
+      item kind">kind</span> is <i>Object</i>,=
 whose <span title=3D"the drag data item type
+      string">type string</span> is equal to the value of =
the method's second argument,
+      <span>converted to ASCII lowercase</span>, and whose d=
ata is a <span>structured clone</span>
+      of the method's first argument. If creating the clone throws an ex=
ception, then throw that
+      exception and abort these steps.</p>
+
+     </dd>
+-->
+
+    </dl></li>
+
+   <li><p><a href=3D#dom-datatransferitemlist-item title=3D=
dom-DataTransferItemList-item>Determine the value of the indexed
+   property</a> corresponding to the newly added item, and return =
that value (a newly created
+   <code><a href=3D#datatransferitem>DataTransferItem</a&=
gt;</code> object).</li>
+
+  </ol><p>The <dfn id=3Ddom-datatransferitemlist-remove t=
itle=3Ddom-DataTransferItemList-remove><code>remove()</code&g=
t;</dfn> method, when
+  invoked with the argument <var title=3D"">i</var&gt=
;, must run these steps:</p>
+
+  <ol><li><p>If the <code><a href=3D#datatran=
sferitemlist>DataTransferItemList</a></code> object is not=
 in the <i title=3Dconcept-dnd-rw><a href=3D#concept-dnd-rw>r=
ead/write mode</a></i>, throw an <code><a href=3D#in=
validstateerror>InvalidStateError</a></code> exception and
+   abort these steps.</li>
+
+   <li><p>Remove the <var title=3D"">i</v=
ar>th item from the <a href=3D#drag-data-store>drag data store&l=
t;/a>.</li>
+
+  </ol><p>The <dfn id=3Ddom-datatransferitemlist-clear ti=
tle=3Ddom-DataTransferItemList-clear><code>clear</code>&lt=
;/dfn> method, if the
+  <code><a href=3D#datatransferitemlist>DataTransferItemList=
</a></code> object is in the <i title=3Dconcept-dnd-rw>=
<a href=3D#concept-dnd-rw>read/write mode</a></i>,
+  must remove all the items from the <a href=3D#drag-data-store>dr=
ag data store</a>. Otherwise, it must do
+  nothing.</p>
+
+  </div>
+
+
+  <h5 id=3Dthe-datatransferitem-interface><span class=3Dsecno&g=
t;8.7.3.2 </span>The <code><a href=3D#datatransferitem>=
DataTransferItem</a></code> interface</h5>
+
+  <p>Each <code><a href=3D#datatransferitem>DataTransf=
erItem</a></code> object is associated with a <code>&lt=
;a href=3D#datatransfer>DataTransfer</a></code>
+  object.</p>
+
+  <pre class=3Didl>interface <dfn id=3Ddatatransferitem>Data=
TransferItem</dfn> {
+  readonly attribute DOMString <a href=3D#dom-datatransferitem-kind t=
itle=3Ddom-DataTransferItem-kind>kind</a>;
+  readonly attribute DOMString <a href=3D#dom-datatransferitem-type t=
itle=3Ddom-DataTransferItem-type>type</a>;
+  void <a href=3D#dom-datatransferitem-getasstring title=3Ddom-DataTr=
ansferItem-getAsString>getAsString</a>(<a href=3D#functionstr=
ingcallback>FunctionStringCallback</a>? _callback);<!--
+DND-v3:  <span>Blob</span> <span title=3D"dom-DataTr=
ansferItem-getAsBlob">getAsBlob</span>();-->
+  <a href=3D#file>File</a>? <a href=3D#dom-datatransferit=
em-getasfile title=3Ddom-DataTransferItem-getAsFile>getAsFile</a&gt=
;();<!--
+DND-v4:  void <span title=3D"dom-DataTransferItem-getAsObject&qu=
ot;>getAsObject</span>(<span>FunctionObjectCallback</sp=
an> _callback);-->
+};
+
+callback <dfn id=3Dfunctionstringcallback>FunctionStringCallback&l=
t;/dfn> =3D void (DOMString data);<!--
+
+// DND-v4:
+callback <dfn>FunctionObjectCallback</dfn> =3D void (any dat=
a);--></pre>
+
+  <dl class=3Ddomintro><dt><var title=3D"">i=
tem</var> . <code title=3Ddom-DataTransferItem-kind><a hre=
f=3D#dom-datatransferitem-kind>kind</a></code></dt>
+   <dd>
+
+    <p>Returns <a href=3D#the-drag-data-item-kind>the drag d=
ata item kind</a>, one of: "string",
+    <!-- DND-v3: "blob", --> "file"<!-- DND=
-v4: , "object" -->.</p>
+
+   </dd>
+
+   <dt><var title=3D"">item</var> . <code=
 title=3Ddom-DataTransferItem-type><a href=3D#dom-datatransferitem-=
type>type</a></code></dt>
+   <dd>
+
+    <p>Returns <a href=3D#the-drag-data-item-type-string>the=
 drag data item type string</a>.</p>
+
+   </dd>
+
+   <dt><var title=3D"">item</var> . <code=
 title=3Ddom-DataTransferItem-getAsString><a href=3D#dom-datatransf=
eritem-getasstring>getAsString</a></code>(<var title=3D=
"">callback</var>)</dt>
+   <dd>
+
+    <p>Invokes the callback with the string data as the argument, =
if <a href=3D#the-drag-data-item-kind>the drag data item
+    kind</a> is <i>Plain Unicode string</i>.</p>
+
+   </dd>
+
+<!-- DND-v3:
+   <dt><var title=3D"">file</var> =3D <va=
r title=3D"">item</var> . <code title=3D"dom-D=
ataTransferItem-getAsBlob">getAsBlob</code>()</dt>
+   <dd>
+
+    <p>Returns a <code>Blob</code> object, if <span=
>the drag data item kind</span> is <i>Blob</i> or &l=
t;i>File</i>.</p>
+
+   </dd>
+-->
+
+   <dt><var title=3D"">file</var> =3D <va=
r title=3D"">item</var> . <code title=3Ddom-DataTra=
nsferItem-getAsFile><a href=3D#dom-datatransferitem-getasfile>ge=
tAsFile</a></code>()</dt>
+   <dd>
+
+    <p>Returns a <code><a href=3D#file>File</a>&=
lt;/code> object, if <a href=3D#the-drag-data-item-kind>the drag=
 data item kind</a> is <i><a href=3D#file>File</a&gt=
;</i>.</p>
+
+   </dd>
+
+<!-- DND-v4:
+   <dt><var title=3D"">file</var> =3D <va=
r title=3D"">item</var> . <code title=3D"dom-D=
ataTransferItem-getAsObject">getAsObject</code>()</dt&gt=
;
+   <dd>
+
+    <p>Invokes the callback with the cloned object data as the arg=
ument, if <span>the drag data item
+    kind</span> is <i>Plain Unicode string</i> or <=
i>Object</i>.</p>
+
+   </dd>
+-->
+
+  </dl><div class=3Dimpl>
+
+  <p>While the <code><a href=3D#datatransferitem>DataT=
ransferItem</a></code> object's <code><a href=3D#dat=
atransfer>DataTransfer</a></code> object is associated
+  with a <a href=3D#drag-data-store>drag data store</a> and =
that <a href=3D#drag-data-store>drag data store</a>'s <a h=
ref=3D#drag-data-store-item-list>drag data store
+  item list</a> still contains the item that the <code><a=
 href=3D#datatransferitem>DataTransferItem</a></code> obje=
ct represents,
+  the <code><a href=3D#datatransferitem>DataTransferItem<=
/a></code> object's <i>mode</i> is the same as the &=
lt;a href=3D#drag-data-store-mode>drag data store
+  mode</a>. When the <code><a href=3D#datatransferitem&gt=
;DataTransferItem</a></code> object's <code><a href=3D=
#datatransfer>DataTransfer</a></code> object is
+  <em>not</em> associated with a <a href=3D#drag-data-sto=
re>drag data store</a>, or if the item that the
+  <code><a href=3D#datatransferitem>DataTransferItem</a&g=
t;</code> object represents has been removed from the relevant <=
a href=3D#drag-data-store-item-list>drag data
+  store item list</a>, the <code><a href=3D#datatransferi=
tem>DataTransferItem</a></code> object's <i>mode<=
/i> is the <i>disabled
+  mode</i>. The <a href=3D#drag-data-store>drag data store&l=
t;/a> referenced in this section (which is used only when the
+  <code><a href=3D#datatransferitem>DataTransferItem</a&g=
t;</code> object is not in the <i>disabled mode</i>) is=
 the <a href=3D#drag-data-store>drag data
+  store</a> with which the <code><a href=3D#datatransferi=
tem>DataTransferItem</a></code> object's <code><a=
 href=3D#datatransfer>DataTransfer</a></code>
+  object is associated.</p>
+
+  <p>The <dfn id=3Ddom-datatransferitem-kind title=3Ddom-DataTr=
ansferItem-kind><code>kind</code></dfn> attribute mu=
st return the
+  empty string if the <code><a href=3D#datatransferitem>Data=
TransferItem</a></code> object is in the <i>disabled mo=
de</i>; otherwise
+  it must return the string given in the cell from the second column of =
the following table from the
+  row whose cell in the first column contains <a href=3D#the-drag-dat=
a-item-kind>the drag data item kind</a> of the item
+  represented by the <code><a href=3D#datatransferitem>DataT=
ransferItem</a></code> object:</p>
+
+  <table><thead><tr><th> Kind <th> String
+   <tbody><tr><td> <i>Plain Unicode string</i=
> <td> "<code title=3D"">string</code&gt=
;"
+<!-- DND-v3:    <tr> <td> <i>Blob</i> <td&=
gt; "<code title=3D"">blob</code>"-->
+    <tr><td> <i><a href=3D#file>File</a>&l=
t;/i> <td> "<code title=3D"">file</code&=
gt;"
+<!-- DND-v4:    <tr> <td> <i>Object</i> <t=
d> "<code title=3D"">object</code>"--&=
gt;
+  </table><p>The <dfn id=3Ddom-datatransferitem-type titl=
e=3Ddom-DataTransferItem-type><code>type</code></dfn&gt=
; attribute must return the
+  empty string if the <code><a href=3D#datatransferitem>Data=
TransferItem</a></code> object is in the <i>disabled mo=
de</i>; otherwise
+  it must return <a href=3D#the-drag-data-item-type-string>the dra=
g data item type string</a> of the item represented by the
+  <code><a href=3D#datatransferitem>DataTransferItem</a&g=
t;</code> object.</p>
+
+  <p>The <dfn id=3Ddom-datatransferitem-getasstring title=3Ddom=
-DataTransferItem-getAsString><code>getAsString(<var title=3D=
"">callback</var>)</code></dfn> method mus=
t run the following steps:</p>
+
+  <ol><li><p>If the <var title=3D"">ca=
llback</var> is null, abort these steps.</li>
+
+   <li><p>If the <code><a href=3D#datatransferitem&=
gt;DataTransferItem</a></code> object is not in the <i tit=
le=3Dconcept-dnd-rw><a href=3D#concept-dnd-rw>read/write mode&lt=
;/a></i> or the <i title=3Dconcept-dnd-ro><a href=3D#co=
ncept-dnd-ro>read-only mode</a></i>,
+   abort these steps. The callback is never invoked.</li>
+
+   <li><p>If <a href=3D#the-drag-data-item-kind>the dr=
ag data item kind</a> is not <i>Plain Unicode string</i&gt=
;, abort these
+   steps. The callback is never invoked.</li>
+
+   <li><p>Otherwise, <a href=3D#queue-a-task>queue a t=
ask</a> to invoke <var title=3D"">callback</var&=
gt;, passing the
+   actual data of the item represented by the <code><a href=3D#=
datatransferitem>DataTransferItem</a></code> object as the
+   argument.</li>
+
+  </ol><!--DND-v3:
+  <p>The <dfn title=3D"dom-DataTransferItem-getAsBlob&quot=
;><code>getAsBlob()</code></dfn> method must run
+  the following steps:</p>
+
+  <ol>
+
+   <li><p>If the <code>DataTransferItem</code> o=
bject is not in the <i
+   title=3D"concept-dnd-rw">read/write mode</i> or th=
e <i title=3D"concept-dnd-ro">read-only mode</i>,
+   return null and abort these steps.</p></li>
+
+   <li>
+
+--><!--DND-v4:
+    <p>If <span>the drag data item kind</span> is <=
i>Object</i>, return null.</p></li>
+--><!--DND-v3:
+
+    <p>If <span>the drag data item kind</span> is <=
i>File</i>, then return a new <code>File</code>
+    object representing the actual data of the item represented by the &=
lt;code>DataTransferItem</code>
+    object.</p>
+
+    <p>If <span>the drag data item kind</span> is <=
i>Unicode Data string</i>, then return a new
+    <code>Blob</code> object representing the actual data of=
 the item represented by the
+    <code>DataTransferItem</code> object, with the <code =
title=3D"dom-Blob-type">type</code> of the
+    <code>Blob</code> being <span>the drag data item t=
ype string</span> and with the binary data of
+    the <code>Blob</code> object being the Unicode string en=
coded as UTF-8. <a
+    href=3D"#refsRFC3629">[RFC3629]</a></p>
+
+    <p>Otherwise, <span>the drag data item kind</span>=
 is <i>Blob</i>; return a new
+    <code>Blob</code> object representing the actual data of=
 the item represented by the
+    <code>DataTransferItem</code> object.</p>
+
+   </li>
+
+  </ol>
+--><p>The <dfn id=3Ddom-datatransferitem-getasfile title=3Dd=
om-DataTransferItem-getAsFile><code>getAsFile()</code><=
/dfn>
+  method must run the following steps:</p>
+
+  <ol><li><p>If the <code><a href=3D#datatran=
sferitem>DataTransferItem</a></code> object is not in the =
<i title=3Dconcept-dnd-rw><a href=3D#concept-dnd-rw>read/writ=
e mode</a></i> or the <i title=3Dconcept-dnd-ro><a h=
ref=3D#concept-dnd-ro>read-only mode</a></i>,
+   return null and abort these steps.</li>
+
+   <li><p>If <a href=3D#the-drag-data-item-kind>the dr=
ag data item kind</a> is not <i><a href=3D#file>File&lt=
;/a></i>, then return null and abort
+   these steps.</li>
+
+   <li><p>Return a new <code><a href=3D#file>Fil=
e</a></code> object representing the actual data of the item =
represented
+   by the <code><a href=3D#datatransferitem>DataTransferItem=
</a></code> object.</p>
+
+  </ol><!--DND-v4:
+  <p>The <dfn title=3D"dom-DataTransferItem-getAsObject&qu=
ot;><code>getAsObject(<var
+  title=3D"">callback</var>)</code></dfn>=
 method must run the following steps:</p>
+
+  <ol>
+
+   <li><p>If the <code>DataTransferItem</code> o=
bject is not in the <i
+   title=3D"concept-dnd-rw">read/write mode</i> or th=
e <i title=3D"concept-dnd-ro">read-only mode</i>,
+   return null and abort these steps.</p></li>
+
+   <li>
+
+    <p>Let <var title=3D"">data</var> be the=
 actual data of the item represented by the
+    <code>DataTransferItem</code> object.</p>
+
+    <p>If <span>the drag data item kind</span> is <=
i>Unicode Data string</i>, then <var
+    title=3D"">data</var> is a <code title=3D&quot=
;">DOMString</code> containing the actual data.</p>
+
+    <p>If <span>the drag data item kind</span> is <=
i>Blob</i>, then <var title=3D"">data</var&gt=
; is a
+    <code>Blob</code> representing the actual data.</p&gt=
;
+
+    <p>If <span>the drag data item kind</span> is <=
i>File</i>, then <var title=3D"">data</var&gt=
; is a
+    <code>File</code> representing the actual data.</p&gt=
;
+
+    <p>If <span>the drag data item kind</span> is <=
i>Object</i>, then <var title=3D"">data</var&=
gt; is
+    the object that is the actual data.</p>
+
+   </li>
+
+   <li><span>Queue a task</span> to invoke <var tit=
le=3D"">callback</var>, passing a <span>structur=
ed
+   clone</span> of <var title=3D"">data</var&gt=
; as the argument.</p></li>
+
+  </ol>
+--></div>
+
+
+
+  <h4 id=3Dthe-dragevent-interface><span class=3Dsecno>8.7.4=
 </span>The <code><a href=3D#dragevent>DragEvent</a&=
gt;</code> interface</h4>
+
+  <p>The drag-and-drop processing model involves several events. T=
hey all use the
+  <code><a href=3D#dragevent>DragEvent</a></code&gt=
; interface.</p>
+
+  <pre class=3Didl>[Constructor(DOMString type, optional <a hre=
f=3D#drageventinit>DragEventInit</a> eventInitDict)]
+interface <dfn id=3Ddragevent>DragEvent</dfn> : <a href=3D=
#mouseevent>MouseEvent</a> {
+  readonly attribute <a href=3D#datatransfer>DataTransfer</a&gt=
;? <a href=3D#dom-dragevent-datatransfer title=3Ddom-DragEvent-dataTra=
nsfer>dataTransfer</a>;
+};
+
+dictionary <dfn id=3Ddrageventinit>DragEventInit</dfn> : &lt=
;a href=3D#mouseeventinit>MouseEventInit</a> {
+  <a href=3D#datatransfer>DataTransfer</a>? dataTransfer;
+};</pre>
+
+  <dl class=3Ddomintro><dt><var title=3D"">e=
vent</var> . <code title=3Ddom-DragEvent-dataTransfer><a h=
ref=3D#dom-dragevent-datatransfer>dataTransfer</a></code>&=
lt;/dt>
+
+   <dd>
+
+    <p>Returns the <code><a href=3D#datatransfer>DataT=
ransfer</a></code> object for the event.</p>
+
+   </dd>
+
+  </dl><p class=3Dnote>Although, for consistency with other =
event interfaces, the <code><a href=3D#dragevent>DragEvent&lt=
;/a></code>
+  interface has a constructor, it is not particularly useful. In particu=
lar, there's no way to
+  create a useful <code><a href=3D#datatransfer>DataTransfer=
</a></code> object from script, as <code><a href=3D#=
datatransfer>DataTransfer</a></code> objects
+  have a processing and security model that is coordinated by the browse=
r during drag-and-drops.</p>
+
+  <div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-dragevent-datatransfer title=3Ddom-DragE=
vent-dataTransfer><code>dataTransfer</code></dfn> at=
tribute of the
+  <code><a href=3D#dragevent>DragEvent</a></code&gt=
; interface must return the value it was initialized to. When the object =
is
+  created, this attribute must be initialized to null. It represents the=
 context information for the
+  event.</p>
+
+  </div>
+
+  <div class=3Dimpl>
+
+  <p>When a user agent is required to <dfn id=3Dfire-a-dnd-even=
t>fire a DND event</dfn> named <var title=3D"">e=
</var> at an
+  element, using a particular <a href=3D#drag-data-store>drag data=
 store</a>, the user agent must run the following
+  steps:</p>
+
+  <ol><li>
+
+    <p>If <var title=3D"">e</var> is <cod=
e title=3Devent-dragstart><a href=3D#event-dragstart>dragstart&l=
t;/a></code>, set the
+    <a href=3D#drag-data-store-mode>drag data store mode</a>=
 to the <a href=3D#concept-dnd-rw title=3Dconcept-dnd-rw>read/write
+    mode</a>.</p>
+
+    <p>If <var title=3D"">e</var> is <cod=
e title=3Devent-drop><a href=3D#event-drop>drop</a></co=
de>, set the <a href=3D#drag-data-store-mode>drag data
+    store mode</a> to the <a href=3D#concept-dnd-ro title=3Dcon=
cept-dnd-ro>read-only mode</a>.</p>
+
+   </li>
+
+   <li><p>Let <var title=3D"">dataTransfer&l=
t;/var> be a newly created <code><a href=3D#datatransfer>D=
ataTransfer</a></code> object
+   associated with the given <a href=3D#drag-data-store>drag data =
store</a>.</li>
+
+   <li><p id=3DeffectAllowed-initialization>Set the <code=
 title=3Ddom-DataTransfer-effectAllowed><a href=3D#dom-datatransfer=
-effectallowed>effectAllowed</a></code> attribute to the &=
lt;a href=3D#drag-data-store>drag data
+   store</a>'s <a href=3D#drag-data-store-allowed-effects-state=
>drag data store allowed effects state</a>.</li>
+
+   <li>
+
+    <p id=3DdropEffect-initialization>Set the <code title=3Ddom=
-DataTransfer-dropEffect><a href=3D#dom-datatransfer-dropeffect>=
dropEffect</a></code> attribute to "<code title=3D&qu=
ot;">none</code>"
+    if <var title=3D"">e</var> is <code title=3D=
event-dragstart><a href=3D#event-dragstart>dragstart</a>&l=
t;/code>, <code title=3Devent-drag><a href=3D#event-drag>d=
rag</a></code>, <code title=3Devent-dragexit><a href=
=3D#event-dragexit>dragexit</a></code>, or <code title=3D=
event-dragleave><a href=3D#event-dragleave>dragleave</a>&l=
t;/code>; to the value corresponding to the <a href=3D#current-drag=
-operation>current drag
+    operation</a> if <var title=3D"">e</var>=
 is <code title=3Devent-drop><a href=3D#event-drop>drop</a=
></code> or <code title=3Devent-dragend><a href=3D#even=
t-dragend>dragend</a></code>; and to a value based on the =
<code title=3Ddom-DataTransfer-effectAllowed><a href=3D#dom-data=
transfer-effectallowed>effectAllowed</a></code> attribute'=
s value and the
+    drag-and-drop source, as given by the following table, otherwise (i.=
e. if <var title=3D"">e</var>
+    is <code title=3Devent-dragenter><a href=3D#event-dragenter=
>dragenter</a></code> or <code title=3Devent-dragover&g=
t;<a href=3D#event-dragover>dragover</a></code>):</p=
>
+
+    <table><thead><tr><th><code title=3Ddom-D=
ataTransfer-effectAllowed><a href=3D#dom-datatransfer-effectallowed=
>effectAllowed</a></code></th>
+       <th><code title=3Ddom-DataTransfer-dropEffect><a h=
ref=3D#dom-datatransfer-dropeffect>dropEffect</a></code>&l=
t;/th>
+      </thead><tr><td>"<code title=3D"&qu=
ot;>none</code>"</td>
+      <td>"<code title=3D"">none</code>=
"</td>
+     <tr><td>"<code title=3D"">copy<=
/code>"</td>
+      <td>"<code title=3D"">copy</code>=
"</td>
+     <tr><td>"<code title=3D"">copyLink=
</code>"</td>
+      <td>"<code title=3D"">copy</code>=
", or, <a href=3D#concept-platform-dropeffect-override title=3Dco=
ncept-platform-dropEffect-override>if appropriate</a>, "&lt=
;code title=3D"">link</code>"</td>
+     <tr><td>"<code title=3D"">copyMove=
</code>"</td>
+      <td>"<code title=3D"">copy</code>=
", or, <a href=3D#concept-platform-dropeffect-override title=3Dco=
ncept-platform-dropEffect-override>if appropriate</a>, "&lt=
;code title=3D"">move</code>"</td>
+     <tr><td>"<code title=3D"">all</=
code>"</td>
+      <td>"<code title=3D"">copy</code>=
", or, <a href=3D#concept-platform-dropeffect-override title=3Dco=
ncept-platform-dropEffect-override>if appropriate</a>, either &q=
uot;<code title=3D"">link</code>" or "&lt=
;code title=3D"">move</code>"</td>
+     <tr><td>"<code title=3D"">link<=
/code>"</td>
+      <td>"<code title=3D"">link</code>=
"</td>
+     <tr><td>"<code title=3D"">linkMove=
</code>"</td>
+      <td>"<code title=3D"">link</code>=
", or, <a href=3D#concept-platform-dropeffect-override title=3Dco=
ncept-platform-dropEffect-override>if appropriate</a>, "&lt=
;code title=3D"">move</code>"</td>
+     <tr><td>"<code title=3D"">move<=
/code>"</td>
+      <td>"<code title=3D"">move</code>=
"</td>
+     <tr><td>"<code title=3D"">uninitia=
lized</code>" when what is being dragged is a selection from a=
 text field</td>
+      <td>"<code title=3D"">move</code>=
", or, <a href=3D#concept-platform-dropeffect-override title=3Dco=
ncept-platform-dropEffect-override>if appropriate</a>, either &q=
uot;<code title=3D"">copy</code>" or "&lt=
;code title=3D"">link</code>"</td>
+     <tr><td>"<code title=3D"">uninitia=
lized</code>" when what is being dragged is a selection</td=
>
+      <td>"<code title=3D"">copy</code>=
", or, <a href=3D#concept-platform-dropeffect-override title=3Dco=
ncept-platform-dropEffect-override>if appropriate</a>, either &q=
uot;<code title=3D"">link</code>" or "&lt=
;code title=3D"">move</code>"</td>
+     <tr><td>"<code title=3D"">uninitia=
lized</code>" when what is being dragged is an <code>&lt=
;a href=3D#the-a-element>a</a></code> element with an <=
code>href</code> attribute</td>
+      <td>"<code title=3D"">link</code>=
", or, <a href=3D#concept-platform-dropeffect-override title=3Dco=
ncept-platform-dropEffect-override>if appropriate</a>, either &q=
uot;<code title=3D"">copy</code>" or "&lt=
;code title=3D"">move</code>"</td>
+     <tr><td>Any other case</td>
+      <td>"<code title=3D"">copy</code>=
", or, <a href=3D#concept-platform-dropeffect-override title=3Dco=
ncept-platform-dropEffect-override>if appropriate</a>, either &q=
uot;<code title=3D"">link</code>" or "&lt=
;code title=3D"">move</code>"</td>
+     </table><p>Where the table above provides <dfn id=3D=
concept-platform-dropeffect-override title=3Dconcept-platform-dropEffect-=
override>possibly
+    appropriate alternatives</dfn>, user agents may instead use th=
e listed alternative values if
+    platform conventions dictate that the user has requested those alter=
nate effects.</p>
+
+    <p class=3Dexample>For example, Windows platform conventions a=
re such that dragging while
+    holding the "alt" key indicates a preference for linking t=
he data, rather than moving or copying
+    it. Therefore, on a Windows system, if "<code title=3D"=
">link</code>" is an option according to
+    the table above while the "alt" key is depressed, the user=
 agent could select that instead of
+    "<code title=3D"">copy</code>" or &q=
uot;<code title=3D"">move</code>".</p>
+
+   </li>
+
+   <li>
+
+    <p>Create a <a href=3D#concept-events-trusted title=3Dconce=
pt-events-trusted>trusted</a> <code><a href=3D#drageven=
t>DragEvent</a></code> object
+    and initialize it to have the given name <var title=3D"&quot=
;>e</var>, to bubble, to be cancelable
+    unless <var title=3D"">e</var> is <code tit=
le=3Devent-dragexit><a href=3D#event-dragexit>dragexit</a>=
</code>, <code title=3Devent-dragleave><a href=3D#event-dr=
agleave>dragleave</a></code>, or <code title=3Devent-dr=
agend><a href=3D#event-dragend>dragend</a></code>, a=
nd to
+    have the <code title=3Ddom-UIEvent-detail><a href=3D#dom-ui=
event-detail>detail</a></code> attribute initialized to ze=
ro, the mouse
+    and key attributes initialized according to the state of the input d=
evices as they would be for
+    user interaction events, the <code title=3D"">relate=
dTarget</code> attribute initialized to null,
+    and the <code title=3Ddom-DragEvent-dataTransfer><a href=3D=
#dom-dragevent-datatransfer>dataTransfer</a></code> attrib=
ute initialized to
+    <var title=3D"">dataTransfer</var>, the <co=
de><a href=3D#datatransfer>DataTransfer</a></code> o=
bject created above.</p>
+
+    <!-- interaction event spec point -->
+
+    <p>If there is no relevant pointing device, the object must ha=
ve its <code title=3D"">screenX</code>, <code ti=
tle=3D"">screenY</code>, <code title=3D""=
>clientX</code>, <code title=3D"">clientY</co=
de>, and <code title=3D"">button</code> attribut=
es set to 0.</p>
+
+   </li>
+
+   <li><p><a href=3D#concept-event-dispatch title=3Dconce=
pt-event-dispatch>Dispatch</a> the newly created
+   <code><a href=3D#dragevent>DragEvent</a></code&g=
t; object at the specified target element.</li>
+
+   <li><p>Set the <a href=3D#drag-data-store-allowed-effe=
cts-state>drag data store allowed effects state</a> to the curre=
nt value of <var title=3D"">dataTransfer</var>'s &l=
t;code title=3Ddom-DataTransfer-effectAllowed><a href=3D#dom-datatr=
ansfer-effectallowed>effectAllowed</a></code>
+   attribute. (It can only have changed value if <var title=3D"&=
quot;>e</var> is <code title=3Devent-dragstart><a href=3D=
#event-dragstart>dragstart</a></code>.)</li>
+
+   <li><p>Set the <a href=3D#drag-data-store-mode>drag=
 data store mode</a> back to the <a href=3D#concept-dnd-p title=3D=
concept-dnd-p>protected mode</a> if it was changed in the first =
step.</li>
+
+   <li><p>Break the association between <var title=3D&quo=
t;">dataTransfer</var> and the <a href=3D#drag-data-stor=
e>drag data
+   store</a>.</li>
+
+  </ol></div>
+
+
+  <div class=3Dimpl>
+
+  <h4 id=3Ddrag-and-drop-processing-model><span class=3Dsecno&g=
t;8.7.5 </span>Drag-and-drop processing model</h4>
+
+  <p>When the user attempts to begin a drag operation, the user ag=
ent must run the following steps.
+  User agents must act as if these steps were run even if the drag actua=
lly started in another
+  document or application and the user agent was not aware that the drag=
 was occurring until it
+  intersected with a document under the user agent's purview.</p>
+
+  <ol><li>
+
+    <p>Determine what is being dragged, as follows:</p>
+
+    <p>If the drag operation was invoked on a selection, then it i=
s the selection that is being
+    dragged.</p>
+
+    <p>Otherwise, if the drag operation was invoked on a <code&=
gt;<a href=3D#document>Document</a></code>, it is the f=
irst
+    element, going up the ancestor chain, starting at the node that the =
user tried to drag, that has
+    the IDL attribute <code title=3Ddom-draggable><a href=3D#do=
m-draggable>draggable</a></code> set to true. If there is =
no such
+    element, then nothing is being dragged; abort these steps, the drag-=
and-drop operation is never
+    started.</p>
+
+    <p>Otherwise, the drag operation was invoked outside the user =
agent's purview. What is being
+    dragged is defined by the document or application where the drag was=
 started.</p>
+
+    <p class=3Dnote><code><a href=3D#the-img-element>i=
mg</a></code> elements and <code><a href=3D#the-a-el=
ement>a</a></code> elements with an <code title=3Dattr-=
hyperlink-href><a href=3D#attr-hyperlink-href>href</a><=
/code> attribute have their <code title=3Ddom-draggable><a hr=
ef=3D#dom-draggable>draggable</a></code> attribute set to =
true by default.</p>
+
+   </li>
+
+   <li><p><a href=3D#create-a-drag-data-store>Create a=
 drag data store</a>. All the DND events fired subsequently by the =
steps
+   in this section must use this <a href=3D#drag-data-store>drag d=
ata store</a>.</li>
+
+   <li>
+
+    <p>Establish which DOM node is the <dfn id=3Dsource-node&gt=
;source node</dfn>, as follows:</p>
+
+    <p>If it is a selection that is being dragged, then the <a =
href=3D#source-node>source node</a> is the
+    <code><a href=3D#text>Text</a></code> node t=
hat the user started the drag on (typically the <code><a href=3D=
#text>Text</a></code> node
+    that the user originally clicked). If the user did not specify a par=
ticular node, for example if
+    the user just told the user agent to begin a drag of "the selec=
tion", then the <a href=3D#source-node>source
+    node</a> is the first <code><a href=3D#text>Text&l=
t;/a></code> node containing a part of the selection.</p>
+
+    <p>Otherwise, if it is an element that is being dragged, then =
the <a href=3D#source-node>source node</a> is
+    the element that is being dragged.</p>
+
+    <p>Otherwise, the <a href=3D#source-node>source node<=
/a> is part of another document or application. When this
+    specification requires that an event be dispatched at the <a href=
=3D#source-node>source node</a> in this case,
+    the user agent must instead follow the platform-specific conventions=
 relevant to that
+    situation.</p>
+
+    <p class=3Dnote>Multiple events are fired on the <a href=3D=
#source-node>source node</a> during the course of
+    the drag-and-drop operation.</p>
+
+   </li>
+
+   <li>
+
+    <p>Determine the <dfn id=3Dlist-of-dragged-nodes>list of=
 dragged nodes</dfn>, as follows:</p>
+
+    <p>If it is a selection that is being dragged, then the <a =
href=3D#list-of-dragged-nodes>list of dragged nodes</a>
+    contains, in <a href=3D#tree-order>tree order</a>, every=
 node that is partially or completely included in the
+    selection (including all their ancestors).</p>
+
+    <p>Otherwise, the <a href=3D#list-of-dragged-nodes>list =
of dragged nodes</a> contains only the <a href=3D#source-node&gt=
;source node</a>,
+    if any.</p>
+
+   </li>
+
+   <li>
+
+    <p>If it is a selection that is being dragged, then add an ite=
m to the <a href=3D#drag-data-store-item-list>drag data store
+    item list</a>, with its properties set as follows:</p>
+
+    <dl><dt><a href=3D#the-drag-data-item-type-string>=
The drag data item type string</a>
+     <dd>"<code>text/plain</code>"</dd&gt=
;
+
+     <dt><a href=3D#the-drag-data-item-kind>The drag data it=
em kind</a>
+     <dd><i>Plain Unicode string</i></dd>
+
+     <dt>The actual data</dt>
+     <dd>The text of the selection</dd>
+
+    </dl><p>Otherwise, if any files are being dragged, then =
add one item per file to the <a href=3D#drag-data-store-item-list>d=
rag data
+    store item list</a>, with their properties set as follows:<=
/p>
+
+    <dl><dt><a href=3D#the-drag-data-item-type-string>=
The drag data item type string</a>
+     <dd>The MIME type of the file, if known, or "<code&gt=
;application/octet-stream</code>" otherwise.</dd>
+
+     <dt><a href=3D#the-drag-data-item-kind>The drag data it=
em kind</a>
+     <dd><i><a href=3D#file>File</a></i>&l=
t;/dd>
+
+     <dt>The actual data</dt>
+     <dd>The file's contents and name.</dd>
+
+    </dl><p class=3Dnote>Dragging files can currently only h=
appen from outside a <a href=3D#browsing-context>browsing
+    context</a>, for example from a file system manager applicatio=
n.</p>
+
+    <p>If the drag initiated outside of the application, the user =
agent must add items to the
+    <a href=3D#drag-data-store-item-list>drag data store item list=
</a> as appropriate for the data being dragged, honoring
+    platform conventions where appropriate; however, if the platform con=
ventions do not use <a href=3D#mime-type title=3D"MIME type"=
>MIME types</a> to label dragged data, the user agent must make =
a
+    best-effort attempt to map the types to MIME types, and, in any case=
, all the <a href=3D#the-drag-data-item-type-string title=3D"the
+    drag data item type string">drag data item type strings</=
a> must be <a href=3D#converted-to-ascii-lowercase>converted to =
ASCII
+    lowercase</a>.</p>
+
+    <p>User agents may also add one or more items representing the=
 selection or dragged element(s)
+    in other forms, e.g. as HTML.</p>
+
+   </li>
+
+   <!-- DND-v2: text/html as an export format -->
+
+   <li>
+
+    <p>If the <a href=3D#list-of-dragged-nodes>list of dragg=
ed nodes</a> is not empty, then <a href=3D#extracting-json title=
=3D"extracting
+    JSON">extract the microdata from those nodes into a JSON for=
m</a>, and add one item to the
+    <a href=3D#drag-data-store-item-list>drag data store item list=
</a>, with its properties set as follows:</p>
+
+    <dl><dt><a href=3D#the-drag-data-item-type-string>=
The drag data item type string</a>
+     <dd><code><a href=3D#application/microdata+json>a=
pplication/microdata+json</a></code></dd>
+
+     <dt><a href=3D#the-drag-data-item-kind>The drag data it=
em kind</a>
+     <dd><i>Plain Unicode string</i></dd>
+
+     <dt>The actual data</dt>
+     <dd>The resulting JSON string.</dd>
+
+    </dl></li>
+
+   <li>
+
+    <p>Run the following substeps:</p>
+
+    <ol><li><p>Let <var title=3D"">url=
s</var> be an empty list of <a href=3D#absolute-url title=3D&quo=
t;absolute URL">absolute
+     URLs</a>.</li>
+
+     <li>
+
+      <p>For each <var title=3D"">node</var>=
 in the <a href=3D#list-of-dragged-nodes>list of dragged nodes</=
a>:</p>
+
+      <dl><dt>If the node is an <code><a href=3D#th=
e-a-element>a</a></code> element with an <code title=3D=
attr-hyperlink-href><a href=3D#attr-hyperlink-href>href</a&gt=
;</code> attribute</dt>
+
+       <dd>Add to <var title=3D"">urls</var>=
 the result of <a href=3D#resolve-a-url title=3D"resolve a
+       url">resolving</a> the element's <code title=3Da=
ttr-hyperlink-href><a href=3D#attr-hyperlink-href>href</a>=
</code> content
+       attribute relative to the element.</dd>
+
+       <dt>If the node is an <code><a href=3D#the-img-ele=
ment>img</a></code> element with a <code title=3Dattr-i=
mg-src><a href=3D#attr-img-src>src</a></code>
+       attribute</dt>
+
+       <dd>Add to <var title=3D"">urls</var>=
 the result of <a href=3D#resolve-a-url title=3D"resolve a
+       url">resolving</a> the element's <code title=3Da=
ttr-img-src><a href=3D#attr-img-src>src</a></code> c=
ontent attribute
+       relative to the element.</dd>
+
+       <!-- DND-v2: more -->
+
+      </dl></li>
+
+     <li><p>If <var title=3D"">urls</var&=
gt; is still empty, abort these substeps.</li>
+
+     <li><p>Let <var title=3D"">url string&l=
t;/var> be the result of concatenating the strings in <var title=3D=
"">urls</var>, in the order they were added, separated=
 by a U+000D CARRIAGE RETURN U+000A
+     LINE FEED character pair (CRLF).</li>
+
+     <li><p>Add one item to the <a href=3D#drag-data-stor=
e-item-list>drag data store item list</a>, with its properties s=
et as
+     follows:</p>
+
+      <dl><dt><a href=3D#the-drag-data-item-type-string&g=
t;The drag data item type string</a>
+       <dd><code>text/uri-list</code></dd>
+
+       <dt><a href=3D#the-drag-data-item-kind>The drag data =
item kind</a>
+       <dd><i>Plain Unicode string</i></dd>
+
+       <dt>The actual data</dt>
+       <dd><var title=3D"">url string</var>&=
lt;/dd>
+
+      </dl></li>
+
+    </ol></li>
+
+   <li>
+
+    <p>Update the <a href=3D#drag-data-store-default-feedback&g=
t;drag data store default feedback</a> as appropriate for the user =
agent
+    (if the user is dragging the selection, then the selection would lik=
ely be the basis for this
+    feedback; if the user is dragging an element, then that element's re=
ndering would be used; if
+    the drag began outside the user agent, then the platform conventions=
 for determining the drag
+    feedback should be used).</p>
+
+   </li>
+
+   <li>
+
+    <p><a href=3D#fire-a-dnd-event>Fire a DND event</a&gt=
; named <code title=3Devent-dragstart><a href=3D#event-dragstart=
>dragstart</a></code> at the
+    <a href=3D#source-node>source node</a>.</p>
+
+    <p>If the event is canceled, then the drag-and-drop operation =
should not occur; abort these
+    steps.</p> <!-- only a should because the UA can always all=
ow the user to drag without the page
+    knowing -->
+
+    <p class=3Dnote>Since events with no event listeners registere=
d are, almost by definition, never
+    canceled, drag-and-drop is always available to the user if the autho=
r does not specifically
+    prevent it.</p>
+
+   </li>
+
+   <li>
+
+    <p><a href=3D#initiate-the-drag-and-drop-operation>Initi=
ate the drag-and-drop operation</a> in a manner consistent with pla=
tform
+    conventions, and as described below.</p>
+
+    <p id=3Dbase-dnd-feedback>The drag-and-drop feedback must be g=
enerated from the first of the
+    following sources that is available:</p>
+
+    <ol><li>The <a href=3D#drag-data-store-bitmap>drag=
 data store bitmap</a>, if any. In this case, the <a href=3D#dra=
g-data-store-hot-spot-coordinate>drag data store
+     hot spot coordinate</a> should be used as hints for where to =
put the cursor relative to the
+     resulting image. The values are expressed as distances in CSS pixel=
s from the left side and
+     from the top side of the image respectively. <a href=3D#refsCSS&=
gt;[CSS]</a></li>
+
+     <li>The <a href=3D#drag-data-store-default-feedback>dra=
g data store default feedback</a>.</li>
+
+    </ol></li>
+
+  </ol><p>From the moment that the user agent is to <dfn =
id=3Dinitiate-the-drag-and-drop-operation>initiate the drag-and-drop o=
peration</dfn>,
+  until the end of the drag-and-drop operation, device input events (e.g=
. mouse and keyboard events)
+  must be suppressed.</p>
+
+  <p>During the drag operation, the element directly indicated by =
the user as the drop target is
+  called the <dfn id=3Dimmediate-user-selection>immediate user sel=
ection</dfn>. (Only elements can be selected by the user; other
+  nodes must not be made available as drop targets.) However, the <a =
href=3D#immediate-user-selection>immediate user
+  selection</a> is not necessarily the <dfn id=3Dcurrent-target=
-element>current target element</dfn>, which is the element
+  currently selected for the drop part of the drag-and-drop operation.&l=
t;/p>
+
+  <p>The <a href=3D#immediate-user-selection>immediate user =
selection</a> changes as the user selects different elements
+  (either by pointing at them with a pointing device, or by selecting th=
em in some other way). The
+  <a href=3D#current-target-element>current target element</a&g=
t; changes when the <a href=3D#immediate-user-selection>immediate u=
ser selection</a>
+  changes, based on the results of event listeners in the document, as d=
escribed below.</p>
+
+  <p>Both the <a href=3D#current-target-element>current targ=
et element</a> and the <a href=3D#immediate-user-selection>im=
mediate user selection</a> can
+  be null, which means no target element is selected. They can also both=
 be elements in other
+  (DOM-based) documents, or other (non-Web) programs altogether. (For ex=
ample, a user could drag
+  text to a word-processor.) The <a href=3D#current-target-element&gt=
;current target element</a> is initially null.</p>
+
+  <p>In addition, there is also a <dfn id=3Dcurrent-drag-operat=
ion>current drag operation</dfn>, which can take on the values
+  "<code title=3D"">none</code>", "=
<code title=3D"">copy</code>", "<code =
title=3D"">link</code>", and
+  "<code title=3D"">move</code>". Initia=
lly, it has the value "<code title=3D"">none</cod=
e>". It is
+  updated by the user agent as described in the steps below.</p>
+
+  <p>User agents must, as soon as the drag operation is <a href=
=3D#initiate-the-drag-and-drop-operation title=3D"initiate the drag-=
and-drop
+  operation">initiated</a> and every 350ms (±20=
0ms) thereafter for as long as the drag
+  operation is ongoing, <a href=3D#queue-a-task>queue a task</a=
> to perform the following steps in sequence:</p>
+
+  <ol><li>
+
+    <p>If the user agent is still performing the previous iteratio=
n of the sequence (if any) when
+    the next iteration becomes due, abort these steps for this iteration=
 (effectively "skipping
+    missed frames" of the drag-and-drop operation).</p>
+
+   </li>
+
+   <li>
+
+    <p><a href=3D#fire-a-dnd-event>Fire a DND event</a&gt=
; named <code title=3Devent-drag><a href=3D#event-drag>drag&l=
t;/a></code> at the
+    <a href=3D#source-node>source node</a>. If this event is=
 canceled, the user agent must set the <a href=3D#current-drag-operati=
on>current
+    drag operation</a> to "<code title=3D"">n=
one</code>" (no drag operation).</p>
+
+   </li>
+
+   <li>
+
+    <p>If the <code title=3Devent-drag><a href=3D#event-d=
rag>drag</a></code> event was not canceled and the user ha=
s not ended
+    the drag-and-drop operation, check the state of the drag-and-drop op=
eration, as follows:</p>
+
+    <ol><li>
+
+      <p>If the user is indicating a different <a href=3D#immed=
iate-user-selection>immediate user selection</a> than during the
+      last iteration (or if this is the first iteration), and if this &l=
t;a href=3D#immediate-user-selection>immediate user
+      selection</a> is not the same as the <a href=3D#current-t=
arget-element>current target element</a>, then <a href=3D#fir=
e-a-dnd-event>fire a
+      DND event</a> named <code title=3Devent-dragexit><a=
 href=3D#event-dragexit>dragexit</a></code> at the <a h=
ref=3D#current-target-element>current
+      target element</a>, and then update the <a href=3D#curren=
t-target-element>current target element</a> as follows:</p&gt=
;
+
+      <dl class=3Dswitch><dt>If the new <a href=3D#immedi=
ate-user-selection>immediate user selection</a> is null</dt&g=
t;
+
+       <dd><p>Set the <a href=3D#current-target-element&g=
t;current target element</a> to null also.</dd>
+
+       <dt>If the new <a href=3D#immediate-user-selection>im=
mediate user selection</a> is in a non-DOM document or
+       application</dt>
+
+       <dd><p>Set the <a href=3D#current-target-element&g=
t;current target element</a> to the <a href=3D#immediate-user-se=
lection>immediate user
+       selection</a>.</dd>
+
+       <dt>Otherwise</dt>
+
+       <dd>
+
+        <p><a href=3D#fire-a-dnd-event>Fire a DND event</=
a> named <code title=3Devent-dragenter><a href=3D#event-drage=
nter>dragenter</a></code> at the
+        <a href=3D#immediate-user-selection>immediate user selecti=
on</a>.</p>
+
+        <p>If the event is canceled, then set the <a href=3D#cu=
rrent-target-element>current target element</a> to the
+        <a href=3D#immediate-user-selection>immediate user selecti=
on</a>.</p>
+
+        <p>Otherwise, run the appropriate step from the following =
list:</p>
+
+        <dl class=3Dswitch><dt>If the <a href=3D#immediat=
e-user-selection>immediate user selection</a> is a text field (e=
.g.
+         <code><a href=3D#the-textarea-element>textarea</=
a></code>, or an <code><a href=3D#the-input-element>=
input</a></code> element whose <code title=3Dattr-input-ty=
pe><a href=3D#attr-input-type>type</a></code> attrib=
ute is in the <a href=3D"#text-(type=3Dtext)-state-and-search-sta=
te-(type=3Dsearch)" title=3Dattr-input-type-text>Text</a> s=
tate) or an <a href=3D#editing-host>editing host</a> or
+         <a href=3D#editable>editable</a> element, and the &=
lt;a href=3D#drag-data-store-item-list>drag data store item list</a=
> has an item
+         with <a href=3D#the-drag-data-item-type-string>the drag d=
ata item type string</a> "<code>text/plain</code>&=
quot; and <a href=3D#the-drag-data-item-kind>the
+         drag data item kind</a> <i>Plain Unicode string<=
/i></dt>
+
+         <dd><p>Set the <a href=3D#current-target-element=
>current target element</a> to the <a href=3D#immediate-user-=
selection>immediate user
+         selection</a> anyway.</dd>
+
+
+         <dt>If the <a href=3D#immediate-user-selection>imme=
diate user selection</a> is an element with a <code title=3Dattr=
-dropzone><a href=3D#the-dropzone-attribute>dropzone</a>&l=
t;/code> attribute that <a href=3D#concept-dropzone-match title=3Dc=
oncept-dropzone-match>matches</a> the <a href=3D#drag-data-st=
ore>drag data store</a></dt>
+
+         <dd><p>Set the <a href=3D#current-target-element=
>current target element</a> to the <a href=3D#immediate-user-=
selection>immediate user
+         selection</a> anyway.</dd>
+
+
+         <dt>If the <a href=3D#immediate-user-selection>imme=
diate user selection</a> is an element that itself has an ancestor
+         element with a <code title=3Dattr-dropzone><a href=3D#=
the-dropzone-attribute>dropzone</a></code> attribute that =
<a href=3D#concept-dropzone-match title=3Dconcept-dropzone-match>ma=
tches</a> the <a href=3D#drag-data-store>drag data store</=
a></dt>
+
+         <dd>
+
+          <p>Let <var title=3D"">new target</va=
r> be the nearest (deepest) such ancestor element.</p>
+
+          <p>If the <a href=3D#immediate-user-selection>imme=
diate user selection</a> is <var title=3D"">new tar=
get</var>, then
+          leave the <a href=3D#current-target-element>current targ=
et element</a> unchanged.</p>
+
+          <p>Otherwise, <a href=3D#fire-a-dnd-event>fire a D=
ND event</a> named <code title=3Devent-dragenter><a href=3D=
#event-dragenter>dragenter</a></code> at <var title=3D&=
quot;">new target</var>. Then, set the
+          <a href=3D#current-target-element>current target element=
</a> to <var title=3D"">new target</var>, reg=
ardless of
+          whether that event was canceled or not.</p>
+
+         </dd>
+
+
+         <dt>If the <a href=3D#immediate-user-selection>imme=
diate user selection</a> is <a href=3D#the-body-element-0>the=
 body element</a></dt>
+
+         <dd><p>Leave the <a href=3D#current-target-eleme=
nt>current target element</a> unchanged.</dd>
+
+
+         <dt>Otherwise</dt>
+
+         <dd>
+
+          <p><a href=3D#fire-a-dnd-event>Fire a DND event&lt=
;/a> named <code title=3Devent-dragenter><a href=3D#event-dra=
genter>dragenter</a></code> at
+          <a href=3D#the-body-element-0>the body element</a>=
, if there is one, or at the <code><a href=3D#document>Docume=
nt</a></code> object, if
+          not. Then, set the <a href=3D#current-target-element>cur=
rent target element</a> to <a href=3D#the-body-element-0>the =
body element</a>,
+          regardless of whether that event was canceled or not.</p&gt=
;
+
+         </dd>
+
+        </dl></dd>
+
+      </dl></li>
+
+     <li>
+
+      <p>If the previous step caused the <a href=3D#current-tar=
get-element>current target element</a> to change, and if the
+      previous target element was not null or a part of a non-DOM docume=
nt, then <a href=3D#fire-a-dnd-event>fire a DND
+      event</a> named <code title=3Devent-dragleave><a hr=
ef=3D#event-dragleave>dragleave</a></code> at the previous=
 target
+      element.</p>
+
+     </li>
+
+     <li>
+
+      <p>If the <a href=3D#current-target-element>current ta=
rget element</a> is a DOM element, then <a href=3D#fire-a-dnd-ev=
ent>fire a DND
+      event</a> named <code title=3Devent-dragover><a hre=
f=3D#event-dragover>dragover</a></code> at this <a href=
=3D#current-target-element>current target
+      element</a>.</p>
+
+      <p>If the <code title=3Devent-dragover><a href=3D#e=
vent-dragover>dragover</a></code> event is not canceled, r=
un the
+      appropriate step from the following list:</p>
+
+      <dl class=3Dswitch><dt>If the <a href=3D#current-ta=
rget-element>current target element</a> is a text field (e.g. &l=
t;code><a href=3D#the-textarea-element>textarea</a></co=
de>,
+       or an <code><a href=3D#the-input-element>input</a&=
gt;</code> element whose <code title=3Dattr-input-type><a =
href=3D#attr-input-type>type</a></code> attribute is
+       in the <a href=3D"#text-(type=3Dtext)-state-and-search-st=
ate-(type=3Dsearch)" title=3Dattr-input-type-text>Text</a> =
state) or an <a href=3D#editing-host>editing host</a>
+       or <a href=3D#editable>editable</a> element, and the =
<a href=3D#drag-data-store-item-list>drag data store item list</=
a> has an item
+       with <a href=3D#the-drag-data-item-type-string>the drag dat=
a item type string</a> "<code>text/plain</code>&qu=
ot; and <a href=3D#the-drag-data-item-kind>the drag
+       data item kind</a> <i>Plain Unicode string</i>&=
lt;/dt>
+
+       <dd><p>Set the <a href=3D#current-drag-operation&g=
t;current drag operation</a> to either "<code title=3D&quot=
;">copy</code>" or
+       "<code title=3D"">move</code>", a=
s appropriate given the platform conventions.</dd>
+
+
+       <dt>If the <a href=3D#current-target-element>current =
target element</a> is an element with a <code title=3Dattr-dropz=
one><a href=3D#the-dropzone-attribute>dropzone</a></cod=
e> attribute that <a href=3D#concept-dropzone-match title=3Dconcept=
-dropzone-match>matches</a> the <a href=3D#drag-data-store&gt=
;drag data store</a> and <a href=3D#concept-dropzone-operation t=
itle=3Dconcept-dropzone-operation>specifies an operation</a><=
/dt>
+
+       <dd><p>Set the <a href=3D#current-drag-operation&g=
t;current drag operation</a> to the operation <a href=3D#concept=
-dropzone-operation title=3Dconcept-dropzone-operation>specified</a=
> by the <code title=3Dattr-dropzone><a href=3D#the-dropzone-=
attribute>dropzone</a></code> attribute of the <a href=3D=
#current-target-element>current target
+       element</a>.</p>
+
+
+       <dt>If the <a href=3D#current-target-element>current =
target element</a> is an element with a <code title=3Dattr-dropz=
one><a href=3D#the-dropzone-attribute>dropzone</a></cod=
e> attribute that <a href=3D#concept-dropzone-match title=3Dconcept=
-dropzone-match>matches</a> the <a href=3D#drag-data-store&gt=
;drag data store</a> and does not
+       <a href=3D#concept-dropzone-operation title=3Dconcept-dropzone=
-operation>specify an operation</a></dt>
+
+       <dd><p>Set the <a href=3D#current-drag-operation&g=
t;current drag operation</a> to "<code title=3D""=
>copy</code>".</p>
+
+
+       <dt>Otherwise</dt>
+
+       <dd><p>Reset the <a href=3D#current-drag-operation=
>current drag operation</a> to "<code title=3D"&quo=
t;>none</code>".</dd>
+
+      </dl><p>Otherwise (if the <code title=3Devent-drago=
ver><a href=3D#event-dragover>dragover</a></code> ev=
ent <em>is</em> canceled),
+      set the <a href=3D#current-drag-operation>current drag opera=
tion</a> based on the values of the <code title=3Ddom-DataTransf=
er-effectAllowed><a href=3D#dom-datatransfer-effectallowed>effec=
tAllowed</a></code> and <code title=3Ddom-DataTransfer-dro=
pEffect><a href=3D#dom-datatransfer-dropeffect>dropEffect</a&=
gt;</code> attributes of the <code><a href=3D#dragevent&gt=
;DragEvent</a></code>
+      object's <code title=3Ddom-DragEvent-dataTransfer><a href=
=3D#dom-dragevent-datatransfer>dataTransfer</a></code> obj=
ect as they stood
+      after the event <a href=3D#concept-event-dispatch title=3Dconce=
pt-event-dispatch>dispatch</a> finished, as per the
+      following table:</p>
+
+      <table><thead><tr><th><code title=3Ddom=
-DataTransfer-effectAllowed><a href=3D#dom-datatransfer-effectallow=
ed>effectAllowed</a></code></th>
+         <th><code title=3Ddom-DataTransfer-dropEffect><a=
 href=3D#dom-datatransfer-dropeffect>dropEffect</a></code>=
</th>
+         <th>Drag operation</th>
+        </thead><tr><td>"<code title=3D"&=
quot;>uninitialized</code>", "<code title=3D"&=
quot;>copy</code>", "<code title=3D"">=
copyLink</code>", "<code title=3D"">copyM=
ove</code>", or "<code title=3D"">all<=
/code>"</td>
+        <td>"<code title=3D"">copy</code&g=
t;"</td>
+        <td>"<code title=3D"">copy</code&g=
t;"</td>
+       <tr><td>"<code title=3D"">uninit=
ialized</code>", "<code title=3D"">link&l=
t;/code>", "<code title=3D"">copyLink</co=
de>", "<code title=3D"">linkMove</code&gt=
;", or "<code title=3D"">all</code>"=
</td>
+        <td>"<code title=3D"">link</code&g=
t;"</td>
+        <td>"<code title=3D"">link</code&g=
t;"</td>
+       <tr><td>"<code title=3D"">uninit=
ialized</code>", "<code title=3D"">move&l=
t;/code>", "<code title=3D"">copyMove</co=
de>", "<code title=3D"">linkMove</code&gt=
;", or "<code title=3D"">all</code>"=
</td>
+        <td>"<code title=3D"">move</code&g=
t;"</td>
+        <td>"<code title=3D"">move</code&g=
t;"</td>
+       <tr><td colspan=3D2>Any other case</td>
+        <td>"<code title=3D"">none</code&g=
t;"</td>
+       </table></li>
+
+     <li>
+
+      <p>Otherwise, if the <a href=3D#current-target-element&gt=
;current target element</a> is not a DOM element, use
+      platform-specific mechanisms to determine what drag operation is b=
eing performed (none, copy,
+      link, or move), and set the <i><a href=3D#current-drag-op=
eration>current drag operation</a></i> accordingly.</p&=
gt;
+
+     </li>
+
+     <li>
+
+      <p>Update the drag feedback (e.g. the mouse cursor) to match=
 the <a href=3D#current-drag-operation>current drag
+      operation</a>, as follows:</p>
+
+      <table><thead><tr><th>Drag operation</t=
h>
+         <th>Feedback</th>
+        </thead><tr><td>"<code title=3D"&=
quot;>copy</code>"</td>
+        <td>Data will be copied if dropped here.</td>
+       <tr><td>"<code title=3D"">link&l=
t;/code>"</td>
+        <td>Data will be linked if dropped here.</td>
+       <tr><td>"<code title=3D"">move&l=
t;/code>"</td>
+        <td>Data will be moved if dropped here.</td>
+       <tr><td>"<code title=3D"">none&l=
t;/code>"</td>
+        <td>No operation allowed, dropping here will cancel the dr=
ag-and-drop operation.</td>
+       </table></li>
+
+    </ol></li>
+
+   <li>
+
+    <p>Otherwise, if the user ended the drag-and-drop operation (e=
.g. by releasing the mouse button
+    in a mouse-driven drag-and-drop interface), or if the <code title=
=3Devent-drag><a href=3D#event-drag>drag</a></code> =
event
+    was canceled, then this will be the last iteration. Run the followin=
g steps, then stop the
+    drag-and-drop operation:</p>
+
+    <ol><li>
+
+      <p>If the <a href=3D#current-drag-operation>current dr=
ag operation</a> is "<code title=3D"">none<=
/code>" (no drag
+      operation), or, if the user ended the drag-and-drop operation by c=
anceling it (e.g. by hitting
+      the <kbd>Escape</kbd> key), or if the <a href=3D#cu=
rrent-target-element>current target element</a> is null, then th=
e
+      drag operation failed. Run these substeps:</p>
+
+      <ol><li><p>Let <var title=3D"">d=
ropped</var> be false.</li>
+
+       <li><p>If the <a href=3D#current-target-element&gt=
;current target element</a> is a DOM element, <a href=3D#fire-a-=
dnd-event>fire a DND
+       event</a> named <code title=3Devent-dragleave><a h=
ref=3D#event-dragleave>dragleave</a></code> at it; otherwi=
se, if it is
+       not null, use platform-specific conventions for drag cancellation=
.</li>
+
+       <li><p>Set the <a href=3D#current-drag-operation&g=
t;current drag operation</a> to "<code title=3D""=
>none</code>".</li>
+
+      </ol><p>Otherwise, the drag operation might be a succe=
ss; run these substeps:</p>
+
+      <ol><li><p>Let <var title=3D"">d=
ropped</var> be true.</li>
+
+       <li><p>If the <a href=3D#current-target-element&gt=
;current target element</a> is a DOM element, <a href=3D#fire-a-=
dnd-event>fire a DND
+       event</a> named <code title=3Devent-drop><a href=3D=
#event-drop>drop</a></code> at it; otherwise, use
+       platform-specific conventions for indicating a drop.</li>
+
+       <li>
+
+        <p>If the event is canceled, set the <a href=3D#current=
-drag-operation>current drag operation</a> to the value of the
+        <code title=3Ddom-DataTransfer-dropEffect><a href=3D#do=
m-datatransfer-dropeffect>dropEffect</a></code> attribute =
of the
+        <code><a href=3D#dragevent>DragEvent</a></c=
ode> object's <code title=3Ddom-DragEvent-dataTransfer><a hre=
f=3D#dom-dragevent-datatransfer>dataTransfer</a></code>
+        object as it stood after the event <a href=3D#concept-event-d=
ispatch title=3Dconcept-event-dispatch>dispatch</a>
+        finished.</p>
+
+        <p>Otherwise, the event is not canceled; perform the event=
's default action, which depends
+        on the exact target as follows:</p>
+
+        <dl class=3Dswitch><dt>If the <a href=3D#current-=
target-element>current target element</a> is a text field (e.g. =
<code><a href=3D#the-textarea-element>textarea</a></=
code>,
+         or an <code><a href=3D#the-input-element>input</=
a></code> element whose <code title=3Dattr-input-type><=
a href=3D#attr-input-type>type</a></code> attribute
+         is in the <a href=3D"#text-(type=3Dtext)-state-and-sear=
ch-state-(type=3Dsearch)" title=3Dattr-input-type-text>Text</a=
> state) or an <a href=3D#editing-host>editing
+         host</a> or <a href=3D#editable>editable</a> =
element, and the <a href=3D#drag-data-store-item-list>drag data sto=
re item
+         list</a> has an item with <a href=3D#the-drag-data-ite=
m-type-string>the drag data item type string</a>
+         "<code>text/plain</code>" and <a href=3D=
#the-drag-data-item-kind>the drag data item kind</a> <i>Pl=
ain Unicode
+         string</i></dt>
+
+         <dd><p>Insert the actual data of the first item in =
the <a href=3D#drag-data-store-item-list>drag data store item
+         list</a> to have <a href=3D#the-drag-data-item-type-st=
ring title=3D"the drag data item type string">a drag data it=
em type
+         string</a> of "<code>text/plain</code>&q=
uot; and <a href=3D#the-drag-data-item-kind title=3D"the drag dat=
a item kind">a drag
+         data item kind</a> that is <i>Plain Unicode string&=
lt;/i> into the text field or
+         <a href=3D#editing-host>editing host</a> or <a h=
ref=3D#editable>editable</a> element in a manner consistent with
+         platform-specific conventions (e.g. inserting it at the current=
 mouse cursor position, or
+         inserting it at the end of the field).</dd>
+
+         <dt>Otherwise</dt>
+
+         <dd><p>Reset the <a href=3D#current-drag-operati=
on>current drag operation</a> to "<code title=3D"&q=
uot;>none</code>".</dd>
+
+        </dl></li>
+
+      </ol></li>
+
+     <li>
+
+      <p><a href=3D#fire-a-dnd-event>Fire a DND event</a&=
gt; named <code title=3Devent-dragend><a href=3D#event-dragend&g=
t;dragend</a></code> at the
+      <a href=3D#source-node>source node</a>.</p>
+
+     </li>
+
+     <li>
+
+      <p>Run the appropriate steps from the following list as the =
default action of the <code title=3Devent-dragend><a href=3D#eve=
nt-dragend>dragend</a></code> event:</p>
+
+      <dl class=3Dswitch><dt>If <var title=3D""=
>dropped</var> is true, the <a href=3D#current-target-element=
>current target element</a> is a
+       <i>text field</i> (see below), the <a href=3D#curr=
ent-drag-operation>current drag operation</a> is "<code =
title=3D"">move</code>", and the source of the dr=
ag-and-drop operation is a selection in the
+       DOM that is entirely contained within an <a href=3D#editing-ho=
st>editing host</a></dt>
+
+       <dd><p><a href=3D#delete-the-selection>Delete t=
he selection</a>.</dd>
+
+       <dt>If <var title=3D"">dropped</var> =
is true, the <a href=3D#current-target-element>current target eleme=
nt</a> is a
+       <i>text field</i> (see below), the <a href=3D#curr=
ent-drag-operation>current drag operation</a> is "<code =
title=3D"">move</code>", and the source of the dr=
ag-and-drop operation is a selection in a text
+       field</dt>
+
+       <dd><p>The user agent should delete the dragged selec=
tion from the relevant text
+       field.</dd>
+
+       <dt>If <var title=3D"">dropped</var> =
is false or if the <a href=3D#current-drag-operation>current drag o=
peration</a> is
+       "<code title=3D"">none</code>"&lt=
;/dt>
+
+       <dd><p>The drag was canceled. If the platform convent=
ions dictate that this be represented to
+       the user (e.g. by animating the dragged selection going back to t=
he source of the
+       drag-and-drop operation), then do so.</dd>
+
+       <dt>Otherwise</dt>
+
+       <dd><p>The event has no default action.</dd>
+
+      </dl><p>For the purposes of this step, a <i>text=
 field</i> is a <code><a href=3D#the-textarea-element>t=
extarea</a></code> element or an
+      <code><a href=3D#the-input-element>input</a><=
/code> element whose <code title=3Dattr-input-type><a href=3D=
#attr-input-type>type</a></code> attribute is in one
+      of the
+      <a href=3D"#text-(type=3Dtext)-state-and-search-state-(typ=
e=3Dsearch)" title=3Dattr-input-type-text>Text</a>,
+      <a href=3D"#text-(type=3Dtext)-state-and-search-state-(typ=
e=3Dsearch)" title=3Dattr-input-type-search>Search</a>,
+      <a href=3D"#telephone-state-(type=3Dtel)" title=3Datt=
r-input-type-tel>Tel</a>,
+      <a href=3D"#url-state-(type=3Durl)" title=3Dattr-inpu=
t-type-url>URL</a>,
+      <a href=3D"#e-mail-state-(type=3Demail)" title=3Dattr=
-input-type-email>E-mail</a>,
+      <a href=3D"#password-state-(type=3Dpassword)" title=3D=
attr-input-type-password>Password</a>, or
+      <a href=3D"#number-state-(type=3Dnumber)" title=3Datt=
r-input-type-number>Number</a>
+      states.</p>
+
+
+     </li>
+
+    </ol></li>
+
+  </ol><p class=3Dnote>User agents are encouraged to conside=
r how to react to drags near the edge of
+  scrollable regions. For example, if a user drags a link to the bottom =
of the viewport on a long
+  page, it might make sense to scroll the page so that the user can drop=
 the link lower on the
+  page.</p>
+
+  <p class=3Dnote>This model is independent of which <code>&=
lt;a href=3D#document>Document</a></code> object the nodes=
 involved
+  are from; the events are fired as described above and the rest of the =
processing model runs as
+  described above, irrespective of how many documents are involved in th=
e operation.</p>
+
+  </div>
+
+
+  <h4 id=3Ddndevents><span class=3Dsecno>8.7.6 </span>=
Events summary</h4>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <p>The following events are involved in the drag-and-drop
+  model.</p>
+
+  <table><thead><tr><th> Event Name </th>
+     <th> Target </th>
+     <!-- <th> Bubbles? </th> -->
+     <th> Cancelable? </th>
+     <th> <a href=3D#drag-data-store-mode>Drag data store mo=
de</a> </th>
+     <!-- <th> <code title=3D"dom-DataTransfer-effectAl=
lowed">effectAllowed</code> </th> -->
+     <th> <code title=3Ddom-DataTransfer-dropEffect><a hr=
ef=3D#dom-datatransfer-dropeffect>dropEffect</a></code> &l=
t;/th>
+     <th> Default Action </th>
+    <tbody><tr><td><dfn id=3Devent-dragstart title=3D=
event-dragstart><code>dragstart</code></dfn></td&=
gt;
+     <td><a href=3D#source-node>Source node</a></td=
>
+     <!-- <td>✓ Bubbles</td> -->
+     <td>✓ Cancelable</td>
+     <td><a href=3D#concept-dnd-rw title=3Dconcept-dnd-rw>Re=
ad/write mode</a>
+     <!-- <td>"<code title=3D"">uninitiali=
zed</code>"</td> -->
+     <td>"<code title=3D"">none</code>&=
quot;</td>
+     <td>Initiate the drag-and-drop operation</td>
+    <tr><td><dfn id=3Devent-drag title=3Devent-drag>&l=
t;code>drag</code></dfn></td>
+     <td><a href=3D#source-node>Source node</a></td=
>
+     <!-- <td>✓ Bubbles</td> -->
+     <td>✓ Cancelable</td>
+     <td><a href=3D#concept-dnd-p title=3Dconcept-dnd-p>Prot=
ected mode</a>
+     <!-- <td>Same as last event</td> -->
+     <td>"<code title=3D"">none</code>&=
quot;</td>
+     <td>Continue the drag-and-drop operation</td>
+    <tr><td><dfn id=3Devent-dragenter title=3Devent-drage=
nter><code>dragenter</code></dfn></td>
+     <td><a href=3D#immediate-user-selection>Immediate user =
selection</a> or <a href=3D#the-body-element-0>the body eleme=
nt</a></td>
+     <!-- <td>✓ Bubbles</td> -->
+     <td>✓ Cancelable</td>
+     <td><a href=3D#concept-dnd-p title=3Dconcept-dnd-p>Prot=
ected mode</a>
+     <!-- <td>Same as last event</td> -->
+     <td><a href=3D#dropEffect-initialization>Based on <c=
ode>effectAllowed</code> value</a></td>
+     <td>Reject <a href=3D#immediate-user-selection>immediat=
e user selection</a> as potential <a href=3D#current-target-elem=
ent title=3D"current target element">target element</a&gt=
;</td>
+    <tr><td><dfn id=3Devent-dragexit title=3Devent-dragex=
it><code>dragexit</code></dfn></td>
+     <td><a href=3D#current-target-element title=3D"curren=
t target element">Previous target element</a></td>
+     <!-- <td>✓ Bubbles</td> -->
+     <td>—</td>
+     <td><a href=3D#concept-dnd-p title=3Dconcept-dnd-p>Prot=
ected mode</a>
+     <!-- <td>Same as last event</td> -->
+     <td>"<code title=3D"">none</code>&=
quot;</td>
+     <td>None</td>
+    <tr><td><dfn id=3Devent-dragleave title=3Devent-dragl=
eave><code>dragleave</code></dfn></td>
+     <td><a href=3D#current-target-element title=3D"curren=
t target element">Previous target element</a></td>
+     <!-- <td>✓ Bubbles</td> -->
+     <td>—</td>
+     <td><a href=3D#concept-dnd-p title=3Dconcept-dnd-p>Prot=
ected mode</a>
+     <!-- <td>Same as last event</td> -->
+     <td>"<code title=3D"">none</code>&=
quot;</td>
+     <td>None</td>
+    <tr><td><dfn id=3Devent-dragover title=3Devent-dragov=
er><code>dragover</code></dfn></td>
+     <td><a href=3D#current-target-element>Current target el=
ement</a></td>
+     <!-- <td>✓ Bubbles</td> -->
+     <td>✓ Cancelable</td>
+     <td><a href=3D#concept-dnd-p title=3Dconcept-dnd-p>Prot=
ected mode</a>
+     <!-- <td>Same as last event</td> -->
+     <td><a href=3D#dropEffect-initialization>Based on <c=
ode>effectAllowed</code> value</a></td>
+     <td>Reset the <a href=3D#current-drag-operation>current=
 drag operation</a> to "none"</td>
+    <tr><td><dfn id=3Devent-drop title=3Devent-drop>&l=
t;code>drop</code></dfn></td>
+     <td><a href=3D#current-target-element>Current target el=
ement</a></td>
+     <!-- <td>✓ Bubbles</td> -->
+     <td>✓ Cancelable</td>
+     <td><a href=3D#concept-dnd-ro title=3Dconcept-dnd-ro>Re=
ad-only mode</a>
+     <!-- <td>Same as last event</td> -->
+     <td><a href=3D#current-drag-operation>Current drag oper=
ation</a></td>
+     <td>Varies</td>
+    <tr><td><dfn id=3Devent-dragend title=3Devent-dragend=
><code>dragend</code></dfn></td>
+     <td><a href=3D#source-node>Source node</a></td=
>
+     <!-- <td>✓ Bubbles</td> -->
+     <td>—</td>
+     <td><a href=3D#concept-dnd-p title=3Dconcept-dnd-p>Prot=
ected mode</a>
+     <!-- <td>Same as last event</td> -->
+     <td><a href=3D#current-drag-operation>Current drag oper=
ation</a></td>
+     <td>Varies</td>
+    </table><p>Not shown in the above table: all these event=
s bubble, and the <code title=3Ddom-DataTransfer-effectAllowed><=
a href=3D#dom-datatransfer-effectallowed>effectAllowed</a></c=
ode> attribute always has the value it had
+  after the <code title=3Devent-dragstart><a href=3D#event-drag=
start>dragstart</a></code> event, defaulting to "<=
code title=3D"">uninitialized</code>" in the <=
code title=3Devent-dragstart><a href=3D#event-dragstart>dragstar=
t</a></code> event.</p>
+
+
+
+  <h4 id=3Dthe-draggable-attribute><span class=3Dsecno>8.7.7=
 </span>The <dfn title=3Dattr-draggable><code>draggable=
</code></dfn> attribute</h4>
+
+  <p>All <a href=3D#html-elements>HTML elements</a> ma=
y have the <code title=3Dattr-draggable><a href=3D#the-draggable=
-attribute>draggable</a></code>
+  content attribute set. The <code title=3Dattr-draggable><a hr=
ef=3D#the-draggable-attribute>draggable</a></code> attribu=
te is an
+  <a href=3D#enumerated-attribute>enumerated attribute</a>. =
It has three states. The first state is <i>true</i> and it ha=
s
+  the keyword <code title=3D"">true</code>. The se=
cond state is <i>false</i> and it has the keyword
+  <code title=3D"">false</code>. The third state i=
s <i>auto</i>; it has no keywords but it is the
+  <i>missing value default</i>.</p>
+
+  <p>The <i>true</i> state means the element is dragga=
ble; the <i>false</i> state means that it is
+  not. The <i>auto</i> state uses the default behavior of th=
e user agent.</p>
+
+  <p>An element with a <code title=3Dattr-draggable><a hr=
ef=3D#the-draggable-attribute>draggable</a></code> attribu=
te should also have a
+  <code title=3Dattr-title><a href=3D#attr-title>title</a=
></code> attribute that names the element for the purpose of
+  non-visual interactions. <!-- "should", not "must&qu=
ot;, only because this is a relatively new
+  attribute and its design implications are not entirely obvious yet. Fo=
r example, what happens if
+  you use an element with text as a drag source? Is that sufficiently cl=
ear for ATs? Indeed,
+  shouldn't the element generally be distinguishable anyway for it to be=
 useful to drag? See also
+  the dropzone attribute. --></p>
+
+  <dl class=3Ddomintro><dt><var title=3D"">e=
lement</var> . <code title=3Ddom-draggable><a href=3D#dom-=
draggable>draggable</a></code> [ =3D <var title=3D&quot=
;">value</var> ]</dt>
+
+   <dd>
+
+    <p>Returns true if the element is draggable; otherwise, return=
s false.</p>
+
+    <p>Can be set, to override the default and set the <code ti=
tle=3Dattr-draggable><a href=3D#the-draggable-attribute>draggabl=
e</a></code>
+    content attribute.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-draggable title=3Ddom-draggable><c=
ode>draggable</code></dfn> IDL attribute, whose value depe=
nds
+  on the content attribute's in the way described below, controls whethe=
r or not the element is
+  draggable. Generally, only text selections are draggable, but elements=
 whose <code title=3Ddom-draggable><a href=3D#dom-draggable>d=
raggable</a></code> IDL attribute is true become draggable as=
 well.</p>
+
+  <p>If an element's <code title=3Dattr-draggable><a href=
=3D#the-draggable-attribute>draggable</a></code> content a=
ttribute has the state
+  <i>true</i>, the <code title=3Ddom-draggable><a h=
ref=3D#dom-draggable>draggable</a></code> IDL attribute mu=
st return true.</p>
+
+  <p>Otherwise, if the element's <code title=3Dattr-draggable&g=
t;<a href=3D#the-draggable-attribute>draggable</a></code&g=
t; content attribute has
+  the state <i>false</i>, the <code title=3Ddom-draggable=
><a href=3D#dom-draggable>draggable</a></code> IDL a=
ttribute must return
+  false.</p>
+
+  <p>Otherwise, the element's <code title=3Dattr-draggable>&=
lt;a href=3D#the-draggable-attribute>draggable</a></code> =
content attribute has
+  the state <i>auto</i>. If the element is an <code>&l=
t;a href=3D#the-img-element>img</a></code> element, an &lt=
;code><a href=3D#the-object-element>object</a></code&gt=
;
+  element that <a href=3D#represents>represents</a> an image=
, or an <code><a href=3D#the-a-element>a</a></code&g=
t; element with an <code title=3Dattr-hyperlink-href><a href=3D#=
attr-hyperlink-href>href</a></code> content attribute, the=
 <code title=3Ddom-draggable><a href=3D#dom-draggable>draggab=
le</a></code> IDL attribute must return true; otherwise, the =
<code title=3Ddom-draggable><a href=3D#dom-draggable>draggabl=
e</a></code> IDL attribute must return false.</p>
+
+  <p>If the <code title=3Ddom-draggable><a href=3D#dom-dr=
aggable>draggable</a></code> IDL attribute is set to the v=
alue false,
+  the <code title=3Dattr-draggable><a href=3D#the-draggable-att=
ribute>draggable</a></code> content attribute must be set =
to the literal
+  value <code title=3D"">false</code>. If the <=
code title=3Ddom-draggable><a href=3D#dom-draggable>draggable&lt=
;/a></code> IDL
+  attribute is set to the value true, the <code title=3Dattr-draggabl=
e><a href=3D#the-draggable-attribute>draggable</a></cod=
e> content
+  attribute must be set to the literal value <code title=3D"&quo=
t;>true</code>.</p>
+
+  </div>
+
+
+  <h4 id=3Dthe-dropzone-attribute><span class=3Dsecno>8.7.8 =
</span>The <dfn title=3Dattr-dropzone><code>dropzone&lt=
;/code></dfn> attribute</h4>
+
+  <p>All <a href=3D#html-elements>HTML elements</a> ma=
y have the <code title=3Dattr-dropzone><a href=3D#the-dropzone-a=
ttribute>dropzone</a></code> content
+  attribute set. When specified, its value must be an <a href=3D#unor=
dered-set-of-unique-space-separated-tokens>unordered set of unique spa=
ce-separated
+  tokens</a> that are <a href=3D#ascii-case-insensitive>ASCI=
I case-insensitive</a>. The allowed values are the
+  following:</p>
+
+  <dl><dt><dfn id=3Dattr-dropzone-copy title=3Dattr-dropz=
one-copy><code>copy</code></dfn></dt>
+
+   <dd><p>Indicates that dropping an accepted item on the el=
ement will result in a copy of the
+   dragged data.</p>
+
+
+   <dt><dfn id=3Dattr-dropzone-move title=3Dattr-dropzone-move&=
gt;<code>move</code></dfn></dt>
+
+   <dd><p>Indicates that dropping an accepted item on the el=
ement will result in the dragged data
+   being moved to the new location.</p>
+
+
+   <dt><dfn id=3Dattr-dropzone-link title=3Dattr-dropzone-link&=
gt;<code>link</code></dfn></dt>
+
+   <dd><p>Indicates that dropping an accepted item on the el=
ement will result in a link to the
+   original data.</p>
+
+
+   <dt>Any keyword with eight characters or more, beginning with t=
he an <a href=3D#ascii-case-insensitive>ASCII
+   case-insensitive</a> match for the string "<code title=3D=
"">string:</code>"</dt>
+
+   <dd><p>Indicates that items with <a href=3D#the-drag-d=
ata-item-kind>the drag data item kind</a> <i>Plain Unicode=
 string</i>
+   and <a href=3D#the-drag-data-item-type-string>the drag data ite=
m type string</a> set to a value that matches the remainder of the
+   keyword are accepted.</dd>
+
+<!--DND-v3:
+   <dt>Any keyword with six characters or more, beginning with an =
<span>ASCII
+   case-insensitive</span> match for the string "<code tit=
le=3D"">blob:</code>"</dt>
+
+   <dd><p>Indicates that items with <span>the drag dat=
a item kind</span> <i>Blob</i>, <i>File</i>=
,
+   or <i>Plain Unicode string</i> and <span>the drag d=
ata item type string</span> set to a value
+   that matches the remainder of the keyword are accepted.</p><=
/dd>
+-->
+
+   <dt>Any keyword with six characters or more, beginning with an =
<a href=3D#ascii-case-insensitive>ASCII
+   case-insensitive</a> match for the string "<code title=3D=
"">file:</code>"</dt>
+
+   <dd><p>Indicates that items with <a href=3D#the-drag-d=
ata-item-kind>the drag data item kind</a> <i><a href=3D=
#file>File</a></i> and <a href=3D#the-drag-data-item-ty=
pe-string>the
+   drag data item type string</a> set to a value that matches the =
remainder of the keyword are
+   accepted.</dd>
+
+<!--DND-v4:
+   <dt>Any keyword with eight characters or more, beginning with a=
n <span>ASCII
+   case-insensitive</span> match for the string "<code tit=
le=3D"">object:</code>"</dt>
+
+   <dd><p>Indicates that items with <span>the drag dat=
a item type string</span> set to a value that
+   matches the remainder of the keyword are accepted.</p></dd&g=
t;
+-->
+
+  </dl><p>The <code title=3Dattr-dropzone><a href=3D=
#the-dropzone-attribute>dropzone</a></code> content attrib=
ute's values must not have more
+  than one of the three feedback values (<code title=3Dattr-dropzone-=
copy><a href=3D#attr-dropzone-copy>copy</a></code>, =
<code title=3Dattr-dropzone-move><a href=3D#attr-dropzone-move&g=
t;move</a></code>, and <code title=3Dattr-dropzone-link&gt=
;<a href=3D#attr-dropzone-link>link</a></code>)
+  specified. If none are specified, the <code title=3Dattr-dropzone-c=
opy><a href=3D#attr-dropzone-copy>copy</a></code> va=
lue is
+  implied.</p>
+
+  <p>An element with a <code title=3Dattr-dropzone><a hre=
f=3D#the-dropzone-attribute>dropzone</a></code> attribute =
should also have a
+  <code title=3Dattr-title><a href=3D#attr-title>title</a=
></code> attribute that names the element for the purpose of
+  non-visual interactions. <!-- "should", not "must&qu=
ot;, only because this is a relatively new
+  attribute and its design implications are not entirely obvious yet. Fo=
r example, what happens if
+  you use an element with text as a drop zone? Is that sufficiently clea=
r for ATs? See also the
+  draggable attribute. --></p>
+
+  <div class=3Dimpl>
+
+  <p>A <code title=3Dattr-dropzone><a href=3D#the-dropzon=
e-attribute>dropzone</a></code> attribute <dfn id=3Dcon=
cept-dropzone-match title=3Dconcept-dropzone-match>matches a drag data=
 store</dfn> if the <a href=3D#dropzone-processing-steps><=
code title=3Dattr-dropzone>dropzone</code> processing steps</=
a> result in a match.</p>
+
+  <p>A <code title=3Dattr-dropzone><a href=3D#the-dropzon=
e-attribute>dropzone</a></code> attribute <dfn id=3Dcon=
cept-dropzone-operation title=3Dconcept-dropzone-operation>specifies a=
n operation</dfn> if the <a href=3D#dropzone-processing-steps&gt=
;<code title=3Dattr-dropzone>dropzone</code> processing steps=
</a> result in a specified operation. The
+  specified operation is as given by those steps.</p>
+
+  <p>The <dfn id=3Ddropzone-processing-steps><code title=3D=
attr-dropzone>dropzone</code> processing steps</dfn> are a=
s follows.
+  They either result in a match or not, and separate from this result ei=
ther in a specified
+  operation or not, as defined below.</p>
+
+  <ol><li><p>Let <var title=3D"">value=
</var> be the value of the <code title=3Dattr-dropzone><a =
href=3D#the-dropzone-attribute>dropzone</a></code> attribu=
te.</li>
+
+   <li><p>Let <var title=3D"">keywords</v=
ar> be the result of <a href=3D#split-a-string-on-spaces title=3D&q=
uot;split a string on
+   spaces">splitting <var title=3D"">value</v=
ar> on spaces</a>.</li>
+
+   <li><p>Let <var title=3D"">matched</va=
r> be false.</li>
+
+   <li><p>Let <var title=3D"">operation</=
var> be unspecified.</li>
+
+   <li>
+
+    <p>For each value in <var title=3D"">keywords&=
lt;/var>, if any, in the order that they were found in
+    <var title=3D"">value</var>, run the following=
 steps.</p>
+
+    <ol><li><p>Let <var title=3D"">key=
word</var> be the keyword.</li>
+
+     <li>
+
+      <p>If <var title=3D"">keyword</var> is=
 one of "<code title=3Dattr-dropzone-copy><a href=3D#attr-d=
ropzone-copy>copy</a></code>",
+      "<code title=3Dattr-dropzone-move><a href=3D#attr-dr=
opzone-move>move</a></code>", or "<code title=
=3Dattr-dropzone-link><a href=3D#attr-dropzone-link>link</a&g=
t;</code>", then: run the following substeps:</p>
+
+      <ol><li><p>If <var title=3D"">op=
eration</var> is still unspecified, then let <var title=3D"=
">operation</var> be the string given by <var title=3D&q=
uot;">keyword</var>.</li>
+
+       <li><p>Skip to the step labeled <i>end of keywo=
rd</i> below.</li>
+
+      </ol></li>
+
+     <li><p>If <var title=3D"">keyword</v=
ar> does not contain a U+003A COLON character (:), or if the
+     first such character in <var title=3D"">keyword<=
/var> is either the first character or the last
+     character in the string, then skip to the step labeled <i>end=
 of keyword</i> below.</li>
+
+     <li><p>Let <var title=3D"">kind code&lt=
;/var> be the substring of <var title=3D"">keyword<=
/var> from
+     the first character in the string to the last character in the stri=
ng that is before the first
+     U+003A COLON character (:) in the string, <a href=3D#converted-t=
o-ascii-lowercase>converted to ASCII lowercase</a>.</p>
+
+     <li>
+
+      <p>Jump to the appropriate step from the list below, based o=
n the value of <var title=3D"">kind
+      code</var>:</p>
+
+      <dl class=3Dswitch><dt>If <var title=3D""=
>kind code</var> is the string "<code title=3D"&quo=
t;>string</code>"</dt>
+       <dd>
+
+        <p>Let <var title=3D"">kind<!--DND-v3:/=
DND-v4: s--></var> be <i>Plain Unicode string</i>.&l=
t;/p>
+
+       </dd>
+
+<!--DND-v3:
+       <dt>If <var title=3D"">kind code</var&gt=
; is the string "<code title=3D"">blob</code>&=
quot;</dt>
+       <dd>
+
+        <p>Let <var title=3D"">kinds</var> b=
e <i>Plain Unicode string</i>, <i>Blob</i>, and
+        <i>File</i>.</p>
+
+       </dd>
+-->
+
+       <dt>If <var title=3D"">kind code</var&gt=
; is the string "<code title=3D"">file</code>&=
quot;</dt>
+       <dd>
+
+        <p>Let <var title=3D"">kind<!--DND-v3:/=
DND-v4: s--></var> be <i><a href=3D#file>File</a&=
gt;</i>.</p>
+
+       </dd>
+
+<!--DND-v4:
+       <dt>If <var title=3D"">kind code</var&gt=
; is the string "<code title=3D"">object</code&gt=
;"</dt>
+       <dd>
+
+        <p>Let <var title=3D"">kinds</var> b=
e <i>Plain Unicode string</i>, <i>Blob</i>, <i=
>File</i>,
+        and <i>Object</i>.</p>
+
+       </dd>
+-->
+
+       <dt>Otherwise</dt>
+       <dd>
+
+        <p>Skip to the step labeled <i>end of keyword</i&=
gt; below.</p>
+
+       </dd>
+
+      </dl></li>
+
+     <li><p>Let <var title=3D"">type</var=
> be the substring of <var title=3D"">keyword</var&=
gt; from the
+     first character after the first U+003A COLON character (:) in the s=
tring, to the last character
+     in the string, <a href=3D#converted-to-ascii-lowercase>conver=
ted to ASCII lowercase</a>.</li>
+
+     <li><p>If there exist any items in the <a href=3D#dr=
ag-data-store-item-list>drag data store item list</a> whose <=
a href=3D#the-drag-data-item-kind title=3D"the drag data item kind&q=
uot;>drag data item kind</a> is <!--DND-v3:/DND-v4: one of--&=
gt; the
+     kind<!--DND-v3:/DND-v4: s--> given in <var title=3D"&=
quot;>kind<!--DND-v3:/DND-v4: s--></var> and
+     whose <a href=3D#the-drag-data-item-type-string title=3D"th=
e drag data item type string">drag data item type string</a&gt=
; is <var title=3D"">type</var>, then let <var t=
itle=3D"">matched</var> be true.</li>
+
+     <li><p><i>End of keyword</i>: Go on to the =
next keyword, if any, or the next step in the
+     overall algorithm, if there are no more.</li>
+
+    </ol></li>
+
+   <li>
+
+    <p>The algorithm results in a match if <var title=3D"&=
quot;>matched</var> is true, and does not
+    otherwise.</p>
+
+    <p>The algorithm results in a specified operation if <var t=
itle=3D"">operation</var> is not
+    unspecified. The specified operation, if one is specified, is the on=
e given by <var title=3D"">operation</var>.</p&g=
t;
+
+   </li>
+
+  </ol><p>The <dfn id=3Ddom-dropzone title=3Ddom-dropzone=
><code>dropzone</code></dfn> IDL attribute must
+  <a href=3D#reflect>reflect</a> the content attribute of th=
e same name.</p>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>In this example, a <code><a href=3D#the-div-element=
>div</a></code> element is made into a drop target for ima=
ge files using
+   the <code title=3Dattr-dropzone><a href=3D#the-dropzone-attr=
ibute>dropzone</a></code> attribute. Images dropped into t=
he target are
+   then displayed.</p>
+
+   <pre><div dropzone=3D"copy file:image/png file:imag=
e/gif file:image/jpeg" ondrop=3D"receive(event, this)"&amp=
;gt;
+ <p>Drop an image here to have it displayed.</p&amp=
;gt;
+</div>
+<script>
+ function receive(event, element) {
+   var data =3D event.dataTransfer.items;
+   for (var i =3D 0; i < data.length; i +=3D 1) {
+     if ((data[i].kind =3D=3D 'file') && (data[i].type.m=
atch('^image/'))) {
+       var img =3D new Image();
+       img.src =3D window.createObjectURL(data[i].getAsFile());
+       element.appendChild(img);
+     }
+   }
+ }
+</script></pre>
+
+  </div>
+
+
+<!--
+  <h4>Copy and paste</h4>
+
+  <p>Copy-and-paste is a form of drag-and-drop: the "copy&quo=
t; part is equivalent to dragging content to
+  another application (the "clipboard"), and the "paste&q=
uot; part is equivalent to dragging content
+  <em>from</em> another application.</p>
+
+  <p>Select-and-paste (a model used by mouse operations in the X W=
indow System) is equivalent to a
+  drag-and-drop operation where the source is the selection.</p>
+
+
+  <div class=3D"impl">
+
+  <h5>Copy to clipboard</h5>
+
+  <p>When the user invokes a copy operation, the user agent must a=
ct as if the user had invoked a
+  drag on the current selection. If the drag-and-drop operation initiate=
s, then the user agent must
+  act as if the user had indicated (as the <span>immediate user se=
lection</span>) a hypothetical
+  application representing the clipboard. Then, the user agent must act =
as if the user had ended the
+  drag-and-drop operation without canceling it. If the drag-and-drop ope=
ration didn't get canceled,
+  the user agent should then follow the relevant platform-specific conve=
ntions for copy operations
+  (e.g. updating the clipboard).</p>
+
+  <p>The events involved in this process are the <code title=3D=
"event-dragstart">dragstart</code>,
+  <code title=3D"event-drag">drag</code>, and <=
code title=3D"event-dragend">dragend</code> events.&lt=
;/p>
+
+
+  <h5>Cut to clipboard</h5>
+
+  <p>When the user invokes a cut operation, the user agent must ac=
t as if the user had invoked a
+  copy operation (see the previous section), followed, if the copy was c=
ompleted successfully, by <a
+  href=3D"#contenteditable-delete">a selection delete opera=
tion</a>.</p>
+
+  <p>The events involved in this process are the <code title=3D=
"event-dragstart">dragstart</code>,
+  <code title=3D"event-drag">drag</code>, and <=
code title=3D"event-dragend">dragend</code> events.&lt=
;/p>
+
+
+  <h5>Paste from clipboard</h5>
+
+  <p>When the user invokes a clipboard paste operation, the user a=
gent must act as if the user had
+  invoked a drag on a hypothetical application representing the clipboar=
d, setting the data
+  associated with the drag as the content on the clipboard (in whatever =
formats are available).</p>
+
+  <p>Then, the user agent must act as if the user had indicated (a=
s the <span>immediate user
+  selection</span>) the element with the keyboard focus, and then =
ended the drag-and-drop operation
+  without canceling it.</p>
+
+  <p>The events involved in this process are the <code title=3D=
"event-dragenter">dragenter</code>,
+  <code title=3D"event-dragover">dragover</code>, =
<code title=3D"event-dragexit">dragexit</code>, &lt=
;code
+  title=3D"event-dragleave">dragleave</code>, and &lt=
;code title=3D"event-drop">drop</code> events.</p&g=
t;
+
+
+  <h5>Paste from selection</h5>
+
+  <p>When the user invokes a selection paste operation, the user a=
gent must act as if the user had
+  invoked a drag on the current selection, then indicated (as the <sp=
an>immediate user
+  selection</span>) the element with the keyboard focus, and then =
ended the drag-and-drop operation
+  without canceling it.</p>
+
+  <p>All the drag-and-drop events can be involved in this process.=
</p>
+
+  </div>
+-->
+
+
+<!--ADD-TOPIC:Security-->
+  <div class=3Dimpl>
+
+  <h4 id=3Dsecurity-risks-in-the-drag-and-drop-model><span clas=
s=3Dsecno>8.7.9 </span>Security risks in the drag-and-drop model=
</h4>
+
+  <p>User agents must not make the data added to the <code>&=
lt;a href=3D#datatransfer>DataTransfer</a></code> object d=
uring the
+  <code title=3Devent-dragstart><a href=3D#event-dragstart>d=
ragstart</a></code> event available to scripts until the <=
code title=3Devent-drop><a href=3D#event-drop>drop</a><=
/code> event, because otherwise, if a user were to drag sensitive
+  information from one document to a second document, crossing a hostile=
 third document in the
+  process, the hostile document could intercept the data.</p>
+
+  <p>For the same reason, user agents must consider a drop to be s=
uccessful only if the user
+  specifically ended the drag operation — if any scripts end t=
he drag operation, it must be
+  considered unsuccessful (canceled) and the <code title=3Devent-drop=
><a href=3D#event-drop>drop</a></code> event must no=
t be
+  fired.</p>
+
+  <p>User agents should take care to not start drag-and-drop opera=
tions in response to script
+  actions. For example, in a mouse-and-window environment, if a script m=
oves a window while the user
+  has his mouse button depressed, the UA would not consider that to star=
t a drag. This is important
+  because otherwise UAs could cause data to be dragged from sensitive so=
urces and dropped into
+  hostile documents without the user's consent.</p>
+
+  <p>User agents should filter potentially active (scripted) conte=
nt (e.g. HTML) when it is dragged
+  and when it is dropped, using a whitelist of known-safe features. Simi=
larly, <a href=3D#relative-url title=3D"relative
+  URL">relative URLs</a> should be turned into absolute UR=
Ls to avoid references changing in
+  unexpected ways. This specification does not specify how this is perfo=
rmed.</p>
+
+  <div class=3Dexample>
+
+   <p>Consider a hostile page providing some content and getting t=
he user to select and drag and
+   drop (or indeed, copy and paste) that content to a victim page's <=
code title=3Dattr-contenteditable><a href=3D#attr-contenteditable&g=
t;contenteditable</a></code> region. If the browser does not =
ensure that
+   only safe content is dragged, potentially unsafe content such as scri=
pts and event handlers in
+   the selection, once dropped (or pasted) into the victim site, get the=
 privileges of the victim
+   site. This would thus enable a cross-site scripting attack.</p>
+
+  </div>
+
+  </div>
+<!--REMOVE-TOPIC:Security-->
+
+
+
+  <h2 id=3Dcomms><span class=3Dsecno>9 </span>Communic=
ation</h2>
+
+
+
+  <h3 id=3Devent-definitions-2><span class=3Dsecno>9.1 </=
span>Event definitions</h3>
+
+  <p>Messages in <a href=3D#server-sent-events>server-sent e=
vents</a>, <a href=3D#network>Web sockets</a>, <a hr=
ef=3D#web-messaging>cross-document
+  messaging</a>, and <a href=3D#channel-messaging>channel me=
ssaging</a> use the <dfn id=3Devent-message title=3Devent-messag=
e><code>message</code></dfn> event. </p>
+
+  <p>The following interface is defined for this event:</p>
+
+  <pre class=3Didl>[Constructor(DOMString type, optional <a hre=
f=3D#messageeventinit>MessageEventInit</a> eventInitDict)]
+interface <dfn id=3Dmessageevent>MessageEvent</dfn> : <a =
href=3D#event>Event</a> {
+  readonly attribute any <a href=3D#dom-messageevent-data title=3Ddom=
-MessageEvent-data>data</a>;
+  readonly attribute DOMString <a href=3D#dom-messageevent-origin tit=
le=3Ddom-MessageEvent-origin>origin</a>;
+  readonly attribute DOMString <a href=3D#dom-messageevent-lasteventi=
d title=3Ddom-MessageEvent-lastEventId>lastEventId</a>;
+  readonly attribute (<a href=3D#windowproxy>WindowProxy</a>=
 or <a href=3D#messageport>MessagePort</a>)? <a href=3D#do=
m-messageevent-source title=3Ddom-MessageEvent-source>source</a>=
;
+  readonly attribute <a href=3D#messageport>MessagePort</a>[=
]? <a href=3D#dom-messageevent-ports title=3Ddom-MessageEvent-ports&gt=
;ports</a>;
+};
+
+dictionary <dfn id=3Dmessageeventinit>MessageEventInit</dfn>=
 : <a href=3D#eventinit>EventInit</a> {
+  any data;
+  DOMString origin;
+  DOMString lastEventId;
+  (<a href=3D#windowproxy>WindowProxy</a> or <a href=3D#m=
essageport>MessagePort</a>)? source;
+  sequence<<a href=3D#messageport>MessagePort</a>&amp=
;gt; ports;
+};</pre>
+
+  <dl class=3Ddomintro><dt><var title=3D"">e=
vent</var> . <code title=3Ddom-MessageEvent-data><a href=3D=
#dom-messageevent-data>data</a></code></dt>
+
+   <dd>
+
+    <p>Returns the data of the message.</p>
+
+   </dd>
+
+   <dt><var title=3D"">event</var> . <cod=
e title=3Ddom-MessageEvent-origin><a href=3D#dom-messageevent-origi=
n>origin</a></code></dt>
+
+   <dd>
+
+    <p>Returns the origin of the message, for <a href=3D#server=
-sent-events>server-sent events</a> and
+    <a href=3D#web-messaging>cross-document messaging</a>.&l=
t;/p>
+
+   </dd>
+
+   <dt><var title=3D"">event</var> . <cod=
e title=3Ddom-MessageEvent-lastEventId><a href=3D#dom-messageevent-=
lasteventid>lastEventId</a></code></dt>
+
+   <dd>
+
+    <p>Returns the <a href=3D#concept-event-stream-last-event-i=
d title=3Dconcept-event-stream-last-event-id>last event ID string</=
a>, for
+    <a href=3D#server-sent-events>server-sent events</a>.&lt=
;/p>
+
+   </dd>
+
+   <dt><var title=3D"">event</var> . <cod=
e title=3Ddom-MessageEvent-source><a href=3D#dom-messageevent-sourc=
e>source</a></code></dt>
+
+   <dd>
+
+    <p>Returns the <code><a href=3D#windowproxy>Window=
Proxy</a></code> of the source window, for <a href=3D#web-=
messaging>cross-document
+    messaging</a>, and the <code><a href=3D#messageport&g=
t;MessagePort</a></code> being attached, in the <code titl=
e=3Devent-connect>connect</code> event fired at <code><=
a href=3D#sharedworkerglobalscope>SharedWorkerGlobalScope</a>&lt=
;/code>
+    objects.</p>
+
+   </dd>
+
+   <dt><var title=3D"">event</var> . <cod=
e title=3Ddom-MessageEvent-ports><a href=3D#dom-messageevent-ports&=
gt;ports</a></code></dt>
+
+   <dd>
+
+    <p>Returns the <code><a href=3D#messageport>Messag=
ePort</a></code> array sent with the message, for <a href=3D=
#web-messaging>cross-document
+    messaging</a> and <a href=3D#channel-messaging>channel m=
essaging</a>.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>The <dfn id=3Ddom-messageevent-data title=3Ddom-MessageEve=
nt-data><code>data</code></dfn> attribute must retur=
n the value
+  it was initialized to. When the object is created, this attribute must=
 be initialized to null. It
+  represents the message being sent.</p>
+
+  <p>The <dfn id=3Ddom-messageevent-origin title=3Ddom-MessageE=
vent-origin><code>origin</code></dfn> attribute must=
 return the
+  value it was initialized to. When the object is created, this attribut=
e must be initialized to the
+  empty string. It represents, in <a href=3D#server-sent-events>se=
rver-sent events</a> and <a href=3D#web-messaging>cross-docum=
ent
+  messaging</a>, the <a href=3D#origin>origin</a> of t=
he document that sent the message (typically the
+  scheme, hostname, and port of the document, but not its path or fragme=
nt identifier).</p>
+
+  <p>The <dfn id=3Ddom-messageevent-lasteventid title=3Ddom-Mes=
sageEvent-lastEventId><code>lastEventId</code></dfn>=
 attribute must
+  return the value it was initialized to. When the object is created, th=
is attribute must be
+  initialized to the empty string. It represents, in <a href=3D#serve=
r-sent-events>server-sent events</a>, the <a href=3D#concept-=
event-stream-last-event-id title=3Dconcept-event-stream-last-event-id>=
last event ID string</a> of the event source.</p>
+
+  <p>The <dfn id=3Ddom-messageevent-source title=3Ddom-MessageE=
vent-source><code>source</code></dfn> attribute must=
 return the
+  value it was initialized to. When the object is created, this attribut=
e must be initialized to
+  null. It represents, in <a href=3D#web-messaging>cross-document =
messaging</a>, the <code><a href=3D#windowproxy>WindowP=
roxy</a></code> of the
+  <a href=3D#browsing-context>browsing context</a> of the &l=
t;code><a href=3D#window>Window</a></code> object fr=
om which the message came; and
+  in the <code title=3Devent-connect>connect</code> events u=
sed by <a href=3D#sharedworkerglobalscope title=3DSharedWorkerGlobalSc=
ope>shared workers</a>, the newly connecting
+  <code><a href=3D#messageport>MessagePort</a></cod=
e>.</p>
+
+  <p>The <dfn id=3Ddom-messageevent-ports title=3Ddom-MessageEv=
ent-ports><code>ports</code></dfn> attribute must re=
turn the
+  value it was initialized to. When the object is created, this attribut=
e must be initialized to
+  null<!-- a <span title=3D"dfn-read-only-array">read=
 only</span> empty array-->. It represents, in
+  <a href=3D#web-messaging>cross-document messaging</a> and =
<a href=3D#channel-messaging>channel messaging</a>, the
+  <code><a href=3D#messageport>MessagePort</a></cod=
e> array being sent, if any.</p>
+
+  </div>
+
+ =20
+
+
+  <h3 id=3Dserver-sent-events><span class=3Dsecno>9.2 </s=
pan><dfn>Server-sent events</dfn></h3>
+
+ =20
+
+  <h4 id=3Dserver-sent-events-intro><span class=3Dsecno>9.2.=
1 </span>Introduction</h4>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <p>To enable servers to push data to Web pages over HTTP or usin=
g dedicated server-push protocols,
+  this specification introduces the <code><a href=3D#eventsourc=
e>EventSource</a></code> interface.</p>
+
+  <p>Using this API consists of creating an <code><a href=
=3D#eventsource>EventSource</a></code> object and register=
ing an event
+  listener.</p>
+
+  <pre>var source =3D new EventSource('updates.cgi');
+source.onmessage =3D function (event) {
+  alert(event.data);
+};</pre>
+
+  <p>On the server-side, the script ("<code title=3D"=
">updates.cgi</code>" in this case) sends
+  messages in the following form, with the <code><a href=3D#tex=
t/event-stream>text/event-stream</a></code> MIME type:<=
/p>
+
+  <pre>data: This is the first message.
+
+data: This is the second message, it
+data: has two lines.
+
+data: This is the third message.</pre>
+
+  <hr><p>Authors can separate events by using different even=
t types. Here is a stream that has two event
+  types, "add" and "remove":</p>
+
+  <pre>event: add
+data: 73857293
+
+event: remove
+data: 2153
+
+event: add
+data: 113411</pre>
+
+  <p>The script to handle such a stream would look like this (wher=
e <code title=3D"">addHandler</code>
+  and <code title=3D"">removeHandler</code> are fu=
nctions that take one argument, the event):</p>
+
+  <pre>var source =3D new EventSource('updates.cgi');
+source.addEventListener('add', addHandler, false);
+source.addEventListener('remove', removeHandler, false);</pre>
+
+  <p>The default event type is "message".</p>
+
+  <p>Event streams are always decoded as UTF-8. There is no way to=
 specify another character
+  encoding.</p>
+
+  <hr><p>Event stream requests can be redirected using HTTP =
301 and 307 redirects as with normal HTTP
+  requests. Clients will reconnect if the connection is closed; a client=
 can be told to stop
+  reconnecting using the HTTP 204 No Content response code.</p>
+
+  <p>Using this API rather than emulating it using <code>XML=
HttpRequest</code> or an
+  <code><a href=3D#the-iframe-element>iframe</a></c=
ode> allows the user agent to make better use of network resources in =
cases where
+  the user agent implementor and the network operator are able to coordi=
nate in advance. Amongst
+  other benefits, this can result in significant savings in battery life=
 on portable devices. This
+  is discussed further in the section below on <a href=3D#eventsource=
-push>connectionless
+  push</a>.</p>
+
+
+
+  <h4 id=3Dthe-eventsource-interface><span class=3Dsecno>9.2=
.2 </span>The <code><a href=3D#eventsource>EventSource&=
lt;/a></code> interface</h4>
+
+  <pre class=3Didl>[<a href=3D#dom-eventsource title=3Ddom-Even=
tSource>Constructor</a>(DOMString url, optional <a href=3D#ev=
entsourceinit>EventSourceInit</a> eventSourceInitDict)]
+interface <dfn id=3Deventsource>EventSource</dfn> : <a hr=
ef=3D#eventtarget>EventTarget</a> {
+  readonly attribute DOMString <a href=3D#dom-eventsource-url title=3D=
dom-EventSource-url>url</a>;
+  readonly attribute boolean <a href=3D#dom-eventsource-withcredentia=
ls title=3Ddom-EventSource-withCredentials>withCredentials</a>;
+
+  // ready state
+  const unsigned short <a href=3D#dom-eventsource-connecting title=3D=
dom-EventSource-CONNECTING>CONNECTING</a> =3D 0;
+  const unsigned short <a href=3D#dom-eventsource-open title=3Ddom-Ev=
entSource-OPEN>OPEN</a> =3D 1;
+  const unsigned short <a href=3D#dom-eventsource-closed title=3Ddom-=
EventSource-CLOSED>CLOSED</a> =3D 2;
+  readonly attribute unsigned short <a href=3D#dom-eventsource-readys=
tate title=3Ddom-EventSource-readyState>readyState</a>;
+
+  // networking
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-eventsource-onopen title=3Dhandler-EventSource-on=
open>onopen</a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-eventsource-onmessage title=3Dhandler-EventSource=
-onmessage>onmessage</a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-eventsource-onerror title=3Dhandler-EventSource-o=
nerror>onerror</a>;
+  void <a href=3D#dom-eventsource-close title=3Ddom-EventSource-close=
>close</a>();
+};
+
+dictionary <dfn id=3Deventsourceinit>EventSourceInit</dfn> {
+  boolean <dfn id=3Ddom-eventsourceinit-withcredentials title=3Ddom-E=
ventSourceInit-withCredentials>withCredentials</dfn> =3D false;
+};</pre>
+
+  <p>The <dfn id=3Ddom-eventsource title=3Ddom-EventSource>&=
lt;code>EventSource()</code></dfn> constructor takes one o=
r two
+  arguments. The first specifies the <a href=3D#url>URL</a> =
to which to connect. The second specifies the
+  settings, if any, in the form of an <code><a href=3D#eventsou=
rceinit>EventSourceInit</a></code> dictionary. When the
+  <code>EventSource()</code> constructor is invoked, the UA =
must run these steps:</p>
+
+  <ol><!--CLEANUP--><li><p><a href=3D#resolve=
-a-url title=3D"resolve a url">Resolve</a> the <a h=
ref=3D#url>URL</a> specified in the first
+   argument, relative to the <a href=3D#api-base-url>API base URL&=
lt;/a> specified by the <a href=3D#entry-settings-object>entry s=
ettings
+   object</a>.
+   </li>
+
+   <li><p>If the previous step failed, then throw a <code=
><a href=3D#syntaxerror>SyntaxError</a></code> excep=
tion and abort
+   these steps.</li>
+
+   <li><p>Create a new <code><a href=3D#eventsource=
>EventSource</a></code> object.</li>
+
+   <li><p>Let <var title=3D"">CORS mode</=
var> be <a href=3D#attr-crossorigin-anonymous title=3Dattr-crossori=
gin-anonymous>Anonymous</a>.</li>
+
+   <li><p>If the second argument is present, and the <cod=
e title=3Ddom-EventSourceInit-withCredentials><a href=3D#dom-events=
ourceinit-withcredentials>withCredentials</a></code> dicti=
onary member has the
+   value true, then set <var title=3D"">CORS mode</va=
r> to <a href=3D#attr-crossorigin-use-credentials title=3Dattr-cros=
sorigin-use-credentials>Use Credentials</a> and initialize the n=
ew
+   <code><a href=3D#eventsource>EventSource</a></co=
de> object's <code title=3Ddom-EventSource-withCredentials><a=
 href=3D#dom-eventsource-withcredentials>withCredentials</a><=
/code> attribute to true.</li>
+
+   <li><p>Return the new <code><a href=3D#eventsour=
ce>EventSource</a></code> object, but continue these steps
+   asynchronously.</li>
+
+   <li><!-- if you change this, don't forget to update the reco=
nnecting fetch lower down as well! -->
+
+<!--CLEANUP-->
+    <p>Do a <a href=3D#potentially-cors-enabled-fetch>potent=
ially CORS-enabled fetch</a><!--FETCH--> of the resulting &lt=
;a href=3D#absolute-url>absolute
+    URL</a> using the <a href=3D#api-referrer-source>API ref=
errer source</a> specified by the <a href=3D#entry-settings-obje=
ct>entry settings
+    object</a>, with the <i>mode</i> being <var tit=
le=3D"">CORS mode</var>, and the <i title=3D"&=
quot;>origin</i> being the <a href=3D#origin>origin</a&=
gt; specified by the <a href=3D#entry-settings-object>entry setting=
s object</a><!--, and the
+    <i>default origin behaviour</i> set to <i>fail<=
/i> (though it has no effect in the "Anonymous"
+    and "Use Credentials" modes)-->, and process the resour=
ce obtained in this fashion, if any, as
+    described below.</p>
+
+    <p class=3Dnote>The definition of the <a href=3D#fetch titl=
e=3Dfetch>fetching</a> algorithm (which is
+    used by CORS) is such that if the browser is already fetching the re=
source identified by the
+    given <a href=3D#absolute-url>absolute URL</a>, that con=
nection can be reused, instead of a new connection
+    being established. All messages received up to this point are dispat=
ched immediately, in this
+    case.</p>
+
+   </li>
+
+  </ol><hr><p>The <dfn id=3Ddom-eventsource-url tit=
le=3Ddom-EventSource-url><code>url</code></dfn> attr=
ibute must return the
+  <a href=3D#absolute-url>absolute URL</a> that resulted fro=
m <a href=3D#resolve-a-url title=3D"resolve a url">resolv=
ing</a> the
+  value that was passed to the constructor.</p> <!-- not the re=
sult of redirects, since that would
+  introduce race conditions -->
+
+  <p>The <dfn id=3Ddom-eventsource-withcredentials title=3Ddom-=
EventSource-withCredentials><code>withCredentials</code>&l=
t;/dfn> attribute
+  must return the value to which it was last initialized. When the objec=
t is created, it must be
+  initialized to false.</p>
+
+  <p>The <dfn id=3Ddom-eventsource-readystate title=3Ddom-Event=
Source-readyState><code>readyState</code></dfn> attr=
ibute represents
+  the state of the connection. It can have the following values:</p&g=
t;
+
+  <dl><dt><dfn id=3Ddom-eventsource-connecting title=3Ddo=
m-EventSource-CONNECTING><code>CONNECTING</code></dfn&g=
t; (numeric value 0)</dt>
+
+   <dd>The connection has not yet been established, or it was clos=
ed and the user agent is
+   reconnecting.</dd>
+
+   <dt><dfn id=3Ddom-eventsource-open title=3Ddom-EventSource-O=
PEN><code>OPEN</code></dfn> (numeric value 1)</dt=
>
+
+   <dd>The user agent has an open connection and is dispatching ev=
ents as it receives them.</dd>
+
+   <dt><dfn id=3Ddom-eventsource-closed title=3Ddom-EventSource=
-CLOSED><code>CLOSED</code></dfn> (numeric value 2)&=
lt;/dt>
+
+   <dd>The connection is not open, and the user agent is not tryin=
g to reconnect. Either there was a
+   fatal error or the <code title=3Ddom-EventSource-close><a hr=
ef=3D#dom-eventsource-close>close()</a></code> method was =
invoked.</dd>
+
+  </dl><p>When the object is created its <code title=3Ddo=
m-EventSource-readyState><a href=3D#dom-eventsource-readystate>r=
eadyState</a></code> must
+  be set to <code title=3Ddom-EventSource-CONNECTING><a href=3D=
#dom-eventsource-connecting>CONNECTING</a></code> (0). The=
 rules given below
+  for handling the connection define when the value changes.</p>
+
+  <p>The <dfn id=3Ddom-eventsource-close title=3Ddom-EventSourc=
e-close><code>close()</code></dfn> method must abort=
 any
+  instances of the <a href=3D#fetch>fetch</a> algorithm star=
ted for this <code><a href=3D#eventsource>EventSource</a&g=
t;</code> object,
+  and must set the <code title=3Ddom-EventSource-readyState><a =
href=3D#dom-eventsource-readystate>readyState</a></code> a=
ttribute to <code title=3Ddom-EventSource-CLOSED><a href=3D#dom-=
eventsource-closed>CLOSED</a></code>.</p> <!-- th=
is also causes all the message events to
+  stop firing, even if they were queued before close() was called -->
+
+  <p>The following are the <a href=3D#event-handlers>event h=
andlers</a> (and their corresponding <a href=3D#event-handler-ev=
ent-type title=3D"event
+  handler event type">event handler event types</a>) that =
must be supported, as <a href=3D#event-handler-idl-attributes>event
+  handler IDL attributes</a>, by all objects implementing the <=
code><a href=3D#eventsource>EventSource</a></code>
+  interface:</p>
+
+  <table><thead><tr><th><a href=3D#event-hand=
lers title=3D"event handlers">Event handler</a> <th=
><a href=3D#event-handler-event-type>Event handler event type&lt=
;/a>
+   <tbody><tr><td><dfn id=3Dhandler-eventsource-ono=
pen title=3Dhandler-EventSource-onopen><code>onopen</code>=
</dfn> <td> <code title=3Devent-open>open</code>
+    <tr><td><dfn id=3Dhandler-eventsource-onmessage title=
=3Dhandler-EventSource-onmessage><code>onmessage</code>&lt=
;/dfn> <td> <code title=3Devent-message><a href=3D#even=
t-message>message</a></code>
+    <tr><td><dfn id=3Dhandler-eventsource-onerror title=3D=
handler-EventSource-onerror><code>onerror</code></dfn&g=
t; <td> <code title=3Devent-error>error</code>
+  </table><hr><p>In addition to the above, each <co=
de><a href=3D#eventsource>EventSource</a></code> obj=
ect has the following associated
+  with it:</p>
+
+  <ul><li>A <dfn id=3Dconcept-event-stream-reconnection-t=
ime title=3Dconcept-event-stream-reconnection-time>reconnection time&l=
t;/dfn>, in
+   milliseconds. This must initially be a user-agent-defined value, prob=
ably in the region of a few
+   seconds.</li>
+
+   <li>A <dfn id=3Dconcept-event-stream-last-event-id title=3Dc=
oncept-event-stream-last-event-id>last event ID string</dfn>. Th=
is must
+   initially be the empty string.</li>
+
+  </ul><p>These values are not currently exposed on the inte=
rface.</p>
+
+
+  <h4 id=3Dprocessing-model-6><span class=3Dsecno>9.2.3 <=
/span>Processing model</h4>
+
+  <p>The resource indicated in the argument to the <code title=3D=
dom-EventSource><a href=3D#dom-eventsource>EventSource</a>=
</code>
+  constructor is <a href=3D#fetch title=3Dfetch>fetched</a> =
when the constructor is run.</p>
+
+  <p>For HTTP connections, the <code title=3D"">Ac=
cept</code> header may be included; if included, it
+  must contain only formats of event framing that are supported by the u=
ser agent (one of which must
+  be <code><a href=3D#text/event-stream>text/event-stream&lt=
;/a></code>, as described below).</p>
+
+  <p>If the event source's <a href=3D#concept-event-stream-last=
-event-id title=3Dconcept-event-stream-last-event-id>last event ID
+  string</a> is not the empty string, then a <code title=3Dhttp=
-last-event-id><a href=3D#last-event-id>Last-Event-ID</a>&=
lt;/code> HTTP header must be included with the request,
+  whose value is the value of the event source's <a href=3D#concept-e=
vent-stream-last-event-id title=3Dconcept-event-stream-last-event-id>l=
ast event ID string</a>, encoded as UTF-8.</p>
+
+  <p>User agents should use the <code>Cache-Control: no-cach=
e</code> header in requests to bypass
+  any caches for requests of event sources. (This header is not a <a =
href=3D#custom-request-headers title=3D"custom request
+  headers">custom request header</a>, so the user agent wi=
ll still use the CORS <a href=3D#simple-cross-origin-request>simple
+  cross-origin request</a> mechanism.) User agents should ignore H=
TTP cache headers in the
+  response, never caching event sources.</p>
+
+  <hr><p>As data is received, the <a href=3D#concept-task=
 title=3Dconcept-task>tasks</a> queued by the <a href=3D#netw=
orking-task-source>networking
+  task source</a> to handle the data must act as follows.</p&gt=
;
+
+  <p>HTTP 200 OK responses with a <a href=3D#content-type>Co=
ntent-Type</a> header specifying the type
+  <code><a href=3D#text/event-stream>text/event-stream</a=
></code>, ignoring any <a href=3D#mime-type>MIME type</=
a> parameters, must be processed
+  line by line <a href=3D#event-stream-interpretation>as described=
 below</a>.</p>
+
+  <p>When a successful response with a supported <a href=3D#mim=
e-type>MIME type</a> is received, such that the
+  user agent begins parsing the contents of the stream, the user agent m=
ust <a href=3D#announce-the-connection>announce the
+  connection</a>.</p>
+
+  <p>The <a href=3D#concept-task title=3Dconcept-task>task&l=
t;/a> that the <a href=3D#networking-task-source>networking task=
 source</a> places
+  on the <a href=3D#task-queue>task queue</a> once the <a=
 href=3D#fetch title=3Dfetch>fetching algorithm</a> for such a
+  resource (with the correct <a href=3D#mime-type>MIME type</a&=
gt;) has completed must cause the user agent to
+  asynchronously <a href=3D#reestablish-the-connection>reestablish=
 the connection</a>. This applies whether the connection is
+  closed gracefully or unexpectedly (but does not apply when the <a h=
ref=3D#fetch>fetch</a> algorithm is
+  canceled by the user agent, e.g. in response to <code title=3Ddom-w=
indow-stop><a href=3D#dom-window-stop>window.stop()</a>&lt=
;/code>,
+  since in those cases the final <a href=3D#concept-task title=3Dconc=
ept-task>task</a> is actually discarded).
+  It doesn't apply for the error conditions listed below except
+  where explicitly specified.</p>
+
+  <p>HTTP 200 OK responses that have a <a href=3D#content-type&=
gt;Content-Type</a> specifying an unsupported type, or
+  that have no <a href=3D#content-type>Content-Type</a> at a=
ll, must cause the user agent to <a href=3D#fail-the-connection>fai=
l the
+  connection</a>.</p> <!-- about:blank is defined as havi=
ng no MIME type; javascript: as having
+  the type text/html -->
+
+  <p>HTTP 305 Use Proxy, 401 Unauthorized, and 407 Proxy Authentic=
ation Required should be treated
+  transparently as for any other subresource.</p>
+
+  <p>HTTP 301 Moved Permanently, 302 Found, 303 See Other, and 307=
 Temporary Redirect responses are
+  handled by the <a href=3D#fetch title=3Dfetch>fetching</a>=
 and CORS algorithms. In the case of 301
+  redirects, the user agent must also remember the new URL so that subse=
quent requests for this
+  resource for this <code><a href=3D#eventsource>EventSource=
</a></code> object start with the URL given for the last 301 =
seen
+  for requests for this object.</p>
+
+  <p id=3Devent-source-network-errors-reconnect>Network errors tha=
t prevents the connection from
+  being established in the first place (e.g. DNS errors), must cause the=
 user agent to
+  asynchronously <a href=3D#reestablish-the-connection>reestablish=
 the connection</a>.</p>
+
+  <p id=3Devent-source-fail-reasons>Any other HTTP response code n=
ot listed here, as well as the
+  cancelation of the <a href=3D#fetch>fetch</a> algorithm by=
 the user agent (e.g. in response to <code title=3Ddom-window-stop>=
<a href=3D#dom-window-stop>window.stop()</a></code> or =
the user canceling the network connection
+  manually) must cause the user agent to <a href=3D#fail-the-connecti=
on>fail the connection</a>.</p> <!-- including: HTTP
+  201 Created, 202 Accepted, 203 Non-Authoritative Information, 204 No C=
ontent, 205 Reset Content,
+  206 Partial Content, 300 Multiple Choices, 304 Not Modified, 400 Bad R=
equest, 403 Forbidden, 404
+  Not Found, 405 Method Not Allowed, 406 Not Acceptable, 408 Request Tim=
eout, 409 Conflict, 410
+  Gone, 411 Length Required, 412 Precondition Failed, 413 Request Entity=
 Too Large, 414 Request-URI
+  Too Long, 415 Unsupported Media Type, 416 Requested Range Not Satisfia=
ble, 417 Expectation Failed,
+  HTTP 500 Internal Server Error, 501 Not Implemented, 502 Bad Gateway, =
503 Service Unavailable, and
+  504 Gateway Timeout responses, and 505 HTTP Version Not Supported resp=
onses --> <!-- mailto: is
+  defined as equivalent to HTTP 204 -->
+
+  <p>For non-HTTP protocols, UAs should act in equivalent ways.&lt=
;/p>
+
+  <hr><p>When a user agent is to <dfn id=3Dannounce-the-c=
onnection>announce the connection</dfn>, the user agent must &lt=
;a href=3D#queue-a-task>queue a
+  task</a> which, if the <code title=3Ddom-EventSource-readySta=
te><a href=3D#dom-eventsource-readystate>readyState</a>&lt=
;/code> attribute is
+  set to a value other than <code title=3Ddom-EventSource-CLOSED>&=
lt;a href=3D#dom-eventsource-closed>CLOSED</a></code>, set=
s the <code title=3Ddom-EventSource-readyState><a href=3D#dom-ev=
entsource-readystate>readyState</a></code> attribute to &l=
t;code title=3Ddom-EventSource-OPEN><a href=3D#dom-eventsource-open=
>OPEN</a></code> and <a href=3D#fire-a-simple-event tit=
le=3D"fire a simple event">fires a simple
+  event</a> named <code title=3Devent-open>open</code>=
 at the <code><a href=3D#eventsource>EventSource</a>&lt=
;/code>
+  object.</p>
+
+  <p>When a user agent is to <dfn id=3Dreestablish-the-connecti=
on>reestablish the connection</dfn>, the user agent must run the
+  following steps. These steps are run asynchronously, not as part of a =
<a href=3D#concept-task title=3Dconcept-task>task</a>. (The t=
asks that it queues, of course, are run like normal tasks
+  and not asynchronously.)</p>
+
+  <ol><li>
+
+    <p><a href=3D#queue-a-task>Queue a task</a> to run=
 the following steps:</p>
+
+    <ol><li><p>If the <code title=3Ddom-EventSource=
-readyState><a href=3D#dom-eventsource-readystate>readyState<=
/a></code> attribute is set to
+     <code title=3Ddom-EventSource-CLOSED><a href=3D#dom-events=
ource-closed>CLOSED</a></code>, abort the task.</li>
+
+     <li><p>Set the <code title=3Ddom-EventSource-readySt=
ate><a href=3D#dom-eventsource-readystate>readyState</a>&l=
t;/code> attribute to <code title=3Ddom-EventSource-CONNECTING>&=
lt;a href=3D#dom-eventsource-connecting>CONNECTING</a></code&=
gt;.</li>
+
+     <li><p><a href=3D#fire-a-simple-event>Fire a simp=
le event</a> named <code title=3Devent-error>error</code&g=
t; at the
+     <code><a href=3D#eventsource>EventSource</a></=
code> object.</li>
+
+    </ol></li>
+
+   <li><p>Wait a delay equal to the reconnection time of the=
 event source.</li>
+
+   <li><p>Optionally, wait some more. In particular, if the =
previous attempt failed, then user
+   agents might introduce an exponential backoff delay to avoid overload=
ing a potentially already
+   overloaded server. Alternatively, if the operating system has reporte=
d that there is no network
+   connectivity, user agents might wait for the operating system to anno=
unce that the network
+   connection has returned before retrying.</li>
+
+   <li><p>Wait until the aforementioned task has run, if it =
has not yet run.</li>
+
+   <li>
+
+    <p><a href=3D#queue-a-task>Queue a task</a> to run=
 the following steps:</p>
+
+    <ol><li><p>If the <code title=3Ddom-EventSource=
-readyState><a href=3D#dom-eventsource-readystate>readyState<=
/a></code> attribute is not set
+     to <code title=3Ddom-EventSource-CONNECTING><a href=3D#dom=
-eventsource-connecting>CONNECTING</a></code>, abort these=
 steps.</li>
+
+     <li><p>Perform a <a href=3D#potentially-cors-enabled=
-fetch>potentially CORS-enabled fetch</a><!--FETCH--> of t=
he <a href=3D#absolute-url>absolute
+     URL</a> of the event source resource, using the same <i&gt=
;<a href=3D#referrer-source>referrer source</a></i>, an=
d with the
+     same <i>mode</i><!--, <i>default origin behavi=
our</i>,--> and <i title=3D"">origin</i>, =
as those
+     used in the original request triggered by the <code title=3Ddom-=
EventSource><a href=3D#dom-eventsource>EventSource()</a>&l=
t;/code> constructor, and process the resource obtained in
+     this fashion, if any, as described earlier in this section.</li&=
gt;
+
+    </ol></li>
+
+  </ol><p>When a user agent is to <dfn id=3Dfail-the-conn=
ection>fail the connection</dfn>, the user agent must <a href=
=3D#queue-a-task>queue a
+  task</a> which, if the <code title=3Ddom-EventSource-readySta=
te><a href=3D#dom-eventsource-readystate>readyState</a>&lt=
;/code> attribute is
+  set to a value other than <code title=3Ddom-EventSource-CLOSED>&=
lt;a href=3D#dom-eventsource-closed>CLOSED</a></code>, set=
s the <code title=3Ddom-EventSource-readyState><a href=3D#dom-ev=
entsource-readystate>readyState</a></code> attribute to &l=
t;code title=3Ddom-EventSource-CLOSED><a href=3D#dom-eventsource-cl=
osed>CLOSED</a></code> and <a href=3D#fire-a-simple-eve=
nt title=3D"fire a simple event">fires a simple
+  event</a> named <code title=3Devent-error>error</code&g=
t; at the <code><a href=3D#eventsource>EventSource</a>&=
lt;/code> object.
+  <strong>Once the user agent has <a href=3D#fail-the-connectio=
n title=3D"fail the connection">failed the connection</a&=
gt;, it
+  does <em>not</em> attempt to reconnect!</strong><=
/p>
+
+  <hr><p>The <a href=3D#task-source>task source</a&=
gt; for any <a href=3D#concept-task title=3Dconcept-task>tasks</=
a> that are <a href=3D#queue-a-task title=3D"queue a task&quot=
;>queued</a> by <code><a href=3D#eventsource>EventSo=
urce</a></code> objects is the <dfn id=3Dremote-event-task=
-source>remote event
+  task source</dfn>.</p>
+
+
+  <h4 id=3Dparsing-an-event-stream><span class=3Dsecno>9.2.4=
 </span>Parsing an event stream</h4>
+
+  <p>This event stream format's <a href=3D#mime-type>MIME ty=
pe</a> is <code><a href=3D#text/event-stream>text/event=
-stream</a></code>.</p>
+
+  <p>The event stream format is as described by the <code title=
=3D"">stream</code> production of the
+  following ABNF, the character set for which is Unicode. <a href=3D#=
refsABNF>[ABNF]</a></p>
+
+  <pre>stream        =3D [ bom ] *event
+event         =3D *( comment / field ) end-of-line
+comment       =3D colon *any-char end-of-line
+field         =3D 1*name-char [ colon [ space ] *any-char ] end-of-line
+end-of-line   =3D ( cr lf / cr / lf )
+
+; characters
+lf            =3D %x000A ; U+000A LINE FEED (LF)
+cr            =3D %x000D ; U+000D CARRIAGE RETURN (CR)
+space         =3D %x0020 ; U+0020 SPACE
+colon         =3D %x003A ; U+003A COLON (:)
+bom           =3D %xFEFF ; U+FEFF BYTE ORDER MARK
+name-char     =3D %x0000-0009 / %x000B-000C / %x000E-0039 / %x003B-10FFF=
F
+                ; a <a href=3D#unicode-character>Unicode character=
</a> other than U+000A LINE FEED (LF), U+000D CARRIAGE RETURN (CR),=
 or U+003A COLON (:)
+any-char      =3D %x0000-0009 / %x000B-000C / %x000E-10FFFF
+                ; a <a href=3D#unicode-character>Unicode character=
</a> other than U+000A LINE FEED (LF) or U+000D CARRIAGE RETURN (CR=
)</pre>
+
+  <p>Event streams in this format must always be encoded as UTF-8.=
 <a href=3D#refsRFC3629>[RFC3629]</a></p>
+
+  <p>Lines must be separated by either a U+000D CARRIAGE RETURN U+=
000A LINE FEED (CRLF) character
+  pair, a single U+000A LINE FEED (LF) character, or a single U+000D CAR=
RIAGE RETURN (CR)
+  character.</p>
+
+  <p>Since connections established to remote servers for such reso=
urces are expected to be
+  long-lived, UAs should ensure that appropriate buffering is used. In p=
articular, while line
+  buffering with lines are defined to end with a single U+000A LINE FEED=
 (LF) character is safe,
+  block buffering or line buffering with different expected line endings=
 can cause delays in event
+  dispatch.</p>
+
+
+  <h4 id=3Devent-stream-interpretation><span class=3Dsecno>9=
.2.5 </span>Interpreting an event stream</h4>
+
+  <p>Streams must be decoded using the <a href=3D#utf-8-decode&=
gt;UTF-8 decode</a> algorithm.</p>
+
+  <p class=3Dnote>The <a href=3D#utf-8-decode>UTF-8 decode&l=
t;/a> algorithm strips one leading UTF-8 Byte Order Mark
+  (BOM), if any.</p>
+
+  <p>The stream must then be parsed by reading everything line by =
line, with a U+000D CARRIAGE
+  RETURN U+000A LINE FEED (CRLF) character pair, a single U+000A LINE FE=
ED (LF) character not
+  preceded by a U+000D CARRIAGE RETURN (CR) character, and a single U+00=
0D CARRIAGE RETURN (CR)
+  character not followed by a U+000A LINE FEED (LF) character being the =
ways in which a line can
+  end.</p>
+
+  <p>When a stream is parsed, a <var title=3D"">da=
ta</var> buffer, an <var title=3D"">event type</=
var>
+  buffer, and a <var title=3D"">last event ID</var&gt=
; buffer must be associated with it. They must be
+  initialized to the empty string</p>
+
+  <p>Lines must be processed, in the order they are received, as f=
ollows:</p>
+
+  <dl class=3Dswitch><dt>If the line is empty (a blank line)=
</dt>
+
+   <dd><p><a href=3D#dispatchMessage>Dispatch the even=
t</a>, as defined below.</dd>
+
+
+   <dt>If the line starts with a U+003A COLON character (:)</dt=
>
+
+   <dd><p>Ignore the line.</dd>
+
+
+   <dt>If the line contains a U+003A COLON character (:)</dt&gt=
;
+
+   <dd>
+
+    <p>Collect the characters on the line before the first U+003A =
COLON character (:), and let <var title=3D"">field</va=
r> be that string.</p>
+
+    <p>Collect the characters on the line after the first U+003A C=
OLON character (:), and let <var title=3D"">value</var=
> be that string. If <var title=3D"">value</var>=
 starts with a U+0020 SPACE
+    character, remove it from <var title=3D"">value</=
var>.</p>
+
+    <p><a href=3D#processField>Process the field</a> u=
sing the steps described below, using <var title=3D"">fie=
ld</var> as the field name and <var title=3D"">valu=
e</var> as the field value.</p>
+
+   </dd>
+
+
+   <dt>Otherwise, the string is not empty but does not contain a U=
+003A COLON character (:)</dt>
+
+   <dd>
+
+    <p><a href=3D#processField>Process the field</a> u=
sing the steps described below, using the
+    whole line as the field name, and the empty string as the field valu=
e.</p>
+
+   </dd>
+
+  </dl><p>Once the end of the file is reached, any pending d=
ata must be discarded. (If the file ends in
+  the middle of an event, before the final empty line, the incomplete ev=
ent is not dispatched.)</p>
+
+  <hr><p id=3DprocessField>The steps to <dfn title=3D&quo=
t;">process the field</dfn> given a field name and a
+  field value depend on the field name, as given in the following list. =
Field names must be compared
+  literally, with no case folding performed.</p>
+
+  <dl class=3Dswitch><dt>If the field name is "event&qu=
ot;</dt>
+
+   <dd><p>Set the <var title=3D"">event type=
</var> buffer to field value.</dd>
+
+
+   <dt>If the field name is "data"</dt>
+
+   <dd><p>Append the field value to the <var title=3D&quo=
t;">data</var> buffer, then append a single U+000A
+   LINE FEED (LF) character to the <var title=3D"">data&=
lt;/var> buffer.</dd>
+
+
+   <dt>If the field name is "id"</dt>
+
+   <dd><p>Set the <var title=3D"">last event=
 ID</var> buffer to the field value.</dd>
+
+
+   <dt>If the field name is "retry"</dt>
+
+   <dd><p>If the field value consists of only <a href=3D#=
ascii-digits>ASCII digits</a>, then interpret the field
+   value as an integer in base ten, and set the event stream's <a hre=
f=3D#concept-event-stream-reconnection-time title=3Dconcept-event-stream-=
reconnection-time>reconnection time</a> to that integer.
+   Otherwise, ignore the field.</dd>
+
+   <!-- v2 feature request from Per-Erik Brodin:
+      > > > Finally, it could be useful to be able to reset the=
 reconnection
+      > > > time to the user agent default value by sending the=
 retry field only
+      > > > and leave out the value similar to how you reset th=
e last event id.
+      > >
+      > > What's the use case?
+      >
+      > Take the stock ticker as an example. When the stock market cl=
oses the
+      > server logic knows that there won't be any new events for a n=
umber of
+      > hours and so it can send the corresponding reconnection time =
and close
+      > the connection. If the client is still running by the time th=
e market
+      > opens, it will reconnect, and the server can now reset the re=
connection
+      > time to a time that is convenient for the user agent (which i=
s the user
+      > agent default value, unknown to the server).
+    -->
+
+<!-- v2 feature request from John Fallows - http://www.w3.org/mid/c5b=
3a7130810271238h11e40a4fybfcd5983ed5dc08d at mail.gmail.com
+
+   <dt>If the field name is "reconnect"</dt>
+
+   <dd><p>If the field value is the empty string, then: <=
a href=3D"#dispatchMessage">dispatch the
+   event</a> as defined below, and then drop the connection and im=
mediately reconnect as if the
+   <span title=3D"concept-event-stream-reconnection-time"&g=
t;reconnection time</span> was zero for this
+   one time.</p></dd>
+
+  -->
+
+   <dt>Otherwise</dt>
+
+   <dd><p>The field is ignored.</dd>
+
+  </dl><p id=3DdispatchMessage>When the user agent is requir=
ed to <dfn title=3D"">dispatch the event</dfn>,
+  then the user agent must act as follows:
+
+  <ol><li><p>Set the <a href=3D#concept-event-strea=
m-last-event-id title=3Dconcept-event-stream-last-event-id>last event =
ID string</a> of
+   the event source to the value of the <var title=3D"">=
last event ID</var> buffer. The buffer does
+   not get reset, so the <a href=3D#concept-event-stream-last-event-i=
d title=3Dconcept-event-stream-last-event-id>last event ID
+   string</a> of the event source remains set to this value until =
the next time it is set by the
+   server.</li>
+
+   <li><p>If the <var title=3D"">data</va=
r> buffer is an empty string, set the <var title=3D"">=
data</var> buffer and the <var title=3D"">event typ=
e</var> buffer to the empty string and
+   abort these steps.</li>
+
+   <li><p>If the <var title=3D"">data</va=
r> buffer's last character is a U+000A LINE FEED (LF)
+   character, then remove the last character from the <var title=3D&q=
uot;">data</var> buffer.</li>
+
+   <li><p>Create an event that uses the <code><a hr=
ef=3D#messageevent>MessageEvent</a></code> interface, with=
 the event type
+   <code title=3Devent-message><a href=3D#event-message>mess=
age</a></code>, which does not bubble, is not cancelable, and=
 has no
+   default action. The <code title=3Ddom-MessageEvent-data><a h=
ref=3D#dom-messageevent-data>data</a></code> attribute mus=
t be initialized
+   to the value of the <var title=3D"">data</var> =
buffer, the <code title=3Ddom-MessageEvent-origin><a href=3D#dom=
-messageevent-origin>origin</a></code> attribute must be i=
nitialized to the <a href=3D#unicode-serialization-of-an-origin title=3D=
"Unicode serialization of an origin">Unicode serialization&l=
t;/a> of the
+   <a href=3D#origin>origin</a> of the event stream's final =
URL (i.e. the URL after redirects), and the <code title=3Ddom-MessageE=
vent-lastEventId><a href=3D#dom-messageevent-lasteventid>lastEve=
ntId</a></code> attribute must be initialized to the
+   <a href=3D#concept-event-stream-last-event-id title=3Dconcept-even=
t-stream-last-event-id>last event ID string</a> of the event sou=
rce.
+   This event is not <a href=3D#concept-events-trusted title=3Dconcep=
t-events-trusted>trusted</a>.</li>
+
+   <li><p>If the <var title=3D"">event type&=
lt;/var> buffer has a value other than the empty string,
+   change the <a href=3D#concept-event-type title=3Dconcept-event-typ=
e>type</a> of the newly created event to equal the
+   value of the <var title=3D"">event type</var> b=
uffer.</li>
+
+   <li><p>Set the <var title=3D"">data</v=
ar> buffer and the <var title=3D"">event type</var&=
gt; buffer to
+   the empty string.</li>
+
+   <li><p><a href=3D#queue-a-task>Queue a task</a&g=
t; which, if the <code title=3Ddom-EventSource-readyState><a hre=
f=3D#dom-eventsource-readystate>readyState</a></code> attr=
ibute is set to a value other than <code title=3Ddom-EventSource-CLOSE=
D><a href=3D#dom-eventsource-closed>CLOSED</a></code&gt=
;, <a href=3D#concept-event-dispatch title=3Dconcept-event-dispatch&gt=
;dispatches</a> the newly created event at the
+   <code><a href=3D#eventsource>EventSource</a></co=
de> object.</li> <!-- so calling close() drops the messages i=
mmediately.
+   The connection dying doesn't interfere with already-sent messages sin=
ce it sets us to CLOSED via
+   a task, not synchronously -->
+
+  </ol><p class=3Dnote>If an event doesn't have an "id&=
quot; field, but an earlier event did set the event
+  source's <a href=3D#concept-event-stream-last-event-id title=3Dconc=
ept-event-stream-last-event-id>last event ID string</a>, then th=
e
+  event's <code title=3Ddom-MessageEvent-lastEventId><a href=3D=
#dom-messageevent-lasteventid>lastEventId</a></code> field=
 will be set to the
+  value of whatever the last seen "id" field was.</p>
+
+
+  <div class=3Dexample>
+
+   <p>The following event stream, once followed by a blank line:&l=
t;/p>
+   <pre>data: YHOO
+data: +2
+data: 10</pre>
+
+   <p>...would cause an event <code title=3Devent-message>&l=
t;a href=3D#event-message>message</a></code> with the inte=
rface
+   <code><a href=3D#messageevent>MessageEvent</a></=
code> to be dispatched on the <code><a href=3D#eventsource&gt=
;EventSource</a></code> object. The event's
+   <code title=3Ddom-MessageEvent-data><a href=3D#dom-messageev=
ent-data>data</a></code> attribute would contain the strin=
g
+   <code>YHOO\n+2\n10</code> (where <code>\n</code&=
gt; represents a newline).</p>
+
+   <p>This could be used as follows:
+   <pre>var stocks =3D new EventSource("http://stocks.example=
.com/ticker.php");
+stocks.onmessage =3D function (event) {
+  var data =3D event.data.split('\n');
+  updateStocks(data[0], data[1], data[2]);
+};</pre>
+
+   <p>...where <code title=3D"">updateStocks()<=
/code> is a function defined as:</p>
+
+   <pre>function updateStocks(symbol, delta, value) { ... }</pr=
e>
+
+   <p>...or some such.</p>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>The following stream contains four blocks. The first block h=
as just a comment, and will fire
+   nothing. The second block has two fields with names "data" =
and "id" respectively; an event will
+   be fired for this block, with the data "first event", and w=
ill then set the last event ID to "1"
+   so that if the connection died between this block and the next, the s=
erver would be sent a <code title=3Dhttp-last-event-id><a href=3D=
#last-event-id>Last-Event-ID</a></code> header with the va=
lue "1". The third block fires
+   an event with data "second event", and also has an "id=
" field, this time with no value, which
+   resets the last event ID to the empty string (meaning no <code tit=
le=3Dhttp-last-event-id><a href=3D#last-event-id>Last-Event-ID&l=
t;/a></code> header will now be sent in the event of a
+   reconnection being attempted). Finally, the last block just fires an =
event with the data
+   " third event" (with a single leading spa=
ce character). Note that the last still has to
+   end with a blank line, the end of the stream is not enough to trigger=
 the dispatch of the last
+   event.</p>
+
+   <pre>: test stream
+
+data: first event
+id: 1
+
+data:second event
+id
+
+data:  third event
+</pre>
+  </div>
+
+  <div class=3Dexample>
+
+   <p>The following stream fires two events:</p>
+
+   <pre>data
+
+data
+data
+
+data:</pre>
+
+   <p>The first block fires events with the data set to the empty =
string, as would the last block if
+   it was followed by a blank line. The middle block fires an event with=
 the data set to a single
+   newline character. The last block is discarded because it is not foll=
owed by a blank line.</p>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>The following stream fires two identical events:</p>
+
+   <pre>data:test
+
+data: test
+</pre>
+
+   <p>This is because the space after the colon is ignored if pres=
ent.</p>
+
+  </div>
+
+
+  <h4 id=3Dauthoring-notes><span class=3Dsecno>9.2.6 </sp=
an>Authoring notes</h4>
+
+  <p>Legacy proxy servers are known to, in certain cases, drop HTT=
P connections after a short
+  timeout. To protect against such proxy servers, authors can include a =
comment line (one starting
+  with a ':' character) every 15 seconds or so.</p>
+
+  <p>Authors wishing to relate event source connections to each ot=
her or to specific documents
+  previously served might find that relying on IP addresses doesn't work=
, as individual clients can
+  have multiple IP addresses (due to having multiple proxy servers) and =
individual IP addresses can
+  have multiple clients (due to sharing a proxy server). It is better to=
 include a unique identifier
+  in the document when it is served and then pass that identifier as par=
t of the URL when the
+  connection is established.</p>
+
+  <p>Authors are also cautioned that HTTP chunking can have unexpe=
cted negative effects on the
+  reliability of this protocol. Where possible, chunking should be disab=
led for serving event
+  streams unless the rate of messages is high enough for this not to mat=
ter.</p> <!-- v2 can we get
+  a better solution? -->
+
+  <p>Clients that support HTTP's per-server connection limitation =
might run into trouble when
+  opening multiple pages from a site if each page has an <code>&lt=
;a href=3D#eventsource>EventSource</a></code> to the same
+  domain. Authors can avoid this using the relatively complex mechanism =
of using unique domain names
+  per connection, or by allowing the user to enable or disable the <c=
ode><a href=3D#eventsource>EventSource</a></code>
+  functionality on a per-page basis, or by sharing a single <code>=
<a href=3D#eventsource>EventSource</a></code> object us=
ing a
+  <a href=3D#sharedworkerglobalscope title=3DSharedWorkerGlobalScope&=
gt;shared worker</a>.</p>
+
+
+  <h4 id=3Deventsource-push><span class=3Dsecno>9.2.7 </s=
pan>Connectionless push and other features</h4>
+
+  <p>User agents running in controlled environments, e.g. browsers=
 on mobile handsets tied to
+  specific carriers, may offload the management of the connection to a p=
roxy on the network. In such
+  a situation, the user agent for the purposes of conformance is conside=
red to include both the
+  handset software and the network proxy.</p>
+
+  <div class=3Dexample>
+
+   <p>For example, a browser on a mobile device, after having esta=
blished a connection, might detect
+   that it is on a supporting network and request that a proxy server on=
 the network take over the
+   management of the connection. The timeline for such a situation might=
 be as follows:</p>
+
+   <ol><li>Browser connects to a remote HTTP server and requ=
ests the resource specified by the author
+    in the <code title=3Ddom-EventSource><a href=3D#dom-eventso=
urce>EventSource</a></code> constructor.</li>
+
+    <li>The server sends occasional messages.</li>
+
+    <li>In between two messages, the browser detects that it is id=
le except for the network activity
+    involved in keeping the TCP connection alive, and decides to switch =
to sleep mode to save
+    power.</li>
+
+    <li>The browser disconnects from the server.</li>
+
+    <li>The browser contacts a service on the network, and request=
s that that service, a "push
+    proxy", maintain the connection instead.</li>
+
+    <li>The "push proxy" service contacts the remote HTT=
P server and requests the resource specified
+    by the author in the <code title=3Ddom-EventSource><a href=3D=
#dom-eventsource>EventSource</a></code> constructor (possi=
bly
+    including a <code title=3Dhttp-last-event-id><a href=3D#las=
t-event-id>Last-Event-ID</a></code> HTTP header, etc).<=
/li>
+
+    <li>The browser allows the mobile device to go to sleep.</l=
i>
+
+    <li>The server sends another message.</li>
+
+    <li>The "push proxy" service uses a technology such =
as OMA push to convey the event to the
+    mobile device, which wakes only enough to process the event and then=
 returns to sleep.</li>
+
+   </ol></div>
+
+  <p>This can reduce the total data usage, and can therefore resul=
t in considerable power
+  savings.</p>
+
+  <p>As well as implementing the existing API and <code><=
a href=3D#text/event-stream>text/event-stream</a></code> w=
ire format as
+  defined by this specification and in more distributed ways as describe=
d above, formats of event
+  framing defined by <a href=3D#other-applicable-specifications>ot=
her applicable specifications</a> may be supported. This
+  specification does not define how they are to be parsed or processed.&=
lt;/p>
+
+
+  <h4 id=3Dgarbage-collection-0><span class=3Dsecno>9.2.8 &l=
t;/span>Garbage collection</h4>
+
+  <p>While an <code><a href=3D#eventsource>EventSource=
</a></code> object's <code title=3Ddom-EventSource-readySt=
ate><a href=3D#dom-eventsource-readystate>readyState</a>&l=
t;/code> is <code title=3Ddom-EventSource-CONNECTING><a href=3D=
#dom-eventsource-connecting>CONNECTING</a></code>, and the=
 object has one or more event
+  listeners registered for <code title=3Devent-open>open</code&=
gt;, <code title=3Devent-message><a href=3D#event-message>mes=
sage</a></code> or <code title=3Devent-error>error</=
code> events, there must
+  be a strong reference from the <code><a href=3D#window>Win=
dow</a></code> or <code><a href=3D#workerglobalscope=
>WorkerGlobalScope</a></code> object that
+  the <code><a href=3D#eventsource>EventSource</a><=
/code> object's constructor was invoked from to the <code><a =
href=3D#eventsource>EventSource</a></code>
+  object itself.</p>
+
+  <p>While an <code><a href=3D#eventsource>EventSource=
</a></code> object's <code title=3Ddom-EventSource-readySt=
ate><a href=3D#dom-eventsource-readystate>readyState</a>&l=
t;/code> is <code title=3Ddom-EventSource-OPEN><a href=3D#dom=
-eventsource-open>OPEN</a></code>, and the object has one =
or more event listeners
+  registered for <code title=3Devent-message><a href=3D#event-m=
essage>message</a></code> or <code title=3Devent-error&=
gt;error</code> events, there must be a strong reference from the
+  <code><a href=3D#window>Window</a></code> or &=
lt;code><a href=3D#workerglobalscope>WorkerGlobalScope</a>=
</code> object that the <code><a href=3D#eventsource>Ev=
entSource</a></code>
+  object's constructor was invoked from to the <code><a href=3D=
#eventsource>EventSource</a></code> object itself.</p&g=
t;
+
+  <p>While there is a task queued by an <code><a href=3D#=
eventsource>EventSource</a></code> object on the <a hre=
f=3D#remote-event-task-source>remote event
+  task source</a>, there must be a strong reference from the <c=
ode><a href=3D#window>Window</a></code> or
+  <code><a href=3D#workerglobalscope>WorkerGlobalScope</a=
></code> object that the <code><a href=3D#eventsource&g=
t;EventSource</a></code> object's constructor was
+  invoked from to that <code><a href=3D#eventsource>EventSou=
rce</a></code> object.</p>
+
+  <p>If a user agent is to <dfn id=3Dconcept-eventsource-forcib=
ly-close title=3Dconcept-EventSource-forcibly-close>forcibly close<=
/dfn> an
+  <code><a href=3D#eventsource>EventSource</a></cod=
e> object (this happens when a <code><a href=3D#document>D=
ocument</a></code> object goes away
+  permanently), the user agent must abort any instances of the <a hre=
f=3D#fetch>fetch</a> algorithm started
+  for this <code><a href=3D#eventsource>EventSource</a&gt=
;</code> object, and must set the <code title=3Ddom-EventSource-=
readyState><a href=3D#dom-eventsource-readystate>readyState</=
a></code> attribute to <code title=3Ddom-EventSource-CLOSED&g=
t;<a href=3D#dom-eventsource-closed>CLOSED</a></code>.&=
lt;/p> <!-- same as calling close() -->
+
+  <p>If an <code><a href=3D#eventsource>EventSource&lt=
;/a></code> object is garbage collected while its connection is =
still open,
+  the user agent must abort any instance of the <a href=3D#fetch titl=
e=3Dfetch>fetch</a> algorithm opened by
+  this <code><a href=3D#eventsource>EventSource</a>&lt=
;/code>.</p> <!-- no need to throw tasks away or anything; fo=
r it to get
+  garbage collected, there can't be anything that would be able to recei=
ve those events -->
+
+  <p class=3Dnote>It's possible for one active network connection =
to be shared by multiple
+  <code><a href=3D#eventsource>EventSource</a></cod=
e> objects and their <a href=3D#fetch>fetch</a> algorithms=
, which is why the above
+  is phrased in terms of aborting the <a href=3D#fetch>fetch</a=
> algorithm and not the actual underlying
+  download.</p>
+
+
+  <h4 id=3Dimplementation-advice><span class=3Dsecno>9.2.9 &=
lt;/span>Implementation advice</h4>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <p>User agents are strongly urged to provide detailed diagnostic=
 information about
+  <code><a href=3D#eventsource>EventSource</a></cod=
e> objects and their related network connections in their development
+  consoles, to aid authors in debugging code using this API.</p>
+
+  <p>For example, a user agent could have a panel displaying all t=
he <code><a href=3D#eventsource>EventSource</a></cod=
e>
+  objects a page has created, each listing the constructor's arguments, =
whether there was a network
+  error, what the CORS status of the connection is and what headers were=
 sent by the client and
+  received from the server to lead to that status, the messages that wer=
e received and how they were
+  parsed, and so forth.</p>
+
+  <p>Implementations are especially encouraged to report detailed =
information to their development
+  consoles whenever an <code title=3Devent-error>error</code&gt=
; event is fired, since little to no
+  information can be made available in the events themselves.</p>
+
+
+  <h4 id=3Diana-considerations><span class=3Dsecno>9.2.10 &l=
t;/span>IANA considerations</h4>
+
+  <h5 id=3Dtext/event-stream><span class=3Dsecno>9.2.10.1 &l=
t;/span><dfn><code>text/event-stream</code></dfn&=
gt;</h5>
+
+  <p>This registration is for community review and will be submitt=
ed to the IESG for review,
+  approval, and registration with IANA.</p>
+
+  <!--
+   To: ietf-types at iana.org
+   Subject: Registration of media type text/event-stream
+  -->
+
+  <dl><dt>Type name:</dt>
+   <dd>text</dd>
+   <dt>Subtype name:</dt>
+   <dd>event-stream</dd>
+   <dt>Required parameters:</dt>
+   <dd>No parameters</dd>
+   <dt>Optional parameters:</dt>
+   <dd>
+    <dl><dt><code title=3D"">charset</cod=
e></dt>
+     <dd>
+
+      <p>The <code title=3D"">charset</code>=
 parameter may be provided. The parameter's value must be
+      "<code title=3D"">utf-8</code>". T=
his parameter serves no purpose; it is only allowed for
+      compatibility with legacy servers.</p>
+
+     </dd>
+    </dl></dd>
+   <dt>Encoding considerations:</dt>
+   <dd>8bit (always UTF-8)</dd>
+<!--ADD-TOPIC:Security-->
+   <dt>Security considerations:</dt>
+   <dd>
+
+    <p>An event stream from an origin distinct from the origin of =
the content consuming the event
+    stream can result in information leakage. To avoid this, user agents=
 are required to apply CORS
+    semantics. <a href=3D#refsCORS>[CORS]</a></p>
+
+    <p>Event streams can overwhelm a user agent; a user agent is e=
xpected to apply suitable
+    restrictions to avoid depleting local resources because of an overab=
undance of information from
+    an event stream.</p>
+
+    <p>Servers can be overwhelmed if a situation develops in which=
 the server is causing clients to
+    reconnect rapidly. Servers should use a 5xx status code to indicate =
capacity problems, as this
+    will prevent conforming clients from reconnecting automatically.<=
/p>
+
+   </dd>
+<!--REMOVE-TOPIC:Security-->
+   <dt>Interoperability considerations:</dt>
+   <dd>
+    Rules for processing both conforming and non-conforming content are =
defined in this
+    specification.
+   </dd>
+   <dt>Published specification:</dt>
+   <dd>
+    This document is the relevant specification.
+   </dd>
+   <dt>Applications that use this media type:</dt>
+   <dd>
+    Web browsers and tools using Web services.
+   </dd>
+   <dt>Additional information:</dt>
+   <dd>
+    <dl><dt>Magic number(s):</dt>
+     <dd>No sequence of bytes can uniquely identify an event strea=
m.</dd>
+     <dt>File extension(s):</dt>
+     <dd>No specific file extensions are recommended for this type=
.</dd>
+     <dt>Macintosh file type code(s):</dt>
+     <dd>No specific Macintosh file type codes are recommended for=
 this type.</dd>
+    </dl></dd>
+   <dt>Person & email address to contact for further infor=
mation:</dt>
+   <dd>Ian Hickson <ian at hixie.ch></dd>
+   <dt>Intended usage:</dt>
+   <dd>Common</dd>
+   <dt>Restrictions on usage:</dt>
+   <dd>This format is only expected to be used by dynamic open-end=
ed streams served using HTTP or a
+   similar protocol. Finite resources are not expected to be labeled wit=
h this type.</dd>
+   <dt>Author:</dt>
+   <dd>Ian Hickson <ian at hixie.ch></dd>
+   <dt>Change controller:</dt>
+   <dd>W3C</dd>
+  </dl><p>Fragment identifiers have no meaning with
+  <code><a href=3D#text/event-stream>text/event-stream</a=
></code> resources.</p>
+
+
+  <h5 id=3Dlast-event-id><span class=3Dsecno>9.2.10.2 </s=
pan><dfn title=3Dhttp-last-event-id><code>Last-Event-ID&lt=
;/code></dfn></h5>
+
+  <p>This section describes a header for registration in the Perma=
nent Message Header Field
+  Registry. <a href=3D#refsRFC3864>[RFC3864]</a></p>
+
+  <dl><dt>Header field name:</dt>
+   <dd>Last-Event-ID</dd>
+   <dt>Applicable protocol:</dt>
+   <dd>http</dd>
+   <dt>Status:</dt>
+   <dd>standard</dd>
+   <dt>Author/Change controller:</dt>
+   <dd>W3C</dd>
+   <dt>Specification document(s):</dt>
+   <dd>
+    This document is the relevant specification.
+   </dd>
+   <dt>Related information:</dt>
+   <dd>None.</dd>
+  </dl><h3 id=3Dnetwork><span class=3Dsecno>9.3 </s=
pan><dfn>Web sockets</dfn></h3>
+
+
+
+  <h4 id=3Dnetwork-intro><span class=3Dsecno>9.3.1 </span=
>Introduction</h4>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <p>To enable Web applications to maintain bidirectional communic=
ations with server-side processes,
+  this specification introduces the <code><a href=3D#websocket&=
gt;WebSocket</a></code> interface.</p>
+
+  <p class=3Dnote>This interface does not allow for raw access to =
the underlying network. For
+  example, this interface could not be used to implement an IRC client w=
ithout proxying messages
+  through a custom server.</p>
+
+
+  <h4 id=3Dthe-websocket-interface><span class=3Dsecno>9.3.2=
 </span>The <code><a href=3D#websocket>WebSocket</a&=
gt;</code> interface</h4>
+
+  <pre class=3Didl>enum <dfn id=3Dbinarytype>BinaryType</=
dfn> { "<span title=3Ddom-BinaryType-blob>blob</span>=
", "<span title=3Ddom-BinaryType-arraybuffer>arraybuffer&=
lt;/span>" };
+[<a href=3D#dom-websocket title=3Ddom-WebSocket>Constructor</a&=
gt;(DOMString url, optional (DOMString or DOMString[]) protocols)]
+interface <dfn id=3Dwebsocket>WebSocket</dfn> : <a href=3D=
#eventtarget>EventTarget</a> {
+  readonly attribute DOMString <a href=3D#dom-websocket-url title=3Dd=
om-WebSocket-url>url</a>;
+
+  // ready state
+  const unsigned short <a href=3D#dom-websocket-connecting title=3Ddo=
m-WebSocket-CONNECTING>CONNECTING</a> =3D 0;
+  const unsigned short <a href=3D#dom-websocket-open title=3Ddom-WebS=
ocket-OPEN>OPEN</a> =3D 1;
+  const unsigned short <a href=3D#dom-websocket-closing title=3Ddom-W=
ebSocket-CLOSING>CLOSING</a> =3D 2;
+  const unsigned short <a href=3D#dom-websocket-closed title=3Ddom-We=
bSocket-CLOSED>CLOSED</a> =3D 3;
+  readonly attribute unsigned short <a href=3D#dom-websocket-readysta=
te title=3Ddom-WebSocket-readyState>readyState</a>;
+  readonly attribute unsigned long <a href=3D#dom-websocket-buffereda=
mount title=3Ddom-WebSocket-bufferedAmount>bufferedAmount</a>;
+
+  // networking
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-websocket-onopen title=3Dhandler-WebSocket-onopen=
>onopen</a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-websocket-onerror title=3Dhandler-WebSocket-onerr=
or>onerror</a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-websocket-onclose title=3Dhandler-WebSocket-onclo=
se>onclose</a>;
+  readonly attribute DOMString <a href=3D#dom-websocket-extensions ti=
tle=3Ddom-WebSocket-extensions>extensions</a>;
+  readonly attribute DOMString <a href=3D#dom-websocket-protocol titl=
e=3Ddom-WebSocket-protocol>protocol</a>;
+  void <a href=3D#dom-websocket-close title=3Ddom-WebSocket-close>=
close</a>([Clamp] optional unsigned short code, optional DOMString =
reason);
+
+  // messaging
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-websocket-onmessage title=3Dhandler-WebSocket-onm=
essage>onmessage</a>;
+           attribute <a href=3D#binarytype>BinaryType</a> &l=
t;a href=3D#dom-websocket-binarytype title=3Ddom-WebSocket-binaryType>=
binaryType</a>;
+  void <a href=3D#dom-websocket-send title=3Ddom-WebSocket-send>se=
nd</a>(DOMString data);
+  void <a href=3D#dom-websocket-send title=3Ddom-WebSocket-send>se=
nd</a>(<a href=3D#blob>Blob</a> data);
+  void <a href=3D#dom-websocket-send title=3Ddom-WebSocket-send>se=
nd</a>(<a href=3D#arraybuffer>ArrayBuffer</a> data);
+  void <a href=3D#dom-websocket-send title=3Ddom-WebSocket-send>se=
nd</a>(<a href=3D#arraybufferview>ArrayBufferView</a> d=
ata);
+};</pre>
+
+  <p>The <dfn id=3Ddom-websocket title=3Ddom-WebSocket><c=
ode>WebSocket(<var title=3D"">url</var>, <var=
 title=3D"">protocols</var>)</code></dfn> =
constructor takes one or two arguments. The first argument,
+  <var title=3D"">url</var>, specifies the <a h=
ref=3D#url>URL</a> to which to connect. The second, <var titl=
e=3D"">protocols</var>, if present, is either a string=
 or an array of strings. If it is a
+  string, it is equivalent to an array consisting of just that string; i=
f it is omitted, it is
+  equivalent to the empty array. Each string in the array is a subprotoc=
ol name. The connection will
+  only be established if the server reports that it has selected one of =
these subprotocols. The
+  subprotocol names must all be strings that match the requirements for =
elements that comprise the
+  value of <code title=3Dhttp-sec-websocket-protocol>Sec-WebSocket=
-Protocol</code> fields as
+  defined by the WebSocket protocol specification. <a href=3D#refsWSP=
>[WSP]</a></p>
+
+  <p>When the <code>WebSocket()</code> constructor is =
invoked, the UA must run these steps:</p>
+
+  <ol><li><p><i><a href=3D"#parse-a-webs=
ocket-url's-components">Parse a WebSocket URL's components</a&=
gt;</i> from the <var title=3D"">url</var> ar=
gument, to
+   obtain <var title=3D"">host</var>, <var titl=
e=3D"">port</var>, <var title=3D"">res=
ource name</var>, and
+   <var title=3D"">secure</var>. If this fails, th=
row a <code><a href=3D#syntaxerror>SyntaxError</a></=
code> exception and abort
+   these steps. <a href=3D#refsWSP>[WSP]</a></li>
+
+<!--CLEANUP-->
+   <li><p>If <var title=3D"">secure</var&=
gt; is false but the <a href=3D#origin>origin</a> specified b=
y the <a href=3D#entry-settings-object>entry
+   settings object</a> has a scheme component that is itself a sec=
ure protocol, e.g. HTTPS, then throw a
+   <code><a href=3D#securityerror>SecurityError</a>&lt=
;/code> exception and abort these steps.</li>
+
+   <li>
+
+    <p>If <var title=3D"">port</var> is a po=
rt to which the user agent is configured to block access,
+    then throw a <code><a href=3D#securityerror>SecurityErro=
r</a></code> exception and abort these steps. (User agents ty=
pically
+    block access to well-known ports like SMTP.)</p>
+    <!-- e.g. http://www.mozilla.org/projects/netlib/PortBanning.html=
 -->
+
+    <p>Access to ports 80 and 443 should not be blocked, including=
 the unlikely cases when <var title=3D"">secure</var&g=
t; is false but <var title=3D"">port</var> is 443 o=
r <var title=3D"">secure</var>
+    is true but <var title=3D"">port</var> is 80.&=
lt;/p>
+    <!-- paragraph requested by zcorpan -->
+
+   </li>
+
+   <li>
+
+    <p>If <var title=3D"">protocols</var> is=
 absent, let <var title=3D"">protocols</var> be an =
empty
+    array.</p>
+
+    <p>Otherwise, if <var title=3D"">protocols<=
/var> is present and a string, let <var title=3D"">pro=
tocols</var> instead be an array consisting of just that string.&lt=
;/p>
+
+   </li>
+
+   <li><p>If any of the values in <var title=3D"&quo=
t;>protocols</var> occur more than once or otherwise
+   fail to match the requirements for elements that comprise the value o=
f <code title=3Dhttp-sec-websocket-protocol>Sec-WebSocket-Protocol&=
lt;/code> fields as defined by the
+   WebSocket protocol specification, then throw a <code><a href=
=3D#syntaxerror>SyntaxError</a></code> exception and abort=
 these
+   steps. <a href=3D#refsWSP>[WSP]</a></li>
+
+<!--CLEANUP-->
+   <li><p>Let <var title=3D"">origin</var=
> be the <a href=3D#ascii-serialization-of-an-origin title=3D"=
ASCII serialization of an origin">ASCII
+   serialization</a> of the <a href=3D#origin>origin</a&g=
t; specified by the <a href=3D#entry-settings-object>entry settings=
 object</a>, <a href=3D#converted-to-ascii-lowercase>converte=
d
+   to ASCII lowercase</a>.</li>
+
+   <li><p>Return a new <code><a href=3D#websocket&g=
t;WebSocket</a></code> object, but continue these steps
+   asynchronously.</li>
+
+   <li><p>Let the new object's <dfn id=3Dclient-specified=
-protocols>client-specified protocols</dfn> be the values (if an=
y) given in
+   <var title=3D"">protocols</var>.</li>
+
+   <li>
+
+    <p><i><a href=3D#establish-a-websocket-connection>=
Establish a WebSocket connection</a></i> given the set (<v=
ar title=3D"">host</var>, <var title=3D""=
>port</var>, <var title=3D"">resource name</v=
ar>, <var title=3D"">secure</var>), along with
+    the <var title=3D"">protocols</var> list, an e=
mpty list for the extensions, and <var title=3D"">origin&=
lt;/var>. The <i><a href=3D#headers-to-send-appropriate-cooki=
es>headers to send appropriate cookies</a></i> must be a &=
lt;code title=3Dhttp-Cookie>Cookie</code> header whose value is =
the <i><a href=3D#cookie-string>cookie-string</a></i=
> computed from
+    the user's cookie store and the URL <var title=3D"">=
url</var>; for these purposes this is
+    <em>not</em> a "non-HTTP" API. <a href=3D#r=
efsWSP>[WSP]</a> <a href=3D#refsCOOKIES>[COOKIES]</a&gt=
;</p>
+
+    <p>When the user agent <i title=3D"validate the server=
's response"><a href=3D"#validate-the-server's-response&q=
uot;>validates the server's
+    response</a></i> during the "<i><a href=3D=
#establish-a-websocket-connection>establish a WebSocket connection<=
/a></i>" algorithm, if the status code
+    received from the server is not 101 (e.g. it is a redirect), the use=
r agent must <i><a href=3D#fail-the-websocket-connection>fail=
 the
+    WebSocket connection</a></i>.</p>
+
+    <p class=3Dwarning>Following HTTP procedures here could introd=
uce serious security problems in a
+    Web browser context. For example, consider a host with a WebSocket s=
erver at one path and an
+    open HTTP redirector at another. Suddenly, any script that can be gi=
ven a particular WebSocket
+    URL can be tricked into communicating to (and potentially sharing se=
crets with) any host on the
+    Internet, even if the script checks that the URL has the right hostn=
ame.</p>
+    <!-- http://www.ietf.org/mail-archive/web/hybi/current/msg06951.h=
tml -->
+
+    <p class=3Dnote>If the <i><a href=3D#establish-a-webs=
ocket-connection>establish a WebSocket connection</a></i> =
algorithm fails, it triggers the
+    <i><a href=3D#fail-the-websocket-connection>fail the Web=
Socket connection</a></i> algorithm, which then invokes the &=
lt;i><a href=3D#close-the-websocket-connection>close the WebSock=
et
+    connection</a></i> algorithm, which then establishes tha=
t <i><a href=3D#the-websocket-connection-is-closed>the WebSoc=
ket connection is closed</a></i>,
+    which fires the <code title=3Devent-socket-close>close</cod=
e> event <a href=3D#closeWebSocket>as
+    described below</a>.</p>
+
+   </li>
+
+  </ol><hr><p>The <dfn id=3Ddom-websocket-url title=
=3Ddom-WebSocket-url><code>url</code></dfn> attribut=
e must return the result of
+  <a href=3D#resolve-a-url title=3D"resolve a url">resol=
ving</a> the <a href=3D#url>URL</a> that was passed to =
the
+  constructor. (It doesn't matter what it is resolved relative to, since=
 we already know it is an
+  <a href=3D#absolute-url>absolute URL</a>.)</p>
+
+  <p>The <dfn id=3Ddom-websocket-readystate title=3Ddom-WebSock=
et-readyState><code>readyState</code></dfn> attribut=
e represents
+  the state of the connection. It can have the following values:</p&g=
t;
+
+  <dl><dt><dfn id=3Ddom-websocket-connecting title=3Ddom-=
WebSocket-CONNECTING><code>CONNECTING</code></dfn> (=
numeric value 0)</dt>
+
+   <dd>The connection has not yet been established.</dd>
+
+   <dt><dfn id=3Ddom-websocket-open title=3Ddom-WebSocket-OPEN&=
gt;<code>OPEN</code></dfn> (numeric value 1)</dt>
+
+   <dd><i><a href=3D#the-websocket-connection-is-establis=
hed>The WebSocket connection is established</a></i> and co=
mmunication is possible.</dd>
+
+   <dt><dfn id=3Ddom-websocket-closing title=3Ddom-WebSocket-CL=
OSING><code>CLOSING</code></dfn> (numeric value 2)&l=
t;/dt>
+
+   <dd>The connection is going through the closing handshake, or t=
he <code title=3Ddom-WebSocket-close><a href=3D#dom-websocket-cl=
ose>close()</a></code> method has been invoked.</dd>
+
+   <dt><dfn id=3Ddom-websocket-closed title=3Ddom-WebSocket-CLO=
SED><code>CLOSED</code></dfn> (numeric value 3)</=
dt>
+
+   <dd>The connection has been closed or could not be opened.</=
dd>
+
+  </dl><p>When the object is created its <code title=3Ddo=
m-WebSocket-readyState><a href=3D#dom-websocket-readystate>ready=
State</a></code> must be
+  set to <code title=3Ddom-WebSocket-CONNECTING><a href=3D#dom-=
websocket-connecting>CONNECTING</a></code> (0).</p>
+
+  <p>The <dfn id=3Ddom-websocket-extensions title=3Ddom-WebSock=
et-extensions><code>extensions</code></dfn> attribut=
e must
+  initially return the empty string. After <i><a href=3D#the-we=
bsocket-connection-is-established>the WebSocket connection is establis=
hed</a></i>, its value
+  might change, as defined below.</p>
+
+  <p class=3Dnote>The <code title=3Ddom-WebSocket-extensions&gt=
;<a href=3D#dom-websocket-extensions>extensions</a></code&=
gt; attribute returns the
+  extensions selected by the server, if any. (Currently this will only e=
ver be the empty
+  string.)</p>
+
+  <p>The <dfn id=3Ddom-websocket-protocol title=3Ddom-WebSocket=
-protocol><code>protocol</code></dfn> attribute must=
 initially
+  return the empty string. After <i><a href=3D#the-websocket-co=
nnection-is-established>the WebSocket connection is established</a&=
gt;</i>, its value might
+  change, as defined below.</p>
+
+  <p class=3Dnote>The <code title=3Ddom-WebSocket-protocol>&=
lt;a href=3D#dom-websocket-protocol>protocol</a></code> at=
tribute returns the
+  subprotocol selected by the server, if any. It can be used in conjunct=
ion with the array form of
+  the constructor's second argument to perform subprotocol negotiation.&=
lt;/p>
+
+  <p>The <dfn id=3Ddom-websocket-close title=3Ddom-WebSocket-cl=
ose><code>close()</code></dfn> method must run the f=
ollowing
+  steps:</p>
+
+  <ol><li><p>If the method's first argument is present=
 but is neither an integer equal to 1000 nor an
+   integer in the range 3000 to 4999, throw an <code><a href=3D=
#invalidaccesserror>InvalidAccessError</a></code> exceptio=
n and abort
+   these steps.</li>
+
+   <li>
+
+    <p>If the method's second argument is present, then run these =
substeps:</p>
+
+    <ol><li><p>Let <var title=3D"">raw=
 reason</var> be the method's second argument.</li>
+
+     <li><p>Let <var title=3D"">Unicode reas=
on</var> be the result of <a href=3D#convert-a-domstring-to-a-se=
quence-of-unicode-characters title=3D"convert a DOMString
+     to a sequence of Unicode characters">converting <var tit=
le=3D"">raw reason</var> to a sequence of
+     Unicode characters</a>.</li>
+
+     <li><p>Let <var title=3D"">reason</v=
ar> be the result of encoding <var title=3D"">Unicode
+     reason</var> as UTF-8.</li>
+
+     <li><p>If <var title=3D"">reason</va=
r> is longer than 123 bytes, then throw a
+     <code><a href=3D#syntaxerror>SyntaxError</a></=
code> exception and abort these steps. <a href=3D#refsRFC3629>[R=
FC3629]</a></li>
+
+    </ol></li>
+
+   <li><p>Run the first matching steps from the following li=
st:</p>
+
+    <dl class=3Dswitch><dt>If the <code title=3Ddom-WebSo=
cket-readyState><a href=3D#dom-websocket-readystate>readyState&l=
t;/a></code> attribute is in the <code title=3Ddom-WebSocket-=
CLOSING><a href=3D#dom-websocket-closing>CLOSING</a></c=
ode> (2) or <code title=3Ddom-WebSocket-CLOSED><a href=3D#dom=
-websocket-closed>CLOSED</a></code> (3) state</dt>
+
+     <dd>
+
+      <p>Do nothing.</p>
+
+      <p class=3Dnote>The connection is already closing or is alre=
ady closed. If it has not already,
+      a <code title=3Devent-socket-close>close</code> event =
will eventually fire <a href=3D#closeWebSocket>as described below&l=
t;/a>.</p>
+
+     </dd>
+
+
+     <dt>If the WebSocket connection is not yet <i title=3D&quo=
t;the WebSocket connection is
+     established"><a href=3D#the-websocket-connection-is-esta=
blished>established</a></i> <a href=3D#refsWSP>[WSP]=
</a></dt>
+
+     <dd>
+
+      <p><i><a href=3D#fail-the-websocket-connection>F=
ail the WebSocket connection</a></i> and set the <code tit=
le=3Ddom-WebSocket-readyState><a href=3D#dom-websocket-readystate&g=
t;readyState</a></code> attribute's value to <code title=3D=
dom-WebSocket-CLOSING><a href=3D#dom-websocket-closing>CLOSING&l=
t;/a></code> (2). <a href=3D#refsWSP>[WSP]</a></p=
>
+
+      <p class=3Dnote>The <i><a href=3D#fail-the-websocke=
t-connection>fail the WebSocket connection</a></i> algorit=
hm invokes the <i><a href=3D#close-the-websocket-connection>c=
lose the
+      WebSocket connection</a></i> algorithm, which then est=
ablishes that <i><a href=3D#the-websocket-connection-is-closed&g=
t;the WebSocket connection is
+      closed</a></i>, which fires the <code title=3Devent=
-socket-close>close</code> event <a href=3D#closeWebSocket&gt=
;as described below</a>.</p>
+
+     </dd>
+
+
+     <dt>If the WebSocket closing handshake has not yet been <i=
 title=3D"the WebSocket closing
+     handshake is started"><a href=3D#the-websocket-closing-h=
andshake-is-started>started</a></i> <a href=3D#refsWSP&=
gt;[WSP]</a></dt>
+
+     <dd>
+
+      <p><i><a href=3D#start-the-websocket-closing-handsh=
ake>Start the WebSocket closing handshake</a></i> and set =
the <code title=3Ddom-WebSocket-readyState><a href=3D#dom-websoc=
ket-readystate>readyState</a></code> attribute's value to =
<code title=3Ddom-WebSocket-CLOSING><a href=3D#dom-websocket-clo=
sing>CLOSING</a></code> (2). <a href=3D#refsWSP>[WSP=
]</a></p>
+
+      <p>If the first argument is present, then the status code&lt=
;!--CLOSE CODE--> to use in the
+      WebSocket Close message must be the integer given by the first arg=
ument. <a href=3D#refsWSP>[WSP]</a></p>
+
+      <p>If the second argument is also present, then <var titl=
e=3D"">reason</var> must be provided in
+      the Close message after the status code<!--CLOSE CODE-->. &l=
t;a href=3D#refsRFC3629>[RFC3629]</a>
+      <a href=3D#refsWSP>[WSP]</a></p>
+
+      <p class=3Dnote>The <i><a href=3D#start-the-websock=
et-closing-handshake>start the WebSocket closing handshake</a>&l=
t;/i> algorithm eventually invokes
+      the <i><a href=3D#close-the-websocket-connection>close=
 the WebSocket connection</a></i> algorithm, which then estab=
lishes that <i><a href=3D#the-websocket-connection-is-closed>=
the
+      WebSocket connection is closed</a></i>, which fires th=
e <code title=3Devent-socket-close>close</code> event <a h=
ref=3D#closeWebSocket>as described
+      below</a>.</p>
+
+     </dd>
+
+
+     <dt>Otherwise</dt>
+
+     <dd>
+
+      <p>Set the <code title=3Ddom-WebSocket-readyState><=
a href=3D#dom-websocket-readystate>readyState</a></code> a=
ttribute's value to <code title=3Ddom-WebSocket-CLOSING><a href=3D=
#dom-websocket-closing>CLOSING</a></code> (2).</p>
+
+      <p class=3Dnote><i><a href=3D#the-websocket-closing=
-handshake-is-started>The WebSocket closing handshake is started</a=
></i>, and will eventually invoke
+      the <i><a href=3D#close-the-websocket-connection>close=
 the WebSocket connection</a></i> algorithm, which will estab=
lish that <i><a href=3D#the-websocket-connection-is-closed>th=
e
+      WebSocket connection is closed</a></i>, and thus the &=
lt;code title=3Devent-socket-close>close</code>
+      event will fire, <a href=3D#closeWebSocket>as described belo=
w</a>.</p>
+
+     </dd>
+
+    </dl></li>
+
+  </ol><hr><p>The <dfn id=3Ddom-websocket-buffereda=
mount title=3Ddom-WebSocket-bufferedAmount><code>bufferedAmount&=
lt;/code></dfn> attribute must
+  return the number of bytes of application data (UTF-8 text and binary =
data) that have been queued
+  using <code title=3Ddom-WebSocket-send><a href=3D#dom-websock=
et-send>send()</a></code> but that, as of the last time th=
e <a href=3D#event-loop>event
+  loop</a> started executing a <a href=3D#concept-task title=3D=
concept-task>task</a>, had not yet been
+  transmitted to the network. (This thus includes any text sent during t=
he execution of the current
+  task, regardless of whether the user agent is able to transmit text as=
ynchronously with script
+  execution.) This does not include framing overhead incurred by the pro=
tocol, or buffering done by
+  the operating system or network hardware. If the connection is closed,=
 this attribute's value will
+  only increase with each call to the <code title=3Ddom-WebSocket-sen=
d><a href=3D#dom-websocket-send>send()</a></code> me=
thod (the
+  number does not reset to zero once the connection closes).</p>
+
+  <div class=3Dexample>
+
+   <p>In this simple example, the <code title=3Ddom-WebSocket-b=
ufferedAmount><a href=3D#dom-websocket-bufferedamount>bufferedAm=
ount</a></code>
+   attribute is used to ensure that updates are sent either at the rate =
of one update every 50ms, if
+   the network can handle that rate, or at whatever rate the network &lt=
;em>can</em> handle, if that is
+   too fast.</p>
+
+   <pre>var socket =3D new WebSocket('ws://game.example.com:12010/=
updates');
+socket.onopen =3D function () {
+  setInterval(function() {
+    if (socket.bufferedAmount =3D=3D 0)
+      socket.send(getUpdateData());
+  }, 50);
+};</pre>
+
+   <p>The <code title=3Ddom-WebSocket-bufferedAmount><a h=
ref=3D#dom-websocket-bufferedamount>bufferedAmount</a></code&=
gt; attribute can also be
+   used to saturate the network without sending the data at a higher rat=
e than the network can
+   handle, though this requires more careful monitoring of the value of =
the attribute over time.</p>
+
+  </div>
+
+  <hr><p>When a <code><a href=3D#websocket>WebSo=
cket</a></code> object is created, its <dfn id=3Ddom-webso=
cket-binarytype title=3Ddom-WebSocket-binaryType><code>binaryTyp=
e</code></dfn> IDL attribute must be set to the
+  string "<code title=3D"">blob</code>".=
 On getting, it must return the last value it was set to. On
+  setting, the user agent must set the IDL attribute to the new value.&l=
t;/p>
+
+  <p class=3Dnote>This attribute allows authors to control how bin=
ary data is exposed to scripts. By
+  setting the attribute to "<code title=3D"">blob&l=
t;/code>", binary data is returned in
+  <code><a href=3D#blob>Blob</a></code> form; by=
 setting it to "<code title=3D"">arraybuffer</cod=
e>", it is returned in
+  <code><a href=3D#arraybuffer>ArrayBuffer</a></cod=
e> form. User agents can use this as a hint for how to handle incoming
+  binary data: if the attribute is set to "<code title=3D"&=
quot;>blob</code>", it is safe to spool it to
+  disk, and if it is set to "<code title=3D"">array=
buffer</code>", it is likely more efficient to keep
+  the data in memory. Naturally, user agents are encouraged to use more =
subtle heuristics to decide
+  whether to keep incoming data in memory or not, e.g. based on how big =
the data is or how common it
+  is for a script to change the attribute at the last minute. This latte=
r aspect is important in
+  particular because it is quite possible for the attribute to be change=
d after the user agent has
+  received the data but before the user agent has fired the event for it=
.</p>
+
+  <p>The <dfn id=3Ddom-websocket-send title=3Ddom-WebSocket-sen=
d><code>send(<var title=3D"">data</var>)&l=
t;/code></dfn> method
+  transmits data using the connection. If the <code title=3Ddom-WebSo=
cket-readyState><a href=3D#dom-websocket-readystate>readyState&l=
t;/a></code> attribute is <code title=3Ddom-WebSocket-CONNECT=
ING><a href=3D#dom-websocket-connecting>CONNECTING</a><=
/code>, it must throw an
+  <code><a href=3D#invalidstateerror>InvalidStateError</a=
></code> exception. Otherwise, the user agent must run the appro=
priate set
+  of steps from the following list:</p>
+
+  <dl><dt>If the argument is a string</dt>
+
+   <dd>
+
+    <p>Let <var title=3D"">data</var> be the=
 result of <a href=3D#convert-a-domstring-to-a-sequence-of-unicode-cha=
racters title=3D"convert a DOMString to a sequence
+    of Unicode characters">converting the <var title=3D"=
">data</var> argument to a sequence of Unicode
+    characters</a>. If <i><a href=3D#the-websocket-connec=
tion-is-established>the WebSocket connection is established</a>&=
lt;/i> and <i title=3D"the WebSocket
+    closing handshake is started"><a href=3D#the-websocket-cl=
osing-handshake-is-started>the WebSocket closing handshake has not yet=
 started</a></i>, then the
+    user agent must <i>send a WebSocket Message</i> comprise=
d of <var title=3D"">data</var> using a
+    text frame opcode; if the data cannot be sent, e.g. because it would=
 need to be buffered but the
+    buffer is full, the user agent must <i><a href=3D#close-the=
-websocket-connection>close the WebSocket connection</a></i&g=
t; <a href=3D#concept-websocket-close-fail title=3Dconcept-websocket-c=
lose-fail>with prejudice</a>. Any invocation of this method with=
 a
+    string argument that does not throw an exception must increase the &=
lt;code title=3Ddom-WebSocket-bufferedAmount><a href=3D#dom-websock=
et-bufferedamount>bufferedAmount</a></code> attribute by t=
he number of bytes
+    needed to express the argument as UTF-8. <a href=3D#refsUNICODE&g=
t;[UNICODE]</a> <a href=3D#refsRFC3629>[RFC3629]</a> &l=
t;a href=3D#refsWSP>[WSP]</a></p>
+
+   </dd>
+
+
+   <dt>If the argument is a <code><a href=3D#blob>Blob=
</a></code> object</dt>
+
+   <dd>
+
+    <p>If <i><a href=3D#the-websocket-connection-is-estab=
lished>the WebSocket connection is established</a></i>, an=
d <i title=3D"the WebSocket closing
+    handshake is started"><a href=3D#the-websocket-closing-ha=
ndshake-is-started>the WebSocket closing handshake has not yet started=
</a></i>, then the user
+    agent must <i>send a WebSocket Message</i> comprised of =
<var title=3D"">data</var> using a binary
+    frame opcode; if the data cannot be sent, e.g. because it would need=
 to be buffered but the
+    buffer is full, the user agent must <i><a href=3D#close-the=
-websocket-connection>close the WebSocket connection</a></i&g=
t; <a href=3D#concept-websocket-close-fail title=3Dconcept-websocket-c=
lose-fail>with prejudice</a>. The data to be sent is the raw dat=
a
+    represented by the <code><a href=3D#blob>Blob</a>&=
lt;/code> object. <!-- that sentence is meant to invoke "This
+    interface represents immutable raw data." --> Any invocation=
 of this method with a
+    <code><a href=3D#blob>Blob</a></code> argume=
nt that does not throw an exception must increase the <code title=3Ddo=
m-WebSocket-bufferedAmount><a href=3D#dom-websocket-bufferedamount&=
gt;bufferedAmount</a></code> attribute by the size of the
+    <code><a href=3D#blob>Blob</a></code> object=
's raw data, in bytes. <!-- that sentence is meant to invoke the same =
as
+    Blob.size --> <a href=3D#refsWSP>[WSP]</a> <a href=
=3D#refsFILEAPI>[FILEAPI]</a></p>
+
+   </dd>
+
+
+   <dt>If the argument is an <code><a href=3D#arraybuffer=
>ArrayBuffer</a></code> object</dt>
+
+   <dd>
+
+    <p>If <i><a href=3D#the-websocket-connection-is-estab=
lished>the WebSocket connection is established</a></i>, an=
d <i title=3D"the WebSocket closing
+    handshake is started"><a href=3D#the-websocket-closing-ha=
ndshake-is-started>the WebSocket closing handshake has not yet started=
</a></i>, then the user
+    agent must <i>send a WebSocket Message</i> comprised of =
<var title=3D"">data</var> using a binary
+    frame opcode; if the data cannot be sent, e.g. because it would need=
 to be buffered but the
+    buffer is full, the user agent must <i><a href=3D#close-the=
-websocket-connection>close the WebSocket connection</a></i&g=
t; <a href=3D#concept-websocket-close-fail title=3Dconcept-websocket-c=
lose-fail>with prejudice</a>. The data to be sent is the data
+    stored in the buffer described by the <code><a href=3D#arra=
ybuffer>ArrayBuffer</a></code> object. <!-- that senten=
ce is
+    meant to invoke "The ArrayBuffer type describes a buffer used t=
o store data for the array buffer
+    views." at the top of the Typed Array spec, and "Optional =
byteOffset and length can be used to
+    limit the section of the buffer referenced" in the definition o=
f the TypedArray constructor -->
+    Any invocation of this method with an <code><a href=3D#arra=
ybuffer>ArrayBuffer</a></code> argument that does not thro=
w an
+    exception must increase the <code title=3Ddom-WebSocket-bufferedA=
mount><a href=3D#dom-websocket-bufferedamount>bufferedAmount<=
/a></code>
+    attribute by the length of the <code><a href=3D#arraybuffer=
>ArrayBuffer</a></code> in bytes. <!-- that sentence is=
 meant to
+    invoke the same as ArrayBuffer.byteLength --> <a href=3D#refsW=
SP>[WSP]</a> <a href=3D#refsTYPEDARRAY>[TYPEDARRAY]</a&=
gt;</p>
+
+   </dd>
+
+
+   <dt>If the argument is an <code><a href=3D#arraybuffer=
view>ArrayBufferView</a></code> object</dt>
+
+   <dd>
+
+    <p>If <i><a href=3D#the-websocket-connection-is-estab=
lished>the WebSocket connection is established</a></i>, an=
d <i title=3D"the WebSocket closing
+    handshake is started"><a href=3D#the-websocket-closing-ha=
ndshake-is-started>the WebSocket closing handshake has not yet started=
</a></i>, then the user
+    agent must <i>send a WebSocket Message</i> comprised of =
<var title=3D"">data</var> using a binary
+    frame opcode; if the data cannot be sent, e.g. because it would need=
 to be buffered but the
+    buffer is full, the user agent must <i><a href=3D#close-the=
-websocket-connection>close the WebSocket connection</a></i&g=
t; <a href=3D#concept-websocket-close-fail title=3Dconcept-websocket-c=
lose-fail>with prejudice</a>. The data to be sent is the data
+    stored in the section of the buffer described by the <code>&lt=
;a href=3D#arraybuffer>ArrayBuffer</a></code> object that =
the
+    <code><a href=3D#arraybufferview>ArrayBufferView</a&g=
t;</code> object references. <!-- that sentence is meant to invo=
ke "The
+    ArrayBuffer type describes a buffer used to store data for the array=
 buffer views." at the top
+    of the Typed Array spec, and "Optional byteOffset and length ca=
n be used to limit the section of
+    the buffer referenced" in the definition of the TypedArray cons=
tructor --> Any invocation of
+    this method with an <code><a href=3D#arraybufferview>Arr=
ayBufferView</a></code> argument that does not throw an excep=
tion must
+    increase the <code title=3Ddom-WebSocket-bufferedAmount><a =
href=3D#dom-websocket-bufferedamount>bufferedAmount</a></code=
> attribute by the
+    length of the <code><a href=3D#arraybufferview>ArrayBuff=
erView</a></code> in bytes. <!-- that sentence is meant to=
 invoke the
+    same as ArrayBufferView.byteLength --> <a href=3D#refsWSP>[=
WSP]</a> <a href=3D#refsTYPEDARRAY>[TYPEDARRAY]</a><=
/p>
+
+   </dd>
+
+  </dl><hr><p>The following are the <a href=3D#even=
t-handlers>event handlers</a> (and their corresponding <a hre=
f=3D#event-handler-event-type title=3D"event
+  handler event type">event handler event types</a>) that =
must be supported, as <a href=3D#event-handler-idl-attributes>event=
 handler IDL attributes</a>,
+  by all objects implementing the <code><a href=3D#websocket&gt=
;WebSocket</a></code> interface:</p>
+
+  <table><thead><tr><th><a href=3D#event-hand=
lers title=3D"event handlers">Event handler</a> <th=
><a href=3D#event-handler-event-type>Event handler event type&lt=
;/a>
+   <tbody><tr><td><dfn id=3Dhandler-websocket-onope=
n title=3Dhandler-WebSocket-onopen><code>onopen</code><=
/dfn> <td> <code title=3Devent-open>open</code>
+    <tr><td><dfn id=3Dhandler-websocket-onmessage title=3D=
handler-WebSocket-onmessage><code>onmessage</code></dfn=
> <td> <code title=3Devent-message><a href=3D#event-mes=
sage>message</a></code>
+    <tr><td><dfn id=3Dhandler-websocket-onerror title=3Dh=
andler-WebSocket-onerror><code>onerror</code></dfn> =
<td> <code title=3Devent-error>error</code>
+    <tr><td><dfn id=3Dhandler-websocket-onclose title=3Dh=
andler-WebSocket-onclose><code>onclose</code></dfn> =
<td> <code title=3Devent-socket-close>close</code>
+  </table><h4 id=3Dfeedback-from-the-protocol><span class=
=3Dsecno>9.3.3 </span>Feedback from the protocol</h4>
+
+  <p>When <i><a href=3D#the-websocket-connection-is-estab=
lished>the WebSocket connection is established</a></i>, th=
e user agent must <a href=3D#queue-a-task>queue a
+  task</a> to run these steps:</p>
+
+  <ol><li><p>If the <code><a href=3D#websocke=
t>WebSocket</a></code> object's <a href=3D#client-speci=
fied-protocols>client-specified protocols</a> was not an
+   empty list, but the <i><a href=3D#subprotocol-in-use>subp=
rotocol in use</a></i> is the null value, then <i><a=
 href=3D#fail-the-websocket-connection>fail the WebSocket
+   connection</a></i>, set the <code title=3Ddom-WebSocke=
t-readyState><a href=3D#dom-websocket-readystate>readyState</=
a></code> attribute's
+   value to <code title=3Ddom-WebSocket-CLOSING><a href=3D#dom-=
websocket-closing>CLOSING</a></code> (2), and abort these =
steps. <a href=3D#refsWSP>[WSP]</a></li>
+
+   <li><p>Change the <code title=3Ddom-WebSocket-readySta=
te><a href=3D#dom-websocket-readystate>readyState</a></=
code> attribute's value to
+   <code title=3Ddom-WebSocket-OPEN><a href=3D#dom-websocket-op=
en>OPEN</a></code> (1).</li>
+
+   <li><p>Change the <code title=3Ddom-WebSocket-extensio=
ns><a href=3D#dom-websocket-extensions>extensions</a></=
code> attribute's value to
+   the <i><a href=3D#extensions-in-use>extensions in use<=
/a></i>, if is not the null value. <a href=3D#refsWSP>[WSP=
]</a></li>
+
+   <li><p>Change the <code title=3Ddom-WebSocket-protocol=
><a href=3D#dom-websocket-protocol>protocol</a></code&g=
t; attribute's value to the
+   <i><a href=3D#subprotocol-in-use>subprotocol in use</a=
></i>, if is not the null value. <a href=3D#refsWSP>[WSP]&=
lt;/a></li>
+
+   <li><p>Act as if the user agent had <a href=3D#receive=
s-a-set-cookie-string title=3D"receives a set-cookie-string"&gt=
;received a
+   set-cookie-string</a> consisting of the <i><a href=3D&=
quot;#cookies-set-during-the-server's-opening-handshake">cookies =
set during the server's opening
+   handshake</a></i>, for the URL <var title=3D"&quo=
t;>url</var> given to the <code title=3Ddom-WebSocket><=
a href=3D#dom-websocket>WebSocket()</a></code> constructor=
. <a href=3D#refsCOOKIES>[COOKIES]</a> <a href=3D#refsRFC3=
629>[RFC3629]</a> <a href=3D#refsWSP>[WSP]</a></l=
i>
+
+   <li><p><a href=3D#fire-a-simple-event>Fire a simple=
 event</a> named <code title=3Devent-open>open</code> a=
t the
+   <code><a href=3D#websocket>WebSocket</a></code&g=
t; object.</p>
+
+  </ol><hr><p>When <i><a href=3D#a-websocket-=
message-has-been-received>a WebSocket message has been received</a&=
gt;</i> with type <var title=3D"">type</var> =
and data
+  <var title=3D"">data</var>, the user agent must =
<a href=3D#queue-a-task>queue a task</a> to follow these step=
s: <a href=3D#refsWSP>[WSP]</a></p>
+
+  <ol><li>
+
+    <p>If the <code title=3Ddom-WebSocket-readyState><a h=
ref=3D#dom-websocket-readystate>readyState</a></code> attr=
ibute's value is not
+    <code title=3Ddom-WebSocket-OPEN><a href=3D#dom-websocket-o=
pen>OPEN</a></code> (1), then abort these steps.</p>
+
+   </li>
+
+   <li>
+
+    <p>Let <var title=3D"">event</var> be a =
newly created <a href=3D#concept-events-trusted title=3Dconcept-events=
-trusted>trusted</a> event that uses the <code><a href=3D=
#messageevent>MessageEvent</a></code>
+    interface, with the event type <code title=3Devent-message>&lt=
;a href=3D#event-message>message</a></code>, which does no=
t
+    bubble, is not cancelable, and has no default action.
+    </p>
+
+   </li>
+
+   <li><p>Initialize <var title=3D"">event&l=
t;/var>'s <code title=3Ddom-MessageEvent-origin><a href=3D#do=
m-messageevent-origin>origin</a></code>
+   attribute to the <a href=3D#unicode-serialization-of-an-origin tit=
le=3D"Unicode serialization of an origin">Unicode serializat=
ion</a> of
+   the <a href=3D#origin>origin</a> of the <a href=3D#url=
>URL</a> that was passed to the <code><a href=3D#websoc=
ket>WebSocket</a></code>
+   object's constructor.</li>
+
+   <li>
+
+    <p>If <var title=3D"">type</var> indicat=
es that the data is Text, then initialize <var title=3D""&gt=
;event</var>'s <code title=3Ddom-MessageEvent-data><a href=
=3D#dom-messageevent-data>data</a></code> attribute to &lt=
;var title=3D"">data</var>.
+
+    <p>If <var title=3D"">type</var> indicat=
es that the data is Binary, and <code title=3Ddom-WebSocket-binaryType=
><a href=3D#dom-websocket-binarytype>binaryType</a></co=
de> is set to "<code title=3D"">blob</code>=
", then
+    initialize <var title=3D"">event</var>'s <c=
ode title=3Ddom-MessageEvent-data><a href=3D#dom-messageevent-data&=
gt;data</a></code> attribute
+    to a new <code><a href=3D#blob>Blob</a></code&g=
t; object that represents <var title=3D"">data</var&gt=
; as its raw data. <a href=3D#refsFILEAPI>[FILEAPI]</a></p=
>
+
+    <p>If <var title=3D"">type</var> indicat=
es that the data is Binary, and <code title=3Ddom-WebSocket-binaryType=
><a href=3D#dom-websocket-binarytype>binaryType</a></co=
de> is set to "<code title=3D"">arraybuffer</c=
ode>", then initialize <var title=3D"">event</=
var>'s <code title=3Ddom-MessageEvent-data><a href=3D#dom-mes=
sageevent-data>data</a></code> attribute to a new read-onl=
y <code><a href=3D#arraybuffer>ArrayBuffer</a></code=
>
+    object whose contents are <var title=3D"">data</v=
ar>. <a href=3D#refsTYPEDARRAY>[TYPEDARRAY]</a></p>
+
+   </li>
+
+   <li>
+
+    <p><a href=3D#concept-event-dispatch title=3Dconcept-event-=
dispatch>Dispatch</a> <var title=3D"">event</=
var> at the
+    <code><a href=3D#websocket>WebSocket</a></code&=
gt; object.</p>
+
+   </li>
+
+  </ol><p class=3Dnote>User agents are encouraged to check i=
f they can perform the above steps
+  efficiently before they run the task, picking tasks from other <a h=
ref=3D#task-queue title=3D"task queue">task
+  queues</a> while they prepare the buffers if not. For example, i=
f the <code title=3Ddom-WebSocket-binaryType><a href=3D#dom-webs=
ocket-binarytype>binaryType</a></code> attribute was set t=
o "<code title=3D"">blob</code>" when the=
 data arrived, and the user agent spooled all the data to disk, but
+  just before running the above <a href=3D#concept-task title=3Dconce=
pt-task>task</a> for this particular message
+  the script switched <code title=3Ddom-WebSocket-binaryType><a=
 href=3D#dom-websocket-binarytype>binaryType</a></code> to=
 "<code title=3D"">arraybuffer</code>", t=
he user agent would want to page the data back to RAM before
+  running this <a href=3D#concept-task title=3Dconcept-task>task&l=
t;/a> so as to avoid stalling the main thread while
+  it created the <code><a href=3D#arraybuffer>ArrayBuffer&lt=
;/a></code> object.</p>
+
+  <div class=3Dexample>
+
+   <p>Here is an example of how to define a handler for the <co=
de title=3Devent-message><a href=3D#event-message>message</a&=
gt;</code> event in the case of text frames:</p>
+
+   <pre>mysocket.onmessage =3D function (event) {
+  if (event.data =3D=3D 'on') {
+    turnLampOn();
+  } else if (event.data =3D=3D 'off') {
+    turnLampOff();
+  }
+};</pre>
+
+   <p>The protocol here is a trivial one, with the server just sen=
ding "on" or "off" messages.</p>
+
+  </div>
+
+  <hr><p>When <i><a href=3D#the-websocket-closing-h=
andshake-is-started>the WebSocket closing handshake is started</a&g=
t;</i>, the user agent must <a href=3D#queue-a-task>queue a
+  task</a> to change the <code title=3Ddom-WebSocket-readyState=
><a href=3D#dom-websocket-readystate>readyState</a></co=
de> attribute's
+  value to <code title=3Ddom-WebSocket-CLOSING><a href=3D#dom-w=
ebsocket-closing>CLOSING</a></code> (2). (If the <code =
title=3Ddom-WebSocket-close><a href=3D#dom-websocket-close>close=
()</a></code> method was called, the <code title=3Ddom-Web=
Socket-readyState><a href=3D#dom-websocket-readystate>readyState=
</a></code> attribute's value will already be set to <code=
 title=3Ddom-WebSocket-CLOSING><a href=3D#dom-websocket-closing>=
CLOSING</a></code> (2) when this task runs.) <a href=3D#re=
fsWSP>[WSP]</a></p>
+
+  <hr><p id=3DcloseWebSocket>When <i><a href=3D#the=
-websocket-connection-is-closed>the WebSocket connection is closed<=
/a></i>, possibly <i title=3D"">cleanly</i&gt=
;, the user agent must <a href=3D#queue-a-task>queue a task</a&g=
t; to run the following
+  substeps:</p>
+
+  <ol><li><p>Change the <code title=3Ddom-WebSocket=
-readyState><a href=3D#dom-websocket-readystate>readyState</a=
></code> attribute's value to
+   <code title=3Ddom-WebSocket-CLOSED><a href=3D#dom-websocket-=
closed>CLOSED</a></code> (3).</li>
+
+   <li><p>If the user agent was required to <i><a h=
ref=3D#fail-the-websocket-connection>fail the WebSocket connection<=
/a></i> or <i><a href=3D#the-websocket-connection-is-cl=
osed>the WebSocket
+   connection is closed</a></i> <dfn id=3Dconcept-websock=
et-close-fail title=3Dconcept-websocket-close-fail>with prejudice</=
dfn>,
+   <a href=3D#fire-a-simple-event>fire a simple event</a> na=
med <code title=3D"">error</code> at the <code&g=
t;<a href=3D#websocket>WebSocket</a></code>
+   object. <a href=3D#refsWSP>[WSP]</a></li>
+
+   <li><p>Create a <a href=3D#concept-events-trusted titl=
e=3Dconcept-events-trusted>trusted</a> event that uses the
+   <code><a href=3D#closeevent>CloseEvent</a></code=
> interface, with the event type <code title=3Devent-socket-close&g=
t;close</code>, which does not bubble, is not cancelable, has no de=
fault
+   action, whose <code title=3Ddom-CloseEvent-wasClean><a href=3D=
#dom-closeevent-wasclean>wasClean</a></code> attribute is =
initialized to
+   true if the connection closed <i title=3D"">cleanly&l=
t;/i> and false otherwise, whose <code title=3Ddom-CloseEvent-code&=
gt;<a href=3D#dom-closeevent-code>code</a></code> attri=
bute is initialized to <i><a href=3D#the-websocket-connection-cl=
ose-code>the WebSocket connection
+   close code</a></i>, and whose <code title=3Ddom-CloseE=
vent-reason><a href=3D#dom-closeevent-reason>reason</a>&lt=
;/code> attribute is
+   initialized to the result of applying the <a href=3D#utf-8-decoder=
>UTF-8 decoder</a> to <i><a href=3D#the-websocket-conne=
ction-close-reason>the WebSocket
+   connection close reason</a></i>, and <a href=3D#concep=
t-event-dispatch title=3Dconcept-event-dispatch>dispatch</a> the=
 event
+   at the <code><a href=3D#websocket>WebSocket</a><=
/code> object. <a href=3D#refsWSP>[WSP]</a></li>
+
+  </ol><div class=3Dwarning>
+
+   <p>User agents must not convey any failure information to scrip=
ts in a way that would allow a
+   script to distinguish the following situations:</p>
+
+   <ul><li>A server whose host name could not be resolved.
+
+    <li>A server to which packets could not successfully be routed=
.
+
+    <li>A server that refused the connection on the specified port=
.
+
+    <li>A server that failed to correctly perform a TLS handshake =
(e.g., the server certificate
+    can't be verified).
+
+    <li>A server that did not complete the opening handshake (e.g.=
 because it was not a WebSocket
+    server).
+
+    <li>A WebSocket server that sent a correct opening handshake, =
but that specified options that
+    caused the client to drop the connection (e.g. the server specified =
a subprotocol that the
+    client did not offer).
+
+    <li>A WebSocket server that abruptly closed the connection aft=
er successfully completing the
+    opening handshake.
+
+   </ul><p>In all of these cases, the <i><a href=3D=
#the-websocket-connection-close-code>the WebSocket connection close co=
de</a></i> would be 1006, as
+   required by the WebSocket Protocol specification. <a href=3D#refsW=
SP>[WSP]</a></p>
+
+   <p>Allowing a script to distinguish these cases would allow a s=
cript to probe the user's local
+   network in preparation for an attack.</p>
+
+   <p class=3Dnote>In particular, this means the code 1015 is not =
used by the user agent (unless the
+   server erroneously uses it in its close frame, of course).</p>
+
+  </div>
+
+  <hr><p>The <a href=3D#task-source>task source</a&=
gt; for all <a href=3D#concept-task title=3Dconcept-task>tasks</=
a> <a href=3D#queue-a-task title=3D"queue
+  a task">queued</a> in this section is the <dfn id=3Dw=
ebsocket-task-source>WebSocket task source</dfn>.</p>
+
+
+  <h4 id=3Dping-and-pong-frames><span class=3Dsecno>9.3.4 &l=
t;/span>Ping and Pong frames</h4>
+
+  <p>The WebSocket protocol specification defines Ping and Pong fr=
ames that can be used for
+  keep-alive, heart-beats, network status probing, latency instrumentati=
on, and so forth. These are
+  not currently exposed in the API.</p>
+
+  <p>User agents may send ping and unsolicited pong frames as desi=
red, for example in an attempt to
+  maintain local network NAT mappings, to detect failed connections, or =
to display latency metrics
+  to the user. User agents must not use pings or unsolicited pongs to ai=
d the server; it is assumed
+  that servers will solicit pongs whenever appropriate for the server's =
needs.</p>
+
+  <!-- v2: we'll probably add a way to make the client send pings and=
 automatically terminate the
+  connection if they don't get a pong within an author-provided timeout;=
 see
+  https://www.w3.org/Bugs/Public/show_bug.cgi?id=3D17264 -->
+
+
+  <h4 id=3Dparsing-websocket-urls><span class=3Dsecno>9.3.5 =
</span>Parsing WebSocket URLs</h4>
+
+  <p>The steps to <dfn id=3D"parse-a-websocket-url's-compo=
nents">parse a WebSocket URL's components</dfn> from a stri=
ng <var title=3D"">url</var> are as follows. These =
steps return either a <var title=3D"">host</var>, a=
 <var title=3D"">port</var>, a <var title=3D&quo=
t;">resource name</var>, and a <var title=3D""=
>secure</var> flag,
+  or they fail.</p>
+
+  <ol><li><p>If the <var title=3D"">ur=
l</var> string is not an <a href=3D#absolute-url>absolute URL=
</a>, then fail this
+   algorithm.</li>
+
+   <li>
+
+    <p><a href=3D#resolve-a-url title=3D"resolve a url&quo=
t;>Resolve</a> the <var title=3D"">url</var&g=
t; string, with the URL
+    character encoding set to UTF-8. <a href=3D#refsRFC3629>[RFC36=
29]</a></p> <!-- the URL character
+    encoding is used to escape the query component -->
+
+    <p class=3Dnote>It doesn't matter what it is resolved relative=
 to, since we already know it is
+    an <a href=3D#absolute-url>absolute URL</a> at this poin=
t.</p>
+
+   </li>
+
+   <li><p>If the resulting <a href=3D#parsed-url>parse=
d URL</a> does not have a <a href=3D#concept-url-scheme title=3D=
concept-url-scheme>scheme</a> component whose value is either &q=
uot;<code title=3D"">ws</code>" or "<c=
ode title=3D"">wss</code>", then fail this algori=
thm.</li>
+
+   <li><p>If the resulting <a href=3D#parsed-url>parse=
d URL</a> has a non-null <a href=3D#concept-url-fragment title=3D=
concept-url-fragment>fragment</a> component, then fail this algo=
rithm.</li>
+
+   <li><p>If the <a href=3D#concept-url-scheme title=3Dco=
ncept-url-scheme>scheme</a> component of the resulting
+   <a href=3D#parsed-url>parsed URL</a> is "<code ti=
tle=3D"">ws</code>", set <var title=3D"&q=
uot;>secure</var> to false;
+   otherwise, the <a href=3D#concept-url-scheme title=3Dconcept-url-s=
cheme>scheme</a> component is "<code title=3D"&quot=
;>wss</code>", set <var title=3D"">secure&l=
t;/var> to true.</li>
+
+   <li><p>Let <var title=3D"">host</var&g=
t; be the value of the resulting <a href=3D#parsed-url>parsed URL&l=
t;/a>'s <a href=3D#concept-url-host title=3Dconcept-url-host>hos=
t</a> component.</li> <!-- at this point this is
+   Punycode-encoded and lowercased already -->
+
+   <li><p>If the resulting <a href=3D#parsed-url>parse=
d URL</a> has a <a href=3D#concept-url-port title=3Dconcept-url-=
port>port</a>
+   component that is not the empty string, then let <var title=3D&quo=
t;">port</var> be that component's
+   value; otherwise, there is no explicit <var title=3D""&g=
t;port</var>.</li>
+
+   <li><p>If there is no explicit <var title=3D"&quo=
t;>port</var>, then: if <var title=3D"">secure&l=
t;/var> is
+   false, let <var title=3D"">port</var> be 80, ot=
herwise let <var title=3D"">port</var> be
+   443.</li>
+
+   <li><p>Let <var title=3D"">resource name&=
lt;/var> be the value of the resulting <a href=3D#parsed-url>par=
sed
+   URL</a>'s <a href=3D#concept-url-path title=3Dconcept-url-pa=
th>path</a> component (which might be
+   empty).</li> <!-- at this point this is UTF-8 encoded and pe=
rcent encoded -->
+
+   <li><p>If <var title=3D"">resource name&l=
t;/var> is the empty string, set it to a single character
+   U+002F SOLIDUS (/).</li>
+
+   <li><p>If the resulting <a href=3D#parsed-url>parse=
d URL</a> has a non-null <a href=3D#concept-url-query title=3Dco=
ncept-url-query>query</a> component, then append a single U+003F=
 QUESTION MARK
+   character (?) to <var title=3D"">resource name</va=
r>, followed by the value of the <a href=3D#concept-url-query title=
=3Dconcept-url-query>query</a> component.</li> <!-- at =
this point this is UTF-8
+   encoded and percent encoded -->
+
+   <li><p>Return <var title=3D"">host</va=
r>, <var title=3D"">port</var>, <var title=3D=
"">resource
+   name</var>, and <var title=3D"">secure</var&=
gt;.</li>
+
+  </ol><h4 id=3Devent-definitions-3><span class=3Dsecno&g=
t;9.3.6 </span>Event definitions</h4>
+
+  <pre class=3Didl>[Constructor(DOMString type, optional <a hre=
f=3D#closeeventinit>CloseEventInit</a> eventInitDict)]
+interface <dfn id=3Dcloseevent>CloseEvent</dfn> : <a href=
=3D#event>Event</a> {
+  readonly attribute boolean <a href=3D#dom-closeevent-wasclean title=
=3Ddom-CloseEvent-wasClean>wasClean</a>;
+  readonly attribute unsigned short <a href=3D#dom-closeevent-code ti=
tle=3Ddom-CloseEvent-code>code</a>;
+  readonly attribute DOMString <a href=3D#dom-closeevent-reason title=
=3Ddom-CloseEvent-reason>reason</a>;
+};
+
+dictionary <dfn id=3Dcloseeventinit>CloseEventInit</dfn> : &=
lt;a href=3D#eventinit>EventInit</a> {
+  boolean wasClean;
+  unsigned short code;
+  DOMString reason;
+};</pre>
+
+  <p>The <dfn id=3Ddom-closeevent-wasclean title=3Ddom-CloseEve=
nt-wasClean><code>wasClean</code></dfn> attribute mu=
st return the
+  value it was initialized to. When the object is created, this attribut=
e must be initialized to
+  false. It represents whether the connection closed cleanly or not.<=
/p>
+
+  <p>The <dfn id=3Ddom-closeevent-code title=3Ddom-CloseEvent-c=
ode><code>code</code></dfn> attribute must return th=
e value it
+  was initialized to. When the object is created, this attribute must be=
 initialized to zero. It
+  represents the WebSocket connection close code provided by the server.=
</p>
+
+  <p>The <dfn id=3Ddom-closeevent-reason title=3Ddom-CloseEvent=
-reason><code>reason</code></dfn> attribute must ret=
urn the
+  value it was initialized to. When the object is created, this attribut=
e must be initialized to
+  empty string. It represents the WebSocket connection close reason prov=
ided by the server.</p>
+
+
+
+  <h4 id=3Dgarbage-collection-1><span class=3Dsecno>9.3.7 &l=
t;/span>Garbage collection</h4>
+
+  <p>A <code><a href=3D#websocket>WebSocket</a>&=
lt;/code> object whose <code title=3Ddom-WebSocket-readyState>&l=
t;a href=3D#dom-websocket-readystate>readyState</a></code>
+  attribute's value was set to <code title=3Ddom-WebSocket-CONNECTING=
><a href=3D#dom-websocket-connecting>CONNECTING</a></co=
de> (0) as of
+  the last time the <a href=3D#event-loop>event loop</a> sta=
rted executing a <a href=3D#concept-task title=3Dconcept-task>task&=
lt;/a> must not be garbage collected if there are any event listeners
+  registered for <code title=3Devent-open>open</code> events=
, <code title=3Devent-message><a href=3D#event-message>messag=
e</a></code> events, <code title=3Devent-error>error&lt=
;/code> events, or
+  <code title=3Devent-socket-close>close</code> events.</=
p>
+
+  <p>A <code><a href=3D#websocket>WebSocket</a>&=
lt;/code> object whose <code title=3Ddom-WebSocket-readyState>&l=
t;a href=3D#dom-websocket-readystate>readyState</a></code>
+  attribute's value was set to <code title=3Ddom-WebSocket-OPEN>&l=
t;a href=3D#dom-websocket-open>OPEN</a></code> (1) as of t=
he last time
+  the <a href=3D#event-loop>event loop</a> started executing=
 a <a href=3D#concept-task title=3Dconcept-task>task</a> must=
 not be
+  garbage collected if there are any event listeners registered for <=
code title=3Devent-message><a href=3D#event-message>message</=
a></code> events, <code title=3Devent-error>error</code=
>, or <code title=3Devent-socket-close>close</code> events=
.</p>
+
+  <p>A <code><a href=3D#websocket>WebSocket</a>&=
lt;/code> object whose <code title=3Ddom-WebSocket-readyState>&l=
t;a href=3D#dom-websocket-readystate>readyState</a></code>
+  attribute's value was set to <code title=3Ddom-WebSocket-CLOSING&gt=
;<a href=3D#dom-websocket-closing>CLOSING</a></code> (2=
) as of the last
+  time the <a href=3D#event-loop>event loop</a> started exec=
uting a <a href=3D#concept-task title=3Dconcept-task>task</a>=
 must
+  not be garbage collected if there are any event listeners registered f=
or <code title=3Devent-error>error</code> or <code title=3D=
event-socket-close>close</code> events.</p>
+
+  <p>A <code><a href=3D#websocket>WebSocket</a>&=
lt;/code> object with <i title=3D"the WebSocket connection is =
established"><a href=3D#the-websocket-connection-is-establishe=
d>an
+  established connection</a></i> that has data queued to be =
transmitted to the network must not be
+  garbage collected. <a href=3D#refsWSP>[WSP]</a></p>
+
+  <p>If a <code><a href=3D#websocket>WebSocket</a&g=
t;</code> object is garbage collected while its connection is still=
 open, the
+  user agent must <i><a href=3D#start-the-websocket-closing-han=
dshake>start the WebSocket closing handshake</a></i>, with=
 no status code<!--CLOSE CODE-->
+  for the Close message. <a href=3D#refsWSP>[WSP]</a></p&=
gt;
+
+  <hr><p>If a user agent is to <dfn id=3Dmake-disappear&g=
t;make disappear</dfn> a <code><a href=3D#websocket>Web=
Socket</a></code> object (this happens
+  when a <code><a href=3D#document>Document</a></co=
de> object goes away), the user agent must follow the first appropriat=
e
+  set of steps from the following list:</p>
+
+  <dl class=3Dswitch><dt>If the WebSocket connection is not =
yet <i title=3D"the WebSocket connection is
+   established"><a href=3D#the-websocket-connection-is-establ=
ished>established</a></i> <a href=3D#refsWSP>[WSP]&l=
t;/a></dt>
+
+   <dd>
+
+    <p><i><a href=3D#fail-the-websocket-connection>Fai=
l the WebSocket connection</a></i>. <a href=3D#refsWSP>=
[WSP]</a></p>
+
+   </dd>
+
+
+   <dt>If the WebSocket closing handshake has not yet been <i t=
itle=3D"the WebSocket closing handshake
+   is started"><a href=3D#the-websocket-closing-handshake-is-=
started>started</a></i> <a href=3D#refsWSP>[WSP]<=
/a></dt>
+
+   <dd>
+
+    <p><i><a href=3D#start-the-websocket-closing-handshak=
e>Start the WebSocket closing handshake</a></i>, with the =
status code<!--CLOSE CODE--> to use in
+    the WebSocket Close message being 1001. <a href=3D#refsWSP>[WS=
P]</a></p>
+
+   </dd>
+
+
+   <dt>Otherwise</dt>
+
+   <dd>
+
+    <p>Do nothing.</p>
+
+   </dd>
+
+  </dl><!--TOPIC:DOM APIs--><!--POSTMSG--><h3 id=3D=
web-messaging><span class=3Dsecno>9.4 </span><dfn id=3D=
crossDocumentMessages>Cross-document messaging</dfn></h3>
+
+  <p>Web browsers, for security and privacy reasons, prevent docum=
ents in different domains from
+  affecting each other; that is, cross-site scripting is disallowed.<=
/p>
+
+  <p>While this is an important security feature, it prevents page=
s from different domains from
+  communicating even when those pages are not hostile. This section intr=
oduces a messaging system
+  that allows documents to communicate with each other regardless of the=
ir source domain, in a way
+  designed to not enable cross-site scripting attacks.</p>
+
+  <div class=3Dimpl>
+
+  <p>The <a href=3D#task-source>task source</a> for th=
e <a href=3D#concept-task title=3Dconcept-task>tasks</a> in
+  <a href=3D#web-messaging>cross-document messaging</a> is t=
he <dfn id=3Dposted-message-task-source>posted message task source&=
lt;/dfn>.</p>
+
+  </div>
+
+
+  <h4 id=3Dintroduction-9><span class=3Dsecno>9.4.1 </spa=
n>Introduction</h4>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <div class=3Dexample>
+
+   <p>For example, if document A contains an <code><a hre=
f=3D#the-iframe-element>iframe</a></code> element that con=
tains document B,
+   and script in document A calls <code title=3Ddom-window-postMessag=
e><a href=3D#dom-window-postmessage>postMessage()</a></=
code> on the
+   <code><a href=3D#window>Window</a></code> obj=
ect of document B, then a message event will be fired on that object,
+   marked as originating from the <code><a href=3D#window>Wi=
ndow</a></code> of document A. The script in document A might
+   look like:</p>
+
+   <pre>var o =3D document.getElementsByTagName('iframe')[0];
+o.contentWindow.postMessage('Hello world', 'http://b.example.org/');<=
/pre>
+
+   <p>To register an event handler for incoming events, the script=
 would use <code title=3D"">addEventListener()</code&g=
t; (or similar mechanisms). For example, the script in document B
+   might look like:</p>
+
+   <pre>window.addEventListener('message', receiver, false);
+function receiver(e) {
+  if (e.origin =3D=3D 'http://example.com') {
+    if (e.data =3D=3D 'Hello world') {
+      e.source.postMessage('Hello', e.origin);
+    } else {
+      alert(e.data);
+    }
+  }
+}</pre>
+
+   <p>This script first checks the domain is the expected domain, =
and then looks at the message,
+   which it either displays to the user, or responds to by sending a mes=
sage back to the document
+   which sent the message in the first place.</p>
+
+  </div>
+
+
+<!--ADD-TOPIC:Security-->
+  <h4 id=3Dsecurity-postmsg><span class=3Dsecno>9.4.2 </s=
pan>Security</h4>
+
+  <div class=3Dimpl>
+
+  <h5 id=3Dauthors><span class=3Dsecno>9.4.2.1 </span>=
Authors</h5>
+
+  </div>
+
+  <p id=3Dsecurity-4 class=3Dwarning>Use of this API requires extr=
a care to protect users from
+  hostile entities abusing a site for their own purposes.</p>
+
+  <p>Authors should check the <code title=3Ddom-MessageEvent-or=
igin><a href=3D#dom-messageevent-origin>origin</a></cod=
e> attribute to
+  ensure that messages are only accepted from domains that they expect t=
o receive messages from.
+  Otherwise, bugs in the author's message handling code could be exploit=
ed by hostile sites.</p>
+
+  <p>Furthermore, even after checking the <code title=3Ddom-Mes=
sageEvent-origin><a href=3D#dom-messageevent-origin>origin</a=
></code>
+  attribute, authors should also check that the data in question is of t=
he expected format.
+  Otherwise, if the source of the event has been attacked using a cross-=
site scripting flaw, further
+  unchecked processing of information sent using the <code title=3Ddo=
m-window-postMessage><a href=3D#dom-window-postmessage>postMessa=
ge()</a></code> method could result in the attack being
+  propagated into the receiver.</p>
+
+  <p>Authors should not use the wildcard keyword (*) in the <va=
r title=3D"">targetOrigin</var>
+  argument in messages that contain any confidential information, as oth=
erwise there is no way to
+  guarantee that the message is only delivered to the recipient to which=
 it was intended.</p>
+
+  <hr><p>Authors who accept messages from any origin are enc=
ouraged to consider the risks of a
+  denial-of-service attack. An attacker could send a high volume of mess=
ages; if the receiving page
+  performs expensive computation or causes network traffic to be sent fo=
r each such message, the
+  attacker's message could be multplied into a denial-of-service attack.=
 Authors are encouraged to
+  employ rate limiting (only accepting a certain number of messages per =
minute) to make such attacks
+  impractical.</p>
+
+
+  <div class=3Dimpl>
+
+  <h5 id=3Duser-agents><span class=3Dsecno>9.4.2.2 </span=
>User agents</h5>
+
+  <p>The integrity of this API is based on the inability for scrip=
ts of one <a href=3D#origin>origin</a> to
+  post arbitrary events (using <code title=3D"">dispatch=
Event()</code> or otherwise) to objects in
+  other origins (those that are not the <a href=3D#same-origin title=3D=
"same origin">same</a>).</p>
+
+  <p class=3Dnote>Implementors are urged to take extra care in the=
 implementation of this feature.
+  It allows authors to transmit information from one domain to another d=
omain, which is normally
+  disallowed for security reasons. It also requires that UAs be careful =
to allow access to certain
+  properties but not others.</p>
+
+  <hr><p>User agents are also encouraged to consider rate-li=
miting message traffic between different
+  <a href=3D#origin title=3Dorigin>origins</a>, to protect n=
aïve sites from denial-of-service
+  attacks.</p>
+
+  </div>
+<!--REMOVE-TOPIC:Security-->
+
+
+  <h4 id=3Dposting-messages><span class=3Dsecno>9.4.3 </s=
pan>Posting messages</h4>
+
+  <dl class=3Ddomintro><dt><var title=3D"">w=
indow</var> . <code title=3Ddom-window-postMessage><a href=
=3D#dom-window-postmessage>postMessage</a></code>(<var =
title=3D"">message</var>, <var title=3D""=
>targetOrigin</var> [, <var title=3D"">transfer&=
lt;/var> ])</dt>
+
+   <dd>
+
+    <p>Posts a message to the given window. Messages can be struct=
ured objects, e.g. nested objects
+    and arrays, can contain JavaScript values (strings, numbers, <cod=
e>Date</code>s, etc), and can
+    contain certain data objects such as <code><a href=3D#file&=
gt;File</a></code> <code><a href=3D#blob>Blob<=
/a></code>, <code><a href=3D#filelist>FileList</a=
></code>,
+    and <code><a href=3D#arraybuffer>ArrayBuffer</a>&l=
t;/code> objects.</p>
+
+    <p>Objects listed in <var title=3D"">transfer&=
lt;/var> are transferred, not just cloned, meaning that
+    they are no longer usable on the sending side.</p>
+
+    <p>If the origin of the target window doesn't match the given =
origin, the message is discarded,
+    to avoid information leakage. To send the message to the target rega=
rdless of origin, set the
+    target origin to "<code title=3D"">*</code&g=
t;". To restrict the message to same-origin targets only,
+    without needing to explicitly state the origin, set the target origi=
n to "<code title=3D"">/</code>".</p&g=
t;
+
+    <p>Throws a <code><a href=3D#datacloneerror>DataCl=
oneError</a></code> exception if <var title=3D""=
>transfer</var> array contains
+    duplicate objects or if <var title=3D"">message</=
var> could not be cloned.</p>
+
+   </dd>
+
+  </dl><p class=3Dnote>When posting a message to a <code&=
gt;<a href=3D#window>Window</a></code> of a <a href=3D=
#browsing-context>browsing context</a>
+  that has just been navigated to a new <code><a href=3D#docume=
nt>Document</a></code> is likely to result in the message =
not
+  receiving its intended recipient: the scripts in the target <a href=
=3D#browsing-context>browsing context</a> have to
+  have had time to set up listeners for the messages. Thus, for instance=
, in situations where a
+  message is to be sent to the <code><a href=3D#window>Windo=
w</a></code> of newly created child <code><a href=3D=
#the-iframe-element>iframe</a></code>,
+  authors are advised to have the child <code><a href=3D#docume=
nt>Document</a></code> post a message to their parent
+  announcing their readiness to receive messages, and for the parent to =
wait for this message before
+  beginning posting messages.</p>
+
+  <div class=3Dimpl>
+
+  <p>When a script invokes the <dfn id=3Ddom-window-postmessage=
 title=3Ddom-window-postMessage><code>postMessage(<var title=3D=
"">message</var>, <var title=3D"">targ=
etOrigin</var>, <var title=3D"">transfer</var&gt=
;)</code></dfn> method (with two or three arguments) on a
+  <code><a href=3D#window>Window</a></code> obje=
ct, the user agent must follow these steps:</p>
+
+  <ol><!-- a lot of this is similar or identical to port.postMe=
ssage --><li>
+
+    <p>If the value of the <var title=3D"">targetO=
rigin</var> argument is neither a single U+002A
+    ASTERISK character (*), a single U+002F SOLIDUS character (/), nor a=
n <a href=3D#absolute-url>absolute URL</a>,
+    then throw a <code><a href=3D#syntaxerror>SyntaxError&lt=
;/a></code> exception and abort the overall set of steps.</p&=
gt;
+
+   </li>
+
+   <li>
+
+    <p>Let <var title=3D"">new ports</var> b=
e an empty array.</p>
+
+   </li>
+
+   <li>
+
+    <p>Let <var title=3D"">transfer map</var&gt=
; be an empty association list of
+    <code><a href=3D#transferable>Transferable</a><=
/code> objects to placeholder objects.</p>
+
+   </li>
+
+   <li>
+
+    <p>If the method was invoked with a third argument <var tit=
le=3D"">transfer</var>, run these
+    substeps:</p>
+
+    <ol><li>
+
+      <p>If any object is listed in <var title=3D""&g=
t;transfer</var> more than once, or any of the
+      <code><a href=3D#transferable>Transferable</a>&l=
t;/code> objects listed in <var title=3D"">transfer&lt=
;/var> are marked as <a href=3D#concept-transferable-neutered title=
=3Dconcept-Transferable-neutered>neutered</a>, then throw a
+      <code><a href=3D#datacloneerror>DataCloneError</a&g=
t;</code> exception and abort these steps.</p>
+
+     </li>
+
+     <li>
+
+      <p>For each object <var title=3D"">x</var=
> in <var title=3D"">transfer</var> in turn, add=
 a
+      mapping from <var title=3D"">x</var> to a ne=
w unique placeholder object created for <var title=3D"">x=
</var> to <var title=3D"">transfer map</var>,=
 and if <var title=3D"">x</var> is a
+      <code><a href=3D#messageport>MessagePort</a><=
/code> object, also append the placeholder object to the <var title=
=3D"">new
+      ports</var> array.</p>
+
+     </li>
+
+    </ol></li>
+
+   <li><!--CLEANUP--><!--no need for all this whitespace-=
->
+
+    <p>Let <var title=3D"">message clone</var&g=
t; be the result of obtaining a <a href=3D#structured-clone>structu=
red
+    clone</a> of the <var title=3D"">message</v=
ar> argument, with <var title=3D"">transfer map</va=
r>
+    as the <i>transfer map</i>. If this throws an exception,=
 then throw that exception and abort
+    these steps.</p>
+
+   </li>
+
+   <li>
+
+    <p>If the method was invoked with a third argument <var tit=
le=3D"">transfer</var>, run these
+    substeps:</p>
+
+    <ol><li><!--CLEANUP--><!--no need for all this =
whitespace-->
+
+      <p>Let <var title=3D"">new owner</var>=
 be the <a href=3D#script-settings-object>script settings object&lt=
;/a> of the <code><a href=3D#window>Window</a></c=
ode> object on which the method was
+      invoked.</p>
+
+     </li>
+
+     <li><!--CLEANUP--><!--no need for all this whitespac=
e-->
+
+      <p>For each object <var title=3D"">x</var=
> in <var title=3D"">transfer</var> in turn, obt=
ain a new
+      object <var title=3D"">y</var> by <a href=
=3D#transfer-a-transferable-object title=3D"transfer a Transferable
+      object">transferring</a> the object <var title=3D=
"">x</var> to <var title=3D"">new owne=
r</var>,
+      and replace the placeholder object that was created for the object=
 <var title=3D"">x</var> by
+      the new object <var title=3D"">y</var> where=
ver the placeholder exists (i.e. in <var title=3D"">messa=
ge clone</var> and in <var title=3D"">new ports<=
/var>).</p>
+
+     </li>
+
+    </ol></li>
+
+   <li><!--CLEANUP--><!--no need for all this whitespace-=
->
+
+    <p>Make <var title=3D"">new ports</var> =
into a <a href=3D#dfn-read-only-array title=3Ddfn-read-only-array>r=
ead only</a>
+    array.</p>
+
+   </li>
+
+   <li>
+
+    <p>Return from the <code title=3Ddom-window-postMessage>=
<a href=3D#dom-window-postmessage>postMessage()</a></code&=
gt; method, but
+    asynchronously continue running these steps.</p>
+
+   </li>
+
+   <li>
+
+<!--CLEANUP-->
+    <p>If the <var title=3D"">targetOrigin</var=
> argument is a single literal U+002F SOLIDUS character
+    (/), and the <code><a href=3D#document>Document</a&gt=
;</code> of the <code><a href=3D#window>Window</a&gt=
;</code> object on which the method was
+    invoked does not have the <a href=3D#same-origin>same origin&l=
t;/a> as the <a href=3D#responsible-document>responsible documen=
t</a> specified by the <a href=3D#entry-settings-object>entry=
 settings
+    object</a>, then abort these steps silently.</p>
+
+    <p>Otherwise, if the <var title=3D"">targetOri=
gin</var> argument is an <a href=3D#absolute-url>absolute URL=
</a>,
+    and the <code><a href=3D#document>Document</a><=
/code> of the <code><a href=3D#window>Window</a><=
/code> object on which the method was invoked
+    does not have the <a href=3D#same-origin>same origin</a>=
 as <var title=3D"">targetOrigin</var>, then abort =
these
+    steps silently.</p>
+
+    <p>Otherwise, the <var title=3D"">targetOrigin=
</var> argument is a single literal U+002A ASTERISK
+    character (*), and no origin check is made.</p>
+
+   </li>
+
+   <li>
+
+<!--CLEANUP-->
+    <p>Create a <a href=3D#concept-events-trusted title=3Dconce=
pt-events-trusted>trusted</a> event that uses the
+    <code><a href=3D#messageevent>MessageEvent</a><=
/code> interface, with the event type <code title=3Devent-message&g=
t;<a href=3D#event-message>message</a></code>, which do=
es not bubble, is not cancelable, and has no
+    default action. The <code title=3Ddom-MessageEvent-data><a =
href=3D#dom-messageevent-data>data</a></code> attribute mu=
st be
+    initialized to the value of <var title=3D"">message =
clone</var>, the <code title=3Ddom-MessageEvent-origin><a =
href=3D#dom-messageevent-origin>origin</a></code> attribut=
e must be initialized to the <a href=3D#unicode-serialization-of-an-or=
igin title=3D"Unicode serialization of an origin">Unicode se=
rialization</a> of the
+    <a href=3D#origin>origin</a> specified by the <a href=
=3D#incumbent-settings-object>incumbent settings object</a>, the=
 <code title=3Ddom-MessageEvent-source><a href=3D#dom-messageeve=
nt-source>source</a></code> attribute must be initialized =
to the
+    <code><a href=3D#windowproxy>WindowProxy</a></c=
ode> object corresponding to the
+    <a href=3D#global-object>global object</a> (a <code&g=
t;<a href=3D#window>Window</a></code> object) specified=
 by the
+    <a href=3D#incumbent-settings-object>incumbent settings object=
</a>,
+    and the <code title=3Ddom-MessageEvent-ports><a href=3D#dom=
-messageevent-ports>ports</a></code> attribute must be ini=
tialized to the <var title=3D"">new ports</var> arr=
ay.
+    </p>
+    <!-- invariant: the global object is always a Window if the scrip=
t can see this method -->
+
+   </li>
+
+   <li>
+
+    <p><a href=3D#queue-a-task>Queue a task</a> to &lt=
;a href=3D#concept-event-dispatch title=3Dconcept-event-dispatch>dispa=
tch</a> the event
+    created in the previous step at the <code><a href=3D#window=
>Window</a></code> object on which the method was invoked.
+    The <a href=3D#task-source>task source</a> for this <=
a href=3D#concept-task title=3Dconcept-task>task</a> is the <=
a href=3D#posted-message-task-source>posted
+    message task source</a>.</p>
+
+   </li>
+
+  </ol></div>
+
+
+
+
+  <h3 id=3Dchannel-messaging><span class=3Dsecno>9.5 </sp=
an><dfn>Channel messaging</dfn></h3>
+
+  <h4 id=3Dintroduction-10><span class=3Dsecno>9.5.1 </sp=
an>Introduction</h4>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <p>To enable independent pieces of code (e.g. running in differe=
nt <a href=3D#browsing-context title=3D"browsing
+  context">browsing contexts</a>) to communicate directly,=
 authors can use <a href=3D#channel-messaging>channel
+  messaging</a>.</p>
+
+  <p>Communication channels in this mechanism are implemented as t=
wo-ways pipes, with a port at each
+  end. Messages sent in one port are delivered at the other port, and vi=
ce-versa. Messages are
+  asynchronous, and delivered as DOM events.</p>
+
+  <p>To create a connection (two "entangled" ports), the=
 <code title=3D"">MessageChannel()</code>
+  constructor is called:</p>
+
+  <pre>var channel =3D new MessageChannel();</pre>
+
+  <p>One of the ports is kept as the local port, and the other por=
t is sent to the remote code, e.g.
+  using <code title=3Ddom-window-postMessage><a href=3D#dom-win=
dow-postmessage>postMessage()</a></code>:</p>
+
+  <pre>otherWindow.postMessage('hello', 'http://example.com', [cha=
nnel.port2]);</pre>
+
+  <p>To send messages, the <code title=3Ddom-MessagePort-postMe=
ssage><a href=3D#dom-messageport-postmessage>postMessage()</a=
></code> method on
+  the port is used:</p>
+
+  <pre>channel.port1.postMessage('hello');</pre>
+
+  <p>To receive messages, one listens to <code title=3Devent-me=
ssage><a href=3D#event-message>message</a></code> ev=
ents:</p>
+
+  <pre>channel.port1.onmessage =3D handleMessage;
+function handleMessage(event) {
+  // message is in event.data
+  // ...
+}</pre>
+
+  <p>Data sent on a port can be structured data; for example here =
an array of strings is passed on a
+  <code><a href=3D#messageport>MessagePort</a></cod=
e>:</p>
+
+  <pre>port1.postMessage(['hello', 'world']);</pre>
+
+
+  <h5 id=3Dexamples-4><span class=3Dsecno>9.5.1.1 </span&=
gt;Examples</h5>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <div class=3Dexample>
+
+   <p>In this example, two JavaScript libraries are connected to e=
ach other using
+   <code><a href=3D#messageport>MessagePort</a></co=
de>s. This allows the libraries to later be hosted in different frames=
, or
+   in <code><a href=3D#worker>Worker</a></code> =
objects, without any change to the APIs.</p>
+
+   <pre><script src=3D"contacts.js">&l=
t;/script> <!-- exposes a contacts object -->
+<script src=3D"compose-mail.js"></script&=
amp;gt; <!-- exposes a composer object -->
+<script>
+ var channel =3D new MessageChannel();
+ composer.addContactsProvider(channel.port1);
+ contacts.registerConsumer(channel.port2);
+</script></pre>
+
+   <p>Here's what the "addContactsProvider()" function's=
 implementation could look like:</p>
+
+   <pre>function addContactsProvider(port) {
+  port.onmessage =3D function (event) {
+    switch (event.data.messageType) {
+      'search-result': handleSearchResult(event.data.results); break;
+      'search-done': handleSearchDone(); break;
+      'search-error': handleSearchError(event.data.message); break;
+      // ...
+    }
+  };
+};</pre>
+
+   <p>Alternatively, it could be implemented as follows:</p>
+
+   <pre>function addContactsProvider(port) {
+  port.addEventListener('message', function (event) {
+    if (event.data.messageType =3D=3D 'search-result')
+      handleSearchResult(event.data.results);
+  });
+  port.addEventListener('message', function (event) {
+    if (event.data.messageType =3D=3D 'search-done')
+      handleSearchDone();
+  });
+  port.addEventListener('message', function (event) {
+    if (event.data.messageType =3D=3D 'search-error')
+      handleSearchError(event.data.message);
+  });
+  // ...
+  port.start();
+};</pre>
+
+   <p>The key difference is that when using <code title=3Ddom-E=
ventTarget-addEventListener>addEventListener()</code>, the <c=
ode title=3Ddom-MessagePort-start><a href=3D#dom-messageport-start&=
gt;start()</a></code> method must also be invoked. When using=
 <code title=3Dhandler-MessagePort-onmessage><a href=3D#handler-=
messageport-onmessage>onmessage</a></code>, the call to &l=
t;code title=3Ddom-MessagePort-start><a href=3D#dom-messageport-sta=
rt>start()</a></code> is implied.</p>
+
+   <p>The <code title=3Ddom-MessagePort-start><a href=3D#=
dom-messageport-start>start()</a></code> method, whether c=
alled explicitly or
+   implicitly (by setting <code title=3Dhandler-MessagePort-onmessage=
><a href=3D#handler-messageport-onmessage>onmessage</a>&lt=
;/code>), starts the
+   flow of messages: messages posted on message ports are initially paus=
ed, so that they don't get
+   dropped on the floor before the script has had a chance to set up its=
 handlers.</p>
+
+  </div>
+
+
+  <h5 id=3Dports-as-the-basis-of-an-object-capability-model-on-the-we=
b><span class=3Dsecno>9.5.1.2 </span>Ports as the basis of=
 an object-capability model on the Web</h5>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <p>Ports can be viewed as a way to expose limited capabilities (=
in the object-capability model
+  sense) to other actors in the system. This can either be a weak capabi=
lity system, where the ports
+  are merely used as a convenient model within a particular origin, or a=
s a strong capability model,
+  where they are provided by one origin <var title=3D"">=
provider</var> as the only mechanism by which
+  another origin <var title=3D"">consumer</var> ca=
n effect change in or obtain information from <var title=3D"&quot=
;>provider</var>.</p>
+
+  <p>For example, consider a situation in which a social Web site =
embeds in one <code><a href=3D#the-iframe-element>iframe</=
a></code>
+  the user's e-mail contacts provider (an address book site, from a seco=
nd origin), and in a second
+  <code><a href=3D#the-iframe-element>iframe</a></c=
ode> a game (from a third origin). The outer social site and the game =
in the second
+  <code><a href=3D#the-iframe-element>iframe</a></c=
ode> cannot access anything inside the first <code><a href=3D=
#the-iframe-element>iframe</a></code>; together they can
+  only:</p>
+
+  <ul class=3Dbrief><li><a href=3D#navigate>Navigate&l=
t;/a> the <code><a href=3D#the-iframe-element>iframe</a=
></code> to a new <a href=3D#url>URL</a>, such as th=
e same
+   <a href=3D#url>URL</a> but with a different fragment iden=
tifier, causing the <code><a href=3D#window>Window</a>&=
lt;/code> in the
+   <code><a href=3D#the-iframe-element>iframe</a></=
code> to receive a <code title=3Devent-hashchange><a href=3D#=
event-hashchange>hashchange</a></code> event.</li>
+
+   <li>Resize the <code><a href=3D#the-iframe-element>=
iframe</a></code>, causing the <code><a href=3D#wind=
ow>Window</a></code> in the <code><a href=3D#the-=
iframe-element>iframe</a></code> to
+   receive a <code title=3Devent-resize>resize</code> event.=
</li>
+
+   <!-- anything else? -->
+
+   <li>Send a <code title=3Devent-message><a href=3D#even=
t-message>message</a></code> event to the <code><=
a href=3D#window>Window</a></code> in the
+   <code><a href=3D#the-iframe-element>iframe</a></=
code> using the <code title=3Ddom-window-postMessage><a href=3D=
#dom-window-postmessage>window.postMessage()</a></code>
+   API.</li>
+
+  </ul><p>The contacts provider can use these methods, most =
particularly the third one, to provide an API
+  that can be accessed by other origins to manipulate the user's address=
 book. For example, it could
+  respond to a message "<code title=3D"">add-contac=
t Guillaume Tell
+  <tell at pomme.example.net></code>" by adding th=
e given person and e-mail address to the user's
+  address book.</p>
+
+  <p>To avoid any site on the Web being able to manipulate the use=
r's contacts, the contacts
+  provider might only allow certain trusted sites, such as the social si=
te, to do this.</p>
+
+  <p>Now suppose the game wanted to add a contact to the user's ad=
dress book, and that the social
+  site was willing to allow it to do so on its behalf, essentially &quot=
;sharing" the trust that the
+  contacts provider had with the social site. There are several ways it =
could do this; most simply,
+  it could just proxy messages between the game site and the contacts si=
te. However, this solution
+  has a number of difficulties: it requires the social site to either co=
mpletely trust the game site
+  not to abuse the privilege, or it requires that the social site verify=
 each request to make sure
+  it's not a request that it doesn't want to allow (such as adding multi=
ple contacts, reading the
+  contacts, or deleting them); it also requires some additional complexi=
ty if there's ever the
+  possibility of multiple games simultaneously trying to interact with t=
he contacts provider.</p>
+
+  <p>Using message channels and <code><a href=3D#messagep=
ort>MessagePort</a></code> objects, however, all of these =
problems can
+  go away. When the game tells the social site that it wants to add a co=
ntact, the social site can
+  ask the contacts provider not for it to add a contact, but for the &lt=
;em>capability</em> to add a
+  single contact. The contacts provider then creates a pair of <code&=
gt;<a href=3D#messageport>MessagePort</a></code> object=
s, and
+  sends one of them back to the social site, who forwards it on to the g=
ame. The game and the
+  contacts provider then have a direct connection, and the contacts prov=
ider knows to only honor a
+  single "add contact" request, nothing else. In other words, =
the game has been granted the
+  capability to add a single contact.</p>
+
+
+  <h5 id=3Dports-as-the-basis-of-abstracting-out-service-implementati=
ons><span class=3Dsecno>9.5.1.3 </span>Ports as the basis =
of abstracting out service implementations</h5>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <p>Continuing the example from the previous section, consider th=
e contacts provider in particular.
+  While an initial implementation might have simply used <code>XML=
HttpRequest</code> objects in the
+  service's <code><a href=3D#the-iframe-element>iframe</a=
></code>, an evolution of the service might instead want to use =
a <a href=3D#sharedworker title=3DSharedWorker>shared worker</a&=
gt; with a single <code><a href=3D#websocket>WebSocket</a&=
gt;</code> connection.</p>
+
+  <p>If the initial design used <code><a href=3D#messagep=
ort>MessagePort</a></code> objects to grant capabilities, =
or even just
+  to allow multiple simultaneous independent sessions, the service imple=
mentation can switch from
+  the <code>XMLHttpRequest</code>s-in-each-<code><a=
 href=3D#the-iframe-element>iframe</a></code> model to the
+  shared-<code><a href=3D#websocket>WebSocket</a></=
code> model without changing the API at all: the ports on the service
+  provider side can all be forwarded to the shared worker without it aff=
ecting the users of the API
+  in the slightest.</p>
+
+
+
+  <h4 id=3Dmessage-channels><span class=3Dsecno>9.5.2 </s=
pan>Message channels</h4>
+
+  <pre class=3Didl>[<a href=3D#dom-messagechannel title=3Ddom-M=
essageChannel>Constructor</a>]
+interface <dfn id=3Dmessagechannel>MessageChannel</dfn> {
+  readonly attribute <a href=3D#messageport>MessagePort</a> =
<a href=3D#dom-channel-port1 title=3Ddom-channel-port1>port1</a&=
gt;;
+  readonly attribute <a href=3D#messageport>MessagePort</a> =
<a href=3D#dom-channel-port2 title=3Ddom-channel-port2>port2</a&=
gt;;
+};</pre>
+
+  <dl class=3Ddomintro><dt><var title=3D"">c=
hannel</var> =3D new <code title=3Ddom-MessageChannel><a h=
ref=3D#dom-messagechannel>MessageChannel</a></code>()</=
dt>
+
+   <dd>
+
+    <p>Returns a new <code><a href=3D#messagechannel>M=
essageChannel</a></code> object with two new <code><=
a href=3D#messageport>MessagePort</a></code> objects.</=
p>
+
+   </dd>
+
+   <dt><var title=3D"">channel</var> . <c=
ode title=3Ddom-MessageChannel-port1>port1</code></dt>
+
+   <dd>
+
+    <p>Returns the first <code><a href=3D#messageport>=
MessagePort</a></code> object.</p>
+
+   </dd>
+
+   <dt><var title=3D"">channel</var> . <c=
ode title=3Ddom-MessageChannel-port2>port2</code></dt>
+
+   <dd>
+
+    <p>Returns the second <code><a href=3D#messageport&gt=
;MessagePort</a></code> object.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>When the <dfn id=3Ddom-messagechannel title=3Ddom-MessageC=
hannel><code>MessageChannel()</code></dfn> construct=
or is
+  called, it must run the following algorithm:</p>
+
+  <ol><!--CLEANUP--><li><p><a href=3D#create-=
a-new-messageport-object>Create a new <code>MessagePort</code=
> object</a> whose <a href=3D#concept-port-owner title=3Dconc=
ept-port-owner>owner</a>
+   is the <a href=3D#incumbent-settings-object>incumbent settings =
object</a>, and let <var title=3D"">port1</var&g=
t; be that object.</li>
+
+<!--CLEANUP-->
+   <li><p><a href=3D#create-a-new-messageport-object>C=
reate a new <code>MessagePort</code> object</a> whose &=
lt;a href=3D#concept-port-owner title=3Dconcept-port-owner>owner</a=
>
+   is the <a href=3D#incumbent-settings-object>incumbent settings =
object</a>, and let <var title=3D"">port2</var&g=
t; be that object.</li>
+
+   <li><p><a href=3D#entangle>Entangle</a> the &=
lt;var title=3D"">port1</var> and <var title=3D&quo=
t;">port2</var>
+   objects.</li>
+
+   <li><p>Instantiate a new <code><a href=3D#messag=
echannel>MessageChannel</a></code> object, and let <var=
 title=3D"">channel</var>
+   be that object.</li>
+
+   <li><p>Let the <code title=3Ddom-channel-port1><=
a href=3D#dom-channel-port1>port1</a></code> attribute of =
the <var title=3D"">channel</var> object be <var=
 title=3D"">port1</var>.</p>
+
+   <li><p>Let the <code title=3Ddom-channel-port2><=
a href=3D#dom-channel-port2>port2</a></code> attribute of =
the <var title=3D"">channel</var> object be <var=
 title=3D"">port2</var>.</p>
+
+   <li><p>Return <var title=3D"">channel<=
/var>.</li>
+
+  </ol><p>The <dfn id=3Ddom-channel-port1 title=3Ddom-cha=
nnel-port1><code>port1</code></dfn> and <dfn id=3D=
dom-channel-port2 title=3Ddom-channel-port2><code>port2</code=
></dfn> attributes must return the values they were
+  assigned when the <code><a href=3D#messagechannel>MessageC=
hannel</a></code> object was created.</p>
+
+  </div>
+
+
+
+  <h4 id=3Dmessage-ports><span class=3Dsecno>9.5.3 </span=
>Message ports</h4>
+
+  <p>Each channel has two message ports. Data sent through one por=
t is received by the other port,
+  and vice versa.</p>
+
+  <pre class=3Didl>interface <dfn id=3Dmessageport>MessagePo=
rt</dfn> : <a href=3D#eventtarget>EventTarget</a> {
+<!-- v2-onclose  readonly attribute boolean <span title=3D"do=
m-MessagePort-active">active</span>;
+-->  void <a href=3D#dom-messageport-postmessage title=3Ddom-Messa=
gePort-postMessage>postMessage</a>(any message, optional sequenc=
e<<a href=3D#transferable>Transferable</a>> tra=
nsfer);<!--
+  <span>MessagePort</span> <span title=3D"dom-Messag=
ePort-startConversation">startConversation</span>(any messa=
ge);-->
+  void <a href=3D#dom-messageport-start title=3Ddom-MessagePort-start=
>start</a>();
+  void <a href=3D#dom-messageport-close title=3Ddom-MessagePort-close=
>close</a>();
+
+  // event handlers
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-messageport-onmessage title=3Dhandler-MessagePort=
-onmessage>onmessage</a>;
+};
+// <a href=3D#messageport>MessagePort</a> implements <a h=
ref=3D#transferable>Transferable</a>;</pre>
+
+  <dl class=3Ddomintro><!-- v2-onclose
+   <dt><var title=3D"">port</var> . <code=
 title=3D"dom-MessagePort-active">active</code></dt=
>
+
+   <dd>
+
+    <p>Returns true if the port is still active; otherwise, return=
s false.</p>
+
+   </dd>
+--><dt><var title=3D"">port</var> . <c=
ode title=3Ddom-MessagePort-postMessage><a href=3D#dom-messageport-=
postmessage>postMessage</a></code>(<var title=3D"&=
quot;>message</var> [, <var title=3D"">transfer&=
lt;/var>] )</dt>
+
+   <dd>
+
+    <p>Posts a message through the channel. Objects listed in <=
var title=3D"">transfer</var> are
+    transferred, not just cloned, meaning that they are no longer usable=
 on the sending side.</p>
+
+    <p>Throws a <code><a href=3D#datacloneerror>DataCl=
oneError</a></code> exception if <var title=3D""=
>transfer</var> array contains
+    duplicate objects or the source or target ports, or if <var title=
=3D"">message</var> could not be
+    cloned.</p>
+
+   </dd>
+
+   <dt><var title=3D"">port</var> . <code=
 title=3Ddom-MessagePort-start><a href=3D#dom-messageport-start>=
start</a></code>()</dt>
+
+   <dd>
+
+    <p>Begins dispatching messages received on the port.</p>
+
+   </dd>
+
+   <dt><var title=3D"">port</var> . <code=
 title=3Ddom-MessagePort-close><a href=3D#dom-messageport-close>=
close</a></code>()</dt>
+
+   <dd>
+
+    <p>Disconnects the port, so that it is no longer active.</p=
>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>Each <code><a href=3D#messageport>MessagePort<=
/a></code> object can be entangled with another (a symmetric rel=
ationship).
+  Each <code><a href=3D#messageport>MessagePort</a>&lt=
;/code> object also has a <a href=3D#task-source>task source<=
/a> called the <dfn id=3Dport-message-queue>port
+  message queue</dfn>, initially empty. A <a href=3D#port-messa=
ge-queue>port message queue</a> can be enabled or
+  disabled, and is initially disabled. Once enabled, a port can never be=
 disabled again (though
+  messages in the queue can get moved to another queue or removed altoge=
ther, which has much the
+  same effect). A <code><a href=3D#messageport>MessagePort&l=
t;/a></code> also has a <dfn id=3Dhas-been-shipped>has bee=
n shipped</dfn> flag, which must
+  initially be false, and an <dfn id=3Dconcept-port-owner title=3Dcon=
cept-port-owner>owner</dfn>, which is a <a href=3D#settings-o=
bject>settings
+  object</a> set when the object is created, as described below.&l=
t;/p>
+
+<!--CLEANUP-->
+  <p>When a port's <a href=3D#port-message-queue>port messag=
e queue</a> is enabled, the <a href=3D#event-loop>event loop&=
lt;/a> must use
+  it as one of its <a href=3D#task-source title=3D"task source&q=
uot;>task sources</a>. All <a href=3D#concept-task title=3Dco=
ncept-task>tasks</a> <a href=3D#queue-a-task title=3D"qu=
eue a task">queued</a> on the <a href=3D#port-message-qu=
eue>port
+  message queue</a> must be associated with the <a href=3D#resp=
onsible-document>responsible document</a> specified by
+  the port's <a href=3D#concept-port-owner title=3Dconcept-port-owner=
>owner</a>.</p>
+
+<!--CLEANUP-->
+  <p class=3Dnote>If the port's <a href=3D#concept-port-owner t=
itle=3Dconcept-port-owner>owner</a> specifies a <a href=3D#re=
sponsible-document>responsible document</a> that is <a href=3D=
#fully-active>fully active</a>,
+  but the event listeners all have scripts whose <a href=3D#settings-=
object title=3D"settings object">settings objects</a>
+  specify <a href=3D#responsible-document title=3D"responsible d=
ocument">responsible documents</a> that are <em>not&l=
t;/em> <a href=3D#fully-active>fully active</a>, then the =
messages will be
+  lost.</p> <!-- because of the jump-to-entry-point algorithm f=
irst step -->
+
+<!--CLEANUP-->
+  <p>Each <a href=3D#event-loop>event loop</a> has a &=
lt;a href=3D#task-source>task source</a> called the <dfn id=3D=
unshipped-port-message-queue>unshipped port
+  message queue</dfn>. This is a virtual <a href=3D#task-source=
>task source</a>: it must act as if it contained
+  the <a href=3D#concept-task title=3Dconcept-task>tasks</a>=
 of each <a href=3D#port-message-queue>port message queue</a>=
 of each
+  <code><a href=3D#messageport>MessagePort</a></cod=
e> whose <a href=3D#has-been-shipped>has been shipped</a> =
flag is false, whose <a href=3D#port-message-queue>port
+  message queue</a> is enabled, and whose <a href=3D#concept-po=
rt-owner title=3Dconcept-port-owner>owner</a>
+  specifies that <a href=3D#event-loop>event loop</a> as the=
 <a href=3D#responsible-event-loop>responsible event loop</a>=
,
+  in the order in which they were added to their respective
+  <a href=3D#task-source>task source</a>. When a <a href=3D=
#concept-task title=3Dconcept-task>task</a> would be removed fro=
m the
+  <a href=3D#unshipped-port-message-queue>unshipped port message q=
ueue</a>, it must instead be removed from its <a href=3D#port-me=
ssage-queue>port message
+  queue</a>.</p>
+
+  <p>When a <code><a href=3D#messageport>MessagePort&l=
t;/a></code>'s <a href=3D#has-been-shipped>has been shippe=
d</a> flag is false, its <a href=3D#port-message-queue>port
+  message queue</a> must be ignored for the purposes of the <a =
href=3D#event-loop>event loop</a>. (The
+  <a href=3D#unshipped-port-message-queue>unshipped port message q=
ueue</a> is used instead.)</p>
+
+  <p class=3Dnote>The <a href=3D#has-been-shipped>has been s=
hipped</a> flag is set to true when a port, its twin, or
+  the object it was cloned from, is or has been <a href=3D#transfer-a=
-transferable-object title=3D"transfer a transferable
+  object">transferred</a>. When a <code><a href=3D=
#messageport>MessagePort</a></code>'s <a href=3D#has-be=
en-shipped>has been shipped</a> flag
+  is true, its <a href=3D#port-message-queue>port message queue&lt=
;/a> acts as a first-class <a href=3D#task-source>task source&lt=
;/a>,
+  unaffected to any <a href=3D#unshipped-port-message-queue>unship=
ped port message queue</a>.</p>
+
+<!--CLEANUP-->
+  <p>When the user agent is to <dfn id=3Dcreate-a-new-messagepo=
rt-object>create a new <code>MessagePort</code> object<=
/dfn> with a particular
+  <a href=3D#settings-object>settings object</a> as its <=
var title=3D"">owner</var>, it must instantiate a new
+  <code><a href=3D#messageport>MessagePort</a></cod=
e> object, and let its <a href=3D#concept-port-owner title=3Dconcep=
t-port-owner>owner</a> be <var title=3D"">owner&=
lt;/var>.</p>
+
+  <p>When the user agent is to <dfn id=3Dentangle>entangle&l=
t;/dfn> two <code><a href=3D#messageport>MessagePort</a=
></code> objects, it must run
+  the following steps:</p>
+
+  <ol><li>
+
+    <p>If one of the ports is already entangled, then disentangle =
it and the port that it was
+    entangled with.</p>
+
+    <p class=3Dnote>If those two previously entangled ports were t=
he two ports of a
+    <code><a href=3D#messagechannel>MessageChannel</a>=
</code> object, then that <code><a href=3D#messagechannel&=
gt;MessageChannel</a></code> object no longer
+    represents an actual channel: the two ports in that object are no lo=
nger entangled.</p>
+
+   </li>
+
+   <li>
+
+    <p>Associate the two ports to be entangled, so that they form =
the two parts of a new channel.
+    (There is no <code><a href=3D#messagechannel>MessageChan=
nel</a></code> object that represents this channel.)</p&gt=
;
+
+    <p>Two ports <var title=3D"">A</var> and=
 <var title=3D"">B</var> that have gone through thi=
s step
+    are now said to be entangled; one is entangled to the other, and vic=
e versa.</p>
+
+    <p class=3Dnote>While this specification describes this proces=
s as instantaneous,
+    implementations are more likely to implement it via message passing.=
 As with all algorithms, the
+    key is "merely" that the end result be indistinguishable, =
in a black-box sense, from the
+    specification.</p>
+
+   </li>
+
+  </ol><p>When the user agent is to <dfn id=3Dclone-a-por=
t>clone a port</dfn> <var title=3D"">original po=
rt</var>, with the
+  clone being owned by <var title=3D"">owner</var>=
, it must run the following steps, which return a
+  new <code><a href=3D#messageport>MessagePort</a><=
/code> object. These steps must be run atomically.</p>
+
+  <ol><li><p>Set <var title=3D"">origi=
nal port</var>'s <a href=3D#has-been-shipped>has been shipped=
</a> flag to
+   true.</li>
+
+   <li><p><a href=3D#create-a-new-messageport-object>C=
reate a new <code>MessagePort</code> object</a> whose &=
lt;a href=3D#concept-port-owner title=3Dconcept-port-owner>owner</a=
> is <var title=3D"">owner</var>, and let <va=
r title=3D"">new port</var> be that object.</li>
+
+   <li><p>Set <var title=3D"">new port</v=
ar>'s <a href=3D#has-been-shipped>has been shipped</a> fla=
g to true.</li>
+
+   <li><p>Move all the events in the <a href=3D#port-mess=
age-queue>port message queue</a> of <var title=3D""=
>original
+   port</var> to the <a href=3D#port-message-queue>port mess=
age queue</a> of <var title=3D"">new port</var&g=
t;, if any,
+   leaving the <var title=3D"">new port</var>'s &l=
t;a href=3D#port-message-queue>port message queue</a> in its ini=
tial
+   disabled state.</li>
+
+   <li>
+
+    <p>If the <var title=3D"">original port</va=
r> is entangled with another port, then run these
+    substeps:</p>
+
+    <ol><li><p>Let the <var title=3D""&gt=
;remote port</var> be the port with which the <var title=3D&quot=
;">original port</var> is entangled.</li>
+
+     <li><p>Set <var title=3D"">remote port&=
lt;/var>'s <a href=3D#has-been-shipped>has been shipped</a&gt=
; flag to
+     true.</li>
+
+     <li><p><a href=3D#entangle>Entangle</a> the=
 <var title=3D"">remote port</var> and <var titl=
e=3D"">new
+     port</var> objects. The <var title=3D"">origi=
nal port</var> object will be disentangled by this
+     process.</li>
+
+    </ol></li>
+
+   <li><p>Return <var title=3D"">new port&lt=
;/var>. It is the clone.</li>
+
+  </ol><p id=3DtransferMessagePort>To <a href=3D#transfer=
-a-transferable-object title=3D"transfer a Transferable object"=
>transfer</a> a
+  <code><a href=3D#messageport>MessagePort</a></cod=
e> object <var title=3D"">old</var> to a new own=
er <var title=3D"">owner</var>,
+  a user agent must <a href=3D#clone-a-port title=3D"clone a por=
t">clone</a> the <var title=3D"">old</va=
r> object with
+  the clone being owned by <var title=3D"">owner</var=
>, thus obtaining <var title=3D"">new</var>, mus=
t
+  <a href=3D#concept-transferable-neutered title=3Dconcept-Transferab=
le-neutered>neuter</a> the <var title=3D"">old&l=
t;/var> port, and
+  must finally return <var title=3D"">new</var>.&l=
t;/p>
+
+  <hr><!-- v2-onclose
+  <p>The <dfn title=3D"dom-MessagePort-active">&lt=
;code>active</code></dfn> attribute must return true if
+  the port is entangled, and false otherwise.</p>
+
+  <hr>
+--><p>The <dfn id=3Ddom-messageport-postmessage title=3Ddom-=
MessagePort-postMessage><code>postMessage()</code></dfn=
> method, when
+  called on a port <var title=3D"">source port</var&g=
t;, must cause the user agent to run the following
+  steps:</p>
+
+  <ol><!-- a lot of this is similar or identical to window.post=
Message --><li><p>Let <var title=3D"">targ=
et port</var> be the port with which <var title=3D""&g=
t;source port</var>
+   is entangled, if any.</li>
+
+   <li>
+
+    <p>Let <var title=3D"">new ports</var> b=
e an empty array.</p>
+
+   </li>
+
+   <li>
+
+    <p>Let <var title=3D"">transfer map</var&gt=
; be an empty association list of
+    <code><a href=3D#transferable>Transferable</a><=
/code> objects to placeholder objects.</p>
+
+   </li>
+
+   <li>
+
+    <p>If the method was invoked with a second argument <var ti=
tle=3D"">transfer</var>, run these
+    substeps:</p>
+
+    <ol><li>
+
+      <p>If any object is listed in <var title=3D""&g=
t;transfer</var> more than once, or any of the
+      <code><a href=3D#transferable>Transferable</a>&l=
t;/code> objects listed in <var title=3D"">transfer&lt=
;/var> are marked as <a href=3D#concept-transferable-neutered title=
=3Dconcept-Transferable-neutered>neutered</a>, then throw a
+      <code><a href=3D#datacloneerror>DataCloneError</a&g=
t;</code> exception and abort these steps.</p>
+
+     </li>
+
+     <li>
+
+      <p>If any of the objects in <var title=3D"">=
transfer</var> are either the <var title=3D"">sourc=
e
+      port</var> or the <var title=3D"">target por=
t</var> (if any), then throw a
+      <code><a href=3D#datacloneerror>DataCloneError</a&g=
t;</code> exception and abort these steps.</p>
+
+     </li>
+
+     <li>
+
+      <p>For each object <var title=3D"">x</var=
> in <var title=3D"">transfer</var> in turn, add=
 a
+      mapping from <var title=3D"">x</var> to a ne=
w unique placeholder object created for <var title=3D"">x=
</var> to <var title=3D"">transfer map</var>,=
 and if <var title=3D"">x</var> is a
+      <code><a href=3D#messageport>MessagePort</a><=
/code> object, also append the placeholder object to the <var title=
=3D"">new
+      ports</var> array.</p>
+
+     </li>
+
+    </ol></li>
+
+   <li>
+
+    <p>Let <var title=3D"">message clone</var&g=
t; be the result of obtaining a <a href=3D#structured-clone>structu=
red
+    clone</a> of the <var title=3D"">message</v=
ar> argument, with <var title=3D"">transfer map</va=
r>
+    as the <i>transfer map</i>. If this throws an exception,=
 then throw that exception and abort
+    these steps.</p>
+
+   </li>
+
+   <li>
+
+    <p>If the method was invoked with a second argument <var ti=
tle=3D"">transfer</var>, run these
+    substeps:</p>
+
+    <ol><li>
+
+<!--CLEANUP-->
+      <p>Let <var title=3D"">new owner</var>=
 be the <a href=3D#concept-port-owner title=3Dconcept-port-owner>ow=
ner</a> of <var title=3D"">target port</var>,=
 if there
+      is a <var title=3D"">target port</var>, or e=
lse some arbitrary owner. (This <var title=3D"">new
+      owner</var> is used when transferring objects below. If ther=
e is no <var title=3D"">target
+      port</var>, the <code><a href=3D#transferable>Tr=
ansferable</a></code> objects given in the second argument, i=
f any, are
+      still <a href=3D#transfer-a-transferable-object title=3D"t=
ransfer a Transferable object">transferred</a>, but since t=
hey are then
+      discarded, it doesn't matter where they are transferred to.)</p=
>
+
+     </li>
+
+
+     <li>
+
+      <p>For each object <var title=3D"">x</var=
> in <var title=3D"">transfer</var> in turn, obt=
ain a new
+      object <var title=3D"">y</var> by <a href=
=3D#transfer-a-transferable-object title=3D"transfer a Transferable
+      object">transferring</a> the object <var title=3D=
"">x</var> to <var title=3D"">new owne=
r</var>,
+      and replace the placeholder object that was created for the object=
 <var title=3D"">x</var> by
+      the new object <var title=3D"">y</var> where=
ver the placeholder exists (i.e. in <var title=3D"">messa=
ge clone</var> and in <var title=3D"">new ports<=
/var>).</p>
+
+     </li>
+
+    </ol></li>
+
+   <li>
+
+    <p>Make <var title=3D"">new ports</var> =
into a <a href=3D#dfn-read-only-array title=3Ddfn-read-only-array>r=
ead only</a>
+    array.</p>
+
+   </li>
+
+   <li><p>If there is no <var title=3D"">tar=
get port</var> (i.e. if <var title=3D"">source port=
</var> is
+   not entangled), then abort these steps.</li> <!-- we don't t=
hrow an exception if there is no
+   target port because this can happen at a moment's notice. we don't re=
turn false because if the
+   port is _about_ to be closed, the message might not be listened for a=
nyway. we don't do this
+   before the steps above because otherwise you can tell the difference =
(in whether the ports have
+   become useless, or in when the structured clone algorithm runs script=
s -->
+
+   <li><p>Create an event that uses the <code><a hr=
ef=3D#messageevent>MessageEvent</a></code> interface, with=
 the name <code title=3Devent-message><a href=3D#event-message&g=
t;message</a></code>, which does not bubble, is not cancelabl=
e, and has no
+   default action.
+   </li>
+
+   <li><p>Let the <code title=3Ddom-MessageEvent-data>=
<a href=3D#dom-messageevent-data>data</a></code> attrib=
ute of the event be
+   initialized to the value of <var title=3D"">message c=
lone</var>.</li>
+
+   <li><p>Let the <code title=3Ddom-MessageEvent-ports&gt=
;<a href=3D#dom-messageevent-ports>ports</a></code> att=
ribute of the event be
+   initialized to the <var title=3D"">new ports</var&=
gt; array.</li>
+
+   <li><p>Add the event to the <a href=3D#port-message-qu=
eue>port message queue</a> of <var title=3D"">ta=
rget
+   port</var>.</li>
+
+  </ol><!--
+  <hr>
+
+  <p>The <dfn title=3D"dom-MessagePort-startConversation&q=
uot;><code>startConversation(<var
+  title=3D"">message</var>)</code></dfn> =
method is a convenience method that simplifies create a new
+  <code>MessageChannel</code> and invoking <code
+  title=3D"dom-MessagePort-postMessage">postMessage()</c=
ode> with one of the new ports. When invoked
+  on a port <var title=3D"">source port</var>, it =
must run the following steps:</p>
+
+  <ol>
+
+   <li><p>Let <var title=3D"">message</va=
r> be the method's first argument.</p></li>
+
+   <li><p><span>Create a new <code>MessagePort&l=
t;/code> object</span> whose <span
+   title=3D"concept-port-owner">owner</span> is the &=
lt;span>incumbent settings
+   object</span>, and let <var title=3D"">port1&lt=
;/var> be that object.</p></li>
+
+   <li><p>If the <var title=3D"">source port=
</var> is not entangled with another port, then return
+   <var title=3D"">port1</var> and abort these ste=
ps.</p></li> <!- - we don't throw an exception
+   because this can happen moment's notice. we don't return null because=
 then we'd end up with null
+   derefs. better to just let the likely next postMessage call fall on t=
he floor. - ->
+
+   <li><p>Let <var title=3D"">target port&lt=
;/var> be the port with which <var title=3D"">source p=
ort</var>
+   is entangled.</p></li>
+
+   <li><p><span>Create a new <code>MessagePort&l=
t;/code> object</span> whose <span
+   title=3D"concept-port-owner">owner</span> is the &=
lt;span title=3D"concept-port-owner">owner</span> of
+   the <var title=3D"">target port</var>, and let =
<var title=3D"">port2</var> be that object.</p&g=
t;</li>
+
+   <li><p><span>Entangle</span> the <var titl=
e=3D"">port1</var> and <var title=3D""&gt=
;port2</var>
+   objects.</p></li>
+
+   <li><p>Create an event that uses the <code>MessageE=
vent</code> interface, with the name <code
+   title=3D"event-message">message</code>, which does=
 not bubble, is not cancelable, and has no
+   default action.
+   </p></li>
+
+   <li><p>Let the <code title=3D"dom-MessageEvent-da=
ta">data</code> attribute of the event be
+   initialized to the value of <var title=3D"">message&l=
t;/var>, the method's first argument.</p></li>
+
+   <li><p>Let the <code title=3D"dom-MessageEvent-po=
rts">ports</code> attribute of the event be
+   initialized to a <span title=3D"dfn-read-only-array">=
read only</span> array containing only <var
+   title=3D"">port2</var>.</p></li>
+
+   <li><p>Return <var title=3D"">port1</v=
ar> from the method, but continue with these steps.</p></li&g=
t;
+
+   <li><p>Add the event to the <span>port message queu=
e</span> of <var title=3D"">target
+   port</var>.</p></li>
+
+  </ol>
+--><hr><p>The <dfn id=3Ddom-messageport-start title=3D=
dom-MessagePort-start><code>start()</code></dfn> met=
hod must enable its port's
+  <a href=3D#port-message-queue>port message queue</a>, if i=
t is not already enabled.</p>
+
+  <hr><p>The <dfn id=3Ddom-messageport-close title=3Ddom-=
MessagePort-close><code>close()</code></dfn> method,=
 when called on a port
+  <var title=3D"">local port</var> that is entangl=
ed with another port, must cause the user agent to
+  disentangle the two ports. If the method is called on a port that is n=
ot entangled, then the
+  method must do nothing.</p>
+
+  <hr><p>The following are the <a href=3D#event-handlers&=
gt;event handlers</a> (and their corresponding <a href=3D#event-=
handler-event-type title=3D"event
+  handler event type">event handler event types</a>) that =
must be supported, as <a href=3D#event-handler-idl-attributes>event
+  handler IDL attributes</a>, by all objects implementing the <=
code><a href=3D#messageport>MessagePort</a></code>
+  interface:</p>
+
+  <table><thead><tr><th><a href=3D#event-hand=
lers title=3D"event handlers">Event handler</a> <th=
><a href=3D#event-handler-event-type>Event handler event type&lt=
;/a>
+   <tbody><tr><td><dfn id=3Dhandler-messageport-onm=
essage title=3Dhandler-MessagePort-onmessage><code>onmessage<=
/code></dfn> <td> <code title=3Devent-message><a =
href=3D#event-message>message</a></code>
+  </table><p>The first time a <code><a href=3D#mess=
ageport>MessagePort</a></code> object's <code title=3Dh=
andler-MessagePort-onmessage><a href=3D#handler-messageport-onmessa=
ge>onmessage</a></code> IDL attribute is set, the port's &=
lt;a href=3D#port-message-queue>port
+  message queue</a> must be enabled, as if the <code title=3Ddo=
m-MessagePort-start><a href=3D#dom-messageport-start>start()<=
/a></code>
+  method had been called.</p>
+
+  </div>
+
+
+  <h4 id=3Dbroadcasting-to-many-ports><span class=3Dsecno>9.=
5.4 </span>Broadcasting to many ports</h4>
+
+  <p class=3Dcritical>The API described in this section is controv=
ersial, as, in an attempt to solve
+  an architectural memory leak, it instead exposes the details of Garbag=
e Collection. This is a
+  lose-lose scenario. A better solution is really needed here.</p>
+
+  <p>Broadcasting to many ports is in principle relatively simple:=
 keep an array of
+  <code><a href=3D#messageport>MessagePort</a></cod=
e> objects to send messages to, and iterate through the array to send =
a
+  message. However, this has one rather unfortunate effect: it prevents =
the ports from being garbage
+  collected, even if the other side has gone away.</p>
+
+  <p>To avoid this problem, the <code><a href=3D#portcoll=
ection>PortCollection</a></code> object can be used. It ac=
ts as an opaque
+  array of <code><a href=3D#messageport>MessagePort</a&gt=
;</code> objects, thus allowing the objects to be garbage collected=
 when
+  they stop being relevant, while still allowing scripts to iterate over=
 the
+  <code><a href=3D#messageport>MessagePort</a></cod=
e> objects.</p>
+
+  <pre class=3Didl>[<a href=3D#dom-portcollection title=3Ddom-P=
ortCollection>Constructor</a>] interface <dfn id=3Dportcollec=
tion>PortCollection</dfn> {
+  void <a href=3D#dom-portcollection-add title=3Ddom-PortCollection-a=
dd>add</a>(<a href=3D#messageport>MessagePort</a> po=
rt);
+  void <a href=3D#dom-portcollection-remove title=3Ddom-PortCollectio=
n-remove>remove</a>(<a href=3D#messageport>MessagePort<=
/a> port);
+  void <a href=3D#dom-portcollection-clear title=3Ddom-PortCollection=
-clear>clear</a>();
+  void <a href=3D#dom-portcollection-iterate title=3Ddom-PortCollecti=
on-iterate>iterate</a>(<a href=3D#portcollectioncallback>P=
ortCollectionCallback</a> callback);
+};
+
+callback <dfn id=3Dportcollectioncallback>PortCollectionCallback&l=
t;/dfn> =3D void (<a href=3D#messageport>MessagePort</a> p=
ort);</pre>
+
+  <dl class=3Ddomintro><dt><var title=3D"">p=
ortCollection</var> =3D new <code title=3Ddom-PortCollection>=
<a href=3D#dom-portcollection>PortCollection</a></code>=
()</dt>
+
+   <dd>
+
+    <p>Returns a new empty <code><a href=3D#portcollectio=
n>PortCollection</a></code> object.</p>
+
+   </dd>
+
+   <dt><var title=3D"">portCollection</var> =
. <code title=3Ddom-PortCollection-add><a href=3D#dom-portcollec=
tion-add>add</a></code>(<var title=3D"">po=
rt</var>)</dt>
+
+   <dd>
+
+    <p>Adds <var title=3D"">port</var> to th=
e collection, if it isn't already present.</p>
+
+   </dd>
+
+   <dt><var title=3D"">portCollection</var> =
. <code title=3Ddom-PortCollection-remove><a href=3D#dom-portcol=
lection-remove>remove</a></code>(<var title=3D"&qu=
ot;>port</var>)</dt>
+
+   <dd>
+
+    <p>Removes <var title=3D"">port</var> fr=
om the collection, if it is present.</p>
+
+   </dd>
+
+   <dt><var title=3D"">portCollection</var> =
. <code title=3Ddom-PortCollection-clear><a href=3D#dom-portcoll=
ection-clear>clear</a></code>()</dt>
+
+   <dd>
+
+    <p>Removes all ports from the collection.</p>
+
+   </dd>
+
+   <dt><var title=3D"">portCollection</var> =
. <code title=3Ddom-PortCollection-iterate><a href=3D#dom-portco=
llection-iterate>iterate</a></code>(<var title=3D"=
">callback</var>)</dt>
+
+   <dd>
+
+    <p>Calls <var title=3D"">callback</var> =
for each port in the collection.</p>
+
+   </dd>
+
+  </dl><div class=3Dimpl>
+
+  <p>A <code><a href=3D#portcollection>PortCollection&=
lt;/a></code> object has an initially empty <dfn id=3Dconcept=
-portcollection-list title=3Dconcept-PortCollection-list>list of ports=
</dfn>. When a <code><a href=3D#messageport>MessagePort=
</a></code> object in
+  a <a href=3D#concept-portcollection-list title=3Dconcept-PortCollec=
tion-list>list of ports</a> is garbage collected, it must be
+  silently removed from that <a href=3D#concept-portcollection-list t=
itle=3Dconcept-PortCollection-list>list of ports</a>. Objects
+  in a <a href=3D#concept-portcollection-list title=3Dconcept-PortCol=
lection-list>list of ports</a> are ordered chronologically by
+  the time at which they were most recently added; the least-recently ad=
ded <code><a href=3D#messageport>MessagePort</a></co=
de>
+  object is the first in the list, and the most-recently added <code&=
gt;<a href=3D#messageport>MessagePort</a></code> is the=
 last
+  in the list.</p>
+
+  <p>The <dfn id=3Ddom-portcollection title=3Ddom-PortCollectio=
n><code>PortCollection()</code></dfn> constructor mu=
st return
+  a new <code><a href=3D#portcollection>PortCollection</a=
></code> object (with an empty <a href=3D#concept-portcollect=
ion-list title=3Dconcept-PortCollection-list>list of ports</a>).=
</p>
+
+  <p>The <dfn id=3Ddom-portcollection-add title=3Ddom-PortColle=
ction-add><code>add()</code></dfn> method must add t=
he
+  <code><a href=3D#messageport>MessagePort</a></cod=
e> given by the argument to the <code><a href=3D#portcollecti=
on>PortCollection</a></code> object's <a href=3D#concep=
t-portcollection-list title=3Dconcept-PortCollection-list>list of port=
s</a>, unless the <code><a href=3D#messageport>MessageP=
ort</a></code> is
+  already in the <a href=3D#concept-portcollection-list title=3Dconce=
pt-PortCollection-list>list of ports</a>, in which case the
+  method does nothing. (Calling this method with a port already in the l=
ist does not move the port
+  to the end of the list.)</p>
+
+  <p>The <dfn id=3Ddom-portcollection-remove title=3Ddom-PortCo=
llection-remove><code>remove()</code></dfn> method m=
ust remove the
+  <code><a href=3D#messageport>MessagePort</a></cod=
e> given by the argument from the <code><a href=3D#portcollec=
tion>PortCollection</a></code> object's <a href=3D#conc=
ept-portcollection-list title=3Dconcept-PortCollection-list>list of po=
rts</a>, unless the <code><a href=3D#messageport>Messag=
ePort</a></code> is
+  not in the <a href=3D#concept-portcollection-list title=3Dconcept-P=
ortCollection-list>list of ports</a>, in which case the
+  method does nothing.</p>
+
+  <p>The <dfn id=3Ddom-portcollection-clear title=3Ddom-PortCol=
lection-clear><code>clear()</code></dfn> method must=
 remove all
+  <code><a href=3D#messageport>MessagePort</a></cod=
e> objects from the <code><a href=3D#portcollection>PortCo=
llection</a></code> object's <a href=3D#concept-portcollec=
tion-list title=3Dconcept-PortCollection-list>list of ports</a>,=
 returning it to the initial empty state.
+  If the <a href=3D#concept-portcollection-list title=3Dconcept-PortC=
ollection-list>list of ports</a> is already empty, the method
+  does nothing.</p>
+
+  <p>The <dfn id=3Ddom-portcollection-iterate title=3Ddom-PortC=
ollection-iterate><code>iterate()</code></dfn> metho=
d must invoke its
+  <code><a href=3D#portcollectioncallback>PortCollectionCall=
back</a></code> argument once for each <code><a href=
=3D#messageport>MessagePort</a></code> object in the
+  object's <a href=3D#concept-portcollection-list title=3Dconcept-Por=
tCollection-list>list of ports</a>, in the order defined
+  above, with each invocation being passed the corresponding <code&gt=
;<a href=3D#messageport>MessagePort</a></code> object a=
s the
+  callback's sole argument.</p>
+
+  </div>
+
+
+  <h4 id=3Dports-and-garbage-collection><span class=3Dsecno>=
9.5.5 </span>Ports and garbage collection</h4>
+
+  <div class=3Dimpl>
+
+<!--CLEANUP-->
+  <p>When a <code><a href=3D#messageport>MessagePort&l=
t;/a></code> object <var title=3D"">o</var&gt=
; is entangled, user agents must
+  either act as if <var title=3D"">o</var>'s entan=
gled <code><a href=3D#messageport>MessagePort</a></c=
ode> object has a strong
+  reference to <var title=3D"">o</var>, or as if t=
he <a href=3D#global-object>global object</a> specified by &l=
t;var title=3D"">o</var>'s <a href=3D#concept-port-=
owner title=3Dconcept-port-owner>owner</a> has a strong referenc=
e
+  to <var title=3D"">o</var>.</p>
+
+  <div class=3Dnote>
+
+   <p>Thus, a message port can be received, given an event listene=
r, and then forgotten, and so long
+   as that event listener could receive a message, the channel will be m=
aintained.</p>
+
+   <p>Of course, if this was to occur on both sides of the channel=
, then both ports could be garbage
+   collected, since they would not be reachable from live code, despite =
having a strong reference to
+   each other.</p>
+
+  </div>
+
+  <p>Furthermore, a <code><a href=3D#messageport>Messa=
gePort</a></code> object must not be garbage collected while =
there exists
+  a message in a <a href=3D#task-queue>task queue</a> that i=
s to be dispatched on that <code><a href=3D#messageport>Messa=
gePort</a></code>
+  object, or while the <code><a href=3D#messageport>MessageP=
ort</a></code> object's <a href=3D#port-message-queue>p=
ort message queue</a> is open and
+  there exists a <code title=3Devent-message><a href=3D#event-m=
essage>message</a></code> event in that queue.</p> &=
lt;!-- we might
+  not need to explicitly say the first part if DOM Events is fixed to sa=
y that events on a task
+  queue prevent GC -->
+
+  <!-- ports in the ports attribute of a MessageEvent that isn't disp=
atched yet are safe because the
+  MessageEvent is safe -->
+
+  <p>There are no strong references from a <code><a href=3D=
#portcollection>PortCollection</a></code> object to its
+  <code><a href=3D#messageport>MessagePort</a></cod=
e> objects. (That is in fact the whole point of <code><a href=
=3D#portcollection>PortCollection</a></code>
+  objects: they allow for <code><a href=3D#messageport>Messa=
gePort</a></code> objects to be referenced without preventing=
 them
+  from being garbage collected.)</p>
+
+  </div>
+
+  <p class=3Dnote>Authors are strongly encouraged to explicitly cl=
ose <code><a href=3D#messageport>MessagePort</a></co=
de>
+  objects to disentangle them, so that their resources can be recollecte=
d. Creating many
+  <code><a href=3D#messageport>MessagePort</a></cod=
e> objects and discarding them without closing them can lead to high
+  transient memory usage since garbage collection is not necessarily per=
formed promptly.</p>
+
+<!--POSTMSG-->
+
+
+
+<!--ADD-TOPIC:Workers-->
+
+  <h2 id=3Dworkers><span class=3Dsecno>10 </span>Web w=
orkers</h2>
+
+
+
+  <h3 id=3Dintroduction-11><span class=3Dsecno>10.1 </spa=
n>Introduction</h3>
+
+  <h4 id=3Dscope-0><span class=3Dsecno>10.1.1 </span>S=
cope</h4>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <p>This specification defines an API for running scripts in the =
background independently of any
+  user interface scripts.</p>
+
+  <p>This allows for long-running scripts that are not interrupted=
 by scripts that respond to clicks
+  or other user interactions, and allows long tasks to be executed witho=
ut yielding to keep the page
+  responsive.</p>
+
+  <p>Workers (as these background scripts are called herein) are r=
elatively heavy-weight, and are
+  not intended to be used in large numbers. For example, it would be ina=
ppropriate to launch one
+  worker for each pixel of a four megapixel image. The examples below sh=
ow some appropriate uses of
+  workers.</p>
+
+  <p>Generally, workers are expected to be long-lived, have a high=
 start-up performance cost, and a
+  high per-instance memory cost.</p>
+
+
+  <h4 id=3Dexamples-5><span class=3Dsecno>10.1.2 </span&g=
t;Examples</h4>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <p>There are a variety of uses that workers can be put to. The f=
ollowing subsections show various
+  examples of this use.</p>
+
+  <h5 id=3Da-background-number-crunching-worker><span class=3Ds=
ecno>10.1.2.1 </span>A background number-crunching worker</h5=
>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <p>The simplest use of workers is for performing a computational=
ly
+  expensive task without interrupting the user interface.</p>
+
+  <p>In this example, the main document spawns a worker to (na&amp=
;iuml;vely) compute prime numbers, and
+  progressively displays the most recently found prime number.</p>
+
+  <p>The main page is as follows:</p>
+
+  <pre><!DOCTYPE HTML>
+<html>
+ <head>
+  <title>Worker example: One-core computation</titl=
e>
+ </head>
+ <body>
+  <p>The highest prime number discovered so far is: &l=
t;output id=3D"result"></output></p=
>
+  <script>
+   var worker =3D new Worker('worker.js');
+   worker.onmessage =3D function (event) {
+     document.getElementById('result').textContent =3D event.data;
+   };
+  </script>
+ </body>
+</html></pre>
+
+  <p>The <code title=3Ddom-Worker><a href=3D#dom-worker&g=
t;Worker()</a></code> constructor call creates a worker and r=
eturns a
+  <code><a href=3D#worker>Worker</a></code> obje=
ct representing that worker, which is used to communicate with the worker=
.
+  That object's <code title=3Dhandler-Worker-onmessage><a href=3D=
#handler-worker-onmessage>onmessage</a></code> event handl=
er allows the
+  code to receive messages from the worker.</p>
+
+  <p>The worker itself is as follows:</p>
+
+  <pre>var n =3D 1;
+search: while (true) {
+  n +=3D 1;
+  for (var i =3D 2; i <=3D Math.sqrt(n); i +=3D 1)
+    if (n % i =3D=3D 0)
+     continue search;
+  // found a prime!
+  postMessage(n);
+}</pre>
+
+  <p>The bulk of this code is simply an unoptimized search for a p=
rime number. The <code title=3Ddom-DedicatedWorkerGlobalScope-postMess=
age><a href=3D#dom-dedicatedworkerglobalscope-postmessage>postMe=
ssage()</a></code> method is used to send a
+  message back to the page when a prime is found.</p>
+
+  <p><a href=3Dhttp://www.whatwg.org/demos/workers/primes/page.=
html>View this example online</a>.</p>
+
+
+
+
+  <h5 id=3Dworker-used-for-background-i/o><span class=3Dsecno&g=
t;10.1.2.2 </span>Worker used for background I/O</h5>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <p>In this example, the main document uses two workers, one for =
fetching stock updates at regular
+  intervals, and one for performing search queries that the user request=
s.</p>
+
+  <p>The main page is as follows:</p>
+
+  <pre><!DOCTYPE HTML>
+<html>
+ <head>
+  <title>Worker example: Stock ticker</title&gt=
;
+  <script>
+   // TICKER
+   var symbol =3D 'GOOG'; // default symbol to watch
+   var ticker =3D new Worker('ticker.js');
+
+   // SEARCHER
+   var searcher =3D new Worker('searcher.js');
+   function search(query) {
+     searcher.postMessage(query);
+   }
+
+   // SYMBOL SELECTION UI
+   function select(newSymbol) {
+     symbol =3D newSymbol;
+     ticker.postMessage(symbol);
+   }
+  </script>
+ </head>
+ <body onload=3D"search('')">
+  <p><output id=3D"symbol">&lt=
;/output> <output id=3D"value"></ou=
tput></p>
+  <script>
+   ticker.onmessage =3D function (event) {
+     var data =3D event.data.split(' ');
+     document.getElementById('symbol').textContent =3D data[0];
+     document.getElementById('value').textContent =3D data[1];
+   };
+   ticker.postMessage(symbol);
+  </script>
+  <p><label>Search: <input type=3D&qu=
ot;text" autofocus oninput=3D"search(this.value)">&=
amp;lt;/label></p>
+  <ul id=3D"results"></ul>
+  <script>
+   searcher.onmessage =3D function (event) {
+     var data =3D event.data.split(' ');
+     var results =3D document.getElementById('results');
+     while (results.hasChildNodes()) // clear previous results
+       results.removeChild(results.firstChild);
+     for (var i =3D 0; i < data.length; i +=3D 1) {
+       // add a list item with a button for each result
+       var li =3D document.createElement('li');
+       var button =3D document.createElement('button');
+       button.value =3D data[i];
+       button.type =3D 'button';
+       button.onclick =3D function () { select(this.value); };
+       button.textContent =3D data[i];
+       li.appendChild(button);
+       results.appendChild(li);
+     }
+   };
+  </script>
+  <p>(The data in this example is not real. Try searching =
for "Google" or "Apple".)</p>
+ </body>
+</html></pre>
+
+  <p>The two workers use a common library for performing the actua=
l network calls. This library is
+  as follows:</p>
+
+  <pre>function get(url) {
+  try {
+    var xhr =3D new XMLHttpRequest();
+    xhr.open('GET', url, false);
+    xhr.send();
+    return xhr.responseText;
+  } catch (e) {
+    return ''; // turn all errors into empty results
+  }
+}</pre>
+
+  <p>The stock updater worker is as follows:</p>
+
+  <pre>importScripts('io.js');
+var timer;
+var symbol;
+function update() {
+  postMessage(symbol + ' ' + get('stock.cgi?' + symbol));
+  timer =3D setTimeout(update, 10000);
+}
+onmessage =3D function (event) {
+  if (timer)
+    clearTimeout(timer);
+  symbol =3D event.data;
+  update();
+};</pre>
+
+  <p>The search query worker is as follows:</p>
+
+  <pre>importScripts('io.js');
+onmessage =3D function (event) {
+  postMessage(get('search.cgi?' + event.data));
+};</pre>
+
+  <p><a href=3Dhttp://www.whatwg.org/demos/workers/stocks/page.=
html>View this example online</a>.</p>
+
+
+  <h5 id=3Dshared-workers-introduction><span class=3Dsecno>1=
0.1.2.3 </span>Shared workers introduction</h5>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <p>This section introduces shared workers using a Hello World ex=
ample. Shared workers use slightly
+  different APIs, since each worker can have multiple connections.</p=
>
+
+  <p>This first example shows how you connect to a worker and how =
a worker can send a message back
+  to the page when it connects to it. Received messages are displayed in=
 a log.</p>
+
+  <p>Here is the HTML page:</p>
+
+  <pre><!DOCTYPE HTML>
+<title>Shared workers: demo 1</title>
+<pre id=3D"log">Log:</pre>
+<script>
+  var worker =3D new SharedWorker('test.js');
+  var log =3D document.getElementById('log');
+  worker.port.onmessage =3D function(e) { // note: not worker.onmessage!
+    log.textContent +=3D '\n' + e.data;
+  }
+</script>
+</pre>
+
+  <p>Here is the JavaScript worker:</p>
+
+  <pre>onconnect =3D function(e) {
+  var port =3D e.ports[0];
+  port.postMessage('Hello World!');
+}
+</pre>
+
+  <p><a href=3Dhttp://www.whatwg.org/demos/workers/shared/001/t=
est.html>View this example online</a>.</p>
+
+  <hr><p>This second example extends the first one by changi=
ng two things: first, messages are received
+  using <code title=3D"">addEventListener()</code>=
 instead of an <a href=3D#event-handler-idl-attributes title=3D"e=
vent handler IDL
+  attributes">event handler IDL attribute</a>, and second,=
 a message is sent <em>to</em> the
+  worker, causing the worker to send another message in return. Received=
 messages are again
+  displayed in a log.</p>
+
+  <p>Here is the HTML page:</p>
+
+  <pre><!DOCTYPE HTML>
+<title>Shared workers: demo 2</title>
+<pre id=3D"log">Log:</pre>
+<script>
+  var worker =3D new SharedWorker('test.js');
+  var log =3D document.getElementById('log');
+  worker.port.addEventListener('message', function(e) {
+    log.textContent +=3D '\n' + e.data;
+  }, false);
+  worker.port.start(); // note: need this when using addEventListener
+  worker.port.postMessage('ping');
+</script>
+</pre>
+
+  <p>Here is the JavaScript worker:</p>
+
+  <pre>onconnect =3D function(e) {
+  var port =3D e.ports[0];
+  port.postMessage('Hello World!');
+  port.onmessage =3D function(e) {
+    port.postMessage('pong'); // not e.ports[0].postMessage!
+    // e.target.postMessage('pong'); would work also
+  }
+}
+</pre>
+
+  <p><a href=3Dhttp://www.whatwg.org/demos/workers/shared/002/t=
est.html>View this example online</a>.</p>
+
+  <hr><p>Finally, the example is extended to show how two pa=
ges can connect to the same worker; in this
+  case, the second page is merely in an <code><a href=3D#the-if=
rame-element>iframe</a></code> on the first page, but the =
same
+  principle would apply to an entirely separate page in a separate <a=
 href=3D#top-level-browsing-context>top-level browsing
+  context</a>.</p>
+
+  <p>Here is the outer HTML page:</p>
+
+  <pre><!DOCTYPE HTML>
+<title>Shared workers: demo 3</title>
+<pre id=3D"log">Log:</pre>
+<script>
+  var worker =3D new SharedWorker('test.js');
+  var log =3D document.getElementById('log');
+  worker.port.addEventListener('message', function(e) {
+    log.textContent +=3D '\n' + e.data;
+  }, false);
+  worker.port.start();
+  worker.port.postMessage('ping');
+</script>
+<iframe src=3D"inner.html"></iframe&g=
t;
+</pre>
+
+  <p>Here is the inner HTML page:</p>
+
+  <pre><!DOCTYPE HTML>
+<title>Shared workers: demo 3 inner frame</title&am=
p;gt;
+<pre id=3Dlog>Inner log:</pre>
+<script>
+  var worker =3D new SharedWorker('test.js');
+  var log =3D document.getElementById('log');
+  worker.port.onmessage =3D function(e) {
+   log.textContent +=3D '\n' + e.data;
+  }
+</script>
+</pre>
+
+  <p>Here is the JavaScript worker:</p>
+
+  <pre>var count =3D 0;
+onconnect =3D function(e) {
+  count +=3D 1;
+  var port =3D e.ports[0];
+  port.postMessage('Hello World! You are connection #' + count);
+  port.onmessage =3D function(e) {
+    port.postMessage('pong');
+  }
+}
+</pre>
+
+  <p><a href=3Dhttp://www.whatwg.org/demos/workers/shared/003/t=
est.html>View this example online</a>.</p>
+
+
+  <h5 id=3Dshared-state-using-a-shared-worker><span class=3Dsec=
no>10.1.2.4 </span>Shared state using a shared worker</h5>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <p>In this example, multiple windows (viewers) can be opened tha=
t are all viewing the same map.
+  All the windows share the same map information, with a single worker c=
oordinating all the viewers.
+  Each viewer can move around independently, but if they set any data on=
 the map, all the viewers
+  are updated.</p>
+
+  <p>The main page isn't interesting, it merely provides a way to =
open the viewers:</p>
+
+  <pre><!DOCTYPE HTML>
+<html>
+ <head>
+  <title>Workers example: Multiviewer</title&gt=
;
+  <script>
+   function openViewer() {
+     window.open('viewer.html');
+   }
+  </script>
+ </head>
+ <body>
+  <p><button type=3Dbutton onclick=3D"openView=
er()">Open a new
+  viewer</button></p>
+  <p>Each viewer opens in a new window. You can have as ma=
ny viewers
+  as you like, they all view the same data.</p>
+ </body>
+</html></pre>
+
+  <p>The viewer is more involved:</p>
+
+  <pre><!DOCTYPE HTML>
+<html>
+ <head>
+  <title>Workers example: Multiviewer viewer</title=
>
+  <script>
+   var worker =3D new SharedWorker('worker.js', 'core');
+
+   // CONFIGURATION
+   function configure(event) {
+     if (event.data.substr(0, 4) !=3D 'cfg ') return;
+     var name =3D event.data.substr(4).split(' ', 1)[0];
+     // update display to mention our name is name
+     document.getElementsByTagName('h1')[0].textContent +=3D ' ' + name;
+     // no longer need this listener
+     worker.port.removeEventListener('message', configure, false);
+   }
+   worker.port.addEventListener('message', configure, false);
+
+   // MAP
+   function paintMap(event) {
+     if (event.data.substr(0, 4) !=3D 'map ') return;
+     var data =3D event.data.substr(4).split(',');
+     // display tiles data[0] .. data[8]
+     var canvas =3D document.getElementById('map');
+     var context =3D canvas.getContext('2d');
+     for (var y =3D 0; y < 3; y +=3D 1) {
+       for (var x =3D 0; x < 3; x +=3D 1) {
+         var tile =3D data[y * 3 + x];
+         if (tile =3D=3D '0')
+           context.fillStyle =3D 'green';
+         else=20
+           context.fillStyle =3D 'maroon';
+         context.fillRect(x * 50, y * 50, 50, 50);
+       }
+     }
+   }
+   worker.port.addEventListener('message', paintMap, false);
+
+   // PUBLIC CHAT
+   function updatePublicChat(event) {
+     if (event.data.substr(0, 4) !=3D 'txt ') return;
+     var name =3D event.data.substr(4).split(' ', 1)[0];
+     var message =3D event.data.substr(4 + name.length + 1);
+     // display "<name> message" in public chat
+     var public =3D document.getElementById('public');
+     var p =3D document.createElement('p');
+     var n =3D document.createElement('button');
+     n.textContent =3D '<' + name + '> ';
+     n.onclick =3D function () { worker.port.postMessage('msg ' + name);=
 };
+     p.appendChild(n);
+     var m =3D document.createElement('span');
+     m.textContent =3D message;
+     p.appendChild(m);
+     public.appendChild(p);
+   }
+   worker.port.addEventListener('message', updatePublicChat, false);
+
+   // PRIVATE CHAT
+   function startPrivateChat(event) {
+     if (event.data.substr(0, 4) !=3D 'msg ') return;
+     var name =3D event.data.substr(4).split(' ', 1)[0];
+     var port =3D event.ports[0];
+     // display a private chat UI
+     var ul =3D document.getElementById('private');
+     var li =3D document.createElement('li');
+     var h3 =3D document.createElement('h3');
+     h3.textContent =3D 'Private chat with ' + name;
+     li.appendChild(h3);
+     var div =3D document.createElement('div');
+     var addMessage =3D function(name, message) {
+       var p =3D document.createElement('p');
+       var n =3D document.createElement('strong');
+       n.textContent =3D '<' + name + '> ';
+       p.appendChild(n);
+       var t =3D document.createElement('span');
+       t.textContent =3D message;
+       p.appendChild(t);
+       div.appendChild(p);
+     };
+     port.onmessage =3D function (event) {
+       addMessage(name, event.data);
+     };
+     li.appendChild(div);
+     var form =3D document.createElement('form');
+     var p =3D document.createElement('p');
+     var input =3D document.createElement('input');
+     input.size =3D 50;
+     p.appendChild(input);
+     p.appendChild(document.createTextNode(' '));
+     var button =3D document.createElement('button');
+     button.textContent =3D 'Post';
+     p.appendChild(button);
+     form.onsubmit =3D function () {
+       port.postMessage(input.value);
+       addMessage('me', input.value);
+       input.value =3D '';
+       return false;
+     };
+     form.appendChild(p);
+     li.appendChild(form);
+     ul.appendChild(li);
+   }
+   worker.port.addEventListener('message', startPrivateChat, false);
+
+   worker.port.start();
+  </script>
+ </head>
+ <body>
+  <h1>Viewer</h1>
+  <h2>Map</h2>
+  <p><canvas id=3D"map" height=3D150 widt=
h=3D150></canvas></p>
+  <p>
+   <button type=3Dbutton onclick=3D"worker.port.postMessage(=
'mov left')">Left</button>
+   <button type=3Dbutton onclick=3D"worker.port.postMessage(=
'mov up')">Up</button>
+   <button type=3Dbutton onclick=3D"worker.port.postMessage(=
'mov down')">Down</button>
+   <button type=3Dbutton onclick=3D"worker.port.postMessage(=
'mov right')">Right</button>
+   <button type=3Dbutton onclick=3D"worker.port.postMessage(=
'set 0')">Set 0</button>
+   <button type=3Dbutton onclick=3D"worker.port.postMessage(=
'set 1')">Set 1</button>
+  </p>
+  <h2>Public Chat</h2>
+  <div id=3D"public"></div>
+  <form onsubmit=3D"worker.port.postMessage('txt ' + message=
.value); message.value =3D ''; return false;">
+   <p>
+    <input type=3D"text" name=3D"message" siz=
e=3D"50">
+    <button>Post</button>
+   </p>
+  </form>
+  <h2>Private Chat</h2>
+  <ul id=3D"private"></ul>
+ </body>
+</html>
+</pre>
+
+  <p>There are several key things worth noting about the way the v=
iewer is written.</p>
+
+  <p><strong>Multiple listeners</strong>. Instead of a=
 single message processing function, the code
+  here attaches multiple event listeners, each one performing a quick ch=
eck to see if it is relevant
+  for the message. In this example it doesn't make much difference, but =
if multiple authors wanted
+  to collaborate using a single port to communicate with a worker, it wo=
uld allow for independent
+  code instead of changes having to all be made to a single event handli=
ng function.</p>
+
+  <p>Registering event listeners in this way also allows you to un=
register specific listeners when
+  you are done with them, as is done with the <code title=3D"&qu=
ot;>configure()</code> method in this
+  example.</p>
+
+  <p>Finally, the worker:</p>
+
+  <pre>
+var nextName =3D 0;
+function getNextName() {
+  // this could use more friendly names
+  // but for now just return a number
+  return nextName++;
+}
+
+var map =3D [
+ [0, 0, 0, 0, 0, 0, 0],
+ [1, 1, 0, 1, 0, 1, 1],
+ [0, 1, 0, 1, 0, 0, 0],
+ [0, 1, 0, 1, 0, 1, 1],
+ [0, 0, 0, 1, 0, 0, 0],
+ [1, 0, 0, 1, 1, 1, 1],
+ [1, 1, 0, 1, 1, 0, 1],
+];
+
+function wrapX(x) {
+  if (x < 0) return wrapX(x + map[0].length);
+  if (x >=3D map[0].length) return wrapX(x - map[0].length);
+  return x;
+}
+
+function wrapY(y) {
+  if (y < 0) return wrapY(y + map.length);
+  if (y >=3D map[0].length) return wrapY(y - map.length);
+  return y;
+}
+
+function wrap(val, min, max) {
+  if (val < min)
+    return val + (max-min)+1;
+  if (val > max)
+    return val - (max-min)-1;
+  return val;
+}
+
+function sendMapData(viewer) {
+  var data =3D '';
+  for (var y =3D viewer.y-1; y <=3D viewer.y+1; y +=3D 1) {
+    for (var x =3D viewer.x-1; x <=3D viewer.x+1; x +=3D 1) {
+      if (data !=3D '')
+        data +=3D ',';
+      data +=3D map[wrap(y, 0, map[0].length-1)][wrap(x, 0, map.length-1=
)];
+    }
+  }
+  viewer.port.postMessage('map ' + data);
+}
+
+var viewers =3D {};
+onconnect =3D function (event) {
+  var name =3D getNextName();
+  event.ports[0]._data =3D { port: event.ports[0], name: name, x: 0, y: =
0, };
+  viewers[name] =3D event.ports[0]._data;
+  event.ports[0].postMessage('cfg ' + name);
+  event.ports[0].onmessage =3D getMessage;
+  sendMapData(event.ports[0]._data);
+};
+
+function getMessage(event) {
+  switch (event.data.substr(0, 4)) {
+    case 'mov ':
+      var direction =3D event.data.substr(4);
+      var dx =3D 0;
+      var dy =3D 0;
+      switch (direction) {
+        case 'up': dy =3D -1; break;
+        case 'down': dy =3D 1; break;
+        case 'left': dx =3D -1; break;
+        case 'right': dx =3D 1; break;
+      }
+      event.target._data.x =3D wrapX(event.target._data.x + dx);
+      event.target._data.y =3D wrapY(event.target._data.y + dy);
+      sendMapData(event.target._data);
+      break;
+    case 'set ':
+      var value =3D event.data.substr(4);
+      map[event.target._data.y][event.target._data.x] =3D value;
+      for (var viewer in viewers)
+        sendMapData(viewers[viewer]._data);
+      break;
+    case 'txt ':
+      var name =3D event.target._data.name;
+      var message =3D event.data.substr(4);
+      for (var viewer in viewers)
+        viewers[viewer].port.postMessage('txt ' + name + ' ' + message);
+      break;
+    case 'msg ':
+      var party1 =3D event.target._data;
+      var party2 =3D viewers[event.data.substr(4).split(' ', 1)[0]];
+      if (party2) {
+        var channel =3D new MessageChannel();
+        party1.port.postMessage('msg ' + party2.name, [channel.port1]);
+        party2.port.postMessage('msg ' + party1.name, [channel.port2]);
+      }
+      break;
+  }
+}</pre>
+
+  <p><strong>Connecting to multiple pages</strong>. Th=
e script uses the <code title=3Dhandler-SharedWorkerGlobalScope-onconn=
ect><a href=3D#handler-sharedworkerglobalscope-onconnect>onconne=
ct</a></code> event listener to listen for
+  multiple connections.</p>
+
+  <p><strong>Direct channels</strong>. When the worker=
 receives a "msg" message from one viewer
+  naming another viewer, it sets up a direct connection between the two,=
 so that the two viewers can
+  communicate directly without the worker having to proxy all the messag=
es.</p>
+
+  <p><a href=3Dhttp://www.whatwg.org/demos/workers/multiviewer/=
page.html>View this example online</a>.</p>
+
+
+  <h5 id=3Ddelegation><span class=3Dsecno>10.1.2.5 </span=
>Delegation</h5>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <p>With multicore CPUs becoming prevalent, one way to obtain bet=
ter performance is to split
+  computationally expensive tasks amongst multiple workers. In this exam=
ple, a computationally
+  expensive task that is to be performed for every number from 1 to 10,0=
00,000 is farmed out to ten
+  subworkers.</p>
+
+  <p>The main page is as follows, it just reports the result:</=
p>
+
+  <pre><!DOCTYPE HTML>
+<html>
+ <head>
+  <title>Worker example: Multicore computation</tit=
le>
+ </head>
+ <body>
+  <p>Result: <output id=3D"result"&gt=
;</output></p>
+  <script>
+   var worker =3D new Worker('worker.js');
+   worker.onmessage =3D function (event) {
+     document.getElementById('result').textContent =3D event.data;
+   };
+  </script>
+ </body>
+</html></pre>
+
+  <p>The worker itself is as follows:</p>
+
+  <pre>// settings
+var num_workers =3D 10;
+var items_per_worker =3D 1000000;
+
+// start the workers
+var result =3D 0;
+var pending_workers =3D num_workers;
+for (var i =3D 0; i < num_workers; i +=3D 1) {
+  var worker =3D new Worker('core.js');
+  worker.postMessage(i * items_per_worker);
+  worker.postMessage((i+1) * items_per_worker);
+  worker.onmessage =3D storeResult;
+}
+
+// handle the results
+function storeResult(event) {
+  result +=3D 1*event.data;
+  pending_workers -=3D 1;
+  if (pending_workers <=3D 0)
+    postMessage(result); // finished!
+}</pre>
+
+  <p>It consists of a loop to start the subworkers, and then a han=
dler
+  that waits for all the subworkers to respond.</p>
+
+  <p>The subworkers are implemented as follows:</p>
+
+  <pre>var start;
+onmessage =3D getStart;
+function getStart(event) {
+  start =3D 1*event.data;
+  onmessage =3D getEnd;
+}
+
+var end;
+function getEnd(event) {
+  end =3D 1*event.data;
+  onmessage =3D null;
+  work();
+}
+
+function work() {
+  var result =3D 0;
+  for (var i =3D start; i < end; i +=3D 1) {
+    // perform some complex calculation here
+    result +=3D 1;
+  }
+  postMessage(result);
+  close();
+}</pre>
+
+  <p>They receive two numbers in two events, perform the computati=
on for the range of numbers thus
+  specified, and then report the result back to the parent.</p>
+
+  <p><a href=3Dhttp://www.whatwg.org/demos/workers/multicore/pa=
ge.html>View this example online</a>.</p>
+
+<!--(this uses startConversation, which is currently commented out)
+
+  <h5>Providing libraries</h5>
+
+  <!- -END dev-html- -><p><i>This section is non-norma=
tive.</i></p><!- -START dev-html- ->
+
+  <p>Suppose that a cryptography library is made available that pr=
ovides three tasks:</p>
+
+  <dl>
+
+   <dt>Generate a public/private key pair</dt>
+
+   <dd>Takes a port, on which it will send two messages, first the=
 public key and then the private
+   key.</dd>
+
+   <dt>Given a plaintext and a public key, return the correspondin=
g cyphertext</dt>
+
+   <dd>Takes a port, to which any number of messages can be sent, =
the first giving the public key,
+   and the remainder giving the plaintext, each of which is encrypted an=
d then sent on that same
+   channel as the cyphertext. The user can close the port when it is don=
e encrypting content.</dd>
+
+   <dt>Given a cyphertext and a private key, return the correspond=
ing plaintext</dt>
+
+   <dd>Takes a port, to which any number of messages can be sent, =
the first giving the private key,
+   and the remainder giving the cyphertext, each of which is decrypted a=
nd then sent on that same
+   channel as the plaintext. The user can close the port when it is done=
 decrypting content.</dd>
+
+  </dl>
+
+  <p>The library itself is as follows:</p>
+
+  <pre>function handleMessage(e) {
+  if (e.data =3D=3D "genkeys")
+    genkeys(e.ports[0]);
+  else if (e.data =3D=3D "encrypt")
+    encrypt(e.ports[0]);
+  else if (e.data =3D=3D "decrypt")
+    decrypt(e.ports[0]);
+}
+
+function genkeys(p) {
+  var keys =3D _generateKeyPair();
+  p.postMessage(keys[0]);
+  p.postMessage(keys[1]);
+}
+
+function encrypt(p) {
+  var key, state =3D 0;
+  p.onmessage =3D function (e) {
+    if (state =3D=3D 0) {
+      key =3D e.data;
+      state =3D 1;
+    } else {
+      p.postMessage(_encrypt(key, e.data));
+    }
+  };
+}
+
+function decrypt(p) {
+  var key, state =3D 0;
+  p.onmessage =3D function (e) {
+    if (state =3D=3D 0) {
+      key =3D e.data;
+      state =3D 1;
+    } else {
+      p.postMessage(_decrypt(key, e.data));
+    }
+  };
+}
+
+// support being used as a shared worker as well as a dedicated worker
+if ('onmessage' in this) // dedicated worker
+  onmessage =3D handleMessage;
+else // shared worker
+  onconnect =3D function (e) { e.port.onmessage =3D handleMessage; }
+
+
+// the "crypto" functions:
+
+function _generateKeyPair() {
+  return [Math.random(), Math.random()];
+}
+
+function _encrypt(k, s) {
+  return 'encrypted-' + k + ' ' + s;
+}
+
+function _decrypt(k, s) {
+  return s.substr(s.indexOf(' ')+1);
+}</pre>
+
+  <p>Note that the crypto functions here are just stubs and don't =
do real cryptography.</p>
+
+  <p>This library could be used as follows:</p>
+
+  <pre><!DOCTYPE HTML>
+<html>
+ <head>
+  <title>Worker example: Crypto library</title>
+  <script>
+   var cryptoLib =3D new Worker('libcrypto-v1.js'); // or could use 'lib=
crypto-v2.js'
+   function getKeys() {
+     var state =3D 0;
+     cryptoLib.startConversation("genkeys").onmessage =3D func=
tion (e) {
+       if (state =3D=3D 0)
+         document.getElementById('public').value =3D e.data;
+       else if (state =3D=3D 1)
+         document.getElementById('private').value =3D e.data;
+       state +=3D 1;
+     };
+   }
+   function enc() {
+     var port =3D cryptoLib.startConversation("encrypt");
+     port.postMessage(document.getElementById('public').value);
+     port.postMessage(document.getElementById('input').value);
+     port.onmessage =3D function (e) {
+       document.getElementById('input').value =3D e.data;
+       port.close();
+     };
+   }
+   function dec() {
+     var port =3D cryptoLib.startConversation("decrypt");
+     port.postMessage(document.getElementById('private').value);
+     port.postMessage(document.getElementById('input').value);
+     port.onmessage =3D function (e) {
+       document.getElementById('input').value =3D e.data;
+       port.close();
+     };
+   }
+  </script>
+  <style>
+   textarea { display: block; }
+  </style>
+ </head>
+ <body onload=3D"getKeys()">
+  <fieldset>
+   <legend>Keys</legend>
+   <p><label>Public Key: <textarea id=3D&quot=
;public"></textarea></label></p>
+   <p><label>Private Key: <textarea id=3D&quo=
t;private"></textarea></label></p>
+  </fieldset>
+  <p><label>Input: <textarea id=3D"input=
"></textarea></label></p>
+  <p><button onclick=3D"enc()">Encrypt&amp=
;lt;/button> <button onclick=3D"dec()">Decrypt&amp=
;lt;/button></p>
+ </body>
+</html></pre>
+
+  <p>A later version of the API, though, might want to offload all=
 the crypto work onto subworkers.
+  This could be done as follows:</p>
+
+  <pre>function handleMessage(e) {
+  if (e.data =3D=3D "genkeys")
+    genkeys(e.ports[0]);
+  else if (e.data =3D=3D "encrypt")
+    encrypt(e.ports[0]);
+  else if (e.data =3D=3D "decrypt")
+    decrypt(e.ports[0]);
+}
+
+function genkeys(p) {
+  var generator =3D new Worker('libcrypto-v2-generator.js');
+  generator.postMessage('', [p]);
+}
+
+function encrypt(p) {
+  p.onmessage =3D function (e) {
+    var key =3D e.data;
+    var encryptor =3D new Worker('libcrypto-v2-encryptor.js');
+    encryptor.postMessage(key, [p]);
+  };
+}
+
+function encrypt(p) {
+  p.onmessage =3D function (e) {
+    var key =3D e.data;
+    var decryptor =3D new Worker('libcrypto-v2-decryptor.js');
+    decryptor.postMessage(key, [p]);
+  };
+}
+
+// support being used as a shared worker as well as a dedicated worker
+if ('onmessage' in this) // dedicated worker
+  onmessage =3D handleMessage;
+else // shared worker
+  onconnect =3D function (e) { e.ports[0].onmessage =3D handleMessage };
+</pre>
+
+  <p>The little subworkers would then be as follows.</p>
+
+  <p>For generating key pairs:</p>
+
+  <pre>onmessage =3D function (e) {
+  var k =3D _generateKeyPair();
+  e.ports[0].postMessage(k[0]);
+  e.ports[0].postMessage(k[1]);
+  close();
+}
+
+function _generateKeyPair() {
+  return [Math.random(), Math.random()];
+}</pre>
+
+  <p>For encrypting:</p>
+
+  <pre>onmessage =3D function (e) {
+  var key =3D e.data;
+  e.ports[0].onmessage =3D function (e) {
+    var s =3D e.data;
+    postMessage(_encrypt(key, s));
+  }
+}
+
+function _encrypt(k, s) {
+  return 'encrypted-' + k + ' ' + s;
+}</pre>
+
+  <p>For decrypting:</p>
+
+  <pre>onmessage =3D function (e) {
+  var key =3D e.data;
+  e.ports[0].onmessage =3D function (e) {
+    var s =3D e.data;
+    postMessage(_decrypt(key, s));
+  }
+}
+
+function _decrypt(k, s) {
+  return s.substr(s.indexOf(' ')+1);
+}</pre>
+
+  <p>Notice how the users of the API don't have to even know that =
this is happening — the API
+  hasn't changed; the library can delegate to subworkers without changin=
g its API, even though it is
+  accepting data using message channels.</p>
+
+  <p><a href=3D"http://www.whatwg.org/demos/workers/crypto=
/page.html">View this example online</a>.</p>
+
+(end startConversation block) (beware nested comments)-->
+
+
+  <h4 id=3Dtutorials><span class=3Dsecno>10.1.3 </span&gt=
;Tutorials</h4>
+
+  <h5 id=3Dcreating-a-dedicated-worker><span class=3Dsecno>1=
0.1.3.1 </span>Creating a dedicated worker</h5>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <p>Creating a worker requires a URL to a JavaScript file. The &l=
t;code title=3Ddom-Worker><a href=3D#dom-worker>Worker()</a&g=
t;</code> constructor is invoked with the URL to that file as its o=
nly
+  argument; a worker is then created and returned:</p>
+
+  <pre>var worker =3D new Worker('helper.js');</pre>
+
+
+  <h5 id=3Dcommunicating-with-a-dedicated-worker><span class=3D=
secno>10.1.3.2 </span>Communicating with a dedicated worker</=
h5>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <p>Dedicated workers use <code><a href=3D#messageport&g=
t;MessagePort</a></code> objects behind the scenes, and thus =
support all
+  the same features, such as sending structured data, transferring binar=
y data, and transferring
+  other ports.</p>
+
+  <p>To receive messages from a dedicated worker, use the <code=
 title=3Dhandler-worker-onmessage><a href=3D#handler-worker-onmessa=
ge>onmessage</a></code> <a href=3D#event-handler-idl-at=
tributes title=3D"event handler IDL attributes">event
+  handler IDL attribute</a> on the <code><a href=3D#worke=
r>Worker</a></code> object:</p>
+
+  <pre>worker.onmessage =3D function (event) { ... };</pre>
+
+  <p>You can also use the <code title=3Ddom-EventTarget-addEven=
tListener>addEventListener()</code>
+  method.</p>
+
+  <p class=3Dnote>The implicit <code><a href=3D#messagepo=
rt>MessagePort</a></code> used by dedicated workers has it=
s <a href=3D#port-message-queue>port
+  message queue</a> implicitly enabled when it is created, so ther=
e is no equivalent to the
+  <code><a href=3D#messageport>MessagePort</a></cod=
e> interface's <code title=3Ddom-MessagePort-start><a href=3D=
#dom-messageport-start>start()</a></code> method on
+  the <code><a href=3D#worker>Worker</a></code> =
interface.</p>
+
+  <p>To <em>send</em> data to a worker, use the <co=
de title=3Ddom-Worker-postMessage><a href=3D#dom-worker-postmessage=
>postMessage()</a></code> method. Structured data can be s=
ent over this
+  communication channel. To send <code><a href=3D#arraybuffer&g=
t;ArrayBuffer</a></code> objects efficiently (by transferring=
 them
+  rather than cloning them), list them in an array in the second argumen=
t.</p>
+
+  <pre>worker.postMessage({
+  operation: 'find-edges',
+  input: buffer, // an ArrayBuffer object
+  threshold: 0.6,
+}, [buffer]);</pre>
+
+  <p>To receive a message inside the worker, the <code title=3D=
handler-DedicatedWorkerGlobalScope-onmessage><a href=3D#handler-ded=
icatedworkerglobalscope-onmessage>onmessage</a></code> &lt=
;a href=3D#event-handler-idl-attributes title=3D"event handler
+  IDL attributes">event handler IDL attribute</a> is used.=
</p>
+
+  <pre>onmessage =3D function (event) { ... };</pre>
+
+  <p>You can again also use the <code title=3Ddom-EventTarget-a=
ddEventListener>addEventListener()</code> method.</p>
+
+  <p>In either case, the data is provided in the event object's &l=
t;code title=3Ddom-MessageEvent-data><a href=3D#dom-messageevent-da=
ta>data</a></code> attribute.</p>
+
+  <p>To send messages back, you again use <code title=3Ddom-Ded=
icatedWorkerGlobalScope-postMessage><a href=3D#dom-dedicatedworkerg=
lobalscope-postmessage>postMessage()</a></code>. It suppor=
ts the
+  structured data in the same manner.</p>
+
+  <pre>postMessage(event.data.input, [event.data.input]); // trans=
fer the buffer back</pre>
+
+
+  <h5 id=3Dshared-workers><span class=3Dsecno>10.1.3.3 </=
span>Shared workers</h5>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <p>Shared workers are identified by the URL of the script used t=
o create it, optionally with an
+  explicit name. The name allows multiple instances of a particular shar=
ed worker to be started.</p>
+
+  <p>Shared workers are scoped by <a href=3D#origin>origin&l=
t;/a>. Two different sites using the same names will
+  not collide. However, if a page tries to use the same shared worker na=
me as another page on the
+  same site, but with a different script URL, it will fail.</p>
+
+  <p>Creating shared workers is done using the <code title=3Ddo=
m-SharedWorker><a href=3D#dom-sharedworker>SharedWorker()</a&=
gt;</code>
+  constructor. This constructor takes the URL to the script to use for i=
ts first argument, and the
+  name of the worker, if any, as the second argument.</p>
+
+  <pre>var worker =3D new SharedWorker('service.js');</pre>
+
+  <p>Communicating with shared workers is done with explicit <c=
ode><a href=3D#messageport>MessagePort</a></code> ob=
jects. The
+  object returned by the <code title=3Ddom-SharedWorker><a href=
=3D#dom-sharedworker>SharedWorker()</a></code> constructor=
 holds a
+  reference to the port on its <code title=3Ddom-SharedWorker-port&gt=
;<a href=3D#dom-sharedworker-port>port</a></code> attri=
bute.</p>
+
+  <pre>worker.port.onmessage =3D function (event) { ... };
+worker.port.postMessage('some message');
+worker.port.postMessage({ foo: 'structured', bar: ['data', 'also', 'poss=
ible']});</pre>
+
+  <p>Inside the shared worker, new clients of the worker are annou=
nced using the <code title=3Devent-connect>connect</code> eve=
nt. The port for the new client is given by the event
+  object's <code title=3Ddom-messageevent-source><a href=3D#dom=
-messageevent-source>source</a></code> attribute.</p&gt=
;
+
+  <pre>onconnect =3D function (event) {
+  var newPort =3D event.source;
+  // set up a listener
+  newPort.onmessage =3D function (event) { ... };
+  // send a message back to the port
+  newPort.postMessage('ready!'); // can also send structured data, of co=
urse
+};</pre>
+
+
+
+
+  <h3 id=3Dinfrastructure-0><span class=3Dsecno>10.2 </sp=
an>Infrastructure</h3>
+
+  <p>There are two kinds of workers; dedicated workers, and shared=
 workers. Dedicated workers, once
+  created, and are linked to their creator; but message ports can be use=
d to communicate from a
+  dedicated worker to multiple other browsing contexts or workers. Share=
d workers, on the other
+  hand, are named, and once created any script running in the same <a=
 href=3D#origin>origin</a> can obtain a
+  reference to that worker and communicate with it.</p>
+
+
+  <h4 id=3Dthe-global-scope><span class=3Dsecno>10.2.1 </=
span>The global scope</h4>
+
+  <p>The global scope is the "inside" of a worker.</p=
>
+
+  <h5 id=3Dthe-workerglobalscope-common-interface><span class=3D=
secno>10.2.1.1 </span>The <code><a href=3D#workerglobal=
scope>WorkerGlobalScope</a></code> common interface</h5=
>
+
+  <pre class=3Didl>interface <dfn id=3Dworkerglobalscope>Wor=
kerGlobalScope</dfn> : <a href=3D#eventtarget>EventTarget<=
/a> {
+  readonly attribute <a href=3D#workerglobalscope>WorkerGlobalScop=
e</a> <a href=3D#dom-workerglobalscope-self title=3Ddom-WorkerGl=
obalScope-self>self</a>;
+  readonly attribute <a href=3D#workerlocation>WorkerLocation</=
a> <a href=3D#dom-workerglobalscope-location title=3Ddom-WorkerGlob=
alScope-location>location</a>;
+
+  void <a href=3D#dom-workerglobalscope-close title=3Ddom-WorkerGloba=
lScope-close>close</a>();
+<!-- v2-onclose           attribute <span>EventHandler</span=
> <span title=3D"handler-WorkerGlobalScope-onclose">on=
close</span>;
+-->           attribute <a href=3D#onerroreventhandler>OnErrorE=
ventHandler</a> <a href=3D#handler-workerglobalscope-onerror tit=
le=3Dhandler-WorkerGlobalScope-onerror>onerror</a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-workerglobalscope-onoffline title=3Dhandler-Worke=
rGlobalScope-onoffline>onoffline</a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-workerglobalscope-ononline title=3Dhandler-Worker=
GlobalScope-ononline>ononline</a>;
+
+  // <a href=3D"#WorkerGlobalScope-partial">also has add=
itional members in a partial interface</a>
+};</pre>
+
+  <p>The <dfn id=3Ddom-workerglobalscope-self title=3Ddom-Worke=
rGlobalScope-self><code>self</code></dfn> attribute =
must return the
+  <code><a href=3D#workerglobalscope>WorkerGlobalScope</a=
></code> object itself.</p>
+
+  <p>The <dfn id=3Ddom-workerglobalscope-location title=3Ddom-W=
orkerGlobalScope-location><code>location</code></dfn&gt=
; attribute must
+  return the <code><a href=3D#workerlocation>WorkerLocation&=
lt;/a></code> object created for the <code><a href=3D#w=
orkerglobalscope>WorkerGlobalScope</a></code>
+  object when the worker was created. It represents the <a href=3D#ab=
solute-url>absolute URL</a> of the script that
+  was used to initialize the worker, after any redirects.</p>
+
+  <hr><p>When a script invokes the <dfn id=3Ddom-workergl=
obalscope-close title=3Ddom-WorkerGlobalScope-close><code>close(=
)</code></dfn>
+  method on a <code><a href=3D#workerglobalscope>WorkerGloba=
lScope</a></code> object, the user agent must run the followi=
ng steps
+  (atomically):</p>
+
+  <ol><li><p>Discard any <a href=3D#concept-task ti=
tle=3Dconcept-task>tasks</a> that have been added to the
+   <code><a href=3D#workerglobalscope>WorkerGlobalScope</=
a></code> object's <a href=3D#event-loop>event loop</a&=
gt;'s <a href=3D#task-queue title=3D"task queue">task
+   queues</a>.</p>
+
+<!-- v2-onclose (remember to specify the task source, too)
+   <li><p><span>Queue a task</span> to <span&=
gt;fire a simple event</span> named <code
+   title=3D"event-worker-close">close</code> at the &=
lt;code>WorkerGlobalScope</code> object.</p></li>
+-->
+
+   <li><p>Set the worker's <code><a href=3D#workerg=
lobalscope>WorkerGlobalScope</a></code> object's <a hre=
f=3D#dom-workerglobalscope-closing title=3Ddom-WorkerGlobalScope-closing&=
gt;closing</a> flag to true. (This prevents any further
+   tasks from being queued.)</li>
+
+  </ol><hr><p>The following are the <a href=3D#even=
t-handlers>event handlers</a> (and their corresponding <a hre=
f=3D#event-handler-event-type title=3D"event
+  handler event type">event handler event types</a>) that =
must be supported, as <a href=3D#event-handler-idl-attributes>event=
 handler IDL attributes</a>,
+  by objects implementing the <code><a href=3D#workerglobalscop=
e>WorkerGlobalScope</a></code> interface:</p>
+
+  <table><thead><tr><th><a href=3D#event-hand=
lers title=3D"event handlers">Event handler</a> <th=
><a href=3D#event-handler-event-type>Event handler event type&lt=
;/a>
+   <tbody><!-- v2-onclose    <tr><td><dfn title=3D=
"handler-WorkerGlobalScope-onclose"><code>onclose</=
code></dfn> <td> <code title=3D"event-worker-close=
">close</code> --><tr><td><dfn id=3Dhandl=
er-workerglobalscope-onerror title=3Dhandler-WorkerGlobalScope-onerror&gt=
;<code>onerror</code></dfn> <td> <code title=3D=
event-error>error</code>
+    <tr><td><dfn id=3Dhandler-workerglobalscope-onoffline=
 title=3Dhandler-WorkerGlobalScope-onoffline><code>onoffline<=
/code></dfn> <td> <code title=3Devent-offline><a =
href=3D#event-offline>offline</a></code> <!-- new --&gt=
;
+    <tr><td><dfn id=3Dhandler-workerglobalscope-ononline =
title=3Dhandler-WorkerGlobalScope-ononline><code>ononline</co=
de></dfn> <td> <code title=3Devent-online><a href=
=3D#event-online>online</a></code> <!-- new -->
+  </table><hr><!--CLEANUP--><p class=3Dnote>For =
<a href=3D#data-protocol title=3D"data protocol"><code=
 title=3D"">data:</code> URLs</a>, this is
+  the <a href=3D#origin>origin</a> specified by the <a hr=
ef=3D#entry-settings-object>entry settings object</a> when the c=
onstructor was called. For
+  other <a href=3D#url title=3DURL>URLs</a>, this is the &lt=
;a href=3D#origin>origin</a> of the value of the
+  <a href=3D#absolute-url>absolute URL</a> given in the work=
er's <code title=3Ddom-WorkerGlobalScope-location><a href=3D#dom=
-workerglobalscope-location></a></code> attribute.</p&g=
t;
+
+
+  <h5 id=3Ddedicated-workers-and-the-dedicatedworkerglobalscope-inter=
face><span class=3Dsecno>10.2.1.2 </span>Dedicated workers=
 and the <code><a href=3D#dedicatedworkerglobalscope>Dedicate=
dWorkerGlobalScope</a></code> interface</h5>
+
+  <pre class=3Didl>[Global]
+/*sealed*/ interface <dfn id=3Ddedicatedworkerglobalscope>Dedicate=
dWorkerGlobalScope</dfn> : <a href=3D#workerglobalscope>Worke=
rGlobalScope</a> {
+  void <a href=3D#dom-dedicatedworkerglobalscope-postmessage title=3D=
dom-DedicatedWorkerGlobalScope-postMessage>postMessage</a>(any m=
essage, optional sequence<<a href=3D#transferable>Transferab=
le</a>> transfer);<!--
+  <span>MessagePort</span> <span title=3D"dom-Dedica=
tedWorkerGlobalScope-startConversation">startConversation</spa=
n>(any message);-->
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-dedicatedworkerglobalscope-onmessage title=3Dhand=
ler-DedicatedWorkerGlobalScope-onmessage>onmessage</a>;
+};</pre>
+
+  <p>The <code><a href=3D#dedicatedworkerglobalscope>D=
edicatedWorkerGlobalScope</a></code> interface must only be &=
lt;a href=3D#exposed-to-javascript>exposed to
+  JavaScript</a> if the <a href=3D#javascript-global-environmen=
t>JavaScript global environment</a> is a <a href=3D#dedicated=
-worker-environment>dedicated worker
+  environment</a>.</p>
+
+  <p><code><a href=3D#dedicatedworkerglobalscope>Dedic=
atedWorkerGlobalScope</a></code> objects act as if they had a=
n implicit
+  <code><a href=3D#messageport>MessagePort</a></cod=
e> associated with them. This port is part of a channel that is set up=
 when
+  the worker is created, but it is not exposed. This object must never b=
e garbage collected before
+  the <code><a href=3D#dedicatedworkerglobalscope>DedicatedW=
orkerGlobalScope</a></code> object.</p>
+
+  <p>All messages received by that port must immediately be retarg=
eted at the
+  <code><a href=3D#dedicatedworkerglobalscope>DedicatedWorke=
rGlobalScope</a></code> object.</p>
+
+  <p>The <dfn id=3Ddom-dedicatedworkerglobalscope-postmessage t=
itle=3Ddom-DedicatedWorkerGlobalScope-postMessage><code>postMess=
age()</code></dfn>
+  method on <code><a href=3D#dedicatedworkerglobalscope>Dedi=
catedWorkerGlobalScope</a></code> objects must act as if, whe=
n invoked, it
+  immediately invoked <a href=3D#dom-messageport-postmessage title=3D=
dom-MessagePort-postMessage>the method of the same name</a>
+  on the port, with the same arguments, and returned the same return val=
ue.</p>
+
+<!--
+  <p>Similarly, the <dfn
+  title=3D"dom-DedicatedWorkerGlobalScope-startConversation"&g=
t;<code>startConversation()</code></dfn>
+  method on <code>DedicatedWorkerGlobalScope</code> objects =
must act as if, when invoked, it
+  immediately invoked <span title=3D"dom-MessagePort-startConver=
sation">the method of the same
+  name</span> on the port, with the same arguments, and returned t=
he same return value.</p>
+-->
+
+  <p>The following are the <a href=3D#event-handlers>event h=
andlers</a> (and their corresponding <a href=3D#event-handler-ev=
ent-type title=3D"event
+  handler event type">event handler event types</a>) that =
must be supported, as <a href=3D#event-handler-idl-attributes>event
+  handler IDL attributes</a>, by objects implementing the <code=
><a href=3D#dedicatedworkerglobalscope>DedicatedWorkerGlobalScop=
e</a></code>
+  interface:</p>
+
+  <table><thead><tr><th><a href=3D#event-hand=
lers title=3D"event handlers">Event handler</a> <th=
><a href=3D#event-handler-event-type>Event handler event type&lt=
;/a>
+   <tbody><tr><td><dfn id=3Dhandler-dedicatedworker=
globalscope-onmessage title=3Dhandler-DedicatedWorkerGlobalScope-onmessag=
e><code>onmessage</code></dfn> <td> <code t=
itle=3Devent-message><a href=3D#event-message>message</a>&=
lt;/code>
+  </table><p>For the purposes of the <a href=3D#applicati=
on-cache>application cache</a> networking model, a dedicated wor=
ker is
+  an extension of the <a href=3D#cache-host>cache host</a> f=
rom which it was created.</p>
+
+
+
+  <h5 id=3Dshared-workers-and-the-sharedworkerglobalscope-interface&g=
t;<span class=3Dsecno>10.2.1.3 </span>Shared workers and the =
<code><a href=3D#sharedworkerglobalscope>SharedWorkerGlobalSc=
ope</a></code> interface</h5>
+
+  <pre class=3Didl>[Global]
+/*sealed*/ interface <dfn id=3Dsharedworkerglobalscope>SharedWorke=
rGlobalScope</dfn> : <a href=3D#workerglobalscope>WorkerGloba=
lScope</a> {
+  readonly attribute DOMString <a href=3D#dom-sharedworkerglobalscope=
-name title=3Ddom-SharedWorkerGlobalScope-name>name</a>;
+  readonly attribute <a href=3D#applicationcache>ApplicationCache&=
lt;/a> <a href=3D#dom-sharedworkerglobalscope-applicationcache titl=
e=3Ddom-SharedWorkerGlobalScope-applicationCache>applicationCache</=
a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-sharedworkerglobalscope-onconnect title=3Dhandler=
-SharedWorkerGlobalScope-onconnect>onconnect</a>;
+};</pre>
+
+  <p>The <code><a href=3D#sharedworkerglobalscope>Shar=
edWorkerGlobalScope</a></code> interface must only be <a h=
ref=3D#exposed-to-javascript>exposed to
+  JavaScript</a> if the <a href=3D#javascript-global-environmen=
t>JavaScript global environment</a> is a <a href=3D#shared-wo=
rker-environment>shared worker
+  environment</a>.</p>
+
+  <p>Shared workers receive message ports through <code title=3D=
event-WorkerGlobalScope-connect>connect</code> events on their &=
lt;code><a href=3D#sharedworkerglobalscope>SharedWorkerGlobalSco=
pe</a></code> object for each
+  connection.</p>
+
+  <p>The <dfn id=3Ddom-sharedworkerglobalscope-name title=3Ddom=
-SharedWorkerGlobalScope-name><code>name</code></dfn&gt=
; attribute must return
+  the value it was assigned when the <code><a href=3D#sharedwor=
kerglobalscope>SharedWorkerGlobalScope</a></code> object w=
as created by the
+  "<a href=3D#run-a-worker>run a worker</a>" algor=
ithm. Its value represents the name that can be used to obtain a
+  reference to the worker using the <code><a href=3D#sharedwork=
er>SharedWorker</a></code> constructor.</p>
+
+  <p>The following are the <a href=3D#event-handlers>event h=
andlers</a> (and their corresponding <a href=3D#event-handler-ev=
ent-type title=3D"event
+  handler event type">event handler event types</a>) that =
must be supported, as <a href=3D#event-handler-idl-attributes>event
+  handler IDL attributes</a>, by objects implementing the <code=
><a href=3D#sharedworkerglobalscope>SharedWorkerGlobalScope</=
a></code>
+  interface:</p>
+
+  <table><thead><tr><th><a href=3D#event-hand=
lers title=3D"event handlers">Event handler</a> <th=
><a href=3D#event-handler-event-type>Event handler event type&lt=
;/a>
+   <tbody><tr><td><dfn id=3Dhandler-sharedworkerglo=
balscope-onconnect title=3Dhandler-SharedWorkerGlobalScope-onconnect>&=
lt;code>onconnect</code></dfn> <td> <code title=3D=
event-connect>connect</code>
+  </table><p>For the purposes of the <a href=3D#applicati=
on-cache>application cache</a> networking model, a shared worker=
 is its
+  own <a href=3D#cache-host>cache host</a>. The <a href=3D=
#run-a-worker>run a worker</a> algorithm takes care of associati=
ng the
+  worker with an <a href=3D#application-cache>application cache&lt=
;/a>.</p>
+
+  <p class=3Dnote>The <code title=3Ddom-SharedWorkerGlobalScope=
-applicationCache><a href=3D#dom-sharedworkerglobalscope-applicatio=
ncache>applicationCache</a></code> attribute returns the
+  <code><a href=3D#applicationcache>ApplicationCache</a&g=
t;</code> object for the worker.</p><!-- normative conf cr=
iteria is in the
+  appcache section -->
+
+
+
+  <h4 id=3Dthe-event-loop><span class=3Dsecno>10.2.2 </sp=
an>The event loop</h4>
+
+  <p>Each <code><a href=3D#workerglobalscope>WorkerGlo=
balScope</a></code> object has a distinct <a href=3D#event=
-loop>event loop</a>, separate
+  from those used by <a href=3D#unit-of-related-similar-origin-browsi=
ng-contexts title=3D"unit of related similar-origin browsing context=
s">units of related
+  similar-origin browsing contexts</a>. This <a href=3D#event-l=
oop>event loop</a> has no associated
+  <a href=3D#browsing-context>browsing context</a>, and its =
<a href=3D#task-queue title=3D"task queue">task queues&lt=
;/a> only have
+  events, callbacks, and networking activity as <a href=3D#concept-ta=
sk title=3Dconcept-task>tasks</a>. These <a href=3D#event-loo=
p title=3D"event loop">event loops</a> are created by =
the <a href=3D#run-a-worker>run a worker</a> algorithm.</p=
>
+
+  <p>Each <code><a href=3D#workerglobalscope>WorkerGlo=
balScope</a></code> object also has a <dfn id=3Ddom-worker=
globalscope-closing title=3Ddom-WorkerGlobalScope-closing>closing</=
dfn> flag, which must initially be false, but which
+  can get set to true by the algorithms in the processing model section =
below.</p>
+
+  <p>Once the <code><a href=3D#workerglobalscope>Worke=
rGlobalScope</a></code>'s <a href=3D#dom-workerglobalscope=
-closing title=3Ddom-WorkerGlobalScope-closing>closing</a> flag =
is set to true, the <a href=3D#event-loop>event
+  loop</a>'s <a href=3D#task-queue title=3D"task queue&quo=
t;>task queues</a> must discard any further <a href=3D#concep=
t-task title=3Dconcept-task>tasks</a> that would be added to the=
m (tasks already on the queue are
+  unaffected except where otherwise specified). Effectively, once the &l=
t;a href=3D#dom-workerglobalscope-closing title=3Ddom-WorkerGlobalScope-c=
losing>closing</a> flag is true, timers stop firing,
+  notifications for all pending asynchronous operations are dropped, etc=
.</p>
+
+
+
+  <h4 id=3D"the-worker's-lifetime"><span class=3Dsecn=
o>10.2.3 </span>The worker's lifetime</h4>
+
+  <p>Workers communicate with other workers and with <a href=3D=
#browsing-context title=3D"browsing context">browsing
+  contexts</a> through <a href=3D#channel-messaging title=3D&qu=
ot;channel messaging">message channels</a> and their
+  <code><a href=3D#messageport>MessagePort</a></cod=
e> objects.</p>
+
+  <p>Each <code><a href=3D#workerglobalscope>WorkerGlo=
balScope</a></code> <var title=3D"">worker gl=
obal scope</var> has a list of
+  <dfn id=3D"the-worker's-ports">the worker's ports</=
dfn>, which consists of all the <code><a href=3D#messageport&=
gt;MessagePort</a></code> objects that are
+  entangled with another port and that have one (but only one) port owne=
d by <var title=3D"">worker
+  global scope</var>. This list includes <!--all the <code&g=
t;MessagePort</code> objects that are in
+  events pending in the <code>WorkerGlobalScope</code> objec=
t's <span>event loop</span>, as well as
+  (commented out because in practice it makes no difference either way a=
s far as I can tell, and it
+  would be hard to strictly implement since these ports might not yet be=
 across the thread
+  boundary)--> the implicit <code><a href=3D#messageport>=
MessagePort</a></code> in the case of <a href=3D#dedicated=
workerglobalscope title=3DDedicatedWorkerGlobalScope>dedicated workers=
</a>.</p>
+
+  <p>Each <code><a href=3D#workerglobalscope>WorkerGlo=
balScope</a></code> also has a list of <dfn id=3D"the=
-worker's-workers">the worker's workers</dfn>.
+  Initially this list is empty; it is populated when the worker creates =
or obtains further
+  workers.</p>
+
+  <p>Finally, each <code><a href=3D#workerglobalscope>=
WorkerGlobalScope</a></code> also has a list of <dfn id=3D=
"the-worker's-documents">the worker's
+  <code>Document</code>s</dfn>. Initially this list is=
 empty; it is populated when the worker is
+  created.</p>
+
+  <p>Whenever a <code><a href=3D#document>Document<=
/a></code> <var title=3D"">d</var> is <=
dfn id=3D"add-a-document-to-the-worker's-documents" title=3D&qu=
ot;add a document to the
+  worker's documents">added to the worker's <code>Document=
</code>s</dfn>, the user agent must, for
+  each worker <var title=3D"">q</var> in the list =
of <a href=3D"#the-worker's-workers">the worker's workers=
</a> whose list of
+  <a href=3D"#the-worker's-documents">the worker's <c=
ode>Document</code>s</a> does not contain <var title=3D=
"">d</var>, <a href=3D"#add-a-document-to-the-=
worker's-documents" title=3D"add a document to the worker's doc=
uments">add <var title=3D"">d</var> to <=
var title=3D"">q</var>'s <code>WorkerGlobalScope=
</code> owner's list of <span>the worker's
+  <code>Document</code>s</span></a>.</p> &=
lt;!-- suggestions welcome on making this sentence into
+  understandable English -->
+
+  <p>Whenever a <code><a href=3D#document>Document<=
/a></code> object is <a href=3D#discard-a-document title=3D&q=
uot;discard a Document">discarded</a>,
+  it must be removed from the list of <a href=3D"#the-worker's-d=
ocuments">the worker's <code>Document</code>s</a&g=
t; of each
+  worker whose list contains that <code><a href=3D#document>=
Document</a></code>.</p>
+
+<!--CLEANUP-->
+  <p>Given a <a href=3D#settings-object>settings object</=
a> <var title=3D"">o</var> when creating or obta=
ining a
+  worker, the <dfn id=3Dlist-of-relevant-document-objects-to-add>l=
ist of relevant <code>Document</code> objects to add</dfn&=
gt; depends on the type
+  of <a href=3D#global-object>global object</a> specified by=
 <var title=3D"">o</var>'s. If <var title=3D&quo=
t;">o</var>
+  specifies a <a href=3D#global-object>global object</a> tha=
t is a <code><a href=3D#workerglobalscope>WorkerGlobalScope&l=
t;/a></code> object
+  (i.e. if we are creating a nested worker), then the relevant <code&=
gt;<a href=3D#document>Document</a></code>s are the
+  <a href=3D"#the-worker's-documents">the worker's <c=
ode>Document</code>s</a> of the <a href=3D#global-objec=
t>global object</a> specified by
+  <var title=3D"">o</var>. Otherwise, <var titl=
e=3D"">o</var> specifies a <a href=3D#global-object=
>global object</a> that is a <code><a href=3D#window&gt=
;Window</a></code> object,
+  and the relevant <code><a href=3D#document>Document</a&=
gt;</code> is just the <a href=3D#responsible-document>respon=
sible document</a> specified by <var title=3D"">o&l=
t;/var>.</p>
+
+  <hr><p>A worker is said to be a <dfn id=3Dpermissible-w=
orker>permissible worker</dfn> if its list of <a href=3D&quot=
;#the-worker's-documents">the worker's
+  <code>Document</code>s</a> is not empty.</p>
+
+  <p>A worker is said to be a <dfn id=3Dprotected-worker>pro=
tected worker</dfn> if it is a <a href=3D#permissible-worker>=
permissible worker</a>
+  and either it has outstanding timers, database transactions, or networ=
k connections, or its list
+  of <a href=3D"#the-worker's-ports">the worker's ports&=
lt;/a> is not empty, or its <code><a href=3D#workerglobalscop=
e>WorkerGlobalScope</a></code> is actually
+  a <code><a href=3D#sharedworkerglobalscope>SharedWorkerGlo=
balScope</a></code> object (i.e. the worker is a shared worke=
r).</p>
+
+  <p>A worker is said to be an <dfn id=3Dactive-needed-worker&g=
t;active needed worker</dfn> if any of the <code><a href=3D=
#document>Document</a></code>
+  objects in <a href=3D"#the-worker's-documents">the wor=
ker's <code>Document</code>s</a> are <a href=3D#full=
y-active>fully active</a>.</p>
+
+  <p>A worker is said to be a <dfn id=3Dsuspendable-worker>s=
uspendable worker</dfn> if it is not an <a href=3D#active-needed=
-worker>active needed
+  worker</a> but it is a <a href=3D#permissible-worker>permi=
ssible worker</a>.</p>
+
+
+  <h4 id=3Dprocessing-model-7><span class=3Dsecno>10.2.4 &lt=
;/span>Processing model</h4>
+
+<!--CLEANUP-->
+  <p>When a user agent is to <dfn id=3Drun-a-worker>run a wo=
rker</dfn> for a script with <a href=3D#url>URL</a> &lt=
;var title=3D"">url</var> and a <a href=3D#script-s=
ettings-object>script settings object</a> <var title=3D"=
">settings object</var>, it
+  must run the following steps:</p>
+
+  <ol><li id=3Dworker-processing-model-top>
+
+    <p>Create a separate parallel execution environment (i.e. a se=
parate thread or process or
+    equivalent construct), and run the rest of these steps asynchronousl=
y in that context.</p>
+
+    <p>For the purposes of timing APIs, this is the <dfn id=3Do=
fficial-moment-of-creation>official moment of creation</dfn> of =
the
+    worker.</p>
+
+   </li>
+
+   <li><p>Let <var title=3D"">worker global =
scope</var> be the <a href=3D#global-object>global object<=
/a> specified
+   by <var title=3D"">settings object</var>.</l=
i>
+
+   <li><p>If <var title=3D"">worker global s=
cope</var> is actually a
+   <code><a href=3D#sharedworkerglobalscope>SharedWorkerGlob=
alScope</a></code> object (i.e. the worker is a shared worker=
), and there are
+   any <a href=3D#relevant-application-cache title=3D"relevant a=
pplication cache">relevant application caches</a> that are
+   identified by a manifest URL with the <a href=3D#same-origin>sa=
me origin</a> as <var title=3D"">url</var> an=
d
+   that have <var title=3D"">url</var> as one of t=
heir entries, <em>not</em> excluding entries marked
+   as <a href=3D#concept-appcache-foreign title=3Dconcept-appcache-fo=
reign>foreign</a>, then associate the <var title=3D"&quo=
t;>worker
+   global scope</var> with the <a href=3D#concept-appcache-sele=
ction title=3Dconcept-appcache-selection>most appropriate application
+   cache</a> of those that match.</li>
+
+   <li>
+
+<!--CLEANUP-->
+    <p>Attempt to <a href=3D#fetch>fetch</a><!--FET=
CH--> the resource identified by <var title=3D"">url&l=
t;/var>,
+    from the <a href=3D#origin>origin</a> specified
+    by <var title=3D"">settings object</var>, usin=
g the <a href=3D#responsible-document>responsible document</a&gt=
; specified by <var title=3D"">settings object</var&gt=
; as the
+    <a href=3D#referrer-source>referrer source</a> (not the =
specified <a href=3D#api-referrer-source>API referrer source</a&=
gt;!), and with the <i>synchronous flag</i> set and the <i=
>force same-origin
+    flag</i> set.</p> <!-- not http-origin privacy sensit=
ive (looking forward to CORS) -->
+
+    <p>If the attempt fails, then for each <code><a href=3D=
#worker>Worker</a></code> or <code><a href=3D#sha=
redworker>SharedWorker</a></code> object
+    associated with <var title=3D"">worker global scope&=
lt;/var>, <a href=3D#queue-a-task>queue a task</a> to <=
a href=3D#fire-a-simple-event>fire
+    a simple event</a> named <code title=3Devent-error>error=
</code> at that object. Abort these
+    steps.</p>
+
+    <p>If the attempt succeeds, then let <var title=3D"&qu=
ot;>source</var> be the result of running the
+    <a href=3D#utf-8-decode>UTF-8 decode</a> algorithm on th=
e script resource.</p>
+
+    <p>Let <var title=3D"">language</var> be=
 JavaScript.</p>
+
+    <p class=3Dnote>As with <code><a href=3D#the-script-e=
lement>script</a></code> elements, the MIME type of the sc=
ript is ignored.
+    Unlike with <code><a href=3D#the-script-element>script&l=
t;/a></code> elements, there is no way to override the type. It'=
s always
+    assumed to be JavaScript.</p>
+
+   </li>
+
+   <li><p>In the newly created execution environment, create=
 a <a href=3D#javascript-global-environment>JavaScript global
+   environment</a> whose <i><a href=3D#global-object>g=
lobal object</a></i> is <var title=3D"">worke=
r global scope</var>. If <var title=3D"">worker glo=
bal scope</var> is a <code><a href=3D#dedicatedworkergloba=
lscope>DedicatedWorkerGlobalScope</a></code> object, then =
this
+   is a <a href=3D#dedicated-worker-environment>dedicated worker e=
nvironment</a>. Otherwise, <var title=3D"">worker g=
lobal
+   scope</var> is a <code><a href=3D#sharedworkerglobalsc=
ope>SharedWorkerGlobalScope</a></code> object, and this is=
 a <a href=3D#shared-worker-environment>shared worker
+   environment</a>. (In either case, by definition, it is a <a =
href=3D#worker-environment>worker
+   environment</a>.)</li>
+
+   <li><!-- SCRIPT EXEC -->
+
+    <p>Let <var title=3D"">script</var> be a=
 new <a href=3D#concept-script title=3Dconcept-script>script</a&=
gt;.</p>
+
+    <p>Obtain the appropriate <a href=3D#script-execution-envir=
onment>script execution environment</a> for the scripting langua=
ge
+    <var title=3D"">language</var> from <var ti=
tle=3D"">settings object</var>.</p>
+
+    <p>Parse/compile/initialize <var title=3D"">so=
urce</var> using that <a href=3D#script-execution-environment&gt=
;script execution
+    environment</a>, as appropriate for <var title=3D"&quo=
t;>language</var>, and thus obtain a
+    <a href=3D#code-entry-point>code entry-point</a>.</p&=
gt;
+
+    <p>Let <var title=3D"">script</var>'s &l=
t;a href=3D#settings-object>settings object</a> be <var title=
=3D"">settings
+    object</var>.</p>
+
+   </li>
+
+   <li>
+
+    <p><strong>Closing orphan workers</strong>: Start =
monitoring the worker such that no sooner than
+    it stops being either a <a href=3D#protected-worker>protected =
worker</a> or a <a href=3D#suspendable-worker>suspendable wor=
ker</a>, and
+    no later than it stops being a <a href=3D#permissible-worker>p=
ermissible worker</a>, <var title=3D"">worker globa=
l
+    scope</var>'s <a href=3D#dom-workerglobalscope-closing titl=
e=3Ddom-WorkerGlobalScope-closing>closing</a> flag is set to tru=
e<!--
+    v2-onclose and <span title=3D"queue a task">a task i=
s queued</span> to <span>fire a simple
+    event</span> named <code title=3D"event-worker-close&q=
uot;>close</code> at <var title=3D"">worker glob=
al
+    scope</var>-->.</p>
+
+   </li>
+
+   <li>
+
+    <p><strong>Suspending workers</strong>: Start moni=
toring the worker, such that whenever <var title=3D"">wor=
ker global scope</var>'s <a href=3D#dom-workerglobalscope-closin=
g title=3Ddom-WorkerGlobalScope-closing>closing</a>
+    flag is false and the worker is a <a href=3D#suspendable-worker&g=
t;suspendable worker</a>, the user agent suspends
+    execution of script in that worker until such time as either the &lt=
;a href=3D#dom-workerglobalscope-closing title=3Ddom-WorkerGlobalScope-cl=
osing>closing</a> flag switches to true or the worker stops
+    being a <a href=3D#suspendable-worker>suspendable worker</a=
>.</p>
+
+   </li>
+
+   <li>
+
+    <p><a href=3D#jump-to-a-code-entry-point title=3D"jump=
 to a code entry-point">Jump</a> to the <a href=3D#conce=
pt-script title=3Dconcept-script>script</a>'s <a href=3D#code=
-entry-point>code entry-point</a>, and let that run until
+    it either returns, fails to catch an exception, or gets prematurely =
aborted by the "<a href=3D#kill-a-worker>kill a
+    worker</a>" or "<a href=3D#terminate-a-worker>=
terminate a worker</a>" algorithms defined below.</p>
+
+<!-- v2-onclose
+    <p class=3D"note">If the script gets aborted by the =
"<span>kill a worker</span>" algorithm, then
+    that same algorithm will cause there to only be a single <span ti=
tle=3D"concept-task">task</span>
+    in the <code>WorkerGlobalScope</code> object's <span&=
gt;event loop</span> at the next step, namely
+    the task for the <code title=3D"message-close">close=
</code> event. The "<span>terminate a
+    worker</span>" algorithm removes all the events.</p&gt=
;
+-->
+
+   </li>
+
+   <li><p>If <var title=3D"">worker global s=
cope</var> is actually a
+   <code><a href=3D#dedicatedworkerglobalscope>DedicatedWork=
erGlobalScope</a></code> object (i.e. the worker is a dedicat=
ed worker), then
+   enable the <a href=3D#port-message-queue>port message queue<=
/a> of the worker's implicit port.</li>
+
+   <li>
+
+    <p><strong><a href=3D#event-loop>Event loop<!--=
 labeled for ease of discussion --></a></strong>: Run the =
<a href=3D#responsible-event-loop>responsible
+    event loop</a> specified by <var title=3D"">se=
ttings object</var> until it is destroyed.</p>
+
+    <p class=3Dnote>The handling of events or the execution of cal=
lbacks by <a href=3D#concept-task title=3Dconcept-task>tasks</a&=
gt; run by the <a href=3D#event-loop>event loop</a> might get=
 prematurely
+    aborted by the "<a href=3D#kill-a-worker>kill a worker&lt=
;/a>" or "<a href=3D#terminate-a-worker>terminate a wo=
rker</a>" algorithms
+    defined below.</p>
+
+    <p class=3Dnote>The worker processing model remains on this st=
ep until the event loop is
+    destroyed, which happens after the <a href=3D#dom-workerglobalsco=
pe-closing title=3Ddom-WorkerGlobalScope-closing>closing</a>
+    flag is set to true, as described in the <a href=3D#event-loop&gt=
;event loop</a> processing model.</p>
+
+   </li>
+
+   <li>
+
+    <p>Empty the <var title=3D"">worker global sco=
pe</var>'s <a href=3D#list-of-active-timers>list of active ti=
mers</a>.</p>
+
+   </li>
+
+   <li>
+
+    <p>Disentangle all the ports in the list of <a href=3D&quot=
;#the-worker's-ports">the worker's ports</a>.</p>
+
+   </li>
+
+<!-- v2-onclose
+   <li>
+
+    <p>For each <code>Worker</code> or <code>Sha=
redWorker</code> object associated with <var
+    title=3D"">worker global scope</var>, <span&gt=
;queue a task</span> to <span>fire a simple
+    event</span> named <code title=3D"event-worker-close&q=
uot;>close</code> at that object.</p>
+
+   </li>
+-->
+  </ol><hr><p>When a user agent is to <dfn id=3Dkil=
l-a-worker>kill a worker</dfn> it must run the following steps i=
n parallel
+  with the worker's main loop (the "<a href=3D#run-a-worker>r=
un a worker</a>" processing model defined above):</p>
+
+  <ol><!-- v2-onclose
+   <li><p>If the worker's <code>WorkerGlobalScope</=
code> object's <span
+   title=3D"dom-WorkerGlobalScope-closing">closing</span=
> flag is false, <span>queue a task</span> to
+   <span>fire a simple event</span> named <code title=3D&=
quot;event-worker-close">close</code> at the
+   worker's <code>WorkerGlobalScope</code> object.</p>=
</li>
+--><li><p>Set the worker's <code><a href=3D#work=
erglobalscope>WorkerGlobalScope</a></code> object's <a =
href=3D#dom-workerglobalscope-closing title=3Ddom-WorkerGlobalScope-closi=
ng>closing</a> flag to true.</li>
+
+<!-- v2-onclose
+   <li><p>Wait a user-agent-defined amount of time. If the &=
quot;<span>run a worker</span>" processing
+   model defined above immediately starts running event listeners regist=
ered for the <code
+   title=3D"event-worker-close">close</code> event, t=
his time should not be zero — the idea is
+   that the <code title=3D"event-worker-close">close<=
/code> event can be used to clean up when
+   shutting down unexpectedly.</p></li>
+-->
+
+   <li><p>If there are any <a href=3D#concept-task title=3D=
concept-task>tasks</a> queued in the
+   <code><a href=3D#workerglobalscope>WorkerGlobalScope</=
a></code> object's <a href=3D#event-loop>event loop</a&=
gt;'s <a href=3D#task-queue title=3D"task queue">task
+   queues</a><!-- v2-onclose other than the <code title=3D&q=
uot;event-worker-close">close</code> event
+   that this algorithm just added-->, discard them without processing=
 them.</li>
+
+<!-- v2-onclose
+   <li><p>If the <code title=3D"event-worker-close&q=
uot;>close</code> event that this algorithm just queued
+   hasn't yet been dispatched, then abort the script currently running i=
n the worker.</p></li>
+-->
+
+   <li><p>Wait a user-agent-defined amount of time.</li&g=
t;
+
+   <li><p>Abort the script currently running in the worker&l=
t;!-- v2-onclose (if any script is running,
+   then it will be a handler for the <code title=3D"event-worker=
-close">close</code>
+   event)-->.</li>
+
+  </ol><p>User agents may invoke the "<a href=3D#kil=
l-a-worker>kill a worker</a>" processing model on a worker =
at any
+  time, e.g. in response to user requests, in response to CPU quota mana=
gement, or when a worker
+  stops being an <a href=3D#active-needed-worker>active needed wor=
ker</a> if the worker continues executing even after its
+  <a href=3D#dom-workerglobalscope-closing title=3Ddom-WorkerGlobalSc=
ope-closing>closing</a> flag was set to true.</p>
+
+  <hr><p>When a user agent is to <dfn id=3Dterminate-a-wo=
rker>terminate a worker</dfn> it must run the following steps in
+  parallel with the worker's main loop (the "<a href=3D#run-a-wo=
rker>run a worker</a>" processing model defined
+  above):</p>
+
+  <ol><li><p>Set the worker's <code><a href=3D=
#workerglobalscope>WorkerGlobalScope</a></code> object's &=
lt;a href=3D#dom-workerglobalscope-closing title=3Ddom-WorkerGlobalScope-=
closing>closing</a> flag to true.</li>
+
+   <li><p>If there are any <a href=3D#concept-task title=3D=
concept-task>tasks</a> queued in the
+   <code><a href=3D#workerglobalscope>WorkerGlobalScope</=
a></code> object's <a href=3D#event-loop>event loop</a&=
gt;'s <a href=3D#task-queue title=3D"task queue">task
+   queues</a>, discard them without processing them.</li>
+
+   <li><p>Abort the script currently running in the worker.&=
lt;/li>
+
+   <li><p>If the worker's <code><a href=3D#workergl=
obalscope>WorkerGlobalScope</a></code> object is actually =
a
+   <code><a href=3D#dedicatedworkerglobalscope>DedicatedWork=
erGlobalScope</a></code> object (i.e. the worker is a dedicat=
ed worker), then
+   empty the <a href=3D#port-message-queue>port message queue</=
a> of the port that the worker's implicit port is
+   entangled with.</li>
+
+  </ol><hr><p>The <a href=3D#task-source>task so=
urce</a> for the tasks mentioned above is the <a href=3D#dom-man=
ipulation-task-source>DOM manipulation task
+  source</a>.</p>
+
+
+  <h4 id=3Druntime-script-errors-0><span class=3Dsecno>10.2.=
5 </span>Runtime script errors</h4>
+
+  <p>Whenever an uncaught runtime script error occurs in one of th=
e worker's scripts, if the error
+  did not occur while handling a previous script error, the user agent m=
ust <a href=3D#report-the-error>report the
+  error</a> for that <a href=3D#concept-script title=3Dconcept-=
script>script</a>, with the position (line number
+  and column number) where the error occurred, using the <code>&lt=
;a href=3D#workerglobalscope>WorkerGlobalScope</a></code> =
object as the target.
+  </p>
+
+  <p>For shared workers, if the error is still <i title=3Dconce=
pt-error-nothandled><a href=3D#concept-error-nothandled>not hand=
led</a></i>
+  afterwards, the error may be reported to the user.
+  </p>
+
+  <p>For dedicated workers, if the error is still <i title=3Dco=
ncept-error-nothandled><a href=3D#concept-error-nothandled>not
+  handled</a></i> afterwards, the user
+  agent must <a href=3D#queue-a-task>queue a task</a> to &lt=
;a href=3D#concept-event-fire title=3Dconcept-event-fire>fire</a&gt=
; a <a href=3D#concept-events-trusted title=3Dconcept-events-trusted&g=
t;trusted</a> event that uses the <code><a href=3D#errorev=
ent>ErrorEvent</a></code>
+  interface, with the name <code title=3Devent-error>error</cod=
e>, that doesn't bubble and is
+  cancelable, with its <code title=3Ddom-ErrorEvent-message><a =
href=3D#dom-errorevent-message>message</a></code>, <cod=
e title=3Ddom-ErrorEvent-filename><a href=3D#dom-errorevent-filenam=
e>filename</a></code>, <code title=3Ddom-ErrorEvent-lin=
eno><a href=3D#dom-errorevent-lineno>lineno</a></code&g=
t;, <code title=3Ddom-ErrorEvent-colno><a href=3D#dom-errorevent=
-colno>colno</a></code>,
+  attributes initialized appropriately,
+  and with the <code title=3Ddom-ErrorEvent-error><a href=3D#do=
m-errorevent-error>error</a></code> attribute initialized =
to null,
+  at the <code><a href=3D#worker>Worker</a></code&g=
t; object associated with the
+  worker. If the event is not canceled, the user agent must act as if th=
e uncaught runtime script
+  error had occurred in the global scope that the <code><a href=
=3D#worker>Worker</a></code> object is in, thus repeating
+  the entire runtime script error reporting process one level up.</p&=
gt;
+
+  <p>If the implicit port connecting the worker to its <code&gt=
;<a href=3D#worker>Worker</a></code> object has been
+  disentangled (i.e. if the parent worker has been terminated), then the=
 user agent must act as if
+  the <code><a href=3D#worker>Worker</a></code> =
object had no <code title=3Devent-error>error</code> event ha=
ndler and as
+  if that worker's <code title=3Dhandler-WorkerGlobalScope-onerror&gt=
;<a href=3D#handler-workerglobalscope-onerror>onerror</a><=
/code> attribute was
+  null, but must otherwise act as described above.</p>
+
+  <p class=3Dnote>Thus, error reports propagate up to the chain of=
 dedicated workers up to the
+  original <code><a href=3D#document>Document</a></=
code>, even if some of the workers along this chain have been terminat=
ed
+  and garbage collected.</p>
+
+  <p>The <a href=3D#task-source>task source</a> for th=
e task mentioned above is the <a href=3D#dom-manipulation-task-source&=
gt;DOM manipulation task
+  source</a>.</p>
+
+
+  <h4 id=3Dcreating-workers><span class=3Dsecno>10.2.6 </=
span>Creating workers</h4>
+
+  <h5 id=3Dthe-abstractworker-abstract-interface><span class=3D=
secno>10.2.6.1 </span>The <code><a href=3D#abstractwork=
er>AbstractWorker</a></code> abstract interface</h5>
+
+  <pre class=3Didl>[NoInterfaceObject]
+interface <dfn id=3Dabstractworker>AbstractWorker</dfn> {
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-abstractworker-onerror title=3Dhandler-AbstractWo=
rker-onerror>onerror</a>;
+<!-- v2-onclose           attribute <span>EventHandler</span=
> <span title=3D"handler-AbstractWorker-onclose">onclo=
se</span>; -->
+};</pre>
+
+  <p>The following are the <a href=3D#event-handlers>event h=
andlers</a> (and their
+  corresponding <a href=3D#event-handler-event-type title=3D"eve=
nt handler event type">event handler
+  event types</a>) that must be supported, as <a href=3D#event-=
handler-idl-attributes>event handler IDL attributes</a>, by
+  objects implementing the <code><a href=3D#abstractworker>A=
bstractWorker</a></code> interface:</p>
+
+  <table><thead><tr><th><a href=3D#event-hand=
lers title=3D"event handlers">Event handler</a> <th=
><a href=3D#event-handler-event-type>Event handler event type&lt=
;/a>
+   <tbody><tr><td><dfn id=3Dhandler-abstractworker-=
onerror title=3Dhandler-AbstractWorker-onerror><code>onerror<=
/code></dfn> <td> <code title=3Devent-error>error&lt=
;/code>
+<!-- v2-onclose    <tr><td><dfn title=3D"handler-=
AbstractWorker-onclose"><code>onclose</code></dfn&=
gt; <td> <code title=3D"event-worker-close">close&l=
t;/code> -->
+  </table><h5 id=3Dscript-settings-for-workers><span clas=
s=3Dsecno>10.2.6.2 </span>Script settings for workers</h5>
+
+  <p>When the user agent is required to <dfn id=3Dset-up-a-work=
er-script-settings-object>set up a worker script settings object</d=
fn>, given a
+  <var title=3D"">worker global scope</var>, it mu=
st run the following steps:</p>
+
+  <ol><!--CLEANUP--><li><p>Let <var title=3D&=
quot;">inherited responsible browsing context</var> be the =
<a href=3D#responsible-browsing-context>responsible
+   browsing context</a> specified by the <a href=3D#incumbent-s=
ettings-object>incumbent settings
+   object</a>.</li>
+
+<!--CLEANUP-->
+   <li><p>Let <var title=3D"">inherited resp=
onsible document</var> be the <a href=3D#responsible-document&gt=
;responsible
+   document</a> specified by the <a href=3D#incumbent-settings-=
object>incumbent settings
+   object</a>.</li>
+
+   <li><p>Let <var title=3D"">inherited orig=
in</var> be the <a href=3D#origin>origin</a> specified =
by the
+   <a href=3D#incumbent-settings-object>incumbent settings object&=
lt;/a>.</li>
+
+   <li><p>Let <var title=3D"">worker event l=
oop</var> be a newly created <a href=3D#event-loop>event
+   loop</a>.</li>
+
+   <li>
+
+    <p>Let <var title=3D"">settings object</var=
> be a new <a href=3D#script-settings-object>script settings obj=
ect</a> whose
+    algorithms are defined as follows:</p>
+
+    <dl><dt>The <a href=3D#script-execution-environment t=
itle=3D"script execution environment">script execution envir=
onments</a></dt>
+     <dd>
+
+      <p>When the <a href=3D#script-settings-object>script s=
ettings object</a> is created, for each language supported by the
+      user agent, create an appropriate execution environment as defined=
 by the relevant
+      specification.</p>
+
+      <p>When a <a href=3D#script-execution-environment>scri=
pt execution environment</a> is needed, return the appropriate one =
from
+      those created when the <a href=3D#script-settings-object>scr=
ipt settings object</a> was created.</p>
+
+      <p class=3Dnote>Currently, workers only support JavaScript, =
so only a JavaScript execution
+      environment is actually needed here.</p>
+
+     </dd>
+
+     <dt>The <a href=3D#global-object>global object</a&gt=
;</dt>
+     <dd>
+
+      <p>Return <var title=3D"">worker global scop=
e</var>.</p>
+
+     </dd>
+
+     <dt>The <a href=3D#responsible-browsing-context>respons=
ible browsing context</a></dt>
+     <dd>
+
+      <p>Return <var title=3D"">inherited responsi=
ble browsing context</var>.</p>
+
+     </dd>
+
+     <dt>The <a href=3D#responsible-document>responsible doc=
ument</a></dt>
+     <dd>
+
+      <p>Return <var title=3D"">inherited responsi=
ble document</var>.</p>
+
+     </dd>
+
+     <dt>The <a href=3D#responsible-event-loop>responsible e=
vent loop</a></dt>
+     <dd>
+
+      <p>Return <var title=3D"">worker event loop&=
lt;/var>.</p>
+
+     </dd>
+
+     <dt>The <a href=3D#api-referrer-source>API referrer sou=
rce</a></dt>
+     <dd>
+
+      <p>Return the <code><a href=3D#document>Document=
</a></code> with which the <code><a href=3D#window&g=
t;Window</a></code> is currently
+      associated.</p>
+
+     </dd>
+
+     <dt>The <a href=3D#api-url-character-encoding>API URL c=
haracter encoding</a></dt>
+     <dd>
+
+      <p>Return UTF-8.</p>
+
+     </dd>
+
+     <dt>The <a href=3D#api-base-url>API base URL</a>&=
lt;/dt>
+     <dd>
+
+      <p>Return <var title=3D"">worker URL</var=
>.</p>
+
+     </dd>
+
+     <dt>The <a href=3D#origin>origin</a> and <a hr=
ef=3D#effective-script-origin>effective script origin</a></dt=
>
+     <dd>
+
+      <p>Return <var title=3D"">inherited origin&l=
t;/var>.</p>
+
+     </dd>
+
+    </dl></li>
+
+   <li><p>Return <var title=3D"">settings ob=
ject</var>.</li>
+
+  </ol><h5 id=3Ddedicated-workers-and-the-worker-interface>&=
lt;span class=3Dsecno>10.2.6.3 </span>Dedicated workers and the =
<code><a href=3D#worker>Worker</a></code> interfa=
ce</h5>
+
+  <pre class=3Didl>[<a href=3D#dom-worker title=3Ddom-Worker&gt=
;Constructor</a>(DOMString scriptURL)]
+interface <dfn id=3Dworker>Worker</dfn> : <a href=3D#even=
ttarget>EventTarget</a> {
+  void <a href=3D#dom-worker-terminate title=3Ddom-Worker-terminate&g=
t;terminate</a>();
+
+  void <a href=3D#dom-worker-postmessage title=3Ddom-Worker-postMessa=
ge>postMessage</a>(any message, optional sequence<<a h=
ref=3D#transferable>Transferable</a>> transfer);<!--
+  <span>MessagePort</span> <span title=3D"dom-Worker=
-startConversation">startConversation</span>(any message);-=
->
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-worker-onmessage title=3Dhandler-Worker-onmessage=
>onmessage</a>;
+};
+<a href=3D#worker>Worker</a> implements <a href=3D#abstra=
ctworker>AbstractWorker</a>;</pre>
+
+  <p>The <dfn id=3Ddom-worker-terminate title=3Ddom-Worker-term=
inate><code>terminate()</code></dfn> method, when in=
voked, must
+  cause the "<a href=3D#terminate-a-worker>terminate a worker=
</a>" algorithm to be run on the worker with which the object
+  is associated.</p>
+
+  <p><code><a href=3D#worker>Worker</a></code=
> objects act as if they had an implicit <code><a href=3D#mes=
sageport>MessagePort</a></code> associated
+  with them. This port is part of a channel that is set up when the work=
er is created, but it is not
+  exposed. This object must never be garbage collected before the <co=
de><a href=3D#worker>Worker</a></code> object.</p=
>
+
+  <p>All messages received by that port must immediately be retarg=
eted at the <code><a href=3D#worker>Worker</a></code=
>
+  object.</p>
+
+  <p>The <dfn id=3Ddom-worker-postmessage title=3Ddom-Worker-po=
stMessage><code>postMessage()</code></dfn> method on
+  <code><a href=3D#worker>Worker</a></code> obje=
cts must act as if, when invoked, it immediately invoked <a href=3D#do=
m-messageport-postmessage title=3Ddom-MessagePort-postMessage>the meth=
od of the same name</a> on the port, with the same
+  arguments, and returned the same return value.</p>
+
+<!--
+  <p>Similarly, the <dfn title=3D"dom-Worker-startConversa=
tion"><code>startConversation()</code></dfn>
+  method on <code>Worker</code> objects must act as if, when=
 invoked, it immediately invoked <span
+  title=3D"dom-MessagePort-startConversation">the method of=
 the same name</span> on the port, with the
+  same arguments, and returned the same return value.</p>
+-->
+
+  <div class=3Dexample>
+
+   <p>The <code title=3Ddom-Worker-postMessage><a href=3D=
#dom-worker-postmessage>postMessage()</a></code>
+   method's first argument can be structured data:</p>
+
+   <pre>worker.postMessage({opcode: 'activate', device: 1938, para=
meters: [23, 102]});</pre>
+
+  </div>
+
+  <p>The following are the <a href=3D#event-handlers>event h=
andlers</a> (and their corresponding <a href=3D#event-handler-ev=
ent-type title=3D"event
+  handler event type">event handler event types</a>) that =
must be supported, as <a href=3D#event-handler-idl-attributes>event=
 handler IDL attributes</a>,
+  by objects implementing the <code><a href=3D#worker>Worker=
</a></code> interface:</p>
+
+  <table><thead><tr><th><a href=3D#event-hand=
lers title=3D"event handlers">Event handler</a> <th=
><a href=3D#event-handler-event-type>Event handler event type&lt=
;/a>
+   <tbody><tr><td><dfn id=3Dhandler-worker-onmessag=
e title=3Dhandler-Worker-onmessage><code>onmessage</code>&=
lt;/dfn> <td> <code title=3Devent-message><a href=3D#ev=
ent-message>message</a></code>
+  </table><hr><p>When the <dfn id=3Ddom-worker titl=
e=3Ddom-Worker><code>Worker(<var title=3D"">scri=
ptURL</var>)</code></dfn> constructor is invoked, the
+  user agent must run the following steps:</p>
+
+  <ol><li><p>The user agent may throw a <code>&l=
t;a href=3D#securityerror>SecurityError</a></code> excepti=
on and abort these steps if
+   the request violates a policy decision (e.g. if the user agent is con=
figured to not allow the
+   page to start dedicated workers).</li>
+
+<!--CLEANUP-->
+   <li><p><a href=3D#resolve-a-url title=3D"resolve =
a url">Resolve</a> the <var title=3D"">scri=
ptURL</var> argument
+   relative to the <a href=3D#api-base-url>API base URL</a> =
specified by the <a href=3D#entry-settings-object>entry settings ob=
ject</a> when
+   the method was invoked.</li>
+
+   <li><p>If this fails, throw a <code><a href=3D#s=
yntaxerror>SyntaxError</a></code> exception and abort thes=
e steps.</li>
+
+   <li><p>Let <var title=3D"">worker URL<=
/var> be the resulting <a href=3D#absolute-url>absolute URL</=
a>.</li>
+
+   <li>
+
+<!--CLEANUP-->
+    <p>If the <a href=3D#concept-url-scheme title=3Dconcept-url=
-scheme>scheme</a> component of <var title=3D"">=
worker URL</var>
+    is not "<code title=3Ddata-protocol>data</code>&quo=
t;, and the <a href=3D#origin>origin</a> of <var title=3D&=
quot;">worker URL</var>
+    is not the <a href=3D#same-origin title=3D"same origin"=
>same</a> as the
+    <a href=3D#origin>origin</a> specified by the <a href=
=3D#incumbent-settings-object>incumbent settings object</a>, the=
n throw a <code><a href=3D#securityerror>SecurityError</a&=
gt;</code> exception and
+    abort these steps.</p>
+
+    <p class=3Dnote>Thus, scripts must either be external files wi=
th the same scheme, host, and port
+    as the original page, or <a href=3D#data-protocol title=3D"d=
ata protocol"><code title=3D"">data:</code>=
 URLs</a>.
+    For example, you can't load a script from a <a href=3D#javascript=
-protocol title=3D"javascript protocol"><code title=3D&qu=
ot;">javascript:</code> URL</a>, and an <code>h=
ttps:</code> page couldn't start workers
+    using scripts with <code>http:</code> URLs.</p>
+
+   </li>
+
+<!--CLEANUP-->
+   <li><p>Create a new <code><a href=3D#dedicatedwo=
rkerglobalscope>DedicatedWorkerGlobalScope</a></code> obje=
ct. Let <var title=3D"">worker global
+   scope</var> be this new object.</li>
+
+   <li><p><a href=3D#set-up-a-worker-script-settings-obje=
ct>Set up a worker script settings object</a> with <var title=
=3D"">worker global
+   scope</var>, and let <var title=3D"">settings o=
bject</var> be the result.</li>
+
+   <li><p>Create a new <code><a href=3D#worker>W=
orker</a></code> object, associated with <var title=3D&quo=
t;">worker global
+   scope</var>. Let <var title=3D"">worker</var=
> be this new object.</li>
+
+<!--CLEANUP-->
+   <li><p><a href=3D#create-a-new-messageport-object>C=
reate a new <code>MessagePort</code> object</a> whose &=
lt;a href=3D#concept-port-owner title=3Dconcept-port-owner>owner</a=
>
+   is the <a href=3D#incumbent-settings-object>incumbent settings =
object</a>. Let
+   this be the <var title=3D"">outside port</var>.=
</li>
+
+   <li><p>Associate the <var title=3D"">outs=
ide port</var> with <var title=3D"">worker</var&=
gt;.</li>
+
+<!--CLEANUP-->
+   <li><p><a href=3D#create-a-new-messageport-object>C=
reate a new <code>MessagePort</code> object</a> whose &=
lt;a href=3D#concept-port-owner title=3Dconcept-port-owner>owner</a=
> is <var title=3D"">script settings</var>
+   Let <var title=3D"">inside port</var> be this n=
ew object.</li>
+
+   <li><p>Associate <var title=3D"">inside p=
ort</var> with <var title=3D"">worker global
+   scope</var>.</li>
+
+   <li><p><a href=3D#entangle>Entangle</a> <v=
ar title=3D"">outside port</var> and <var title=3D&=
quot;">inside
+   port</var>.</li>
+
+   <li><p>Return <var title=3D"">worker</=
var>, and run the following steps asynchronously.</li>
+
+<!-- (this is done by the "run a worker" algorithm)
+   <li><p>Enable <var title=3D"">inside port=
</var>'s <span>port message queue</span>.</p><=
/li>
+-->
+
+   <li><p>Enable <var title=3D"">outside por=
t</var>'s <a href=3D#port-message-queue>port message queue&lt=
;/a>.</li>
+
+   <li>
+
+<!--CLEANUP-->
+    <p>Let <var title=3D"">docs</var> be the=
 <a href=3D#list-of-relevant-document-objects-to-add>list of releva=
nt <code>Document</code> objects to
+    add</a> given the <a href=3D#incumbent-settings-object>i=
ncumbent settings object</a>.</p>
+
+   </li>
+
+   <li>
+
+    <p><a href=3D"#add-a-document-to-the-worker's-document=
s" title=3D"add a document to the worker's documents">A=
dd to <var title=3D"">worker global
+    scope</var>'s list of <span>the worker's <code>Doc=
ument</code>s</span></a> the
+    <code><a href=3D#document>Document</a></code&gt=
; objects in <var title=3D"">docs</var>.</p>
+
+   </li>
+
+   <li>
+
+<!--CLEANUP-->
+    <p>If the <a href=3D#global-object>global object</a&g=
t; specified by the <a href=3D#incumbent-settings-object>incumbent
+    settings object</a> is a <code><a href=3D#workergloba=
lscope>WorkerGlobalScope</a></code> object (i.e. we are cr=
eating a nested worker),
+    add <var title=3D"">worker global scope</var> =
to the list of <a href=3D"#the-worker's-workers">the work=
er's workers</a> of
+    the <code><a href=3D#workerglobalscope>WorkerGlobalScope=
</a></code> object that is the <a href=3D#global-object&gt=
;global object</a> specified by the <a href=3D#incumbent-setting=
s-object>incumbent settings object</a>.</p>
+
+   </li>
+
+   <li>
+
+<!--CLEANUP-->
+    <p><a href=3D#run-a-worker>Run a worker</a> for th=
e script with <a href=3D#url>URL</a> <var title=3D"&q=
uot;>worker
+    URL</var> and the <a href=3D#script-settings-object>scri=
pt settings object</a> <var title=3D"">settings obj=
ect</var>.</p>
+
+   </li>
+
+  </ol><h5 id=3Dshared-workers-and-the-sharedworker-interface&g=
t;<span class=3Dsecno>10.2.6.4 </span>Shared workers and the =
<code><a href=3D#sharedworker>SharedWorker</a></code=
> interface</h5>
+
+  <pre class=3Didl>[<a href=3D#dom-sharedworker title=3Ddom-Sha=
redWorker>Constructor</a>(DOMString scriptURL, optional DOMStrin=
g name)]
+interface <dfn id=3Dsharedworker>SharedWorker</dfn> : <a =
href=3D#eventtarget>EventTarget</a> {
+  readonly attribute <a href=3D#messageport>MessagePort</a> =
<a href=3D#dom-sharedworker-port title=3Ddom-SharedWorker-port>port=
</a>;
+};
+<a href=3D#sharedworker>SharedWorker</a> implements <a hr=
ef=3D#abstractworker>AbstractWorker</a>;</pre>
+
+  <p>The <dfn id=3Ddom-sharedworker-port title=3Ddom-SharedWork=
er-port><code>port</code></dfn> attribute must retur=
n the value
+  it was assigned by the object's constructor. It represents the <cod=
e><a href=3D#messageport>MessagePort</a></code> for
+  communicating with the shared worker.</p>
+
+  <p>When the <dfn id=3Ddom-sharedworker title=3Ddom-SharedWork=
er><code>SharedWorker(<var title=3D"">scriptURL&=
lt;/var>, <var title=3D"">name</var>)</code&g=
t;</dfn> constructor is invoked, the user agent must run the follow=
ing
+  steps:</p>
+
+  <ol><li><p>The user agent may throw a <code>&l=
t;a href=3D#securityerror>SecurityError</a></code> excepti=
on and abort these steps if
+   the request violates a policy decision (e.g. if the user agent is con=
figured to not allow the
+   page to start shared workers).</li>
+
+   <li><p><a href=3D#resolve-a-url title=3D"resolve =
a url">Resolve</a> the <var title=3D"">scri=
ptURL</var>
+   argument.</li>
+
+   <li><p>If this fails, throw a <code><a href=3D#s=
yntaxerror>SyntaxError</a></code> exception and abort thes=
e steps.</li>
+
+   <li><p>Let <var title=3D"">scriptURL</=
var> be the resulting <a href=3D#absolute-url>absolute URL</a=
> and <var title=3D"">parsed scriptURL</var> be =
the resulting <a href=3D#parsed-url>parsed URL</a>.</li&gt=
;
+
+   <li><p>Let <var title=3D"">name</var&g=
t; be the value of the second argument, or the empty string if
+   the second argument was omitted.</li>
+
+   <li>
+
+<!--CLEANUP-->
+    <p>If the <a href=3D#concept-url-scheme title=3Dconcept-url=
-scheme>scheme</a> component of <var title=3D"">=
parsed
+    scriptURL</var> is not "<code title=3Ddata-protocol&gt=
;data</code>", and the <a href=3D#origin>origin</a&gt=
; of
+    <var title=3D"">scriptURL</var> is not the &lt=
;a href=3D#same-origin title=3D"same origin">same</a> =
as the <a href=3D#origin>origin</a> specified by
+    the <a href=3D#incumbent-settings-object>incumbent settings ob=
ject</a>, then throw a <code><a href=3D#securityerror>S=
ecurityError</a></code> exception and abort these
+    steps.</p>
+
+    <p class=3Dnote>Thus, scripts must either be external files wi=
th the same scheme, host, and port
+    as the original page, or <a href=3D#data-protocol title=3D"d=
ata protocol"><code title=3D"">data:</code>=
 URLs</a>.
+    For example, you can't load a script from a <a href=3D#javascript=
-protocol title=3D"javascript protocol"><code title=3D&qu=
ot;">javascript:</code> URL</a>, and an <code>h=
ttps:</code> page couldn't start workers
+    using scripts with <code>http:</code> URLs.</p>
+
+   </li>
+
+   <li>
+
+    <p>Let <var title=3D"">docs</var> be the=
 <a href=3D#list-of-relevant-document-objects-to-add>list of releva=
nt <code>Document</code> objects to
+    add</a> given the <a href=3D#incumbent-settings-object>i=
ncumbent settings object</a>.</p>
+
+   </li>
+
+   <li>
+
+    <p>Execute the following substeps atomically:</p>
+
+    <ol><li><p>Create a new <code><a href=3D#=
sharedworker>SharedWorker</a></code> object, which will sh=
ortly be associated with a
+     <code><a href=3D#sharedworkerglobalscope>SharedWorkerGl=
obalScope</a></code> object. Let this <code><a href=3D=
#sharedworker>SharedWorker</a></code> object be <var ti=
tle=3D"">worker</var>.</li>
+
+<!--CLEANUP-->
+     <li><p><a href=3D#create-a-new-messageport-object&gt=
;Create a new <code>MessagePort</code> object</a> whose=
 <a href=3D#concept-port-owner title=3Dconcept-port-owner>owner<=
/a>
+     is the <a href=3D#incumbent-settings-object>incumbent setting=
s object</a>. Let
+     this be the <var title=3D"">outside port</var&gt=
;.</li>
+
+     <li><p>Assign <var title=3D"">outside p=
ort</var> to the <code title=3Ddom-SharedWorker-port><a hr=
ef=3D#dom-sharedworker-port>port</a></code> attribute of &=
lt;var title=3D"">worker</var>.</li>
+
+     <li><p>Let <var title=3D"">worker globa=
l scope</var> be null.</li>
+
+     <li>
+
+<!--CLEANUP-->
+      <p>If <var title=3D"">name</var> is no=
t the empty string and there exists a
+      <code><a href=3D#sharedworkerglobalscope>SharedWorkerG=
lobalScope</a></code> object whose <a href=3D#dom-workergl=
obalscope-closing title=3Ddom-WorkerGlobalScope-closing>closing</a&=
gt; flag is false, whose <code title=3Ddom-WorkerGlobalScope-name>n=
ame</code> attribute is exactly equal to <var title=3D"&quo=
t;>name</var>, and that is the <a href=3D#global-object>gl=
obal object</a> specified by a
+      <a href=3D#script-settings-object>script settings object<=
/a> that specifies as its <a href=3D#origin>origin</a> the
+      <a href=3D#same-origin>same origin</a> as the <a hr=
ef=3D#origin>origin</a> of
+      <var title=3D"">scriptURL</var>, then let &l=
t;var title=3D"">worker global scope</var> be that
+      <code><a href=3D#sharedworkerglobalscope>SharedWorkerG=
lobalScope</a></code> object.</p>
+
+      <p>Otherwise, if <var title=3D"">name</va=
r> is the empty string and there exists a
+      <code><a href=3D#sharedworkerglobalscope>SharedWorkerG=
lobalScope</a></code> object whose <a href=3D#dom-workergl=
obalscope-closing title=3Ddom-WorkerGlobalScope-closing>closing</a&=
gt; flag is false, whose <code title=3Ddom-WorkerGlobalScope-name>n=
ame</code> attribute is the empty string, and whose <code title=3D=
dom-WorkerGlobalScope-location><a href=3D#dom-workerglobalscope-loc=
ation>location</a></code> attribute represents an <a hr=
ef=3D#absolute-url>absolute
+      URL</a> that is exactly equal to <var title=3D"&quot=
;>scriptURL</var>, then let <var title=3D"">work=
er global scope</var> be that <code><a href=3D#sharedworke=
rglobalscope>SharedWorkerGlobalScope</a></code> object.&lt=
;/p>
+
+     </li>
+
+     <li>
+
+<!--CLEANUP-->
+      <p>If <var title=3D"">worker global scope&lt=
;/var> is not null, but the user agent has been
+      configured to disallow communication between the worker
+      represented by the <var title=3D"">worker global s=
cope</var> and the <a href=3D#concept-script title=3Dconcept-scr=
ipt>scripts</a>
+      whose <a href=3D#settings-object title=3D"settings object&=
quot;>settings objects</a> are the <a href=3D#incumbent-setti=
ngs-object>incumbent settings object</a>, then set <var title=
=3D"">worker
+      global scope</var> to null.</p>
+
+      <p class=3Dnote>For example, a user agent could have a devel=
opment mode that isolates a
+      particular <a href=3D#top-level-browsing-context>top-level b=
rowsing context</a> from all other pages, and scripts in that
+      development mode could be blocked from connecting to shared worker=
s running in the normal
+      browser mode.</p>
+
+     </li>
+
+     <li>
+
+      <p>If <var title=3D"">worker global scope&lt=
;/var> is not null, then run these steps:</p>
+
+      <ol><li><p>If <var title=3D"">wo=
rker global scope</var>'s <code title=3Ddom-WorkerGlobalScope-lo=
cation><a href=3D#dom-workerglobalscope-location>location</a&=
gt;</code> attribute represents an <a href=3D#absolute-url>ab=
solute
+       URL</a> that is not exactly equal to <var title=3D"=
">scriptURL</var>, then throw a
+       <code><a href=3D#urlmismatcherror>URLMismatchError&lt=
;/a></code> exception and abort all these steps.</li>
+
+       <li><p>Associate <var title=3D"">work=
er</var> with <var title=3D"">worker global
+       scope</var>.</li>
+
+       <li><p>Let <var title=3D"">settings o=
bject</var> be the <a href=3D#script-settings-object>script s=
ettings object</a>
+       whose <a href=3D#global-object>global object</a> is &=
lt;var title=3D"">worker global scope</var>.</li&gt=
;
+
+<!--CLEANUP-->
+       <li><p><a href=3D#create-a-new-messageport-object&=
gt;Create a new <code>MessagePort</code> object</a> who=
se <a href=3D#concept-port-owner title=3Dconcept-port-owner>owner&l=
t;/a>
+       is <var title=3D"">settings object</var>. L=
et this be the <var title=3D"">inside port</var>.&l=
t;/li>
+
+       <li><p><a href=3D#entangle>Entangle</a> &=
lt;var title=3D"">outside port</var>
+       and <var title=3D"">inside port</var>.</=
li>
+
+       <li><p>Create a <a href=3D#concept-events-trusted =
title=3Dconcept-events-trusted>trusted</a> event that uses the
+       <code><a href=3D#messageevent>MessageEvent</a>&=
lt;/code> interface, with the name <code title=3Devent-connect>c=
onnect</code>, which does not bubble, is not cancelable, has no
+       default action, has a <code title=3Ddom-MessageEvent-data>&=
lt;a href=3D#dom-messageevent-data>data</a></code> attribu=
te whose value
+       is initialized to the empty string, has a <code title=3Ddom-Me=
ssageEvent-ports><a href=3D#dom-messageevent-ports>ports</a&g=
t;</code>
+       attribute whose value is initialized to a <a href=3D#dfn-read-=
only-array title=3Ddfn-read-only-array>read only</a>
+       array containing only the newly created port, and has a <code =
title=3Ddom-MessageEvent-source><a href=3D#dom-messageevent-source&=
gt;source</a></code> attribute whose value is initialized to =
the
+       newly created port, and <a href=3D#queue-a-task>queue a tas=
k</a> to <a href=3D#concept-event-dispatch title=3Dconcept-event=
-dispatch>dispatch</a> the event at <var title=3D""=
>worker global
+       scope</var>.</li>
+
+       <li>
+
+        <p><a href=3D"#add-a-document-to-the-worker's-docu=
ments" title=3D"add a document to the worker's documents"&=
gt;Add to <var title=3D"">worker global
+        scope</var>'s list of <span>the worker's <code&gt=
;Document</code>s</span></a> the
+        <code><a href=3D#document>Document</a></cod=
e> objects in <var title=3D"">docs</var>.</p&=
gt;
+
+       </li>
+
+       <li>
+
+<!--CLEANUP-->
+        <p>If the <a href=3D#global-object>global object<=
/a> specified by the <a href=3D#incumbent-settings-object>incumb=
ent
+        settings object</a> is a <code><a href=3D#workerg=
lobalscope>WorkerGlobalScope</a></code> object, add <va=
r title=3D"">worker global
+        scope</var> to the list of <a href=3D"#the-worker'=
s-workers">the worker's workers</a> of the
+        <code><a href=3D#workerglobalscope>WorkerGlobalScope=
</a></code> object that is the <a href=3D#global-object&gt=
;global
+        object</a> specified by the <a href=3D#incumbent-settin=
gs-object>incumbent settings object</a>.</p>
+
+       </li>
+
+       <li><p>Return <var title=3D"">worker&=
lt;/var> and abort all these steps.</li>
+
+      </ol></li>
+
+     <!-- OTHERWISE: -->
+
+<!--CLEANUP-->
+     <li><p>Create a new <code><a href=3D#sharedwor=
kerglobalscope>SharedWorkerGlobalScope</a></code> object. =
Let <var title=3D"">worker global
+     scope</var> be this new object.</li>
+
+     <li><p><a href=3D#set-up-a-worker-script-settings-ob=
ject>Set up a worker script settings object</a> with <var tit=
le=3D"">worker global
+     scope</var>, and let <var title=3D"">settings=
 object</var> be the result.</li>
+
+     <li><p>Associate <var title=3D"">worker=
</var> with <var title=3D"">worker global
+     scope</var>.</li>
+
+     <li><p>Set the <code title=3Ddom-SharedWorkerGlobalS=
cope-name><a href=3D#dom-sharedworkerglobalscope-name>name</a=
></code> attribute of <var title=3D"">worker glo=
bal scope</var> to <var title=3D"">name</var>=
.</li>
+
+<!--CLEANUP-->
+     <li><p><a href=3D#create-a-new-messageport-object&gt=
;Create a new <code>MessagePort</code> object</a> whose=
 <a href=3D#concept-port-owner title=3Dconcept-port-owner>owner<=
/a> is <var title=3D"">settings object</var>.
+     Let <var title=3D"">inside port</var> be this=
 new object.</li>
+
+     <li><p><a href=3D#entangle>Entangle</a> &lt=
;var title=3D"">outside port</var> and <var title=3D=
"">inside
+     port</var>.</li>
+
+    </ol></li>
+
+   <li><p>Return <var title=3D"">worker</=
var> and perform the remaining steps asynchronously.</li>
+
+   <li><p>Create a <a href=3D#concept-events-trusted titl=
e=3Dconcept-events-trusted>trusted</a> event that uses the
+   <code><a href=3D#messageevent>MessageEvent</a></=
code> interface, with the name <code title=3Devent-connect>conne=
ct</code>,
+   which does not bubble, is not cancelable, has no default action, has =
a <code title=3Ddom-MessageEvent-data><a href=3D#dom-messageeven=
t-data>data</a></code> attribute whose value is initialize=
d to the empty
+   string, has a <code title=3Ddom-MessageEvent-ports><a href=3D=
#dom-messageevent-ports>ports</a></code> attribute whose v=
alue is
+   initialized to a <a href=3D#dfn-read-only-array title=3Ddfn-read-o=
nly-array>read only</a> array containing only the
+   newly created port, and has a <code title=3Ddom-MessageEvent-sourc=
e><a href=3D#dom-messageevent-source>source</a></code&g=
t; attribute whose
+   value is initialized to the newly created port, and <a href=3D#que=
ue-a-task>queue a task</a> to <a href=3D#concept-event-dispat=
ch title=3Dconcept-event-dispatch>dispatch</a> the event at <=
var title=3D"">worker global
+   scope</var>.</li>
+
+   <li>
+
+    <p><a href=3D"#add-a-document-to-the-worker's-document=
s" title=3D"add a document to the worker's documents">A=
dd to <var title=3D"">worker global
+    scope</var>'s list of <span>the worker's <code>Doc=
ument</code>s</span></a> the
+    <code><a href=3D#document>Document</a></code&gt=
; objects in <var title=3D"">docs</var>.</p>
+
+   </li>
+
+   <li>
+
+<!--CLEANUP-->
+    <p>If the <a href=3D#global-object>global object</a&g=
t; specified by the <a href=3D#incumbent-settings-object>incumbent =
settings object</a>
+    is a <code><a href=3D#workerglobalscope>WorkerGlobalScop=
e</a></code> object, add <var title=3D"">work=
er global scope</var> to the list of <a href=3D"#the-worker=
's-workers">the worker's workers</a> of the
+    <code><a href=3D#workerglobalscope>WorkerGlobalScope<=
/a></code> object that is the <a href=3D#global-object>glo=
bal
+    object</a> specified by the <a href=3D#incumbent-settings-o=
bject>incumbent settings object</a>.</p>
+
+   </li>
+
+   <li>
+
+<!--CLEANUP-->
+    <p><a href=3D#run-a-worker>Run a worker</a> for th=
e script with <a href=3D#url>URL</a> <var title=3D"&q=
uot;>scriptURL</var> and the <a href=3D#script-settings-objec=
t>script settings object</a> <var title=3D"">set=
tings
+    object</var>.</p>
+
+   </li>
+
+  </ol><p>The <a href=3D#task-source>task source</a=
> for the tasks mentioned above is the <a href=3D#dom-manipulation-=
task-source>DOM manipulation task
+  source</a>.</p>
+
+
+
+  <h3 id=3Dapis-available-to-workers><span class=3Dsecno>10.=
3 </span>APIs available to workers</h3>
+
+  <pre class=3Didl>partial interface <a href=3D#workerglobalsco=
pe id=3DWorkerGlobalScope-partial>WorkerGlobalScope</a> {<!--=
 not obsolete -->
+  void <a href=3D#dom-workerglobalscope-importscripts title=3Ddom-Wor=
kerGlobalScope-importScripts>importScripts</a>(DOMString... urls=
);
+  readonly attribute <a href=3D#workernavigator>WorkerNavigator&lt=
;/a> <a href=3D#dom-worker-navigator title=3Ddom-worker-navigator&g=
t;navigator</a>;
+};
+<a href=3D#workerglobalscope>WorkerGlobalScope</a> implement=
s <a href=3D#windowtimers>WindowTimers</a>;
+<a href=3D#workerglobalscope>WorkerGlobalScope</a> implement=
s <a href=3D#windowbase64>WindowBase64</a>;</pre>
+
+
+  <p>The DOM APIs — specifically, all the interfaces def=
ined in the DOM specification other
+  than exceptions — must not be <a href=3D#exposed-to-javas=
cript>exposed to JavaScript</a> if the <a href=3D#javascript-=
global-environment>JavaScript
+  global environment</a> is a <a href=3D#worker-environment>=
worker environment</a>. <a href=3D#refsDOM>[DOM]</a>&lt=
;/p>
+
+
+  <h4 id=3Dimporting-scripts-and-libraries><span class=3Dsecno&=
gt;10.3.1 </span>Importing scripts and libraries</h4>
+
+  <p>When a script invokes the <dfn id=3Ddom-workerglobalscope-=
importscripts title=3Ddom-WorkerGlobalScope-importScripts><code>=
importScripts(<var title=3D"">urls</var>)</code&=
gt;</dfn> method on a <code><a href=3D#workerglobalscope&g=
t;WorkerGlobalScope</a></code> object, the user
+  agent must run the following steps:</p>
+
+  <ol><li><p>If there are no arguments, return without=
 doing anything. Abort these steps.</li>
+
+<!--CLEANUP-->
+   <li><p>Let <var title=3D"">settings objec=
t</var> be the
+   <a href=3D#incumbent-settings-object>incumbent settings object&=
lt;/a>.</li>
+
+   <li><p><a href=3D#resolve-a-url title=3D"resolve =
a url">Resolve</a> each argument.</li>
+
+   <li><p>If any fail, throw a <code><a href=3D#syn=
taxerror>SyntaxError</a></code> exception and abort these =
steps.</li>
+
+   <li>
+
+<!--CLEANUP-->
+    <p>Attempt to <a href=3D#fetch>fetch</a><!--FET=
CH--> each resource identified by the resulting <a href=3D#absolute=
-url title=3D"absolute URL">absolute URLs</a>, from th=
e <a href=3D#origin>origin</a> specified by <var title=3D&=
quot;">settings object</var>,
+    using the <a href=3D#api-referrer-source>API referrer source&l=
t;/a> specified by <var title=3D"">settings
+    object</var>, and with the <i>synchronous flag</i>=
 set.</p> <!-- not
+    http-origin privacy sensitive -->
+
+   </li>
+
+   <li>
+
+    <p>For each argument in turn, in the order given, starting wit=
h the first one, run these
+    substeps:</p>
+
+    <ol><li>
+
+      <p>Wait for the fetching attempt for the corresponding resou=
rce to complete.</p>
+
+      <p>If the fetching attempt failed, throw a <code><a=
 href=3D#networkerror>NetworkError</a></code> exception an=
d abort all
+      these steps.</p>
+
+      <p>If the attempt succeeds, then let <var title=3D"&=
quot;>source</var> be the result of running the
+      <a href=3D#utf-8-decode>UTF-8 decode</a> algorithm on =
the script resource.</p>
+
+      <p>Let <var title=3D"">language</var> =
be JavaScript.</p>
+
+      <p class=3Dnote>As with the worker's script, the script here=
 is always assumed to be
+      JavaScript, regardless of the MIME type.</p>
+
+     </li>
+
+     <li>
+
+      <p><a href=3D#create-a-script>Create a script</a&gt=
; using <var title=3D"">source</var> as the script =
source, the
+      <a href=3D#url>URL</a> from which <var title=3D&quo=
t;">source</var> was obtained, <var title=3D""=
>language</var> as the scripting language, and <var title=3D&=
quot;">settings object</var> as
+      the <a href=3D#script-settings-object>script settings object=
</a>.</p>
+
+<!--CLEANUP-->
+      <p>If the script came from a resource whose <a href=3D#ur=
l>URL</a> does not have the <a href=3D#same-origin>same
+      origin</a> as the <a href=3D#origin>origin</a> s=
pecified by the <a href=3D#incumbent-settings-object>incumbent sett=
ings object</a>, then pass the <var title=3D"">mute=
d
+      errors</var> flag to the <a href=3D#create-a-script>cr=
eate a script</a> algorithm as well.</p>
+
+      <p>Let the newly created <a href=3D#concept-script title=3D=
concept-script>script</a> run until it either
+      returns, fails to parse, fails to catch an exception, or gets prem=
aturely aborted by the
+      "<a href=3D#kill-a-worker>kill a worker</a>"=
 or "<a href=3D#terminate-a-worker>terminate a worker</a&gt=
;" algorithms defined
+      above.</p>
+
+      <p>If it failed to parse, then throw an ECMAScript <code =
title=3Djs-SyntaxError><a href=3D#js-syntaxerror>SyntaxError<=
/a></code> exception and abort all these steps. <a href=3D#re=
fsECMA262>[ECMA262]</a></p>
+
+<!--CLEANUP-->
+      <p>If an exception was thrown or if the script was premature=
ly aborted, then abort all these
+      steps, letting the exception or aborting continue to be processed =
by the calling <a href=3D#concept-script title=3Dconcept-script>scr=
ipt</a>.</p>
+
+      <p>If the "<a href=3D#kill-a-worker>kill a worker=
</a>" or "<a href=3D#terminate-a-worker>terminate a=
 worker</a>" algorithms abort
+      the script then abort all these steps.</p>
+
+     </li>
+
+    </ol></li>
+
+  </ol><h4 id=3Dthe-workernavigator-object><span class=3D=
secno>10.3.2 </span>The <code><a href=3D#workernavigato=
r>WorkerNavigator</a></code> object</h4>
+
+  <p>The <dfn id=3Ddom-worker-navigator title=3Ddom-worker-navi=
gator><code>navigator</code></dfn> attribute
+  of the <code><a href=3D#workerglobalscope>WorkerGlobalScop=
e</a></code> interface must return an instance of
+  the <code><a href=3D#workernavigator>WorkerNavigator</a=
></code> interface, which represents the
+  identity and state of the user agent (the client):</p>
+
+  <pre class=3Didl>interface <dfn id=3Dworkernavigator>Worke=
rNavigator</dfn> {};
+<a href=3D#workernavigator>WorkerNavigator</a> implements &l=
t;a href=3D#navigatorid>NavigatorID</a>;
+<a href=3D#workernavigator>WorkerNavigator</a> implements &l=
t;a href=3D#navigatorlanguage>NavigatorLanguage</a>;
+<a href=3D#workernavigator>WorkerNavigator</a> implements &l=
t;a href=3D#navigatoronline>NavigatorOnLine</a>;</pre>
+
+  <p>The <code><a href=3D#workernavigator>WorkerNaviga=
tor</a></code> interface must only be <a href=3D#exposed-t=
o-javascript>exposed
+  to JavaScript</a> if the <a href=3D#javascript-global-environ=
ment>JavaScript global
+  environment</a> is a <a href=3D#worker-environment>worker =
environment</a>.</p>
+
+
+
+
+  <h4 id=3Dinterface-objects-and-constructors><span class=3Dsec=
no>10.3.3 </span>Interface objects and constructors</h4>
+
+  <p>Nothing must be <a href=3D#exposed-to-javascript>expose=
d to JavaScript</a> when the <a href=3D#javascript-global-enviro=
nment>JavaScript global
+  environment</a> is a <a href=3D#worker-environment>worker =
environment</a> except for the following:</p>
+
+  <ul><li><p>Any interfaces and exceptions defined by =
a specification that explicitly specifies that
+   they are <a href=3D#exposed-to-javascript>exposed to JavaScript=
</a> when the <a href=3D#javascript-global-environment>JavaSc=
ript global environment</a>
+   is a <a href=3D#worker-environment>worker environment</a>=
.</li>
+
+   <li><p>The interfaces of any objects made accessible thro=
ugh, and the exceptions thrown by any,
+   interfaces or objects of interfaces that are themselves
+   <a href=3D#exposed-to-javascript>exposed to JavaScript</a&gt=
; (i.e. this requirement is transitive).</li>
+
+  </ul><p class=3Dnote>These requirements do not override th=
e requirements defined by the Web IDL
+  specification, in particular concerning the visibility of interfaces a=
nnotated with the <code title=3D"">[NoInterfaceObject]&lt=
;/code> extended attribute.</p>
+
+
+  <h4 id=3Dworker-locations><span class=3Dsecno>10.3.4 </=
span>Worker locations</h4>
+
+  <pre class=3Didl>interface <dfn id=3Dworkerlocation>Worker=
Location</dfn> { };
+<a href=3D#workerlocation>WorkerLocation</a> implements <=
a href=3D#urlutilsreadonly>URLUtilsReadOnly</a>;</pre>
+
+  <p>A <code><a href=3D#workerlocation>WorkerLocation&=
lt;/a></code> object represents an <a href=3D#absolute-url&gt=
;absolute URL</a> set at its
+  creation.</p>
+
+  <p>The <code><a href=3D#workerlocation>WorkerLocatio=
n</a></code> interface supports the <code><a href=3D=
#urlutilsreadonly>URLUtilsReadOnly</a></code>
+  interface. <a href=3D#refsURL>[URL]</a></p>
+
+  <p>When the object is created, the user agent must invoke the el=
ement's
+  <code><a href=3D#urlutilsreadonly>URLUtilsReadOnly</a&g=
t;</code> interface's <a href=3D#concept-uu-set-the-input title=3D=
concept-uu-set-the-input>set the
+  input</a> algorithm with the <a href=3D#absolute-url>absol=
ute URL</a> that the <code><a href=3D#workerlocation>Wo=
rkerLocation</a></code>
+  object represents as the given value.</p>
+
+  <p>The element's <code><a href=3D#urlutilsreadonly>U=
RLUtilsReadOnly</a></code> interface's <a href=3D#concept-=
uu-get-the-base title=3Dconcept-uu-get-the-base>get the base</a>=
 algorithm must return null.</p>
+
+  <p>The <code><a href=3D#workerlocation>WorkerLocatio=
n</a></code> interface must only be <a href=3D#exposed-to-=
javascript>exposed to JavaScript</a> if
+  the <a href=3D#javascript-global-environment>JavaScript global e=
nvironment</a> is a <a href=3D#worker-environment>worker envi=
ronment</a>.</p>
+
+
+
+<!--REMOVE-TOPIC:Workers-->
+
+
+
+
+
+  <h2 id=3Dwebstorage><span class=3Dsecno>11 </span>We=
b storage</h2>
+
+
+
+  <h3 id=3Dintroduction-12><span class=3Dsecno>11.1 </spa=
n>Introduction</h3>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <p>This specification introduces two related mechanisms, similar=
 to HTTP session cookies, for
+  storing name-value pairs on the client side. <a href=3D#refsCOOKIES=
>[COOKIES]</a></p>
+
+  <p>The first is designed for scenarios where the user is carryin=
g out a single transaction, but
+  could be carrying out multiple transactions in different windows at th=
e same time.</p>
+
+  <p>Cookies don't really handle this case well. For example, a us=
er could be buying plane tickets
+  in two different windows, using the same site. If the site used cookie=
s to keep track of which
+  ticket the user was buying, then as the user clicked from page to page=
 in both windows, the ticket
+  currently being purchased would "leak" from one window to th=
e other, potentially causing the user
+  to buy two tickets for the same flight without really noticing.</p&=
gt;
+
+  <p>To address this, this specification introduces the <code t=
itle=3Ddom-sessionStorage><a href=3D#dom-sessionstorage>sessionS=
torage</a></code> IDL attribute. Sites can add data to the se=
ssion
+  storage, and it will be accessible to any page from the same site open=
ed in that window.</p> <!--
+  we're not using xrefs here because this is just an intro -->
+
+  <div class=3Dexample>
+
+   <p>For example, a page could have a checkbox that the user tick=
s to
+   indicate that he wants insurance:</p>
+
+   <pre><label>
+ <input type=3D"checkbox" onchange=3D"sessionStora=
ge.insurance =3D checked ? 'true' : ''">
+  I want insurance on this trip.
+</label></pre>
+
+   <p>A later page could then check, from script, whether the user=
 had checked the checkbox or
+   not:</p>
+
+   <pre>if (sessionStorage.insurance) { ... }</pre>
+
+   <p>If the user had multiple windows opened on the site, each on=
e would have its own individual
+   copy of the session storage object.</p>
+
+  </div>
+
+  <!--
+
+   sessionStorage.flightDeparture =3D 'OSL';
+   sessionStorage.flightArrival =3D 'NYC';
+
+   for (var i in forms[0].elements)
+      sessionStorage["data_" + i.name] =3D i.value;
+
+   // if we add storage of non-strings
+   if (!sessionStorage[documents])
+     sessionStorage[documents] =3D {};
+   sessionStorage[documents][filename] =3D <document/>;
+
+  -->
+
+  <p>The second storage mechanism is designed for storage that spa=
ns multiple windows, and lasts
+  beyond the current session. In particular, Web applications may wish t=
o store megabytes of user
+  data, such as entire user-authored documents or a user's mailbox, on t=
he client side for
+  performance reasons.</p>
+
+  <p>Again, cookies do not handle this case well, because they are=
 transmitted with every
+  request.</p>
+
+  <p>The <code title=3Ddom-localStorage><a href=3D#dom-lo=
calstorage>localStorage</a></code> IDL attribute is used t=
o access a page's
+  local storage area.</p>
+
+  <div class=3Dexample>
+
+   <p>The site at example.com can display a count of how many time=
s the user has loaded its page by
+   putting the following at the bottom of its page:</p>
+
+   <pre><p>
+  You have viewed this page
+  <span id=3D"count">an untold number of<=
/span>
+  time(s).
+</p>
+<script>
+  if (!localStorage.pageLoadCount)
+    localStorage.pageLoadCount =3D 0;
+  localStorage.pageLoadCount =3D parseInt(localStorage.pageLoadCount) + =
1;
+  document.getElementById('count').textContent =3D localStorage.pageLoad=
Count;
+</script></pre>
+
+  </div>
+
+  <p>Each site has its own separate storage area.</p>
+
+
+
+
+  <h3 id=3Dstorage><span class=3Dsecno>11.2 </span>The=
 API</h3>
+
+  <h4 id=3Dthe-storage-interface><span class=3Dsecno>11.2.1 =
</span>The <code><a href=3D#storage-0>Storage</a>=
</code> interface</h4>
+
+  <pre class=3Didl>interface <dfn id=3Dstorage-0>Storage<=
/dfn> {
+  readonly attribute unsigned long <a href=3D#dom-storage-length titl=
e=3Ddom-Storage-length>length</a>;
+  DOMString? <a href=3D#dom-storage-key title=3Ddom-Storage-key>ke=
y</a>(unsigned long index);
+  getter DOMString? <a href=3D#dom-storage-getitem title=3Ddom-Storag=
e-getItem>getItem</a>(DOMString key);
+  setter creator void <a href=3D#dom-storage-setitem title=3Ddom-Stor=
age-setItem>setItem</a>(DOMString key, DOMString value);
+  deleter void <a href=3D#dom-storage-removeitem title=3Ddom-Storage-=
removeItem>removeItem</a>(DOMString key);
+  void <a href=3D#dom-storage-clear title=3Ddom-Storage-clear>clea=
r</a>();
+};</pre>
+
+  <!-- v2 ideas:
+    a getInfo() method that returns an object that tells you:
+       - when the key was added
+       - when the key was last modified
+       - which page was the last to modify the key
+    [-Mihai Sucan]
+
+    support non-string values
+  -->
+
+  <p>Each <code><a href=3D#storage-0>Storage</a>=
</code> object provides access to a list of key/value pairs, which =
are
+  sometimes called items. Keys are strings. Any string (including the em=
pty string) is a valid key.
+  Values are similarly strings.</p>
+
+  <p>Each <code><a href=3D#storage-0>Storage</a>=
</code> object is associated with a list of key/value pairs when it=
 is
+  created, as defined in the sections on the <code title=3Ddom-sessio=
nStorage><a href=3D#dom-sessionstorage>sessionStorage</a>&=
lt;/code>
+  and <code title=3Ddom-localStorage><a href=3D#dom-localstorag=
e>localStorage</a></code> attributes. Multiple separate ob=
jects
+  implementing the <code><a href=3D#storage-0>Storage</a&=
gt;</code> interface can all be associated with the same list of
+  key/value pairs simultaneously.</p>
+
+  <p>The <dfn id=3Ddom-storage-length title=3Ddom-Storage-lengt=
h><code>length</code></dfn> attribute must return th=
e number
+  of key/value pairs currently present in the list associated with the o=
bject.</p>
+
+  <p>The <dfn id=3Ddom-storage-key title=3Ddom-Storage-key>&=
lt;code>key(<var title=3D"">n</var>)</code&gt=
;</dfn> method must
+  return the name of the <var title=3D"">n</var>th=
 key in the list. The order of keys is user-agent
+  defined, but must be consistent within an object so long as the number=
 of keys doesn't change.
+  (Thus, <a href=3D#dom-storage-setitem title=3Ddom-Storage-setItem&g=
t;adding</a> or <a href=3D#dom-storage-removeitem title=3Ddom-St=
orage-removeItem>removing</a> a key may change the order of the =
keys, but merely
+  changing the value of an existing key must not.) <!--The order of k=
eys may differ between
+  instances of the <code>Storage</code> interface accessing =
the same list. [removed for now for
+  clarity, but if people ask, put it back. this is part of the spec.]--&=
gt; If <var title=3D"">n</var> is
+  <!--less than zero or [can't, unsigned]--> greater than or equal=
 to the number of key/value pairs
+  in the object, then this method must return null.</p>
+
+  <p>The <a href=3D#supported-property-names>supported prope=
rty names</a> on a <code><a href=3D#storage-0>Storage&l=
t;/a></code> object are the keys of each
+  key/value pair currently present in the list associated with the objec=
t, in the order that the
+  keys were last added to the storage area.</p>
+
+  <p>The <dfn id=3Ddom-storage-getitem title=3Ddom-Storage-getI=
tem><code>getItem(<var title=3D"">key</var&gt=
;)</code></dfn> method
+  must return the current value associated with the given <var title=3D=
"">key</var>. If the given <var title=3D"&quot=
;>key</var> does not exist in the list associated with the objec=
t then this method must
+  return null. </p>
+
+  <p>The <dfn id=3Ddom-storage-setitem title=3Ddom-Storage-setI=
tem><code>setItem(<var title=3D"">key</var&gt=
;, <var title=3D"">value</var>)</code></df=
n> method must first check if a key/value pair with the given <var =
title=3D"">key</var> already exists in the list associ=
ated with the object.</p>
+
+  <p>If it does not, then a new key/value pair must be added to th=
e list, with the given <var title=3D"">key</var> an=
d with its value set to <var title=3D"">value</var>=
.</p>
+
+  <p>If the given <var title=3D"">key</var> =
<em>does</em> exist in the list, and its value is not
+  equal to <var title=3D"">value</var>, then it mu=
st have its value updated to <var title=3D"">value</va=
r>. If its previous value <em>is</em> equal to <var tit=
le=3D"">value</var>, then
+  the method must do nothing.</p>
+
+  <p>If it couldn't set the new value, the method must throw a &lt=
;code><a href=3D#quotaexceedederror>QuotaExceededError</a>=
</code>
+  exception. (Setting could fail if, e.g., the user has disabled storage=
 for the site, or if the
+  quota has been exceeded.)</p>
+
+  <p>The <dfn id=3Ddom-storage-removeitem title=3Ddom-Storage-r=
emoveItem><code>removeItem(<var title=3D"">key&l=
t;/var>)</code></dfn>
+  method must cause the key/value pair with the given <var title=3D&q=
uot;">key</var> to be removed from the
+  list associated with the object, if it exists. If no item with that ke=
y exists, the method must do
+  nothing.</p>
+
+  <p>The <code title=3Ddom-Storage-setItem><a href=3D#dom=
-storage-setitem>setItem()</a></code> and <code title=3D=
dom-Storage-removeItem><a href=3D#dom-storage-removeitem>removeI=
tem()</a></code> methods must be atomic with respect to failu=
re.
+  In the case of failure, the method does nothing. That is, changes to t=
he data storage area must
+  either be successful, or the data storage area must not be changed at =
all.</p>
+
+  <p>The <dfn id=3Ddom-storage-clear title=3Ddom-Storage-clear&=
gt;<code>clear()</code></dfn> method must atomically ca=
use the
+  list associated with the object to be emptied of all key/value pairs, =
if there are any. If there
+  are none, then the method must do nothing.</p>
+
+  <p class=3Dnote>When the <code title=3Ddom-Storage-setItem&gt=
;<a href=3D#dom-storage-setitem>setItem()</a></code>, &=
lt;code title=3Ddom-Storage-removeItem><a href=3D#dom-storage-remov=
eitem>removeItem()</a></code>, and <code title=3Ddom-St=
orage-clear><a href=3D#dom-storage-clear>clear()</a></c=
ode> methods are invoked, events are fired on the
+  <code><a href=3D#window>Window</a></code> obje=
cts of other <code><a href=3D#document>Document</a><=
/code>s that can access the newly stored or
+  removed data, as defined in the sections on the <code title=3Ddom-s=
essionStorage><a href=3D#dom-sessionstorage>sessionStorage</a=
></code> and <code title=3Ddom-localStorage><a href=3D#=
dom-localstorage>localStorage</a></code> attributes.</p=
> <!-- not normative, see the sections
+  below for the normative statement -->
+
+  <p class=3Dnote>This specification does not require that the abo=
ve methods wait until the data has
+  been physically written to disk. Only consistency in what different sc=
ripts accessing the same
+  underlying list of key/value pairs see is required.</p>
+
+
+  <h4 id=3Dthe-sessionstorage-attribute><span class=3Dsecno>=
11.2.2 </span>The <code title=3Ddom-sessionStorage><a href=
=3D#dom-sessionstorage>sessionStorage</a></code> attribute=
</h4>
+
+  <pre class=3Didl>[NoInterfaceObject]
+interface <dfn id=3Dwindowsessionstorage>WindowSessionStorage</=
dfn> {
+  readonly attribute <a href=3D#storage-0>Storage</a> <a =
href=3D#dom-sessionstorage title=3Ddom-sessionStorage>sessionStorage&l=
t;/a>;
+};
+<a href=3D#window>Window</a> implements <a href=3D#window=
sessionstorage>WindowSessionStorage</a>;</pre>
+
+  <p>The <dfn id=3Ddom-sessionstorage title=3Ddom-sessionStorag=
e><code>sessionStorage</code></dfn> attribute repres=
ents the
+  set of storage areas specific to the current <a href=3D#top-level-b=
rowsing-context>top-level browsing context</a>.</p>
+
+  <p>Each <a href=3D#top-level-browsing-context>top-level br=
owsing context</a> has a unique set of session storage areas, one f=
or
+  each <a href=3D#origin>origin</a>.</p>
+
+  <p>User agents should not expire data from a browsing context's =
session storage areas, but may do
+  so when the user requests that such data be deleted, or when the UA de=
tects that it has limited
+  storage space, or for security reasons. User agents should always avoi=
d deleting data while a
+  script that could access that data is running. When a top-level browsi=
ng context is destroyed (and
+  therefore permanently inaccessible to the user) the data stored in its=
 session storage areas can
+  be discarded with it, as the API described in this specification provi=
des no way for that data to
+  ever be subsequently retrieved.</p>
+
+  <p class=3Dnote>The lifetime of a browsing context can be unrela=
ted to the lifetime of the actual
+  user agent process itself, as the user agent may support resuming sess=
ions after a restart.</p>
+
+  <p>When a new <code><a href=3D#document>Document<=
/a></code> is created in a <a href=3D#browsing-context>bro=
wsing context</a> which has a
+  <a href=3D#top-level-browsing-context>top-level browsing context=
</a>, the user agent must check to see if that <a href=3D#top-le=
vel-browsing-context>top-level
+  browsing context</a> has a session storage area for that documen=
t's <a href=3D#origin>origin</a>. If it
+  does, then that is the <code><a href=3D#document>Document&=
lt;/a></code>'s assigned session storage area. If it does not, a
+  new storage area for that document's <a href=3D#origin>origin&lt=
;/a> must be created, and then <em>that</em>
+  is the <code><a href=3D#document>Document</a></co=
de>'s assigned session storage area. A <code><a href=3D#docum=
ent>Document</a></code>'s assigned
+  storage area does not change during the lifetime of a <code><=
a href=3D#document>Document</a></code>.</p>
+
+  <p class=3Dnote>In the case of an <code><a href=3D#the-=
iframe-element>iframe</a></code> being moved to another
+  <code><a href=3D#document>Document</a></code>,=
 the nested browsing context is destroyed and a new one created.</p&gt=
;
+
+  <p>The <code title=3Ddom-sessionStorage><a href=3D#dom-=
sessionstorage>sessionStorage</a></code> attribute must re=
turn a
+  <code><a href=3D#storage-0>Storage</a></code> =
object associated with the <code><a href=3D#document>Document=
</a></code>'s assigned session storage
+  area, if any, or null if there isn't one. Each <code><a href=3D=
#document>Document</a></code> object must have a separate
+  object for its <code><a href=3D#window>Window</a>&lt=
;/code>'s <code title=3Ddom-sessionStorage><a href=3D#dom-ses=
sionstorage>sessionStorage</a></code>
+  attribute.</p>
+
+  <p>When a new <a href=3D#top-level-browsing-context>top-le=
vel browsing context</a> is created by cloning an existing
+  <a href=3D#browsing-context>browsing context</a>, the new =
browsing context must start with the same session storage
+  areas as the original, but the two sets must from that point on be con=
sidered separate, not
+  affecting each other in any way.</p>
+
+  <p>When a new <a href=3D#top-level-browsing-context>top-le=
vel browsing context</a> is created by a <a href=3D#concept-scri=
pt title=3Dconcept-script>script</a> in an existing <a href=3D=
#browsing-context>browsing context</a>, or by the user
+  following a link in an existing browsing context, or in some other way=
 related to a specific
+  <code><a href=3D#document>Document</a></code>,=
 and the creation is not <a href=3D#a-new-start-for-session-storage&gt=
;a new start for session storage</a>, then
+  the session storage area of the <a href=3D#origin>origin</a&g=
t; of that <code><a href=3D#document>Document</a></c=
ode> must be copied
+  into the new browsing context when it is created. From that point on, =
however, the two session
+  storage areas must be considered separate, not affecting each other in=
 any way.</p>
+
+  <p id=3DsessionStorageEvent>When the <code title=3Ddom-Storag=
e-setItem><a href=3D#dom-storage-setitem>setItem()</a><=
/code>, <code title=3Ddom-Storage-removeItem><a href=3D#dom-s=
torage-removeitem>removeItem()</a></code>, and <code ti=
tle=3Ddom-Storage-clear><a href=3D#dom-storage-clear>clear()<=
/a></code> methods are called on a <code><a href=3D#sto=
rage-0>Storage</a></code> object <var title=3D"&qu=
ot;>x</var> that is associated with a session storage area, if t=
he methods did not throw an
+  exception or "do nothing" as defined above, then for every &=
lt;code><a href=3D#document>Document</a></code> obje=
ct whose
+  <code><a href=3D#window>Window</a></code> obje=
ct's <code title=3Ddom-sessionStorage><a href=3D#dom-sessionstor=
age>sessionStorage</a></code> attribute's
+  <code><a href=3D#storage-0>Storage</a></code> =
object is associated with the same storage area, other than <var title=
=3D"">x</var>, <a href=3D#send-a-storage-notificati=
on>send a storage notification</a>.</p>
+
+
+  <h4 id=3Dthe-localstorage-attribute><span class=3Dsecno>11=
.2.3 </span>The <code title=3Ddom-localStorage><a href=3D#=
dom-localstorage>localStorage</a></code> attribute</h4&=
gt;
+
+  <pre class=3Didl>[NoInterfaceObject]
+interface <dfn id=3Dwindowlocalstorage>WindowLocalStorage</dfn&=
gt; {
+  readonly attribute <a href=3D#storage-0>Storage</a> <a =
href=3D#dom-localstorage title=3Ddom-localStorage>localStorage</a&g=
t;;
+};
+<a href=3D#window>Window</a> implements <a href=3D#window=
localstorage>WindowLocalStorage</a>;</pre>
+
+  <p>The <dfn id=3Ddom-localstorage title=3Ddom-localStorage&gt=
;<code>localStorage</code></dfn> object provides a
+  <code><a href=3D#storage-0>Storage</a></code> =
object for an <a href=3D#origin>origin</a>.
+  <a href=3D#fingerprinting-vector class=3Dfingerprint title=3D"=
fingerprinting vector"><img src=3Dhttp://images.whatwg.org/fin=
gerprint.png width=3D46 alt=3D"(This is a fingerprinting vector.)&qu=
ot; height=3D64></a>
+  </p>
+
+  <p>User agents must have a set of local storage areas, one for e=
ach <a href=3D#origin>origin</a>.</p>
+
+  <p>User agents should expire data from the local storage areas o=
nly for security reasons or when
+  requested to do so by the user. User agents should always avoid deleti=
ng data while a script that
+  could access that data is running.</p>
+
+  <p>When the <code title=3Ddom-localStorage><a href=3D#d=
om-localstorage>localStorage</a></code> attribute is acces=
sed, the user
+  agent must run the following steps, which are known as the <dfn id=3D=
storage-object-initialization-steps><code>Storage</code> o=
bject
+  initialization steps</dfn>:</p> <!-- these steps are na=
med because marcos uses them from another
+  spec -->
+
+  <ol><li><p>The user agent may throw a <code>&l=
t;a href=3D#securityerror>SecurityError</a></code> excepti=
on and abort these steps
+   instead of returning a <code><a href=3D#storage-0>Storage=
</a></code> object if the request violates a policy decision
+   (e.g. if the user agent is configured to not allow the page to persis=
t data).</li>
+
+   <li><p>If the <code><a href=3D#document>Docum=
ent</a></code>'s <a href=3D#origin>origin</a> is =
not a scheme/host/port tuple, then
+   throw a <code><a href=3D#securityerror>SecurityError</=
a></code> exception and abort these steps.</li>
+
+   <li><p>Check to see if the user agent has allocated a loc=
al storage area for the
+   <a href=3D#origin>origin</a> of the <code><a hre=
f=3D#document>Document</a></code> of the <code><a=
 href=3D#window>Window</a></code> object on which the
+   attribute was accessed. If it has not, create a new storage area for =
that
+   <a href=3D#origin>origin</a>.</li>
+
+   <li><p>Return the <code><a href=3D#storage-0>=
Storage</a></code> object associated with that origin's local=
 storage area.
+   Each <code><a href=3D#document>Document</a></cod=
e> object must have a separate object for its <code><a href=3D=
#window>Window</a></code>'s <code title=3Ddom-localStor=
age><a href=3D#dom-localstorage>localStorage</a></code&=
gt; attribute.</p>
+
+  </ol><p id=3DlocalStorageEvent>When the <code title=3Dd=
om-Storage-setItem><a href=3D#dom-storage-setitem>setItem()</=
a></code>, <code title=3Ddom-Storage-removeItem><a href=
=3D#dom-storage-removeitem>removeItem()</a></code>, and &l=
t;code title=3Ddom-Storage-clear><a href=3D#dom-storage-clear>cl=
ear()</a></code> methods are called on a <code><a hr=
ef=3D#storage-0>Storage</a></code> object <var title=3D=
"">x</var> that is associated with a local storage are=
a, if the methods did not throw an
+  exception or "do nothing" as defined above, then for every &=
lt;code><a href=3D#document>Document</a></code> obje=
ct whose
+  <code><a href=3D#window>Window</a></code> obje=
ct's <code title=3Ddom-localStorage><a href=3D#dom-localstorage&=
gt;localStorage</a></code> attribute's
+  <code><a href=3D#storage-0>Storage</a></code> =
object is associated with the same storage area, other than <var title=
=3D"">x</var>, <a href=3D#send-a-storage-notificati=
on>send a storage notification</a>.
+
+  <p id=3DlocalStorageMutex>Whenever the properties of a <code =
title=3Ddom-localStorage><a href=3D#dom-localstorage>localStorag=
e</a></code> attribute's <code><a href=3D#storage-0&=
gt;Storage</a></code> object are to be
+  examined, returned, set, or deleted, whether as part of a direct prope=
rty access, when checking
+  for the presence of a property, during property enumeration, when dete=
rmining the number of
+  properties present, or as part of the execution of any of the methods =
or attributes defined on the
+  <code><a href=3D#storage-0>Storage</a></code> =
interface, the user agent must first <a href=3D#obtain-the-storage-mut=
ex>obtain the storage
+  mutex</a>.</p>
+
+
+  <h4 id=3Dthe-storage-event><span class=3Dsecno>11.2.4 <=
/span>The <code title=3Devent-storage><a href=3D#event-storag=
e>storage</a></code> event</h4>
+
+  <p>The <dfn id=3Devent-storage title=3Devent-storage><c=
ode>storage</code></dfn> event is fired on a
+  <code><a href=3D#document>Document</a></code>'=
s <code><a href=3D#window>Window</a></code> objec=
t when a storage area changes, as described in
+  the previous two sections (<a href=3D#sessionStorageEvent>for se=
ssion storage</a>, <a href=3D#localStorageEvent>for local sto=
rage</a>).</p>
+
+  <p>When a user agent is to <dfn id=3Dsend-a-storage-notificat=
ion>send a storage notification</dfn> for a <code><a hr=
ef=3D#document>Document</a></code>, the
+  user agent must <a href=3D#queue-a-task>queue a task</a> t=
o <a href=3D#concept-event-fire title=3Dconcept-event-fire>fire<=
/a> a <a href=3D#concept-events-trusted title=3Dconcept-events-trus=
ted>trusted</a> event with the name <code><a href=3D#st=
orage-0>storage</a></code>, which does
+  not bubble and is not cancelable, and which uses the <code><a=
 href=3D#storageevent>StorageEvent</a></code> interface, a=
t the
+  <code><a href=3D#document>Document</a></code> =
object's <code><a href=3D#window>Window</a></code&gt=
; object.</p>
+
+  <p class=3Dnote>Such a <code><a href=3D#document>Doc=
ument</a></code> object is not necessarily <a href=3D#full=
y-active>fully active</a>,
+  but events fired on such objects are ignored by the <a href=3D#even=
t-loop>event loop</a> until the
+  <code><a href=3D#document>Document</a></code> =
becomes <a href=3D#fully-active>fully active</a> again.</p=
>
+
+  <p>The <a href=3D#task-source>task source</a> for th=
ese tasks is the <a href=3D#dom-manipulation-task-source>DOM manipu=
lation task
+  source</a>.</p>
+
+  <p>If the event is being fired due to an invocation of the <c=
ode title=3Ddom-Storage-setItem><a href=3D#dom-storage-setitem>s=
etItem()</a></code> or <code title=3Ddom-Storage-removeIte=
m><a href=3D#dom-storage-removeitem>removeItem()</a></c=
ode> methods, the event must have its <code title=3Ddom-StorageEven=
t-key><a href=3D#dom-storageevent-key>key</a></code>=
 attribute initialized to the name of the key in question,
+  its <code title=3Ddom-StorageEvent-oldValue><a href=3D#dom-st=
orageevent-oldvalue>oldValue</a></code> attribute initiali=
zed to the old value
+  of the key in question, or null if the key is newly added, and its &lt=
;code title=3Ddom-StorageEvent-newValue><a href=3D#dom-storageevent=
-newvalue>newValue</a></code> attribute initialized to the=
 new value of the
+  key in question, or null if the key was removed.</p>
+
+  <p>Otherwise, if the event is being fired due to an invocation o=
f the <code title=3Ddom-Storage-clear><a href=3D#dom-storage-cle=
ar>clear()</a></code> method, the event must have its <=
code title=3Ddom-StorageEvent-key><a href=3D#dom-storageevent-key&g=
t;key</a></code>, <code title=3Ddom-StorageEvent-oldValue&=
gt;<a href=3D#dom-storageevent-oldvalue>oldValue</a></code=
>,
+  and <code title=3Ddom-StorageEvent-newValue><a href=3D#dom-st=
orageevent-newvalue>newValue</a></code> attributes initial=
ized to null.</p>
+
+  <p>In addition, the event must have its <code title=3Ddom-Sto=
rageEvent-url><a href=3D#dom-storageevent-url>url</a></=
code> attribute
+  initialized to <a href=3D"#the-document's-address" title=3D=
"the document's address">the address of the document</a&g=
t; whose
+  <code><a href=3D#storage-0>Storage</a></code> =
object was affected; and its <code title=3Ddom-StorageEvent-storageAre=
a><a href=3D#dom-storageevent-storagearea>storageArea</a>&=
lt;/code> attribute initialized to the
+  <code><a href=3D#storage-0>Storage</a></code> =
object from the <code><a href=3D#window>Window</a></=
code> object of the target
+  <code><a href=3D#document>Document</a></code> =
that represents the same kind of <code><a href=3D#storage-0>S=
torage</a></code> area as was affected
+  (i.e. session or local).</p>
+
+
+  <h5 id=3Devent-definition-0><span class=3Dsecno>11.2.4.1 &=
lt;/span>Event definition</h5>
+
+  <pre class=3Didl>[Constructor(DOMString type, optional <a hre=
f=3D#storageeventinit>StorageEventInit</a> eventInitDict)]
+interface <dfn id=3Dstorageevent>StorageEvent</dfn> : <a =
href=3D#event>Event</a> {
+  readonly attribute DOMString? <a href=3D#dom-storageevent-key title=
=3Ddom-StorageEvent-key>key</a>;
+  readonly attribute DOMString? <a href=3D#dom-storageevent-oldvalue =
title=3Ddom-StorageEvent-oldValue>oldValue</a>;
+  readonly attribute DOMString? <a href=3D#dom-storageevent-newvalue =
title=3Ddom-StorageEvent-newValue>newValue</a>;
+  readonly attribute DOMString <a href=3D#dom-storageevent-url title=3D=
dom-StorageEvent-url>url</a>;
+  readonly attribute <a href=3D#storage-0>Storage</a>? <a=
 href=3D#dom-storageevent-storagearea title=3Ddom-StorageEvent-storageAre=
a>storageArea</a>;
+};
+
+dictionary <dfn id=3Dstorageeventinit>StorageEventInit</dfn>=
 : <a href=3D#eventinit>EventInit</a> {
+  DOMString? key;
+  DOMString? oldValue;
+  DOMString? newValue;
+  DOMString url;
+  <a href=3D#storage-0>Storage</a>? storageArea;
+};</pre>
+
+  <p>The <dfn id=3Ddom-storageevent-key title=3Ddom-StorageEven=
t-key><code>key</code></dfn> attribute must return t=
he value it
+  was initialized to. When the object is created, this attribute must be=
 initialized to null. It
+  represents the key being changed.</p>
+
+  <p>The <dfn id=3Ddom-storageevent-oldvalue title=3Ddom-Storag=
eEvent-oldValue><code>oldValue</code></dfn> attribut=
e must return
+  the value it was initialized to. When the object is created, this attr=
ibute must be initialized to
+  null. It represents the old value of the key being changed.</p>
+
+  <p>The <dfn id=3Ddom-storageevent-newvalue title=3Ddom-Storag=
eEvent-newValue><code>newValue</code></dfn> attribut=
e must return
+  the value it was initialized to. When the object is created, this attr=
ibute must be initialized to
+  null. It represents the new value of the key being changed.</p>
+
+  <p>The <dfn id=3Ddom-storageevent-url title=3Ddom-StorageEven=
t-url><code>url</code></dfn> attribute must return t=
he value it
+  was initialized to. When the object is created, this attribute must be=
 initialized to the empty
+  string. It represents the address of the document whose key changed.&l=
t;/p>
+
+  <p>The <dfn id=3Ddom-storageevent-storagearea title=3Ddom-Sto=
rageEvent-storageArea><code>storageArea</code></dfn>=
 attribute must
+  return the value it was initialized to. When the object is created, th=
is attribute must be
+  initialized to null. It represents the <code><a href=3D#stora=
ge-0>Storage</a></code> object that was affected.</p&gt=
;
+
+
+
+  <h4 id=3Dthreads><span class=3Dsecno>11.2.5 </span>T=
hreads</h4>
+
+  <p>Because of <a href=3D#localStorageMutex>the use</a&g=
t; of the <a href=3D#storage-mutex>storage mutex</a>, multipl=
e
+  browsing contexts will be able to access the local storage areas simul=
taneously in such a manner
+  that scripts cannot detect any concurrent script execution.</p>
+
+  <p>Thus, the <code title=3Ddom-Storage-length><a href=3D=
#dom-storage-length>length</a></code> attribute of a <c=
ode><a href=3D#storage-0>Storage</a></code>
+  object, and the value of the various properties of that object, cannot=
 change while a script is
+  executing, other than in a way that is predictable by the script itsel=
f.</p>
+
+
+  <h3 id=3Ddisk-space-0><span class=3Dsecno>11.3 </span&g=
t;Disk space</h3>
+
+  <p>User agents should limit the total amount of space allowed fo=
r storage areas, because hostile
+  authors could otherwise use this feature to exhaust the user's availab=
le disk space.</p>
+
+  <p>User agents should guard against sites storing data under the=
ir origin's other affiliated
+  sites, e.g. storing up to the limit in a1.example.com, a2.example.com,=
 a3.example.com, etc,
+  circumventing the main example.com storage limit.</p>
+
+  <p>User agents may prompt the user when quotas are reached, allo=
wing the user to grant a site more
+  space. This enables sites to store many user-created documents on the =
user's computer, for
+  instance.</p>
+
+  <p>User agents should allow users to see how much space each dom=
ain is using.</p>
+
+  <!--<p>If the storage area space limit is reached during a &l=
t;code
+  title=3D"dom-Storage-setItem">setItem()</code> call=
, the method will throw an exception.</p>-->
+
+  <p>A mostly arbitrary limit of five megabytes per <a href=3D#=
origin>origin</a> is suggested. Implementation
+  feedback is welcome and will be used to update this suggestion in the =
future.</p>
+
+  <p>For predictability, quotas should be based on the uncompresse=
d size of data stored.</p>
+  <!-- see https://www.w3.org/Bugs/Public/show_bug.cgi?id=3D21319#c3 =
-->
+
+
+  <h3 id=3Dprivacy><span class=3Dsecno>11.4 </span>Pri=
vacy</h3>
+
+  <h4 id=3Duser-tracking><span class=3Dsecno>11.4.1 </spa=
n>User tracking</h4>
+
+  <p>A third-party advertiser (or any entity capable of getting co=
ntent distributed to multiple
+  sites) could use a unique identifier stored in its local storage area =
to track a user across
+  multiple sessions, building a profile of the user's interests to allow=
 for highly targeted
+  advertising. In conjunction with a site that is aware of the user's re=
al identity (for example an
+  e-commerce site that requires authenticated credentials), this could a=
llow oppressive groups to
+  target individuals with greater accuracy than in a world with purely a=
nonymous Web usage.</p>
+
+  <p>There are a number of techniques that can be used to mitigate=
 the risk of user tracking:</p>
+
+  <dl><dt>Blocking third-party storage</dt>
+   <dd>
+
+    <p>User agents may restrict access to the <code title=3Ddom=
-localStorage><a href=3D#dom-localstorage>localStorage</a>=
</code>
+    objects to scripts originating at the domain of the top-level docume=
nt of the <a href=3D#browsing-context>browsing
+    context</a>, for instance denying access to the API for pages =
from other domains running in
+    <code><a href=3D#the-iframe-element>iframe</a><=
/code>s.</p>
+
+   </dd>
+
+   <dt>Expiring stored data</dt>
+   <dd>
+
+    <p>User agents may, possibly in a manner configured by the use=
r, automatically delete stored
+    data after a period of time.</p>
+
+    <p>For example, a user agent could be configured to treat thir=
d-party local storage areas as
+    session-only storage, deleting the data once the user had closed all=
 the <a href=3D#browsing-context title=3D"browsing
+    context">browsing contexts</a> that could access it.&l=
t;/p>
+
+    <p>This can restrict the ability of a site to track a user, as=
 the site would then only be able
+    to track the user across multiple sessions when he authenticates wit=
h the site itself (e.g. by
+    making a purchase or logging in to a service).</p>
+
+    <p>However, this also reduces the usefulness of the API as a l=
ong-term storage mechanism. It can
+    also put the user's data at risk, if the user does not fully underst=
and the implications of data
+    expiration.</p>
+
+    <!--v2 consider adding an explicit way for sites to state when da=
ta should expire, as in
+    localStorage.expireData(365); -->
+
+   </dd>
+
+   <dt>Treating persistent storage as cookies</dt>
+   <dd>
+
+    <p>If users attempt to protect their privacy by clearing cooki=
es without also clearing data
+    stored in the local storage area, sites can defeat those attempts by=
 using the two features as
+    redundant backup for each other. User agents should present the inte=
rfaces for clearing these in
+    a way that helps users to understand this possibility and enables th=
em to delete data in all
+    persistent storage features simultaneously. <a href=3D#refsCOOKIE=
S>[COOKIES]</a></p>
+
+   </dd>
+
+   <dt>Site-specific white-listing of access to local storage area=
s</dt> <dd>
+
+    <p>User agents may allow sites to access session storage areas=
 in
+    an unrestricted manner, but require the user to authorize access
+    to local storage areas.</p>
+
+   </dd>
+
+   <dt>Origin-tracking of stored data</dt>
+   <dd>
+
+    <p>User agents may record the <a href=3D#origin title=3Dori=
gin>origins</a> of sites that contained
+    content from third-party origins that caused data to be stored.</=
p>
+
+    <p>If this information is then used to present the view of dat=
a currently in persistent storage,
+    it would allow the user to make informed decisions about which parts=
 of the persistent storage
+    to prune. Combined with a blacklist ("delete this data and prev=
ent this domain from ever storing
+    data again"), the user can restrict the use of persistent stora=
ge to sites that he trusts.</p>
+
+   </dd>
+
+   <dt>Shared blacklists</dt>
+   <dd>
+
+    <p>User agents may allow users to share their persistent stora=
ge domain blacklists.</p>
+
+    <p>This would allow communities to act together to protect the=
ir privacy.</p>
+
+   </dd>
+
+  </dl><p>While these suggestions prevent trivial use of thi=
s API for user tracking, they do not block it
+  altogether. Within a single domain, a site can continue to track the u=
ser during a session, and
+  can then pass all this information to the third party along with any i=
dentifying information
+  (names, credit card numbers, addresses) obtained by the site. If a thi=
rd party cooperates with
+  multiple sites to obtain such information, a profile can still be crea=
ted.</p>
+
+  <p>However, user tracking is to some extent possible even with n=
o cooperation from the user agent
+  whatsoever, for instance by using session identifiers in URLs, a techn=
ique already commonly used
+  for innocuous purposes but easily repurposed for user tracking (even r=
etroactively). This
+  information can then be shared with other sites, using visitors' IP ad=
dresses and other
+  user-specific data (e.g. user-agent headers and configuration settings=
) to combine separate
+  sessions into coherent user profiles.</p>
+
+
+  <h4 id=3Dsensitivity-of-data><span class=3Dsecno>11.4.2 &l=
t;/span>Sensitivity of data</h4>
+
+  <p>User agents should treat persistently stored data as potentia=
lly sensitive; it's quite possible
+  for e-mails, calendar appointments, health records, or other confident=
ial documents to be stored
+  in this mechanism.</p>
+
+  <p>To this end, user agents should ensure that when deleting dat=
a, it is promptly deleted from the
+  underlying storage.</p>
+
+
+<!--ADD-TOPIC:Security-->
+  <h3 id=3Dsecurity-storage><span class=3Dsecno>11.5 </sp=
an>Security</h3>
+
+  <h4 id=3Ddns-spoofing-attacks><span class=3Dsecno>11.5.1 &=
lt;/span>DNS spoofing attacks</h4>
+
+  <p>Because of the potential for DNS spoofing attacks, one cannot=
 guarantee that a host claiming to
+  be in a certain domain really is from that domain. To mitigate this, p=
ages can use TLS. Pages
+  using TLS can be sure that only the user, software working on behalf o=
f the user, and other pages
+  using TLS that have certificates identifying them as being from the sa=
me domain, can access their
+  storage areas.</p>
+
+
+  <h4 id=3Dcross-directory-attacks><span class=3Dsecno>11.5.=
2 </span>Cross-directory attacks</h4>
+
+  <p>Different authors sharing one host name, for example users ho=
sting content on
+  <code>geocities.com</code>, all share one local storage ob=
ject. There is no feature to restrict
+  the access by pathname. Authors on shared hosts are therefore urged to=
 avoid using these features,
+  as it would be trivial for other authors to read the data and overwrit=
e it.</p>
+
+  <p class=3Dnote>Even if a path-restriction feature was made avai=
lable, the usual DOM scripting
+  security model would make it trivial to bypass this protection and acc=
ess the data from any
+  path.</p>
+
+
+  <h4 id=3Dimplementation-risks><span class=3Dsecno>11.5.3 &=
lt;/span>Implementation risks</h4>
+
+  <p>The two primary risks when implementing these persistent stor=
age features are letting hostile
+  sites read information from other domains, and letting hostile sites w=
rite information that is
+  then read from other domains.</p>
+
+  <p>Letting third-party sites read data that is not supposed to b=
e read from their domain causes
+  <em>information leakage</em>, For example, a user's shoppi=
ng wishlist on one domain could be used
+  by another domain for targeted advertising; or a user's work-in-progre=
ss confidential documents
+  stored by a word-processing site could be examined by the site of a co=
mpeting company.</p>
+
+  <p>Letting third-party sites write data to the persistent storag=
e of other domains can result in
+  <em>information spoofing</em>, which is equally dangerous.=
 For example, a hostile site could add
+  items to a user's wishlist; or a hostile site could set a user's sessi=
on identifier to a known ID
+  that the hostile site can then use to track the user's actions on the =
victim site.</p>
+
+  <p>Thus, strictly following the <a href=3D#origin>origin&l=
t;/a> model described in this specification is
+  important for user security.</p>
+<!--REMOVE-TOPIC:Security-->
+
+
+
+
+
+<!--TOPIC:HTML Syntax and Parsing-->
+
+  <h2 id=3Dsyntax><span class=3Dsecno>12 </span><df=
n>The HTML syntax</dfn></h2>
+
+  <p class=3Dnote>This section only describes the rules for resour=
ces labeled with an <a href=3D#html-mime-type>HTML
+  MIME type</a>. Rules for XML resources are discussed in the sect=
ion below entitled "<a href=3D#the-xhtml-syntax>The
+  XHTML syntax</a>".</p>
+
+
+  <h3 id=3Dwriting><span class=3Dsecno>12.1 </span>Wri=
ting HTML documents</h3>
+
+  <div class=3Dimpl>
+
+  <p><i>This section only applies to documents, authoring to=
ols, and markup generators. In
+  particular, it does not apply to conformance checkers; conformance che=
ckers must use the
+  requirements given in the next section ("parsing HTML documents&q=
uot;).</i></p>
+
+  </div>
+
+  <p>Documents must consist of the following parts, in the given
+  order:</p>
+
+  <ol><li>Optionally, a single U+FEFF BYTE ORDER MARK (BOM) =
character.</li>
+
+   <li>Any number of <a href=3D#syntax-comments title=3Dsyntax-=
comments>comments</a> and <a href=3D#space-character title=3D=
"space
+   character">space characters</a>.</li>
+
+   <li>A <a href=3D#syntax-doctype title=3Dsyntax-doctype>DO=
CTYPE</a>.
+
+   <li>Any number of <a href=3D#syntax-comments title=3Dsyntax-=
comments>comments</a> and <a href=3D#space-character title=3D=
"space
+   character">space characters</a>.</li>
+
+   <li>The root element, in the form of an <code><a href=3D=
#the-html-element>html</a></code> <a href=3D#syntax-ele=
ments title=3Dsyntax-elements>element</a>.</li>
+
+   <li>Any number of <a href=3D#syntax-comments title=3Dsyntax-=
comments>comments</a> and <a href=3D#space-character title=3D=
"space
+   character">space characters</a>.</li>
+
+  </ol><p>The various types of content mentioned above are d=
escribed in the next few sections.</p>
+
+  <p>In addition, there are some restrictions on how <a href=3D=
#character-encoding-declaration title=3D"character encoding
+  declaration">character encoding declarations</a> are to =
be serialized, as discussed in the
+  section on that topic.</p>
+
+  <div class=3Dnote>
+
+   <p>Space characters before the root <code><a href=3D#t=
he-html-element>html</a></code> element, and space charact=
ers at the start
+   of the <code><a href=3D#the-html-element>html</a>&l=
t;/code> element and before the <code><a href=3D#the-head-ele=
ment>head</a></code> element, will be dropped when
+   the document is parsed; space characters <em>after</em> t=
he root <code><a href=3D#the-html-element>html</a></=
code> element will
+   be parsed as if they were at the end of the <code><a href=3D=
#the-body-element>body</a></code> element. Thus, space cha=
racters
+   around the root element do not round-trip.</p>
+
+   <p>It is suggested that newlines be inserted after the DOCTYPE,=
 after any comments that are
+   before the root element, after the <code><a href=3D#the-html=
-element>html</a></code> element's start tag (if it is not=
 <a href=3D#syntax-tag-omission title=3Dsyntax-tag-omission>omitted=
</a>), and after any comments that are inside the
+   <code><a href=3D#the-html-element>html</a></code=
> element but before the <code><a href=3D#the-head-element&gt=
;head</a></code> element.</p>
+
+  </div>
+
+  <p>Many strings in the HTML syntax (e.g. the names of elements a=
nd their attributes) are
+  case-insensitive, but only for <a href=3D#uppercase-ascii-letters&g=
t;uppercase ASCII letters</a> and <a href=3D#lowercase-ascii-let=
ters>lowercase ASCII
+  letters</a>. For convenience, in this section this is just refer=
red to as
+  "case-insensitive".</p>
+
+
+  <h4 id=3Dthe-doctype><span class=3Dsecno>12.1.1 </span&=
gt;The DOCTYPE</h4>
+
+  <p>A <dfn id=3Dsyntax-doctype title=3Dsyntax-doctype>DOCTY=
PE</dfn> is a <!-- mostly useless but nonetheless -->
+  required preamble.</p>
+
+  <p class=3Dnote>DOCTYPEs are required for legacy reasons. When o=
mitted, browsers tend to use a
+  different rendering mode that is incompatible with some specifications=
. Including the DOCTYPE in a
+  document ensures that the browser makes a best-effort attempt at follo=
wing the relevant
+  specifications.</p>
+
+  <p>A DOCTYPE must consist of the following components, in this o=
rder:</p>
+
+  <ol class=3Dbrief><li>A string that is an <a href=3D#as=
cii-case-insensitive>ASCII case-insensitive</a> match for the st=
ring "<code title=3D""><!DOCTYPE</code>=
".</li>
+   <li>One or more <a href=3D#space-character title=3D"spa=
ce character">space characters</a>.</li>
+   <li>A string that is an <a href=3D#ascii-case-insensitive&gt=
;ASCII case-insensitive</a> match for the string "<code tit=
le=3D"">html</code>".</li>
+   <li>Optionally, a <a href=3D#doctype-legacy-string>DOCTYP=
E legacy string</a> or an <a href=3D#obsolete-permitted-doctype-=
string>obsolete permitted DOCTYPE string</a> (defined below).&lt=
;/li>
+   <li>Zero or more <a href=3D#space-character title=3D"sp=
ace character">space characters</a>.</li>
+   <li>A U+003E GREATER-THAN SIGN character (>).</li>
+  </ol><p class=3Dnote>In other words, <code><!=
DOCTYPE html></code>, case-insensitively.</p>
+
+  <hr><p>For the purposes of HTML generators that cannot out=
put HTML markup with the short DOCTYPE
+  "<code title=3D""><!DOCTYPE html>&l=
t;/code>", a <dfn id=3Ddoctype-legacy-string>DOCTYPE legacy=
 string</dfn> may be inserted
+  into the DOCTYPE (in the position defined above). This string must con=
sist of:</p>
+
+  <ol class=3Dbrief><li>One or more <a href=3D#space-char=
acter title=3D"space character">space characters</a>.&=
lt;/li>
+   <li>A string that is an <a href=3D#ascii-case-insensitive&gt=
;ASCII case-insensitive</a> match for the string "<code tit=
le=3D"">SYSTEM</code>".</li>
+   <li>One or more <a href=3D#space-character title=3D"spa=
ce character">space characters</a>.</li>
+   <li>A U+0022 QUOTATION MARK or U+0027 APOSTROPHE character (the=
 <i>quote mark</i>).</li>
+   <li>The literal string "<code><a href=3D#about:le=
gacy-compat>about:legacy-compat</a></code>".</li&g=
t;
+   <li>A matching U+0022 QUOTATION MARK or U+0027 APOSTROPHE chara=
cter (i.e. the same character as in the earlier step labeled <i>quo=
te mark</i>).</li>
+  </ol><p class=3Dnote>In other words, <code><!=
DOCTYPE html SYSTEM "about:legacy-compat"></code> =
or
+  <code><!DOCTYPE html SYSTEM 'about:legacy-compat'>=
</code>, case-insensitively except for the
+  part in single or double quotes.</p>
+
+  <p>The <a href=3D#doctype-legacy-string>DOCTYPE legacy str=
ing</a> should not be used unless the document is generated from
+  a system that cannot output the shorter string.</p>
+
+  <hr><!-- see the parser section before changing this bit --&g=
t;<p>To help authors transition from HTML4 and XHTML1, an <dfn i=
d=3Dobsolete-permitted-doctype-string>obsolete permitted DOCTYPE
+  string</dfn> can be inserted into the DOCTYPE (in the position d=
efined above). This string must
+  consist of:</p>
+
+  <ol class=3Dbrief><li>One or more <a href=3D#space-char=
acter title=3D"space character">space characters</a>.&=
lt;/li>
+   <li>A string that is an <a href=3D#ascii-case-insensitive&gt=
;ASCII case-insensitive</a> match for the string "<code tit=
le=3D"">PUBLIC</code>".</li>
+   <li>One or more <a href=3D#space-character title=3D"spa=
ce character">space characters</a>.</li>
+   <li>A U+0022 QUOTATION MARK or U+0027 APOSTROPHE character (the=
 <i>first quote mark</i>).</li>
+   <li>The string from one of the cells in the first column of the=
 table below. The row to which this cell belongs is the <i>selected=
 row</i>.</li>
+   <li>A matching U+0022 QUOTATION MARK or U+0027 APOSTROPHE chara=
cter (i.e. the same character as in the earlier step labeled <i>fir=
st quote mark</i>).</li>
+   <li>If the cell in the second column of the <i>selected r=
ow</i> is not blank, one or more <a href=3D#space-character titl=
e=3D"space character">space characters</a>.</li>
+   <li>If the cell in the second column of the <i>selected r=
ow</i> is not blank, a U+0022 QUOTATION MARK or U+0027 APOSTROPHE c=
haracter (the <i>third quote mark</i>).</li>
+   <li>If the cell in the second column of the <i>selected r=
ow</i> is not blank, the string from the cell in the second column =
of the <i>selected row</i>.</li>
+   <li>If the cell in the second column of the <i>selected r=
ow</i> is not blank, a matching U+0022 QUOTATION MARK or U+0027 APO=
STROPHE character (i.e. the same character as in the earlier step labeled=
 <i>third quote mark</i>).</li>
+  </ol><table><caption>
+    Allowed values for public and system identifiers in an <a href=3D=
#obsolete-permitted-doctype-string>obsolete permitted DOCTYPE string&l=
t;/a>.
+   </caption>
+   <thead><tr><th> Public identifier
+     <th> System identifier
+   <tbody><tr><td> <code title=3D"">-/=
/W3C//DTD HTML 4.0//EN</code>
+     <td>
+    <tr><td> <code title=3D"">-//W3C//DTD&am=
p;nbsp;HTML 4.0//EN</code>
+     <td> <code title=3D"">http://www.w3.org/TR/RE=
C-html40/strict.dtd</code>
+    <tr><td> <code title=3D"">-//W3C//DTD&am=
p;nbsp;HTML 4.01//EN</code>
+     <td>
+    <tr><td> <code title=3D"">-//W3C//DTD&am=
p;nbsp;HTML 4.01//EN</code>
+     <td> <code title=3D"">http://www.w3.org/TR/ht=
ml4/strict.dtd</code>
+    <tr><td> <code title=3D"">-//W3C//DTD&am=
p;nbsp;XHTML 1.0 Strict//EN</code>
+     <td> <code title=3D"">http://www.w3.org/TR/xh=
tml1/DTD/xhtml1-strict.dtd</code>
+    <tr><td> <code title=3D"">-//W3C//DTD&am=
p;nbsp;XHTML 1.1//EN</code>
+     <td> <code title=3D"">http://www.w3.org/TR/xh=
tml11/DTD/xhtml11.dtd</code>
+  </table><p>A <a href=3D#syntax-doctype title=3Dsyntax-d=
octype>DOCTYPE</a> containing an <a href=3D#obsolete-permitte=
d-doctype-string>obsolete permitted DOCTYPE
+  string</a> is an <dfn id=3Dobsolete-permitted-doctype>obso=
lete permitted DOCTYPE</dfn>. Authors should not use <a href=3D#=
obsolete-permitted-doctype title=3D"obsolete permitted DOCTYPE"=
>obsolete permitted DOCTYPEs</a>, as they are unnecessarily
+  long.</p>
+
+
+
+
+  <h4 id=3Delements-0><span class=3Dsecno>12.1.2 </span&g=
t;Elements</h4>
+
+  <p>There are five different kinds of <dfn id=3Dsyntax-element=
s title=3Dsyntax-elements>elements</dfn>: <a href=3D#void-ele=
ments>void
+  elements</a>, <a href=3D#raw-text-elements>raw text elemen=
ts</a>, <a href=3D#escapable-raw-text-elements>escapable raw =
text elements</a>,
+  <a href=3D#foreign-elements>foreign elements</a>, and <=
a href=3D#normal-elements>normal elements</a>.</p>
+
+  <dl><dt><dfn id=3Dvoid-elements>Void elements</df=
n></dt>
+
+   <dd><code><a href=3D#the-area-element>area</a&gt=
;</code>, <code><a href=3D#the-base-element>base</a&=
gt;</code>, <code><a href=3D#the-br-element>br</a&gt=
;</code>, <code><a href=3D#the-col-element>col</a&gt=
;</code>, <code><a href=3D#the-embed-element>embed</=
a></code>,
+   <code><a href=3D#the-hr-element>hr</a></code>=
, <code><a href=3D#the-img-element>img</a></code>=
, <code><a href=3D#the-input-element>input</a></code=
>, <code><a href=3D#the-keygen-element>keygen</a>&lt=
;/code>, <code><a href=3D#the-link-element>link</a>&=
lt;/code>,
+   <code><a href=3D#the-menuitem-element>menuitem</a>&=
lt;/code>, <code><a href=3D#the-meta-element>meta</a&gt=
;</code>, <code><a href=3D#the-param-element>param</=
a></code>, <code><a href=3D#the-source-element>sourc=
e</a></code>,
+   <code><a href=3D#the-track-element>track</a></co=
de>, <code><a href=3D#the-wbr-element>wbr</a></co=
de></dd>
+   <!-- see also other places that say VOIDLIST -->
+
+   <dt><dfn id=3Draw-text-elements>Raw text elements</dfn=
></dt>
+
+   <dd><code><a href=3D#the-script-element>script</=
a></code>, <code><a href=3D#the-style-element>style&=
lt;/a></code></dd> <!-- iframe and noscript don't count=
 as raw text
+   for syntax purposes -->
+
+   <dt><dfn id=3Descapable-raw-text-elements>escapable raw t=
ext elements</dfn></dt>
+
+   <dd><code><a href=3D#the-textarea-element>textarea&=
lt;/a></code>, <code><a href=3D#the-title-element>ti=
tle</a></code></dd>
+
+   <dt><dfn id=3Dforeign-elements>Foreign elements</dfn&g=
t;</dt>
+
+   <dd>Elements from the <a href=3D#mathml-namespace>MathML =
namespace</a> and the <a href=3D#svg-namespace>SVG namespace&=
lt;/a>.</dd>
+
+   <dt><dfn id=3Dnormal-elements>Normal elements</dfn>=
</dt>
+
+   <dd>All other allowed <a href=3D#html-elements>HTML eleme=
nts</a> are normal elements.</dd>
+
+  </dl><p><dfn id=3Dsyntax-tags title=3Dsyntax-tags>Ta=
gs</dfn> are used to delimit the start and end of elements in the
+  markup. <a href=3D#raw-text-elements title=3D"raw text element=
s">Raw text</a>, <a href=3D#escapable-raw-text-elements =
title=3D"escapable raw text
+  elements">escapable raw text</a>, and <a href=3D#norm=
al-elements title=3D"normal elements">normal</a> eleme=
nts have
+  a <a href=3D#syntax-start-tag title=3Dsyntax-start-tag>start tag=
</a> to indicate where they begin, and an <a href=3D#syntax-end-=
tag title=3Dsyntax-end-tag>end tag</a> to indicate where they en=
d. The start and end tags of
+  certain <a href=3D#normal-elements>normal elements</a> can=
 be <a href=3D#syntax-tag-omission title=3Dsyntax-tag-omission>omit=
ted</a>, as
+  described below in the section on <a href=3D#syntax-tag-omission ti=
tle=3Dsyntax-tag-omission>optional tags</a>. Those
+  that cannot be omitted must not be omitted. <a href=3D#void-element=
s>Void elements</a> only have a start tag; end
+  tags must not be specified for <a href=3D#void-elements>void ele=
ments</a>. <a href=3D#foreign-elements>Foreign elements</a=
> must
+  either have a start tag and an end tag, or a start tag that is marked =
as self-closing, in which
+  case they must not have an end tag.</p>
+
+  <p>The <a href=3D#concept-html-contents title=3Dconcept-html-=
contents>contents</a> of the element must be placed between
+  just after the start tag (which <a href=3D#syntax-tag-omission titl=
e=3Dsyntax-tag-omission>might be implied, in certain
+  cases</a>) and just before the end tag (which again, <a href=3D=
#syntax-tag-omission title=3Dsyntax-tag-omission>might be
+  implied in certain cases</a>). The exact allowed contents of eac=
h individual element depend on
+  the <a href=3D#content-models title=3D"content models"&gt=
;content model</a> of that element, as described earlier in
+  this specification. Elements must not contain content that their conte=
nt model disallows. In
+  addition to the restrictions placed on the contents by those content m=
odels, however, the five
+  types of elements have additional <em>syntactic</em> requi=
rements.</p>
+
+  <p><a href=3D#void-elements>Void elements</a> can't =
have any contents (since there's no end tag, no content can be
+  put between the start tag and the end tag).</p>
+
+  <p><a href=3D#raw-text-elements>Raw text elements</a&gt=
; can have <a href=3D#syntax-text title=3Dsyntax-text>text</a&gt=
;, though it has <a href=3D#cdata-rcdata-restrictions>restrictions&=
lt;/a> described below.</p>
+
+  <p><a href=3D#escapable-raw-text-elements>Escapable raw te=
xt elements</a> can have <a href=3D#syntax-text title=3Dsyntax-t=
ext>text</a> and
+  <a href=3D#syntax-charref title=3Dsyntax-charref>character refer=
ences</a>, but the text must not contain an <a href=3D#syntax-am=
biguous-ampersand title=3Dsyntax-ambiguous-ampersand>ambiguous ampersa=
nd</a>. There are also <a href=3D#cdata-rcdata-restrictions>f=
urther restrictions</a> described below.</p>
+
+  <p><a href=3D#foreign-elements>Foreign elements</a> =
whose start tag is marked as self-closing can't have any contents
+  (since, again, as there's no end tag, no content can be put between th=
e start tag and the end
+  tag). <a href=3D#foreign-elements>Foreign elements</a> who=
se start tag is <em>not</em> marked as self-closing can
+  have <a href=3D#syntax-text title=3Dsyntax-text>text</a>, =
<a href=3D#syntax-charref title=3Dsyntax-charref>character
+  references</a>, <a href=3D#syntax-cdata title=3Dsyntax-cdata&=
gt;CDATA sections</a>, other <a href=3D#syntax-elements title=3D=
syntax-elements>elements</a>, and <a href=3D#syntax-comments =
title=3Dsyntax-comments>comments</a>, but
+  the text must not contain the character U+003C LESS-THAN SIGN (&lt=
;) or an <a href=3D#syntax-ambiguous-ampersand title=3Dsyntax-ambiguou=
s-ampersand>ambiguous ampersand</a>.</p>
+
+  <div class=3Dnote>
+
+   <p>The HTML syntax does not support namespace declarations, eve=
n in <a href=3D#foreign-elements>foreign
+   elements</a>.</p>
+
+   <p>For instance, consider the following HTML fragment:</p&gt=
;
+
+   <pre><p>
+ <svg>
+  <metadata>
+   <!-- this is invalid -->
+   <cdr:license xmlns:cdr=3D"http://www.example.com/cdr/meta=
data" name=3D"MIT"/>
+  </metadata>
+ </svg>
+</p></pre>
+
+   <p>The innermost element, <code title=3D"">cdr:=
license</code>, is actually in the SVG namespace, as
+   the "<code title=3D"">xmlns:cdr</code>&quo=
t; attribute has no effect (unlike in XML). In fact, as the
+   comment in the fragment above says, the fragment is actually non-conf=
orming. This is because the
+   SVG specification does not define any elements called "<code =
title=3D"">cdr:license</code>" in the
+   SVG namespace.</p>
+
+  </div>
+
+  <p><a href=3D#normal-elements>Normal elements</a> ca=
n have <a href=3D#syntax-text title=3Dsyntax-text>text</a>, &=
lt;a href=3D#syntax-charref title=3Dsyntax-charref>character reference=
s</a>, other <a href=3D#syntax-elements title=3Dsyntax-elements&=
gt;elements</a>, and <a href=3D#syntax-comments title=3Dsyntax-c=
omments>comments</a>, but
+  the text must not contain the character U+003C LESS-THAN SIGN (&lt=
;) or an <a href=3D#syntax-ambiguous-ampersand title=3Dsyntax-ambiguou=
s-ampersand>ambiguous ampersand</a>. Some <a href=3D#normal-e=
lements>normal elements</a>
+  also have <a href=3D#element-restrictions>yet more restrictions&=
lt;/a> on what content they are
+  allowed to hold, beyond the restrictions imposed by the content model =
and those described in this
+  paragraph. Those restrictions are described below.</p>
+
+  <p>Tags contain a <dfn id=3Dsyntax-tag-name title=3Dsyntax-ta=
g-name>tag name</dfn>, giving the element's name. HTML
+  elements all have names that only use <a href=3D#alphanumeric-ascii=
-characters>alphanumeric ASCII characters</a>. In the HTML
+  syntax, tag names, even those for <a href=3D#foreign-elements>fo=
reign elements</a>, may be written with any mix of
+  lower- and uppercase letters that, when converted to all-lowercase, ma=
tches the element's tag
+  name; tag names are case-insensitive.</p>
+
+
+  <h5 id=3Dstart-tags><span class=3Dsecno>12.1.2.1 </span=
>Start tags</h5>
+
+  <p><dfn id=3Dsyntax-start-tag title=3Dsyntax-start-tag>Sta=
rt tags</dfn> must have the following format:</p>
+
+  <ol><li>The first character of a start tag must be a U+003=
C LESS-THAN SIGN character (<).</li>
+
+   <li>The next few characters of a start tag must be the element'=
s <a href=3D#syntax-tag-name title=3Dsyntax-tag-name>tag name</a=
>.</li>
+
+   <li>If there are to be any attributes in the next step, there m=
ust first be one or more <a href=3D#space-character title=3D"spac=
e character">space characters</a>.</li>
+
+   <li>Then, the start tag may have a number of attributes, the &l=
t;a href=3D#syntax-attributes title=3Dsyntax-attributes>syntax for whi=
ch</a> is described below. Attributes must be
+   separated from each other by one or more <a href=3D#space-characte=
r title=3D"space character">space
+   characters</a>.</li>
+
+   <li>After the attributes, or after the <a href=3D#syntax-tag=
-name title=3Dsyntax-tag-name>tag name</a> if there are
+   no attributes, there may be one or more <a href=3D#space-character=
 title=3D"space character">space characters</a>.
+   (Some attributes are required to be followed by a space. See the <=
a href=3D#syntax-attributes title=3Dsyntax-attributes>attributes secti=
on</a> below.)</li>
+
+   <li>Then, if the element is one of the <a href=3D#void-eleme=
nts>void elements</a>, or if the element is a <a href=3D#fore=
ign-elements title=3D"foreign elements">foreign element</=
a>, then there may be a single U+002F SOLIDUS
+   character (/). This character has no effect on <a href=3D#void-ele=
ments>void elements</a>, but on <a href=3D#foreign-elements&g=
t;foreign
+   elements</a> it marks the start tag as self-closing.</li>
+
+   <li>Finally, start tags must be closed by a U+003E GREATER-THAN=
 SIGN character (>).</li>
+
+  </ol><h5 id=3Dend-tags><span class=3Dsecno>12.1.2.2 =
</span>End tags</h5>
+
+  <p><dfn id=3Dsyntax-end-tag title=3Dsyntax-end-tag>End tag=
s</dfn> must have the following format:</p>
+
+  <ol><li>The first character of an end tag must be a U+003C=
 LESS-THAN SIGN character (<).</li>
+
+   <li>The second character of an end tag must be a U+002F SOLIDUS=
 character (/).</li>
+
+   <li>The next few characters of an end tag must be the element's=
 <a href=3D#syntax-tag-name title=3Dsyntax-tag-name>tag
+   name</a>.</li>
+
+   <li>After the tag name, there may be one or more <a href=3D#=
space-character title=3D"space character">space
+   characters</a>.</li>
+
+   <li>Finally, end tags must be closed by a U+003E GREATER-THAN S=
IGN character (>).</li>
+
+  </ol><h5 id=3Dattributes-0><span class=3Dsecno>12.1.=
2.3 </span>Attributes</h5>
+
+  <p><dfn id=3Dsyntax-attributes title=3Dsyntax-attributes>A=
ttributes</dfn> for an element are expressed inside the
+  element's start tag.</p>
+
+  <p>Attributes have a name and a value. <dfn id=3Dsyntax-attri=
bute-name title=3Dsyntax-attribute-name>Attribute names</dfn>
+  must consist of one or more characters other than the <a href=3D#sp=
ace-character title=3D"space character">space
+  characters</a>, U+0000 NULL, U+0022 QUOTATION MARK ("), U+0=
027 APOSTROPHE ('), U+003E
+  GREATER-THAN SIGN (>), U+002F SOLIDUS (/), and U+003D EQUALS SI=
GN (=3D) characters, the <a href=3D#control-characters>control
+  characters</a>, and any characters that are not defined by Unico=
de. In the HTML syntax, attribute
+  names, even those for <a href=3D#foreign-elements>foreign elemen=
ts</a>, may be written with any mix of lower- and
+  uppercase letters that are an <a href=3D#ascii-case-insensitive>=
ASCII case-insensitive</a> match for the attribute's
+  name.</p>
+
+  <p><dfn id=3Dsyntax-attribute-value title=3Dsyntax-attribute-=
value>Attribute values</dfn> are a mixture of <a href=3D#synt=
ax-text title=3Dsyntax-text>text</a> and <a href=3D#syntax-ch=
arref title=3Dsyntax-charref>character references</a>,
+  except with the additional restriction that the text cannot contain an=
 <a href=3D#syntax-ambiguous-ampersand title=3Dsyntax-ambiguous-ampers=
and>ambiguous ampersand</a>.</p>
+
+  <p>Attributes can be specified in four different ways:</p>
+
+  <dl><dt>Empty attribute syntax</dt>
+
+   <dd>
+
+    <p>Just the <a href=3D#syntax-attribute-name title=3Dsyntax=
-attribute-name>attribute name</a>. The value is implicitly
+    the empty string.</p>
+
+    <div class=3Dexample>
+
+     <p>In the following example, the <code title=3Dattr-fe-dis=
abled><a href=3D#attr-fe-disabled>disabled</a></code&gt=
; attribute is
+     given with the empty attribute syntax:</p>
+
+     <pre><input <em>disabled</em>></=
pre>
+
+    </div>
+
+    <p>If an attribute using the empty attribute syntax is to be f=
ollowed by another attribute, then
+    there must be a <a href=3D#space-character>space character<=
/a> separating the two.</p>
+
+   </dd>
+
+   <dt id=3Dunquoted>Unquoted attribute value syntax</dt>
+
+   <dd>
+
+    <p>The <a href=3D#syntax-attribute-name title=3Dsyntax-attr=
ibute-name>attribute name</a>, followed by zero or more <a hr=
ef=3D#space-character title=3D"space character">space charac=
ters</a>, followed by a single U+003D EQUALS SIGN
+    character, followed by zero or more <a href=3D#space-character ti=
tle=3D"space character">space characters</a>,
+    followed by the <a href=3D#syntax-attribute-value title=3Dsyntax-=
attribute-value>attribute value</a>, which, in addition
+    to the requirements given above for attribute values, must not conta=
in any literal <a href=3D#space-character title=3D"space characte=
r">space characters</a>, any U+0022 QUOTATION MARK characte=
rs ("),
+    U+0027 APOSTROPHE characters ('), U+003D EQUALS SIGN characters (=3D=
), U+003C LESS-THAN SIGN
+    characters (<), U+003E GREATER-THAN SIGN characters (>=
), or U+0060 GRAVE ACCENT characters
+    (`), and must not be the empty string.</p>
+
+    <!-- The ` character is in this list on a temporary basis, waitin=
g for IE to fix its parsing bug
+         whereby it treats ` as an attribute value delimiter. Otherwise,=
 escaping software that
+         tries to be clever and not use quotes when it doesn't need to c=
ould be tricked by an
+         attacker.
+
+         Posit a site that allows the user to input text that is used ve=
rbatim in two attributes,
+         such that the user can set the first attribute's value to:
+
+            `
+
+         ...and the second to:
+
+            ` onload=3D'...payload...' end=3Dx
+
+         ...with the assumption that the site is going to not quote the =
first one, and quote the
+         second one with double quotes:
+
+            <body title=3D` class=3D"` onload=3D'...payload...' =
end=3Dx">
+
+         In IE, this is treated as:
+
+            <body title=3D' class=3D"'
+                  onload=3D'...payload...'
+                  end=3D'x"'>
+
+    -->
+
+
+    <div class=3Dexample>
+
+     <p>In the following example, the <code title=3Dattr-input-=
value><a href=3D#attr-input-value>value</a></code> a=
ttribute is given
+     with the unquoted attribute value syntax:</p>
+
+     <pre><input <em>value=3Dyes</em>>&l=
t;/pre>
+
+    </div>
+
+    <p>If an attribute using the unquoted attribute syntax is to b=
e followed by another attribute or
+    by the optional U+002F SOLIDUS character (/) allowed in step 6 of th=
e <a href=3D#syntax-start-tag title=3Dsyntax-start-tag>start tag&lt=
;/a> syntax above, then there must be a <a href=3D#space-character&=
gt;space
+    character</a> separating the two.</p>
+
+   </dd>
+
+   <dt>Single-quoted attribute value syntax</dt>
+
+   <dd>
+
+    <p>The <a href=3D#syntax-attribute-name title=3Dsyntax-attr=
ibute-name>attribute name</a>, followed by zero or more <a hr=
ef=3D#space-character title=3D"space character">space charac=
ters</a>, followed by a single U+003D EQUALS SIGN
+    character, followed by zero or more <a href=3D#space-character ti=
tle=3D"space character">space characters</a>,
+    followed by a single U+0027 APOSTROPHE character ('), followed by th=
e <a href=3D#syntax-attribute-value title=3Dsyntax-attribute-value>=
attribute value</a>, which, in addition to the requirements
+    given above for attribute values, must not contain any literal U+002=
7 APOSTROPHE characters ('),
+    and finally followed by a second single U+0027 APOSTROPHE character =
(').</p>
+
+    <div class=3Dexample>
+
+     <p>In the following example, the <code title=3Dattr-input-=
type><a href=3D#attr-input-type>type</a></code> attr=
ibute is given
+     with the single-quoted attribute value syntax:</p>
+
+     <pre><input <em>type=3D'checkbox'</em>&amp=
;gt;</pre>
+
+    </div>
+
+    <p>If an attribute using the single-quoted attribute syntax is=
 to be followed by another
+    attribute, then there must be a <a href=3D#space-character>spa=
ce character</a> separating the two.</p>
+
+   </dd>
+
+   <dt>Double-quoted attribute value syntax</dt>
+
+   <dd>
+
+    <p>The <a href=3D#syntax-attribute-name title=3Dsyntax-attr=
ibute-name>attribute name</a>, followed by zero or more <a hr=
ef=3D#space-character title=3D"space character">space charac=
ters</a>, followed by a single U+003D EQUALS SIGN
+    character, followed by zero or more <a href=3D#space-character ti=
tle=3D"space character">space characters</a>,
+    followed by a single U+0022 QUOTATION MARK character ("), follo=
wed by the <a href=3D#syntax-attribute-value title=3Dsyntax-attribute-=
value>attribute value</a>, which, in addition to the requirement=
s
+    given above for attribute values, must not contain any literal U+002=
2 QUOTATION MARK characters
+    ("), and finally followed by a second single U+0022 QUOTATION M=
ARK character (").</p>
+
+    <div class=3Dexample>
+
+     <p>In the following example, the <code title=3Dattr-fe-nam=
e><a href=3D#attr-fe-name>name</a></code> attribute =
is given with
+     the double-quoted attribute value syntax:</p>
+
+     <pre><input <em>name=3D"be evil"</e=
m>></pre>
+
+    </div>
+
+    <p>If an attribute using the double-quoted attribute syntax is=
 to be followed by another
+    attribute, then there must be a <a href=3D#space-character>spa=
ce character</a> separating the two.</p>
+
+   </dd>
+
+  </dl><p>There must never be two or more attributes on the =
same start tag whose names are an <a href=3D#ascii-case-insensitive&gt=
;ASCII
+  case-insensitive</a> match for each other.</p>
+
+  <hr><p>When a <a href=3D#foreign-elements title=3D&quot=
;foreign elements">foreign element</a> has one of the names=
paced
+  attributes given by the local name and namespace of the first and seco=
nd cells of a row from the
+  following table, it must be written using the name given by the third =
cell from the same row.</p>
+
+  <table><thead><tr><th> Local name <th> N=
amespace <th> Attribute name
+   <tbody><tr><td> <code title=3D"">ac=
tuate</code> <td> <a href=3D#xlink-namespace>XLink name=
space</a> <td> <code title=3D"">xlink:actuate=
</code>
+    <tr><td> <code title=3D"">arcrole</co=
de> <td> <a href=3D#xlink-namespace>XLink namespace</a&=
gt; <td> <code title=3D"">xlink:arcrole</code&gt=
;
+    <tr><td> <code title=3D"">href</code&=
gt; <td> <a href=3D#xlink-namespace>XLink namespace</a>=
 <td> <code title=3D"">xlink:href</code>
+    <tr><td> <code title=3D"">role</code&=
gt; <td> <a href=3D#xlink-namespace>XLink namespace</a>=
 <td> <code title=3D"">xlink:role</code>
+    <tr><td> <code title=3D"">show</code&=
gt; <td> <a href=3D#xlink-namespace>XLink namespace</a>=
 <td> <code title=3D"">xlink:show</code>
+    <tr><td> <code title=3D"">title</code=
> <td> <a href=3D#xlink-namespace>XLink namespace</a&gt=
; <td> <code title=3D"">xlink:title</code>
+    <tr><td> <code title=3D"">type</code&=
gt; <td> <a href=3D#xlink-namespace>XLink namespace</a>=
 <td> <code title=3D"">xlink:type</code>
+    <tr><td> <code title=3D"">base</code&=
gt; <td> <a href=3D#xml-namespace>XML namespace</a> &lt=
;!-- attr-xml-base --> <td> <code title=3D"">xml=
:base</code>
+    <tr><td> <code title=3D"">lang</code&=
gt; <td> <a href=3D#xml-namespace>XML namespace</a> &lt=
;td> <code title=3D"">xml:lang</code>
+    <tr><td> <code title=3D"">space</code=
> <td> <a href=3D#xml-namespace>XML namespace</a> &l=
t;td> <code title=3D"">xml:space</code>
+    <tr><td> <code title=3D"">xmlns</code=
> <td> <a href=3D#xmlns-namespace>XMLNS namespace</a&gt=
; <td> <code title=3D"">xmlns</code>
+    <tr><td> <code title=3D"">xlink</code=
> <td> <a href=3D#xmlns-namespace>XMLNS namespace</a&gt=
; <td> <code title=3D"">xmlns:xlink</code>
+  </table><p>No other namespaced attribute can be expressed =
in <a href=3D#syntax>the HTML syntax</a>.</p>
+
+  <p class=3Dnote>Whether the attributes in the table above are co=
nforming or not is defined by
+  other specifications (e.g. the SVG and MathML specifications); this se=
ction only describes the
+  syntax rules if the attributes are serialized using the HTML syntax.&l=
t;/p>
+
+
+  <h5 id=3Doptional-tags><span class=3Dsecno>12.1.2.4 </s=
pan>Optional tags</h5>
+
+  <p>Certain tags can be <dfn id=3Dsyntax-tag-omission title=3D=
syntax-tag-omission>omitted</dfn>.</p>
+
+  <p class=3Dnote>Omitting an element's <a href=3D#syntax-start=
-tag title=3Dsyntax-start-tag>start tag</a> in the
+  situations described below does not mean the element is not present; i=
t is implied, but it is
+  still there. For example, an HTML document always has a root <code&=
gt;<a href=3D#the-html-element>html</a></code> element,=
 even if
+  the string <code title=3D""><html></c=
ode> doesn't appear anywhere in the markup.</p>
+
+  <!-- <html> -->
+  <p>An <code><a href=3D#the-html-element>html</a&g=
t;</code> element's <a href=3D#syntax-start-tag title=3Dsyntax-s=
tart-tag>start tag</a> may be omitted
+  if the first thing inside the <code><a href=3D#the-html-eleme=
nt>html</a></code> element is not a <a href=3D#syntax-c=
omments title=3Dsyntax-comments>comment</a>.</p>
+
+  <!-- </html> -->
+  <p>An <code><a href=3D#the-html-element>html</a&g=
t;</code> element's <a href=3D#syntax-end-tag title=3Dsyntax-end=
-tag>end tag</a> may be omitted if
+  the <code><a href=3D#the-html-element>html</a></c=
ode> element is not immediately followed by a <a href=3D#syntax-com=
ments title=3Dsyntax-comments>comment</a>.</p>
+
+  <!-- <head> -->
+  <p>A <code><a href=3D#the-head-element>head</a&gt=
;</code> element's <a href=3D#syntax-start-tag title=3Dsyntax-st=
art-tag>start tag</a> may be omitted if
+  the element is empty, or if the first thing inside the <code>&lt=
;a href=3D#the-head-element>head</a></code> element is an
+  element.</p>
+
+  <!-- </head> -->
+  <p>A <code><a href=3D#the-head-element>head</a&gt=
;</code> element's <a href=3D#syntax-end-tag title=3Dsyntax-end-=
tag>end tag</a> may be omitted if the
+  <code><a href=3D#the-head-element>head</a></code&=
gt; element is not immediately followed by a <a href=3D#space-characte=
r>space character</a> or a <a href=3D#syntax-comments title=3D=
syntax-comments>comment</a>.</p>
+
+<!--CLEANUP-->
+  <!-- <body> -->
+  <p>A <code><a href=3D#the-body-element>body</a&gt=
;</code> element's <a href=3D#syntax-start-tag title=3Dsyntax-st=
art-tag>start tag</a> may be omitted if
+  the element is empty, or if the first thing inside the <code>&lt=
;a href=3D#the-body-element>body</a></code> element is not=
 a
+  <a href=3D#space-character>space character</a> or a <a =
href=3D#syntax-comments title=3Dsyntax-comments>comment</a>, exc=
ept if the
+  first thing inside the <code><a href=3D#the-body-element>b=
ody</a></code> element is a <code><a href=3D#the-met=
a-element>meta</a></code>, <code><a href=3D#the-l=
ink-element>link</a></code>, <code><a href=3D#the=
-script-element>script</a></code>, <code><a href=3D=
#the-style-element>style</a></code>, or <code><a =
href=3D#the-template-element>template</a></code>
+  element. <!-- Note that even if the </head> end tag is presen=
t, the parser makes <style> and
+  <script> elements between </head> and <body> end up =
in the <head> instead of implying the <body>
+  --></p>
+
+  <!-- </body> -->
+  <p>A <code><a href=3D#the-body-element>body</a&gt=
;</code> element's <a href=3D#syntax-end-tag title=3Dsyntax-end-=
tag>end tag</a> may be omitted if the
+  <code><a href=3D#the-body-element>body</a></code&=
gt; element is not immediately followed by a <a href=3D#syntax-comment=
s title=3Dsyntax-comments>comment</a>.</p>
+
+  <!-- </li> -->
+  <p>An <code><a href=3D#the-li-element>li</a>&l=
t;/code> element's <a href=3D#syntax-end-tag title=3Dsyntax-end-tag=
>end tag</a> may be omitted if the
+  <code><a href=3D#the-li-element>li</a></code> =
element is immediately followed by another <code><a href=3D#the-=
li-element>li</a></code> element or if there is
+  no more content in the parent element.</p>
+
+  <!-- </dt> -->
+  <p>A <code><a href=3D#the-dt-element>dt</a>&lt=
;/code> element's <a href=3D#syntax-end-tag title=3Dsyntax-end-tag&=
gt;end tag</a> may be omitted if the
+  <code><a href=3D#the-dt-element>dt</a></code> =
element is immediately followed by another <code><a href=3D#the-=
dt-element>dt</a></code> element or a
+  <code><a href=3D#the-dd-element>dd</a></code> =
element.</p>
+
+  <!-- </dd> -->
+  <p>A <code><a href=3D#the-dd-element>dd</a>&lt=
;/code> element's <a href=3D#syntax-end-tag title=3Dsyntax-end-tag&=
gt;end tag</a> may be omitted if the
+  <code><a href=3D#the-dd-element>dd</a></code> =
element is immediately followed by another <code><a href=3D#the-=
dd-element>dd</a></code> element or a
+  <code><a href=3D#the-dt-element>dt</a></code> =
element, or if there is no more content in the parent element.</p>
+
+<!--CLEANUP-->
+  <!-- </p> -->
+  <p>A <code><a href=3D#the-p-element>p</a></=
code> element's <a href=3D#syntax-end-tag title=3Dsyntax-end-tag&gt=
;end tag</a> may be omitted if the
+  <code><a href=3D#the-p-element>p</a></code> el=
ement is immediately followed by an <code><a href=3D#the-address=
-element>address</a></code>, <code><a href=3D#the=
-article-element>article</a></code>,
+  <code><a href=3D#the-aside-element>aside</a></cod=
e>, <code><a href=3D#the-blockquote-element>blockquote<=
/a></code>, <code><a href=3D#the-div-element>div<=
/a></code>, <code><a href=3D#the-dl-element>dl</a=
></code>,
+  <code><a href=3D#the-fieldset-element>fieldset</a>&l=
t;/code>, <code><a href=3D#the-footer-element>footer</a=
></code>, <code><a href=3D#the-form-element>form<=
/a></code>, <code><a href=3D#the-h1,-h2,-h3,-h4,-h5,-an=
d-h6-elements>h1</a></code>, <code><a href=3D#the=
-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h2</a></code>,
+  <code><a href=3D#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h=
3</a></code>, <code><a href=3D#the-h1,-h2,-h3,-h4,-h=
5,-and-h6-elements>h4</a></code>, <code><a href=3D=
#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h5</a></code>, &l=
t;code><a href=3D#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h6<=
/a></code>, <code><a href=3D#the-header-element>head=
er</a></code>,
+  <code><a href=3D#the-hgroup-element>hgroup</a></c=
ode>, <code><a href=3D#the-hr-element>hr</a></cod=
e>, <code><a href=3D#the-main-element>main</a></c=
ode>, <code><a href=3D#the-menu-element>menu</a><=
/code>, <code><a href=3D#the-nav-element>nav</a><=
/code>,
+  <code><a href=3D#the-ol-element>ol</a></code>,=
 <code><a href=3D#the-p-element>p</a></code>, &lt=
;code><a href=3D#the-pre-element>pre</a></code>, &lt=
;code><a href=3D#the-section-element>section</a></code&=
gt;, <code><a href=3D#the-table-element>table</a></c=
ode>, or
+  <code><a href=3D#the-ul-element>ul</a></code>,=
 element, or if there is no more content in the parent element and the pa=
rent
+  element is not an <code><a href=3D#the-a-element>a</a&g=
t;</code> element.</p>
+
+  <!-- </rt> -->
+  <p>An <code><a href=3D#the-rt-element>rt</a>&l=
t;/code> element's <a href=3D#syntax-end-tag title=3Dsyntax-end-tag=
>end tag</a> may be omitted if the
+  <code><a href=3D#the-rt-element>rt</a></code> =
element is immediately followed by an <code><a href=3D#the-rt-el=
ement>rt</a></code> or <code><a href=3D#the-rp-el=
ement>rp</a></code> element,
+  or if there is no more content in the parent element.</p>
+
+  <!-- </rp> -->
+  <p>An <code><a href=3D#the-rp-element>rp</a>&l=
t;/code> element's <a href=3D#syntax-end-tag title=3Dsyntax-end-tag=
>end tag</a> may be omitted if the
+  <code><a href=3D#the-rp-element>rp</a></code> =
element is immediately followed by an <code><a href=3D#the-rt-el=
ement>rt</a></code> or <code><a href=3D#the-rp-el=
ement>rp</a></code> element,
+  or if there is no more content in the parent element.</p>
+
+  <!-- </optgroup> (the text assumes <optgroup> can only =
be inside a <select>; commented out text
+  below can handle the non-<select> case if we ever allow it) --&g=
t;
+  <p>An <code><a href=3D#the-optgroup-element>optgroup=
</a></code> element's <a href=3D#syntax-end-tag title=3Dsy=
ntax-end-tag>end tag</a> may be omitted
+  if the <code><a href=3D#the-optgroup-element>optgroup</=
a></code> element <!--has an ancestor <code>select</=
code> element and--> is
+  immediately followed by another <code><a href=3D#the-optgroup=
-element>optgroup</a></code> element, or if <!--all of =
the elements that
+  are ancestors of the <code>optgroup</code> element, up to =
and including the first ancestor element
+  that is not an <code>optgroup</code> element, have no more=
 content--> there is no more content in
+  the parent element.</p>
+  <!-- so e.g. the max number of </optgroup>s are omitted here:
+   <select><optgroup></select>
+   <p id=3Dx><optgroup></optgroup>x</p>
+   <p id=3Dx><optgroup><optgroup></optgroup><=
/optgroup>x</p>
+   <p><optgroup id=3Dx><optgroup></optgroup>x&lt=
;/p>
+   <p><optgroup><optgroup id=3Dx>x</p>
+  -->
+
+  <!-- </option> -->
+  <p>An <code><a href=3D#the-option-element>option<=
/a></code> element's <a href=3D#syntax-end-tag title=3Dsyntax=
-end-tag>end tag</a> may be omitted if
+  the <code><a href=3D#the-option-element>option</a>&l=
t;/code> element is immediately followed by another <code><a =
href=3D#the-option-element>option</a></code> element, or
+  if it is immediately followed by an <code><a href=3D#the-optg=
roup-element>optgroup</a></code> element, or if there is n=
o more content
+  in the parent element.</p>
+
+  <!-- <colgroup> -->
+  <p>A <code><a href=3D#the-colgroup-element>colgroup&=
lt;/a></code> element's <a href=3D#syntax-start-tag title=3Ds=
yntax-start-tag>start tag</a> may be
+  omitted if the first thing inside the <code><a href=3D#the-co=
lgroup-element>colgroup</a></code> element is a <code&g=
t;<a href=3D#the-col-element>col</a></code> element,
+  and if the element is not immediately preceded by another <code>=
<a href=3D#the-colgroup-element>colgroup</a></code> ele=
ment whose
+  <a href=3D#syntax-end-tag title=3Dsyntax-end-tag>end tag</a&g=
t; has been omitted. (It can't be omitted if the element
+  is empty.)</p>
+
+  <!-- </colgroup> -->
+  <p>A <code><a href=3D#the-colgroup-element>colgroup&=
lt;/a></code> element's <a href=3D#syntax-end-tag title=3Dsyn=
tax-end-tag>end tag</a> may be omitted if
+  the <code><a href=3D#the-colgroup-element>colgroup</a&g=
t;</code> element is not immediately followed by a <a href=3D#sp=
ace-character>space character</a> or
+  a <a href=3D#syntax-comments title=3Dsyntax-comments>comment<=
/a>.</p>
+
+  <!-- </thead> -->
+  <p>A <code><a href=3D#the-thead-element>thead</a&=
gt;</code> element's <a href=3D#syntax-end-tag title=3Dsyntax-en=
d-tag>end tag</a> may be omitted if
+  the <code><a href=3D#the-thead-element>thead</a><=
/code> element is immediately followed by a <code><a href=3D#=
the-tbody-element>tbody</a></code> or
+  <code><a href=3D#the-tfoot-element>tfoot</a></cod=
e> element.</p>
+
+  <!-- <tbody> -->
+  <p>A <code><a href=3D#the-tbody-element>tbody</a&=
gt;</code> element's <a href=3D#syntax-start-tag title=3Dsyntax-=
start-tag>start tag</a> may be omitted
+  if the first thing inside the <code><a href=3D#the-tbody-elem=
ent>tbody</a></code> element is a <code><a href=3D=
#the-tr-element>tr</a></code> element, and if the
+  element is not immediately preceded by a <code><a href=3D#the=
-tbody-element>tbody</a></code>, <code><a href=3D=
#the-thead-element>thead</a></code>, or
+  <code><a href=3D#the-tfoot-element>tfoot</a></cod=
e> element whose <a href=3D#syntax-end-tag title=3Dsyntax-end-tag&g=
t;end tag</a> has been omitted. (It
+  can't be omitted if the element is empty.)</p>
+
+  <!-- </tbody> -->
+  <p>A <code><a href=3D#the-tbody-element>tbody</a&=
gt;</code> element's <a href=3D#syntax-end-tag title=3Dsyntax-en=
d-tag>end tag</a> may be omitted if
+  the <code><a href=3D#the-tbody-element>tbody</a><=
/code> element is immediately followed by a <code><a href=3D#=
the-tbody-element>tbody</a></code> or
+  <code><a href=3D#the-tfoot-element>tfoot</a></cod=
e> element, or if there is no more content in the parent element.</=
p>
+
+  <!-- </tfoot> -->
+  <p>A <code><a href=3D#the-tfoot-element>tfoot</a&=
gt;</code> element's <a href=3D#syntax-end-tag title=3Dsyntax-en=
d-tag>end tag</a> may be omitted if
+  the <code><a href=3D#the-tfoot-element>tfoot</a><=
/code> element is immediately followed by a <code><a href=3D#=
the-tbody-element>tbody</a></code> element, or if
+  there is no more content in the parent element.</p>
+
+  <!-- </tr> -->
+  <p>A <code><a href=3D#the-tr-element>tr</a>&lt=
;/code> element's <a href=3D#syntax-end-tag title=3Dsyntax-end-tag&=
gt;end tag</a> may be omitted if the
+  <code><a href=3D#the-tr-element>tr</a></code> =
element is immediately followed by another <code><a href=3D#the-=
tr-element>tr</a></code> element, or if there is
+  no more content in the parent element.</p>
+
+  <!-- </td> -->
+  <p>A <code><a href=3D#the-td-element>td</a>&lt=
;/code> element's <a href=3D#syntax-end-tag title=3Dsyntax-end-tag&=
gt;end tag</a> may be omitted if the
+  <code><a href=3D#the-td-element>td</a></code> =
element is immediately followed by a <code><a href=3D#the-td-ele=
ment>td</a></code> or <code><a href=3D#the-th-ele=
ment>th</a></code> element,
+  or if there is no more content in the parent element.</p>
+
+  <!-- </th> -->
+  <p>A <code><a href=3D#the-th-element>th</a>&lt=
;/code> element's <a href=3D#syntax-end-tag title=3Dsyntax-end-tag&=
gt;end tag</a> may be omitted if the
+  <code><a href=3D#the-th-element>th</a></code> =
element is immediately followed by a <code><a href=3D#the-td-ele=
ment>td</a></code> or <code><a href=3D#the-th-ele=
ment>th</a></code> element,
+  or if there is no more content in the parent element.</p>
+
+  <p><strong>However</strong>, a <a href=3D#syntax-=
start-tag title=3Dsyntax-start-tag>start tag</a> must never be
+  omitted if it has any attributes.</p>
+
+
+  <h5 id=3Delement-restrictions><span class=3Dsecno>12.1.2.5=
 </span>Restrictions on content models</h5>
+
+  <p>For historical reasons, certain elements have extra restricti=
ons beyond even the restrictions
+  given by their content model.</p>
+
+  <p>A <code><a href=3D#the-table-element>table</a&=
gt;</code> element must not contain <code><a href=3D#the-t=
r-element>tr</a></code> elements, even though these
+  elements are technically allowed inside <code><a href=3D#the-=
table-element>table</a></code> elements according to the c=
ontent
+  models described in this specification. (If a <code><a href=3D=
#the-tr-element>tr</a></code> element is put inside a
+  <code><a href=3D#the-table-element>table</a></cod=
e> in the markup, it will in fact imply a <code><a href=3D#th=
e-tbody-element>tbody</a></code> start tag before
+  it.)</p>
+
+  <p>A single <a href=3D#syntax-newlines title=3Dsyntax-newline=
s>newline</a> may be placed immediately after the <a href=3D#=
syntax-start-tag title=3Dsyntax-start-tag>start tag</a> of <c=
ode><a href=3D#the-pre-element>pre</a></code> and &l=
t;code><a href=3D#the-textarea-element>textarea</a></co=
de> elements.
+  This does not affect the processing of the element. The otherwise opti=
onal <a href=3D#syntax-newlines title=3Dsyntax-newlines>newline<=
/a> <em>must</em> be included if the element's contents
+  themselves start with a <a href=3D#syntax-newlines title=3Dsyntax-n=
ewlines>newline</a> (because otherwise the
+  leading newline in the contents would be treated like the optional new=
line, and ignored).</p>
+
+  <div class=3Dexample>
+   <p>The following two <code><a href=3D#the-pre-element&=
gt;pre</a></code> blocks are equivalent:</p>
+   <pre><pre>Hello</pre></pre>
+   <pre><pre><br>Hello</pre><=
/pre>
+  </div>
+
+
+  <h5 id=3Dcdata-rcdata-restrictions><span class=3Dsecno>12.=
1.2.6 </span>Restrictions on the contents of raw text and escapable=
 raw text elements</h5>
+
+  <p>The text in <a href=3D#raw-text-elements title=3D"raw=
 text elements">raw text</a> and <a href=3D#escapable-ra=
w-text-elements>escapable raw text
+  elements</a> must not contain any occurrences of the string &quo=
t;<code title=3D""></</code>"
+  (U+003C LESS-THAN SIGN, U+002F SOLIDUS) followed by characters that ca=
se-insensitively match the
+  tag name of the element followed by one of U+0009 CHARACTER TABULATION=
 (tab), U+000A LINE FEED
+  (LF), U+000C FORM FEED (FF), U+000D CARRIAGE RETURN (CR), U+0020 SPACE=
, U+003E GREATER-THAN SIGN
+  (>), or U+002F SOLIDUS (/).</p>
+
+
+  <h4 id=3Dtext-0><span class=3Dsecno>12.1.3 </span>Te=
xt</h4>
+
+  <p><dfn id=3Dsyntax-text title=3Dsyntax-text>Text</dfn&=
gt; is allowed inside elements, attribute values, and comments.
+  Extra constraints are placed on what is and what is not allowed in tex=
t based on where the text is
+  to be put, as described in the other sections.</p>
+
+
+  <h5 id=3Dnewlines><span class=3Dsecno>12.1.3.1 </span&g=
t;Newlines</h5>
+
+  <p><dfn id=3Dsyntax-newlines title=3Dsyntax-newlines>Newli=
nes</dfn> in HTML may be represented either as U+000D
+  CARRIAGE RETURN (CR) characters, U+000A LINE FEED (LF) characters, or =
pairs of U+000D CARRIAGE
+  RETURN (CR), U+000A LINE FEED (LF) characters in that order.</p>
+
+  <p>Where <a href=3D#syntax-charref title=3Dsyntax-charref>=
character references</a> are allowed, a character
+  reference of a U+000A LINE FEED (LF) character (but not a U+000D CARRI=
AGE RETURN (CR) character)
+  also represents a <a href=3D#syntax-newlines title=3Dsyntax-newline=
s>newline</a>.</p>
+
+
+  <h4 id=3Dcharacter-references><span class=3Dsecno>12.1.4 &=
lt;/span>Character references</h4>
+
+  <p>In certain cases described in other sections, <a href=3D#s=
yntax-text title=3Dsyntax-text>text</a> may be
+  mixed with <dfn id=3Dsyntax-charref title=3Dsyntax-charref>chara=
cter references</dfn>. These can be used to escape
+  characters that couldn't otherwise legally be included in <a href=3D=
#syntax-text title=3Dsyntax-text>text</a>.</p>
+
+  <p>Character references must start with a U+0026 AMPERSAND chara=
cter (&). Following this,
+  there are three possible kinds of character references:</p>
+
+  <dl><dt>Named character references</dt>
+
+   <dd>The ampersand must be followed by one of the names given in=
 the <a href=3D#named-character-references>named character
+   references</a> section, using the same case. <span class=3Di=
mpl>The name must be one that is
+   terminated by a U+003B SEMICOLON character (;).</span></dd&g=
t;
+
+
+   <dt>Decimal numeric character reference</dt>
+
+   <dd>The ampersand must be followed by a U+0023 NUMBER SIGN char=
acter (#), followed by one or more
+   <a href=3D#ascii-digits>ASCII digits</a>, representing a =
base-ten integer that corresponds to a Unicode code
+   point that is allowed according to the definition below. The digits m=
ust then be followed by a
+   U+003B SEMICOLON character (;).</dd>
+
+
+   <dt>Hexadecimal numeric character reference</dt>
+
+   <dd>The ampersand must be followed by a U+0023 NUMBER SIGN char=
acter (#), which must be followed
+   by either a U+0078 LATIN SMALL LETTER X character (x) or a U+0058 LAT=
IN CAPITAL LETTER X
+   character (X), which must then be followed by one or more <a href=3D=
#ascii-hex-digits>ASCII hex digits</a>,
+   representing a base-sixteen integer that corresponds to a Unicode cod=
e point that is allowed
+   according to the definition below. The digits must then be followed b=
y a U+003B SEMICOLON
+   character (;).</dd>
+
+  </dl><p>The numeric character reference forms described ab=
ove are allowed to reference any Unicode code
+  point other than U+0000, U+000D, permanently undefined Unicode charact=
ers (noncharacters),
+  surrogates (U+D800–U+DFFF), and <a href=3D#control-charac=
ters>control characters</a> other than <a href=3D#space-chara=
cter title=3D"space character">space characters</a>.&l=
t;/p>
+
+  <p>An <dfn id=3Dsyntax-ambiguous-ampersand title=3Dsyntax-amb=
iguous-ampersand>ambiguous ampersand</dfn> is a U+0026 AMPERSAND
+  character (&) that is followed by one or more <a href=3D#al=
phanumeric-ascii-characters>alphanumeric ASCII characters</a>,
+  followed by a U+003B SEMICOLON character (;), where these characters d=
o not match any of the names
+  given in the <a href=3D#named-character-references>named charact=
er references</a> section.</p>
+
+
+  <h4 id=3Dcdata-sections><span class=3Dsecno>12.1.5 </sp=
an>CDATA sections</h4>
+
+  <p><dfn id=3Dsyntax-cdata title=3Dsyntax-cdata>CDATA secti=
ons</dfn> must consist of the following components, in
+  this order:</p>
+
+  <ol><li>The string "<code title=3D"">=
<![CDATA[</code>".</li>
+
+   <li>Optionally, <a href=3D#syntax-text title=3Dsyntax-text&g=
t;text</a>, with the additional restriction that the
+   text must not contain the string "<code title=3D""&=
gt;]]></code>".</li>
+
+   <li>The string "<code title=3D"">]]&gt=
;</code>".</li>
+
+  </ol><div class=3Dexample>
+
+   <p>CDATA sections can only be used in foreign content (MathML o=
r SVG). In this example, a CDATA
+   section is used to escape the contents of an <code>ms</code&=
gt; element:</p>
+
+   <pre><p>You can add a string to a number, but thi=
s stringifies the number:</p>
+<math>
+ <ms><![CDATA[x<y]]></ms&g=
t;
+ <mo>+</mo>
+ <mn>3</mn>
+ <mo>=3D</mo>
+ <ms><![CDATA[x<y3]]></ms&=
gt;
+</math></pre>
+
+  </div>
+
+
+  <h4 id=3Dcomments><span class=3Dsecno>12.1.6 </span>=
Comments</h4>
+
+  <p><dfn id=3Dsyntax-comments title=3Dsyntax-comments>Comme=
nts</dfn> must start with the four character sequence U+003C
+  LESS-THAN SIGN, U+0021 EXCLAMATION MARK, U+002D HYPHEN-MINUS, U+002D H=
YPHEN-MINUS (<code title=3D""><!--</code>). =
Following this sequence, the comment may have <a href=3D#syntax-text t=
itle=3Dsyntax-text>text</a>, with the additional restriction tha=
t the text must not start with
+  a single U+003E GREATER-THAN SIGN character (>), nor start with=
 a U+002D HYPHEN-MINUS character
+  (-) followed by a U+003E GREATER-THAN SIGN (>) character, nor c=
ontain two consecutive U+002D
+  HYPHEN-MINUS characters (<code title=3D"">--</code&=
gt;), nor end with a U+002D HYPHEN-MINUS character
+  (-). Finally, the comment must be ended by the three character sequenc=
e U+002D HYPHEN-MINUS,
+  U+002D HYPHEN-MINUS, U+003E GREATER-THAN SIGN (<code title=3D"=
">--></code>).</p>
+
+
+<!--HTMLPARSER-->
+
+  <div class=3Dimpl>
+
+  <h3 id=3Dparsing><span class=3Dsecno>12.2 </span>Par=
sing HTML documents</h3>
+
+  <p><i>This section only applies to user agents, data minin=
g tools, and conformance
+  checkers.</i></p>
+
+  <p class=3Dnote>The rules for parsing XML documents into DOM tre=
es are covered by the next
+  section, entitled "<a href=3D#the-xhtml-syntax>The XHTML sy=
ntax</a>".</p>
+
+  <p>User agents must use the parsing rules described in this sect=
ion to generate the DOM trees from
+  <code><a href=3D#text/html>text/html</a></code&gt=
; resources. Together, these rules define what is referred to as the
+  <dfn id=3Dhtml-parser>HTML parser</dfn>.</p>
+
+  <div class=3Dnote>
+
+   <p>While the HTML syntax described in this specification bears =
a close resemblance to SGML and
+   XML, it is a separate language with its own parsing rules.</p>
+
+   <p>Some earlier versions of HTML (in particular from HTML2 to H=
TML4) were based on SGML and used
+   SGML parsing rules. However, few (if any) web browsers ever implement=
ed true SGML parsing for
+   HTML documents; the only user agents to strictly handle HTML as an SG=
ML application have
+   historically been validators. The resulting confusion — wit=
h validators claiming documents
+   to have one representation while widely deployed Web browsers interop=
erably implemented a
+   different representation — has wasted decades of productivi=
ty. This version of HTML thus
+   returns to a non-SGML basis.</p>
+
+   <p>Authors interested in using SGML tools in their authoring pi=
peline are encouraged to use XML
+   tools and the XML serialization of HTML.</p>
+
+  </div>
+
+  <p>This specification defines the parsing rules for HTML documen=
ts, whether they are syntactically
+  correct or not. Certain points in the parsing algorithm are said to be=
 <dfn id=3Dparse-error title=3D"parse
+  error">parse errors</dfn>. The error handling for parse =
errors is well-defined (that's the
+  processing rules described throughout this specification), but user ag=
ents, while parsing an HTML
+  document, may <a href=3D#abort-a-parser title=3D"abort a parse=
r">abort the parser</a> at the first <a href=3D#parse-er=
ror>parse
+  error</a> that they encounter for which they do not wish to appl=
y the rules described in this
+  specification.</p>
+
+  <p>Conformance checkers must report at least one parse error con=
dition to the user if one or more
+  parse error conditions exist in the document and must not report parse=
 error conditions if none
+  exist in the document. Conformance checkers may report more than one p=
arse error condition if more
+  than one parse error condition exists in the document.</p>
+
+  <p class=3Dnote>Parse errors are only errors with the <em>=
syntax</em> of HTML. In addition to
+  checking for parse errors, conformance checkers will also verify that =
the document obeys all the
+  other conformance requirements described in this specification.</p&=
gt;
+
+  <p>For the purposes of conformance checkers, if a resource is de=
termined to be in <a href=3D#syntax>the HTML
+  syntax</a>, then it is an <a href=3D#html-documents title=3D&=
quot;HTML documents">HTML document</a>.</p>
+
+  <p class=3Dnote>As stated <a href=3D#html-elements class=3Dno=
-backref title=3D"HTML elements">in the terminology
+  section</a>, references to <a href=3D#element-type title=3D&q=
uot;element type">element types</a> that do not
+  explicitly specify a namespace always refer to elements in the <a h=
ref=3D#html-namespace-0>HTML namespace</a>. For
+  example, if the spec talks about "a <code><a href=3D#the=
-menuitem-element>menuitem</a></code> element", then =
that is an element with
+  the local name "<code title=3D"">menuitem</cod=
e>", the namespace "<code title=3D"">http://=
www.w3.org/1999/xhtml</code>", and the interface <code>&=
lt;a href=3D#htmlmenuitemelement>HTMLMenuItemElement</a></cod=
e>.
+  Where possible, references to such elements are hyperlinked to their d=
efinition.</p>
+
+  </div>
+
+
+  <div class=3Dimpl>
+
+  <h4 id=3Doverview-of-the-parsing-model><span class=3Dsecno&gt=
;12.2.1 </span>Overview of the parsing model</h4>
+
+  <p class=3Doverview><object width=3D345 height=3D535 data=3Di=
mages/parsing-model-overview.svg><img src=3Dhttp://images.whatwg.or=
g/parsing-model-overview.png width=3D345 alt=3D"" height=3D450&=
gt;</object></p>
+
+  <p>The input to the HTML parsing process consists of a stream of=
 <a href=3D#unicode-code-point title=3D"Unicode code
+  point">Unicode code points</a>, which is passed through =
a <a href=3D#tokenization>tokenization</a> stage
+  followed by a <a href=3D#tree-construction>tree construction<=
/a> stage. The output is a <code><a href=3D#document>Docum=
ent</a></code>
+  object.</p>
+
+  <p class=3Dnote>Implementations that <a href=3D#non-scripted&=
gt;do not support scripting</a> do not
+  have to actually create a DOM <code><a href=3D#document>Do=
cument</a></code> object, but the DOM tree in such cases is
+  still used as the model for the rest of the specification.</p>
+
+  <p>In the common case, the data handled by the tokenization stag=
e comes from the network, but
+  <a href=3D#dynamic-markup-insertion title=3D"dynamic markup in=
sertion">it can also come from script</a> running in the us=
er
+  agent, e.g. using the <code title=3Ddom-document-write><a hre=
f=3D#dom-document-write>document.write()</a></code> API.&l=
t;/p>
+
+  <p id=3DnestedParsing>There is only one set of states for the to=
kenizer stage and the tree
+  construction stage, but the tree construction stage is reentrant, mean=
ing that while the tree
+  construction stage is handling one token, the tokenizer might be resum=
ed, causing further tokens
+  to be emitted and processed before the first token's processing is com=
plete.</p>
+
+  <div class=3Dexample>
+
+   <p>In the following example, the tree construction stage will b=
e called upon to handle a "p"
+   start tag token while handling the "script" end tag token:&=
lt;/p>
+
+   <pre>...
+<script>
+ document.write('<p>');
+</script>
+...</pre>
+
+  </div>
+
+  <p>To handle these cases, parsers have a <dfn id=3Dscript-nes=
ting-level>script nesting level</dfn>, which must be initially
+  set to zero, and a <dfn id=3Dparser-pause-flag>parser pause flag=
</dfn>, which must be initially set to false.</p>
+
+  </div>
+
+
+
+  <div class=3Dimpl>
+
+  <h4 id=3Dthe-input-byte-stream><span class=3Dsecno>12.2.2 =
</span>The <dfn>input byte stream</dfn></h4>
+
+  <p>The stream of Unicode code points that comprises the input to=
 the tokenization stage will be
+  initially seen by the user agent as a stream of bytes (typically comin=
g over the network or from
+  the local file system). The bytes encode the actual characters accordi=
ng to a particular
+  <i>character encoding</i>, which the user agent uses to de=
code the bytes into characters.</p>
+
+  <p class=3Dnote>For XML documents, the algorithm user agents mus=
t use to determine the character
+  encoding is given by the XML specification. This section does not appl=
y to XML documents. <a href=3D#refsXML>[XML]</a></p>
+
+  <p>Usually, the <a href=3D#encoding-sniffing-algorithm>enc=
oding sniffing algorithm</a> defined below is used to determine the
+  character encoding.</p>
+
+  <p>Given a character encoding, the bytes in the <a href=3D#th=
e-input-byte-stream>input byte stream</a> must be converted
+  to Unicode code points for the tokenizer's <a href=3D#input-stream&=
gt;input stream</a>, as described by the rules
+  for that encoding's <a href=3D#decoder>decoder</a>.</p&=
gt;
+
+  <p class=3Dnote>Bytes or sequences of bytes in the original byte=
 stream that did not conform to
+  the encoding specification (e.g. invalid UTF-8 byte sequences in a UTF=
-8 input byte stream) are
+  errors that conformance checkers are expected to report.</p>
+
+  <p class=3Dnote>Leading Byte Order Marks (BOMs) are not stripped=
 by the decoder algorithms, they
+  are stripped by the algorithm below.</p>
+
+  <p class=3Dwarning>The decoder algorithms describe how to handle=
 invalid input; for security
+  reasons, it is imperative that those rules be followed precisely. Diff=
erences in how invalid byte
+  sequences are handled can result in, amongst other problems, script in=
jection vulnerabilities
+  ("XSS").</p>
+
+  <p>When the HTML parser is decoding an input byte stream, it use=
s a character encoding and a <dfn id=3Dconcept-encoding-confidence tit=
le=3Dconcept-encoding-confidence>confidence</dfn>. The confidenc=
e is either <i>tentative</i>,
+  <i>certain</i>, or <i>irrelevant</i>. The enco=
ding used, and whether the confidence in that
+  encoding is <i>tentative</i> or <i>certain</i>=
, is <a href=3D#meta-charset-during-parse>used
+  during the parsing</a> to determine whether to <a href=3D#cha=
nge-the-encoding>change the encoding</a>. If no encoding is
+  necessary, e.g. because the parser is operating on a Unicode stream an=
d doesn't have to use a
+  character encoding at all, then the <a href=3D#concept-encoding-con=
fidence title=3Dconcept-encoding-confidence>confidence</a> is
+  <i>irrelevant</i>.</p>
+
+  <p class=3Dnote>Some algorithms feed the parser by directly addi=
ng characters to the <a href=3D#input-stream>input
+  stream</a> rather than adding bytes to the <a href=3D#the-inp=
ut-byte-stream>input byte stream</a>.</p>
+
+
+  <h5 id=3Dparsing-with-a-known-character-encoding><span class=3D=
secno>12.2.2.1 </span>Parsing with a known character encoding&lt=
;/h5>
+
+  <p>When the HTML parser is to operate on an input byte stream th=
at has <dfn id=3Da-known-definite-encoding>a known definite
+  encoding</dfn>, then the character encoding is that encoding and=
 the <a href=3D#concept-encoding-confidence title=3Dconcept-encoding-c=
onfidence>confidence</a> is <i>certain</i>.</p&gt=
;
+
+
+  <h5 id=3Ddetermining-the-character-encoding><span class=3Dsec=
no>12.2.2.2 </span>Determining the character encoding</h5>
+
+  <p>In some cases, it might be impractical to unambiguously deter=
mine the encoding before parsing
+  the document. Because of this, this specification provides for a two-p=
ass mechanism with an
+  optional pre-scan. Implementations are allowed, as described below, to=
 apply a simplified parsing
+  algorithm to whatever bytes they have available before beginning to pa=
rse the document. Then, the
+  real parser is started, using a tentative encoding derived from this p=
re-parse and other
+  out-of-band metadata. If, while the document is being loaded, the user=
 agent discovers a character
+  encoding declaration that conflicts with this information, then the pa=
rser can get reinvoked to
+  perform a parse of the document with the real encoding.</p>
+
+  <p id=3DdocumentEncoding>User agents must use the following algo=
rithm, called the <dfn id=3Dencoding-sniffing-algorithm>encoding
+  sniffing algorithm</dfn>, to determine the character encoding to=
 use when decoding a document in
+  the first pass. This algorithm takes as input any out-of-band metadata=
 available to the user agent
+  (e.g. the <a href=3D#content-type title=3DContent-Type>Content-T=
ype metadata</a> of the document) and all the
+  bytes available so far, and returns a character encoding and a <a h=
ref=3D#concept-encoding-confidence title=3Dconcept-encoding-confidence&gt=
;confidence</a> that is either <i>tentative</i> or
+  <i>certain</i>.</p>
+
+  <ol><li>
+
+    <p>If the user has explicitly instructed the user agent to ove=
rride the document's character
+    encoding with a specific encoding, optionally return that encoding w=
ith the <a href=3D#concept-encoding-confidence title=3Dconcept-encodin=
g-confidence>confidence</a> <i>certain</i> and abort=
 these steps.</p>
+
+    <p class=3Dnote>Typically, user agents remember such user requ=
ests across sessions, and in some
+    cases apply them to documents in <code><a href=3D#the-ifram=
e-element>iframe</a></code>s as well.</p>
+
+   </li>
+
+   <li>
+
+    <p>The user agent may wait for more bytes of the resource to b=
e available, either in this step
+    or at any later step in this algorithm. For instance, a user agent m=
ight wait 500ms or 1024
+    bytes, whichever came first. In general preparsing the source to fin=
d the encoding improves
+    performance, as it reduces the need to throw away the data structure=
s used when parsing upon
+    finding the encoding information. However, if the user agent delays =
too long to obtain data to
+    determine the encoding, then the cost of the delay could outweigh an=
y performance improvements
+    from the preparse.</p>
+
+    <p class=3Dnote>The authoring conformance requirements for cha=
racter encoding declarations limit
+    them to only appearing <a href=3D#charset1024>in the first 102=
4 bytes</a>. User agents are
+    therefore encouraged to use the prescan algorithm below (as invoked =
by these steps) on the first
+    1024 bytes, but not to stall beyond that.</p>
+
+   </li>
+
+   <li>
+
+    <!-- Doing this step before honouring HTTP is important for suppo=
rting
+            http://kb.dsqq.cn/html/2012-09/16/node_193.htm
+         which is encoded as UTF-8 but is incorrectly labeled as
+            Content-Type: text/html; charset=3DGB2312
+    -->
+
+    <p>For each of the rows in the following table, starting with =
the first one and going down, if
+    there are as many or more bytes available than the number of bytes i=
n the first column, and the
+    first bytes of the file match the bytes given in the first column, t=
hen return the encoding
+    given in the cell in the second column of that row, with the <a h=
ref=3D#concept-encoding-confidence title=3Dconcept-encoding-confidence&gt=
;confidence</a> <i>certain</i>, and abort these steps:&=
lt;/p>
+
+    <!-- this table is present in several forms in this file; keep th=
em in sync -->
+    <table><thead><tr><th>Bytes in Hexadecimal
+       <th>Encoding
+     <tbody><!-- nobody uses this
+      <tr>
+       <td>00 00 FE FF
+       <td>UTF-32BE
+      <tr>
+       <td>FF FE 00 00
+       <td>UTF-32LE
+--><tr><td>FE FF
+       <td>Big-endian UTF-16
+      <tr><td>FF FE
+       <td>Little-endian UTF-16
+      <tr><td>EF BB BF
+       <td>UTF-8
+<!-- nobody uses this
+      <tr>
+       <td>DD 73 66 73
+       <td>UTF-EBCDIC
+-->
+    </table><p class=3Dnote>This step looks for Unicode Byte=
 Order Marks (BOMs).</p>
+
+    <p class=3Dnote>That this step happens before the next one hon=
oring the HTTP
+    <code><a href=3D#content-type>Content-Type</a><=
/code> header is a <a href=3D#willful-violation>willful violatio=
n</a> of the HTTP specification,
+    motivated by a desire to be maximally compatible with legacy content=
. <a href=3D#refsHTTP>[HTTP]</a></p>
+
+   </li>
+
+   <li><p>If the transport layer specifies a character encod=
ing, and it is supported, return that
+   encoding with the <a href=3D#concept-encoding-confidence title=3Dc=
oncept-encoding-confidence>confidence</a> <i>certain</i=
>, and
+   abort these steps.</li>
+
+   <li>
+
+    <p>Optionally <a href=3D#prescan-a-byte-stream-to-determine=
-its-encoding title=3D"prescan a byte stream to determine its encodi=
ng">prescan the byte
+    stream to determine its encoding</a>. The <var title=3D&quo=
t;">end condition</var> is that the user
+    agent decides that scanning further bytes would not be efficient. Us=
er agents are encouraged to
+    only prescan the first 1024 bytes. User agents may decide that scann=
ing <em>any</em> bytes is
+    not efficient, in which case these substeps are entirely skipped.&lt=
;/p>
+
+    <p>The aforementioned algorithm either aborts unsuccessfully o=
r returns a character encoding. If
+    it returns a character encoding, then this algorithm must be aborted=
, returning the same
+    encoding, with <a href=3D#concept-encoding-confidence title=3Dcon=
cept-encoding-confidence>confidence</a> <i>tentative</i=
>.</p>
+
+   </li>
+
+   <li>
+
+    <p>If the <a href=3D#html-parser>HTML parser</a> f=
or which this algorithm is being run is associated with a
+    <code><a href=3D#document>Document</a></code&gt=
; that is itself in a <a href=3D#nested-browsing-context>nested bro=
wsing context</a>, run these
+    substeps:</p>
+
+    <ol><li><p>Let <var title=3D"">new=
 document</var> be the <code><a href=3D#document>Docume=
nt</a></code> with which the
+     <a href=3D#html-parser>HTML parser</a> is associated.&l=
t;/li>
+
+     <li><p>Let <var title=3D"">parent docum=
ent</var> be the <code><a href=3D#document>Document<=
/a></code> <a href=3D#browsing-context-nested-through title=3D=
"browsing context nested through">through which <var titl=
e=3D"">new document</var> is
+     nested</a> (the <a href=3D#active-document>active docum=
ent</a> of the <a href=3D#parent-browsing-context>parent brow=
sing context</a> of
+     <var title=3D"">new document</var>).</li&g=
t;
+
+     <li><p>If <var title=3D"">parent docume=
nt</var>'s <a href=3D#origin>origin</a> is not the <=
a href=3D#same-origin>same
+     origin</a> as <var title=3D"">new document&lt=
;/var>'s <a href=3D#origin>origin</a>, then abort these
+     substeps.</li>
+
+     <li><p>If <var title=3D"">parent docume=
nt</var>'s <a href=3D"#document's-character-encoding" =
title=3D"document's character
+     encoding">character encoding</a> is not an <a href=
=3D#ascii-compatible-character-encoding>ASCII-compatible character enc=
oding</a>,
+     then abort these substeps.</li>
+
+     <li><p>Return <var title=3D"">parent do=
cument</var>'s <a href=3D"#document's-character-encoding&qu=
ot; title=3D"document's character
+     encoding">character encoding</a>, with the <a href=
=3D#concept-encoding-confidence title=3Dconcept-encoding-confidence>co=
nfidence</a> <i>tentative</i>, and abort the
+     <a href=3D#encoding-sniffing-algorithm>encoding sniffing algo=
rithm</a>'s steps.</li>
+
+    </ol></li>
+
+   <li><p>Otherwise, if the user agent has information on th=
e likely encoding for this page, e.g.
+   based on the encoding of the page when it was last visited, then retu=
rn that encoding, with the
+   <a href=3D#concept-encoding-confidence title=3Dconcept-encoding-co=
nfidence>confidence</a> <i>tentative</i>, and abort =
these
+   steps.</li>
+
+   <li>
+
+    <p>The user agent may attempt to autodetect the character enco=
ding from applying frequency
+    analysis or other algorithms to the data stream. Such algorithms may=
 use information about the
+    resource other than the resource's contents, including the address o=
f the resource. If
+    autodetection succeeds in determining a character encoding, and that=
 encoding is a supported
+    encoding, then return that encoding, with the <a href=3D#concept-=
encoding-confidence title=3Dconcept-encoding-confidence>confidence<=
/a> <i>tentative</i>, and abort these steps.
+    <a href=3D#refsUNIVCHARDET>[UNIVCHARDET]</a></p>
+
+    <p class=3Dnote>The UTF-8 encoding has a highly detectable bit=
 pattern. Documents that contain
+    bytes with values greater than 0x7F which match the UTF-8 pattern ar=
e very likely to be UTF-8,
+    while documents with byte sequences that do not match it are very li=
kely not. User-agents are
+    therefore encouraged to search for this common encoding. <a href=3D=
#refsPPUTF8>[PPUTF8]</a> <a href=3D#refsUTF8DET>[UTF8DET]&=
lt;/a></p>
+
+   </li>
+
+   <li>
+
+    <p>Otherwise, return an implementation-defined or user-specifi=
ed default character encoding,
+    with the <a href=3D#concept-encoding-confidence title=3Dconcept-e=
ncoding-confidence>confidence</a> <i>tentative</i>.&=
lt;/p>
+
+    <p>In controlled environments or in environments where the enc=
oding of documents can be
+    prescribed (for example, for user agents intended for dedicated use =
in new networks), the
+    comprehensive <code title=3D"">UTF-8</code> en=
coding is suggested.</p>
+
+    <p>In other environments, the default encoding is typically de=
pendent on the user's locale (an
+    approximation of the languages, and thus often encodings, of the pag=
es that the user is likely
+    to frequent). The following table gives suggested defaults based on =
the user's locale, for
+    compatibility with legacy content. Locales are identified by BCP 47 =
language tags. <a href=3D#refsBCP47>[BCP47]</a> <a href=3D=
#refsENCODING>[ENCODING]</a></p>
+
+    <!-- based on three sources:
+          1. mozilla 1.9.1 localizations: http://mxr.mozilla.org/l10n-mo=
zilla1.9.1/find?string=3Dglobal%2Fintl.properties&tree=3Dl10n-mozilla=
1.9.1&hint=3D=20
+          2. windows vista encodings: http://msdn.microsoft.com/en-us/go=
global/bb896001
+          3. chrome encodings: https://code.google.com/p/chromium/codese=
arch#search/&q=3DIDS_DEFAULT_ENCODING
+         several assumptions were made in this process; amongst them:
+          - ISO-8859-1 and Windows-1252 are the same (supported by encod=
ing.spec.whatwg.org)
+          - ISO-8859-9 and Windows-1254 are the same (supported by encod=
ing.spec.whatwg.org)
+          - Windows-31J and Shift_JIS are the same (supported by encodin=
g.spec.whatwg.org)
+          - Windows-932 is close enough to Shift_JIS to be treated as eq=
uivalent (supported by wikipedia)
+          - Windows-936 is a basically a subset of GBK which is basicall=
y a subset of GB18030 (supported by wikipedia)
+          - Windows-950 is basically the same as Big5 (supported by wiki=
pedia)
+          - Firefox's UTF-8 defaults are all bogus
+    -->
+
+    <table><thead><tr><th colspan=3D2>Locale lan=
guage
+       <th>Suggested default encoding
+     <tbody><!-- af, Afrikaans, uses windows-1252: Windows Vist=
a and Firefox agreed --><!-- am, Amharic, uses windows-1252: Firefo=
x and Chrome agreed --><tr><td>ar
+       <td>Arabic
+       <td>windows-1256 <!-- Windows Vista and Chrome agreed --=
>
+
+      <!-- arn-CL, Mapudungun (Chile), uses windows-1252: Windows Vis=
ta and Firefox agreed -->
+
+      <!-- az, Azeri, is not listed here because neither Chrome nor F=
irefox knew about it. For what it's worth, Windows Vista wanted windows-1=
254 -->
+
+      <!-- az-Cyrl-AZ, Azeri (Cyrillic, Azerbaijan), is not listed he=
re because neither Chrome nor Firefox knew about it. For what it's worth,=
 Windows Vista wanted windows-1251 -->
+
+      <!-- ba-RU, Bashkir (Russia), is not listed here because neithe=
r Chrome nor Firefox knew about it. For what it's worth, Windows Vista wa=
nted windows-1251 -->
+      <!-- ba wasn't listed at all because none of the sources knew a=
bout it. However, further feedback has changed this: -->
+      <tr><td>ba
+       <td>Bashkir
+       <td>windows-1251 <!-- per https://www.w3.org/Bugs/Public=
/show_bug.cgi?id=3D23089 -->
+
+      <!-- be, Belarusian, was not initially listed here because Wind=
ows Vista wanted windows-1251, Chrome wanted <none>, and Firefox wa=
nted ISO-8859-5 -->
+      <!-- further feedback has changed this: -->
+      <tr><td>be
+       <td>Belarusian
+       <td>windows-1251 <!-- per https://www.w3.org/Bugs/Public=
/show_bug.cgi?id=3D23089 -->
+
+      <!-- be-BY, Belarusian (Belarus), is not listed here because ne=
ither Chrome nor Firefox knew about it. For what it's worth, Windows Vist=
a wanted windows-1251 -->
+
+      <tr><td>bg
+       <td>Bulgarian
+       <td>windows-1251 <!-- Windows Vista, Chrome, and Firefox=
 agreed -->
+
+      <!-- bn, Bengali, uses windows-1252: Firefox and Chrome agreed =
-->
+
+      <!-- br-FR, Breton (France), uses windows-1252: Windows Vista a=
nd Firefox agreed -->
+
+      <!-- bs-Cyrl-BA, Bosnian (Cyrillic, Bosnia and Herzegovina), is=
 not listed here because neither Chrome nor Firefox knew about it. For wh=
at it's worth, Windows Vista wanted windows-1251 -->
+
+      <!-- bs-Latn-BA, Bosnian (Latin, Bosnia and Herzegovina), is no=
t listed here because neither Chrome nor Firefox knew about it. For what =
it's worth, Windows Vista wanted windows-1250 -->
+
+      <!-- ca, Catalan, uses windows-1252: Windows Vista, Chrome, and=
 Firefox agreed -->
+
+      <!-- co-FR, Corsican (France), uses windows-1252: Windows Vista=
 and Firefox agreed -->
+
+      <tr><td>cs
+       <td>Czech
+       <td>windows-1250 <!-- Windows Vista and Chrome agreed (b=
ut disagreed with Firefox, which thought the encoding should be ISO-8859-=
2) -->
+
+      <!-- cy-GB, Welsh (United Kingdom), uses windows-1252: Windows =
Vista and Firefox agreed -->
+
+      <!-- da, Danish, uses windows-1252: Windows Vista, Chrome, and =
Firefox agreed -->
+
+      <!-- de, German, uses windows-1252: Windows Vista, Chrome, and =
Firefox agreed -->
+
+      <!-- el, Greek, was not initially listed here because Windows V=
ista wanted windows-1253, Chrome wanted ISO-8859-7, and Firefox wanted wi=
ndows-1252 -->
+      <!-- el-GR, Greek (Greece), is not listed here because neither =
Chrome nor Firefox knew about it. For what it's worth, Windows Vista want=
ed windows-1253 -->
+      <!-- further feedback has changed this: -->
+      <tr><td>el
+       <td>Greek
+       <td>ISO-8859-7 <!-- per https://www.w3.org/Bugs/Public/s=
how_bug.cgi?id=3D23090 -->
+
+      <!-- en, English, uses windows-1252: Windows Vista and Firefox =
agreed -->
+
+      <!-- es, Spanish, uses windows-1252: Windows Vista, Chrome, and=
 Firefox agreed -->
+
+      <tr><td>et
+       <td>Estonian
+       <td>windows-1257 <!-- Windows Vista and Chrome agreed --=
>
+
+      <!-- eu, Basque, uses windows-1252: Windows Vista and Firefox a=
greed -->
+
+      <tr><td>fa
+       <td>Persian
+       <td>windows-1256 <!-- Windows Vista and Chrome agreed --=
>
+
+      <!-- fi, Finnish, uses windows-1252: Windows Vista, Chrome, and=
 Firefox agreed -->
+
+      <!-- fil, Filipino, uses windows-1252: Firefox and Chrome agree=
d -->
+
+      <!-- fo, Faroese, uses windows-1252: Windows Vista and Firefox =
agreed -->
+
+      <!-- fr, French, uses windows-1252: Windows Vista, Chrome, and =
Firefox agreed -->
+
+      <!-- fy-NL, Frisian (Netherlands), uses windows-1252: Windows V=
ista and Firefox agreed -->
+
+      <!-- ga-IE, Irish (Ireland), uses windows-1252: Windows Vista a=
nd Firefox agreed -->
+
+      <!-- gl, Galician, uses windows-1252: Windows Vista and Firefox=
 agreed -->
+
+      <!-- gsw-FR, Alsatian (France), uses windows-1252: Windows Vist=
a and Firefox agreed -->
+
+      <!-- gu, Gujarati, uses windows-1252: Firefox and Chrome agreed=
 -->
+
+      <!-- ha-Latn-NG, Hausa (Latin, Nigeria), uses windows-1252: Win=
dows Vista and Firefox agreed -->
+
+      <tr><td>he
+       <td>Hebrew
+       <td>windows-1255 <!-- Windows Vista, Chrome, and Firefox=
 agreed -->
+
+      <!-- hi, Hindi, uses windows-1252: Firefox and Chrome agreed --=
>
+
+      <tr><td>hr
+       <td>Croatian
+       <td>windows-1250 <!-- Windows Vista and Chrome agreed --=
>
+
+      <tr><td>hu
+       <td>Hungarian
+       <td>ISO-8859-2 <!-- Chrome and Firefox agreed (but disag=
reed with Windows Vista, which thought the encoding should be windows-125=
0) -->
+
+      <!-- hu-HU, Hungarian (Hungary), is not listed here because nei=
ther Chrome nor Firefox knew about it. For what it's worth, Windows Vista=
 wanted windows-1250 -->
+
+      <!-- id, Indonesian, uses windows-1252: Windows Vista, Chrome, =
and Firefox agreed -->
+
+      <!-- ig-NG, Igbo (Nigeria), uses windows-1252: Windows Vista an=
d Firefox agreed -->
+
+      <!-- is, Icelandic, uses windows-1252: Windows Vista and Firefo=
x agreed -->
+
+      <!-- it, Italian, uses windows-1252: Windows Vista, Chrome, and=
 Firefox agreed -->
+
+      <!-- iu-Latn-CA, Inuktitut (Latin, Canada), uses windows-1252: =
Windows Vista and Firefox agreed -->
+
+      <tr><td>ja
+       <td>Japanese
+       <td>Shift_JIS <!-- Windows Vista, Chrome, and Firefox ag=
reed -->
+
+      <!-- kk, Kazakh, was not initially listed here because neither =
Chrome nor Firefox knew about it. For what it's worth, Windows Vista want=
ed windows-1251 -->
+      <!-- further feedback has changed this: -->
+      <tr><td>kk
+       <td>Kazakh
+       <td>windows-1251 <!-- per https://www.w3.org/Bugs/Public=
/show_bug.cgi?id=3D23089 -->
+
+      <!-- kl-GL, Greenlandic (Greenland), uses windows-1252: Windows=
 Vista and Firefox agreed -->
+
+      <!-- kn, Kannada, uses windows-1252: Firefox and Chrome agreed =
-->
+
+      <tr><td>ko
+       <td>Korean
+       <td>euc-kr <!-- Windows Vista, Chrome, and Firefox agree=
d -->
+
+      <tr><td>ku
+       <td>Kurdish
+       <td>windows-1254 <!-- Best guess -->
+
+      <!-- ky, Kyrgyz, was not initially listed here because neither =
Chrome nor Firefox knew about it. For what it's worth, Windows Vista want=
ed windows-1251 -->
+      <!-- further feedback has changed this: -->
+      <tr><td>ky
+       <td>Kyrgyz
+       <td>windows-1251 <!-- per https://www.w3.org/Bugs/Public=
/show_bug.cgi?id=3D23089 -->
+
+      <!-- lb-LU, Luxembourgish (Luxembourg), uses windows-1252: Wind=
ows Vista and Firefox agreed -->
+
+      <tr><td>lt
+       <td>Lithuanian
+       <td>windows-1257 <!-- Windows Vista, Chrome, and Firefox=
 agreed -->
+
+      <tr><td>lv
+       <td>Latvian
+       <td>windows-1257 <!-- Windows Vista and Chrome agreed (b=
ut disagreed with Firefox, which thought the encoding should be ISO-8859-=
13) -->
+
+      <!-- mk, Macedonian, was not initially listed here because neit=
her Chrome nor Firefox knew about it. For what it's worth, Windows Vista =
wanted windows-1251 -->
+      <!-- further feedback has changed this: -->
+      <tr><td>mk
+       <td>Macedonian
+       <td>windows-1251 <!-- per https://www.w3.org/Bugs/Public=
/show_bug.cgi?id=3D23089 -->
+
+      <!-- ml, Malayalam, uses windows-1252: Firefox and Chrome agree=
d -->
+
+      <!-- mn, Mongolian, is not listed here because neither Chrome n=
or Firefox knew about it. For what it's worth, Windows Vista wanted windo=
ws-1251 -->
+
+      <!-- moh-CA, Mohawk (Mohawk), uses windows-1252: Windows Vista =
and Firefox agreed -->
+
+      <!-- mr, Marathi, uses windows-1252: Firefox and Chrome agreed =
-->
+
+      <!-- ms, Malay, uses windows-1252: Windows Vista and Firefox ag=
reed -->
+
+      <!-- nb, Norwegian Bokmål, uses windows-1252: Firefox=
 and Chrome agreed -->
+
+      <!-- nl, Dutch, uses windows-1252: Windows Vista, Chrome, and F=
irefox agreed -->
+
+      <!-- nn-NO, Norwegian, Nynorsk (Norway), uses windows-1252: Win=
dows Vista and Firefox agreed -->
+
+      <!-- no, Norwegian, uses windows-1252: Windows Vista and Firefo=
x agreed -->
+
+      <!-- nso-ZA, Sesotho sa Leboa (South Africa), uses windows-1252=
: Windows Vista and Firefox agreed -->
+
+      <!-- oc-FR, Occitan (France), uses windows-1252: Windows Vista =
and Firefox agreed -->
+
+      <tr><td>pl
+       <td>Polish
+       <td>ISO-8859-2 <!-- Chrome and Firefox agreed (but disag=
reed with Windows Vista, which thought the encoding should be windows-125=
0) -->
+
+      <!-- pl-PL, Polish (Poland), is not listed here because neither=
 Chrome nor Firefox knew about it. For what it's worth, Windows Vista wan=
ted windows-1250 -->
+
+      <!-- prs-AF, Dari (Afghanistan), is not listed here because nei=
ther Chrome nor Firefox knew about it. For what it's worth, Windows Vista=
 wanted windows-1256 -->
+
+      <!-- pt, Portuguese, uses windows-1252: Windows Vista and Firef=
ox agreed -->
+
+      <!-- qut-GT, K'iche (Guatemala), uses windows-1252: Windows Vis=
ta and Firefox agreed -->
+
+      <!-- quz-BO, Quechua (Bolivia), uses windows-1252: Windows Vist=
a and Firefox agreed -->
+
+      <!-- quz-EC, Quechua (Ecuador), uses windows-1252: Windows Vist=
a and Firefox agreed -->
+
+      <!-- quz-PE, Quechua (Peru), uses windows-1252: Windows Vista a=
nd Firefox agreed -->
+
+      <!-- rm-CH, Romansh (Switzerland), uses windows-1252: Windows V=
ista and Firefox agreed -->
+
+      <!-- ro, Romanian, is not listed here because Windows Vista wan=
ted windows-1250, Chrome wanted ISO-8859-2, and Firefox wanted <none&g=
t; -->
+
+      <!-- ro-RO, Romanian (Romania), is not listed here because neit=
her Chrome nor Firefox knew about it. For what it's worth, Windows Vista =
wanted windows-1250 -->
+
+      <tr><td>ru
+       <td>Russian
+       <td>windows-1251 <!-- Windows Vista, Chrome, and Firefox=
 agreed -->
+
+      <!-- rw-RW, Kinyarwanda (Rwanda), uses windows-1252: Windows Vi=
sta and Firefox agreed -->
+
+      <!-- sah-RU, Yakut (Russia), is not listed here because neither=
 Chrome nor Firefox knew about it. For what it's worth, Windows Vista wan=
ted windows-1251 -->
+      <!-- sah wasn't listed at all because none of the sources knew =
about it. However, further feedback has changed this: -->
+      <tr><td>sah
+       <td>Yakut
+       <td>windows-1251 <!-- per https://www.w3.org/Bugs/Public=
/show_bug.cgi?id=3D23089 -->
+
+      <!-- se-FI, Sami, Northern (Finland), uses windows-1252: Window=
s Vista and Firefox agreed -->
+
+      <!-- se-NO, Sami, Northern (Norway), uses windows-1252: Windows=
 Vista and Firefox agreed -->
+
+      <!-- se-SE, Sami, Northern (Sweden), uses windows-1252: Windows=
 Vista and Firefox agreed -->
+
+      <tr><td>sk
+       <td>Slovak
+       <td>windows-1250 <!-- Windows Vista, Chrome, and Firefox=
 agreed -->
+
+      <tr><td>sl
+       <td>Slovenian
+       <td>ISO-8859-2 <!-- Chrome and Firefox agreed (but disag=
reed with Windows Vista, which thought the encoding should be windows-125=
0) -->
+
+      <!-- sl-SI, Slovenian (Slovenia), is not listed here because ne=
ither Chrome nor Firefox knew about it. For what it's worth, Windows Vist=
a wanted windows-1250 -->
+
+      <!-- sma-NO, Sami, Southern (Norway), uses windows-1252: Window=
s Vista and Firefox agreed -->
+
+      <!-- sma-SE, Sami, Southern (Sweden), uses windows-1252: Window=
s Vista and Firefox agreed -->
+
+      <!-- smj-NO, Sami, Lule (Norway), uses windows-1252: Windows Vi=
sta and Firefox agreed -->
+
+      <!-- smj-SE, Sami, Lule (Sweden), uses windows-1252: Windows Vi=
sta and Firefox agreed -->
+
+      <!-- smn-FI, Sami, Inari (Finland), uses windows-1252: Windows =
Vista and Firefox agreed -->
+
+      <!-- sms-FI, Sami, Skolt (Finland), uses windows-1252: Windows =
Vista and Firefox agreed -->
+
+      <!-- sq, Albanian, is not listed here because neither Chrome no=
r Firefox knew about it. For what it's worth, Windows Vista wanted window=
s-1250 -->
+
+      <tr><td>sr
+       <td>Serbian
+       <td>windows-1251 <!-- Windows Vista and Chrome agreed --=
>
+
+      <!-- sr-Latn-BA, Serbian (Latin, Bosnia and Herzegovina), is no=
t listed here because neither Chrome nor Firefox knew about it. For what =
it's worth, Windows Vista wanted windows-1250 -->
+
+      <!-- sr-Latn-SP, Serbian (Latin, Serbia), is not listed here be=
cause neither Chrome nor Firefox knew about it. For what it's worth, Wind=
ows Vista wanted windows-1250 -->
+
+      <!-- sv, Swedish, uses windows-1252: Windows Vista, Chrome, and=
 Firefox agreed -->
+
+      <!-- sw, Kiswahili, uses windows-1252: Windows Vista, Chrome, a=
nd Firefox agreed -->
+
+      <!-- ta, Tamil, uses windows-1252: Firefox and Chrome agreed --=
>
+
+      <!-- te, Telugu, uses windows-1252: Firefox and Chrome agreed -=
->
+
+      <!-- tg-Cyrl-TJ, Tajik (Cyrillic, Tajikistan), is not listed he=
re because neither Chrome nor Firefox knew about it. For what it's worth,=
 Windows Vista wanted windows-1251 -->
+      <!-- tg wasn't listed at all because none of the sources knew a=
bout it. However, further feedback has changed this: -->
+      <tr><td>tg
+       <td>Tajik
+       <td>windows-1251 <!-- per https://www.w3.org/Bugs/Public=
/show_bug.cgi?id=3D23089 -->
+
+      <tr><td>th
+       <td>Thai
+       <td>windows-874 <!-- Windows Vista, Chrome, and Firefox =
agreed -->
+
+      <!-- tk-TM, Turkmen (Turkmenistan), is not listed here because =
neither Chrome nor Firefox knew about it. For what it's worth, Windows Vi=
sta wanted windows-1250 -->
+
+      <!-- tn-ZA, Setswana (South Africa), uses windows-1252: Windows=
 Vista and Firefox agreed -->
+
+      <tr><td>tr
+       <td>Turkish
+       <td>windows-1254 <!-- Windows Vista, Chrome, and Firefox=
 agreed -->
+
+      <!-- tt, Tatar, was not initially listed here because neither C=
hrome nor Firefox knew about it. For what it's worth, Windows Vista wante=
d windows-1251 -->
+      <!-- further feedback has changed this: -->
+      <tr><td>tt
+       <td>Tatar
+       <td>windows-1251 <!-- per https://www.w3.org/Bugs/Public=
/show_bug.cgi?id=3D23089 -->
+
+      <!-- tzm-Latn-DZ, Tamazight (Latin, Algeria), uses windows-1252=
: Windows Vista and Firefox agreed -->
+
+      <!-- ug-CN, Uighur (PRC), is not listed here because neither Ch=
rome nor Firefox knew about it. For what it's worth, Windows Vista wanted=
 windows-1256 -->
+
+      <tr><td>uk
+       <td>Ukrainian
+       <td>windows-1251 <!-- Windows Vista, Chrome, and Firefox=
 agreed -->
+
+      <!-- ur, Urdu, is not listed here because neither Chrome nor Fi=
refox knew about it. For what it's worth, Windows Vista wanted windows-12=
56 -->
+
+      <!-- uz, Uzbek, is not listed here because neither Chrome nor F=
irefox knew about it. For what it's worth, Windows Vista wanted windows-1=
254 -->
+
+      <!-- uz-Cyrl-UZ, Uzbek (Cyrillic, Uzbekistan), is not listed he=
re because neither Chrome nor Firefox knew about it. For what it's worth,=
 Windows Vista wanted windows-1251 -->
+
+      <tr><td>vi
+       <td>Vietnamese
+       <td>windows-1258 <!-- Windows Vista and Chrome agreed --=
>
+
+      <!-- wee-DE, Lower Sorbian (Germany), uses windows-1252: Window=
s Vista and Firefox agreed -->
+
+      <!-- wen-DE, Upper Sorbian (Germany), uses windows-1252: Window=
s Vista and Firefox agreed -->
+
+      <!-- wo-SN, Wolof (Senegal), uses windows-1252: Windows Vista a=
nd Firefox agreed -->
+
+      <!-- xh-ZA, isiXhosa (South Africa), uses windows-1252: Windows=
 Vista and Firefox agreed -->
+
+      <!-- yo-NG, Yoruba (Nigeria), uses windows-1252: Windows Vista =
and Firefox agreed -->
+
+      <tr><td>zh-CN
+       <td>Chinese (People's Republic of China)
+       <td>GB18030 <!-- Windows Vista, Chrome, and Firefox agre=
ed -->
+
+      <!-- zh-HK, Chinese (Hong Kong S.A.R.), is not listed here beca=
use neither Chrome nor Firefox knew about it. For what it's worth, Window=
s Vista wanted Big5 -->
+
+      <!-- zh-Hans, Chinese (Simplified), is not listed here because =
neither Chrome nor Firefox knew about it. For what it's worth, Windows Vi=
sta wanted GB18030 -->
+
+      <!-- zh-Hant, Chinese (Traditional), is not listed here because=
 neither Chrome nor Firefox knew about it. For what it's worth, Windows V=
ista wanted Big5 -->
+
+      <!-- zh-MO, Chinese (Macao S.A.R.), is not listed here because =
neither Chrome nor Firefox knew about it. For what it's worth, Windows Vi=
sta wanted Big5 -->
+
+      <!-- zh-SG, Chinese (Singapore), is not listed here because nei=
ther Chrome nor Firefox knew about it. For what it's worth, Windows Vista=
 wanted GB18030 -->
+
+      <tr><td>zh-TW
+       <td>Chinese (Taiwan)
+       <td>Big5 <!-- Windows Vista, Chrome, and Firefox agreed =
-->
+
+      <!-- zu-ZA, isiZulu (South Africa), uses windows-1252: Windows =
Vista and Firefox agreed -->
+
+      <tr><td colspan=3D2>All other locales
+       <td>windows-1252
+
+    </table><p class=3Dtablenote><small>The contents o=
f this table are derived from the intersection of
+    Windows, Chrome, and Firefox defaults.</small></p>
+
+   </li>
+
+  </ol><p>The <a href=3D"#document's-character-encod=
ing">document's character encoding</a> must immediately be =
set to the value returned
+  from this algorithm, at the same time as the user agent uses the retur=
ned value to select the
+  decoder to use for the input byte stream.</p>
+
+  <hr><p>When an algorithm requires a user agent to <dfn =
id=3Dprescan-a-byte-stream-to-determine-its-encoding>prescan a byte st=
ream to determine its
+  encoding</dfn>, given some defined <var title=3D""&=
gt;end condition</var>, then it must run the
+  following steps. These steps either abort unsuccessfully or return a c=
haracter encoding. If at any
+  point during these steps (including during instances of the <a href=
=3D#concept-get-attributes-when-sniffing title=3Dconcept-get-attributes-w=
hen-sniffing>get an attribute</a> algorithm invoked by this
+  one) the user agent either runs out of bytes (meaning the <var titl=
e=3D"">position</var> pointer
+  created in the first step below goes beyond the end of the byte stream=
 obtained so far) or reaches
+  its <var title=3D"">end condition</var>, then ab=
ort the <a href=3D#prescan-a-byte-stream-to-determine-its-encoding>=
prescan a byte stream to determine its
+  encoding</a> algorithm unsuccessfully.</p>
+
+  <ol><li>
+
+    <p>Let <var title=3D"">position</var> be=
 a pointer to a byte in the input byte stream, initially
+    pointing at the first byte.</p>
+
+   </li>
+
+   <li>
+
+    <p><i>Loop</i>: If <var title=3D""&gt=
;position</var> points to:</p>
+
+    <dl class=3Dswitch><dt>A sequence of bytes starting with=
: 0x3C 0x21 0x2D 0x2D (ASCII '<!--')</dt>
+     <dd>
+
+      <p>Advance the <var title=3D"">position</=
var> pointer so that it points at the first 0x3E byte
+      which is preceded by two 0x2D bytes (i.e. at the end of an ASCII '=
-->' sequence) and comes
+      after the 0x3C byte that was found. (The two 0x2D bytes can be the=
 same as the those in the
+      '<!--' sequence.)</p>
+
+     </dd>
+
+     <dt>A sequence of bytes starting with: 0x3C, 0x4D or 0x6D, 0x=
45 or 0x65, 0x54 or 0x74, 0x41 or 0x61, and one of 0x09, 0x0A, 0x0C, 0x0D=
, 0x20, 0x2F (case-insensitive ASCII '<meta' followed by a space o=
r slash)</dt>
+     <dd>
+
+      <ol><li><p>Advance the <var title=3D"&qu=
ot;>position</var> pointer so that it points at the next 0x09,
+       0x0A, 0x0C, 0x0D, 0x20, or 0x2F byte (the one in sequence of char=
acters matched
+       above).</li>
+
+       <li><p>Let <var title=3D"">attribute =
list</var> be an empty list of strings.</li> <!-- so
+       long as we only care about http-equiv, content, and charset, this=
 can be a 3-bit bitfield -->
+
+       <li><p>Let <var title=3D"">got pragma=
</var> be false.</li>
+
+       <li><p>Let <var title=3D"">need pragm=
a</var> be null.</li>
+
+       <li><p>Let <var title=3D"">charset&lt=
;/var> be the null value (which, for the purposes of this
+       algorithm, is distinct from an unrecognised encoding or the empty=
 string).</li>
+
+       <li><p><i>Attributes</i>: <a href=3D#c=
oncept-get-attributes-when-sniffing title=3Dconcept-get-attributes-when-s=
niffing>Get an
+       attribute</a> and its value. If no attribute was sniffed, t=
hen jump to the
+       <i>processing</i> step below.</li>
+
+       <li><p>If the attribute's name is already in <var =
title=3D"">attribute list</var>, then return
+       to the step labeled <i>attributes</i>.</p>
+
+       <li><p>Add the attribute's name to <var title=3D&q=
uot;">attribute list</var>.</p>
+
+       <li>
+
+        <p>Run the appropriate step from the following list, if on=
e applies:</p>
+
+        <dl class=3Dswitch><dt>If the attribute's name is &q=
uot;<code title=3D"">http-equiv</code>"</dt=
>
+
+         <dd><p>If the attribute's value is "<code t=
itle=3D"">content-type</code>", then set <var =
title=3D"">got pragma</var> to true.</dd>
+
+         <dt>If the attribute's name is "<code title=3D&qu=
ot;">content</code>"</dt>
+
+         <dd><p>Apply the <a href=3D#algorithm-for-extrac=
ting-a-character-encoding-from-a-meta-element>algorithm for extracting=
 a character encoding from a
+         <code>meta</code> element</a>, giving the att=
ribute's value as the string to parse. If a
+         character encoding is returned, and if <var title=3D"&q=
uot;>charset</var> is still set to null,
+         let <var title=3D"">charset</var> be the =
encoding returned, and set <var title=3D"">need
+         pragma</var> to true.</dd>
+
+         <dt>If the attribute's name is "<code title=3D&qu=
ot;">charset</code>"</dt>
+
+         <dd><p>Let <var title=3D"">charset&=
lt;/var> be the result of <a href=3D#getting-an-encoding>getting=
 an encoding</a>
+         from the attribute's value, and set <var title=3D"&quot=
;>need pragma</var> to false.</dd>
+
+        </dl></li>
+
+       <li><p>Return to the step labeled <i>attributes=
</i>.</li>
+
+       <li><p><i>Processing</i>: If <var titl=
e=3D"">need pragma</var> is null, then jump to the ste=
p
+       below labeled <i>next byte</i>.</li>
+
+       <li><p>If <var title=3D"">need pragma=
</var> is true but <var title=3D"">got pragma</v=
ar> is
+       false, then jump to the step below labeled <i>next byte<=
/i>.</li>
+
+       <li><p>If <var title=3D"">charset<=
/var> is <a href=3D#a-utf-16-encoding>a UTF-16 encoding</a&gt=
;, change the value of
+       <var title=3D"">charset</var> to UTF-8.<=
/li>
+
+       <li><p>If <var title=3D"">charset<=
/var> is not a supported character encoding, then jump to the
+       step below labeled <i>next byte</i>.</li>
+
+       <li><p>Abort the <a href=3D#prescan-a-byte-stream-=
to-determine-its-encoding>prescan a byte stream to determine its encod=
ing</a> algorithm,
+       returning the encoding given by <var title=3D"">c=
harset</var>.</li>
+
+      </ol></dd>
+
+     <dt>A sequence of bytes starting with a 0x3C byte (ASCII &amp=
;lt;), optionally a 0x2F byte (ASCII /), and finally a byte in the range =
0x41-0x5A or 0x61-0x7A (an ASCII letter)</dt>
+     <dd>
+
+      <ol><li><p>Advance the <var title=3D"&qu=
ot;>position</var> pointer so that it points at the next 0x09
+       (ASCII TAB), 0x0A (ASCII LF), 0x0C (ASCII FF), 0x0D (ASCII CR), 0=
x20 (ASCII space), or 0x3E
+       (ASCII >) byte.</li>
+
+       <li><p>Repeatedly <a href=3D#concept-get-attribute=
s-when-sniffing title=3Dconcept-get-attributes-when-sniffing>get an at=
tribute</a>
+       until no further attributes can be found, then jump to the step b=
elow labeled <i>next
+       byte</i>.</li>
+
+      </ol></dd>
+
+     <dt>A sequence of bytes starting with: 0x3C 0x21 (ASCII '&amp=
;lt;!')</dt>
+     <dt>A sequence of bytes starting with: 0x3C 0x2F (ASCII '&amp=
;lt;/')</dt>
+     <dt>A sequence of bytes starting with: 0x3C 0x3F (ASCII '&amp=
;lt;?')</dt>
+     <dd>
+
+      <p>Advance the <var title=3D"">position</=
var> pointer so that it points at the first 0x3E byte
+      (ASCII >) that comes after the 0x3C byte that was found.&lt=
;/p>
+
+     </dd>
+
+     <dt>Any other byte</dt>
+     <dd>
+
+      <p>Do nothing with that byte.</p>
+
+     </dd>
+
+    </dl></li>
+
+   <li><i>Next byte</i>: Move <var title=3D"&q=
uot;>position</var> so it points at the next byte in the
+   input byte stream, and return to the step above labeled <i>loop=
</i>.</li>
+
+  </ol><p>When the <a href=3D#prescan-a-byte-stream-to-de=
termine-its-encoding>prescan a byte stream to determine its encoding&l=
t;/a> algorithm says to <dfn id=3Dconcept-get-attributes-when-sniff=
ing title=3Dconcept-get-attributes-when-sniffing>get an attribute</=
dfn>, it means doing this:</p>
+
+  <ol><li><p>If the byte at <var title=3D"&quo=
t;>position</var> is one of 0x09 (ASCII TAB), 0x0A (ASCII LF),
+   0x0C (ASCII FF), 0x0D (ASCII CR), 0x20 (ASCII space), or 0x2F (ASCII =
/) then advance <var title=3D"">position</var> to t=
he next byte and redo this step.</li>
+
+   <li><p>If the byte at <var title=3D"">pos=
ition</var> is 0x3E (ASCII >), then abort the <a href=3D#=
concept-get-attributes-when-sniffing title=3Dconcept-get-attributes-when-=
sniffing>get an attribute</a> algorithm. There isn't
+   one.</li>
+
+   <li><p>Otherwise, the byte at <var title=3D"&quot=
;>position</var> is the start of the attribute name.
+   Let <var title=3D"">attribute name</var> and &l=
t;var title=3D"">attribute value</var> be the empty
+   string.</li>
+
+   <li><p>Process the byte at <var title=3D""&g=
t;position</var> as follows:</p>
+
+    <dl class=3Dswitch><dt>If it is 0x3D (ASCII =3D), and th=
e <var title=3D"">attribute name</var> is longer th=
an the
+     empty string</dt>
+
+     <dd>Advance <var title=3D"">position</var&=
gt; to the next byte and jump to the step below labeled
+     <i>value</i>.</dd>
+
+     <dt>If it is 0x09 (ASCII TAB), 0x0A (ASCII LF), 0x0C (ASCII F=
F), 0x0D (ASCII CR), or 0x20
+     (ASCII space)</dt>
+
+     <dd>Jump to the step below labeled <i>spaces</i>.=
</dd>
+
+     <dt>If it is 0x2F (ASCII /) or 0x3E (ASCII >)</dt&g=
t;
+
+     <dd>Abort the <a href=3D#concept-get-attributes-when-sniff=
ing title=3Dconcept-get-attributes-when-sniffing>get an attribute</=
a>
+     algorithm. The attribute's name is the value of <var title=3D&qu=
ot;">attribute name</var>, its value
+     is the empty string.</dd>
+
+     <dt>If it is in the range 0x41 (ASCII A) to 0x5A (ASCII Z)&lt=
;/dt>
+
+     <dd>Append the Unicode character with code point <span tit=
le=3D""><var title=3D"">b</var>+0x20&l=
t;/span> to <var title=3D"">attribute name</var>=
 (where <var title=3D"">b</var>
+     is the value of the byte at <var title=3D"">positio=
n</var>). (This converts the input to
+     lowercase.)</dd>
+
+     <dt>Anything else</dt>
+
+     <dd>Append the Unicode character with the same code point as =
the value of the byte at <var title=3D"">position</var=
> to <var title=3D"">attribute name</var>. (It d=
oesn't actually matter how
+     bytes outside the ASCII range are handled here, since only ASCII ch=
aracters can contribute to
+     the detection of a character encoding.)</dd>
+
+    </dl></li>
+
+   <li><p>Advance <var title=3D"">position&l=
t;/var> to the next byte and return to the previous
+   step.</li>
+
+   <li><p><i>Spaces</i>: If the byte at <var =
title=3D"">position</var> is one of 0x09 (ASCII TAB),
+   0x0A (ASCII LF), 0x0C (ASCII FF), 0x0D (ASCII CR), or 0x20 (ASCII spa=
ce) then advance <var title=3D"">position</var> to =
the next byte, then, repeat this step.</li>
+
+   <li><p>If the byte at <var title=3D"">pos=
ition</var> is <em>not</em> 0x3D (ASCII =3D), abort the
+   <a href=3D#concept-get-attributes-when-sniffing title=3Dconcept-ge=
t-attributes-when-sniffing>get an attribute</a> algorithm. The
+   attribute's name is the value of <var title=3D"">attr=
ibute name</var>, its value is the empty
+   string.</li>
+
+   <li><p>Advance <var title=3D"">position&l=
t;/var> past the 0x3D (ASCII =3D) byte.</li>
+
+   <li><p><i>Value</i>: If the byte at <var t=
itle=3D"">position</var> is one of 0x09 (ASCII TAB), 0=
x0A
+   (ASCII LF), 0x0C (ASCII FF), 0x0D (ASCII CR), or 0x20 (ASCII space) t=
hen advance <var title=3D"">position</var> to the n=
ext byte, then, repeat this step.</li>
+
+   <li><p>Process the byte at <var title=3D""&g=
t;position</var> as follows:</p>
+
+    <dl class=3Dswitch><dt>If it is 0x22 (ASCII ") or 0=
x27 (ASCII ')</dt>
+
+     <dd>
+
+      <ol><li>Let <var title=3D"">b</var&=
gt; be the value of the byte at <var title=3D"">position&=
lt;/var>.</li>
+
+       <li><i>Quote loop</i>: Advance <var title=3D=
"">position</var> to the next byte.</li>
+
+       <li>If the value of the byte at <var title=3D"&quot=
;>position</var> is the value of <var title=3D""&gt=
;b</var>, then advance <var title=3D"">position<=
/var> to the next byte and abort the
+       "get an attribute" algorithm. The attribute's name is t=
he value of <var title=3D"">attribute
+       name</var>, and its value is the value of <var title=3D&=
quot;">attribute value</var>.</li>
+
+       <li>Otherwise, if the value of the byte at <var title=3D=
"">position</var> is in the range 0x41
+       (ASCII A) to 0x5A (ASCII Z), then append a Unicode character to &=
lt;var title=3D"">attribute
+       value</var> whose code point is 0x20 more than the value of=
 the byte at <var title=3D"">position</var>.</li=
>
+
+       <li>Otherwise, append a Unicode character to <var title=3D=
"">attribute value</var> whose code
+       point is the same as the value of the byte at <var title=3D&qu=
ot;">position</var>.</li>
+
+       <li>Return to the step above labeled <i>quote loop&lt=
;/i>.</li>
+
+      </ol></dd>
+
+     <dt>If it is 0x3E (ASCII >)</dt>
+
+     <dd>Abort the <a href=3D#concept-get-attributes-when-sniff=
ing title=3Dconcept-get-attributes-when-sniffing>get an attribute</=
a>
+     algorithm. The attribute's name is the value of <var title=3D&qu=
ot;">attribute name</var>, its value
+     is the empty string.</dd>
+
+
+     <dt>If it is in the range 0x41 (ASCII A) to 0x5A (ASCII Z)&lt=
;/dt>
+
+     <dd>Append the Unicode character with code point <span tit=
le=3D""><var title=3D"">b</var>+0x20&l=
t;/span> to <var title=3D"">attribute value</var&gt=
; (where <var title=3D"">b</var> is the value of th=
e byte at <var title=3D"">position</var>). Advance =
<var title=3D"">position</var> to the next byte.&lt=
;/dd>
+
+     <dt>Anything else</dt>
+
+     <dd>Append the Unicode character with the same code point as =
the value of the byte at <var title=3D"">position</var=
> to <var title=3D"">attribute value</var>. Adva=
nce <var title=3D"">position</var> to the next byte=
.</dd>
+
+    </dl></li>
+
+   <li><p>Process the byte at <var title=3D""&g=
t;position</var> as
+   follows:</p>
+
+    <dl class=3Dswitch><dt>If it is 0x09 (ASCII TAB), 0x0A (=
ASCII LF), 0x0C (ASCII FF), 0x0D (ASCII CR), 0x20 (ASCII
+     space), or 0x3E (ASCII >)</dt>
+
+     <dd>Abort the <a href=3D#concept-get-attributes-when-sniff=
ing title=3Dconcept-get-attributes-when-sniffing>get an attribute</=
a>
+     algorithm. The attribute's name is the value of <var title=3D&qu=
ot;">attribute name</var> and its
+     value is the value of <var title=3D"">attribute val=
ue</var>.</dd>
+
+     <dt>If it is in the range 0x41 (ASCII A) to 0x5A (ASCII Z)&lt=
;/dt>
+
+     <dd>Append the Unicode character with code point <span tit=
le=3D""><var title=3D"">b</var>+0x20&l=
t;/span> to <var title=3D"">attribute value</var&gt=
; (where <var title=3D"">b</var> is the value of th=
e byte at <var title=3D"">position</var>).</dd&g=
t;
+
+     <dt>Anything else</dt>
+
+     <dd>Append the Unicode character with the same code point as =
the value of the byte at <var title=3D"">position</var=
> to <var title=3D"">attribute value</var>.</=
dd>
+
+    </dl></li>
+
+   <li><p>Advance <var title=3D"">position&l=
t;/var> to the next byte and return to the previous
+   step.</li>
+
+  </ol><p>For the sake of interoperability, user agents shou=
ld not use a pre-scan algorithm that returns
+  different results than the one described above. (But, if you do, pleas=
e at least let us know, so
+  that we can improve this algorithm and benefit everyone...)</p>
+
+<!--(removed this since the specs are being changed)
+  <p class=3D"note">These algorithms are a <span>w=
illful violation</span> of the HTTP specification,
+  which requires that the encoding be assumed to be ISO-8859-1 in the ab=
sence of a <span>character
+  encoding declaration</span> to the contrary, and of RFC 2046, wh=
ich requires that the encoding be
+  assumed to be US-ASCII in the absence of a <span>character encod=
ing declaration</span> to the
+  contrary. This specification's third approach is motivated by a desire=
 to be maximally compatible
+  with legacy content. <a href=3D"#refsHTTP">[HTTP]</=
a> <a href=3D"#refsRFC2046">[RFC2046]</a></p&=
gt;
+-->
+
+
+
+  <h5 id=3Dcharacter-encodings><span class=3Dsecno>12.2.2.3 =
</span>Character encodings</h5>
+
+  <p>User agents must support the encodings defined in the WHATWG =
Encoding standard. User agents
+  should not support other encodings.</p>
+
+  <p>User agents must not support the CESU-8, UTF-7, BOCU-1 and SC=
SU encodings. <a href=3D#refsCESU8>[CESU8]</a> <a href=3D#=
refsUTF7>[UTF7]</a> <a href=3D#refsBOCU1>[BOCU1]</a>=
 <a href=3D#refsSCSU>[SCSU]</a></p>
+
+  <p>Support for encodings based on EBCDIC is especially discourag=
ed. This encoding is rarely used
+  for publicly-facing Web content. Support for UTF-32 is also especially=
 discouraged. This encoding
+  is rarely used, and frequently implemented incorrectly.</p>
+
+  <p class=3Dnote>This specification does not make any attempt to =
support EBCDIC-based encodings and
+  UTF-32 in its algorithms; support and use of these encodings can thus =
lead to unexpected behavior
+  in implementations of this specification.</p>
+
+
+  <h5 id=3Dchanging-the-encoding-while-parsing><span class=3Dse=
cno>12.2.2.4 </span>Changing the encoding while parsing</h5&g=
t;
+
+  <p>When the parser requires the user agent to <dfn id=3Dchang=
e-the-encoding>change the encoding</dfn>, it must run the
+  following steps. This might happen if the <a href=3D#encoding-sniff=
ing-algorithm>encoding sniffing algorithm</a> described above
+  failed to find a character encoding, or if it found a character encodi=
ng that was not the actual
+  encoding of the file.</p>
+
+  <ol><li>If the encoding that is already being used to inte=
rpret the input stream is <a href=3D#a-utf-16-encoding>a UTF-16
+   encoding</a>, then set the <a href=3D#concept-encoding-confi=
dence title=3Dconcept-encoding-confidence>confidence</a> to
+   <i>certain</i> and abort these steps. The new encoding is=
 ignored; if it was anything but the
+   same encoding, then it would be clearly incorrect.</li>
+
+   <li>If the new encoding is <a href=3D#a-utf-16-encoding>a=
 UTF-16 encoding</a>, change it to UTF-8.</li>
+
+   <li>If the new encoding is identical or equivalent to the encod=
ing that is already being used to
+   interpret the input stream, then set the <a href=3D#concept-encodi=
ng-confidence title=3Dconcept-encoding-confidence>confidence</a>=
 to <i>certain</i> and abort these steps.
+   This happens when the encoding information found in the file matches =
what the <a href=3D#encoding-sniffing-algorithm>encoding
+   sniffing algorithm</a> determined to be the encoding, and in th=
e second pass through the
+   parser if the first pass found that the encoding sniffing algorithm d=
escribed in the earlier
+   section failed to find the right encoding.</li>
+
+   <li>If all the bytes up to the last byte converted by the curre=
nt decoder have the same Unicode
+   interpretations in both the current encoding and the new encoding, an=
d if the user agent supports
+   changing the converter on the fly, then the user agent may change to =
the new converter for the
+   encoding on the fly. Set the <a href=3D"#document's-character=
-encoding">document's character encoding</a> and the encodi=
ng used to
+   convert the input stream to the new encoding, set the <a href=3D#c=
oncept-encoding-confidence title=3Dconcept-encoding-confidence>confide=
nce</a> to <i>certain</i>, and abort these
+   steps.</li>
+
+   <li>Otherwise, <a href=3D#navigate>navigate</a><=
!--DONAV reparse--> to the document again, with
+   <a href=3D#replacement-enabled>replacement enabled</a>, a=
nd using the same <a href=3D#source-browsing-context>source browsin=
g context</a>, but
+   this time skip the <a href=3D#encoding-sniffing-algorithm>encod=
ing sniffing algorithm</a> and instead just set the encoding to
+   the new encoding and the <a href=3D#concept-encoding-confidence ti=
tle=3Dconcept-encoding-confidence>confidence</a> to
+   <i>certain</i>. Whenever possible, this should be done wi=
thout actually contacting the network
+   layer (the bytes should be re-parsed from memory), even if, e.g., the=
 document is marked as not
+   being cacheable. If this is not possible and contacting the network l=
ayer would involve repeating
+   a request that uses a method other than HTTP GET (<a href=3D#conce=
pt-http-equivalent-get title=3Dconcept-http-equivalent-get>or
+   equivalent</a> for non-HTTP URLs), then instead set the <a h=
ref=3D#concept-encoding-confidence title=3Dconcept-encoding-confidence&gt=
;confidence</a> to <i>certain</i> and ignore the new
+   encoding. The resource will be misinterpreted. User agents may notify=
 the user of the situation,
+   to aid in application development.</li>
+
+  </ol><h5 id=3Dpreprocessing-the-input-stream><span clas=
s=3Dsecno>12.2.2.5 </span>Preprocessing the input stream</h5&=
gt;
+
+  <p>The <dfn id=3Dinput-stream>input stream</dfn> con=
sists of the characters pushed into it as the <a href=3D#the-input-byt=
e-stream>input byte
+  stream</a> is decoded or from the various APIs that directly man=
ipulate the input stream.</p>
+
+  <p>One leading U+FEFF BYTE ORDER MARK character must be ignored =
if any are present in the
+  <a href=3D#input-stream>input stream</a>.</p>
+
+  <p class=3Dnote>The requirement to strip a U+FEFF BYTE ORDER MAR=
K character regardless of whether
+  that character was used to determine the byte order is a <a href=3D=
#willful-violation>willful violation</a> of
+  Unicode, motivated by a desire to increase the resilience of user agen=
ts in the face of naïve
+  transcoders.</p>
+
+  <p>Any occurrences of any characters in the ranges U+0001 to U+0=
008, <!-- HT, LF allowed --> <!--
+  U+000B is in the next list --> <!-- FF, CR allowed --> U+000E=
 to U+001F, <!-- ASCII allowed -->
+  U+007F <!--to U+0084, (U+0085 NEL not allowed), U+0086--> to U+0=
09F, U+FDD0 to U+FDEF, and
+  characters U+000B, U+FFFE, U+FFFF, U+1FFFE, U+1FFFF, U+2FFFE, U+2FFFF,=
 U+3FFFE, U+3FFFF, U+4FFFE,
+  U+4FFFF, U+5FFFE, U+5FFFF, U+6FFFE, U+6FFFF, U+7FFFE, U+7FFFF, U+8FFFE=
, U+8FFFF, U+9FFFE, U+9FFFF,
+  U+AFFFE, U+AFFFF, U+BFFFE, U+BFFFF, U+CFFFE, U+CFFFF, U+DFFFE, U+DFFFF=
, U+EFFFE, U+EFFFF, U+FFFFE,
+  U+FFFFF, U+10FFFE, and U+10FFFF are <a href=3D#parse-error title=3D=
"parse error">parse errors</a>. These are all
+  <a href=3D#control-characters>control characters</a> or pe=
rmanently undefined Unicode characters (noncharacters).</p>
+
+  <p>Any <a href=3D#character>character</a> that is a =
not a <a href=3D#unicode-character>Unicode character</a>, i.e=
. any isolated
+  surrogate, is a <a href=3D#parse-error>parse error</a>. (T=
hese can only find their way into the input stream via
+  script APIs such as <code title=3Ddom-document-write><a href=3D=
#dom-document-write>document.write()</a></code>.)</p&gt=
;
+
+  <p>U+000D CARRIAGE RETURN (CR) characters and U+000A LINE FEED (=
LF) characters are treated
+  specially. All CR characters must be converted to LF characters, and a=
ny LF characters that
+  immediately follow a CR character must be ignored. Thus, newlines in H=
TML DOMs are represented by
+  LF characters, and there are never any CR characters in the input to t=
he <a href=3D#tokenization>tokenization</a>
+  stage.</p>
+
+  <p>The <dfn id=3Dnext-input-character>next input character=
</dfn> is the first character in the <a href=3D#input-stream>=
input stream</a>
+  that has not yet been <dfn id=3Dconsumed>consumed</dfn> or=
 explicitly ignored by the requirements in this
+  section. Initially, the <i><a href=3D#next-input-character&gt=
;next input character</a></i> is the first character in the i=
nput. The
+  <dfn id=3Dcurrent-input-character>current input character</df=
n> is the last character to have been <i><a href=3D#consumed&=
gt;consumed</a></i>.</p>
+
+  <p>The <dfn id=3Dinsertion-point>insertion point</dfn&g=
t; is the position (just before a character or just before the end
+  of the input stream) where content inserted using <code title=3Ddom=
-document-write><a href=3D#dom-document-write>document.write()&l=
t;/a></code> is actually inserted. The insertion point is
+  relative to the position of the character immediately after it, it is =
not an absolute offset into
+  the input stream. Initially, the insertion point is undefined.</p&g=
t;
+
+  <p>The "EOF" character in the tables below is a concep=
tual character representing the end of the
+  <a href=3D#input-stream>input stream</a>. If the parser is=
 a <a href=3D#script-created-parser>script-created parser</a>=
, then the end of
+  the <a href=3D#input-stream>input stream</a> is reached wh=
en an <dfn id=3Dexplicit-eof-character>explicit "EOF" cha=
racter</dfn> (inserted by
+  the <code title=3Ddom-document-close><a href=3D#dom-document-=
close>document.close()</a></code> method) is consumed. Oth=
erwise, the
+  "EOF" character is not a real character in the stream, but r=
ather the lack of any further
+  characters.</p>
+
+  <p class=3Dnote>The handling of U+0000 NULL characters varies ba=
sed on where the characters are
+  found. In general, they are ignored except where doing so could plausi=
bly introduce an attack
+  vector. This handling is, by necessity, spread across both the tokeniz=
ation stage and the tree
+  construction stage.</p>
+
+  </div>
+
+
+  <div class=3Dimpl>
+
+  <h4 id=3Dparse-state><span class=3Dsecno>12.2.3 </span&=
gt;Parse state</h4>
+
+  <h5 id=3Dthe-insertion-mode><span class=3Dsecno>12.2.3.1 &=
lt;/span>The insertion mode</h5>
+
+  <p>The <dfn id=3Dinsertion-mode>insertion mode</dfn>=
 is a state variable that controls the primary operation of the
+  tree construction stage.</p>
+
+  <p>Initially, the <a href=3D#insertion-mode>insertion mode=
</a> is "<a href=3D#the-initial-insertion-mode title=3D&quo=
t;insertion mode:
+  initial">initial</a>". It can change to "<a=
 href=3D#the-before-html-insertion-mode title=3D"insertion mode: bef=
ore html">before
+  html</a>", "<a href=3D#the-before-head-insertion-mo=
de title=3D"insertion mode: before head">before head</a&g=
t;", "<a href=3D#parsing-main-inhead title=3D"insertion=
 mode: in head">in head</a>", "<a href=3D#pars=
ing-main-inheadnoscript title=3D"insertion mode: in head
+  noscript">in head noscript</a>", "<a href=3D=
#the-after-head-insertion-mode title=3D"insertion mode: after head&q=
uot;>after head</a>",
+  "<a href=3D#parsing-main-inbody title=3D"insertion mode: =
in body">in body</a>", "<a href=3D#parsing-mai=
n-incdata title=3D"insertion mode:
+  text">text</a>", "<a href=3D#parsing-main-i=
ntable title=3D"insertion mode: in table">in table</a>=
", "<a href=3D#parsing-main-intabletext title=3D"insert=
ion mode: in table text">in table text</a>", "&lt=
;a href=3D#parsing-main-incaption title=3D"insertion mode: in
+  caption">in caption</a>", "<a href=3D#parsi=
ng-main-incolgroup title=3D"insertion mode: in column group"&gt=
;in column
+  group</a>", "<a href=3D#parsing-main-intbody title=3D=
"insertion mode: in table body">in table body</a>&quot=
;, "<a href=3D#parsing-main-intr title=3D"insertion mode: in=
 row">in row</a>", "<a href=3D#parsing-main-in=
td title=3D"insertion mode: in cell">in
+  cell</a>", "<a href=3D#parsing-main-inselect title=3D=
"insertion mode: in select">in select</a>", &quot=
;<a href=3D#parsing-main-inselectintable title=3D"insertion
+  mode: in select in table">in select in table</a>", =
"<a href=3D#parsing-main-intemplate title=3D"insertion mode:=
 in
+  template">in template</a>", "<a href=3D#par=
sing-main-afterbody title=3D"insertion mode: after body">aft=
er body</a>",
+  "<a href=3D#parsing-main-inframeset title=3D"insertion mo=
de: in frameset">in frameset</a>", "<a href=3D=
#parsing-main-afterframeset title=3D"insertion mode:
+  after frameset">after frameset</a>", "<a hr=
ef=3D#the-after-after-body-insertion-mode title=3D"insertion mode: a=
fter after body">after
+  after body</a>", and "<a href=3D#the-after-after-fr=
ameset-insertion-mode title=3D"insertion mode: after after frameset&=
quot;>after after
+  frameset</a>" during the course of the parsing, as describe=
d in the <a href=3D#tree-construction>tree
+  construction</a> stage. The insertion mode affects how tokens ar=
e processed and whether CDATA
+  sections are supported.</p>
+
+  <p>Several of these modes, namely "<a href=3D#parsing-ma=
in-inhead title=3D"insertion mode: in head">in head</a&gt=
;", "<a href=3D#parsing-main-inbody title=3D"insertion =
mode: in body">in body</a>", "<a href=3D#parsi=
ng-main-intable title=3D"insertion mode: in table">in
+  table</a>", and "<a href=3D#parsing-main-inselect t=
itle=3D"insertion mode: in select">in select</a>"=
, are special, in
+  that the other modes defer to them at various times. When the algorith=
m below says that the user
+  agent is to do something "<dfn id=3Dusing-the-rules-for>usi=
ng the rules for</dfn> the <var title=3D"">m</va=
r> insertion
+  mode", where <var title=3D"">m</var> is one=
 of these modes, the user agent must use the rules
+  described under the <var title=3D"">m</var> <=
a href=3D#insertion-mode>insertion mode</a>'s section, but must =
leave
+  the <a href=3D#insertion-mode>insertion mode</a> unchanged=
 unless the rules in <var title=3D"">m</var> themse=
lves
+  switch the <a href=3D#insertion-mode>insertion mode</a> to=
 a new value.</p>
+
+  <p>When the insertion mode is switched to "<a href=3D#pa=
rsing-main-incdata title=3D"insertion mode: text">text</a=
>" or
+  "<a href=3D#parsing-main-intabletext title=3D"insertion m=
ode: in table text">in table text</a>", the <dfn id=
=3Doriginal-insertion-mode>original insertion
+  mode</dfn> is also set. This is the insertion mode to which the =
tree construction stage will
+  return.</p>
+
+  <p>Similarly, to parse nested <code><a href=3D#the-temp=
late-element>template</a></code> elements, a <dfn id=3D=
stack-of-template-insertion-modes>stack of template insertion
+  modes</dfn> is used. It is initially empty. The <dfn id=3Dcur=
rent-template-insertion-mode>current template insertion mode</dfn&g=
t; is the
+  insertion mode that was most recently added to the <a href=3D#stack=
-of-template-insertion-modes>stack of template insertion modes</a&g=
t;.
+  The algorithms in the sections below will <i>push</i> inse=
rtion modes onto this stack, meaning
+  that the specified insertion mode is to be added to the stack, and &lt=
;i>pop</i> insertion modes from
+  the stack, which means that the most recently added insertion mode mus=
t be removed from the
+  stack.</p>
+
+  <hr><p>When the steps below require the UA to <dfn id=3D=
reset-the-insertion-mode-appropriately>reset the insertion mode approp=
riately</dfn>, it
+  means the UA must follow these steps:</p>
+
+  <ol><li><p>Let <var title=3D"">last&=
lt;/var> be false.</li>
+
+   <li><p>Let <var title=3D"">node</var&g=
t; be the last node in the <a href=3D#stack-of-open-elements>stack =
of open
+   elements</a>.</li>
+
+   <li><p><i>Loop</i>: If <var title=3D"=
">node</var> is the first node in the stack of open element=
s,
+   then set <var title=3D"">last</var> to true and=
 set <var title=3D"">node</var> to the <var titl=
e=3Dconcept-frag-parse-context><a href=3D#concept-frag-parse-contex=
t>context</a></var> element.</li>
+
+   <li>
+
+    <p>If <var title=3D"">node</var> is a &l=
t;code><a href=3D#the-select-element>select</a></code&g=
t; element, run these substeps:</p>
+
+    <ol><li><p>If <var title=3D"">last=
</var> is true, jump to the step below labeled
+     <i>done</i>.</li>
+
+     <li><p>Let <var title=3D"">ancestor<=
/var> be <var title=3D"">node</var>.</li>
+
+     <li><p><i>Loop</i>: If <var title=3D&quo=
t;">ancestor</var> is the first node in the <a href=3D#s=
tack-of-open-elements>stack of
+     open elements</a>, jump to the step below labeled <i>do=
ne</i>.</li>
+
+     <li><p>Let <var title=3D"">ancestor<=
/var> be the node before <var title=3D"">ancestor</=
var> in the
+     <a href=3D#stack-of-open-elements>stack of open elements</=
a>.</li>
+
+     <li><p>If <var title=3D"">ancestor</=
var> is a <code><a href=3D#the-template-element>template&l=
t;/a></code> node, jump to the step below
+     labeled <i>done</i>.</li>
+
+     <li><p>If <var title=3D"">ancestor</=
var> is a <code><a href=3D#the-table-element>table</a&g=
t;</code> node, switch the <a href=3D#insertion-mode>insertio=
n
+     mode</a> to "<a href=3D#parsing-main-inselectintable =
title=3D"insertion mode: in select in table">in select in ta=
ble</a>" and
+     abort these steps.</li> <!-- consider
+     <table><tr><td><select><template><=
/template><caption></table>
+     http://software.hixie.ch/utilities/js/live-dom-viewer/saved/2374 --=
>
+
+     <li><p>Jump back to the step labeled <i>loop</=
i>.</li>
+
+     <li><p><i>Done</i>: Switch the <a href=3D=
#insertion-mode>insertion mode</a> to "<a href=3D#parsin=
g-main-inselect title=3D"insertion mode: in
+     select">in select</a>" and abort these steps.&lt=
;/li>
+
+    </ol></li>
+
+   <li><p>If <var title=3D"">node</var&gt=
; is a <code><a href=3D#the-td-element>td</a></code&=
gt; or <code><a href=3D#the-th-element>th</a></code&=
gt; element and <var title=3D"">last</var> is false=
, then switch the <a href=3D#insertion-mode>insertion mode</a&gt=
; to "<a href=3D#parsing-main-intd title=3D"insertion mode: =
in cell">in cell</a>" and abort these steps.</li&gt=
;
+
+   <li><p>If <var title=3D"">node</var&gt=
; is a <code><a href=3D#the-tr-element>tr</a></code&=
gt; element, then switch the <a href=3D#insertion-mode>insertion
+   mode</a> to "<a href=3D#parsing-main-intr title=3D&quot=
;insertion mode: in row">in row</a>" and abort these
+   steps.</li>
+
+   <li><p>If <var title=3D"">node</var&gt=
; is a <code><a href=3D#the-tbody-element>tbody</a><=
/code>, <code><a href=3D#the-thead-element>thead</a>=
</code>, or
+   <code><a href=3D#the-tfoot-element>tfoot</a></co=
de> element, then switch the <a href=3D#insertion-mode>insertion=
 mode</a> to "<a href=3D#parsing-main-intbody title=3D&quot=
;insertion mode: in table body">in table body</a>" and=
 abort these steps.</li>
+
+   <li><p>If <var title=3D"">node</var&gt=
; is a <code><a href=3D#the-caption-element>caption</a>=
</code> element, then switch the
+   <a href=3D#insertion-mode>insertion mode</a> to "&lt=
;a href=3D#parsing-main-incaption title=3D"insertion mode: in captio=
n">in caption</a>" and
+   abort these steps.</li>
+
+   <li><p>If <var title=3D"">node</var&gt=
; is a <code><a href=3D#the-colgroup-element>colgroup</a&g=
t;</code> element, then switch the
+   <a href=3D#insertion-mode>insertion mode</a> to "&lt=
;a href=3D#parsing-main-incolgroup title=3D"insertion mode: in colum=
n group">in column
+   group</a>" and abort these steps.</li>
+
+   <li><p>If <var title=3D"">node</var&gt=
; is a <code><a href=3D#the-table-element>table</a><=
/code> element, then switch the
+   <a href=3D#insertion-mode>insertion mode</a> to "&lt=
;a href=3D#parsing-main-intable title=3D"insertion mode: in table&qu=
ot;>in table</a>" and abort
+   these steps.</li>
+
+   <li><p>If <var title=3D"">node</var&gt=
; is a <code><a href=3D#the-template-element>template</a&g=
t;</code> element, then switch the
+   <a href=3D#insertion-mode>insertion mode</a> to the <a=
 href=3D#current-template-insertion-mode>current template insertion mo=
de</a> and abort these
+   steps.</li>
+
+   <!-- <li><p>If <var title=3D"">node&lt=
;/var> is a <code>head</code> element and <var
+   title=3D"">last</var> is true, then switch the &lt=
;span>insertion mode</span> to "<span
+   title=3D"insertion mode: in body">in body</span>&q=
uot; ("<span title=3D"insertion mode: in body">in
+   body</span>"! <em> not "<span title=3D"=
insertion mode: in head">in head</span>"</em>!) =
and abort
+   these steps. (<span>fragment case</span>)</p></l=
i> --><!-- The above is only here in case people
+   think that the spec accidentally omitted it and try to "fix&quot=
; it. Note that noscript-in-head is
+   also handled this way. This is all intentional. The only thing it doe=
sn't handle is the
+   scripting-disabled fragment parsing case for a <head> element c=
ontaining a <noscript> which
+   itself contains something other than a <link> or a <style&gt=
; element; you'd expect that to break
+   out of the <noscript> but it doesn't. This is an edge case that=
 doesn't affect the spec, since
+   the algorithm for fragment parsing is only used for innerHTML/outerHT=
ML/insertAdjacentHTML(),
+   where we know scripting is enabled. -->
+
+   <li><p>If <var title=3D"">node</var&gt=
; is a <code><a href=3D#the-head-element>head</a></c=
ode> element and <var title=3D"">last</var> is
+   false, then switch the <a href=3D#insertion-mode>insertion mode=
</a> to "<a href=3D#parsing-main-inhead title=3D"inser=
tion mode: in head">in
+   head</a>" and abort these steps.</li> <!-- for th=
e case of <head><template></template>...
+   -->
+
+   <li><p>If <var title=3D"">node</var&gt=
; is a <code><a href=3D#the-body-element>body</a></c=
ode> element, then switch the
+   <a href=3D#insertion-mode>insertion mode</a> to "&lt=
;a href=3D#parsing-main-inbody title=3D"insertion mode: in body&quot=
;>in body</a>" and abort
+   these steps.</li>
+
+   <li><p>If <var title=3D"">node</var&gt=
; is a <code><a href=3D#frameset>frameset</a></code&=
gt; element, then switch the
+   <a href=3D#insertion-mode>insertion mode</a> to "&lt=
;a href=3D#parsing-main-inframeset title=3D"insertion mode: in frame=
set">in frameset</a>" and
+   abort these steps. (<a href=3D#fragment-case>fragment case</=
a>)</li>
+
+   <li>
+
+    <p>If <var title=3D"">node</var> is an &=
lt;code><a href=3D#the-html-element>html</a></code> =
element, run these substeps:</p>
+  =20
+    <ol><li><p>If the <a href=3D#head-element-point=
er><code>head</code> element pointer</a> is null, sw=
itch the
+     <a href=3D#insertion-mode>insertion mode</a> to "&=
lt;a href=3D#the-before-head-insertion-mode title=3D"insertion mode:=
 before head">before head</a>"
+     and abort these steps. (<a href=3D#fragment-case>fragment cas=
e</a>)</li>
+
+     <li><p>Otherwise, the <a href=3D#head-element-pointe=
r><code>head</code> element pointer</a> is not null,=
 switch the
+     <a href=3D#insertion-mode>insertion mode</a> to "&=
lt;a href=3D#the-after-head-insertion-mode title=3D"insertion mode: =
after head">after head</a>" and
+     abort these steps.</li> <!-- consider <html><head=
></head><template></template> -->
+
+    </ol></li>
+
+   <li><p>If <var title=3D"">last</var&gt=
; is true, then switch the <a href=3D#insertion-mode>insertion mode=
</a> to "<a href=3D#parsing-main-inbody title=3D"inser=
tion mode: in body">in body</a>" and abort these steps=
. (<a href=3D#fragment-case>fragment
+   case</a>)</li>
+
+   <li><p>Let <var title=3D"">node</var&g=
t; now be the node before <var title=3D"">node</var&gt=
; in the
+   <a href=3D#stack-of-open-elements>stack of open elements</a&=
gt;.</li>
+
+   <li><p>Return to the step labeled <i>loop</i>=
.</li>
+
+  </ol><h5 id=3Dthe-stack-of-open-elements><span class=3D=
secno>12.2.3.2 </span>The stack of open elements</h5>
+
+  <p>Initially, the <dfn id=3Dstack-of-open-elements>stack o=
f open elements</dfn> is empty. The stack grows downwards; the
+  topmost node on the stack is the first one added to the stack, and the=
 bottommost node of the
+  stack is the most recently added node in the stack (notwithstanding wh=
en the stack is manipulated
+  in a random access fashion as part of <a href=3D#adoptionAgency>=
the handling for misnested
+  tags</a>).</p>
+
+  <p class=3Dnote>The "<a href=3D#the-before-html-insertio=
n-mode title=3D"insertion mode: before html">before html<=
/a>" <a href=3D#insertion-mode>insertion
+  mode</a> creates the <code><a href=3D#the-html-element&=
gt;html</a></code> root element node, which is then added to =
the stack.</p>
+
+  <p class=3Dnote>In the <a href=3D#fragment-case>fragment c=
ase</a>, the <a href=3D#stack-of-open-elements>stack of open =
elements</a> is
+  initialized to contain an <code><a href=3D#the-html-element&g=
t;html</a></code> element that is created as part of <a hr=
ef=3D#html-fragment-parsing-algorithm title=3D"html
+  fragment parsing algorithm">that algorithm</a>. (The &lt=
;a href=3D#fragment-case>fragment case</a> skips the
+  "<a href=3D#the-before-html-insertion-mode title=3D"inser=
tion mode: before html">before html</a>" <a href=3D=
#insertion-mode>insertion mode</a>.)</p>
+
+  <p>The <code><a href=3D#the-html-element>html</a&=
gt;</code> node, however it is created, is the topmost node of the =
stack. It only
+  gets popped off the stack when the parser <a href=3D#stop-parsing t=
itle=3D"stop parsing">finishes</a>.</p>
+
+  <p>The <dfn id=3Dcurrent-node>current node</dfn> is =
the bottommost node in this <a href=3D#stack-of-open-elements>stack=
 of open
+  elements</a>.</p>
+
+  <p>The <dfn id=3Dadjusted-current-node>adjusted current no=
de</dfn> is the <i title=3Dconcept-frag-parse-context><a h=
ref=3D#concept-frag-parse-context>context</a></i>
+  element if the <a href=3D#stack-of-open-elements>stack of open e=
lements</a> has only one element in it and the parser was
+  created by the <a href=3D#html-fragment-parsing-algorithm>HTML f=
ragment parsing algorithm</a>; otherwise, the <a href=3D#adjuste=
d-current-node>adjusted current
+  node</a> is the <a href=3D#current-node>current node</a=
>.</p>
+
+  <p>Elements in the <a href=3D#stack-of-open-elements>stack=
 of open elements</a> fall into the following categories:</p>
+
+  <dl><dt><dfn id=3Dspecial>Special</dfn></dt=
>
+
+   <dd><p>The following elements have varying levels of spec=
ial parsing rules: HTML's
+   <code><a href=3D#the-address-element>address</a>&lt=
;/code>, <code><a href=3D#the-applet-element>applet</a&=
gt;</code>, <code><a href=3D#the-area-element>area</=
a></code>, <code><a href=3D#the-article-element>arti=
cle</a></code>,
+   <code><a href=3D#the-aside-element>aside</a></co=
de>, <code><a href=3D#the-base-element>base</a></=
code>, <code><a href=3D#basefont>basefont</a></co=
de>, <code><a href=3D#bgsound>bgsound</a></code&g=
t;,
+   <code><a href=3D#the-blockquote-element>blockquote</a&=
gt;</code>, <code><a href=3D#the-body-element>body</=
a></code>, <code><a href=3D#the-br-element>br</a&=
gt;</code>, <code><a href=3D#the-button-element>button&=
lt;/a></code>,
+   <code><a href=3D#the-caption-element>caption</a>&lt=
;/code>, <code><a href=3D#center>center</a></code=
>, <code><a href=3D#the-col-element>col</a></code=
>, <code><a href=3D#the-colgroup-element>colgroup</a&gt=
;</code>,
+   <code><a href=3D#the-dd-element>dd</a></code>=
, <code><a href=3D#the-details-element>details</a></=
code>, <code><a href=3D#dir>dir</a></code>, &l=
t;code><a href=3D#the-div-element>div</a></code>, &l=
t;code><a href=3D#the-dl-element>dl</a></code>,
+   <code><a href=3D#the-dt-element>dt</a></code>=
, <code><a href=3D#the-embed-element>embed</a></code=
>, <code><a href=3D#the-fieldset-element>fieldset</a&gt=
;</code>, <code><a href=3D#the-figcaption-element>figca=
ption</a></code>,
+   <code><a href=3D#the-figure-element>figure</a></=
code>, <code><a href=3D#the-footer-element>footer</a&gt=
;</code>, <code><a href=3D#the-form-element>form</a&=
gt;</code>, <code><a href=3D#frame>frame</a></=
code>,
+   <code><a href=3D#frameset>frameset</a></code>=
, <code><a href=3D#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h1=
</a></code>, <code><a href=3D#the-h1,-h2,-h3,-h4,-h5=
,-and-h6-elements>h2</a></code>, <code><a href=3D=
#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h3</a></code>, &l=
t;code><a href=3D#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h4<=
/a></code>,
+   <code><a href=3D#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>=
h5</a></code>, <code><a href=3D#the-h1,-h2,-h3,-h4,-=
h5,-and-h6-elements>h6</a></code>, <code><a href=3D=
#the-head-element>head</a></code>, <code><a href=3D=
#the-header-element>header</a></code>, <code><a h=
ref=3D#the-hgroup-element>hgroup</a></code>,
+   <code><a href=3D#the-hr-element>hr</a></code>=
, <code><a href=3D#the-html-element>html</a></code&g=
t;, <code><a href=3D#the-iframe-element>iframe</a></=
code>, <!-- <code>image</code>, (commented out
+   because this isn't an element that can end up on the stack, so it doe=
sn't matter) -->
+   <code><a href=3D#the-img-element>img</a></code&g=
t;, <code><a href=3D#the-input-element>input</a></co=
de>, <code><a href=3D#isindex-0>isindex</a></code=
>, <code><a href=3D#the-li-element>li</a></code&g=
t;, <code><a href=3D#the-link-element>link</a></code=
>,
+   <code><a href=3D#listing>listing</a></code>, =
<code><a href=3D#the-main-element>main</a></code>=
, <code><a href=3D#the-marquee-element>marquee</a></=
code>, <code><a href=3D#the-menu-element>menu</a>&lt=
;/code>,
+   <code><a href=3D#the-menuitem-element>menuitem</a>&=
lt;/code>, <code><a href=3D#the-meta-element>meta</a&gt=
;</code>, <code><a href=3D#the-nav-element>nav</a&gt=
;</code>, <code><a href=3D#noembed>noembed</a>&lt=
;/code>,
+   <code><a href=3D#noframes>noframes</a></code>=
, <code><a href=3D#the-noscript-element>noscript</a>&lt=
;/code>, <code><a href=3D#the-object-element>object</a&=
gt;</code>, <code><a href=3D#the-ol-element>ol</a&gt=
;</code>,
+   <code><a href=3D#the-p-element>p</a></code>, =
<code><a href=3D#the-param-element>param</a></code&g=
t;, <code><a href=3D#plaintext>plaintext</a></code&g=
t;, <code><a href=3D#the-pre-element>pre</a></code&g=
t;,
+   <code><a href=3D#the-script-element>script</a></=
code>, <code><a href=3D#the-section-element>section</a&=
gt;</code>, <code><a href=3D#the-select-element>select&=
lt;/a></code>, <code><a href=3D#the-source-element>s=
ource</a></code>,
+   <code><a href=3D#the-style-element>style</a></co=
de>, <code><a href=3D#the-summary-element>summary</a&gt=
;</code>, <code><a href=3D#the-table-element>table</=
a></code>, <code><a href=3D#the-tbody-element>tbody&=
lt;/a></code>,
+   <code><a href=3D#the-td-element>td</a></code>=
, <code><a href=3D#the-template-element>template</a>&lt=
;/code>, <code><a href=3D#the-textarea-element>textarea&lt=
;/a></code>, <code><a href=3D#the-tfoot-element>tfoo=
t</a></code>,
+   <code><a href=3D#the-th-element>th</a></code>=
, <code><a href=3D#the-thead-element>thead</a></code=
>, <code><a href=3D#the-title-element>title</a></=
code>, <code><a href=3D#the-tr-element>tr</a></co=
de>, <code><a href=3D#the-track-element>track</a>&lt=
;/code>,
+   <code><a href=3D#the-ul-element>ul</a></code>=
, <code><a href=3D#the-wbr-element>wbr</a></code>=
, and <code><a href=3D#xmp>xmp</a></code>; MathML=
's <code title=3D"">mi</code>, <code title=3D&qu=
ot;">mo</code>, <code title=3D"">mn</cod=
e>, <code title=3D"">ms</code>, <code title=3D=
"">mtext</code>, and <code title=3D"">=
annotation-xml</code>; and SVG's <code title=3D"">f=
oreignObject</code>, <code title=3D"">desc</code=
>, and <code title=3D"">title</code>.</dd>=
 <!-- we could actually put all non-HTML elements in this list, I
+   think -->
+
+   <dt><dfn id=3Dformatting>Formatting</dfn></dt&gt=
;
+   <dd><p>The following HTML elements are those that end up =
in the <a href=3D#list-of-active-formatting-elements>list of active=
 formatting
+   elements</a>: <code><a href=3D#the-a-element>a</=
a></code>, <code><a href=3D#the-b-element>b</a&gt=
;</code>, <code><a href=3D#big>big</a></code&g=
t;, <code><a href=3D#the-code-element>code</a></code=
>,
+   <code><a href=3D#the-em-element>em</a></code>=
, <code><a href=3D#font>font</a></code>, <code=
><a href=3D#the-i-element>i</a></code>, <code>=
<a href=3D#nobr>nobr</a></code>, <code><a href=
=3D#the-s-element>s</a></code>,
+   <code><a href=3D#the-small-element>small</a></co=
de>, <code><a href=3D#strike>strike</a></code>=
, <code><a href=3D#the-strong-element>strong</a></co=
de>, <code><a href=3D#tt>tt</a></code>, and
+   <code><a href=3D#the-u-element>u</a></code>.&=
lt;/dd>
+
+   <dt><dfn id=3Dordinary>Ordinary</dfn></dt>
+   <dd><p>All other elements found while parsing an HTML doc=
ument.</dd>
+
+  </dl><p>The <a href=3D#stack-of-open-elements>stack =
of open elements</a> is said to <dfn id=3Dhas-an-element-in-the-=
specific-scope title=3D"has an element in the specific
+  scope">have an element <var title=3D"">target =
node</var> in a specific scope</dfn> consisting of a
+  list of element types <var title=3D"">list</var>=
 when the following algorithm terminates in a match
+  state:</p>
+
+  <ol><li><p>Initialize <var title=3D""&g=
t;node</var> to be the <a href=3D#current-node>current node&l=
t;/a> (the bottommost
+   node of the stack).</li>
+
+   <li><p>If <var title=3D"">node</var&gt=
; is the target node, terminate in a match state.</li>
+
+   <li><p>Otherwise, if <var title=3D"">node=
</var> is one of the element types in <var title=3D""&=
gt;list</var>, terminate in a failure state.</li>
+
+   <li><p>Otherwise, set <var title=3D"">nod=
e</var> to the previous entry in the <a href=3D#stack-of-open-el=
ements>stack of open
+   elements</a> and return to step 2. (This will never fail, since=
 the loop will always terminate
+   in the previous step if the top of the stack — an <code&=
gt;<a href=3D#the-html-element>html</a></code> element =
— is
+   reached.)</li>
+
+  </ol><p>The <a href=3D#stack-of-open-elements>stack =
of open elements</a> is said to <dfn id=3Dhas-an-element-in-scop=
e title=3D"has an element in scope">have a
+  particular element in scope</dfn> when it <a href=3D#has-an-e=
lement-in-the-specific-scope title=3D"has an element in the specific=
 scope">has
+  that element in the specific scope</a> consisting of the followi=
ng element types:</p>
+
+  <ul class=3Dbrief><li><code><a href=3D#the-applet=
-element>applet</a></code> in the <a href=3D#html-names=
pace-0>HTML namespace</a></li>
+   <li><code><a href=3D#the-caption-element>caption&lt=
;/a></code> in the <a href=3D#html-namespace-0>HTML namesp=
ace</a></li>
+   <li><code><a href=3D#the-html-element>html</a&gt=
;</code> in the <a href=3D#html-namespace-0>HTML namespace&lt=
;/a></li> <!-- (This can only happen if the <var title=3D&=
quot;">node</var> is the topmost node of the <span>st=
ack of open elements</span>, and prevents the next step from being =
invoked if there are no more elements in the stack.) -->
+   <li><code><a href=3D#the-table-element>table</a&=
gt;</code> in the <a href=3D#html-namespace-0>HTML namespace&=
lt;/a></li>
+   <li><code><a href=3D#the-td-element>td</a>&lt=
;/code> in the <a href=3D#html-namespace-0>HTML namespace</a&=
gt;</li>
+   <li><code><a href=3D#the-th-element>th</a>&lt=
;/code> in the <a href=3D#html-namespace-0>HTML namespace</a&=
gt;</li>
+   <li><code><a href=3D#the-marquee-element>marquee&lt=
;/a></code> in the <a href=3D#html-namespace-0>HTML namesp=
ace</a></li>
+   <li><code><a href=3D#the-object-element>object</=
a></code> in the <a href=3D#html-namespace-0>HTML namespac=
e</a></li>
+   <li><code><a href=3D#the-template-element>template&=
lt;/a></code> in the <a href=3D#html-namespace-0>HTML name=
space</a></li>
+   <li><code title=3D"">mi</code> in the &lt=
;a href=3D#mathml-namespace>MathML namespace</a></li>
+   <li><code title=3D"">mo</code> in the &lt=
;a href=3D#mathml-namespace>MathML namespace</a></li>
+   <li><code title=3D"">mn</code> in the &lt=
;a href=3D#mathml-namespace>MathML namespace</a></li>
+   <li><code title=3D"">ms</code> in the &lt=
;a href=3D#mathml-namespace>MathML namespace</a></li>
+   <li><code title=3D"">mtext</code> in the =
<a href=3D#mathml-namespace>MathML namespace</a></li>
+   <li><code title=3D"">annotation-xml</code&gt=
; in the <a href=3D#mathml-namespace>MathML namespace</a><=
/li>
+   <li><code title=3D"">foreignObject</code>=
 in the <a href=3D#svg-namespace>SVG namespace</a></li>
+   <li><code title=3D"">desc</code> in the &=
lt;a href=3D#svg-namespace>SVG namespace</a></li>
+   <li><code title=3D"">title</code> in the =
<a href=3D#svg-namespace>SVG namespace</a></li>
+  </ul><p>The <a href=3D#stack-of-open-elements>stack =
of open elements</a> is said to <dfn id=3Dhas-an-element-in-list=
-item-scope title=3D"has an element in list item
+  scope">have a particular element in list item scope</dfn&gt=
; when it <a href=3D#has-an-element-in-the-specific-scope title=3D&quo=
t;has an element in
+  the specific scope">has that element in the specific scope<=
/a> consisting of the following
+  element types:</p>
+
+  <ul class=3Dbrief><li>All the element types listed above f=
or the <i><a href=3D#has-an-element-in-scope>has an element i=
n scope</a></i> algorithm.</li>
+   <li><code><a href=3D#the-ol-element>ol</a>&lt=
;/code> in the <a href=3D#html-namespace-0>HTML namespace</a&=
gt;</li>
+   <li><code><a href=3D#the-ul-element>ul</a>&lt=
;/code> in the <a href=3D#html-namespace-0>HTML namespace</a&=
gt;</li>
+  </ul><p>The <a href=3D#stack-of-open-elements>stack =
of open elements</a> is said to <dfn id=3Dhas-an-element-in-butt=
on-scope title=3D"has an element in button
+  scope">have a particular element in button scope</dfn> w=
hen it <a href=3D#has-an-element-in-the-specific-scope title=3D"h=
as an element in the
+  specific scope">has that element in the specific scope</a&g=
t; consisting of the following element
+  types:</p>
+
+  <ul class=3Dbrief><li>All the element types listed above f=
or the <i><a href=3D#has-an-element-in-scope>has an element i=
n scope</a></i> algorithm.</li>
+   <li><code><a href=3D#the-button-element>button</=
a></code> in the <a href=3D#html-namespace-0>HTML namespac=
e</a></li>
+  </ul><p>The <a href=3D#stack-of-open-elements>stack =
of open elements</a> is said to <dfn id=3Dhas-an-element-in-tabl=
e-scope title=3D"has an element in table
+  scope">have a particular element in table scope</dfn> wh=
en it <a href=3D#has-an-element-in-the-specific-scope title=3D"ha=
s an element in the
+  specific scope">has that element in the specific scope</a&g=
t; consisting of the following element
+  types:</p>
+
+  <ul class=3Dbrief><li><code><a href=3D#the-html-e=
lement>html</a></code> in the <a href=3D#html-namespace=
-0>HTML namespace</a></li> <!-- (This can only happen i=
f the
+   <var title=3D"">node</var> is the topmost node =
of the <span>stack of open elements</span>, and
+   prevents the next step from being invoked if there are no more elemen=
ts in the stack.) -->
+   <li><code><a href=3D#the-table-element>table</a&=
gt;</code> in the <a href=3D#html-namespace-0>HTML namespace&=
lt;/a></li>
+   <li><code><a href=3D#the-template-element>template&=
lt;/a></code> in the <a href=3D#html-namespace-0>HTML name=
space</a></li>
+  </ul><p>The <a href=3D#stack-of-open-elements>stack =
of open elements</a> is said to <dfn id=3Dhas-an-element-in-sele=
ct-scope title=3D"has an element in select
+  scope">have a particular element in select scope</dfn> w=
hen it <a href=3D#has-an-element-in-the-specific-scope title=3D"h=
as an element in the
+  specific scope">has that element in the specific scope</a&g=
t; consisting of all element types
+  <em>except</em> the following:</p>
+
+  <ul class=3Dbrief><!--<li><code>select</code&g=
t; in the <span>HTML namespace</span></li>--><li&=
gt;<code><a href=3D#the-optgroup-element>optgroup</a>&l=
t;/code> in the <a href=3D#html-namespace-0>HTML namespace</a=
></li>
+   <li><code><a href=3D#the-option-element>option</=
a></code> in the <a href=3D#html-namespace-0>HTML namespac=
e</a></li>
+  </ul><p>Nothing happens if at any time any of the elements=
 in the <a href=3D#stack-of-open-elements>stack of open elements&lt=
;/a>
+  are moved to a new location in, or removed from, the <code><a=
 href=3D#document>Document</a></code> tree. In particular,
+  the stack is not changed in this situation. This can cause, amongst ot=
her strange effects, content
+  to be appended to nodes that are no longer in the DOM.</p>
+
+  <p class=3Dnote>In some cases (namely, when <a href=3D#adopti=
onAgency>closing misnested formatting
+  elements</a>), the stack is manipulated in a random-access fashi=
on.</p>
+
+
+  <h5 id=3Dthe-list-of-active-formatting-elements><span class=3D=
secno>12.2.3.3 </span>The list of active formatting elements<=
/h5>
+
+  <p>Initially, the <dfn id=3Dlist-of-active-formatting-element=
s>list of active formatting elements</dfn> is empty. It is used =
to handle
+  mis-nested <a href=3D#formatting title=3Dformatting>formatting e=
lement tags</a>.</p>
+
+  <p>The list contains elements in the <a href=3D#formatting&gt=
;formatting</a> category, and scope markers. The
+  scope markers are inserted when entering <code><a href=3D#the=
-applet-element>applet</a></code> elements, buttons,
+  <code><a href=3D#the-object-element>object</a></c=
ode> elements, marquees, table cells, and table captions, and are used=
 to prevent
+  formatting from "leaking" <em>into</em> <code=
><a href=3D#the-applet-element>applet</a></code> ele=
ments, buttons, <code><a href=3D#the-object-element>object&lt=
;/a></code>
+  elements, marquees, and tables.</p>
+
+  <p class=3Dnote>The scope markers are unrelated to the concept o=
f an element being <a href=3D#has-an-element-in-scope title=3D"ha=
s an element in scope">in scope</a>.</p>
+
+  <p>In addition, each element in the <a href=3D#list-of-active=
-formatting-elements>list of active formatting elements</a> is a=
ssociated
+  with the token for which it was created, so that further elements can =
be created for that token if
+  necessary.</p>
+
+  <p>When the steps below require the UA to <dfn id=3Dpush-onto=
-the-list-of-active-formatting-elements>push onto the list of active f=
ormatting
+  elements</dfn> an element <var title=3D"">elemen=
t</var>, the UA must perform the following
+  steps:</p>
+
+  <ol id=3Dnoah><li><p>If there are already three elem=
ents in the <a href=3D#list-of-active-formatting-elements>list of a=
ctive formatting elements</a>
+   after the last list marker, if any, or anywhere in the list if there =
are no list markers, that
+   have the same tag name, namespace, and attributes as <var title=3D=
"">element</var>, then remove the
+   earliest such element from the <a href=3D#list-of-active-formattin=
g-elements>list of active formatting elements</a>. For these
+   purposes, the attributes must be compared as they were when the eleme=
nts were created by the
+   parser; two elements have the same attributes if all their parsed att=
ributes can be paired such
+   that the two attributes in each pair have identical names, namespaces=
, and values (the order of
+   the attributes does not matter).</p>
+
+   <p class=3Dnote>This is the Noah's Ark clause. But with three p=
er family instead of two.</li>
+   <!-- A sort of polyamorous Noah's Ark, if you will. -->
+
+   <li><p>Add <var title=3D"">element</va=
r> to the <a href=3D#list-of-active-formatting-elements>list of =
active formatting
+   elements</a>.</li>
+
+  </ol><p>When the steps below require the UA to <dfn id=3D=
reconstruct-the-active-formatting-elements>reconstruct the active form=
atting elements</dfn>,
+  the UA must perform the following steps:</p>
+
+  <ol><li><p>If there are no entries in the <a href=
=3D#list-of-active-formatting-elements>list of active formatting eleme=
nts</a>, then there
+   is nothing to reconstruct; stop this algorithm.</li>
+
+   <li><p>If the last (most recently added) entry in the &lt=
;a href=3D#list-of-active-formatting-elements>list of active formattin=
g
+   elements</a> is a marker, or if it is an element that is in the=
 <a href=3D#stack-of-open-elements>stack of open
+   elements</a>, then there is nothing to reconstruct; stop this a=
lgorithm.</li>
+
+   <li><p>Let <var title=3D"">entry</var&=
gt; be the last (most recently added) element in the <a href=3D#list-o=
f-active-formatting-elements>list
+   of active formatting elements</a>.</li>
+
+   <li><p><i>Rewind</i>: If there are no entries=
 before <var title=3D"">entry</var> in the <a hr=
ef=3D#list-of-active-formatting-elements>list
+   of active formatting elements</a>, then jump to the step labele=
d <i>create</i>.</li>
+
+   <li><p>Let <var title=3D"">entry</var&=
gt; be the entry one earlier than <var title=3D"">entry&l=
t;/var> in
+   the <a href=3D#list-of-active-formatting-elements>list of activ=
e formatting elements</a>.</li>
+
+   <li><p>If <var title=3D"">entry</var&g=
t; is neither a marker nor an element that is also in the
+   <a href=3D#stack-of-open-elements>stack of open elements</a&=
gt;, go to the step labeled <i>rewind</i>.</li>
+
+   <li><p><i>Advance</i>: Let <var title=3D&q=
uot;">entry</var> be the element one later than <var tit=
le=3D"">entry</var> in the <a href=3D#list-of-activ=
e-formatting-elements>list of active formatting elements</a>.&lt=
;/li>
+
+   <li><p><i>Create</i>: <a href=3D#insert-an=
-html-element>Insert an HTML element</a> for the token for which=
 the element
+   <var title=3D"">entry</var> was created, to obt=
ain <var title=3D"">new element</var>.</li>
+
+   <li><p>Replace the entry for <var title=3D""=
>entry</var> in the list with an entry for <var title=3D&quot=
;">new element</var>.</li>
+
+   <li><p>If the entry for <var title=3D"">n=
ew element</var> in the <a href=3D#list-of-active-formatting-ele=
ments>list of active formatting
+   elements</a> is not the last entry in the list, return to the s=
tep labeled
+   <i>advance</i>.</li>
+
+  </ol><p>This has the effect of reopening all the formattin=
g elements that were opened in the current
+  body, cell, or caption (whichever is youngest) that haven't been expli=
citly closed.</p>
+
+  <p class=3Dnote>The way this specification is written, the <a=
 href=3D#list-of-active-formatting-elements>list of active formatting
+  elements</a> always consists of elements in chronological order =
with the least recently added
+  element first and the most recently added element last (except for whi=
le steps 8 to 11 of the
+  above algorithm are being executed, of course).</p>
+
+  <p>When the steps below require the UA to <dfn id=3Dclear-the=
-list-of-active-formatting-elements-up-to-the-last-marker>clear the li=
st of active formatting elements up to
+  the last marker</dfn>, the UA must perform the following steps:&=
lt;/p>
+
+  <ol><li><p>Let <var title=3D"">entry=
</var> be the last (most recently added) entry in the <a href=3D=
#list-of-active-formatting-elements>list of
+   active formatting elements</a>.</li>
+
+   <li><p>Remove <var title=3D"">entry</v=
ar> from the <a href=3D#list-of-active-formatting-elements>list =
of active formatting
+   elements</a>.</li>
+
+   <li><p>If <var title=3D"">entry</var&g=
t; was a marker, then stop the algorithm at this point. The list
+   has been cleared up to the last marker.</li>
+
+   <li><p>Go to step 1.</li>
+
+  </ol><h5 id=3Dthe-element-pointers><span class=3Dsecno&=
gt;12.2.3.4 </span>The element pointers</h5>
+
+  <p>Initially, the <dfn id=3Dhead-element-pointer><code =
title=3D"">head</code> element pointer</dfn> and=
 the <dfn id=3Dform-element-pointer><code title=3D""&g=
t;form</code> element pointer</dfn> are both null.</p>
+
+  <p>Once a <code><a href=3D#the-head-element>head<=
/a></code> element has been parsed (whether implicitly or explic=
itly) the
+  <a href=3D#head-element-pointer><code title=3D""&gt=
;head</code> element pointer</a> gets set to point to this no=
de.</p>
+
+  <p>The <a href=3D#form-element-pointer><code title=3D&q=
uot;">form</code> element pointer</a> points to the l=
ast
+  <code><a href=3D#the-form-element>form</a></code&=
gt; element that was opened and whose end tag has not yet been seen. It i=
s used to
+  make form controls associate with forms in the face of dramatically ba=
d markup, for historical
+  reasons.</p>
+
+
+  <h5 id=3Dother-parsing-state-flags><span class=3Dsecno>12.=
2.3.5 </span>Other parsing state flags</h5>
+
+  <p>The <dfn id=3Dscripting-flag>scripting flag</dfn>=
 is set to "enabled" if <a href=3D#concept-n-script title=3D=
concept-n-script>scripting
+  was enabled</a> for the <code><a href=3D#document>Do=
cument</a></code> with which the parser is associated when th=
e
+  parser was created, and "disabled" otherwise.</p>
+
+  <p class=3Dnote>The <a href=3D#scripting-flag>scripting fl=
ag</a> can be enabled even when the parser was originally
+  created for the <a href=3D#html-fragment-parsing-algorithm>HTML =
fragment parsing algorithm</a>, even though <code><a href=3D=
#the-script-element>script</a></code>
+  elements don't execute in that case.</p>
+
+  <p>The <dfn id=3Dframeset-ok-flag>frameset-ok flag</dfn=
> is set to "ok" when the parser is created. It is set to &q=
uot;not
+  ok" after certain tokens are seen.</p>
+
+  </div>
+
+
+  <div class=3Dimpl>
+
+  <h4 id=3Dtokenization><span class=3Dsecno>12.2.4 </span=
><dfn>Tokenization</dfn></h4>
+
+  <p>Implementations must act as if they used the following state =
machine to tokenize HTML. The
+  state machine must start in the <a href=3D#data-state>data state=
</a>. Most states consume a single character,
+  which may have various side-effects, and either switches the state mac=
hine to a new state to
+  <i>reconsume</i> the same character, or switches it to a n=
ew state to consume the next character,
+  or stays in the same state to consume the next character. Some states =
have more complicated
+  behavior and can consume several characters before switching to anothe=
r state. In some cases, the
+  tokenizer state is also changed by the tree construction stage.</p&=
gt;
+
+  <p>The exact behavior of certain states depends on the <a hre=
f=3D#insertion-mode>insertion mode</a> and the
+  <a href=3D#stack-of-open-elements>stack of open elements</a&g=
t;. Certain states also use a <dfn id=3Dtemporary-buffer><var&gt=
;temporary
+  buffer</var></dfn> to track progress.</p>
+
+  <p>The output of the tokenization step is a series of zero or mo=
re of the following tokens:
+  DOCTYPE, start tag, end tag, comment, character, end-of-file. DOCTYPE =
tokens have a name, a public
+  identifier, a system identifier, and a <i>force-quirks flag</=
i>. When a DOCTYPE token is created,
+  its name, public identifier, and system identifier must be marked as m=
issing (which is a distinct
+  state from the empty string), and the <i>force-quirks flag</i=
> must be set to <i>off</i> (its
+  other state is <i>on</i>). Start and end tag tokens have a=
 tag name, a <i>self-closing flag</i>,
+  and a list of attributes, each of which has a name and a value. When a=
 start or end tag token is
+  created, its <i>self-closing flag</i> must be unset (its o=
ther state is that it be set), and its
+  attributes list must be empty. Comment and character tokens have data.=
</p>
+
+  <p>When a token is emitted, it must immediately be handled by th=
e <a href=3D#tree-construction>tree construction</a>
+  stage. The tree construction stage can affect the state of the tokeniz=
ation stage, and can insert
+  additional characters into the stream. (For example, the <code>&=
lt;a href=3D#the-script-element>script</a></code> element =
can result in
+  scripts executing and using the <a href=3D#dynamic-markup-insertion=
>dynamic markup insertion</a> APIs to insert characters
+  into the stream being tokenized.)</p>
+
+  <p class=3Dnote>Creating a token and emitting it are distinct ac=
tions. It is possible for a token
+  to be created but implicitly abandoned (never emitted), e.g. if the fi=
le ends unexpectedly while
+  processing the characters that are being parsed into a start tag token=
.</p>
+
+  <p>When a start tag token is emitted with its <i>self-clos=
ing flag</i> set, if the flag is not
+  <dfn id=3Dacknowledge-self-closing-flag title=3D"acknowledge s=
elf-closing flag">acknowledged</dfn> when it is processed b=
y the tree
+  construction stage, that is a <a href=3D#parse-error>parse error=
</a>.</p>
+
+  <p>When an end tag token is emitted with attributes, that is a &=
lt;a href=3D#parse-error>parse error</a>.</p>
+
+  <p>When an end tag token is emitted with its <i>self-closi=
ng flag</i> set, that is a <a href=3D#parse-error>parse
+  error</a>.</p>
+
+  <p>An <dfn id=3Dappropriate-end-tag-token>appropriate end =
tag token</dfn> is an end tag token whose tag name matches the tag =
name
+  of the last start tag to have been emitted from this tokenizer, if any=
. If no start tag has been
+  emitted from this tokenizer, then no end tag token is appropriate.<=
/p>
+
+  <p>Before each step of the tokenizer, the user agent must first =
check the <a href=3D#parser-pause-flag>parser pause
+  flag</a>. If it is true, then the tokenizer must abort the proce=
ssing of any nested invocations
+  of the tokenizer, yielding control back to the caller.</p>
+
+  <p>The tokenizer state machine consists of the states defined in=
 the following subsections.</p>
+
+
+  <!-- Order of the lists below is supposed to be non-error then erro=
r, by unicode, then EOF, ending
+  with "anything else" -->
+
+
+  <h5 id=3Ddata-state><span class=3Dsecno>12.2.4.1 </span=
><dfn>Data state</dfn></h5>
+
+  <p>Consume the <a href=3D#next-input-character>next input =
character</a>:</p>
+
+  <dl class=3Dswitch><dt>U+0026 AMPERSAND (&)</dt=
>
+   <dd>Switch to the <a href=3D#character-reference-in-data-sta=
te>character reference in data state</a>.</dd>
+
+   <dt>U+003C LESS-THAN SIGN (<)</dt>
+   <dd>Switch to the <a href=3D#tag-open-state>tag open stat=
e</a>.</dd>
+
+   <dt>U+0000 NULL</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Emit th=
e <a href=3D#current-input-character>current input character</a&=
gt; as a character
+   token.</dd>
+
+   <dt>EOF</dt>
+   <dd>Emit an end-of-file token.</dd>
+
+   <dt>Anything else</dt>
+   <dd>Emit the <a href=3D#current-input-character>current i=
nput character</a> as a character token.</dd>
+
+  </dl><h5 id=3Dcharacter-reference-in-data-state><span c=
lass=3Dsecno>12.2.4.2 </span><dfn>Character reference in d=
ata state</dfn></h5>
+
+  <p>Switch to the <a href=3D#data-state>data state</a&gt=
;.</p>
+
+  <p>Attempt to <a href=3D#consume-a-character-reference>con=
sume a character reference</a>, with no <a href=3D#additional-al=
lowed-character>additional allowed
+  character</a>.</p>
+
+  <p>If nothing is returned, emit a U+0026 AMPERSAND character (&a=
mp;amp;) token.</p>
+
+  <p>Otherwise, emit the character tokens that were returned.</=
p>
+
+
+  <h5 id=3Drcdata-state><span class=3Dsecno>12.2.4.3 </sp=
an><dfn>RCDATA state</dfn></h5>
+
+  <p>Consume the <a href=3D#next-input-character>next input =
character</a>:</p>
+
+  <dl class=3Dswitch><dt>U+0026 AMPERSAND (&)</dt=
>
+   <dd>Switch to the <a href=3D#character-reference-in-rcdata-s=
tate>character reference in RCDATA state</a>.</dd>
+
+   <dt>U+003C LESS-THAN SIGN (<)</dt>
+   <dd>Switch to the <a href=3D#rcdata-less-than-sign-state>=
RCDATA less-than sign state</a>.</dd>
+
+   <dt>U+0000 NULL</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Emit a =
U+FFFD REPLACEMENT CHARACTER character token.</dd>
+
+   <dt>EOF</dt>
+   <dd>Emit an end-of-file token.</dd>
+
+   <dt>Anything else</dt>
+   <dd>Emit the <a href=3D#current-input-character>current i=
nput character</a> as a character token.</dd>
+
+  </dl><h5 id=3Dcharacter-reference-in-rcdata-state><span=
 class=3Dsecno>12.2.4.4 </span><dfn>Character reference in=
 RCDATA state</dfn></h5>
+
+  <p>Switch to the <a href=3D#rcdata-state>RCDATA state</=
a>.</p>
+
+  <p>Attempt to <a href=3D#consume-a-character-reference>con=
sume a character reference</a>, with no <a href=3D#additional-al=
lowed-character>additional allowed
+  character</a>.</p>
+
+  <p>If nothing is returned, emit a U+0026 AMPERSAND character (&a=
mp;amp;) token.</p>
+
+  <p>Otherwise, emit the character tokens that were returned.</=
p>
+
+
+  <h5 id=3Drawtext-state><span class=3Dsecno>12.2.4.5 </s=
pan><dfn>RAWTEXT state</dfn></h5>
+
+  <p>Consume the <a href=3D#next-input-character>next input =
character</a>:</p>
+
+  <dl class=3Dswitch><dt>U+003C LESS-THAN SIGN (<)&lt=
;/dt>
+   <dd>Switch to the <a href=3D#rawtext-less-than-sign-state&gt=
;RAWTEXT less-than sign state</a>.</dd>
+
+   <dt>U+0000 NULL</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Emit a =
U+FFFD REPLACEMENT CHARACTER character token.</dd>
+
+   <dt>EOF</dt>
+   <dd>Emit an end-of-file token.</dd>
+
+   <dt>Anything else</dt>
+   <dd>Emit the <a href=3D#current-input-character>current i=
nput character</a> as a character token.</dd>
+
+  </dl><h5 id=3Dscript-data-state><span class=3Dsecno>=
12.2.4.6 </span><dfn>Script data state</dfn></h5>
+
+  <p>Consume the <a href=3D#next-input-character>next input =
character</a>:</p>
+
+  <dl class=3Dswitch><dt>U+003C LESS-THAN SIGN (<)&lt=
;/dt>
+   <dd>Switch to the <a href=3D#script-data-less-than-sign-stat=
e>script data less-than sign state</a>.</dd>
+
+   <dt>U+0000 NULL</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Emit a =
U+FFFD REPLACEMENT CHARACTER character token.</dd>
+
+   <dt>EOF</dt>
+   <dd>Emit an end-of-file token.</dd>
+
+   <dt>Anything else</dt>
+   <dd>Emit the <a href=3D#current-input-character>current i=
nput character</a> as a character token.</dd>
+
+  </dl><h5 id=3Dplaintext-state><span class=3Dsecno>12=
.2.4.7 </span><dfn>PLAINTEXT state</dfn></h5>
+
+  <p>Consume the <a href=3D#next-input-character>next input =
character</a>:</p>
+
+  <dl class=3Dswitch><dt>U+0000 NULL</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Emit a =
U+FFFD REPLACEMENT CHARACTER character token.</dd>
+
+   <dt>EOF</dt>
+   <dd>Emit an end-of-file token.</dd>
+
+   <dt>Anything else</dt>
+   <dd>Emit the <a href=3D#current-input-character>current i=
nput character</a> as a character token.</dd>
+
+  </dl><h5 id=3Dtag-open-state><span class=3Dsecno>12.=
2.4.8 </span><dfn>Tag open state</dfn></h5>
+
+  <p>Consume the <a href=3D#next-input-character>next input =
character</a>:</p>
+
+  <dl class=3Dswitch><dt>U+0021 EXCLAMATION MARK (!)</dt&=
gt;
+   <dd>Switch to the <a href=3D#markup-declaration-open-state&g=
t;markup declaration open state</a>.</dd>
+
+   <dt>U+002F SOLIDUS (/)</dt>
+   <dd>Switch to the <a href=3D#end-tag-open-state>end tag o=
pen state</a>.</dd>
+
+   <dt><a href=3D#uppercase-ascii-letters title=3D"upperca=
se ASCII letters">Uppercase ASCII letter</a></dt>
+   <dd>Create a new start tag token, set its tag name to the lower=
case version of the <a href=3D#current-input-character>current
+   input character</a> (add 0x0020 to the character's code point),=
 then switch to the <a href=3D#tag-name-state>tag
+   name state</a>. (Don't emit the token yet; further details will=
 be filled in before it is
+   emitted.)</dd>
+
+   <dt><a href=3D#lowercase-ascii-letters title=3D"lowerca=
se ASCII letters">Lowercase ASCII letter</a></dt>
+   <dd>Create a new start tag token, set its tag name to the <a=
 href=3D#current-input-character>current input character</a>,
+   then switch to the <a href=3D#tag-name-state>tag name state<=
/a>. (Don't emit the token yet; further details will
+   be filled in before it is emitted.)</dd>
+
+   <dt>U+003F QUESTION MARK (?)</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Switch =
to the <a href=3D#bogus-comment-state>bogus comment state</a>=
.</dd>
+
+   <dt>Anything else</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Switch =
to the <a href=3D#data-state>data state</a>. Emit a U+003C LE=
SS-THAN SIGN
+   character token. Reconsume the <a href=3D#current-input-character&=
gt;current input character</a>.</dd>
+
+  </dl><h5 id=3Dend-tag-open-state><span class=3Dsecno&gt=
;12.2.4.9 </span><dfn>End tag open state</dfn></h5&g=
t;
+
+  <p>Consume the <a href=3D#next-input-character>next input =
character</a>:</p>
+
+  <dl class=3Dswitch><dt><a href=3D#uppercase-ascii-lette=
rs title=3D"uppercase ASCII letters">Uppercase ASCII letter&=
lt;/a></dt>
+   <dd>Create a new end tag token, set its tag name to the lowerca=
se version of the <a href=3D#current-input-character>current
+   input character</a> (add 0x0020 to the character's code point),=
 then switch to the <a href=3D#tag-name-state>tag
+   name state</a>. (Don't emit the token yet; further details will=
 be filled in before it is
+   emitted.)</dd>
+
+   <dt><a href=3D#lowercase-ascii-letters title=3D"lowerca=
se ASCII letters">Lowercase ASCII letter</a></dt>
+   <dd>Create a new end tag token, set its tag name to the <a h=
ref=3D#current-input-character>current input character</a>,
+   then switch to the <a href=3D#tag-name-state>tag name state<=
/a>. (Don't emit the token yet; further details will
+   be filled in before it is emitted.)</dd>
+
+   <dt>U+003E GREATER-THAN SIGN (>)</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Switch =
to the <a href=3D#data-state>data state</a>.</dd>
+
+   <dt>EOF</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Switch =
to the <a href=3D#data-state>data state</a>. Emit a U+003C LE=
SS-THAN SIGN
+   character token and a U+002F SOLIDUS character token. Reconsume the E=
OF character.</dd>
+
+   <dt>Anything else</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Switch =
to the <a href=3D#bogus-comment-state>bogus comment state</a>=
.</dd>
+
+  </dl><h5 id=3Dtag-name-state><span class=3Dsecno>12.=
2.4.10 </span><dfn>Tag name state</dfn></h5>
+
+  <p>Consume the <a href=3D#next-input-character>next input =
character</a>:</p>
+
+  <dl class=3Dswitch><dt>U+0009 CHARACTER TABULATION (tab)&l=
t;/dt>
+   <dt>U+000A LINE FEED (LF)</dt>
+   <dt>U+000C FORM FEED (FF)</dt>
+   <!--<dt>U+000D CARRIAGE RETURN (CR)</dt>-->
+   <dt>U+0020 SPACE</dt>
+   <dd>Switch to the <a href=3D#before-attribute-name-state>=
before attribute name state</a>.</dd>
+
+   <dt>U+002F SOLIDUS (/)</dt>
+   <dd>Switch to the <a href=3D#self-closing-start-tag-state&gt=
;self-closing start tag state</a>.</dd>
+
+   <dt>U+003E GREATER-THAN SIGN (>)</dt>
+   <dd>Switch to the <a href=3D#data-state>data state</a&=
gt;. Emit the current tag token.</dd>
+
+   <dt><a href=3D#uppercase-ascii-letters title=3D"upperca=
se ASCII letters">Uppercase ASCII letter</a></dt>
+   <dd>Append the lowercase version of the <a href=3D#current-i=
nput-character>current input character</a> (add 0x0020 to the
+   character's code point) to the current tag token's tag name.</dd&g=
t;
+
+   <dt>U+0000 NULL</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Append =
a U+FFFD REPLACEMENT CHARACTER character to the current tag
+   token's tag name.</dd>
+
+   <dt>EOF</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Switch =
to the <a href=3D#data-state>data state</a>. Reconsume the EO=
F
+   character.</dd>
+
+   <dt>Anything else</dt>
+   <dd>Append the <a href=3D#current-input-character>current=
 input character</a> to the current tag token's tag name.</dd&gt=
;
+
+  </dl><h5 id=3Drcdata-less-than-sign-state><span class=3D=
secno>12.2.4.11 </span><dfn>RCDATA less-than sign state&lt=
;/dfn></h5>
+  <!-- identical to the RAWTEXT less-than sign state, except s/RAWTEX=
T/RCDATA/g -->
+
+  <p>Consume the <a href=3D#next-input-character>next input =
character</a>:</p>
+
+  <dl class=3Dswitch><dt>U+002F SOLIDUS (/)</dt>
+   <dd>Set the <var><a href=3D#temporary-buffer>tempor=
ary buffer</a></var> to the empty string. Switch to the <a=
 href=3D#rcdata-end-tag-open-state>RCDATA end tag
+   open state</a>.</dd>
+
+   <dt>Anything else</dt>
+   <dd>Switch to the <a href=3D#rcdata-state>RCDATA state&lt=
;/a>. Emit a U+003C LESS-THAN SIGN character token.
+   Reconsume the <a href=3D#current-input-character>current input =
character</a>.</dd>
+
+  </dl><h5 id=3Drcdata-end-tag-open-state><span class=3Ds=
ecno>12.2.4.12 </span><dfn>RCDATA end tag open state</d=
fn></h5>
+  <!-- identical to the RAWTEXT (and Script data) end tag open state,=
 except s/RAWTEXT/RCDATA/g -->
+
+  <p>Consume the <a href=3D#next-input-character>next input =
character</a>:</p>
+
+  <dl class=3Dswitch><dt><a href=3D#uppercase-ascii-lette=
rs title=3D"uppercase ASCII letters">Uppercase ASCII letter&=
lt;/a></dt>
+   <dd>Create a new end tag token, and set its tag name to the low=
ercase version of the
+   <a href=3D#current-input-character>current input character</=
a> (add 0x0020 to the character's code point). Append the
+   <a href=3D#current-input-character>current input character</=
a> to the <var><a href=3D#temporary-buffer>temporary buffe=
r</a></var>. Finally, switch to the
+   <a href=3D#rcdata-end-tag-name-state>RCDATA end tag name state&=
lt;/a>. (Don't emit the token yet; further details will be filled
+   in before it is emitted.)</dd>
+
+   <dt><a href=3D#lowercase-ascii-letters title=3D"lowerca=
se ASCII letters">Lowercase ASCII letter</a></dt>
+   <dd>Create a new end tag token, and set its tag name to the &lt=
;a href=3D#current-input-character>current input character</a>.
+   Append the <a href=3D#current-input-character>current input cha=
racter</a> to the <var><a href=3D#temporary-buffer>temp=
orary buffer</a></var>. Finally,
+   switch to the <a href=3D#rcdata-end-tag-name-state>RCDATA end t=
ag name state</a>. (Don't emit the token yet; further details
+   will be filled in before it is emitted.)</dd>
+
+   <dt>Anything else</dt>
+   <dd>Switch to the <a href=3D#rcdata-state>RCDATA state&lt=
;/a>. Emit a U+003C LESS-THAN SIGN character token and a
+   U+002F SOLIDUS character token. Reconsume the <a href=3D#current-i=
nput-character>current input character</a>.</dd>
+
+  </dl><h5 id=3Drcdata-end-tag-name-state><span class=3Ds=
ecno>12.2.4.13 </span><dfn>RCDATA end tag name state</d=
fn></h5>
+  <!-- identical to the RAWTEXT (and Script data) end tag name state,=
 except s/RAWTEXT/RCDATA/g -->
+
+  <p>Consume the <a href=3D#next-input-character>next input =
character</a>:</p>
+
+  <dl class=3Dswitch><dt>U+0009 CHARACTER TABULATION (tab)&l=
t;/dt>
+   <dt>U+000A LINE FEED (LF)</dt>
+   <dt>U+000C FORM FEED (FF)</dt>
+   <!--<dt>U+000D CARRIAGE RETURN (CR)</dt>-->
+   <dt>U+0020 SPACE</dt>
+   <dd>If the current end tag token is an <a href=3D#appropriat=
e-end-tag-token>appropriate end tag token</a>, then switch to th=
e
+   <a href=3D#before-attribute-name-state>before attribute name st=
ate</a>. Otherwise, treat it as per the "anything else" e=
ntry
+   below.</dd>
+
+   <dt>U+002F SOLIDUS (/)</dt>
+   <dd>If the current end tag token is an <a href=3D#appropriat=
e-end-tag-token>appropriate end tag token</a>, then switch to th=
e
+   <a href=3D#self-closing-start-tag-state>self-closing start tag =
state</a>. Otherwise, treat it as per the "anything else"=
 entry
+   below.</dd>
+
+   <dt>U+003E GREATER-THAN SIGN (>)</dt>
+   <dd>If the current end tag token is an <a href=3D#appropriat=
e-end-tag-token>appropriate end tag token</a>, then switch to th=
e
+   <a href=3D#data-state>data state</a> and emit the current=
 tag token. Otherwise, treat it as per the "anything
+   else" entry below.</dd>
+
+   <dt><a href=3D#uppercase-ascii-letters title=3D"upperca=
se ASCII letters">Uppercase ASCII letter</a></dt>
+   <dd>Append the lowercase version of the <a href=3D#current-i=
nput-character>current input character</a> (add 0x0020 to the
+   character's code point) to the current tag token's tag name. Append t=
he <a href=3D#current-input-character>current input
+   character</a> to the <var><a href=3D#temporary-buffer&=
gt;temporary buffer</a></var>.</dd>
+
+   <dt><a href=3D#lowercase-ascii-letters title=3D"lowerca=
se ASCII letters">Lowercase ASCII letter</a></dt>
+   <dd>Append the <a href=3D#current-input-character>current=
 input character</a> to the current tag token's tag name. Append
+   the <a href=3D#current-input-character>current input character&=
lt;/a> to the <var><a href=3D#temporary-buffer>temporary b=
uffer</a></var>.</dd>
+
+   <dt>Anything else</dt>
+   <dd>Switch to the <a href=3D#rcdata-state>RCDATA state&lt=
;/a>. Emit a U+003C LESS-THAN SIGN character token, a
+   U+002F SOLIDUS character token, and a character token for each of the=
 characters in the
+   <var><a href=3D#temporary-buffer>temporary buffer</a&g=
t;</var> (in the order they were added to the buffer). Reconsume th=
e
+   <a href=3D#current-input-character>current input character</=
a>.</dd>
+
+  </dl><h5 id=3Drawtext-less-than-sign-state><span class=3D=
secno>12.2.4.14 </span><dfn>RAWTEXT less-than sign state&l=
t;/dfn></h5>
+  <!-- identical to the RCDATA less-than sign state, except s/RCDATA/=
RAWTEXT/g -->
+
+  <p>Consume the <a href=3D#next-input-character>next input =
character</a>:</p>
+
+  <dl class=3Dswitch><dt>U+002F SOLIDUS (/)</dt>
+   <dd>Set the <var><a href=3D#temporary-buffer>tempor=
ary buffer</a></var> to the empty string. Switch to the <a=
 href=3D#rawtext-end-tag-open-state>RAWTEXT end tag
+   open state</a>.</dd>
+
+   <dt>Anything else</dt>
+   <dd>Switch to the <a href=3D#rawtext-state>RAWTEXT state&=
lt;/a>. Emit a U+003C LESS-THAN SIGN character token.
+   Reconsume the <a href=3D#current-input-character>current input =
character</a>.</dd>
+
+  </dl><h5 id=3Drawtext-end-tag-open-state><span class=3D=
secno>12.2.4.15 </span><dfn>RAWTEXT end tag open state<=
/dfn></h5>
+  <!-- identical to the RCDATA (and Script data) end tag open state, =
except s/RCDATA/RAWTEXT/g -->
+
+  <p>Consume the <a href=3D#next-input-character>next input =
character</a>:</p>
+
+  <dl class=3Dswitch><dt><a href=3D#uppercase-ascii-lette=
rs title=3D"uppercase ASCII letters">Uppercase ASCII letter&=
lt;/a></dt>
+   <dd>Create a new end tag token, and set its tag name to the low=
ercase version of the
+   <a href=3D#current-input-character>current input character</=
a> (add 0x0020 to the character's code point). Append the
+   <a href=3D#current-input-character>current input character</=
a> to the <var><a href=3D#temporary-buffer>temporary buffe=
r</a></var>. Finally, switch to the
+   <a href=3D#rawtext-end-tag-name-state>RAWTEXT end tag name stat=
e</a>. (Don't emit the token yet; further details will be
+   filled in before it is emitted.)</dd>
+
+   <dt><a href=3D#lowercase-ascii-letters title=3D"lowerca=
se ASCII letters">Lowercase ASCII letter</a></dt>
+   <dd>Create a new end tag token, and set its tag name to the &lt=
;a href=3D#current-input-character>current input character</a>.
+   Append the <a href=3D#current-input-character>current input cha=
racter</a> to the <var><a href=3D#temporary-buffer>temp=
orary buffer</a></var>. Finally,
+   switch to the <a href=3D#rawtext-end-tag-name-state>RAWTEXT end=
 tag name state</a>. (Don't emit the token yet; further details
+   will be filled in before it is emitted.)</dd>
+
+   <dt>Anything else</dt>
+   <dd>Switch to the <a href=3D#rawtext-state>RAWTEXT state&=
lt;/a>. Emit a U+003C LESS-THAN SIGN character token and a
+   U+002F SOLIDUS character token. Reconsume the <a href=3D#current-i=
nput-character>current input character</a>.</dd>
+
+  </dl><h5 id=3Drawtext-end-tag-name-state><span class=3D=
secno>12.2.4.16 </span><dfn>RAWTEXT end tag name state<=
/dfn></h5>
+  <!-- identical to the RCDATA (and Script data) end tag name state, =
except s/RCDATA/RAWTEXT/g -->
+
+  <p>Consume the <a href=3D#next-input-character>next input =
character</a>:</p>
+
+  <dl class=3Dswitch><dt>U+0009 CHARACTER TABULATION (tab)&l=
t;/dt>
+   <dt>U+000A LINE FEED (LF)</dt>
+   <dt>U+000C FORM FEED (FF)</dt>
+   <!--<dt>U+000D CARRIAGE RETURN (CR)</dt>-->
+   <dt>U+0020 SPACE</dt>
+   <dd>If the current end tag token is an <a href=3D#appropriat=
e-end-tag-token>appropriate end tag token</a>, then switch to th=
e
+   <a href=3D#before-attribute-name-state>before attribute name st=
ate</a>. Otherwise, treat it as per the "anything else" e=
ntry
+   below.</dd>
+
+   <dt>U+002F SOLIDUS (/)</dt>
+   <dd>If the current end tag token is an <a href=3D#appropriat=
e-end-tag-token>appropriate end tag token</a>, then switch to th=
e
+   <a href=3D#self-closing-start-tag-state>self-closing start tag =
state</a>. Otherwise, treat it as per the "anything else"=
 entry
+   below.</dd>
+
+   <dt>U+003E GREATER-THAN SIGN (>)</dt>
+   <dd>If the current end tag token is an <a href=3D#appropriat=
e-end-tag-token>appropriate end tag token</a>, then switch to th=
e
+   <a href=3D#data-state>data state</a> and emit the current=
 tag token. Otherwise, treat it as per the "anything
+   else" entry below.</dd>
+
+   <dt><a href=3D#uppercase-ascii-letters title=3D"upperca=
se ASCII letters">Uppercase ASCII letter</a></dt>
+   <dd>Append the lowercase version of the <a href=3D#current-i=
nput-character>current input character</a> (add 0x0020 to the
+   character's code point) to the current tag token's tag name. Append t=
he <a href=3D#current-input-character>current input
+   character</a> to the <var><a href=3D#temporary-buffer&=
gt;temporary buffer</a></var>.</dd>
+
+   <dt><a href=3D#lowercase-ascii-letters title=3D"lowerca=
se ASCII letters">Lowercase ASCII letter</a></dt>
+   <dd>Append the <a href=3D#current-input-character>current=
 input character</a> to the current tag token's tag name. Append
+   the <a href=3D#current-input-character>current input character&=
lt;/a> to the <var><a href=3D#temporary-buffer>temporary b=
uffer</a></var>.</dd>
+
+   <dt>Anything else</dt>
+   <dd>Switch to the <a href=3D#rawtext-state>RAWTEXT state&=
lt;/a>. Emit a U+003C LESS-THAN SIGN character token, a
+   U+002F SOLIDUS character token, and a character token for each of the=
 characters in the
+   <var><a href=3D#temporary-buffer>temporary buffer</a&g=
t;</var> (in the order they were added to the buffer). Reconsume th=
e
+   <a href=3D#current-input-character>current input character</=
a>.</dd>
+
+  </dl><h5 id=3Dscript-data-less-than-sign-state><span cl=
ass=3Dsecno>12.2.4.17 </span><dfn>Script data less-than si=
gn state</dfn></h5>
+
+  <p>Consume the <a href=3D#next-input-character>next input =
character</a>:</p>
+
+  <dl class=3Dswitch><dt>U+002F SOLIDUS (/)</dt>
+   <dd>Set the <var><a href=3D#temporary-buffer>tempor=
ary buffer</a></var> to the empty string. Switch to the <a=
 href=3D#script-data-end-tag-open-state>script data end
+   tag open state</a>.</dd>
+
+   <dt>U+0021 EXCLAMATION MARK (!)</dt>
+   <dd>Switch to the <a href=3D#script-data-escape-start-state&=
gt;script data escape start state</a>. Emit a U+003C LESS-THAN SIGN
+   character token and a U+0021 EXCLAMATION MARK character token.</dd=
>
+
+   <dt>Anything else</dt>
+   <dd>Switch to the <a href=3D#script-data-state>script dat=
a state</a>. Emit a U+003C LESS-THAN SIGN character token.
+   Reconsume the <a href=3D#current-input-character>current input =
character</a>.</dd>
+
+  </dl><h5 id=3Dscript-data-end-tag-open-state><span clas=
s=3Dsecno>12.2.4.18 </span><dfn>Script data end tag open s=
tate</dfn></h5>
+  <!-- identical to the RCDATA (and RAWTEXT) end tag open state, exce=
pt s/RCDATA/Script data/g -->
+
+  <p>Consume the <a href=3D#next-input-character>next input =
character</a>:</p>
+
+  <dl class=3Dswitch><dt><a href=3D#uppercase-ascii-lette=
rs title=3D"uppercase ASCII letters">Uppercase ASCII letter&=
lt;/a></dt>
+   <dd>Create a new end tag token, and set its tag name to the low=
ercase version of the
+   <a href=3D#current-input-character>current input character</=
a> (add 0x0020 to the character's code point). Append the
+   <a href=3D#current-input-character>current input character</=
a> to the <var><a href=3D#temporary-buffer>temporary buffe=
r</a></var>. Finally, switch to the
+   <a href=3D#script-data-end-tag-name-state>script data end tag n=
ame state</a>. (Don't emit the token yet; further details will be
+   filled in before it is emitted.)</dd>
+
+   <dt><a href=3D#lowercase-ascii-letters title=3D"lowerca=
se ASCII letters">Lowercase ASCII letter</a></dt>
+   <dd>Create a new end tag token, and set its tag name to the &lt=
;a href=3D#current-input-character>current input character</a>.
+   Append the <a href=3D#current-input-character>current input cha=
racter</a> to the <var><a href=3D#temporary-buffer>temp=
orary buffer</a></var>. Finally,
+   switch to the <a href=3D#script-data-end-tag-name-state>script =
data end tag name state</a>. (Don't emit the token yet; further
+   details will be filled in before it is emitted.)</dd>
+
+   <dt>Anything else</dt>
+   <dd>Switch to the <a href=3D#script-data-state>script dat=
a state</a>. Emit a U+003C LESS-THAN SIGN character token
+   and a U+002F SOLIDUS character token. Reconsume the <a href=3D#cur=
rent-input-character>current input character</a>.</dd>
+
+  </dl><h5 id=3Dscript-data-end-tag-name-state><span clas=
s=3Dsecno>12.2.4.19 </span><dfn>Script data end tag name s=
tate</dfn></h5>
+  <!-- identical to the RCDATA (and RAWTEXT) end tag name state, exce=
pt s/RCDATA/Script data/g -->
+
+  <p>Consume the <a href=3D#next-input-character>next input =
character</a>:</p>
+
+  <dl class=3Dswitch><dt>U+0009 CHARACTER TABULATION (tab)&l=
t;/dt>
+   <dt>U+000A LINE FEED (LF)</dt>
+   <dt>U+000C FORM FEED (FF)</dt>
+   <!--<dt>U+000D CARRIAGE RETURN (CR)</dt>-->
+   <dt>U+0020 SPACE</dt>
+   <dd>If the current end tag token is an <a href=3D#appropriat=
e-end-tag-token>appropriate end tag token</a>, then switch to th=
e
+   <a href=3D#before-attribute-name-state>before attribute name st=
ate</a>. Otherwise, treat it as per the "anything else" e=
ntry
+   below.</dd>
+
+   <dt>U+002F SOLIDUS (/)</dt>
+   <dd>If the current end tag token is an <a href=3D#appropriat=
e-end-tag-token>appropriate end tag token</a>, then switch to th=
e
+   <a href=3D#self-closing-start-tag-state>self-closing start tag =
state</a>. Otherwise, treat it as per the "anything else"=
 entry
+   below.</dd>
+
+   <dt>U+003E GREATER-THAN SIGN (>)</dt>
+   <dd>If the current end tag token is an <a href=3D#appropriat=
e-end-tag-token>appropriate end tag token</a>, then switch to th=
e
+   <a href=3D#data-state>data state</a> and emit the current=
 tag token. Otherwise, treat it as per the "anything
+   else" entry below.</dd>
+
+   <dt><a href=3D#uppercase-ascii-letters title=3D"upperca=
se ASCII letters">Uppercase ASCII letter</a></dt>
+   <dd>Append the lowercase version of the <a href=3D#current-i=
nput-character>current input character</a> (add 0x0020 to the
+   character's code point) to the current tag token's tag name. Append t=
he <a href=3D#current-input-character>current input
+   character</a> to the <var><a href=3D#temporary-buffer&=
gt;temporary buffer</a></var>.</dd>
+
+   <dt><a href=3D#lowercase-ascii-letters title=3D"lowerca=
se ASCII letters">Lowercase ASCII letter</a></dt>
+   <dd>Append the <a href=3D#current-input-character>current=
 input character</a> to the current tag token's tag name. Append
+   the <a href=3D#current-input-character>current input character&=
lt;/a> to the <var><a href=3D#temporary-buffer>temporary b=
uffer</a></var>.</dd>
+
+   <dt>Anything else</dt>
+   <dd>Switch to the <a href=3D#script-data-state>script dat=
a state</a>. Emit a U+003C LESS-THAN SIGN character token, a
+   U+002F SOLIDUS character token, and a character token for each of the=
 characters in the
+   <var><a href=3D#temporary-buffer>temporary buffer</a&g=
t;</var> (in the order they were added to the buffer). Reconsume th=
e
+   <a href=3D#current-input-character>current input character</=
a>.</dd>
+
+  </dl><h5 id=3Dscript-data-escape-start-state><span clas=
s=3Dsecno>12.2.4.20 </span><dfn>Script data escape start s=
tate</dfn></h5>
+
+  <p>Consume the <a href=3D#next-input-character>next input =
character</a>:</p>
+
+  <dl class=3Dswitch><dt>U+002D HYPHEN-MINUS (-)</dt>
+   <dd>Switch to the <a href=3D#script-data-escape-start-dash-s=
tate>script data escape start dash state</a>. Emit a U+002D HYPH=
EN-MINUS
+   character token.</dd>
+
+   <dt>Anything else</dt>
+   <dd>Switch to the <a href=3D#script-data-state>script dat=
a state</a>. Reconsume the <a href=3D#current-input-character&gt=
;current input
+   character</a>.</dd>
+
+  </dl><h5 id=3Dscript-data-escape-start-dash-state><span=
 class=3Dsecno>12.2.4.21 </span><dfn>Script data escape st=
art dash state</dfn></h5>
+
+  <p>Consume the <a href=3D#next-input-character>next input =
character</a>:</p>
+
+  <dl class=3Dswitch><dt>U+002D HYPHEN-MINUS (-)</dt>
+   <dd>Switch to the <a href=3D#script-data-escaped-dash-dash-s=
tate>script data escaped dash dash state</a>. Emit a U+002D HYPH=
EN-MINUS
+   character token.</dd>
+
+   <dt>Anything else</dt>
+   <dd>Switch to the <a href=3D#script-data-state>script dat=
a state</a>. Reconsume the <a href=3D#current-input-character&gt=
;current input
+   character</a>.</dd>
+
+  </dl><h5 id=3Dscript-data-escaped-state><span class=3Ds=
ecno>12.2.4.22 </span><dfn>Script data escaped state</d=
fn></h5>
+
+  <p>Consume the <a href=3D#next-input-character>next input =
character</a>:</p>
+
+  <dl class=3Dswitch><dt>U+002D HYPHEN-MINUS (-)</dt>
+   <dd>Switch to the <a href=3D#script-data-escaped-dash-state&=
gt;script data escaped dash state</a>. Emit a U+002D HYPHEN-MINUS
+   character token.</dd>
+
+   <dt>U+003C LESS-THAN SIGN (<)</dt>
+   <dd>Switch to the <a href=3D#script-data-escaped-less-than-s=
ign-state>script data escaped less-than sign state</a>.</dd&g=
t;
+
+   <dt>U+0000 NULL</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Emit a =
U+FFFD REPLACEMENT CHARACTER character token.</dd>
+
+   <dt>EOF</dt>
+   <dd>Switch to the <a href=3D#data-state>data state</a&=
gt;. <a href=3D#parse-error>Parse error</a>. Reconsume the EO=
F
+   character.</dd>
+
+   <dt>Anything else</dt>
+   <dd>Emit the <a href=3D#current-input-character>current i=
nput character</a> as a character token.</dd>
+
+  </dl><h5 id=3Dscript-data-escaped-dash-state><span clas=
s=3Dsecno>12.2.4.23 </span><dfn>Script data escaped dash s=
tate</dfn></h5>
+
+  <p>Consume the <a href=3D#next-input-character>next input =
character</a>:</p>
+
+  <dl class=3Dswitch><dt>U+002D HYPHEN-MINUS (-)</dt>
+   <dd>Switch to the <a href=3D#script-data-escaped-dash-dash-s=
tate>script data escaped dash dash state</a>. Emit a U+002D HYPH=
EN-MINUS
+   character token.</dd>
+
+   <dt>U+003C LESS-THAN SIGN (<)</dt>
+   <dd>Switch to the <a href=3D#script-data-escaped-less-than-s=
ign-state>script data escaped less-than sign state</a>.</dd&g=
t;
+
+   <dt>U+0000 NULL</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Switch =
to the <a href=3D#script-data-escaped-state>script data escaped sta=
te</a>. Emit a U+FFFD
+   REPLACEMENT CHARACTER character token.</dd>
+
+   <dt>EOF</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Switch =
to the <a href=3D#data-state>data state</a>. Reconsume the EO=
F
+   character.</dd>
+
+   <dt>Anything else</dt>
+   <dd>Switch to the <a href=3D#script-data-escaped-state>sc=
ript data escaped state</a>. Emit the <a href=3D#current-input-c=
haracter>current input
+   character</a> as a character token.</dd>
+
+  </dl><h5 id=3Dscript-data-escaped-dash-dash-state><span=
 class=3Dsecno>12.2.4.24 </span><dfn>Script data escaped d=
ash dash state</dfn></h5>
+
+  <p>Consume the <a href=3D#next-input-character>next input =
character</a>:</p>
+
+  <dl class=3Dswitch><dt>U+002D HYPHEN-MINUS (-)</dt>
+   <dd>Emit a U+002D HYPHEN-MINUS character token.</dd>
+
+   <dt>U+003C LESS-THAN SIGN (<)</dt>
+   <dd>Switch to the <a href=3D#script-data-escaped-less-than-s=
ign-state>script data escaped less-than sign state</a>.</dd&g=
t;
+
+   <dt>U+003E GREATER-THAN SIGN (>)</dt>
+   <dd>Switch to the <a href=3D#script-data-state>script dat=
a state</a>. Emit a U+003E GREATER-THAN SIGN character
+   token.</dd>
+
+   <dt>U+0000 NULL</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Switch =
to the <a href=3D#script-data-escaped-state>script data escaped sta=
te</a>. Emit a U+FFFD
+   REPLACEMENT CHARACTER character token.</dd>
+
+   <dt>EOF</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Switch =
to the <a href=3D#data-state>data state</a>. Reconsume the EO=
F
+   character.</dd>
+
+   <dt>Anything else</dt>
+   <dd>Switch to the <a href=3D#script-data-escaped-state>sc=
ript data escaped state</a>. Emit the <a href=3D#current-input-c=
haracter>current input
+   character</a> as a character token.</dd>
+
+  </dl><h5 id=3Dscript-data-escaped-less-than-sign-state>&lt=
;span class=3Dsecno>12.2.4.25 </span><dfn>Script data esca=
ped less-than sign state</dfn></h5>
+
+  <p>Consume the <a href=3D#next-input-character>next input =
character</a>:</p>
+
+  <dl class=3Dswitch><dt>U+002F SOLIDUS (/)</dt>
+   <dd>Set the <var><a href=3D#temporary-buffer>tempor=
ary buffer</a></var> to the empty string. Switch to the <a=
 href=3D#script-data-escaped-end-tag-open-state>script data
+   escaped end tag open state</a>.</dd>
+
+   <dt><a href=3D#uppercase-ascii-letters title=3D"upperca=
se ASCII letters">Uppercase ASCII letter</a></dt>
+   <dd>Set the <var><a href=3D#temporary-buffer>tempor=
ary buffer</a></var> to the empty string. Append the lowercas=
e version of the
+   <a href=3D#current-input-character>current input character</=
a> (add 0x0020 to the character's code point) to the
+   <var><a href=3D#temporary-buffer>temporary buffer</a&g=
t;</var>. Switch to the <a href=3D#script-data-double-escape-sta=
rt-state>script data double escape start state</a>.
+   Emit a U+003C LESS-THAN SIGN character token and the <a href=3D#cu=
rrent-input-character>current input character</a> as a
+   character token.</dd>
+
+   <dt><a href=3D#lowercase-ascii-letters title=3D"lowerca=
se ASCII letters">Lowercase ASCII letter</a></dt>
+   <dd>Set the <var><a href=3D#temporary-buffer>tempor=
ary buffer</a></var> to the empty string. Append the <a hr=
ef=3D#current-input-character>current input
+   character</a> to the <var><a href=3D#temporary-buffer&=
gt;temporary buffer</a></var>. Switch to the <a href=3D#sc=
ript-data-double-escape-start-state>script data double
+   escape start state</a>. Emit a U+003C LESS-THAN SIGN character =
token and the <a href=3D#current-input-character>current
+   input character</a> as a character token.</dd>
+
+   <dt>Anything else</dt>
+   <dd>Switch to the <a href=3D#script-data-escaped-state>sc=
ript data escaped state</a>. Emit a U+003C LESS-THAN SIGN character
+   token. Reconsume the <a href=3D#current-input-character>current=
 input character</a>.</dd>
+
+  </dl><h5 id=3Dscript-data-escaped-end-tag-open-state><s=
pan class=3Dsecno>12.2.4.26 </span><dfn>Script data escape=
d end tag open state</dfn></h5>
+
+  <p>Consume the <a href=3D#next-input-character>next input =
character</a>:</p>
+
+  <dl class=3Dswitch><dt><a href=3D#uppercase-ascii-lette=
rs title=3D"uppercase ASCII letters">Uppercase ASCII letter&=
lt;/a></dt>
+   <dd>Create a new end tag token, and set its tag name to the low=
ercase version of the
+   <a href=3D#current-input-character>current input character</=
a> (add 0x0020 to the character's code point). Append the
+   <a href=3D#current-input-character>current input character</=
a> to the <var><a href=3D#temporary-buffer>temporary buffe=
r</a></var>. Finally, switch to the
+   <a href=3D#script-data-escaped-end-tag-name-state>script data e=
scaped end tag name state</a>. (Don't emit the token yet; further d=
etails
+   will be filled in before it is emitted.)</dd>
+
+   <dt><a href=3D#lowercase-ascii-letters title=3D"lowerca=
se ASCII letters">Lowercase ASCII letter</a></dt>
+   <dd>Create a new end tag token, and set its tag name to the &lt=
;a href=3D#current-input-character>current input character</a>.
+   Append the <a href=3D#current-input-character>current input cha=
racter</a> to the <var><a href=3D#temporary-buffer>temp=
orary buffer</a></var>. Finally,
+   switch to the <a href=3D#script-data-escaped-end-tag-name-state&gt=
;script data escaped end tag name state</a>. (Don't emit the token =
yet;
+   further details will be filled in before it is emitted.)</dd>
+
+   <dt>Anything else</dt>
+   <dd>Switch to the <a href=3D#script-data-escaped-state>sc=
ript data escaped state</a>. Emit a U+003C LESS-THAN SIGN character
+   token and a U+002F SOLIDUS character token. Reconsume the <a href=3D=
#current-input-character>current input
+   character</a>.</dd>
+
+  </dl><h5 id=3Dscript-data-escaped-end-tag-name-state><s=
pan class=3Dsecno>12.2.4.27 </span><dfn>Script data escape=
d end tag name state</dfn></h5>
+
+  <p>Consume the <a href=3D#next-input-character>next input =
character</a>:</p>
+
+  <dl class=3Dswitch><dt>U+0009 CHARACTER TABULATION (tab)&l=
t;/dt>
+   <dt>U+000A LINE FEED (LF)</dt>
+   <dt>U+000C FORM FEED (FF)</dt>
+   <!--<dt>U+000D CARRIAGE RETURN (CR)</dt>-->
+   <dt>U+0020 SPACE</dt>
+   <dd>If the current end tag token is an <a href=3D#appropriat=
e-end-tag-token>appropriate end tag token</a>, then switch to th=
e
+   <a href=3D#before-attribute-name-state>before attribute name st=
ate</a>. Otherwise, treat it as per the "anything else" e=
ntry
+   below.</dd>
+
+   <dt>U+002F SOLIDUS (/)</dt>
+   <dd>If the current end tag token is an <a href=3D#appropriat=
e-end-tag-token>appropriate end tag token</a>, then switch to th=
e
+   <a href=3D#self-closing-start-tag-state>self-closing start tag =
state</a>. Otherwise, treat it as per the "anything else"=
 entry
+   below.</dd>
+
+   <dt>U+003E GREATER-THAN SIGN (>)</dt>
+   <dd>If the current end tag token is an <a href=3D#appropriat=
e-end-tag-token>appropriate end tag token</a>, then switch to th=
e
+   <a href=3D#data-state>data state</a> and emit the current=
 tag token. Otherwise, treat it as per the "anything
+   else" entry below.</dd>
+
+   <dt><a href=3D#uppercase-ascii-letters title=3D"upperca=
se ASCII letters">Uppercase ASCII letter</a></dt>
+   <dd>Append the lowercase version of the <a href=3D#current-i=
nput-character>current input character</a> (add 0x0020 to the
+   character's code point) to the current tag token's tag name. Append t=
he <a href=3D#current-input-character>current input
+   character</a> to the <var><a href=3D#temporary-buffer&=
gt;temporary buffer</a></var>.</dd>
+
+   <dt><a href=3D#lowercase-ascii-letters title=3D"lowerca=
se ASCII letters">Lowercase ASCII letter</a></dt>
+   <dd>Append the <a href=3D#current-input-character>current=
 input character</a> to the current tag token's tag name. Append
+   the <a href=3D#current-input-character>current input character&=
lt;/a> to the <var><a href=3D#temporary-buffer>temporary b=
uffer</a></var>.</dd>
+
+   <dt>Anything else</dt>
+   <dd>Switch to the <a href=3D#script-data-escaped-state>sc=
ript data escaped state</a>. Emit a U+003C LESS-THAN SIGN character
+   token, a U+002F SOLIDUS character token, and a character token for ea=
ch of the characters in the
+   <var><a href=3D#temporary-buffer>temporary buffer</a&g=
t;</var> (in the order they were added to the buffer). Reconsume th=
e
+   <a href=3D#current-input-character>current input character</=
a>.</dd>
+
+  </dl><h5 id=3Dscript-data-double-escape-start-state><sp=
an class=3Dsecno>12.2.4.28 </span><dfn>Script data double =
escape start state</dfn></h5>
+
+  <p>Consume the <a href=3D#next-input-character>next input =
character</a>:</p>
+
+  <dl class=3Dswitch><dt>U+0009 CHARACTER TABULATION (tab)&l=
t;/dt>
+   <dt>U+000A LINE FEED (LF)</dt>
+   <dt>U+000C FORM FEED (FF)</dt>
+   <!--<dt>U+000D CARRIAGE RETURN (CR)</dt>-->
+   <dt>U+0020 SPACE</dt>
+   <dt>U+002F SOLIDUS (/)</dt>
+   <dt>U+003E GREATER-THAN SIGN (>)</dt>
+   <dd>If the <var><a href=3D#temporary-buffer>tempora=
ry buffer</a></var> is the string "<code title=3D&quo=
t;">script</code>", then switch
+   to the <a href=3D#script-data-double-escaped-state>script data =
double escaped state</a>. Otherwise, switch to the <a href=3D#sc=
ript-data-escaped-state>script data
+   escaped state</a>. Emit the <a href=3D#current-input-charact=
er>current input character</a> as a character token.</dd>
+
+   <dt><a href=3D#uppercase-ascii-letters title=3D"upperca=
se ASCII letters">Uppercase ASCII letter</a></dt>
+   <dd>Append the lowercase version of the <a href=3D#current-i=
nput-character>current input character</a> (add 0x0020 to the
+   character's code point) to the <var><a href=3D#temporary-buf=
fer>temporary buffer</a></var>. Emit the <a href=3D#cur=
rent-input-character>current input
+   character</a> as a character token.</dd>
+
+   <dt><a href=3D#lowercase-ascii-letters title=3D"lowerca=
se ASCII letters">Lowercase ASCII letter</a></dt>
+   <dd>Append the <a href=3D#current-input-character>current=
 input character</a> to the <var><a href=3D#temporary-buff=
er>temporary buffer</a></var>. Emit the
+   <a href=3D#current-input-character>current input character</=
a> as a character token.</dd>
+
+   <dt>Anything else</dt>
+   <dd>Switch to the <a href=3D#script-data-escaped-state>sc=
ript data escaped state</a>. Reconsume the <a href=3D#current-in=
put-character>current input
+   character</a>.</dd>
+
+  </dl><h5 id=3Dscript-data-double-escaped-state><span cl=
ass=3Dsecno>12.2.4.29 </span><dfn>Script data double escap=
ed state</dfn></h5>
+
+  <p>Consume the <a href=3D#next-input-character>next input =
character</a>:</p>
+
+  <dl class=3Dswitch><dt>U+002D HYPHEN-MINUS (-)</dt>
+   <dd>Switch to the <a href=3D#script-data-double-escaped-dash=
-state>script data double escaped dash state</a>. Emit a U+002D =
HYPHEN-MINUS
+   character token.</dd>
+
+   <dt>U+003C LESS-THAN SIGN (<)</dt>
+   <dd>Switch to the <a href=3D#script-data-double-escaped-less=
-than-sign-state>script data double escaped less-than sign state</a=
>. Emit a U+003C
+   LESS-THAN SIGN character token.</dd>
+
+   <dt>U+0000 NULL</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Emit a =
U+FFFD REPLACEMENT CHARACTER character token.</dd>
+
+   <dt>EOF</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Switch =
to the <a href=3D#data-state>data state</a>. Reconsume the EO=
F
+   character.</dd>
+
+   <dt>Anything else</dt>
+   <dd>Emit the <a href=3D#current-input-character>current i=
nput character</a> as a character token.</dd>
+
+  </dl><h5 id=3Dscript-data-double-escaped-dash-state><sp=
an class=3Dsecno>12.2.4.30 </span><dfn>Script data double =
escaped dash state</dfn></h5>
+
+  <p>Consume the <a href=3D#next-input-character>next input =
character</a>:</p>
+
+  <dl class=3Dswitch><dt>U+002D HYPHEN-MINUS (-)</dt>
+   <dd>Switch to the <a href=3D#script-data-double-escaped-dash=
-dash-state>script data double escaped dash dash state</a>. Emit=
 a U+002D
+   HYPHEN-MINUS character token.</dd>
+
+   <dt>U+003C LESS-THAN SIGN (<)</dt>
+   <dd>Switch to the <a href=3D#script-data-double-escaped-less=
-than-sign-state>script data double escaped less-than sign state</a=
>. Emit a U+003C
+   LESS-THAN SIGN character token.</dd>
+
+   <dt>U+0000 NULL</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Switch =
to the <a href=3D#script-data-double-escaped-state>script data doub=
le escaped state</a>. Emit a
+   U+FFFD REPLACEMENT CHARACTER character token.</dd>
+
+   <dt>EOF</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Switch =
to the <a href=3D#data-state>data state</a>. Reconsume the EO=
F
+   character.</dd>
+
+   <dt>Anything else</dt>
+   <dd>Switch to the <a href=3D#script-data-double-escaped-stat=
e>script data double escaped state</a>. Emit the <a href=3D#c=
urrent-input-character>current input
+   character</a> as a character token.</dd>
+
+  </dl><h5 id=3Dscript-data-double-escaped-dash-dash-state>&=
lt;span class=3Dsecno>12.2.4.31 </span><dfn>Script data do=
uble escaped dash dash state</dfn></h5>
+
+  <p>Consume the <a href=3D#next-input-character>next input =
character</a>:</p>
+
+  <dl class=3Dswitch><dt>U+002D HYPHEN-MINUS (-)</dt>
+   <dd>Emit a U+002D HYPHEN-MINUS character token.</dd>
+
+   <dt>U+003C LESS-THAN SIGN (<)</dt>
+   <dd>Switch to the <a href=3D#script-data-double-escaped-less=
-than-sign-state>script data double escaped less-than sign state</a=
>. Emit a U+003C
+   LESS-THAN SIGN character token.</dd>
+
+   <dt>U+003E GREATER-THAN SIGN (>)</dt>
+   <dd>Switch to the <a href=3D#script-data-state>script dat=
a state</a>. Emit a U+003E GREATER-THAN SIGN character
+   token.</dd>
+
+   <dt>U+0000 NULL</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Switch =
to the <a href=3D#script-data-double-escaped-state>script data doub=
le escaped state</a>. Emit a
+   U+FFFD REPLACEMENT CHARACTER character token.</dd>
+
+   <dt>EOF</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Switch =
to the <a href=3D#data-state>data state</a>. Reconsume the EO=
F
+   character.</dd>
+
+   <dt>Anything else</dt>
+   <dd>Switch to the <a href=3D#script-data-double-escaped-stat=
e>script data double escaped state</a>. Emit the <a href=3D#c=
urrent-input-character>current input
+   character</a> as a character token.</dd>
+
+  </dl><h5 id=3Dscript-data-double-escaped-less-than-sign-state=
><span class=3Dsecno>12.2.4.32 </span><dfn>Script da=
ta double escaped less-than sign state</dfn></h5>
+
+  <p>Consume the <a href=3D#next-input-character>next input =
character</a>:</p>
+
+  <dl class=3Dswitch><dt>U+002F SOLIDUS (/)</dt>
+   <dd>Set the <var><a href=3D#temporary-buffer>tempor=
ary buffer</a></var> to the empty string. Switch to the <a=
 href=3D#script-data-double-escape-end-state>script data
+   double escape end state</a>. Emit a U+002F SOLIDUS character to=
ken.</dd>
+
+   <dt>Anything else</dt>
+   <dd>Switch to the <a href=3D#script-data-double-escaped-stat=
e>script data double escaped state</a>. Reconsume the <a href=
=3D#current-input-character>current
+   input character</a>.</dd>
+
+  </dl><h5 id=3Dscript-data-double-escape-end-state><span=
 class=3Dsecno>12.2.4.33 </span><dfn>Script data double es=
cape end state</dfn></h5>
+
+  <p>Consume the <a href=3D#next-input-character>next input =
character</a>:</p>
+
+  <dl class=3Dswitch><dt>U+0009 CHARACTER TABULATION (tab)&l=
t;/dt>
+   <dt>U+000A LINE FEED (LF)</dt>
+   <dt>U+000C FORM FEED (FF)</dt>
+   <!--<dt>U+000D CARRIAGE RETURN (CR)</dt>-->
+   <dt>U+0020 SPACE</dt>
+   <dt>U+002F SOLIDUS (/)</dt>
+   <dt>U+003E GREATER-THAN SIGN (>)</dt>
+   <dd>If the <var><a href=3D#temporary-buffer>tempora=
ry buffer</a></var> is the string "<code title=3D&quo=
t;">script</code>", then switch
+   to the <a href=3D#script-data-escaped-state>script data escaped=
 state</a>. Otherwise, switch to the <a href=3D#script-data-doub=
le-escaped-state>script data double
+   escaped state</a>. Emit the <a href=3D#current-input-charact=
er>current input character</a> as a character token.</dd>
+
+   <dt><a href=3D#uppercase-ascii-letters title=3D"upperca=
se ASCII letters">Uppercase ASCII letter</a></dt>
+   <dd>Append the lowercase version of the <a href=3D#current-i=
nput-character>current input character</a> (add 0x0020 to the
+   character's code point) to the <var><a href=3D#temporary-buf=
fer>temporary buffer</a></var>. Emit the <a href=3D#cur=
rent-input-character>current input
+   character</a> as a character token.</dd>
+
+   <dt><a href=3D#lowercase-ascii-letters title=3D"lowerca=
se ASCII letters">Lowercase ASCII letter</a></dt>
+   <dd>Append the <a href=3D#current-input-character>current=
 input character</a> to the <var><a href=3D#temporary-buff=
er>temporary buffer</a></var>. Emit the
+   <a href=3D#current-input-character>current input character</=
a> as a character token.</dd>
+
+   <dt>Anything else</dt>
+   <dd>Switch to the <a href=3D#script-data-double-escaped-stat=
e>script data double escaped state</a>. Reconsume the <a href=
=3D#current-input-character>current
+   input character</a>.</dd>
+
+  </dl><h5 id=3Dbefore-attribute-name-state><span class=3D=
secno>12.2.4.34 </span><dfn>Before attribute name state&lt=
;/dfn></h5>
+
+  <p>Consume the <a href=3D#next-input-character>next input =
character</a>:</p>
+
+  <dl class=3Dswitch><dt>U+0009 CHARACTER TABULATION (tab)&l=
t;/dt>
+   <dt>U+000A LINE FEED (LF)</dt>
+   <dt>U+000C FORM FEED (FF)</dt>
+   <!--<dt>U+000D CARRIAGE RETURN (CR)</dt>-->
+   <dt>U+0020 SPACE</dt>
+   <dd>Ignore the character.</dd>
+
+   <dt>U+002F SOLIDUS (/)</dt>
+   <dd>Switch to the <a href=3D#self-closing-start-tag-state&gt=
;self-closing start tag state</a>.</dd>
+
+   <dt>U+003E GREATER-THAN SIGN (>)</dt>
+   <dd>Switch to the <a href=3D#data-state>data state</a&=
gt;. Emit the current tag token.</dd>
+
+   <dt><a href=3D#uppercase-ascii-letters title=3D"upperca=
se ASCII letters">Uppercase ASCII letter</a></dt>
+   <dd>Start a new attribute in the current tag token. Set that at=
tribute's name to the lowercase
+   version of the <a href=3D#current-input-character>current input=
 character</a> (add 0x0020 to the character's code point),
+   and its value to the empty string. Switch to the <a href=3D#attrib=
ute-name-state>attribute name state</a>.</dd>
+
+   <dt>U+0000 NULL</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Start a=
 new attribute in the current tag token. Set that
+   attribute's name to a U+FFFD REPLACEMENT CHARACTER character, and its=
 value to the empty string.
+   Switch to the <a href=3D#attribute-name-state>attribute name st=
ate</a>.</dd>
+
+   <dt>U+0022 QUOTATION MARK (")</dt>
+   <dt>U+0027 APOSTROPHE (')</dt>
+   <dt>U+003C LESS-THAN SIGN (<)</dt>
+   <dt>U+003D EQUALS SIGN (=3D)</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Treat i=
t as per the "anything else" entry below.</dd>
+
+   <dt>EOF</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Switch =
to the <a href=3D#data-state>data state</a>. Reconsume the EO=
F
+   character.</dd>
+
+   <dt>Anything else</dt>
+   <dd>Start a new attribute in the current tag token. Set that at=
tribute's name to the
+   <a href=3D#current-input-character>current input character</=
a>, and its value to the empty string. Switch to the
+   <a href=3D#attribute-name-state>attribute name state</a>.=
</dd>
+
+  </dl><h5 id=3Dattribute-name-state><span class=3Dsecno&=
gt;12.2.4.35 </span><dfn>Attribute name state</dfn><=
/h5>
+
+  <p>Consume the <a href=3D#next-input-character>next input =
character</a>:</p>
+
+  <dl class=3Dswitch><dt>U+0009 CHARACTER TABULATION (tab)&l=
t;/dt>
+   <dt>U+000A LINE FEED (LF)</dt>
+   <dt>U+000C FORM FEED (FF)</dt>
+   <!--<dt>U+000D CARRIAGE RETURN (CR)</dt>-->
+   <dt>U+0020 SPACE</dt>
+   <dd>Switch to the <a href=3D#after-attribute-name-state>a=
fter attribute name state</a>.</dd>
+
+   <dt>U+002F SOLIDUS (/)</dt>
+   <dd>Switch to the <a href=3D#self-closing-start-tag-state&gt=
;self-closing start tag state</a>.</dd>
+
+   <dt>U+003D EQUALS SIGN (=3D)</dt>
+   <dd>Switch to the <a href=3D#before-attribute-value-state&gt=
;before attribute value state</a>.</dd>
+
+   <dt>U+003E GREATER-THAN SIGN (>)</dt>
+   <dd>Switch to the <a href=3D#data-state>data state</a&=
gt;. Emit the current tag token.</dd>
+
+   <dt><a href=3D#uppercase-ascii-letters title=3D"upperca=
se ASCII letters">Uppercase ASCII letter</a></dt>
+   <dd>Append the lowercase version of the <a href=3D#current-i=
nput-character>current input character</a> (add 0x0020 to the
+   character's code point) to the current attribute's name.</dd>
+
+   <dt>U+0000 NULL</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Append =
a U+FFFD REPLACEMENT CHARACTER character to the current
+   attribute's name.</dd>
+
+   <dt>U+0022 QUOTATION MARK (")</dt>
+   <dt>U+0027 APOSTROPHE (')</dt>
+   <dt>U+003C LESS-THAN SIGN (<)</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Treat i=
t as per the "anything else" entry below.</dd>
+
+   <dt>EOF</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Switch =
to the <a href=3D#data-state>data state</a>. Reconsume the EO=
F
+   character.</dd>
+
+   <dt>Anything else</dt>
+   <dd>Append the <a href=3D#current-input-character>current=
 input character</a> to the current attribute's name.</dd>
+
+  </dl><p>When the user agent leaves the attribute name stat=
e (and before emitting the tag token, if
+  appropriate), the complete attribute's name must be compared to the ot=
her attributes on the same
+  token; if there is already an attribute on the token with the exact sa=
me name, then this is a
+  <a href=3D#parse-error>parse error</a> and the new attribu=
te must be removed from the token.</p>
+
+  <p class=3Dnote>If an attribute is so removed from a token, it, =
along with the value that gets
+  associated with it, if any, are never subsequently used by the parser,=
 and are therefore
+  effectively discarded. Removing the attribute in this way does not cha=
nge its status as the
+  "current attribute" for the purposes of the tokenizer, howev=
er.</p>
+
+
+  <h5 id=3Dafter-attribute-name-state><span class=3Dsecno>12=
.2.4.36 </span><dfn>After attribute name state</dfn>&lt=
;/h5>
+
+  <p>Consume the <a href=3D#next-input-character>next input =
character</a>:</p>
+
+  <dl class=3Dswitch><dt>U+0009 CHARACTER TABULATION (tab)&l=
t;/dt>
+   <dt>U+000A LINE FEED (LF)</dt>
+   <dt>U+000C FORM FEED (FF)</dt>
+   <!--<dt>U+000D CARRIAGE RETURN (CR)</dt>-->
+   <dt>U+0020 SPACE</dt>
+   <dd>Ignore the character.</dd>
+
+   <dt>U+002F SOLIDUS (/)</dt>
+   <dd>Switch to the <a href=3D#self-closing-start-tag-state&gt=
;self-closing start tag state</a>.</dd>
+
+   <dt>U+003D EQUALS SIGN (=3D)</dt>
+   <dd>Switch to the <a href=3D#before-attribute-value-state&gt=
;before attribute value state</a>.</dd>
+
+   <dt>U+003E GREATER-THAN SIGN (>)</dt>
+   <dd>Switch to the <a href=3D#data-state>data state</a&=
gt;. Emit the current tag token.</dd>
+
+   <dt><a href=3D#uppercase-ascii-letters title=3D"upperca=
se ASCII letters">Uppercase ASCII letter</a></dt>
+   <dd>Start a new attribute in the current tag token. Set that at=
tribute's name to the lowercase
+   version of the <a href=3D#current-input-character>current input=
 character</a> (add 0x0020 to the character's code point),
+   and its value to the empty string. Switch to the <a href=3D#attrib=
ute-name-state>attribute name state</a>.</dd>
+
+   <dt>U+0000 NULL</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Start a=
 new attribute in the current tag token. Set that
+   attribute's name to a U+FFFD REPLACEMENT CHARACTER character, and its=
 value to the empty string.
+   Switch to the <a href=3D#attribute-name-state>attribute name st=
ate</a>.</dd>
+
+   <dt>U+0022 QUOTATION MARK (")</dt>
+   <dt>U+0027 APOSTROPHE (')</dt>
+   <dt>U+003C LESS-THAN SIGN (<)</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Treat i=
t as per the "anything else" entry below.</dd>
+
+   <dt>EOF</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Switch =
to the <a href=3D#data-state>data state</a>. Reconsume the EO=
F
+   character.</dd>
+
+   <dt>Anything else</dt>
+   <dd>Start a new attribute in the current tag token. Set that at=
tribute's name to the
+   <a href=3D#current-input-character>current input character</=
a>, and its value to the empty string. Switch to the
+   <a href=3D#attribute-name-state>attribute name state</a>.=
</dd>
+
+  </dl><h5 id=3Dbefore-attribute-value-state><span class=3D=
secno>12.2.4.37 </span><dfn>Before attribute value state&l=
t;/dfn></h5>
+
+  <p>Consume the <a href=3D#next-input-character>next input =
character</a>:</p>
+
+  <dl class=3Dswitch><dt>U+0009 CHARACTER TABULATION (tab)&l=
t;/dt>
+   <dt>U+000A LINE FEED (LF)</dt>
+   <dt>U+000C FORM FEED (FF)</dt>
+   <!--<dt>U+000D CARRIAGE RETURN (CR)</dt>-->
+   <dt>U+0020 SPACE</dt>
+   <dd>Ignore the character.</dd>
+
+   <dt>U+0022 QUOTATION MARK (")</dt>
+   <dd>Switch to the <a href=3D#attribute-value-(double-quoted)=
-state>attribute value (double-quoted) state</a>.</dd>
+
+   <dt>U+0026 AMPERSAND (&)</dt>
+   <dd>Switch to the <a href=3D#attribute-value-(unquoted)-stat=
e>attribute value (unquoted) state</a>. Reconsume the <a href=
=3D#current-input-character>current
+   input character</a>.</dd>
+
+   <dt>U+0027 APOSTROPHE (')</dt>
+   <dd>Switch to the <a href=3D#attribute-value-(single-quoted)=
-state>attribute value (single-quoted) state</a>.</dd>
+
+   <dt>U+0000 NULL</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Append =
a U+FFFD REPLACEMENT CHARACTER character to the current
+   attribute's value. Switch to the <a href=3D#attribute-value-(unquo=
ted)-state>attribute value (unquoted) state</a>.</dd>
+
+   <dt>U+003E GREATER-THAN SIGN (>)</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Switch =
to the <a href=3D#data-state>data state</a>. Emit the current=
 tag
+   token.</dd>
+
+   <dt>U+003C LESS-THAN SIGN (<)</dt>
+   <dt>U+003D EQUALS SIGN (=3D)</dt>
+   <dt>U+0060 GRAVE ACCENT (`)</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Treat i=
t as per the "anything else" entry below.</dd>
+
+   <dt>EOF</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Switch =
to the <a href=3D#data-state>data state</a>. Reconsume the EO=
F
+   character.</dd>
+
+   <dt>Anything else</dt>
+   <dd>Append the <a href=3D#current-input-character>current=
 input character</a> to the current attribute's value. Switch to
+   the <a href=3D#attribute-value-(unquoted)-state>attribute value=
 (unquoted) state</a>.</dd>
+
+  </dl><h5 id=3Dattribute-value-(double-quoted)-state><sp=
an class=3Dsecno>12.2.4.38 </span><dfn>Attribute value (do=
uble-quoted) state</dfn></h5>
+
+  <p>Consume the <a href=3D#next-input-character>next input =
character</a>:</p>
+
+  <dl class=3Dswitch><dt>U+0022 QUOTATION MARK (")</=
dt>
+   <dd>Switch to the <a href=3D#after-attribute-value-(quoted)-=
state>after attribute value (quoted) state</a>.</dd>
+
+   <dt>U+0026 AMPERSAND (&)</dt>
+   <dd>Switch to the <a href=3D#character-reference-in-attribut=
e-value-state>character reference in attribute value state</a>, =
with the
+   <a href=3D#additional-allowed-character>additional allowed char=
acter</a> being U+0022 QUOTATION MARK (").</dd>
+
+   <dt>U+0000 NULL</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Append =
a U+FFFD REPLACEMENT CHARACTER character to the current
+   attribute's value.</dd>
+
+   <dt>EOF</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Switch =
to the <a href=3D#data-state>data state</a>. Reconsume the EO=
F
+   character.</dd>
+
+   <dt>Anything else</dt>
+   <dd>Append the <a href=3D#current-input-character>current=
 input character</a> to the current attribute's value.</dd>
+
+  </dl><h5 id=3Dattribute-value-(single-quoted)-state><sp=
an class=3Dsecno>12.2.4.39 </span><dfn>Attribute value (si=
ngle-quoted) state</dfn></h5>
+
+  <p>Consume the <a href=3D#next-input-character>next input =
character</a>:</p>
+
+  <dl class=3Dswitch><dt>U+0027 APOSTROPHE (')</dt>
+   <dd>Switch to the <a href=3D#after-attribute-value-(quoted)-=
state>after attribute value (quoted) state</a>.</dd>
+
+   <dt>U+0026 AMPERSAND (&)</dt>
+   <dd>Switch to the <a href=3D#character-reference-in-attribut=
e-value-state>character reference in attribute value state</a>, =
with the
+   <a href=3D#additional-allowed-character>additional allowed char=
acter</a> being U+0027 APOSTROPHE (').</dd>
+
+   <dt>U+0000 NULL</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Append =
a U+FFFD REPLACEMENT CHARACTER character to the current
+   attribute's value.</dd>
+
+   <dt>EOF</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Switch =
to the <a href=3D#data-state>data state</a>. Reconsume the EO=
F
+   character.</dd>
+
+   <dt>Anything else</dt>
+   <dd>Append the <a href=3D#current-input-character>current=
 input character</a> to the current attribute's value.</dd>
+
+  </dl><h5 id=3Dattribute-value-(unquoted)-state><span cl=
ass=3Dsecno>12.2.4.40 </span><dfn>Attribute value (unquote=
d) state</dfn></h5>
+
+  <p>Consume the <a href=3D#next-input-character>next input =
character</a>:</p>
+
+  <dl class=3Dswitch><dt>U+0009 CHARACTER TABULATION (tab)&l=
t;/dt>
+   <dt>U+000A LINE FEED (LF)</dt>
+   <dt>U+000C FORM FEED (FF)</dt>
+   <!--<dt>U+000D CARRIAGE RETURN (CR)</dt>-->
+   <dt>U+0020 SPACE</dt>
+   <dd>Switch to the <a href=3D#before-attribute-name-state>=
before attribute name state</a>.</dd>
+
+   <dt>U+0026 AMPERSAND (&)</dt>
+   <dd>Switch to the <a href=3D#character-reference-in-attribut=
e-value-state>character reference in attribute value state</a>, =
with the
+   <a href=3D#additional-allowed-character>additional allowed char=
acter</a> being U+003E GREATER-THAN SIGN (>).</dd>
+
+   <dt>U+003E GREATER-THAN SIGN (>)</dt>
+   <dd>Switch to the <a href=3D#data-state>data state</a&=
gt;. Emit the current tag token.</dd>
+
+   <dt>U+0000 NULL</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Append =
a U+FFFD REPLACEMENT CHARACTER character to the current
+   attribute's value.</dd>
+
+   <dt>U+0022 QUOTATION MARK (")</dt>
+   <dt>U+0027 APOSTROPHE (')</dt>
+   <dt>U+003C LESS-THAN SIGN (<)</dt>
+   <dt>U+003D EQUALS SIGN (=3D)</dt>
+   <dt>U+0060 GRAVE ACCENT (`)</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Treat i=
t as per the "anything else" entry below.</dd>
+
+   <dt>EOF</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Switch =
to the <a href=3D#data-state>data state</a>. Reconsume the EO=
F
+   character.</dd>
+
+   <dt>Anything else</dt>
+   <dd>Append the <a href=3D#current-input-character>current=
 input character</a> to the current attribute's value.</dd>
+
+  </dl><h5 id=3Dcharacter-reference-in-attribute-value-state&gt=
;<span class=3Dsecno>12.2.4.41 </span><dfn>Character re=
ference in attribute value state</dfn></h5>
+
+  <p>Attempt to <a href=3D#consume-a-character-reference>con=
sume a character reference</a>.</p>
+
+  <p>If nothing is returned, append a U+0026 AMPERSAND character (=
&) to the current attribute's
+  value.</p>
+
+  <p>Otherwise, append the returned character tokens to the curren=
t attribute's value.</p>
+
+  <p>Finally, switch back to the attribute value state that switch=
ed into this state.</p>
+
+
+  <h5 id=3Dafter-attribute-value-(quoted)-state><span class=3Ds=
ecno>12.2.4.42 </span><dfn>After attribute value (quoted) =
state</dfn></h5>
+
+  <p>Consume the <a href=3D#next-input-character>next input =
character</a>:</p>
+
+  <dl class=3Dswitch><dt>U+0009 CHARACTER TABULATION (tab)&l=
t;/dt>
+   <dt>U+000A LINE FEED (LF)</dt>
+   <dt>U+000C FORM FEED (FF)</dt>
+   <!--<dt>U+000D CARRIAGE RETURN (CR)</dt>-->
+   <dt>U+0020 SPACE</dt>
+   <dd>Switch to the <a href=3D#before-attribute-name-state>=
before attribute name state</a>.</dd>
+
+   <dt>U+002F SOLIDUS (/)</dt>
+   <dd>Switch to the <a href=3D#self-closing-start-tag-state&gt=
;self-closing start tag state</a>.</dd>
+
+   <dt>U+003E GREATER-THAN SIGN (>)</dt>
+   <dd>Switch to the <a href=3D#data-state>data state</a&=
gt;. Emit the current tag token.</dd>
+
+   <dt>EOF</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Switch =
to the <a href=3D#data-state>data state</a>. Reconsume the EO=
F
+   character.</dd>
+
+   <dt>Anything else</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Switch =
to the <a href=3D#before-attribute-name-state>before attribute name=
 state</a>. Reconsume
+   the character.</dd>
+
+  </dl><h5 id=3Dself-closing-start-tag-state><span class=3D=
secno>12.2.4.43 </span><dfn>Self-closing start tag state&l=
t;/dfn></h5>
+
+  <p>Consume the <a href=3D#next-input-character>next input =
character</a>:</p>
+
+  <dl class=3Dswitch><dt>U+003E GREATER-THAN SIGN (>)=
</dt>
+   <dd>Set the <i>self-closing flag</i> of the current=
 tag token. Switch to the <a href=3D#data-state>data
+   state</a>. Emit the current tag token.</dd>
+
+   <dt>EOF</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Switch =
to the <a href=3D#data-state>data state</a>. Reconsume the EO=
F
+   character.</dd>
+
+   <dt>Anything else</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Switch =
to the <a href=3D#before-attribute-name-state>before attribute name=
 state</a>. Reconsume
+   the character.</dd>
+
+  </dl><h5 id=3Dbogus-comment-state><span class=3Dsecno&g=
t;12.2.4.44 </span><dfn>Bogus comment state</dfn></h=
5>
+
+  <p>Consume every character up to and including the first U+003E =
GREATER-THAN SIGN character (>)
+  or the end of the file (EOF), whichever comes first. Emit a comment to=
ken whose data is the
+  concatenation of all the characters starting from and including the ch=
aracter that caused the
+  state machine to switch into the bogus comment state, up to and includ=
ing the character
+  immediately before the last consumed character (i.e. up to the charact=
er just before the U+003E or
+  EOF character), but with any U+0000 NULL characters replaced by U+FFFD=
 REPLACEMENT CHARACTER
+  characters. (If the comment was started by the end of the file (EOF), =
the token is empty.
+  Similarly, the token is empty if it was generated by the string "=
<code title=3D""><!></code>".)&l=
t;/p>
+
+  <p>Switch to the <a href=3D#data-state>data state</a&gt=
;.</p>
+
+  <p>If the end of the file was reached, reconsume the EOF charact=
er.</p>
+
+
+  <h5 id=3Dmarkup-declaration-open-state><span class=3Dsecno&gt=
;12.2.4.45 </span><dfn>Markup declaration open state</dfn&=
gt;</h5>
+
+  <p>If the next two characters are both U+002D HYPHEN-MINUS chara=
cters (-), consume those two
+  characters, create a comment token whose data is the empty string, and=
 switch to the <a href=3D#comment-start-state>comment
+  start state</a>.</p>
+
+  <p>Otherwise, if the next seven characters are an <a href=3D#=
ascii-case-insensitive>ASCII case-insensitive</a> match for
+  the word "DOCTYPE", then consume those characters and switch=
 to the <a href=3D#doctype-state>DOCTYPE
+  state</a>.</p>
+
+  <p>Otherwise, if there is an <a href=3D#adjusted-current-node=
>adjusted current node</a> and it is not an element in the
+  <a href=3D#html-namespace-0>HTML namespace</a> and the nex=
t seven characters are a <a href=3D#case-sensitive>case-sensitive&l=
t;/a> match
+  for the string "[CDATA[" (the five uppercase letters "C=
DATA" with a U+005B LEFT SQUARE BRACKET
+  character before and after), then consume those characters and switch =
to the <a href=3D#cdata-section-state>CDATA section
+  state</a>.</p>
+
+  <p>Otherwise, this is a <a href=3D#parse-error>parse error=
</a>. Switch to the <a href=3D#bogus-comment-state>bogus comm=
ent state</a>.
+  The next character that is consumed, if any, is the first character th=
at will be in the
+  comment.</p>
+
+
+  <h5 id=3Dcomment-start-state><span class=3Dsecno>12.2.4.46=
 </span><dfn>Comment start state</dfn></h5>
+
+  <p>Consume the <a href=3D#next-input-character>next input =
character</a>:</p>
+
+  <dl class=3Dswitch><dt>U+002D HYPHEN-MINUS (-)</dt>
+   <dd>Switch to the <a href=3D#comment-start-dash-state>com=
ment start dash state</a>.</dd>
+
+   <dt>U+0000 NULL</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Append =
a U+FFFD REPLACEMENT CHARACTER character to the comment
+   token's data. Switch to the <a href=3D#comment-state>comment st=
ate</a>.</dd>
+
+   <dt>U+003E GREATER-THAN SIGN (>)</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Switch =
to the <a href=3D#data-state>data state</a>. Emit the comment=
 token.</dd>
+   <!-- see comment in comment end state -->
+
+   <dt>EOF</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Switch =
to the <a href=3D#data-state>data state</a>. Emit the comment=
 token.
+   Reconsume the EOF character.</dd>
+
+   <dt>Anything else</dt>
+   <dd>Append the <a href=3D#current-input-character>current=
 input character</a> to the comment token's data. Switch to the
+   <a href=3D#comment-state>comment state</a>.</dd>
+
+  </dl><h5 id=3Dcomment-start-dash-state><span class=3Dse=
cno>12.2.4.47 </span><dfn>Comment start dash state</dfn=
></h5>
+
+  <p>Consume the <a href=3D#next-input-character>next input =
character</a>:</p>
+
+  <dl class=3Dswitch><dt>U+002D HYPHEN-MINUS (-)</dt>
+   <dd>Switch to the <a href=3D#comment-end-state>comment en=
d state</a></dd>
+
+   <dt>U+0000 NULL</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Append =
a U+002D HYPHEN-MINUS character (-) and a U+FFFD REPLACEMENT
+   CHARACTER character to the comment token's data. Switch to the <a =
href=3D#comment-state>comment state</a>.</dd>
+
+   <dt>U+003E GREATER-THAN SIGN (>)</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Switch =
to the <a href=3D#data-state>data state</a>. Emit the comment=
 token.</dd>
+
+   <dt>EOF</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Switch =
to the <a href=3D#data-state>data state</a>. Emit the comment=
 token.
+   Reconsume the EOF character.</dd> <!-- see comment in commen=
t end state -->
+
+   <dt>Anything else</dt>
+   <dd>Append a U+002D HYPHEN-MINUS character (-) and the <a hr=
ef=3D#current-input-character>current input character</a> to
+   the comment token's data. Switch to the <a href=3D#comment-state&g=
t;comment state</a>.</dd>
+
+  </dl><h5 id=3Dcomment-state><span class=3Dsecno>12.2=
.4.48 </span><dfn id=3Dcomment>Comment state</dfn></=
h5>
+
+  <p>Consume the <a href=3D#next-input-character>next input =
character</a>:</p>
+
+  <dl class=3Dswitch><dt>U+002D HYPHEN-MINUS (-)</dt>
+   <dd>Switch to the <a href=3D#comment-end-dash-state>comme=
nt end dash state</a></dd>
+
+   <dt>U+0000 NULL</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Append =
a U+FFFD REPLACEMENT CHARACTER character to the comment
+   token's data.</dd>
+
+   <dt>EOF</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Switch =
to the <a href=3D#data-state>data state</a>. Emit the comment=
 token.
+   Reconsume the EOF character.</dd> <!-- see comment in commen=
t end state -->
+
+   <dt>Anything else</dt>
+   <dd>Append the <a href=3D#current-input-character>current=
 input character</a> to the comment token's data.</dd>
+
+  </dl><h5 id=3Dcomment-end-dash-state><span class=3Dsecn=
o>12.2.4.49 </span><dfn>Comment end dash state</dfn>=
</h5>
+
+  <p>Consume the <a href=3D#next-input-character>next input =
character</a>:</p>
+
+  <dl class=3Dswitch><dt>U+002D HYPHEN-MINUS (-)</dt>
+   <dd>Switch to the <a href=3D#comment-end-state>comment en=
d state</a></dd>
+
+   <dt>U+0000 NULL</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Append =
a U+002D HYPHEN-MINUS character (-) and a U+FFFD REPLACEMENT
+   CHARACTER character to the comment token's data. Switch to the <a =
href=3D#comment-state>comment state</a>.</dd>
+
+   <dt>EOF</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Switch =
to the <a href=3D#data-state>data state</a>. Emit the comment=
 token.
+   Reconsume the EOF character.</dd> <!-- see comment in commen=
t end state -->
+
+   <dt>Anything else</dt>
+   <dd>Append a U+002D HYPHEN-MINUS character (-) and the <a hr=
ef=3D#current-input-character>current input character</a> to
+   the comment token's data. Switch to the <a href=3D#comment-state&g=
t;comment state</a>.</dd>
+
+  </dl><h5 id=3Dcomment-end-state><span class=3Dsecno>=
12.2.4.50 </span><dfn>Comment end state</dfn></h5&gt=
;
+
+  <p>Consume the <a href=3D#next-input-character>next input =
character</a>:</p>
+
+  <dl class=3Dswitch><dt>U+003E GREATER-THAN SIGN (>)=
</dt>
+   <dd>Switch to the <a href=3D#data-state>data state</a&=
gt;. Emit the comment token.</dd>
+
+   <dt>U+0000 NULL</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Append =
two U+002D HYPHEN-MINUS characters (-) and a U+FFFD
+   REPLACEMENT CHARACTER character to the comment token's data. Switch t=
o the <a href=3D#comment-state>comment
+   state</a>.</dd>
+
+   <dt>U+0021 EXCLAMATION MARK (!)</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Switch =
to the <a href=3D#comment-end-bang-state>comment end bang state<=
/a>.</dd>
+
+   <dt>U+002D HYPHEN-MINUS (-)</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Append =
a U+002D HYPHEN-MINUS character (-) to the comment token's
+   data.</dd>
+
+   <dt>EOF</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Switch =
to the <a href=3D#data-state>data state</a>. Emit the comment=
 token.
+   Reconsume the EOF character.</dd> <!-- For security reasons:=
 otherwise, hostile user could put a
+   <script> in a comment e.g. in a blog comment and then DOS the s=
erver so that the end tag isn't
+   read, and then the commented <script> tag would be treated as l=
ive code -->
+
+   <dt>Anything else</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Append =
two U+002D HYPHEN-MINUS characters (-) and the <a href=3D#current-inpu=
t-character>current
+   input character</a> to the comment token's data. Switch to the =
<a href=3D#comment-state>comment
+   state</a>.</dd>
+
+  </dl><h5 id=3Dcomment-end-bang-state><span class=3Dsecn=
o>12.2.4.51 </span><dfn>Comment end bang state</dfn>=
</h5>
+
+  <p>Consume the <a href=3D#next-input-character>next input =
character</a>:</p>
+
+  <dl class=3Dswitch><dt>U+002D HYPHEN-MINUS (-)</dt>
+   <dd>Append two U+002D HYPHEN-MINUS characters (-) and a U+0021 =
EXCLAMATION MARK character (!) to
+   the comment token's data. Switch to the <a href=3D#comment-end-das=
h-state>comment end dash state</a>.</dd>
+
+   <dt>U+003E GREATER-THAN SIGN (>)</dt>
+   <dd>Switch to the <a href=3D#data-state>data state</a&=
gt;. Emit the comment token.</dd>
+
+   <dt>U+0000 NULL</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Append =
two U+002D HYPHEN-MINUS characters (-), a U+0021 EXCLAMATION
+   MARK character (!), and a U+FFFD REPLACEMENT CHARACTER character to t=
he comment token's data.
+   Switch to the <a href=3D#comment-state>comment state</a>.=
</dd>
+
+   <dt>EOF</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Switch =
to the <a href=3D#data-state>data state</a>. Emit the comment=
 token.
+   Reconsume the EOF character.</dd> <!-- see comment in commen=
t end state -->
+
+   <dt>Anything else</dt>
+   <dd>Append two U+002D HYPHEN-MINUS characters (-), a U+0021 EXC=
LAMATION MARK character (!), and
+   the <a href=3D#current-input-character>current input character&=
lt;/a> to the comment token's data. Switch to the <a href=3D#commen=
t-state>comment
+   state</a>.</dd>
+
+  </dl><h5 id=3Ddoctype-state><span class=3Dsecno>12.2=
.4.52 </span><dfn>DOCTYPE state</dfn></h5>
+
+  <p>Consume the <a href=3D#next-input-character>next input =
character</a>:</p>
+
+  <dl class=3Dswitch><dt>U+0009 CHARACTER TABULATION (tab)&l=
t;/dt>
+   <dt>U+000A LINE FEED (LF)</dt>
+   <dt>U+000C FORM FEED (FF)</dt>
+   <!--<dt>U+000D CARRIAGE RETURN (CR)</dt>-->
+   <dt>U+0020 SPACE</dt>
+   <dd>Switch to the <a href=3D#before-doctype-name-state>be=
fore DOCTYPE name state</a>.</dd>
+
+   <dt>EOF</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Switch =
to the <a href=3D#data-state>data state</a>. Create a new DOC=
TYPE token.
+   Set its <i>force-quirks flag</i> to <i>on</i>=
. Emit the token. Reconsume the EOF character.</dd>
+
+   <dt>Anything else</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Switch =
to the <a href=3D#before-doctype-name-state>before DOCTYPE name sta=
te</a>. Reconsume the
+   character.</dd>
+
+  </dl><h5 id=3Dbefore-doctype-name-state><span class=3Ds=
ecno>12.2.4.53 </span><dfn>Before DOCTYPE name state</d=
fn></h5>
+
+  <p>Consume the <a href=3D#next-input-character>next input =
character</a>:</p>
+
+  <dl class=3Dswitch><dt>U+0009 CHARACTER TABULATION (tab)&l=
t;/dt>
+   <dt>U+000A LINE FEED (LF)</dt>
+   <dt>U+000C FORM FEED (FF)</dt>
+   <!--<dt>U+000D CARRIAGE RETURN (CR)</dt>-->
+   <dt>U+0020 SPACE</dt>
+   <dd>Ignore the character.</dd>
+
+   <dt><a href=3D#uppercase-ascii-letters title=3D"upperca=
se ASCII letters">Uppercase ASCII letter</a></dt>
+   <dd>Create a new DOCTYPE token. Set the token's name to the low=
ercase version of the
+   <a href=3D#current-input-character>current input character</=
a> (add 0x0020 to the character's code point). Switch to the
+   <a href=3D#doctype-name-state>DOCTYPE name state</a>.<=
/dd>
+
+   <dt>U+0000 NULL</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Create =
a new DOCTYPE token. Set the token's name to a U+FFFD
+   REPLACEMENT CHARACTER character. Switch to the <a href=3D#doctype-=
name-state>DOCTYPE name state</a>.</dd>
+
+   <dt>U+003E GREATER-THAN SIGN (>)</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Create =
a new DOCTYPE token. Set its <i>force-quirks flag</i> to
+   <i>on</i>. Switch to the <a href=3D#data-state>data=
 state</a>. Emit the token.</dd>
+
+   <dt>EOF</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Switch =
to the <a href=3D#data-state>data state</a>. Create a new DOC=
TYPE token.
+   Set its <i>force-quirks flag</i> to <i>on</i>=
. Emit the token. Reconsume the EOF character.</dd>
+
+   <dt>Anything else</dt>
+   <dd>Create a new DOCTYPE token. Set the token's name to the &lt=
;a href=3D#current-input-character>current input character</a>.
+   Switch to the <a href=3D#doctype-name-state>DOCTYPE name state&=
lt;/a>.</dd>
+
+  </dl><h5 id=3Ddoctype-name-state><span class=3Dsecno&gt=
;12.2.4.54 </span><dfn>DOCTYPE name state</dfn></h5&=
gt;
+
+  <p>Consume the <a href=3D#next-input-character>next input =
character</a>:</p>
+
+  <dl class=3Dswitch><dt>U+0009 CHARACTER TABULATION (tab)&l=
t;/dt>
+   <dt>U+000A LINE FEED (LF)</dt>
+   <dt>U+000C FORM FEED (FF)</dt>
+   <!--<dt>U+000D CARRIAGE RETURN (CR)</dt>-->
+   <dt>U+0020 SPACE</dt>
+   <dd>Switch to the <a href=3D#after-doctype-name-state>aft=
er DOCTYPE name state</a>.</dd>
+
+   <dt>U+003E GREATER-THAN SIGN (>)</dt>
+   <dd>Switch to the <a href=3D#data-state>data state</a&=
gt;. Emit the current DOCTYPE token.</dd>
+
+   <dt><a href=3D#uppercase-ascii-letters title=3D"upperca=
se ASCII letters">Uppercase ASCII letter</a></dt>
+   <dd>Append the lowercase version of the <a href=3D#current-i=
nput-character>current input character</a> (add 0x0020 to the
+   character's code point) to the current DOCTYPE token's name.</dd&g=
t;
+
+   <dt>U+0000 NULL</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Append =
a U+FFFD REPLACEMENT CHARACTER character to the current
+   DOCTYPE token's name.</dd>
+
+   <dt>EOF</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Switch =
to the <a href=3D#data-state>data state</a>. Set the DOCTYPE =
token's
+   <i>force-quirks flag</i> to <i>on</i>. Emit t=
hat DOCTYPE token. Reconsume the EOF character.</dd>
+
+   <dt>Anything else</dt>
+   <dd>Append the <a href=3D#current-input-character>current=
 input character</a> to the current DOCTYPE token's name.</dd&gt=
;
+
+  </dl><h5 id=3Dafter-doctype-name-state><span class=3Dse=
cno>12.2.4.55 </span><dfn>After DOCTYPE name state</dfn=
></h5>
+
+  <p>Consume the <a href=3D#next-input-character>next input =
character</a>:</p>
+
+  <dl class=3Dswitch><dt>U+0009 CHARACTER TABULATION (tab)&l=
t;/dt>
+   <dt>U+000A LINE FEED (LF)</dt>
+   <dt>U+000C FORM FEED (FF)</dt>
+   <!--<dt>U+000D CARRIAGE RETURN (CR)</dt>-->
+   <dt>U+0020 SPACE</dt>
+   <dd>Ignore the character.</dd>
+
+   <dt>U+003E GREATER-THAN SIGN (>)</dt>
+   <dd>Switch to the <a href=3D#data-state>data state</a&=
gt;. Emit the current DOCTYPE token.</dd>
+
+   <dt>EOF</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Switch =
to the <a href=3D#data-state>data state</a>. Set the DOCTYPE =
token's
+   <i>force-quirks flag</i> to <i>on</i>. Emit t=
hat DOCTYPE token. Reconsume the EOF character.</dd>
+
+   <dt>Anything else</dt>
+   <dd>
+
+    <p>If the six characters starting from the <a href=3D#curre=
nt-input-character>current input character</a> are an
+    <a href=3D#ascii-case-insensitive>ASCII case-insensitive</a=
> match for the word "PUBLIC", then consume those characters
+    and switch to the <a href=3D#after-doctype-public-keyword-state&g=
t;after DOCTYPE public keyword state</a>.</p>
+
+    <p>Otherwise, if the six characters starting from the <a hr=
ef=3D#current-input-character>current input character</a> are
+    an <a href=3D#ascii-case-insensitive>ASCII case-insensitive&lt=
;/a> match for the word "SYSTEM", then consume those
+    characters and switch to the <a href=3D#after-doctype-system-keyw=
ord-state>after DOCTYPE system keyword state</a>.</p>
+
+    <p>Otherwise, this is a <a href=3D#parse-error>parse err=
or</a>. Set the DOCTYPE token's <i>force-quirks
+    flag</i> to <i>on</i>. Switch to the <a href=3D=
#bogus-doctype-state>bogus DOCTYPE state</a>.</p>
+
+   </dd>
+
+  </dl><h5 id=3Dafter-doctype-public-keyword-state><span =
class=3Dsecno>12.2.4.56 </span><dfn>After DOCTYPE public k=
eyword state</dfn></h5>
+
+  <p>Consume the <a href=3D#next-input-character>next input =
character</a>:</p>
+
+  <dl class=3Dswitch><dt>U+0009 CHARACTER TABULATION (tab)&l=
t;/dt>
+   <dt>U+000A LINE FEED (LF)</dt>
+   <dt>U+000C FORM FEED (FF)</dt>
+   <!--<dt>U+000D CARRIAGE RETURN (CR)</dt>-->
+   <dt>U+0020 SPACE</dt>
+   <dd>Switch to the <a href=3D#before-doctype-public-identifie=
r-state>before DOCTYPE public identifier state</a>.</dd>
+
+   <dt>U+0022 QUOTATION MARK (")</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Set the=
 DOCTYPE token's public identifier to the empty string (not
+   missing), then switch to the <a href=3D#doctype-public-identifier-=
(double-quoted)-state>DOCTYPE public identifier (double-quoted) state&=
lt;/a>.</dd>
+
+   <dt>U+0027 APOSTROPHE (')</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Set the=
 DOCTYPE token's public identifier to the empty string (not
+   missing), then switch to the <a href=3D#doctype-public-identifier-=
(single-quoted)-state>DOCTYPE public identifier (single-quoted) state&=
lt;/a>.</dd>
+
+   <dt>U+003E GREATER-THAN SIGN (>)</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Set the=
 DOCTYPE token's <i>force-quirks flag</i> to <i>on</=
i>.
+   Switch to the <a href=3D#data-state>data state</a>. Emit =
that DOCTYPE token.</dd>
+
+   <dt>EOF</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Switch =
to the <a href=3D#data-state>data state</a>. Set the DOCTYPE =
token's
+   <i>force-quirks flag</i> to <i>on</i>. Emit t=
hat DOCTYPE token. Reconsume the EOF character.</dd>
+
+   <dt>Anything else</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Set the=
 DOCTYPE token's <i>force-quirks flag</i> to <i>on</=
i>.
+   Switch to the <a href=3D#bogus-doctype-state>bogus DOCTYPE stat=
e</a>.</dd>
+
+  </dl><h5 id=3Dbefore-doctype-public-identifier-state><s=
pan class=3Dsecno>12.2.4.57 </span><dfn>Before DOCTYPE pub=
lic identifier state</dfn></h5>
+
+  <p>Consume the <a href=3D#next-input-character>next input =
character</a>:</p>
+
+  <dl class=3Dswitch><dt>U+0009 CHARACTER TABULATION (tab)&l=
t;/dt>
+   <dt>U+000A LINE FEED (LF)</dt>
+   <dt>U+000C FORM FEED (FF)</dt>
+   <!--<dt>U+000D CARRIAGE RETURN (CR)</dt>-->
+   <dt>U+0020 SPACE</dt>
+   <dd>Ignore the character.</dd>
+
+   <dt>U+0022 QUOTATION MARK (")</dt>
+   <dd>Set the DOCTYPE token's public identifier to the empty stri=
ng (not missing), then switch to
+   the <a href=3D#doctype-public-identifier-(double-quoted)-state>=
DOCTYPE public identifier (double-quoted) state</a>.</dd>
+
+   <dt>U+0027 APOSTROPHE (')</dt>
+   <dd>Set the DOCTYPE token's public identifier to the empty stri=
ng (not missing), then switch to
+   the <a href=3D#doctype-public-identifier-(single-quoted)-state>=
DOCTYPE public identifier (single-quoted) state</a>.</dd>
+
+   <dt>U+003E GREATER-THAN SIGN (>)</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Set the=
 DOCTYPE token's <i>force-quirks flag</i> to <i>on</=
i>.
+   Switch to the <a href=3D#data-state>data state</a>. Emit =
that DOCTYPE token.</dd>
+
+   <dt>EOF</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Switch =
to the <a href=3D#data-state>data state</a>. Set the DOCTYPE =
token's
+   <i>force-quirks flag</i> to <i>on</i>. Emit t=
hat DOCTYPE token. Reconsume the EOF character.</dd>
+
+   <dt>Anything else</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Set the=
 DOCTYPE token's <i>force-quirks flag</i> to <i>on</=
i>.
+   Switch to the <a href=3D#bogus-doctype-state>bogus DOCTYPE stat=
e</a>.</dd>
+
+  </dl><h5 id=3Ddoctype-public-identifier-(double-quoted)-state=
><span class=3Dsecno>12.2.4.58 </span><dfn>DOCTYPE p=
ublic identifier (double-quoted) state</dfn></h5>
+
+  <p>Consume the <a href=3D#next-input-character>next input =
character</a>:</p>
+
+  <dl class=3Dswitch><dt>U+0022 QUOTATION MARK (")</=
dt>
+   <dd>Switch to the <a href=3D#after-doctype-public-identifier=
-state>after DOCTYPE public identifier state</a>.</dd>
+
+   <dt>U+0000 NULL</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Append =
a U+FFFD REPLACEMENT CHARACTER character to the current
+   DOCTYPE token's public identifier.</dd>
+
+   <dt>U+003E GREATER-THAN SIGN (>)</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Set the=
 DOCTYPE token's <i>force-quirks flag</i> to <i>on</=
i>.
+   Switch to the <a href=3D#data-state>data state</a>. Emit =
that DOCTYPE token.</dd>
+
+   <dt>EOF</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Switch =
to the <a href=3D#data-state>data state</a>. Set the DOCTYPE =
token's
+   <i>force-quirks flag</i> to <i>on</i>. Emit t=
hat DOCTYPE token. Reconsume the EOF character.</dd>
+
+   <dt>Anything else</dt>
+   <dd>Append the <a href=3D#current-input-character>current=
 input character</a> to the current DOCTYPE token's public
+   identifier.</dd>
+
+  </dl><h5 id=3Ddoctype-public-identifier-(single-quoted)-state=
><span class=3Dsecno>12.2.4.59 </span><dfn>DOCTYPE p=
ublic identifier (single-quoted) state</dfn></h5>
+
+  <p>Consume the <a href=3D#next-input-character>next input =
character</a>:</p>
+
+  <dl class=3Dswitch><dt>U+0027 APOSTROPHE (')</dt>
+   <dd>Switch to the <a href=3D#after-doctype-public-identifier=
-state>after DOCTYPE public identifier state</a>.</dd>
+
+   <dt>U+0000 NULL</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Append =
a U+FFFD REPLACEMENT CHARACTER character to the current
+   DOCTYPE token's public identifier.</dd>
+
+   <dt>U+003E GREATER-THAN SIGN (>)</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Set the=
 DOCTYPE token's <i>force-quirks flag</i> to <i>on</=
i>.
+   Switch to the <a href=3D#data-state>data state</a>. Emit =
that DOCTYPE token.</dd>
+
+   <dt>EOF</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Switch =
to the <a href=3D#data-state>data state</a>. Set the DOCTYPE =
token's
+   <i>force-quirks flag</i> to <i>on</i>. Emit t=
hat DOCTYPE token. Reconsume the EOF character.</dd>
+
+   <dt>Anything else</dt>
+   <dd>Append the <a href=3D#current-input-character>current=
 input character</a> to the current DOCTYPE token's public
+   identifier.</dd>
+
+  </dl><h5 id=3Dafter-doctype-public-identifier-state><sp=
an class=3Dsecno>12.2.4.60 </span><dfn>After DOCTYPE publi=
c identifier state</dfn></h5>
+
+  <p>Consume the <a href=3D#next-input-character>next input =
character</a>:</p>
+
+  <dl class=3Dswitch><dt>U+0009 CHARACTER TABULATION (tab)&l=
t;/dt>
+   <dt>U+000A LINE FEED (LF)</dt>
+   <dt>U+000C FORM FEED (FF)</dt>
+   <!--<dt>U+000D CARRIAGE RETURN (CR)</dt>-->
+   <dt>U+0020 SPACE</dt>
+   <dd>Switch to the <a href=3D#between-doctype-public-and-syst=
em-identifiers-state>between DOCTYPE public and system identifiers sta=
te</a>.</dd>
+
+   <dt>U+003E GREATER-THAN SIGN (>)</dt>
+   <dd>Switch to the <a href=3D#data-state>data state</a&=
gt;. Emit the current DOCTYPE token.</dd>
+
+   <dt>U+0022 QUOTATION MARK (")</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Set the=
 DOCTYPE token's system identifier to the empty string (not
+   missing), then switch to the <a href=3D#doctype-system-identifier-=
(double-quoted)-state>DOCTYPE system identifier (double-quoted) state&=
lt;/a>.</dd>
+
+   <dt>U+0027 APOSTROPHE (')</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Set the=
 DOCTYPE token's system identifier to the empty string (not
+   missing), then switch to the <a href=3D#doctype-system-identifier-=
(single-quoted)-state>DOCTYPE system identifier (single-quoted) state&=
lt;/a>.</dd>
+
+   <dt>EOF</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Switch =
to the <a href=3D#data-state>data state</a>. Set the DOCTYPE =
token's
+   <i>force-quirks flag</i> to <i>on</i>. Emit t=
hat DOCTYPE token. Reconsume the EOF character.</dd>
+
+   <dt>Anything else</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Set the=
 DOCTYPE token's <i>force-quirks flag</i> to <i>on</=
i>.
+   Switch to the <a href=3D#bogus-doctype-state>bogus DOCTYPE stat=
e</a>.</dd>
+
+  </dl><h5 id=3Dbetween-doctype-public-and-system-identifiers-s=
tate><span class=3Dsecno>12.2.4.61 </span><dfn>Betwe=
en DOCTYPE public and system identifiers state</dfn></h5>
+
+  <p>Consume the <a href=3D#next-input-character>next input =
character</a>:</p>
+
+  <dl class=3Dswitch><dt>U+0009 CHARACTER TABULATION (tab)&l=
t;/dt>
+   <dt>U+000A LINE FEED (LF)</dt>
+   <dt>U+000C FORM FEED (FF)</dt>
+   <!--<dt>U+000D CARRIAGE RETURN (CR)</dt>-->
+   <dt>U+0020 SPACE</dt>
+   <dd>Ignore the character.</dd>
+
+   <dt>U+003E GREATER-THAN SIGN (>)</dt>
+   <dd>Switch to the <a href=3D#data-state>data state</a&=
gt;. Emit the current DOCTYPE token.</dd>
+
+   <dt>U+0022 QUOTATION MARK (")</dt>
+   <dd>Set the DOCTYPE token's system identifier to the empty stri=
ng (not missing), then switch to
+   the <a href=3D#doctype-system-identifier-(double-quoted)-state>=
DOCTYPE system identifier (double-quoted) state</a>.</dd>
+
+   <dt>U+0027 APOSTROPHE (')</dt>
+   <dd>Set the DOCTYPE token's system identifier to the empty stri=
ng (not missing), then switch to
+   the <a href=3D#doctype-system-identifier-(single-quoted)-state>=
DOCTYPE system identifier (single-quoted) state</a>.</dd>
+
+   <dt>EOF</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Switch =
to the <a href=3D#data-state>data state</a>. Set the DOCTYPE =
token's
+   <i>force-quirks flag</i> to <i>on</i>. Emit t=
hat DOCTYPE token. Reconsume the EOF character.</dd>
+
+   <dt>Anything else</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Set the=
 DOCTYPE token's <i>force-quirks flag</i> to <i>on</=
i>.
+   Switch to the <a href=3D#bogus-doctype-state>bogus DOCTYPE stat=
e</a>.</dd>
+
+  </dl><h5 id=3Dafter-doctype-system-keyword-state><span =
class=3Dsecno>12.2.4.62 </span><dfn>After DOCTYPE system k=
eyword state</dfn></h5>
+
+  <p>Consume the <a href=3D#next-input-character>next input =
character</a>:</p>
+
+  <dl class=3Dswitch><dt>U+0009 CHARACTER TABULATION (tab)&l=
t;/dt>
+   <dt>U+000A LINE FEED (LF)</dt>
+   <dt>U+000C FORM FEED (FF)</dt>
+   <!--<dt>U+000D CARRIAGE RETURN (CR)</dt>-->
+   <dt>U+0020 SPACE</dt>
+   <dd>Switch to the <a href=3D#before-doctype-system-identifie=
r-state>before DOCTYPE system identifier state</a>.</dd>
+
+   <dt>U+0022 QUOTATION MARK (")</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Set the=
 DOCTYPE token's system identifier to the empty string (not
+   missing), then switch to the <a href=3D#doctype-system-identifier-=
(double-quoted)-state>DOCTYPE system identifier (double-quoted) state&=
lt;/a>.</dd>
+
+   <dt>U+0027 APOSTROPHE (')</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Set the=
 DOCTYPE token's system identifier to the empty string (not
+   missing), then switch to the <a href=3D#doctype-system-identifier-=
(single-quoted)-state>DOCTYPE system identifier (single-quoted) state&=
lt;/a>.</dd>
+
+   <dt>U+003E GREATER-THAN SIGN (>)</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Set the=
 DOCTYPE token's <i>force-quirks flag</i> to <i>on</=
i>.
+   Switch to the <a href=3D#data-state>data state</a>. Emit =
that DOCTYPE token.</dd>
+
+   <dt>EOF</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Switch =
to the <a href=3D#data-state>data state</a>. Set the DOCTYPE =
token's
+   <i>force-quirks flag</i> to <i>on</i>. Emit t=
hat DOCTYPE token. Reconsume the EOF character.</dd>
+
+   <dt>Anything else</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Set the=
 DOCTYPE token's <i>force-quirks flag</i> to <i>on</=
i>.
+   Switch to the <a href=3D#bogus-doctype-state>bogus DOCTYPE stat=
e</a>.</dd>
+
+  </dl><h5 id=3Dbefore-doctype-system-identifier-state><s=
pan class=3Dsecno>12.2.4.63 </span><dfn>Before DOCTYPE sys=
tem identifier state</dfn></h5>
+
+  <p>Consume the <a href=3D#next-input-character>next input =
character</a>:</p>
+
+  <dl class=3Dswitch><dt>U+0009 CHARACTER TABULATION (tab)&l=
t;/dt>
+   <dt>U+000A LINE FEED (LF)</dt>
+   <dt>U+000C FORM FEED (FF)</dt>
+   <!--<dt>U+000D CARRIAGE RETURN (CR)</dt>-->
+   <dt>U+0020 SPACE</dt>
+   <dd>Ignore the character.</dd>
+
+   <dt>U+0022 QUOTATION MARK (")</dt>
+   <dd>Set the DOCTYPE token's system identifier to the empty stri=
ng (not missing), then switch to
+   the <a href=3D#doctype-system-identifier-(double-quoted)-state>=
DOCTYPE system identifier (double-quoted) state</a>.</dd>
+
+   <dt>U+0027 APOSTROPHE (')</dt>
+   <dd>Set the DOCTYPE token's system identifier to the empty stri=
ng (not missing), then switch to
+   the <a href=3D#doctype-system-identifier-(single-quoted)-state>=
DOCTYPE system identifier (single-quoted) state</a>.</dd>
+
+   <dt>U+003E GREATER-THAN SIGN (>)</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Set the=
 DOCTYPE token's <i>force-quirks flag</i> to <i>on</=
i>.
+   Switch to the <a href=3D#data-state>data state</a>. Emit =
that DOCTYPE token.</dd>
+
+   <dt>EOF</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Switch =
to the <a href=3D#data-state>data state</a>. Set the DOCTYPE =
token's
+   <i>force-quirks flag</i> to <i>on</i>. Emit t=
hat DOCTYPE token. Reconsume the EOF character.</dd>
+
+   <dt>Anything else</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Set the=
 DOCTYPE token's <i>force-quirks flag</i> to <i>on</=
i>.
+   Switch to the <a href=3D#bogus-doctype-state>bogus DOCTYPE stat=
e</a>.</dd>
+
+  </dl><h5 id=3Ddoctype-system-identifier-(double-quoted)-state=
><span class=3Dsecno>12.2.4.64 </span><dfn>DOCTYPE s=
ystem identifier (double-quoted) state</dfn></h5>
+
+  <p>Consume the <a href=3D#next-input-character>next input =
character</a>:</p>
+
+  <dl class=3Dswitch><dt>U+0022 QUOTATION MARK (")</=
dt>
+   <dd>Switch to the <a href=3D#after-doctype-system-identifier=
-state>after DOCTYPE system identifier state</a>.</dd>
+
+   <dt>U+0000 NULL</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Append =
a U+FFFD REPLACEMENT CHARACTER character to the current
+   DOCTYPE token's system identifier.</dd>
+
+   <dt>U+003E GREATER-THAN SIGN (>)</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Set the=
 DOCTYPE token's <i>force-quirks flag</i> to <i>on</=
i>.
+   Switch to the <a href=3D#data-state>data state</a>. Emit =
that DOCTYPE token.</dd>
+
+   <dt>EOF</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Switch =
to the <a href=3D#data-state>data state</a>. Set the DOCTYPE =
token's
+   <i>force-quirks flag</i> to <i>on</i>. Emit t=
hat DOCTYPE token. Reconsume the EOF character.</dd>
+
+   <dt>Anything else</dt>
+   <dd>Append the <a href=3D#current-input-character>current=
 input character</a> to the current DOCTYPE token's system
+   identifier.</dd>
+
+  </dl><h5 id=3Ddoctype-system-identifier-(single-quoted)-state=
><span class=3Dsecno>12.2.4.65 </span><dfn>DOCTYPE s=
ystem identifier (single-quoted) state</dfn></h5>
+
+  <p>Consume the <a href=3D#next-input-character>next input =
character</a>:</p>
+
+  <dl class=3Dswitch><dt>U+0027 APOSTROPHE (')</dt>
+   <dd>Switch to the <a href=3D#after-doctype-system-identifier=
-state>after DOCTYPE system identifier state</a>.</dd>
+
+   <dt>U+0000 NULL</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Append =
a U+FFFD REPLACEMENT CHARACTER character to the current
+   DOCTYPE token's system identifier.</dd>
+
+   <dt>U+003E GREATER-THAN SIGN (>)</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Set the=
 DOCTYPE token's <i>force-quirks flag</i> to <i>on</=
i>.
+   Switch to the <a href=3D#data-state>data state</a>. Emit =
that DOCTYPE token.</dd>
+
+   <dt>EOF</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Switch =
to the <a href=3D#data-state>data state</a>. Set the DOCTYPE =
token's
+   <i>force-quirks flag</i> to <i>on</i>. Emit t=
hat DOCTYPE token. Reconsume the EOF character.</dd>
+
+   <dt>Anything else</dt>
+   <dd>Append the <a href=3D#current-input-character>current=
 input character</a> to the current DOCTYPE token's system
+   identifier.</dd>
+
+  </dl><h5 id=3Dafter-doctype-system-identifier-state><sp=
an class=3Dsecno>12.2.4.66 </span><dfn>After DOCTYPE syste=
m identifier state</dfn></h5>
+
+  <p>Consume the <a href=3D#next-input-character>next input =
character</a>:</p>
+
+  <dl class=3Dswitch><dt>U+0009 CHARACTER TABULATION (tab)&l=
t;/dt>
+   <dt>U+000A LINE FEED (LF)</dt>
+   <dt>U+000C FORM FEED (FF)</dt>
+   <!--<dt>U+000D CARRIAGE RETURN (CR)</dt>-->
+   <dt>U+0020 SPACE</dt>
+   <dd>Ignore the character.</dd>
+
+   <dt>U+003E GREATER-THAN SIGN (>)</dt>
+   <dd>Switch to the <a href=3D#data-state>data state</a&=
gt;. Emit the current DOCTYPE token.</dd>
+
+   <dt>EOF</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Switch =
to the <a href=3D#data-state>data state</a>. Set the DOCTYPE =
token's
+   <i>force-quirks flag</i> to <i>on</i>. Emit t=
hat DOCTYPE token. Reconsume the EOF character.</dd>
+
+   <dt>Anything else</dt>
+   <dd><a href=3D#parse-error>Parse error</a>. Switch =
to the <a href=3D#bogus-doctype-state>bogus DOCTYPE state</a>=
. (This does
+   <em>not</em> set the DOCTYPE token's <i>force-quirk=
s flag</i> to <i>on</i>.)</dd>
+
+  </dl><h5 id=3Dbogus-doctype-state><span class=3Dsecno&g=
t;12.2.4.67 </span><dfn>Bogus DOCTYPE state</dfn></h=
5>
+
+  <p>Consume the <a href=3D#next-input-character>next input =
character</a>:</p>
+
+  <dl class=3Dswitch><dt>U+003E GREATER-THAN SIGN (>)=
</dt>
+   <dd>Switch to the <a href=3D#data-state>data state</a&=
gt;. Emit the DOCTYPE token.</dd>
+
+   <dt>EOF</dt>
+   <dd>Switch to the <a href=3D#data-state>data state</a&=
gt;. Emit the DOCTYPE token. Reconsume the EOF
+   character.</dd>
+
+   <dt>Anything else</dt>
+   <dd>Ignore the character.</dd>
+
+  </dl><h5 id=3Dcdata-section-state><span class=3Dsecno&g=
t;12.2.4.68 </span><dfn>CDATA section state</dfn></h=
5>
+
+  <p>Switch to the <a href=3D#data-state>data state</a&gt=
;.</p>
+
+  <p>Consume every character up to the next occurrence of the thre=
e character sequence U+005D RIGHT
+  SQUARE BRACKET U+005D RIGHT SQUARE BRACKET U+003E GREATER-THAN SIGN (&=
lt;code title=3D"">]]></code>),
+  or the end of the file (EOF), whichever comes first. Emit a series of =
character tokens consisting
+  of all the characters consumed except the matching three character seq=
uence at the end (if one was
+  found before the end of the file)<!--(not needed; taken care of by =
the tree constructor), but with
+  any U+0000 NULL characters replaced by U+FFFD REPLACEMENT CHARACTER ch=
aracters-->.</p>
+
+  <p>If the end of the file was reached, reconsume the EOF charact=
er.</p>
+
+
+
+  <h5 id=3Dtokenizing-character-references><span class=3Dsecno&=
gt;12.2.4.69 </span>Tokenizing character references</h5>
+
+  <p>This section defines how to <dfn id=3Dconsume-a-character-=
reference>consume a character reference</dfn>, optionally with a=
n
+  <dfn id=3Dadditional-allowed-character>additional allowed charac=
ter</dfn>, which, if specified where the algorithm is invoked, adds
+  a character to the list of characters that cause there to not be a cha=
racter reference.</p>
+
+  <p>This definition is used when parsing character references &lt=
;a href=3D#character-reference-in-data-state title=3D"character refe=
rence in
+  data state">in text</a> and <a href=3D#character-refe=
rence-in-attribute-value-state title=3D"character reference in attri=
bute value state">in
+  attributes</a>.</p>
+
+  <p>The behavior depends on the identity of the next character (t=
he one immediately after the
+  U+0026 AMPERSAND character), as follows:</p>
+
+  <dl class=3Dswitch><dt>U+0009 CHARACTER TABULATION (tab)&l=
t;/dt>
+   <dt>U+000A LINE FEED (LF)</dt>
+   <dt>U+000C FORM FEED (FF)</dt>
+   <!--<dt>U+000D CARRIAGE RETURN (CR)</dt>-->
+   <dt>U+0020 SPACE</dt>
+   <dt>U+003C LESS-THAN SIGN</dt>
+   <dt>U+0026 AMPERSAND</dt>
+   <dt>EOF</dt>
+   <dt>The <a href=3D#additional-allowed-character>additiona=
l allowed character</a>, if there is one</dt>
+
+   <dd>Not a character reference. No characters are consumed, and =
nothing is returned. (This is not
+   an error, either.)</dd>
+
+
+   <dt>U+0023 NUMBER SIGN (#)</dt>
+
+   <dd>
+
+    <p>Consume the U+0023 NUMBER SIGN.</p>
+
+    <p>The behavior further depends on the character after the U+0=
023 NUMBER SIGN:</p>
+
+    <dl class=3Dswitch><dt>U+0078 LATIN SMALL LETTER X</d=
t>
+     <dt>U+0058 LATIN CAPITAL LETTER X</dt>
+
+     <dd>
+
+      <p>Consume the X.</p>
+
+      <p>Follow the steps below, but using <a href=3D#ascii-hex=
-digits>ASCII hex digits</a>.</p>
+
+      <p>When it comes to interpreting the number, interpret it as=
 a hexadecimal number.</p>
+
+     </dd>
+
+
+     <dt>Anything else</dt>
+
+     <dd>
+
+      <p>Follow the steps below, but using <a href=3D#ascii-dig=
its>ASCII digits</a>.</p>
+
+      <p>When it comes to interpreting the number, interpret it as=
 a decimal number.</p>
+
+     </dd>
+
+    </dl><p>Consume as many characters as match the range of=
 characters given above (<a href=3D#ascii-hex-digits>ASCII hex
+    digits</a> or <a href=3D#ascii-digits>ASCII digits</a=
>).</p>
+
+    <p>If no characters match the range, then don't consume any ch=
aracters (and unconsume the U+0023
+    NUMBER SIGN character and, if appropriate, the X character). This is=
 a <a href=3D#parse-error>parse error</a>;
+    nothing is returned.</p>
+
+    <p>Otherwise, if the next character is a U+003B SEMICOLON, con=
sume that too. If it isn't, there
+    is a <a href=3D#parse-error>parse error</a>.</p>
+
+    <p>If one or more characters match the range, then take them a=
ll and interpret the string of
+    characters as a number (either hexadecimal or decimal as appropriate=
).</p>
+
+    <p>If that number is one of the numbers in the first column of=
 the following table, then this is
+    a <a href=3D#parse-error>parse error</a>. Find the row w=
ith that number in the first column, and return a
+    character token for the Unicode character given in the second column=
 of that row.</p>
+
+    <table id=3Dtable-charref-overrides><thead><tr>&lt=
;th>Number <th colspan=3D2>Unicode character
+     <tbody><tr><td>0x00 <td>U+FFFD <td>RE=
PLACEMENT CHARACTER
+      <!-- <tr><td>0x0D <td>U+000D <td>CARRIA=
GE RETURN (CR) -->
+      <tr><td>0x80 <td>U+20AC <td>EURO SIGN (&am=
p;euro;)
+      <!-- <tr><td>0x81 <td>U+0081 <td>&l=
t;control> -->
+      <tr><td>0x82 <td>U+201A <td>SINGLE LOW-9 Q=
UOTATION MARK (‚)
+      <tr><td>0x83 <td>U+0192 <td>LATIN SMALL LE=
TTER F WITH HOOK (ƒ)
+      <tr><td>0x84 <td>U+201E <td>DOUBLE LOW-9 Q=
UOTATION MARK („)
+      <tr><td>0x85 <td>U+2026 <td>HORIZONTAL ELL=
IPSIS (…)
+      <tr><td>0x86 <td>U+2020 <td>DAGGER (&d=
agger;)
+      <tr><td>0x87 <td>U+2021 <td>DOUBLE DAGGER =
(‡)
+      <tr><td>0x88 <td>U+02C6 <td>MODIFIER LETTE=
R CIRCUMFLEX ACCENT (ˆ)
+      <tr><td>0x89 <td>U+2030 <td>PER MILLE SIGN=
 (‰)
+      <tr><td>0x8A <td>U+0160 <td>LATIN CAPITAL =
LETTER S WITH CARON (Š)
+      <tr><td>0x8B <td>U+2039 <td>SINGLE LEFT-PO=
INTING ANGLE QUOTATION MARK (‹)
+      <tr><td>0x8C <td>U+0152 <td>LATIN CAPITAL =
LIGATURE OE (Œ)
+      <!-- <tr><td>0x8D <td>U+008D <td>&l=
t;control> -->
+      <tr><td>0x8E <td>U+017D <td>LATIN CAPITAL =
LETTER Z WITH CARON (Ž)
+      <!-- <tr><td>0x8F <td>U+008F <td>&l=
t;control> -->
+      <!-- <tr><td>0x90 <td>U+0090 <td>&l=
t;control> -->
+      <tr><td>0x91 <td>U+2018 <td>LEFT SINGLE QU=
OTATION MARK (‘)
+      <tr><td>0x92 <td>U+2019 <td>RIGHT SINGLE Q=
UOTATION MARK (’)
+      <tr><td>0x93 <td>U+201C <td>LEFT DOUBLE QU=
OTATION MARK (“)
+      <tr><td>0x94 <td>U+201D <td>RIGHT DOUBLE Q=
UOTATION MARK (”)
+      <tr><td>0x95 <td>U+2022 <td>BULLET (&b=
ullet;)
+      <tr><td>0x96 <td>U+2013 <td>EN DASH (&=
ndash;)
+      <tr><td>0x97 <td>U+2014 <td>EM DASH (&=
mdash;)
+      <tr><td>0x98 <td>U+02DC <td>SMALL TILDE (&=
amp;tilde;)
+      <tr><td>0x99 <td>U+2122 <td>TRADE MARK SIG=
N (™)
+      <tr><td>0x9A <td>U+0161 <td>LATIN SMALL LE=
TTER S WITH CARON (š)
+      <tr><td>0x9B <td>U+203A <td>SINGLE RIGHT-P=
OINTING ANGLE QUOTATION MARK (›)
+      <tr><td>0x9C <td>U+0153 <td>LATIN SMALL LI=
GATURE OE (œ)
+      <!-- <tr><td>0x9D <td>U+009D <td>&l=
t;control> -->
+      <tr><td>0x9E <td>U+017E <td>LATIN SMALL LE=
TTER Z WITH CARON (ž)
+      <tr><td>0x9F <td>U+0178 <td>LATIN CAPITAL =
LETTER Y WITH DIAERESIS (Ÿ)
+    </table><p>Otherwise, if the number is in the range 0xD8=
00 to 0xDFFF<!-- surrogates --> or is greater
+    than 0x10FFFF, then this is a <a href=3D#parse-error>parse err=
or</a>. Return a U+FFFD REPLACEMENT CHARACTER
+    character token.</p>
+
+    <p>Otherwise, return a character token for the Unicode charact=
er whose code point is that
+    number.
+
+    <!-- this is the same as the equivalent list in the input stream =
section, except U+000D is not
+    allowed --> Additionally, if the number is in the range 0x0001 to=
 0x0008, <!-- HT, LF allowed
+    --> <!-- U+000B is in the next list --> <!-- FF allowed =
--> 0x000D to 0x001F, <!-- ASCII allowed
+    --> 0x007F <!--to 0x0084, (0x0085 NEL not allowed), 0x0086--&g=
t; to 0x009F, 0xFDD0 to 0xFDEF, or is
+    one of 0x000B, 0xFFFE, 0xFFFF, 0x1FFFE, 0x1FFFF, 0x2FFFE, 0x2FFFF, 0=
x3FFFE, 0x3FFFF, 0x4FFFE,
+    0x4FFFF, 0x5FFFE, 0x5FFFF, 0x6FFFE, 0x6FFFF, 0x7FFFE, 0x7FFFF, 0x8FF=
FE, 0x8FFFF, 0x9FFFE,
+    0x9FFFF, 0xAFFFE, 0xAFFFF, 0xBFFFE, 0xBFFFF, 0xCFFFE, 0xCFFFF, 0xDFF=
FE, 0xDFFFF, 0xEFFFE,
+    0xEFFFF, 0xFFFFE, 0xFFFFF, 0x10FFFE, or 0x10FFFF, then this is a &lt=
;a href=3D#parse-error>parse error</a>.</p>
+
+   </dd>
+
+
+   <dt>Anything else</dt>
+
+   <dd>
+
+    <p>Consume the maximum number of characters possible, with the=
 consumed characters matching one
+    of the identifiers in the first column of the <a href=3D#named-ch=
aracter-references>named character references</a> table (in
+    a <a href=3D#case-sensitive>case-sensitive</a> manner).&=
lt;/p>
+
+    <p>If no match can be made, then no characters are consumed, a=
nd nothing is returned. In this
+    case, if the characters after the U+0026 AMPERSAND character (&a=
mp;) consist of a sequence of
+    one or more <a href=3D#alphanumeric-ascii-characters>alphanume=
ric ASCII characters</a> followed by a U+003B SEMICOLON character
+    (;), then this is a <a href=3D#parse-error>parse error</a&g=
t;.</p>
+
+    <p>If the character reference is being consumed <a href=3D#=
character-reference-in-attribute-value-state title=3D"character refe=
rence in attribute
+    value state">as part of an attribute</a>, and the last=
 character matched is not a U+003B
+    SEMICOLON character (;), and the next character is either a U+003D E=
QUALS SIGN character (=3D) or
+    an <a href=3D#alphanumeric-ascii-characters title=3D"alphanu=
meric ASCII characters">alphanumeric ASCII character</a>, t=
hen, for
+    historical reasons, all the characters that were matched after the U=
+0026 AMPERSAND character
+    (&) must be unconsumed, and nothing is returned. <!-- &qu=
ot;=3D" added because of
+    http://www.w3.org/Bugs/Public/show_bug.cgi?id=3D9207#c5 -->
+
+    However, if this next character is in fact a U+003D EQUALS SIGN char=
acter (=3D), then this is a
+    <a href=3D#parse-error>parse error</a>, because some leg=
acy user agents <!-- IE, version 9 and before --> will
+    misinterpret the markup in those cases.</p> <!-- v2: should=
 make this no longer a conformance
+    error at some point in the future; revisit in 2015? -->
+
+    <p>Otherwise, a character reference is parsed. If the last cha=
racter matched is not a U+003B
+    SEMICOLON character (;), there is a <a href=3D#parse-error>par=
se error</a>.</p>
+
+    <p>Return one or two character tokens for the character(s) cor=
responding to the character
+    reference name (as given by the second column of the <a href=3D#n=
amed-character-references>named character references</a>
+    table).</p>
+
+    <div class=3Dexample>
+
+     <p>If the markup contains (not in an attribute) the string &l=
t;code title=3D"">I'm &notit; I
+     tell you</code>, the character reference is parsed as "n=
ot", as in, <code title=3D"">I'm ¬it;
+     I tell you</code> (and this is a parse error). But if the mar=
kup was <code title=3D"">I'm
+     ∉ I tell you</code>, the character reference wo=
uld be parsed as "notin;", resulting
+     in <code title=3D"">I'm ∉ I tell you&lt=
;/code> (and no parse error).</p>
+
+    </div>
+
+   </dd>
+
+  </dl></div>
+
+
+  <div class=3Dimpl>
+
+  <!-- v2: One thing that this doesn't define is handling deeply nest=
ed documents. There are
+  compatibility requirements around that: you can't throw away the eleme=
nts altogether, consider Tux
+  made only with opening <font> elements, one per character. Seems=
 that the best thing to do is to
+  close some formatting elements from the middle of the stack when you h=
it a limit, or something.
+  -->
+
+  <h4 id=3Dtree-construction><span class=3Dsecno>12.2.5 <=
/span><dfn>Tree construction</dfn></h4>
+
+  <p>The input to the tree construction stage is a sequence of tok=
ens from the
+  <a href=3D#tokenization>tokenization</a> stage. The tree c=
onstruction stage is associated with a DOM
+  <code><a href=3D#document>Document</a></code> =
object when a parser is created. The "output" of this stage con=
sists of
+  dynamically modifying or extending that document's DOM tree.</p>
+
+  <p>This specification does not define when an interactive user a=
gent has to render the
+  <code><a href=3D#document>Document</a></code> =
so that it is available to the user, or when it has to begin accepting us=
er
+  input.</p>
+
+  <hr><p>As each token is emitted from the tokenizer, the us=
er agent must follow the appropriate steps
+  from the following list, known as the <dfn id=3Dtree-construction-d=
ispatcher>tree construction dispatcher</dfn>:</p>
+
+  <dl class=3Dswitch><dt>If there is no <a href=3D#adjust=
ed-current-node>adjusted current node</a></dt>
+   <dt>If the <a href=3D#adjusted-current-node>adjusted curr=
ent node</a> is an element in the <a href=3D#html-namespace-0&gt=
;HTML namespace</a></dt>
+   <dt>If the <a href=3D#adjusted-current-node>adjusted curr=
ent node</a> is a <a href=3D#mathml-text-integration-point>Ma=
thML text integration point</a> and the token is a start tag whose =
tag name is neither "mglyph" nor "malignmark"</dt&=
gt;
+   <dt>If the <a href=3D#adjusted-current-node>adjusted curr=
ent node</a> is a <a href=3D#mathml-text-integration-point>Ma=
thML text integration point</a> and the token is a character token&=
lt;/dt>
+   <dt>If the <a href=3D#adjusted-current-node>adjusted curr=
ent node</a> is an <code title=3D"">annotation-xml&=
lt;/code> element in the <a href=3D#mathml-namespace>MathML name=
space</a> and the token is a start tag whose tag name is "svg&=
quot;</dt>
+   <dt>If the <a href=3D#adjusted-current-node>adjusted curr=
ent node</a> is an <a href=3D#html-integration-point>HTML int=
egration point</a> and the token is a start tag</dt>
+   <dt>If the <a href=3D#adjusted-current-node>adjusted curr=
ent node</a> is an <a href=3D#html-integration-point>HTML int=
egration point</a> and the token is a character token</dt>
+   <dt>If the token is an end-of-file token</dt>
+
+   <dd>Process the token according to the rules given in the secti=
on corresponding to the current
+   <a href=3D#insertion-mode>insertion mode</a> in HTML cont=
ent.</dd>
+
+   <dt>Otherwise</dt>
+
+   <dd>Process the token according to the rules given in the secti=
on for parsing tokens <a href=3D#parsing-main-inforeign title=3D"=
insertion mode: in foreign content">in foreign content</a>.=
</dd>
+
+  </dl><p>The <dfn id=3Dnext-token>next token</dfn&=
gt; is the token that is about to be processed by the <a href=3D#tree-=
construction-dispatcher>tree
+  construction dispatcher</a> (even if the token is subsequently j=
ust ignored).</p>
+
+  <p>A node is a <dfn id=3Dmathml-text-integration-point>Mat=
hML text integration point</dfn> if it is one of the following
+  elements:</p>
+
+  <ul class=3Dbrief><li>An <code title=3D"">=
mi</code> element in the <a href=3D#mathml-namespace>MathML n=
amespace</a></li>
+   <li>An <code title=3D"">mo</code> element=
 in the <a href=3D#mathml-namespace>MathML namespace</a></=
li>
+   <li>An <code title=3D"">mn</code> element=
 in the <a href=3D#mathml-namespace>MathML namespace</a></=
li>
+   <li>An <code title=3D"">ms</code> element=
 in the <a href=3D#mathml-namespace>MathML namespace</a></=
li>
+   <li>An <code title=3D"">mtext</code> elem=
ent in the <a href=3D#mathml-namespace>MathML namespace</a>&l=
t;/li>
+  </ul><p>A node is an <dfn id=3Dhtml-integration-point&g=
t;HTML integration point</dfn> if it is one of the following elemen=
ts:</p>
+
+  <ul class=3Dbrief><li>An <code title=3D"">=
annotation-xml</code> element in the <a href=3D#mathml-namespace=
>MathML namespace</a> whose
+   start tag token had an attribute with the name "encoding" w=
hose value was an <a href=3D#ascii-case-insensitive>ASCII
+   case-insensitive</a> match for the string "<code title=3D=
"">text/html</code>"</li>
+   <li>An <code title=3D"">annotation-xml</code=
> element in the <a href=3D#mathml-namespace>MathML namespace&lt=
;/a> whose
+   start tag token had an attribute with the name "encoding" w=
hose value was an <a href=3D#ascii-case-insensitive>ASCII
+   case-insensitive</a> match for the string "<code title=3D=
"">application/xhtml+xml</code>"</li>
+   <li>A <code title=3D"">foreignObject</code&g=
t; element in the <a href=3D#svg-namespace>SVG namespace</a>&=
lt;/li>
+   <li>A <code title=3D"">desc</code> elemen=
t in the <a href=3D#svg-namespace>SVG namespace</a></li&gt=
;
+   <li>A <code title=3D"">title</code> eleme=
nt in the <a href=3D#svg-namespace>SVG namespace</a></li&g=
t;
+  </ul><p class=3Dnote>Not all of the tag names mentioned be=
low are conformant tag names in this
+  specification; many are included to handle legacy content. They still =
form part of the algorithm
+  that implementations are required to implement to claim conformance.&l=
t;/p>
+
+  <p class=3Dnote>The algorithm described below places no limit on=
 the depth of the DOM tree
+  generated, or on the length of tag names, attribute names, attribute v=
alues, <code><a href=3D#text>Text</a></code>
+  nodes, etc. While implementors are encouraged to avoid arbitrary limit=
s, it is recognized that <a href=3D#hardwareLimitations>practical c=
oncerns</a> will likely force user agents to impose nesting
+  depth constraints.</p>
+
+
+  <h5 id=3Dcreating-and-inserting-nodes><span class=3Dsecno>=
12.2.5.1 </span>Creating and inserting nodes</h5>
+
+  <p>While the parser is processing a token, it can enable or disa=
ble <dfn id=3Dfoster-parent title=3D"foster
+  parent">foster parenting</dfn>. This affects the followi=
ng algorithm.</p>
+
+  <p>The <dfn id=3Dappropriate-place-for-inserting-a-node>ap=
propriate place for inserting a node</dfn>, optionally using a part=
icular
+  <i>override target</i>, is the position in an element retu=
rned by running the following steps:</p>
+
+  <ol><li>
+
+    <p>If there was an <i>override target</i> specifie=
d, then let <var title=3D"">target</var> be the
+    <i>override target</i>.</p>
+
+    <p>Otherwise, let <var title=3D"">target</v=
ar> be the <a href=3D#current-node>current node</a>.</p=
>
+
+   </li>
+
+   <li>
+
+    <p>Determine the <var title=3D"">adjusted inse=
rtion location</var> using the first matching steps
+    from the following list:</p>
+
+    <dl class=3Dswitch><dt>If <a href=3D#foster-parent ti=
tle=3D"foster parent">foster parenting</a> is enabled =
and <var title=3D"">target</var> is a <code>&=
lt;a href=3D#the-table-element>table</a></code>, <code&=
gt;<a href=3D#the-tbody-element>tbody</a></code>, <c=
ode><a href=3D#the-tfoot-element>tfoot</a></code>,
+     <code><a href=3D#the-thead-element>thead</a></=
code>, or <code><a href=3D#the-tr-element>tr</a><=
/code> element</dt>
+
+     <dd>
+
+      <p class=3Dnote>Foster parenting happens when content is mis=
nested in tables.</p>
+
+      <p>Run these substeps:</p>
+
+      <ol><li><p>Let <var title=3D"">l=
ast template</var> be the last <code><a href=3D#the-templa=
te-element>template</a></code> element in the
+       <a href=3D#stack-of-open-elements>stack of open elements&lt=
;/a>, if any.</p>
+
+       <li><p>Let <var title=3D"">last table=
</var> be the last <code><a href=3D#the-table-element>t=
able</a></code> element in the
+       <a href=3D#stack-of-open-elements>stack of open elements&lt=
;/a>, if any.</p>
+
+       <li><p>If there is a <var title=3D"">=
last template</var> and either there is no <var title=3D"&q=
uot;>last table</var>, or there is one, but <var title=3D&quo=
t;">last template</var> is lower
+       (more recently added) than <var title=3D"">last t=
able</var> in the <a href=3D#stack-of-open-elements>stack of =
open
+       elements</a>, then: let <var title=3D"">adj=
usted insertion location</var> be inside <var title=3D"&quo=
t;>last template</var>'s <a href=3D#template-contents>temp=
late contents</a>, after its last child (if any),
+       and abort these substeps.</li>
+
+       <li><p>If there is no <var title=3D""&gt=
;last table</var>, <!-- there's also implicitly no last
+       template, since we didn't hit the previous step --> then let &=
lt;var title=3D"">adjusted insertion
+       location</var> be inside the first element in the <a hre=
f=3D#stack-of-open-elements>stack of open elements</a> (the
+       <code><a href=3D#the-html-element>html</a></=
code> element), after its last child (if any), and abort these substep=
s.
+       (<a href=3D#fragment-case>fragment case</a>)</p&gt=
;
+
+       <!-- if we get here, we know there's a last table, and if ther=
e's a last template, it's older
+       than the last table. -->
+
+       <li><p>If <var title=3D"">last table&=
lt;/var> has a parent element, then let <var title=3D""&g=
t;adjusted insertion location</var> be inside <var title=3D&quot=
;">last table</var>'s parent
+       element, immediately before <var title=3D"">last =
table</var>, and abort these
+       substeps.</li>
+
+       <!-- if we get here, we know there's a last table, but it has =
no parent, and if there's a
+       last template, it's older than the last table. -->
+
+       <li><p>Let <var title=3D"">previous e=
lement</var> be the element immediately above <var title=3D&quot=
;">last table</var> in the <a href=3D#stack-of-open-elem=
ents>stack of open elements</a>.</li>
+
+       <li><p>Let <var title=3D"">adjusted i=
nsertion location</var> be inside <var title=3D"">p=
revious
+       element</var>, after its last child (if any).</li>
+
+      </ol><p class=3Dnote>These steps are involved in part =
because it's possible for elements, the
+      <code><a href=3D#the-table-element>table</a><=
/code> element in this case in particular, to have been moved by a scr=
ipt around
+      in the DOM, or indeed removed from the DOM entirely, after the ele=
ment was inserted by the
+      parser.</p>
+
+     </dd>
+
+     <dt>Otherwise</dt>
+
+     <dd>
+
+      <p>Let <var title=3D"">adjusted insertion lo=
cation</var> be inside <var title=3D"">target</v=
ar>,
+      after its last child (if any).</p>
+
+     </dd>
+
+    </dl></li>
+
+   <li>
+
+    <p>If the <var title=3D"">adjusted insertion l=
ocation</var> is inside a <code><a href=3D#the-template-el=
ement>template</a></code>
+    element, let it instead be inside the <code><a href=3D#the-=
template-element>template</a></code> element's <a href=3D=
#template-contents>template
+    contents</a>, after its last child (if any).</p>
+
+   </li>
+
+   <li>
+
+    <p>Return the <var title=3D"">adjusted inserti=
on location</var>.</p>
+
+   </li>
+
+  </ol><hr><p>When the steps below require the UA to &=
lt;dfn id=3Dcreate-an-element-for-the-token title=3D"create an eleme=
nt for the token">create an
+  element for a token</dfn> in a particular <var title=3D"=
">given namespace</var> and with a
+  particular <var title=3D"">intended parent</var>=
, the UA must run the following steps:</p>
+
+  <ol><li>
+
+    <p>Create a node implementing the interface appropriate for th=
e element type corresponding to
+    the tag name of the token in <var title=3D"">given n=
amespace</var> (as given in the specification
+    that defines that element, e.g. for an <code><a href=3D#the=
-a-element>a</a></code> element in the <a href=3D#html-=
namespace-0>HTML
+    namespace</a>, this specification defines it to be the <cod=
e><a href=3D#htmlanchorelement>HTMLAnchorElement</a></c=
ode>
+    interface), with the tag name being the name of that element, with t=
he node being in the given
+    namespace, and with the attributes on the node being those given in =
the given token.</p>
+
+    <p>The interface appropriate for an element in the <a href=3D=
#html-namespace-0>HTML namespace</a> that is not
+    defined in this specification (or <a href=3D#other-applicable-spe=
cifications>other applicable specifications</a>) is
+    <code><a href=3D#htmlunknownelement>HTMLUnknownElement&l=
t;/a></code>. Elements in other namespaces whose interface is no=
t defined by
+    that namespace's specification must use the interface <code>&l=
t;a href=3D#element>Element</a></code>.</p>
+
+    <p>The <code title=3Ddom-Node-ownerDocument><a href=3D=
#dom-node-ownerdocument>ownerDocument</a></code> of the ne=
wly created element
+    must be the same as that of the <var title=3D"">inte=
nded parent</var>.</p>
+
+   </li>
+
+   <li><p>If the newly created element has an <code title=
=3D"">xmlns</code> attribute <em>in the
+   <a href=3D#xmlns-namespace>XMLNS namespace</a></em>=
 whose value is not exactly the same as the element's namespace,
+   that is a <a href=3D#parse-error>parse error</a>. Similar=
ly, if the newly created element has an <code title=3D"">=
xmlns:xlink</code> attribute in the <a href=3D#xmlns-namespace&g=
t;XMLNS namespace</a> whose value is not the
+   <a href=3D#xlink-namespace>XLink Namespace</a>, that is a=
 <a href=3D#parse-error>parse error</a>.</li>
+
+   <li><p>If the newly created element is a <a href=3D#ca=
tegory-reset title=3Dcategory-reset>resettable element</a>,
+   invoke its <a href=3D#concept-form-reset-control title=3Dconcept-f=
orm-reset-control>reset algorithm</a>. (This initializes the
+   element's <a href=3D#concept-fe-value title=3Dconcept-fe-value>=
value</a> and <a href=3D#concept-fe-checked title=3Dconcept-fe-c=
hecked>checkedness</a> based on the element's attributes.)</l=
i>
+
+   <li><p>If the element is a <a href=3D#form-associated-=
element>form-associated element</a>, and the <a href=3D#form-=
element-pointer><code title=3D"">form</code> ele=
ment pointer</a> is not null, and there is no <code><a hre=
f=3D#the-template-element>template</a></code>
+   element on the <a href=3D#stack-of-open-elements>stack of open =
elements</a>, and the newly created element is either not
+   <a href=3D#category-form-attr title=3Dcategory-form-attr>reasso=
ciateable</a> or doesn't have a <code title=3Dattr-fae-form>&=
lt;a href=3D#attr-fae-form>form</a></code> attribute, and =
the <var title=3D"">intended parent</var> is in
+   the same <a href=3D#home-subtree>home subtree</a> as the =
element pointed to by the <a href=3D#form-element-pointer><code =
title=3D"">form</code> element pointer</a>, <=
a href=3D#concept-form-association title=3Dconcept-form-association>as=
sociate</a> the newly created element with the
+   <code><a href=3D#the-form-element>form</a></code=
> element pointed to by the <a href=3D#form-element-pointer><=
code title=3D"">form</code> element
+   pointer</a>, and suppress the running of the <a href=3D#rese=
t-the-form-owner>reset the form owner</a> algorithm when
+   the parser subsequently attempts to insert the element.</li>
+
+   <li><p>Return the newly created element.</li>
+
+  </ol><hr><!-- The names of these algorithms are kinda c=
onfusing; e.g. see the confusion in
+         https://www.w3.org/Bugs/Public/show_bug.cgi?id=3D18367
+       Not sure what we could call them instead, though... --><p&g=
t;When the steps below require the user agent to <dfn id=3Dinsert-a-fo=
reign-element>insert a foreign element</dfn> for a token
+  in a given namespace, the user agent must run these steps:</p>
+
+  <ol><li><p>Let the <var title=3D"">a=
djusted insertion location</var> be the <a href=3D#appropriate-p=
lace-for-inserting-a-node>appropriate place for
+   inserting a node</a>.</li>
+
+   <li><p><a href=3D#create-an-element-for-the-token>C=
reate an element for the token</a> in the given namespace, with the=
 intended
+   parent being the element in which the <var title=3D""&gt=
;adjusted insertion location</var> finds
+   itself.</li>
+
+   <li>
+
+    <p>If it is possible to insert an element at the <var title=
=3D"">adjusted insertion
+    location</var>, then insert the newly created element at the &=
lt;var title=3D"">adjusted insertion
+    location</var>.</p>
+
+    <p class=3Dnote>If the <var title=3D"">adjuste=
d insertion location</var> cannot accept more
+    elements, e.g. because it's a <code><a href=3D#document>=
Document</a></code> that already has an element child, then t=
he
+    newly created element is dropped on the floor.</p>
+
+   </li>
+
+   <li><p>Push the element onto the <a href=3D#stack-of-o=
pen-elements>stack of open elements</a> so that it is the new
+   <a href=3D#current-node>current node</a>.</li>
+
+   <li><p>Return the newly created element.</li>
+
+  </ol><p>When the steps below require the user agent to &lt=
;dfn id=3Dinsert-an-html-element>insert an HTML element</dfn> fo=
r a token,
+  the user agent must <a href=3D#insert-a-foreign-element>insert a=
 foreign element</a> for the token, in the <a href=3D#html-names=
pace-0>HTML
+  namespace</a>.</p>
+
+  <hr><p>When the steps below require the user agent to <=
dfn id=3Dadjust-mathml-attributes>adjust MathML attributes</dfn>=
 for a token,
+  then, if the token has an attribute named <code title=3D"&quot=
;>definitionurl</code>, change its name to
+  <code title=3D"">definitionURL</code> (note the =
case difference).</p>
+
+  <p>When the steps below require the user agent to <dfn id=3Da=
djust-svg-attributes>adjust SVG attributes</dfn> for a token,
+  then, for each attribute on the token whose attribute name is one of t=
he ones in the first column
+  of the following table, change the attribute's name to the name given =
in the corresponding cell in
+  the second column. (This fixes the case of SVG attributes that are not=
 all lowercase.)</p>
+
+  <table><thead><tr><th> Attribute name on token=
 <th> Attribute name on element
+   <tbody><tr><td> <code title=3D"">at=
tributename</code> <td> <code title=3D"">attr=
ibuteName</code>
+    <tr><td> <code title=3D"">attributetype&=
lt;/code> <td> <code title=3D"">attributeType&lt=
;/code>
+    <tr><td> <code title=3D"">basefrequency&=
lt;/code> <td> <code title=3D"">baseFrequency&lt=
;/code>
+    <tr><td> <code title=3D"">baseprofile&lt=
;/code> <td> <code title=3D"">baseProfile</co=
de>
+    <tr><td> <code title=3D"">calcmode</c=
ode> <td> <code title=3D"">calcMode</code>
+    <tr><td> <code title=3D"">clippathunits&=
lt;/code> <td> <code title=3D"">clipPathUnits&lt=
;/code>
+    <tr><td> <code title=3D"">contentscriptt=
ype</code> <td> <code title=3D"">contentScrip=
tType</code>
+    <tr><td> <code title=3D"">contentstylety=
pe</code> <td> <code title=3D"">contentStyleT=
ype</code>
+    <tr><td> <code title=3D"">diffuseconstan=
t</code> <td> <code title=3D"">diffuseConstan=
t</code>
+    <tr><td> <code title=3D"">edgemode</c=
ode> <td> <code title=3D"">edgeMode</code>
+    <tr><td> <code title=3D"">externalresour=
cesrequired</code> <td> <code title=3D"">exte=
rnalResourcesRequired</code>
+    <tr><td> <code title=3D"">filterres</=
code> <td> <code title=3D"">filterRes</code&g=
t;
+    <tr><td> <code title=3D"">filterunits&lt=
;/code> <td> <code title=3D"">filterUnits</co=
de>
+    <tr><td> <code title=3D"">glyphref</c=
ode> <td> <code title=3D"">glyphRef</code>
+    <tr><td> <code title=3D"">gradienttransf=
orm</code> <td> <code title=3D"">gradientTran=
sform</code>
+    <tr><td> <code title=3D"">gradientunits&=
lt;/code> <td> <code title=3D"">gradientUnits&lt=
;/code>
+    <tr><td> <code title=3D"">kernelmatrix&l=
t;/code> <td> <code title=3D"">kernelMatrix</=
code>
+    <tr><td> <code title=3D"">kernelunitleng=
th</code> <td> <code title=3D"">kernelUnitLen=
gth</code>
+    <tr><td> <code title=3D"">keypoints</=
code> <td> <code title=3D"">keyPoints</code&g=
t;
+    <tr><td> <code title=3D"">keysplines<=
/code> <td> <code title=3D"">keySplines</code=
>
+    <tr><td> <code title=3D"">keytimes</c=
ode> <td> <code title=3D"">keyTimes</code>
+    <tr><td> <code title=3D"">lengthadjust&l=
t;/code> <td> <code title=3D"">lengthAdjust</=
code>
+    <tr><td> <code title=3D"">limitingconean=
gle</code> <td> <code title=3D"">limitingCone=
Angle</code>
+    <tr><td> <code title=3D"">markerheight&l=
t;/code> <td> <code title=3D"">markerHeight</=
code>
+    <tr><td> <code title=3D"">markerunits&lt=
;/code> <td> <code title=3D"">markerUnits</co=
de>
+    <tr><td> <code title=3D"">markerwidth&lt=
;/code> <td> <code title=3D"">markerWidth</co=
de>
+    <tr><td> <code title=3D"">maskcontentuni=
ts</code> <td> <code title=3D"">maskContentUn=
its</code>
+    <tr><td> <code title=3D"">maskunits</=
code> <td> <code title=3D"">maskUnits</code&g=
t;
+    <tr><td> <code title=3D"">numoctaves<=
/code> <td> <code title=3D"">numOctaves</code=
>
+    <tr><td> <code title=3D"">pathlength<=
/code> <td> <code title=3D"">pathLength</code=
>
+    <tr><td> <code title=3D"">patterncontent=
units</code> <td> <code title=3D"">patternCon=
tentUnits</code>
+    <tr><td> <code title=3D"">patterntransfo=
rm</code> <td> <code title=3D"">patternTransf=
orm</code>
+    <tr><td> <code title=3D"">patternunits&l=
t;/code> <td> <code title=3D"">patternUnits</=
code>
+    <tr><td> <code title=3D"">pointsatx</=
code> <td> <code title=3D"">pointsAtX</code&g=
t;
+    <tr><td> <code title=3D"">pointsaty</=
code> <td> <code title=3D"">pointsAtY</code&g=
t;
+    <tr><td> <code title=3D"">pointsatz</=
code> <td> <code title=3D"">pointsAtZ</code&g=
t;
+    <tr><td> <code title=3D"">preservealpha&=
lt;/code> <td> <code title=3D"">preserveAlpha&lt=
;/code>
+    <tr><td> <code title=3D"">preserveaspect=
ratio</code> <td> <code title=3D"">preserveAs=
pectRatio</code>
+    <tr><td> <code title=3D"">primitiveunits=
</code> <td> <code title=3D"">primitiveUnits&=
lt;/code>
+    <tr><td> <code title=3D"">refx</code&=
gt; <td> <code title=3D"">refX</code>
+    <tr><td> <code title=3D"">refy</code&=
gt; <td> <code title=3D"">refY</code>
+    <tr><td> <code title=3D"">repeatcount&lt=
;/code> <td> <code title=3D"">repeatCount</co=
de>
+    <tr><td> <code title=3D"">repeatdur</=
code> <td> <code title=3D"">repeatDur</code&g=
t;
+    <tr><td> <code title=3D"">requiredextens=
ions</code> <td> <code title=3D"">requiredExt=
ensions</code>
+    <tr><td> <code title=3D"">requiredfeatur=
es</code> <td> <code title=3D"">requiredFeatu=
res</code>
+    <tr><td> <code title=3D"">specularconsta=
nt</code> <td> <code title=3D"">specularConst=
ant</code>
+    <tr><td> <code title=3D"">specularexpone=
nt</code> <td> <code title=3D"">specularExpon=
ent</code>
+    <tr><td> <code title=3D"">spreadmethod&l=
t;/code> <td> <code title=3D"">spreadMethod</=
code>
+    <tr><td> <code title=3D"">startoffset&lt=
;/code> <td> <code title=3D"">startOffset</co=
de>
+    <tr><td> <code title=3D"">stddeviation&l=
t;/code> <td> <code title=3D"">stdDeviation</=
code>
+    <tr><td> <code title=3D"">stitchtiles&lt=
;/code> <td> <code title=3D"">stitchTiles</co=
de>
+    <tr><td> <code title=3D"">surfacescale&l=
t;/code> <td> <code title=3D"">surfaceScale</=
code>
+    <tr><td> <code title=3D"">systemlanguage=
</code> <td> <code title=3D"">systemLanguage&=
lt;/code>
+    <tr><td> <code title=3D"">tablevalues&lt=
;/code> <td> <code title=3D"">tableValues</co=
de>
+    <tr><td> <code title=3D"">targetx</co=
de> <td> <code title=3D"">targetX</code>
+    <tr><td> <code title=3D"">targety</co=
de> <td> <code title=3D"">targetY</code>
+    <tr><td> <code title=3D"">textlength<=
/code> <td> <code title=3D"">textLength</code=
>
+    <tr><td> <code title=3D"">viewbox</co=
de> <td> <code title=3D"">viewBox</code>
+    <tr><td> <code title=3D"">viewtarget<=
/code> <td> <code title=3D"">viewTarget</code=
>
+    <tr><td> <code title=3D"">xchannelselect=
or</code> <td> <code title=3D"">xChannelSelec=
tor</code>
+    <tr><td> <code title=3D"">ychannelselect=
or</code> <td> <code title=3D"">yChannelSelec=
tor</code>
+    <tr><td> <code title=3D"">zoomandpan<=
/code> <td> <code title=3D"">zoomAndPan</code=
>
+  </table><p>When the steps below require the user agent to =
<dfn id=3Dadjust-foreign-attributes>adjust foreign attributes</d=
fn> for a
+  token, then, if any of the attributes on the token match the strings g=
iven in the first column of
+  the following table, let the attribute be a namespaced attribute, with=
 the prefix being the string
+  given in the corresponding cell in the second column, the local name b=
eing the string given in the
+  corresponding cell in the third column, and the namespace being the na=
mespace given in the
+  corresponding cell in the fourth column. (This fixes the use of namesp=
aced attributes, in
+  particular <a href=3D#attr-xml-lang title=3Dattr-xml-lang><co=
de title=3D"">lang</code> attributes in the <span&g=
t;XML
+  namespace</span></a>.)</p>
+
+  <table><thead><tr><th> Attribute name <th&g=
t; Prefix <th> Local name <th> Namespace
+   <tbody><tr><td> <code title=3D"">xl=
ink:actuate</code> <td> <code title=3D"">xlin=
k</code> <td> <code title=3D"">actuate</co=
de> <td> <a href=3D#xlink-namespace>XLink namespace</a&=
gt;
+    <tr><td> <code title=3D"">xlink:arcrole&=
lt;/code> <td> <code title=3D"">xlink</code&g=
t; <td> <code title=3D"">arcrole</code> <t=
d> <a href=3D#xlink-namespace>XLink namespace</a>
+    <tr><td> <code title=3D"">xlink:href<=
/code> <td> <code title=3D"">xlink</code> =
<td> <code title=3D"">href</code> <td> =
<a href=3D#xlink-namespace>XLink namespace</a>
+    <tr><td> <code title=3D"">xlink:role<=
/code> <td> <code title=3D"">xlink</code> =
<td> <code title=3D"">role</code> <td> =
<a href=3D#xlink-namespace>XLink namespace</a>
+    <tr><td> <code title=3D"">xlink:show<=
/code> <td> <code title=3D"">xlink</code> =
<td> <code title=3D"">show</code> <td> =
<a href=3D#xlink-namespace>XLink namespace</a>
+    <tr><td> <code title=3D"">xlink:title&lt=
;/code> <td> <code title=3D"">xlink</code>=
 <td> <code title=3D"">title</code> <td&gt=
; <a href=3D#xlink-namespace>XLink namespace</a>
+    <tr><td> <code title=3D"">xlink:type<=
/code> <td> <code title=3D"">xlink</code> =
<td> <code title=3D"">type</code> <td> =
<a href=3D#xlink-namespace>XLink namespace</a>
+    <tr><td> <code title=3D"">xml:base</c=
ode> <td> <code title=3D"">xml</code> <=
td> <code title=3D"">base</code> <td> <=
a href=3D#xml-namespace>XML namespace</a> <!-- attr-xml-base =
-->
+    <tr><td> <code title=3D"">xml:lang</c=
ode> <td> <code title=3D"">xml</code> <=
td> <code title=3D"">lang</code> <td> <=
a href=3D#xml-namespace>XML namespace</a>
+    <tr><td> <code title=3D"">xml:space</=
code> <td> <code title=3D"">xml</code> &lt=
;td> <code title=3D"">space</code> <td> &l=
t;a href=3D#xml-namespace>XML namespace</a>
+    <tr><td> <code title=3D"">xmlns</code=
> <td> (none) <td> <code title=3D"">xmlns&=
lt;/code> <td> <a href=3D#xmlns-namespace>XMLNS namespace&=
lt;/a>
+    <tr><td> <code title=3D"">xmlns:xlink&lt=
;/code> <td> <code title=3D"">xmlns</code>=
 <td> <code title=3D"">xlink</code> <td&gt=
; <a href=3D#xmlns-namespace>XMLNS namespace</a>
+  </table><hr><p>When the steps below require the user=
 agent to <dfn id=3Dinsert-a-character>insert a character</dfn&g=
t; while processing a
+  token, the user agent must run the following steps:</p>
+
+  <ol><li><p>Let <var title=3D"">data&=
lt;/var> be the characters passed to the algorithm, or, if no
+   characters were explicitly specified, the character of the character =
token being
+   processed.</li>
+
+   <li><p>Let the <var title=3D"">adjusted i=
nsertion location</var> be the <a href=3D#appropriate-place-for-=
inserting-a-node>appropriate
+   place for inserting a node</a>.</li>
+
+   <li>
+
+    <p>If the <var title=3D"">adjusted insertion l=
ocation</var> is in a <code><a href=3D#document>Documen=
t</a></code> node,
+    then abort these steps.
+
+    <p class=3Dnote>The DOM will not let <code><a href=3D=
#document>Document</a></code> nodes have <code><a=
 href=3D#text>Text</a></code> node
+    children, so they are dropped on the floor.</p>
+
+   </li>
+
+   <li>
+
+    <p>If there is a <code><a href=3D#text>Text</a&=
gt;</code> node immediately before the <var title=3D""=
>adjusted insertion
+    location</var>, then append <var title=3D"">da=
ta</var> to that <code><a href=3D#text>Text</a>&l=
t;/code> node's data.</p>
+
+    <p>Otherwise, create a new <code><a href=3D#text>T=
ext</a></code> node whose data is <var title=3D"&quot=
;>data</var> and
+    whose <code title=3Ddom-Node-ownerDocument><a href=3D#dom-n=
ode-ownerdocument>ownerDocument</a></code> is the same as =
that of the
+    element in which the <var title=3D"">adjusted insert=
ion location</var> finds itself, and insert
+    the newly created node at the <var title=3D"">adjust=
ed insertion location</var>.</p>
+
+   </li>
+
+  </ol><div class=3Dexample>
+
+   <p>Here are some sample inputs to the parser and the correspond=
ing number of <code><a href=3D#text>Text</a></code&g=
t;
+   nodes that they result in, assuming a user agent that executes script=
s.</p>
+
+   <table><thead><tr><th>Input <th>Number =
of <code><a href=3D#text>Text</a></code> nodes
+    <tbody><tr><td><pre>A<script>
+var script =3D document.getElementsByTagName(=
'script')[0];
+document.body.removeChild(script);
+</script>B</pre>
+      <td>One <code><a href=3D#text>Text</a><=
/code> node in the document, containing "AB".
+     <tr><td><pre>A<script>
+var text =3D document.createTextNode('B');
+document.body.appendChild(text);
+</script>C</pre>
+      <td>Three <code><a href=3D#text>Text</a>&l=
t;/code> nodes; "A" before the script, the script's contents=
, and "BC" after the script (the parser appends to the <code=
><a href=3D#text>Text</a></code> node created by the=
 script).
+     <tr><td><pre>A<script>
+var text =3D document.getElementsByTagName('s=
cript')[0].firstChild;
+text.data =3D 'B';
+document.body.appendChild(text);
+</script>C</pre>
+      <td>Two adjacent <code><a href=3D#text>Text</=
a></code> nodes in the document, containing "A" and &q=
uot;BC".
+     <tr><td><pre>A<table>B<tr&am=
p;gt;C</tr>D</table></pre>
+      <td>One <code><a href=3D#text>Text</a><=
/code> node before the table, containing "ABCD". (This is ca=
used by <a href=3D#foster-parent title=3D"foster parent">=
foster parenting</a>.)
+     <tr><td><pre>A<table><tr&amp=
;gt; B</tr> C</table></p=
re>
+      <td>One <code><a href=3D#text>Text</a><=
/code> node before the table, containing "A B C=
" (A-space-B-space-C). (This is caused by <a href=3D#foster-paren=
t title=3D"foster parent">foster parenting</a>.)
+     <tr><td><pre>A<table><tr&amp=
;gt; B</tr> </em>C</=
table></pre>
+      <td>One <code><a href=3D#text>Text</a><=
/code> node before the table, containing "A BC" (A-=
space-B-C), and one <code><a href=3D#text>Text</a></=
code> node inside the table (as a child of a <code><a href=3D=
#the-tbody-element>tbody</a></code>) with a single space c=
haracter. (Space characters separated from non-space characters by non-ch=
aracter tokens are not affected by <a href=3D#foster-parent title=3D&q=
uot;foster parent">foster parenting</a>, even if those othe=
r tokens then get ignored.)
+   </table></div>
+
+  <hr><p>When the steps below require the user agent to <=
dfn id=3Dinsert-a-comment>insert a comment</dfn> while processin=
g a
+  comment token, optionally with an explicitly insertion position <va=
r title=3D"">position</var>, the
+  user agent must run the following steps:</p>
+
+  <ol><li><p>Let <var title=3D"">data&=
lt;/var> be the data given in the comment token being
+   processed.</li>
+
+   <li><p>If <var title=3D"">position</va=
r> was specified, then let the <var title=3D"">adjuste=
d
+   insertion location</var> be <var title=3D"">pos=
ition</var>. Otherwise, let <var title=3D"">adjuste=
d
+   insertion location</var> be the <a href=3D#appropriate-place=
-for-inserting-a-node>appropriate place for inserting a node</a>=
.</li>
+
+   <li><p>Create a <code><a href=3D#comment-0>Co=
mment</a></code> node whose <code title=3D"">=
data</code> attribute is set to
+   <var title=3D"">data</var> and whose <code t=
itle=3Ddom-Node-ownerDocument><a href=3D#dom-node-ownerdocument>=
ownerDocument</a></code> is
+   the same as that of the node in which the <var title=3D"&quot=
;>adjusted insertion location</var> finds
+   itself.</p>
+
+   <li><p>Insert the newly created node at the <var title=
=3D"">adjusted insertion
+   location</var>.</li>
+
+  </ol><hr><p id=3Dmutation-during-parsing>DOM mutatio=
n events must not fire for changes caused by the UA
+  parsing the document. This includes the parsing of any content inserte=
d using <code title=3Ddom-document-write><a href=3D#dom-document=
-write>document.write()</a></code> and <code title=3Ddo=
m-document-writeln><a href=3D#dom-document-writeln>document.writ=
eln()</a></code> calls. <a href=3D#refsDOMEVENTS>[DOMEV=
ENTS]</a></p>
+
+  <p>However, mutation observers <em>do</em> fire, as =
required by the DOM specification.</p>
+
+
+
+  <h5 id=3Dparsing-elements-that-contain-only-text><span class=3D=
secno>12.2.5.2 </span>Parsing elements that contain only text&lt=
;/h5>
+
+  <p>The <dfn id=3Dgeneric-raw-text-element-parsing-algorithm&g=
t;generic raw text element parsing algorithm</dfn> and the <dfn =
id=3Dgeneric-rcdata-element-parsing-algorithm>generic RCDATA element
+  parsing algorithm</dfn> consist of the following steps. These al=
gorithms are always invoked in
+  response to a start tag token.</p>
+
+  <ol><li><p><a href=3D#insert-an-html-element>I=
nsert an HTML element</a> for the token.</li>
+
+   <li><p>If the algorithm that was invoked is the <a hre=
f=3D#generic-raw-text-element-parsing-algorithm>generic raw text eleme=
nt parsing
+   algorithm</a>, switch the tokenizer to the <a href=3D#rawtex=
t-state>RAWTEXT state</a>; otherwise the algorithm
+   invoked was the <a href=3D#generic-rcdata-element-parsing-algorith=
m>generic RCDATA element parsing algorithm</a>, switch the token=
izer to
+   the <a href=3D#rcdata-state>RCDATA state</a>.</li>
+
+   <li><p>Let the <a href=3D#original-insertion-mode>o=
riginal insertion mode</a> be the current <a href=3D#insertion-m=
ode>insertion
+   mode</a>.</p>
+
+   <li><p>Then, switch the <a href=3D#insertion-mode>i=
nsertion mode</a> to "<a href=3D#parsing-main-incdata title=
=3D"insertion mode:
+   text">text</a>".</li>
+
+  </ol><h5 id=3Dclosing-elements-that-have-implied-end-tags>=
<span class=3Dsecno>12.2.5.3 </span>Closing elements that hav=
e implied end tags</h5>
+
+  <p>When the steps below require the UA to <dfn id=3Dgenerate-=
implied-end-tags>generate implied end
+  tags</dfn>, then, while the <a href=3D#current-node>curren=
t node</a> is a
+  <code><a href=3D#the-dd-element>dd</a></code> =
element, a <code><a href=3D#the-dt-element>dt</a></c=
ode> element, an
+  <code><a href=3D#the-li-element>li</a></code> =
element, an <code><a href=3D#the-option-element>option</a&=
gt;</code> element, an
+  <code><a href=3D#the-optgroup-element>optgroup</a>&l=
t;/code> element, a <code><a href=3D#the-p-element>p</a=
></code> element, an
+  <code><a href=3D#the-rp-element>rp</a></code> =
element, or an <code><a href=3D#the-rt-element>rt</a>&l=
t;/code> element, the UA must
+  pop the <a href=3D#current-node>current node</a> off the &=
lt;a href=3D#stack-of-open-elements>stack of open
+  elements</a>.</p>
+
+  <p>If a step requires the UA to generate implied end tags but li=
sts
+  an element to exclude from the process, then the UA must perform the
+  above steps as if that element was not in the above list.</p>
+
+
+
+  <h5 id=3Dparsing-main-inhtml><span class=3Dsecno>12.2.5.4 =
</span>The rules for parsing tokens in HTML content</h5>
+
+
+  <h6 id=3Dthe-initial-insertion-mode><span class=3Dsecno>12=
.2.5.4.1 </span>The "<dfn title=3D"insertion mode: ini=
tial">initial</dfn>" insertion mode</h6>
+
+  <p>When the user agent is to apply the rules for the "<a=
 href=3D#the-initial-insertion-mode title=3D"insertion mode:
+  initial">initial</a>" <a href=3D#insertion-mode&=
gt;insertion mode</a>, the user agent must handle the token as
+  follows:</p>
+
+  <dl class=3Dswitch><dt>A character token that is one of U+=
0009 CHARACTER
+   TABULATION, U+000A LINE FEED (LF), U+000C FORM FEED (FF),
+   U+000D CARRIAGE RETURN (CR), or U+0020 SPACE</dt>
+   <dd>
+    <p>Ignore the token.</p>
+   </dd>
+
+   <dt>A comment token</dt>
+   <dd>
+    <p><a href=3D#insert-a-comment>Insert a comment</a&gt=
; as the last child of the <code><a href=3D#document>Document=
</a></code> object.</p>
+   </dd>
+
+   <dt>A DOCTYPE token</dt>
+   <dd>
+
+    <p>If the DOCTYPE token's name is not a <a href=3D#case-sen=
sitive>case-sensitive</a> match for the string "<code ti=
tle=3D"">html</code>", or the token's public iden=
tifier is not missing, or the token's system
+    identifier is neither missing nor a <a href=3D#case-sensitive>=
case-sensitive</a> match for the string
+    "<code><a href=3D#about:legacy-compat>about:legacy-=
compat</a></code>", and none of the sets of conditions i=
n the following list are
+    matched, then there is a <a href=3D#parse-error>parse error&lt=
;/a>.</p>
+
+    <ul><!-- only things that trigger no-quirks mode and were v=
alid in some other spec are allowed in
+     this list --><li>The DOCTYPE token's name is a <a href=3D=
#case-sensitive>case-sensitive</a> match for the string "&l=
t;code title=3D"">html</code>", the token's publi=
c identifier is the <a href=3D#case-sensitive>case-sensitive</a&=
gt; string
+     "<code title=3D"">-//W3C//DTD HTML&am=
p;nbsp;4.0//EN</code>", and the token's system identifier
+     is either missing or the <a href=3D#case-sensitive>case-sensi=
tive</a> string "<code title=3D"">http://www.w=
3.org/TR/REC-html40/strict.dtd</code>".</li>
+
+     <li>The DOCTYPE token's name is a <a href=3D#case-sensitiv=
e>case-sensitive</a> match for the string "<code title=3D=
"">html</code>", the token's public identifier is=
 the <a href=3D#case-sensitive>case-sensitive</a> string
+     "<code title=3D"">-//W3C//DTD HTML&am=
p;nbsp;4.01//EN</code>", and the token's system identifier
+     is either missing or the <a href=3D#case-sensitive>case-sensi=
tive</a> string "<code title=3D"">http://www.w=
3.org/TR/html4/strict.dtd</code>".</li>
+
+     <li>The DOCTYPE token's name is a <a href=3D#case-sensitiv=
e>case-sensitive</a> match for the string "<code title=3D=
"">html</code>", the token's public identifier is=
 the <a href=3D#case-sensitive>case-sensitive</a> string
+     "<code title=3D"">-//W3C//DTD XHTML&a=
mp;nbsp;1.0 Strict//EN</code>", and the token's syste=
m
+     identifier is the <a href=3D#case-sensitive>case-sensitive&lt=
;/a> string "<code title=3D"">http://www.w3.org/T=
R/xhtml1/DTD/xhtml1-strict.dtd</code>".</li>
+
+     <li>The DOCTYPE token's name is a <a href=3D#case-sensitiv=
e>case-sensitive</a> match for the string "<code title=3D=
"">html</code>", the token's public identifier is=
 the <a href=3D#case-sensitive>case-sensitive</a> string
+     "<code title=3D"">-//W3C//DTD XHTML&a=
mp;nbsp;1.1//EN</code>", and the token's system identifier
+     is the <a href=3D#case-sensitive>case-sensitive</a> str=
ing "<code title=3D"">http://www.w3.org/TR/xhtml11/D=
TD/xhtml11.dtd</code>".</li>
+
+    </ul><p>Conformance checkers may, based on the values (i=
ncluding presence or lack thereof) of the
+    DOCTYPE token's name, public identifier, or system identifier, switc=
h to a conformance checking
+    mode for another language (e.g. based on the DOCTYPE token a conform=
ance checker could recognize
+    that the document is an HTML4-era document, and defer to an HTML4 co=
nformance checker.)</p>
+
+    <p>Append a <code><a href=3D#documenttype>Document=
Type</a></code> node to the <code><a href=3D#documen=
t>Document</a></code> node, with the <code title=3D&quo=
t;">name</code> attribute set to the name given in the DOCT=
YPE token, or the empty string
+    if the name was missing; the <code title=3D"">public=
Id</code> attribute set to the public
+    identifier given in the DOCTYPE token, or the empty string if the pu=
blic identifier was missing;
+    the <code title=3D"">systemId</code> attribute=
 set to the system identifier given in the DOCTYPE
+    token, or the empty string if the system identifier was missing; and=
 the other attributes
+    specific to <code><a href=3D#documenttype>DocumentType&l=
t;/a></code> objects set to null and empty lists as appropriate.
+    Associate the <code><a href=3D#documenttype>DocumentType=
</a></code> node with the <code><a href=3D#document&=
gt;Document</a></code> object so that it is
+    returned as the value of the <code title=3D"">doctyp=
e</code> attribute of the
+    <code><a href=3D#document>Document</a></code&gt=
; object.</p>
+
+    <p id=3Dquirks-mode-doctypes>Then, if the document is <em&g=
t;not</em> <a href=3D#an-iframe-srcdoc-document>an <code&g=
t;iframe</code>
+    <code title=3Dattr-iframe-srcdoc>srcdoc</code> document&=
lt;/a>, and the DOCTYPE token matches
+    one of the conditions in the following list, then set the <code&g=
t;<a href=3D#document>Document</a></code> to <a href=
=3D#quirks-mode>quirks
+    mode</a>:</p>
+
+    <ul class=3Dbrief><li> The <i>force-quirks flag&lt=
;/i> is set to <i>on</i>. </li>
+     <li> The name is set to anything other than "<code ti=
tle=3D"">html</code>" (compared <a href=3D#cas=
e-sensitive title=3Dcase-sensitive>case-sensitively</a>). </l=
i>
+     <li> The public identifier starts with: "<code title=3D=
"">+//Silmaril//dtd html Pro v0r11 19970101//<!--EN-->=
</code>" </li>
+     <li> The public identifier starts with: "<code title=3D=
"">-//AdvaSoft Ltd//DTD HTML 3.0 asWedit + extensions//<!=
--EN--></code>" </li>
+     <li> The public identifier starts with: "<code title=3D=
"">-//AS//DTD HTML 3.0 asWedit + extensions//<!--EN-->=
</code>" </li>
+     <li> The public identifier starts with: "<code title=3D=
"">-//IETF//DTD HTML 2.0 Level 1//<!--EN--></code&g=
t;" </li>
+     <li> The public identifier starts with: "<code title=3D=
"">-//IETF//DTD HTML 2.0 Level 2//<!--EN--></code&g=
t;" </li>
+     <li> The public identifier starts with: "<code title=3D=
"">-//IETF//DTD HTML 2.0 Strict Level 1//<!--EN--><=
/code>" </li>
+     <li> The public identifier starts with: "<code title=3D=
"">-//IETF//DTD HTML 2.0 Strict Level 2//<!--EN--><=
/code>" </li>
+     <li> The public identifier starts with: "<code title=3D=
"">-//IETF//DTD HTML 2.0 Strict//<!--EN--></code&gt=
;" </li>
+     <li> The public identifier starts with: "<code title=3D=
"">-//IETF//DTD HTML 2.0//<!--EN--></code>"=
 </li>
+     <li> The public identifier starts with: "<code title=3D=
"">-//IETF//DTD HTML 2.1E//<!--EN--></code>&quot=
; </li>
+     <li> The public identifier starts with: "<code title=3D=
"">-//IETF//DTD HTML 3.0//<!--EN--></code>"=
 </li>
+   <!--<li> The public identifier is set to: "<code tit=
le=3D"">-//IETF//DTD HTML 3.0//EN//</code>" </=
li>-->
+     <li> The public identifier starts with: "<code title=3D=
"">-//IETF//DTD HTML 3.2 Final//<!--EN--></code>=
" </li>
+     <li> The public identifier starts with: "<code title=3D=
"">-//IETF//DTD HTML 3.2//<!--EN--></code>"=
 </li>
+     <li> The public identifier starts with: "<code title=3D=
"">-//IETF//DTD HTML 3//<!--EN--></code>" &=
lt;/li>
+     <li> The public identifier starts with: "<code title=3D=
"">-//IETF//DTD HTML Level 0//<!--EN--></code>&q=
uot; </li>
+   <!--<li> The public identifier is set to: "<code tit=
le=3D"">-//IETF//DTD HTML Level 0//EN//2.0</code>&quot=
; </li>-->
+     <li> The public identifier starts with: "<code title=3D=
"">-//IETF//DTD HTML Level 1//<!--EN--></code>&q=
uot; </li>
+   <!--<li> The public identifier is set to: "<code tit=
le=3D"">-//IETF//DTD HTML Level 1//EN//2.0</code>&quot=
; </li>-->
+     <li> The public identifier starts with: "<code title=3D=
"">-//IETF//DTD HTML Level 2//<!--EN--></code>&q=
uot; </li>
+   <!--<li> The public identifier is set to: "<code tit=
le=3D"">-//IETF//DTD HTML Level 2//EN//2.0</code>&quot=
; </li>-->
+     <li> The public identifier starts with: "<code title=3D=
"">-//IETF//DTD HTML Level 3//<!--EN--></code>&q=
uot; </li>
+   <!--<li> The public identifier is set to: "<code tit=
le=3D"">-//IETF//DTD HTML Level 3//EN//3.0</code>&quot=
; </li>-->
+     <li> The public identifier starts with: "<code title=3D=
"">-//IETF//DTD HTML Strict Level 0//<!--EN--></cod=
e>" </li>
+   <!--<li> The public identifier is set to: "<code tit=
le=3D"">-//IETF//DTD HTML Strict Level 0//EN//2.0</code&g=
t;" </li>-->
+     <li> The public identifier starts with: "<code title=3D=
"">-//IETF//DTD HTML Strict Level 1//<!--EN--></cod=
e>" </li>
+   <!--<li> The public identifier is set to: "<code tit=
le=3D"">-//IETF//DTD HTML Strict Level 1//EN//2.0</code&g=
t;" </li>-->
+     <li> The public identifier starts with: "<code title=3D=
"">-//IETF//DTD HTML Strict Level 2//<!--EN--></cod=
e>" </li>
+   <!--<li> The public identifier is set to: "<code tit=
le=3D"">-//IETF//DTD HTML Strict Level 2//EN//2.0</code&g=
t;" </li>-->
+     <li> The public identifier starts with: "<code title=3D=
"">-//IETF//DTD HTML Strict Level 3//<!--EN--></cod=
e>" </li>
+   <!--<li> The public identifier is set to: "<code tit=
le=3D"">-//IETF//DTD HTML Strict Level 3//EN//3.0</code&g=
t;" </li>-->
+     <li> The public identifier starts with: "<code title=3D=
"">-//IETF//DTD HTML Strict//<!--EN--></code>&qu=
ot; </li>
+   <!--<li> The public identifier is set to: "<code tit=
le=3D"">-//IETF//DTD HTML Strict//EN//2.0</code>"=
 </li>-->
+   <!--<li> The public identifier is set to: "<code tit=
le=3D"">-//IETF//DTD HTML Strict//EN//3.0</code>"=
 </li>-->
+     <li> The public identifier starts with: "<code title=3D=
"">-//IETF//DTD HTML//<!--EN--></code>" &lt=
;/li>
+   <!--<li> The public identifier is set to: "<code tit=
le=3D"">-//IETF//DTD HTML//EN//2.0</code>" </l=
i>-->
+   <!--<li> The public identifier is set to: "<code tit=
le=3D"">-//IETF//DTD HTML//EN//3.0</code>" </l=
i>-->
+     <li> The public identifier starts with: "<code title=3D=
"">-//Metrius//DTD Metrius Presentational//<!--EN-->&l=
t;/code>" </li>
+     <li> The public identifier starts with: "<code title=3D=
"">-//Microsoft//DTD Internet Explorer 2.0 HTML Strict//<=
!--EN--></code>" </li>
+     <li> The public identifier starts with: "<code title=3D=
"">-//Microsoft//DTD Internet Explorer 2.0 HTML//<!--EN--=
></code>" </li>
+     <li> The public identifier starts with: "<code title=3D=
"">-//Microsoft//DTD Internet Explorer 2.0 Tables//<!--EN=
--></code>" </li>
+     <li> The public identifier starts with: "<code title=3D=
"">-//Microsoft//DTD Internet Explorer 3.0 HTML Strict//<=
!--EN--></code>" </li>
+     <li> The public identifier starts with: "<code title=3D=
"">-//Microsoft//DTD Internet Explorer 3.0 HTML//<!--EN--=
></code>" </li>
+     <li> The public identifier starts with: "<code title=3D=
"">-//Microsoft//DTD Internet Explorer 3.0 Tables//<!--EN=
--></code>" </li>
+     <li> The public identifier starts with: "<code title=3D=
"">-//Netscape Comm. Corp.//DTD HTML//<!--EN--></co=
de>" </li>
+     <li> The public identifier starts with: "<code title=3D=
"">-//Netscape Comm. Corp.//DTD Strict HTML//<!--EN-->=
</code>" </li>
+     <li> The public identifier starts with: "<code title=3D=
"">-//O'Reilly and Associates//DTD HTML 2.0//<!--EN-->=
</code>" </li>
+     <li> The public identifier starts with: "<code title=3D=
"">-//O'Reilly and Associates//DTD HTML Extended 1.0//<!-=
-EN--></code>" </li>
+     <li> The public identifier starts with: "<code title=3D=
"">-//O'Reilly and Associates//DTD HTML Extended Relaxed 1.0=
//<!--EN--></code>" </li>
+     <li> The public identifier starts with: "<code title=3D=
"">-//SoftQuad Software//DTD HoTMetaL PRO 6.0::19990601::ext=
ensions to HTML 4.0//<!--EN--></code>" </li>
+     <li> The public identifier starts with: "<code title=3D=
"">-//SoftQuad//DTD HoTMetaL PRO 4.0::19971010::extensions t=
o HTML 4.0//<!--EN--></code>" </li>
+     <li> The public identifier starts with: "<code title=3D=
"">-//Spyglass//DTD HTML 2.0 Extended//<!--EN--></c=
ode>" </li>
+     <li> The public identifier starts with: "<code title=3D=
"">-//SQ//DTD HTML 2.0 HoTMetaL + extensions//<!--EN--&gt=
;</code>" </li>
+     <li> The public identifier starts with: "<code title=3D=
"">-//Sun Microsystems Corp.//DTD HotJava HTML//<!--EN--&=
gt;</code>" </li>
+     <li> The public identifier starts with: "<code title=3D=
"">-//Sun Microsystems Corp.//DTD HotJava Strict HTML//<!=
--EN--></code>" </li>
+     <li> The public identifier starts with: "<code title=3D=
"">-//W3C//DTD HTML 3 1995-03-24//<!--EN--></code&g=
t;" </li>
+     <li> The public identifier starts with: "<code title=3D=
"">-//W3C//DTD HTML 3.2 Draft//<!--EN--></code>&=
quot; </li>
+     <li> The public identifier starts with: "<code title=3D=
"">-//W3C//DTD HTML 3.2 Final//<!--EN--></code>&=
quot; </li>
+     <li> The public identifier starts with: "<code title=3D=
"">-//W3C//DTD HTML 3.2//<!--EN--></code>" =
</li>
+     <li> The public identifier starts with: "<code title=3D=
"">-//W3C//DTD HTML 3.2S Draft//<!--EN--></code>=
" </li>
+     <li> The public identifier starts with: "<code title=3D=
"">-//W3C//DTD HTML 4.0 Frameset//<!--EN--></code&g=
t;" </li>
+     <li> The public identifier starts with: "<code title=3D=
"">-//W3C//DTD HTML 4.0 Transitional//<!--EN--></co=
de>" </li>
+     <li> The public identifier starts with: "<code title=3D=
"">-//W3C//DTD HTML Experimental 19960712//<!--EN-->&l=
t;/code>" </li>
+     <li> The public identifier starts with: "<code title=3D=
"">-//W3C//DTD HTML Experimental 970421//<!--EN--><=
/code>" </li>
+     <li> The public identifier starts with: "<code title=3D=
"">-//W3C//DTD W3 HTML//<!--EN--></code>" &=
lt;/li>
+     <li> The public identifier starts with: "<code title=3D=
"">-//W3O//DTD W3 HTML 3.0//<!--EN--></code>&quo=
t; </li>
+   <!--<li> The public identifier is set to: "<code tit=
le=3D"">-//W3O//DTD W3 HTML 3.0//EN//</code>" &lt=
;/li>-->
+     <li> The public identifier is set to: "<code title=3D=
"">-//W3O//DTD W3 HTML Strict 3.0//EN//</code>" &=
lt;/li>
+     <li> The public identifier starts with: "<code title=3D=
"">-//WebTechs//DTD Mozilla HTML 2.0//<!--EN--></co=
de>" </li>
+     <li> The public identifier starts with: "<code title=3D=
"">-//WebTechs//DTD Mozilla HTML//<!--EN--></code&g=
t;" </li>
+     <li> The public identifier is set to: "<code title=3D=
"">-/W3C/DTD HTML 4.0 Transitional/EN</code>" &lt=
;/li>
+     <li> The public identifier is set to: "<code title=3D=
"">HTML</code>" </li>
+     <li> The system identifier is set to: "<code title=3D=
"">http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dt=
d</code>" </li>
+     <li> The system identifier is missing and the public identifi=
er starts with: "<code title=3D"">-//W3C//DTD HTML 4=
.01 Frameset//<!--EN--></code>" </li>
+     <li> The system identifier is missing and the public identifi=
er starts with: "<code title=3D"">-//W3C//DTD HTML 4=
.01 Transitional//<!--EN--></code>" </li>
+    </ul><p>Otherwise, if the document is <em>not</=
em> <a href=3D#an-iframe-srcdoc-document>an <code>iframe&l=
t;/code> <code title=3Dattr-iframe-srcdoc>srcdoc</code> do=
cument</a>, and the DOCTYPE token matches one of
+    the conditions in the following list, then set the <code><a=
 href=3D#document>Document</a></code> to <a href=3D#lim=
ited-quirks-mode>limited-quirks
+    mode</a>:</p>
+
+    <ul class=3Dbrief><li> The public identifier starts with=
: "<code title=3D"">-//W3C//DTD XHTML 1.0 Frameset//=
<!--EN--></code>" </li>
+     <li> The public identifier starts with: "<code title=3D=
"">-//W3C//DTD XHTML 1.0 Transitional//<!--EN--></c=
ode>" </li>
+     <li> The system identifier is not missing and the public iden=
tifier starts with: "<code title=3D"">-//W3C//DTD HT=
ML 4.01 Frameset//<!--EN--></code>" </li>
+     <li> The system identifier is not missing and the public iden=
tifier starts with: "<code title=3D"">-//W3C//DTD HT=
ML 4.01 Transitional//<!--EN--></code>" </li>
+    </ul><p>The system identifier and public identifier stri=
ngs must be compared to the values given in
+    the lists above in an <a href=3D#ascii-case-insensitive>ASCII =
case-insensitive</a> manner. A system identifier whose
+    value is the empty string is not considered missing for the purposes=
 of the conditions
+    above.</p>
+
+    <p>Then, switch the <a href=3D#insertion-mode>insertion =
mode</a> to "<a href=3D#the-before-html-insertion-mode titl=
e=3D"insertion mode: before
+    html">before html</a>".</p>
+
+   </dd>
+
+   <dt>Anything else</dt>
+   <dd>
+
+    <p>If the document is <em>not</em> <a href=3D#a=
n-iframe-srcdoc-document>an <code>iframe</code> <code t=
itle=3Dattr-iframe-srcdoc>srcdoc</code> document</a>, then=
 this is a <a href=3D#parse-error>parse
+    error</a>; set the <code><a href=3D#document>Docum=
ent</a></code> to <a href=3D#quirks-mode>quirks mode&lt=
;/a>.</p>
+
+    <p>In any case, switch the <a href=3D#insertion-mode>ins=
ertion mode</a> to "<a href=3D#the-before-html-insertion-mo=
de title=3D"insertion mode: before
+    html">before html</a>", then reprocess the token.=
</p>
+
+   </dd>
+
+  </dl><h6 id=3Dthe-before-html-insertion-mode><span clas=
s=3Dsecno>12.2.5.4.2 </span>The "<dfn title=3D"inse=
rtion mode: before html">before html</dfn>" insertion =
mode</h6>
+
+  <p>When the user agent is to apply the rules for the "<a=
 href=3D#the-before-html-insertion-mode title=3D"insertion mode: bef=
ore
+  html">before html</a>" <a href=3D#insertion-mode=
>insertion mode</a>, the user agent must handle the token as
+  follows:</p>
+
+  <dl class=3Dswitch><dt>A DOCTYPE token</dt>
+   <dd>
+    <p><a href=3D#parse-error>Parse error</a>. Ignore =
the token.</p>
+   </dd>
+
+   <dt>A comment token</dt>
+   <dd>
+    <p><a href=3D#insert-a-comment>Insert a comment</a&gt=
; as the last child of the <code><a href=3D#document>Document=
</a></code> object.</p>
+   </dd>
+
+   <dt>A character token that is one of U+0009 CHARACTER TABULATIO=
N, U+000A LINE FEED (LF), U+000C
+   FORM FEED (FF), U+000D CARRIAGE RETURN (CR), or U+0020 SPACE</dt&g=
t;
+   <dd>
+    <p>Ignore the token.</p>
+   </dd>
+
+   <dt>A start tag whose tag name is "html"</dt>
+   <dd>
+
+    <p><a href=3D#create-an-element-for-the-token>Create an =
element for the token</a> in the <a href=3D#html-namespace-0>=
HTML namespace</a>, with the
+    <code><a href=3D#document>Document</a></code&gt=
; as the intended parent. Append it to the <code><a href=3D#docu=
ment>Document</a></code> object. Put
+    this element in the <a href=3D#stack-of-open-elements>stack of=
 open elements</a>.</p>
+
+    <p id=3Dparser-appcache>If the <code><a href=3D#docum=
ent>Document</a></code> is being loaded as part of <a h=
ref=3D#navigate title=3Dnavigate>navigation</a> of a <a href=3D=
#browsing-context>browsing context</a>, then: if the newly
+    created element has a <code title=3Dattr-html-manifest><a h=
ref=3D#attr-html-manifest>manifest</a></code> attribute wh=
ose value is
+    not the empty string, then <a href=3D#resolve-a-url title=3D&quot=
;resolve a url">resolve</a> the value of that
+    attribute to an <a href=3D#absolute-url>absolute URL</a>=
, relative to the newly created element, and if that is
+    successful, run the <a href=3D#concept-appcache-init title=3Dconc=
ept-appcache-init>application cache selection
+    algorithm</a> with the result of applying the <a href=3D#co=
ncept-url-serializer title=3Dconcept-url-serializer>URL
+    serializer</a> algorithm to the resulting <a href=3D#parsed=
-url>parsed URL</a> with the <i>exclude
+    fragment flag</i> set; otherwise, if there is no such attribut=
e, or its value is the empty
+    string, or resolving its value fails, run the <a href=3D#concept-=
appcache-init title=3Dconcept-appcache-init>application
+    cache selection algorithm</a> with no manifest. The algorithm =
must be passed the
+    <code><a href=3D#document>Document</a></code&gt=
; object.</p>
+
+    <p>Switch the <a href=3D#insertion-mode>insertion mode&l=
t;/a> to "<a href=3D#the-before-head-insertion-mode title=3D&q=
uot;insertion mode: before head">before
+    head</a>".</p>
+
+   </dd>
+
+   <dt>An end tag whose tag name is one of: "head", &quo=
t;body", "html", "br"</dt>
+   <dd>
+    <p>Act as described in the "anything else" entry bel=
ow.</p>
+   </dd>
+
+   <dt>Any other end tag</dt>
+   <dd>
+    <p><a href=3D#parse-error>Parse error</a>. Ignore =
the token.</p>
+   </dd>
+
+   <dt>Anything else</dt>
+   <dd>
+
+    <p>Create an <code><a href=3D#the-html-element>htm=
l</a></code> element whose <code title=3Ddom-Node-ownerDoc=
ument><a href=3D#dom-node-ownerdocument>ownerDocument</a>&=
lt;/code> is the <code><a href=3D#document>Document</a&=
gt;</code> object. Append
+    it to the <code><a href=3D#document>Document</a>&l=
t;/code> object. Put this element in the <a href=3D#stack-of-open-e=
lements>stack of open
+    elements</a>.</p>
+
+    <p>If the <code><a href=3D#document>Document</a=
></code> is being loaded as part of <a href=3D#navigate title=
=3Dnavigate>navigation</a> of a <a href=3D#browsing-context&g=
t;browsing context</a>, then: run the <a href=3D#concept-appcach=
e-init title=3Dconcept-appcache-init>application cache selection algor=
ithm</a> with no manifest,
+    passing it the <code><a href=3D#document>Document</a&=
gt;</code> object.</p>
+
+    <p>Switch the <a href=3D#insertion-mode>insertion mode&l=
t;/a> to "<a href=3D#the-before-head-insertion-mode title=3D&q=
uot;insertion mode: before head">before
+    head</a>", then reprocess the token.</p>
+
+   </dd>
+
+  </dl><p>The root element can end up being removed from the=
 <code><a href=3D#document>Document</a></code> ob=
ject, e.g. by
+  scripts; nothing in particular happens in such cases, content continue=
s being appended to the
+  nodes as described in the next section.</p>
+
+
+  <h6 id=3Dthe-before-head-insertion-mode><span class=3Dsecno&g=
t;12.2.5.4.3 </span>The "<dfn title=3D"insertion mode:=
 before head">before head</dfn>" insertion mode</h6=
>
+
+  <p>When the user agent is to apply the rules for the "<a=
 href=3D#the-before-head-insertion-mode title=3D"insertion mode: bef=
ore
+  head">before head</a>" <a href=3D#insertion-mode=
>insertion mode</a>, the user agent must handle the token as
+  follows:</p>
+
+  <dl class=3Dswitch><dt>A character token that is one of U+=
0009 CHARACTER
+   TABULATION, U+000A LINE FEED (LF), U+000C FORM FEED (FF),
+   U+000D CARRIAGE RETURN (CR), or U+0020 SPACE</dt>
+   <dd>
+    <p>Ignore the token.</p> <!-- :-( -->
+   </dd>
+
+   <dt>A comment token</dt>
+   <dd>
+    <p><a href=3D#insert-a-comment>Insert a comment</a&gt=
;.</p>
+   </dd>
+
+   <dt>A DOCTYPE token</dt>
+   <dd>
+    <p><a href=3D#parse-error>Parse error</a>. Ignore =
the token.</p>
+   </dd>
+
+   <dt>A start tag whose tag name is "html"</dt>
+   <dd>
+    <p>Process the token <a href=3D#using-the-rules-for>usin=
g the rules for</a> the "<a href=3D#parsing-main-inbody tit=
le=3D"insertion mode: in
+    body">in body</a>" <a href=3D#insertion-mode&g=
t;insertion mode</a>.</p>
+   </dd>
+
+   <dt>A start tag whose tag name is "head"</dt>
+   <dd>
+
+    <p><a href=3D#insert-an-html-element>Insert an HTML elem=
ent</a> for the token.</p>
+
+    <p>Set the <a href=3D#head-element-pointer><code titl=
e=3D"">head</code> element pointer</a> to the ne=
wly created
+    <code><a href=3D#the-head-element>head</a></cod=
e> element.</p>
+
+    <p>Switch the <a href=3D#insertion-mode>insertion mode&l=
t;/a> to "<a href=3D#parsing-main-inhead title=3D"inserti=
on mode: in head">in
+    head</a>".</p>
+
+   </dd>
+
+   <dt>An end tag whose tag name is one of: "head", &quo=
t;body", "html", "br"</dt>
+   <dd>
+
+    <p>Act as described in the "anything else" entry bel=
ow.</p>
+
+   </dd>
+
+   <dt>Any other end tag</dt>
+   <dd>
+
+    <p><a href=3D#parse-error>Parse error</a>. Ignore =
the token.</p>
+
+   </dd>
+
+   <dt>Anything else</dt>
+   <dd>
+
+    <!-- fake <head> -->
+
+    <p><a href=3D#insert-an-html-element>Insert an HTML elem=
ent</a> for a "head" start tag token with no attributes.&=
lt;/p>
+
+    <p>Set the <a href=3D#head-element-pointer><code titl=
e=3D"">head</code> element pointer</a> to the ne=
wly created
+    <code><a href=3D#the-head-element>head</a></cod=
e> element.</p>
+
+    <p>Switch the <a href=3D#insertion-mode>insertion mode&l=
t;/a> to "<a href=3D#parsing-main-inhead title=3D"inserti=
on mode: in head">in
+    head</a>".</p>
+
+    <!-- end of fake <head> -->
+
+    <p>Reprocess the current token.</p>
+
+   </dd>
+
+  </dl><h6 id=3Dparsing-main-inhead><span class=3Dsecno&g=
t;12.2.5.4.4 </span>The "<dfn title=3D"insertion mode:=
 in head">in head</dfn>" insertion mode</h6>
+
+  <p>When the user agent is to apply the rules for the "<a=
 href=3D#parsing-main-inhead title=3D"insertion mode: in head"&=
gt;in
+  head</a>" <a href=3D#insertion-mode>insertion mode&lt=
;/a>, the user agent must handle the token as follows:</p>
+
+  <dl class=3Dswitch><dt>A character token that is one of U+=
0009 CHARACTER
+   TABULATION, U+000A LINE FEED (LF), U+000C FORM FEED (FF),
+   U+000D CARRIAGE RETURN (CR), or U+0020 SPACE</dt>
+   <dd>
+    <p><a href=3D#insert-a-character title=3D"insert a cha=
racter">Insert the character</a>.</p>
+   </dd>
+
+   <dt>A comment token</dt>
+   <dd>
+    <p><a href=3D#insert-a-comment>Insert a comment</a&gt=
;.</p>
+   </dd>
+
+   <dt>A DOCTYPE token</dt>
+   <dd>
+    <p><a href=3D#parse-error>Parse error</a>. Ignore =
the token.</p>
+   </dd>
+
+   <dt>A start tag whose tag name is "html"</dt>
+   <dd>
+    <p>Process the token <a href=3D#using-the-rules-for>usin=
g the rules for</a> the "<a href=3D#parsing-main-inbody tit=
le=3D"insertion mode: in
+    body">in body</a>" <a href=3D#insertion-mode&g=
t;insertion mode</a>.</p>
+   </dd>
+
+   <dt>A start tag whose tag name is one of: "base", &qu=
ot;basefont",
+   "bgsound", "link"</dt>
+   <dd>
+
+    <p><a href=3D#insert-an-html-element>Insert an HTML elem=
ent</a> for the token. Immediately pop the <a href=3D#current-no=
de>current
+    node</a> off the <a href=3D#stack-of-open-elements>stack=
 of open elements</a>.</p>
+
+    <p><a href=3D#acknowledge-self-closing-flag title=3D"a=
cknowledge self-closing flag">Acknowledge the token's <i>se=
lf-closing
+    flag</i></a>, if it is set.</p>
+
+   </dd>
+
+   <dt>A start tag whose tag name is "meta"</dt>
+   <dd>
+
+    <p><a href=3D#insert-an-html-element>Insert an HTML elem=
ent</a> for the token. Immediately pop the <a href=3D#current-no=
de>current
+    node</a> off the <a href=3D#stack-of-open-elements>stack=
 of open elements</a>.</p>
+
+    <p><a href=3D#acknowledge-self-closing-flag title=3D"a=
cknowledge self-closing flag">Acknowledge the token's <i>se=
lf-closing
+    flag</i></a>, if it is set.</p>
+
+    <p id=3Dmeta-charset-during-parse>If the element has a <cod=
e title=3Dattr-meta-charset><a href=3D#attr-meta-charset>charset=
</a></code> attribute, and <a href=3D#getting-an-encoding&=
gt;getting an encoding</a> from
+    its value results in a supported <a href=3D#ascii-compatible-char=
acter-encoding>ASCII-compatible character encoding</a> or <a =
href=3D#a-utf-16-encoding>a
+    UTF-16 encoding</a>, and the <a href=3D#concept-encoding-co=
nfidence title=3Dconcept-encoding-confidence>confidence</a> is
+    currently <i>tentative</i>, then <a href=3D#change-th=
e-encoding>change the encoding</a> to the resulting encoding.&lt=
;/p>
+
+    <p>Otherwise, if the element has an <code title=3Dattr-meta=
-http-equiv><a href=3D#attr-meta-http-equiv>http-equiv</a>=
</code>
+    attribute whose value is an <a href=3D#ascii-case-insensitive>=
ASCII case-insensitive</a> match for the string "<code titl=
e=3D"">Content-Type</code>", and the element has =
a <code title=3Dattr-meta-content><a href=3D#attr-meta-content&g=
t;content</a></code> attribute, and applying the <a href=3D=
#algorithm-for-extracting-a-character-encoding-from-a-meta-element>alg=
orithm for
+    extracting a character encoding from a <code>meta</code>=
 element</a> to that attribute's
+    value returns a supported <a href=3D#ascii-compatible-character-e=
ncoding>ASCII-compatible character encoding</a> or <a href=3D=
#a-utf-16-encoding>a UTF-16
+    encoding</a>, and the <a href=3D#concept-encoding-confidenc=
e title=3Dconcept-encoding-confidence>confidence</a> is
+    currently <i>tentative</i>, then <a href=3D#change-th=
e-encoding>change the encoding</a> to the extracted encoding.&lt=
;/p>
+
+   </dd>
+
+   <dt>A start tag whose tag name is "title"</dt>
+   <dd>
+    <p>Follow the <a href=3D#generic-rcdata-element-parsing-alg=
orithm>generic RCDATA element parsing algorithm</a>.</p>
+   </dd>
+
+   <dt>A start tag whose tag name is "noscript", if the =
<a href=3D#scripting-flag>scripting flag</a> is enabled</d=
t>
+   <dt>A start tag whose tag name is one of: "noframes",=
 "style"</dt>
+   <dd>
+    <p>Follow the <a href=3D#generic-raw-text-element-parsing-a=
lgorithm>generic raw text element parsing algorithm</a>.</p&g=
t;
+   </dd>
+
+   <dt>A start tag whose tag name is "noscript", if the =
<a href=3D#scripting-flag>scripting flag</a> is disabled</=
dt>
+   <dd>
+
+    <p><a href=3D#insert-an-html-element>Insert an HTML elem=
ent</a> for the token.</p>
+
+    <p>Switch the <a href=3D#insertion-mode>insertion mode&l=
t;/a> to "<a href=3D#parsing-main-inheadnoscript title=3D&quot=
;insertion mode: in head noscript">in
+    head noscript</a>".</p>
+
+   </dd>
+
+
+   <dt id=3DscriptTag>A start tag whose tag name is "script&q=
uot;</dt>
+   <dd>
+
+    <p>Run these steps:</p>
+
+    <ol><li><p>Let the <var title=3D""&gt=
;adjusted insertion location</var> be the <a href=3D#appropriate=
-place-for-inserting-a-node>appropriate place
+     for inserting a node</a>.</li>
+
+     <li><p><a href=3D#create-an-element-for-the-token&gt=
;Create an element for the token</a> in the <a href=3D#html-name=
space-0>HTML namespace</a>, with
+     the intended parent being the element in which the <var title=3D=
"">adjusted insertion
+     location</var> finds itself.</li>
+
+     <li>
+
+      <p>Mark the element as being <a href=3D#parser-inserted&g=
t;"parser-inserted"</a> and unset the element's
+      <a href=3D#force-async>"force-async"</a> fla=
g.</p>
+
+      <p class=3Dnote>This ensures that, if the script is external=
, any <code title=3Ddom-document-write><a href=3D#dom-document-w=
rite>document.write()</a></code> calls in the script will =
execute in-line,
+      instead of blowing the document away, as would happen in most othe=
r cases. It also prevents
+      the script from executing until the end tag is seen.</p>
+
+     </li>
+
+     <li><p>If the parser was originally created for the &lt=
;a href=3D#html-fragment-parsing-algorithm>HTML fragment parsing
+     algorithm</a>, then mark the <code><a href=3D#the-sc=
ript-element>script</a></code> element as <a href=3D#al=
ready-started>"already started"</a>.
+     (<a href=3D#fragment-case>fragment case</a>)</li>
+
+     <li><p>Insert the newly created element at the <var =
title=3D"">adjusted insertion
+     location</var>.</li>
+
+     <li><p>Push the element onto the <a href=3D#stack-of=
-open-elements>stack of open elements</a> so that it is the new
+     <a href=3D#current-node>current node</a>.</li>
+
+     <li><p>Switch the tokenizer to the <a href=3D#script=
-data-state>script data state</a>.</li>
+
+     <li><p>Let the <a href=3D#original-insertion-mode&gt=
;original insertion mode</a> be the current <a href=3D#insertion=
-mode>insertion
+     mode</a>.</p>
+
+     <li><p>Switch the <a href=3D#insertion-mode>inser=
tion mode</a> to "<a href=3D#parsing-main-incdata title=3D&=
quot;insertion mode:
+     text">text</a>".</li>
+
+    </ol></dd>
+
+   <dt>An end tag whose tag name is "head"</dt>
+   <dd>
+
+    <p>Pop the <a href=3D#current-node>current node</a&gt=
; (which will be the <code><a href=3D#the-head-element>head&l=
t;/a></code> element) off the
+    <a href=3D#stack-of-open-elements>stack of open elements</a=
>.</p>
+
+    <p>Switch the <a href=3D#insertion-mode>insertion mode&l=
t;/a> to "<a href=3D#the-after-head-insertion-mode title=3D&qu=
ot;insertion mode: after head">after
+    head</a>".</p>
+
+   </dd>
+
+   <dt>An end tag whose tag name is one of: "body", &quo=
t;html", "br"</dt>
+   <dd>
+    <p>Act as described in the "anything else" entry bel=
ow.</p>
+   </dd>
+
+   <dt>A start tag whose tag name is "template"</dt&g=
t;
+   <dd>
+
+    <p><a href=3D#insert-an-html-element>Insert an HTML elem=
ent</a> for the token.</p>
+
+    <p>Insert a marker at the end of the <a href=3D#list-of-act=
ive-formatting-elements>list of active formatting elements</a>.&=
lt;/p>
+
+    <p>Set the <a href=3D#frameset-ok-flag>frameset-ok flag&=
lt;/a> to "not ok".</p>
+
+    <p>Switch the <a href=3D#insertion-mode>insertion mode&l=
t;/a> to "<a href=3D#parsing-main-intemplate title=3D"ins=
ertion mode: in template">in
+    template</a>".</p>
+
+    <p>Push "<a href=3D#parsing-main-intemplate title=3D&q=
uot;insertion mode: in template">in template</a>" onto=
 the <a href=3D#stack-of-template-insertion-modes>stack of
+    template insertion modes</a> so that it is the new <a href=3D=
#current-template-insertion-mode>current template insertion
+    mode</a>.</p>
+
+   </dd>
+
+   <dt>An end tag whose tag name is "template"</dt&gt=
;
+   <dd>
+
+    <p>If there is no <code><a href=3D#the-template-eleme=
nt>template</a></code> element on the <a href=3D#stack-=
of-open-elements>stack of open elements</a>, then
+    this is a <a href=3D#parse-error>parse error</a>; ignore=
 the token.</p>
+
+    <p>Otherwise, run these steps:</p>
+
+    <ol><li><p><a href=3D#generate-implied-end-tags=
>Generate implied end tags</a>.</li>
+
+     <li><p>If the <a href=3D#current-node>current nod=
e</a> is not a <code><a href=3D#the-template-element>te=
mplate</a></code> element, then this is a
+     <a href=3D#parse-error>parse error</a>.</li>
+
+     <li><p>Pop elements from the <a href=3D#stack-of-ope=
n-elements>stack of open elements</a> until a <code><a =
href=3D#the-template-element>template</a></code>
+     element has been popped from the stack.</li>
+
+     <li><a href=3D#clear-the-list-of-active-formatting-element=
s-up-to-the-last-marker>Clear the list of active formatting elements u=
p to the last marker</a>.</li>
+
+     <li><p>Pop the <a href=3D#current-template-insertion=
-mode>current template insertion mode</a> off the <a href=3D#=
stack-of-template-insertion-modes>stack of template
+     insertion modes</a>.</p>
+
+     <li><p><a href=3D#reset-the-insertion-mode-appropria=
tely>Reset the insertion mode appropriately</a>.</li>
+
+    </ol></dd>
+
+   <dt>A start tag whose tag name is "head"</dt>
+   <dt>Any other end tag</dt>
+   <dd>
+    <p><a href=3D#parse-error>Parse error</a>. Ignore =
the token.</p>
+   </dd>
+
+   <dt>Anything else</dt>
+   <dd>
+
+    <!-- can't get here with an EOF and a fragment case -->
+
+    <!-- start of fake </head> -->
+    <p>Pop the <a href=3D#current-node>current node</a&gt=
; (which will be the <code><a href=3D#the-head-element>head&l=
t;/a></code> element) off the
+    <a href=3D#stack-of-open-elements>stack of open elements</a=
>.</p>
+
+    <p>Switch the <a href=3D#insertion-mode>insertion mode&l=
t;/a> to "<a href=3D#the-after-head-insertion-mode title=3D&qu=
ot;insertion mode: after head">after
+    head</a>".</p>
+    <!-- end of fake </head> -->
+
+    <p>Reprocess the token.</p>
+
+   </dd>
+
+  </dl><h6 id=3Dparsing-main-inheadnoscript><span class=3D=
secno>12.2.5.4.5 </span>The "<dfn title=3D"insertio=
n mode: in head noscript">in head noscript</dfn>" inse=
rtion mode</h6>
+
+  <p>When the user agent is to apply the rules for the "<a=
 href=3D#parsing-main-inheadnoscript title=3D"insertion mode: in hea=
d
+  noscript">in head noscript</a>" <a href=3D#inser=
tion-mode>insertion mode</a>, the user agent must handle the
+  token as follows:</p>
+
+  <dl class=3Dswitch><dt>A DOCTYPE token</dt>
+   <dd>
+    <p><a href=3D#parse-error>Parse error</a>. Ignore =
the token.</p>
+   </dd>
+
+   <dt>A start tag whose tag name is "html"</dt>
+   <dd>
+
+    <p>Process the token <a href=3D#using-the-rules-for>usin=
g the rules for</a> the "<a href=3D#parsing-main-inbody tit=
le=3D"insertion mode: in
+    body">in body</a>" <a href=3D#insertion-mode&g=
t;insertion mode</a>.</p>
+
+   </dd>
+
+   <dt>An end tag whose tag name is "noscript"</dt&gt=
;
+   <dd>
+
+    <p>Pop the <a href=3D#current-node>current node</a&gt=
; (which will be a <code><a href=3D#the-noscript-element>nosc=
ript</a></code> element) from the
+    <a href=3D#stack-of-open-elements>stack of open elements</a=
>; the new <a href=3D#current-node>current node</a> will b=
e a
+    <code><a href=3D#the-head-element>head</a></cod=
e> element.</p>
+
+    <p>Switch the <a href=3D#insertion-mode>insertion mode&l=
t;/a> to "<a href=3D#parsing-main-inhead title=3D"inserti=
on mode: in head">in
+    head</a>".</p>
+
+   </dd>
+
+   <dt>A character token that is one of U+0009 CHARACTER TABULATIO=
N, U+000A LINE FEED (LF), U+000C
+   FORM FEED (FF), U+000D CARRIAGE RETURN (CR), or U+0020 SPACE</dt&g=
t;
+   <dt>A comment token</dt>
+   <dt>A start tag whose tag name is one of: "basefont",=
 "bgsound", "link", "meta", "noframes&=
quot;,
+   "style"</dt>
+   <dd>
+
+    <p>Process the token <a href=3D#using-the-rules-for>usin=
g the rules for</a> the "<a href=3D#parsing-main-inhead tit=
le=3D"insertion mode: in
+    head">in head</a>" <a href=3D#insertion-mode&g=
t;insertion mode</a>.</p>
+
+   </dd>
+
+   <dt>An end tag whose tag name is "br"</dt>
+   <dd>
+    <p>Act as described in the "anything else" entry bel=
ow.</p>
+   </dd>
+
+   <dt>A start tag whose tag name is one of: "head", &qu=
ot;noscript"</dt>
+   <dt>Any other end tag</dt>
+   <dd>
+    <p><a href=3D#parse-error>Parse error</a>. Ignore =
the token.</p>
+   </dd>
+
+   <dt>Anything else</dt>
+   <dd>
+
+    <!-- can't get here with an EOF and a fragment case -->
+
+    <p><a href=3D#parse-error>Parse error</a>.</p&g=
t;
+
+    <!-- fake </noscript> -->
+    <p>Pop the <a href=3D#current-node>current node</a&gt=
; (which will be a <code><a href=3D#the-noscript-element>nosc=
ript</a></code> element) from the
+    <a href=3D#stack-of-open-elements>stack of open elements</a=
>; the new <a href=3D#current-node>current node</a> will b=
e a
+    <code><a href=3D#the-head-element>head</a></cod=
e> element.</p>
+
+    <p>Switch the <a href=3D#insertion-mode>insertion mode&l=
t;/a> to "<a href=3D#parsing-main-inhead title=3D"inserti=
on mode: in head">in
+    head</a>".</p>
+    <!-- end fake </noscript> -->
+
+    <p>Reprocess the token.</p>
+
+   </dd>
+
+  </dl><h6 id=3Dthe-after-head-insertion-mode><span class=
=3Dsecno>12.2.5.4.6 </span>The "<dfn title=3D"inser=
tion mode: after head">after head</dfn>" insertion mod=
e</h6>
+
+  <p>When the user agent is to apply the rules for the "<a=
 href=3D#the-after-head-insertion-mode title=3D"insertion mode: afte=
r
+  head">after head</a>" <a href=3D#insertion-mode&=
gt;insertion mode</a>, the user agent must handle the token as
+  follows:</p>
+
+  <dl class=3Dswitch><dt>A character token that is one of U+=
0009 CHARACTER
+   TABULATION, U+000A LINE FEED (LF), U+000C FORM FEED (FF),
+   U+000D CARRIAGE RETURN (CR), or U+0020 SPACE</dt>
+   <dd>
+    <p><a href=3D#insert-a-character title=3D"insert a cha=
racter">Insert the character</a>.</p>
+   </dd>
+
+   <dt>A comment token</dt>
+   <dd>
+    <p><a href=3D#insert-a-comment>Insert a comment</a&gt=
;.</p>
+   </dd>
+
+   <dt>A DOCTYPE token</dt>
+   <dd>
+    <p><a href=3D#parse-error>Parse error</a>. Ignore =
the token.</p>
+   </dd>
+
+   <dt>A start tag whose tag name is "html"</dt>
+   <dd>
+
+    <p>Process the token <a href=3D#using-the-rules-for>usin=
g the rules for</a> the "<a href=3D#parsing-main-inbody tit=
le=3D"insertion mode: in
+    body">in body</a>" <a href=3D#insertion-mode&g=
t;insertion mode</a>.</p>
+
+   </dd>
+
+   <dt>A start tag whose tag name is "body"</dt>
+   <dd>
+
+    <p><a href=3D#insert-an-html-element>Insert an HTML elem=
ent</a> for the token.</p>
+
+    <p>Set the <a href=3D#frameset-ok-flag>frameset-ok flag&=
lt;/a> to "not ok".</p>
+
+    <p>Switch the <a href=3D#insertion-mode>insertion mode&l=
t;/a> to "<a href=3D#parsing-main-inbody title=3D"inserti=
on mode: in body">in
+    body</a>".</p>
+
+   </dd>
+
+   <dt>A start tag whose tag name is "frameset"</dt&g=
t;
+   <dd>
+
+    <p><a href=3D#insert-an-html-element>Insert an HTML elem=
ent</a> for the token.</p>
+
+    <p>Switch the <a href=3D#insertion-mode>insertion mode&l=
t;/a> to "<a href=3D#parsing-main-inframeset title=3D"ins=
ertion mode: in frameset">in
+    frameset</a>".</p>
+
+   </dd>
+
+   <dt>A start tag whose tag name is one of: "base", &qu=
ot;basefont", "bgsound", "link", "meta&quot=
;,
+   "noframes", "script", "style", "te=
mplate", "title"</dt>
+   <dd>
+
+    <p><a href=3D#parse-error>Parse error</a>.</p&g=
t;
+
+    <p>Push the node pointed to by the <a href=3D#head-element-=
pointer><code title=3D"">head</code> element poi=
nter</a> onto
+    the <a href=3D#stack-of-open-elements>stack of open elements&l=
t;/a>.</p>
+
+    <p>Process the token <a href=3D#using-the-rules-for>usin=
g the rules for</a> the "<a href=3D#parsing-main-inhead tit=
le=3D"insertion mode: in
+    head">in head</a>" <a href=3D#insertion-mode&g=
t;insertion mode</a>.</p>
+
+    <p>Remove the node pointed to by the <a href=3D#head-elemen=
t-pointer><code title=3D"">head</code> element p=
ointer</a>
+    from the <a href=3D#stack-of-open-elements>stack of open eleme=
nts</a>. (It might not be the <a href=3D#current-node>current=
 node</a> at
+    this point.)</p>
+
+    <p class=3Dnote>The <a href=3D#head-element-pointer><=
code title=3D"">head</code> element pointer</a> =
cannot be null at
+    this point.</p>
+
+   </dd>
+
+   <dt>An end tag whose tag name is "template"</dt&gt=
;
+   <dd>
+    <p>Process the token <a href=3D#using-the-rules-for>usin=
g the rules for</a> the "<a href=3D#parsing-main-inhead tit=
le=3D"insertion mode: in
+    head">in head</a>" <a href=3D#insertion-mode&g=
t;insertion mode</a>.</p>
+   </dd>
+
+   <dt>An end tag whose tag name is one of: "body", &quo=
t;html", "br"</dt>
+   <dd>
+    <p>Act as described in the "anything else" entry bel=
ow.</p>
+   </dd>
+
+   <dt>A start tag whose tag name is "head"</dt>
+   <dt>Any other end tag</dt>
+   <dd>
+    <p><a href=3D#parse-error>Parse error</a>. Ignore =
the token.</p>
+   </dd>
+
+   <dt>Anything else</dt>
+   <dd>
+
+    <!-- fake <body>, but without resetting frameset-ok -->
+    <p><a href=3D#insert-an-html-element>Insert an HTML elem=
ent</a> for a "body" start tag token with no attributes.&=
lt;/p>
+
+    <p>Switch the <a href=3D#insertion-mode>insertion mode&l=
t;/a> to "<a href=3D#parsing-main-inbody title=3D"inserti=
on mode: in body">in
+    body</a>".</p>
+    <!-- end fake <body> -->
+
+    <p>Reprocess the current token.</p>
+
+   </dd>
+
+  </dl><h6 id=3Dparsing-main-inbody><span class=3Dsecno&g=
t;12.2.5.4.7 </span>The "<dfn title=3D"insertion mode:=
 in body">in body</dfn>" insertion mode</h6>
+
+  <p>When the user agent is to apply the rules for the "<a=
 href=3D#parsing-main-inbody title=3D"insertion mode: in body"&=
gt;in
+  body</a>" <a href=3D#insertion-mode>insertion mode&lt=
;/a>, the user agent must handle the token as follows:</p>
+
+  <dl class=3Dswitch><dt>A character token that is U+0000 NU=
LL</dt>
+   <dd>
+
+    <p><a href=3D#parse-error>Parse error</a>. Ignore =
the token.</p>
+
+    <!-- The D-Link DSL-G604T ADSL router has a zero byte in its
+         configuration UI before a <frameset>, which is why U+0000=
 is
+         special-cased here.
+         refs: https://bugzilla.mozilla.org/show_bug.cgi?id=3D563526
+               http://www.w3.org/Bugs/Public/show_bug.cgi?id=3D9659
+    -->
+
+   </dd>
+
+   <dt>A character token that is one of U+0009 CHARACTER TABULATIO=
N,
+   U+000A LINE FEED (LF), U+000C FORM FEED (FF), U+000D CARRIAGE
+   RETURN (CR), or U+0020 SPACE</dt>
+   <dd>
+
+    <p><a href=3D#reconstruct-the-active-formatting-elements&gt=
;Reconstruct the active formatting elements</a>, if any.</p>
+
+    <p><a href=3D#insert-a-character title=3D"insert a cha=
racter">Insert the token's character</a>.</p>
+
+   </dd>
+
+   <dt>Any other character token</dt>
+   <dd>
+
+    <p><a href=3D#reconstruct-the-active-formatting-elements&gt=
;Reconstruct the active formatting elements</a>, if any.</p>
+
+    <p><a href=3D#insert-a-character title=3D"insert a cha=
racter">Insert the token's character</a>.</p>
+
+    <p>Set the <a href=3D#frameset-ok-flag>frameset-ok flag&=
lt;/a> to "not ok".</p>
+
+   </dd>
+
+   <dt>A comment token</dt>
+   <dd>
+    <p><a href=3D#insert-a-comment>Insert a comment</a&gt=
;.</p>
+   </dd>
+
+   <dt>A DOCTYPE token</dt>
+   <dd>
+    <p><a href=3D#parse-error>Parse error</a>. Ignore =
the token.</p>
+   </dd>
+
+   <dt>A start tag whose tag name is "html"</dt>
+   <dd>
+
+    <p><a href=3D#parse-error>Parse error</a>.</p&g=
t;
+
+    <p>If there is a <code><a href=3D#the-template-elemen=
t>template</a></code> element on the <a href=3D#stack-o=
f-open-elements>stack of open elements</a>, then
+    ignore the token.</p>
+
+    <p>Otherwise, for each attribute on the token, check to see if=
 the attribute is already present
+    on the top element of the <a href=3D#stack-of-open-elements>st=
ack of open elements</a>. If it is not, add the attribute
+    and its corresponding value to that element.</p>
+
+   </dd>
+
+   <dt>A start tag whose tag name is one of: "base", &qu=
ot;basefont", "bgsound", "link", "meta&quot=
;,
+   "noframes", "script", "style", "te=
mplate", "title"</dt>
+   <dt>An end tag whose tag name is "template"</dt&gt=
;
+   <dd>
+    <p>Process the token <a href=3D#using-the-rules-for>usin=
g the rules for</a> the "<a href=3D#parsing-main-inhead tit=
le=3D"insertion mode: in
+    head">in head</a>" <a href=3D#insertion-mode&g=
t;insertion mode</a>.</p>
+   </dd>
+
+   <dt>A start tag whose tag name is "body"</dt>
+   <dd>
+
+    <p><a href=3D#parse-error>Parse error</a>.</p&g=
t;
+
+    <p>If the second element on the <a href=3D#stack-of-open-el=
ements>stack of open elements</a> is not a <code><a hre=
f=3D#the-body-element>body</a></code>
+    element, if the <a href=3D#stack-of-open-elements>stack of ope=
n elements</a> has only one node on it, or if there is a
+    <code><a href=3D#the-template-element>template</a>=
</code> element on the <a href=3D#stack-of-open-elements>stac=
k of open elements</a>, then ignore the token.
+    (<a href=3D#fragment-case>fragment case</a>)</p>
+
+    <p>Otherwise, set the <a href=3D#frameset-ok-flag>frames=
et-ok flag</a> to "not ok"; then, for each attribute on t=
he
+    token, check to see if the attribute is already present on the <c=
ode><a href=3D#the-body-element>body</a></code> elem=
ent (the
+    second element) on the <a href=3D#stack-of-open-elements>stack=
 of open elements</a>, and if it is not, add the attribute
+    and its corresponding value to that element.</p>
+
+   </dd>
+
+   <dt>A start tag whose tag name is "frameset"</dt&g=
t;
+   <dd>
+
+    <p><a href=3D#parse-error>Parse error</a>.</p&g=
t;
+
+    <p>If the <a href=3D#stack-of-open-elements>stack of ope=
n elements</a> has only one node on it, or if the second element
+    on the <a href=3D#stack-of-open-elements>stack of open element=
s</a> is not a <code><a href=3D#the-body-element>body&l=
t;/a></code> element, then ignore the
+    token. (<a href=3D#fragment-case>fragment case</a>)</=
p>
+
+    <p>If the <a href=3D#frameset-ok-flag>frameset-ok flag&l=
t;/a> is set to "not ok", ignore the token.</p>
+
+    <p>Otherwise, run the following steps:</p>
+
+    <ol><li><p>Remove the second element on the <a =
href=3D#stack-of-open-elements>stack of open elements</a> from i=
ts parent
+     node, if it has one.</li>
+
+     <li><p>Pop all the nodes from the bottom of the <a h=
ref=3D#stack-of-open-elements>stack of open elements</a>, from t=
he
+     <a href=3D#current-node>current node</a> up to, but not=
 including, the root <code><a href=3D#the-html-element>html&l=
t;/a></code> element.</p>
+
+     <li><p><a href=3D#insert-an-html-element>Insert a=
n HTML element</a> for the token.</li>
+
+     <li><p>Switch the <a href=3D#insertion-mode>inser=
tion mode</a> to "<a href=3D#parsing-main-inframeset title=3D=
"insertion mode: in frameset">in
+     frameset</a>".</p>
+
+    </ol></dd>
+
+   <dt>An end-of-file token</dt>
+   <dd>
+
+    <p>If there is a node in the <a href=3D#stack-of-open-eleme=
nts>stack of open elements</a> that is not either a
+    <code><a href=3D#the-dd-element>dd</a></code&gt=
; element, a <code><a href=3D#the-dt-element>dt</a><=
/code> element, an <code><a href=3D#the-li-element>li</=
a></code> element, a <code><a href=3D#the-p-element>=
p</a></code>
+    element, a <code><a href=3D#the-tbody-element>tbody</=
a></code> element, a <code><a href=3D#the-td-element&gt=
;td</a></code> element, a <code><a href=3D#the-tfoot=
-element>tfoot</a></code> element,
+    a <code><a href=3D#the-th-element>th</a></code&=
gt; element, a <code><a href=3D#the-thead-element>thead</a=
></code> element, a <code><a href=3D#the-tr-element>=
tr</a></code> element, the
+    <code><a href=3D#the-body-element>body</a></cod=
e> element, or the <code><a href=3D#the-html-element>html&=
lt;/a></code> element, then this is a <a href=3D#parse-error&=
gt;parse
+    error</a>.</p> <!-- (some of those are fragment cases=
) -->
+
+    <p>If the <a href=3D#stack-of-template-insertion-modes>s=
tack of template insertion modes</a> is not empty, then process the=
 token
+    <a href=3D#using-the-rules-for>using the rules for</a> t=
he "<a href=3D#parsing-main-intemplate title=3D"insertion mo=
de: in template">in
+    template</a>" <a href=3D#insertion-mode>insertion m=
ode</a>.</p>
+    <!-- this is needed to handle <head><template>...[EOF=
] - otherwise we don't construct the <body> element -->
+
+    <p>Otherwise, <a href=3D#stop-parsing>stop parsing</a=
>.</p>
+
+   </dd>
+
+   <dt>An end tag whose tag name is "body"</dt>
+   <dd>
+
+    <p>If the <a href=3D#stack-of-open-elements>stack of ope=
n elements</a> does not <a href=3D#has-an-element-in-scope title=
=3D"has an element in
+    scope">have a <code>body</code> element in scope=
</a>, this is a <a href=3D#parse-error>parse error</a>;
+    ignore the token.</p>
+
+    <!-- if we get here, the insertion mode here is forcibly "in=
 body". -->
+
+    <p>Otherwise, if there is a node in the <a href=3D#stack-of=
-open-elements>stack of open elements</a> that is not either a
+    <code><a href=3D#the-dd-element>dd</a></code&gt=
; element, a <code><a href=3D#the-dt-element>dt</a><=
/code> element, an <code><a href=3D#the-li-element>li</=
a></code> element, an
+    <code><a href=3D#the-optgroup-element>optgroup</a>=
</code> element, an <code><a href=3D#the-option-element&gt=
;option</a></code> element, a <code><a href=3D#the-p=
-element>p</a></code> element, an
+    <code><a href=3D#the-rp-element>rp</a></code&gt=
; element, an <code><a href=3D#the-rt-element>rt</a>&lt=
;/code> element, a <code><a href=3D#the-tbody-element>tbod=
y</a></code> element, a
+    <code><a href=3D#the-td-element>td</a></code&gt=
; element, a <code><a href=3D#the-tfoot-element>tfoot</a&g=
t;</code> element, a <code><a href=3D#the-th-element>th=
</a></code> element, a
+    <code><a href=3D#the-thead-element>thead</a></c=
ode> element, a <code><a href=3D#the-tr-element>tr</a&g=
t;</code> element, the <code><a href=3D#the-body-element&g=
t;body</a></code> element, or the
+    <code><a href=3D#the-html-element>html</a></cod=
e> element, then this is a <a href=3D#parse-error>parse error&lt=
;/a>.</p> <!-- (some of those are
+    fragment cases, e.g. for <tbody> you'd have hit the first para=
graph since the <body> wouldn't be
+    in scope, unless it was a fragment case) -->
+
+    <!-- If we ever change the frameset-ok flag to an insertion mode,=
 then we'd have to somehow keep
+    track of its state when we switch to after-body. -->
+
+    <p>Switch the <a href=3D#insertion-mode>insertion mode&l=
t;/a> to "<a href=3D#parsing-main-afterbody title=3D"inse=
rtion mode: after body">after
+    body</a>".</p>
+
+   </dd>
+
+   <dt>An end tag whose tag name is "html"</dt>
+   <dd>
+
+    <!-- fake </body> -->
+    <p>If the <a href=3D#stack-of-open-elements>stack of ope=
n elements</a> does not <a href=3D#has-an-element-in-scope title=
=3D"has an element in
+    scope">have a <code>body</code> element in scope=
</a>, this is a <a href=3D#parse-error>parse error</a>;
+    ignore the token.</p>
+
+    <!-- if we get here, the insertion mode here is forcibly "in=
 body". -->
+
+    <p>Otherwise, if there is a node in the <a href=3D#stack-of=
-open-elements>stack of open elements</a> that is not either a
+    <code><a href=3D#the-dd-element>dd</a></code&gt=
; element, a <code><a href=3D#the-dt-element>dt</a><=
/code> element, an <code><a href=3D#the-li-element>li</=
a></code> element, an
+    <code><a href=3D#the-optgroup-element>optgroup</a>=
</code> element, an <code><a href=3D#the-option-element&gt=
;option</a></code> element, a <code><a href=3D#the-p=
-element>p</a></code> element, an
+    <code><a href=3D#the-rp-element>rp</a></code&gt=
; element, an <code><a href=3D#the-rt-element>rt</a>&lt=
;/code> element, a <code><a href=3D#the-tbody-element>tbod=
y</a></code> element, a
+    <code><a href=3D#the-td-element>td</a></code&gt=
; element, a <code><a href=3D#the-tfoot-element>tfoot</a&g=
t;</code> element, a <code><a href=3D#the-th-element>th=
</a></code> element, a
+    <code><a href=3D#the-thead-element>thead</a></c=
ode> element, a <code><a href=3D#the-tr-element>tr</a&g=
t;</code> element, the <code><a href=3D#the-body-element&g=
t;body</a></code> element, or the
+    <code><a href=3D#the-html-element>html</a></cod=
e> element, then this is a <a href=3D#parse-error>parse error&lt=
;/a>.</p> <!-- (some of those are
+    fragment cases, e.g. for <tbody> you'd have hit the first para=
graph since the <body> wouldn't be
+    in scope, unless it was a fragment case) -->
+
+    <!-- If we ever change the frameset-ok flag to an insertion mode,=
 then we'd have to somehow keep
+    track of its state when we switch to after-body. -->
+
+    <p>Switch the <a href=3D#insertion-mode>insertion mode&l=
t;/a> to "<a href=3D#parsing-main-afterbody title=3D"inse=
rtion mode: after body">after
+    body</a>".</p>
+    <!-- end fake </body> -->
+
+    <p>Reprocess the token.</p>
+
+   </dd>
+
+   <!-- start tags for non-phrasing flow content elements -->
+
+   <!-- the normal ones -->
+   <dt>A start tag whose tag name is one of: "address", =
"article", "aside", "blockquote", "cen=
ter",
+   "details", "dialog", "dir", "div&q=
uot;, "dl", "fieldset", "figcaption", &quot=
;figure", "footer", "header",
+   "hgroup", "main", "menu", "nav&quo=
t;, "ol", "p", "section", "summary&quo=
t;, "ul"</dt>
+   <dd>
+
+    <!-- As of May 2008 this doesn't match any browser exactly, but i=
s as close to what IE does as I
+    can get without doing the non-tree DOM nonsense, and thus should act=
ually afford better
+    compatibility when implemented by the other browsers. -->
+
+    <p>If the <a href=3D#stack-of-open-elements>stack of ope=
n elements</a> <a href=3D#has-an-element-in-button-scope title=3D=
"has an element in button scope">has a
+    <code>p</code> element in button scope</a>, then &=
lt;a href=3D#close-a-p-element>close a <code>p</code>
+    element</a>.</p>
+
+    <p><a href=3D#insert-an-html-element>Insert an HTML elem=
ent</a> for the token.</p>
+
+   </dd>
+
+   <!-- as normal, but close h1-h6 if it's the current node -->
+   <dt>A start tag whose tag name is one of: "h1", &quot=
;h2", "h3", "h4",
+   "h5", "h6"</dt>
+   <dd>
+
+    <p>If the <a href=3D#stack-of-open-elements>stack of ope=
n elements</a> <a href=3D#has-an-element-in-button-scope title=3D=
"has an element in button scope">has a
+    <code>p</code> element in button scope</a>, then &=
lt;a href=3D#close-a-p-element>close a <code>p</code>
+    element</a>.</p>
+
+    <p>If the <a href=3D#current-node>current node</a>=
 is an <a href=3D#html-elements title=3D"HTML elements">H=
TML element</a> whose
+    tag name is one of "h1", "h2", "h3", &=
quot;h4", "h5", or "h6", then this is a <a hr=
ef=3D#parse-error>parse
+    error</a>; pop the <a href=3D#current-node>current node&=
lt;/a> off the <a href=3D#stack-of-open-elements>stack of open e=
lements</a>.</p>
+    <!-- See https://bugs.webkit.org/show_bug.cgi?id=3D12646 -->
+
+    <p><a href=3D#insert-an-html-element>Insert an HTML elem=
ent</a> for the token.</p>
+
+   </dd>
+
+   <!-- as normal, but drops leading newline -->
+   <dt>A start tag whose tag name is one of: "pre", &quo=
t;listing"</dt>
+   <dd>
+
+    <p>If the <a href=3D#stack-of-open-elements>stack of ope=
n elements</a> <a href=3D#has-an-element-in-button-scope title=3D=
"has an element in button scope">has a
+    <code>p</code> element in button scope</a>, then &=
lt;a href=3D#close-a-p-element>close a <code>p</code>
+    element</a>.</p>
+
+    <p><a href=3D#insert-an-html-element>Insert an HTML elem=
ent</a> for the token.</p>
+
+    <p>If the <a href=3D#next-token>next token</a> is =
a U+000A LINE FEED (LF) character token, then ignore that
+    token and move on to the next one. (Newlines at the start of <cod=
e><a href=3D#the-pre-element>pre</a></code> blocks a=
re ignored
+    as an authoring convenience.)</p>
+
+    <!-- <pre>[CR]X will eat the [CR], <pre>X w=
ill eat the
+    , but <pre>X will not eat the . =
-->
+
+    <p>Set the <a href=3D#frameset-ok-flag>frameset-ok flag&=
lt;/a> to "not ok".</p>
+
+   </dd>
+
+   <!-- as normal, but interacts with the form element pointer -->
+   <dt>A start tag whose tag name is "form"</dt>
+   <dd>
+
+    <p>If the <a href=3D#form-element-pointer><code title=
=3Dform>form</code> element pointer</a> is not null, then =
this is
+    a <a href=3D#parse-error>parse error</a>; ignore the tok=
en.</p>
+
+    <p>Otherwise:</p>
+
+    <p>If the <a href=3D#stack-of-open-elements>stack of ope=
n elements</a> <a href=3D#has-an-element-in-button-scope title=3D=
"has an element in button scope">has a
+    <code>p</code> element in button scope</a>, then &=
lt;a href=3D#close-a-p-element>close a <code>p</code>
+    element</a>.</p>
+
+    <p><a href=3D#insert-an-html-element>Insert an HTML elem=
ent</a> for the token, and set the <a href=3D#form-element-point=
er><code title=3Dform>form</code> element pointer</a&gt=
; to point to the element created.</p>
+
+   </dd>
+
+   <!-- as normal, but imply </li> when there's another <li&=
gt; open in weird cases -->
+   <dt>A start tag whose tag name is "li"</dt>
+   <dd>
+
+    <p>Run these steps:</p>
+
+    <ol><li><p>Set the <a href=3D#frameset-ok-flag&=
gt;frameset-ok flag</a> to "not ok".</li>
+
+     <li><p>Initialize <var title=3D"">node&=
lt;/var> to be the <a href=3D#current-node>current
+     node</a> (the bottommost node of the stack).</li>
+
+     <li>
+
+      <p><i>Loop</i>: If <var title=3D""&=
gt;node</var> is an <code><a href=3D#the-li-element>li&=
lt;/a></code> element, then run these
+      substeps:</p>
+
+      <ol><!-- fake </li> --><li><p><a =
href=3D#generate-implied-end-tags>Generate implied end tags</a>,=
 except for <code><a href=3D#the-li-element>li</a></=
code> elements.</li>
+
+       <li><p>If the <a href=3D#current-node>current n=
ode</a> is not an <code><a href=3D#the-li-element>li&lt=
;/a></code> element, then this is a
+       <a href=3D#parse-error>parse error</a>.</li>
+
+       <li><p>Pop elements from the <a href=3D#stack-of-o=
pen-elements>stack of open elements</a> until an <code>&lt=
;a href=3D#the-li-element>li</a></code>
+       element has been popped from the stack.</li>
+       <!-- end of fake </li> -->
+
+       <li><p>Jump to the step labeled <i>done</i&g=
t; below.</li>
+
+      </ol></li>
+
+     <li><p>If <var title=3D"">node</var&=
gt; is in the <a href=3D#special>special</a> category, but is=
 not an
+     <code><a href=3D#the-address-element>address</a>&=
lt;/code>, <code><a href=3D#the-div-element>div</a>&=
lt;/code>, or <code><a href=3D#the-p-element>p</a>&l=
t;/code> element, then jump to the step
+     labeled <i>done</i> below.</li>
+     <!-- an element <foo> is in this list if the following mar=
kup:
+
+         <!DOCTYPE html><body><ol><li><foo&gt=
;<li>
+
+     ...results in the second <li> not being (in any way) a descen=
dant of the first <li>, or if
+     <foo> is a formatting element that gets reopened later. --&gt=
;
+
+     <li><p>Otherwise, set <var title=3D"">n=
ode</var> to the previous entry in the <a href=3D#stack-of-open-=
elements>stack of open
+     elements</a> and return to the step labeled <i>loop<=
/i>.</li>
+
+     <li><p><i>Done</i>: If the <a href=3D#st=
ack-of-open-elements>stack of open elements</a> <a href=3D#ha=
s-an-element-in-button-scope title=3D"has an element in
+     button scope">has a <code>p</code> element in b=
utton scope</a>, then <a href=3D#close-a-p-element>close a
+     <code>p</code> element</a>.</li>
+
+     <li><p>Finally, <a href=3D#insert-an-html-element&gt=
;insert an HTML element</a> for the token.</li>
+
+    </ol></dd>
+
+   <!-- as normal, but imply </dt> or </dd> when there's =
another <dt> or <dd> open in weird cases  -->
+   <dt>A start tag whose tag name is one of: "dd", &quot=
;dt"</dt>
+   <dd>
+
+    <p>Run these steps:</p>
+
+    <ol><li><p>Set the <a href=3D#frameset-ok-flag&=
gt;frameset-ok flag</a> to "not ok".</li>
+
+     <li><p>Initialize <var title=3D"">node&=
lt;/var> to be the <a href=3D#current-node>current
+     node</a> (the bottommost node of the stack).</li>
+
+     <li>
+
+      <p><i>Loop</i>: If <var title=3D""&=
gt;node</var> is a <code><a href=3D#the-dd-element>dd&l=
t;/a></code> element, then run these
+      substeps:</p>
+
+      <ol><!-- fake </dd> --><li><p><a =
href=3D#generate-implied-end-tags>Generate implied end tags</a>,=
 except for <code><a href=3D#the-dd-element>dd</a></=
code> elements.</li>
+
+       <li><p>If the <a href=3D#current-node>current n=
ode</a> is not a <code><a href=3D#the-dd-element>dd<=
/a></code> element, then this is a
+       <a href=3D#parse-error>parse error</a>.</li>
+
+       <li><p>Pop elements from the <a href=3D#stack-of-o=
pen-elements>stack of open elements</a> until a <code><=
a href=3D#the-dd-element>dd</a></code>
+       element has been popped from the stack.</li>
+       <!-- end of fake </dd> -->
+
+       <li><p>Jump to the step labeled <i>done</i&g=
t; below.</li>
+
+      </ol></li>
+
+     <li>
+
+      <p>If <var title=3D"">node</var> is a =
<code><a href=3D#the-dt-element>dt</a></code> ele=
ment, then run these substeps:</p>
+
+      <ol><!-- fake </dt> --><li><p><a =
href=3D#generate-implied-end-tags>Generate implied end tags</a>,=
 except for <code><a href=3D#the-dt-element>dt</a></=
code> elements.</li>
+
+       <li><p>If the <a href=3D#current-node>current n=
ode</a> is not a <code><a href=3D#the-dt-element>dt<=
/a></code> element, then this is a
+       <a href=3D#parse-error>parse error</a>.</li>
+
+       <li><p>Pop elements from the <a href=3D#stack-of-o=
pen-elements>stack of open elements</a> until a <code><=
a href=3D#the-dt-element>dt</a></code>
+       element has been popped from the stack.</li>
+       <!-- end of fake </dt> -->
+
+       <li><p>Jump to the step labeled <i>done</i&g=
t; below.</li>
+
+      </ol></li>
+
+     <li><p>If <var title=3D"">node</var&=
gt; is in the <a href=3D#special>special</a> category, but is=
 not an
+     <code><a href=3D#the-address-element>address</a>&=
lt;/code>, <code><a href=3D#the-div-element>div</a>&=
lt;/code>, or <code><a href=3D#the-p-element>p</a>&l=
t;/code> element, then jump to the step
+     labeled <i>done</i> below.</li>
+     <!-- an element <foo> is in this list if the following mar=
kup:
+
+         <!DOCTYPE html><body><dl><dt><foo&gt=
;<dt>
+
+     ...results in the second <dt> not being (in any way) a descen=
dant of the first <dt>, or if
+     <foo> is a formatting element that gets reopened later. --&gt=
;
+
+     <li><p>Otherwise, set <var title=3D"">n=
ode</var> to the previous entry in the <a href=3D#stack-of-open-=
elements>stack of open
+     elements</a> and return to the step labeled <i>loop<=
/i>.</li>
+
+     <li><p><i>Done</i>: If the <a href=3D#st=
ack-of-open-elements>stack of open elements</a> <a href=3D#ha=
s-an-element-in-button-scope title=3D"has an element in
+     button scope">has a <code>p</code> element in b=
utton scope</a>, then <a href=3D#close-a-p-element>close a
+     <code>p</code> element</a>.</li>
+
+     <li><p>Finally, <a href=3D#insert-an-html-element&gt=
;insert an HTML element</a> for the token.</li>
+
+    </ol></dd>
+
+   <!-- same as normal, but effectively ends parsing -->
+   <dt>A start tag whose tag name is "plaintext"</dt&=
gt;
+   <dd>
+
+    <p>If the <a href=3D#stack-of-open-elements>stack of ope=
n elements</a> <a href=3D#has-an-element-in-button-scope title=3D=
"has an element in button scope">has a
+    <code>p</code> element in button scope</a>, then &=
lt;a href=3D#close-a-p-element>close a <code>p</code>
+    element</a>.</p>
+
+    <p><a href=3D#insert-an-html-element>Insert an HTML elem=
ent</a> for the token.</p>
+
+    <p>Switch the tokenizer to the <a href=3D#plaintext-state&g=
t;PLAINTEXT state</a>.</p>
+
+    <p class=3Dnote>Once a start tag with the tag name "plain=
text" has been seen, that will be the
+    last token ever seen other than character tokens (and the end-of-fil=
e token), because there is
+    no way to switch out of the <a href=3D#plaintext-state>PLAINTE=
XT state</a>.</p>
+
+   </dd>
+
+   <!-- button is a hybrid -->
+   <dt>A start tag whose tag name is "button"</dt>
+   <dd>
+
+    <ol><li>
+
+      <p>If the <a href=3D#stack-of-open-elements>stack of o=
pen elements</a> <a href=3D#has-an-element-in-scope title=3D&quo=
t;has an element in scope">has a
+      <code>button</code> element in scope</a>, then r=
un these substeps:</p>
+
+      <ol><li><p><a href=3D#parse-error>Parse er=
ror</a>.</li>
+
+       <li><p><a href=3D#generate-implied-end-tags>Gen=
erate implied end tags</a>.</li>
+
+       <li><p>Pop elements from the <a href=3D#stack-of-o=
pen-elements>stack of open elements</a> until a <code><=
a href=3D#the-button-element>button</a></code>
+       element has been popped from the stack.</li>
+
+      </ol></li>
+
+     <li><p><a href=3D#reconstruct-the-active-formatting-=
elements>Reconstruct the active formatting elements</a>, if any.=
</li>
+
+     <li><p><a href=3D#insert-an-html-element>Insert a=
n HTML element</a> for the token.</li>
+
+     <li><p>Set the <a href=3D#frameset-ok-flag>frames=
et-ok flag</a> to "not ok".</li>
+
+    </ol></dd>
+
+   <!-- end tags for non-phrasing flow content elements (and button) =
-->
+
+   <!-- the normal ones -->
+   <dt>An end tag whose tag name is one of: "address", &=
quot;article", "aside", "blockquote", "butt=
on",
+   "center", "details", "dialog", "di=
r", "div", "dl", "fieldset", "fig=
caption", "figure", "footer",
+   "header", "hgroup", "listing", "ma=
in", "menu", "nav", "ol", "pre&qu=
ot;, "section", "summary",
+   "ul"</dt>
+   <dd>
+
+    <p>If the <a href=3D#stack-of-open-elements>stack of ope=
n elements</a> does not <a href=3D#has-an-element-in-scope title=
=3D"has an element in
+    scope">have an element in scope</a> that is an <a h=
ref=3D#html-elements title=3D"HTML elements">HTML
+    element</a> and with the same tag name as that of the token, t=
hen this is a <a href=3D#parse-error>parse
+    error</a>; ignore the token.</p>
+
+    <p>Otherwise, run these steps:</p>
+
+    <ol><li><p><a href=3D#generate-implied-end-tags=
>Generate implied end tags</a>.</li>
+
+     <li><p>If the <a href=3D#current-node>current nod=
e</a> is not an <a href=3D#html-elements title=3D"HTML elem=
ents">HTML element</a> with
+     the same tag name as that of the token, then this is a
+     <a href=3D#parse-error>parse error</a>.</li>
+
+     <li><p>Pop elements from the <a href=3D#stack-of-ope=
n-elements>stack of open elements</a> until an <a href=3D#htm=
l-elements title=3D"HTML
+     elements">HTML element</a> with the same tag name as =
the token has been popped from the
+     stack.</li>
+
+    </ol></dd>
+
+   <!-- removes the form element pointer instead of the matching node=
 -->
+   <dt>An end tag whose tag name is "form"</dt>
+   <dd>
+
+    <p>Let <var title=3D"">node</var> be the=
 element that the <a href=3D#form-element-pointer><code title=3D=
"">form</code> element
+    pointer</a> is set to.</p>
+
+    <p>Set the <a href=3D#form-element-pointer><code titl=
e=3D"">form</code> element pointer</a> to null.&=
lt;/p>
+
+    <p>If <var title=3D"">node</var> is null=
 or the <a href=3D#stack-of-open-elements>stack of open elements&lt=
;/a> does not <a href=3D#has-an-element-in-scope title=3D"has =
an element in scope">have <var title=3D"">node&lt=
;/var> in scope</a>, then this is a
+    <a href=3D#parse-error>parse error</a>; ignore the token=
.</p>
+
+    <p>Otherwise, run these steps:</p>
+
+    <ol><li><p><a href=3D#generate-implied-end-tags=
>Generate implied end tags</a>.</li>
+
+     <li><p>If the <a href=3D#current-node>current nod=
e</a> is not <var title=3D"">node</var>, then=
 this is a
+     <a href=3D#parse-error>parse error</a>.</li>
+
+     <li><p>Remove <var title=3D"">node</=
var> from the <a href=3D#stack-of-open-elements>stack of open el=
ements</a>.</li>
+
+    </ol></dd>
+
+   <!-- as normal, except </p> implies <p> if there's no =
<p> in scope, and needs care as the elements have optional tags --&=
gt;
+   <dt>An end tag whose tag name is "p"</dt>
+   <dd>
+
+    <p>If the <a href=3D#stack-of-open-elements>stack of ope=
n elements</a> does not <a href=3D#has-an-element-in-button-scop=
e title=3D"has an element in button
+    scope">have a <code>p</code> element in button s=
cope</a>, then this is a <a href=3D#parse-error>parse
+    error</a>; <a href=3D#insert-an-html-element>insert an H=
TML element</a> for a "p" start tag token with no
+    attributes.</p>
+
+    <p><a href=3D#close-a-p-element>Close a <code>p&lt=
;/code> element</a>.</p>
+
+   </dd>
+
+   <!-- as normal, but needs care as the elements have optional tags,=
 and are further scoped by <ol>/<ul> -->
+   <dt>An end tag whose tag name is "li"</dt>
+   <dd>
+
+    <p>If the <a href=3D#stack-of-open-elements>stack of ope=
n elements</a> does not <a href=3D#has-an-element-in-list-item-s=
cope title=3D"has an element in list item
+    scope">have an <code>li</code> element in list i=
tem scope</a>, then this is a <a href=3D#parse-error>parse
+    error</a>; ignore the token.</p>
+
+    <p>Otherwise, run these steps:</p>
+
+    <ol><li><p><a href=3D#generate-implied-end-tags=
>Generate implied end tags</a>, except for <code><a hre=
f=3D#the-li-element>li</a></code> elements.</li>
+
+     <li><p>If the <a href=3D#current-node>current nod=
e</a> is not an <code><a href=3D#the-li-element>li</=
a></code> element, then this is a
+     <a href=3D#parse-error>parse error</a>.</li>
+
+     <li><p>Pop elements from the <a href=3D#stack-of-ope=
n-elements>stack of open elements</a> until an <code><a=
 href=3D#the-li-element>li</a></code>
+     element has been popped from the stack.</li>
+
+    </ol></dd>
+
+   <!-- as normal, but needs care as the elements have optional tags =
-->
+   <dt>An end tag whose tag name is one of: "dd", "=
dt"</dt>
+   <dd>
+
+    <p>If the <a href=3D#stack-of-open-elements>stack of ope=
n elements</a> does not <a href=3D#has-an-element-in-scope title=
=3D"has an element in
+    scope">have an element in scope</a> that is an <a h=
ref=3D#html-elements title=3D"HTML elements">HTML
+    element</a> and with the same tag name as that of the token, t=
hen this is a <a href=3D#parse-error>parse
+    error</a>; ignore the token.</p>
+
+    <p>Otherwise, run these steps:</p>
+
+    <ol><li><p><a href=3D#generate-implied-end-tags=
>Generate implied end tags</a>, except for <a href=3D#html-el=
ements>HTML elements</a> with the
+     same tag name as the token.</li>
+
+     <li><p>If the <a href=3D#current-node>current nod=
e</a> is not an <a href=3D#html-elements title=3D"HTML elem=
ents">HTML
+     element</a> with the same tag name as that of the token, then=
 this is a <a href=3D#parse-error>parse
+     error</a>.</li>
+
+     <li><p>Pop elements from the <a href=3D#stack-of-ope=
n-elements>stack of open elements</a> until an <a href=3D#htm=
l-elements title=3D"HTML
+     elements">HTML element</a> with the same tag name as =
the token has been popped from the
+     stack.</li>
+
+    </ol></dd>
+
+   <!-- as normal, except acts as a closer for any of the h1-h6 eleme=
nts -->
+   <dt>An end tag whose tag name is one of: "h1", "=
h2", "h3", "h4", "h5", "h6"&=
lt;/dt>
+   <dd>
+
+    <p>If the <a href=3D#stack-of-open-elements>stack of ope=
n elements</a> does not <a href=3D#has-an-element-in-scope title=
=3D"has an element in
+    scope">have an element in scope</a> that is an <a h=
ref=3D#html-elements title=3D"HTML elements">HTML
+    element</a> and whose tag name is one of "h1", &quot=
;h2", "h3", "h4", "h5", or "h6&qu=
ot;, then this is
+    a <a href=3D#parse-error>parse error</a>; ignore the tok=
en.</p>
+
+    <p>Otherwise, run these steps:</p>
+
+    <ol><li><p><a href=3D#generate-implied-end-tags=
>Generate implied end tags</a>.</li>
+
+     <li><p>If the <a href=3D#current-node>current nod=
e</a> is not an <a href=3D#html-elements title=3D"HTML elem=
ents">HTML
+     element</a> with the same tag name as that of the token, then=
 this is a <a href=3D#parse-error>parse
+     error</a>.</li>
+
+     <li><p>Pop elements from the <a href=3D#stack-of-ope=
n-elements>stack of open elements</a> until an <a href=3D#htm=
l-elements title=3D"HTML
+     elements">HTML element</a> whose tag name is one of &=
quot;h1", "h2", "h3", "h4", "h5&q=
uot;, or "h6"
+     has been popped from the stack.</li>
+
+    </ol></dd>
+
+   <!-- see also applet/marquee/object lower down -->
+
+   <dt>An end tag whose tag name is "sarcasm"</dt>
+   <dd>
+    <p>Take a deep breath, then act as described in the "any =
other end
+    tag" entry below.</p>
+   </dd>
+
+   <!-- ADOPTION AGENCY ELEMENTS
+        Mozilla-only: bdo blink del ins sub sup q
+        Safari-only: code dfn kbd nobr samp var wbr
+        Both: a b big em font i s small strike strong tt u -->
+
+   <dt>A start tag whose tag name is "a"</dt>
+   <dd>
+
+    <p>If the <a href=3D#list-of-active-formatting-elements>=
list of active formatting elements</a> contains an <code><=
a href=3D#the-a-element>a</a></code> element
+    between the end of the list and the last marker on the list (or the =
start of the list if there
+    is no marker on the list), then this is a <a href=3D#parse-error&=
gt;parse error</a>; run the <a href=3D#adoption-agency-algorithm=
>adoption
+    agency algorithm</a> for the tag name "a", then remo=
ve that element from the <a href=3D#list-of-active-formatting-elements=
>list of
+    active formatting elements</a> and the <a href=3D#stack-of-=
open-elements>stack of open elements</a> if the
+    <a href=3D#adoption-agency-algorithm>adoption agency algorithm=
</a> didn't already remove it (it might not have if the
+    element is not <a href=3D#has-an-element-in-table-scope title=3D&=
quot;has an element in table scope">in table scope</a>).&lt=
;/p>
+
+    <p class=3Dexample>In the non-conforming stream
+    <code><a href=3D"a">a<=
table><a href=3D"b">b</tab=
le>x</code>, the first
+    <code><a href=3D#the-a-element>a</a></code> =
element would be closed upon seeing the second one, and the "x"=
 character would
+    be inside a link to "b", not to "a". This is des=
pite the fact that the outer <code><a href=3D#the-a-element>a=
</a></code>
+    element is not in table scope (meaning that a regular <code>&a=
mp;lt;/a></code> end tag at the start
+    of the table wouldn't close the outer <code><a href=3D#the-=
a-element>a</a></code> element). The result is that the tw=
o
+    <code><a href=3D#the-a-element>a</a></code> =
elements are indirectly nested inside each other — non-conformi=
ng markup
+    will often result in non-conforming DOMs when parsed.</p>
+
+    <p><a href=3D#reconstruct-the-active-formatting-elements&gt=
;Reconstruct the active formatting elements</a>, if any.</p>
+
+    <p><a href=3D#insert-an-html-element>Insert an HTML elem=
ent</a> for the token. <a href=3D#push-onto-the-list-of-active-f=
ormatting-elements>Push onto the list of active
+    formatting elements</a> that element.</p>
+
+   </dd>
+
+   <dt>A start tag whose tag name is one of: "b", "=
big", "code", "em",
+   "font", "i", "s", "small", &q=
uot;strike", "strong", "tt", "u"</d=
t>
+   <dd>
+
+    <p><a href=3D#reconstruct-the-active-formatting-elements&gt=
;Reconstruct the active formatting elements</a>, if any.</p>
+
+    <p><a href=3D#insert-an-html-element>Insert an HTML elem=
ent</a> for the token. <a href=3D#push-onto-the-list-of-active-f=
ormatting-elements>Push onto the list of active
+    formatting elements</a> that element.</p>
+
+   </dd>
+
+   <dt>A start tag whose tag name is "nobr"</dt>
+   <dd>
+
+    <p><a href=3D#reconstruct-the-active-formatting-elements&gt=
;Reconstruct the active formatting elements</a>, if any.</p>
+
+    <p>If the <a href=3D#stack-of-open-elements>stack of ope=
n elements</a> <a href=3D#has-an-element-in-scope title=3D"=
has an element in scope">has a
+    <code>nobr</code> element in scope</a>, then this =
is a <a href=3D#parse-error>parse error</a>; run the
+    <a href=3D#adoption-agency-algorithm>adoption agency algorithm=
</a> for the tag name "nobr", then once again
+    <a href=3D#reconstruct-the-active-formatting-elements>reconstr=
uct the active formatting elements</a>, if any.</p>
+
+    <p><a href=3D#insert-an-html-element>Insert an HTML elem=
ent</a> for the token. <a href=3D#push-onto-the-list-of-active-f=
ormatting-elements>Push onto the list of active
+    formatting elements</a> that element.</p>
+
+   </dd>
+
+   <dt>An end tag whose tag name is one of: "a",
+   "b", "big", "code", "em", &qu=
ot;font", "i", "nobr", "s", "smal=
l",
+   "strike", "strong", "tt", "u"=
</dt>
+   <dd>
+
+    <p>Run the <a href=3D#adoption-agency-algorithm>adoption=
 agency algorithm</a> for the token's tag name.</p>
+
+   </dd>
+
+   <dt>A start tag whose tag name is one of: "applet", &=
quot;marquee", "object"</dt>
+   <dd>
+
+    <p><a href=3D#reconstruct-the-active-formatting-elements&gt=
;Reconstruct the active formatting elements</a>, if any.</p>
+
+    <p><a href=3D#insert-an-html-element>Insert an HTML elem=
ent</a> for the token.</p>
+
+    <p>Insert a marker at the end of the <a href=3D#list-of-act=
ive-formatting-elements>list of active formatting elements</a>.&=
lt;/p>
+
+    <p>Set the <a href=3D#frameset-ok-flag>frameset-ok flag&=
lt;/a> to "not ok".</p>
+
+   </dd>
+
+   <dt>An end tag token whose tag name is one of: "applet&quo=
t;, "marquee", "object"</dt>
+   <dd>
+
+    <p>If the <a href=3D#stack-of-open-elements>stack of ope=
n elements</a> does not <a href=3D#has-an-element-in-scope title=
=3D"has an element in
+    scope">have an element in scope</a> that is an <a h=
ref=3D#html-elements title=3D"HTML elements">HTML
+    element</a> and with the same tag name as that of the token, t=
hen this is a <a href=3D#parse-error>parse
+    error</a>; ignore the token.</p>
+
+    <p>Otherwise, run these steps:</p>
+
+    <ol><li><p><a href=3D#generate-implied-end-tags=
>Generate implied end tags</a>.</li>
+
+     <li><p>If the <a href=3D#current-node>current nod=
e</a> is not an <a href=3D#html-elements title=3D"HTML elem=
ents">HTML
+     element</a> with the same tag name as that of the token, then=
 this is a <a href=3D#parse-error>parse
+     error</a>.</li>
+
+     <li><p>Pop elements from the <a href=3D#stack-of-ope=
n-elements>stack of open elements</a> until an <a href=3D#htm=
l-elements title=3D"HTML
+     elements">HTML element</a> with the same tag name as =
the token has been popped from the
+     stack.</li>
+
+     <li><a href=3D#clear-the-list-of-active-formatting-element=
s-up-to-the-last-marker>Clear the list of active formatting elements u=
p to the last marker</a>.</li>
+
+    </ol></dd>
+
+   <dt>A start tag whose tag name is "table"</dt>
+   <dd>
+
+    <p>If the <code><a href=3D#document>Document</a=
></code> is <em>not</em> set to <a href=3D#quirks=
-mode>quirks mode</a>, and the
+    <a href=3D#stack-of-open-elements>stack of open elements</a=
> <a href=3D#has-an-element-in-button-scope title=3D"has an el=
ement in button scope">has a
+    <code>p</code> element in button scope</a>, then &=
lt;a href=3D#close-a-p-element>close a <code>p</code>
+    element</a>.</p> <!-- i hate myself (this quirk was b=
asically caused by acid2; if i'd
+    realised we could change the specs when i wrote acid2, we could have=
 avoided having any
+    parsing-mode quirks) -Hixie -->
+
+    <p><a href=3D#insert-an-html-element>Insert an HTML elem=
ent</a> for the token.</p>
+
+    <p>Set the <a href=3D#frameset-ok-flag>frameset-ok flag&=
lt;/a> to "not ok".</p>
+
+    <p>Switch the <a href=3D#insertion-mode>insertion mode&l=
t;/a> to "<a href=3D#parsing-main-intable title=3D"insert=
ion mode: in table">in
+    table</a>".</p>
+
+   </dd>
+
+   <dt>An end tag whose tag name is "br"</dt>
+   <dd>
+
+    <p><a href=3D#parse-error>Parse error</a>. Act as =
described in the next entry, as if this was a "br" start tag
+    token, rather than an end tag token.</p>
+
+   </dd>
+
+   <!-- do not insert things here, since the previous entry refers to=
 the next entry -->
+
+   <dt>A start tag whose tag name is one of: "area", &qu=
ot;br", "embed",
+   "img", "keygen", "wbr"</dt>
+   <dd>
+
+    <p><a href=3D#reconstruct-the-active-formatting-elements&gt=
;Reconstruct the active formatting elements</a>, if any.</p>
+
+    <p><a href=3D#insert-an-html-element>Insert an HTML elem=
ent</a> for the token. Immediately pop the <a href=3D#current-no=
de>current
+    node</a> off the <a href=3D#stack-of-open-elements>stack=
 of open elements</a>.</p>
+
+    <p><a href=3D#acknowledge-self-closing-flag title=3D"a=
cknowledge self-closing flag">Acknowledge the token's <i>se=
lf-closing
+    flag</i></a>, if it is set.</p>
+
+    <p>Set the <a href=3D#frameset-ok-flag>frameset-ok flag&=
lt;/a> to "not ok".</p>
+    <!-- shouldn't really do this for <area> -->
+
+   </dd>
+
+   <dt>A start tag whose tag name is "input"</dt>
+   <dd>
+
+    <p><a href=3D#reconstruct-the-active-formatting-elements&gt=
;Reconstruct the active formatting elements</a>, if any.</p>
+
+    <p><a href=3D#insert-an-html-element>Insert an HTML elem=
ent</a> for the token. Immediately pop the <a href=3D#current-no=
de>current
+    node</a> off the <a href=3D#stack-of-open-elements>stack=
 of open elements</a>.</p>
+
+    <p><a href=3D#acknowledge-self-closing-flag title=3D"a=
cknowledge self-closing flag">Acknowledge the token's <i>se=
lf-closing
+    flag</i></a>, if it is set.</p>
+
+    <p>If the token does not have an attribute with the name &quot=
;type", or if it does, but that
+    attribute's value is not an <a href=3D#ascii-case-insensitive>=
ASCII case-insensitive</a> match for the string "<code titl=
e=3D"">hidden</code>", then: set the <a href=3D=
#frameset-ok-flag>frameset-ok flag</a> to "not ok".&lt=
;/p>
+
+   </dd>
+
+   <dt>A start tag whose tag name is one of: "menuitem",=
 "param", "source", "track"</dt>
+   <dd>
+
+    <p><a href=3D#insert-an-html-element>Insert an HTML elem=
ent</a> for the token. Immediately pop the <a href=3D#current-no=
de>current
+    node</a> off the <a href=3D#stack-of-open-elements>stack=
 of open elements</a>.</p>
+
+    <p><a href=3D#acknowledge-self-closing-flag title=3D"a=
cknowledge self-closing flag">Acknowledge the token's <i>se=
lf-closing
+    flag</i></a>, if it is set.</p>
+
+   </dd>
+
+   <dt>A start tag whose tag name is "hr"</dt>
+   <dd>
+
+    <p>If the <a href=3D#stack-of-open-elements>stack of ope=
n elements</a> <a href=3D#has-an-element-in-button-scope title=3D=
"has an element in button scope">has a
+    <code>p</code> element in button scope</a>, then &=
lt;a href=3D#close-a-p-element>close a <code>p</code>
+    element</a>.</p>
+
+    <p><a href=3D#insert-an-html-element>Insert an HTML elem=
ent</a> for the token. Immediately pop the <a href=3D#current-no=
de>current
+    node</a> off the <a href=3D#stack-of-open-elements>stack=
 of open elements</a>.</p>
+
+    <p><a href=3D#acknowledge-self-closing-flag title=3D"a=
cknowledge self-closing flag">Acknowledge the token's <i>se=
lf-closing
+    flag</i></a>, if it is set.</p>
+
+    <p>Set the <a href=3D#frameset-ok-flag>frameset-ok flag&=
lt;/a> to "not ok".</p>
+
+   </dd>
+
+   <dt>A start tag whose tag name is "image"</dt>
+   <dd>
+    <!-- As of 2005-12, studies showed that around 0.2% of pages used=
 the <image> element. -->
+    <p><a href=3D#parse-error>Parse error</a>. Change =
the token's tag name to "img" and reprocess it. (Don't
+    ask.)</p>
+   </dd>
+
+   <dt id=3Disindex>A start tag whose tag name is "isindex&qu=
ot;</dt>
+   <dd>
+
+    <p><a href=3D#parse-error>Parse error</a>.</p&g=
t;
+
+    <p>If the <a href=3D#form-element-pointer><code title=
=3D"">form</code> element pointer</a> is not nul=
l, then ignore the
+    token.</p>
+
+    <p>Otherwise:</p>
+
+    <p><a href=3D#acknowledge-self-closing-flag title=3D"a=
cknowledge self-closing flag">Acknowledge the token's <i>se=
lf-closing
+    flag</i></a>, if it is set.</p> <!-- purely to =
reduce the number of errors (we don't care if
+    they included the /, they're not supposed to be including the tag at=
 all! -->
+
+    <p>Set the <a href=3D#frameset-ok-flag>frameset-ok flag&=
lt;/a> to "not ok".</p>
+
+    <!-- fake <form> -->
+    <p>If the <a href=3D#stack-of-open-elements>stack of ope=
n elements</a> <a href=3D#has-an-element-in-button-scope title=3D=
"has an element in button scope">has a
+    <code>p</code> element in button scope</a>, then &=
lt;a href=3D#close-a-p-element>close a <code>p</code>
+    element</a>.</p>
+
+    <p><a href=3D#insert-an-html-element>Insert an HTML elem=
ent</a> for a "form" start tag token with no attributes, =
and set
+    the <a href=3D#form-element-pointer><code title=3Dform>f=
orm</code> element pointer</a> to point to the element
+    created.</p>
+
+    <p>If the token has an attribute called "action", se=
t the <code title=3Dattr-fs-action><a href=3D#attr-fs-action>=
action</a></code> attribute on the resulting <code><=
a href=3D#the-form-element>form</a></code> element to the
+    value of the "action" attribute of the token.</p>
+
+    <!-- fake <hr> -->
+    <p><a href=3D#insert-an-html-element>Insert an HTML elem=
ent</a> for an "hr" start tag token with no attributes.
+    Immediately pop the <a href=3D#current-node>current node</a=
> off the <a href=3D#stack-of-open-elements>stack of open elemen=
ts</a>.</p>
+
+    <!-- fake <label> -->
+    <p><a href=3D#reconstruct-the-active-formatting-elements&gt=
;Reconstruct the active formatting elements</a>, if any.</p>
+
+    <p><a href=3D#insert-an-html-element>Insert an HTML elem=
ent</a> for a "label" start tag token with no attributes.=
</p>
+
+    <!-- fake text -->
+    <p><a href=3D#insert-a-character title=3D"insert a cha=
racter">Insert characters</a> (see below for <a href=3D#=
attr-isindex-prompt title=3Dattr-isindex-prompt>what they should say&l=
t;/a>).</p>
+
+    <!-- fake <input> -->
+    <p><a href=3D#insert-an-html-element>Insert an HTML elem=
ent</a> for an "input" start tag token with all the attri=
butes
+    from the "isindex" token except "name", "ac=
tion", and "prompt", and with an attribute named
+    "name" with the value "isindex". (This creates a=
n <code><a href=3D#the-input-element>input</a></code=
> element with the <code title=3Dattr-fe-name><a href=3D#attr=
-fe-name>name</a></code> attribute set to the magic balue =
"<code title=3Dattr-fe-name-isindex><a href=3D#attr-fe-name=
-isindex>isindex</a></code>".) Immediately pop the &l=
t;a href=3D#current-node>current node</a> off
+    the <a href=3D#stack-of-open-elements>stack of open elements&l=
t;/a>.</p>
+
+    <!-- fake text -->
+    <p><a href=3D#insert-a-character title=3D"insert a cha=
racter">Insert more characters</a> (see below for <a hre=
f=3D#attr-isindex-prompt title=3Dattr-isindex-prompt>what they should =
say</a>).</p>
+
+    <!-- fake </label> -->
+    <p>Pop the <a href=3D#current-node>current node</a&gt=
; (which will be the <code><a href=3D#the-label-element>label=
</a></code> element created
+    earlier) off the <a href=3D#stack-of-open-elements>stack of op=
en elements</a>.</p>
+
+    <!-- fake <hr> -->
+    <p><a href=3D#insert-an-html-element>Insert an HTML elem=
ent</a> for an "hr" start tag token with no attributes.
+    Immediately pop the <a href=3D#current-node>current node</a=
> off the <a href=3D#stack-of-open-elements>stack of open elemen=
ts</a>.</p>
+
+    <!-- fake </form> -->
+    <p>Pop the <a href=3D#current-node>current node</a&gt=
; (which will be the <code><a href=3D#the-form-element>form&l=
t;/a></code> element created
+    earlier) off the <a href=3D#stack-of-open-elements>stack of op=
en elements</a>. Set the <a href=3D#form-element-pointer><=
code title=3Dform>form</code> element pointer</a> to null.=
</p>
+
+    <!-- explanation of text -->
+    <p><dfn id=3Dattr-isindex-prompt title=3Dattr-isindex-promp=
t><strong>Prompt</strong></dfn>: If the token has an=
 attribute
+    with the name "prompt", then the first stream of character=
s must be the same string as given in
+    that attribute, and the second stream of characters must be empty. O=
therwise, the two streams of
+    character tokens together should, together with the <code><=
a href=3D#the-input-element>input</a></code> element, expr=
ess the
+    equivalent of "This is a searchable index. Enter search keyword=
s: (input field)" in the user's
+    preferred language.</p>
+
+   </dd>
+
+   <dt>A start tag whose tag name is "textarea"</dt&g=
t;
+   <dd>
+
+    <p>Run these steps:</p>
+
+    <ol><li><p><a href=3D#insert-an-html-element&gt=
;Insert an HTML element</a> for the token.</li>
+
+     <li><p>If the <a href=3D#next-token>next token&lt=
;/a> is a U+000A LINE FEED (LF) character token, then ignore
+     that token and move on to the next one. (Newlines at the start of &=
lt;code><a href=3D#the-textarea-element>textarea</a></c=
ode>
+     elements are ignored as an authoring convenience.)</li>
+
+     <!-- see comment in <pre> start tag bit -->
+
+     <li><p>Switch the tokenizer to the <a href=3D#rcdata=
-state>RCDATA state</a>.</li>
+
+     <li><p>Let the <a href=3D#original-insertion-mode&gt=
;original insertion mode</a> be the current <a href=3D#insertion=
-mode>insertion
+     mode</a>.</p>
+
+     <li><p>Set the <a href=3D#frameset-ok-flag>frames=
et-ok flag</a> to "not ok".</li>
+
+     <li><p>Switch the <a href=3D#insertion-mode>inser=
tion mode</a> to "<a href=3D#parsing-main-incdata title=3D&=
quot;insertion mode:
+     text">text</a>".</li>
+
+    </ol></dd>
+
+   <dt>A start tag whose tag name is "xmp"</dt>
+   <dd>
+
+    <p>If the <a href=3D#stack-of-open-elements>stack of ope=
n elements</a> <a href=3D#has-an-element-in-button-scope title=3D=
"has an element in button scope">has a
+    <code>p</code> element in button scope</a>, then &=
lt;a href=3D#close-a-p-element>close a <code>p</code>
+    element</a>.</p>
+
+    <p><a href=3D#reconstruct-the-active-formatting-elements&gt=
;Reconstruct the active formatting elements</a>, if any.</p>
+
+    <p>Set the <a href=3D#frameset-ok-flag>frameset-ok flag&=
lt;/a> to "not ok".</p>
+
+    <p>Follow the <a href=3D#generic-raw-text-element-parsing-a=
lgorithm>generic raw text element parsing algorithm</a>.</p&g=
t;
+
+   </dd>
+
+   <dt>A start tag whose tag name is "iframe"</dt>
+   <dd>
+
+    <p>Set the <a href=3D#frameset-ok-flag>frameset-ok flag&=
lt;/a> to "not ok".</p>
+
+    <p>Follow the <a href=3D#generic-raw-text-element-parsing-a=
lgorithm>generic raw text element parsing algorithm</a>.</p&g=
t;
+
+   </dd>
+
+   <dt>A start tag whose tag name is "noembed"</dt&gt=
;
+   <dt>A start tag whose tag name is "noscript", if the =
<a href=3D#scripting-flag>scripting flag</a> is enabled</d=
t>
+   <dd>
+
+    <p>Follow the <a href=3D#generic-raw-text-element-parsing-a=
lgorithm>generic raw text element parsing algorithm</a>.</p&g=
t;
+
+   </dd>
+
+   <dt>A start tag whose tag name is "select"</dt>
+   <dd>
+
+    <p><a href=3D#reconstruct-the-active-formatting-elements&gt=
;Reconstruct the active formatting elements</a>, if any.</p>
+
+    <p><a href=3D#insert-an-html-element>Insert an HTML elem=
ent</a> for the token.</p>
+
+    <p>Set the <a href=3D#frameset-ok-flag>frameset-ok flag&=
lt;/a> to "not ok".</p>
+
+    <p>If the <a href=3D#insertion-mode>insertion mode</a=
> is one of "<a href=3D#parsing-main-intable title=3D"ins=
ertion mode: in table">in
+    table</a>", "<a href=3D#parsing-main-incaption ti=
tle=3D"insertion mode: in caption">in caption</a>&quot=
;, "<a href=3D#parsing-main-intbody title=3D"insertion mode:=
 in table body">in table body</a>", "<a href=3D=
#parsing-main-intr title=3D"insertion mode: in
+    row">in row</a>", or "<a href=3D#parsing-=
main-intd title=3D"insertion mode: in cell">in cell</a&gt=
;", then switch the
+    <a href=3D#insertion-mode>insertion mode</a> to "&l=
t;a href=3D#parsing-main-inselectintable title=3D"insertion mode: in=
 select in table">in select in
+    table</a>". Otherwise, switch the <a href=3D#insertion=
-mode>insertion mode</a> to "<a href=3D#parsing-main-ins=
elect title=3D"insertion
+    mode: in select">in select</a>".</p>
+
+   </dd>
+
+   <dt>A start tag whose tag name is one of: "optgroup",=
 "option"</dt>
+   <dd>
+
+    <p>If the <a href=3D#current-node>current node</a>=
 is an <code><a href=3D#the-option-element>option</a>&l=
t;/code> element, then pop the
+    <a href=3D#current-node>current node</a> off the <a h=
ref=3D#stack-of-open-elements>stack of open elements</a>.</p&=
gt;
+
+    <p><a href=3D#reconstruct-the-active-formatting-elements&gt=
;Reconstruct the active formatting elements</a>, if any.</p>
+
+    <p><a href=3D#insert-an-html-element>Insert an HTML elem=
ent</a> for the token.</p>
+
+   </dd>
+
+   <dt>A start tag whose tag name is one of: "rp", &quot=
;rt"</dt>
+   <dd>
+
+    <!-- the parsing rules for ruby really don't match IE much at all=
, but in practice the markup
+         used is very simple and so strict compatibility with IE isn't r=
equired. For example, as
+         defined here we get very, very different behaviour than IE for =
pathological cases like:
+
+           <ruby><ol><li><p>a<rt>b
+           <ruby>a<rt>b<p>c
+
+         But in practice most ruby markup falls into these cases:
+
+           <ruby>a<rt>b</ruby>
+           <ruby>a<rp>b<rt>c<rp>d</ruby>
+           <ruby>a<rt>b</rt></ruby>
+           <ruby>a<rp>b</rp><rt>c</rt><=
rp>d</rp></ruby>
+
+         (Note: the comment above was written when this section did some=
thing slightly more radical
+         for handling <rp> and <rt> elements, so it might be=
 out of date now.)
+
+    -->
+
+    <p>If the <a href=3D#stack-of-open-elements>stack of ope=
n elements</a> <a href=3D#has-an-element-in-scope title=3D"=
has an element in scope">has a
+    <code>ruby</code> element in scope</a>, then <a=
 href=3D#generate-implied-end-tags>generate implied end tags</a>=
. If the
+    <a href=3D#current-node>current node</a> is not then a &=
lt;code><a href=3D#the-ruby-element>ruby</a></code> =
element, this is a <a href=3D#parse-error>parse
+    error</a>.</p>
+
+    <p><a href=3D#insert-an-html-element>Insert an HTML elem=
ent</a> for the token.</p>
+
+   </dd>
+
+   <dt>A start tag whose tag name is "math"</dt>
+   <dd>
+
+    <p><a href=3D#reconstruct-the-active-formatting-elements&gt=
;Reconstruct the active formatting elements</a>, if any.</p>
+
+    <p><a href=3D#adjust-mathml-attributes>Adjust MathML att=
ributes</a> for the token. (This fixes the case of MathML
+    attributes that are not all lowercase.)</p>
+
+    <p><a href=3D#adjust-foreign-attributes>Adjust foreign a=
ttributes</a> for the token. (This fixes the use of namespaced
+    attributes, in particular XLink.)</p>
+
+    <p><a href=3D#insert-a-foreign-element>Insert a foreign =
element</a> for the token, in the <a href=3D#mathml-namespace&gt=
;MathML
+    namespace</a>.</p>
+
+    <!-- If we ever change the frameset-ok flag to an insertion mode,=
 the following change would be
+    implied, except we'd have to do it even in the face of a self-closed=
 tag:
+    <p>Set the <span>frameset-ok flag</span> to "=
not ok".</p>
+    -->
+
+    <p>If the token has its <i>self-closing flag</i> s=
et, pop the <a href=3D#current-node>current node</a> off the
+    <a href=3D#stack-of-open-elements>stack of open elements</a=
> and <a href=3D#acknowledge-self-closing-flag title=3D"acknow=
ledge self-closing flag">acknowledge
+    the token's <i>self-closing flag</i></a>.</p&gt=
;
+
+   </dd>
+
+   <dt>A start tag whose tag name is "svg"</dt>
+   <dd>
+
+    <p><a href=3D#reconstruct-the-active-formatting-elements&gt=
;Reconstruct the active formatting elements</a>, if any.</p>
+
+    <p><a href=3D#adjust-svg-attributes>Adjust SVG attribute=
s</a> for the token. (This fixes the case of SVG attributes that
+    are not all lowercase.)</p>
+
+    <p><a href=3D#adjust-foreign-attributes>Adjust foreign a=
ttributes</a> for the token. (This fixes the use of namespaced
+    attributes, in particular XLink in SVG.)</p>
+
+    <p><a href=3D#insert-a-foreign-element>Insert a foreign =
element</a> for the token, in the <a href=3D#svg-namespace>SV=
G namespace</a>.</p>
+
+    <!-- If we ever change the frameset-ok flag to an insertion mode,=
 the following change would be
+    implied, except we'd have to do it even in the face of a self-closed=
 tag:
+    <p>Set the <span>frameset-ok flag</span> to "=
not ok".</p>
+    -->
+
+    <p>If the token has its <i>self-closing flag</i> s=
et, pop the <a href=3D#current-node>current node</a> off the
+    <a href=3D#stack-of-open-elements>stack of open elements</a=
> and <a href=3D#acknowledge-self-closing-flag title=3D"acknow=
ledge self-closing flag">acknowledge
+    the token's <i>self-closing flag</i></a>.</p&gt=
;
+
+   </dd>
+
+   <dt>A start <!--or end--> tag whose tag name is one of: &=
quot;caption", "col", "colgroup", "frame&qu=
ot;,
+   "head", "tbody", "td", "tfoot&quot=
;, "th", "thead", "tr"</dt>
+   <!--<dt>An end tag whose tag name is one of: "area&quot=
;, "base", "basefont", "bgsound", "emb=
ed",
+   "hr", "iframe", "image", "img&quot=
;, "input", "isindex", "keygen", "link=
", "menuitem", "meta",
+   "noembed", "noframes", "param", "s=
cript", "select", "source", "style", &=
quot;table", "textarea",
+   "title", "track", "wbr"</dt>--&gt=
;
+   <!--<dt>An end tag whose tag name is "noscript", i=
f the <span>scripting flag</span> is
+   enabled</dt>-->
+   <dd>
+
+    <p><a href=3D#parse-error>Parse error</a>. Ignore =
the token.</p>
+
+    <!-- end tags are commented out because since they can never end =
up on the stack anyway, the
+    default end tag clause will automatically handle them. we don't want=
 to have text in the spec
+    that is just an optimisation, as that detracts from the spec itself =
-->
+
+   </dd>
+
+   <dt>Any other start tag</dt>
+   <dd>
+
+    <p><a href=3D#reconstruct-the-active-formatting-elements&gt=
;Reconstruct the active formatting elements</a>, if any.</p>
+
+    <p><a href=3D#insert-an-html-element>Insert an HTML elem=
ent</a> for the token.</p>
+
+    <p class=3Dnote>This element will be an <a href=3D#ordinary=
>ordinary</a>
+    element.</p>
+
+   </dd>
+
+   <dt>Any other end tag</dt>
+   <dd>
+
+    <p>Run these steps:</p>
+
+    <ol><li><p>Initialize <var title=3D""=
>node</var> to be the <a href=3D#current-node>current node=
</a> (the bottommost
+     node of the stack).</li>
+
+     <li><p><i>Loop</i>: If <var title=3D&quo=
t;">node</var> is an <a href=3D#html-elements title=3D&q=
uot;HTML elements">HTML
+     element</a> with the same tag name as the token, then:</p&=
gt;
+
+      <ol><li><p><a href=3D#generate-implied-end-ta=
gs>Generate implied end tags</a>, except for <a href=3D#html-=
elements>HTML elements</a> with the
+       same tag name as the token.</li>
+
+       <li><p>If <var title=3D"">node</va=
r> is not the <a href=3D#current-node>current node</a>, th=
en this is a
+       <a href=3D#parse-error>parse error</a>.</li>
+
+       <li><p>Pop all the nodes from the <a href=3D#curre=
nt-node>current node</a> up to <var title=3D"">n=
ode</var>,
+       including <var title=3D"">node</var>, then =
stop these steps.</li>
+
+      </ol></li>
+
+     <li><p>Otherwise, if <var title=3D"">no=
de</var> is in the <a href=3D#special>special</a> categ=
ory, then
+     this is a <a href=3D#parse-error>parse error</a>; ignor=
e the token, and abort these steps.</li>
+
+     <li><p>Set <var title=3D"">node</var=
> to the previous entry in the <a href=3D#stack-of-open-elements&gt=
;stack of open
+     elements</a>.</li>
+
+     <li><p>Return to the step labeled <i>loop</i&g=
t;.</li>
+
+    </ol></dd>
+
+  </dl><p>When the steps above say the user agent is to <=
dfn id=3Dclose-a-p-element>close a <code>p</code> element&=
lt;/dfn>, it
+  means that the user agent must run the following steps:</p>
+
+  <ol><!-- prereq: p in scope --><li><p><a hr=
ef=3D#generate-implied-end-tags>Generate implied end tags</a>, e=
xcept for <code><a href=3D#the-p-element>p</a></code=
> elements.</li>
+
+   <li><p>If the <a href=3D#current-node>current node&=
lt;/a> is not a <code><a href=3D#the-p-element>p</a>=
</code> element, then this is a
+   <a href=3D#parse-error>parse error</a>.</li>
+
+   <li><p>Pop elements from the <a href=3D#stack-of-open-=
elements>stack of open elements</a> until a <code><a hr=
ef=3D#the-p-element>p</a></code> element
+   has been popped from the stack.</li>
+
+  </ol><!-- AAA --><p id=3DadoptionAgency>The <dfn =
id=3Dadoption-agency-algorithm>adoption agency algorithm</dfn>, =
which takes as its only argument
+  a tag name <var title=3D"">subject</var> for whi=
ch the algorithm is being run, consists of the
+  following steps:</p>
+
+  <ol><!-- don't forget about the noah's ark clause when lookin=
g at this algorithm! --><li>
+
+    <p>If the <a href=3D#current-node>current node</a>=
 is an <a href=3D#html-elements title=3D"HTML elements">H=
TML element</a> whose
+    tag name is <var title=3D"">subject</var>, the=
n run these substeps:
+
+    <ol><li><p>Let <var title=3D"">ele=
ment</var> be the <a href=3D#current-node>current node</a&=
gt;.</li>
+
+     <li><p>Pop <var title=3D"">element</=
var> off the <a href=3D#stack-of-open-elements>stack of open ele=
ments</a>.</li>
+
+     <li><p>If <var title=3D"">element</v=
ar> is also in the <a href=3D#list-of-active-formatting-elements&gt=
;list of active formatting
+     elements</a>, remove the element from the list.</li>
+
+     <li><p>Abort the <a href=3D#adoption-agency-algorith=
m>adoption agency algorithm</a>.</li>
+
+    </ol></li>
+
+   <li><p>Let <var title=3D"">outer loop cou=
nter</var> be zero.</li>
+
+   <li><p><i>Outer loop</i>: If <var title=3D=
"">outer loop counter</var> is greater than or equal t=
o
+   eight, then abort these steps.</li>
+
+   <li><p>Increment <var title=3D"">outer lo=
op counter</var> by one.</li>
+
+   <li>
+
+    <p>Let <var title=3D"">formatting element</=
var> be the last element in the <a href=3D#list-of-active-formattin=
g-elements>list of active
+    formatting elements</a> that:</p>
+
+    <ul><li>is between the end of the list and the last scop=
e marker in the list, if any, or the start
+     of the list otherwise, and</li>
+
+     <li>has the tag name <var title=3D"">subject&=
lt;/var>.</li>
+
+    </ul><p>If there is no such element, then abort these st=
eps and instead act as described in the "any
+    other end tag" entry above.</p>
+
+   </li>
+
+   <li><p>If <var title=3D"">formatting elem=
ent</var> is not in the <a href=3D#stack-of-open-elements>sta=
ck of open
+   elements</a>, then this is a <a href=3D#parse-error>parse=
 error</a>; remove the element from the list, and
+   abort these steps.</li>
+
+   <li><p>If <var title=3D"">formatting elem=
ent</var> is in the <a href=3D#stack-of-open-elements>stack o=
f open elements</a>,
+   but the element is not <a href=3D#has-an-element-in-scope title=3D=
"has an element in scope">in scope</a>, then this is a
+   <a href=3D#parse-error>parse error</a>; abort these steps=
.</li>
+
+   <!-- at this point, <var title=3D"">formatting ele=
ment</var> is in <span title=3D"stack of open
+        elements">the stack</span> and <span title=3D&q=
uot;list of active formatting elements">the
+        list</span>, and is <span title=3D"has an element =
in scope">in scope</span>. -->
+
+   <li><p>If <var title=3D"">formatting elem=
ent</var> is not the <a href=3D#current-node>current node<=
/a>, this is a
+   <a href=3D#parse-error>parse error</a>. (But do not abort=
 these steps.)</li>
+
+   <li><p>Let <var title=3D"">furthest block=
</var> be the topmost node in the <a href=3D#stack-of-open-eleme=
nts>stack of open
+   elements</a> that is lower in the stack than <var title=3D&q=
uot;">formatting element</var>, and is an
+   element in the <a href=3D#special>special</a> category. T=
here might not be one.</li>
+
+   <!-- <html> ... <formatting element> ... <furthest =
block> ... <current node> -->
+
+   <li><p>If there is no <var title=3D"">fur=
thest block</var>, then the UA must first pop all the
+   nodes from the bottom of the <a href=3D#stack-of-open-elements>=
stack of open elements</a>, from the <a href=3D#current-node>=
current
+   node</a> up to and including <var title=3D"">fo=
rmatting element</var>, then remove <var title=3D""&gt=
;formatting element</var> from the <a href=3D#list-of-active-for=
matting-elements>list of active formatting elements</a>, and
+   finally abort these steps.</li> <!-- the "reconstruct t=
he active formatting elements"
+   algorithm will rebuild them later -->
+
+   <li><p>Let <var title=3D"">common ancesto=
r</var> be the element immediately above <var title=3D"&quo=
t;>formatting element</var> in the <a href=3D#stack-of-open-e=
lements>stack of open elements</a>.</li>
+
+   <!-- <html> ... <common ancestor> <formatting eleme=
nt> ... <furthest block> ... <current node> -->
+
+   <li><p>Let a bookmark note the position of <var title=3D=
"">formatting element</var> in the
+   <a href=3D#list-of-active-formatting-elements>list of active fo=
rmatting elements</a> relative to the elements on either side of it=
 in
+   the list.</li>
+
+   <li>
+
+    <p>Let <var title=3D"">node</var> and &l=
t;var title=3D"">last node</var> be <var title=3D&q=
uot;">furthest
+    block</var>. Follow these steps:</p>
+
+    <ol><li><p>Let <var title=3D"">inn=
er loop counter</var> be zero.</li>
+
+     <li><p><i>Inner loop</i>: Increment <var=
 title=3D"">inner loop counter</var> by one.</li&gt=
;
+
+     <li><p>Let <var title=3D"">node</var=
> be the element immediately above <var title=3D"">nod=
e</var>
+     in the <a href=3D#stack-of-open-elements>stack of open elemen=
ts</a>, or if <var title=3D"">node</var> is n=
o longer in the
+     <a href=3D#stack-of-open-elements>stack of open elements</=
a> (e.g. because it got removed by this algorithm<!-- in
+     particular, the step labeled "removal" below -->), the=
 element that was immediately above <var title=3D"">node&=
lt;/var> in the <a href=3D#stack-of-open-elements>stack of open =
elements</a> before <var title=3D"">node</var&gt=
;
+     was removed.</li>
+
+     <li><p>If <var title=3D"">node</var&=
gt; is <var title=3D"">formatting element</var>, th=
en go to the
+     next step in the overall algorithm.</li>
+
+     <li><p>If <var title=3D"">inner loop co=
unter</var> is greater than three and <var title=3D""&=
gt;node</var> is in the <a href=3D#list-of-active-formatting-ele=
ments>list of active formatting elements</a>, then remove <va=
r title=3D"">node</var> from the <a href=3D#list-of=
-active-formatting-elements>list of active formatting elements</a&g=
t;.</li>
+
+     <li><p><!-- "removal" step: -->If <v=
ar title=3D"">node</var> is not in the <a href=3D#l=
ist-of-active-formatting-elements>list of active
+     formatting elements</a>, then remove <var title=3D"&q=
uot;>node</var> from the <a href=3D#stack-of-open-elements&gt=
;stack of open
+     elements</a> and then go back to the step labeled <i>in=
ner loop</i>.</li>
+
+     <li><p><a href=3D#create-an-element-for-the-token&gt=
;Create an element for the token</a> for which the element <var =
title=3D"">node</var> was created, in the <a href=3D=
#html-namespace-0>HTML namespace</a>, with <var title=3D&quot=
;">common
+     ancestor</var> as the intended parent; replace the entry for =
<var title=3D"">node</var> in the
+     <a href=3D#list-of-active-formatting-elements>list of active =
formatting elements</a> with an entry for the new element, replace =
the
+     entry for <var title=3D"">node</var> in the &=
lt;a href=3D#stack-of-open-elements>stack of open elements</a> w=
ith an entry for
+     the new element, and let <var title=3D"">node</v=
ar> be the new element.</li>
+
+     <li><p>If <var title=3D"">last node<=
/var> is <var title=3D"">furthest block</var>, t=
hen move the
+     aforementioned bookmark to be immediately after the new <var tit=
le=3D"">node</var> in the
+     <a href=3D#list-of-active-formatting-elements>list of active =
formatting elements</a>.</li>
+
+     <li><p>Insert <var title=3D"">last node=
</var> into <var title=3D"">node</var>, first=
 removing it
+     from its previous parent node if any.</li>
+
+     <li><p>Let <var title=3D"">last node&lt=
;/var> be <var title=3D"">node</var>.</li>
+
+     <li><p>Return to the step labeled <i>inner loop&l=
t;/i>.</li>
+
+    </ol></li>
+
+   <li><p>Insert whatever <var title=3D"">la=
st node</var> ended up being in the previous step at the
+   <a href=3D#appropriate-place-for-inserting-a-node>appropriate p=
lace for inserting a node</a>, but using <var title=3D"&quo=
t;>common
+   ancestor</var> as the <i>override target</i>.</l=
i>
+
+   <li><p><a href=3D#create-an-element-for-the-token>C=
reate an element for the token</a> for which <var title=3D"=
">formatting
+   element</var> was created, in the <a href=3D#html-namespace-=
0>HTML namespace</a>, with <var title=3D"">furth=
est
+   block</var> as the intended parent.</li>
+
+   <li><p>Take all of the child nodes of <var title=3D&qu=
ot;">furthest block</var> and append them to the
+   element created in the last step.</li>
+
+   <li><p>Append that new element to <var title=3D"&=
quot;>furthest block</var>.</li>
+
+   <li><p>Remove <var title=3D"">formatting =
element</var> from the <a href=3D#list-of-active-formatting-elem=
ents>list of active formatting
+   elements</a>, and insert the new element into the <a href=3D=
#list-of-active-formatting-elements>list of active formatting
+   elements</a> at the position of the aforementioned bookmark.&lt=
;/li>
+
+   <li><p>Remove <var title=3D"">formatting =
element</var> from the <a href=3D#stack-of-open-elements>stac=
k of open
+   elements</a>, and insert the new element into the <a href=3D=
#stack-of-open-elements>stack of open elements</a>
+   immediately below the position of <var title=3D"">fur=
thest block</var> in that stack.</li>
+
+   <li><p>Jump back to the step labeled <i>outer loop&=
lt;/i>.</li>
+
+  </ol><p class=3Dnote>This algorithm's name, the "adop=
tion agency algorithm", comes from the way it
+  causes elements to change parents, and is in contrast with other possi=
ble algorithms for dealing
+  with misnested content, which included the "incest algorithm&quot=
;, the "secret affair algorithm", and
+  the "Heisenberg algorithm".</p>
+
+
+
+
+
+  <h6 id=3Dparsing-main-incdata><span class=3Dsecno>12.2.5.4=
.8 </span>The "<dfn title=3D"insertion mode: text&quot=
;>text</dfn>" insertion mode</h6>
+
+  <p>When the user agent is to apply the rules for the "<a=
 href=3D#parsing-main-incdata title=3D"insertion mode:
+  text">text</a>" <a href=3D#insertion-mode>ins=
ertion mode</a>, the user agent must handle the token as
+  follows:</p>
+
+  <dl class=3Dswitch><dt>A character token</dt>
+   <dd>
+
+    <p><a href=3D#insert-a-character title=3D"insert a cha=
racter">Insert the token's character</a>.</p>
+
+    <p class=3Dnote>This can never be a U+0000 NULL character; the=
 tokenizer converts those to
+    U+FFFD REPLACEMENT CHARACTER characters.</p>
+
+   </dd>
+
+   <dt>An end-of-file token</dt>
+   <dd>
+
+    <!-- can't be the fragment case -->
+    <p><a href=3D#parse-error>Parse error</a>.</p&g=
t;
+
+    <p>If the <a href=3D#current-node>current node</a>=
 is a <code><a href=3D#the-script-element>script</a>&lt=
;/code> element, mark the
+    <code><a href=3D#the-script-element>script</a><=
/code> element as <a href=3D#already-started>"already start=
ed"</a>.</p>
+
+    <p>Pop the <a href=3D#current-node>current node</a&gt=
; off the <a href=3D#stack-of-open-elements>stack of open elements&=
lt;/a>.</p>
+
+    <p>Switch the <a href=3D#insertion-mode>insertion mode&l=
t;/a> to the <a href=3D#original-insertion-mode>original inserti=
on mode</a> and
+    reprocess the token.</p>
+
+   </dd>
+
+   <dt id=3DscriptEndTag>An end tag whose tag name is "script=
"</dt>
+   <dd>
+
+    <p><a href=3D#perform-a-microtask-checkpoint>Perform a m=
icrotask checkpoint</a>.</p>
+
+    <p><a href=3D#provide-a-stable-state>Provide a stable st=
ate</a>.</p>
+
+    <p>Let <var title=3D"">script</var> be t=
he <a href=3D#current-node>current node</a> (which will be a
+    <code><a href=3D#the-script-element>script</a><=
/code> element).</p>
+
+    <p>Pop the <a href=3D#current-node>current node</a&gt=
; off the <a href=3D#stack-of-open-elements>stack of open elements&=
lt;/a>.</p>
+
+    <p>Switch the <a href=3D#insertion-mode>insertion mode&l=
t;/a> to the <a href=3D#original-insertion-mode>original inserti=
on mode</a>.</p>
+
+    <p>Let the <var title=3D"">old insertion point=
</var> have the same value as the current
+    <a href=3D#insertion-point>insertion point</a>. Let the =
<a href=3D#insertion-point>insertion point</a> be just before=
 the <a href=3D#next-input-character>next
+    input character</a>.</p>
+
+    <p>Increment the parser's <a href=3D#script-nesting-level&g=
t;script nesting level</a> by one.</p>
+
+    <p><a href=3D#prepare-a-script title=3D"prepare a scri=
pt">Prepare</a> the <var title=3D"">script&=
lt;/var>. This might
+    cause some script to execute, which might cause <a href=3D#dom-do=
cument-write title=3Ddom-document-write>new characters
+    to be inserted into the tokenizer</a>, and might cause the tok=
enizer to output more tokens,
+    resulting in a <a href=3D#nestedParsing>reentrant invocation o=
f the parser</a>.</p>
+
+    <p>Decrement the parser's <a href=3D#script-nesting-level&g=
t;script nesting level</a> by one. If the parser's <a href=3D#sc=
ript-nesting-level>script
+    nesting level</a> is zero, then set the <a href=3D#parser-p=
ause-flag>parser pause flag</a> to false.</p>
+
+    <p>Let the <a href=3D#insertion-point>insertion point&lt=
;/a> have the value of the <var title=3D"">old inserti=
on
+    point</var>. (In other words, restore the <a href=3D#insert=
ion-point>insertion point</a> to its previous value.
+    This value might be the "undefined" value.)</p>
+
+    <p id=3DscriptTagParserResumes>At this stage, if there is a &l=
t;a href=3D#pending-parsing-blocking-script>pending parsing-blocking
+    script</a>, then:</p>
+
+    <dl class=3Dswitch><dt>If the <a href=3D#script-nesti=
ng-level>script nesting level</a> is not zero:</dt>
+
+     <dd>
+
+      <p>Set the <a href=3D#parser-pause-flag>parser pause f=
lag</a> to true, and abort the processing of any nested
+      invocations of the tokenizer, yielding control back to the caller.=
 (Tokenization will resume
+      when the caller returns to the "outer" tree construction=
 stage.)</p>
+
+      <p class=3Dnote>The tree construction stage of this particul=
ar parser is <a href=3D#nestedParsing>being called reentrantly</=
a>, say from a call to <code title=3Ddom-document-write><a hr=
ef=3D#dom-document-write>document.write()</a></code>.</=
p>
+
+     </dd>
+
+
+     <dt>Otherwise:</dt>
+
+     <dd>
+
+      <p>Run these steps:</p>
+
+      <ol><li><p>Let <var title=3D"">t=
he script</var> be the <a href=3D#pending-parsing-blocking-scrip=
t>pending parsing-blocking
+       script</a>. There is no longer a <a href=3D#pending-pars=
ing-blocking-script>pending parsing-blocking script</a>.</li&=
gt;
+
+       <li><p>Block the <a href=3D#tokenization title=3Dt=
okenization>tokenizer</a> for this instance of the
+       <a href=3D#html-parser>HTML parser</a>, such that the=
 <a href=3D#event-loop>event loop</a> will not run <a href=
=3D#concept-task title=3Dconcept-task>tasks</a> that invoke the =
<a href=3D#tokenization title=3Dtokenization>tokenizer</a>.&l=
t;/li>
+
+       <li><p>If the parser's <code><a href=3D#docu=
ment>Document</a></code> <a href=3D#has-a-style-sheet-t=
hat-is-blocking-scripts>has a style sheet that is blocking
+       scripts</a> or <var title=3D"">the script&l=
t;/var>'s <a href=3D#ready-to-be-parser-executed>"ready to =
be parser-executed"</a>
+       flag is not set: <a href=3D#spin-the-event-loop>spin the ev=
ent loop</a> until the parser's <code><a href=3D#document&=
gt;Document</a></code>
+       <a href=3D#has-no-style-sheet-that-is-blocking-scripts>has =
no style sheet that is blocking scripts</a> and <var title=3D&qu=
ot;">the script</var>'s
+       <a href=3D#ready-to-be-parser-executed>"ready to be pa=
rser-executed"</a> flag is set.</li>
+
+       <li>
+
+        <p>If this <a href=3D#abort-a-parser title=3D"abor=
t a parser">parser has been aborted</a> in the meantime,
+        abort these steps.</p>
+
+        <p class=3Dnote>This could happen if, e.g., while the <=
a href=3D#spin-the-event-loop>spin the event loop</a>
+        algorithm is running, the <a href=3D#browsing-context>brow=
sing context</a> gets closed, or the <code title=3Ddom-document-=
open><a href=3D#dom-document-open>document.open()</a></=
code> method gets invoked on the
+        <code><a href=3D#document>Document</a></cod=
e>.</p>
+
+       </li>
+
+       <li><p>Unblock the <a href=3D#tokenization title=3D=
tokenization>tokenizer</a> for this instance of the
+       <a href=3D#html-parser>HTML parser</a>, such that &lt=
;a href=3D#concept-task title=3Dconcept-task>tasks</a> that invo=
ke the
+       <a href=3D#tokenization title=3Dtokenization>tokenizer</=
a> can again be run.</li>
+
+       <li><p>Let the <a href=3D#insertion-point>inser=
tion point</a> be just before the <a href=3D#next-input-characte=
r>next input
+       character</a>.</li>
+
+       <li><p>Increment the parser's <a href=3D#script-ne=
sting-level>script nesting level</a> by one (it should be zero
+       before this step, so this sets it to one).</li>
+
+       <li><p><a href=3D#execute-the-script-block title=3D=
"execute the script block">Execute</a> <var title=3D=
"">the
+       script</var>.</li>
+
+       <li><p>Decrement the parser's <a href=3D#script-ne=
sting-level>script nesting level</a> by one. If the parser's
+       <a href=3D#script-nesting-level>script nesting level</a&=
gt; is zero (which it always should be at this point), then set
+       the <a href=3D#parser-pause-flag>parser pause flag</a&gt=
; to false.</p>
+
+       <li><p>Let the <a href=3D#insertion-point>inser=
tion point</a> be undefined again.</li>
+
+       <li><p>If there is once again a <a href=3D#pending=
-parsing-blocking-script>pending parsing-blocking script</a>, th=
en repeat
+       these steps from step 1.</li>
+
+      </ol></dd>
+
+    </dl></dd>
+
+   <dt>Any other end tag</dt>
+   <dd>
+
+    <p>Pop the <a href=3D#current-node>current node</a&gt=
; off the <a href=3D#stack-of-open-elements>stack of open elements&=
lt;/a>.</p>
+
+    <p>Switch the <a href=3D#insertion-mode>insertion mode&l=
t;/a> to the <a href=3D#original-insertion-mode>original inserti=
on mode</a>.</p>
+
+   </dd>
+
+  </dl><h6 id=3Dparsing-main-intable><span class=3Dsecno&=
gt;12.2.5.4.9 </span>The "<dfn title=3D"insertion mode=
: in table">in table</dfn>" insertion mode</h6>
+
+  <p>When the user agent is to apply the rules for the "<a=
 href=3D#parsing-main-intable title=3D"insertion mode: in table&quot=
;>in
+  table</a>" <a href=3D#insertion-mode>insertion mode&l=
t;/a>, the user agent must handle the token as follows:</p>
+
+  <dl class=3Dswitch><dt>A character token, if the <a hre=
f=3D#current-node>current node</a> is <code><a href=3D#=
the-table-element>table</a></code>, <code><a href=
=3D#the-tbody-element>tbody</a></code>, <code><a =
href=3D#the-tfoot-element>tfoot</a></code>, <code>&l=
t;a href=3D#the-thead-element>thead</a></code>, or <cod=
e><a href=3D#the-tr-element>tr</a></code> element&lt=
;/dt>
+   <dd>
+
+     <p>Let the <dfn id=3Dpending-table-character-tokens>&lt=
;var>pending table character tokens</var></dfn> be an empt=
y list of tokens.</p>
+
+     <p>Let the <a href=3D#original-insertion-mode>original =
insertion mode</a> be the current <a href=3D#insertion-mode>i=
nsertion mode</a>.</p>
+
+     <p>Switch the <a href=3D#insertion-mode>insertion mode&=
lt;/a> to "<a href=3D#parsing-main-intabletext title=3D"i=
nsertion mode: in table text">in
+     table text</a>" and reprocess the token.</p>
+
+   </dd>
+
+   <dt>A comment token</dt>
+   <dd>
+    <p><a href=3D#insert-a-comment>Insert a comment</a&gt=
;.</p>
+   </dd>
+
+   <dt>A DOCTYPE token</dt>
+   <dd>
+    <p><a href=3D#parse-error>Parse error</a>. Ignore =
the token.</p>
+   </dd>
+
+   <dt>A start tag whose tag name is "caption"</dt&gt=
;
+   <dd>
+
+    <p><a href=3D#clear-the-stack-back-to-a-table-context>Cl=
ear the stack back to a table context</a>. (See below.)</p>
+
+    <p>Insert a marker at the end of the <a href=3D#list-of-act=
ive-formatting-elements>list of active formatting elements</a>.&=
lt;/p>
+
+    <p><a href=3D#insert-an-html-element>Insert an HTML elem=
ent</a> for the token, then switch the <a href=3D#insertion-mode=
>insertion
+    mode</a> to "<a href=3D#parsing-main-incaption title=3D=
"insertion mode: in caption">in caption</a>".<=
/p>
+
+   </dd>
+
+   <dt>A start tag whose tag name is "colgroup"</dt&g=
t;
+   <dd>
+
+    <p><a href=3D#clear-the-stack-back-to-a-table-context>Cl=
ear the stack back to a table context</a>. (See below.)</p>
+
+    <p><a href=3D#insert-an-html-element>Insert an HTML elem=
ent</a> for the token, then switch the <a href=3D#insertion-mode=
>insertion
+    mode</a> to "<a href=3D#parsing-main-incolgroup title=3D=
"insertion mode: in column group">in column group</a>&=
quot;.</p>
+
+   </dd>
+
+   <dt>A start tag whose tag name is "col"</dt>
+   <dd>
+
+    <!-- fake <colgroup> -->
+    <p><a href=3D#clear-the-stack-back-to-a-table-context>Cl=
ear the stack back to a table context</a>. (See below.)</p>
+
+    <p><a href=3D#insert-an-html-element>Insert an HTML elem=
ent</a> for a "colgroup" start tag token with no attribut=
es, then
+    switch the <a href=3D#insertion-mode>insertion mode</a> =
to "<a href=3D#parsing-main-incolgroup title=3D"insertion mo=
de: in column group">in
+    column group</a>".</p>
+    <!-- end of fake <colgroup> -->
+
+    <p>Reprocess the current token.</p>
+
+   </dd>
+
+   <dt>A start tag whose tag name is one of: "tbody", &q=
uot;tfoot", "thead"</dt>
+   <dd>
+
+    <p><a href=3D#clear-the-stack-back-to-a-table-context>Cl=
ear the stack back to a table context</a>. (See below.)</p>
+
+    <p><a href=3D#insert-an-html-element>Insert an HTML elem=
ent</a> for the token, then switch the <a href=3D#insertion-mode=
>insertion
+    mode</a> to "<a href=3D#parsing-main-intbody title=3D&=
quot;insertion mode: in table body">in table body</a>"=
.</p>
+
+   </dd>
+
+   <dt>A start tag whose tag name is one of: "td", &quot=
;th", "tr"</dt>
+   <dd>
+
+    <!-- fake <colgroup> -->
+    <p><a href=3D#clear-the-stack-back-to-a-table-context>Cl=
ear the stack back to a table context</a>. (See below.)</p>
+
+    <p><a href=3D#insert-an-html-element>Insert an HTML elem=
ent</a> for a "tbody" start tag token with no attributes,=
 then
+    switch the <a href=3D#insertion-mode>insertion mode</a> =
to "<a href=3D#parsing-main-intbody title=3D"insertion mode:=
 in table body">in table
+    body</a>".</p>
+    <!-- end of fake <colgroup> -->
+
+    <p>Reprocess the current token.</p>
+
+   </dd>
+
+   <dt>A start tag whose tag name is "table"</dt>
+   <dd>
+
+    <p><a href=3D#parse-error>Parse error</a>.</p&g=
t;
+
+    <!-- fake </table> -->
+    <p>If the <a href=3D#stack-of-open-elements>stack of ope=
n elements</a> does not <a href=3D#has-an-element-in-table-scope=
 title=3D"has an element in table
+    scope">have a <code>table</code> element in tabl=
e scope</a>, ignore the token.</p>
+
+    <p>Otherwise:</p>
+
+    <p>Pop elements from this stack until a <code><a href=
=3D#the-table-element>table</a></code> element has been po=
pped from the
+    stack.</p>
+
+    <p><a href=3D#reset-the-insertion-mode-appropriately>Res=
et the insertion mode appropriately</a>.</p>
+    <!-- end of fake </table> -->
+
+    <p>Reprocess the token.</p>
+
+   </dd>
+
+   <dt>An end tag whose tag name is "table"</dt>
+   <dd>
+
+    <p>If the <a href=3D#stack-of-open-elements>stack of ope=
n elements</a> does not <a href=3D#has-an-element-in-table-scope=
 title=3D"has an element in table
+    scope">have a <code>table</code> element in tabl=
e scope</a>, this is a <a href=3D#parse-error>parse
+    error</a>; ignore the token.</p>
+
+    <p>Otherwise:</p>
+
+    <p>Pop elements from this stack until a <code><a href=
=3D#the-table-element>table</a></code> element has been po=
pped from the
+    stack.</p>
+
+    <p><a href=3D#reset-the-insertion-mode-appropriately>Res=
et the insertion mode appropriately</a>.</p>
+
+   </dd>
+
+   <dt>An end tag whose tag name is one of: "body", &quo=
t;caption", "col", "colgroup", "html",=
 "tbody",
+   "td", "tfoot", "th", "thead",=
 "tr"</dt>
+   <dd>
+    <p><a href=3D#parse-error>Parse error</a>. Ignore =
the token.</p>
+   </dd>
+
+   <dt>A start tag whose tag name is one of: "style", &q=
uot;script", "template"</dt>
+   <dt>An end tag whose tag name is "template"</dt&gt=
;
+   <dd>
+
+    <p>Process the token <a href=3D#using-the-rules-for>usin=
g the rules for</a> the "<a href=3D#parsing-main-inhead tit=
le=3D"insertion mode: in head">in head</a>" <a=
 href=3D#insertion-mode>insertion
+    mode</a>.</p>
+
+   </dd>
+
+   <dt>A start tag whose tag name is "input"</dt>
+   <dd>
+
+    <p>If the token does not have an attribute with the name &quot=
;type", or if it does, but that
+    attribute's value is not an <a href=3D#ascii-case-insensitive>=
ASCII case-insensitive</a> match for the string "<code titl=
e=3D"">hidden</code>", then: act as described in =
the "anything else" entry below.</p>
+
+    <p>Otherwise:</p>
+
+    <p><a href=3D#parse-error>Parse error</a>.</p&g=
t;
+
+    <p><a href=3D#insert-an-html-element>Insert an HTML elem=
ent</a> for the token.</p>
+
+    <p>Pop that <code><a href=3D#the-input-element>inp=
ut</a></code> element off the <a href=3D#stack-of-open-ele=
ments>stack of open elements</a>.</p>
+
+    <p><a href=3D#acknowledge-self-closing-flag title=3D"a=
cknowledge self-closing flag">Acknowledge the token's <i>se=
lf-closing
+    flag</i></a>, if it is set.</p>
+
+   </dd>
+
+   <dt>A start tag whose tag name is "form"</dt>
+   <dd>
+
+    <p><a href=3D#parse-error>Parse error</a>.</p&g=
t;
+
+    <p>If the <a href=3D#form-element-pointer><code title=
=3Dform>form</code> element pointer</a> is not null, ignor=
e the
+    token.</p>
+
+    <p>Otherwise:</p>
+
+    <p><a href=3D#insert-an-html-element>Insert an HTML elem=
ent</a> for the token, and set the <a href=3D#form-element-point=
er><code title=3Dform>form</code> element pointer</a&gt=
; to point to the element created.</p>
+
+    <p>Pop that <code><a href=3D#the-form-element>form=
</a></code> element off the <a href=3D#stack-of-open-eleme=
nts>stack of open elements</a>.</p>
+
+   </dd>
+
+   <!-- "form" end tag falls through to in-body, which does=
 the right thing -->
+
+   <dt>An end-of-file token</dt>
+   <dd>
+
+    <p>Process the token <a href=3D#using-the-rules-for>usin=
g the rules for</a> the "<a href=3D#parsing-main-inbody tit=
le=3D"insertion mode: in
+    body">in body</a>" <a href=3D#insertion-mode&g=
t;insertion mode</a>.</p>
+
+   </dd>
+
+   <dt>Anything else</dt>
+   <dd>
+
+    <p><a href=3D#parse-error>Parse error</a>. Enable =
<a href=3D#foster-parent title=3D"foster parent">foster p=
arenting</a>, process
+    the token <a href=3D#using-the-rules-for>using the rules for&l=
t;/a> the "<a href=3D#parsing-main-inbody title=3D"insert=
ion mode: in body">in
+    body</a>" <a href=3D#insertion-mode>insertion mode&=
lt;/a>, and then disable <a href=3D#foster-parent title=3D"fos=
ter parent">foster
+    parenting</a>.</p>
+
+   </dd>
+
+  </dl><p>When the steps above require the UA to <dfn id=3D=
clear-the-stack-back-to-a-table-context>clear the stack back to a tabl=
e context</dfn>, it
+  means that the UA must, while the <a href=3D#current-node>curren=
t node</a> is not a <code><a href=3D#the-table-element>=
table</a></code>,
+  <code><a href=3D#the-template-element>template</a>&l=
t;/code>, or <code><a href=3D#the-html-element>html</a&=
gt;</code> element, pop elements from the <a href=3D#stack-of-op=
en-elements>stack of open
+  elements</a>.</p>
+
+  <p class=3Dnote>The <a href=3D#current-node>current node&l=
t;/a> being an <code><a href=3D#the-html-element>html</=
a></code> element after this
+  process is a <a href=3D#fragment-case>fragment case</a>.&l=
t;/p>
+
+
+
+  <h6 id=3Dparsing-main-intabletext><span class=3Dsecno>12.2=
.5.4.10 </span>The "<dfn title=3D"insertion mode: in t=
able text">in table text</dfn>" insertion mode</h6&=
gt;
+
+  <p>When the user agent is to apply the rules for the "<a=
 href=3D#parsing-main-intabletext title=3D"insertion mode: in table
+  text">in table text</a>" <a href=3D#insertion-mo=
de>insertion mode</a>, the user agent must handle the token as
+  follows:</p>
+
+  <dl class=3Dswitch><dt>A character token that is U+0000 NU=
LL</dt>
+   <dd>
+
+    <p><a href=3D#parse-error>Parse error</a>. Ignore =
the token.</p>
+
+   </dd>
+
+
+   <dt>Any other character token</dt>
+   <dd>
+
+    <p>Append the character token to the <var><a href=3D#=
pending-table-character-tokens>pending table character tokens</a&gt=
;</var> list.</p>
+
+   </dd>
+
+
+   <dt>Anything else</dt>
+   <dd>
+
+    <!-- this can only be called if the current node is one of the ta=
ble model elements -->
+
+    <p>If any of the tokens in the <var><a href=3D#pendin=
g-table-character-tokens>pending table character tokens</a></=
var> list are character
+    tokens that are not <a href=3D#space-character title=3D"spac=
e character">space characters</a>, then reprocess the
+    character tokens in the <var><a href=3D#pending-table-chara=
cter-tokens>pending table character tokens</a></var> list =
using the rules given in
+    the "anything else" entry in the "<a href=3D#parsi=
ng-main-intable title=3D"insertion mode: in table">in table&=
lt;/a>"
+    insertion mode.</p>
+
+    <!-- if there's active formatting elements, it'll recreate those =
and foster parent the top one
+    and then put the text nodes in the formatting elements; otherwise, i=
t'll foster parent the
+    character tokens. -->
+
+    <p>Otherwise, <a href=3D#insert-a-character title=3D"i=
nsert a character">insert the characters</a> given by the
+    <var><a href=3D#pending-table-character-tokens>pending t=
able character tokens</a></var> list.</p> <!-- i.e. =
inter-element whitespace in the
+    table model isn't foster parented -->
+
+    <!-- no need to empty the list, we're leaving the insertion mode =
and the list is always emptied
+    before we reenter the mode -->
+
+    <p>Switch the <a href=3D#insertion-mode>insertion mode&l=
t;/a> to the <a href=3D#original-insertion-mode>original inserti=
on mode</a> and
+    reprocess the token.</p>
+
+   </dd>
+
+  </dl><h6 id=3Dparsing-main-incaption><span class=3Dsecn=
o>12.2.5.4.11 </span>The "<dfn title=3D"insertion m=
ode: in caption">in caption</dfn>" insertion mode</=
h6>
+
+  <p>When the user agent is to apply the rules for the "<a=
 href=3D#parsing-main-incaption title=3D"insertion mode: in caption&=
quot;>in
+  caption</a>" <a href=3D#insertion-mode>insertion mode=
</a>, the user agent must handle the token as follows:</p>
+
+  <dl class=3Dswitch><dt>An end tag whose tag name is "=
caption"</dt>
+   <dd>
+
+    <p>If the <a href=3D#stack-of-open-elements>stack of ope=
n elements</a> does not <a href=3D#has-an-element-in-table-scope=
 title=3D"has an element in table
+    scope">have a <code>caption</code> element in ta=
ble scope</a>, this is a <a href=3D#parse-error>parse
+    error</a>; ignore the token. (<a href=3D#fragment-case>f=
ragment case</a>)</p>
+
+    <p>Otherwise:</p>
+
+    <p><a href=3D#generate-implied-end-tags>Generate implied=
 end tags</a>.</p>
+
+    <p>Now, if the <a href=3D#current-node>current node</=
a> is not a <code><a href=3D#the-caption-element>caption&l=
t;/a></code> element, then this is a
+    <a href=3D#parse-error>parse error</a>.</p>
+
+    <p>Pop elements from this stack until a <code><a href=
=3D#the-caption-element>caption</a></code> element has bee=
n popped from the
+    stack.</p>
+
+    <p><a href=3D#clear-the-list-of-active-formatting-elements-=
up-to-the-last-marker>Clear the list of active formatting elements up =
to the last marker</a>.</p>
+
+    <p>Switch the <a href=3D#insertion-mode>insertion mode&l=
t;/a> to "<a href=3D#parsing-main-intable title=3D"insert=
ion mode: in table">in
+    table</a>".</p>
+
+   </dd>
+
+   <dt>A start tag whose tag name is one of: "caption", =
"col", "colgroup", "tbody", "td",=
 "tfoot",
+   "th", "thead", "tr"</dt> <dt&g=
t;An end tag whose tag name is "table"</dt>
+   <dd>
+
+    <p><a href=3D#parse-error>Parse error</a>.</p&g=
t;
+
+    <!-- fake </caption> -->
+    <p>If the <a href=3D#stack-of-open-elements>stack of ope=
n elements</a> does not <a href=3D#has-an-element-in-table-scope=
 title=3D"has an element in table
+    scope">have a <code>caption</code> element in ta=
ble scope</a>, ignore the token.
+    (<a href=3D#fragment-case>fragment case</a>)</p>
+
+    <p>Otherwise:</p>
+
+    <p>Pop elements from this stack until a <code><a href=
=3D#the-caption-element>caption</a></code> element has bee=
n popped from the
+    stack.</p>
+
+    <p><a href=3D#clear-the-list-of-active-formatting-elements-=
up-to-the-last-marker>Clear the list of active formatting elements up =
to the last marker</a>.</p>
+
+    <p>Switch the <a href=3D#insertion-mode>insertion mode&l=
t;/a> to "<a href=3D#parsing-main-intable title=3D"insert=
ion mode: in table">in
+    table</a>".</p>
+    <!-- end of fake </caption> -->
+
+    <p>Reprocess the token.</p>
+
+   </dd>
+
+   <dt>An end tag whose tag name is one of: "body", &quo=
t;col", "colgroup", "html", "tbody", &=
quot;td",
+   "tfoot", "th", "thead", "tr"&=
lt;/dt>
+   <dd>
+    <p><a href=3D#parse-error>Parse error</a>. Ignore =
the token.</p>
+   </dd>
+
+   <dt>Anything else</dt>
+   <dd>
+
+    <p>Process the token <a href=3D#using-the-rules-for>usin=
g the rules for</a> the "<a href=3D#parsing-main-inbody tit=
le=3D"insertion mode: in
+    body">in body</a>" <a href=3D#insertion-mode&g=
t;insertion mode</a>.</p>
+
+   </dd>
+
+  </dl><h6 id=3Dparsing-main-incolgroup><span class=3Dsec=
no>12.2.5.4.12 </span>The "<dfn title=3D"insertion =
mode: in column group">in column group</dfn>" insertio=
n mode</h6>
+
+  <p>When the user agent is to apply the rules for the "<a=
 href=3D#parsing-main-incolgroup title=3D"insertion mode: in column
+  group">in column group</a>" <a href=3D#insertion=
-mode>insertion mode</a>, the user agent must handle the token
+  as follows:</p>
+
+  <dl class=3Dswitch><dt>A character token that is one of U+=
0009 CHARACTER TABULATION, U+000A LINE FEED (LF), U+000C
+   FORM FEED (FF), U+000D CARRIAGE RETURN (CR), or U+0020 SPACE</dt&g=
t;
+   <dd>
+    <p><a href=3D#insert-a-character title=3D"insert a cha=
racter">Insert the character</a>.</p>
+   </dd>
+
+   <dt>A comment token</dt>
+   <dd>
+    <p><a href=3D#insert-a-comment>Insert a comment</a&gt=
;.</p>
+   </dd>
+
+   <dt>A DOCTYPE token</dt>
+   <dd>
+    <p><a href=3D#parse-error>Parse error</a>. Ignore =
the token.</p>
+   </dd>
+
+   <dt>A start tag whose tag name is "html"</dt>
+   <dd>
+
+    <p>Process the token <a href=3D#using-the-rules-for>usin=
g the rules for</a> the "<a href=3D#parsing-main-inbody tit=
le=3D"insertion mode: in
+    body">in body</a>" <a href=3D#insertion-mode&g=
t;insertion mode</a>.</p>
+
+   </dd>
+
+   <dt>A start tag whose tag name is "col"</dt>
+   <dd>
+
+    <p><a href=3D#insert-an-html-element>Insert an HTML elem=
ent</a> for the token. Immediately pop the <a href=3D#current-no=
de>current
+    node</a> off the <a href=3D#stack-of-open-elements>stack=
 of open elements</a>.</p>
+
+    <p><a href=3D#acknowledge-self-closing-flag title=3D"a=
cknowledge self-closing flag">Acknowledge the token's <i>se=
lf-closing
+    flag</i></a>, if it is set.</p>
+
+   </dd>
+
+   <dt>An end tag whose tag name is "colgroup"</dt&gt=
;
+   <dd>
+
+    <p>If the <a href=3D#current-node>current node</a>=
 is not a <code><a href=3D#the-colgroup-element>colgroup</=
a></code> element, then this is a
+    <a href=3D#parse-error>parse error</a>; ignore the token=
.</p> <!-- e.g. colgroup fragment case, or
+    <template><col></colgroup> -->
+
+    <p>Otherwise, pop the <a href=3D#current-node>current no=
de</a> from the <a href=3D#stack-of-open-elements>stack of op=
en elements</a>.
+    Switch the <a href=3D#insertion-mode>insertion mode</a> =
to "<a href=3D#parsing-main-intable title=3D"insertion mode:=
 in table">in
+    table</a>".</p>
+
+   </dd>
+
+   <dt>An end tag whose tag name is "col"</dt>
+   <dd>
+    <p><a href=3D#parse-error>Parse error</a>. Ignore =
the token.</p>
+   </dd>
+
+   <dt>A start tag whose tag name is "template"</dt&g=
t;
+   <dt>An end tag whose tag name is "template"</dt&gt=
;
+   <dd>
+
+    <p>Process the token <a href=3D#using-the-rules-for>usin=
g the rules for</a> the "<a href=3D#parsing-main-inhead tit=
le=3D"insertion mode: in
+    head">in head</a>" <a href=3D#insertion-mode&g=
t;insertion mode</a>.</p>
+
+   </dd>
+
+   <dt>An end-of-file token</dt>
+   <dd>
+
+    <p>Process the token <a href=3D#using-the-rules-for>usin=
g the rules for</a> the "<a href=3D#parsing-main-inbody tit=
le=3D"insertion mode: in
+    body">in body</a>" <a href=3D#insertion-mode&g=
t;insertion mode</a>.</p>
+
+   </dd>
+
+   <dt>Anything else</dt>
+   <dd>
+
+    <!-- fake </colgroup> -->
+    <p>If the <a href=3D#current-node>current node</a>=
 is not a <code><a href=3D#the-colgroup-element>colgroup</=
a></code> element, then this is a
+    <a href=3D#parse-error>parse error</a>; ignore the token=
.</p> <!-- e.g. colgroup fragment case, or
+    <template><col></colgroup> -->
+
+    <p>Otherwise, pop the <a href=3D#current-node>current no=
de</a> from the <a href=3D#stack-of-open-elements>stack of op=
en
+    elements</a>.</p>
+
+    <p>Switch the <a href=3D#insertion-mode>insertion mode&l=
t;/a> to "<a href=3D#parsing-main-intable title=3D"insert=
ion mode: in table">in
+    table</a>".</p>
+    <!-- end of fake </colgroup> -->
+
+    <p>Reprocess the token.</p>
+
+   </dd>
+
+  </dl><h6 id=3Dparsing-main-intbody><span class=3Dsecno&=
gt;12.2.5.4.13 </span>The "<dfn title=3D"insertion mod=
e: in table body">in table body</dfn>" insertion mode&=
lt;/h6>
+
+  <p>When the user agent is to apply the rules for the "<a=
 href=3D#parsing-main-intbody title=3D"insertion mode: in table
+  body">in table body</a>" <a href=3D#insertion-mo=
de>insertion mode</a>, the user agent must handle the token as
+  follows:</p>
+
+  <dl class=3Dswitch><dt>A start tag whose tag name is &quot=
;tr"</dt>
+   <dd>
+
+    <p><a href=3D#clear-the-stack-back-to-a-table-body-context&=
gt;Clear the stack back to a table body context</a>. (See below.)&l=
t;/p>
+
+    <p><a href=3D#insert-an-html-element>Insert an HTML elem=
ent</a> for the token, then switch the <a href=3D#insertion-mode=
>insertion
+    mode</a> to "<a href=3D#parsing-main-intr title=3D&quo=
t;insertion mode: in row">in row</a>".</p>
+
+   </dd>
+
+   <dt>A start tag whose tag name is one of: "th", &quot=
;td"</dt>
+   <dd>
+
+    <p><a href=3D#parse-error>Parse error</a>.</p&g=
t;
+
+    <!-- fake </tr> -->
+    <p><a href=3D#clear-the-stack-back-to-a-table-body-context&=
gt;Clear the stack back to a table body context</a>. (See below.)&l=
t;/p>
+
+    <p><a href=3D#insert-an-html-element>Insert an HTML elem=
ent</a> for a "tr" start tag token with no attributes, th=
en
+    switch the <a href=3D#insertion-mode>insertion mode</a> =
to "<a href=3D#parsing-main-intr title=3D"insertion mode: in=
 row">in
+    row</a>".</p>
+    <!-- end of fake </tr> -->
+
+    <p>Reprocess the current token.</p>
+
+   </dd>
+
+   <dt>An end tag whose tag name is one of: "tbody", &qu=
ot;tfoot",
+   "thead"</dt>
+   <dd>
+
+    <p>If the <a href=3D#stack-of-open-elements>stack of ope=
n elements</a> does not <a href=3D#has-an-element-in-table-scope=
 title=3D"has an element in table
+    scope">have an element in table scope</a> that is an &=
lt;a href=3D#html-elements title=3D"HTML elements">HTML
+    element</a> and with the same tag name as the token, this is a=
 <a href=3D#parse-error>parse error</a>;
+    ignore the token.</p>
+
+    <p>Otherwise:</p>
+
+    <p><a href=3D#clear-the-stack-back-to-a-table-body-context&=
gt;Clear the stack back to a table body context</a>. (See below.)&l=
t;/p>
+
+    <p>Pop the <a href=3D#current-node>current node</a&gt=
; from the <a href=3D#stack-of-open-elements>stack of open elements=
</a>. Switch the
+    <a href=3D#insertion-mode>insertion mode</a> to "&l=
t;a href=3D#parsing-main-intable title=3D"insertion mode: in table&q=
uot;>in table</a>".</p>
+
+   </dd>
+
+   <dt>A start tag whose tag name is one of: "caption", =
"col",
+   "colgroup", "tbody", "tfoot", "the=
ad"</dt>
+   <dt>An end tag whose tag name is "table"</dt>
+   <dd>
+
+    <p>If the <a href=3D#stack-of-open-elements>stack of ope=
n elements</a> does not <a href=3D#has-an-element-in-table-scope=
 title=3D"has an element in table
+    scope">have a <code>tbody</code>, <code>th=
ead</code>, or <code>tfoot</code> element in table
+    scope</a>, this is a <a href=3D#parse-error>parse error&=
lt;/a>; ignore the token.</p>
+
+    <p>Otherwise:</p>
+
+    <p><a href=3D#clear-the-stack-back-to-a-table-body-context&=
gt;Clear the stack back to a table body context</a>. (See below.)&l=
t;/p>
+
+    <!-- fake </tbody>, </tfoot>, or </thead>, what=
ever is the current node -->
+
+    <p>Pop the <a href=3D#current-node>current node</a&gt=
; from the <a href=3D#stack-of-open-elements>stack of open elements=
</a>. Switch the
+    <a href=3D#insertion-mode>insertion mode</a> to "&l=
t;a href=3D#parsing-main-intable title=3D"insertion mode: in table&q=
uot;>in table</a>".</p>
+
+    <!-- end of fake </tbody>, </tfoot>, or </thead&gt=
;, whatever was the current node -->
+
+    <p>Reprocess the token.</p>
+
+   </dd>
+
+   <dt>An end tag whose tag name is one of: "body", &quo=
t;caption", "col", "colgroup", "html",=
 "td",
+   "th", "tr"</dt>
+   <dd>
+    <p><a href=3D#parse-error>Parse error</a>. Ignore =
the token.</p>
+   </dd>
+
+   <dt>Anything else</dt>
+   <dd>
+    <p>Process the token <a href=3D#using-the-rules-for>usin=
g the rules for</a> the "<a href=3D#parsing-main-intable ti=
tle=3D"insertion mode: in
+    table">in table</a>" <a href=3D#insertion-mode=
>insertion mode</a>.</p>
+   </dd>
+
+  </dl><p>When the steps above require the UA to <dfn id=3D=
clear-the-stack-back-to-a-table-body-context>clear the stack back to a=
 table body context</dfn>,
+  it means that the UA must, while the <a href=3D#current-node>cur=
rent node</a> is not a <code><a href=3D#the-tbody-element&=
gt;tbody</a></code>,
+  <code><a href=3D#the-tfoot-element>tfoot</a></cod=
e>, <code><a href=3D#the-thead-element>thead</a><=
/code>, <code><a href=3D#the-template-element>template<=
/a></code>, or <code><a href=3D#the-html-element>htm=
l</a></code> element, pop
+  elements from the <a href=3D#stack-of-open-elements>stack of ope=
n elements</a>.</p>
+
+  <p class=3Dnote>The <a href=3D#current-node>current node&l=
t;/a> being an <code><a href=3D#the-html-element>html</=
a></code> element after this
+  process is a <a href=3D#fragment-case>fragment case</a>.&l=
t;/p>
+
+
+  <h6 id=3Dparsing-main-intr><span class=3Dsecno>12.2.5.4.14=
 </span>The "<dfn title=3D"insertion mode: in row&quot=
;>in row</dfn>" insertion mode</h6>
+
+  <p>When the user agent is to apply the rules for the "<a=
 href=3D#parsing-main-intr title=3D"insertion mode: in row">=
in
+  row</a>" <a href=3D#insertion-mode>insertion mode<=
/a>, the user agent must handle the token as follows:</p>
+
+  <dl class=3Dswitch><dt>A start tag whose tag name is one o=
f: "th", "td"</dt>
+   <dd>
+
+    <p><a href=3D#clear-the-stack-back-to-a-table-row-context&g=
t;Clear the stack back to a table row context</a>. (See below.)<=
/p>
+
+    <p><a href=3D#insert-an-html-element>Insert an HTML elem=
ent</a> for the token, then switch the <a href=3D#insertion-mode=
>insertion
+    mode</a> to "<a href=3D#parsing-main-intd title=3D&quo=
t;insertion mode: in cell">in cell</a>".</p>
+
+    <p>Insert a marker at the end of the <a href=3D#list-of-act=
ive-formatting-elements>list of active formatting elements</a>.&=
lt;/p>
+
+   </dd>
+
+   <dt>An end tag whose tag name is "tr"</dt>
+   <dd>
+
+    <p>If the <a href=3D#stack-of-open-elements>stack of ope=
n elements</a> does not <a href=3D#has-an-element-in-table-scope=
 title=3D"has an element in table
+    scope">have a <code>tr</code> element in table s=
cope</a>, this is a <a href=3D#parse-error>parse error</a&=
gt;;
+    ignore the token.</p>
+
+    <p>Otherwise:</p>
+
+    <p><a href=3D#clear-the-stack-back-to-a-table-row-context&g=
t;Clear the stack back to a table row context</a>. (See below.)<=
/p>
+
+    <p>Pop the <a href=3D#current-node>current node</a&gt=
; (which will be a <code><a href=3D#the-tr-element>tr</a&g=
t;</code> element) from the
+    <a href=3D#stack-of-open-elements>stack of open elements</a=
>. Switch the <a href=3D#insertion-mode>insertion mode</a>=
 to "<a href=3D#parsing-main-intbody title=3D"insertion mode=
: in table body">in table body</a>".</p>
+
+   </dd>
+
+   <dt>A start tag whose tag name is one of: "caption", =
"col", "colgroup", "tbody", "tfoot&quo=
t;,
+   "thead", "tr"</dt>
+   <dt>An end tag whose tag name is "table"</dt>
+   <dd>
+
+    <!-- fake <tr> -->
+    <p>If the <a href=3D#stack-of-open-elements>stack of ope=
n elements</a> does not <a href=3D#has-an-element-in-table-scope=
 title=3D"has an element in table
+    scope">have a <code>tr</code> element in table s=
cope</a>, this is a <a href=3D#parse-error>parse error</a&=
gt;;
+    ignore the token.</p>
+
+    <p>Otherwise:</p>
+
+    <p><a href=3D#clear-the-stack-back-to-a-table-row-context&g=
t;Clear the stack back to a table row context</a>. (See below.)<=
/p>
+
+    <p>Pop the <a href=3D#current-node>current node</a&gt=
; (which will be a <code><a href=3D#the-tr-element>tr</a&g=
t;</code> element) from the
+    <a href=3D#stack-of-open-elements>stack of open elements</a=
>. Switch the <a href=3D#insertion-mode>insertion mode</a>=
 to "<a href=3D#parsing-main-intbody title=3D"insertion mode=
: in table body">in table body</a>".</p>
+    <!-- end of fake </tr> -->
+
+    <p>Reprocess the token.</p>
+
+   </dd>
+
+   <dt>An end tag whose tag name is one of: "tbody", &qu=
ot;tfoot", "thead"</dt>
+   <dd>
+
+    <p>If the <a href=3D#stack-of-open-elements>stack of ope=
n elements</a> does not <a href=3D#has-an-element-in-table-scope=
 title=3D"has an element in table
+    scope">have an element in table scope</a> that is an &=
lt;a href=3D#html-elements title=3D"HTML elements">HTML
+    element</a> and with the same tag name as the token, this is a=
 <a href=3D#parse-error>parse error</a>;
+    ignore the token.</p>
+
+    <!-- fake <tr> -->
+    <p>If the <a href=3D#stack-of-open-elements>stack of ope=
n elements</a> does not <a href=3D#has-an-element-in-table-scope=
 title=3D"has an element in table
+    scope">have a <code>tr</code> element in table s=
cope</a>, ignore the token.</p>
+
+    <p>Otherwise:</p>
+
+    <p><a href=3D#clear-the-stack-back-to-a-table-row-context&g=
t;Clear the stack back to a table row context</a>. (See below.)<=
/p>
+
+    <p>Pop the <a href=3D#current-node>current node</a&gt=
; (which will be a <code><a href=3D#the-tr-element>tr</a&g=
t;</code> element) from the
+    <a href=3D#stack-of-open-elements>stack of open elements</a=
>. Switch the <a href=3D#insertion-mode>insertion mode</a>=
 to "<a href=3D#parsing-main-intbody title=3D"insertion mode=
: in table body">in table body</a>".</p>
+    <!-- end of fake </tr> -->
+
+    <p>Reprocess the token.</p>
+
+   </dd>
+
+   <dt>An end tag whose tag name is one of: "body", &quo=
t;caption", "col", "colgroup", "html",=
 "td",
+   "th"</dt>
+   <dd>
+    <p><a href=3D#parse-error>Parse error</a>. Ignore =
the token.</p>
+   </dd>
+
+   <dt>Anything else</dt>
+   <dd>
+
+    <p>Process the token <a href=3D#using-the-rules-for>usin=
g the rules for</a> the "<a href=3D#parsing-main-intable ti=
tle=3D"insertion mode: in
+    table">in table</a>" <a href=3D#insertion-mode=
>insertion mode</a>.</p>
+
+   </dd>
+
+  </dl><p>When the steps above require the UA to <dfn id=3D=
clear-the-stack-back-to-a-table-row-context>clear the stack back to a =
table row context</dfn>,
+  it means that the UA must, while the <a href=3D#current-node>cur=
rent node</a> is not a <code><a href=3D#the-tr-element>=
tr</a></code>,
+  <code><a href=3D#the-template-element>template</a>&l=
t;/code>, or <code><a href=3D#the-html-element>html</a&=
gt;</code> element, pop elements from the <a href=3D#stack-of-op=
en-elements>stack of open
+  elements</a>.</p>
+
+  <p class=3Dnote>The <a href=3D#current-node>current node&l=
t;/a> being an <code><a href=3D#the-html-element>html</=
a></code> element after this
+  process is a <a href=3D#fragment-case>fragment case</a>.&l=
t;/p>
+
+
+  <h6 id=3Dparsing-main-intd><span class=3Dsecno>12.2.5.4.15=
 </span>The "<dfn title=3D"insertion mode: in cell&quo=
t;>in cell</dfn>" insertion mode</h6>
+
+  <p>When the user agent is to apply the rules for the "<a=
 href=3D#parsing-main-intd title=3D"insertion mode: in cell"&gt=
;in cell</a>" <a href=3D#insertion-mode>insertion mode&l=
t;/a>, the user agent must handle the token as follows:</p>
+
+  <dl class=3Dswitch><dt>An end tag whose tag name is one of=
: "td", "th"</dt>
+   <dd>
+
+    <p>If the <a href=3D#stack-of-open-elements>stack of ope=
n elements</a> does not <a href=3D#has-an-element-in-table-scope=
 title=3D"has an element in table
+    scope">have an element in table scope</a> that is an &=
lt;a href=3D#html-elements title=3D"HTML elements">HTML
+    element</a> and with the same tag name as that of the token, t=
hen this is a <a href=3D#parse-error>parse
+    error</a>; ignore the token.</p>
+
+    <p>Otherwise:</p>
+
+    <p><a href=3D#generate-implied-end-tags>Generate implied=
 end tags</a>.</p>
+
+    <p>Now, if the <a href=3D#current-node>current node</=
a> is not an <a href=3D#html-elements title=3D"HTML elements&q=
uot;>HTML
+    element</a> with the same tag name as the token, then this is =
a <a href=3D#parse-error>parse error</a>.</p>
+
+    <p>Pop elements from the <a href=3D#stack-of-open-elements&=
gt;stack of open elements</a> stack until an <a href=3D#html-ele=
ments title=3D"HTML
+    elements">HTML element</a> with the same tag name as t=
he token has been popped from the
+    stack.</p>
+
+    <p><a href=3D#clear-the-list-of-active-formatting-elements-=
up-to-the-last-marker>Clear the list of active formatting elements up =
to the last marker</a>.</p>
+
+    <p>Switch the <a href=3D#insertion-mode>insertion mode&l=
t;/a> to "<a href=3D#parsing-main-intr title=3D"insertion=
 mode: in row">in
+    row</a>".</p> <!-- current node here will be a &=
lt;tr> normally; but could be <html> in the
+    fragment case, or <template> in the template case -->
+
+   </dd>
+
+   <dt>A start tag whose tag name is one of: "caption", =
"col",
+   "colgroup", "tbody", "td", "tfoot&=
quot;, "th", "thead", "tr"</dt>
+   <dd>
+
+    <p>If the <a href=3D#stack-of-open-elements>stack of ope=
n elements</a> does <em>not</em> <a href=3D#has-an-e=
lement-in-table-scope title=3D"has an element in
+    table scope">have a <code>td</code> or <code&=
gt;th</code> element in table scope</a>, then this
+    is a <a href=3D#parse-error>parse error</a>; ignore the =
token. (<a href=3D#fragment-case>fragment case</a>)</p>
+
+    <p>Otherwise, <a href=3D#close-the-cell>close the cell&l=
t;/a> (see below) and reprocess the token.</p>
+
+   </dd>
+
+   <dt>An end tag whose tag name is one of: "body", &quo=
t;caption",
+   "col", "colgroup", "html"</dt>
+   <dd>
+    <p><a href=3D#parse-error>Parse error</a>. Ignore =
the token.</p>
+   </dd>
+
+   <dt>An end tag whose tag name is one of: "table", &qu=
ot;tbody",
+   "tfoot", "thead", "tr"</dt>
+   <dd>
+
+    <p>If the <a href=3D#stack-of-open-elements>stack of ope=
n elements</a> does not <a href=3D#has-an-element-in-table-scope=
 title=3D"has an element in table
+    scope">have an element in table scope</a> that is an &=
lt;a href=3D#html-elements title=3D"HTML elements">HTML
+    element</a> and with the same tag name as that of the token, t=
hen this is a <a href=3D#parse-error>parse
+    error</a>; ignore the token.</p>
+
+    <p>Otherwise, <a href=3D#close-the-cell>close the cell&l=
t;/a> (see below) and reprocess the token.</p>
+
+   </dd>
+
+   <dt>Anything else</dt>
+   <dd>
+
+    <p>Process the token <a href=3D#using-the-rules-for>usin=
g the rules for</a> the "<a href=3D#parsing-main-inbody tit=
le=3D"insertion mode: in
+    body">in body</a>" <a href=3D#insertion-mode&g=
t;insertion mode</a>.</p>
+
+   </dd>
+
+  </dl><p>Where the steps above say to <dfn id=3Dclose-th=
e-cell>close the cell</dfn>, they mean to run the following
+  algorithm:</p>
+
+  <ol><!-- fake </td> or </th> --><li><=
p><a href=3D#generate-implied-end-tags>Generate implied end tags=
</a>.</li>
+
+   <li><p>If the <a href=3D#current-node>current node&=
lt;/a> is not now a <code><a href=3D#the-td-element>td<=
/a></code> element or a <code><a href=3D#the-th-element=
>th</a></code>
+   element, then this is a <a href=3D#parse-error>parse error</=
a>.</li>
+
+   <li><p>Pop elements from the <a href=3D#stack-of-open-=
elements>stack of open elements</a> stack until a <code>&l=
t;a href=3D#the-td-element>td</a></code>
+   element or a <code><a href=3D#the-th-element>th</a>=
</code> element has been popped from the stack.</li>
+
+   <li><p><a href=3D#clear-the-list-of-active-formatting-=
elements-up-to-the-last-marker>Clear the list of active formatting ele=
ments up to the last marker</a>.</li>
+
+   <li><p>Switch the <a href=3D#insertion-mode>inserti=
on mode</a> to "<a href=3D#parsing-main-intr title=3D"=
insertion mode: in row">in
+   row</a>".</li> <!-- current node here will be a &=
lt;tr> normally; but could be <html> in the
+   fragment case, or <template> in the template case -->
+   <!-- end of fake </td> or </th> -->
+
+  </ol><p class=3Dnote>The <a href=3D#stack-of-open-eleme=
nts>stack of open elements</a> cannot have both a <code>&l=
t;a href=3D#the-td-element>td</a></code> and a
+  <code><a href=3D#the-th-element>th</a></code> =
element <a href=3D#has-an-element-in-table-scope title=3D"has an =
element in table scope">in table scope</a> at the
+  same time, nor can it have neither when the <a href=3D#close-the-ce=
ll>close the cell</a> algorithm is invoked.</p>
+
+
+  <h6 id=3Dparsing-main-inselect><span class=3Dsecno>12.2.5.=
4.16 </span>The "<dfn title=3D"insertion mode: in sele=
ct">in select</dfn>" insertion mode</h6>
+
+  <p>When the user agent is to apply the rules for the "<a=
 href=3D#parsing-main-inselect title=3D"insertion mode: in select&qu=
ot;>in
+  select</a>" <a href=3D#insertion-mode>insertion mode&=
lt;/a>, the user agent must handle the token as follows:</p>
+
+  <dl class=3Dswitch><dt>A character token that is U+0000 NU=
LL</dt>
+   <dd>
+    <p><a href=3D#parse-error>Parse error</a>. Ignore =
the token.</p>
+   </dd>
+
+   <dt>Any other character token</dt>
+   <dd>
+
+    <p><a href=3D#insert-a-character title=3D"insert a cha=
racter">Insert the token's character</a>.</p>
+
+   </dd>
+
+   <dt>A comment token</dt>
+   <dd>
+    <p><a href=3D#insert-a-comment>Insert a comment</a&gt=
;.</p>
+   </dd>
+
+   <dt>A DOCTYPE token</dt>
+   <dd>
+    <p><a href=3D#parse-error>Parse error</a>. Ignore =
the token.</p>
+   </dd>
+
+   <dt>A start tag whose tag name is "html"</dt>
+   <dd>
+
+    <p>Process the token <a href=3D#using-the-rules-for>usin=
g the rules for</a> the "<a href=3D#parsing-main-inbody tit=
le=3D"insertion mode: in
+    body">in body</a>" <a href=3D#insertion-mode&g=
t;insertion mode</a>.</p>
+
+   </dd>
+
+   <dt>A start tag whose tag name is "option"</dt>
+   <dd>
+
+    <!-- fake </option> (maybe) -->
+    <p>If the <a href=3D#current-node>current node</a>=
 is an <code><a href=3D#the-option-element>option</a>&l=
t;/code> element, pop that node from the
+    <a href=3D#stack-of-open-elements>stack of open elements</a=
>.</p>
+    <!-- end of fake </option> -->
+
+    <p><a href=3D#insert-an-html-element>Insert an HTML elem=
ent</a> for the token.</p>
+
+   </dd>
+
+   <dt>A start tag whose tag name is "optgroup"</dt&g=
t;
+   <dd>
+
+    <!-- fake </option> (maybe) -->
+    <p>If the <a href=3D#current-node>current node</a>=
 is an <code><a href=3D#the-option-element>option</a>&l=
t;/code> element, pop that node from the
+    <a href=3D#stack-of-open-elements>stack of open elements</a=
>.</p>
+    <!-- end of fake </option> -->
+
+    <!-- fake </optgroup> (maybe) -->
+    <p>If the <a href=3D#current-node>current node</a>=
 is an <code><a href=3D#the-optgroup-element>optgroup</a&g=
t;</code> element, pop that node from the
+    <a href=3D#stack-of-open-elements>stack of open elements</a=
>.</p>
+    <!-- end of fake </optgroup> -->
+
+    <p><a href=3D#insert-an-html-element>Insert an HTML elem=
ent</a> for the token.</p>
+
+   </dd>
+
+   <dt>An end tag whose tag name is "optgroup"</dt&gt=
;
+   <dd>
+
+    <!-- fake </option> (maybe) -->
+    <p>First, if the <a href=3D#current-node>current node&lt=
;/a> is an <code><a href=3D#the-option-element>option</=
a></code> element, and the node
+    immediately before it in the <a href=3D#stack-of-open-elements&gt=
;stack of open elements</a> is an <code><a href=3D#the-opt=
group-element>optgroup</a></code>
+    element, then pop the <a href=3D#current-node>current node<=
/a> from the <a href=3D#stack-of-open-elements>stack of open
+    elements</a>.</p>
+    <!-- end of fake </option> -->
+
+    <p>If the <a href=3D#current-node>current node</a>=
 is an <code><a href=3D#the-optgroup-element>optgroup</a&g=
t;</code> element, then pop that node from
+    the <a href=3D#stack-of-open-elements>stack of open elements&l=
t;/a>. Otherwise, this is a <a href=3D#parse-error>parse error&l=
t;/a>; ignore
+    the token.</p>
+
+   </dd>
+
+   <dt>An end tag whose tag name is "option"</dt>
+   <dd>
+
+    <p>If the <a href=3D#current-node>current node</a>=
 is an <code><a href=3D#the-option-element>option</a>&l=
t;/code> element, then pop that node from
+    the <a href=3D#stack-of-open-elements>stack of open elements&l=
t;/a>. Otherwise, this is a <a href=3D#parse-error>parse error&l=
t;/a>; ignore
+    the token.</p>
+
+   </dd>
+
+   <dt>An end tag whose tag name is "select"</dt>
+   <dd>
+
+    <p>If the <a href=3D#stack-of-open-elements>stack of ope=
n elements</a> does not <a href=3D#has-an-element-in-select-scop=
e title=3D"has an element in select
+    scope">have a <code>select</code> element in sel=
ect scope</a>, this is a <a href=3D#parse-error>parse
+    error</a>; ignore the token. (<a href=3D#fragment-case>f=
ragment case</a>)</p>
+
+    <p>Otherwise:</p>
+
+    <p>Pop elements from the <a href=3D#stack-of-open-elements&=
gt;stack of open elements</a> until a <code><a href=3D#the=
-select-element>select</a></code> element
+    has been popped from the stack.</p>
+
+    <p><a href=3D#reset-the-insertion-mode-appropriately>Res=
et the insertion mode appropriately</a>.</p>
+
+   </dd>
+
+   <dt>A start tag whose tag name is "select"</dt>
+   <dd>
+
+    <p><a href=3D#parse-error>Parse error</a>.</p&g=
t;
+
+    <!-- fake </select> -->
+    <p>Pop elements from the <a href=3D#stack-of-open-elements&=
gt;stack of open elements</a> until a <code><a href=3D#the=
-select-element>select</a></code> element
+    has been popped from the stack.</p>
+
+    <p><a href=3D#reset-the-insertion-mode-appropriately>Res=
et the insertion mode appropriately</a>.</p>
+    <!-- end of fake </select> -->
+
+    <p class=3Dnote>It just gets treated like an end tag.</p&gt=
;
+
+   </dd>
+
+   <dt>A start tag whose tag name is one of: "input", &q=
uot;keygen", "textarea"</dt>
+   <dd>
+
+    <p><a href=3D#parse-error>Parse error</a>.</p&g=
t;
+
+    <p>If the <a href=3D#stack-of-open-elements>stack of ope=
n elements</a> does not <a href=3D#has-an-element-in-select-scop=
e title=3D"has an element in select
+    scope">have a <code>select</code> element in sel=
ect scope</a>, ignore the token.
+    (<a href=3D#fragment-case>fragment case</a>)</p>
+
+    <!-- fake </select> -->
+    <p>Pop elements from the <a href=3D#stack-of-open-elements&=
gt;stack of open elements</a> until a <code><a href=3D#the=
-select-element>select</a></code> element
+    has been popped from the stack.</p>
+
+    <p><a href=3D#reset-the-insertion-mode-appropriately>Res=
et the insertion mode appropriately</a>.</p>
+    <!-- end of fake </select> -->
+
+    <p>Reprocess the token.</p>
+
+   </dd>
+
+   <dt>A start tag whose tag name is one of: "script", &=
quot;template"</dt>
+   <dt>An end tag whose tag name is "template"</dt&gt=
;
+   <dd>
+
+    <p>Process the token <a href=3D#using-the-rules-for>usin=
g the rules for</a> the "<a href=3D#parsing-main-inhead tit=
le=3D"insertion mode: in
+    head">in head</a>" <a href=3D#insertion-mode&g=
t;insertion mode</a>.</p>
+
+   </dd>
+
+   <dt>An end-of-file token</dt>
+   <dd>
+
+    <p>Process the token <a href=3D#using-the-rules-for>usin=
g the rules for</a> the "<a href=3D#parsing-main-inbody tit=
le=3D"insertion mode: in
+    body">in body</a>" <a href=3D#insertion-mode&g=
t;insertion mode</a>.</p>
+
+   </dd>
+
+   <dt>Anything else</dt>
+   <dd>
+    <p><a href=3D#parse-error>Parse error</a>. Ignore =
the token.</p>
+   </dd>
+
+  </dl><h6 id=3Dparsing-main-inselectintable><span class=3D=
secno>12.2.5.4.17 </span>The "<dfn title=3D"inserti=
on mode: in select in table">in select in table</dfn>"=
 insertion mode</h6>
+
+  <p>When the user agent is to apply the rules for the "<a=
 href=3D#parsing-main-inselectintable title=3D"insertion mode: in se=
lect in
+  table">in select in table</a>" <a href=3D#insert=
ion-mode>insertion mode</a>, the user agent must handle the
+  token as follows:</p>
+
+  <dl class=3Dswitch><dt>A start tag whose tag name is one o=
f: "caption", "table", "tbody", "tfoot=
", "thead", "tr",
+   "td", "th"</dt>
+   <dd>
+
+    <p><a href=3D#parse-error>Parse error</a>.</p&g=
t;
+
+    <!-- fake </select> -->
+    <p>Pop elements from the <a href=3D#stack-of-open-elements&=
gt;stack of open elements</a> until a <code><a href=3D#the=
-select-element>select</a></code> element
+    has been popped from the stack.</p>
+
+    <p><a href=3D#reset-the-insertion-mode-appropriately>Res=
et the insertion mode appropriately</a>.</p>
+    <!-- end of fake </select> -->
+
+    <p>Reprocess the token.</p>
+
+   </dd>
+
+   <dt>An end tag whose tag name is one of: "caption", &=
quot;table", "tbody", "tfoot", "thead"=
, "tr",
+   "td", "th"</dt>
+   <dd>
+
+    <p><a href=3D#parse-error>Parse error</a>.</p&g=
t;
+
+    <p>If the <a href=3D#stack-of-open-elements>stack of ope=
n elements</a> does not <a href=3D#has-an-element-in-table-scope=
 title=3D"has an element in table
+    scope">have an element in table scope</a> that is an &=
lt;a href=3D#html-elements title=3D"HTML elements">HTML
+    element</a> and with the same tag name as that of the token, t=
hen ignore the token.</p>
+
+    <p>Otherwise:</p>
+
+    <!-- fake </select> -->
+    <p>Pop elements from the <a href=3D#stack-of-open-elements&=
gt;stack of open elements</a> until a <code><a href=3D#the=
-select-element>select</a></code> element
+    has been popped from the stack.</p>
+
+    <p><a href=3D#reset-the-insertion-mode-appropriately>Res=
et the insertion mode appropriately</a>.</p>
+    <!-- end of fake </select> -->
+
+    <p>Reprocess the token.</p>
+
+   </dd>
+
+   <dt>Anything else</dt>
+   <dd>
+
+    <p>Process the token <a href=3D#using-the-rules-for>usin=
g the rules for</a> the "<a href=3D#parsing-main-inselect t=
itle=3D"insertion mode: in
+    select">in select</a>" <a href=3D#insertion-mo=
de>insertion mode</a>.</p>
+
+   </dd>
+
+  </dl><h6 id=3Dparsing-main-intemplate><span class=3Dsec=
no>12.2.5.4.18 </span>The "<dfn title=3D"insertion =
mode: in template">in template</dfn>" insertion mode&l=
t;/h6>
+
+  <p>When the user agent is to apply the rules for the "<a=
 href=3D#parsing-main-intemplate title=3D"insertion mode: in templat=
e">in
+  template</a>" <a href=3D#insertion-mode>insertion mod=
e</a>, the user agent must handle the token as follows:</p>
+
+  <dl class=3Dswitch><!-- first, tokens we always ignore: --&gt=
;<!-- html: ignored in "in body" mode if there's a <templ=
ate> on the stack --><!-- head: ignored in "in body" m=
ode always --><!-- body: ignored in "in body" mode if the=
re's a <template> on the stack --><!-- frameset: ignored in &=
quot;in body" mode if frameset-ok is set to not-ok, which <templa=
te> sets it to --><!-- second, tokens that are ambiguous (allowe=
d in multiple modes), let's just handle them in a generic way and not pic=
k a mode: --><dt>A character token</dt>
+   <dt>A comment token</dt>
+   <dt>A DOCTYPE token</dt>
+   <dd>
+
+    <p>Process the token <a href=3D#using-the-rules-for>usin=
g the rules for</a> the "<a href=3D#parsing-main-inbody tit=
le=3D"insertion mode: in
+    body">in body</a>" <a href=3D#insertion-mode&g=
t;insertion mode</a>.</p>
+
+   </dd>
+
+   <dt>A start tag whose tag name is one of: "base", &qu=
ot;basefont", "bgsound", "link", "meta&quot=
;, "noframes", "script", "style", "tem=
plate", "title"</dt>
+   <dt>An end tag whose tag name is "template"</dt&gt=
;
+   <dd>
+
+    <p>Process the token <a href=3D#using-the-rules-for>usin=
g the rules for</a> the "<a href=3D#parsing-main-inhead tit=
le=3D"insertion mode: in
+    head">in head</a>" <a href=3D#insertion-mode&g=
t;insertion mode</a>.</p>
+
+   </dd>
+
+   <!-- now, tokens that imply certain modes -->
+
+   <dt>A start tag whose tag name is one of: "caption", =
"colgroup", "tbody", "tfoot", "thead&q=
uot;</dt>
+   <dd>
+
+    <p>Pop the <a href=3D#current-template-insertion-mode>cu=
rrent template insertion mode</a> off the <a href=3D#stack-of-te=
mplate-insertion-modes>stack of template
+    insertion modes</a>.</p>
+
+    <p>Push "<a href=3D#parsing-main-intable title=3D&quot=
;insertion mode: in table">in table</a>" onto the <=
a href=3D#stack-of-template-insertion-modes>stack of
+    template insertion modes</a> so that it is the new <a href=3D=
#current-template-insertion-mode>current template insertion
+    mode</a>.</p>
+
+    <p>Switch the <a href=3D#insertion-mode>insertion mode&l=
t;/a> to "<a href=3D#parsing-main-intable title=3D"insert=
ion mode: in table">in
+    table</a>", and reprocess the token.</p>
+
+   </dd>
+
+   <dt>A start tag whose tag name is "col"</dt>
+   <dd>
+
+    <p>Pop the <a href=3D#current-template-insertion-mode>cu=
rrent template insertion mode</a> off the <a href=3D#stack-of-te=
mplate-insertion-modes>stack of template
+    insertion modes</a>.</p>
+
+    <p>Push "<a href=3D#parsing-main-incolgroup title=3D&q=
uot;insertion mode: in column group">in column group</a>&qu=
ot; onto the
+    <a href=3D#stack-of-template-insertion-modes>stack of template=
 insertion modes</a> so that it is the new <a href=3D#current-te=
mplate-insertion-mode>current template
+    insertion mode</a>.</p>
+
+    <p>Switch the <a href=3D#insertion-mode>insertion mode&l=
t;/a> to "<a href=3D#parsing-main-incolgroup title=3D"ins=
ertion mode: in column group">in
+    column group</a>", and reprocess the token.</p>
+
+   </dd>
+
+   <dt>A start tag whose tag name is "tr"</dt>
+   <dd>
+
+    <p>Pop the <a href=3D#current-template-insertion-mode>cu=
rrent template insertion mode</a> off the <a href=3D#stack-of-te=
mplate-insertion-modes>stack of template
+    insertion modes</a>.</p>
+
+    <p>Push "<a href=3D#parsing-main-intbody title=3D&quot=
;insertion mode: in table body">in table body</a>" ont=
o the <a href=3D#stack-of-template-insertion-modes>stack
+    of template insertion modes</a> so that it is the new <a hr=
ef=3D#current-template-insertion-mode>current template insertion
+    mode</a>.</p>
+
+    <p>Switch the <a href=3D#insertion-mode>insertion mode&l=
t;/a> to "<a href=3D#parsing-main-intbody title=3D"insert=
ion mode: in table body">in
+    table body</a>", and reprocess the token.</p>
+
+   </dd>
+
+   <dt>A start tag whose tag name is one of: "td", &quot=
;th"</dt>
+   <dd>
+
+    <p>Pop the <a href=3D#current-template-insertion-mode>cu=
rrent template insertion mode</a> off the <a href=3D#stack-of-te=
mplate-insertion-modes>stack of template
+    insertion modes</a>.</p>
+
+    <p>Push "<a href=3D#parsing-main-intr title=3D"in=
sertion mode: in row">in row</a>" onto the <a href=3D=
#stack-of-template-insertion-modes>stack of template
+    insertion modes</a> so that it is the new <a href=3D#curren=
t-template-insertion-mode>current template insertion mode</a>.&l=
t;/p>
+
+    <p>Switch the <a href=3D#insertion-mode>insertion mode&l=
t;/a> to "<a href=3D#parsing-main-intr title=3D"insertion=
 mode: in row">in
+    row</a>", and reprocess the token.</p>
+
+   </dd>
+
+   <!-- default to in-body mode -->
+
+   <dt>Any other start tag</dt>
+   <dd>
+
+    <p>Pop the <a href=3D#current-template-insertion-mode>cu=
rrent template insertion mode</a> off the <a href=3D#stack-of-te=
mplate-insertion-modes>stack of template
+    insertion modes</a>.</p>
+
+    <p>Push "<a href=3D#parsing-main-inbody title=3D"=
insertion mode: in body">in body</a>" onto the <a h=
ref=3D#stack-of-template-insertion-modes>stack of template
+    insertion modes</a> so that it is the new <a href=3D#curren=
t-template-insertion-mode>current template insertion mode</a>.&l=
t;/p>
+
+    <p>Switch the <a href=3D#insertion-mode>insertion mode&l=
t;/a> to "<a href=3D#parsing-main-inbody title=3D"inserti=
on mode: in body">in
+    body</a>", and reprocess the token.</p>
+
+   </dd>
+
+   <dt>Any other end tag</dt>
+   <dd>
+    <p><a href=3D#parse-error>Parse error</a>. Ignore =
the token.</p>
+   </dd>
+
+   <!-- EOF -->
+
+
+   <dt>An end-of-file token</dt>
+   <dd>
+
+    <p>If there is no <code><a href=3D#the-template-eleme=
nt>template</a></code> element on the <a href=3D#stack-=
of-open-elements>stack of open elements</a>, then
+    <a href=3D#stop-parsing>stop parsing</a>. (<a href=3D=
#fragment-case>fragment case</a>)</p>
+
+    <p>Otherwise, this is a <a href=3D#parse-error>parse err=
or</a>.</p>
+
+    <!-- fake </template> -->
+    <p>Pop elements from the <a href=3D#stack-of-open-elements&=
gt;stack of open elements</a> until a <code><a href=3D#the=
-template-element>template</a></code>
+    element has been popped from the stack.</p>
+
+    <p><a href=3D#clear-the-list-of-active-formatting-elements-=
up-to-the-last-marker>Clear the list of active formatting elements up =
to the last marker</a>.</p>
+
+    <p>Pop the <a href=3D#current-template-insertion-mode>cu=
rrent template insertion mode</a> off the <a href=3D#stack-of-te=
mplate-insertion-modes>stack of template
+    insertion modes</a>.</p>
+
+    <p><a href=3D#reset-the-insertion-mode-appropriately>Res=
et the insertion mode appropriately</a>.</p>
+    <!-- end of fake </template> -->
+
+    <p>Reprocess the token.</p>
+
+   </dd>
+
+  </dl><h6 id=3Dparsing-main-afterbody><span class=3Dsecn=
o>12.2.5.4.19 </span>The "<dfn title=3D"insertion m=
ode: after body">after body</dfn>" insertion mode</=
h6>
+
+  <p>When the user agent is to apply the rules for the "<a=
 href=3D#parsing-main-afterbody title=3D"insertion mode: after body&=
quot;>after body</a>" <a href=3D#insertion-mode>inser=
tion mode</a>, the user agent must handle the token as follows:<=
/p>
+
+  <dl class=3Dswitch><dt>A character token that is one of U+=
0009 CHARACTER TABULATION, U+000A LINE FEED (LF), U+000C
+   FORM FEED (FF), U+000D CARRIAGE RETURN (CR), or U+0020 SPACE</dt&g=
t;
+   <dd>
+
+    <p>Process the token <a href=3D#using-the-rules-for>usin=
g the rules for</a> the "<a href=3D#parsing-main-inbody tit=
le=3D"insertion mode: in
+    body">in body</a>" <a href=3D#insertion-mode&g=
t;insertion mode</a>.</p>
+
+   </dd>
+
+   <dt>A comment token</dt>
+   <dd>
+
+    <p><a href=3D#insert-a-comment>Insert a comment</a&gt=
; as the last child of the first element in the <a href=3D#stack-of-op=
en-elements>stack of
+    open elements</a> (the <code><a href=3D#the-html-elem=
ent>html</a></code> element).</p>
+
+   </dd>
+
+   <dt>A DOCTYPE token</dt>
+   <dd>
+    <p><a href=3D#parse-error>Parse error</a>. Ignore =
the token.</p>
+   </dd>
+
+   <dt>A start tag whose tag name is "html"</dt>
+   <dd>
+
+    <p>Process the token <a href=3D#using-the-rules-for>usin=
g the rules for</a> the "<a href=3D#parsing-main-inbody tit=
le=3D"insertion mode: in
+    body">in body</a>" <a href=3D#insertion-mode&g=
t;insertion mode</a>.</p>
+
+   </dd>
+
+   <dt>An end tag whose tag name is "html"</dt>
+   <dd>
+
+    <p>If the parser was originally created as part of the <a h=
ref=3D#html-fragment-parsing-algorithm>HTML fragment parsing
+    algorithm</a>, this is a <a href=3D#parse-error>parse er=
ror</a>; ignore the token. (<a href=3D#fragment-case>fragment
+    case</a>)</p>
+
+    <p>Otherwise, switch the <a href=3D#insertion-mode>inser=
tion mode</a> to "<a href=3D#the-after-after-body-insertion=
-mode title=3D"insertion mode: after
+    after body">after after body</a>".</p>
+
+   </dd>
+
+   <dt>An end-of-file token</dt>
+   <dd>
+    <p><a href=3D#stop-parsing>Stop parsing</a>.</p=
>
+   </dd>
+
+   <dt>Anything else</dt>
+   <dd>
+
+    <p><a href=3D#parse-error>Parse error</a>. Switch =
the <a href=3D#insertion-mode>insertion mode</a> to "&lt=
;a href=3D#parsing-main-inbody title=3D"insertion
+    mode: in body">in body</a>" and reprocess the tok=
en.</p>
+
+   </dd>
+
+  </dl><h6 id=3Dparsing-main-inframeset><span class=3Dsec=
no>12.2.5.4.20 </span>The "<dfn title=3D"insertion =
mode: in frameset">in frameset</dfn>" insertion mode&l=
t;/h6>
+
+  <p>When the user agent is to apply the rules for the "<a=
 href=3D#parsing-main-inframeset title=3D"insertion mode: in framese=
t">in
+  frameset</a>" <a href=3D#insertion-mode>insertion mod=
e</a>, the user agent must handle the token as follows:</p>
+
+  <dl class=3Dswitch><dt>A character token that is one of U+=
0009 CHARACTER TABULATION, U+000A LINE FEED (LF), U+000C
+   FORM FEED (FF), U+000D CARRIAGE RETURN (CR), or U+0020 SPACE</dt&g=
t;
+   <dd>
+    <p><a href=3D#insert-a-character title=3D"insert a cha=
racter">Insert the character</a>.</p>
+   </dd>
+
+   <dt>A comment token</dt>
+   <dd>
+    <p><a href=3D#insert-a-comment>Insert a comment</a&gt=
;.</p>
+   </dd>
+
+   <dt>A DOCTYPE token</dt>
+   <dd>
+    <p><a href=3D#parse-error>Parse error</a>. Ignore =
the token.</p>
+   </dd>
+
+   <dt>A start tag whose tag name is "html"</dt>
+   <dd>
+
+    <p>Process the token <a href=3D#using-the-rules-for>usin=
g the rules for</a> the "<a href=3D#parsing-main-inbody tit=
le=3D"insertion mode: in
+    body">in body</a>" <a href=3D#insertion-mode&g=
t;insertion mode</a>.</p>
+
+   </dd>
+
+   <dt>A start tag whose tag name is "frameset"</dt&g=
t;
+   <dd>
+    <p><a href=3D#insert-an-html-element>Insert an HTML elem=
ent</a> for the token.</p>
+   </dd>
+
+   <dt>An end tag whose tag name is "frameset"</dt&gt=
;
+   <dd>
+
+    <p>If the <a href=3D#current-node>current node</a>=
 is the root <code><a href=3D#the-html-element>html</a>=
</code> element, then this is a
+    <a href=3D#parse-error>parse error</a>; ignore the token=
. (<a href=3D#fragment-case>fragment case</a>)</p>
+
+    <p>Otherwise, pop the <a href=3D#current-node>current no=
de</a> from the <a href=3D#stack-of-open-elements>stack of op=
en
+    elements</a>.</p>
+
+    <p>If the parser was <em>not</em> originally creat=
ed as part of the <a href=3D#html-fragment-parsing-algorithm>HTML f=
ragment parsing
+    algorithm</a> (<a href=3D#fragment-case>fragment case&lt=
;/a>), and the <a href=3D#current-node>current node</a> is=
 no longer a
+    <code><a href=3D#frameset>frameset</a></code&gt=
; element, then switch the <a href=3D#insertion-mode>insertion mode=
</a> to "<a href=3D#parsing-main-afterframeset title=3D&quo=
t;insertion mode: after frameset">after frameset</a>".=
</p>
+
+   </dd>
+
+   <dt>A start tag whose tag name is "frame"</dt>
+   <dd>
+
+    <p><a href=3D#insert-an-html-element>Insert an HTML elem=
ent</a> for the token. Immediately pop the <a href=3D#current-no=
de>current
+    node</a> off the <a href=3D#stack-of-open-elements>stack=
 of open elements</a>.</p>
+
+    <p><a href=3D#acknowledge-self-closing-flag title=3D"a=
cknowledge self-closing flag">Acknowledge the token's <i>se=
lf-closing
+    flag</i></a>, if it is set.</p>
+
+   </dd>
+
+   <dt>A start tag whose tag name is "noframes"</dt&g=
t;
+   <dd>
+
+    <p>Process the token <a href=3D#using-the-rules-for>usin=
g the rules for</a> the "<a href=3D#parsing-main-inhead tit=
le=3D"insertion mode: in
+    head">in head</a>" <a href=3D#insertion-mode&g=
t;insertion mode</a>.</p>
+
+   </dd>
+
+   <dt>An end-of-file token</dt>
+   <dd>
+
+    <p>If the <a href=3D#current-node>current node</a>=
 is not the root <code><a href=3D#the-html-element>html</a=
></code> element, then this is a
+    <a href=3D#parse-error>parse error</a>.</p>
+
+    <p class=3Dnote>The <a href=3D#current-node>current node=
</a> can only be the root
+    <code><a href=3D#the-html-element>html</a></cod=
e> element in the <a href=3D#fragment-case>fragment case</a&g=
t;.</p>
+
+    <p><a href=3D#stop-parsing>Stop parsing</a>.</p=
>
+
+   </dd>
+
+   <dt>Anything else</dt>
+   <dd>
+    <p><a href=3D#parse-error>Parse error</a>. Ignore =
the token.</p>
+   </dd>
+
+  </dl><h6 id=3Dparsing-main-afterframeset><span class=3D=
secno>12.2.5.4.21 </span>The "<dfn title=3D"inserti=
on mode: after frameset">after frameset</dfn>" inserti=
on mode</h6>
+
+  <p>When the user agent is to apply the rules for the "<a=
 href=3D#parsing-main-afterframeset title=3D"insertion mode: after
+  frameset">after frameset</a>" <a href=3D#inserti=
on-mode>insertion mode</a>, the user agent must handle the token
+  as follows:</p>
+
+  <!-- due to rules in the "in frameset" mode, this can't b=
e entered in the fragment case -->
+  <dl class=3Dswitch><dt>A character token that is one of U+=
0009 CHARACTER TABULATION, U+000A LINE FEED (LF), U+000C
+   FORM FEED (FF), U+000D CARRIAGE RETURN (CR), or U+0020 SPACE</dt&g=
t;
+   <dd>
+    <p><a href=3D#insert-a-character title=3D"insert a cha=
racter">Insert the character</a>.</p>
+   </dd>
+
+   <dt>A comment token</dt>
+   <dd>
+    <p><a href=3D#insert-a-comment>Insert a comment</a&gt=
;.</p>
+   </dd>
+
+   <dt>A DOCTYPE token</dt>
+   <dd>
+    <p><a href=3D#parse-error>Parse error</a>. Ignore =
the token.</p>
+   </dd>
+
+   <dt>A start tag whose tag name is "html"</dt>
+   <dd>
+
+    <p>Process the token <a href=3D#using-the-rules-for>usin=
g the rules for</a> the "<a href=3D#parsing-main-inbody tit=
le=3D"insertion mode: in
+    body">in body</a>" <a href=3D#insertion-mode&g=
t;insertion mode</a>.</p>
+
+   </dd>
+
+   <dt>An end tag whose tag name is "html"</dt>
+   <dd>
+
+    <p>Switch the <a href=3D#insertion-mode>insertion mode&l=
t;/a> to "<a href=3D#the-after-after-frameset-insertion-mode t=
itle=3D"insertion mode: after after
+    frameset">after after frameset</a>".</p>
+
+   </dd>
+
+   <dt>A start tag whose tag name is "noframes"</dt&g=
t;
+   <dd>
+
+    <p>Process the token <a href=3D#using-the-rules-for>usin=
g the rules for</a> the "<a href=3D#parsing-main-inhead tit=
le=3D"insertion mode: in
+    head">in head</a>" <a href=3D#insertion-mode&g=
t;insertion mode</a>.</p>
+
+   </dd>
+
+   <dt>An end-of-file token</dt>
+   <dd>
+    <p><a href=3D#stop-parsing>Stop parsing</a>.</p=
>
+   </dd>
+
+   <dt>Anything else</dt>
+   <dd>
+    <p><a href=3D#parse-error>Parse error</a>. Ignore =
the token.</p>
+   </dd>
+
+  </dl><h6 id=3Dthe-after-after-body-insertion-mode><span=
 class=3Dsecno>12.2.5.4.22 </span>The "<dfn title=3D&quo=
t;insertion mode: after after body">after after body</dfn>&=
quot; insertion mode</h6>
+
+  <p>When the user agent is to apply the rules for the "<a=
 href=3D#the-after-after-body-insertion-mode title=3D"insertion mode=
: after after
+  body">after after body</a>" <a href=3D#insertion=
-mode>insertion mode</a>, the user agent must handle the token
+  as follows:</p>
+
+  <dl class=3Dswitch><dt>A comment token</dt>
+   <dd>
+    <p><a href=3D#insert-a-comment>Insert a comment</a&gt=
; as the last child of the <code><a href=3D#document>Document=
</a></code> object.</p>
+   </dd>
+
+   <dt>A DOCTYPE token</dt>
+   <dt>A character token that is one of U+0009 CHARACTER TABULATIO=
N, U+000A LINE FEED (LF), U+000C
+   FORM FEED (FF), U+000D CARRIAGE RETURN (CR), or U+0020 SPACE</dt&g=
t;
+   <dt>A start tag whose tag name is "html"</dt>
+   <dd>
+
+    <p>Process the token <a href=3D#using-the-rules-for>usin=
g the rules for</a> the "<a href=3D#parsing-main-inbody tit=
le=3D"insertion mode: in
+    body">in body</a>" <a href=3D#insertion-mode&g=
t;insertion mode</a>.</p>
+
+   </dd>
+
+   <dt>An end-of-file token</dt>
+   <dd>
+    <p><a href=3D#stop-parsing>Stop parsing</a>.</p=
>
+   </dd>
+
+   <dt>Anything else</dt>
+   <dd>
+
+    <p><a href=3D#parse-error>Parse error</a>. Switch =
the <a href=3D#insertion-mode>insertion mode</a> to "&lt=
;a href=3D#parsing-main-inbody title=3D"insertion
+    mode: in body">in body</a>" and reprocess the tok=
en.</p>
+
+   </dd>
+
+  </dl><h6 id=3Dthe-after-after-frameset-insertion-mode><=
span class=3Dsecno>12.2.5.4.23 </span>The "<dfn title=3D=
"insertion mode: after after frameset">after after frameset&=
lt;/dfn>" insertion mode</h6>
+
+  <p>When the user agent is to apply the rules for the "<a=
 href=3D#the-after-after-frameset-insertion-mode title=3D"insertion =
mode: after after
+  frameset">after after frameset</a>" <a href=3D#i=
nsertion-mode>insertion mode</a>, the user agent must handle the
+  token as follows:</p>
+
+  <dl class=3Dswitch><dt>A comment token</dt>
+   <dd>
+    <p><a href=3D#insert-a-comment>Insert a comment</a&gt=
; as the last child of the <code><a href=3D#document>Document=
</a></code> object.</p>
+   </dd>
+
+   <dt>A DOCTYPE token</dt>
+   <dt>A character token that is one of U+0009 CHARACTER TABULATIO=
N, U+000A LINE FEED (LF), U+000C
+   FORM FEED (FF), U+000D CARRIAGE RETURN (CR), or U+0020 SPACE</dt&g=
t;
+   <dt>A start tag whose tag name is "html"</dt>
+   <dd>
+
+    <p>Process the token <a href=3D#using-the-rules-for>usin=
g the rules for</a> the "<a href=3D#parsing-main-inbody tit=
le=3D"insertion mode: in
+    body">in body</a>" <a href=3D#insertion-mode&g=
t;insertion mode</a>.</p>
+
+   </dd>
+
+   <dt>An end-of-file token</dt>
+   <dd>
+    <p><a href=3D#stop-parsing>Stop parsing</a>.</p=
>
+   </dd>
+
+   <dt>A start tag whose tag name is "noframes"</dt&g=
t;
+   <dd>
+
+    <p>Process the token <a href=3D#using-the-rules-for>usin=
g the rules for</a> the "<a href=3D#parsing-main-inhead tit=
le=3D"insertion mode: in
+    head">in head</a>" <a href=3D#insertion-mode&g=
t;insertion mode</a>.</p>
+
+   </dd>
+
+   <dt>Anything else</dt>
+   <dd>
+    <p><a href=3D#parse-error>Parse error</a>. Ignore =
the token.</p>
+   </dd>
+
+  </dl><h5 id=3Dparsing-main-inforeign><span class=3Dsecn=
o>12.2.5.5 </span>The rules for parsing tokens <dfn title=3D&=
quot;insertion mode: in foreign content">in foreign content</d=
fn></h5>
+
+  <p>When the user agent is to apply the rules for parsing tokens =
in foreign content, the user agent
+  must handle the token as follows:</p>
+
+  <dl class=3Dswitch><dt>A character token that is U+0000 NU=
LL</dt>
+   <dd>
+
+    <p><a href=3D#parse-error>Parse error</a>. <a h=
ref=3D#insert-a-character title=3D"insert a character">Inser=
t a U+FFFD REPLACEMENT
+    CHARACTER character</a>.</p>
+
+   </dd>
+
+   <dt>A character token that is one of U+0009 CHARACTER TABULATIO=
N, U+000A LINE FEED (LF), U+000C
+   FORM FEED (FF), U+000D CARRIAGE RETURN (CR), or U+0020 SPACE</dt&g=
t;
+   <dd>
+
+    <p><a href=3D#insert-a-character title=3D"insert a cha=
racter">Insert the token's character</a>.</p>
+
+   </dd>
+
+   <dt>Any other character token</dt>
+   <dd>
+
+    <p><a href=3D#insert-a-character title=3D"insert a cha=
racter">Insert the token's character</a>.</p>
+
+    <p>Set the <a href=3D#frameset-ok-flag>frameset-ok flag&=
lt;/a> to "not ok".</p>
+
+   </dd>
+
+   <dt>A comment token</dt>
+   <dd>
+
+    <p><a href=3D#insert-a-comment>Insert a comment</a&gt=
;.</p>
+
+   </dd>
+
+   <dt>A DOCTYPE token</dt>
+   <dd>
+    <p><a href=3D#parse-error>Parse error</a>. Ignore =
the token.</p>
+   </dd>
+
+   <dt>A start tag whose tag name is one of: <!--"a",=
--> "b", "big", "blockquote", "body=
"<!--by
+   inspection-->, "br", "center", "code&quot=
;, "dd", "div", "dl", "dt"<!--=
 so that dd and dt can be
+   handled uniformly throughout the parser -->, "em", &quot=
;embed", "h1", "h2", "h3", "h4&qu=
ot;<!--for
+   completeness-->, "h5", "h6"<!--for complete=
ness-->, "head"<!--by inspection-->, "hr", &=
quot;i", "img",
+   "li", "listing"<!-- so that pre and listing ca=
n be handled uniformly throughout the parser -->,
+   "menu", "meta", "nobr", "ol"&=
lt;!-- so that dl, ul, and ol can be handled uniformly throughout the
+   parser -->, "p", "pre", "ruby", &quo=
t;s", <!--"script",--> "small", "span=
", "strong", "strike"<!-- so
+   that s and strike can be handled uniformly throughout the parser --&g=
t;, <!--"style",--> "sub",
+   "sup", "table"<!--by inspection-->, "t=
t", "u", "ul", "var"</dt> <!-=
- this list was determined
+   empirically by studying over 6,000,000,000 pages that were specifical=
ly not XML pages -->
+   <dt>A start tag whose tag name is "font", if the toke=
n has any attributes named "color", "face",
+   or "size"</dt> <!-- the attributes here are requir=
ed so that SVG <font> will go through as SVG
+   but legacy <font>s won't -->
+
+   <dd>
+
+    <p><a href=3D#parse-error>Parse error</a>.</p&g=
t;
+
+    <!-- for sanity's sake, we limit this wacked quirk to legacy full=
-document parsing, not to
+    innerHTML. We have no data showing whether (or that) this is needed =
for innerHTML. If innerHTML
+    is used on an SVG or MathML node, it definitely doesn't make any sen=
se (there's nothing to pop
+    to in the first place). Therefore, rather than trying to figure out =
in what convoluted
+    conditions we could actually do this quirk for innerHTML, we just do=
n't do it at all. -->
+
+    <p>If the parser was originally created for the <a href=3D#=
html-fragment-parsing-algorithm>HTML fragment parsing algorithm</a&=
gt;,
+    then act as described in the "any other start tag" entry b=
elow. (<a href=3D#fragment-case>fragment case</a>)</p>
+
+    <p>Otherwise:</p>
+
+    <p>Pop an element from the <a href=3D#stack-of-open-element=
s>stack of open elements</a>, and then keep popping more
+    elements from the <a href=3D#stack-of-open-elements>stack of o=
pen elements</a> until the <a href=3D#current-node>current no=
de</a> is a
+    <a href=3D#mathml-text-integration-point>MathML text integrati=
on point</a>, an <a href=3D#html-integration-point>HTML integ=
ration point</a>, or an
+    element in the <a href=3D#html-namespace-0>HTML namespace</=
a>.</p>
+
+    <p>Then, reprocess the token.</p>
+
+   </dd>
+
+   <dt>Any other start tag</dt>
+   <dd>
+
+    <p>If the <a href=3D#adjusted-current-node>adjusted curr=
ent node</a> is an element in the <a href=3D#mathml-namespace&gt=
;MathML namespace</a>,
+    <a href=3D#adjust-mathml-attributes>adjust MathML attributes&l=
t;/a> for the token. (This fixes the case of MathML attributes
+    that are not all lowercase.)</p>
+
+    <p>If the <a href=3D#adjusted-current-node>adjusted curr=
ent node</a> is an element in the <a href=3D#svg-namespace>SV=
G namespace</a>, and the
+    token's tag name is one of the ones in the first column of the follo=
wing table, change the tag
+    name to the name given in the corresponding cell in the second colum=
n. (This fixes the case of
+    SVG elements that are not all lowercase.)</p>
+
+    <table><thead><tr><th> Tag name <th> E=
lement name
+     <tbody><tr><td> <code title=3D"">=
altglyph</code> <td> <code title=3D"">altGlyp=
h</code>
+      <tr><td> <code title=3D"">altglyphdef&=
lt;/code> <td> <code title=3D"">altGlyphDef</=
code>
+      <tr><td> <code title=3D"">altglyphitem=
</code> <td> <code title=3D"">altGlyphItem&lt=
;/code>
+      <tr><td> <code title=3D"">animatecolor=
</code> <td> <code title=3D"">animateColor&lt=
;/code>
+      <tr><td> <code title=3D"">animatemotio=
n</code> <td> <code title=3D"">animateMotion&=
lt;/code>
+      <tr><td> <code title=3D"">animatetrans=
form</code> <td> <code title=3D"">animateTran=
sform</code>
+      <tr><td> <code title=3D"">clippath<=
/code> <td> <code title=3D"">clipPath</code&g=
t;
+      <tr><td> <code title=3D"">feblend</=
code> <td> <code title=3D"">feBlend</code>
+      <tr><td> <code title=3D"">fecolormatri=
x</code> <td> <code title=3D"">feColorMatrix&=
lt;/code>
+      <tr><td> <code title=3D"">fecomponentt=
ransfer</code> <td> <code title=3D"">feCompon=
entTransfer</code>
+      <tr><td> <code title=3D"">fecomposite&=
lt;/code> <td> <code title=3D"">feComposite</=
code>
+      <tr><td> <code title=3D"">feconvolvema=
trix</code> <td> <code title=3D"">feConvolveM=
atrix</code>
+      <tr><td> <code title=3D"">fediffuselig=
hting</code> <td> <code title=3D"">feDiffuseL=
ighting</code>
+      <tr><td> <code title=3D"">fedisplaceme=
ntmap</code> <td> <code title=3D"">feDisplace=
mentMap</code>
+      <tr><td> <code title=3D"">fedistantlig=
ht</code> <td> <code title=3D"">feDistantLigh=
t</code>
+      <tr><td> <code title=3D"">feflood</=
code> <td> <code title=3D"">feFlood</code>
+      <tr><td> <code title=3D"">fefunca</=
code> <td> <code title=3D"">feFuncA</code>
+      <tr><td> <code title=3D"">fefuncb</=
code> <td> <code title=3D"">feFuncB</code>
+      <tr><td> <code title=3D"">fefuncg</=
code> <td> <code title=3D"">feFuncG</code>
+      <tr><td> <code title=3D"">fefuncr</=
code> <td> <code title=3D"">feFuncR</code>
+      <tr><td> <code title=3D"">fegaussianbl=
ur</code> <td> <code title=3D"">feGaussianBlu=
r</code>
+      <tr><td> <code title=3D"">feimage</=
code> <td> <code title=3D"">feImage</code>
+      <tr><td> <code title=3D"">femerge</=
code> <td> <code title=3D"">feMerge</code>
+      <tr><td> <code title=3D"">femergenode&=
lt;/code> <td> <code title=3D"">feMergeNode</=
code>
+      <tr><td> <code title=3D"">femorphology=
</code> <td> <code title=3D"">feMorphology&lt=
;/code>
+      <tr><td> <code title=3D"">feoffset<=
/code> <td> <code title=3D"">feOffset</code&g=
t;
+      <tr><td> <code title=3D"">fepointlight=
</code> <td> <code title=3D"">fePointLight&lt=
;/code>
+      <tr><td> <code title=3D"">fespecularli=
ghting</code> <td> <code title=3D"">feSpecula=
rLighting</code>
+      <tr><td> <code title=3D"">fespotlight&=
lt;/code> <td> <code title=3D"">feSpotLight</=
code>
+      <tr><td> <code title=3D"">fetile</c=
ode> <td> <code title=3D"">feTile</code>
+      <tr><td> <code title=3D"">feturbulence=
</code> <td> <code title=3D"">feTurbulence&lt=
;/code>
+      <tr><td> <code title=3D"">foreignobjec=
t</code> <td> <code title=3D"">foreignObject&=
lt;/code>
+      <tr><td> <code title=3D"">glyphref<=
/code> <td> <code title=3D"">glyphRef</code&g=
t;
+      <tr><td> <code title=3D"">lineargradie=
nt</code> <td> <code title=3D"">linearGradien=
t</code>
+      <tr><td> <code title=3D"">radialgradie=
nt</code> <td> <code title=3D"">radialGradien=
t</code>
+      <!--<tr> <td> <code title=3D"">soli=
dcolor</code> <td> <code title=3D"">solidColo=
r</code> (SVG 1.2)-->
+      <tr><td> <code title=3D"">textpath<=
/code> <td> <code title=3D"">textPath</code&g=
t;
+    </table><p>If the <a href=3D#adjusted-current-node&gt=
;adjusted current node</a> is an element in the <a href=3D#svg-n=
amespace>SVG namespace</a>,
+    <a href=3D#adjust-svg-attributes>adjust SVG attributes</a&g=
t; for the token. (This fixes the case of SVG attributes that
+    are not all lowercase.)</p>
+
+    <p><a href=3D#adjust-foreign-attributes>Adjust foreign a=
ttributes</a> for the token. (This fixes the use of namespaced
+    attributes, in particular XLink in SVG.)</p>
+
+    <p><a href=3D#insert-a-foreign-element>Insert a foreign =
element</a> for the token, in the same namespace as the
+    <a href=3D#adjusted-current-node>adjusted current node</a&g=
t;.</p>
+
+    <p>If the token has its <i>self-closing flag</i> s=
et, then run the appropriate steps from the
+    following list:</p>
+
+    <dl class=3Dswitch><dt>If the token's tag name is "=
script"</dt>
+
+     <dd>
+
+      <p><a href=3D#acknowledge-self-closing-flag title=3D&quot=
;acknowledge self-closing flag">Acknowledge the token's <i>=
self-closing
+      flag</i></a>, and then act as described in the steps f=
or a "script" end tag below.</p>
+
+     </dd>
+
+     <dt>Otherwise</dt>
+
+     <dd>
+
+      <p>Pop the <a href=3D#current-node>current node</a&=
gt; off the <a href=3D#stack-of-open-elements>stack of open element=
s</a> and <a href=3D#acknowledge-self-closing-flag title=3D&quot=
;acknowledge self-closing flag">acknowledge the token's <i>=
self-closing
+      flag</i></a>.</p>
+
+     </dd>
+
+    </dl></dd>
+
+   <dt id=3DscriptForeignEndTag>An end tag whose tag name is &quot=
;script", if the <a href=3D#current-node>current node</a&gt=
; is a <code title=3D"">script</code> element in th=
e <a href=3D#svg-namespace>SVG namespace</a></dt>
+   <dd>
+
+    <p>Pop the <a href=3D#current-node>current node</a&gt=
; off the <a href=3D#stack-of-open-elements>stack of open elements&=
lt;/a>.</p>
+
+    <p>Let the <var title=3D"">old insertion point=
</var> have the same value as the current
+    <a href=3D#insertion-point>insertion point</a>. Let the =
<a href=3D#insertion-point>insertion point</a> be just before=
 the <a href=3D#next-input-character>next
+    input character</a>.</p>
+
+    <p>Increment the parser's <a href=3D#script-nesting-level&g=
t;script nesting level</a> by one. Set the <a href=3D#parser-pau=
se-flag>parser pause
+    flag</a> to true.</p>
+
+    <p><a href=3Dhttp://www.w3.org/TR/SVGMobile12/script.html#S=
criptContentProcessing>Process the
+    <code title=3D"">script</code> element</a&g=
t; according to the SVG rules, if the user agent supports
+    SVG. <a href=3D#refsSVG>[SVG]</a></p>
+
+    <p class=3Dnote>Even if this causes <a href=3D#dom-document=
-write title=3Ddom-document-write>new characters to be
+    inserted into the tokenizer</a>, the parser will not be execut=
ed reentrantly, since the
+    <a href=3D#parser-pause-flag>parser pause flag</a> is tr=
ue.</p>
+
+    <p>Decrement the parser's <a href=3D#script-nesting-level&g=
t;script nesting level</a> by one. If the parser's <a href=3D#sc=
ript-nesting-level>script
+    nesting level</a> is zero, then set the <a href=3D#parser-p=
ause-flag>parser pause flag</a> to false.</p>
+
+    <p>Let the <a href=3D#insertion-point>insertion point&lt=
;/a> have the value of the <var title=3D"">old inserti=
on
+    point</var>. (In other words, restore the <a href=3D#insert=
ion-point>insertion point</a> to its previous value.
+    This value might be the "undefined" value.)</p>
+
+   </dd>
+
+   <dt>Any other end tag</dt>
+
+   <dd>
+
+    <p>Run these steps:</p>
+
+    <ol><li><p>Initialize <var title=3D""=
>node</var> to be the <a href=3D#current-node>current node=
</a> (the bottommost
+     node of the stack).</li>
+
+     <li><p>If <var title=3D"">node</var&=
gt;'s tag name, <a href=3D#converted-to-ascii-lowercase>converted t=
o ASCII lowercase</a>, is
+     not the same as the tag name of the token, then this is a <a hre=
f=3D#parse-error>parse error</a>.</li>
+
+     <li><p><i>Loop</i>: If <var title=3D&quo=
t;">node</var> is the topmost element in the <a href=3D#=
stack-of-open-elements>stack of
+     open elements</a>, abort these steps. (<a href=3D#fragment=
-case>fragment case</a>)</li>
+
+     <li><p>If <var title=3D"">node</var&=
gt;'s tag name, <a href=3D#converted-to-ascii-lowercase>converted t=
o ASCII lowercase</a>, is
+     the same as the tag name of the token, pop elements from the <a =
href=3D#stack-of-open-elements>stack of open
+     elements</a> until <var title=3D"">node</v=
ar> has been popped from the stack, and then abort
+     these steps.</li>
+
+     <li><p>Set <var title=3D"">node</var=
> to the previous entry in the <a href=3D#stack-of-open-elements&gt=
;stack of open
+     elements</a>.</li>
+
+     <li><p>If <var title=3D"">node</var&=
gt; is not an element in the <a href=3D#html-namespace-0>HTML names=
pace</a>, return
+     to the step labeled <i>loop</i>.</li>
+
+     <li><p>Otherwise, process the token according to the ru=
les given in the section corresponding
+     to the current <a href=3D#insertion-mode>insertion mode</a=
> in HTML content.</li>
+
+    </ol></dd>
+
+  </dl></div>
+
+
+  <div class=3Dimpl>
+
+  <h4 id=3Dthe-end><span class=3Dsecno>12.2.6 </span>T=
he end</h4>
+
+  <p>Once the user agent <dfn id=3Dstop-parsing title=3D"s=
top parsing">stops parsing</dfn> the document, the user age=
nt
+  must run the following steps:</p>
+
+  <ol><!-- this happens as part of one of the tasks that runs t=
he parser --><li><p>Set the <a href=3D#current-document=
-readiness>current document readiness</a> to "<code titl=
e=3D"">interactive</code>"
+   <!-- this also synchronously fires an event --> and the <a h=
ref=3D#insertion-point>insertion point</a> to
+   undefined.</li>
+
+   <li><p>Pop <em>all</em> the nodes off the &lt=
;a href=3D#stack-of-open-elements>stack of open elements</a>.&lt=
;/li>
+
+   <li><p>If the <a href=3D#list-of-scripts-that-will-exe=
cute-when-the-document-has-finished-parsing>list of scripts that will =
execute when the document has finished
+   parsing</a> is not empty, run these substeps:</p>
+
+    <ol><li><p><a href=3D#spin-the-event-loop>Sp=
in the event loop</a> until the first <code><a href=3D#the=
-script-element>script</a></code> in the <a href=3D#lis=
t-of-scripts-that-will-execute-when-the-document-has-finished-parsing>=
list
+     of scripts that will execute when the document has finished parsing=
</a> has its <a href=3D#ready-to-be-parser-executed>"rea=
dy
+     to be parser-executed"</a> flag set <em>and</em=
> the parser's <code><a href=3D#document>Document</a&gt=
;</code>
+     <a href=3D#has-no-style-sheet-that-is-blocking-scripts>has no=
 style sheet that is blocking scripts</a>.</li>
+
+     <li><p><a href=3D#execute-the-script-block title=3D&=
quot;execute the script block">Execute</a> the first <co=
de><a href=3D#the-script-element>script</a></code> i=
n
+     the <a href=3D#list-of-scripts-that-will-execute-when-the-docume=
nt-has-finished-parsing>list of scripts that will execute when the doc=
ument has finished
+     parsing</a>.</li>
+
+     <li><p>Remove the first <code><a href=3D#the-s=
cript-element>script</a></code> element from the <a hre=
f=3D#list-of-scripts-that-will-execute-when-the-document-has-finished-par=
sing>list of scripts that will
+     execute when the document has finished parsing</a> (i.e. shif=
t out the first entry in the
+     list).</li>
+
+     <li><p>If the <a href=3D#list-of-scripts-that-will-e=
xecute-when-the-document-has-finished-parsing>list of scripts that wil=
l execute when the document has finished
+     parsing</a> is still not empty, repeat these substeps again f=
rom substep 1.</p>
+
+    </ol></li>
+
+   <li><p><a href=3D#queue-a-task>Queue a task</a&g=
t; to <a href=3D#fire-a-simple-event>fire a simple event</a> =
that bubbles named <code title=3Devent-DOMContentLoaded>DOMContentL=
oaded</code> at the <code><a href=3D#document>Document&=
lt;/a></code>.</li>
+
+   <li><p><a href=3D#spin-the-event-loop>Spin the even=
t loop</a> until the <a href=3D#set-of-scripts-that-will-execute=
-as-soon-as-possible>set of scripts that will execute as soon
+   as possible</a> and the <a href=3D#list-of-scripts-that-will=
-execute-in-order-as-soon-as-possible>list of scripts that will execut=
e in order as soon as
+   possible</a> are empty.</li> <!-- this step is not red=
undant with the next one, since
+   <script> nodes delay the load event of the document they are in=
, but they might change document
+   between being added to one document's set/list and executing those sc=
ripts, so they might be
+   delaying another document but still be in this document's set/list. -=
->
+
+   <li><p><a href=3D#spin-the-event-loop>Spin the even=
t loop</a> until there is nothing that <dfn id=3Ddelay-the-load-=
event title=3D"delay the load
+   event">delays the load event</dfn> in the <code>&=
lt;a href=3D#document>Document</a></code>.</li>
+
+   <li>
+
+    <p><a href=3D#queue-a-task>Queue a task</a> to run=
 the following substeps:</p>
+
+    <ol><li><p>Set the <a href=3D#current-document-=
readiness>current document readiness</a> to "<code title=
=3D"">complete</code>"<!--
+     this also fires an event synchronously during the task -->.</=
li>
+
+     <li><p>If the <code><a href=3D#document>Doc=
ument</a></code> is in a <a href=3D#browsing-context>br=
owsing context</a>, <a href=3D#fire-a-simple-event>fire a sim=
ple
+     event</a> named <code title=3Devent-load>load</code&=
gt; at the <code><a href=3D#document>Document</a></c=
ode>'s
+     <code><a href=3D#window>Window</a></code> o=
bject, but with its <code title=3Ddom-event-target><a href=3D#do=
m-event-target>target</a></code> set to
+     the <code><a href=3D#document>Document</a></co=
de> object (and the <code title=3Ddom-event-currentTarget>curren=
tTarget</code> set to the <code><a href=3D#window>Windo=
w</a></code>
+     object).</li>
+
+    </ol></li>
+
+   <li>
+
+    <p>If the <code><a href=3D#document>Document</a=
></code> is in a <a href=3D#browsing-context>browsing cont=
ext</a>, then <a href=3D#queue-a-task>queue a
+    task</a> to run the following substeps:</p>
+
+    <ol><li><p>If the <code><a href=3D#docume=
nt>Document</a></code>'s <a href=3D#page-showing>pag=
e showing</a> flag is true, then abort this
+     task (i.e. don't fire the event below).</li> <!-- i don't =
see how this could be, but just
+     to be sure... -->
+
+     <li><p>Set the <code><a href=3D#document>Do=
cument</a></code>'s <a href=3D#page-showing>page showin=
g</a> flag to true.</li>
+
+     <li><p><a href=3D#concept-event-fire title=3Dconcept=
-event-fire>Fire</a> a <a href=3D#concept-events-trusted titl=
e=3Dconcept-events-trusted>trusted</a> event with the name <c=
ode title=3Devent-pageshow><a href=3D#event-pageshow>pageshow&lt=
;/a></code> at the <code><a href=3D#window>Window&lt=
;/a></code> object of the
+     <code><a href=3D#document>Document</a></code&g=
t;, but with its <code title=3Ddom-event-target><a href=3D#dom-e=
vent-target>target</a></code> set to the
+     <code><a href=3D#document>Document</a></code&g=
t; object (and the <code title=3Ddom-event-currentTarget>currentTar=
get</code> set to the <code><a href=3D#window>Window&lt=
;/a></code> object),
+     using the <code><a href=3D#pagetransitionevent>PageTran=
sitionEvent</a></code> interface, with the <code title=3Dd=
om-PageTransitionEvent-persisted><a href=3D#dom-pagetransitionevent=
-persisted>persisted</a></code> attribute initialized to f=
alse. This
+     event must not bubble, must not be cancelable, and has no default a=
ction.</li>
+
+    </ol></li>
+
+   <li><p>If the <code><a href=3D#document>Docum=
ent</a></code> has any <a href=3D#pending-application-cach=
e-download-process-tasks>pending application cache download process
+   tasks</a>, then <a href=3D#queue-a-task title=3D"queue =
a task">queue</a> each such <a href=3D#concept-task titl=
e=3Dconcept-task>task</a> in the order they were added to the li=
st of <a href=3D#pending-application-cache-download-process-tasks>p=
ending
+   application cache download process tasks</a>, and then empty th=
e list of <a href=3D#pending-application-cache-download-process-tasks&=
gt;pending
+   application cache download process tasks</a>. The <a href=3D=
#task-source>task source</a> for these <a href=3D#concept-tas=
k title=3Dconcept-task>tasks</a> is the <a href=3D#networking=
-task-source>networking task source</a>.</li>
+
+   <li><p>If the <code><a href=3D#document>Docum=
ent</a></code>'s <a href=3D#print-when-loaded>print whe=
n loaded</a> flag is set, then run the
+   <a href=3D#printing-steps>printing steps</a>.</li>
+
+   <li><p>The <code><a href=3D#document>Document=
</a></code> is now <dfn id=3Dready-for-post-load-tasks>=
ready for post-load tasks</dfn>.</li>
+
+   <li><p><a href=3D#queue-a-task>Queue a task</a&g=
t; to mark the <code><a href=3D#document>Document</a>&l=
t;/code> as <dfn id=3Dcompletely-loaded>completely
+   loaded</dfn>.</li>
+
+  </ol><p>When the user agent is to <dfn id=3Dabort-a-par=
ser>abort a parser</dfn>, it must run the following steps:</p=
>
+
+  <ol><li><p>Throw away any pending content in the &lt=
;a href=3D#input-stream>input stream</a>, and discard any future
+   content that would have been added to it.</li>
+
+   <li><p>Set the <a href=3D#current-document-readiness&g=
t;current document readiness</a> to "<code title=3D"&q=
uot;>interactive</code>"<!--
+   this synchronously fires an event -->.</li>
+
+   <li><p>Pop <em>all</em> the nodes off the &lt=
;a href=3D#stack-of-open-elements>stack of open elements</a>.&lt=
;/li>
+
+   <li><p>Set the <a href=3D#current-document-readiness&g=
t;current document readiness</a> to "<code title=3D"&q=
uot;>complete</code>"<!--
+   this also synchronously fires an event -->.</li>
+
+   <!-- anything else? this is things that happen when you call docum=
ent.open() on a document that's
+   still being parsed, or when you navigate a document that's still pars=
ing, or navigate the parent
+   of a frame with a document that's still parsing, or the user hits &qu=
ot;stop". Should the pending
+   scripts be blown away or anything? -->
+
+  </ol><p>Except where otherwise specified, the <a href=3D=
#task-source>task source</a> for the <a href=3D#concept-task =
title=3Dconcept-task>tasks</a> mentioned in this section is the =
<a href=3D#dom-manipulation-task-source>DOM manipulation task
+  source</a>.</p>
+
+  </div>
+
+
+  <div class=3Dimpl>
+
+  <h4 id=3Dcoercing-an-html-dom-into-an-infoset><span class=3Ds=
ecno>12.2.7 </span>Coercing an HTML DOM into an infoset</h4&g=
t;
+
+  <p>When an application uses an <a href=3D#html-parser>HTML=
 parser</a> in conjunction with an XML pipeline, it is
+  possible that the constructed DOM is not compatible with the XML tool =
chain in certain subtle
+  ways. For example, an XML toolchain might not be able to represent att=
ributes with the name <code title=3D"">xmlns</code>=
, since they conflict with the Namespaces in XML syntax. There is also so=
me
+  data that the <a href=3D#html-parser>HTML parser</a> gener=
ates that isn't included in the DOM itself. This
+  section specifies some rules for handling these issues.</p>
+
+  <p>If the XML API being used doesn't support DOCTYPEs, the tool =
may drop DOCTYPEs altogether.</p>
+
+  <p>If the XML API doesn't support attributes in no namespace tha=
t are named "<code title=3D"">xmlns</code>&quo=
t;, attributes whose names start with "<code title=3D""=
>xmlns:</code>", or
+  attributes in the <a href=3D#xmlns-namespace>XMLNS namespace<=
/a>, then the tool may drop such attributes.</p>
+
+  <p>The tool may annotate the output with any namespace declarati=
ons required for proper
+  operation.</p>
+
+  <p>If the XML API being used restricts the allowable characters =
in the local names of elements and
+  attributes, then the tool may map all element and attribute local name=
s that the API wouldn't
+  support to a set of names that <em>are</em> allowed, by re=
placing any character that isn't
+  supported with the uppercase letter U and the six digits of the charac=
ter's Unicode code point
+  when expressed in hexadecimal, using digits 0-9 and capital letters A-=
F as the symbols, in
+  increasing numeric order.</p>
+
+  <p class=3Dexample>For example, the element name <code title=3D=
"">foo<bar</code>, which can be
+  output by the <a href=3D#html-parser>HTML parser</a>, thou=
gh it is neither a legal HTML element name nor a
+  well-formed XML element name, would be converted into <code title=3D=
"">fooU00003Cbar</code>, which
+  <em>is</em> a well-formed XML element name (though it's st=
ill not legal in HTML by any means).</p>
+
+  <p class=3Dexample>As another example, consider the attribute &l=
t;code>xlink:href</code>. Used on a
+  MathML element, it becomes, after being <a href=3D#adjust-foreign-a=
ttributes title=3D"adjust foreign attributes">adjusted</a=
>,
+  an attribute with a prefix "<code title=3D"">xlin=
k</code>" and a local name "<code title=3D""=
>href</code>". However, used on an HTML element, it becomes=
 an attribute with no prefix
+  and the local name "<code title=3D"">xlink:href&l=
t;/code>", which is not a valid NCName, and thus might
+  not be accepted by an XML API. It could thus get converted, becoming &=
quot;<code title=3D"">xlinkU00003Ahref</code>"=
.</p>
+
+  <p class=3Dnote>The resulting names from this conversion conveni=
ently can't clash with any
+  attribute generated by the <a href=3D#html-parser>HTML parser&lt=
;/a>, since those are all either lowercase or those
+  listed in the <a href=3D#adjust-foreign-attributes>adjust foreig=
n attributes</a> algorithm's table.</p>
+
+  <p>If the XML API restricts comments from having two consecutive=
 U+002D HYPHEN-MINUS characters
+  (--), the tool may insert a single U+0020 SPACE character between any =
such offending
+  characters.</p>
+
+  <p>If the XML API restricts comments from ending in a U+002D HYP=
HEN-MINUS character (-), the tool
+  may insert a single U+0020 SPACE character at the end of such comments=
.</p>
+
+  <p>If the XML API restricts allowed characters in character data=
, attribute values, or comments,
+  the tool may replace any U+000C FORM FEED (FF) character with a U+0020=
 SPACE character, and any
+  other literal non-XML character with a U+FFFD REPLACEMENT CHARACTER.&l=
t;/p>
+
+  <p>If the tool has no way to convey out-of-band information, the=
n the tool may drop the following
+  information:</p>
+
+  <ul><li>Whether the document is set to <i><a href=
=3D#no-quirks-mode>no-quirks mode</a></i>, <i><a =
href=3D#limited-quirks-mode>limited-quirks mode</a></i>, o=
r
+   <i><a href=3D#quirks-mode>quirks mode</a></i>=
</li>
+
+   <li>The association between form controls and forms that aren't=
 their nearest <code><a href=3D#the-form-element>form</a&g=
t;</code>
+   element ancestor (use of the <a href=3D#form-element-pointer>&l=
t;code>form</code> element pointer</a> in the parser)</=
li>
+
+   <li>The <a href=3D#template-contents>template contents&lt=
;/a> of any <code><a href=3D#the-template-element>template=
</a></code> elements.</li>
+
+  </ul><p class=3Dnote>The mutations allowed by this section=
 apply <em>after</em> the <a href=3D#html-parser>HTML
+  parser</a>'s rules have been applied. For example, a <code ti=
tle=3D""><a::></code> start tag
+  will be closed by a <code title=3D""></a::&=
gt;</code> end tag, and never by a <code title=3D""&gt=
;</aU00003AU00003A></code> end tag, even if the user =
agent is using the rules above to
+  then generate an actual element in the DOM with the name <code titl=
e=3D"">aU00003AU00003A</code> for
+  that start tag.</p>
+
+  </div>
+
+
+  <div class=3Dimpl>
+
+  <h4 id=3Dan-introduction-to-error-handling-and-strange-cases-in-the=
-parser><span class=3Dsecno>12.2.8 </span>An introduction =
to error handling and strange cases in the parser</h4>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <p>This section examines some erroneous markup and discusses how=
 the <a href=3D#html-parser>HTML parser</a>
+  handles these cases.</p>
+
+
+  <h5 id=3Dmisnested-tags:-b-i-/b-/i><span class=3Dsecno>12.=
2.8.1 </span>Misnested tags: <b><i>&amp=
;lt;/b></i></h5>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <p>The most-often discussed example of erroneous markup is as fo=
llows:</p>
+
+  <pre><p>1<b>2<i>3&=
lt;/b>4</i>5</p></pre>
+
+  <p>The parsing of this markup is straightforward up to the &quot=
;3". At this point, the DOM looks like
+  this:</p>
+
+  <ul class=3DdomTree><li class=3Dt1><code><a href=3D=
#the-html-element>html</a></code><ul><li class=3D=
t1><code><a href=3D#the-head-element>head</a></co=
de><li class=3Dt1><code><a href=3D#the-body-element>=
body</a></code><ul><li class=3Dt1><code>&lt=
;a href=3D#the-p-element>p</a></code><ul><li clas=
s=3Dt3><code>#text</code>: <span title=3D""&g=
t;1</span><li class=3Dt1><code><a href=3D#the-b-elem=
ent>b</a></code><ul><li class=3Dt3><code&gt=
;#text</code>: <span title=3D"">2</span><l=
i class=3Dt1><code><a href=3D#the-i-element>i</a>&lt=
;/code><ul><li class=3Dt3><code>#text</code>: =
<span title=3D"">3</span></ul></ul><=
/ul></ul></ul></ul><p>Here, the <a href=3D#=
stack-of-open-elements>stack of open elements</a> has five eleme=
nts on it: <code><a href=3D#the-html-element>html</a>&l=
t;/code>,
+  <code><a href=3D#the-body-element>body</a></code&=
gt;, <code><a href=3D#the-p-element>p</a></code>,=
 <code><a href=3D#the-b-element>b</a></code>, and=
 <code><a href=3D#the-i-element>i</a></code>. The=
 <a href=3D#list-of-active-formatting-elements>list of active
+  formatting elements</a> just has two: <code><a href=3D#=
the-b-element>b</a></code> and <code><a href=3D#t=
he-i-element>i</a></code>. The <a href=3D#insertion-mod=
e>insertion
+  mode</a> is "<a href=3D#parsing-main-inbody title=3D&quo=
t;insertion mode: in body">in body</a>".</p>
+
+  <p>Upon receiving the end tag token with the tag name "b&qu=
ot;, the "<a href=3D#adoptionAgency>adoption
+  agency algorithm</a>" is invoked. This is a simple case, in=
 that the <var title=3D"">formatting
+  element</var> is the <code><a href=3D#the-b-element>=
b</a></code> element, and there is no <var title=3D"&=
quot;>furthest block</var>.
+  Thus, the <a href=3D#stack-of-open-elements>stack of open elemen=
ts</a> ends up with just three elements: <code><a href=3D#=
the-html-element>html</a></code>,
+  <code><a href=3D#the-body-element>body</a></code&=
gt;, and <code><a href=3D#the-p-element>p</a></code&=
gt;, while the <a href=3D#list-of-active-formatting-elements>list o=
f active formatting elements</a>
+  has just one: <code><a href=3D#the-i-element>i</a>&l=
t;/code>. The DOM tree is unmodified at this point.</p>
+
+  <p>The next token is a character ("4"), triggers the &=
lt;a href=3D#reconstruct-the-active-formatting-elements title=3D"rec=
onstruct the active
+  formatting elements">reconstruction of the active formatting e=
lements</a>, in this case just
+  the <code><a href=3D#the-i-element>i</a></code&gt=
; element. A new <code><a href=3D#the-i-element>i</a>&l=
t;/code> element is thus created for the "4"
+  <code><a href=3D#text>Text</a></code> node. Af=
ter the end tag token for the "i" is also received, and the &qu=
ot;5"
+  <code><a href=3D#text>Text</a></code> node is =
inserted, the DOM looks as follows:</p>
+
+  <ul class=3DdomTree><li class=3Dt1><code><a href=3D=
#the-html-element>html</a></code><ul><li class=3D=
t1><code><a href=3D#the-head-element>head</a></co=
de><li class=3Dt1><code><a href=3D#the-body-element>=
body</a></code><ul><li class=3Dt1><code>&lt=
;a href=3D#the-p-element>p</a></code><ul><li clas=
s=3Dt3><code>#text</code>: <span title=3D""&g=
t;1</span><li class=3Dt1><code><a href=3D#the-b-elem=
ent>b</a></code><ul><li class=3Dt3><code&gt=
;#text</code>: <span title=3D"">2</span><l=
i class=3Dt1><code><a href=3D#the-i-element>i</a>&lt=
;/code><ul><li class=3Dt3><code>#text</code>: =
<span title=3D"">3</span></ul></ul><=
li class=3Dt1><code><a href=3D#the-i-element>i</a>&l=
t;/code><ul><li class=3Dt3><code>#text</code>:=
 <span title=3D"">4</span></ul><li class=3D=
t3><code>#text</code>: <span title=3D"">5&=
lt;/span></ul></ul></ul></ul><h5 id=3Dmisne=
sted-tags:-b-p-/b-/p><span class=3Dsecno>12.2.8.2 </span>M=
isnested tags: <b><p></b>&l=
t;/p></h5>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <p>A case similar to the previous one is the following:</p&gt=
;
+
+  <pre><b>1<p>2</b>3&amp=
;lt;/p></pre>
+
+  <p>Up to the "2" the parsing here is straightforward:&=
lt;/p>
+
+  <ul class=3DdomTree><li class=3Dt1><code><a href=3D=
#the-html-element>html</a></code><ul><li class=3D=
t1><code><a href=3D#the-head-element>head</a></co=
de><li class=3Dt1><code><a href=3D#the-body-element>=
body</a></code><ul><li class=3Dt1><code>&lt=
;a href=3D#the-b-element>b</a></code><ul><li clas=
s=3Dt3><code>#text</code>: <span title=3D""&g=
t;1</span><li class=3Dt1><code><a href=3D#the-p-elem=
ent>p</a></code><ul><li class=3Dt3><code&gt=
;#text</code>: <span title=3D"">2</span></=
ul></ul></ul></ul></ul><p>The interestin=
g part is when the end tag token with the tag name "b" is parse=
d.</p>
+
+  <p>Before that token is seen, the <a href=3D#stack-of-open-el=
ements>stack of open elements</a> has four elements on it:
+  <code><a href=3D#the-html-element>html</a></code&=
gt;, <code><a href=3D#the-body-element>body</a></cod=
e>, <code><a href=3D#the-b-element>b</a></code&gt=
;, and <code><a href=3D#the-p-element>p</a></code&gt=
;. The <a href=3D#list-of-active-formatting-elements>list of active
+  formatting elements</a> just has the one: <code><a href=
=3D#the-b-element>b</a></code>. The <a href=3D#insertio=
n-mode>insertion mode</a> is
+  "<a href=3D#parsing-main-inbody title=3D"insertion mode: =
in body">in body</a>".</p>
+
+  <p>Upon receiving the end tag token with the tag name "b&qu=
ot;, the "<a href=3D#adoptionAgency>adoption
+  agency algorithm</a>" is invoked, as in the previous exampl=
e. However, in this case, there
+  <em>is</em> a <var title=3D"">furthest blo=
ck</var>, namely the <code><a href=3D#the-p-element>p&l=
t;/a></code> element. Thus, this
+  time the adoption agency algorithm isn't skipped over.</p>
+
+  <p>The <var title=3D"">common ancestor</var&g=
t; is the <code><a href=3D#the-body-element>body</a>&lt=
;/code> element. A conceptual
+  "bookmark" marks the position of the <code><a href=3D=
#the-b-element>b</a></code> in the <a href=3D#list-of-a=
ctive-formatting-elements>list of active formatting
+  elements</a>, but since that list has only one element in it, th=
e bookmark won't have much
+  effect.</p>
+
+  <p>As the algorithm progresses, <var title=3D"">=
node</var> ends up set to the formatting element
+  (<code><a href=3D#the-b-element>b</a></code>),=
 and <var title=3D"">last node</var> ends up set to=
 the <var title=3D"">furthest
+  block</var> (<code><a href=3D#the-p-element>p</a&=
gt;</code>).</p>
+
+  <p>The <var title=3D"">last node</var> get=
s appended (moved) to the <var title=3D"">common
+  ancestor</var>, so that the DOM looks like:</p>
+
+  <ul class=3DdomTree><li class=3Dt1><code><a href=3D=
#the-html-element>html</a></code><ul><li class=3D=
t1><code><a href=3D#the-head-element>head</a></co=
de><li class=3Dt1><code><a href=3D#the-body-element>=
body</a></code><ul><li class=3Dt1><code>&lt=
;a href=3D#the-b-element>b</a></code><ul><li clas=
s=3Dt3><code>#text</code>: <span title=3D""&g=
t;1</span></ul><li class=3Dt1><code><a href=3D=
#the-p-element>p</a></code><ul><li class=3Dt3>=
<code>#text</code>: <span title=3D"">2</sp=
an></ul></ul></ul></ul><p>A new <code=
><a href=3D#the-b-element>b</a></code> element is cr=
eated, and the children of the <code><a href=3D#the-p-element&gt=
;p</a></code> element are
+  moved to it:</p>
+
+  <ul class=3DdomTree><li class=3Dt1><code><a href=3D=
#the-html-element>html</a></code><ul><li class=3D=
t1><code><a href=3D#the-head-element>head</a></co=
de><li class=3Dt1><code><a href=3D#the-body-element>=
body</a></code><ul><li class=3Dt1><code>&lt=
;a href=3D#the-b-element>b</a></code><ul><li clas=
s=3Dt3><code>#text</code>: <span title=3D""&g=
t;1</span></ul><li class=3Dt1><code><a href=3D=
#the-p-element>p</a></code></ul></ul></ul&g=
t;<ul class=3DdomTree><li class=3Dt1><code><a href=3D=
#the-b-element>b</a></code><ul><li class=3Dt3>=
<code>#text</code>: <span title=3D"">2</sp=
an></ul></ul><p>Finally, the new <code><a h=
ref=3D#the-b-element>b</a></code> element is appended to t=
he <code><a href=3D#the-p-element>p</a></code> el=
ement, so that the
+  DOM looks like:</p>
+
+  <ul class=3DdomTree><li class=3Dt1><code><a href=3D=
#the-html-element>html</a></code><ul><li class=3D=
t1><code><a href=3D#the-head-element>head</a></co=
de><li class=3Dt1><code><a href=3D#the-body-element>=
body</a></code><ul><li class=3Dt1><code>&lt=
;a href=3D#the-b-element>b</a></code><ul><li clas=
s=3Dt3><code>#text</code>: <span title=3D""&g=
t;1</span></ul><li class=3Dt1><code><a href=3D=
#the-p-element>p</a></code><ul><li class=3Dt1>=
<code><a href=3D#the-b-element>b</a></code><ul=
><li class=3Dt3><code>#text</code>: <span title=3D=
"">2</span></ul></ul></ul></ul&gt=
;</ul><p>The <code><a href=3D#the-b-element>b<=
/a></code> element is removed from the <a href=3D#list-of-act=
ive-formatting-elements>list of active formatting elements</a>
+  and the <a href=3D#stack-of-open-elements>stack of open elements=
</a>, so that when the "3" is parsed, it is appended to t=
he
+  <code><a href=3D#the-p-element>p</a></code> el=
ement:</p>
+
+  <ul class=3DdomTree><li class=3Dt1><code><a href=3D=
#the-html-element>html</a></code><ul><li class=3D=
t1><code><a href=3D#the-head-element>head</a></co=
de><li class=3Dt1><code><a href=3D#the-body-element>=
body</a></code><ul><li class=3Dt1><code>&lt=
;a href=3D#the-b-element>b</a></code><ul><li clas=
s=3Dt3><code>#text</code>: <span title=3D""&g=
t;1</span></ul><li class=3Dt1><code><a href=3D=
#the-p-element>p</a></code><ul><li class=3Dt1>=
<code><a href=3D#the-b-element>b</a></code><ul=
><li class=3Dt3><code>#text</code>: <span title=3D=
"">2</span></ul><li class=3Dt3><code&gt=
;#text</code>: <span title=3D"">3</span></=
ul></ul></ul></ul><h5 id=3Dunexpected-markup-in-t=
ables><span class=3Dsecno>12.2.8.3 </span>Unexpected marku=
p in tables</h5>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <p>Error handling in tables is, for historical reasons, especial=
ly strange. For example, consider
+  the following markup:</p>
+
+  <pre><table><strong><b></st=
rong><tr><td>aaa</td>&lt=
;/tr><strong>bbb</strong></table>ccc<=
/pre>
+
+  <p>The highlighted <code><a href=3D#the-b-element>b&=
lt;/a></code> element start tag is not allowed directly inside a=
 table like
+  that, and the parser handles this case by placing the element <em&g=
t;before</em> the table. (This is
+  called <i title=3D"foster parent"><a href=3D#foster=
-parent>foster parenting</a></i>.) This can be seen by exa=
mining the DOM tree
+  as it stands just after the <code><a href=3D#the-table-elemen=
t>table</a></code> element's start tag has been seen:</=
p>
+
+  <ul class=3DdomTree><li class=3Dt1><code><a href=3D=
#the-html-element>html</a></code><ul><li class=3D=
t1><code><a href=3D#the-head-element>head</a></co=
de><li class=3Dt1><code><a href=3D#the-body-element>=
body</a></code><ul><li class=3Dt1><code>&lt=
;a href=3D#the-table-element>table</a></code></ul>&l=
t;/ul></ul><p>...and then immediately after the <code&g=
t;<a href=3D#the-b-element>b</a></code> element start t=
ag has been seen:</p>
+
+  <ul class=3DdomTree><li class=3Dt1><code><a href=3D=
#the-html-element>html</a></code><ul><li class=3D=
t1><code><a href=3D#the-head-element>head</a></co=
de><li class=3Dt1><code><a href=3D#the-body-element>=
body</a></code><ul><li class=3Dt1><code>&lt=
;a href=3D#the-b-element>b</a></code><li class=3Dt1>=
<code><a href=3D#the-table-element>table</a></code&g=
t;</ul></ul></ul><p>At this point, the <a href=
=3D#stack-of-open-elements>stack of open elements</a> has on it =
the elements
+  <code><a href=3D#the-html-element>html</a></code&=
gt;, <code><a href=3D#the-body-element>body</a></cod=
e>, <code><a href=3D#the-table-element>table</a><=
/code>, and <code><a href=3D#the-b-element>b</a><=
/code> (in that order,
+  despite the resulting DOM tree); the <a href=3D#list-of-active-form=
atting-elements>list of active formatting elements</a> just has =
the
+  <code><a href=3D#the-b-element>b</a></code> el=
ement in it; and the <a href=3D#insertion-mode>insertion mode</a=
> is "<a href=3D#parsing-main-intable title=3D"insertion =
mode:
+  in table">in table</a>".</p>
+
+  <p>The <code><a href=3D#the-tr-element>tr</a>&=
lt;/code> start tag causes the <code><a href=3D#the-b-element=
>b</a></code> element to be popped off the stack and
+  a <code><a href=3D#the-tbody-element>tbody</a></c=
ode> start tag to be implied; the <code><a href=3D#the-tbody-=
element>tbody</a></code> and <code><a href=3D#the=
-tr-element>tr</a></code> elements
+  are then handled in a rather straight-forward manner, taking the parse=
r through the "<a href=3D#parsing-main-intbody title=3D"inse=
rtion mode: in table body">in table body</a>" and &quo=
t;<a href=3D#parsing-main-intr title=3D"insertion mode: in
+  row">in row</a>" insertion modes, after which the D=
OM looks as follows:</p>
+
+  <ul class=3DdomTree><li class=3Dt1><code><a href=3D=
#the-html-element>html</a></code><ul><li class=3D=
t1><code><a href=3D#the-head-element>head</a></co=
de><li class=3Dt1><code><a href=3D#the-body-element>=
body</a></code><ul><li class=3Dt1><code>&lt=
;a href=3D#the-b-element>b</a></code><li class=3Dt1>=
<code><a href=3D#the-table-element>table</a></code&g=
t;<ul><li class=3Dt1><code><a href=3D#the-tbody-elem=
ent>tbody</a></code><ul><li class=3Dt1><cod=
e><a href=3D#the-tr-element>tr</a></code></ul>=
</ul></ul></ul></ul><p>Here, the <a href=
=3D#stack-of-open-elements>stack of open elements</a> has on it =
the elements <code><a href=3D#the-html-element>html</a>=
</code>,
+  <code><a href=3D#the-body-element>body</a></code&=
gt;, <code><a href=3D#the-table-element>table</a></c=
ode>, <code><a href=3D#the-tbody-element>tbody</a>&l=
t;/code>, and <code><a href=3D#the-tr-element>tr</a>=
</code>; the <a href=3D#list-of-active-formatting-elements>li=
st of
+  active formatting elements</a> still has the <code><a h=
ref=3D#the-b-element>b</a></code> element in it; and the
+  <a href=3D#insertion-mode>insertion mode</a> is "<=
a href=3D#parsing-main-intr title=3D"insertion mode: in row"&gt=
;in row</a>".</p>
+
+  <p>The <code><a href=3D#the-td-element>td</a>&=
lt;/code> element start tag token, after putting a <code><a h=
ref=3D#the-td-element>td</a></code> element on the
+  tree, puts a marker on the <a href=3D#list-of-active-formatting-ele=
ments>list of active formatting elements</a> (it also switches t=
o
+  the "<a href=3D#parsing-main-intd title=3D"insertion mode=
: in cell">in cell</a>" <a href=3D#insertion-mode&g=
t;insertion mode</a>).</p>
+
+  <ul class=3DdomTree><li class=3Dt1><code><a href=3D=
#the-html-element>html</a></code><ul><li class=3D=
t1><code><a href=3D#the-head-element>head</a></co=
de><li class=3Dt1><code><a href=3D#the-body-element>=
body</a></code><ul><li class=3Dt1><code>&lt=
;a href=3D#the-b-element>b</a></code><li class=3Dt1>=
<code><a href=3D#the-table-element>table</a></code&g=
t;<ul><li class=3Dt1><code><a href=3D#the-tbody-elem=
ent>tbody</a></code><ul><li class=3Dt1><cod=
e><a href=3D#the-tr-element>tr</a></code><ul>&=
lt;li class=3Dt1><code><a href=3D#the-td-element>td</a&=
gt;</code></ul></ul></ul></ul></ul>&l=
t;/ul><p>The marker means that when the "aaa" characte=
r tokens are seen, no <code><a href=3D#the-b-element>b</a&=
gt;</code> element is
+  created to hold the resulting <code><a href=3D#text>Text&l=
t;/a></code> node:</p>
+
+  <ul class=3DdomTree><li class=3Dt1><code><a href=3D=
#the-html-element>html</a></code><ul><li class=3D=
t1><code><a href=3D#the-head-element>head</a></co=
de><li class=3Dt1><code><a href=3D#the-body-element>=
body</a></code><ul><li class=3Dt1><code>&lt=
;a href=3D#the-b-element>b</a></code><li class=3Dt1>=
<code><a href=3D#the-table-element>table</a></code&g=
t;<ul><li class=3Dt1><code><a href=3D#the-tbody-elem=
ent>tbody</a></code><ul><li class=3Dt1><cod=
e><a href=3D#the-tr-element>tr</a></code><ul>&=
lt;li class=3Dt1><code><a href=3D#the-td-element>td</a&=
gt;</code><ul><li class=3Dt3><code>#text</code=
>: <span title=3D"">aaa</span></ul></ul=
></ul></ul></ul></ul></ul><p>The e=
nd tags are handled in a straight-forward manner; after handling them, th=
e <a href=3D#stack-of-open-elements>stack of
+  open elements</a> has on it the elements <code><a href=3D=
#the-html-element>html</a></code>, <code><a href=3D=
#the-body-element>body</a></code>,
+  <code><a href=3D#the-table-element>table</a></cod=
e>, and <code><a href=3D#the-tbody-element>tbody</a>=
</code>; the <a href=3D#list-of-active-formatting-elements>li=
st of active formatting elements</a>
+  still has the <code><a href=3D#the-b-element>b</a>&l=
t;/code> element in it (the marker having been removed by the "td=
" end tag
+  token); and the <a href=3D#insertion-mode>insertion mode</a&g=
t; is "<a href=3D#parsing-main-intbody title=3D"insertion mo=
de: in table body">in
+  table body</a>".</p>
+
+  <p>Thus it is that the "bbb" character tokens are foun=
d. These trigger the "<a href=3D#parsing-main-intabletext title=3D=
"insertion
+  mode: in table text">in table text</a>" insertion m=
ode to be used (with the <a href=3D#original-insertion-mode>origina=
l
+  insertion mode</a> set to "<a href=3D#parsing-main-intbo=
dy title=3D"insertion mode: in table body">in table body<=
/a>").
+  The character tokens are collected, and when the next token (the <c=
ode><a href=3D#the-table-element>table</a></code> el=
ement end
+  tag) is seen, they are processed as a group. Since they are not all sp=
aces, they are handled as
+  per the "anything else" rules in the "<a href=3D#par=
sing-main-intable title=3D"insertion mode: in table">in tabl=
e</a>"
+  insertion mode, which defer to the "<a href=3D#parsing-main-in=
body title=3D"insertion mode: in body">in body</a>&quo=
t;
+  insertion mode but with <a href=3D#foster-parent title=3D"fost=
er parent">foster parenting</a>.</p>
+
+  <p>When <a href=3D#reconstruct-the-active-formatting-elements=
 title=3D"reconstruct the active formatting elements">the ac=
tive formatting elements
+  are reconstructed</a>, a <code><a href=3D#the-b-element=
>b</a></code> element is created and <a href=3D#foster-=
parent title=3D"foster
+  parent">foster parented</a>, and then the "bbb&quot=
; <code><a href=3D#text>Text</a></code> node is a=
ppended to it:</p>
+
+  <ul class=3DdomTree><li class=3Dt1><code><a href=3D=
#the-html-element>html</a></code><ul><li class=3D=
t1><code><a href=3D#the-head-element>head</a></co=
de><li class=3Dt1><code><a href=3D#the-body-element>=
body</a></code><ul><li class=3Dt1><code>&lt=
;a href=3D#the-b-element>b</a></code><li class=3Dt1>=
<code><a href=3D#the-b-element>b</a></code><ul=
><li class=3Dt3><code>#text</code>: <span title=3D=
"">bbb</span></ul><li class=3Dt1><code&=
gt;<a href=3D#the-table-element>table</a></code><ul&=
gt;<li class=3Dt1><code><a href=3D#the-tbody-element>tb=
ody</a></code><ul><li class=3Dt1><code><=
a href=3D#the-tr-element>tr</a></code><ul><li cla=
ss=3Dt1><code><a href=3D#the-td-element>td</a></c=
ode><ul><li class=3Dt3><code>#text</code>: &lt=
;span title=3D"">aaa</span></ul></ul></=
ul></ul></ul></ul></ul><p>The <a href=
=3D#stack-of-open-elements>stack of open elements</a> has on it =
the elements <code><a href=3D#the-html-element>html</a>=
</code>,
+  <code><a href=3D#the-body-element>body</a></code&=
gt;, <code><a href=3D#the-table-element>table</a></c=
ode>, <code><a href=3D#the-tbody-element>tbody</a>&l=
t;/code>, and the new <code><a href=3D#the-b-element>b<=
/a></code> (again, note
+  that this doesn't match the resulting tree!); the <a href=3D#list-o=
f-active-formatting-elements>list of active formatting elements</a&=
gt;
+  has the new <code><a href=3D#the-b-element>b</a><=
/code> element in it; and the <a href=3D#insertion-mode>insertio=
n mode</a> is still "<a href=3D#parsing-main-intbody title=3D=
"insertion mode: in table body">in table body</a>&quot=
;.</p>
+
+  <p>Had the character tokens been only <a href=3D#space-charac=
ter title=3D"space character">space characters</a>
+  instead of "bbb", then those <a href=3D#space-character t=
itle=3D"space character">space characters</a> would ju=
st be
+  appended to the <code><a href=3D#the-tbody-element>tbody&l=
t;/a></code> element.</p>
+
+  <p>Finally, the <code><a href=3D#the-table-element>t=
able</a></code> is closed by a "table" end tag. Thi=
s pops all the nodes from
+  the <a href=3D#stack-of-open-elements>stack of open elements<=
/a> up to and including the <code><a href=3D#the-table-elemen=
t>table</a></code> element, but it
+  doesn't affect the <a href=3D#list-of-active-formatting-elements&gt=
;list of active formatting elements</a>, so the "ccc" cha=
racter tokens
+  after the table result in yet another <code><a href=3D#the-b-=
element>b</a></code> element being created, this time afte=
r the
+  table:</p>
+
+  <ul class=3DdomTree><li class=3Dt1><code><a href=3D=
#the-html-element>html</a></code><ul><li class=3D=
t1><code><a href=3D#the-head-element>head</a></co=
de><li class=3Dt1><code><a href=3D#the-body-element>=
body</a></code><ul><li class=3Dt1><code>&lt=
;a href=3D#the-b-element>b</a></code><li class=3Dt1>=
<code><a href=3D#the-b-element>b</a></code><ul=
><li class=3Dt3><code>#text</code>: <span title=3D=
"">bbb</span></ul><li class=3Dt1><code&=
gt;<a href=3D#the-table-element>table</a></code><ul&=
gt;<li class=3Dt1><code><a href=3D#the-tbody-element>tb=
ody</a></code><ul><li class=3Dt1><code><=
a href=3D#the-tr-element>tr</a></code><ul><li cla=
ss=3Dt1><code><a href=3D#the-td-element>td</a></c=
ode><ul><li class=3Dt3><code>#text</code>: &lt=
;span title=3D"">aaa</span></ul></ul></=
ul></ul><li class=3Dt1><code><a href=3D#the-b-ele=
ment>b</a></code><ul><li class=3Dt3><code&g=
t;#text</code>: <span title=3D"">ccc</span>&l=
t;/ul></ul></ul></ul><h5 id=3Dscripts-that-modify=
-the-page-as-it-is-being-parsed><span class=3Dsecno>12.2.8.4 &lt=
;/span>Scripts that modify the page as it is being parsed</h5>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <p>Consider the following markup, which for this example we will=
 assume is the document with
+  <a href=3D#url>URL</a> <code title=3D"">ht=
tp://example.com/inner</code>, being rendered as the content of
+  an <code><a href=3D#the-iframe-element>iframe</a>&lt=
;/code> in another document with the <a href=3D#url>URL</a&gt=
; <code title=3D"">http://example.com/outer</code>:=
</p>
+
+  <pre><div id=3Da>
+ <script>
+  var div =3D document.getElementById('a');
+  parent.document.body.appendChild(div);
+ </script>
+ <script>
+  alert(document.URL);
+ </script>
+</div>
+<script>
+ alert(document.URL);
+</script></pre>
+
+  <p>Up to the first "script" end tag, before the script=
 is parsed, the result is relatively
+  straightforward:</p>
+
+  <ul class=3DdomTree><li class=3Dt1><code><a href=3D=
#the-html-element>html</a></code><ul><li class=3D=
t1><code><a href=3D#the-head-element>head</a></co=
de><li class=3Dt1><code><a href=3D#the-body-element>=
body</a></code><ul><li class=3Dt1><code>&lt=
;a href=3D#the-div-element>div</a></code> <span class=3D=
t2 title=3D""><code class=3D"attribute name"&gt=
;id</code>=3D"<code class=3D"attribute value">=
<a href=3D#the-a-element>a</a></code>"</span&gt=
;<ul><li class=3Dt3><code>#text</code>: <span =
title=3D"">
+ </span><li class=3Dt1><code><a href=3D#the-script-=
element>script</a></code><ul><li class=3Dt3>&l=
t;code>#text</code>: <span title=3D"">var div =3D=
 document.getElementById('a'); ⏎ parent.document.body.appendCh=
ild(div);</span></ul></ul></ul></ul></ul=
><p>After the script is parsed, though, the <code><a hr=
ef=3D#the-div-element>div</a></code> element and its child
+  <code><a href=3D#the-script-element>script</a></c=
ode> element are gone:</p>
+
+  <ul class=3DdomTree><li class=3Dt1><code><a href=3D=
#the-html-element>html</a></code><ul><li class=3D=
t1><code><a href=3D#the-head-element>head</a></co=
de><li class=3Dt1><code><a href=3D#the-body-element>=
body</a></code></ul></ul><p>They are, at th=
is point, in the <code><a href=3D#document>Document</a>=
</code> of the aforementioned outer
+  <a href=3D#browsing-context>browsing context</a>. However,=
 the <a href=3D#stack-of-open-elements>stack of open elements</a=
> <em>still contains
+  the <code><a href=3D#the-div-element>div</a></cod=
e> element</em>.</p>
+
+  <p>Thus, when the second <code><a href=3D#the-script-el=
ement>script</a></code> element is parsed, it is inserted =
<em>into the outer
+  <code><a href=3D#document>Document</a></code> =
object</em>.</p>
+
+  <p>Those parsed into different <code><a href=3D#documen=
t>Document</a></code>s than the one the parser was created=
 for do
+  not execute, so the first alert does not show.</p>
+
+  <p>Once the <code><a href=3D#the-div-element>div<=
/a></code> element's end tag is parsed, the <code><a hr=
ef=3D#the-div-element>div</a></code> element is popped
+  off the stack, and so the next <code><a href=3D#the-script-el=
ement>script</a></code> element is in the inner
+  <code><a href=3D#document>Document</a></code>:=
</p>
+
+  <ul class=3DdomTree><li class=3Dt1><code><a href=3D=
#the-html-element>html</a></code><ul><li class=3D=
t1><code><a href=3D#the-head-element>head</a></co=
de><li class=3Dt1><code><a href=3D#the-body-element>=
body</a></code><ul><li class=3Dt1><code>&lt=
;a href=3D#the-script-element>script</a></code><ul>&=
lt;li class=3Dt3><code>#text</code>: <span title=3D&quo=
t;">alert(document.URL);</span></ul></ul></u=
l></ul><p>This script does execute, resulting in an alert =
that says "http://example.com/inner".</p>
+
+
+  <h5 id=3Dthe-execution-of-scripts-that-are-moving-across-multiple-d=
ocuments><span class=3Dsecno>12.2.8.5 </span>The execution=
 of scripts that are moving across multiple documents</h5>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <p>Elaborating on the example in the previous section, consider =
the case where the second
+  <code><a href=3D#the-script-element>script</a></c=
ode> element is an external script (i.e. one with a <code title=3Da=
ttr-script-src><a href=3D#attr-script-src>src</a></code=
> attribute). Since the element was not in the parser's
+  <code><a href=3D#document>Document</a></code> =
when it was created, that external script is not even downloaded.</p&g=
t;
+
+  <p>In a case where a <code><a href=3D#the-script-elemen=
t>script</a></code> element with a <code title=3Dattr-s=
cript-src><a href=3D#attr-script-src>src</a></code>
+  attribute is parsed normally into its parser's <code><a href=3D=
#document>Document</a></code>, but while the external
+  script is being downloaded, the element is moved to another document, =
the script continues to
+  download, but does not execute.</p>
+
+  <p class=3Dnote>In general, moving <code><a href=3D#the=
-script-element>script</a></code> elements between <cod=
e><a href=3D#document>Document</a></code>s is
+  considered a bad practice.</p>
+
+
+
+  <h5 id=3Dunclosed-formatting-elements><span class=3Dsecno>=
12.2.8.6 </span>Unclosed formatting elements</h5>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <p>The following markup shows how nested formatting elements (su=
ch as <code><a href=3D#the-b-element>b</a></code>=
) get
+  collected and continue to be applied even as the elements they are con=
tained in are closed, but
+  that excessive duplicates are thrown away.</p>
+
+  <pre><!DOCTYPE html>
+<p><b class=3Dx><b class=3Dx>&=
amp;lt;b><b class=3Dx><b class=3Dx>&am=
p;lt;b>X
+<p>X
+<p><b><b class=3Dx><b&a=
mp;gt;X
+<p></b></b></b>&=
amp;lt;/b></b></b>X</pre>
+
+  <p>The resulting DOM tree is as follows:</p>
+
+  <ul class=3DdomTree><li class=3Dt10>DOCTYPE: <code>&=
lt;a href=3D#the-html-element>html</a></code><li class=3D=
t1><code><a href=3D#the-html-element>html</a></co=
de><ul><li class=3Dt1><code><a href=3D#the-head-e=
lement>head</a></code><li class=3Dt1><code>&lt=
;a href=3D#the-body-element>body</a></code><ul><l=
i class=3Dt1><code><a href=3D#the-p-element>p</a>&lt=
;/code><ul><li class=3Dt1><code><a href=3D#the-b-=
element>b</a></code> <span class=3Dt2 title=3D"&qu=
ot;><code class=3D"attribute name">class</code>=3D=
"<code class=3D"attribute value">x</code>&quot=
;</span><ul><li class=3Dt1><code><a href=3D#th=
e-b-element>b</a></code> <span class=3Dt2 title=3D&quot=
;"><code class=3D"attribute name">class</code&=
gt;=3D"<code class=3D"attribute value">x</code&gt=
;"</span><ul><li class=3Dt1><code><a href=
=3D#the-b-element>b</a></code><ul><li class=3Dt1&=
gt;<code><a href=3D#the-b-element>b</a></code> &l=
t;span class=3Dt2 title=3D""><code class=3D"attribut=
e name">class</code>=3D"<code class=3D"attribu=
te value">x</code>"</span><ul><li class=
=3Dt1><code><a href=3D#the-b-element>b</a></code&=
gt; <span class=3Dt2 title=3D""><code class=3D"at=
tribute name">class</code>=3D"<code class=3D"a=
ttribute value">x</code>"</span><ul><li=
 class=3Dt1><code><a href=3D#the-b-element>b</a><=
/code><ul><li class=3Dt3><code>#text</code>: &=
lt;span title=3D"">X⏎</span></ul><=
/ul></ul></ul></ul></ul></ul><li clas=
s=3Dt1><code><a href=3D#the-p-element>p</a></code=
><ul><li class=3Dt1><code><a href=3D#the-b-elemen=
t>b</a></code> <span class=3Dt2 title=3D""&gt=
;<code class=3D"attribute name">class</code>=3D&quo=
t;<code class=3D"attribute value">x</code>"&lt=
;/span><ul><li class=3Dt1><code><a href=3D#the-b-=
element>b</a></code><ul><li class=3Dt1><cod=
e><a href=3D#the-b-element>b</a></code> <span cla=
ss=3Dt2 title=3D""><code class=3D"attribute name&quo=
t;>class</code>=3D"<code class=3D"attribute value&q=
uot;>x</code>"</span><ul><li class=3Dt1>&=
lt;code><a href=3D#the-b-element>b</a></code> <sp=
an class=3Dt2 title=3D""><code class=3D"attribute na=
me">class</code>=3D"<code class=3D"attribute v=
alue">x</code>"</span><ul><li class=3Dt=
1><code><a href=3D#the-b-element>b</a></code>&=
lt;ul><li class=3Dt3><code>#text</code>: <span ti=
tle=3D"">X⏎</span></ul></ul>&lt=
;/ul></ul></ul></ul><li class=3Dt1><code&gt=
;<a href=3D#the-p-element>p</a></code><ul><li =
class=3Dt1><code><a href=3D#the-b-element>b</a></=
code> <span class=3Dt2 title=3D""><code class=3D&qu=
ot;attribute name">class</code>=3D"<code class=3D&q=
uot;attribute value">x</code>"</span><ul>&=
lt;li class=3Dt1><code><a href=3D#the-b-element>b</a&gt=
;</code><ul><li class=3Dt1><code><a href=3D#th=
e-b-element>b</a></code> <span class=3Dt2 title=3D&quot=
;"><code class=3D"attribute name">class</code&=
gt;=3D"<code class=3D"attribute value">x</code&gt=
;"</span><ul><li class=3Dt1><code><a href=
=3D#the-b-element>b</a></code> <span class=3Dt2 title=3D=
""><code class=3D"attribute name">class</=
code>=3D"<code class=3D"attribute value">x</co=
de>"</span><ul><li class=3Dt1><code><a=
 href=3D#the-b-element>b</a></code><ul><li class=3D=
t1><code><a href=3D#the-b-element>b</a></code>=
<ul><li class=3Dt1><code><a href=3D#the-b-element&gt=
;b</a></code> <span class=3Dt2 title=3D"">&lt=
;code class=3D"attribute name">class</code>=3D"&l=
t;code class=3D"attribute value">x</code>"</sp=
an><ul><li class=3Dt1><code><a href=3D#the-b-elem=
ent>b</a></code><ul><li class=3Dt3><code&gt=
;#text</code>: <span title=3D"">X⏎</s=
pan></ul></ul></ul></ul></ul></ul>=
</ul></ul></ul><li class=3Dt1><code><a h=
ref=3D#the-p-element>p</a></code><ul><li class=3D=
t3><code>#text</code>: <span title=3D"">X&=
amp;#x23ce;</span></ul></ul></ul></ul><p=
>Note how the second <code><a href=3D#the-p-element>p</=
a></code> element in the markup has no explicit <code><=
a href=3D#the-b-element>b</a></code>
+  elements, but in the resulting DOM, up to three of each kind of format=
ting element (in this case
+  three <code><a href=3D#the-b-element>b</a></code&=
gt; elements with the class attribute, and two unadorned <code><=
a href=3D#the-b-element>b</a></code> elements)
+  get reconstructed before the element's "X".</p>
+
+  <p>Also note how this means that in the final paragraph only six=
 <code><a href=3D#the-b-element>b</a></code> end =
tags are
+  needed to completely clear the list of formatting elements, even thoug=
h nine <code><a href=3D#the-b-element>b</a></code&gt=
; start
+  tags have been seen up to this point.</p>
+
+
+<!--/HTMLPARSER-->
+
+
+  <h3 id=3Dserializing-html-fragments><span class=3Dsecno>12=
.3 </span>Serializing HTML fragments</h3>
+
+  <p>The following steps form the <dfn id=3Dhtml-fragment-seria=
lization-algorithm>HTML fragment serialization algorithm</dfn>. =
The algorithm
+  takes as input a DOM <code><a href=3D#element>Element</=
a></code>, <code><a href=3D#document>Document</a&=
gt;</code>, or <code><a href=3D#documentfragment>Docume=
ntFragment</a></code>
+  referred to as <var title=3D"">the node</var>, a=
nd either returns a string or throws an
+  exception.</p>
+
+  <p class=3Dnote>This algorithm serializes the <em>children=
</em> of the node being serialized, not
+  the node itself.</p>
+
+  <ol><li><p>Let <var title=3D"">s<=
/var> be a string, and initialize it to the empty string.</li>
+
+   <li><p>If <var title=3D"">the node</va=
r> is a <code><a href=3D#the-template-element>template<=
/a></code> element, then let <var title=3D"">the=
 node</var> instead be the <code><a href=3D#the-template-e=
lement>template</a></code> element's <a href=3D#templat=
e-contents>template
+   contents</a> (a <code><a href=3D#documentfragment>D=
ocumentFragment</a></code> node).</li>
+
+   <li>
+
+    <p>For each child node of <var title=3D"">the =
node</var>, in <a href=3D#tree-order>tree order</a>, ru=
n the
+    following steps:
+
+    <ol><li><p>Let <var title=3D"">cur=
rent node</var> be the child node being processed.</li>
+
+     <li>
+
+      <p>Append the appropriate string from the following list to =
<var title=3D"">s</var>:</p>
+
+      <dl class=3Dswitch><dt>If <var title=3D""=
>current node</var> is an <code title=3D"">Eleme=
nt</code></dt>
+
+       <dd>
+
+        <p>If <var title=3D"">current node</var=
> is an element in the <a href=3D#html-namespace-0>HTML namespac=
e</a>, the
+        <a href=3D#mathml-namespace>MathML namespace</a>, or=
 the <a href=3D#svg-namespace>SVG namespace</a>, then let &lt=
;var title=3D"">tagname</var> be <var title=3D&quot=
;">current node</var>'s local name. Otherwise, let <var =
title=3D"">tagname</var> be <var title=3D"&quo=
t;>current node</var>'s qualified name.</p>
+
+        <p>Append a U+003C LESS-THAN SIGN character (<), fo=
llowed by <var title=3D"">tagname</var>.</p>
+
+        <p class=3Dnote>For <a href=3D#html-elements>HTML el=
ements</a> created by the <a href=3D#html-parser>HTML parser&=
lt;/a> or
+        <code title=3D"">Document.createElement()</co=
de>, <var title=3D"">tagname</var> will be
+        lowercase.</p>
+
+        <p>For each attribute that the element has, append a U+002=
0 SPACE character, the <a href=3D"#attribute's-serialized-name&qu=
ot; title=3D"attribute's serialized name">attribute's serial=
ized name as described below</a>, a
+        U+003D EQUALS SIGN character (=3D), a U+0022 QUOTATION MARK char=
acter ("), the
+        attribute's value, <a href=3D#escapingString title=3D"es=
caping a string">escaped as described below</a> in
+        <i>attribute mode</i>, and a second U+0022 QUOTATION=
 MARK character (").</p>
+
+        <p>An <dfn id=3D"attribute's-serialized-name"=
>attribute's serialized name</dfn> for the purposes of the previ=
ous paragraph must
+        be determined as follows:</p>
+
+        <dl class=3Dswitch><dt>If the attribute has no names=
pace</dt>
+
+         <dd>
+
+          <p>The attribute's serialized name is the attribute's lo=
cal name.</p>
+
+          <p class=3Dnote>For attributes on <a href=3D#html-ele=
ments>HTML elements</a> set by the <a href=3D#html-parser>=
HTML
+          parser</a> or by <code title=3D"">Elemen=
t.setAttribute()</code>, the local name will be
+          lowercase.</p>
+
+         </dd>
+
+
+         <dt>If the attribute is in the <a href=3D#xml-namespac=
e>XML namespace</a></dt>
+
+         <dd><p>The attribute's serialized name is the strin=
g "<code title=3D"">xml:</code>" followed
+         by the attribute's local name.</dd>
+
+
+         <dt>If the attribute is in the <a href=3D#xmlns-namesp=
ace>XMLNS namespace</a> and the attribute's local name
+         is <code title=3D"">xmlns</code></dt&g=
t;
+
+         <dd><p>The attribute's serialized name is the strin=
g "<code title=3D"">xmlns</code>".</dd=
>
+
+
+         <dt>If the attribute is in the <a href=3D#xmlns-namesp=
ace>XMLNS namespace</a> and the attribute's local name
+         is not <code title=3D"">xmlns</code></=
dt>
+
+         <dd><p>The attribute's serialized name is the strin=
g "<code title=3D"">xmlns:</code>" follow=
ed by the attribute's local
+         name.</dd>
+
+
+         <dt>If the attribute is in the <a href=3D#xlink-namesp=
ace>XLink namespace</a></dt>
+
+         <dd><p>The attribute's serialized name is the strin=
g "<code title=3D"">xlink:</code>"
+         followed by the attribute's local name.</dd>
+
+
+         <dt>If the attribute is in some other namespace</dt&gt=
;
+
+         <dd><p>The attribute's serialized name is the attri=
bute's qualified name.</dd>
+
+        </dl><p>While the exact order of attributes is UA-de=
fined, and may depend on factors such as the
+        order that the attributes were given in the original markup, the=
 sort order must be stable,
+        such that consecutive invocations of this algorithm serialize an=
 element's attributes in the
+        same order.</p>
+
+        <p>Append a U+003E GREATER-THAN SIGN character (>).=
</p>
+
+        <p>If <var title=3D"">current node</var=
> is an <code><a href=3D#the-area-element>area</a>&l=
t;/code>, <code><a href=3D#the-base-element>base</a>=
</code>,
+        <code><a href=3D#basefont>basefont</a></cod=
e>, <code><a href=3D#bgsound>bgsound</a></code&gt=
;, <code><a href=3D#the-br-element>br</a></code>,=
 <code><a href=3D#the-col-element>col</a></code>,
+        <code><a href=3D#the-embed-element>embed</a>&l=
t;/code>, <code><a href=3D#frame>frame</a></code&=
gt;, <code><a href=3D#the-hr-element>hr</a></code&gt=
;, <code><a href=3D#the-img-element>img</a></code&gt=
;,
+        <code><a href=3D#the-input-element>input</a>&l=
t;/code>, <code><a href=3D#the-keygen-element>keygen</a=
></code>, <code><a href=3D#the-link-element>link<=
/a></code>, <code><a href=3D#the-menuitem-element>me=
nuitem</a></code>,
+        <code><a href=3D#the-meta-element>meta</a><=
/code>, <code><a href=3D#the-param-element>param</a>=
</code>, <code><a href=3D#the-source-element>source<=
/a></code>, <code><a href=3D#the-track-element>track=
</a></code> or
+        <code><a href=3D#the-wbr-element>wbr</a></c=
ode> element, then continue on to the next child node at this point.&l=
t;/p>
+        <!-- VOIDLIST superset -->
+        <!-- also, i guess: image and isindex, but we don't list thos=
e because we don't consider
+        those "elements", more "macros", and thus we=
 should never serialize them -->
+
+        <p>If <var title=3D"">current node</var=
> is a <code><a href=3D#the-pre-element>pre</a></=
code>, <code><a href=3D#the-textarea-element>textarea</=
a></code>, or
+        <code><a href=3D#listing>listing</a></code&=
gt; element, and the first child node of the element, if any, is a
+        <code><a href=3D#text>Text</a></code> no=
de whose character data has as its first character a U+000A LINE FEED
+        (LF) character, then append a U+000A LINE FEED (LF) character.&l=
t;/p>
+
+        <p>Append the value of running the <a href=3D#html-frag=
ment-serialization-algorithm>HTML fragment serialization algorithm<=
/a> on the
+        <var title=3D"">current node</var> element=
 (thus recursing into this algorithm for that
+        element), followed by a U+003C LESS-THAN SIGN character (&lt=
;), a U+002F SOLIDUS character
+        (/), <var title=3D"">tagname</var> again, =
and finally a U+003E GREATER-THAN SIGN character
+        (>).</p>
+
+       </dd>
+
+
+       <dt>If <var title=3D"">current node</var=
> is a <code title=3D"">Text</code> node</dt&=
gt;
+
+       <dd>
+
+        <p>If the parent of <var title=3D"">curren=
t node</var> is a <code><a href=3D#the-style-element>st=
yle</a></code>,
+        <code><a href=3D#the-script-element>script</a>=
</code>, <code><a href=3D#xmp>xmp</a></code&gt=
;, <code><a href=3D#the-iframe-element>iframe</a></c=
ode>, <code><a href=3D#noembed>noembed</a></code&=
gt;,
+        <code><a href=3D#noframes>noframes</a></cod=
e>, or <code><a href=3D#plaintext>plaintext</a></=
code> element, or if the parent of <var title=3D"">cur=
rent node</var> is a <code><a href=3D#the-noscript-element=
>noscript</a></code> element and <a href=3D#concept-n-s=
cript title=3Dconcept-n-script>scripting is enabled</a> for the =
node, then append the value of
+        <var title=3D"">current node</var>'s <c=
ode title=3D"">data</code> IDL attribute literally.&lt=
;/p>
+
+        <p>Otherwise, append the value of <var title=3D"&q=
uot;>current node</var>'s <code title=3D"">data&=
lt;/code> IDL attribute, <a href=3D#escapingString title=3D"es=
caping a string">escaped as described
+        below</a>.</p>
+
+       </dd>
+
+
+       <dt>If <var title=3D"">current node</var=
> is a <code title=3D"">Comment</code></dt&gt=
;
+
+       <dd>
+
+        <p>Append the literal string <code><!--</c=
ode> (U+003C LESS-THAN SIGN, U+0021 EXCLAMATION
+        MARK, U+002D HYPHEN-MINUS, U+002D HYPHEN-MINUS), followed by the=
 value of <var title=3D"">current node</var>'s <=
code title=3D"">data</code> IDL attribute, followed by=
 the
+        literal string <code>--></code> (U+002D HYPHE=
N-MINUS, U+002D HYPHEN-MINUS, U+003E
+        GREATER-THAN SIGN).</p>
+
+       </dd>
+
+
+       <dt>If <var title=3D"">current node</var=
> is a <code title=3D"">ProcessingInstruction</code=
></dt>
+
+       <dd>
+
+        <p>Append the literal string <code><?</cod=
e> (U+003C LESS-THAN SIGN, U+003F QUESTION
+        MARK), followed by the value of <var title=3D"">=
current node</var>'s <code title=3D"">target</co=
de> IDL attribute, followed by a single U+0020 SPACE character, follow=
ed
+        by the value of <var title=3D"">current node<=
/var>'s <code title=3D"">data</code> IDL attribu=
te,
+        followed by a single U+003E GREATER-THAN SIGN character (&gt=
;).</p>
+
+       </dd>
+
+
+       <dt>If <var title=3D"">current node</var=
> is a <code title=3D"">DocumentType</code></=
dt>
+
+       <dd>
+
+        <p>Append the literal string <code><!DOCTYPE&=
lt;/code> (U+003C LESS-THAN SIGN, U+0021
+        EXCLAMATION MARK, U+0044 LATIN CAPITAL LETTER D, U+004F LATIN CA=
PITAL LETTER O, U+0043 LATIN
+        CAPITAL LETTER C, U+0054 LATIN CAPITAL LETTER T, U+0059 LATIN CA=
PITAL LETTER Y, U+0050 LATIN
+        CAPITAL LETTER P, U+0045 LATIN CAPITAL LETTER E), followed by a =
space (U+0020 SPACE),
+        followed by the value of <var title=3D"">current=
 node</var>'s <code title=3D"">name</code> ID=
L
+        attribute, followed by the literal string <code>>&l=
t;/code> (U+003E GREATER-THAN SIGN).</p>
+
+       </dd>
+
+
+      </dl><!--
+      <p>Other node types (e.g. <code title=3D"">A=
ttr</code>) cannot occur as children of elements.
+      If, despite this, they somehow do occur, this algorithm must throw=
 an
+      <code>InvalidStateError</code> exception.</p>
+      --></li>
+
+    </ol></li>
+
+   <li><p>The result of the algorithm is the string <var =
title=3D"">s</var>.</li>
+
+  </ol><p class=3Dwarning>It is possible that the output of =
this algorithm, if parsed with an <a href=3D#html-parser>HTML
+  parser</a>, will not return the original tree structure.</p&g=
t;
+
+  <div class=3Dexample>
+
+   <p>For instance, if a <code><a href=3D#the-textarea-el=
ement>textarea</a></code> element to which a <code titl=
e=3D"">Comment</code> node
+   has been appended is serialized and the output is then reparsed, the =
comment will end up being
+   displayed in the text field. Similarly, if, as a result of DOM manipu=
lation, an element contains
+   a comment that contains the literal string "<code title=3D&qu=
ot;">--></code>", then when the result
+   of serializing the element is parsed, the comment will be truncated a=
t that point and the rest of
+   the comment will be interpreted as markup. More examples would be mak=
ing a <code><a href=3D#the-script-element>script</a>&lt=
;/code>
+   element contain a <code><a href=3D#text>Text</a>&lt=
;/code> node with the text string "<code></script&am=
p;gt;</code>", or
+   having a <code><a href=3D#the-p-element>p</a></c=
ode> element that contains a <code><a href=3D#the-ul-element&=
gt;ul</a></code> element (as the <code><a href=3D#th=
e-ul-element>ul</a></code>
+   element's <a href=3D#syntax-start-tag title=3Dsyntax-start-tag>=
start tag</a> would imply the end tag for the
+   <code><a href=3D#the-p-element>p</a></code>).=
</p>
+
+   <p>This can enable cross-site scripting attacks. An example of =
this would be a page that lets the
+   user enter some font family names that are then inserted into a CSS &=
lt;code><a href=3D#the-style-element>style</a></code&gt=
; block via
+   the DOM and which then uses the <code title=3Ddom-innerHTML>&lt=
;a href=3D#dom-innerhtml>innerHTML</a></code> IDL attribut=
e to get
+   the HTML serialization of that <code><a href=3D#the-style-el=
ement>style</a></code> element: if the user enters
+   "<code></style><script>attack&=
amp;lt;/script></code>" as a font family name, <code=
 title=3Ddom-innerHTML><a href=3D#dom-innerhtml>innerHTML</a&=
gt;</code> will return markup that, if parsed in a different contex=
t,
+   would contain a <code><a href=3D#the-script-element>scrip=
t</a></code> node, even though no <code><a href=3D#t=
he-script-element>script</a></code> node existed in the
+   original DOM.</p>
+
+  </div>
+
+  <p><dfn id=3DescapingString>Escaping a string</dfn> =
(for the purposes of the algorithm above)
+  consists of running the following steps:</p>
+
+  <ol><li><p>Replace any occurrence of the "<c=
ode title=3D"">&</code>" character by the=
 string "<code title=3D"">&</code>=
".</li>
+
+   <li><p>Replace any occurrences of the U+00A0 NO-BREAK SPA=
CE character by the string "<code title=3D"">&am=
p;nbsp;</code>".</li>
+
+   <li><p>If the algorithm was invoked in the <i>attri=
bute mode</i>, replace any occurrences of the
+   "<code title=3D"">"</code>" char=
acter by the string "<code title=3D"">"=
</code>".</li>
+
+   <li><p>If the algorithm was <em>not</em> invo=
ked in the <i>attribute mode</i>, replace any
+   occurrences of the "<code title=3D""><&lt=
;/code>" character by the string "<code title=3D"&qu=
ot;><</code>", and any occurrences of the "=
<code title=3D"">></code>" character by
+   the string "<code title=3D"">></co=
de>".</li>
+
+  </ol><h3 id=3Dparsing-html-fragments><span class=3Dsecn=
o>12.4 </span>Parsing HTML fragments</h3>
+
+  <p>The following steps form the <dfn id=3Dhtml-fragment-parsi=
ng-algorithm>HTML fragment parsing algorithm</dfn>. The algorith=
m
+  optionally takes as input an <code><a href=3D#element>Elem=
ent</a></code> node, referred to as the <dfn id=3Dconcept-=
frag-parse-context title=3Dconcept-frag-parse-context><var>conte=
xt</var></dfn> element, which gives the context for
+  the parser, as well as <var title=3D"">input</var&g=
t;, a string to parse, and returns a list of zero or
+  more nodes.</p>
+
+  <p class=3Dnote>Parts marked <dfn id=3Dfragment-case>fragm=
ent case</dfn> in algorithms in the parser section are
+  parts that only occur if the parser was created for the purposes of th=
is algorithm (and with a
+  <var title=3Dconcept-frag-parse-context><a href=3D#concept-fr=
ag-parse-context>context</a></var> element). The algorithm=
s have been annotated
+  with such markings for informational purposes only; such markings have=
 no normative weight. If it
+  is possible for a condition described as a <a href=3D#fragment-case=
>fragment case</a> to occur even when the
+  parser wasn't created for the purposes of handling this algorithm, the=
n that is an error in the
+  specification.</p>
+
+  <ol><li>
+
+    <p>Create a new <code><a href=3D#document>Document=
</a></code> node, and mark it as being an <a href=3D#html-=
documents title=3D"HTML
+    documents">HTML document</a>.</p>
+
+   </li>
+
+   <li>
+
+    <p>If there is a <var title=3Dconcept-frag-parse-context&gt=
;<a href=3D#concept-frag-parse-context>context</a></var&gt=
; element, and the
+    <code><a href=3D#document>Document</a></code&gt=
; of the <var title=3Dconcept-frag-parse-context><a href=3D#conc=
ept-frag-parse-context>context</a></var> element is in
+    <a href=3D#quirks-mode>quirks mode</a>, then let the &lt=
;code><a href=3D#document>Document</a></code> be in =
<a href=3D#quirks-mode>quirks mode</a>.
+    Otherwise, if there is a <var title=3Dconcept-frag-parse-context&=
gt;<a href=3D#concept-frag-parse-context>context</a></var&=
gt; element, and the
+    <code><a href=3D#document>Document</a></code&gt=
; of the <var title=3Dconcept-frag-parse-context><a href=3D#conc=
ept-frag-parse-context>context</a></var> element is in
+    <a href=3D#limited-quirks-mode>limited-quirks mode</a>, =
then let the <code><a href=3D#document>Document</a><=
/code> be in <a href=3D#limited-quirks-mode>limited-quirks
+    mode</a>. Otherwise, leave the <code><a href=3D#docum=
ent>Document</a></code> in <a href=3D#no-quirks-mode&gt=
;no-quirks mode</a>.</p>
+
+   </li>
+
+   <li>
+
+    <p>Create a new <a href=3D#html-parser>HTML parser</a=
>, and associate it with the just created
+    <code><a href=3D#document>Document</a></code&gt=
; node.</p>
+
+   </li>
+
+   <li>
+
+    <p>If there is a <var title=3Dconcept-frag-parse-context&gt=
;<a href=3D#concept-frag-parse-context>context</a></var&gt=
; element, run these
+    substeps:</p>
+
+    <ol><li>
+
+      <p>Set the state of the <a href=3D#html-parser>HTML pa=
rser</a>'s <a href=3D#tokenization>tokenization</a> sta=
ge as
+      follows:</p>
+
+      <dl class=3Dswitch><dt>If it is a <code><a hr=
ef=3D#the-title-element>title</a></code> or <code>&l=
t;a href=3D#the-textarea-element>textarea</a></code> eleme=
nt</dt>
+
+       <dd>Switch the tokenizer to the <a href=3D#rcdata-state&=
gt;RCDATA state</a>.</dd>
+
+
+       <dt>If it is a <code><a href=3D#the-style-element&=
gt;style</a></code>, <code><a href=3D#xmp>xmp<=
/a></code>, <code><a href=3D#the-iframe-element>ifra=
me</a></code>,
+       <code><a href=3D#noembed>noembed</a></code&g=
t;, or <code><a href=3D#noframes>noframes</a></code&=
gt; element</dt>
+
+       <dd>Switch the tokenizer to the <a href=3D#rawtext-state=
>RAWTEXT state</a>.</dd>
+
+
+       <dt>If it is a <code><a href=3D#the-script-element=
>script</a></code> element</dt>
+
+       <dd>Switch the tokenizer to the <a href=3D#script-data-s=
tate>script data state</a>.</dd>
+
+
+       <dt>If it is a <code><a href=3D#the-noscript-eleme=
nt>noscript</a></code> element</dt>
+
+       <dd>If the <a href=3D#scripting-flag>scripting flag&l=
t;/a> is enabled, switch the tokenizer to the <a href=3D#rawtext-st=
ate>RAWTEXT
+       state</a>. Otherwise, leave the tokenizer in the <a href=
=3D#data-state>data state</a>.</dd>
+
+
+       <dt>If it is a <code><a href=3D#plaintext>plain=
text</a></code> element</dt>
+
+       <dd>Switch the tokenizer to the <a href=3D#plaintext-sta=
te>PLAINTEXT state</a>.</dd>
+
+
+       <dt>Otherwise</dt>
+
+       <dd>Leave the tokenizer in the <a href=3D#data-state>=
data state</a>.</dd>
+
+      </dl><p class=3Dnote>For performance reasons, an imple=
mentation that does not report errors and
+      that uses the actual state machine described in this specification=
 directly could use the
+      PLAINTEXT state instead of the RAWTEXT and script data states wher=
e those are mentioned in the
+      list above. Except for rules regarding parse errors, they are equi=
valent, since there is no
+      <a href=3D#appropriate-end-tag-token>appropriate end tag tok=
en</a> in the fragment case, yet they involve far fewer state
+      transitions.</p>
+
+     </li>
+
+     <li>
+
+      <p>Let <var title=3D"">root</var> be a=
 new <code><a href=3D#the-html-element>html</a></cod=
e> element with no attributes.</p>
+
+     </li>
+
+     <li>
+
+      <p>Append the element <var title=3D"">root&l=
t;/var> to the <code><a href=3D#document>Document</a&gt=
;</code> node created
+      above.</p>
+
+     </li>
+
+     <li>
+
+      <p>Set up the parser's <a href=3D#stack-of-open-elements&=
gt;stack of open elements</a> so that it contains just the single
+      element <var title=3D"">root</var>.</p&gt=
;
+
+     </li>
+
+     <li>
+
+      <p>If the <var title=3Dconcept-frag-parse-context><=
a href=3D#concept-frag-parse-context>context</a></var> ele=
ment is a
+      <code><a href=3D#the-template-element>template</a&g=
t;</code> element, push "<a href=3D#parsing-main-intemplate=
 title=3D"insertion mode: in template">in
+      template</a>" onto the <a href=3D#stack-of-template-=
insertion-modes>stack of template insertion modes</a> so that it=
 is the new
+      <a href=3D#current-template-insertion-mode>current template =
insertion mode</a>.</p>
+
+     </li>
+
+     <li>
+
+      <p><a href=3D#reset-the-insertion-mode-appropriately titl=
e=3D"reset the insertion mode appropriately">Reset the parse=
r's insertion mode
+      appropriately</a>.</p>
+
+      <p class=3Dnote>The parser will reference the <var title=3D=
concept-frag-parse-context><a href=3D#concept-frag-parse-context&gt=
;context</a></var> element as part of that algorithm.</p&g=
t;
+
+     </li>
+
+     <li>
+
+      <p>Set the parser's <a href=3D#form-element-pointer>&l=
t;code>form</code> element pointer</a> to the nearest node=
 to the
+      <var title=3Dconcept-frag-parse-context><a href=3D#concep=
t-frag-parse-context>context</a></var> element that is a &=
lt;code><a href=3D#the-form-element>form</a></code>
+      element (going straight up the ancestor chain, and including the e=
lement itself, if it is a
+      <code><a href=3D#the-form-element>form</a></c=
ode> element), or, if there is no such <code><a href=3D#the-f=
orm-element>form</a></code> element, to null.</p>
+
+     </li>
+
+    </ol></li>
+
+   <li>
+
+    <p>Place into the <a href=3D#input-stream>input stream&l=
t;/a> for the <a href=3D#html-parser>HTML parser</a> just =
created the
+    <var title=3D"">input</var>. The encoding <=
a href=3D#concept-encoding-confidence title=3Dconcept-encoding-confidence=
>confidence</a> is <i>irrelevant</i>.</p>
+
+   </li>
+
+   <li>
+
+    <p>Start the parser and let it run until it has consumed all t=
he characters just inserted into
+    the input stream.</p>
+
+   </li>
+
+   <li>
+
+    <p>If there is a <var title=3Dconcept-frag-parse-context&gt=
;<a href=3D#concept-frag-parse-context>context</a></var&gt=
; element, return the child
+    nodes of <var title=3D"">root</var>, in <a =
href=3D#tree-order>tree order</a>.</p>
+
+    <p>Otherwise, return the children of the <code><a hre=
f=3D#document>Document</a></code> object, in <a href=3D=
#tree-order>tree
+    order</a>.</p>
+
+   </li>
+
+  </ol></div>
+
+
+
+  <h3 id=3Dnamed-character-references><span class=3Dsecno>12=
.5 </span><dfn>Named character references</dfn></h3&=
gt;
+
+  <p>This table lists the character reference names that are suppo=
rted by HTML, and the code points
+  to which they refer. It is referenced by the previous sections.</p&=
gt;
+
+  <div id=3Dnamed-character-references-table>
+   <table><thead><tr><th> Name </th> <t=
h> Character(s) </th> <th> Glyph </th> <tbody>=
<tr id=3Dentity-Aacute><td> <code title=3D"">=
Aacute;</code> </td> <td> U+000C1 </td> <td&gt=
; <span class=3Dglyph title=3D"">Á</span&gt=
; </td> <tr id=3Dentity-Aacute-legacy class=3Dimpl><td>=
 <code title=3D"">Aacute</code> </td> <td&=
gt; U+000C1 </td> <td> <span title=3D"">&=
Aacute;</span> </td> </tr><!-- (invalid entity with =
missing semicolon for legacy support only) --><tr id=3Dentity-aacut=
e><td> <code title=3D"">aacute;</code> &lt=
;/td> <td> U+000E1 </td> <td> <span class=3Dglyph=
 title=3D"">á</span> </td> <tr id=3D=
entity-aacute-legacy class=3Dimpl><td> <code title=3D"&q=
uot;>aacute</code> </td> <td> U+000E1 </td> &l=
t;td> <span title=3D"">á</span> </=
td> </tr><!-- (invalid entity with missing semicolon for lega=
cy support only) --><tr id=3Dentity-Abreve><td> <code t=
itle=3D"">Abreve;</code> </td> <td> U+0010=
2 </td> <td> <span class=3Dglyph title=3D"">&=
amp;Abreve;</span> </td> <tr id=3Dentity-abreve><td&=
gt; <code title=3D"">abreve;</code> </td> &lt=
;td> U+00103 </td> <td> <span class=3Dglyph title=3D&qu=
ot;">ă</span> </td> <tr id=3Dentity-ac&=
gt;<td> <code title=3D"">ac;</code> </td&g=
t; <td> U+0223E </td> <td> <span class=3Dglyph title=
=3D"">∾</span> </td> <tr id=3Dentity-a=
cd><td> <code title=3D"">acd;</code> </=
td> <td> U+0223F </td> <td> <span class=3Dglyph t=
itle=3D"">∿</span> </td> <tr id=3Dent=
ity-acE><td> <code title=3D"">acE;</code> =
</td> <td> U+0223E U+00333 </td> <td> <span cl=
ass=3D"glyph compound" title=3D"">∾&#x3=
33;</span> </td> <tr id=3Dentity-Acirc><td> <c=
ode title=3D"">Acirc;</code> </td> <td> U+=
000C2 </td> <td> <span class=3Dglyph title=3D""&=
gt;Â</span> </td> <tr id=3Dentity-Acirc-legacy c=
lass=3Dimpl><td> <code title=3D"">Acirc</code=
> </td> <td> U+000C2 </td> <td> <span title=
=3D"">Â</span> </td> </tr><!-=
- (invalid entity with missing semicolon for legacy support only) -->&=
lt;tr id=3Dentity-acirc><td> <code title=3D"">ac=
irc;</code> </td> <td> U+000E2 </td> <td> &=
lt;span class=3Dglyph title=3D"">â</span> &l=
t;/td> <tr id=3Dentity-acirc-legacy class=3Dimpl><td> <=
code title=3D"">acirc</code> </td> <td> U+=
000E2 </td> <td> <span title=3D"">â=
</span> </td> </tr><!-- (invalid entity with missing=
 semicolon for legacy support only) --><tr id=3Dentity-acute>&lt=
;td> <code title=3D"">acute;</code> </td> =
<td> U+000B4 </td> <td> <span class=3Dglyph title=3D=
"">´</span> </td> <tr id=3Dentity-a=
cute-legacy class=3Dimpl><td> <code title=3D"">a=
cute</code> </td> <td> U+000B4 </td> <td> &=
lt;span title=3D"">´</span> </td> <=
/tr><!-- (invalid entity with missing semicolon for legacy support =
only) --><tr id=3Dentity-Acy><td> <code title=3D"&=
quot;>Acy;</code> </td> <td> U+00410 </td> &lt=
;td> <span class=3Dglyph title=3D"">А</span=
> </td> <tr id=3Dentity-acy><td> <code title=3D&q=
uot;">acy;</code> </td> <td> U+00430 </td&gt=
; <td> <span class=3Dglyph title=3D"">а<=
/span> </td> <tr id=3Dentity-AElig><td> <code tit=
le=3D"">AElig;</code> </td> <td> U+000C6 &=
lt;/td> <td> <span class=3Dglyph title=3D"">&amp=
;AElig;</span> </td> <tr id=3Dentity-AElig-legacy class=3D=
impl><td> <code title=3D"">AElig</code> &l=
t;/td> <td> U+000C6 </td> <td> <span title=3D&quo=
t;">Æ</span> </td> </tr><!-- (inva=
lid entity with missing semicolon for legacy support only) --><tr i=
d=3Dentity-aelig><td> <code title=3D"">aelig;&lt=
;/code> </td> <td> U+000E6 </td> <td> <span=
 class=3Dglyph title=3D"">æ</span> </td&g=
t; <tr id=3Dentity-aelig-legacy class=3Dimpl><td> <code ti=
tle=3D"">aelig</code> </td> <td> U+000E6 &=
lt;/td> <td> <span title=3D"">æ</sp=
an> </td> </tr><!-- (invalid entity with missing semico=
lon for legacy support only) --><tr id=3Dentity-af><td> &l=
t;code title=3D"">af;</code> </td> <td> U+=
02061 </td> <td> <span class=3Dglyph title=3D""&=
gt;⁡</span> </td> <tr id=3Dentity-Afr><td>=
 <code title=3D"">Afr;</code> </td> <td&gt=
; U+1D504 </td> <td> <span class=3Dglyph title=3D"&qu=
ot;>𝔄</span> </td> <tr id=3Dentity-afr><t=
d> <code title=3D"">afr;</code> </td> <=
td> U+1D51E </td> <td> <span class=3Dglyph title=3D&quo=
t;">𝔞</span> </td> <tr id=3Dentity-Agrave&=
gt;<td> <code title=3D"">Agrave;</code> </=
td> <td> U+000C0 </td> <td> <span class=3Dglyph t=
itle=3D"">À</span> </td> <tr id=3D=
entity-Agrave-legacy class=3Dimpl><td> <code title=3D"&q=
uot;>Agrave</code> </td> <td> U+000C0 </td> &l=
t;td> <span title=3D"">À</span> </=
td> </tr><!-- (invalid entity with missing semicolon for lega=
cy support only) --><tr id=3Dentity-agrave><td> <code t=
itle=3D"">agrave;</code> </td> <td> U+000E=
0 </td> <td> <span class=3Dglyph title=3D"">&=
amp;agrave;</span> </td> <tr id=3Dentity-agrave-legacy cla=
ss=3Dimpl><td> <code title=3D"">agrave</code&=
gt; </td> <td> U+000E0 </td> <td> <span title=3D=
"">à</span> </td> </tr><!-- =
(invalid entity with missing semicolon for legacy support only) -->&lt=
;tr id=3Dentity-alefsym><td> <code title=3D"">al=
efsym;</code> </td> <td> U+02135 </td> <td>=
 <span class=3Dglyph title=3D"">ℵ</span> =
</td> <tr id=3Dentity-aleph><td> <code title=3D&quot=
;">aleph;</code> </td> <td> U+02135 </td>=
 <td> <span class=3Dglyph title=3D"">ℵ&lt=
;/span> </td> <tr id=3Dentity-Alpha><td> <code ti=
tle=3D"">Alpha;</code> </td> <td> U+00391 =
</td> <td> <span class=3Dglyph title=3D"">&am=
p;Alpha;</span> </td> <tr id=3Dentity-alpha><td> =
<code title=3D"">alpha;</code> </td> <td&g=
t; U+003B1 </td> <td> <span class=3Dglyph title=3D"&q=
uot;>α</span> </td> <tr id=3Dentity-Amacr>=
<td> <code title=3D"">Amacr;</code> </td&g=
t; <td> U+00100 </td> <td> <span class=3Dglyph title=
=3D"">Ā</span> </td> <tr id=3Dentit=
y-amacr><td> <code title=3D"">amacr;</code&gt=
; </td> <td> U+00101 </td> <td> <span class=3D=
glyph title=3D"">ā</span> </td> <tr=
 id=3Dentity-amalg><td> <code title=3D"">amalg;&=
lt;/code> </td> <td> U+02A3F </td> <td> <sp=
an class=3Dglyph title=3D"">⨿</span> </td=
> <tr id=3Dentity-AMP><td> <code title=3D""&g=
t;AMP;</code> </td> <td> U+00026 </td> <td>=
 <span class=3Dglyph title=3D"">&</span> &l=
t;/td> <tr id=3Dentity-AMP-legacy class=3Dimpl><td> <co=
de title=3D"">AMP</code> </td> <td> U+0002=
6 </td> <td> <span title=3D"">&</s=
pan> </td> </tr><!-- (invalid entity with missing semic=
olon for legacy support only) --><tr id=3Dentity-amp><td> =
<code title=3D"">amp;</code> </td> <td>=
 U+00026 </td> <td> <span class=3Dglyph title=3D"&quo=
t;>&</span> </td> <tr id=3Dentity-amp-legacy cl=
ass=3Dimpl><td> <code title=3D"">amp</code&gt=
; </td> <td> U+00026 </td> <td> <span title=3D=
"">&</span> </td> </tr><!-- (in=
valid entity with missing semicolon for legacy support only) --><tr=
 id=3Dentity-And><td> <code title=3D"">And;</=
code> </td> <td> U+02A53 </td> <td> <span c=
lass=3Dglyph title=3D"">⩓</span> </td> &=
lt;tr id=3Dentity-and><td> <code title=3D"">and;=
</code> </td> <td> U+02227 </td> <td> <s=
pan class=3Dglyph title=3D"">∧</span> </t=
d> <tr id=3Dentity-andand><td> <code title=3D"&quo=
t;>andand;</code> </td> <td> U+02A55 </td> &lt=
;td> <span class=3Dglyph title=3D"">⩕</s=
pan> </td> <tr id=3Dentity-andd><td> <code title=3D=
"">andd;</code> </td> <td> U+02A5C </td=
> <td> <span class=3Dglyph title=3D"">⩜=
</span> </td> <tr id=3Dentity-andslope><td> <c=
ode title=3D"">andslope;</code> </td> <td>=
 U+02A58 </td> <td> <span class=3Dglyph title=3D"&quo=
t;>⩘</span> </td> <tr id=3Dentity-andv>=
<td> <code title=3D"">andv;</code> </td&gt=
; <td> U+02A5A </td> <td> <span class=3Dglyph title=3D=
"">⩚</span> </td> <tr id=3Dentity-an=
g><td> <code title=3D"">ang;</code> </t=
d> <td> U+02220 </td> <td> <span class=3Dglyph ti=
tle=3D"">∠</span> </td> <tr id=3Den=
tity-ange><td> <code title=3D"">ange;</code&g=
t; </td> <td> U+029A4 </td> <td> <span class=3D=
glyph title=3D"">⦤</span> </td> <tr =
id=3Dentity-angle><td> <code title=3D"">angle;&l=
t;/code> </td> <td> U+02220 </td> <td> <spa=
n class=3Dglyph title=3D"">∠</span> </td&=
gt; <tr id=3Dentity-angmsd><td> <code title=3D""=
>angmsd;</code> </td> <td> U+02221 </td> <t=
d> <span class=3Dglyph title=3D"">∡</spa=
n> </td> <tr id=3Dentity-angmsdaa><td> <code titl=
e=3D"">angmsdaa;</code> </td> <td> U+029A8=
 </td> <td> <span class=3Dglyph title=3D"">&a=
mp;angmsdaa;</span> </td> <tr id=3Dentity-angmsdab><=
td> <code title=3D"">angmsdab;</code> </td&gt=
; <td> U+029A9 </td> <td> <span class=3Dglyph title=3D=
"">⦩</span> </td> <tr id=3Dentit=
y-angmsdac><td> <code title=3D"">angmsdac;</c=
ode> </td> <td> U+029AA </td> <td> <span cl=
ass=3Dglyph title=3D"">⦪</span> </td&g=
t; <tr id=3Dentity-angmsdad><td> <code title=3D"&quot=
;>angmsdad;</code> </td> <td> U+029AB </td> &l=
t;td> <span class=3Dglyph title=3D"">⦫&lt=
;/span> </td> <tr id=3Dentity-angmsdae><td> <code=
 title=3D"">angmsdae;</code> </td> <td> U+=
029AC </td> <td> <span class=3Dglyph title=3D""&=
gt;⦬</span> </td> <tr id=3Dentity-angmsdaf&gt=
;<td> <code title=3D"">angmsdaf;</code> </=
td> <td> U+029AD </td> <td> <span class=3Dglyph t=
itle=3D"">⦭</span> </td> <tr id=3D=
entity-angmsdag><td> <code title=3D"">angmsdag;&=
lt;/code> </td> <td> U+029AE </td> <td> <sp=
an class=3Dglyph title=3D"">⦮</span> <=
/td> <tr id=3Dentity-angmsdah><td> <code title=3D"=
">angmsdah;</code> </td> <td> U+029AF </td&g=
t; <td> <span class=3Dglyph title=3D"">&angmsda=
h;</span> </td> <tr id=3Dentity-angrt><td> <co=
de title=3D"">angrt;</code> </td> <td> U+0=
221F </td> <td> <span class=3Dglyph title=3D""&g=
t;∟</span> </td> <tr id=3Dentity-angrtvb><=
td> <code title=3D"">angrtvb;</code> </td>=
 <td> U+022BE </td> <td> <span class=3Dglyph title=3D=
"">⊾</span> </td> <tr id=3Dentity=
-angrtvbd><td> <code title=3D"">angrtvbd;</co=
de> </td> <td> U+0299D </td> <td> <span cla=
ss=3Dglyph title=3D"">⦝</span> </td&gt=
; <tr id=3Dentity-angsph><td> <code title=3D""&g=
t;angsph;</code> </td> <td> U+02222 </td> <td&=
gt; <span class=3Dglyph title=3D"">∢</span&=
gt; </td> <tr id=3Dentity-angst><td> <code title=3D&=
quot;">angst;</code> </td> <td> U+000C5 </td=
> <td> <span class=3Dglyph title=3D"">&angst=
;</span> </td> <tr id=3Dentity-angzarr><td> <c=
ode title=3D"">angzarr;</code> </td> <td> =
U+0237C </td> <td> <span class=3Dglyph title=3D"&quot=
;>⍼</span> </td> <tr id=3Dentity-Aogon>&=
lt;td> <code title=3D"">Aogon;</code> </td&gt=
; <td> U+00104 </td> <td> <span class=3Dglyph title=3D=
"">Ą</span> </td> <tr id=3Dentity-a=
ogon><td> <code title=3D"">aogon;</code> &=
lt;/td> <td> U+00105 </td> <td> <span class=3Dgly=
ph title=3D"">ą</span> </td> <tr id=
=3Dentity-Aopf><td> <code title=3D"">Aopf;</c=
ode> </td> <td> U+1D538 </td> <td> <span cl=
ass=3Dglyph title=3D"">𝔸</span> </td> &=
lt;tr id=3Dentity-aopf><td> <code title=3D"">aop=
f;</code> </td> <td> U+1D552 </td> <td> &lt=
;span class=3Dglyph title=3D"">𝕒</span> </=
td> <tr id=3Dentity-ap><td> <code title=3D""&=
gt;ap;</code> </td> <td> U+02248 </td> <td>=
 <span class=3Dglyph title=3D"">≈</span> =
</td> <tr id=3Dentity-apacir><td> <code title=3D&quo=
t;">apacir;</code> </td> <td> U+02A6F </td&g=
t; <td> <span class=3Dglyph title=3D"">⩯=
</span> </td> <tr id=3Dentity-apE><td> <code t=
itle=3D"">apE;</code> </td> <td> U+02A70 &=
lt;/td> <td> <span class=3Dglyph title=3D"">&amp=
;apE;</span> </td> <tr id=3Dentity-ape><td> <c=
ode title=3D"">ape;</code> </td> <td> U+02=
24A </td> <td> <span class=3Dglyph title=3D""&gt=
;≊</span> </td> <tr id=3Dentity-apid><t=
d> <code title=3D"">apid;</code> </td> &lt=
;td> U+0224B </td> <td> <span class=3Dglyph title=3D&qu=
ot;">≋</span> </td> <tr id=3Dentity-apos&=
gt;<td> <code title=3D"">apos;</code> </td=
> <td> U+00027 </td> <td> <span class=3Dglyph tit=
le=3D"">'</span> </td> <tr id=3Dentity-ApplyF=
unction><td> <code title=3D"">ApplyFunction;<=
/code> </td> <td> U+02061 </td> <td> <span =
class=3Dglyph title=3D"">⁡</span> </td> &=
lt;tr id=3Dentity-approx><td> <code title=3D"">a=
pprox;</code> </td> <td> U+02248 </td> <td>=
 <span class=3Dglyph title=3D"">≈</span> =
</td> <tr id=3Dentity-approxeq><td> <code title=3D&q=
uot;">approxeq;</code> </td> <td> U+0224A </=
td> <td> <span class=3Dglyph title=3D"">&app=
roxeq;</span> </td> <tr id=3Dentity-Aring><td> &l=
t;code title=3D"">Aring;</code> </td> <td>=
 U+000C5 </td> <td> <span class=3Dglyph title=3D"&quo=
t;>Å</span> </td> <tr id=3Dentity-Aring-legac=
y class=3Dimpl><td> <code title=3D"">Aring</c=
ode> </td> <td> U+000C5 </td> <td> <span ti=
tle=3D"">Å</span> </td> </tr>&lt=
;!-- (invalid entity with missing semicolon for legacy support only) --&g=
t;<tr id=3Dentity-aring><td> <code title=3D""&gt=
;aring;</code> </td> <td> U+000E5 </td> <td&gt=
; <span class=3Dglyph title=3D"">å</span>=
 </td> <tr id=3Dentity-aring-legacy class=3Dimpl><td> &=
lt;code title=3D"">aring</code> </td> <td>=
 U+000E5 </td> <td> <span title=3D"">&ari=
ng;</span> </td> </tr><!-- (invalid entity with miss=
ing semicolon for legacy support only) --><tr id=3Dentity-Ascr>&=
lt;td> <code title=3D"">Ascr;</code> </td>=
 <td> U+1D49C </td> <td> <span class=3Dglyph title=3D=
"">𝒜</span> </td> <tr id=3Dentity-as=
cr><td> <code title=3D"">ascr;</code> <=
/td> <td> U+1D4B6 </td> <td> <span class=3Dglyph =
title=3D"">𝒶</span> </td> <tr id=3De=
ntity-Assign><td> <code title=3D"">Assign;</c=
ode> </td> <td> U+02254 </td> <td> <span cl=
ass=3Dglyph title=3D"">≔</span> </td&gt=
; <tr id=3Dentity-ast><td> <code title=3D"">a=
st;</code> </td> <td> U+0002A </td> <td> &l=
t;span class=3Dglyph title=3D"">*</span> </td> &=
lt;tr id=3Dentity-asymp><td> <code title=3D"">as=
ymp;</code> </td> <td> U+02248 </td> <td> &=
lt;span class=3Dglyph title=3D"">≈</span> &l=
t;/td> <tr id=3Dentity-asympeq><td> <code title=3D&quot=
;">asympeq;</code> </td> <td> U+0224D </td&g=
t; <td> <span class=3Dglyph title=3D"">&asympeq=
;</span> </td> <tr id=3Dentity-Atilde><td> <co=
de title=3D"">Atilde;</code> </td> <td> U+=
000C3 </td> <td> <span class=3Dglyph title=3D""&=
gt;Ã</span> </td> <tr id=3Dentity-Atilde-legacy=
 class=3Dimpl><td> <code title=3D"">Atilde</c=
ode> </td> <td> U+000C3 </td> <td> <span ti=
tle=3D"">Ã</span> </td> </tr>&l=
t;!-- (invalid entity with missing semicolon for legacy support only) --&=
gt;<tr id=3Dentity-atilde><td> <code title=3D""&=
gt;atilde;</code> </td> <td> U+000E3 </td> <td=
> <span class=3Dglyph title=3D"">ã</span=
> </td> <tr id=3Dentity-atilde-legacy class=3Dimpl><td&=
gt; <code title=3D"">atilde</code> </td> <=
td> U+000E3 </td> <td> <span title=3D"">&a=
mp;atilde;</span> </td> </tr><!-- (invalid entity wi=
th missing semicolon for legacy support only) --><tr id=3Dentity-Au=
ml><td> <code title=3D"">Auml;</code> <=
/td> <td> U+000C4 </td> <td> <span class=3Dglyph =
title=3D"">Ä</span> </td> <tr id=3De=
ntity-Auml-legacy class=3Dimpl><td> <code title=3D"&quot=
;>Auml</code> </td> <td> U+000C4 </td> <td&=
gt; <span title=3D"">Ä</span> </td> =
</tr><!-- (invalid entity with missing semicolon for legacy supp=
ort only) --><tr id=3Dentity-auml><td> <code title=3D&q=
uot;">auml;</code> </td> <td> U+000E4 </td&g=
t; <td> <span class=3Dglyph title=3D"">ä&l=
t;/span> </td> <tr id=3Dentity-auml-legacy class=3Dimpl>&l=
t;td> <code title=3D"">auml</code> </td> &=
lt;td> U+000E4 </td> <td> <span title=3D""&gt=
;ä</span> </td> </tr><!-- (invalid entity w=
ith missing semicolon for legacy support only) --><tr id=3Dentity-a=
wconint><td> <code title=3D"">awconint;</code=
> </td> <td> U+02233 </td> <td> <span class=
=3Dglyph title=3D"">∳</span> </td> =
<tr id=3Dentity-awint><td> <code title=3D"">a=
wint;</code> </td> <td> U+02A11 </td> <td> =
<span class=3Dglyph title=3D"">⨑</span> &=
lt;/td> <tr id=3Dentity-backcong><td> <code title=3D&qu=
ot;">backcong;</code> </td> <td> U+0224C </t=
d> <td> <span class=3Dglyph title=3D"">&bcon=
g;</span> </td> <tr id=3Dentity-backepsilon><td> =
<code title=3D"">backepsilon;</code> </td> &l=
t;td> U+003F6 </td> <td> <span class=3Dglyph title=3D&q=
uot;">϶</span> </td> <tr id=3Denti=
ty-backprime><td> <code title=3D"">backprime;&lt=
;/code> </td> <td> U+02035 </td> <td> <span=
 class=3Dglyph title=3D"">‵</span> </td&=
gt; <tr id=3Dentity-backsim><td> <code title=3D"&quot=
;>backsim;</code> </td> <td> U+0223D </td> &lt=
;td> <span class=3Dglyph title=3D"">∽</=
span> </td> <tr id=3Dentity-backsimeq><td> <code =
title=3D"">backsimeq;</code> </td> <td> U+=
022CD </td> <td> <span class=3Dglyph title=3D""&=
gt;⋍</span> </td> <tr id=3Dentity-Backslash&=
gt;<td> <code title=3D"">Backslash;</code> &l=
t;/td> <td> U+02216 </td> <td> <span class=3Dglyp=
h title=3D"">∖</span> </td> &l=
t;tr id=3Dentity-Barv><td> <code title=3D"">Barv=
;</code> </td> <td> U+02AE7 </td> <td> <=
span class=3Dglyph title=3D"">⫧</span> </t=
d> <tr id=3Dentity-barvee><td> <code title=3D"&quo=
t;>barvee;</code> </td> <td> U+022BD </td> &lt=
;td> <span class=3Dglyph title=3D"">⊽</s=
pan> </td> <tr id=3Dentity-Barwed><td> <code titl=
e=3D"">Barwed;</code> </td> <td> U+02306 &=
lt;/td> <td> <span class=3Dglyph title=3D"">&amp=
;doublebarwedge;</span> </td> <tr id=3Dentity-barwed>&l=
t;td> <code title=3D"">barwed;</code> </td&gt=
; <td> U+02305 </td> <td> <span class=3Dglyph title=3D=
"">⌅</span> </td> <tr id=3Dentit=
y-barwedge><td> <code title=3D"">barwedge;</c=
ode> </td> <td> U+02305 </td> <td> <span cl=
ass=3Dglyph title=3D"">⌅</span> </td&g=
t; <tr id=3Dentity-bbrk><td> <code title=3D""&gt=
;bbrk;</code> </td> <td> U+023B5 </td> <td>=
 <span class=3Dglyph title=3D"">⎵</span> &=
lt;/td> <tr id=3Dentity-bbrktbrk><td> <code title=3D&qu=
ot;">bbrktbrk;</code> </td> <td> U+023B6 </t=
d> <td> <span class=3Dglyph title=3D"">&bbrk=
tbrk;</span> </td> <tr id=3Dentity-bcong><td> &lt=
;code title=3D"">bcong;</code> </td> <td> =
U+0224C </td> <td> <span class=3Dglyph title=3D"&quot=
;>≌</span> </td> <tr id=3Dentity-Bcy><t=
d> <code title=3D"">Bcy;</code> </td> <=
td> U+00411 </td> <td> <span class=3Dglyph title=3D&quo=
t;">Б</span> </td> <tr id=3Dentity-bcy>=
<td> <code title=3D"">bcy;</code> </td>=
 <td> U+00431 </td> <td> <span class=3Dglyph title=3D=
"">б</span> </td> <tr id=3Dentity-bdq=
uo><td> <code title=3D"">bdquo;</code> &lt=
;/td> <td> U+0201E </td> <td> <span class=3Dglyph=
 title=3D"">„</span> </td> <tr id=3D=
entity-becaus><td> <code title=3D"">becaus;</=
code> </td> <td> U+02235 </td> <td> <span c=
lass=3Dglyph title=3D"">∵</span> </td&gt=
; <tr id=3Dentity-Because><td> <code title=3D""&=
gt;Because;</code> </td> <td> U+02235 </td> <t=
d> <span class=3Dglyph title=3D"">∵</spa=
n> </td> <tr id=3Dentity-because><td> <code title=
=3D"">because;</code> </td> <td> U+02235 &=
lt;/td> <td> <span class=3Dglyph title=3D"">&amp=
;becaus;</span> </td> <tr id=3Dentity-bemptyv><td&gt=
; <code title=3D"">bemptyv;</code> </td> <=
td> U+029B0 </td> <td> <span class=3Dglyph title=3D&quo=
t;">⦰</span> </td> <tr id=3Dentity-bep=
si><td> <code title=3D"">bepsi;</code> &lt=
;/td> <td> U+003F6 </td> <td> <span class=3Dglyph=
 title=3D"">϶</span> </td> <t=
r id=3Dentity-bernou><td> <code title=3D"">berno=
u;</code> </td> <td> U+0212C </td> <td> &lt=
;span class=3Dglyph title=3D"">ℬ</span> &lt=
;/td> <tr id=3Dentity-Bernoullis><td> <code title=3D&qu=
ot;">Bernoullis;</code> </td> <td> U+0212C <=
/td> <td> <span class=3Dglyph title=3D"">&be=
rnou;</span> </td> <tr id=3Dentity-Beta><td> <=
code title=3D"">Beta;</code> </td> <td> U+=
00392 </td> <td> <span class=3Dglyph title=3D""&=
gt;Β</span> </td> <tr id=3Dentity-beta><td&=
gt; <code title=3D"">beta;</code> </td> <t=
d> U+003B2 </td> <td> <span class=3Dglyph title=3D&quot=
;">β</span> </td> <tr id=3Dentity-beth&gt=
;<td> <code title=3D"">beth;</code> </td&g=
t; <td> U+02136 </td> <td> <span class=3Dglyph title=
=3D"">ℶ</span> </td> <tr id=3Dentity=
-between><td> <code title=3D"">between;</code=
> </td> <td> U+0226C </td> <td> <span class=
=3Dglyph title=3D"">≬</span> </td> &=
lt;tr id=3Dentity-Bfr><td> <code title=3D"">Bfr;=
</code> </td> <td> U+1D505 </td> <td> <s=
pan class=3Dglyph title=3D"">𝔅</span> </td&=
gt; <tr id=3Dentity-bfr><td> <code title=3D""&gt=
;bfr;</code> </td> <td> U+1D51F </td> <td> =
<span class=3Dglyph title=3D"">𝔟</span> &lt=
;/td> <tr id=3Dentity-bigcap><td> <code title=3D"&=
quot;>bigcap;</code> </td> <td> U+022C2 </td> =
<td> <span class=3Dglyph title=3D"">⋂&lt=
;/span> </td> <tr id=3Dentity-bigcirc><td> <code =
title=3D"">bigcirc;</code> </td> <td> U+02=
5EF </td> <td> <span class=3Dglyph title=3D""&gt=
;◯</span> </td> <tr id=3Dentity-bigcup><td=
> <code title=3D"">bigcup;</code> </td> &l=
t;td> U+022C3 </td> <td> <span class=3Dglyph title=3D&q=
uot;">⋃</span> </td> <tr id=3Dentity-bigo=
dot><td> <code title=3D"">bigodot;</code> =
</td> <td> U+02A00 </td> <td> <span class=3Dgl=
yph title=3D"">⨀</span> </td> <tr=
 id=3Dentity-bigoplus><td> <code title=3D"">bigo=
plus;</code> </td> <td> U+02A01 </td> <td> =
<span class=3Dglyph title=3D"">⨁</span&gt=
; </td> <tr id=3Dentity-bigotimes><td> <code title=3D=
"">bigotimes;</code> </td> <td> U+02A02 &l=
t;/td> <td> <span class=3Dglyph title=3D"">&=
xotime;</span> </td> <tr id=3Dentity-bigsqcup><td&gt=
; <code title=3D"">bigsqcup;</code> </td> &lt=
;td> U+02A06 </td> <td> <span class=3Dglyph title=3D&qu=
ot;">⨆</span> </td> <tr id=3Dentity-b=
igstar><td> <code title=3D"">bigstar;</code&g=
t; </td> <td> U+02605 </td> <td> <span class=3D=
glyph title=3D"">★</span> </td> <=
tr id=3Dentity-bigtriangledown><td> <code title=3D"&quot=
;>bigtriangledown;</code> </td> <td> U+025BD </td=
> <td> <span class=3Dglyph title=3D"">&xdtri=
;</span> </td> <tr id=3Dentity-bigtriangleup><td>=
 <code title=3D"">bigtriangleup;</code> </td>=
 <td> U+025B3 </td> <td> <span class=3Dglyph title=3D=
"">△</span> </td> <tr id=3D=
entity-biguplus><td> <code title=3D"">biguplus;&=
lt;/code> </td> <td> U+02A04 </td> <td> <sp=
an class=3Dglyph title=3D"">⨄</span> </t=
d> <tr id=3Dentity-bigvee><td> <code title=3D"&quo=
t;>bigvee;</code> </td> <td> U+022C1 </td> &lt=
;td> <span class=3Dglyph title=3D"">⋁</s=
pan> </td> <tr id=3Dentity-bigwedge><td> <code ti=
tle=3D"">bigwedge;</code> </td> <td> U+022=
C0 </td> <td> <span class=3Dglyph title=3D"">=
⋀</span> </td> <tr id=3Dentity-bkarow><td=
> <code title=3D"">bkarow;</code> </td> &l=
t;td> U+0290D </td> <td> <span class=3Dglyph title=3D&q=
uot;">⤍</span> </td> <tr id=3Dentity-bla=
cklozenge><td> <code title=3D"">blacklozenge;&lt=
;/code> </td> <td> U+029EB </td> <td> <span=
 class=3Dglyph title=3D"">⧫</span> </td&gt=
; <tr id=3Dentity-blacksquare><td> <code title=3D"&qu=
ot;>blacksquare;</code> </td> <td> U+025AA </td&g=
t; <td> <span class=3Dglyph title=3D"">&blacksq=
uare;</span> </td> <tr id=3Dentity-blacktriangle><td=
> <code title=3D"">blacktriangle;</code> </td=
> <td> U+025B4 </td> <td> <span class=3Dglyph tit=
le=3D"">▴</span> </td> <tr id=3Dent=
ity-blacktriangledown><td> <code title=3D"">blac=
ktriangledown;</code> </td> <td> U+025BE </td> &l=
t;td> <span class=3Dglyph title=3D"">&blacktriangl=
edown;</span> </td> <tr id=3Dentity-blacktriangleleft>&=
lt;td> <code title=3D"">blacktriangleleft;</code&gt=
; </td> <td> U+025C2 </td> <td> <span class=3D=
glyph title=3D"">◂</span> </t=
d> <tr id=3Dentity-blacktriangleright><td> <code title=3D=
"">blacktriangleright;</code> </td> <td> U=
+025B8 </td> <td> <span class=3Dglyph title=3D""=
>▸</span> </td> <tr id=3Dentity-=
blank><td> <code title=3D"">blank;</code> =
</td> <td> U+02423 </td> <td> <span class=3Dgl=
yph title=3D"">␣</span> </td> <tr i=
d=3Dentity-blk12><td> <code title=3D"">blk12;&lt=
;/code> </td> <td> U+02592 </td> <td> <span=
 class=3Dglyph title=3D"">▒</span> </td&g=
t; <tr id=3Dentity-blk14><td> <code title=3D""&g=
t;blk14;</code> </td> <td> U+02591 </td> <td&g=
t; <span class=3Dglyph title=3D"">░</span&gt=
; </td> <tr id=3Dentity-blk34><td> <code title=3D&qu=
ot;">blk34;</code> </td> <td> U+02593 </td&g=
t; <td> <span class=3Dglyph title=3D"">▓&=
lt;/span> </td> <tr id=3Dentity-block><td> <code =
title=3D"">block;</code> </td> <td> U+0258=
8 </td> <td> <span class=3Dglyph title=3D"">&=
amp;block;</span> </td> <tr id=3Dentity-bne><td> =
<code title=3D"">bne;</code> </td> <td>=
 U+0003D U+020E5 </td> <td> <span class=3D"glyph comp=
ound" title=3D"">=3D⃥</span> </td&g=
t; <tr id=3Dentity-bnequiv><td> <code title=3D""=
>bnequiv;</code> </td> <td> U+02261 U+020E5 </td&=
gt; <td> <span class=3D"glyph compound" title=3D"=
">≡⃥</span> </td> <tr id=3Den=
tity-bNot><td> <code title=3D"">bNot;</code&g=
t; </td> <td> U+02AED </td> <td> <span class=3D=
glyph title=3D"">⫭</span> </td> <tr =
id=3Dentity-bnot><td> <code title=3D"">bnot;<=
/code> </td> <td> U+02310 </td> <td> <span =
class=3Dglyph title=3D"">⌐</span> </td>=
 <tr id=3Dentity-Bopf><td> <code title=3D"">B=
opf;</code> </td> <td> U+1D539 </td> <td> &=
lt;span class=3Dglyph title=3D"">𝔹</span> &lt=
;/td> <tr id=3Dentity-bopf><td> <code title=3D"&qu=
ot;>bopf;</code> </td> <td> U+1D553 </td> <=
td> <span class=3Dglyph title=3D"">𝕓</span=
> </td> <tr id=3Dentity-bot><td> <code title=3D&q=
uot;">bot;</code> </td> <td> U+022A5 </td&gt=
; <td> <span class=3Dglyph title=3D"">⊥&=
lt;/span> </td> <tr id=3Dentity-bottom><td> <code=
 title=3D"">bottom;</code> </td> <td> U+02=
2A5 </td> <td> <span class=3Dglyph title=3D""&gt=
;⊥</span> </td> <tr id=3Dentity-bowtie><t=
d> <code title=3D"">bowtie;</code> </td> &=
lt;td> U+022C8 </td> <td> <span class=3Dglyph title=3D&=
quot;">⋈</span> </td> <tr id=3Dentity-b=
oxbox><td> <code title=3D"">boxbox;</code>=
 </td> <td> U+029C9 </td> <td> <span class=3Dg=
lyph title=3D"">⧉</span> </td> <tr=
 id=3Dentity-boxDL><td> <code title=3D"">boxDL;&=
lt;/code> </td> <td> U+02557 </td> <td> <sp=
an class=3Dglyph title=3D"">╗</span> </td=
> <tr id=3Dentity-boxDl><td> <code title=3D""=
>boxDl;</code> </td> <td> U+02556 </td> <td=
> <span class=3Dglyph title=3D"">╖</span&=
gt; </td> <tr id=3Dentity-boxdL><td> <code title=3D&=
quot;">boxdL;</code> </td> <td> U+02555 </td=
> <td> <span class=3Dglyph title=3D"">&boxdL=
;</span> </td> <tr id=3Dentity-boxdl><td> <cod=
e title=3D"">boxdl;</code> </td> <td> U+02=
510 </td> <td> <span class=3Dglyph title=3D""&gt=
;┐</span> </td> <tr id=3Dentity-boxDR><td&=
gt; <code title=3D"">boxDR;</code> </td> <=
td> U+02554 </td> <td> <span class=3Dglyph title=3D&quo=
t;">╔</span> </td> <tr id=3Dentity-boxDr=
><td> <code title=3D"">boxDr;</code> </=
td> <td> U+02553 </td> <td> <span class=3Dglyph t=
itle=3D"">╓</span> </td> <tr id=3De=
ntity-boxdR><td> <code title=3D"">boxdR;</cod=
e> </td> <td> U+02552 </td> <td> <span clas=
s=3Dglyph title=3D"">╒</span> </td> &l=
t;tr id=3Dentity-boxdr><td> <code title=3D"">box=
dr;</code> </td> <td> U+0250C </td> <td> &l=
t;span class=3Dglyph title=3D"">┌</span> &lt=
;/td> <tr id=3Dentity-boxH><td> <code title=3D"&qu=
ot;>boxH;</code> </td> <td> U+02550 </td> <=
td> <span class=3Dglyph title=3D"">═</span=
> </td> <tr id=3Dentity-boxh><td> <code title=3D&=
quot;">boxh;</code> </td> <td> U+02500 </td&=
gt; <td> <span class=3Dglyph title=3D"">─&=
lt;/span> </td> <tr id=3Dentity-boxHD><td> <code =
title=3D"">boxHD;</code> </td> <td> U+0256=
6 </td> <td> <span class=3Dglyph title=3D"">&=
amp;boxHD;</span> </td> <tr id=3Dentity-boxHd><td&gt=
; <code title=3D"">boxHd;</code> </td> <td=
> U+02564 </td> <td> <span class=3Dglyph title=3D"=
">╤</span> </td> <tr id=3Dentity-boxhD&g=
t;<td> <code title=3D"">boxhD;</code> </td=
> <td> U+02565 </td> <td> <span class=3Dglyph tit=
le=3D"">╥</span> </td> <tr id=3Dent=
ity-boxhd><td> <code title=3D"">boxhd;</code&=
gt; </td> <td> U+0252C </td> <td> <span class=3D=
glyph title=3D"">┬</span> </td> <tr=
 id=3Dentity-boxHU><td> <code title=3D"">boxHU;&=
lt;/code> </td> <td> U+02569 </td> <td> <sp=
an class=3Dglyph title=3D"">╩</span> </td=
> <tr id=3Dentity-boxHu><td> <code title=3D""=
>boxHu;</code> </td> <td> U+02567 </td> <td=
> <span class=3Dglyph title=3D"">╧</span&=
gt; </td> <tr id=3Dentity-boxhU><td> <code title=3D&=
quot;">boxhU;</code> </td> <td> U+02568 </td=
> <td> <span class=3Dglyph title=3D"">&boxhU=
;</span> </td> <tr id=3Dentity-boxhu><td> <cod=
e title=3D"">boxhu;</code> </td> <td> U+02=
534 </td> <td> <span class=3Dglyph title=3D""&gt=
;┴</span> </td> <tr id=3Dentity-boxminus><=
td> <code title=3D"">boxminus;</code> </td&gt=
; <td> U+0229F </td> <td> <span class=3Dglyph title=3D=
"">⊟</span> </td> <tr id=3Dentity-=
boxplus><td> <code title=3D"">boxplus;</code&=
gt; </td> <td> U+0229E </td> <td> <span class=3D=
glyph title=3D"">⊞</span> </td> <=
tr id=3Dentity-boxtimes><td> <code title=3D"">bo=
xtimes;</code> </td> <td> U+022A0 </td> <td&gt=
; <span class=3Dglyph title=3D"">⊠</span&gt=
; </td> <tr id=3Dentity-boxUL><td> <code title=3D&qu=
ot;">boxUL;</code> </td> <td> U+0255D </td&g=
t; <td> <span class=3Dglyph title=3D"">╝&=
lt;/span> </td> <tr id=3Dentity-boxUl><td> <code =
title=3D"">boxUl;</code> </td> <td> U+0255=
C </td> <td> <span class=3Dglyph title=3D"">&=
amp;boxUl;</span> </td> <tr id=3Dentity-boxuL><td&gt=
; <code title=3D"">boxuL;</code> </td> <td=
> U+0255B </td> <td> <span class=3Dglyph title=3D"=
">╛</span> </td> <tr id=3Dentity-boxul&g=
t;<td> <code title=3D"">boxul;</code> </td=
> <td> U+02518 </td> <td> <span class=3Dglyph tit=
le=3D"">┘</span> </td> <tr id=3Dent=
ity-boxUR><td> <code title=3D"">boxUR;</code&=
gt; </td> <td> U+0255A </td> <td> <span class=3D=
glyph title=3D"">╚</span> </td> <tr=
 id=3Dentity-boxUr><td> <code title=3D"">boxUr;&=
lt;/code> </td> <td> U+02559 </td> <td> <sp=
an class=3Dglyph title=3D"">╙</span> </td=
> <tr id=3Dentity-boxuR><td> <code title=3D""=
>boxuR;</code> </td> <td> U+02558 </td> <td=
> <span class=3Dglyph title=3D"">╘</span&=
gt; </td> <tr id=3Dentity-boxur><td> <code title=3D&=
quot;">boxur;</code> </td> <td> U+02514 </td=
> <td> <span class=3Dglyph title=3D"">&boxur=
;</span> </td> <tr id=3Dentity-boxV><td> <code=
 title=3D"">boxV;</code> </td> <td> U+0255=
1 </td> <td> <span class=3Dglyph title=3D"">&=
amp;boxV;</span> </td> <tr id=3Dentity-boxv><td> =
<code title=3D"">boxv;</code> </td> <td&gt=
; U+02502 </td> <td> <span class=3Dglyph title=3D"&qu=
ot;>│</span> </td> <tr id=3Dentity-boxVH>&l=
t;td> <code title=3D"">boxVH;</code> </td>=
 <td> U+0256C </td> <td> <span class=3Dglyph title=3D=
"">╬</span> </td> <tr id=3Dentity-b=
oxVh><td> <code title=3D"">boxVh;</code> &=
lt;/td> <td> U+0256B </td> <td> <span class=3Dgly=
ph title=3D"">╫</span> </td> <tr id=
=3Dentity-boxvH><td> <code title=3D"">boxvH;<=
/code> </td> <td> U+0256A </td> <td> <span =
class=3Dglyph title=3D"">╪</span> </td&gt=
; <tr id=3Dentity-boxvh><td> <code title=3D""&gt=
;boxvh;</code> </td> <td> U+0253C </td> <td&gt=
; <span class=3Dglyph title=3D"">┼</span>=
 </td> <tr id=3Dentity-boxVL><td> <code title=3D&quo=
t;">boxVL;</code> </td> <td> U+02563 </td&gt=
; <td> <span class=3Dglyph title=3D"">╣&l=
t;/span> </td> <tr id=3Dentity-boxVl><td> <code t=
itle=3D"">boxVl;</code> </td> <td> U+02562=
 </td> <td> <span class=3Dglyph title=3D"">&a=
mp;boxVl;</span> </td> <tr id=3Dentity-boxvL><td>=
 <code title=3D"">boxvL;</code> </td> <td&=
gt; U+02561 </td> <td> <span class=3Dglyph title=3D"&=
quot;>╡</span> </td> <tr id=3Dentity-boxvl&gt=
;<td> <code title=3D"">boxvl;</code> </td&=
gt; <td> U+02524 </td> <td> <span class=3Dglyph titl=
e=3D"">┤</span> </td> <tr id=3Denti=
ty-boxVR><td> <code title=3D"">boxVR;</code&g=
t; </td> <td> U+02560 </td> <td> <span class=3D=
glyph title=3D"">╠</span> </td> <tr=
 id=3Dentity-boxVr><td> <code title=3D"">boxVr;&=
lt;/code> </td> <td> U+0255F </td> <td> <sp=
an class=3Dglyph title=3D"">╟</span> </td=
> <tr id=3Dentity-boxvR><td> <code title=3D""=
>boxvR;</code> </td> <td> U+0255E </td> <td=
> <span class=3Dglyph title=3D"">╞</span&=
gt; </td> <tr id=3Dentity-boxvr><td> <code title=3D&=
quot;">boxvr;</code> </td> <td> U+0251C </td=
> <td> <span class=3Dglyph title=3D"">&boxvr=
;</span> </td> <tr id=3Dentity-bprime><td> <co=
de title=3D"">bprime;</code> </td> <td> U+=
02035 </td> <td> <span class=3Dglyph title=3D""&=
gt;‵</span> </td> <tr id=3Dentity-Breve><=
td> <code title=3D"">Breve;</code> </td> &=
lt;td> U+002D8 </td> <td> <span class=3Dglyph title=3D&=
quot;">˘</span> </td> <tr id=3Dentity-br=
eve><td> <code title=3D"">breve;</code> &l=
t;/td> <td> U+002D8 </td> <td> <span class=3Dglyp=
h title=3D"">˘</span> </td> <tr id=3D=
entity-brvbar><td> <code title=3D"">brvbar;</=
code> </td> <td> U+000A6 </td> <td> <span c=
lass=3Dglyph title=3D"">¦</span> </td&gt=
; <tr id=3Dentity-brvbar-legacy class=3Dimpl><td> <code ti=
tle=3D"">brvbar</code> </td> <td> U+000A6 =
</td> <td> <span title=3D"">¦</=
span> </td> </tr><!-- (invalid entity with missing semi=
colon for legacy support only) --><tr id=3Dentity-Bscr><td&gt=
; <code title=3D"">Bscr;</code> </td> <td&=
gt; U+0212C </td> <td> <span class=3Dglyph title=3D"&=
quot;>ℬ</span> </td> <tr id=3Dentity-bscr&gt=
;<td> <code title=3D"">bscr;</code> </td&g=
t; <td> U+1D4B7 </td> <td> <span class=3Dglyph title=
=3D"">𝒷</span> </td> <tr id=3Dentity=
-bsemi><td> <code title=3D"">bsemi;</code>=
 </td> <td> U+0204F </td> <td> <span class=3Dg=
lyph title=3D"">⁏</span> </td> <tr =
id=3Dentity-bsim><td> <code title=3D"">bsim;<=
/code> </td> <td> U+0223D </td> <td> <span =
class=3Dglyph title=3D"">∽</span> </td&=
gt; <tr id=3Dentity-bsime><td> <code title=3D""&=
gt;bsime;</code> </td> <td> U+022CD </td> <td&=
gt; <span class=3Dglyph title=3D"">⋍</sp=
an> </td> <tr id=3Dentity-bsol><td> <code title=3D=
"">bsol;</code> </td> <td> U+0005C </td=
> <td> <span class=3Dglyph title=3D"">\</span=
> </td> <tr id=3Dentity-bsolb><td> <code title=3D=
"">bsolb;</code> </td> <td> U+029C5 </t=
d> <td> <span class=3Dglyph title=3D"">&bsol=
b;</span> </td> <tr id=3Dentity-bsolhsub><td> &lt=
;code title=3D"">bsolhsub;</code> </td> <td&g=
t; U+027C8 </td> <td> <span class=3Dglyph title=3D"&q=
uot;>⟈</span> </td> <tr id=3Dentity-bull&g=
t;<td> <code title=3D"">bull;</code> </td&=
gt; <td> U+02022 </td> <td> <span class=3Dglyph titl=
e=3D"">•</span> </td> <tr id=3Dent=
ity-bullet><td> <code title=3D"">bullet;</cod=
e> </td> <td> U+02022 </td> <td> <span clas=
s=3Dglyph title=3D"">•</span> </td> &=
lt;tr id=3Dentity-bump><td> <code title=3D"">bum=
p;</code> </td> <td> U+0224E </td> <td> &lt=
;span class=3Dglyph title=3D"">≎</span> </=
td> <tr id=3Dentity-bumpE><td> <code title=3D"&quo=
t;>bumpE;</code> </td> <td> U+02AAE </td> <=
td> <span class=3Dglyph title=3D"">⪮</spa=
n> </td> <tr id=3Dentity-bumpe><td> <code title=3D=
"">bumpe;</code> </td> <td> U+0224F </t=
d> <td> <span class=3Dglyph title=3D"">&bump=
eq;</span> </td> <tr id=3Dentity-Bumpeq><td> <=
code title=3D"">Bumpeq;</code> </td> <td> =
U+0224E </td> <td> <span class=3Dglyph title=3D"&quot=
;>≎</span> </td> <tr id=3Dentity-bumpeq>&lt=
;td> <code title=3D"">bumpeq;</code> </td>=
 <td> U+0224F </td> <td> <span class=3Dglyph title=3D=
"">≏</span> </td> <tr id=3Dentity-=
Cacute><td> <code title=3D"">Cacute;</code&gt=
; </td> <td> U+00106 </td> <td> <span class=3D=
glyph title=3D"">Ć</span> </td> <t=
r id=3Dentity-cacute><td> <code title=3D"">cacut=
e;</code> </td> <td> U+00107 </td> <td> &lt=
;span class=3Dglyph title=3D"">ć</span> &lt=
;/td> <tr id=3Dentity-Cap><td> <code title=3D"&quo=
t;>Cap;</code> </td> <td> U+022D2 </td> <td=
> <span class=3Dglyph title=3D"">⋒</span&gt=
; </td> <tr id=3Dentity-cap><td> <code title=3D&quot=
;">cap;</code> </td> <td> U+02229 </td> &=
lt;td> <span class=3Dglyph title=3D"">∩</sp=
an> </td> <tr id=3Dentity-capand><td> <code title=
=3D"">capand;</code> </td> <td> U+02A44 &l=
t;/td> <td> <span class=3Dglyph title=3D"">&=
capand;</span> </td> <tr id=3Dentity-capbrcup><td&gt=
; <code title=3D"">capbrcup;</code> </td> &lt=
;td> U+02A49 </td> <td> <span class=3Dglyph title=3D&qu=
ot;">⩉</span> </td> <tr id=3Dentity-c=
apcap><td> <code title=3D"">capcap;</code>=
 </td> <td> U+02A4B </td> <td> <span class=3Dg=
lyph title=3D"">⩋</span> </td> <tr=
 id=3Dentity-capcup><td> <code title=3D"">capcup=
;</code> </td> <td> U+02A47 </td> <td> <=
span class=3Dglyph title=3D"">⩇</span> <=
/td> <tr id=3Dentity-capdot><td> <code title=3D"&q=
uot;>capdot;</code> </td> <td> U+02A40 </td> &=
lt;td> <span class=3Dglyph title=3D"">⩀<=
/span> </td> <tr id=3Dentity-CapitalDifferentialD><td&g=
t; <code title=3D"">CapitalDifferentialD;</code> &l=
t;/td> <td> U+02145 </td> <td> <span class=3Dglyp=
h title=3D"">ⅅ</span> </td> <tr id=3De=
ntity-caps><td> <code title=3D"">caps;</code&=
gt; </td> <td> U+02229 U+0FE00 </td> <td> <spa=
n class=3D"glyph compound" title=3D"">∩&am=
p;#xfe00;</span> </td> <tr id=3Dentity-caret><td>=
 <code title=3D"">caret;</code> </td> <td&=
gt; U+02041 </td> <td> <span class=3Dglyph title=3D"&=
quot;>⁁</span> </td> <tr id=3Dentity-caron&gt=
;<td> <code title=3D"">caron;</code> </td&=
gt; <td> U+002C7 </td> <td> <span class=3Dglyph titl=
e=3D"">ˇ</span> </td> <tr id=3Denti=
ty-Cayleys><td> <code title=3D"">Cayleys;</co=
de> </td> <td> U+0212D </td> <td> <span cla=
ss=3Dglyph title=3D"">ℭ</span> </td>=
 <tr id=3Dentity-ccaps><td> <code title=3D"">=
ccaps;</code> </td> <td> U+02A4D </td> <td>=
 <span class=3Dglyph title=3D"">⩍</span> =
</td> <tr id=3Dentity-Ccaron><td> <code title=3D&quo=
t;">Ccaron;</code> </td> <td> U+0010C </td&g=
t; <td> <span class=3Dglyph title=3D"">Č=
</span> </td> <tr id=3Dentity-ccaron><td> <cod=
e title=3D"">ccaron;</code> </td> <td> U+0=
010D </td> <td> <span class=3Dglyph title=3D""&g=
t;č</span> </td> <tr id=3Dentity-Ccedil><=
td> <code title=3D"">Ccedil;</code> </td> =
<td> U+000C7 </td> <td> <span class=3Dglyph title=3D=
"">Ç</span> </td> <tr id=3Dentity-=
Ccedil-legacy class=3Dimpl><td> <code title=3D""&gt=
;Ccedil</code> </td> <td> U+000C7 </td> <td&gt=
; <span title=3D"">Ç</span> </td> =
</tr><!-- (invalid entity with missing semicolon for legacy supp=
ort only) --><tr id=3Dentity-ccedil><td> <code title=3D=
"">ccedil;</code> </td> <td> U+000E7 </=
td> <td> <span class=3Dglyph title=3D"">&cce=
dil;</span> </td> <tr id=3Dentity-ccedil-legacy class=3Dim=
pl><td> <code title=3D"">ccedil</code> &lt=
;/td> <td> U+000E7 </td> <td> <span title=3D&quot=
;">ç</span> </td> </tr><!-- (inva=
lid entity with missing semicolon for legacy support only) --><tr i=
d=3Dentity-Ccirc><td> <code title=3D"">Ccirc;&lt=
;/code> </td> <td> U+00108 </td> <td> <span=
 class=3Dglyph title=3D"">Ĉ</span> </td&g=
t; <tr id=3Dentity-ccirc><td> <code title=3D""&g=
t;ccirc;</code> </td> <td> U+00109 </td> <td&g=
t; <span class=3Dglyph title=3D"">ĉ</span&gt=
; </td> <tr id=3Dentity-Cconint><td> <code title=3D&=
quot;">Cconint;</code> </td> <td> U+02230 </=
td> <td> <span class=3Dglyph title=3D"">&Cco=
nint;</span> </td> <tr id=3Dentity-ccups><td> &lt=
;code title=3D"">ccups;</code> </td> <td> =
U+02A4C </td> <td> <span class=3Dglyph title=3D"&quot=
;>⩌</span> </td> <tr id=3Dentity-ccupssm>&=
lt;td> <code title=3D"">ccupssm;</code> </td&=
gt; <td> U+02A50 </td> <td> <span class=3Dglyph titl=
e=3D"">⩐</span> </td> <tr id=3Den=
tity-Cdot><td> <code title=3D"">Cdot;</code&g=
t; </td> <td> U+0010A </td> <td> <span class=3D=
glyph title=3D"">Ċ</span> </td> <tr =
id=3Dentity-cdot><td> <code title=3D"">cdot;<=
/code> </td> <td> U+0010B </td> <td> <span =
class=3Dglyph title=3D"">ċ</span> </td>=
 <tr id=3Dentity-cedil><td> <code title=3D"">=
cedil;</code> </td> <td> U+000B8 </td> <td>=
 <span class=3Dglyph title=3D"">¸</span> =
</td> <tr id=3Dentity-cedil-legacy class=3Dimpl><td> &l=
t;code title=3D"">cedil</code> </td> <td> =
U+000B8 </td> <td> <span title=3D"">&cedi=
l;</span> </td> </tr><!-- (invalid entity with missi=
ng semicolon for legacy support only) --><tr id=3Dentity-Cedilla&gt=
;<td> <code title=3D"">Cedilla;</code> </t=
d> <td> U+000B8 </td> <td> <span class=3Dglyph ti=
tle=3D"">¸</span> </td> <tr id=3Den=
tity-cemptyv><td> <code title=3D"">cemptyv;</=
code> </td> <td> U+029B2 </td> <td> <span c=
lass=3Dglyph title=3D"">⦲</span> </td&g=
t; <tr id=3Dentity-cent><td> <code title=3D""&gt=
;cent;</code> </td> <td> U+000A2 </td> <td>=
 <span class=3Dglyph title=3D"">¢</span> &=
lt;/td> <tr id=3Dentity-cent-legacy class=3Dimpl><td> <=
code title=3D"">cent</code> </td> <td> U+0=
00A2 </td> <td> <span title=3D"">¢&l=
t;/span> </td> </tr><!-- (invalid entity with missing s=
emicolon for legacy support only) --><tr id=3Dentity-CenterDot>&=
lt;td> <code title=3D"">CenterDot;</code> </t=
d> <td> U+000B7 </td> <td> <span class=3Dglyph ti=
tle=3D"">·</span> </td> <tr id=3De=
ntity-centerdot><td> <code title=3D"">centerdot;=
</code> </td> <td> U+000B7 </td> <td> <s=
pan class=3Dglyph title=3D"">·</span> </=
td> <tr id=3Dentity-Cfr><td> <code title=3D""=
>Cfr;</code> </td> <td> U+0212D </td> <td&g=
t; <span class=3Dglyph title=3D"">ℭ</span&=
gt; </td> <tr id=3Dentity-cfr><td> <code title=3D&qu=
ot;">cfr;</code> </td> <td> U+1D520 </td>=
 <td> <span class=3Dglyph title=3D"">𝔠</=
span> </td> <tr id=3Dentity-CHcy><td> <code title=
=3D"">CHcy;</code> </td> <td> U+00427 <=
/td> <td> <span class=3Dglyph title=3D"">&CH=
cy;</span> </td> <tr id=3Dentity-chcy><td> <co=
de title=3D"">chcy;</code> </td> <td> U+00=
447 </td> <td> <span class=3Dglyph title=3D""&gt=
;ч</span> </td> <tr id=3Dentity-check><td&g=
t; <code title=3D"">check;</code> </td> <t=
d> U+02713 </td> <td> <span class=3Dglyph title=3D&quot=
;">✓</span> </td> <tr id=3Dentity-checkm=
ark><td> <code title=3D"">checkmark;</code&gt=
; </td> <td> U+02713 </td> <td> <span class=3D=
glyph title=3D"">✓</span> </td> <tr=
 id=3Dentity-Chi><td> <code title=3D"">Chi;</=
code> </td> <td> U+003A7 </td> <td> <span c=
lass=3Dglyph title=3D"">Χ</span> </td> &=
lt;tr id=3Dentity-chi><td> <code title=3D"">chi;=
</code> </td> <td> U+003C7 </td> <td> <s=
pan class=3Dglyph title=3D"">χ</span> </td&=
gt; <tr id=3Dentity-cir><td> <code title=3D""&gt=
;cir;</code> </td> <td> U+025CB </td> <td> =
<span class=3Dglyph title=3D"">○</span> &lt=
;/td> <tr id=3Dentity-circ><td> <code title=3D"&qu=
ot;>circ;</code> </td> <td> U+002C6 </td> <=
td> <span class=3Dglyph title=3D"">ˆ</span=
> </td> <tr id=3Dentity-circeq><td> <code title=3D=
"">circeq;</code> </td> <td> U+02257 </=
td> <td> <span class=3Dglyph title=3D"">&cir=
e;</span> </td> <tr id=3Dentity-circlearrowleft><td&=
gt; <code title=3D"">circlearrowleft;</code> </t=
d> <td> U+021BA </td> <td> <span class=3Dglyph ti=
tle=3D"">↺</span> </td> <tr id=3Den=
tity-circlearrowright><td> <code title=3D"">circ=
learrowright;</code> </td> <td> U+021BB </td> &lt=
;td> <span class=3Dglyph title=3D"">↻</sp=
an> </td> <tr id=3Dentity-circledast><td> <code t=
itle=3D"">circledast;</code> </td> <td> U+=
0229B </td> <td> <span class=3Dglyph title=3D""&=
gt;⊛</span> </td> <tr id=3Dentity-circledcirc>=
<td> <code title=3D"">circledcirc;</code> &lt=
;/td> <td> U+0229A </td> <td> <span class=3Dglyph=
 title=3D"">⊚</span> </td> <tr id=3D=
entity-circleddash><td> <code title=3D"">circled=
dash;</code> </td> <td> U+0229D </td> <td> =
<span class=3Dglyph title=3D"">⊝</span=
> </td> <tr id=3Dentity-CircleDot><td> <code titl=
e=3D"">CircleDot;</code> </td> <td> U+0229=
9 </td> <td> <span class=3Dglyph title=3D"">&=
amp;odot;</span> </td> <tr id=3Dentity-circledR><td&=
gt; <code title=3D"">circledR;</code> </td> &=
lt;td> U+000AE </td> <td> <span class=3Dglyph title=3D&=
quot;">®</span> </td> <tr id=3Dentity-circ=
ledS><td> <code title=3D"">circledS;</code&gt=
; </td> <td> U+024C8 </td> <td> <span class=3D=
glyph title=3D"">Ⓢ</span> </td> <tr id=
=3Dentity-CircleMinus><td> <code title=3D"">Circ=
leMinus;</code> </td> <td> U+02296 </td> <td&g=
t; <span class=3Dglyph title=3D"">⊖</span&g=
t; </td> <tr id=3Dentity-CirclePlus><td> <code title=
=3D"">CirclePlus;</code> </td> <td> U+0229=
5 </td> <td> <span class=3Dglyph title=3D"">&=
amp;oplus;</span> </td> <tr id=3Dentity-CircleTimes>&lt=
;td> <code title=3D"">CircleTimes;</code> </t=
d> <td> U+02297 </td> <td> <span class=3Dglyph ti=
tle=3D"">⊗</span> </td> <tr id=3De=
ntity-cirE><td> <code title=3D"">cirE;</code&=
gt; </td> <td> U+029C3 </td> <td> <span class=3D=
glyph title=3D"">⧃</span> </td> <tr =
id=3Dentity-cire><td> <code title=3D"">cire;<=
/code> </td> <td> U+02257 </td> <td> <span =
class=3Dglyph title=3D"">≗</span> </td>=
 <tr id=3Dentity-cirfnint><td> <code title=3D""&=
gt;cirfnint;</code> </td> <td> U+02A10 </td> <=
td> <span class=3Dglyph title=3D"">⨐</=
span> </td> <tr id=3Dentity-cirmid><td> <code tit=
le=3D"">cirmid;</code> </td> <td> U+02AEF =
</td> <td> <span class=3Dglyph title=3D"">&am=
p;cirmid;</span> </td> <tr id=3Dentity-cirscir><td&g=
t; <code title=3D"">cirscir;</code> </td> &lt=
;td> U+029C2 </td> <td> <span class=3Dglyph title=3D&qu=
ot;">⧂</span> </td> <tr id=3Dentity-Cl=
ockwiseContourIntegral><td> <code title=3D"">Clo=
ckwiseContourIntegral;</code> </td> <td> U+02232 </t=
d> <td> <span class=3Dglyph title=3D"">&cwco=
nint;</span> </td> <tr id=3Dentity-CloseCurlyDoubleQuote&g=
t;<td> <code title=3D"">CloseCurlyDoubleQuote;</=
code> </td> <td> U+0201D </td> <td> <span c=
lass=3Dglyph title=3D"">”</span> </td>=
 <tr id=3Dentity-CloseCurlyQuote><td> <code title=3D"=
">CloseCurlyQuote;</code> </td> <td> U+02019 &l=
t;/td> <td> <span class=3Dglyph title=3D"">&=
rsquor;</span> </td> <tr id=3Dentity-clubs><td> &=
lt;code title=3D"">clubs;</code> </td> <td&gt=
; U+02663 </td> <td> <span class=3Dglyph title=3D"&qu=
ot;>♣</span> </td> <tr id=3Dentity-clubsuit&g=
t;<td> <code title=3D"">clubsuit;</code> <=
/td> <td> U+02663 </td> <td> <span class=3Dglyph =
title=3D"">♣</span> </td> <tr id=3D=
entity-Colon><td> <code title=3D"">Colon;</co=
de> </td> <td> U+02237 </td> <td> <span cla=
ss=3Dglyph title=3D"">∷</span> </td> &=
lt;tr id=3Dentity-colon><td> <code title=3D"">co=
lon;</code> </td> <td> U+0003A </td> <td> &=
lt;span class=3Dglyph title=3D"">:</span> </td> =
<tr id=3Dentity-Colone><td> <code title=3D"">=
Colone;</code> </td> <td> U+02A74 </td> <td&gt=
; <span class=3Dglyph title=3D"">⩴</span&gt=
; </td> <tr id=3Dentity-colone><td> <code title=3D&q=
uot;">colone;</code> </td> <td> U+02254 </td=
> <td> <span class=3Dglyph title=3D"">&colon=
eq;</span> </td> <tr id=3Dentity-coloneq><td> &lt=
;code title=3D"">coloneq;</code> </td> <td&gt=
; U+02254 </td> <td> <span class=3Dglyph title=3D"&qu=
ot;>≔</span> </td> <tr id=3Dentity-comma&gt=
;<td> <code title=3D"">comma;</code> </td&=
gt; <td> U+0002C </td> <td> <span class=3Dglyph titl=
e=3D"">,</span> </td> <tr id=3Dentity-commat&=
gt;<td> <code title=3D"">commat;</code> </=
td> <td> U+00040 </td> <td> <span class=3Dglyph t=
itle=3D"">@</span> </td> <tr id=3Dentity-comp=
><td> <code title=3D"">comp;</code> </t=
d> <td> U+02201 </td> <td> <span class=3Dglyph ti=
tle=3D"">∁</span> </td> <tr id=
=3Dentity-compfn><td> <code title=3D"">compfn;&l=
t;/code> </td> <td> U+02218 </td> <td> <spa=
n class=3Dglyph title=3D"">∘</span> </td=
> <tr id=3Dentity-complement><td> <code title=3D"&=
quot;>complement;</code> </td> <td> U+02201 </td&=
gt; <td> <span class=3Dglyph title=3D"">&comple=
ment;</span> </td> <tr id=3Dentity-complexes><td>=
 <code title=3D"">complexes;</code> </td> &lt=
;td> U+02102 </td> <td> <span class=3Dglyph title=3D&qu=
ot;">ℂ</span> </td> <tr id=3Dentity-=
cong><td> <code title=3D"">cong;</code> &l=
t;/td> <td> U+02245 </td> <td> <span class=3Dglyp=
h title=3D"">≅</span> </td> <tr id=3D=
entity-congdot><td> <code title=3D"">congdot;&lt=
;/code> </td> <td> U+02A6D </td> <td> <span=
 class=3Dglyph title=3D"">⩭</span> </td=
> <tr id=3Dentity-Congruent><td> <code title=3D"&q=
uot;>Congruent;</code> </td> <td> U+02261 </td&gt=
; <td> <span class=3Dglyph title=3D"">≡&l=
t;/span> </td> <tr id=3Dentity-Conint><td> <code =
title=3D"">Conint;</code> </td> <td> U+022=
2F </td> <td> <span class=3Dglyph title=3D"">=
∯</span> </td> <tr id=3Dentity-conint><td=
> <code title=3D"">conint;</code> </td> &l=
t;td> U+0222E </td> <td> <span class=3Dglyph title=3D&q=
uot;">∮</span> </td> <tr id=3Dentity-Co=
ntourIntegral><td> <code title=3D"">ContourInteg=
ral;</code> </td> <td> U+0222E </td> <td> &=
lt;span class=3Dglyph title=3D"">∮</span> &=
lt;/td> <tr id=3Dentity-Copf><td> <code title=3D"&=
quot;>Copf;</code> </td> <td> U+02102 </td> &l=
t;td> <span class=3Dglyph title=3D"">ℂ&l=
t;/span> </td> <tr id=3Dentity-copf><td> <code ti=
tle=3D"">copf;</code> </td> <td> U+1D554 &=
lt;/td> <td> <span class=3Dglyph title=3D"">&amp=
;copf;</span> </td> <tr id=3Dentity-coprod><td> &=
lt;code title=3D"">coprod;</code> </td> <td&g=
t; U+02210 </td> <td> <span class=3Dglyph title=3D"&q=
uot;>∐</span> </td> <tr id=3Dentity-Coproduc=
t><td> <code title=3D"">Coproduct;</code> =
</td> <td> U+02210 </td> <td> <span class=3Dgl=
yph title=3D"">∐</span> </td> <tr =
id=3Dentity-COPY><td> <code title=3D"">COPY;<=
/code> </td> <td> U+000A9 </td> <td> <span =
class=3Dglyph title=3D"">©</span> </td>=
 <tr id=3Dentity-COPY-legacy class=3Dimpl><td> <code title=
=3D"">COPY</code> </td> <td> U+000A9 </=
td> <td> <span title=3D"">©</span&gt=
; </td> </tr><!-- (invalid entity with missing semicolon f=
or legacy support only) --><tr id=3Dentity-copy><td> <c=
ode title=3D"">copy;</code> </td> <td> U+0=
00A9 </td> <td> <span class=3Dglyph title=3D""&g=
t;©</span> </td> <tr id=3Dentity-copy-legacy clas=
s=3Dimpl><td> <code title=3D"">copy</code>=
 </td> <td> U+000A9 </td> <td> <span title=3D&=
quot;">©</span> </td> </tr><!-- (in=
valid entity with missing semicolon for legacy support only) --><tr=
 id=3Dentity-copysr><td> <code title=3D"">copysr=
;</code> </td> <td> U+02117 </td> <td> <=
span class=3Dglyph title=3D"">℗</span> <=
/td> <tr id=3Dentity-CounterClockwiseContourIntegral><td> =
<code title=3D"">CounterClockwiseContourIntegral;</cod=
e> </td> <td> U+02233 </td> <td> <span clas=
s=3Dglyph title=3D"">∳</span> </td>=
 <tr id=3Dentity-crarr><td> <code title=3D"">=
crarr;</code> </td> <td> U+021B5 </td> <td>=
 <span class=3Dglyph title=3D"">↵</span> =
</td> <tr id=3Dentity-Cross><td> <code title=3D&quot=
;">Cross;</code> </td> <td> U+02A2F </td>=
 <td> <span class=3Dglyph title=3D"">⨯&lt=
;/span> </td> <tr id=3Dentity-cross><td> <code ti=
tle=3D"">cross;</code> </td> <td> U+02717 =
</td> <td> <span class=3Dglyph title=3D"">&am=
p;cross;</span> </td> <tr id=3Dentity-Cscr><td> &=
lt;code title=3D"">Cscr;</code> </td> <td>=
 U+1D49E </td> <td> <span class=3Dglyph title=3D"&quo=
t;>𝒞</span> </td> <tr id=3Dentity-cscr><=
td> <code title=3D"">cscr;</code> </td> &l=
t;td> U+1D4B8 </td> <td> <span class=3Dglyph title=3D&q=
uot;">𝒸</span> </td> <tr id=3Dentity-csub=
><td> <code title=3D"">csub;</code> </t=
d> <td> U+02ACF </td> <td> <span class=3Dglyph ti=
tle=3D"">⫏</span> </td> <tr id=3Dent=
ity-csube><td> <code title=3D"">csube;</code&=
gt; </td> <td> U+02AD1 </td> <td> <span class=3D=
glyph title=3D"">⫑</span> </td> <tr=
 id=3Dentity-csup><td> <code title=3D"">csup;&lt=
;/code> </td> <td> U+02AD0 </td> <td> <span=
 class=3Dglyph title=3D"">⫐</span> </td&gt=
; <tr id=3Dentity-csupe><td> <code title=3D""&gt=
;csupe;</code> </td> <td> U+02AD2 </td> <td&gt=
; <span class=3Dglyph title=3D"">⫒</span>=
 </td> <tr id=3Dentity-ctdot><td> <code title=3D&quo=
t;">ctdot;</code> </td> <td> U+022EF </td&gt=
; <td> <span class=3Dglyph title=3D"">⋯&l=
t;/span> </td> <tr id=3Dentity-cudarrl><td> <code=
 title=3D"">cudarrl;</code> </td> <td> U+0=
2938 </td> <td> <span class=3Dglyph title=3D""&g=
t;⤸</span> </td> <tr id=3Dentity-cudarrr>&l=
t;td> <code title=3D"">cudarrr;</code> </td&g=
t; <td> U+02935 </td> <td> <span class=3Dglyph title=
=3D"">⤵</span> </td> <tr id=3Dent=
ity-cuepr><td> <code title=3D"">cuepr;</code&=
gt; </td> <td> U+022DE </td> <td> <span class=3D=
glyph title=3D"">⋞</span> </td> <tr=
 id=3Dentity-cuesc><td> <code title=3D"">cuesc;&=
lt;/code> </td> <td> U+022DF </td> <td> <sp=
an class=3Dglyph title=3D"">⋟</span> &=
lt;/td> <tr id=3Dentity-cularr><td> <code title=3D&quot=
;">cularr;</code> </td> <td> U+021B6 </td&gt=
; <td> <span class=3Dglyph title=3D"">&curvearr=
owleft;</span> </td> <tr id=3Dentity-cularrp><td>=
 <code title=3D"">cularrp;</code> </td> <t=
d> U+0293D </td> <td> <span class=3Dglyph title=3D&quot=
;">⤽</span> </td> <tr id=3Dentity-Cup&=
gt;<td> <code title=3D"">Cup;</code> </td&=
gt; <td> U+022D3 </td> <td> <span class=3Dglyph titl=
e=3D"">⋓</span> </td> <tr id=3Dentity=
-cup><td> <code title=3D"">cup;</code> &lt=
;/td> <td> U+0222A </td> <td> <span class=3Dglyph=
 title=3D"">∪</span> </td> <tr id=3De=
ntity-cupbrcap><td> <code title=3D"">cupbrcap;&l=
t;/code> </td> <td> U+02A48 </td> <td> <spa=
n class=3Dglyph title=3D"">⩈</span> </=
td> <tr id=3Dentity-CupCap><td> <code title=3D"&qu=
ot;>CupCap;</code> </td> <td> U+0224D </td> &l=
t;td> <span class=3Dglyph title=3D"">≍<=
/span> </td> <tr id=3Dentity-cupcap><td> <code ti=
tle=3D"">cupcap;</code> </td> <td> U+02A46=
 </td> <td> <span class=3Dglyph title=3D"">&a=
mp;cupcap;</span> </td> <tr id=3Dentity-cupcup><td&g=
t; <code title=3D"">cupcup;</code> </td> <=
td> U+02A4A </td> <td> <span class=3Dglyph title=3D&quo=
t;">⩊</span> </td> <tr id=3Dentity-cupd=
ot><td> <code title=3D"">cupdot;</code> &l=
t;/td> <td> U+0228D </td> <td> <span class=3Dglyp=
h title=3D"">⊍</span> </td> <tr id=
=3Dentity-cupor><td> <code title=3D"">cupor;<=
/code> </td> <td> U+02A45 </td> <td> <span =
class=3Dglyph title=3D"">⩅</span> </td&gt=
; <tr id=3Dentity-cups><td> <code title=3D"">=
cups;</code> </td> <td> U+0222A U+0FE00 </td> &lt=
;td> <span class=3D"glyph compound" title=3D""&=
gt;∪︀</span> </td> <tr id=3Dentity-cura=
rr><td> <code title=3D"">curarr;</code> &l=
t;/td> <td> U+021B7 </td> <td> <span class=3Dglyp=
h title=3D"">↷</span> </td> <tr id=
=3Dentity-curarrm><td> <code title=3D"">curarrm;=
</code> </td> <td> U+0293C </td> <td> <s=
pan class=3Dglyph title=3D"">⤼</span> <=
/td> <tr id=3Dentity-curlyeqprec><td> <code title=3D&qu=
ot;">curlyeqprec;</code> </td> <td> U+022DE &lt=
;/td> <td> <span class=3Dglyph title=3D"">&c=
uepr;</span> </td> <tr id=3Dentity-curlyeqsucc><td&g=
t; <code title=3D"">curlyeqsucc;</code> </td>=
 <td> U+022DF </td> <td> <span class=3Dglyph title=3D=
"">⋟</span> </td> <tr id=3Den=
tity-curlyvee><td> <code title=3D"">curlyvee;&lt=
;/code> </td> <td> U+022CE </td> <td> <span=
 class=3Dglyph title=3D"">⋎</span> </td&g=
t; <tr id=3Dentity-curlywedge><td> <code title=3D"&qu=
ot;>curlywedge;</code> </td> <td> U+022CF </td&gt=
; <td> <span class=3Dglyph title=3D"">&curlywed=
ge;</span> </td> <tr id=3Dentity-curren><td> <=
code title=3D"">curren;</code> </td> <td> =
U+000A4 </td> <td> <span class=3Dglyph title=3D"&quot=
;>¤</span> </td> <tr id=3Dentity-curren-lega=
cy class=3Dimpl><td> <code title=3D"">curren<=
/code> </td> <td> U+000A4 </td> <td> <span =
title=3D"">¤</span> </td> </tr>=
<!-- (invalid entity with missing semicolon for legacy support only) -=
-><tr id=3Dentity-curvearrowleft><td> <code title=3D&qu=
ot;">curvearrowleft;</code> </td> <td> U+021B6 =
</td> <td> <span class=3Dglyph title=3D"">&am=
p;curvearrowleft;</span> </td> <tr id=3Dentity-curvearrowr=
ight><td> <code title=3D"">curvearrowright;</=
code> </td> <td> U+021B7 </td> <td> <span c=
lass=3Dglyph title=3D"">↷</span> </td&gt=
; <tr id=3Dentity-cuvee><td> <code title=3D""&gt=
;cuvee;</code> </td> <td> U+022CE </td> <td&gt=
; <span class=3Dglyph title=3D"">⋎</span>=
 </td> <tr id=3Dentity-cuwed><td> <code title=3D&quo=
t;">cuwed;</code> </td> <td> U+022CF </td&gt=
; <td> <span class=3Dglyph title=3D"">&curlywed=
ge;</span> </td> <tr id=3Dentity-cwconint><td> &l=
t;code title=3D"">cwconint;</code> </td> <td&=
gt; U+02232 </td> <td> <span class=3Dglyph title=3D"&=
quot;>∲</span> </td> <tr id=3Dentity-cwint=
><td> <code title=3D"">cwint;</code> </=
td> <td> U+02231 </td> <td> <span class=3Dglyph t=
itle=3D"">∱</span> </td> <tr id=3De=
ntity-cylcty><td> <code title=3D"">cylcty;</c=
ode> </td> <td> U+0232D </td> <td> <span cl=
ass=3Dglyph title=3D"">⌭</span> </td>=
 <tr id=3Dentity-Dagger><td> <code title=3D""&gt=
;Dagger;</code> </td> <td> U+02021 </td> <td&g=
t; <span class=3Dglyph title=3D"">‡</span&=
gt; </td> <tr id=3Dentity-dagger><td> <code title=3D=
"">dagger;</code> </td> <td> U+02020 </=
td> <td> <span class=3Dglyph title=3D"">&dag=
ger;</span> </td> <tr id=3Dentity-daleth><td> &lt=
;code title=3D"">daleth;</code> </td> <td>=
 U+02138 </td> <td> <span class=3Dglyph title=3D"&quo=
t;>ℸ</span> </td> <tr id=3Dentity-Darr>&l=
t;td> <code title=3D"">Darr;</code> </td> =
<td> U+021A1 </td> <td> <span class=3Dglyph title=3D=
"">↡</span> </td> <tr id=3Dentity-dA=
rr><td> <code title=3D"">dArr;</code> <=
/td> <td> U+021D3 </td> <td> <span class=3Dglyph =
title=3D"">⇓</span> </td> &l=
t;tr id=3Dentity-darr><td> <code title=3D"">darr=
;</code> </td> <td> U+02193 </td> <td> <=
span class=3Dglyph title=3D"">↓</span> &=
lt;/td> <tr id=3Dentity-dash><td> <code title=3D"&=
quot;>dash;</code> </td> <td> U+02010 </td> &l=
t;td> <span class=3Dglyph title=3D"">‐</sp=
an> </td> <tr id=3Dentity-Dashv><td> <code title=3D=
"">Dashv;</code> </td> <td> U+02AE4 </t=
d> <td> <span class=3Dglyph title=3D"">&Doub=
leLeftTee;</span> </td> <tr id=3Dentity-dashv><td&gt=
; <code title=3D"">dashv;</code> </td> <td=
> U+022A3 </td> <td> <span class=3Dglyph title=3D"=
">⊣</span> </td> <tr id=3Dentity-dbkarow=
><td> <code title=3D"">dbkarow;</code> &lt=
;/td> <td> U+0290F </td> <td> <span class=3Dglyph=
 title=3D"">⤏</span> </td> <tr id=
=3Dentity-dblac><td> <code title=3D"">dblac;<=
/code> </td> <td> U+002DD </td> <td> <span =
class=3Dglyph title=3D"">˝</span> </td&gt=
; <tr id=3Dentity-Dcaron><td> <code title=3D""&g=
t;Dcaron;</code> </td> <td> U+0010E </td> <td&=
gt; <span class=3Dglyph title=3D"">Ď</span&=
gt; </td> <tr id=3Dentity-dcaron><td> <code title=3D=
"">dcaron;</code> </td> <td> U+0010F </=
td> <td> <span class=3Dglyph title=3D"">&dca=
ron;</span> </td> <tr id=3Dentity-Dcy><td> <co=
de title=3D"">Dcy;</code> </td> <td> U+004=
14 </td> <td> <span class=3Dglyph title=3D"">=
Д</span> </td> <tr id=3Dentity-dcy><td> &=
lt;code title=3D"">dcy;</code> </td> <td> =
U+00434 </td> <td> <span class=3Dglyph title=3D"&quot=
;>д</span> </td> <tr id=3Dentity-DD><td&g=
t; <code title=3D"">DD;</code> </td> <td&g=
t; U+02145 </td> <td> <span class=3Dglyph title=3D"&q=
uot;>ⅅ</span> </td> <tr id=3Dentity-dd><td=
> <code title=3D"">dd;</code> </td> <td=
> U+02146 </td> <td> <span class=3Dglyph title=3D"=
">ⅆ</span> </td> <tr id=3Dentity-ddagger&gt=
;<td> <code title=3D"">ddagger;</code> </t=
d> <td> U+02021 </td> <td> <span class=3Dglyph ti=
tle=3D"">‡</span> </td> <tr id=3D=
entity-ddarr><td> <code title=3D"">ddarr;</co=
de> </td> <td> U+021CA </td> <td> <span cla=
ss=3Dglyph title=3D"">⇊</span> </td> &=
lt;tr id=3Dentity-DDotrahd><td> <code title=3D""&gt=
;DDotrahd;</code> </td> <td> U+02911 </td> <td=
> <span class=3Dglyph title=3D"">⤑</sp=
an> </td> <tr id=3Dentity-ddotseq><td> <code titl=
e=3D"">ddotseq;</code> </td> <td> U+02A77 =
</td> <td> <span class=3Dglyph title=3D"">&am=
p;ddotseq;</span> </td> <tr id=3Dentity-deg><td> =
<code title=3D"">deg;</code> </td> <td>=
 U+000B0 </td> <td> <span class=3Dglyph title=3D"&quo=
t;>°</span> </td> <tr id=3Dentity-deg-legacy cl=
ass=3Dimpl><td> <code title=3D"">deg</code&gt=
; </td> <td> U+000B0 </td> <td> <span title=3D=
"">°</span> </td> </tr><!-- (in=
valid entity with missing semicolon for legacy support only) --><tr=
 id=3Dentity-Del><td> <code title=3D"">Del;</=
code> </td> <td> U+02207 </td> <td> <span c=
lass=3Dglyph title=3D"">∇</span> </td>=
 <tr id=3Dentity-Delta><td> <code title=3D"">=
Delta;</code> </td> <td> U+00394 </td> <td>=
 <span class=3Dglyph title=3D"">Δ</span> =
</td> <tr id=3Dentity-delta><td> <code title=3D&quot=
;">delta;</code> </td> <td> U+003B4 </td>=
 <td> <span class=3Dglyph title=3D"">δ&lt=
;/span> </td> <tr id=3Dentity-demptyv><td> <code =
title=3D"">demptyv;</code> </td> <td> U+02=
9B1 </td> <td> <span class=3Dglyph title=3D""&gt=
;⦱</span> </td> <tr id=3Dentity-dfisht><=
td> <code title=3D"">dfisht;</code> </td> =
<td> U+0297F </td> <td> <span class=3Dglyph title=3D=
"">⥿</span> </td> <tr id=3Dentity-=
Dfr><td> <code title=3D"">Dfr;</code> <=
/td> <td> U+1D507 </td> <td> <span class=3Dglyph =
title=3D"">𝔇</span> </td> <tr id=3Den=
tity-dfr><td> <code title=3D"">dfr;</code>=
 </td> <td> U+1D521 </td> <td> <span class=3Dg=
lyph title=3D"">𝔡</span> </td> <tr id=
=3Dentity-dHar><td> <code title=3D"">dHar;</c=
ode> </td> <td> U+02965 </td> <td> <span cl=
ass=3Dglyph title=3D"">⥥</span> </td> &=
lt;tr id=3Dentity-dharl><td> <code title=3D"">dh=
arl;</code> </td> <td> U+021C3 </td> <td> &=
lt;span class=3Dglyph title=3D"">⇃</s=
pan> </td> <tr id=3Dentity-dharr><td> <code title=
=3D"">dharr;</code> </td> <td> U+021C2 &lt=
;/td> <td> <span class=3Dglyph title=3D"">&d=
harr;</span> </td> <tr id=3Dentity-DiacriticalAcute>&lt=
;td> <code title=3D"">DiacriticalAcute;</code> &=
lt;/td> <td> U+000B4 </td> <td> <span class=3Dgly=
ph title=3D"">´</span> </td> <tr id=
=3Dentity-DiacriticalDot><td> <code title=3D"">D=
iacriticalDot;</code> </td> <td> U+002D9 </td> &l=
t;td> <span class=3Dglyph title=3D"">˙</spa=
n> </td> <tr id=3Dentity-DiacriticalDoubleAcute><td>=
 <code title=3D"">DiacriticalDoubleAcute;</code> &l=
t;/td> <td> U+002DD </td> <td> <span class=3Dglyp=
h title=3D"">˝</span> </td> <tr id=3D=
entity-DiacriticalGrave><td> <code title=3D"">Di=
acriticalGrave;</code> </td> <td> U+00060 </td> &=
lt;td> <span class=3Dglyph title=3D"">`</span> &=
lt;/td> <tr id=3Dentity-DiacriticalTilde><td> <code tit=
le=3D"">DiacriticalTilde;</code> </td> <td&gt=
; U+002DC </td> <td> <span class=3Dglyph title=3D"&qu=
ot;>˜</span> </td> <tr id=3Dentity-diam>&l=
t;td> <code title=3D"">diam;</code> </td> =
<td> U+022C4 </td> <td> <span class=3Dglyph title=3D=
"">⋄</span> </td> <tr id=3Dentity=
-Diamond><td> <code title=3D"">Diamond;</code=
> </td> <td> U+022C4 </td> <td> <span class=
=3Dglyph title=3D"">⋄</span> </td> &=
lt;tr id=3Dentity-diamond><td> <code title=3D"">=
diamond;</code> </td> <td> U+022C4 </td> <td&g=
t; <span class=3Dglyph title=3D"">⋄</span&=
gt; </td> <tr id=3Dentity-diamondsuit><td> <code tit=
le=3D"">diamondsuit;</code> </td> <td> U+0=
2666 </td> <td> <span class=3Dglyph title=3D""&g=
t;♦</span> </td> <tr id=3Dentity-diams><td=
> <code title=3D"">diams;</code> </td> &lt=
;td> U+02666 </td> <td> <span class=3Dglyph title=3D&qu=
ot;">♦</span> </td> <tr id=3Dentity-die&=
gt;<td> <code title=3D"">die;</code> </td&=
gt; <td> U+000A8 </td> <td> <span class=3Dglyph titl=
e=3D"">¨</span> </td> <tr id=3Dentity=
-DifferentialD><td> <code title=3D"">Differentia=
lD;</code> </td> <td> U+02146 </td> <td> &l=
t;span class=3Dglyph title=3D"">ⅆ</span> </t=
d> <tr id=3Dentity-digamma><td> <code title=3D"&qu=
ot;>digamma;</code> </td> <td> U+003DD </td> &=
lt;td> <span class=3Dglyph title=3D"">ϝ<=
/span> </td> <tr id=3Dentity-disin><td> <code tit=
le=3D"">disin;</code> </td> <td> U+022F2 &=
lt;/td> <td> <span class=3Dglyph title=3D"">&amp=
;disin;</span> </td> <tr id=3Dentity-div><td> &lt=
;code title=3D"">div;</code> </td> <td> U+=
000F7 </td> <td> <span class=3Dglyph title=3D""&=
gt;÷</span> </td> <tr id=3Dentity-divide>&lt=
;td> <code title=3D"">divide;</code> </td>=
 <td> U+000F7 </td> <td> <span class=3Dglyph title=3D=
"">÷</span> </td> <tr id=3Dentity-=
divide-legacy class=3Dimpl><td> <code title=3D""&gt=
;divide</code> </td> <td> U+000F7 </td> <td&gt=
; <span title=3D"">÷</span> </td> =
</tr><!-- (invalid entity with missing semicolon for legacy supp=
ort only) --><tr id=3Dentity-divideontimes><td> <code t=
itle=3D"">divideontimes;</code> </td> <td>=
 U+022C7 </td> <td> <span class=3Dglyph title=3D"&quo=
t;>⋇</span> </td> <tr id=3Dentity-divonx>=
<td> <code title=3D"">divonx;</code> </td&=
gt; <td> U+022C7 </td> <td> <span class=3Dglyph titl=
e=3D"">⋇</span> </td> <tr id=3Dent=
ity-DJcy><td> <code title=3D"">DJcy;</code&gt=
; </td> <td> U+00402 </td> <td> <span class=3D=
glyph title=3D"">Ђ</span> </td> <tr =
id=3Dentity-djcy><td> <code title=3D"">djcy;<=
/code> </td> <td> U+00452 </td> <td> <span =
class=3Dglyph title=3D"">ђ</span> </td>=
 <tr id=3Dentity-dlcorn><td> <code title=3D""&gt=
;dlcorn;</code> </td> <td> U+0231E </td> <td&g=
t; <span class=3Dglyph title=3D"">⌞</span&g=
t; </td> <tr id=3Dentity-dlcrop><td> <code title=3D&=
quot;">dlcrop;</code> </td> <td> U+0230D </t=
d> <td> <span class=3Dglyph title=3D"">&dlcr=
op;</span> </td> <tr id=3Dentity-dollar><td> <=
code title=3D"">dollar;</code> </td> <td> =
U+00024 </td> <td> <span class=3Dglyph title=3D"&quot=
;>$</span> </td> <tr id=3Dentity-Dopf><td> &lt=
;code title=3D"">Dopf;</code> </td> <td> U=
+1D53B </td> <td> <span class=3Dglyph title=3D""=
>𝔻</span> </td> <tr id=3Dentity-dopf><td=
> <code title=3D"">dopf;</code> </td> <=
td> U+1D555 </td> <td> <span class=3Dglyph title=3D&quo=
t;">𝕕</span> </td> <tr id=3Dentity-Dot&gt=
;<td> <code title=3D"">Dot;</code> </td&gt=
; <td> U+000A8 </td> <td> <span class=3Dglyph title=3D=
"">¨</span> </td> <tr id=3Dentity-dot=
><td> <code title=3D"">dot;</code> </td=
> <td> U+002D9 </td> <td> <span class=3Dglyph tit=
le=3D"">˙</span> </td> <tr id=3Dentit=
y-DotDot><td> <code title=3D"">DotDot;</code&=
gt; </td> <td> U+020DC </td> <td> <span class=3D=
"glyph composition" title=3D"">◌&Do=
tDot;</span> </td> <tr id=3Dentity-doteq><td> &lt=
;code title=3D"">doteq;</code> </td> <td> =
U+02250 </td> <td> <span class=3Dglyph title=3D"&quot=
;>≐</span> </td> <tr id=3Dentity-doteqdot>=
<td> <code title=3D"">doteqdot;</code> </t=
d> <td> U+02251 </td> <td> <span class=3Dglyph ti=
tle=3D"">≑</span> </td> <tr id=3D=
entity-DotEqual><td> <code title=3D"">DotEqual;&=
lt;/code> </td> <td> U+02250 </td> <td> <sp=
an class=3Dglyph title=3D"">≐</span> </td=
> <tr id=3Dentity-dotminus><td> <code title=3D"&qu=
ot;>dotminus;</code> </td> <td> U+02238 </td> =
<td> <span class=3Dglyph title=3D"">∸&=
lt;/span> </td> <tr id=3Dentity-dotplus><td> <cod=
e title=3D"">dotplus;</code> </td> <td> U+=
02214 </td> <td> <span class=3Dglyph title=3D""&=
gt;∔</span> </td> <tr id=3Dentity-dotsquare&gt=
;<td> <code title=3D"">dotsquare;</code> <=
/td> <td> U+022A1 </td> <td> <span class=3Dglyph =
title=3D"">⊡</span> </td> <tr i=
d=3Dentity-doublebarwedge><td> <code title=3D"">=
doublebarwedge;</code> </td> <td> U+02306 </td> &=
lt;td> <span class=3Dglyph title=3D"">&doublebarwe=
dge;</span> </td> <tr id=3Dentity-DoubleContourIntegral&gt=
;<td> <code title=3D"">DoubleContourIntegral;</c=
ode> </td> <td> U+0222F </td> <td> <span cl=
ass=3Dglyph title=3D"">∯</span> </td>=
 <tr id=3Dentity-DoubleDot><td> <code title=3D""=
>DoubleDot;</code> </td> <td> U+000A8 </td> &l=
t;td> <span class=3Dglyph title=3D"">¨</spa=
n> </td> <tr id=3Dentity-DoubleDownArrow><td> <co=
de title=3D"">DoubleDownArrow;</code> </td> <=
td> U+021D3 </td> <td> <span class=3Dglyph title=3D&quo=
t;">⇓</span> </td> <tr id=3Den=
tity-DoubleLeftArrow><td> <code title=3D"">Doubl=
eLeftArrow;</code> </td> <td> U+021D0 </td> <t=
d> <span class=3Dglyph title=3D"">⇐</span&=
gt; </td> <tr id=3Dentity-DoubleLeftRightArrow><td> &lt=
;code title=3D"">DoubleLeftRightArrow;</code> </td&=
gt; <td> U+021D4 </td> <td> <span class=3Dglyph titl=
e=3D"">⇔</span> </td> <tr id=3Dentity=
-DoubleLeftTee><td> <code title=3D"">DoubleLeftT=
ee;</code> </td> <td> U+02AE4 </td> <td> &l=
t;span class=3Dglyph title=3D"">⫤</span=
> </td> <tr id=3Dentity-DoubleLongLeftArrow><td> &lt=
;code title=3D"">DoubleLongLeftArrow;</code> </td&g=
t; <td> U+027F8 </td> <td> <span class=3Dglyph title=
=3D"">⟸</span> </td> <tr id=
=3Dentity-DoubleLongLeftRightArrow><td> <code title=3D"&=
quot;>DoubleLongLeftRightArrow;</code> </td> <td> U+=
027FA </td> <td> <span class=3Dglyph title=3D""&=
gt;⟺</span> </td> <tr id=3Den=
tity-DoubleLongRightArrow><td> <code title=3D"">=
DoubleLongRightArrow;</code> </td> <td> U+027F9 </td=
> <td> <span class=3Dglyph title=3D"">&xrArr=
;</span> </td> <tr id=3Dentity-DoubleRightArrow><td&=
gt; <code title=3D"">DoubleRightArrow;</code> </=
td> <td> U+021D2 </td> <td> <span class=3Dglyph t=
itle=3D"">⇒</span> </td> <tr id=3D=
entity-DoubleRightTee><td> <code title=3D"">Doub=
leRightTee;</code> </td> <td> U+022A8 </td> <t=
d> <span class=3Dglyph title=3D"">⊨</span=
> </td> <tr id=3Dentity-DoubleUpArrow><td> <code =
title=3D"">DoubleUpArrow;</code> </td> <td&gt=
; U+021D1 </td> <td> <span class=3Dglyph title=3D"&qu=
ot;>⇑</span> </td> <tr id=3Dentity-DoubleUp=
DownArrow><td> <code title=3D"">DoubleUpDownArro=
w;</code> </td> <td> U+021D5 </td> <td> &lt=
;span class=3Dglyph title=3D"">⇕</s=
pan> </td> <tr id=3Dentity-DoubleVerticalBar><td> &l=
t;code title=3D"">DoubleVerticalBar;</code> </td&gt=
; <td> U+02225 </td> <td> <span class=3Dglyph title=3D=
"">∥</span> </td> <tr id=3Dentity-Do=
wnArrow><td> <code title=3D"">DownArrow;</cod=
e> </td> <td> U+02193 </td> <td> <span clas=
s=3Dglyph title=3D"">↓</span> </td&gt=
; <tr id=3Dentity-Downarrow><td> <code title=3D"&quot=
;>Downarrow;</code> </td> <td> U+021D3 </td> &=
lt;td> <span class=3Dglyph title=3D"">&DoubleDownA=
rrow;</span> </td> <tr id=3Dentity-downarrow><td>=
 <code title=3D"">downarrow;</code> </td> &lt=
;td> U+02193 </td> <td> <span class=3Dglyph title=3D&qu=
ot;">↓</span> </td> <tr id=3Dentity-=
DownArrowBar><td> <code title=3D"">DownArrowBar;=
</code> </td> <td> U+02913 </td> <td> <s=
pan class=3Dglyph title=3D"">⤓</span>=
 </td> <tr id=3Dentity-DownArrowUpArrow><td> <code t=
itle=3D"">DownArrowUpArrow;</code> </td> <td&=
gt; U+021F5 </td> <td> <span class=3Dglyph title=3D"&=
quot;>⇵</span> </td> <tr id=3Dentity-DownBrev=
e><td> <code title=3D"">DownBreve;</code> =
</td> <td> U+00311 </td> <td> <span class=3D&q=
uot;glyph composition" title=3D"">◌&Down=
Breve;</span> </td> <tr id=3Dentity-downdownarrows><=
td> <code title=3D"">downdownarrows;</code> <=
/td> <td> U+021CA </td> <td> <span class=3Dglyph =
title=3D"">⇊</span> </td> <tr id=3D=
entity-downharpoonleft><td> <code title=3D"">dow=
nharpoonleft;</code> </td> <td> U+021C3 </td> &lt=
;td> <span class=3Dglyph title=3D"">&downharpoonle=
ft;</span> </td> <tr id=3Dentity-downharpoonright><t=
d> <code title=3D"">downharpoonright;</code> &lt=
;/td> <td> U+021C2 </td> <td> <span class=3Dglyph=
 title=3D"">⇂</span> </td> <tr id=3D=
entity-DownLeftRightVector><td> <code title=3D""&gt=
;DownLeftRightVector;</code> </td> <td> U+02950 </td=
> <td> <span class=3Dglyph title=3D"">&DownL=
eftRightVector;</span> </td> <tr id=3Dentity-DownLeftTeeVe=
ctor><td> <code title=3D"">DownLeftTeeVector;&lt=
;/code> </td> <td> U+0295E </td> <td> <span=
 class=3Dglyph title=3D"">⥞</span&g=
t; </td> <tr id=3Dentity-DownLeftVector><td> <code t=
itle=3D"">DownLeftVector;</code> </td> <td&gt=
; U+021BD </td> <td> <span class=3Dglyph title=3D"&qu=
ot;>↽</span> </td> <tr id=3Dentity-=
DownLeftVectorBar><td> <code title=3D"">DownLeft=
VectorBar;</code> </td> <td> U+02956 </td> <td=
> <span class=3Dglyph title=3D"">&DownLeftVectorBa=
r;</span> </td> <tr id=3Dentity-DownRightTeeVector><=
td> <code title=3D"">DownRightTeeVector;</code> =
</td> <td> U+0295F </td> <td> <span class=3Dgl=
yph title=3D"">⥟</span> </td=
> <tr id=3Dentity-DownRightVector><td> <code title=3D&q=
uot;">DownRightVector;</code> </td> <td> U+021C=
1 </td> <td> <span class=3Dglyph title=3D"">&=
amp;rhard;</span> </td> <tr id=3Dentity-DownRightVectorBar=
><td> <code title=3D"">DownRightVectorBar;</c=
ode> </td> <td> U+02957 </td> <td> <span cl=
ass=3Dglyph title=3D"">⥗</span>=
 </td> <tr id=3Dentity-DownTee><td> <code title=3D&q=
uot;">DownTee;</code> </td> <td> U+022A4 </t=
d> <td> <span class=3Dglyph title=3D"">⊤=
</span> </td> <tr id=3Dentity-DownTeeArrow><td> &=
lt;code title=3D"">DownTeeArrow;</code> </td> &l=
t;td> U+021A7 </td> <td> <span class=3Dglyph title=3D&q=
uot;">↧</span> </td> <tr id=3Dentit=
y-drbkarow><td> <code title=3D"">drbkarow;</c=
ode> </td> <td> U+02910 </td> <td> <span cl=
ass=3Dglyph title=3D"">⤐</span> </td&g=
t; <tr id=3Dentity-drcorn><td> <code title=3D""&=
gt;drcorn;</code> </td> <td> U+0231F </td> <td=
> <span class=3Dglyph title=3D"">⌟</span=
> </td> <tr id=3Dentity-drcrop><td> <code title=3D=
"">drcrop;</code> </td> <td> U+0230C </=
td> <td> <span class=3Dglyph title=3D"">&drc=
rop;</span> </td> <tr id=3Dentity-Dscr><td> <c=
ode title=3D"">Dscr;</code> </td> <td> U+1=
D49F </td> <td> <span class=3Dglyph title=3D""&g=
t;𝒟</span> </td> <tr id=3Dentity-dscr><td&g=
t; <code title=3D"">dscr;</code> </td> <td=
> U+1D4B9 </td> <td> <span class=3Dglyph title=3D"=
">𝒹</span> </td> <tr id=3Dentity-DScy>=
<td> <code title=3D"">DScy;</code> </td&gt=
; <td> U+00405 </td> <td> <span class=3Dglyph title=3D=
"">Ѕ</span> </td> <tr id=3Dentity-ds=
cy><td> <code title=3D"">dscy;</code> <=
/td> <td> U+00455 </td> <td> <span class=3Dglyph =
title=3D"">ѕ</span> </td> <tr id=3De=
ntity-dsol><td> <code title=3D"">dsol;</code&=
gt; </td> <td> U+029F6 </td> <td> <span class=3D=
glyph title=3D"">⧶</span> </td> <tr =
id=3Dentity-Dstrok><td> <code title=3D"">Dstrok;=
</code> </td> <td> U+00110 </td> <td> <s=
pan class=3Dglyph title=3D"">Đ</span> </=
td> <tr id=3Dentity-dstrok><td> <code title=3D"&qu=
ot;>dstrok;</code> </td> <td> U+00111 </td> &l=
t;td> <span class=3Dglyph title=3D"">đ</=
span> </td> <tr id=3Dentity-dtdot><td> <code titl=
e=3D"">dtdot;</code> </td> <td> U+022F1 &l=
t;/td> <td> <span class=3Dglyph title=3D"">&=
dtdot;</span> </td> <tr id=3Dentity-dtri><td> &lt=
;code title=3D"">dtri;</code> </td> <td> U=
+025BF </td> <td> <span class=3Dglyph title=3D""=
>▿</span> </td> <tr id=3Dentity-dtrif&=
gt;<td> <code title=3D"">dtrif;</code> </t=
d> <td> U+025BE </td> <td> <span class=3Dglyph ti=
tle=3D"">▾</span> </td> &l=
t;tr id=3Dentity-duarr><td> <code title=3D"">dua=
rr;</code> </td> <td> U+021F5 </td> <td> &l=
t;span class=3Dglyph title=3D"">⇵</span> &lt=
;/td> <tr id=3Dentity-duhar><td> <code title=3D"&q=
uot;>duhar;</code> </td> <td> U+0296F </td> &l=
t;td> <span class=3Dglyph title=3D"">⥯</s=
pan> </td> <tr id=3Dentity-dwangle><td> <code tit=
le=3D"">dwangle;</code> </td> <td> U+029A6=
 </td> <td> <span class=3Dglyph title=3D"">&a=
mp;dwangle;</span> </td> <tr id=3Dentity-DZcy><td&gt=
; <code title=3D"">DZcy;</code> </td> <td&=
gt; U+0040F </td> <td> <span class=3Dglyph title=3D"&=
quot;>Џ</span> </td> <tr id=3Dentity-dzcy>&=
lt;td> <code title=3D"">dzcy;</code> </td>=
 <td> U+0045F </td> <td> <span class=3Dglyph title=3D=
"">џ</span> </td> <tr id=3Dentity-dz=
igrarr><td> <code title=3D"">dzigrarr;</code&=
gt; </td> <td> U+027FF </td> <td> <span class=3D=
glyph title=3D"">⟿</span> </td> &lt=
;tr id=3Dentity-Eacute><td> <code title=3D"">Eac=
ute;</code> </td> <td> U+000C9 </td> <td> &=
lt;span class=3Dglyph title=3D"">É</span> &=
lt;/td> <tr id=3Dentity-Eacute-legacy class=3Dimpl><td> &l=
t;code title=3D"">Eacute</code> </td> <td>=
 U+000C9 </td> <td> <span title=3D"">&Eac=
ute;</span> </td> </tr><!-- (invalid entity with mis=
sing semicolon for legacy support only) --><tr id=3Dentity-eacute&g=
t;<td> <code title=3D"">eacute;</code> </t=
d> <td> U+000E9 </td> <td> <span class=3Dglyph ti=
tle=3D"">é</span> </td> <tr id=3De=
ntity-eacute-legacy class=3Dimpl><td> <code title=3D"&qu=
ot;>eacute</code> </td> <td> U+000E9 </td> &lt=
;td> <span title=3D"">é</span> </t=
d> </tr><!-- (invalid entity with missing semicolon for legac=
y support only) --><tr id=3Dentity-easter><td> <code ti=
tle=3D"">easter;</code> </td> <td> U+02A6E=
 </td> <td> <span class=3Dglyph title=3D"">&a=
mp;easter;</span> </td> <tr id=3Dentity-Ecaron><td&g=
t; <code title=3D"">Ecaron;</code> </td> <=
td> U+0011A </td> <td> <span class=3Dglyph title=3D&quo=
t;">Ě</span> </td> <tr id=3Dentity-ecar=
on><td> <code title=3D"">ecaron;</code> &l=
t;/td> <td> U+0011B </td> <td> <span class=3Dglyp=
h title=3D"">ě</span> </td> <tr id=
=3Dentity-ecir><td> <code title=3D"">ecir;</c=
ode> </td> <td> U+02256 </td> <td> <span cl=
ass=3Dglyph title=3D"">≖</span> </td>=
 <tr id=3Dentity-Ecirc><td> <code title=3D"">=
Ecirc;</code> </td> <td> U+000CA </td> <td>=
 <span class=3Dglyph title=3D"">Ê</span> =
</td> <tr id=3Dentity-Ecirc-legacy class=3Dimpl><td> &l=
t;code title=3D"">Ecirc</code> </td> <td> =
U+000CA </td> <td> <span title=3D"">&Ecir=
c;</span> </td> </tr><!-- (invalid entity with missi=
ng semicolon for legacy support only) --><tr id=3Dentity-ecirc>&=
lt;td> <code title=3D"">ecirc;</code> </td&gt=
; <td> U+000EA </td> <td> <span class=3Dglyph title=3D=
"">ê</span> </td> <tr id=3Dentity-e=
circ-legacy class=3Dimpl><td> <code title=3D"">e=
circ</code> </td> <td> U+000EA </td> <td> &=
lt;span title=3D"">ê</span> </td> <=
/tr><!-- (invalid entity with missing semicolon for legacy support =
only) --><tr id=3Dentity-ecolon><td> <code title=3D&quo=
t;">ecolon;</code> </td> <td> U+02255 </td&g=
t; <td> <span class=3Dglyph title=3D"">&eqcolon=
;</span> </td> <tr id=3Dentity-Ecy><td> <code =
title=3D"">Ecy;</code> </td> <td> U+0042D =
</td> <td> <span class=3Dglyph title=3D"">&am=
p;Ecy;</span> </td> <tr id=3Dentity-ecy><td> <=
code title=3D"">ecy;</code> </td> <td> U+0=
044D </td> <td> <span class=3Dglyph title=3D""&g=
t;э</span> </td> <tr id=3Dentity-eDDot><td&g=
t; <code title=3D"">eDDot;</code> </td> <t=
d> U+02A77 </td> <td> <span class=3Dglyph title=3D&quot=
;">⩷</span> </td> <tr id=3Dentity-Edot=
><td> <code title=3D"">Edot;</code> </t=
d> <td> U+00116 </td> <td> <span class=3Dglyph ti=
tle=3D"">Ė</span> </td> <tr id=3Dent=
ity-eDot><td> <code title=3D"">eDot;</code&gt=
; </td> <td> U+02251 </td> <td> <span class=3D=
glyph title=3D"">≑</span> </td> &lt=
;tr id=3Dentity-edot><td> <code title=3D"">edot;=
</code> </td> <td> U+00117 </td> <td> <s=
pan class=3Dglyph title=3D"">ė</span> </td=
> <tr id=3Dentity-ee><td> <code title=3D""&gt=
;ee;</code> </td> <td> U+02147 </td> <td> &=
lt;span class=3Dglyph title=3D"">ⅇ</span=
> </td> <tr id=3Dentity-efDot><td> <code title=3D=
"">efDot;</code> </td> <td> U+02252 </t=
d> <td> <span class=3Dglyph title=3D"">&fall=
ingdotseq;</span> </td> <tr id=3Dentity-Efr><td> =
<code title=3D"">Efr;</code> </td> <td>=
 U+1D508 </td> <td> <span class=3Dglyph title=3D"&quo=
t;>𝔈</span> </td> <tr id=3Dentity-efr><td=
> <code title=3D"">efr;</code> </td> <t=
d> U+1D522 </td> <td> <span class=3Dglyph title=3D&quot=
;">𝔢</span> </td> <tr id=3Dentity-eg>&l=
t;td> <code title=3D"">eg;</code> </td> &l=
t;td> U+02A9A </td> <td> <span class=3Dglyph title=3D&q=
uot;">⪚</span> </td> <tr id=3Dentity-Egrave=
><td> <code title=3D"">Egrave;</code> <=
/td> <td> U+000C8 </td> <td> <span class=3Dglyph =
title=3D"">È</span> </td> <tr id=3D=
entity-Egrave-legacy class=3Dimpl><td> <code title=3D"&q=
uot;>Egrave</code> </td> <td> U+000C8 </td> &l=
t;td> <span title=3D"">È</span> </=
td> </tr><!-- (invalid entity with missing semicolon for lega=
cy support only) --><tr id=3Dentity-egrave><td> <code t=
itle=3D"">egrave;</code> </td> <td> U+000E=
8 </td> <td> <span class=3Dglyph title=3D"">&=
amp;egrave;</span> </td> <tr id=3Dentity-egrave-legacy cla=
ss=3Dimpl><td> <code title=3D"">egrave</code&=
gt; </td> <td> U+000E8 </td> <td> <span title=3D=
"">è</span> </td> </tr><!-- =
(invalid entity with missing semicolon for legacy support only) -->&lt=
;tr id=3Dentity-egs><td> <code title=3D"">egs;&l=
t;/code> </td> <td> U+02A96 </td> <td> <spa=
n class=3Dglyph title=3D"">⪖</span> </td&gt=
; <tr id=3Dentity-egsdot><td> <code title=3D""&g=
t;egsdot;</code> </td> <td> U+02A98 </td> <td&=
gt; <span class=3Dglyph title=3D"">⪘</span&=
gt; </td> <tr id=3Dentity-el><td> <code title=3D&quo=
t;">el;</code> </td> <td> U+02A99 </td> &=
lt;td> <span class=3Dglyph title=3D"">⪙</spa=
n> </td> <tr id=3Dentity-Element><td> <code title=
=3D"">Element;</code> </td> <td> U+02208 &=
lt;/td> <td> <span class=3Dglyph title=3D"">&amp=
;in;</span> </td> <tr id=3Dentity-elinters><td> &=
lt;code title=3D"">elinters;</code> </td> <td=
> U+023E7 </td> <td> <span class=3Dglyph title=3D"=
">⏧</span> </td> <tr id=3Dentity-ell&=
gt;<td> <code title=3D"">ell;</code> </td&=
gt; <td> U+02113 </td> <td> <span class=3Dglyph titl=
e=3D"">ℓ</span> </td> <tr id=3Dentity=
-els><td> <code title=3D"">els;</code> &lt=
;/td> <td> U+02A95 </td> <td> <span class=3Dglyph=
 title=3D"">⪕</span> </td> <t=
r id=3Dentity-elsdot><td> <code title=3D"">elsdo=
t;</code> </td> <td> U+02A97 </td> <td> &lt=
;span class=3Dglyph title=3D"">⪗</span> &lt=
;/td> <tr id=3Dentity-Emacr><td> <code title=3D"&q=
uot;>Emacr;</code> </td> <td> U+00112 </td> &l=
t;td> <span class=3Dglyph title=3D"">Ē</s=
pan> </td> <tr id=3Dentity-emacr><td> <code title=
=3D"">emacr;</code> </td> <td> U+00113 &lt=
;/td> <td> <span class=3Dglyph title=3D"">&e=
macr;</span> </td> <tr id=3Dentity-empty><td> &lt=
;code title=3D"">empty;</code> </td> <td> =
U+02205 </td> <td> <span class=3Dglyph title=3D"&quot=
;>∅</span> </td> <tr id=3Dentity-emptyset&gt=
;<td> <code title=3D"">emptyset;</code> </=
td> <td> U+02205 </td> <td> <span class=3Dglyph t=
itle=3D"">∅</span> </td> <tr id=3D=
entity-EmptySmallSquare><td> <code title=3D"">Em=
ptySmallSquare;</code> </td> <td> U+025FB </td> &=
lt;td> <span class=3Dglyph title=3D"">&EmptySmallS=
quare;</span> </td> <tr id=3Dentity-emptyv><td> &=
lt;code title=3D"">emptyv;</code> </td> <td&g=
t; U+02205 </td> <td> <span class=3Dglyph title=3D"&q=
uot;>∅</span> </td> <tr id=3Dentity-EmptyVer=
ySmallSquare><td> <code title=3D"">EmptyVerySmal=
lSquare;</code> </td> <td> U+025AB </td> <td&g=
t; <span class=3Dglyph title=3D"">&EmptyVerySmallSqua=
re;</span> </td> <tr id=3Dentity-emsp><td> <co=
de title=3D"">emsp;</code> </td> <td> U+02=
003 </td> <td> <span class=3Dglyph title=3D""&gt=
; </span> </td> <tr id=3Dentity-emsp13><td&=
gt; <code title=3D"">emsp13;</code> </td> &lt=
;td> U+02004 </td> <td> <span class=3Dglyph title=3D&qu=
ot;"> </span> </td> <tr id=3Dentity-ems=
p14><td> <code title=3D"">emsp14;</code> &=
lt;/td> <td> U+02005 </td> <td> <span class=3Dgly=
ph title=3D""> </span> </td> <tr i=
d=3Dentity-ENG><td> <code title=3D"">ENG;</co=
de> </td> <td> U+0014A </td> <td> <span cla=
ss=3Dglyph title=3D"">Ŋ</span> </td> &lt=
;tr id=3Dentity-eng><td> <code title=3D"">eng;&l=
t;/code> </td> <td> U+0014B </td> <td> <spa=
n class=3Dglyph title=3D"">ŋ</span> </td&gt=
; <tr id=3Dentity-ensp><td> <code title=3D"">=
ensp;</code> </td> <td> U+02002 </td> <td> =
<span class=3Dglyph title=3D""> </span> &l=
t;/td> <tr id=3Dentity-Eogon><td> <code title=3D"&=
quot;>Eogon;</code> </td> <td> U+00118 </td> &=
lt;td> <span class=3Dglyph title=3D"">Ę</=
span> </td> <tr id=3Dentity-eogon><td> <code titl=
e=3D"">eogon;</code> </td> <td> U+00119 &l=
t;/td> <td> <span class=3Dglyph title=3D"">&=
eogon;</span> </td> <tr id=3Dentity-Eopf><td> &lt=
;code title=3D"">Eopf;</code> </td> <td> U=
+1D53C </td> <td> <span class=3Dglyph title=3D""=
>𝔼</span> </td> <tr id=3Dentity-eopf><td=
> <code title=3D"">eopf;</code> </td> <=
td> U+1D556 </td> <td> <span class=3Dglyph title=3D&quo=
t;">𝕖</span> </td> <tr id=3Dentity-epar&g=
t;<td> <code title=3D"">epar;</code> </td&=
gt; <td> U+022D5 </td> <td> <span class=3Dglyph titl=
e=3D"">⋕</span> </td> <tr id=3Dentit=
y-eparsl><td> <code title=3D"">eparsl;</code&=
gt; </td> <td> U+029E3 </td> <td> <span class=3D=
glyph title=3D"">⧣</span> </td> <t=
r id=3Dentity-eplus><td> <code title=3D"">eplus;=
</code> </td> <td> U+02A71 </td> <td> <s=
pan class=3Dglyph title=3D"">⩱</span> </t=
d> <tr id=3Dentity-epsi><td> <code title=3D""=
>epsi;</code> </td> <td> U+003B5 </td> <td&=
gt; <span class=3Dglyph title=3D"">ε</span&gt=
; </td> <tr id=3Dentity-Epsilon><td> <code title=3D&=
quot;">Epsilon;</code> </td> <td> U+00395 </=
td> <td> <span class=3Dglyph title=3D"">&Eps=
ilon;</span> </td> <tr id=3Dentity-epsilon><td> &=
lt;code title=3D"">epsilon;</code> </td> <td&=
gt; U+003B5 </td> <td> <span class=3Dglyph title=3D"&=
quot;>ε</span> </td> <tr id=3Dentity-epsiv>=
<td> <code title=3D"">epsiv;</code> </td&g=
t; <td> U+003F5 </td> <td> <span class=3Dglyph title=
=3D"">ϵ</span> </td> <tr =
id=3Dentity-eqcirc><td> <code title=3D"">eqcirc;=
</code> </td> <td> U+02256 </td> <td> <s=
pan class=3Dglyph title=3D"">≖</span> </=
td> <tr id=3Dentity-eqcolon><td> <code title=3D"&q=
uot;>eqcolon;</code> </td> <td> U+02255 </td> =
<td> <span class=3Dglyph title=3D"">≕&l=
t;/span> </td> <tr id=3Dentity-eqsim><td> <code t=
itle=3D"">eqsim;</code> </td> <td> U+02242=
 </td> <td> <span class=3Dglyph title=3D"">&a=
mp;esim;</span> </td> <tr id=3Dentity-eqslantgtr><td=
> <code title=3D"">eqslantgtr;</code> </td&gt=
; <td> U+02A96 </td> <td> <span class=3Dglyph title=3D=
"">⪖</span> </td> <tr id=3Dentity-eqs=
lantless><td> <code title=3D"">eqslantless;</=
code> </td> <td> U+02A95 </td> <td> <span c=
lass=3Dglyph title=3D"">⪕</span> </=
td> <tr id=3Dentity-Equal><td> <code title=3D"&quo=
t;>Equal;</code> </td> <td> U+02A75 </td> <=
td> <span class=3Dglyph title=3D"">⩵</spa=
n> </td> <tr id=3Dentity-equals><td> <code title=3D=
"">equals;</code> </td> <td> U+0003D </=
td> <td> <span class=3Dglyph title=3D"">=3D</=
span> </td> <tr id=3Dentity-EqualTilde><td> <code=
 title=3D"">EqualTilde;</code> </td> <td> =
U+02242 </td> <td> <span class=3Dglyph title=3D"&quot=
;>≂</span> </td> <tr id=3Dentity-equest>&lt=
;td> <code title=3D"">equest;</code> </td>=
 <td> U+0225F </td> <td> <span class=3Dglyph title=3D=
"">≟</span> </td> <tr id=3Dentity=
-Equilibrium><td> <code title=3D"">Equilibrium;&=
lt;/code> </td> <td> U+021CC </td> <td> <sp=
an class=3Dglyph title=3D"">⇌</span> </td=
> <tr id=3Dentity-equiv><td> <code title=3D""=
>equiv;</code> </td> <td> U+02261 </td> <td=
> <span class=3Dglyph title=3D"">≡</span&=
gt; </td> <tr id=3Dentity-equivDD><td> <code title=3D=
"">equivDD;</code> </td> <td> U+02A78 <=
/td> <td> <span class=3Dglyph title=3D"">&eq=
uivDD;</span> </td> <tr id=3Dentity-eqvparsl><td>=
 <code title=3D"">eqvparsl;</code> </td> <=
td> U+029E5 </td> <td> <span class=3Dglyph title=3D&quo=
t;">⧥</span> </td> <tr id=3Dentity-er=
arr><td> <code title=3D"">erarr;</code> &l=
t;/td> <td> U+02971 </td> <td> <span class=3Dglyp=
h title=3D"">⥱</span> </td> <tr id=3D=
entity-erDot><td> <code title=3D"">erDot;</co=
de> </td> <td> U+02253 </td> <td> <span cla=
ss=3Dglyph title=3D"">≓</span> </t=
d> <tr id=3Dentity-Escr><td> <code title=3D""=
>Escr;</code> </td> <td> U+02130 </td> <td&=
gt; <span class=3Dglyph title=3D"">ℰ</=
span> </td> <tr id=3Dentity-escr><td> <code title=
=3D"">escr;</code> </td> <td> U+0212F <=
/td> <td> <span class=3Dglyph title=3D"">&es=
cr;</span> </td> <tr id=3Dentity-esdot><td> <c=
ode title=3D"">esdot;</code> </td> <td> U+=
02250 </td> <td> <span class=3Dglyph title=3D""&=
gt;≐</span> </td> <tr id=3Dentity-Esim><td=
> <code title=3D"">Esim;</code> </td> <=
td> U+02A73 </td> <td> <span class=3Dglyph title=3D&quo=
t;">⩳</span> </td> <tr id=3Dentity-esim&g=
t;<td> <code title=3D"">esim;</code> </td&=
gt; <td> U+02242 </td> <td> <span class=3Dglyph titl=
e=3D"">≂</span> </td> <tr id=3Dentit=
y-Eta><td> <code title=3D"">Eta;</code> &l=
t;/td> <td> U+00397 </td> <td> <span class=3Dglyp=
h title=3D"">Η</span> </td> <tr id=3D=
entity-eta><td> <code title=3D"">eta;</code&g=
t; </td> <td> U+003B7 </td> <td> <span class=3D=
glyph title=3D"">η</span> </td> <tr i=
d=3Dentity-ETH><td> <code title=3D"">ETH;</co=
de> </td> <td> U+000D0 </td> <td> <span cla=
ss=3Dglyph title=3D"">Ð</span> </td> &lt=
;tr id=3Dentity-ETH-legacy class=3Dimpl><td> <code title=3D&q=
uot;">ETH</code> </td> <td> U+000D0 </td>=
 <td> <span title=3D"">Ð</span> </=
td> </tr><!-- (invalid entity with missing semicolon for lega=
cy support only) --><tr id=3Dentity-eth><td> <code titl=
e=3D"">eth;</code> </td> <td> U+000F0 <=
/td> <td> <span class=3Dglyph title=3D"">&et=
h;</span> </td> <tr id=3Dentity-eth-legacy class=3Dimpl&gt=
;<td> <code title=3D"">eth</code> </td>=
 <td> U+000F0 </td> <td> <span title=3D""&=
gt;ð</span> </td> </tr><!-- (invalid entity =
with missing semicolon for legacy support only) --><tr id=3Dentity-=
Euml><td> <code title=3D"">Euml;</code> &l=
t;/td> <td> U+000CB </td> <td> <span class=3Dglyp=
h title=3D"">Ë</span> </td> <tr id=3D=
entity-Euml-legacy class=3Dimpl><td> <code title=3D"&quo=
t;>Euml</code> </td> <td> U+000CB </td> <td=
> <span title=3D"">Ë</span> </td>=
 </tr><!-- (invalid entity with missing semicolon for legacy sup=
port only) --><tr id=3Dentity-euml><td> <code title=3D&=
quot;">euml;</code> </td> <td> U+000EB </td&=
gt; <td> <span class=3Dglyph title=3D"">ë&=
lt;/span> </td> <tr id=3Dentity-euml-legacy class=3Dimpl>&=
lt;td> <code title=3D"">euml</code> </td> =
<td> U+000EB </td> <td> <span title=3D""&g=
t;ë</span> </td> </tr><!-- (invalid entity =
with missing semicolon for legacy support only) --><tr id=3Dentity-=
euro><td> <code title=3D"">euro;</code> &l=
t;/td> <td> U+020AC </td> <td> <span class=3Dglyp=
h title=3D"">€</span> </td> <tr id=3D=
entity-excl><td> <code title=3D"">excl;</code=
> </td> <td> U+00021 </td> <td> <span class=
=3Dglyph title=3D"">!</span> </td> <tr id=3De=
ntity-exist><td> <code title=3D"">exist;</cod=
e> </td> <td> U+02203 </td> <td> <span clas=
s=3Dglyph title=3D"">∃</span> </td> &l=
t;tr id=3Dentity-Exists><td> <code title=3D"">Ex=
ists;</code> </td> <td> U+02203 </td> <td> =
<span class=3Dglyph title=3D"">∃</span> &=
lt;/td> <tr id=3Dentity-expectation><td> <code title=3D=
"">expectation;</code> </td> <td> U+02130 =
</td> <td> <span class=3Dglyph title=3D"">&am=
p;expectation;</span> </td> <tr id=3Dentity-ExponentialE&g=
t;<td> <code title=3D"">ExponentialE;</code> =
</td> <td> U+02147 </td> <td> <span class=3Dgl=
yph title=3D"">ⅇ</span> </td> &=
lt;tr id=3Dentity-exponentiale><td> <code title=3D"&quot=
;>exponentiale;</code> </td> <td> U+02147 </td&gt=
; <td> <span class=3Dglyph title=3D"">&exponent=
iale;</span> </td> <tr id=3Dentity-fallingdotseq><td=
> <code title=3D"">fallingdotseq;</code> </td=
> <td> U+02252 </td> <td> <span class=3Dglyph tit=
le=3D"">≒</span> </td> <tr =
id=3Dentity-Fcy><td> <code title=3D"">Fcy;</c=
ode> </td> <td> U+00424 </td> <td> <span cl=
ass=3Dglyph title=3D"">Ф</span> </td> &l=
t;tr id=3Dentity-fcy><td> <code title=3D"">fcy;&=
lt;/code> </td> <td> U+00444 </td> <td> <sp=
an class=3Dglyph title=3D"">ф</span> </td&g=
t; <tr id=3Dentity-female><td> <code title=3D""&=
gt;female;</code> </td> <td> U+02640 </td> <td=
> <span class=3Dglyph title=3D"">♀</span=
> </td> <tr id=3Dentity-ffilig><td> <code title=3D=
"">ffilig;</code> </td> <td> U+0FB03 </=
td> <td> <span class=3Dglyph title=3D"">&ffi=
lig;</span> </td> <tr id=3Dentity-fflig><td> <=
code title=3D"">fflig;</code> </td> <td> U=
+0FB00 </td> <td> <span class=3Dglyph title=3D""=
>ff</span> </td> <tr id=3Dentity-ffllig>&lt=
;td> <code title=3D"">ffllig;</code> </td>=
 <td> U+0FB04 </td> <td> <span class=3Dglyph title=3D=
"">ffl</span> </td> <tr id=3Dentity-=
Ffr><td> <code title=3D"">Ffr;</code> <=
/td> <td> U+1D509 </td> <td> <span class=3Dglyph =
title=3D"">𝔉</span> </td> <tr id=3Den=
tity-ffr><td> <code title=3D"">ffr;</code>=
 </td> <td> U+1D523 </td> <td> <span class=3Dg=
lyph title=3D"">𝔣</span> </td> <tr id=
=3Dentity-filig><td> <code title=3D"">filig;<=
/code> </td> <td> U+0FB01 </td> <td> <span =
class=3Dglyph title=3D"">fi</span> </td&gt=
; <tr id=3Dentity-FilledSmallSquare><td> <code title=3D&qu=
ot;">FilledSmallSquare;</code> </td> <td> U+025=
FC </td> <td> <span class=3Dglyph title=3D"">=
◼</span> </td> <tr id=3Dentity-Fille=
dVerySmallSquare><td> <code title=3D"">FilledVer=
ySmallSquare;</code> </td> <td> U+025AA </td> &lt=
;td> <span class=3Dglyph title=3D"">▪&=
lt;/span> </td> <tr id=3Dentity-fjlig><td> <code =
title=3D"">fjlig;</code> </td> <td> U+0006=
6 U+0006A </td> <td> <span class=3D"glyph compound&qu=
ot; title=3D"">fj</span> </td> <tr id=3Dentit=
y-flat><td> <code title=3D"">flat;</code> =
</td> <td> U+0266D </td> <td> <span class=3Dgl=
yph title=3D"">♭</span> </td> <tr id=
=3Dentity-fllig><td> <code title=3D"">fllig;<=
/code> </td> <td> U+0FB02 </td> <td> <span =
class=3Dglyph title=3D"">fl</span> </td&gt=
; <tr id=3Dentity-fltns><td> <code title=3D""&gt=
;fltns;</code> </td> <td> U+025B1 </td> <td&gt=
; <span class=3Dglyph title=3D"">▱</span>=
 </td> <tr id=3Dentity-fnof><td> <code title=3D&quot=
;">fnof;</code> </td> <td> U+00192 </td> =
<td> <span class=3Dglyph title=3D"">ƒ</=
span> </td> <tr id=3Dentity-Fopf><td> <code title=
=3D"">Fopf;</code> </td> <td> U+1D53D <=
/td> <td> <span class=3Dglyph title=3D"">&Fo=
pf;</span> </td> <tr id=3Dentity-fopf><td> <co=
de title=3D"">fopf;</code> </td> <td> U+1D=
557 </td> <td> <span class=3Dglyph title=3D""&gt=
;𝕗</span> </td> <tr id=3Dentity-ForAll><td&=
gt; <code title=3D"">ForAll;</code> </td> &lt=
;td> U+02200 </td> <td> <span class=3Dglyph title=3D&qu=
ot;">∀</span> </td> <tr id=3Dentity-for=
all><td> <code title=3D"">forall;</code> &=
lt;/td> <td> U+02200 </td> <td> <span class=3Dgly=
ph title=3D"">∀</span> </td> <tr i=
d=3Dentity-fork><td> <code title=3D"">fork;</=
code> </td> <td> U+022D4 </td> <td> <span c=
lass=3Dglyph title=3D"">⋔</span> </td> =
<tr id=3Dentity-forkv><td> <code title=3D"">f=
orkv;</code> </td> <td> U+02AD9 </td> <td> =
<span class=3Dglyph title=3D"">⫙</span> &=
lt;/td> <tr id=3Dentity-Fouriertrf><td> <code title=3D&=
quot;">Fouriertrf;</code> </td> <td> U+02131 &l=
t;/td> <td> <span class=3Dglyph title=3D"">&=
Fscr;</span> </td> <tr id=3Dentity-fpartint><td> =
<code title=3D"">fpartint;</code> </td> <t=
d> U+02A0D </td> <td> <span class=3Dglyph title=3D&quot=
;">⨍</span> </td> <tr id=3Dentity-fra=
c12><td> <code title=3D"">frac12;</code> &=
lt;/td> <td> U+000BD </td> <td> <span class=3Dgly=
ph title=3D"">½</span> </td> <tr id=3D=
entity-frac12-legacy class=3Dimpl><td> <code title=3D"&q=
uot;>frac12</code> </td> <td> U+000BD </td> &l=
t;td> <span title=3D"">½</span> </td=
> </tr><!-- (invalid entity with missing semicolon for legacy=
 support only) --><tr id=3Dentity-frac13><td> <code tit=
le=3D"">frac13;</code> </td> <td> U+02153 =
</td> <td> <span class=3Dglyph title=3D"">&am=
p;frac13;</span> </td> <tr id=3Dentity-frac14><td&gt=
; <code title=3D"">frac14;</code> </td> <t=
d> U+000BC </td> <td> <span class=3Dglyph title=3D&quot=
;">¼</span> </td> <tr id=3Dentity-frac1=
4-legacy class=3Dimpl><td> <code title=3D"">frac=
14</code> </td> <td> U+000BC </td> <td> &lt=
;span title=3D"">¼</span> </td> </=
tr><!-- (invalid entity with missing semicolon for legacy support o=
nly) --><tr id=3Dentity-frac15><td> <code title=3D&quot=
;">frac15;</code> </td> <td> U+02155 </td&gt=
; <td> <span class=3Dglyph title=3D"">⅕&=
lt;/span> </td> <tr id=3Dentity-frac16><td> <code=
 title=3D"">frac16;</code> </td> <td> U+02=
159 </td> <td> <span class=3Dglyph title=3D""&gt=
;⅙</span> </td> <tr id=3Dentity-frac18><t=
d> <code title=3D"">frac18;</code> </td> &=
lt;td> U+0215B </td> <td> <span class=3Dglyph title=3D&=
quot;">⅛</span> </td> <tr id=3Dentity-f=
rac23><td> <code title=3D"">frac23;</code>=
 </td> <td> U+02154 </td> <td> <span class=3Dg=
lyph title=3D"">⅔</span> </td> <tr=
 id=3Dentity-frac25><td> <code title=3D"">frac25=
;</code> </td> <td> U+02156 </td> <td> <=
span class=3Dglyph title=3D"">⅖</span> <=
/td> <tr id=3Dentity-frac34><td> <code title=3D"&q=
uot;>frac34;</code> </td> <td> U+000BE </td> &=
lt;td> <span class=3Dglyph title=3D"">¾<=
/span> </td> <tr id=3Dentity-frac34-legacy class=3Dimpl>&l=
t;td> <code title=3D"">frac34</code> </td>=
 <td> U+000BE </td> <td> <span title=3D""&=
gt;¾</span> </td> </tr><!-- (invalid enti=
ty with missing semicolon for legacy support only) --><tr id=3Denti=
ty-frac35><td> <code title=3D"">frac35;</code=
> </td> <td> U+02157 </td> <td> <span class=
=3Dglyph title=3D"">⅗</span> </td> &l=
t;tr id=3Dentity-frac38><td> <code title=3D"">fr=
ac38;</code> </td> <td> U+0215C </td> <td> =
<span class=3Dglyph title=3D"">⅜</span> =
</td> <tr id=3Dentity-frac45><td> <code title=3D&quo=
t;">frac45;</code> </td> <td> U+02158 </td&g=
t; <td> <span class=3Dglyph title=3D"">⅘=
</span> </td> <tr id=3Dentity-frac56><td> <cod=
e title=3D"">frac56;</code> </td> <td> U+0=
215A </td> <td> <span class=3Dglyph title=3D""&g=
t;⅚</span> </td> <tr id=3Dentity-frac58><=
td> <code title=3D"">frac58;</code> </td> =
<td> U+0215D </td> <td> <span class=3Dglyph title=3D=
"">⅝</span> </td> <tr id=3Dentity-=
frac78><td> <code title=3D"">frac78;</code&gt=
; </td> <td> U+0215E </td> <td> <span class=3D=
glyph title=3D"">⅞</span> </td> <t=
r id=3Dentity-frasl><td> <code title=3D"">frasl;=
</code> </td> <td> U+02044 </td> <td> <s=
pan class=3Dglyph title=3D"">⁄</span> </t=
d> <tr id=3Dentity-frown><td> <code title=3D"&quot=
;>frown;</code> </td> <td> U+02322 </td> <t=
d> <span class=3Dglyph title=3D"">⌢</span=
> </td> <tr id=3Dentity-Fscr><td> <code title=3D&=
quot;">Fscr;</code> </td> <td> U+02131 </td&=
gt; <td> <span class=3Dglyph title=3D"">ℱ&=
lt;/span> </td> <tr id=3Dentity-fscr><td> <code t=
itle=3D"">fscr;</code> </td> <td> U+1D4BB =
</td> <td> <span class=3Dglyph title=3D"">&am=
p;fscr;</span> </td> <tr id=3Dentity-gacute><td> =
<code title=3D"">gacute;</code> </td> <td&=
gt; U+001F5 </td> <td> <span class=3Dglyph title=3D"&=
quot;>ǵ</span> </td> <tr id=3Dentity-Gamma&g=
t;<td> <code title=3D"">Gamma;</code> </td=
> <td> U+00393 </td> <td> <span class=3Dglyph tit=
le=3D"">Γ</span> </td> <tr id=3Dent=
ity-gamma><td> <code title=3D"">gamma;</code&=
gt; </td> <td> U+003B3 </td> <td> <span class=3D=
glyph title=3D"">γ</span> </td> <tr=
 id=3Dentity-Gammad><td> <code title=3D"">Gammad=
;</code> </td> <td> U+003DC </td> <td> <=
span class=3Dglyph title=3D"">Ϝ</span> <=
/td> <tr id=3Dentity-gammad><td> <code title=3D"&q=
uot;>gammad;</code> </td> <td> U+003DD </td> &=
lt;td> <span class=3Dglyph title=3D"">ϝ<=
/span> </td> <tr id=3Dentity-gap><td> <code title=
=3D"">gap;</code> </td> <td> U+02A86 </=
td> <td> <span class=3Dglyph title=3D"">&gap=
;</span> </td> <tr id=3Dentity-Gbreve><td> <co=
de title=3D"">Gbreve;</code> </td> <td> U+=
0011E </td> <td> <span class=3Dglyph title=3D""&=
gt;Ğ</span> </td> <tr id=3Dentity-gbreve>&lt=
;td> <code title=3D"">gbreve;</code> </td>=
 <td> U+0011F </td> <td> <span class=3Dglyph title=3D=
"">ğ</span> </td> <tr id=3Dentity-=
Gcedil><td> <code title=3D"">Gcedil;</code&gt=
; </td> <td> U+00122 </td> <td> <span class=3D=
glyph title=3D"">Ģ</span> </td> <t=
r id=3Dentity-Gcirc><td> <code title=3D"">Gcirc;=
</code> </td> <td> U+0011C </td> <td> <s=
pan class=3Dglyph title=3D"">Ĝ</span> </t=
d> <tr id=3Dentity-gcirc><td> <code title=3D"&quot=
;>gcirc;</code> </td> <td> U+0011D </td> <t=
d> <span class=3Dglyph title=3D"">ĝ</span=
> </td> <tr id=3Dentity-Gcy><td> <code title=3D&q=
uot;">Gcy;</code> </td> <td> U+00413 </td&gt=
; <td> <span class=3Dglyph title=3D"">Г<=
/span> </td> <tr id=3Dentity-gcy><td> <code title=
=3D"">gcy;</code> </td> <td> U+00433 </=
td> <td> <span class=3Dglyph title=3D"">&gcy=
;</span> </td> <tr id=3Dentity-Gdot><td> <code=
 title=3D"">Gdot;</code> </td> <td> U+0012=
0 </td> <td> <span class=3Dglyph title=3D"">&=
amp;Gdot;</span> </td> <tr id=3Dentity-gdot><td> =
<code title=3D"">gdot;</code> </td> <td&gt=
; U+00121 </td> <td> <span class=3Dglyph title=3D"&qu=
ot;>ġ</span> </td> <tr id=3Dentity-gE><t=
d> <code title=3D"">gE;</code> </td> <t=
d> U+02267 </td> <td> <span class=3Dglyph title=3D&quot=
;">≧</span> </td> <tr id=3Dentity-ge>&=
lt;td> <code title=3D"">ge;</code> </td> &=
lt;td> U+02265 </td> <td> <span class=3Dglyph title=3D&=
quot;">≥</span> </td> <tr id=3Dentity-gEl&g=
t;<td> <code title=3D"">gEl;</code> </td&g=
t; <td> U+02A8C </td> <td> <span class=3Dglyph title=
=3D"">⪌</span> </td> <tr id=3D=
entity-gel><td> <code title=3D"">gel;</code&g=
t; </td> <td> U+022DB </td> <td> <span class=3D=
glyph title=3D"">⋛</span> </td> <tr i=
d=3Dentity-geq><td> <code title=3D"">geq;</co=
de> </td> <td> U+02265 </td> <td> <span cla=
ss=3Dglyph title=3D"">≥</span> </td> <=
tr id=3Dentity-geqq><td> <code title=3D"">geqq;&=
lt;/code> </td> <td> U+02267 </td> <td> <sp=
an class=3Dglyph title=3D"">≧</span> </td&=
gt; <tr id=3Dentity-geqslant><td> <code title=3D"&quo=
t;>geqslant;</code> </td> <td> U+02A7E </td> &=
lt;td> <span class=3Dglyph title=3D"">⩾</sp=
an> </td> <tr id=3Dentity-ges><td> <code title=3D=
"">ges;</code> </td> <td> U+02A7E </td&=
gt; <td> <span class=3Dglyph title=3D"">⩾&l=
t;/span> </td> <tr id=3Dentity-gescc><td> <code t=
itle=3D"">gescc;</code> </td> <td> U+02AA9=
 </td> <td> <span class=3Dglyph title=3D"">&a=
mp;gescc;</span> </td> <tr id=3Dentity-gesdot><td&gt=
; <code title=3D"">gesdot;</code> </td> <t=
d> U+02A80 </td> <td> <span class=3Dglyph title=3D&quot=
;">⪀</span> </td> <tr id=3Dentity-gesdo=
to><td> <code title=3D"">gesdoto;</code> &=
lt;/td> <td> U+02A82 </td> <td> <span class=3Dgly=
ph title=3D"">⪂</span> </td> <tr =
id=3Dentity-gesdotol><td> <code title=3D"">gesdo=
tol;</code> </td> <td> U+02A84 </td> <td> &=
lt;span class=3Dglyph title=3D"">⪄</span>=
 </td> <tr id=3Dentity-gesl><td> <code title=3D&quot=
;">gesl;</code> </td> <td> U+022DB U+0FE00 <=
/td> <td> <span class=3D"glyph compound" title=3D&q=
uot;">⋛︀</span> </td> <tr id=3D=
entity-gesles><td> <code title=3D"">gesles;</=
code> </td> <td> U+02A94 </td> <td> <span c=
lass=3Dglyph title=3D"">⪔</span> </td&gt=
; <tr id=3Dentity-Gfr><td> <code title=3D"">G=
fr;</code> </td> <td> U+1D50A </td> <td> &l=
t;span class=3Dglyph title=3D"">𝔊</span> </=
td> <tr id=3Dentity-gfr><td> <code title=3D""=
>gfr;</code> </td> <td> U+1D524 </td> <td&g=
t; <span class=3Dglyph title=3D"">𝔤</span> =
</td> <tr id=3Dentity-Gg><td> <code title=3D"&q=
uot;>Gg;</code> </td> <td> U+022D9 </td> <t=
d> <span class=3Dglyph title=3D"">⋙</span&g=
t; </td> <tr id=3Dentity-gg><td> <code title=3D&quot=
;">gg;</code> </td> <td> U+0226B </td> &l=
t;td> <span class=3Dglyph title=3D"">≫</span=
> </td> <tr id=3Dentity-ggg><td> <code title=3D&q=
uot;">ggg;</code> </td> <td> U+022D9 </td&gt=
; <td> <span class=3Dglyph title=3D"">⋙<=
/span> </td> <tr id=3Dentity-gimel><td> <code tit=
le=3D"">gimel;</code> </td> <td> U+02137 &=
lt;/td> <td> <span class=3Dglyph title=3D"">&amp=
;gimel;</span> </td> <tr id=3Dentity-GJcy><td> &l=
t;code title=3D"">GJcy;</code> </td> <td> =
U+00403 </td> <td> <span class=3Dglyph title=3D"&quot=
;>Ѓ</span> </td> <tr id=3Dentity-gjcy><t=
d> <code title=3D"">gjcy;</code> </td> &lt=
;td> U+00453 </td> <td> <span class=3Dglyph title=3D&qu=
ot;">ѓ</span> </td> <tr id=3Dentity-gl&gt=
;<td> <code title=3D"">gl;</code> </td>=
 <td> U+02277 </td> <td> <span class=3Dglyph title=3D=
"">≷</span> </td> <tr id=3Dentity=
-gla><td> <code title=3D"">gla;</code> &lt=
;/td> <td> U+02AA5 </td> <td> <span class=3Dglyph=
 title=3D"">⪥</span> </td> <tr id=3De=
ntity-glE><td> <code title=3D"">glE;</code&gt=
; </td> <td> U+02A92 </td> <td> <span class=3D=
glyph title=3D"">⪒</span> </td> <tr i=
d=3Dentity-glj><td> <code title=3D"">glj;</co=
de> </td> <td> U+02AA4 </td> <td> <span cla=
ss=3Dglyph title=3D"">⪤</span> </td> &lt=
;tr id=3Dentity-gnap><td> <code title=3D"">gnap;=
</code> </td> <td> U+02A8A </td> <td> <s=
pan class=3Dglyph title=3D"">⪊</span> </td=
> <tr id=3Dentity-gnapprox><td> <code title=3D"&qu=
ot;>gnapprox;</code> </td> <td> U+02A8A </td> =
<td> <span class=3Dglyph title=3D"">⪊</=
span> </td> <tr id=3Dentity-gnE><td> <code title=3D=
"">gnE;</code> </td> <td> U+02269 </td&=
gt; <td> <span class=3Dglyph title=3D"">≩=
</span> </td> <tr id=3Dentity-gne><td> <code t=
itle=3D"">gne;</code> </td> <td> U+02A88 &=
lt;/td> <td> <span class=3Dglyph title=3D"">&amp=
;gne;</span> </td> <tr id=3Dentity-gneq><td> <=
code title=3D"">gneq;</code> </td> <td> U+=
02A88 </td> <td> <span class=3Dglyph title=3D""&=
gt;⪈</span> </td> <tr id=3Dentity-gneqq><td&=
gt; <code title=3D"">gneqq;</code> </td> <=
td> U+02269 </td> <td> <span class=3Dglyph title=3D&quo=
t;">≩</span> </td> <tr id=3Dentity-gnsim=
><td> <code title=3D"">gnsim;</code> </=
td> <td> U+022E7 </td> <td> <span class=3Dglyph t=
itle=3D"">⋧</span> </td> <tr id=3De=
ntity-Gopf><td> <code title=3D"">Gopf;</code&=
gt; </td> <td> U+1D53E </td> <td> <span class=3D=
glyph title=3D"">𝔾</span> </td> <tr =
id=3Dentity-gopf><td> <code title=3D"">gopf;<=
/code> </td> <td> U+1D558 </td> <td> <span =
class=3Dglyph title=3D"">𝕘</span> </td>=
 <tr id=3Dentity-grave><td> <code title=3D"">=
grave;</code> </td> <td> U+00060 </td> <td>=
 <span class=3Dglyph title=3D"">`</span> </td&gt=
; <tr id=3Dentity-GreaterEqual><td> <code title=3D"&q=
uot;>GreaterEqual;</code> </td> <td> U+02265 </td=
> <td> <span class=3Dglyph title=3D"">≥&l=
t;/span> </td> <tr id=3Dentity-GreaterEqualLess><td>=
 <code title=3D"">GreaterEqualLess;</code> </td&=
gt; <td> U+022DB </td> <td> <span class=3Dglyph titl=
e=3D"">⋛</span> </td> <tr id=3Dentity=
-GreaterFullEqual><td> <code title=3D"">GreaterF=
ullEqual;</code> </td> <td> U+02267 </td> <td&=
gt; <span class=3Dglyph title=3D"">≧</span&gt=
; </td> <tr id=3Dentity-GreaterGreater><td> <code ti=
tle=3D"">GreaterGreater;</code> </td> <td>=
 U+02AA2 </td> <td> <span class=3Dglyph title=3D"&quo=
t;>⪢</span> </td> <tr id=3Dentity-Gr=
eaterLess><td> <code title=3D"">GreaterLess;<=
/code> </td> <td> U+02277 </td> <td> <span =
class=3Dglyph title=3D"">≷</span> </td&=
gt; <tr id=3Dentity-GreaterSlantEqual><td> <code title=3D&=
quot;">GreaterSlantEqual;</code> </td> <td> U+0=
2A7E </td> <td> <span class=3Dglyph title=3D""&g=
t;⩾</span> </td> <tr id=3Dentity-GreaterTilde>&=
lt;td> <code title=3D"">GreaterTilde;</code> &lt=
;/td> <td> U+02273 </td> <td> <span class=3Dglyph=
 title=3D"">≳</span> </td> <tr id=3D=
entity-Gscr><td> <code title=3D"">Gscr;</code=
> </td> <td> U+1D4A2 </td> <td> <span class=
=3Dglyph title=3D"">𝒢</span> </td> <=
tr id=3Dentity-gscr><td> <code title=3D"">gscr;&=
lt;/code> </td> <td> U+0210A </td> <td> <sp=
an class=3Dglyph title=3D"">ℊ</span> </td&=
gt; <tr id=3Dentity-gsim><td> <code title=3D""&g=
t;gsim;</code> </td> <td> U+02273 </td> <td&gt=
; <span class=3Dglyph title=3D"">≳</span&gt=
; </td> <tr id=3Dentity-gsime><td> <code title=3D&qu=
ot;">gsime;</code> </td> <td> U+02A8E </td&g=
t; <td> <span class=3Dglyph title=3D"">⪎&=
lt;/span> </td> <tr id=3Dentity-gsiml><td> <code =
title=3D"">gsiml;</code> </td> <td> U+02A9=
0 </td> <td> <span class=3Dglyph title=3D"">&=
amp;gsiml;</span> </td> <tr id=3Dentity-GT><td> &=
lt;code title=3D"">GT;</code> </td> <td> U=
+0003E </td> <td> <span class=3Dglyph title=3D""=
>></span> </td> <tr id=3Dentity-GT-legacy class=3D=
impl><td> <code title=3D"">GT</code> </=
td> <td> U+0003E </td> <td> <span title=3D"&=
quot;>></span> </td> </tr><!-- (invalid en=
tity with missing semicolon for legacy support only) --><tr id=3Den=
tity-Gt><td> <code title=3D"">Gt;</code> &=
lt;/td> <td> U+0226B </td> <td> <span class=3Dgly=
ph title=3D"">≫</span> </td> <tr id=3D=
entity-gt><td> <code title=3D"">gt;</code>=
 </td> <td> U+0003E </td> <td> <span class=3Dg=
lyph title=3D"">></span> </td> <tr id=3D=
entity-gt-legacy class=3Dimpl><td> <code title=3D""=
>gt</code> </td> <td> U+0003E </td> <td>=
 <span title=3D"">></span> </td> </=
tr><!-- (invalid entity with missing semicolon for legacy support o=
nly) --><tr id=3Dentity-gtcc><td> <code title=3D"&=
quot;>gtcc;</code> </td> <td> U+02AA7 </td> &l=
t;td> <span class=3Dglyph title=3D"">⪧</sp=
an> </td> <tr id=3Dentity-gtcir><td> <code title=3D=
"">gtcir;</code> </td> <td> U+02A7A </t=
d> <td> <span class=3Dglyph title=3D"">&gtci=
r;</span> </td> <tr id=3Dentity-gtdot><td> <co=
de title=3D"">gtdot;</code> </td> <td> U+0=
22D7 </td> <td> <span class=3Dglyph title=3D""&g=
t;⋗</span> </td> <tr id=3Dentity-gtlPar><t=
d> <code title=3D"">gtlPar;</code> </td> &=
lt;td> U+02995 </td> <td> <span class=3Dglyph title=3D&=
quot;">⦕</span> </td> <tr id=3Dentity-g=
tquest><td> <code title=3D"">gtquest;</code&g=
t; </td> <td> U+02A7C </td> <td> <span class=3D=
glyph title=3D"">⩼</span> </td> <=
tr id=3Dentity-gtrapprox><td> <code title=3D"">g=
trapprox;</code> </td> <td> U+02A86 </td> <td&=
gt; <span class=3Dglyph title=3D"">⪆</span>=
 </td> <tr id=3Dentity-gtrarr><td> <code title=3D&qu=
ot;">gtrarr;</code> </td> <td> U+02978 </td&=
gt; <td> <span class=3Dglyph title=3D"">&gtrarr=
;</span> </td> <tr id=3Dentity-gtrdot><td> <co=
de title=3D"">gtrdot;</code> </td> <td> U+=
022D7 </td> <td> <span class=3Dglyph title=3D""&=
gt;⋗</span> </td> <tr id=3Dentity-gtreqless>&=
lt;td> <code title=3D"">gtreqless;</code> </t=
d> <td> U+022DB </td> <td> <span class=3Dglyph ti=
tle=3D"">⋛</span> </td> <tr id=3Denti=
ty-gtreqqless><td> <code title=3D"">gtreqqless;&=
lt;/code> </td> <td> U+02A8C </td> <td> <sp=
an class=3Dglyph title=3D"">⪌</span> &l=
t;/td> <tr id=3Dentity-gtrless><td> <code title=3D&quot=
;">gtrless;</code> </td> <td> U+02277 </td&g=
t; <td> <span class=3Dglyph title=3D"">&gtrless=
;</span> </td> <tr id=3Dentity-gtrsim><td> <co=
de title=3D"">gtrsim;</code> </td> <td> U+=
02273 </td> <td> <span class=3Dglyph title=3D""&=
gt;≳</span> </td> <tr id=3Dentity-gvertneqq>=
<td> <code title=3D"">gvertneqq;</code> </=
td> <td> U+02269 U+0FE00 </td> <td> <span class=3D=
"glyph compound" title=3D"">≩&#xfe00=
;</span> </td> <tr id=3Dentity-gvnE><td> <code=
 title=3D"">gvnE;</code> </td> <td> U+0226=
9 U+0FE00 </td> <td> <span class=3D"glyph compound&qu=
ot; title=3D"">≩︀</span> </td&=
gt; <tr id=3Dentity-Hacek><td> <code title=3D""&=
gt;Hacek;</code> </td> <td> U+002C7 </td> <td&=
gt; <span class=3Dglyph title=3D"">ˇ</span&g=
t; </td> <tr id=3Dentity-hairsp><td> <code title=3D&=
quot;">hairsp;</code> </td> <td> U+0200A </t=
d> <td> <span class=3Dglyph title=3D"">&hair=
sp;</span> </td> <tr id=3Dentity-half><td> <co=
de title=3D"">half;</code> </td> <td> U+00=
0BD </td> <td> <span class=3Dglyph title=3D""&gt=
;½</span> </td> <tr id=3Dentity-hamilt><td&=
gt; <code title=3D"">hamilt;</code> </td> &lt=
;td> U+0210B </td> <td> <span class=3Dglyph title=3D&qu=
ot;">ℋ</span> </td> <tr id=3Dentity-HAR=
Dcy><td> <code title=3D"">HARDcy;</code> &=
lt;/td> <td> U+0042A </td> <td> <span class=3Dgly=
ph title=3D"">Ъ</span> </td> <tr i=
d=3Dentity-hardcy><td> <code title=3D"">hardcy;&=
lt;/code> </td> <td> U+0044A </td> <td> <sp=
an class=3Dglyph title=3D"">ъ</span> </t=
d> <tr id=3Dentity-hArr><td> <code title=3D""=
>hArr;</code> </td> <td> U+021D4 </td> <td&=
gt; <span class=3Dglyph title=3D"">⇔</span>=
 </td> <tr id=3Dentity-harr><td> <code title=3D&quot=
;">harr;</code> </td> <td> U+02194 </td> =
<td> <span class=3Dglyph title=3D"">&leftrighta=
rrow;</span> </td> <tr id=3Dentity-harrcir><td> &=
lt;code title=3D"">harrcir;</code> </td> <td&=
gt; U+02948 </td> <td> <span class=3Dglyph title=3D"&=
quot;>⥈</span> </td> <tr id=3Dentity-harrw&=
gt;<td> <code title=3D"">harrw;</code> </t=
d> <td> U+021AD </td> <td> <span class=3Dglyph ti=
tle=3D"">↭</span> </td> =
<tr id=3Dentity-Hat><td> <code title=3D"">Hat=
;</code> </td> <td> U+0005E </td> <td> <=
span class=3Dglyph title=3D"">^</span> </td> &lt=
;tr id=3Dentity-hbar><td> <code title=3D"">hbar;=
</code> </td> <td> U+0210F </td> <td> <s=
pan class=3Dglyph title=3D"">ℏ</span> </=
td> <tr id=3Dentity-Hcirc><td> <code title=3D"&quo=
t;>Hcirc;</code> </td> <td> U+00124 </td> <=
td> <span class=3Dglyph title=3D"">Ĥ</spa=
n> </td> <tr id=3Dentity-hcirc><td> <code title=3D=
"">hcirc;</code> </td> <td> U+00125 </t=
d> <td> <span class=3Dglyph title=3D"">&hcir=
c;</span> </td> <tr id=3Dentity-hearts><td> <c=
ode title=3D"">hearts;</code> </td> <td> U=
+02665 </td> <td> <span class=3Dglyph title=3D""=
>♥</span> </td> <tr id=3Dentity-heartsuit&gt=
;<td> <code title=3D"">heartsuit;</code> <=
/td> <td> U+02665 </td> <td> <span class=3Dglyph =
title=3D"">♥</span> </td> <tr id=3D=
entity-hellip><td> <code title=3D"">hellip;</=
code> </td> <td> U+02026 </td> <td> <span c=
lass=3Dglyph title=3D"">…</span> </td> =
<tr id=3Dentity-hercon><td> <code title=3D"">=
hercon;</code> </td> <td> U+022B9 </td> <td&gt=
; <span class=3Dglyph title=3D"">⊹</span&gt=
; </td> <tr id=3Dentity-Hfr><td> <code title=3D&quot=
;">Hfr;</code> </td> <td> U+0210C </td> &=
lt;td> <span class=3Dglyph title=3D"">ℌ</sp=
an> </td> <tr id=3Dentity-hfr><td> <code title=3D=
"">hfr;</code> </td> <td> U+1D525 </td&=
gt; <td> <span class=3Dglyph title=3D"">𝔥&l=
t;/span> </td> <tr id=3Dentity-HilbertSpace><td> &lt=
;code title=3D"">HilbertSpace;</code> </td> <=
td> U+0210B </td> <td> <span class=3Dglyph title=3D&quo=
t;">ℋ</span> </td> <tr id=3Dentity-hkse=
arow><td> <code title=3D"">hksearow;</code&gt=
; </td> <td> U+02925 </td> <td> <span class=3D=
glyph title=3D"">⤥</span> </td> &lt=
;tr id=3Dentity-hkswarow><td> <code title=3D"">h=
kswarow;</code> </td> <td> U+02926 </td> <td&g=
t; <span class=3Dglyph title=3D"">⤦</span=
> </td> <tr id=3Dentity-hoarr><td> <code title=3D=
"">hoarr;</code> </td> <td> U+021FF </t=
d> <td> <span class=3Dglyph title=3D"">&hoar=
r;</span> </td> <tr id=3Dentity-homtht><td> <c=
ode title=3D"">homtht;</code> </td> <td> U=
+0223B </td> <td> <span class=3Dglyph title=3D""=
>∻</span> </td> <tr id=3Dentity-hookleftarro=
w><td> <code title=3D"">hookleftarrow;</code&=
gt; </td> <td> U+021A9 </td> <td> <span class=3D=
glyph title=3D"">↩</span> </td&gt=
; <tr id=3Dentity-hookrightarrow><td> <code title=3D"=
">hookrightarrow;</code> </td> <td> U+021AA &lt=
;/td> <td> <span class=3Dglyph title=3D"">&h=
ookrightarrow;</span> </td> <tr id=3Dentity-Hopf><td=
> <code title=3D"">Hopf;</code> </td> <=
td> U+0210D </td> <td> <span class=3Dglyph title=3D&quo=
t;">ℍ</span> </td> <tr id=3Dentity=
-hopf><td> <code title=3D"">hopf;</code> &=
lt;/td> <td> U+1D559 </td> <td> <span class=3Dgly=
ph title=3D"">𝕙</span> </td> <tr id=3D=
entity-horbar><td> <code title=3D"">horbar;</=
code> </td> <td> U+02015 </td> <td> <span c=
lass=3Dglyph title=3D"">―</span> </td&gt=
; <tr id=3Dentity-HorizontalLine><td> <code title=3D"=
">HorizontalLine;</code> </td> <td> U+02500 &lt=
;/td> <td> <span class=3Dglyph title=3D"">&b=
oxh;</span> </td> <tr id=3Dentity-Hscr><td> <c=
ode title=3D"">Hscr;</code> </td> <td> U+0=
210B </td> <td> <span class=3Dglyph title=3D""&g=
t;ℋ</span> </td> <tr id=3Dentity-hscr><td=
> <code title=3D"">hscr;</code> </td> <=
td> U+1D4BD </td> <td> <span class=3Dglyph title=3D&quo=
t;">𝒽</span> </td> <tr id=3Dentity-hslash=
><td> <code title=3D"">hslash;</code> <=
/td> <td> U+0210F </td> <td> <span class=3Dglyph =
title=3D"">ℏ</span> </td> <tr id=3D=
entity-Hstrok><td> <code title=3D"">Hstrok;</=
code> </td> <td> U+00126 </td> <td> <span c=
lass=3Dglyph title=3D"">Ħ</span> </td&gt=
; <tr id=3Dentity-hstrok><td> <code title=3D""&g=
t;hstrok;</code> </td> <td> U+00127 </td> <td&=
gt; <span class=3Dglyph title=3D"">ħ</span&=
gt; </td> <tr id=3Dentity-HumpDownHump><td> <code ti=
tle=3D"">HumpDownHump;</code> </td> <td> U=
+0224E </td> <td> <span class=3Dglyph title=3D""=
>≎</span> </td> <tr id=3Dentity-HumpEqual>&=
lt;td> <code title=3D"">HumpEqual;</code> </t=
d> <td> U+0224F </td> <td> <span class=3Dglyph ti=
tle=3D"">≏</span> </td> <tr id=3De=
ntity-hybull><td> <code title=3D"">hybull;</c=
ode> </td> <td> U+02043 </td> <td> <span cl=
ass=3Dglyph title=3D"">⁃</span> </td>=
 <tr id=3Dentity-hyphen><td> <code title=3D""&gt=
;hyphen;</code> </td> <td> U+02010 </td> <td&g=
t; <span class=3Dglyph title=3D"">‐</span>=
 </td> <tr id=3Dentity-Iacute><td> <code title=3D&qu=
ot;">Iacute;</code> </td> <td> U+000CD </td&=
gt; <td> <span class=3Dglyph title=3D"">&Iacute=
;</span> </td> <tr id=3Dentity-Iacute-legacy class=3Dimpl&=
gt;<td> <code title=3D"">Iacute</code> </t=
d> <td> U+000CD </td> <td> <span title=3D"&q=
uot;>Í</span> </td> </tr><!-- (invalid=
 entity with missing semicolon for legacy support only) --><tr id=3D=
entity-iacute><td> <code title=3D"">iacute;</=
code> </td> <td> U+000ED </td> <td> <span c=
lass=3Dglyph title=3D"">í</span> </td&gt=
; <tr id=3Dentity-iacute-legacy class=3Dimpl><td> <code ti=
tle=3D"">iacute</code> </td> <td> U+000ED =
</td> <td> <span title=3D"">í</=
span> </td> </tr><!-- (invalid entity with missing semi=
colon for legacy support only) --><tr id=3Dentity-ic><td> =
<code title=3D"">ic;</code> </td> <td> =
U+02063 </td> <td> <span class=3Dglyph title=3D"&quot=
;>⁣</span> </td> <tr id=3Dentity-Icirc><td=
> <code title=3D"">Icirc;</code> </td> &lt=
;td> U+000CE </td> <td> <span class=3Dglyph title=3D&qu=
ot;">Î</span> </td> <tr id=3Dentity-Icir=
c-legacy class=3Dimpl><td> <code title=3D"">Icir=
c</code> </td> <td> U+000CE </td> <td> <=
span title=3D"">Î</span> </td> </tr=
><!-- (invalid entity with missing semicolon for legacy support onl=
y) --><tr id=3Dentity-icirc><td> <code title=3D"&q=
uot;>icirc;</code> </td> <td> U+000EE </td> &l=
t;td> <span class=3Dglyph title=3D"">î</s=
pan> </td> <tr id=3Dentity-icirc-legacy class=3Dimpl><t=
d> <code title=3D"">icirc</code> </td> &lt=
;td> U+000EE </td> <td> <span title=3D"">&=
amp;icirc;</span> </td> </tr><!-- (invalid entity wi=
th missing semicolon for legacy support only) --><tr id=3Dentity-Ic=
y><td> <code title=3D"">Icy;</code> </t=
d> <td> U+00418 </td> <td> <span class=3Dglyph ti=
tle=3D"">И</span> </td> <tr id=3Denti=
ty-icy><td> <code title=3D"">icy;</code> &=
lt;/td> <td> U+00438 </td> <td> <span class=3Dgly=
ph title=3D"">и</span> </td> <tr id=3D=
entity-Idot><td> <code title=3D"">Idot;</code=
> </td> <td> U+00130 </td> <td> <span class=
=3Dglyph title=3D"">İ</span> </td> <=
tr id=3Dentity-IEcy><td> <code title=3D"">IEcy;&=
lt;/code> </td> <td> U+00415 </td> <td> <sp=
an class=3Dglyph title=3D"">Е</span> </td&=
gt; <tr id=3Dentity-iecy><td> <code title=3D""&g=
t;iecy;</code> </td> <td> U+00435 </td> <td&gt=
; <span class=3Dglyph title=3D"">е</span> =
</td> <tr id=3Dentity-iexcl><td> <code title=3D&quot=
;">iexcl;</code> </td> <td> U+000A1 </td>=
 <td> <span class=3Dglyph title=3D"">¡&lt=
;/span> </td> <tr id=3Dentity-iexcl-legacy class=3Dimpl>&l=
t;td> <code title=3D"">iexcl</code> </td> =
<td> U+000A1 </td> <td> <span title=3D""&g=
t;¡</span> </td> </tr><!-- (invalid entity=
 with missing semicolon for legacy support only) --><tr id=3Dentity=
-iff><td> <code title=3D"">iff;</code> &lt=
;/td> <td> U+021D4 </td> <td> <span class=3Dglyph=
 title=3D"">⇔</span> </td> <tr id=3De=
ntity-Ifr><td> <code title=3D"">Ifr;</code&gt=
; </td> <td> U+02111 </td> <td> <span class=3D=
glyph title=3D"">ℑ</span> </td> <tr=
 id=3Dentity-ifr><td> <code title=3D"">ifr;</=
code> </td> <td> U+1D526 </td> <td> <span c=
lass=3Dglyph title=3D"">𝔦</span> </td> &=
lt;tr id=3Dentity-Igrave><td> <code title=3D"">I=
grave;</code> </td> <td> U+000CC </td> <td>=
 <span class=3Dglyph title=3D"">Ì</span>=
 </td> <tr id=3Dentity-Igrave-legacy class=3Dimpl><td> =
<code title=3D"">Igrave</code> </td> <td&g=
t; U+000CC </td> <td> <span title=3D"">&I=
grave;</span> </td> </tr><!-- (invalid entity with m=
issing semicolon for legacy support only) --><tr id=3Dentity-igrave=
><td> <code title=3D"">igrave;</code> <=
/td> <td> U+000EC </td> <td> <span class=3Dglyph =
title=3D"">ì</span> </td> <tr id=3D=
entity-igrave-legacy class=3Dimpl><td> <code title=3D"&q=
uot;>igrave</code> </td> <td> U+000EC </td> &l=
t;td> <span title=3D"">ì</span> </=
td> </tr><!-- (invalid entity with missing semicolon for lega=
cy support only) --><tr id=3Dentity-ii><td> <code title=
=3D"">ii;</code> </td> <td> U+02148 </t=
d> <td> <span class=3Dglyph title=3D"">ⅈ&=
lt;/span> </td> <tr id=3Dentity-iiiint><td> <code=
 title=3D"">iiiint;</code> </td> <td> U+02=
A0C </td> <td> <span class=3Dglyph title=3D""&gt=
;⨌</span> </td> <tr id=3Dentity-iiint><td=
> <code title=3D"">iiint;</code> </td> &lt=
;td> U+0222D </td> <td> <span class=3Dglyph title=3D&qu=
ot;">∭</span> </td> <tr id=3Dentity-iinf=
in><td> <code title=3D"">iinfin;</code> &l=
t;/td> <td> U+029DC </td> <td> <span class=3Dglyp=
h title=3D"">⧜</span> </td> <tr id=
=3Dentity-iiota><td> <code title=3D"">iiota;<=
/code> </td> <td> U+02129 </td> <td> <span =
class=3Dglyph title=3D"">℩</span> </td&gt=
; <tr id=3Dentity-IJlig><td> <code title=3D""&gt=
;IJlig;</code> </td> <td> U+00132 </td> <td&gt=
; <span class=3Dglyph title=3D"">IJ</span>=
 </td> <tr id=3Dentity-ijlig><td> <code title=3D&quo=
t;">ijlig;</code> </td> <td> U+00133 </td&gt=
; <td> <span class=3Dglyph title=3D"">ij&l=
t;/span> </td> <tr id=3Dentity-Im><td> <code titl=
e=3D"">Im;</code> </td> <td> U+02111 </=
td> <td> <span class=3Dglyph title=3D"">&ima=
ge;</span> </td> <tr id=3Dentity-Imacr><td> <c=
ode title=3D"">Imacr;</code> </td> <td> U+=
0012A </td> <td> <span class=3Dglyph title=3D""&=
gt;Ī</span> </td> <tr id=3Dentity-imacr><t=
d> <code title=3D"">imacr;</code> </td> &l=
t;td> U+0012B </td> <td> <span class=3Dglyph title=3D&q=
uot;">ī</span> </td> <tr id=3Dentity-ima=
ge><td> <code title=3D"">image;</code> &lt=
;/td> <td> U+02111 </td> <td> <span class=3Dglyph=
 title=3D"">ℑ</span> </td> <tr id=3D=
entity-ImaginaryI><td> <code title=3D"">Imaginar=
yI;</code> </td> <td> U+02148 </td> <td> &l=
t;span class=3Dglyph title=3D"">ⅈ</span> </t=
d> <tr id=3Dentity-imagline><td> <code title=3D"&q=
uot;>imagline;</code> </td> <td> U+02110 </td>=
 <td> <span class=3Dglyph title=3D"">ℐ=
</span> </td> <tr id=3Dentity-imagpart><td> <c=
ode title=3D"">imagpart;</code> </td> <td>=
 U+02111 </td> <td> <span class=3Dglyph title=3D"&quo=
t;>ℑ</span> </td> <tr id=3Dentity-imath>&l=
t;td> <code title=3D"">imath;</code> </td>=
 <td> U+00131 </td> <td> <span class=3Dglyph title=3D=
"">ı</span> </td> <tr id=3Dentity-=
imof><td> <code title=3D"">imof;</code> &l=
t;/td> <td> U+022B7 </td> <td> <span class=3Dglyp=
h title=3D"">⊷</span> </td> <tr id=3D=
entity-imped><td> <code title=3D"">imped;</co=
de> </td> <td> U+001B5 </td> <td> <span cla=
ss=3Dglyph title=3D"">Ƶ</span> </td> &=
lt;tr id=3Dentity-Implies><td> <code title=3D"">=
Implies;</code> </td> <td> U+021D2 </td> <td&g=
t; <span class=3Dglyph title=3D"">⇒</span&=
gt; </td> <tr id=3Dentity-in><td> <code title=3D&quo=
t;">in;</code> </td> <td> U+02208 </td> &=
lt;td> <span class=3Dglyph title=3D"">∈</spa=
n> </td> <tr id=3Dentity-incare><td> <code title=3D=
"">incare;</code> </td> <td> U+02105 </=
td> <td> <span class=3Dglyph title=3D"">&inc=
are;</span> </td> <tr id=3Dentity-infin><td> <=
code title=3D"">infin;</code> </td> <td> U=
+0221E </td> <td> <span class=3Dglyph title=3D""=
>∞</span> </td> <tr id=3Dentity-infintie>&=
lt;td> <code title=3D"">infintie;</code> </td=
> <td> U+029DD </td> <td> <span class=3Dglyph tit=
le=3D"">⧝</span> </td> <tr id=3D=
entity-inodot><td> <code title=3D"">inodot;</=
code> </td> <td> U+00131 </td> <td> <span c=
lass=3Dglyph title=3D"">ı</span> </td&gt=
; <tr id=3Dentity-Int><td> <code title=3D"">I=
nt;</code> </td> <td> U+0222C </td> <td> &l=
t;span class=3Dglyph title=3D"">∬</span> </=
td> <tr id=3Dentity-int><td> <code title=3D""=
>int;</code> </td> <td> U+0222B </td> <td&g=
t; <span class=3Dglyph title=3D"">∫</span> =
</td> <tr id=3Dentity-intcal><td> <code title=3D&quo=
t;">intcal;</code> </td> <td> U+022BA </td&g=
t; <td> <span class=3Dglyph title=3D"">⊺=
</span> </td> <tr id=3Dentity-integers><td> <c=
ode title=3D"">integers;</code> </td> <td>=
 U+02124 </td> <td> <span class=3Dglyph title=3D"&quo=
t;>ℤ</span> </td> <tr id=3Dentity-Integral=
><td> <code title=3D"">Integral;</code> &l=
t;/td> <td> U+0222B </td> <td> <span class=3Dglyp=
h title=3D"">∫</span> </td> <tr id=3D=
entity-intercal><td> <code title=3D"">intercal;&=
lt;/code> </td> <td> U+022BA </td> <td> <sp=
an class=3Dglyph title=3D"">⊺</span> </t=
d> <tr id=3Dentity-Intersection><td> <code title=3D&quo=
t;">Intersection;</code> </td> <td> U+022C2 &lt=
;/td> <td> <span class=3Dglyph title=3D"">&b=
igcap;</span> </td> <tr id=3Dentity-intlarhk><td>=
 <code title=3D"">intlarhk;</code> </td> <=
td> U+02A17 </td> <td> <span class=3Dglyph title=3D&quo=
t;">⨗</span> </td> <tr id=3Dentity-in=
tprod><td> <code title=3D"">intprod;</code&gt=
; </td> <td> U+02A3C </td> <td> <span class=3D=
glyph title=3D"">⨼</span> </td> <tr=
 id=3Dentity-InvisibleComma><td> <code title=3D""&g=
t;InvisibleComma;</code> </td> <td> U+02063 </td>=
 <td> <span class=3Dglyph title=3D"">⁣</s=
pan> </td> <tr id=3Dentity-InvisibleTimes><td> <c=
ode title=3D"">InvisibleTimes;</code> </td> <=
td> U+02062 </td> <td> <span class=3Dglyph title=3D&quo=
t;">⁢</span> </td> <tr id=3Dentity-IOcy>=
<td> <code title=3D"">IOcy;</code> </td&gt=
; <td> U+00401 </td> <td> <span class=3Dglyph title=3D=
"">Ё</span> </td> <tr id=3Dentity-io=
cy><td> <code title=3D"">iocy;</code> <=
/td> <td> U+00451 </td> <td> <span class=3Dglyph =
title=3D"">ё</span> </td> <tr id=3De=
ntity-Iogon><td> <code title=3D"">Iogon;</cod=
e> </td> <td> U+0012E </td> <td> <span clas=
s=3Dglyph title=3D"">Į</span> </td> &l=
t;tr id=3Dentity-iogon><td> <code title=3D"">iog=
on;</code> </td> <td> U+0012F </td> <td> &l=
t;span class=3Dglyph title=3D"">į</span> &lt=
;/td> <tr id=3Dentity-Iopf><td> <code title=3D"&qu=
ot;>Iopf;</code> </td> <td> U+1D540 </td> <=
td> <span class=3Dglyph title=3D"">𝕀</span=
> </td> <tr id=3Dentity-iopf><td> <code title=3D&=
quot;">iopf;</code> </td> <td> U+1D55A </td&=
gt; <td> <span class=3Dglyph title=3D"">𝕚&=
lt;/span> </td> <tr id=3Dentity-Iota><td> <code t=
itle=3D"">Iota;</code> </td> <td> U+00399 =
</td> <td> <span class=3Dglyph title=3D"">&am=
p;Iota;</span> </td> <tr id=3Dentity-iota><td> &l=
t;code title=3D"">iota;</code> </td> <td> =
U+003B9 </td> <td> <span class=3Dglyph title=3D"&quot=
;>ι</span> </td> <tr id=3Dentity-iprod><=
td> <code title=3D"">iprod;</code> </td> &=
lt;td> U+02A3C </td> <td> <span class=3Dglyph title=3D&=
quot;">⨼</span> </td> <tr id=3Dentity-iq=
uest><td> <code title=3D"">iquest;</code> =
</td> <td> U+000BF </td> <td> <span class=3Dgl=
yph title=3D"">¿</span> </td> <tr =
id=3Dentity-iquest-legacy class=3Dimpl><td> <code title=3D&qu=
ot;">iquest</code> </td> <td> U+000BF </td&g=
t; <td> <span title=3D"">¿</span> =
</td> </tr><!-- (invalid entity with missing semicolon for=
 legacy support only) --><tr id=3Dentity-Iscr><td> <cod=
e title=3D"">Iscr;</code> </td> <td> U+021=
10 </td> <td> <span class=3Dglyph title=3D"">=
ℐ</span> </td> <tr id=3Dentity-iscr><td=
> <code title=3D"">iscr;</code> </td> <=
td> U+1D4BE </td> <td> <span class=3Dglyph title=3D&quo=
t;">𝒾</span> </td> <tr id=3Dentity-isin&g=
t;<td> <code title=3D"">isin;</code> </td&=
gt; <td> U+02208 </td> <td> <span class=3Dglyph titl=
e=3D"">∈</span> </td> <tr id=3Dentity-=
isindot><td> <code title=3D"">isindot;</code&=
gt; </td> <td> U+022F5 </td> <td> <span class=3D=
glyph title=3D"">⋵</span> </td> <=
tr id=3Dentity-isinE><td> <code title=3D"">isinE=
;</code> </td> <td> U+022F9 </td> <td> <=
span class=3Dglyph title=3D"">⋹</span> </=
td> <tr id=3Dentity-isins><td> <code title=3D"&quo=
t;>isins;</code> </td> <td> U+022F4 </td> <=
td> <span class=3Dglyph title=3D"">⋴</spa=
n> </td> <tr id=3Dentity-isinsv><td> <code title=3D=
"">isinsv;</code> </td> <td> U+022F3 </=
td> <td> <span class=3Dglyph title=3D"">&isi=
nsv;</span> </td> <tr id=3Dentity-isinv><td> <=
code title=3D"">isinv;</code> </td> <td> U=
+02208 </td> <td> <span class=3Dglyph title=3D""=
>∈</span> </td> <tr id=3Dentity-it><td>=
 <code title=3D"">it;</code> </td> <td>=
 U+02062 </td> <td> <span class=3Dglyph title=3D"&quo=
t;>⁢</span> </td> <tr id=3Dentity-Itilde><=
td> <code title=3D"">Itilde;</code> </td> =
<td> U+00128 </td> <td> <span class=3Dglyph title=3D=
"">Ĩ</span> </td> <tr id=3Dentity-=
itilde><td> <code title=3D"">itilde;</code&gt=
; </td> <td> U+00129 </td> <td> <span class=3D=
glyph title=3D"">ĩ</span> </td> <t=
r id=3Dentity-Iukcy><td> <code title=3D"">Iukcy;=
</code> </td> <td> U+00406 </td> <td> <s=
pan class=3Dglyph title=3D"">І</span> </t=
d> <tr id=3Dentity-iukcy><td> <code title=3D"&quot=
;>iukcy;</code> </td> <td> U+00456 </td> <t=
d> <span class=3Dglyph title=3D"">і</span=
> </td> <tr id=3Dentity-Iuml><td> <code title=3D&=
quot;">Iuml;</code> </td> <td> U+000CF </td&=
gt; <td> <span class=3Dglyph title=3D"">Ï&=
lt;/span> </td> <tr id=3Dentity-Iuml-legacy class=3Dimpl>&=
lt;td> <code title=3D"">Iuml</code> </td> =
<td> U+000CF </td> <td> <span title=3D""&g=
t;Ï</span> </td> </tr><!-- (invalid entity =
with missing semicolon for legacy support only) --><tr id=3Dentity-=
iuml><td> <code title=3D"">iuml;</code> &l=
t;/td> <td> U+000EF </td> <td> <span class=3Dglyp=
h title=3D"">ï</span> </td> <tr id=3D=
entity-iuml-legacy class=3Dimpl><td> <code title=3D"&quo=
t;>iuml</code> </td> <td> U+000EF </td> <td=
> <span title=3D"">ï</span> </td>=
 </tr><!-- (invalid entity with missing semicolon for legacy sup=
port only) --><tr id=3Dentity-Jcirc><td> <code title=3D=
"">Jcirc;</code> </td> <td> U+00134 </t=
d> <td> <span class=3Dglyph title=3D"">&Jcir=
c;</span> </td> <tr id=3Dentity-jcirc><td> <co=
de title=3D"">jcirc;</code> </td> <td> U+0=
0135 </td> <td> <span class=3Dglyph title=3D""&g=
t;ĵ</span> </td> <tr id=3Dentity-Jcy><td&g=
t; <code title=3D"">Jcy;</code> </td> <td&=
gt; U+00419 </td> <td> <span class=3Dglyph title=3D"&=
quot;>Й</span> </td> <tr id=3Dentity-jcy>&lt=
;td> <code title=3D"">jcy;</code> </td> &l=
t;td> U+00439 </td> <td> <span class=3Dglyph title=3D&q=
uot;">й</span> </td> <tr id=3Dentity-Jfr&g=
t;<td> <code title=3D"">Jfr;</code> </td&g=
t; <td> U+1D50D </td> <td> <span class=3Dglyph title=
=3D"">𝔍</span> </td> <tr id=3Dentity-=
jfr><td> <code title=3D"">jfr;</code> <=
/td> <td> U+1D527 </td> <td> <span class=3Dglyph =
title=3D"">𝔧</span> </td> <tr id=3Den=
tity-jmath><td> <code title=3D"">jmath;</code=
> </td> <td> U+00237 </td> <td> <span class=
=3Dglyph title=3D"">ȷ</span> </td> &lt=
;tr id=3Dentity-Jopf><td> <code title=3D"">Jopf;=
</code> </td> <td> U+1D541 </td> <td> <s=
pan class=3Dglyph title=3D"">𝕁</span> </td=
> <tr id=3Dentity-jopf><td> <code title=3D""&=
gt;jopf;</code> </td> <td> U+1D55B </td> <td&g=
t; <span class=3Dglyph title=3D"">𝕛</span>=
 </td> <tr id=3Dentity-Jscr><td> <code title=3D&quot=
;">Jscr;</code> </td> <td> U+1D4A5 </td> =
<td> <span class=3Dglyph title=3D"">𝒥</=
span> </td> <tr id=3Dentity-jscr><td> <code title=
=3D"">jscr;</code> </td> <td> U+1D4BF <=
/td> <td> <span class=3Dglyph title=3D"">&js=
cr;</span> </td> <tr id=3Dentity-Jsercy><td> <=
code title=3D"">Jsercy;</code> </td> <td> =
U+00408 </td> <td> <span class=3Dglyph title=3D"&quot=
;>Ј</span> </td> <tr id=3Dentity-jsercy>&=
lt;td> <code title=3D"">jsercy;</code> </td&g=
t; <td> U+00458 </td> <td> <span class=3Dglyph title=
=3D"">ј</span> </td> <tr id=3Denti=
ty-Jukcy><td> <code title=3D"">Jukcy;</code&g=
t; </td> <td> U+00404 </td> <td> <span class=3D=
glyph title=3D"">Є</span> </td> <tr=
 id=3Dentity-jukcy><td> <code title=3D"">jukcy;&=
lt;/code> </td> <td> U+00454 </td> <td> <sp=
an class=3Dglyph title=3D"">є</span> </td=
> <tr id=3Dentity-Kappa><td> <code title=3D""=
>Kappa;</code> </td> <td> U+0039A </td> <td=
> <span class=3Dglyph title=3D"">Κ</span&=
gt; </td> <tr id=3Dentity-kappa><td> <code title=3D&=
quot;">kappa;</code> </td> <td> U+003BA </td=
> <td> <span class=3Dglyph title=3D"">&kappa=
;</span> </td> <tr id=3Dentity-kappav><td> <co=
de title=3D"">kappav;</code> </td> <td> U+=
003F0 </td> <td> <span class=3Dglyph title=3D""&=
gt;ϰ</span> </td> <tr id=3Dentity-Kcedil>&lt=
;td> <code title=3D"">Kcedil;</code> </td>=
 <td> U+00136 </td> <td> <span class=3Dglyph title=3D=
"">Ķ</span> </td> <tr id=3Dentity-=
kcedil><td> <code title=3D"">kcedil;</code&gt=
; </td> <td> U+00137 </td> <td> <span class=3D=
glyph title=3D"">ķ</span> </td> <t=
r id=3Dentity-Kcy><td> <code title=3D"">Kcy;<=
/code> </td> <td> U+0041A </td> <td> <span =
class=3Dglyph title=3D"">К</span> </td> =
<tr id=3Dentity-kcy><td> <code title=3D"">kcy=
;</code> </td> <td> U+0043A </td> <td> <=
span class=3Dglyph title=3D"">к</span> </td=
> <tr id=3Dentity-Kfr><td> <code title=3D""&g=
t;Kfr;</code> </td> <td> U+1D50E </td> <td>=
 <span class=3Dglyph title=3D"">𝔎</span> &l=
t;/td> <tr id=3Dentity-kfr><td> <code title=3D"&qu=
ot;>kfr;</code> </td> <td> U+1D528 </td> <t=
d> <span class=3Dglyph title=3D"">𝔨</span&g=
t; </td> <tr id=3Dentity-kgreen><td> <code title=3D&=
quot;">kgreen;</code> </td> <td> U+00138 </t=
d> <td> <span class=3Dglyph title=3D"">&kgre=
en;</span> </td> <tr id=3Dentity-KHcy><td> <co=
de title=3D"">KHcy;</code> </td> <td> U+00=
425 </td> <td> <span class=3Dglyph title=3D""&gt=
;Х</span> </td> <tr id=3Dentity-khcy><td&gt=
; <code title=3D"">khcy;</code> </td> <td&=
gt; U+00445 </td> <td> <span class=3Dglyph title=3D"&=
quot;>х</span> </td> <tr id=3Dentity-KJcy>&=
lt;td> <code title=3D"">KJcy;</code> </td>=
 <td> U+0040C </td> <td> <span class=3Dglyph title=3D=
"">Ќ</span> </td> <tr id=3Dentity-kj=
cy><td> <code title=3D"">kjcy;</code> <=
/td> <td> U+0045C </td> <td> <span class=3Dglyph =
title=3D"">ќ</span> </td> <tr id=3De=
ntity-Kopf><td> <code title=3D"">Kopf;</code&=
gt; </td> <td> U+1D542 </td> <td> <span class=3D=
glyph title=3D"">𝕂</span> </td> <tr =
id=3Dentity-kopf><td> <code title=3D"">kopf;<=
/code> </td> <td> U+1D55C </td> <td> <span =
class=3Dglyph title=3D"">𝕜</span> </td>=
 <tr id=3Dentity-Kscr><td> <code title=3D"">K=
scr;</code> </td> <td> U+1D4A6 </td> <td> &=
lt;span class=3Dglyph title=3D"">𝒦</span> &lt=
;/td> <tr id=3Dentity-kscr><td> <code title=3D"&qu=
ot;>kscr;</code> </td> <td> U+1D4C0 </td> <=
td> <span class=3Dglyph title=3D"">𝓀</span=
> </td> <tr id=3Dentity-lAarr><td> <code title=3D=
"">lAarr;</code> </td> <td> U+021DA </t=
d> <td> <span class=3Dglyph title=3D"">&Llef=
tarrow;</span> </td> <tr id=3Dentity-Lacute><td> =
<code title=3D"">Lacute;</code> </td> <td&=
gt; U+00139 </td> <td> <span class=3Dglyph title=3D"&=
quot;>Ĺ</span> </td> <tr id=3Dentity-lacute&=
gt;<td> <code title=3D"">lacute;</code> </=
td> <td> U+0013A </td> <td> <span class=3Dglyph t=
itle=3D"">ĺ</span> </td> <tr id=3D=
entity-laemptyv><td> <code title=3D"">laemptyv;&=
lt;/code> </td> <td> U+029B4 </td> <td> <sp=
an class=3Dglyph title=3D"">⦴</span> <=
/td> <tr id=3Dentity-lagran><td> <code title=3D"&q=
uot;>lagran;</code> </td> <td> U+02112 </td> &=
lt;td> <span class=3Dglyph title=3D"">ℒ<=
/span> </td> <tr id=3Dentity-Lambda><td> <code ti=
tle=3D"">Lambda;</code> </td> <td> U+0039B=
 </td> <td> <span class=3Dglyph title=3D"">&a=
mp;Lambda;</span> </td> <tr id=3Dentity-lambda><td&g=
t; <code title=3D"">lambda;</code> </td> <=
td> U+003BB </td> <td> <span class=3Dglyph title=3D&quo=
t;">λ</span> </td> <tr id=3Dentity-Lang=
><td> <code title=3D"">Lang;</code> </t=
d> <td> U+027EA </td> <td> <span class=3Dglyph ti=
tle=3D"">⟪</span> </td> <tr id=3Dent=
ity-lang><td> <code title=3D"">lang;</code&gt=
; </td> <td> U+027E8 </td> <td> <span class=3D=
glyph title=3D"">⟨</span> </td> <t=
r id=3Dentity-langd><td> <code title=3D"">langd;=
</code> </td> <td> U+02991 </td> <td> <s=
pan class=3Dglyph title=3D"">⦑</span> </t=
d> <tr id=3Dentity-langle><td> <code title=3D"&quo=
t;>langle;</code> </td> <td> U+027E8 </td> &lt=
;td> <span class=3Dglyph title=3D"">⟨</s=
pan> </td> <tr id=3Dentity-lap><td> <code title=3D=
"">lap;</code> </td> <td> U+02A85 </td&=
gt; <td> <span class=3Dglyph title=3D"">⪅&l=
t;/span> </td> <tr id=3Dentity-Laplacetrf><td> <c=
ode title=3D"">Laplacetrf;</code> </td> <td&g=
t; U+02112 </td> <td> <span class=3Dglyph title=3D"&q=
uot;>ℒ</span> </td> <tr id=3Dentity-laquo&gt=
;<td> <code title=3D"">laquo;</code> </td&=
gt; <td> U+000AB </td> <td> <span class=3Dglyph titl=
e=3D"">«</span> </td> <tr id=3Denti=
ty-laquo-legacy class=3Dimpl><td> <code title=3D""&=
gt;laquo</code> </td> <td> U+000AB </td> <td&g=
t; <span title=3D"">«</span> </td> =
</tr><!-- (invalid entity with missing semicolon for legacy supp=
ort only) --><tr id=3Dentity-Larr><td> <code title=3D&q=
uot;">Larr;</code> </td> <td> U+0219E </td&g=
t; <td> <span class=3Dglyph title=3D"">&twohead=
leftarrow;</span> </td> <tr id=3Dentity-lArr><td>=
 <code title=3D"">lArr;</code> </td> <td&g=
t; U+021D0 </td> <td> <span class=3Dglyph title=3D"&q=
uot;>⇐</span> </td> <tr id=3Dentity-larr>&l=
t;td> <code title=3D"">larr;</code> </td> =
<td> U+02190 </td> <td> <span class=3Dglyph title=3D=
"">←</span> </td> <tr id=3Dentity-l=
arrb><td> <code title=3D"">larrb;</code> &=
lt;/td> <td> U+021E4 </td> <td> <span class=3Dgly=
ph title=3D"">⇤</span> </td> <tr id=
=3Dentity-larrbfs><td> <code title=3D"">larrbfs;=
</code> </td> <td> U+0291F </td> <td> <s=
pan class=3Dglyph title=3D"">⤟</span> <=
/td> <tr id=3Dentity-larrfs><td> <code title=3D"&q=
uot;>larrfs;</code> </td> <td> U+0291D </td> &=
lt;td> <span class=3Dglyph title=3D"">⤝<=
/span> </td> <tr id=3Dentity-larrhk><td> <code ti=
tle=3D"">larrhk;</code> </td> <td> U+021A9=
 </td> <td> <span class=3Dglyph title=3D"">&a=
mp;hookleftarrow;</span> </td> <tr id=3Dentity-larrlp>&=
lt;td> <code title=3D"">larrlp;</code> </td&g=
t; <td> U+021AB </td> <td> <span class=3Dglyph title=
=3D"">↫</span> </td> <tr id=
=3Dentity-larrpl><td> <code title=3D"">larrpl;&l=
t;/code> </td> <td> U+02939 </td> <td> <spa=
n class=3Dglyph title=3D"">⤹</span> </td=
> <tr id=3Dentity-larrsim><td> <code title=3D"&quo=
t;>larrsim;</code> </td> <td> U+02973 </td> &l=
t;td> <span class=3Dglyph title=3D"">⥳<=
/span> </td> <tr id=3Dentity-larrtl><td> <code ti=
tle=3D"">larrtl;</code> </td> <td> U+021A2=
 </td> <td> <span class=3Dglyph title=3D"">&a=
mp;leftarrowtail;</span> </td> <tr id=3Dentity-lat><=
td> <code title=3D"">lat;</code> </td> &lt=
;td> U+02AAB </td> <td> <span class=3Dglyph title=3D&qu=
ot;">⪫</span> </td> <tr id=3Dentity-lAtail=
><td> <code title=3D"">lAtail;</code> <=
/td> <td> U+0291B </td> <td> <span class=3Dglyph =
title=3D"">⤛</span> </td> <tr id=3D=
entity-latail><td> <code title=3D"">latail;</=
code> </td> <td> U+02919 </td> <td> <span c=
lass=3Dglyph title=3D"">⤙</span> </td&gt=
; <tr id=3Dentity-late><td> <code title=3D"">=
late;</code> </td> <td> U+02AAD </td> <td> =
<span class=3Dglyph title=3D"">⪭</span> &l=
t;/td> <tr id=3Dentity-lates><td> <code title=3D"&=
quot;>lates;</code> </td> <td> U+02AAD U+0FE00 </=
td> <td> <span class=3D"glyph compound" title=3D&qu=
ot;">⪭︀</span> </td> <tr id=3D=
entity-lBarr><td> <code title=3D"">lBarr;</co=
de> </td> <td> U+0290E </td> <td> <span cla=
ss=3Dglyph title=3D"">⤎</span> </td> &=
lt;tr id=3Dentity-lbarr><td> <code title=3D"">lb=
arr;</code> </td> <td> U+0290C </td> <td> &=
lt;span class=3Dglyph title=3D"">⤌</span> &l=
t;/td> <tr id=3Dentity-lbbrk><td> <code title=3D"&=
quot;>lbbrk;</code> </td> <td> U+02772 </td> &=
lt;td> <span class=3Dglyph title=3D"">❲</=
span> </td> <tr id=3Dentity-lbrace><td> <code tit=
le=3D"">lbrace;</code> </td> <td> U+0007B =
</td> <td> <span class=3Dglyph title=3D"">{&l=
t;/span> </td> <tr id=3Dentity-lbrack><td> <code =
title=3D"">lbrack;</code> </td> <td> U+000=
5B </td> <td> <span class=3Dglyph title=3D"">=
[</span> </td> <tr id=3Dentity-lbrke><td> <cod=
e title=3D"">lbrke;</code> </td> <td> U+02=
98B </td> <td> <span class=3Dglyph title=3D""&gt=
;⦋</span> </td> <tr id=3Dentity-lbrksld><t=
d> <code title=3D"">lbrksld;</code> </td> =
<td> U+0298F </td> <td> <span class=3Dglyph title=3D=
"">⦏</span> </td> <tr id=3Dentity=
-lbrkslu><td> <code title=3D"">lbrkslu;</code=
> </td> <td> U+0298D </td> <td> <span class=
=3Dglyph title=3D"">⦍</span> </td> &=
lt;tr id=3Dentity-Lcaron><td> <code title=3D"">L=
caron;</code> </td> <td> U+0013D </td> <td>=
 <span class=3Dglyph title=3D"">Ľ</span>=
 </td> <tr id=3Dentity-lcaron><td> <code title=3D&qu=
ot;">lcaron;</code> </td> <td> U+0013E </td&=
gt; <td> <span class=3Dglyph title=3D"">&lcaron=
;</span> </td> <tr id=3Dentity-Lcedil><td> <co=
de title=3D"">Lcedil;</code> </td> <td> U+=
0013B </td> <td> <span class=3Dglyph title=3D""&=
gt;Ļ</span> </td> <tr id=3Dentity-lcedil>&lt=
;td> <code title=3D"">lcedil;</code> </td>=
 <td> U+0013C </td> <td> <span class=3Dglyph title=3D=
"">ļ</span> </td> <tr id=3Dentity-=
lceil><td> <code title=3D"">lceil;</code> =
</td> <td> U+02308 </td> <td> <span class=3Dgl=
yph title=3D"">⌈</span> </td> <tr i=
d=3Dentity-lcub><td> <code title=3D"">lcub;</=
code> </td> <td> U+0007B </td> <td> <span c=
lass=3Dglyph title=3D"">{</span> </td> <tr id=
=3Dentity-Lcy><td> <code title=3D"">Lcy;</cod=
e> </td> <td> U+0041B </td> <td> <span clas=
s=3Dglyph title=3D"">Л</span> </td> <=
tr id=3Dentity-lcy><td> <code title=3D"">lcy;&lt=
;/code> </td> <td> U+0043B </td> <td> <span=
 class=3Dglyph title=3D"">л</span> </td>=
 <tr id=3Dentity-ldca><td> <code title=3D"">l=
dca;</code> </td> <td> U+02936 </td> <td> &=
lt;span class=3Dglyph title=3D"">⤶</span> &lt=
;/td> <tr id=3Dentity-ldquo><td> <code title=3D"&q=
uot;>ldquo;</code> </td> <td> U+0201C </td> &l=
t;td> <span class=3Dglyph title=3D"">“</s=
pan> </td> <tr id=3Dentity-ldquor><td> <code titl=
e=3D"">ldquor;</code> </td> <td> U+0201E &=
lt;/td> <td> <span class=3Dglyph title=3D"">&amp=
;ldquor;</span> </td> <tr id=3Dentity-ldrdhar><td&gt=
; <code title=3D"">ldrdhar;</code> </td> <=
td> U+02967 </td> <td> <span class=3Dglyph title=3D&quo=
t;">⥧</span> </td> <tr id=3Dentity-ldr=
ushar><td> <code title=3D"">ldrushar;</code&g=
t; </td> <td> U+0294B </td> <td> <span class=3D=
glyph title=3D"">⥋</span> </td> &lt=
;tr id=3Dentity-ldsh><td> <code title=3D"">ldsh;=
</code> </td> <td> U+021B2 </td> <td> <s=
pan class=3Dglyph title=3D"">↲</span> </td=
> <tr id=3Dentity-lE><td> <code title=3D""&gt=
;lE;</code> </td> <td> U+02266 </td> <td> &=
lt;span class=3Dglyph title=3D"">≦</span> &lt=
;/td> <tr id=3Dentity-le><td> <code title=3D"&quot=
;>le;</code> </td> <td> U+02264 </td> <td&g=
t; <span class=3Dglyph title=3D"">≤</span> &=
lt;/td> <tr id=3Dentity-LeftAngleBracket><td> <code tit=
le=3D"">LeftAngleBracket;</code> </td> <td&gt=
; U+027E8 </td> <td> <span class=3Dglyph title=3D"&qu=
ot;>⟨</span> </td> <tr id=3Dentity-LeftArrow=
><td> <code title=3D"">LeftArrow;</code> &=
lt;/td> <td> U+02190 </td> <td> <span class=3Dgly=
ph title=3D"">←</span> </td> <tr id=
=3Dentity-Leftarrow><td> <code title=3D"">Leftar=
row;</code> </td> <td> U+021D0 </td> <td> &=
lt;span class=3Dglyph title=3D"">⇐</span> &lt=
;/td> <tr id=3Dentity-leftarrow><td> <code title=3D&quo=
t;">leftarrow;</code> </td> <td> U+02190 </t=
d> <td> <span class=3Dglyph title=3D"">&slar=
r;</span> </td> <tr id=3Dentity-LeftArrowBar><td>=
 <code title=3D"">LeftArrowBar;</code> </td> =
<td> U+021E4 </td> <td> <span class=3Dglyph title=3D=
"">⇤</span> </td> <tr id=3Dentity-L=
eftArrowRightArrow><td> <code title=3D"">LeftArr=
owRightArrow;</code> </td> <td> U+021C6 </td> &lt=
;td> <span class=3Dglyph title=3D"">&leftrightarro=
ws;</span> </td> <tr id=3Dentity-leftarrowtail><td&g=
t; <code title=3D"">leftarrowtail;</code> </td&g=
t; <td> U+021A2 </td> <td> <span class=3Dglyph title=
=3D"">↢</span> </td> <tr id=
=3Dentity-LeftCeiling><td> <code title=3D"">Left=
Ceiling;</code> </td> <td> U+02308 </td> <td&g=
t; <span class=3Dglyph title=3D"">⌈</span&gt=
; </td> <tr id=3Dentity-LeftDoubleBracket><td> <code=
 title=3D"">LeftDoubleBracket;</code> </td> <=
td> U+027E6 </td> <td> <span class=3Dglyph title=3D&quo=
t;">⟦</span> </td> <tr id=3Dentity-LeftD=
ownTeeVector><td> <code title=3D"">LeftDownTeeVe=
ctor;</code> </td> <td> U+02961 </td> <td> =
<span class=3Dglyph title=3D"">⥡&lt=
;/span> </td> <tr id=3Dentity-LeftDownVector><td> &l=
t;code title=3D"">LeftDownVector;</code> </td> &=
lt;td> U+021C3 </td> <td> <span class=3Dglyph title=3D&=
quot;">⇃</span> </td> <tr id=3D=
entity-LeftDownVectorBar><td> <code title=3D"">L=
eftDownVectorBar;</code> </td> <td> U+02959 </td>=
 <td> <span class=3Dglyph title=3D"">&LeftDownV=
ectorBar;</span> </td> <tr id=3Dentity-LeftFloor><td=
> <code title=3D"">LeftFloor;</code> </td>=
 <td> U+0230A </td> <td> <span class=3Dglyph title=3D=
"">⌊</span> </td> <tr id=3Dentity-=
leftharpoondown><td> <code title=3D"">leftharpoo=
ndown;</code> </td> <td> U+021BD </td> <td>=
 <span class=3Dglyph title=3D"">↽<=
/span> </td> <tr id=3Dentity-leftharpoonup><td> <=
code title=3D"">leftharpoonup;</code> </td> <=
td> U+021BC </td> <td> <span class=3Dglyph title=3D&quo=
t;">↼</span> </td> <tr id=3Dentity-leftl=
eftarrows><td> <code title=3D"">leftleftarrows;&=
lt;/code> </td> <td> U+021C7 </td> <td> <sp=
an class=3Dglyph title=3D"">⇇</span> </td=
> <tr id=3Dentity-LeftRightArrow><td> <code title=3D&qu=
ot;">LeftRightArrow;</code> </td> <td> U+02194 =
</td> <td> <span class=3Dglyph title=3D"">&am=
p;leftrightarrow;</span> </td> <tr id=3Dentity-Leftrightar=
row><td> <code title=3D"">Leftrightarrow;</co=
de> </td> <td> U+021D4 </td> <td> <span cla=
ss=3Dglyph title=3D"">⇔</span> </td> &lt=
;tr id=3Dentity-leftrightarrow><td> <code title=3D"&quot=
;>leftrightarrow;</code> </td> <td> U+02194 </td&=
gt; <td> <span class=3Dglyph title=3D"">&leftri=
ghtarrow;</span> </td> <tr id=3Dentity-leftrightarrows>=
<td> <code title=3D"">leftrightarrows;</code>=
 </td> <td> U+021C6 </td> <td> <span class=3Dg=
lyph title=3D"">⇆</span> </td&g=
t; <tr id=3Dentity-leftrightharpoons><td> <code title=3D&q=
uot;">leftrightharpoons;</code> </td> <td> U+02=
1CB </td> <td> <span class=3Dglyph title=3D""&gt=
;⇋</span> </td> <tr id=3Dentity-left=
rightsquigarrow><td> <code title=3D"">leftrights=
quigarrow;</code> </td> <td> U+021AD </td> <td=
> <span class=3Dglyph title=3D"">&leftrightsquigar=
row;</span> </td> <tr id=3Dentity-LeftRightVector><t=
d> <code title=3D"">LeftRightVector;</code> <=
/td> <td> U+0294E </td> <td> <span class=3Dglyph =
title=3D"">⥎</span> </td> &l=
t;tr id=3Dentity-LeftTee><td> <code title=3D"">L=
eftTee;</code> </td> <td> U+022A3 </td> <td&gt=
; <span class=3Dglyph title=3D"">⊣</span>=
 </td> <tr id=3Dentity-LeftTeeArrow><td> <code title=
=3D"">LeftTeeArrow;</code> </td> <td> U+02=
1A4 </td> <td> <span class=3Dglyph title=3D""&gt=
;↤</span> </td> <tr id=3Dentity-LeftTeeVect=
or><td> <code title=3D"">LeftTeeVector;</code=
> </td> <td> U+0295A </td> <td> <span class=
=3Dglyph title=3D"">⥚</span> </td=
> <tr id=3Dentity-leftthreetimes><td> <code title=3D&qu=
ot;">leftthreetimes;</code> </td> <td> U+022CB =
</td> <td> <span class=3Dglyph title=3D"">&am=
p;lthree;</span> </td> <tr id=3Dentity-LeftTriangle>&lt=
;td> <code title=3D"">LeftTriangle;</code> </=
td> <td> U+022B2 </td> <td> <span class=3Dglyph t=
itle=3D"">⊲</span> </td> &lt=
;tr id=3Dentity-LeftTriangleBar><td> <code title=3D"&quo=
t;>LeftTriangleBar;</code> </td> <td> U+029CF </t=
d> <td> <span class=3Dglyph title=3D"">&Left=
TriangleBar;</span> </td> <tr id=3Dentity-LeftTriangleEqua=
l><td> <code title=3D"">LeftTriangleEqual;</c=
ode> </td> <td> U+022B4 </td> <td> <span cl=
ass=3Dglyph title=3D"">⊴</span> </td> =
<tr id=3Dentity-LeftUpDownVector><td> <code title=3D"=
">LeftUpDownVector;</code> </td> <td> U+02951 &=
lt;/td> <td> <span class=3Dglyph title=3D"">&amp=
;LeftUpDownVector;</span> </td> <tr id=3Dentity-LeftUpTeeV=
ector><td> <code title=3D"">LeftUpTeeVector;<=
/code> </td> <td> U+02960 </td> <td> <span =
class=3Dglyph title=3D"">⥠</span> =
</td> <tr id=3Dentity-LeftUpVector><td> <code title=3D=
"">LeftUpVector;</code> </td> <td> U+021BF=
 </td> <td> <span class=3Dglyph title=3D"">&a=
mp;upharpoonleft;</span> </td> <tr id=3Dentity-LeftUpVecto=
rBar><td> <code title=3D"">LeftUpVectorBar;</=
code> </td> <td> U+02958 </td> <td> <span c=
lass=3Dglyph title=3D"">⥘</span> &=
lt;/td> <tr id=3Dentity-LeftVector><td> <code title=3D&=
quot;">LeftVector;</code> </td> <td> U+021BC &l=
t;/td> <td> <span class=3Dglyph title=3D"">&=
lharu;</span> </td> <tr id=3Dentity-LeftVectorBar><t=
d> <code title=3D"">LeftVectorBar;</code> </t=
d> <td> U+02952 </td> <td> <span class=3Dglyph ti=
tle=3D"">⥒</span> </td> <tr=
 id=3Dentity-lEg><td> <code title=3D"">lEg;</=
code> </td> <td> U+02A8B </td> <td> <span c=
lass=3Dglyph title=3D"">⪋</span> </t=
d> <tr id=3Dentity-leg><td> <code title=3D""&=
gt;leg;</code> </td> <td> U+022DA </td> <td&gt=
; <span class=3Dglyph title=3D"">⋚</span=
> </td> <tr id=3Dentity-leq><td> <code title=3D&q=
uot;">leq;</code> </td> <td> U+02264 </td&gt=
; <td> <span class=3Dglyph title=3D"">≤</=
span> </td> <tr id=3Dentity-leqq><td> <code title=
=3D"">leqq;</code> </td> <td> U+02266 <=
/td> <td> <span class=3Dglyph title=3D"">&le=
qq;</span> </td> <tr id=3Dentity-leqslant><td> &l=
t;code title=3D"">leqslant;</code> </td> <td&=
gt; U+02A7D </td> <td> <span class=3Dglyph title=3D"&=
quot;>⩽</span> </td> <tr id=3Dentity-les>&lt=
;td> <code title=3D"">les;</code> </td> &l=
t;td> U+02A7D </td> <td> <span class=3Dglyph title=3D&q=
uot;">⩽</span> </td> <tr id=3Dentity-lescc=
><td> <code title=3D"">lescc;</code> </=
td> <td> U+02AA8 </td> <td> <span class=3Dglyph t=
itle=3D"">⪨</span> </td> <tr id=3De=
ntity-lesdot><td> <code title=3D"">lesdot;</c=
ode> </td> <td> U+02A7F </td> <td> <span cl=
ass=3Dglyph title=3D"">⩿</span> </td>=
 <tr id=3Dentity-lesdoto><td> <code title=3D""&g=
t;lesdoto;</code> </td> <td> U+02A81 </td> <td=
> <span class=3Dglyph title=3D"">⪁</spa=
n> </td> <tr id=3Dentity-lesdotor><td> <code titl=
e=3D"">lesdotor;</code> </td> <td> U+02A83=
 </td> <td> <span class=3Dglyph title=3D"">&a=
mp;lesdotor;</span> </td> <tr id=3Dentity-lesg><td&g=
t; <code title=3D"">lesg;</code> </td> <td=
> U+022DA U+0FE00 </td> <td> <span class=3D"glyph =
compound" title=3D"">⋚︀</sp=
an> </td> <tr id=3Dentity-lesges><td> <code title=
=3D"">lesges;</code> </td> <td> U+02A93 &l=
t;/td> <td> <span class=3Dglyph title=3D"">&=
lesges;</span> </td> <tr id=3Dentity-lessapprox><td&=
gt; <code title=3D"">lessapprox;</code> </td>=
 <td> U+02A85 </td> <td> <span class=3Dglyph title=3D=
"">⪅</span> </td> <tr id=3Dentity-les=
sdot><td> <code title=3D"">lessdot;</code>=
 </td> <td> U+022D6 </td> <td> <span class=3Dg=
lyph title=3D"">⋖</span> </td> <t=
r id=3Dentity-lesseqgtr><td> <code title=3D"">le=
sseqgtr;</code> </td> <td> U+022DA </td> <td&g=
t; <span class=3Dglyph title=3D"">⋚</spa=
n> </td> <tr id=3Dentity-lesseqqgtr><td> <code ti=
tle=3D"">lesseqqgtr;</code> </td> <td> U+0=
2A8B </td> <td> <span class=3Dglyph title=3D""&g=
t;⪋</span> </td> <tr id=3Dentity-LessEqualG=
reater><td> <code title=3D"">LessEqualGreater;&l=
t;/code> </td> <td> U+022DA </td> <td> <spa=
n class=3Dglyph title=3D"">⋚</span> <=
/td> <tr id=3Dentity-LessFullEqual><td> <code title=3D&=
quot;">LessFullEqual;</code> </td> <td> U+02266=
 </td> <td> <span class=3Dglyph title=3D"">&a=
mp;leqq;</span> </td> <tr id=3Dentity-LessGreater><t=
d> <code title=3D"">LessGreater;</code> </td&=
gt; <td> U+02276 </td> <td> <span class=3Dglyph titl=
e=3D"">≶</span> </td> <tr id=3Den=
tity-lessgtr><td> <code title=3D"">lessgtr;</=
code> </td> <td> U+02276 </td> <td> <span c=
lass=3Dglyph title=3D"">≶</span> </td&g=
t; <tr id=3Dentity-LessLess><td> <code title=3D"&quot=
;>LessLess;</code> </td> <td> U+02AA1 </td> &l=
t;td> <span class=3Dglyph title=3D"">⪡&lt=
;/span> </td> <tr id=3Dentity-lesssim><td> <code =
title=3D"">lesssim;</code> </td> <td> U+02=
272 </td> <td> <span class=3Dglyph title=3D""&gt=
;≲</span> </td> <tr id=3Dentity-LessSlantEqual=
><td> <code title=3D"">LessSlantEqual;</code&=
gt; </td> <td> U+02A7D </td> <td> <span class=3D=
glyph title=3D"">⩽</span> </td> <tr i=
d=3Dentity-LessTilde><td> <code title=3D"">LessT=
ilde;</code> </td> <td> U+02272 </td> <td> =
<span class=3Dglyph title=3D"">≲</span>=
 </td> <tr id=3Dentity-lfisht><td> <code title=3D&qu=
ot;">lfisht;</code> </td> <td> U+0297C </td&=
gt; <td> <span class=3Dglyph title=3D"">&lfisht=
;</span> </td> <tr id=3Dentity-lfloor><td> <co=
de title=3D"">lfloor;</code> </td> <td> U+=
0230A </td> <td> <span class=3Dglyph title=3D""&=
gt;⌊</span> </td> <tr id=3Dentity-Lfr><td=
> <code title=3D"">Lfr;</code> </td> <t=
d> U+1D50F </td> <td> <span class=3Dglyph title=3D&quot=
;">𝔏</span> </td> <tr id=3Dentity-lfr>&=
lt;td> <code title=3D"">lfr;</code> </td> =
<td> U+1D529 </td> <td> <span class=3Dglyph title=3D=
"">𝔩</span> </td> <tr id=3Dentity-lg&=
gt;<td> <code title=3D"">lg;</code> </td&g=
t; <td> U+02276 </td> <td> <span class=3Dglyph title=
=3D"">≶</span> </td> <tr id=3Dent=
ity-lgE><td> <code title=3D"">lgE;</code> =
</td> <td> U+02A91 </td> <td> <span class=3Dgl=
yph title=3D"">⪑</span> </td> <tr id=3D=
entity-lHar><td> <code title=3D"">lHar;</code=
> </td> <td> U+02962 </td> <td> <span class=
=3Dglyph title=3D"">⥢</span> </td> <=
tr id=3Dentity-lhard><td> <code title=3D"">lhard=
;</code> </td> <td> U+021BD </td> <td> <=
span class=3Dglyph title=3D"">↽</span=
> </td> <tr id=3Dentity-lharu><td> <code title=3D=
"">lharu;</code> </td> <td> U+021BC </t=
d> <td> <span class=3Dglyph title=3D"">&lhar=
u;</span> </td> <tr id=3Dentity-lharul><td> <c=
ode title=3D"">lharul;</code> </td> <td> U=
+0296A </td> <td> <span class=3Dglyph title=3D""=
>⥪</span> </td> <tr id=3Dentity-lhblk>&lt=
;td> <code title=3D"">lhblk;</code> </td> =
<td> U+02584 </td> <td> <span class=3Dglyph title=3D=
"">▄</span> </td> <tr id=3Dentity-L=
Jcy><td> <code title=3D"">LJcy;</code> &lt=
;/td> <td> U+00409 </td> <td> <span class=3Dglyph=
 title=3D"">Љ</span> </td> <tr id=3D=
entity-ljcy><td> <code title=3D"">ljcy;</code=
> </td> <td> U+00459 </td> <td> <span class=
=3Dglyph title=3D"">љ</span> </td> <=
tr id=3Dentity-Ll><td> <code title=3D"">Ll;</=
code> </td> <td> U+022D8 </td> <td> <span c=
lass=3Dglyph title=3D"">⋘</span> </td> &l=
t;tr id=3Dentity-ll><td> <code title=3D"">ll;&lt=
;/code> </td> <td> U+0226A </td> <td> <span=
 class=3Dglyph title=3D"">≪</span> </td> =
<tr id=3Dentity-llarr><td> <code title=3D"">l=
larr;</code> </td> <td> U+021C7 </td> <td> =
<span class=3Dglyph title=3D"">⇇</span> &=
lt;/td> <tr id=3Dentity-llcorner><td> <code title=3D&qu=
ot;">llcorner;</code> </td> <td> U+0231E </t=
d> <td> <span class=3Dglyph title=3D"">&dlco=
rn;</span> </td> <tr id=3Dentity-Lleftarrow><td> =
<code title=3D"">Lleftarrow;</code> </td> &lt=
;td> U+021DA </td> <td> <span class=3Dglyph title=3D&qu=
ot;">⇚</span> </td> <tr id=3Dentity=
-llhard><td> <code title=3D"">llhard;</code&g=
t; </td> <td> U+0296B </td> <td> <span class=3D=
glyph title=3D"">⥫</span> </td> <t=
r id=3Dentity-lltri><td> <code title=3D"">lltri;=
</code> </td> <td> U+025FA </td> <td> <s=
pan class=3Dglyph title=3D"">◺</span> </t=
d> <tr id=3Dentity-Lmidot><td> <code title=3D"&quo=
t;>Lmidot;</code> </td> <td> U+0013F </td> &lt=
;td> <span class=3Dglyph title=3D"">Ŀ</s=
pan> </td> <tr id=3Dentity-lmidot><td> <code titl=
e=3D"">lmidot;</code> </td> <td> U+00140 &=
lt;/td> <td> <span class=3Dglyph title=3D"">&amp=
;lmidot;</span> </td> <tr id=3Dentity-lmoust><td>=
 <code title=3D"">lmoust;</code> </td> <td=
> U+023B0 </td> <td> <span class=3Dglyph title=3D"=
">⎰</span> </td> <tr id=3Dentity-lmoust=
ache><td> <code title=3D"">lmoustache;</code&=
gt; </td> <td> U+023B0 </td> <td> <span class=3D=
glyph title=3D"">⎰</span> </td> <t=
r id=3Dentity-lnap><td> <code title=3D"">lnap;&l=
t;/code> </td> <td> U+02A89 </td> <td> <spa=
n class=3Dglyph title=3D"">⪉</span> </=
td> <tr id=3Dentity-lnapprox><td> <code title=3D"&=
quot;>lnapprox;</code> </td> <td> U+02A89 </td&gt=
; <td> <span class=3Dglyph title=3D"">&lnapprox=
;</span> </td> <tr id=3Dentity-lnE><td> <code =
title=3D"">lnE;</code> </td> <td> U+02268 =
</td> <td> <span class=3Dglyph title=3D"">&am=
p;lneqq;</span> </td> <tr id=3Dentity-lne><td> &l=
t;code title=3D"">lne;</code> </td> <td> U=
+02A87 </td> <td> <span class=3Dglyph title=3D""=
>⪇</span> </td> <tr id=3Dentity-lneq><td&=
gt; <code title=3D"">lneq;</code> </td> <t=
d> U+02A87 </td> <td> <span class=3Dglyph title=3D&quot=
;">⪇</span> </td> <tr id=3Dentity-lneqq&gt=
;<td> <code title=3D"">lneqq;</code> </td&=
gt; <td> U+02268 </td> <td> <span class=3Dglyph titl=
e=3D"">≨</span> </td> <tr id=3Denti=
ty-lnsim><td> <code title=3D"">lnsim;</code&g=
t; </td> <td> U+022E6 </td> <td> <span class=3D=
glyph title=3D"">⋦</span> </td> <tr=
 id=3Dentity-loang><td> <code title=3D"">loang;&=
lt;/code> </td> <td> U+027EC </td> <td> <sp=
an class=3Dglyph title=3D"">⟬</span> </td=
> <tr id=3Dentity-loarr><td> <code title=3D""=
>loarr;</code> </td> <td> U+021FD </td> <td=
> <span class=3Dglyph title=3D"">⇽</span&=
gt; </td> <tr id=3Dentity-lobrk><td> <code title=3D&=
quot;">lobrk;</code> </td> <td> U+027E6 </td=
> <td> <span class=3Dglyph title=3D"">&lobrk=
;</span> </td> <tr id=3Dentity-LongLeftArrow><td>=
 <code title=3D"">LongLeftArrow;</code> </td>=
 <td> U+027F5 </td> <td> <span class=3Dglyph title=3D=
"">⟵</span> </td> <tr id=3Dentity-L=
ongleftarrow><td> <code title=3D"">Longleftarrow=
;</code> </td> <td> U+027F8 </td> <td> <=
span class=3Dglyph title=3D"">⟸</span&g=
t; </td> <tr id=3Dentity-longleftarrow><td> <code ti=
tle=3D"">longleftarrow;</code> </td> <td> =
U+027F5 </td> <td> <span class=3Dglyph title=3D"&quot=
;>⟵</span> </td> <tr id=3Dentity-LongLeftRigh=
tArrow><td> <code title=3D"">LongLeftRightArrow;=
</code> </td> <td> U+027F7 </td> <td> <s=
pan class=3Dglyph title=3D"">⟷</span> </t=
d> <tr id=3Dentity-Longleftrightarrow><td> <code title=3D=
"">Longleftrightarrow;</code> </td> <td> U=
+027FA </td> <td> <span class=3Dglyph title=3D""=
>⟺</span> </td> <tr id=3De=
ntity-longleftrightarrow><td> <code title=3D"">l=
ongleftrightarrow;</code> </td> <td> U+027F7 </td&gt=
; <td> <span class=3Dglyph title=3D"">⟷&l=
t;/span> </td> <tr id=3Dentity-longmapsto><td> <c=
ode title=3D"">longmapsto;</code> </td> <td&g=
t; U+027FC </td> <td> <span class=3Dglyph title=3D"&q=
uot;>⟼</span> </td> <tr id=3Dentity-LongRightA=
rrow><td> <code title=3D"">LongRightArrow;</c=
ode> </td> <td> U+027F6 </td> <td> <span cl=
ass=3Dglyph title=3D"">⟶</span> </td> =
<tr id=3Dentity-Longrightarrow><td> <code title=3D"&q=
uot;>Longrightarrow;</code> </td> <td> U+027F9 </=
td> <td> <span class=3Dglyph title=3D"">&xrA=
rr;</span> </td> <tr id=3Dentity-longrightarrow><td&=
gt; <code title=3D"">longrightarrow;</code> </td=
> <td> U+027F6 </td> <td> <span class=3Dglyph tit=
le=3D"">⟶</span> </td> <tr id=3Dent=
ity-looparrowleft><td> <code title=3D"">looparro=
wleft;</code> </td> <td> U+021AB </td> <td>=
 <span class=3Dglyph title=3D"">↫</s=
pan> </td> <tr id=3Dentity-looparrowright><td> <c=
ode title=3D"">looparrowright;</code> </td> <=
td> U+021AC </td> <td> <span class=3Dglyph title=3D&quo=
t;">↬</span> </td> <tr id=3Dentity-lopa=
r><td> <code title=3D"">lopar;</code> <=
/td> <td> U+02985 </td> <td> <span class=3Dglyph =
title=3D"">⦅</span> </td> <tr id=3D=
entity-Lopf><td> <code title=3D"">Lopf;</code=
> </td> <td> U+1D543 </td> <td> <span class=
=3Dglyph title=3D"">𝕃</span> </td> <=
tr id=3Dentity-lopf><td> <code title=3D"">lopf;&=
lt;/code> </td> <td> U+1D55D </td> <td> <sp=
an class=3Dglyph title=3D"">𝕝</span> </td&=
gt; <tr id=3Dentity-loplus><td> <code title=3D""=
>loplus;</code> </td> <td> U+02A2D </td> <t=
d> <span class=3Dglyph title=3D"">⨭</spa=
n> </td> <tr id=3Dentity-lotimes><td> <code title=
=3D"">lotimes;</code> </td> <td> U+02A34 &=
lt;/td> <td> <span class=3Dglyph title=3D"">&amp=
;lotimes;</span> </td> <tr id=3Dentity-lowast><td&gt=
; <code title=3D"">lowast;</code> </td> <t=
d> U+02217 </td> <td> <span class=3Dglyph title=3D&quot=
;">∗</span> </td> <tr id=3Dentity-lowba=
r><td> <code title=3D"">lowbar;</code> &lt=
;/td> <td> U+0005F </td> <td> <span class=3Dglyph=
 title=3D"">_</span> </td> <tr id=3Dentity-Lo=
werLeftArrow><td> <code title=3D"">LowerLeftArro=
w;</code> </td> <td> U+02199 </td> <td> &lt=
;span class=3Dglyph title=3D"">↙</span> &l=
t;/td> <tr id=3Dentity-LowerRightArrow><td> <code title=
=3D"">LowerRightArrow;</code> </td> <td> U=
+02198 </td> <td> <span class=3Dglyph title=3D""=
>↘</span> </td> <tr id=3Dentity-loz><=
td> <code title=3D"">loz;</code> </td> &lt=
;td> U+025CA </td> <td> <span class=3Dglyph title=3D&qu=
ot;">◊</span> </td> <tr id=3Dentity-lo=
zenge><td> <code title=3D"">lozenge;</code&gt=
; </td> <td> U+025CA </td> <td> <span class=3D=
glyph title=3D"">◊</span> </td> <=
tr id=3Dentity-lozf><td> <code title=3D"">lozf;&=
lt;/code> </td> <td> U+029EB </td> <td> <sp=
an class=3Dglyph title=3D"">⧫</span> </td&=
gt; <tr id=3Dentity-lpar><td> <code title=3D""&g=
t;lpar;</code> </td> <td> U+00028 </td> <td&gt=
; <span class=3Dglyph title=3D"">(</span> </td&g=
t; <tr id=3Dentity-lparlt><td> <code title=3D""&=
gt;lparlt;</code> </td> <td> U+02993 </td> <td=
> <span class=3Dglyph title=3D"">⦓</span=
> </td> <tr id=3Dentity-lrarr><td> <code title=3D=
"">lrarr;</code> </td> <td> U+021C6 </t=
d> <td> <span class=3Dglyph title=3D"">&left=
rightarrows;</span> </td> <tr id=3Dentity-lrcorner><=
td> <code title=3D"">lrcorner;</code> </td&gt=
; <td> U+0231F </td> <td> <span class=3Dglyph title=3D=
"">⌟</span> </td> <tr id=3Dentity-=
lrhar><td> <code title=3D"">lrhar;</code> =
</td> <td> U+021CB </td> <td> <span class=3Dgl=
yph title=3D"">⇋</span> </td&=
gt; <tr id=3Dentity-lrhard><td> <code title=3D""=
>lrhard;</code> </td> <td> U+0296D </td> <t=
d> <span class=3Dglyph title=3D"">⥭</spa=
n> </td> <tr id=3Dentity-lrm><td> <code title=3D&=
quot;">lrm;</code> </td> <td> U+0200E </td&g=
t; <td> <span class=3Dglyph title=3D"">‎&lt=
;/span> </td> <tr id=3Dentity-lrtri><td> <code ti=
tle=3D"">lrtri;</code> </td> <td> U+022BF =
</td> <td> <span class=3Dglyph title=3D"">&am=
p;lrtri;</span> </td> <tr id=3Dentity-lsaquo><td>=
 <code title=3D"">lsaquo;</code> </td> <td=
> U+02039 </td> <td> <span class=3Dglyph title=3D"=
">‹</span> </td> <tr id=3Dentity-Lscr&g=
t;<td> <code title=3D"">Lscr;</code> </td&=
gt; <td> U+02112 </td> <td> <span class=3Dglyph titl=
e=3D"">ℒ</span> </td> <tr id=3Dent=
ity-lscr><td> <code title=3D"">lscr;</code&gt=
; </td> <td> U+1D4C1 </td> <td> <span class=3D=
glyph title=3D"">𝓁</span> </td> <tr =
id=3Dentity-Lsh><td> <code title=3D"">Lsh;</c=
ode> </td> <td> U+021B0 </td> <td> <span cl=
ass=3Dglyph title=3D"">↰</span> </td> &l=
t;tr id=3Dentity-lsh><td> <code title=3D"">lsh;&=
lt;/code> </td> <td> U+021B0 </td> <td> <sp=
an class=3Dglyph title=3D"">↰</span> </td&g=
t; <tr id=3Dentity-lsim><td> <code title=3D""&gt=
;lsim;</code> </td> <td> U+02272 </td> <td>=
 <span class=3Dglyph title=3D"">≲</span&gt=
; </td> <tr id=3Dentity-lsime><td> <code title=3D&qu=
ot;">lsime;</code> </td> <td> U+02A8D </td&g=
t; <td> <span class=3Dglyph title=3D"">⪍&=
lt;/span> </td> <tr id=3Dentity-lsimg><td> <code =
title=3D"">lsimg;</code> </td> <td> U+02A8=
F </td> <td> <span class=3Dglyph title=3D"">&=
amp;lsimg;</span> </td> <tr id=3Dentity-lsqb><td>=
 <code title=3D"">lsqb;</code> </td> <td&g=
t; U+0005B </td> <td> <span class=3Dglyph title=3D"&q=
uot;>[</span> </td> <tr id=3Dentity-lsquo><td>=
 <code title=3D"">lsquo;</code> </td> <td&=
gt; U+02018 </td> <td> <span class=3Dglyph title=3D"&=
quot;>‘</span> </td> <tr id=3Dentity-lsquor&g=
t;<td> <code title=3D"">lsquor;</code> </t=
d> <td> U+0201A </td> <td> <span class=3Dglyph ti=
tle=3D"">‚</span> </td> <tr id=3Den=
tity-Lstrok><td> <code title=3D"">Lstrok;</co=
de> </td> <td> U+00141 </td> <td> <span cla=
ss=3Dglyph title=3D"">Ł</span> </td> =
<tr id=3Dentity-lstrok><td> <code title=3D"">=
lstrok;</code> </td> <td> U+00142 </td> <td&gt=
; <span class=3Dglyph title=3D"">ł</span&gt=
; </td> <tr id=3Dentity-LT><td> <code title=3D"=
">LT;</code> </td> <td> U+0003C </td> &lt=
;td> <span class=3Dglyph title=3D""><</span&=
gt; </td> <tr id=3Dentity-LT-legacy class=3Dimpl><td> &=
lt;code title=3D"">LT</code> </td> <td> U+=
0003C </td> <td> <span title=3D""><&lt=
;/span> </td> </tr><!-- (invalid entity with missing se=
micolon for legacy support only) --><tr id=3Dentity-Lt><td&gt=
; <code title=3D"">Lt;</code> </td> <td&gt=
; U+0226A </td> <td> <span class=3Dglyph title=3D"&qu=
ot;>≪</span> </td> <tr id=3Dentity-lt><td&=
gt; <code title=3D"">lt;</code> </td> <td&=
gt; U+0003C </td> <td> <span class=3Dglyph title=3D"&=
quot;><</span> </td> <tr id=3Dentity-lt-legacy c=
lass=3Dimpl><td> <code title=3D"">lt</code&gt=
; </td> <td> U+0003C </td> <td> <span title=3D=
""><</span> </td> </tr><!-- (inv=
alid entity with missing semicolon for legacy support only) --><tr =
id=3Dentity-ltcc><td> <code title=3D"">ltcc;<=
/code> </td> <td> U+02AA6 </td> <td> <span =
class=3Dglyph title=3D"">⪦</span> </td>=
 <tr id=3Dentity-ltcir><td> <code title=3D"">=
ltcir;</code> </td> <td> U+02A79 </td> <td>=
 <span class=3Dglyph title=3D"">⩹</span> =
</td> <tr id=3Dentity-ltdot><td> <code title=3D&quot=
;">ltdot;</code> </td> <td> U+022D6 </td>=
 <td> <span class=3Dglyph title=3D"">⋖&=
lt;/span> </td> <tr id=3Dentity-lthree><td> <code=
 title=3D"">lthree;</code> </td> <td> U+02=
2CB </td> <td> <span class=3Dglyph title=3D""&gt=
;⋋</span> </td> <tr id=3Dentity-ltimes><t=
d> <code title=3D"">ltimes;</code> </td> &=
lt;td> U+022C9 </td> <td> <span class=3Dglyph title=3D&=
quot;">⋉</span> </td> <tr id=3Dentity-l=
tlarr><td> <code title=3D"">ltlarr;</code>=
 </td> <td> U+02976 </td> <td> <span class=3Dg=
lyph title=3D"">⥶</span> </td> <tr=
 id=3Dentity-ltquest><td> <code title=3D"">ltque=
st;</code> </td> <td> U+02A7B </td> <td> &l=
t;span class=3Dglyph title=3D"">⩻</span> &=
lt;/td> <tr id=3Dentity-ltri><td> <code title=3D"&=
quot;>ltri;</code> </td> <td> U+025C3 </td> &l=
t;td> <span class=3Dglyph title=3D"">&triangleleft=
;</span> </td> <tr id=3Dentity-ltrie><td> <cod=
e title=3D"">ltrie;</code> </td> <td> U+02=
2B4 </td> <td> <span class=3Dglyph title=3D""&gt=
;⊴</span> </td> <tr id=3Dentity-ltrif><td&=
gt; <code title=3D"">ltrif;</code> </td> <=
td> U+025C2 </td> <td> <span class=3Dglyph title=3D&quo=
t;">◂</span> </td> <tr id=3D=
entity-ltrPar><td> <code title=3D"">ltrPar;</=
code> </td> <td> U+02996 </td> <td> <span c=
lass=3Dglyph title=3D"">⦖</span> </td&gt=
; <tr id=3Dentity-lurdshar><td> <code title=3D""=
>lurdshar;</code> </td> <td> U+0294A </td> &lt=
;td> <span class=3Dglyph title=3D"">⥊<=
/span> </td> <tr id=3Dentity-luruhar><td> <code t=
itle=3D"">luruhar;</code> </td> <td> U+029=
66 </td> <td> <span class=3Dglyph title=3D"">=
⥦</span> </td> <tr id=3Dentity-lvertneqq>&l=
t;td> <code title=3D"">lvertneqq;</code> </td=
> <td> U+02268 U+0FE00 </td> <td> <span class=3D&=
quot;glyph compound" title=3D"">≨︀=
</span> </td> <tr id=3Dentity-lvnE><td> <code =
title=3D"">lvnE;</code> </td> <td> U+02268=
 U+0FE00 </td> <td> <span class=3D"glyph compound&quo=
t; title=3D"">≨︀</span> </td&g=
t; <tr id=3Dentity-macr><td> <code title=3D""&gt=
;macr;</code> </td> <td> U+000AF </td> <td>=
 <span class=3Dglyph title=3D"">¯</span> =
</td> <tr id=3Dentity-macr-legacy class=3Dimpl><td> &lt=
;code title=3D"">macr</code> </td> <td> U+=
000AF </td> <td> <span title=3D"">¯=
</span> </td> </tr><!-- (invalid entity with missing=
 semicolon for legacy support only) --><tr id=3Dentity-male><=
td> <code title=3D"">male;</code> </td> &l=
t;td> U+02642 </td> <td> <span class=3Dglyph title=3D&q=
uot;">♂</span> </td> <tr id=3Dentity-malt=
><td> <code title=3D"">malt;</code> </t=
d> <td> U+02720 </td> <td> <span class=3Dglyph ti=
tle=3D"">✠</span> </td> <tr id=3Dent=
ity-maltese><td> <code title=3D"">maltese;</c=
ode> </td> <td> U+02720 </td> <td> <span cl=
ass=3Dglyph title=3D"">✠</span> </td> &=
lt;tr id=3Dentity-Map><td> <code title=3D"">Map;=
</code> </td> <td> U+02905 </td> <td> <s=
pan class=3Dglyph title=3D"">⤅</span> </td&=
gt; <tr id=3Dentity-map><td> <code title=3D""&gt=
;map;</code> </td> <td> U+021A6 </td> <td> =
<span class=3Dglyph title=3D"">↦</span> =
</td> <tr id=3Dentity-mapsto><td> <code title=3D&quo=
t;">mapsto;</code> </td> <td> U+021A6 </td&g=
t; <td> <span class=3Dglyph title=3D"">↦=
</span> </td> <tr id=3Dentity-mapstodown><td> &lt=
;code title=3D"">mapstodown;</code> </td> <td=
> U+021A7 </td> <td> <span class=3Dglyph title=3D"=
">↧</span> </td> <tr id=3Dentity-ma=
pstoleft><td> <code title=3D"">mapstoleft;</c=
ode> </td> <td> U+021A4 </td> <td> <span cl=
ass=3Dglyph title=3D"">↤</span> </td=
> <tr id=3Dentity-mapstoup><td> <code title=3D"&qu=
ot;>mapstoup;</code> </td> <td> U+021A5 </td> =
<td> <span class=3Dglyph title=3D"">↥&=
lt;/span> </td> <tr id=3Dentity-marker><td> <code=
 title=3D"">marker;</code> </td> <td> U+02=
5AE </td> <td> <span class=3Dglyph title=3D""&gt=
;▮</span> </td> <tr id=3Dentity-mcomma><t=
d> <code title=3D"">mcomma;</code> </td> &=
lt;td> U+02A29 </td> <td> <span class=3Dglyph title=3D&=
quot;">⨩</span> </td> <tr id=3Dentity-M=
cy><td> <code title=3D"">Mcy;</code> </=
td> <td> U+0041C </td> <td> <span class=3Dglyph t=
itle=3D"">М</span> </td> <tr id=3Dent=
ity-mcy><td> <code title=3D"">mcy;</code> =
</td> <td> U+0043C </td> <td> <span class=3Dgl=
yph title=3D"">м</span> </td> <tr id=3D=
entity-mdash><td> <code title=3D"">mdash;</co=
de> </td> <td> U+02014 </td> <td> <span cla=
ss=3Dglyph title=3D"">—</span> </td> &=
lt;tr id=3Dentity-mDDot><td> <code title=3D"">mD=
Dot;</code> </td> <td> U+0223A </td> <td> &=
lt;span class=3Dglyph title=3D"">∺</span> &l=
t;/td> <tr id=3Dentity-measuredangle><td> <code title=3D=
"">measuredangle;</code> </td> <td> U+0222=
1 </td> <td> <span class=3Dglyph title=3D"">&=
amp;angmsd;</span> </td> <tr id=3Dentity-MediumSpace>&l=
t;td> <code title=3D"">MediumSpace;</code> </=
td> <td> U+0205F </td> <td> <span class=3Dglyph t=
itle=3D""> </span> </td> <tr =
id=3Dentity-Mellintrf><td> <code title=3D"">Mell=
intrf;</code> </td> <td> U+02133 </td> <td>=
 <span class=3Dglyph title=3D"">ℳ</span>=
 </td> <tr id=3Dentity-Mfr><td> <code title=3D"=
">Mfr;</code> </td> <td> U+1D510 </td> &l=
t;td> <span class=3Dglyph title=3D"">𝔐</spa=
n> </td> <tr id=3Dentity-mfr><td> <code title=3D&=
quot;">mfr;</code> </td> <td> U+1D52A </td&g=
t; <td> <span class=3Dglyph title=3D"">𝔪&lt=
;/span> </td> <tr id=3Dentity-mho><td> <code titl=
e=3D"">mho;</code> </td> <td> U+02127 <=
/td> <td> <span class=3Dglyph title=3D"">&mh=
o;</span> </td> <tr id=3Dentity-micro><td> <co=
de title=3D"">micro;</code> </td> <td> U+0=
00B5 </td> <td> <span class=3Dglyph title=3D""&g=
t;µ</span> </td> <tr id=3Dentity-micro-legacy cl=
ass=3Dimpl><td> <code title=3D"">micro</code&=
gt; </td> <td> U+000B5 </td> <td> <span title=3D=
"">µ</span> </td> </tr><!-- (=
invalid entity with missing semicolon for legacy support only) --><=
tr id=3Dentity-mid><td> <code title=3D"">mid;&lt=
;/code> </td> <td> U+02223 </td> <td> <span=
 class=3Dglyph title=3D"">∣</span> </td>=
 <tr id=3Dentity-midast><td> <code title=3D""&gt=
;midast;</code> </td> <td> U+0002A </td> <td&g=
t; <span class=3Dglyph title=3D"">*</span> </td&=
gt; <tr id=3Dentity-midcir><td> <code title=3D""=
>midcir;</code> </td> <td> U+02AF0 </td> <t=
d> <span class=3Dglyph title=3D"">⫰</spa=
n> </td> <tr id=3Dentity-middot><td> <code title=3D=
"">middot;</code> </td> <td> U+000B7 </=
td> <td> <span class=3Dglyph title=3D"">&mid=
dot;</span> </td> <tr id=3Dentity-middot-legacy class=3Dim=
pl><td> <code title=3D"">middot</code> &lt=
;/td> <td> U+000B7 </td> <td> <span title=3D&quot=
;">·</span> </td> </tr><!-- (inva=
lid entity with missing semicolon for legacy support only) --><tr i=
d=3Dentity-minus><td> <code title=3D"">minus;&lt=
;/code> </td> <td> U+02212 </td> <td> <span=
 class=3Dglyph title=3D"">−</span> </td&g=
t; <tr id=3Dentity-minusb><td> <code title=3D""&=
gt;minusb;</code> </td> <td> U+0229F </td> <td=
> <span class=3Dglyph title=3D"">⊟</span=
> </td> <tr id=3Dentity-minusd><td> <code title=3D=
"">minusd;</code> </td> <td> U+02238 </=
td> <td> <span class=3Dglyph title=3D"">&dot=
minus;</span> </td> <tr id=3Dentity-minusdu><td> =
<code title=3D"">minusdu;</code> </td> <td=
> U+02A2A </td> <td> <span class=3Dglyph title=3D"=
">⨪</span> </td> <tr id=3Dentity-Minus=
Plus><td> <code title=3D"">MinusPlus;</code&g=
t; </td> <td> U+02213 </td> <td> <span class=3D=
glyph title=3D"">∓</span> </td> <tr id=
=3Dentity-mlcp><td> <code title=3D"">mlcp;</c=
ode> </td> <td> U+02ADB </td> <td> <span cl=
ass=3Dglyph title=3D"">⫛</span> </td> &=
lt;tr id=3Dentity-mldr><td> <code title=3D"">mld=
r;</code> </td> <td> U+02026 </td> <td> &lt=
;span class=3Dglyph title=3D"">…</span> </=
td> <tr id=3Dentity-mnplus><td> <code title=3D"&qu=
ot;>mnplus;</code> </td> <td> U+02213 </td> &l=
t;td> <span class=3Dglyph title=3D"">∓</span=
> </td> <tr id=3Dentity-models><td> <code title=3D=
"">models;</code> </td> <td> U+022A7 </=
td> <td> <span class=3Dglyph title=3D"">&mod=
els;</span> </td> <tr id=3Dentity-Mopf><td> <c=
ode title=3D"">Mopf;</code> </td> <td> U+1=
D544 </td> <td> <span class=3Dglyph title=3D""&g=
t;𝕄</span> </td> <tr id=3Dentity-mopf><td&g=
t; <code title=3D"">mopf;</code> </td> <td=
> U+1D55E </td> <td> <span class=3Dglyph title=3D"=
">𝕞</span> </td> <tr id=3Dentity-mp>&l=
t;td> <code title=3D"">mp;</code> </td> &l=
t;td> U+02213 </td> <td> <span class=3Dglyph title=3D&q=
uot;">∓</span> </td> <tr id=3Dentity-Mscr&g=
t;<td> <code title=3D"">Mscr;</code> </td&=
gt; <td> U+02133 </td> <td> <span class=3Dglyph titl=
e=3D"">ℳ</span> </td> <tr id=3Dent=
ity-mscr><td> <code title=3D"">mscr;</code&gt=
; </td> <td> U+1D4C2 </td> <td> <span class=3D=
glyph title=3D"">𝓂</span> </td> <tr =
id=3Dentity-mstpos><td> <code title=3D"">mstpos;=
</code> </td> <td> U+0223E </td> <td> <s=
pan class=3Dglyph title=3D"">∾</span> </td&g=
t; <tr id=3Dentity-Mu><td> <code title=3D"">M=
u;</code> </td> <td> U+0039C </td> <td> &lt=
;span class=3Dglyph title=3D"">Μ</span> </td=
> <tr id=3Dentity-mu><td> <code title=3D""&gt=
;mu;</code> </td> <td> U+003BC </td> <td> &=
lt;span class=3Dglyph title=3D"">μ</span> </=
td> <tr id=3Dentity-multimap><td> <code title=3D"&=
quot;>multimap;</code> </td> <td> U+022B8 </td&gt=
; <td> <span class=3Dglyph title=3D"">&multimap=
;</span> </td> <tr id=3Dentity-mumap><td> <cod=
e title=3D"">mumap;</code> </td> <td> U+02=
2B8 </td> <td> <span class=3Dglyph title=3D""&gt=
;⊸</span> </td> <tr id=3Dentity-nabla><=
td> <code title=3D"">nabla;</code> </td> &=
lt;td> U+02207 </td> <td> <span class=3Dglyph title=3D&=
quot;">∇</span> </td> <tr id=3Dentity-Na=
cute><td> <code title=3D"">Nacute;</code> =
</td> <td> U+00143 </td> <td> <span class=3Dgl=
yph title=3D"">Ń</span> </td> <tr =
id=3Dentity-nacute><td> <code title=3D"">nacute;=
</code> </td> <td> U+00144 </td> <td> <s=
pan class=3Dglyph title=3D"">ń</span> </=
td> <tr id=3Dentity-nang><td> <code title=3D"&quot=
;>nang;</code> </td> <td> U+02220 U+020D2 </td&gt=
; <td> <span class=3D"glyph compound" title=3D"&q=
uot;>∠⃒</span> </td> <tr id=3Denti=
ty-nap><td> <code title=3D"">nap;</code> &=
lt;/td> <td> U+02249 </td> <td> <span class=3Dgly=
ph title=3D"">≉</span> </td> <tr id=3D=
entity-napE><td> <code title=3D"">napE;</code=
> </td> <td> U+02A70 U+00338 </td> <td> <sp=
an class=3D"glyph compound" title=3D"">⩰&a=
mp;#x338;</span> </td> <tr id=3Dentity-napid><td>=
 <code title=3D"">napid;</code> </td> <td&=
gt; U+0224B U+00338 </td> <td> <span class=3D"glyph c=
ompound" title=3D"">≋̸</span> =
</td> <tr id=3Dentity-napos><td> <code title=3D&quot=
;">napos;</code> </td> <td> U+00149 </td>=
 <td> <span class=3Dglyph title=3D"">ʼn&lt=
;/span> </td> <tr id=3Dentity-napprox><td> <code =
title=3D"">napprox;</code> </td> <td> U+02=
249 </td> <td> <span class=3Dglyph title=3D""&gt=
;≉</span> </td> <tr id=3Dentity-natur><td&gt=
; <code title=3D"">natur;</code> </td> <td=
> U+0266E </td> <td> <span class=3Dglyph title=3D"=
">♮</span> </td> <tr id=3Dentity-natur=
al><td> <code title=3D"">natural;</code> &=
lt;/td> <td> U+0266E </td> <td> <span class=3Dgly=
ph title=3D"">♮</span> </td> <tr =
id=3Dentity-naturals><td> <code title=3D"">natur=
als;</code> </td> <td> U+02115 </td> <td> &=
lt;span class=3Dglyph title=3D"">ℕ</span>=
 </td> <tr id=3Dentity-nbsp><td> <code title=3D&quot=
;">nbsp;</code> </td> <td> U+000A0 </td> =
<td> <span class=3Dglyph title=3D""> </=
span> </td> <tr id=3Dentity-nbsp-legacy class=3Dimpl><t=
d> <code title=3D"">nbsp</code> </td> <=
td> U+000A0 </td> <td> <span title=3D"">&a=
mp;nbsp;</span> </td> </tr><!-- (invalid entity with=
 missing semicolon for legacy support only) --><tr id=3Dentity-nbum=
p><td> <code title=3D"">nbump;</code> <=
/td> <td> U+0224E U+00338 </td> <td> <span class=3D=
"glyph compound" title=3D"">≎̸&=
lt;/span> </td> <tr id=3Dentity-nbumpe><td> <code=
 title=3D"">nbumpe;</code> </td> <td> U+02=
24F U+00338 </td> <td> <span class=3D"glyph compound&=
quot; title=3D"">≏̸</span> </t=
d> <tr id=3Dentity-ncap><td> <code title=3D""=
>ncap;</code> </td> <td> U+02A43 </td> <td&=
gt; <span class=3Dglyph title=3D"">⩃</span&gt=
; </td> <tr id=3Dentity-Ncaron><td> <code title=3D&q=
uot;">Ncaron;</code> </td> <td> U+00147 </td=
> <td> <span class=3Dglyph title=3D"">&Ncaro=
n;</span> </td> <tr id=3Dentity-ncaron><td> <c=
ode title=3D"">ncaron;</code> </td> <td> U=
+00148 </td> <td> <span class=3Dglyph title=3D""=
>ň</span> </td> <tr id=3Dentity-Ncedil>&l=
t;td> <code title=3D"">Ncedil;</code> </td&gt=
; <td> U+00145 </td> <td> <span class=3Dglyph title=3D=
"">Ņ</span> </td> <tr id=3Dentity-=
ncedil><td> <code title=3D"">ncedil;</code&gt=
; </td> <td> U+00146 </td> <td> <span class=3D=
glyph title=3D"">ņ</span> </td> <t=
r id=3Dentity-ncong><td> <code title=3D"">ncong;=
</code> </td> <td> U+02247 </td> <td> <s=
pan class=3Dglyph title=3D"">≇</span> </t=
d> <tr id=3Dentity-ncongdot><td> <code title=3D"&q=
uot;>ncongdot;</code> </td> <td> U+02A6D U+00338 &lt=
;/td> <td> <span class=3D"glyph compound" title=3D&=
quot;">⩭̸</span> </td> <tr i=
d=3Dentity-ncup><td> <code title=3D"">ncup;</=
code> </td> <td> U+02A42 </td> <td> <span c=
lass=3Dglyph title=3D"">⩂</span> </td> =
<tr id=3Dentity-Ncy><td> <code title=3D"">Ncy=
;</code> </td> <td> U+0041D </td> <td> <=
span class=3Dglyph title=3D"">Н</span> </td=
> <tr id=3Dentity-ncy><td> <code title=3D""&g=
t;ncy;</code> </td> <td> U+0043D </td> <td>=
 <span class=3Dglyph title=3D"">н</span> &l=
t;/td> <tr id=3Dentity-ndash><td> <code title=3D"&=
quot;>ndash;</code> </td> <td> U+02013 </td> &=
lt;td> <span class=3Dglyph title=3D"">–</=
span> </td> <tr id=3Dentity-ne><td> <code title=3D=
"">ne;</code> </td> <td> U+02260 </td&g=
t; <td> <span class=3Dglyph title=3D"">≠<=
/span> </td> <tr id=3Dentity-nearhk><td> <code ti=
tle=3D"">nearhk;</code> </td> <td> U+02924=
 </td> <td> <span class=3Dglyph title=3D"">&a=
mp;nearhk;</span> </td> <tr id=3Dentity-neArr><td&gt=
; <code title=3D"">neArr;</code> </td> <td=
> U+021D7 </td> <td> <span class=3Dglyph title=3D"=
">⇗</span> </td> <tr id=3Dentity-nearr&g=
t;<td> <code title=3D"">nearr;</code> </td=
> <td> U+02197 </td> <td> <span class=3Dglyph tit=
le=3D"">↗</span> </td> <tr id=3De=
ntity-nearrow><td> <code title=3D"">nearrow;<=
/code> </td> <td> U+02197 </td> <td> <span =
class=3Dglyph title=3D"">↗</span> </td&=
gt; <tr id=3Dentity-nedot><td> <code title=3D""&=
gt;nedot;</code> </td> <td> U+02250 U+00338 </td>=
 <td> <span class=3D"glyph compound" title=3D"&qu=
ot;>≐̸</span> </td> <tr id=3Dentity=
-NegativeMediumSpace><td> <code title=3D"">Negat=
iveMediumSpace;</code> </td> <td> U+0200B </td> &=
lt;td> <span class=3Dglyph title=3D"">&NegativeThi=
ckSpace;</span> </td> <tr id=3Dentity-NegativeThickSpace&g=
t;<td> <code title=3D"">NegativeThickSpace;</cod=
e> </td> <td> U+0200B </td> <td> <span clas=
s=3Dglyph title=3D"">​</span> &=
lt;/td> <tr id=3Dentity-NegativeThinSpace><td> <code ti=
tle=3D"">NegativeThinSpace;</code> </td> <td&=
gt; U+0200B </td> <td> <span class=3Dglyph title=3D"&=
quot;>​</span> </td> <tr id=3Den=
tity-NegativeVeryThinSpace><td> <code title=3D""&gt=
;NegativeVeryThinSpace;</code> </td> <td> U+0200B </=
td> <td> <span class=3Dglyph title=3D"">&Neg=
ativeThickSpace;</span> </td> <tr id=3Dentity-nequiv>&l=
t;td> <code title=3D"">nequiv;</code> </td&gt=
; <td> U+02262 </td> <td> <span class=3Dglyph title=3D=
"">≢</span> </td> <tr id=3Dentity-=
nesear><td> <code title=3D"">nesear;</code&gt=
; </td> <td> U+02928 </td> <td> <span class=3D=
glyph title=3D"">⤨</span> </td> <tr =
id=3Dentity-nesim><td> <code title=3D"">nesim;&l=
t;/code> </td> <td> U+02242 U+00338 </td> <td>=
 <span class=3D"glyph compound" title=3D"">&amp=
;esim;̸</span> </td> <tr id=3Dentity-NestedGreat=
erGreater><td> <code title=3D"">NestedGreaterGre=
ater;</code> </td> <td> U+0226B </td> <td> =
<span class=3Dglyph title=3D"">≫</span> <=
/td> <tr id=3Dentity-NestedLessLess><td> <code title=3D=
"">NestedLessLess;</code> </td> <td> U+022=
6A </td> <td> <span class=3Dglyph title=3D"">=
≪</span> </td> <tr id=3Dentity-NewLine><td&gt=
; <code title=3D"">NewLine;</code> </td> <=
td> U+0000A </td> <td> <span class=3D"glyph contro=
l" title=3D"">␊</span> </td> &lt=
;tr id=3Dentity-nexist><td> <code title=3D"">nex=
ist;</code> </td> <td> U+02204 </td> <td> &=
lt;span class=3Dglyph title=3D"">∄</span> =
</td> <tr id=3Dentity-nexists><td> <code title=3D&qu=
ot;">nexists;</code> </td> <td> U+02204 </td=
> <td> <span class=3Dglyph title=3D"">&nexis=
ts;</span> </td> <tr id=3Dentity-Nfr><td> <cod=
e title=3D"">Nfr;</code> </td> <td> U+1D51=
1 </td> <td> <span class=3Dglyph title=3D"">&=
amp;Nfr;</span> </td> <tr id=3Dentity-nfr><td> &l=
t;code title=3D"">nfr;</code> </td> <td> U=
+1D52B </td> <td> <span class=3Dglyph title=3D""=
>𝔫</span> </td> <tr id=3Dentity-ngE><td&g=
t; <code title=3D"">ngE;</code> </td> <td&=
gt; U+02267 U+00338 </td> <td> <span class=3D"glyph c=
ompound" title=3D"">≧̸</span> =
</td> <tr id=3Dentity-nge><td> <code title=3D"&=
quot;>nge;</code> </td> <td> U+02271 </td> &lt=
;td> <span class=3Dglyph title=3D"">≱</spa=
n> </td> <tr id=3Dentity-ngeq><td> <code title=3D=
"">ngeq;</code> </td> <td> U+02271 </td=
> <td> <span class=3Dglyph title=3D"">≱=
</span> </td> <tr id=3Dentity-ngeqq><td> <code=
 title=3D"">ngeqq;</code> </td> <td> U+022=
67 U+00338 </td> <td> <span class=3D"glyph compound&q=
uot; title=3D"">≧̸</span> </td&g=
t; <tr id=3Dentity-ngeqslant><td> <code title=3D"&quo=
t;>ngeqslant;</code> </td> <td> U+02A7E U+00338 <=
/td> <td> <span class=3D"glyph compound" title=3D&q=
uot;">⩾̸</span> </td> <tr id=3De=
ntity-nges><td> <code title=3D"">nges;</code&=
gt; </td> <td> U+02A7E U+00338 </td> <td> <spa=
n class=3D"glyph compound" title=3D"">⩾&am=
p;#x338;</span> </td> <tr id=3Dentity-nGg><td> &l=
t;code title=3D"">nGg;</code> </td> <td> U=
+022D9 U+00338 </td> <td> <span class=3D"glyph compou=
nd" title=3D"">⋙̸</span> </t=
d> <tr id=3Dentity-ngsim><td> <code title=3D"&quot=
;>ngsim;</code> </td> <td> U+02275 </td> <t=
d> <span class=3Dglyph title=3D"">≵</span=
> </td> <tr id=3Dentity-nGt><td> <code title=3D&q=
uot;">nGt;</code> </td> <td> U+0226B U+020D2 &l=
t;/td> <td> <span class=3D"glyph compound" title=3D=
"">≫⃒</span> </td> <tr id=3D=
entity-ngt><td> <code title=3D"">ngt;</code&g=
t; </td> <td> U+0226F </td> <td> <span class=3D=
glyph title=3D"">≯</span> </td> <tr i=
d=3Dentity-ngtr><td> <code title=3D"">ngtr;</=
code> </td> <td> U+0226F </td> <td> <span c=
lass=3Dglyph title=3D"">≯</span> </td> &=
lt;tr id=3Dentity-nGtv><td> <code title=3D"">nGt=
v;</code> </td> <td> U+0226B U+00338 </td> <td=
> <span class=3D"glyph compound" title=3D"">=
≫̸</span> </td> <tr id=3Dentity-nhArr>=
<td> <code title=3D"">nhArr;</code> </td&g=
t; <td> U+021CE </td> <td> <span class=3Dglyph title=
=3D"">⇎</span> </td> <tr id=3Dentit=
y-nharr><td> <code title=3D"">nharr;</code&gt=
; </td> <td> U+021AE </td> <td> <span class=3D=
glyph title=3D"">↮</span> </td> <tr=
 id=3Dentity-nhpar><td> <code title=3D"">nhpar;&=
lt;/code> </td> <td> U+02AF2 </td> <td> <sp=
an class=3Dglyph title=3D"">⫲</span> </td=
> <tr id=3Dentity-ni><td> <code title=3D""&gt=
;ni;</code> </td> <td> U+0220B </td> <td> &=
lt;span class=3Dglyph title=3D"">∋</span> <=
/td> <tr id=3Dentity-nis><td> <code title=3D"&quot=
;>nis;</code> </td> <td> U+022FC </td> <td&=
gt; <span class=3Dglyph title=3D"">⋼</span>=
 </td> <tr id=3Dentity-nisd><td> <code title=3D&quot=
;">nisd;</code> </td> <td> U+022FA </td> =
<td> <span class=3Dglyph title=3D"">⋺</=
span> </td> <tr id=3Dentity-niv><td> <code title=3D=
"">niv;</code> </td> <td> U+0220B </td&=
gt; <td> <span class=3Dglyph title=3D"">∋&l=
t;/span> </td> <tr id=3Dentity-NJcy><td> <code ti=
tle=3D"">NJcy;</code> </td> <td> U+0040A &=
lt;/td> <td> <span class=3Dglyph title=3D"">&amp=
;NJcy;</span> </td> <tr id=3Dentity-njcy><td> &lt=
;code title=3D"">njcy;</code> </td> <td> U=
+0045A </td> <td> <span class=3Dglyph title=3D""=
>њ</span> </td> <tr id=3Dentity-nlArr><t=
d> <code title=3D"">nlArr;</code> </td> &l=
t;td> U+021CD </td> <td> <span class=3Dglyph title=3D&q=
uot;">⇍</span> </td> <tr id=3Dentity-nla=
rr><td> <code title=3D"">nlarr;</code> &lt=
;/td> <td> U+0219A </td> <td> <span class=3Dglyph=
 title=3D"">↚</span> </td> <tr id=3D=
entity-nldr><td> <code title=3D"">nldr;</code=
> </td> <td> U+02025 </td> <td> <span class=
=3Dglyph title=3D"">‥</span> </td> <=
tr id=3Dentity-nlE><td> <code title=3D"">nlE;&lt=
;/code> </td> <td> U+02266 U+00338 </td> <td> =
<span class=3D"glyph compound" title=3D"">&=
leqq;̸</span> </td> <tr id=3Dentity-nle><t=
d> <code title=3D"">nle;</code> </td> <=
td> U+02270 </td> <td> <span class=3Dglyph title=3D&quo=
t;">≰</span> </td> <tr id=3Dentity-nLeftar=
row><td> <code title=3D"">nLeftarrow;</code&g=
t; </td> <td> U+021CD </td> <td> <span class=3D=
glyph title=3D"">⇍</span> </td> <tr=
 id=3Dentity-nleftarrow><td> <code title=3D"">nl=
eftarrow;</code> </td> <td> U+0219A </td> <td&=
gt; <span class=3Dglyph title=3D"">↚</span&g=
t; </td> <tr id=3Dentity-nLeftrightarrow><td> <code =
title=3D"">nLeftrightarrow;</code> </td> <td&=
gt; U+021CE </td> <td> <span class=3Dglyph title=3D"&=
quot;>⇎</span> </td> <tr id=3Dentity-nleftrig=
htarrow><td> <code title=3D"">nleftrightarrow;&l=
t;/code> </td> <td> U+021AE </td> <td> <spa=
n class=3Dglyph title=3D"">↮</span> </td&=
gt; <tr id=3Dentity-nleq><td> <code title=3D""&g=
t;nleq;</code> </td> <td> U+02270 </td> <td&gt=
; <span class=3Dglyph title=3D"">≰</span> &=
lt;/td> <tr id=3Dentity-nleqq><td> <code title=3D"=
">nleqq;</code> </td> <td> U+02266 U+00338 <=
/td> <td> <span class=3D"glyph compound" title=3D&q=
uot;">≦̸</span> </td> <tr id=3D=
entity-nleqslant><td> <code title=3D"">nleqslant=
;</code> </td> <td> U+02A7D U+00338 </td> <td&=
gt; <span class=3D"glyph compound" title=3D"">&=
amp;les;̸</span> </td> <tr id=3Dentity-nles>&=
lt;td> <code title=3D"">nles;</code> </td>=
 <td> U+02A7D U+00338 </td> <td> <span class=3D&quot=
;glyph compound" title=3D"">⩽̸</sp=
an> </td> <tr id=3Dentity-nless><td> <code title=3D=
"">nless;</code> </td> <td> U+0226E </t=
d> <td> <span class=3Dglyph title=3D"">&nles=
s;</span> </td> <tr id=3Dentity-nLl><td> <code=
 title=3D"">nLl;</code> </td> <td> U+022D8=
 U+00338 </td> <td> <span class=3D"glyph compound&quo=
t; title=3D"">⋘̸</span> </td> &=
lt;tr id=3Dentity-nlsim><td> <code title=3D"">nl=
sim;</code> </td> <td> U+02274 </td> <td> &=
lt;span class=3Dglyph title=3D"">≴</span> &l=
t;/td> <tr id=3Dentity-nLt><td> <code title=3D"&qu=
ot;>nLt;</code> </td> <td> U+0226A U+020D2 </td&g=
t; <td> <span class=3D"glyph compound" title=3D"&=
quot;>≪⃒</span> </td> <tr id=3Dentity=
-nlt><td> <code title=3D"">nlt;</code> &lt=
;/td> <td> U+0226E </td> <td> <span class=3Dglyph=
 title=3D"">≮</span> </td> <tr id=3D=
entity-nltri><td> <code title=3D"">nltri;</co=
de> </td> <td> U+022EA </td> <td> <span cla=
ss=3Dglyph title=3D"">⋪</span> </td> &=
lt;tr id=3Dentity-nltrie><td> <code title=3D"">n=
ltrie;</code> </td> <td> U+022EC </td> <td>=
 <span class=3Dglyph title=3D"">⋬</span>=
 </td> <tr id=3Dentity-nLtv><td> <code title=3D&quot=
;">nLtv;</code> </td> <td> U+0226A U+00338 <=
/td> <td> <span class=3D"glyph compound" title=3D&q=
uot;">≪̸</span> </td> <tr id=3Den=
tity-nmid><td> <code title=3D"">nmid;</code&g=
t; </td> <td> U+02224 </td> <td> <span class=3D=
glyph title=3D"">∤</span> </td> <tr =
id=3Dentity-NoBreak><td> <code title=3D"">NoBrea=
k;</code> </td> <td> U+02060 </td> <td> &lt=
;span class=3Dglyph title=3D"">⁠</span> &l=
t;/td> <tr id=3Dentity-NonBreakingSpace><td> <code titl=
e=3D"">NonBreakingSpace;</code> </td> <td>=
 U+000A0 </td> <td> <span class=3Dglyph title=3D"&quo=
t;> </span> </td> <tr id=3Dentity-Nopf><=
td> <code title=3D"">Nopf;</code> </td> &l=
t;td> U+02115 </td> <td> <span class=3Dglyph title=3D&q=
uot;">ℕ</span> </td> <tr id=3Dentity-=
nopf><td> <code title=3D"">nopf;</code> &l=
t;/td> <td> U+1D55F </td> <td> <span class=3Dglyp=
h title=3D"">𝕟</span> </td> <tr id=3D=
entity-Not><td> <code title=3D"">Not;</code&g=
t; </td> <td> U+02AEC </td> <td> <span class=3D=
glyph title=3D"">⫬</span> </td> <tr i=
d=3Dentity-not><td> <code title=3D"">not;</co=
de> </td> <td> U+000AC </td> <td> <span cla=
ss=3Dglyph title=3D"">¬</span> </td> &lt=
;tr id=3Dentity-not-legacy class=3Dimpl><td> <code title=3D&q=
uot;">not</code> </td> <td> U+000AC </td>=
 <td> <span title=3D"">¬</span> </=
td> </tr><!-- (invalid entity with missing semicolon for lega=
cy support only) --><tr id=3Dentity-NotCongruent><td> <=
code title=3D"">NotCongruent;</code> </td> <t=
d> U+02262 </td> <td> <span class=3Dglyph title=3D&quot=
;">≢</span> </td> <tr id=3Dentity-NotCu=
pCap><td> <code title=3D"">NotCupCap;</code&g=
t; </td> <td> U+0226D </td> <td> <span class=3D=
glyph title=3D"">≭</span> </td> &l=
t;tr id=3Dentity-NotDoubleVerticalBar><td> <code title=3D&quo=
t;">NotDoubleVerticalBar;</code> </td> <td> U+0=
2226 </td> <td> <span class=3Dglyph title=3D""&g=
t;∦</span> </td> <tr id=3Dentity-NotElement>&=
lt;td> <code title=3D"">NotElement;</code> </=
td> <td> U+02209 </td> <td> <span class=3Dglyph t=
itle=3D"">∉</span> </td> <tr id=3D=
entity-NotEqual><td> <code title=3D"">NotEqual;&=
lt;/code> </td> <td> U+02260 </td> <td> <sp=
an class=3Dglyph title=3D"">≠</span> </td&gt=
; <tr id=3Dentity-NotEqualTilde><td> <code title=3D"&=
quot;>NotEqualTilde;</code> </td> <td> U+02242 U+003=
38 </td> <td> <span class=3D"glyph compound" tit=
le=3D"">≂̸</span> </td> <t=
r id=3Dentity-NotExists><td> <code title=3D"">No=
tExists;</code> </td> <td> U+02204 </td> <td&g=
t; <span class=3Dglyph title=3D"">∄</span&=
gt; </td> <tr id=3Dentity-NotGreater><td> <code titl=
e=3D"">NotGreater;</code> </td> <td> U+022=
6F </td> <td> <span class=3Dglyph title=3D"">=
≯</span> </td> <tr id=3Dentity-NotGreaterEqual>=
<td> <code title=3D"">NotGreaterEqual;</code>=
 </td> <td> U+02271 </td> <td> <span class=3Dg=
lyph title=3D"">≱</span> </td> <tr i=
d=3Dentity-NotGreaterFullEqual><td> <code title=3D"&quot=
;>NotGreaterFullEqual;</code> </td> <td> U+02267 U+0=
0338 </td> <td> <span class=3D"glyph compound" t=
itle=3D"">≧̸</span> </td> &lt=
;tr id=3Dentity-NotGreaterGreater><td> <code title=3D"&q=
uot;>NotGreaterGreater;</code> </td> <td> U+0226B U+=
00338 </td> <td> <span class=3D"glyph compound" =
title=3D"">≫̸</span> </td> <=
tr id=3Dentity-NotGreaterLess><td> <code title=3D""=
>NotGreaterLess;</code> </td> <td> U+02279 </td&g=
t; <td> <span class=3Dglyph title=3D"">≹&l=
t;/span> </td> <tr id=3Dentity-NotGreaterSlantEqual><td=
> <code title=3D"">NotGreaterSlantEqual;</code> =
</td> <td> U+02A7E U+00338 </td> <td> <span cl=
ass=3D"glyph compound" title=3D"">⩾&#x=
338;</span> </td> <tr id=3Dentity-NotGreaterTilde><t=
d> <code title=3D"">NotGreaterTilde;</code> <=
/td> <td> U+02275 </td> <td> <span class=3Dglyph =
title=3D"">≵</span> </td> <tr id=3D=
entity-NotHumpDownHump><td> <code title=3D"">Not=
HumpDownHump;</code> </td> <td> U+0224E U+00338 </td=
> <td> <span class=3D"glyph compound" title=3D&quot=
;">≎̸</span> </td> <tr id=3Dent=
ity-NotHumpEqual><td> <code title=3D"">NotHumpEq=
ual;</code> </td> <td> U+0224F U+00338 </td> <=
td> <span class=3D"glyph compound" title=3D""&g=
t;≏̸</span> </td> <tr id=3Dentity-not=
in><td> <code title=3D"">notin;</code> &lt=
;/td> <td> U+02209 </td> <td> <span class=3Dglyph=
 title=3D"">∉</span> </td> <tr id=
=3Dentity-notindot><td> <code title=3D"">notindo=
t;</code> </td> <td> U+022F5 U+00338 </td> <td=
> <span class=3D"glyph compound" title=3D"">=
⋵̸</span> </td> <tr id=3Dentity-noti=
nE><td> <code title=3D"">notinE;</code> &l=
t;/td> <td> U+022F9 U+00338 </td> <td> <span clas=
s=3D"glyph compound" title=3D"">⋹&#x=
338;</span> </td> <tr id=3Dentity-notinva><td> &l=
t;code title=3D"">notinva;</code> </td> <td&g=
t; U+02209 </td> <td> <span class=3Dglyph title=3D"&q=
uot;>∉</span> </td> <tr id=3Dentity-notinvb=
><td> <code title=3D"">notinvb;</code> &lt=
;/td> <td> U+022F7 </td> <td> <span class=3Dglyph=
 title=3D"">⋷</span> </td> <tr id=
=3Dentity-notinvc><td> <code title=3D"">notinvc;=
</code> </td> <td> U+022F6 </td> <td> <s=
pan class=3Dglyph title=3D"">⋶</span> <=
/td> <tr id=3Dentity-NotLeftTriangle><td> <code title=3D=
"">NotLeftTriangle;</code> </td> <td> U+02=
2EA </td> <td> <span class=3Dglyph title=3D""&gt=
;⋪</span> </td> <tr id=3Dentity-NotLeftTriangleB=
ar><td> <code title=3D"">NotLeftTriangleBar;<=
/code> </td> <td> U+029CF U+00338 </td> <td> &=
lt;span class=3D"glyph compound" title=3D"">&L=
eftTriangleBar;̸</span> </td> <tr id=3Dentity-No=
tLeftTriangleEqual><td> <code title=3D"">NotLeft=
TriangleEqual;</code> </td> <td> U+022EC </td> &l=
t;td> <span class=3Dglyph title=3D"">⋬</=
span> </td> <tr id=3Dentity-NotLess><td> <code ti=
tle=3D"">NotLess;</code> </td> <td> U+0226=
E </td> <td> <span class=3Dglyph title=3D"">&=
amp;nless;</span> </td> <tr id=3Dentity-NotLessEqual>&l=
t;td> <code title=3D"">NotLessEqual;</code> <=
/td> <td> U+02270 </td> <td> <span class=3Dglyph =
title=3D"">≰</span> </td> <tr id=3Den=
tity-NotLessGreater><td> <code title=3D"">NotLes=
sGreater;</code> </td> <td> U+02278 </td> <td&=
gt; <span class=3Dglyph title=3D"">≸</span&gt=
; </td> <tr id=3Dentity-NotLessLess><td> <code title=
=3D"">NotLessLess;</code> </td> <td> U+022=
6A U+00338 </td> <td> <span class=3D"glyph compound&q=
uot; title=3D"">≪̸</span> </td>=
 <tr id=3Dentity-NotLessSlantEqual><td> <code title=3D&quo=
t;">NotLessSlantEqual;</code> </td> <td> U+02A7=
D U+00338 </td> <td> <span class=3D"glyph compound&qu=
ot; title=3D"">⩽̸</span> </td>=
 <tr id=3Dentity-NotLessTilde><td> <code title=3D"&qu=
ot;>NotLessTilde;</code> </td> <td> U+02274 </td&=
gt; <td> <span class=3Dglyph title=3D"">≴=
</span> </td> <tr id=3Dentity-NotNestedGreaterGreater>&=
lt;td> <code title=3D"">NotNestedGreaterGreater;</c=
ode> </td> <td> U+02AA2 U+00338 </td> <td> &lt=
;span class=3D"glyph compound" title=3D"">&Gre=
aterGreater;̸</span> </td> <tr id=3Dentity-NotNe=
stedLessLess><td> <code title=3D"">NotNestedLess=
Less;</code> </td> <td> U+02AA1 U+00338 </td> &lt=
;td> <span class=3D"glyph compound" title=3D""&=
gt;⪡̸</span> </td> <tr id=3Dentity-=
notni><td> <code title=3D"">notni;</code> =
</td> <td> U+0220C </td> <td> <span class=3Dgl=
yph title=3D"">∌</span> </td> <tr i=
d=3Dentity-notniva><td> <code title=3D"">notniva=
;</code> </td> <td> U+0220C </td> <td> <=
span class=3Dglyph title=3D"">∌</span> </=
td> <tr id=3Dentity-notnivb><td> <code title=3D"&q=
uot;>notnivb;</code> </td> <td> U+022FE </td> =
<td> <span class=3Dglyph title=3D"">⋾&l=
t;/span> </td> <tr id=3Dentity-notnivc><td> <code=
 title=3D"">notnivc;</code> </td> <td> U+0=
22FD </td> <td> <span class=3Dglyph title=3D""&g=
t;⋽</span> </td> <tr id=3Dentity-NotPrecedes&g=
t;<td> <code title=3D"">NotPrecedes;</code> &=
lt;/td> <td> U+02280 </td> <td> <span class=3Dgly=
ph title=3D"">⊀</span> </td> <tr id=
=3Dentity-NotPrecedesEqual><td> <code title=3D""&gt=
;NotPrecedesEqual;</code> </td> <td> U+02AAF U+00338 &l=
t;/td> <td> <span class=3D"glyph compound" title=3D=
"">⪯̸</span> </td> <tr id=3D=
entity-NotPrecedesSlantEqual><td> <code title=3D""&=
gt;NotPrecedesSlantEqual;</code> </td> <td> U+022E0 &lt=
;/td> <td> <span class=3Dglyph title=3D"">&n=
prcue;</span> </td> <tr id=3Dentity-NotReverseElement>&=
lt;td> <code title=3D"">NotReverseElement;</code&gt=
; </td> <td> U+0220C </td> <td> <span class=3D=
glyph title=3D"">∌</span> </td> <tr=
 id=3Dentity-NotRightTriangle><td> <code title=3D""=
>NotRightTriangle;</code> </td> <td> U+022EB </td=
> <td> <span class=3Dglyph title=3D"">&ntria=
ngleright;</span> </td> <tr id=3Dentity-NotRightTriangleBa=
r><td> <code title=3D"">NotRightTriangleBar;<=
/code> </td> <td> U+029D0 U+00338 </td> <td> &=
lt;span class=3D"glyph compound" title=3D"">&R=
ightTriangleBar;̸</span> </td> <tr id=3Dentity-N=
otRightTriangleEqual><td> <code title=3D"">NotRi=
ghtTriangleEqual;</code> </td> <td> U+022ED </td>=
 <td> <span class=3Dglyph title=3D"">⋭&l=
t;/span> </td> <tr id=3Dentity-NotSquareSubset><td> =
<code title=3D"">NotSquareSubset;</code> </td&gt=
; <td> U+0228F U+00338 </td> <td> <span class=3D&quo=
t;glyph compound" title=3D"">⊏̸<=
/span> </td> <tr id=3Dentity-NotSquareSubsetEqual><td&g=
t; <code title=3D"">NotSquareSubsetEqual;</code> &l=
t;/td> <td> U+022E2 </td> <td> <span class=3Dglyp=
h title=3D"">⋢</span> </td> <tr i=
d=3Dentity-NotSquareSuperset><td> <code title=3D""&=
gt;NotSquareSuperset;</code> </td> <td> U+02290 U+00338=
 </td> <td> <span class=3D"glyph compound" title=
=3D"">⊐̸</span> </td> &lt=
;tr id=3Dentity-NotSquareSupersetEqual><td> <code title=3D&qu=
ot;">NotSquareSupersetEqual;</code> </td> <td> =
U+022E3 </td> <td> <span class=3Dglyph title=3D"&quot=
;>⋣</span> </td> <tr id=3Dentity-NotSubset&=
gt;<td> <code title=3D"">NotSubset;</code> &l=
t;/td> <td> U+02282 U+020D2 </td> <td> <span clas=
s=3D"glyph compound" title=3D"">⊂&#x20=
d2;</span> </td> <tr id=3Dentity-NotSubsetEqual><td&=
gt; <code title=3D"">NotSubsetEqual;</code> </td=
> <td> U+02288 </td> <td> <span class=3Dglyph tit=
le=3D"">⊈</span> </td> <tr id=3Dent=
ity-NotSucceeds><td> <code title=3D"">NotSucceed=
s;</code> </td> <td> U+02281 </td> <td> &lt=
;span class=3Dglyph title=3D"">⊁</span> </t=
d> <tr id=3Dentity-NotSucceedsEqual><td> <code title=3D=
"">NotSucceedsEqual;</code> </td> <td> U+0=
2AB0 U+00338 </td> <td> <span class=3D"glyph compound=
" title=3D"">⪰̸</span> </=
td> <tr id=3Dentity-NotSucceedsSlantEqual><td> <code ti=
tle=3D"">NotSucceedsSlantEqual;</code> </td> &lt=
;td> U+022E1 </td> <td> <span class=3Dglyph title=3D&qu=
ot;">⋡</span> </td> <tr id=3Dentity-Not=
SucceedsTilde><td> <code title=3D"">NotSucceedsT=
ilde;</code> </td> <td> U+0227F U+00338 </td> &lt=
;td> <span class=3D"glyph compound" title=3D""&=
gt;≿̸</span> </td> <tr id=3Dentity-Not=
Superset><td> <code title=3D"">NotSuperset;</=
code> </td> <td> U+02283 U+020D2 </td> <td> &l=
t;span class=3D"glyph compound" title=3D"">&su=
p;⃒</span> </td> <tr id=3Dentity-NotSupersetEqu=
al><td> <code title=3D"">NotSupersetEqual;</c=
ode> </td> <td> U+02289 </td> <td> <span cl=
ass=3Dglyph title=3D"">⊉</span> </td&=
gt; <tr id=3Dentity-NotTilde><td> <code title=3D"&quo=
t;>NotTilde;</code> </td> <td> U+02241 </td> &=
lt;td> <span class=3Dglyph title=3D"">≁</s=
pan> </td> <tr id=3Dentity-NotTildeEqual><td> <co=
de title=3D"">NotTildeEqual;</code> </td> <td=
> U+02244 </td> <td> <span class=3Dglyph title=3D"=
">≄</span> </td> <tr id=3Dentity-NotTil=
deFullEqual><td> <code title=3D"">NotTildeFullEq=
ual;</code> </td> <td> U+02247 </td> <td> &=
lt;span class=3Dglyph title=3D"">≇</span> &l=
t;/td> <tr id=3Dentity-NotTildeTilde><td> <code title=3D=
"">NotTildeTilde;</code> </td> <td> U+0224=
9 </td> <td> <span class=3Dglyph title=3D"">&=
amp;nap;</span> </td> <tr id=3Dentity-NotVerticalBar>&l=
t;td> <code title=3D"">NotVerticalBar;</code> &l=
t;/td> <td> U+02224 </td> <td> <span class=3Dglyp=
h title=3D"">∤</span> </td> <tr id=3D=
entity-npar><td> <code title=3D"">npar;</code=
> </td> <td> U+02226 </td> <td> <span class=
=3Dglyph title=3D"">∦</span> </td> &lt=
;tr id=3Dentity-nparallel><td> <code title=3D"">=
nparallel;</code> </td> <td> U+02226 </td> <td=
> <span class=3Dglyph title=3D"">∦</span&=
gt; </td> <tr id=3Dentity-nparsl><td> <code title=3D=
"">nparsl;</code> </td> <td> U+02AFD U+020=
E5 </td> <td> <span class=3D"glyph compound" tit=
le=3D"">⫽⃥</span> </td> &lt=
;tr id=3Dentity-npart><td> <code title=3D"">npar=
t;</code> </td> <td> U+02202 U+00338 </td> <td=
> <span class=3D"glyph compound" title=3D"">=
∂̸</span> </td> <tr id=3Dentity-npolint=
><td> <code title=3D"">npolint;</code> &lt=
;/td> <td> U+02A14 </td> <td> <span class=3Dglyph=
 title=3D"">⨔</span> </td> <tr id=
=3Dentity-npr><td> <code title=3D"">npr;</cod=
e> </td> <td> U+02280 </td> <td> <span clas=
s=3Dglyph title=3D"">⊀</span> </td> &l=
t;tr id=3Dentity-nprcue><td> <code title=3D"">np=
rcue;</code> </td> <td> U+022E0 </td> <td> =
<span class=3Dglyph title=3D"">⋠</span> =
</td> <tr id=3Dentity-npre><td> <code title=3D"=
">npre;</code> </td> <td> U+02AAF U+00338 </=
td> <td> <span class=3D"glyph compound" title=3D&qu=
ot;">⪯̸</span> </td> <tr id=3Den=
tity-nprec><td> <code title=3D"">nprec;</code=
> </td> <td> U+02280 </td> <td> <span class=
=3Dglyph title=3D"">⊀</span> </td> &lt=
;tr id=3Dentity-npreceq><td> <code title=3D"">np=
receq;</code> </td> <td> U+02AAF U+00338 </td> &l=
t;td> <span class=3D"glyph compound" title=3D""=
>⪯̸</span> </td> <tr id=3Dentity-nrAr=
r><td> <code title=3D"">nrArr;</code> <=
/td> <td> U+021CF </td> <td> <span class=3Dglyph =
title=3D"">⇏</span> </td> <tr id=3D=
entity-nrarr><td> <code title=3D"">nrarr;</co=
de> </td> <td> U+0219B </td> <td> <span cla=
ss=3Dglyph title=3D"">↛</span> </td> &=
lt;tr id=3Dentity-nrarrc><td> <code title=3D"">n=
rarrc;</code> </td> <td> U+02933 U+00338 </td> &l=
t;td> <span class=3D"glyph compound" title=3D""=
>⤳̸</span> </td> <tr id=3Dentity-nr=
arrw><td> <code title=3D"">nrarrw;</code> =
</td> <td> U+0219D U+00338 </td> <td> <span cl=
ass=3D"glyph compound" title=3D"">&rightsquiga=
rrow;̸</span> </td> <tr id=3Dentity-nRightarrow&=
gt;<td> <code title=3D"">nRightarrow;</code> =
</td> <td> U+021CF </td> <td> <span class=3Dgl=
yph title=3D"">⇏</span> </td> <tr i=
d=3Dentity-nrightarrow><td> <code title=3D"">nri=
ghtarrow;</code> </td> <td> U+0219B </td> <td&=
gt; <span class=3Dglyph title=3D"">↛</span&g=
t; </td> <tr id=3Dentity-nrtri><td> <code title=3D&q=
uot;">nrtri;</code> </td> <td> U+022EB </td&=
gt; <td> <span class=3Dglyph title=3D"">&ntrian=
gleright;</span> </td> <tr id=3Dentity-nrtrie><td&gt=
; <code title=3D"">nrtrie;</code> </td> <t=
d> U+022ED </td> <td> <span class=3Dglyph title=3D&quot=
;">⋭</span> </td> <tr id=3Dentity-nsc&g=
t;<td> <code title=3D"">nsc;</code> </td&g=
t; <td> U+02281 </td> <td> <span class=3Dglyph title=
=3D"">⊁</span> </td> <tr id=3Dentity-=
nsccue><td> <code title=3D"">nsccue;</code&gt=
; </td> <td> U+022E1 </td> <td> <span class=3D=
glyph title=3D"">⋡</span> </td> <t=
r id=3Dentity-nsce><td> <code title=3D"">nsce;&l=
t;/code> </td> <td> U+02AB0 U+00338 </td> <td>=
 <span class=3D"glyph compound" title=3D"">&amp=
;succeq;̸</span> </td> <tr id=3Dentity-Nscr>&=
lt;td> <code title=3D"">Nscr;</code> </td>=
 <td> U+1D4A9 </td> <td> <span class=3Dglyph title=3D=
"">𝒩</span> </td> <tr id=3Dentity-ns=
cr><td> <code title=3D"">nscr;</code> <=
/td> <td> U+1D4C3 </td> <td> <span class=3Dglyph =
title=3D"">𝓃</span> </td> <tr id=3De=
ntity-nshortmid><td> <code title=3D"">nshortmid;=
</code> </td> <td> U+02224 </td> <td> <s=
pan class=3Dglyph title=3D"">∤</span> </td=
> <tr id=3Dentity-nshortparallel><td> <code title=3D&qu=
ot;">nshortparallel;</code> </td> <td> U+02226 =
</td> <td> <span class=3Dglyph title=3D"">&am=
p;nspar;</span> </td> <tr id=3Dentity-nsim><td> &=
lt;code title=3D"">nsim;</code> </td> <td>=
 U+02241 </td> <td> <span class=3Dglyph title=3D"&quo=
t;>≁</span> </td> <tr id=3Dentity-nsime>&lt=
;td> <code title=3D"">nsime;</code> </td> =
<td> U+02244 </td> <td> <span class=3Dglyph title=3D=
"">≄</span> </td> <tr id=3Dentity-=
nsimeq><td> <code title=3D"">nsimeq;</code&gt=
; </td> <td> U+02244 </td> <td> <span class=3D=
glyph title=3D"">≄</span> </td> <t=
r id=3Dentity-nsmid><td> <code title=3D"">nsmid;=
</code> </td> <td> U+02224 </td> <td> <s=
pan class=3Dglyph title=3D"">∤</span> </td=
> <tr id=3Dentity-nspar><td> <code title=3D""=
>nspar;</code> </td> <td> U+02226 </td> <td=
> <span class=3Dglyph title=3D"">∦</span&=
gt; </td> <tr id=3Dentity-nsqsube><td> <code title=3D=
"">nsqsube;</code> </td> <td> U+022E2 <=
/td> <td> <span class=3Dglyph title=3D"">&ns=
qsube;</span> </td> <tr id=3Dentity-nsqsupe><td> =
<code title=3D"">nsqsupe;</code> </td> <td=
> U+022E3 </td> <td> <span class=3Dglyph title=3D"=
">⋣</span> </td> <tr id=3Dentity-nsub&=
gt;<td> <code title=3D"">nsub;</code> </td=
> <td> U+02284 </td> <td> <span class=3Dglyph tit=
le=3D"">⊄</span> </td> <tr id=3Denti=
ty-nsubE><td> <code title=3D"">nsubE;</code&g=
t; </td> <td> U+02AC5 U+00338 </td> <td> <span=
 class=3D"glyph compound" title=3D"">&subseteq=
q;̸</span> </td> <tr id=3Dentity-nsube><td=
> <code title=3D"">nsube;</code> </td> &lt=
;td> U+02288 </td> <td> <span class=3Dglyph title=3D&qu=
ot;">⊈</span> </td> <tr id=3Dentity-nsub=
set><td> <code title=3D"">nsubset;</code> =
</td> <td> U+02282 U+020D2 </td> <td> <span cl=
ass=3D"glyph compound" title=3D"">⊂&#x=
20d2;</span> </td> <tr id=3Dentity-nsubseteq><td>=
 <code title=3D"">nsubseteq;</code> </td> &lt=
;td> U+02288 </td> <td> <span class=3Dglyph title=3D&qu=
ot;">⊈</span> </td> <tr id=3Dentity-nsub=
seteqq><td> <code title=3D"">nsubseteqq;</cod=
e> </td> <td> U+02AC5 U+00338 </td> <td> <s=
pan class=3D"glyph compound" title=3D"">&subse=
teqq;̸</span> </td> <tr id=3Dentity-nsucc>&lt=
;td> <code title=3D"">nsucc;</code> </td> =
<td> U+02281 </td> <td> <span class=3Dglyph title=3D=
"">⊁</span> </td> <tr id=3Dentity-nsu=
cceq><td> <code title=3D"">nsucceq;</code>=
 </td> <td> U+02AB0 U+00338 </td> <td> <span c=
lass=3D"glyph compound" title=3D"">⪰&am=
p;#x338;</span> </td> <tr id=3Dentity-nsup><td> &=
lt;code title=3D"">nsup;</code> </td> <td>=
 U+02285 </td> <td> <span class=3Dglyph title=3D"&quo=
t;>⊅</span> </td> <tr id=3Dentity-nsupE>&lt=
;td> <code title=3D"">nsupE;</code> </td> =
<td> U+02AC6 U+00338 </td> <td> <span class=3D"=
glyph compound" title=3D"">⫆̸&l=
t;/span> </td> <tr id=3Dentity-nsupe><td> <code t=
itle=3D"">nsupe;</code> </td> <td> U+02289=
 </td> <td> <span class=3Dglyph title=3D"">&a=
mp;nsupseteq;</span> </td> <tr id=3Dentity-nsupset><=
td> <code title=3D"">nsupset;</code> </td>=
 <td> U+02283 U+020D2 </td> <td> <span class=3D&quot=
;glyph compound" title=3D"">⊃⃒</s=
pan> </td> <tr id=3Dentity-nsupseteq><td> <code t=
itle=3D"">nsupseteq;</code> </td> <td> U+0=
2289 </td> <td> <span class=3Dglyph title=3D""&g=
t;⊉</span> </td> <tr id=3Dentity-nsupseteqq&=
gt;<td> <code title=3D"">nsupseteqq;</code> &=
lt;/td> <td> U+02AC6 U+00338 </td> <td> <span cla=
ss=3D"glyph compound" title=3D"">⫆&a=
mp;#x338;</span> </td> <tr id=3Dentity-ntgl><td> =
<code title=3D"">ntgl;</code> </td> <td&gt=
; U+02279 </td> <td> <span class=3Dglyph title=3D"&qu=
ot;>≹</span> </td> <tr id=3Dentity-Ntilde>&=
lt;td> <code title=3D"">Ntilde;</code> </td&g=
t; <td> U+000D1 </td> <td> <span class=3Dglyph title=
=3D"">Ñ</span> </td> <tr id=3Denti=
ty-Ntilde-legacy class=3Dimpl><td> <code title=3D""=
>Ntilde</code> </td> <td> U+000D1 </td> <td=
> <span title=3D"">Ñ</span> </td&g=
t; </tr><!-- (invalid entity with missing semicolon for legacy s=
upport only) --><tr id=3Dentity-ntilde><td> <code title=
=3D"">ntilde;</code> </td> <td> U+000F1 &l=
t;/td> <td> <span class=3Dglyph title=3D"">&=
ntilde;</span> </td> <tr id=3Dentity-ntilde-legacy class=3D=
impl><td> <code title=3D"">ntilde</code> &=
lt;/td> <td> U+000F1 </td> <td> <span title=3D&qu=
ot;">ñ</span> </td> </tr><!-- (in=
valid entity with missing semicolon for legacy support only) --><tr=
 id=3Dentity-ntlg><td> <code title=3D"">ntlg;&lt=
;/code> </td> <td> U+02278 </td> <td> <span=
 class=3Dglyph title=3D"">≸</span> </td&gt=
; <tr id=3Dentity-ntriangleleft><td> <code title=3D"&=
quot;>ntriangleleft;</code> </td> <td> U+022EA </=
td> <td> <span class=3Dglyph title=3D"">&nlt=
ri;</span> </td> <tr id=3Dentity-ntrianglelefteq><td=
> <code title=3D"">ntrianglelefteq;</code> </=
td> <td> U+022EC </td> <td> <span class=3Dglyph t=
itle=3D"">⋬</span> </td> <tr id=3D=
entity-ntriangleright><td> <code title=3D"">ntri=
angleright;</code> </td> <td> U+022EB </td> <t=
d> <span class=3Dglyph title=3D"">⋫=
</span> </td> <tr id=3Dentity-ntrianglerighteq><td&g=
t; <code title=3D"">ntrianglerighteq;</code> </t=
d> <td> U+022ED </td> <td> <span class=3Dglyph ti=
tle=3D"">⋭</span> </td> <tr id=3De=
ntity-Nu><td> <code title=3D"">Nu;</code> =
</td> <td> U+0039D </td> <td> <span class=3Dgl=
yph title=3D"">Ν</span> </td> <tr id=3D=
entity-nu><td> <code title=3D"">nu;</code>=
 </td> <td> U+003BD </td> <td> <span class=3Dg=
lyph title=3D"">ν</span> </td> <tr id=3D=
entity-num><td> <code title=3D"">num;</code&g=
t; </td> <td> U+00023 </td> <td> <span class=3D=
glyph title=3D"">#</span> </td> <tr id=3Denti=
ty-numero><td> <code title=3D"">numero;</code=
> </td> <td> U+02116 </td> <td> <span class=
=3Dglyph title=3D"">№</span> </td> &l=
t;tr id=3Dentity-numsp><td> <code title=3D"">num=
sp;</code> </td> <td> U+02007 </td> <td> &l=
t;span class=3Dglyph title=3D""> </span> &lt=
;/td> <tr id=3Dentity-nvap><td> <code title=3D"&qu=
ot;>nvap;</code> </td> <td> U+0224D U+020D2 </td&=
gt; <td> <span class=3D"glyph compound" title=3D"=
">≍⃒</span> </td> <tr id=3D=
entity-nVDash><td> <code title=3D"">nVDash;</=
code> </td> <td> U+022AF </td> <td> <span c=
lass=3Dglyph title=3D"">⊯</span> </td&gt=
; <tr id=3Dentity-nVdash><td> <code title=3D""&g=
t;nVdash;</code> </td> <td> U+022AE </td> <td&=
gt; <span class=3Dglyph title=3D"">⊮</span&=
gt; </td> <tr id=3Dentity-nvDash><td> <code title=3D=
"">nvDash;</code> </td> <td> U+022AD </=
td> <td> <span class=3Dglyph title=3D"">&nvD=
ash;</span> </td> <tr id=3Dentity-nvdash><td> &lt=
;code title=3D"">nvdash;</code> </td> <td>=
 U+022AC </td> <td> <span class=3Dglyph title=3D"&quo=
t;>⊬</span> </td> <tr id=3Dentity-nvge>&l=
t;td> <code title=3D"">nvge;</code> </td> =
<td> U+02265 U+020D2 </td> <td> <span class=3D"=
glyph compound" title=3D"">≥⃒</spa=
n> </td> <tr id=3Dentity-nvgt><td> <code title=3D=
"">nvgt;</code> </td> <td> U+0003E U+020D2=
 </td> <td> <span class=3D"glyph compound" title=
=3D"">>⃒</span> </td> <tr i=
d=3Dentity-nvHarr><td> <code title=3D"">nvHarr;&=
lt;/code> </td> <td> U+02904 </td> <td> <sp=
an class=3Dglyph title=3D"">⤄</span> </t=
d> <tr id=3Dentity-nvinfin><td> <code title=3D"&qu=
ot;>nvinfin;</code> </td> <td> U+029DE </td> &=
lt;td> <span class=3Dglyph title=3D"">⧞&lt=
;/span> </td> <tr id=3Dentity-nvlArr><td> <code t=
itle=3D"">nvlArr;</code> </td> <td> U+0290=
2 </td> <td> <span class=3Dglyph title=3D"">&=
amp;nvlArr;</span> </td> <tr id=3Dentity-nvle><td&gt=
; <code title=3D"">nvle;</code> </td> <td&=
gt; U+02264 U+020D2 </td> <td> <span class=3D"glyph c=
ompound" title=3D"">≤⃒</span> &=
lt;/td> <tr id=3Dentity-nvlt><td> <code title=3D"&=
quot;>nvlt;</code> </td> <td> U+0003C U+020D2 </t=
d> <td> <span class=3D"glyph compound" title=3D&quo=
t;"><⃒</span> </td> <tr id=3Dent=
ity-nvltrie><td> <code title=3D"">nvltrie;</c=
ode> </td> <td> U+022B4 U+020D2 </td> <td> &lt=
;span class=3D"glyph compound" title=3D"">&ltr=
ie;⃒</span> </td> <tr id=3Dentity-nvrArr>&lt=
;td> <code title=3D"">nvrArr;</code> </td>=
 <td> U+02903 </td> <td> <span class=3Dglyph title=3D=
"">⤃</span> </td> <tr id=3Dentity-=
nvrtrie><td> <code title=3D"">nvrtrie;</code&=
gt; </td> <td> U+022B5 U+020D2 </td> <td> <spa=
n class=3D"glyph compound" title=3D"">⊵&=
amp;#x20d2;</span> </td> <tr id=3Dentity-nvsim><td&g=
t; <code title=3D"">nvsim;</code> </td> <t=
d> U+0223C U+020D2 </td> <td> <span class=3D"glyph=
 compound" title=3D"">∼⃒</span&gt=
; </td> <tr id=3Dentity-nwarhk><td> <code title=3D&q=
uot;">nwarhk;</code> </td> <td> U+02923 </td=
> <td> <span class=3Dglyph title=3D"">&nwarh=
k;</span> </td> <tr id=3Dentity-nwArr><td> <co=
de title=3D"">nwArr;</code> </td> <td> U+0=
21D6 </td> <td> <span class=3Dglyph title=3D""&g=
t;⇖</span> </td> <tr id=3Dentity-nwarr><td=
> <code title=3D"">nwarr;</code> </td> &lt=
;td> U+02196 </td> <td> <span class=3Dglyph title=3D&qu=
ot;">↖</span> </td> <tr id=3Dentity-nw=
arrow><td> <code title=3D"">nwarrow;</code&gt=
; </td> <td> U+02196 </td> <td> <span class=3D=
glyph title=3D"">↖</span> </td> <=
tr id=3Dentity-nwnear><td> <code title=3D"">nwne=
ar;</code> </td> <td> U+02927 </td> <td> &l=
t;span class=3Dglyph title=3D"">⤧</span> &l=
t;/td> <tr id=3Dentity-Oacute><td> <code title=3D"=
">Oacute;</code> </td> <td> U+000D3 </td>=
 <td> <span class=3Dglyph title=3D"">Ó&l=
t;/span> </td> <tr id=3Dentity-Oacute-legacy class=3Dimpl>=
<td> <code title=3D"">Oacute</code> </td&g=
t; <td> U+000D3 </td> <td> <span title=3D"&quot=
;>Ó</span> </td> </tr><!-- (invalid en=
tity with missing semicolon for legacy support only) --><tr id=3Den=
tity-oacute><td> <code title=3D"">oacute;</co=
de> </td> <td> U+000F3 </td> <td> <span cla=
ss=3Dglyph title=3D"">ó</span> </td> =
<tr id=3Dentity-oacute-legacy class=3Dimpl><td> <code titl=
e=3D"">oacute</code> </td> <td> U+000F3 &l=
t;/td> <td> <span title=3D"">ó</sp=
an> </td> </tr><!-- (invalid entity with missing semico=
lon for legacy support only) --><tr id=3Dentity-oast><td> =
<code title=3D"">oast;</code> </td> <td&gt=
; U+0229B </td> <td> <span class=3Dglyph title=3D"&qu=
ot;>⊛</span> </td> <tr id=3Dentity-ocir>&lt=
;td> <code title=3D"">ocir;</code> </td> &=
lt;td> U+0229A </td> <td> <span class=3Dglyph title=3D&=
quot;">⊚</span> </td> <tr id=3Dentity-Oci=
rc><td> <code title=3D"">Ocirc;</code> &lt=
;/td> <td> U+000D4 </td> <td> <span class=3Dglyph=
 title=3D"">Ô</span> </td> <tr id=3D=
entity-Ocirc-legacy class=3Dimpl><td> <code title=3D"&qu=
ot;>Ocirc</code> </td> <td> U+000D4 </td> <=
td> <span title=3D"">Ô</span> </td&=
gt; </tr><!-- (invalid entity with missing semicolon for legacy =
support only) --><tr id=3Dentity-ocirc><td> <code title=
=3D"">ocirc;</code> </td> <td> U+000F4 &lt=
;/td> <td> <span class=3Dglyph title=3D"">&o=
circ;</span> </td> <tr id=3Dentity-ocirc-legacy class=3Dim=
pl><td> <code title=3D"">ocirc</code> <=
/td> <td> U+000F4 </td> <td> <span title=3D"=
">ô</span> </td> </tr><!-- (invali=
d entity with missing semicolon for legacy support only) --><tr id=3D=
entity-Ocy><td> <code title=3D"">Ocy;</code&g=
t; </td> <td> U+0041E </td> <td> <span class=3D=
glyph title=3D"">О</span> </td> <tr i=
d=3Dentity-ocy><td> <code title=3D"">ocy;</co=
de> </td> <td> U+0043E </td> <td> <span cla=
ss=3Dglyph title=3D"">о</span> </td> &lt=
;tr id=3Dentity-odash><td> <code title=3D"">odas=
h;</code> </td> <td> U+0229D </td> <td> &lt=
;span class=3Dglyph title=3D"">⊝</span&gt=
; </td> <tr id=3Dentity-Odblac><td> <code title=3D&q=
uot;">Odblac;</code> </td> <td> U+00150 </td=
> <td> <span class=3Dglyph title=3D"">&Odbla=
c;</span> </td> <tr id=3Dentity-odblac><td> <c=
ode title=3D"">odblac;</code> </td> <td> U=
+00151 </td> <td> <span class=3Dglyph title=3D""=
>ő</span> </td> <tr id=3Dentity-odiv><=
td> <code title=3D"">odiv;</code> </td> &l=
t;td> U+02A38 </td> <td> <span class=3Dglyph title=3D&q=
uot;">⨸</span> </td> <tr id=3Dentity-odot=
><td> <code title=3D"">odot;</code> </t=
d> <td> U+02299 </td> <td> <span class=3Dglyph ti=
tle=3D"">⊙</span> </td> <tr id=3Dent=
ity-odsold><td> <code title=3D"">odsold;</cod=
e> </td> <td> U+029BC </td> <td> <span clas=
s=3Dglyph title=3D"">⦼</span> </td> &=
lt;tr id=3Dentity-OElig><td> <code title=3D"">OE=
lig;</code> </td> <td> U+00152 </td> <td> &=
lt;span class=3Dglyph title=3D"">Œ</span> &l=
t;/td> <tr id=3Dentity-oelig><td> <code title=3D"&=
quot;>oelig;</code> </td> <td> U+00153 </td> &=
lt;td> <span class=3Dglyph title=3D"">œ</=
span> </td> <tr id=3Dentity-ofcir><td> <code titl=
e=3D"">ofcir;</code> </td> <td> U+029BF &l=
t;/td> <td> <span class=3Dglyph title=3D"">&=
ofcir;</span> </td> <tr id=3Dentity-Ofr><td> <=
code title=3D"">Ofr;</code> </td> <td> U+1=
D512 </td> <td> <span class=3Dglyph title=3D""&g=
t;𝔒</span> </td> <tr id=3Dentity-ofr><td>=
 <code title=3D"">ofr;</code> </td> <td&gt=
; U+1D52C </td> <td> <span class=3Dglyph title=3D"&qu=
ot;>𝔬</span> </td> <tr id=3Dentity-ogon><=
td> <code title=3D"">ogon;</code> </td> &l=
t;td> U+002DB </td> <td> <span class=3Dglyph title=3D&q=
uot;">˛</span> </td> <tr id=3Dentity-Ogra=
ve><td> <code title=3D"">Ograve;</code> &l=
t;/td> <td> U+000D2 </td> <td> <span class=3Dglyp=
h title=3D"">Ò</span> </td> <tr id=
=3Dentity-Ograve-legacy class=3Dimpl><td> <code title=3D&quot=
;">Ograve</code> </td> <td> U+000D2 </td>=
 <td> <span title=3D"">Ò</span> &l=
t;/td> </tr><!-- (invalid entity with missing semicolon for l=
egacy support only) --><tr id=3Dentity-ograve><td> <cod=
e title=3D"">ograve;</code> </td> <td> U+0=
00F2 </td> <td> <span class=3Dglyph title=3D""&g=
t;ò</span> </td> <tr id=3Dentity-ograve-legacy =
class=3Dimpl><td> <code title=3D"">ograve</co=
de> </td> <td> U+000F2 </td> <td> <span tit=
le=3D"">ò</span> </td> </tr>&lt=
;!-- (invalid entity with missing semicolon for legacy support only) --&g=
t;<tr id=3Dentity-ogt><td> <code title=3D"">o=
gt;</code> </td> <td> U+029C1 </td> <td> &l=
t;span class=3Dglyph title=3D"">⧁</span> </=
td> <tr id=3Dentity-ohbar><td> <code title=3D"&quo=
t;>ohbar;</code> </td> <td> U+029B5 </td> <=
td> <span class=3Dglyph title=3D"">⦵</spa=
n> </td> <tr id=3Dentity-ohm><td> <code title=3D&=
quot;">ohm;</code> </td> <td> U+003A9 </td&g=
t; <td> <span class=3Dglyph title=3D"">Ω&lt=
;/span> </td> <tr id=3Dentity-oint><td> <code tit=
le=3D"">oint;</code> </td> <td> U+0222E &l=
t;/td> <td> <span class=3Dglyph title=3D"">&=
conint;</span> </td> <tr id=3Dentity-olarr><td> &=
lt;code title=3D"">olarr;</code> </td> <td&gt=
; U+021BA </td> <td> <span class=3Dglyph title=3D"&qu=
ot;>↺</span> </td> <tr id=3Dentity-olcir>&=
lt;td> <code title=3D"">olcir;</code> </td&gt=
; <td> U+029BE </td> <td> <span class=3Dglyph title=3D=
"">⦾</span> </td> <tr id=3Dentity-o=
lcross><td> <code title=3D"">olcross;</code&g=
t; </td> <td> U+029BB </td> <td> <span class=3D=
glyph title=3D"">⦻</span> </td> <=
tr id=3Dentity-oline><td> <code title=3D"">oline=
;</code> </td> <td> U+0203E </td> <td> <=
span class=3Dglyph title=3D"">‾</span> </=
td> <tr id=3Dentity-olt><td> <code title=3D""=
>olt;</code> </td> <td> U+029C0 </td> <td&g=
t; <span class=3Dglyph title=3D"">⧀</span> =
</td> <tr id=3Dentity-Omacr><td> <code title=3D&quot=
;">Omacr;</code> </td> <td> U+0014C </td>=
 <td> <span class=3Dglyph title=3D"">Ō&lt=
;/span> </td> <tr id=3Dentity-omacr><td> <code ti=
tle=3D"">omacr;</code> </td> <td> U+0014D =
</td> <td> <span class=3Dglyph title=3D"">&am=
p;omacr;</span> </td> <tr id=3Dentity-Omega><td> =
<code title=3D"">Omega;</code> </td> <td&g=
t; U+003A9 </td> <td> <span class=3Dglyph title=3D"&q=
uot;>Ω</span> </td> <tr id=3Dentity-omega>&l=
t;td> <code title=3D"">omega;</code> </td>=
 <td> U+003C9 </td> <td> <span class=3Dglyph title=3D=
"">ω</span> </td> <tr id=3Dentity-O=
micron><td> <code title=3D"">Omicron;</code&g=
t; </td> <td> U+0039F </td> <td> <span class=3D=
glyph title=3D"">Ο</span> </td> <=
tr id=3Dentity-omicron><td> <code title=3D"">omi=
cron;</code> </td> <td> U+003BF </td> <td> =
<span class=3Dglyph title=3D"">ο</span>=
 </td> <tr id=3Dentity-omid><td> <code title=3D&quot=
;">omid;</code> </td> <td> U+029B6 </td> =
<td> <span class=3Dglyph title=3D"">⦶</=
span> </td> <tr id=3Dentity-ominus><td> <code tit=
le=3D"">ominus;</code> </td> <td> U+02296 =
</td> <td> <span class=3Dglyph title=3D"">&am=
p;ominus;</span> </td> <tr id=3Dentity-Oopf><td> =
<code title=3D"">Oopf;</code> </td> <td&gt=
; U+1D546 </td> <td> <span class=3Dglyph title=3D"&qu=
ot;>𝕆</span> </td> <tr id=3Dentity-oopf>&lt=
;td> <code title=3D"">oopf;</code> </td> &=
lt;td> U+1D560 </td> <td> <span class=3Dglyph title=3D&=
quot;">𝕠</span> </td> <tr id=3Dentity-opa=
r><td> <code title=3D"">opar;</code> </=
td> <td> U+029B7 </td> <td> <span class=3Dglyph t=
itle=3D"">⦷</span> </td> <tr id=3Den=
tity-OpenCurlyDoubleQuote><td> <code title=3D"">=
OpenCurlyDoubleQuote;</code> </td> <td> U+0201C </td=
> <td> <span class=3Dglyph title=3D"">&ldquo=
;</span> </td> <tr id=3Dentity-OpenCurlyQuote><td&gt=
; <code title=3D"">OpenCurlyQuote;</code> </td&g=
t; <td> U+02018 </td> <td> <span class=3Dglyph title=
=3D"">‘</span> </td> <tr id=3Dentit=
y-operp><td> <code title=3D"">operp;</code&gt=
; </td> <td> U+029B9 </td> <td> <span class=3D=
glyph title=3D"">⦹</span> </td> <tr=
 id=3Dentity-oplus><td> <code title=3D"">oplus;&=
lt;/code> </td> <td> U+02295 </td> <td> <sp=
an class=3Dglyph title=3D"">⊕</span> </td=
> <tr id=3Dentity-Or><td> <code title=3D""&gt=
;Or;</code> </td> <td> U+02A54 </td> <td> &=
lt;span class=3Dglyph title=3D"">⩔</span> </=
td> <tr id=3Dentity-or><td> <code title=3D""&=
gt;or;</code> </td> <td> U+02228 </td> <td>=
 <span class=3Dglyph title=3D"">∨</span> &l=
t;/td> <tr id=3Dentity-orarr><td> <code title=3D"&=
quot;>orarr;</code> </td> <td> U+021BB </td> &=
lt;td> <span class=3Dglyph title=3D"">↻</=
span> </td> <tr id=3Dentity-ord><td> <code title=3D=
"">ord;</code> </td> <td> U+02A5D </td&=
gt; <td> <span class=3Dglyph title=3D"">⩝&l=
t;/span> </td> <tr id=3Dentity-order><td> <code t=
itle=3D"">order;</code> </td> <td> U+02134=
 </td> <td> <span class=3Dglyph title=3D"">&a=
mp;oscr;</span> </td> <tr id=3Dentity-orderof><td&gt=
; <code title=3D"">orderof;</code> </td> <=
td> U+02134 </td> <td> <span class=3Dglyph title=3D&quo=
t;">ℴ</span> </td> <tr id=3Dentity-ordf&g=
t;<td> <code title=3D"">ordf;</code> </td&=
gt; <td> U+000AA </td> <td> <span class=3Dglyph titl=
e=3D"">ª</span> </td> <tr id=3Dentit=
y-ordf-legacy class=3Dimpl><td> <code title=3D""&gt=
;ordf</code> </td> <td> U+000AA </td> <td> =
<span title=3D"">ª</span> </td> <=
/tr><!-- (invalid entity with missing semicolon for legacy support =
only) --><tr id=3Dentity-ordm><td> <code title=3D"=
">ordm;</code> </td> <td> U+000BA </td> &=
lt;td> <span class=3Dglyph title=3D"">º</s=
pan> </td> <tr id=3Dentity-ordm-legacy class=3Dimpl><td=
> <code title=3D"">ordm</code> </td> <t=
d> U+000BA </td> <td> <span title=3D"">&am=
p;ordm;</span> </td> </tr><!-- (invalid entity with =
missing semicolon for legacy support only) --><tr id=3Dentity-origo=
f><td> <code title=3D"">origof;</code> &lt=
;/td> <td> U+022B6 </td> <td> <span class=3Dglyph=
 title=3D"">⊶</span> </td> <tr id=3D=
entity-oror><td> <code title=3D"">oror;</code=
> </td> <td> U+02A56 </td> <td> <span class=
=3Dglyph title=3D"">⩖</span> </td> <=
tr id=3Dentity-orslope><td> <code title=3D"">ors=
lope;</code> </td> <td> U+02A57 </td> <td> =
<span class=3Dglyph title=3D"">⩗</span>=
 </td> <tr id=3Dentity-orv><td> <code title=3D"=
">orv;</code> </td> <td> U+02A5B </td> &l=
t;td> <span class=3Dglyph title=3D"">⩛</spa=
n> </td> <tr id=3Dentity-oS><td> <code title=3D&q=
uot;">oS;</code> </td> <td> U+024C8 </td>=
 <td> <span class=3Dglyph title=3D"">Ⓢ</s=
pan> </td> <tr id=3Dentity-Oscr><td> <code title=3D=
"">Oscr;</code> </td> <td> U+1D4AA </td=
> <td> <span class=3Dglyph title=3D"">𝒪=
</span> </td> <tr id=3Dentity-oscr><td> <code =
title=3D"">oscr;</code> </td> <td> U+02134=
 </td> <td> <span class=3Dglyph title=3D"">&a=
mp;oscr;</span> </td> <tr id=3Dentity-Oslash><td>=
 <code title=3D"">Oslash;</code> </td> <td=
> U+000D8 </td> <td> <span class=3Dglyph title=3D"=
">Ø</span> </td> <tr id=3Dentity-Oslash=
-legacy class=3Dimpl><td> <code title=3D"">Oslas=
h</code> </td> <td> U+000D8 </td> <td> <=
span title=3D"">Ø</span> </td> </t=
r><!-- (invalid entity with missing semicolon for legacy support on=
ly) --><tr id=3Dentity-oslash><td> <code title=3D"=
">oslash;</code> </td> <td> U+000F8 </td>=
 <td> <span class=3Dglyph title=3D"">ø&l=
t;/span> </td> <tr id=3Dentity-oslash-legacy class=3Dimpl>=
<td> <code title=3D"">oslash</code> </td&g=
t; <td> U+000F8 </td> <td> <span title=3D"&quot=
;>ø</span> </td> </tr><!-- (invalid en=
tity with missing semicolon for legacy support only) --><tr id=3Den=
tity-osol><td> <code title=3D"">osol;</code&g=
t; </td> <td> U+02298 </td> <td> <span class=3D=
glyph title=3D"">⊘</span> </td> <tr =
id=3Dentity-Otilde><td> <code title=3D"">Otilde;=
</code> </td> <td> U+000D5 </td> <td> <s=
pan class=3Dglyph title=3D"">Õ</span> </=
td> <tr id=3Dentity-Otilde-legacy class=3Dimpl><td> <co=
de title=3D"">Otilde</code> </td> <td> U+0=
00D5 </td> <td> <span title=3D"">Õ=
</span> </td> </tr><!-- (invalid entity with missing=
 semicolon for legacy support only) --><tr id=3Dentity-otilde>&l=
t;td> <code title=3D"">otilde;</code> </td&gt=
; <td> U+000F5 </td> <td> <span class=3Dglyph title=3D=
"">õ</span> </td> <tr id=3Dentity-=
otilde-legacy class=3Dimpl><td> <code title=3D""&gt=
;otilde</code> </td> <td> U+000F5 </td> <td&gt=
; <span title=3D"">õ</span> </td> =
</tr><!-- (invalid entity with missing semicolon for legacy supp=
ort only) --><tr id=3Dentity-Otimes><td> <code title=3D=
"">Otimes;</code> </td> <td> U+02A37 </=
td> <td> <span class=3Dglyph title=3D"">&Oti=
mes;</span> </td> <tr id=3Dentity-otimes><td> &lt=
;code title=3D"">otimes;</code> </td> <td>=
 U+02297 </td> <td> <span class=3Dglyph title=3D"&quo=
t;>⊗</span> </td> <tr id=3Dentity-otimesas&g=
t;<td> <code title=3D"">otimesas;</code> <=
/td> <td> U+02A36 </td> <td> <span class=3Dglyph =
title=3D"">⨶</span> </td> <tr id=
=3Dentity-Ouml><td> <code title=3D"">Ouml;</c=
ode> </td> <td> U+000D6 </td> <td> <span cl=
ass=3Dglyph title=3D"">Ö</span> </td> &=
lt;tr id=3Dentity-Ouml-legacy class=3Dimpl><td> <code title=3D=
"">Ouml</code> </td> <td> U+000D6 </td&=
gt; <td> <span title=3D"">Ö</span> &=
lt;/td> </tr><!-- (invalid entity with missing semicolon for =
legacy support only) --><tr id=3Dentity-ouml><td> <code=
 title=3D"">ouml;</code> </td> <td> U+000F=
6 </td> <td> <span class=3Dglyph title=3D"">&=
amp;ouml;</span> </td> <tr id=3Dentity-ouml-legacy class=3D=
impl><td> <code title=3D"">ouml</code> &lt=
;/td> <td> U+000F6 </td> <td> <span title=3D&quot=
;">ö</span> </td> </tr><!-- (invali=
d entity with missing semicolon for legacy support only) --><tr id=3D=
entity-ovbar><td> <code title=3D"">ovbar;</co=
de> </td> <td> U+0233D </td> <td> <span cla=
ss=3Dglyph title=3D"">⌽</span> </td> &=
lt;tr id=3Dentity-OverBar><td> <code title=3D"">=
OverBar;</code> </td> <td> U+0203E </td> <td&g=
t; <span class=3Dglyph title=3D"">‾</span&gt=
; </td> <tr id=3Dentity-OverBrace><td> <code title=3D=
"">OverBrace;</code> </td> <td> U+023DE &l=
t;/td> <td> <span class=3Dglyph title=3D"">&=
OverBrace;</span> </td> <tr id=3Dentity-OverBracket>&lt=
;td> <code title=3D"">OverBracket;</code> </t=
d> <td> U+023B4 </td> <td> <span class=3Dglyph ti=
tle=3D"">⎴</span> </td> <tr id=3Dent=
ity-OverParenthesis><td> <code title=3D"">OverPa=
renthesis;</code> </td> <td> U+023DC </td> <td=
> <span class=3Dglyph title=3D"">⏜=
</span> </td> <tr id=3Dentity-par><td> <code t=
itle=3D"">par;</code> </td> <td> U+02225 &=
lt;/td> <td> <span class=3Dglyph title=3D"">&amp=
;spar;</span> </td> <tr id=3Dentity-para><td> &lt=
;code title=3D"">para;</code> </td> <td> U=
+000B6 </td> <td> <span class=3Dglyph title=3D""=
>¶</span> </td> <tr id=3Dentity-para-legacy cl=
ass=3Dimpl><td> <code title=3D"">para</code&g=
t; </td> <td> U+000B6 </td> <td> <span title=3D=
"">¶</span> </td> </tr><!-- (i=
nvalid entity with missing semicolon for legacy support only) --><t=
r id=3Dentity-parallel><td> <code title=3D"">par=
allel;</code> </td> <td> U+02225 </td> <td>=
 <span class=3Dglyph title=3D"">∥</span> &=
lt;/td> <tr id=3Dentity-parsim><td> <code title=3D&quot=
;">parsim;</code> </td> <td> U+02AF3 </td&gt=
; <td> <span class=3Dglyph title=3D"">⫳&=
lt;/span> </td> <tr id=3Dentity-parsl><td> <code =
title=3D"">parsl;</code> </td> <td> U+02AF=
D </td> <td> <span class=3Dglyph title=3D"">&=
amp;parsl;</span> </td> <tr id=3Dentity-part><td>=
 <code title=3D"">part;</code> </td> <td&g=
t; U+02202 </td> <td> <span class=3Dglyph title=3D"&q=
uot;>∂</span> </td> <tr id=3Dentity-PartialD&g=
t;<td> <code title=3D"">PartialD;</code> <=
/td> <td> U+02202 </td> <td> <span class=3Dglyph =
title=3D"">∂</span> </td> <tr id=3De=
ntity-Pcy><td> <code title=3D"">Pcy;</code&gt=
; </td> <td> U+0041F </td> <td> <span class=3D=
glyph title=3D"">П</span> </td> <tr i=
d=3Dentity-pcy><td> <code title=3D"">pcy;</co=
de> </td> <td> U+0043F </td> <td> <span cla=
ss=3Dglyph title=3D"">п</span> </td> &lt=
;tr id=3Dentity-percnt><td> <code title=3D"">per=
cnt;</code> </td> <td> U+00025 </td> <td> &=
lt;span class=3Dglyph title=3D"">%</span> </td> =
<tr id=3Dentity-period><td> <code title=3D"">=
period;</code> </td> <td> U+0002E </td> <td&gt=
; <span class=3Dglyph title=3D"">.</span> </td&g=
t; <tr id=3Dentity-permil><td> <code title=3D""&=
gt;permil;</code> </td> <td> U+02030 </td> <td=
> <span class=3Dglyph title=3D"">‰</span=
> </td> <tr id=3Dentity-perp><td> <code title=3D&=
quot;">perp;</code> </td> <td> U+022A5 </td&=
gt; <td> <span class=3Dglyph title=3D"">&bottom=
;</span> </td> <tr id=3Dentity-pertenk><td> <c=
ode title=3D"">pertenk;</code> </td> <td> =
U+02031 </td> <td> <span class=3Dglyph title=3D"&quot=
;>‱</span> </td> <tr id=3Dentity-Pfr>&lt=
;td> <code title=3D"">Pfr;</code> </td> &l=
t;td> U+1D513 </td> <td> <span class=3Dglyph title=3D&q=
uot;">𝔓</span> </td> <tr id=3Dentity-pfr&g=
t;<td> <code title=3D"">pfr;</code> </td&g=
t; <td> U+1D52D </td> <td> <span class=3Dglyph title=
=3D"">𝔭</span> </td> <tr id=3Dentity-=
Phi><td> <code title=3D"">Phi;</code> <=
/td> <td> U+003A6 </td> <td> <span class=3Dglyph =
title=3D"">Φ</span> </td> <tr id=3Den=
tity-phi><td> <code title=3D"">phi;</code>=
 </td> <td> U+003C6 </td> <td> <span class=3Dg=
lyph title=3D"">φ</span> </td> <tr id=
=3Dentity-phiv><td> <code title=3D"">phiv;</c=
ode> </td> <td> U+003D5 </td> <td> <span cl=
ass=3Dglyph title=3D"">ϕ</span> </td> &=
lt;tr id=3Dentity-phmmat><td> <code title=3D"">p=
hmmat;</code> </td> <td> U+02133 </td> <td>=
 <span class=3Dglyph title=3D"">ℳ</span>=
 </td> <tr id=3Dentity-phone><td> <code title=3D&quo=
t;">phone;</code> </td> <td> U+0260E </td&gt=
; <td> <span class=3Dglyph title=3D"">☎&l=
t;/span> </td> <tr id=3Dentity-Pi><td> <code titl=
e=3D"">Pi;</code> </td> <td> U+003A0 </=
td> <td> <span class=3Dglyph title=3D"">Π=
</span> </td> <tr id=3Dentity-pi><td> <code ti=
tle=3D"">pi;</code> </td> <td> U+003C0 &lt=
;/td> <td> <span class=3Dglyph title=3D"">&p=
i;</span> </td> <tr id=3Dentity-pitchfork><td> &l=
t;code title=3D"">pitchfork;</code> </td> <td=
> U+022D4 </td> <td> <span class=3Dglyph title=3D"=
">⋔</span> </td> <tr id=3Dentity-piv>&=
lt;td> <code title=3D"">piv;</code> </td> =
<td> U+003D6 </td> <td> <span class=3Dglyph title=3D=
"">ϖ</span> </td> <tr id=3Dentity-p=
lanck><td> <code title=3D"">planck;</code>=
 </td> <td> U+0210F </td> <td> <span class=3Dg=
lyph title=3D"">ℏ</span> </td> <tr=
 id=3Dentity-planckh><td> <code title=3D"">planc=
kh;</code> </td> <td> U+0210E </td> <td> &l=
t;span class=3Dglyph title=3D"">ℎ</span> &=
lt;/td> <tr id=3Dentity-plankv><td> <code title=3D&quot=
;">plankv;</code> </td> <td> U+0210F </td&gt=
; <td> <span class=3Dglyph title=3D"">ℏ&=
lt;/span> </td> <tr id=3Dentity-plus><td> <code t=
itle=3D"">plus;</code> </td> <td> U+0002B =
</td> <td> <span class=3Dglyph title=3D"">+&l=
t;/span> </td> <tr id=3Dentity-plusacir><td> <cod=
e title=3D"">plusacir;</code> </td> <td> U=
+02A23 </td> <td> <span class=3Dglyph title=3D""=
>⨣</span> </td> <tr id=3Dentity-plusb>&=
lt;td> <code title=3D"">plusb;</code> </td&gt=
; <td> U+0229E </td> <td> <span class=3Dglyph title=3D=
"">⊞</span> </td> <tr id=3Dentity=
-pluscir><td> <code title=3D"">pluscir;</code=
> </td> <td> U+02A22 </td> <td> <span class=
=3Dglyph title=3D"">⨢</span> </td> &=
lt;tr id=3Dentity-plusdo><td> <code title=3D"">p=
lusdo;</code> </td> <td> U+02214 </td> <td>=
 <span class=3Dglyph title=3D"">∔</span&gt=
; </td> <tr id=3Dentity-plusdu><td> <code title=3D&q=
uot;">plusdu;</code> </td> <td> U+02A25 </td=
> <td> <span class=3Dglyph title=3D"">&plusd=
u;</span> </td> <tr id=3Dentity-pluse><td> <co=
de title=3D"">pluse;</code> </td> <td> U+0=
2A72 </td> <td> <span class=3Dglyph title=3D""&g=
t;⩲</span> </td> <tr id=3Dentity-PlusMinus>&l=
t;td> <code title=3D"">PlusMinus;</code> </td=
> <td> U+000B1 </td> <td> <span class=3Dglyph tit=
le=3D"">±</span> </td> <tr id=3Den=
tity-plusmn><td> <code title=3D"">plusmn;</co=
de> </td> <td> U+000B1 </td> <td> <span cla=
ss=3Dglyph title=3D"">±</span> </td> =
<tr id=3Dentity-plusmn-legacy class=3Dimpl><td> <code titl=
e=3D"">plusmn</code> </td> <td> U+000B1 &l=
t;/td> <td> <span title=3D"">±</sp=
an> </td> </tr><!-- (invalid entity with missing semico=
lon for legacy support only) --><tr id=3Dentity-plussim><td&g=
t; <code title=3D"">plussim;</code> </td> &lt=
;td> U+02A26 </td> <td> <span class=3Dglyph title=3D&qu=
ot;">⨦</span> </td> <tr id=3Dentity-pl=
ustwo><td> <code title=3D"">plustwo;</code&gt=
; </td> <td> U+02A27 </td> <td> <span class=3D=
glyph title=3D"">⨧</span> </td> <=
tr id=3Dentity-pm><td> <code title=3D"">pm;</=
code> </td> <td> U+000B1 </td> <td> <span c=
lass=3Dglyph title=3D"">±</span> </td&gt=
; <tr id=3Dentity-Poincareplane><td> <code title=3D"&=
quot;>Poincareplane;</code> </td> <td> U+0210C </=
td> <td> <span class=3Dglyph title=3D"">&Hfr=
;</span> </td> <tr id=3Dentity-pointint><td> <=
code title=3D"">pointint;</code> </td> <td&gt=
; U+02A15 </td> <td> <span class=3Dglyph title=3D"&qu=
ot;>⨕</span> </td> <tr id=3Dentity-Popf&gt=
;<td> <code title=3D"">Popf;</code> </td&g=
t; <td> U+02119 </td> <td> <span class=3Dglyph title=
=3D"">ℙ</span> </td> <tr id=3Denti=
ty-popf><td> <code title=3D"">popf;</code>=
 </td> <td> U+1D561 </td> <td> <span class=3Dg=
lyph title=3D"">𝕡</span> </td> <tr i=
d=3Dentity-pound><td> <code title=3D"">pound;&lt=
;/code> </td> <td> U+000A3 </td> <td> <span=
 class=3Dglyph title=3D"">£</span> </td&g=
t; <tr id=3Dentity-pound-legacy class=3Dimpl><td> <code ti=
tle=3D"">pound</code> </td> <td> U+000A3 &=
lt;/td> <td> <span title=3D"">£</sp=
an> </td> </tr><!-- (invalid entity with missing semico=
lon for legacy support only) --><tr id=3Dentity-Pr><td> &l=
t;code title=3D"">Pr;</code> </td> <td> U+=
02ABB </td> <td> <span class=3Dglyph title=3D""&=
gt;⪻</span> </td> <tr id=3Dentity-pr><td> =
<code title=3D"">pr;</code> </td> <td> =
U+0227A </td> <td> <span class=3Dglyph title=3D"&quot=
;>≺</span> </td> <tr id=3Dentity-prap><td&=
gt; <code title=3D"">prap;</code> </td> <t=
d> U+02AB7 </td> <td> <span class=3Dglyph title=3D&quot=
;">⪷</span> </td> <tr id=3Dentity-prcue&g=
t;<td> <code title=3D"">prcue;</code> </td=
> <td> U+0227C </td> <td> <span class=3Dglyph tit=
le=3D"">≼</span> </td> <tr id=
=3Dentity-prE><td> <code title=3D"">prE;</cod=
e> </td> <td> U+02AB3 </td> <td> <span clas=
s=3Dglyph title=3D"">⪳</span> </td> <=
tr id=3Dentity-pre><td> <code title=3D"">pre;&lt=
;/code> </td> <td> U+02AAF </td> <td> <span=
 class=3Dglyph title=3D"">⪯</span> </td>=
 <tr id=3Dentity-prec><td> <code title=3D"">p=
rec;</code> </td> <td> U+0227A </td> <td> &=
lt;span class=3Dglyph title=3D"">≺</span> </=
td> <tr id=3Dentity-precapprox><td> <code title=3D&quot=
;">precapprox;</code> </td> <td> U+02AB7 </t=
d> <td> <span class=3Dglyph title=3D"">&prap=
;</span> </td> <tr id=3Dentity-preccurlyeq><td> &=
lt;code title=3D"">preccurlyeq;</code> </td> &lt=
;td> U+0227C </td> <td> <span class=3Dglyph title=3D&qu=
ot;">≼</span> </td> <tr id=3Dentit=
y-Precedes><td> <code title=3D"">Precedes;</c=
ode> </td> <td> U+0227A </td> <td> <span cl=
ass=3Dglyph title=3D"">≺</span> </td> &lt=
;tr id=3Dentity-PrecedesEqual><td> <code title=3D""=
>PrecedesEqual;</code> </td> <td> U+02AAF </td&gt=
; <td> <span class=3Dglyph title=3D"">⪯<=
/span> </td> <tr id=3Dentity-PrecedesSlantEqual><td>=
 <code title=3D"">PrecedesSlantEqual;</code> </t=
d> <td> U+0227C </td> <td> <span class=3Dglyph ti=
tle=3D"">≼</span> </td> <tr i=
d=3Dentity-PrecedesTilde><td> <code title=3D"">P=
recedesTilde;</code> </td> <td> U+0227E </td> &lt=
;td> <span class=3Dglyph title=3D"">≾</sp=
an> </td> <tr id=3Dentity-preceq><td> <code title=
=3D"">preceq;</code> </td> <td> U+02AAF &l=
t;/td> <td> <span class=3Dglyph title=3D"">&=
pre;</span> </td> <tr id=3Dentity-precnapprox><td&gt=
; <code title=3D"">precnapprox;</code> </td> =
<td> U+02AB9 </td> <td> <span class=3Dglyph title=3D=
"">⪹</span> </td> <tr id=3Dentity-p=
recneqq><td> <code title=3D"">precneqq;</code=
> </td> <td> U+02AB5 </td> <td> <span class=
=3Dglyph title=3D"">⪵</span> </td> =
<tr id=3Dentity-precnsim><td> <code title=3D""&g=
t;precnsim;</code> </td> <td> U+022E8 </td> <t=
d> <span class=3Dglyph title=3D"">⋨</spa=
n> </td> <tr id=3Dentity-precsim><td> <code title=
=3D"">precsim;</code> </td> <td> U+0227E &=
lt;/td> <td> <span class=3Dglyph title=3D"">&amp=
;prsim;</span> </td> <tr id=3Dentity-Prime><td> &=
lt;code title=3D"">Prime;</code> </td> <td&gt=
; U+02033 </td> <td> <span class=3Dglyph title=3D"&qu=
ot;>″</span> </td> <tr id=3Dentity-prime>&=
lt;td> <code title=3D"">prime;</code> </td&gt=
; <td> U+02032 </td> <td> <span class=3Dglyph title=3D=
"">′</span> </td> <tr id=3Dentity-p=
rimes><td> <code title=3D"">primes;</code>=
 </td> <td> U+02119 </td> <td> <span class=3Dg=
lyph title=3D"">ℙ</span> </td> <tr=
 id=3Dentity-prnap><td> <code title=3D"">prnap;&=
lt;/code> </td> <td> U+02AB9 </td> <td> <sp=
an class=3Dglyph title=3D"">⪹</span> </td=
> <tr id=3Dentity-prnE><td> <code title=3D""&=
gt;prnE;</code> </td> <td> U+02AB5 </td> <td&g=
t; <span class=3Dglyph title=3D"">⪵</span=
> </td> <tr id=3Dentity-prnsim><td> <code title=3D=
"">prnsim;</code> </td> <td> U+022E8 </=
td> <td> <span class=3Dglyph title=3D"">&prn=
sim;</span> </td> <tr id=3Dentity-prod><td> <c=
ode title=3D"">prod;</code> </td> <td> U+0=
220F </td> <td> <span class=3Dglyph title=3D""&g=
t;∏</span> </td> <tr id=3Dentity-Product><t=
d> <code title=3D"">Product;</code> </td> =
<td> U+0220F </td> <td> <span class=3Dglyph title=3D=
"">∏</span> </td> <tr id=3Dentity-pr=
ofalar><td> <code title=3D"">profalar;</code&=
gt; </td> <td> U+0232E </td> <td> <span class=3D=
glyph title=3D"">⌮</span> </td> &lt=
;tr id=3Dentity-profline><td> <code title=3D"">p=
rofline;</code> </td> <td> U+02312 </td> <td&g=
t; <span class=3Dglyph title=3D"">⌒</span=
> </td> <tr id=3Dentity-profsurf><td> <code title=
=3D"">profsurf;</code> </td> <td> U+02313 =
</td> <td> <span class=3Dglyph title=3D"">&am=
p;profsurf;</span> </td> <tr id=3Dentity-prop><td&gt=
; <code title=3D"">prop;</code> </td> <td&=
gt; U+0221D </td> <td> <span class=3Dglyph title=3D"&=
quot;>∝</span> </td> <tr id=3Dentity-Proport=
ion><td> <code title=3D"">Proportion;</code&g=
t; </td> <td> U+02237 </td> <td> <span class=3D=
glyph title=3D"">∷</span> </td> <tr=
 id=3Dentity-Proportional><td> <code title=3D"">=
Proportional;</code> </td> <td> U+0221D </td> &lt=
;td> <span class=3Dglyph title=3D"">∝</s=
pan> </td> <tr id=3Dentity-propto><td> <code titl=
e=3D"">propto;</code> </td> <td> U+0221D &=
lt;/td> <td> <span class=3Dglyph title=3D"">&amp=
;propto;</span> </td> <tr id=3Dentity-prsim><td> =
<code title=3D"">prsim;</code> </td> <td&g=
t; U+0227E </td> <td> <span class=3Dglyph title=3D"&q=
uot;>≾</span> </td> <tr id=3Dentity-prurel&gt=
;<td> <code title=3D"">prurel;</code> </td=
> <td> U+022B0 </td> <td> <span class=3Dglyph tit=
le=3D"">⊰</span> </td> <tr id=3Den=
tity-Pscr><td> <code title=3D"">Pscr;</code&g=
t; </td> <td> U+1D4AB </td> <td> <span class=3D=
glyph title=3D"">𝒫</span> </td> <tr =
id=3Dentity-pscr><td> <code title=3D"">pscr;<=
/code> </td> <td> U+1D4C5 </td> <td> <span =
class=3Dglyph title=3D"">𝓅</span> </td>=
 <tr id=3Dentity-Psi><td> <code title=3D"">Ps=
i;</code> </td> <td> U+003A8 </td> <td> &lt=
;span class=3Dglyph title=3D"">Ψ</span> </t=
d> <tr id=3Dentity-psi><td> <code title=3D""&=
gt;psi;</code> </td> <td> U+003C8 </td> <td&gt=
; <span class=3Dglyph title=3D"">ψ</span> &=
lt;/td> <tr id=3Dentity-puncsp><td> <code title=3D&quot=
;">puncsp;</code> </td> <td> U+02008 </td&gt=
; <td> <span class=3Dglyph title=3D""> &=
lt;/span> </td> <tr id=3Dentity-Qfr><td> <code ti=
tle=3D"">Qfr;</code> </td> <td> U+1D514 &l=
t;/td> <td> <span class=3Dglyph title=3D"">&=
Qfr;</span> </td> <tr id=3Dentity-qfr><td> <co=
de title=3D"">qfr;</code> </td> <td> U+1D5=
2E </td> <td> <span class=3Dglyph title=3D"">=
𝔮</span> </td> <tr id=3Dentity-qint><td> =
<code title=3D"">qint;</code> </td> <td&gt=
; U+02A0C </td> <td> <span class=3Dglyph title=3D"&qu=
ot;>⨌</span> </td> <tr id=3Dentity-Qopf>&=
lt;td> <code title=3D"">Qopf;</code> </td>=
 <td> U+0211A </td> <td> <span class=3Dglyph title=3D=
"">ℚ</span> </td> <tr id=3Denti=
ty-qopf><td> <code title=3D"">qopf;</code>=
 </td> <td> U+1D562 </td> <td> <span class=3Dg=
lyph title=3D"">𝕢</span> </td> <tr i=
d=3Dentity-qprime><td> <code title=3D"">qprime;&=
lt;/code> </td> <td> U+02057 </td> <td> <sp=
an class=3Dglyph title=3D"">⁗</span> </t=
d> <tr id=3Dentity-Qscr><td> <code title=3D""=
>Qscr;</code> </td> <td> U+1D4AC </td> <td&=
gt; <span class=3Dglyph title=3D"">𝒬</span&gt=
; </td> <tr id=3Dentity-qscr><td> <code title=3D&quo=
t;">qscr;</code> </td> <td> U+1D4C6 </td>=
 <td> <span class=3Dglyph title=3D"">𝓆<=
/span> </td> <tr id=3Dentity-quaternions><td> <co=
de title=3D"">quaternions;</code> </td> <td&g=
t; U+0210D </td> <td> <span class=3Dglyph title=3D"&q=
uot;>ℍ</span> </td> <tr id=3Dentity-qua=
tint><td> <code title=3D"">quatint;</code>=
 </td> <td> U+02A16 </td> <td> <span class=3Dg=
lyph title=3D"">⨖</span> </td> <t=
r id=3Dentity-quest><td> <code title=3D"">quest;=
</code> </td> <td> U+0003F </td> <td> <s=
pan class=3Dglyph title=3D"">?</span> </td> <=
tr id=3Dentity-questeq><td> <code title=3D"">que=
steq;</code> </td> <td> U+0225F </td> <td> =
<span class=3Dglyph title=3D"">≟</span>=
 </td> <tr id=3Dentity-QUOT><td> <code title=3D&quot=
;">QUOT;</code> </td> <td> U+00022 </td> =
<td> <span class=3Dglyph title=3D"">"</span=
> </td> <tr id=3Dentity-QUOT-legacy class=3Dimpl><td&gt=
; <code title=3D"">QUOT</code> </td> <td&g=
t; U+00022 </td> <td> <span title=3D"">"=
</span> </td> </tr><!-- (invalid entity with missing=
 semicolon for legacy support only) --><tr id=3Dentity-quot><=
td> <code title=3D"">quot;</code> </td> &l=
t;td> U+00022 </td> <td> <span class=3Dglyph title=3D&q=
uot;">"</span> </td> <tr id=3Dentity-quot-leg=
acy class=3Dimpl><td> <code title=3D"">quot</=
code> </td> <td> U+00022 </td> <td> <span t=
itle=3D"">"</span> </td> </tr><!--=
 (invalid entity with missing semicolon for legacy support only) -->&l=
t;tr id=3Dentity-rAarr><td> <code title=3D"">rAa=
rr;</code> </td> <td> U+021DB </td> <td> &l=
t;span class=3Dglyph title=3D"">⇛</span> &lt=
;/td> <tr id=3Dentity-race><td> <code title=3D"&qu=
ot;>race;</code> </td> <td> U+0223D U+00331 </td&=
gt; <td> <span class=3D"glyph compound" title=3D"=
">∽̱</span> </td> <tr id=3De=
ntity-Racute><td> <code title=3D"">Racute;</c=
ode> </td> <td> U+00154 </td> <td> <span cl=
ass=3Dglyph title=3D"">Ŕ</span> </td>=
 <tr id=3Dentity-racute><td> <code title=3D""&gt=
;racute;</code> </td> <td> U+00155 </td> <td&g=
t; <span class=3Dglyph title=3D"">ŕ</span&g=
t; </td> <tr id=3Dentity-radic><td> <code title=3D&q=
uot;">radic;</code> </td> <td> U+0221A </td&=
gt; <td> <span class=3Dglyph title=3D"">√=
</span> </td> <tr id=3Dentity-raemptyv><td> <c=
ode title=3D"">raemptyv;</code> </td> <td>=
 U+029B3 </td> <td> <span class=3Dglyph title=3D"&quo=
t;>⦳</span> </td> <tr id=3Dentity-Rang>=
<td> <code title=3D"">Rang;</code> </td&gt=
; <td> U+027EB </td> <td> <span class=3Dglyph title=3D=
"">⟫</span> </td> <tr id=3Dentity-ra=
ng><td> <code title=3D"">rang;</code> <=
/td> <td> U+027E9 </td> <td> <span class=3Dglyph =
title=3D"">⟩</span> </td> <tr id=3D=
entity-rangd><td> <code title=3D"">rangd;</co=
de> </td> <td> U+02992 </td> <td> <span cla=
ss=3Dglyph title=3D"">⦒</span> </td> &=
lt;tr id=3Dentity-range><td> <code title=3D"">ra=
nge;</code> </td> <td> U+029A5 </td> <td> &=
lt;span class=3Dglyph title=3D"">⦥</span> &l=
t;/td> <tr id=3Dentity-rangle><td> <code title=3D"=
">rangle;</code> </td> <td> U+027E9 </td>=
 <td> <span class=3Dglyph title=3D"">⟩&l=
t;/span> </td> <tr id=3Dentity-raquo><td> <code t=
itle=3D"">raquo;</code> </td> <td> U+000BB=
 </td> <td> <span class=3Dglyph title=3D"">&a=
mp;raquo;</span> </td> <tr id=3Dentity-raquo-legacy class=3D=
impl><td> <code title=3D"">raquo</code> &l=
t;/td> <td> U+000BB </td> <td> <span title=3D&quo=
t;">»</span> </td> </tr><!-- (inva=
lid entity with missing semicolon for legacy support only) --><tr i=
d=3Dentity-Rarr><td> <code title=3D"">Rarr;</=
code> </td> <td> U+021A0 </td> <td> <span c=
lass=3Dglyph title=3D"">↠</span>=
 </td> <tr id=3Dentity-rArr><td> <code title=3D&quot=
;">rArr;</code> </td> <td> U+021D2 </td> =
<td> <span class=3Dglyph title=3D"">⇒&l=
t;/span> </td> <tr id=3Dentity-rarr><td> <code ti=
tle=3D"">rarr;</code> </td> <td> U+02192 &=
lt;/td> <td> <span class=3Dglyph title=3D"">&amp=
;srarr;</span> </td> <tr id=3Dentity-rarrap><td> =
<code title=3D"">rarrap;</code> </td> <td&=
gt; U+02975 </td> <td> <span class=3Dglyph title=3D"&=
quot;>⥵</span> </td> <tr id=3Dentity-rarrb&g=
t;<td> <code title=3D"">rarrb;</code> </td=
> <td> U+021E5 </td> <td> <span class=3Dglyph tit=
le=3D"">⇥</span> </td> <tr id=3Dent=
ity-rarrbfs><td> <code title=3D"">rarrbfs;</c=
ode> </td> <td> U+02920 </td> <td> <span cl=
ass=3Dglyph title=3D"">⤠</span> </td&gt=
; <tr id=3Dentity-rarrc><td> <code title=3D""&gt=
;rarrc;</code> </td> <td> U+02933 </td> <td&gt=
; <span class=3Dglyph title=3D"">⤳</span>=
 </td> <tr id=3Dentity-rarrfs><td> <code title=3D&qu=
ot;">rarrfs;</code> </td> <td> U+0291E </td&=
gt; <td> <span class=3Dglyph title=3D"">&rarrfs=
;</span> </td> <tr id=3Dentity-rarrhk><td> <co=
de title=3D"">rarrhk;</code> </td> <td> U+=
021AA </td> <td> <span class=3Dglyph title=3D""&=
gt;↪</span> </td> <tr id=3Dentity-rarrl=
p><td> <code title=3D"">rarrlp;</code> &lt=
;/td> <td> U+021AC </td> <td> <span class=3Dglyph=
 title=3D"">↬</span> </td> <tr id=3D=
entity-rarrpl><td> <code title=3D"">rarrpl;</=
code> </td> <td> U+02945 </td> <td> <span c=
lass=3Dglyph title=3D"">⥅</span> </td&gt=
; <tr id=3Dentity-rarrsim><td> <code title=3D""&=
gt;rarrsim;</code> </td> <td> U+02974 </td> <t=
d> <span class=3Dglyph title=3D"">⥴</sp=
an> </td> <tr id=3Dentity-Rarrtl><td> <code title=
=3D"">Rarrtl;</code> </td> <td> U+02916 &l=
t;/td> <td> <span class=3Dglyph title=3D"">&=
Rarrtl;</span> </td> <tr id=3Dentity-rarrtl><td> =
<code title=3D"">rarrtl;</code> </td> <td&=
gt; U+021A3 </td> <td> <span class=3Dglyph title=3D"&=
quot;>↣</span> </td> <tr id=3Dentity=
-rarrw><td> <code title=3D"">rarrw;</code>=
 </td> <td> U+0219D </td> <td> <span class=3Dg=
lyph title=3D"">↝</span> </td&g=
t; <tr id=3Dentity-rAtail><td> <code title=3D""&=
gt;rAtail;</code> </td> <td> U+0291C </td> <td=
> <span class=3Dglyph title=3D"">⤜</span=
> </td> <tr id=3Dentity-ratail><td> <code title=3D=
"">ratail;</code> </td> <td> U+0291A </=
td> <td> <span class=3Dglyph title=3D"">&rat=
ail;</span> </td> <tr id=3Dentity-ratio><td> <=
code title=3D"">ratio;</code> </td> <td> U=
+02236 </td> <td> <span class=3Dglyph title=3D""=
>∶</span> </td> <tr id=3Dentity-rationals>=
<td> <code title=3D"">rationals;</code> </=
td> <td> U+0211A </td> <td> <span class=3Dglyph t=
itle=3D"">ℚ</span> </td> <tr id=
=3Dentity-RBarr><td> <code title=3D"">RBarr;<=
/code> </td> <td> U+02910 </td> <td> <span =
class=3Dglyph title=3D"">⤐</span> </td=
> <tr id=3Dentity-rBarr><td> <code title=3D""=
>rBarr;</code> </td> <td> U+0290F </td> <td=
> <span class=3Dglyph title=3D"">⤏</spa=
n> </td> <tr id=3Dentity-rbarr><td> <code title=3D=
"">rbarr;</code> </td> <td> U+0290D </t=
d> <td> <span class=3Dglyph title=3D"">&rbar=
r;</span> </td> <tr id=3Dentity-rbbrk><td> <co=
de title=3D"">rbbrk;</code> </td> <td> U+0=
2773 </td> <td> <span class=3Dglyph title=3D""&g=
t;❳</span> </td> <tr id=3Dentity-rbrace><t=
d> <code title=3D"">rbrace;</code> </td> &=
lt;td> U+0007D </td> <td> <span class=3Dglyph title=3D&=
quot;">}</span> </td> <tr id=3Dentity-rbrack>&l=
t;td> <code title=3D"">rbrack;</code> </td&gt=
; <td> U+0005D </td> <td> <span class=3Dglyph title=3D=
"">]</span> </td> <tr id=3Dentity-rbrke>&l=
t;td> <code title=3D"">rbrke;</code> </td>=
 <td> U+0298C </td> <td> <span class=3Dglyph title=3D=
"">⦌</span> </td> <tr id=3Dentity-r=
brksld><td> <code title=3D"">rbrksld;</code&g=
t; </td> <td> U+0298E </td> <td> <span class=3D=
glyph title=3D"">⦎</span> </td> <=
tr id=3Dentity-rbrkslu><td> <code title=3D"">rbr=
kslu;</code> </td> <td> U+02990 </td> <td> =
<span class=3Dglyph title=3D"">⦐</span>=
 </td> <tr id=3Dentity-Rcaron><td> <code title=3D&qu=
ot;">Rcaron;</code> </td> <td> U+00158 </td&=
gt; <td> <span class=3Dglyph title=3D"">&Rcaron=
;</span> </td> <tr id=3Dentity-rcaron><td> <co=
de title=3D"">rcaron;</code> </td> <td> U+=
00159 </td> <td> <span class=3Dglyph title=3D""&=
gt;ř</span> </td> <tr id=3Dentity-Rcedil>&lt=
;td> <code title=3D"">Rcedil;</code> </td>=
 <td> U+00156 </td> <td> <span class=3Dglyph title=3D=
"">Ŗ</span> </td> <tr id=3Dentity-=
rcedil><td> <code title=3D"">rcedil;</code&gt=
; </td> <td> U+00157 </td> <td> <span class=3D=
glyph title=3D"">ŗ</span> </td> <t=
r id=3Dentity-rceil><td> <code title=3D"">rceil;=
</code> </td> <td> U+02309 </td> <td> <s=
pan class=3Dglyph title=3D"">⌉</span> </t=
d> <tr id=3Dentity-rcub><td> <code title=3D""=
>rcub;</code> </td> <td> U+0007D </td> <td&=
gt; <span class=3Dglyph title=3D"">}</span> </td=
> <tr id=3Dentity-Rcy><td> <code title=3D""&g=
t;Rcy;</code> </td> <td> U+00420 </td> <td>=
 <span class=3Dglyph title=3D"">Р</span> &l=
t;/td> <tr id=3Dentity-rcy><td> <code title=3D"&qu=
ot;>rcy;</code> </td> <td> U+00440 </td> <t=
d> <span class=3Dglyph title=3D"">р</span&g=
t; </td> <tr id=3Dentity-rdca><td> <code title=3D&qu=
ot;">rdca;</code> </td> <td> U+02937 </td&gt=
; <td> <span class=3Dglyph title=3D"">⤷&lt=
;/span> </td> <tr id=3Dentity-rdldhar><td> <code =
title=3D"">rdldhar;</code> </td> <td> U+02=
969 </td> <td> <span class=3Dglyph title=3D""&gt=
;⥩</span> </td> <tr id=3Dentity-rdquo><t=
d> <code title=3D"">rdquo;</code> </td> &l=
t;td> U+0201D </td> <td> <span class=3Dglyph title=3D&q=
uot;">”</span> </td> <tr id=3Dentity-rdq=
uor><td> <code title=3D"">rdquor;</code> &=
lt;/td> <td> U+0201D </td> <td> <span class=3Dgly=
ph title=3D"">”</span> </td> <tr id=
=3Dentity-rdsh><td> <code title=3D"">rdsh;</c=
ode> </td> <td> U+021B3 </td> <td> <span cl=
ass=3Dglyph title=3D"">↳</span> </td> &=
lt;tr id=3Dentity-Re><td> <code title=3D"">Re;&l=
t;/code> </td> <td> U+0211C </td> <td> <spa=
n class=3Dglyph title=3D"">ℜ</span> </=
td> <tr id=3Dentity-real><td> <code title=3D"&quot=
;>real;</code> </td> <td> U+0211C </td> <td=
> <span class=3Dglyph title=3D"">ℜ</sp=
an> </td> <tr id=3Dentity-realine><td> <code titl=
e=3D"">realine;</code> </td> <td> U+0211B =
</td> <td> <span class=3Dglyph title=3D"">&am=
p;realine;</span> </td> <tr id=3Dentity-realpart><td=
> <code title=3D"">realpart;</code> </td> =
<td> U+0211C </td> <td> <span class=3Dglyph title=3D=
"">ℜ</span> </td> <tr id=3Dentit=
y-reals><td> <code title=3D"">reals;</code&gt=
; </td> <td> U+0211D </td> <td> <span class=3D=
glyph title=3D"">ℝ</span> </td> <tr=
 id=3Dentity-rect><td> <code title=3D"">rect;&lt=
;/code> </td> <td> U+025AD </td> <td> <span=
 class=3Dglyph title=3D"">▭</span> </td&gt=
; <tr id=3Dentity-REG><td> <code title=3D"">R=
EG;</code> </td> <td> U+000AE </td> <td> &l=
t;span class=3Dglyph title=3D"">®</span> </=
td> <tr id=3Dentity-REG-legacy class=3Dimpl><td> <code =
title=3D"">REG</code> </td> <td> U+000AE &=
lt;/td> <td> <span title=3D"">®</span=
> </td> </tr><!-- (invalid entity with missing semicolo=
n for legacy support only) --><tr id=3Dentity-reg><td> &lt=
;code title=3D"">reg;</code> </td> <td> U+=
000AE </td> <td> <span class=3Dglyph title=3D""&=
gt;®</span> </td> <tr id=3Dentity-reg-legacy class=
=3Dimpl><td> <code title=3D"">reg</code> &=
lt;/td> <td> U+000AE </td> <td> <span title=3D&qu=
ot;">®</span> </td> </tr><!-- (inval=
id entity with missing semicolon for legacy support only) --><tr id=
=3Dentity-ReverseElement><td> <code title=3D"">R=
everseElement;</code> </td> <td> U+0220B </td> &l=
t;td> <span class=3Dglyph title=3D"">∋</spa=
n> </td> <tr id=3Dentity-ReverseEquilibrium><td> &lt=
;code title=3D"">ReverseEquilibrium;</code> </td&gt=
; <td> U+021CB </td> <td> <span class=3Dglyph title=3D=
"">⇋</span> </td> <tr i=
d=3Dentity-ReverseUpEquilibrium><td> <code title=3D"&quo=
t;>ReverseUpEquilibrium;</code> </td> <td> U+0296F &=
lt;/td> <td> <span class=3Dglyph title=3D"">&amp=
;duhar;</span> </td> <tr id=3Dentity-rfisht><td> =
<code title=3D"">rfisht;</code> </td> <td&=
gt; U+0297D </td> <td> <span class=3Dglyph title=3D"&=
quot;>⥽</span> </td> <tr id=3Dentity-rfloor&=
gt;<td> <code title=3D"">rfloor;</code> </=
td> <td> U+0230B </td> <td> <span class=3Dglyph t=
itle=3D"">⌋</span> </td> <tr id=3D=
entity-Rfr><td> <code title=3D"">Rfr;</code&g=
t; </td> <td> U+0211C </td> <td> <span class=3D=
glyph title=3D"">ℜ</span> </td> &lt=
;tr id=3Dentity-rfr><td> <code title=3D"">rfr;&l=
t;/code> </td> <td> U+1D52F </td> <td> <spa=
n class=3Dglyph title=3D"">𝔯</span> </td&gt=
; <tr id=3Dentity-rHar><td> <code title=3D"">=
rHar;</code> </td> <td> U+02964 </td> <td> =
<span class=3Dglyph title=3D"">⥤</span> &l=
t;/td> <tr id=3Dentity-rhard><td> <code title=3D"&=
quot;>rhard;</code> </td> <td> U+021C1 </td> &=
lt;td> <span class=3Dglyph title=3D"">⇁</=
span> </td> <tr id=3Dentity-rharu><td> <code titl=
e=3D"">rharu;</code> </td> <td> U+021C0 &l=
t;/td> <td> <span class=3Dglyph title=3D"">&=
rharu;</span> </td> <tr id=3Dentity-rharul><td> &=
lt;code title=3D"">rharul;</code> </td> <td&g=
t; U+0296C </td> <td> <span class=3Dglyph title=3D"&q=
uot;>⥬</span> </td> <tr id=3Dentity-Rho>&=
lt;td> <code title=3D"">Rho;</code> </td> =
<td> U+003A1 </td> <td> <span class=3Dglyph title=3D=
"">Ρ</span> </td> <tr id=3Dentity-rho=
><td> <code title=3D"">rho;</code> </td=
> <td> U+003C1 </td> <td> <span class=3Dglyph tit=
le=3D"">ρ</span> </td> <tr id=3Dentit=
y-rhov><td> <code title=3D"">rhov;</code> =
</td> <td> U+003F1 </td> <td> <span class=3Dgl=
yph title=3D"">ϱ</span> </td> <tr id=
=3Dentity-RightAngleBracket><td> <code title=3D""&g=
t;RightAngleBracket;</code> </td> <td> U+027E9 </td&=
gt; <td> <span class=3Dglyph title=3D"">&#x27E9=
;</span> </td> <tr id=3Dentity-RightArrow><td> &l=
t;code title=3D"">RightArrow;</code> </td> <t=
d> U+02192 </td> <td> <span class=3Dglyph title=3D&quot=
;">→</span> </td> <tr id=3Dentity-Righta=
rrow><td> <code title=3D"">Rightarrow;</code&=
gt; </td> <td> U+021D2 </td> <td> <span class=3D=
glyph title=3D"">⇒</span> </td> <=
tr id=3Dentity-rightarrow><td> <code title=3D"">=
rightarrow;</code> </td> <td> U+02192 </td> <t=
d> <span class=3Dglyph title=3D"">→</span=
> </td> <tr id=3Dentity-RightArrowBar><td> <code =
title=3D"">RightArrowBar;</code> </td> <td&gt=
; U+021E5 </td> <td> <span class=3Dglyph title=3D"&qu=
ot;>⇥</span> </td> <tr id=3Dentity-RightArrow=
LeftArrow><td> <code title=3D"">RightArrowLeftAr=
row;</code> </td> <td> U+021C4 </td> <td> &=
lt;span class=3Dglyph title=3D"">⇄</span> &l=
t;/td> <tr id=3Dentity-rightarrowtail><td> <code title=3D=
"">rightarrowtail;</code> </td> <td> U+021=
A3 </td> <td> <span class=3Dglyph title=3D"">=
↣</span> </td> <tr id=3Dentity-RightCei=
ling><td> <code title=3D"">RightCeiling;</cod=
e> </td> <td> U+02309 </td> <td> <span clas=
s=3Dglyph title=3D"">⌉</span> </td> &l=
t;tr id=3Dentity-RightDoubleBracket><td> <code title=3D"=
">RightDoubleBracket;</code> </td> <td> U+027E7=
 </td> <td> <span class=3Dglyph title=3D"">&a=
mp;robrk;</span> </td> <tr id=3Dentity-RightDownTeeVector&=
gt;<td> <code title=3D"">RightDownTeeVector;</co=
de> </td> <td> U+0295D </td> <td> <span cla=
ss=3Dglyph title=3D"">⥝</span> =
</td> <tr id=3Dentity-RightDownVector><td> <code tit=
le=3D"">RightDownVector;</code> </td> <td>=
 U+021C2 </td> <td> <span class=3Dglyph title=3D"&quo=
t;>⇂</span> </td> <tr id=3Dentity-RightDownVe=
ctorBar><td> <code title=3D"">RightDownVectorBar=
;</code> </td> <td> U+02955 </td> <td> <=
span class=3Dglyph title=3D"">⥕</s=
pan> </td> <tr id=3Dentity-RightFloor><td> <code =
title=3D"">RightFloor;</code> </td> <td> U=
+0230B </td> <td> <span class=3Dglyph title=3D""=
>⌋</span> </td> <tr id=3Dentity-rightharpoon=
down><td> <code title=3D"">rightharpoondown;<=
/code> </td> <td> U+021C1 </td> <td> <span =
class=3Dglyph title=3D"">⇁</span> </td&gt=
; <tr id=3Dentity-rightharpoonup><td> <code title=3D"=
">rightharpoonup;</code> </td> <td> U+021C0 &lt=
;/td> <td> <span class=3Dglyph title=3D"">&r=
haru;</span> </td> <tr id=3Dentity-rightleftarrows><=
td> <code title=3D"">rightleftarrows;</code> &lt=
;/td> <td> U+021C4 </td> <td> <span class=3Dglyph=
 title=3D"">⇄</span> </td> <tr id=3D=
entity-rightleftharpoons><td> <code title=3D"">r=
ightleftharpoons;</code> </td> <td> U+021CC </td>=
 <td> <span class=3Dglyph title=3D"">⇌&lt=
;/span> </td> <tr id=3Dentity-rightrightarrows><td> =
<code title=3D"">rightrightarrows;</code> </td&g=
t; <td> U+021C9 </td> <td> <span class=3Dglyph title=
=3D"">⇉</span> </td> <tr=
 id=3Dentity-rightsquigarrow><td> <code title=3D""&=
gt;rightsquigarrow;</code> </td> <td> U+0219D </td&g=
t; <td> <span class=3Dglyph title=3D"">&rightsq=
uigarrow;</span> </td> <tr id=3Dentity-RightTee><td&=
gt; <code title=3D"">RightTee;</code> </td> &=
lt;td> U+022A2 </td> <td> <span class=3Dglyph title=3D&=
quot;">⊢</span> </td> <tr id=3Dentity-Ri=
ghtTeeArrow><td> <code title=3D"">RightTeeArrow;=
</code> </td> <td> U+021A6 </td> <td> <s=
pan class=3Dglyph title=3D"">↦</span> </=
td> <tr id=3Dentity-RightTeeVector><td> <code title=3D&=
quot;">RightTeeVector;</code> </td> <td> U+0295=
B </td> <td> <span class=3Dglyph title=3D"">&=
amp;RightTeeVector;</span> </td> <tr id=3Dentity-rightthre=
etimes><td> <code title=3D"">rightthreetimes;&lt=
;/code> </td> <td> U+022CC </td> <td> <span=
 class=3Dglyph title=3D"">⋌</span>=
 </td> <tr id=3Dentity-RightTriangle><td> <code titl=
e=3D"">RightTriangle;</code> </td> <td> U+=
022B3 </td> <td> <span class=3Dglyph title=3D""&=
gt;⊳</span> </td> <tr id=3Dentity-Rig=
htTriangleBar><td> <code title=3D"">RightTriangl=
eBar;</code> </td> <td> U+029D0 </td> <td> =
<span class=3Dglyph title=3D"">⧐<=
/span> </td> <tr id=3Dentity-RightTriangleEqual><td>=
 <code title=3D"">RightTriangleEqual;</code> </t=
d> <td> U+022B5 </td> <td> <span class=3Dglyph ti=
tle=3D"">⊵</span> </td> <tr id=3Den=
tity-RightUpDownVector><td> <code title=3D"">Rig=
htUpDownVector;</code> </td> <td> U+0294F </td> &=
lt;td> <span class=3Dglyph title=3D"">&RightUpDown=
Vector;</span> </td> <tr id=3Dentity-RightUpTeeVector>&=
lt;td> <code title=3D"">RightUpTeeVector;</code>=
 </td> <td> U+0295C </td> <td> <span class=3Dg=
lyph title=3D"">⥜</span> </td&=
gt; <tr id=3Dentity-RightUpVector><td> <code title=3D&quot=
;">RightUpVector;</code> </td> <td> U+021BE &lt=
;/td> <td> <span class=3Dglyph title=3D"">&u=
pharpoonright;</span> </td> <tr id=3Dentity-RightUpVectorB=
ar><td> <code title=3D"">RightUpVectorBar;</c=
ode> </td> <td> U+02954 </td> <td> <span cl=
ass=3Dglyph title=3D"">⥔</span> &=
lt;/td> <tr id=3Dentity-RightVector><td> <code title=3D=
"">RightVector;</code> </td> <td> U+021C0 =
</td> <td> <span class=3Dglyph title=3D"">&am=
p;rharu;</span> </td> <tr id=3Dentity-RightVectorBar>&l=
t;td> <code title=3D"">RightVectorBar;</code> &l=
t;/td> <td> U+02953 </td> <td> <span class=3Dglyp=
h title=3D"">⥓</span> </td> &=
lt;tr id=3Dentity-ring><td> <code title=3D"">rin=
g;</code> </td> <td> U+002DA </td> <td> &lt=
;span class=3Dglyph title=3D"">˚</span> </=
td> <tr id=3Dentity-risingdotseq><td> <code title=3D&qu=
ot;">risingdotseq;</code> </td> <td> U+02253 &l=
t;/td> <td> <span class=3Dglyph title=3D"">&=
risingdotseq;</span> </td> <tr id=3Dentity-rlarr><td=
> <code title=3D"">rlarr;</code> </td> &lt=
;td> U+021C4 </td> <td> <span class=3Dglyph title=3D&qu=
ot;">⇄</span> </td> <tr id=3Dentity-rlha=
r><td> <code title=3D"">rlhar;</code> <=
/td> <td> U+021CC </td> <td> <span class=3Dglyph =
title=3D"">⇌</span> </td> <tr id=3D=
entity-rlm><td> <code title=3D"">rlm;</code&g=
t; </td> <td> U+0200F </td> <td> <span class=3D=
glyph title=3D"">‏</span> </td> <tr i=
d=3Dentity-rmoust><td> <code title=3D"">rmoust;&=
lt;/code> </td> <td> U+023B1 </td> <td> <sp=
an class=3Dglyph title=3D"">⎱</span> &l=
t;/td> <tr id=3Dentity-rmoustache><td> <code title=3D&q=
uot;">rmoustache;</code> </td> <td> U+023B1 &lt=
;/td> <td> <span class=3Dglyph title=3D"">&r=
moustache;</span> </td> <tr id=3Dentity-rnmid><td&gt=
; <code title=3D"">rnmid;</code> </td> <td=
> U+02AEE </td> <td> <span class=3Dglyph title=3D"=
">⫮</span> </td> <tr id=3Dentity-roang&g=
t;<td> <code title=3D"">roang;</code> </td=
> <td> U+027ED </td> <td> <span class=3Dglyph tit=
le=3D"">⟭</span> </td> <tr id=3Dent=
ity-roarr><td> <code title=3D"">roarr;</code&=
gt; </td> <td> U+021FE </td> <td> <span class=3D=
glyph title=3D"">⇾</span> </td> <tr=
 id=3Dentity-robrk><td> <code title=3D"">robrk;&=
lt;/code> </td> <td> U+027E7 </td> <td> <sp=
an class=3Dglyph title=3D"">⟧</span> </td=
> <tr id=3Dentity-ropar><td> <code title=3D""=
>ropar;</code> </td> <td> U+02986 </td> <td=
> <span class=3Dglyph title=3D"">⦆</span&=
gt; </td> <tr id=3Dentity-Ropf><td> <code title=3D&q=
uot;">Ropf;</code> </td> <td> U+0211D </td&g=
t; <td> <span class=3Dglyph title=3D"">ℝ&=
lt;/span> </td> <tr id=3Dentity-ropf><td> <code t=
itle=3D"">ropf;</code> </td> <td> U+1D563 =
</td> <td> <span class=3Dglyph title=3D"">&am=
p;ropf;</span> </td> <tr id=3Dentity-roplus><td> =
<code title=3D"">roplus;</code> </td> <td&=
gt; U+02A2E </td> <td> <span class=3Dglyph title=3D"&=
quot;>⨮</span> </td> <tr id=3Dentity-rotimes=
><td> <code title=3D"">rotimes;</code> &lt=
;/td> <td> U+02A35 </td> <td> <span class=3Dglyph=
 title=3D"">⨵</span> </td> <tr id=
=3Dentity-RoundImplies><td> <code title=3D"">Rou=
ndImplies;</code> </td> <td> U+02970 </td> <td=
> <span class=3Dglyph title=3D"">⥰&lt=
;/span> </td> <tr id=3Dentity-rpar><td> <code tit=
le=3D"">rpar;</code> </td> <td> U+00029 &l=
t;/td> <td> <span class=3Dglyph title=3D"">)<=
/span> </td> <tr id=3Dentity-rpargt><td> <code ti=
tle=3D"">rpargt;</code> </td> <td> U+02994=
 </td> <td> <span class=3Dglyph title=3D"">&a=
mp;rpargt;</span> </td> <tr id=3Dentity-rppolint><td=
> <code title=3D"">rppolint;</code> </td> =
<td> U+02A12 </td> <td> <span class=3Dglyph title=3D=
"">⨒</span> </td> <tr id=3Dentit=
y-rrarr><td> <code title=3D"">rrarr;</code&gt=
; </td> <td> U+021C9 </td> <td> <span class=3D=
glyph title=3D"">⇉</span> </td=
> <tr id=3Dentity-Rrightarrow><td> <code title=3D"=
">Rrightarrow;</code> </td> <td> U+021DB </t=
d> <td> <span class=3Dglyph title=3D"">&rAar=
r;</span> </td> <tr id=3Dentity-rsaquo><td> <c=
ode title=3D"">rsaquo;</code> </td> <td> U=
+0203A </td> <td> <span class=3Dglyph title=3D""=
>›</span> </td> <tr id=3Dentity-Rscr><=
td> <code title=3D"">Rscr;</code> </td> &l=
t;td> U+0211B </td> <td> <span class=3Dglyph title=3D&q=
uot;">ℛ</span> </td> <tr id=3Dentity-r=
scr><td> <code title=3D"">rscr;</code> &lt=
;/td> <td> U+1D4C7 </td> <td> <span class=3Dglyph=
 title=3D"">𝓇</span> </td> <tr id=3D=
entity-Rsh><td> <code title=3D"">Rsh;</code&g=
t; </td> <td> U+021B1 </td> <td> <span class=3D=
glyph title=3D"">↱</span> </td> <tr i=
d=3Dentity-rsh><td> <code title=3D"">rsh;</co=
de> </td> <td> U+021B1 </td> <td> <span cla=
ss=3Dglyph title=3D"">↱</span> </td> &lt=
;tr id=3Dentity-rsqb><td> <code title=3D"">rsqb;=
</code> </td> <td> U+0005D </td> <td> <s=
pan class=3Dglyph title=3D"">]</span> </td> <=
tr id=3Dentity-rsquo><td> <code title=3D"">rsquo=
;</code> </td> <td> U+02019 </td> <td> <=
span class=3Dglyph title=3D"">’</span> <=
/td> <tr id=3Dentity-rsquor><td> <code title=3D"&q=
uot;>rsquor;</code> </td> <td> U+02019 </td> &=
lt;td> <span class=3Dglyph title=3D"">’<=
/span> </td> <tr id=3Dentity-rthree><td> <code ti=
tle=3D"">rthree;</code> </td> <td> U+022CC=
 </td> <td> <span class=3Dglyph title=3D"">&a=
mp;rightthreetimes;</span> </td> <tr id=3Dentity-rtimes&gt=
;<td> <code title=3D"">rtimes;</code> </td=
> <td> U+022CA </td> <td> <span class=3Dglyph tit=
le=3D"">⋊</span> </td> <tr id=3Den=
tity-rtri><td> <code title=3D"">rtri;</code&g=
t; </td> <td> U+025B9 </td> <td> <span class=3D=
glyph title=3D"">▹</span> </td&gt=
; <tr id=3Dentity-rtrie><td> <code title=3D""&gt=
;rtrie;</code> </td> <td> U+022B5 </td> <td&gt=
; <span class=3Dglyph title=3D"">⊵</span>=
 </td> <tr id=3Dentity-rtrif><td> <code title=3D&quo=
t;">rtrif;</code> </td> <td> U+025B8 </td&gt=
; <td> <span class=3Dglyph title=3D"">&blacktri=
angleright;</span> </td> <tr id=3Dentity-rtriltri><t=
d> <code title=3D"">rtriltri;</code> </td>=
 <td> U+029CE </td> <td> <span class=3Dglyph title=3D=
"">⧎</span> </td> <tr id=3Dentit=
y-RuleDelayed><td> <code title=3D"">RuleDelayed;=
</code> </td> <td> U+029F4 </td> <td> <s=
pan class=3Dglyph title=3D"">⧴</span> =
</td> <tr id=3Dentity-ruluhar><td> <code title=3D&qu=
ot;">ruluhar;</code> </td> <td> U+02968 </td=
> <td> <span class=3Dglyph title=3D"">&ruluh=
ar;</span> </td> <tr id=3Dentity-rx><td> <code=
 title=3D"">rx;</code> </td> <td> U+0211E =
</td> <td> <span class=3Dglyph title=3D"">&am=
p;rx;</span> </td> <tr id=3Dentity-Sacute><td> &l=
t;code title=3D"">Sacute;</code> </td> <td&gt=
; U+0015A </td> <td> <span class=3Dglyph title=3D"&qu=
ot;>Ś</span> </td> <tr id=3Dentity-sacute&gt=
;<td> <code title=3D"">sacute;</code> </td=
> <td> U+0015B </td> <td> <span class=3Dglyph tit=
le=3D"">ś</span> </td> <tr id=3Den=
tity-sbquo><td> <code title=3D"">sbquo;</code=
> </td> <td> U+0201A </td> <td> <span class=
=3Dglyph title=3D"">‚</span> </td> &lt=
;tr id=3Dentity-Sc><td> <code title=3D"">Sc;<=
/code> </td> <td> U+02ABC </td> <td> <span =
class=3Dglyph title=3D"">⪼</span> </td> &=
lt;tr id=3Dentity-sc><td> <code title=3D"">sc;&l=
t;/code> </td> <td> U+0227B </td> <td> <spa=
n class=3Dglyph title=3D"">≻</span> </td&g=
t; <tr id=3Dentity-scap><td> <code title=3D""&gt=
;scap;</code> </td> <td> U+02AB8 </td> <td>=
 <span class=3Dglyph title=3D"">⪸</span=
> </td> <tr id=3Dentity-Scaron><td> <code title=3D=
"">Scaron;</code> </td> <td> U+00160 </=
td> <td> <span class=3Dglyph title=3D"">&Sca=
ron;</span> </td> <tr id=3Dentity-scaron><td> &lt=
;code title=3D"">scaron;</code> </td> <td>=
 U+00161 </td> <td> <span class=3Dglyph title=3D"&quo=
t;>š</span> </td> <tr id=3Dentity-sccue>&=
lt;td> <code title=3D"">sccue;</code> </td&gt=
; <td> U+0227D </td> <td> <span class=3Dglyph title=3D=
"">≽</span> </td> <tr id=3Dentity-s=
cE><td> <code title=3D"">scE;</code> </=
td> <td> U+02AB4 </td> <td> <span class=3Dglyph t=
itle=3D"">⪴</span> </td> <tr id=3Dent=
ity-sce><td> <code title=3D"">sce;</code> =
</td> <td> U+02AB0 </td> <td> <span class=3Dgl=
yph title=3D"">⪰</span> </td> <tr =
id=3Dentity-Scedil><td> <code title=3D"">Scedil;=
</code> </td> <td> U+0015E </td> <td> <s=
pan class=3Dglyph title=3D"">Ş</span> </=
td> <tr id=3Dentity-scedil><td> <code title=3D"&qu=
ot;>scedil;</code> </td> <td> U+0015F </td> &l=
t;td> <span class=3Dglyph title=3D"">ş</=
span> </td> <tr id=3Dentity-Scirc><td> <code titl=
e=3D"">Scirc;</code> </td> <td> U+0015C &l=
t;/td> <td> <span class=3Dglyph title=3D"">&=
Scirc;</span> </td> <tr id=3Dentity-scirc><td> &l=
t;code title=3D"">scirc;</code> </td> <td>=
 U+0015D </td> <td> <span class=3Dglyph title=3D"&quo=
t;>ŝ</span> </td> <tr id=3Dentity-scnap>&l=
t;td> <code title=3D"">scnap;</code> </td>=
 <td> U+02ABA </td> <td> <span class=3Dglyph title=3D=
"">⪺</span> </td> <tr id=3Dentity-s=
cnE><td> <code title=3D"">scnE;</code> &lt=
;/td> <td> U+02AB6 </td> <td> <span class=3Dglyph=
 title=3D"">⪶</span> </td> <tr i=
d=3Dentity-scnsim><td> <code title=3D"">scnsim;&=
lt;/code> </td> <td> U+022E9 </td> <td> <sp=
an class=3Dglyph title=3D"">⋩</span> <=
/td> <tr id=3Dentity-scpolint><td> <code title=3D"=
">scpolint;</code> </td> <td> U+02A13 </td&g=
t; <td> <span class=3Dglyph title=3D"">&scpolin=
t;</span> </td> <tr id=3Dentity-scsim><td> <co=
de title=3D"">scsim;</code> </td> <td> U+0=
227F </td> <td> <span class=3Dglyph title=3D""&g=
t;≿</span> </td> <tr id=3Dentity-Scy><td&g=
t; <code title=3D"">Scy;</code> </td> <td&=
gt; U+00421 </td> <td> <span class=3Dglyph title=3D"&=
quot;>С</span> </td> <tr id=3Dentity-scy>&lt=
;td> <code title=3D"">scy;</code> </td> &l=
t;td> U+00441 </td> <td> <span class=3Dglyph title=3D&q=
uot;">с</span> </td> <tr id=3Dentity-sdot&=
gt;<td> <code title=3D"">sdot;</code> </td=
> <td> U+022C5 </td> <td> <span class=3Dglyph tit=
le=3D"">⋅</span> </td> <tr id=3Denti=
ty-sdotb><td> <code title=3D"">sdotb;</code&g=
t; </td> <td> U+022A1 </td> <td> <span class=3D=
glyph title=3D"">⊡</span> </td> &l=
t;tr id=3Dentity-sdote><td> <code title=3D"">sdo=
te;</code> </td> <td> U+02A66 </td> <td> &l=
t;span class=3Dglyph title=3D"">⩦</span> &lt=
;/td> <tr id=3Dentity-searhk><td> <code title=3D"&=
quot;>searhk;</code> </td> <td> U+02925 </td> =
<td> <span class=3Dglyph title=3D"">⤥&=
lt;/span> </td> <tr id=3Dentity-seArr><td> <code =
title=3D"">seArr;</code> </td> <td> U+021D=
8 </td> <td> <span class=3Dglyph title=3D"">&=
amp;seArr;</span> </td> <tr id=3Dentity-searr><td&gt=
; <code title=3D"">searr;</code> </td> <td=
> U+02198 </td> <td> <span class=3Dglyph title=3D"=
">↘</span> </td> <tr id=3Dentity-searr=
ow><td> <code title=3D"">searrow;</code> &=
lt;/td> <td> U+02198 </td> <td> <span class=3Dgly=
ph title=3D"">↘</span> </td> <tr =
id=3Dentity-sect><td> <code title=3D"">sect;<=
/code> </td> <td> U+000A7 </td> <td> <span =
class=3Dglyph title=3D"">§</span> </td>=
 <tr id=3Dentity-sect-legacy class=3Dimpl><td> <code title=
=3D"">sect</code> </td> <td> U+000A7 </=
td> <td> <span title=3D"">§</span&gt=
; </td> </tr><!-- (invalid entity with missing semicolon f=
or legacy support only) --><tr id=3Dentity-semi><td> <c=
ode title=3D"">semi;</code> </td> <td> U+0=
003B </td> <td> <span class=3Dglyph title=3D""&g=
t;;</span> </td> <tr id=3Dentity-seswar><td> <=
code title=3D"">seswar;</code> </td> <td> =
U+02929 </td> <td> <span class=3Dglyph title=3D"&quot=
;>⤩</span> </td> <tr id=3Dentity-setminus>&=
lt;td> <code title=3D"">setminus;</code> </td=
> <td> U+02216 </td> <td> <span class=3Dglyph tit=
le=3D"">∖</span> </td> <tr =
id=3Dentity-setmn><td> <code title=3D"">setmn;&l=
t;/code> </td> <td> U+02216 </td> <td> <spa=
n class=3Dglyph title=3D"">∖</span> =
</td> <tr id=3Dentity-sext><td> <code title=3D"=
">sext;</code> </td> <td> U+02736 </td> &=
lt;td> <span class=3Dglyph title=3D"">✶</s=
pan> </td> <tr id=3Dentity-Sfr><td> <code title=3D=
"">Sfr;</code> </td> <td> U+1D516 </td&=
gt; <td> <span class=3Dglyph title=3D"">𝔖&l=
t;/span> </td> <tr id=3Dentity-sfr><td> <code tit=
le=3D"">sfr;</code> </td> <td> U+1D530 &lt=
;/td> <td> <span class=3Dglyph title=3D"">&s=
fr;</span> </td> <tr id=3Dentity-sfrown><td> <=
code title=3D"">sfrown;</code> </td> <td> =
U+02322 </td> <td> <span class=3Dglyph title=3D"&quot=
;>⌢</span> </td> <tr id=3Dentity-sharp>&lt=
;td> <code title=3D"">sharp;</code> </td> =
<td> U+0266F </td> <td> <span class=3Dglyph title=3D=
"">♯</span> </td> <tr id=3Dentity-S=
HCHcy><td> <code title=3D"">SHCHcy;</code>=
 </td> <td> U+00429 </td> <td> <span class=3Dg=
lyph title=3D"">Щ</span> </td> <tr=
 id=3Dentity-shchcy><td> <code title=3D"">shchcy=
;</code> </td> <td> U+00449 </td> <td> <=
span class=3Dglyph title=3D"">щ</span> <=
/td> <tr id=3Dentity-SHcy><td> <code title=3D"&quo=
t;>SHcy;</code> </td> <td> U+00428 </td> <t=
d> <span class=3Dglyph title=3D"">Ш</span&=
gt; </td> <tr id=3Dentity-shcy><td> <code title=3D&q=
uot;">shcy;</code> </td> <td> U+00448 </td&g=
t; <td> <span class=3Dglyph title=3D"">ш&l=
t;/span> </td> <tr id=3Dentity-ShortDownArrow><td> &=
lt;code title=3D"">ShortDownArrow;</code> </td> =
<td> U+02193 </td> <td> <span class=3Dglyph title=3D=
"">↓</span> </td> <tr id=3Denti=
ty-ShortLeftArrow><td> <code title=3D"">ShortLef=
tArrow;</code> </td> <td> U+02190 </td> <td&gt=
; <span class=3Dglyph title=3D"">←</span>=
 </td> <tr id=3Dentity-shortmid><td> <code title=3D&=
quot;">shortmid;</code> </td> <td> U+02223 <=
/td> <td> <span class=3Dglyph title=3D"">&mi=
d;</span> </td> <tr id=3Dentity-shortparallel><td&gt=
; <code title=3D"">shortparallel;</code> </td&gt=
; <td> U+02225 </td> <td> <span class=3Dglyph title=3D=
"">∥</span> </td> <tr id=3Dentity-Sh=
ortRightArrow><td> <code title=3D"">ShortRightAr=
row;</code> </td> <td> U+02192 </td> <td> &=
lt;span class=3Dglyph title=3D"">→</span> &l=
t;/td> <tr id=3Dentity-ShortUpArrow><td> <code title=3D=
"">ShortUpArrow;</code> </td> <td> U+02191=
 </td> <td> <span class=3Dglyph title=3D"">&a=
mp;uparrow;</span> </td> <tr id=3Dentity-shy><td>=
 <code title=3D"">shy;</code> </td> <td&gt=
; U+000AD </td> <td> <span class=3Dglyph title=3D"&qu=
ot;>­</span> </td> <tr id=3Dentity-shy-legacy c=
lass=3Dimpl><td> <code title=3D"">shy</code&g=
t; </td> <td> U+000AD </td> <td> <span title=3D=
"">­</span> </td> </tr><!-- (in=
valid entity with missing semicolon for legacy support only) --><tr=
 id=3Dentity-Sigma><td> <code title=3D"">Sigma;&=
lt;/code> </td> <td> U+003A3 </td> <td> <sp=
an class=3Dglyph title=3D"">Σ</span> </td=
> <tr id=3Dentity-sigma><td> <code title=3D""=
>sigma;</code> </td> <td> U+003C3 </td> <td=
> <span class=3Dglyph title=3D"">σ</span&=
gt; </td> <tr id=3Dentity-sigmaf><td> <code title=3D=
"">sigmaf;</code> </td> <td> U+003C2 </=
td> <td> <span class=3Dglyph title=3D"">&sig=
mav;</span> </td> <tr id=3Dentity-sigmav><td> &lt=
;code title=3D"">sigmav;</code> </td> <td>=
 U+003C2 </td> <td> <span class=3Dglyph title=3D"&quo=
t;>ς</span> </td> <tr id=3Dentity-sim>&lt=
;td> <code title=3D"">sim;</code> </td> &l=
t;td> U+0223C </td> <td> <span class=3Dglyph title=3D&q=
uot;">∼</span> </td> <tr id=3Dentity-simdo=
t><td> <code title=3D"">simdot;</code> &lt=
;/td> <td> U+02A6A </td> <td> <span class=3Dglyph=
 title=3D"">⩪</span> </td> <tr id=3D=
entity-sime><td> <code title=3D"">sime;</code=
> </td> <td> U+02243 </td> <td> <span class=
=3Dglyph title=3D"">≃</span> </td> &lt=
;tr id=3Dentity-simeq><td> <code title=3D"">sime=
q;</code> </td> <td> U+02243 </td> <td> &lt=
;span class=3Dglyph title=3D"">≃</span> <=
/td> <tr id=3Dentity-simg><td> <code title=3D"&quo=
t;>simg;</code> </td> <td> U+02A9E </td> <t=
d> <span class=3Dglyph title=3D"">⪞</span&=
gt; </td> <tr id=3Dentity-simgE><td> <code title=3D&=
quot;">simgE;</code> </td> <td> U+02AA0 </td=
> <td> <span class=3Dglyph title=3D"">&simgE=
;</span> </td> <tr id=3Dentity-siml><td> <code=
 title=3D"">siml;</code> </td> <td> U+02A9=
D </td> <td> <span class=3Dglyph title=3D"">&=
amp;siml;</span> </td> <tr id=3Dentity-simlE><td>=
 <code title=3D"">simlE;</code> </td> <td&=
gt; U+02A9F </td> <td> <span class=3Dglyph title=3D"&=
quot;>⪟</span> </td> <tr id=3Dentity-simne&gt=
;<td> <code title=3D"">simne;</code> </td&=
gt; <td> U+02246 </td> <td> <span class=3Dglyph titl=
e=3D"">≆</span> </td> <tr id=3Denti=
ty-simplus><td> <code title=3D"">simplus;</co=
de> </td> <td> U+02A24 </td> <td> <span cla=
ss=3Dglyph title=3D"">⨤</span> </td>=
 <tr id=3Dentity-simrarr><td> <code title=3D""&g=
t;simrarr;</code> </td> <td> U+02972 </td> <td=
> <span class=3Dglyph title=3D"">⥲</spa=
n> </td> <tr id=3Dentity-slarr><td> <code title=3D=
"">slarr;</code> </td> <td> U+02190 </t=
d> <td> <span class=3Dglyph title=3D"">&slar=
r;</span> </td> <tr id=3Dentity-SmallCircle><td> =
<code title=3D"">SmallCircle;</code> </td> &l=
t;td> U+02218 </td> <td> <span class=3Dglyph title=3D&q=
uot;">∘</span> </td> <tr id=3Dentity-sm=
allsetminus><td> <code title=3D"">smallsetminus;=
</code> </td> <td> U+02216 </td> <td> <s=
pan class=3Dglyph title=3D"">∖</span&gt=
; </td> <tr id=3Dentity-smashp><td> <code title=3D&q=
uot;">smashp;</code> </td> <td> U+02A33 </td=
> <td> <span class=3Dglyph title=3D"">&smash=
p;</span> </td> <tr id=3Dentity-smeparsl><td> &lt=
;code title=3D"">smeparsl;</code> </td> <td&g=
t; U+029E4 </td> <td> <span class=3Dglyph title=3D"&q=
uot;>⧤</span> </td> <tr id=3Dentity-smid&g=
t;<td> <code title=3D"">smid;</code> </td&=
gt; <td> U+02223 </td> <td> <span class=3Dglyph titl=
e=3D"">∣</span> </td> <tr id=3Dentity=
-smile><td> <code title=3D"">smile;</code>=
 </td> <td> U+02323 </td> <td> <span class=3Dg=
lyph title=3D"">⌣</span> </td> <tr =
id=3Dentity-smt><td> <code title=3D"">smt;</c=
ode> </td> <td> U+02AAA </td> <td> <span cl=
ass=3Dglyph title=3D"">⪪</span> </td> &l=
t;tr id=3Dentity-smte><td> <code title=3D"">smte=
;</code> </td> <td> U+02AAC </td> <td> <=
span class=3Dglyph title=3D"">⪬</span> </t=
d> <tr id=3Dentity-smtes><td> <code title=3D"&quot=
;>smtes;</code> </td> <td> U+02AAC U+0FE00 </td&g=
t; <td> <span class=3D"glyph compound" title=3D"&=
quot;>⪬︀</span> </td> <tr id=3Denti=
ty-SOFTcy><td> <code title=3D"">SOFTcy;</code=
> </td> <td> U+0042C </td> <td> <span class=
=3Dglyph title=3D"">Ь</span> </td> &l=
t;tr id=3Dentity-softcy><td> <code title=3D"">so=
ftcy;</code> </td> <td> U+0044C </td> <td> =
<span class=3Dglyph title=3D"">ь</span> =
</td> <tr id=3Dentity-sol><td> <code title=3D"&=
quot;>sol;</code> </td> <td> U+0002F </td> &lt=
;td> <span class=3Dglyph title=3D"">/</span> &lt=
;/td> <tr id=3Dentity-solb><td> <code title=3D"&qu=
ot;>solb;</code> </td> <td> U+029C4 </td> <=
td> <span class=3Dglyph title=3D"">⧄</span=
> </td> <tr id=3Dentity-solbar><td> <code title=3D=
"">solbar;</code> </td> <td> U+0233F </=
td> <td> <span class=3Dglyph title=3D"">&sol=
bar;</span> </td> <tr id=3Dentity-Sopf><td> <c=
ode title=3D"">Sopf;</code> </td> <td> U+1=
D54A </td> <td> <span class=3Dglyph title=3D""&g=
t;𝕊</span> </td> <tr id=3Dentity-sopf><td&g=
t; <code title=3D"">sopf;</code> </td> <td=
> U+1D564 </td> <td> <span class=3Dglyph title=3D"=
">𝕤</span> </td> <tr id=3Dentity-spades&g=
t;<td> <code title=3D"">spades;</code> </t=
d> <td> U+02660 </td> <td> <span class=3Dglyph ti=
tle=3D"">♠</span> </td> <tr id=3D=
entity-spadesuit><td> <code title=3D"">spadesuit=
;</code> </td> <td> U+02660 </td> <td> <=
span class=3Dglyph title=3D"">♠</span> &=
lt;/td> <tr id=3Dentity-spar><td> <code title=3D"&=
quot;>spar;</code> </td> <td> U+02225 </td> &l=
t;td> <span class=3Dglyph title=3D"">∥</sp=
an> </td> <tr id=3Dentity-sqcap><td> <code title=3D=
"">sqcap;</code> </td> <td> U+02293 </t=
d> <td> <span class=3Dglyph title=3D"">&sqca=
p;</span> </td> <tr id=3Dentity-sqcaps><td> <c=
ode title=3D"">sqcaps;</code> </td> <td> U=
+02293 U+0FE00 </td> <td> <span class=3D"glyph compou=
nd" title=3D"">⊓︀</span> &lt=
;/td> <tr id=3Dentity-sqcup><td> <code title=3D"&q=
uot;>sqcup;</code> </td> <td> U+02294 </td> &l=
t;td> <span class=3Dglyph title=3D"">⊔</s=
pan> </td> <tr id=3Dentity-sqcups><td> <code titl=
e=3D"">sqcups;</code> </td> <td> U+02294 U=
+0FE00 </td> <td> <span class=3D"glyph compound"=
 title=3D"">⊔︀</span> </td>=
 <tr id=3Dentity-Sqrt><td> <code title=3D"">S=
qrt;</code> </td> <td> U+0221A </td> <td> &=
lt;span class=3Dglyph title=3D"">√</span> &l=
t;/td> <tr id=3Dentity-sqsub><td> <code title=3D"&=
quot;>sqsub;</code> </td> <td> U+0228F </td> &=
lt;td> <span class=3Dglyph title=3D"">⊏</=
span> </td> <tr id=3Dentity-sqsube><td> <code tit=
le=3D"">sqsube;</code> </td> <td> U+02291 =
</td> <td> <span class=3Dglyph title=3D"">&am=
p;sqsubseteq;</span> </td> <tr id=3Dentity-sqsubset>&lt=
;td> <code title=3D"">sqsubset;</code> </td&g=
t; <td> U+0228F </td> <td> <span class=3Dglyph title=
=3D"">⊏</span> </td> <tr id=3Dentit=
y-sqsubseteq><td> <code title=3D"">sqsubseteq;&l=
t;/code> </td> <td> U+02291 </td> <td> <spa=
n class=3Dglyph title=3D"">⊑</span> &lt=
;/td> <tr id=3Dentity-sqsup><td> <code title=3D"&q=
uot;>sqsup;</code> </td> <td> U+02290 </td> &l=
t;td> <span class=3Dglyph title=3D"">⊐&lt=
;/span> </td> <tr id=3Dentity-sqsupe><td> <code t=
itle=3D"">sqsupe;</code> </td> <td> U+0229=
2 </td> <td> <span class=3Dglyph title=3D"">&=
amp;sqsupe;</span> </td> <tr id=3Dentity-sqsupset><t=
d> <code title=3D"">sqsupset;</code> </td>=
 <td> U+02290 </td> <td> <span class=3Dglyph title=3D=
"">⊐</span> </td> <tr id=3Dentit=
y-sqsupseteq><td> <code title=3D"">sqsupseteq;&l=
t;/code> </td> <td> U+02292 </td> <td> <spa=
n class=3Dglyph title=3D"">⊒</span> </td=
> <tr id=3Dentity-squ><td> <code title=3D""&g=
t;squ;</code> </td> <td> U+025A1 </td> <td>=
 <span class=3Dglyph title=3D"">□</span> &l=
t;/td> <tr id=3Dentity-Square><td> <code title=3D"=
">Square;</code> </td> <td> U+025A1 </td>=
 <td> <span class=3Dglyph title=3D"">□</=
span> </td> <tr id=3Dentity-square><td> <code tit=
le=3D"">square;</code> </td> <td> U+025A1 =
</td> <td> <span class=3Dglyph title=3D"">&am=
p;squ;</span> </td> <tr id=3Dentity-SquareIntersection>=
<td> <code title=3D"">SquareIntersection;</code&=
gt; </td> <td> U+02293 </td> <td> <span class=3D=
glyph title=3D"">⊓</span> </td> <tr=
 id=3Dentity-SquareSubset><td> <code title=3D"">=
SquareSubset;</code> </td> <td> U+0228F </td> &lt=
;td> <span class=3Dglyph title=3D"">⊏</sp=
an> </td> <tr id=3Dentity-SquareSubsetEqual><td> &lt=
;code title=3D"">SquareSubsetEqual;</code> </td>=
 <td> U+02291 </td> <td> <span class=3Dglyph title=3D=
"">⊑</span> </td> <tr id=3Dent=
ity-SquareSuperset><td> <code title=3D"">SquareS=
uperset;</code> </td> <td> U+02290 </td> <td&g=
t; <span class=3Dglyph title=3D"">⊐</span=
> </td> <tr id=3Dentity-SquareSupersetEqual><td> &lt=
;code title=3D"">SquareSupersetEqual;</code> </td&g=
t; <td> U+02292 </td> <td> <span class=3Dglyph title=
=3D"">⊒</span> </td> <tr id=3Denti=
ty-SquareUnion><td> <code title=3D"">SquareUnion=
;</code> </td> <td> U+02294 </td> <td> <=
span class=3Dglyph title=3D"">⊔</span> </=
td> <tr id=3Dentity-squarf><td> <code title=3D"&qu=
ot;>squarf;</code> </td> <td> U+025AA </td> &l=
t;td> <span class=3Dglyph title=3D"">▪=
</span> </td> <tr id=3Dentity-squf><td> <code =
title=3D"">squf;</code> </td> <td> U+025AA=
 </td> <td> <span class=3Dglyph title=3D"">&a=
mp;blacksquare;</span> </td> <tr id=3Dentity-srarr><=
td> <code title=3D"">srarr;</code> </td> &=
lt;td> U+02192 </td> <td> <span class=3Dglyph title=3D&=
quot;">→</span> </td> <tr id=3Dentity-Ss=
cr><td> <code title=3D"">Sscr;</code> <=
/td> <td> U+1D4AE </td> <td> <span class=3Dglyph =
title=3D"">𝒮</span> </td> <tr id=3De=
ntity-sscr><td> <code title=3D"">sscr;</code&=
gt; </td> <td> U+1D4C8 </td> <td> <span class=3D=
glyph title=3D"">𝓈</span> </td> <tr =
id=3Dentity-ssetmn><td> <code title=3D"">ssetmn;=
</code> </td> <td> U+02216 </td> <td> <s=
pan class=3Dglyph title=3D"">∖</span&gt=
; </td> <tr id=3Dentity-ssmile><td> <code title=3D&q=
uot;">ssmile;</code> </td> <td> U+02323 </td=
> <td> <span class=3Dglyph title=3D"">&smile=
;</span> </td> <tr id=3Dentity-sstarf><td> <co=
de title=3D"">sstarf;</code> </td> <td> U+=
022C6 </td> <td> <span class=3Dglyph title=3D""&=
gt;⋆</span> </td> <tr id=3Dentity-Star><t=
d> <code title=3D"">Star;</code> </td> &lt=
;td> U+022C6 </td> <td> <span class=3Dglyph title=3D&qu=
ot;">⋆</span> </td> <tr id=3Dentity-sta=
r><td> <code title=3D"">star;</code> </=
td> <td> U+02606 </td> <td> <span class=3Dglyph t=
itle=3D"">☆</span> </td> <tr id=3Den=
tity-starf><td> <code title=3D"">starf;</code=
> </td> <td> U+02605 </td> <td> <span class=
=3Dglyph title=3D"">★</span> </td> &=
lt;tr id=3Dentity-straightepsilon><td> <code title=3D"&q=
uot;>straightepsilon;</code> </td> <td> U+003F5 <=
/td> <td> <span class=3Dglyph title=3D"">&st=
raightepsilon;</span> </td> <tr id=3Dentity-straightphi&gt=
;<td> <code title=3D"">straightphi;</code> &l=
t;/td> <td> U+003D5 </td> <td> <span class=3Dglyp=
h title=3D"">ϕ</span> </td> <tr id=3D=
entity-strns><td> <code title=3D"">strns;</co=
de> </td> <td> U+000AF </td> <td> <span cla=
ss=3Dglyph title=3D"">¯</span> </td> &=
lt;tr id=3Dentity-Sub><td> <code title=3D"">Sub;=
</code> </td> <td> U+022D0 </td> <td> <s=
pan class=3Dglyph title=3D"">⋐</span> </td&=
gt; <tr id=3Dentity-sub><td> <code title=3D""&gt=
;sub;</code> </td> <td> U+02282 </td> <td> =
<span class=3Dglyph title=3D"">⊂</span> &lt=
;/td> <tr id=3Dentity-subdot><td> <code title=3D"&=
quot;>subdot;</code> </td> <td> U+02ABD </td> =
<td> <span class=3Dglyph title=3D"">⪽&lt=
;/span> </td> <tr id=3Dentity-subE><td> <code tit=
le=3D"">subE;</code> </td> <td> U+02AC5 &l=
t;/td> <td> <span class=3Dglyph title=3D"">&=
subseteqq;</span> </td> <tr id=3Dentity-sube><td>=
 <code title=3D"">sube;</code> </td> <td&g=
t; U+02286 </td> <td> <span class=3Dglyph title=3D"&q=
uot;>⊆</span> </td> <tr id=3Dentity-subedo=
t><td> <code title=3D"">subedot;</code> &l=
t;/td> <td> U+02AC3 </td> <td> <span class=3Dglyp=
h title=3D"">⫃</span> </td> <tr i=
d=3Dentity-submult><td> <code title=3D"">submult=
;</code> </td> <td> U+02AC1 </td> <td> <=
span class=3Dglyph title=3D"">⫁</span> &lt=
;/td> <tr id=3Dentity-subnE><td> <code title=3D"&q=
uot;>subnE;</code> </td> <td> U+02ACB </td> &l=
t;td> <span class=3Dglyph title=3D"">⫋&=
lt;/span> </td> <tr id=3Dentity-subne><td> <code =
title=3D"">subne;</code> </td> <td> U+0228=
A </td> <td> <span class=3Dglyph title=3D"">&=
amp;subsetneq;</span> </td> <tr id=3Dentity-subplus>&lt=
;td> <code title=3D"">subplus;</code> </td&gt=
; <td> U+02ABF </td> <td> <span class=3Dglyph title=3D=
"">⪿</span> </td> <tr id=3Dentity=
-subrarr><td> <code title=3D"">subrarr;</code=
> </td> <td> U+02979 </td> <td> <span class=
=3Dglyph title=3D"">⥹</span> </td> &=
lt;tr id=3Dentity-Subset><td> <code title=3D"">S=
ubset;</code> </td> <td> U+022D0 </td> <td>=
 <span class=3Dglyph title=3D"">⋐</span> &l=
t;/td> <tr id=3Dentity-subset><td> <code title=3D"=
">subset;</code> </td> <td> U+02282 </td>=
 <td> <span class=3Dglyph title=3D"">⊂</=
span> </td> <tr id=3Dentity-subseteq><td> <code t=
itle=3D"">subseteq;</code> </td> <td> U+02=
286 </td> <td> <span class=3Dglyph title=3D""&gt=
;⊆</span> </td> <tr id=3Dentity-subseteqq>=
<td> <code title=3D"">subseteqq;</code> </=
td> <td> U+02AC5 </td> <td> <span class=3Dglyph t=
itle=3D"">⫅</span> </td> <tr id=
=3Dentity-SubsetEqual><td> <code title=3D"">Subs=
etEqual;</code> </td> <td> U+02286 </td> <td&g=
t; <span class=3Dglyph title=3D"">⊆</span=
> </td> <tr id=3Dentity-subsetneq><td> <code titl=
e=3D"">subsetneq;</code> </td> <td> U+0228=
A </td> <td> <span class=3Dglyph title=3D"">&=
amp;subsetneq;</span> </td> <tr id=3Dentity-subsetneqq>=
<td> <code title=3D"">subsetneqq;</code> <=
/td> <td> U+02ACB </td> <td> <span class=3Dglyph =
title=3D"">⫋</span> </td> <tr =
id=3Dentity-subsim><td> <code title=3D"">subsim;=
</code> </td> <td> U+02AC7 </td> <td> <s=
pan class=3Dglyph title=3D"">⫇</span> </=
td> <tr id=3Dentity-subsub><td> <code title=3D"&qu=
ot;>subsub;</code> </td> <td> U+02AD5 </td> &l=
t;td> <span class=3Dglyph title=3D"">⫕</=
span> </td> <tr id=3Dentity-subsup><td> <code tit=
le=3D"">subsup;</code> </td> <td> U+02AD3 =
</td> <td> <span class=3Dglyph title=3D"">&am=
p;subsup;</span> </td> <tr id=3Dentity-succ><td> =
<code title=3D"">succ;</code> </td> <td&gt=
; U+0227B </td> <td> <span class=3Dglyph title=3D"&qu=
ot;>≻</span> </td> <tr id=3Dentity-succapprox&=
gt;<td> <code title=3D"">succapprox;</code> &=
lt;/td> <td> U+02AB8 </td> <td> <span class=3Dgly=
ph title=3D"">⪸</span> </td> <=
tr id=3Dentity-succcurlyeq><td> <code title=3D""&gt=
;succcurlyeq;</code> </td> <td> U+0227D </td> &lt=
;td> <span class=3Dglyph title=3D"">≽</sp=
an> </td> <tr id=3Dentity-Succeeds><td> <code tit=
le=3D"">Succeeds;</code> </td> <td> U+0227=
B </td> <td> <span class=3Dglyph title=3D"">&=
amp;succ;</span> </td> <tr id=3Dentity-SucceedsEqual>&l=
t;td> <code title=3D"">SucceedsEqual;</code> &lt=
;/td> <td> U+02AB0 </td> <td> <span class=3Dglyph=
 title=3D"">⪰</span> </td> <tr id=3D=
entity-SucceedsSlantEqual><td> <code title=3D"">=
SucceedsSlantEqual;</code> </td> <td> U+0227D </td&g=
t; <td> <span class=3Dglyph title=3D"">≽&=
lt;/span> </td> <tr id=3Dentity-SucceedsTilde><td> &=
lt;code title=3D"">SucceedsTilde;</code> </td> &=
lt;td> U+0227F </td> <td> <span class=3Dglyph title=3D&=
quot;">≿</span> </td> <tr id=3Dentity-su=
cceq><td> <code title=3D"">succeq;</code> =
</td> <td> U+02AB0 </td> <td> <span class=3Dgl=
yph title=3D"">⪰</span> </td> <tr =
id=3Dentity-succnapprox><td> <code title=3D"">su=
ccnapprox;</code> </td> <td> U+02ABA </td> <td=
> <span class=3Dglyph title=3D"">⪺</span&=
gt; </td> <tr id=3Dentity-succneqq><td> <code title=3D=
"">succneqq;</code> </td> <td> U+02AB6 &lt=
;/td> <td> <span class=3Dglyph title=3D"">&s=
uccneqq;</span> </td> <tr id=3Dentity-succnsim><td&g=
t; <code title=3D"">succnsim;</code> </td> &l=
t;td> U+022E9 </td> <td> <span class=3Dglyph title=3D&q=
uot;">⋩</span> </td> <tr id=3Dentity-=
succsim><td> <code title=3D"">succsim;</code&=
gt; </td> <td> U+0227F </td> <td> <span class=3D=
glyph title=3D"">≿</span> </td> <tr=
 id=3Dentity-SuchThat><td> <code title=3D"">Such=
That;</code> </td> <td> U+0220B </td> <td> =
<span class=3Dglyph title=3D"">∋</span> &lt=
;/td> <tr id=3Dentity-Sum><td> <code title=3D"&quo=
t;>Sum;</code> </td> <td> U+02211 </td> <td=
> <span class=3Dglyph title=3D"">∑</span&gt=
; </td> <tr id=3Dentity-sum><td> <code title=3D&quot=
;">sum;</code> </td> <td> U+02211 </td> &=
lt;td> <span class=3Dglyph title=3D"">∑</sp=
an> </td> <tr id=3Dentity-sung><td> <code title=3D=
"">sung;</code> </td> <td> U+0266A </td=
> <td> <span class=3Dglyph title=3D"">♪=
</span> </td> <tr id=3Dentity-Sup><td> <code t=
itle=3D"">Sup;</code> </td> <td> U+022D1 &=
lt;/td> <td> <span class=3Dglyph title=3D"">&amp=
;Supset;</span> </td> <tr id=3Dentity-sup><td> &l=
t;code title=3D"">sup;</code> </td> <td> U=
+02283 </td> <td> <span class=3Dglyph title=3D""=
>⊃</span> </td> <tr id=3Dentity-sup1><td&=
gt; <code title=3D"">sup1;</code> </td> <t=
d> U+000B9 </td> <td> <span class=3Dglyph title=3D&quot=
;">¹</span> </td> <tr id=3Dentity-sup1-le=
gacy class=3Dimpl><td> <code title=3D"">sup1<=
/code> </td> <td> U+000B9 </td> <td> <span =
title=3D"">¹</span> </td> </tr>&l=
t;!-- (invalid entity with missing semicolon for legacy support only) --&=
gt;<tr id=3Dentity-sup2><td> <code title=3D""&gt=
;sup2;</code> </td> <td> U+000B2 </td> <td>=
 <span class=3Dglyph title=3D"">²</span> &=
lt;/td> <tr id=3Dentity-sup2-legacy class=3Dimpl><td> <=
code title=3D"">sup2</code> </td> <td> U+0=
00B2 </td> <td> <span title=3D"">²&l=
t;/span> </td> </tr><!-- (invalid entity with missing s=
emicolon for legacy support only) --><tr id=3Dentity-sup3><td=
> <code title=3D"">sup3;</code> </td> <=
td> U+000B3 </td> <td> <span class=3Dglyph title=3D&quo=
t;">³</span> </td> <tr id=3Dentity-sup3-l=
egacy class=3Dimpl><td> <code title=3D"">sup3&lt=
;/code> </td> <td> U+000B3 </td> <td> <span=
 title=3D"">³</span> </td> </tr>&=
lt;!-- (invalid entity with missing semicolon for legacy support only) --=
><tr id=3Dentity-supdot><td> <code title=3D""=
>supdot;</code> </td> <td> U+02ABE </td> <t=
d> <span class=3Dglyph title=3D"">⪾</spa=
n> </td> <tr id=3Dentity-supdsub><td> <code title=
=3D"">supdsub;</code> </td> <td> U+02AD8 &=
lt;/td> <td> <span class=3Dglyph title=3D"">&amp=
;supdsub;</span> </td> <tr id=3Dentity-supE><td> =
<code title=3D"">supE;</code> </td> <td&gt=
; U+02AC6 </td> <td> <span class=3Dglyph title=3D"&qu=
ot;>⫆</span> </td> <tr id=3Dentity-supe&g=
t;<td> <code title=3D"">supe;</code> </td&=
gt; <td> U+02287 </td> <td> <span class=3Dglyph titl=
e=3D"">⊇</span> </td> <tr id=3De=
ntity-supedot><td> <code title=3D"">supedot;<=
/code> </td> <td> U+02AC4 </td> <td> <span =
class=3Dglyph title=3D"">⫄</span> </td&=
gt; <tr id=3Dentity-Superset><td> <code title=3D"&quo=
t;>Superset;</code> </td> <td> U+02283 </td> &=
lt;td> <span class=3Dglyph title=3D"">⊃</sp=
an> </td> <tr id=3Dentity-SupersetEqual><td> <cod=
e title=3D"">SupersetEqual;</code> </td> <td&=
gt; U+02287 </td> <td> <span class=3Dglyph title=3D"&=
quot;>⊇</span> </td> <tr id=3Dentity-suphs=
ol><td> <code title=3D"">suphsol;</code> &=
lt;/td> <td> U+027C9 </td> <td> <span class=3Dgly=
ph title=3D"">⟉</span> </td> <tr =
id=3Dentity-suphsub><td> <code title=3D"">suphsu=
b;</code> </td> <td> U+02AD7 </td> <td> &lt=
;span class=3Dglyph title=3D"">⫗</span> &l=
t;/td> <tr id=3Dentity-suplarr><td> <code title=3D&quot=
;">suplarr;</code> </td> <td> U+0297B </td&g=
t; <td> <span class=3Dglyph title=3D"">&suplarr=
;</span> </td> <tr id=3Dentity-supmult><td> <c=
ode title=3D"">supmult;</code> </td> <td> =
U+02AC2 </td> <td> <span class=3Dglyph title=3D"&quot=
;>⫂</span> </td> <tr id=3Dentity-supnE>&=
lt;td> <code title=3D"">supnE;</code> </td&gt=
; <td> U+02ACC </td> <td> <span class=3Dglyph title=3D=
"">⫌</span> </td> <tr id=3Dent=
ity-supne><td> <code title=3D"">supne;</code&=
gt; </td> <td> U+0228B </td> <td> <span class=3D=
glyph title=3D"">⊋</span> </td> &l=
t;tr id=3Dentity-supplus><td> <code title=3D"">s=
upplus;</code> </td> <td> U+02AC0 </td> <td&gt=
; <span class=3Dglyph title=3D"">⫀</span&g=
t; </td> <tr id=3Dentity-Supset><td> <code title=3D&=
quot;">Supset;</code> </td> <td> U+022D1 </t=
d> <td> <span class=3Dglyph title=3D"">&Sups=
et;</span> </td> <tr id=3Dentity-supset><td> <=
code title=3D"">supset;</code> </td> <td> =
U+02283 </td> <td> <span class=3Dglyph title=3D"&quot=
;>⊃</span> </td> <tr id=3Dentity-supseteq>&l=
t;td> <code title=3D"">supseteq;</code> </td&=
gt; <td> U+02287 </td> <td> <span class=3Dglyph titl=
e=3D"">⊇</span> </td> <tr id=3De=
ntity-supseteqq><td> <code title=3D"">supseteqq;=
</code> </td> <td> U+02AC6 </td> <td> <s=
pan class=3Dglyph title=3D"">⫆</span> &l=
t;/td> <tr id=3Dentity-supsetneq><td> <code title=3D&qu=
ot;">supsetneq;</code> </td> <td> U+0228B </=
td> <td> <span class=3Dglyph title=3D"">&sup=
setneq;</span> </td> <tr id=3Dentity-supsetneqq><td&=
gt; <code title=3D"">supsetneqq;</code> </td>=
 <td> U+02ACC </td> <td> <span class=3Dglyph title=3D=
"">⫌</span> </td> <tr id=3Dent=
ity-supsim><td> <code title=3D"">supsim;</cod=
e> </td> <td> U+02AC8 </td> <td> <span clas=
s=3Dglyph title=3D"">⫈</span> </td> &=
lt;tr id=3Dentity-supsub><td> <code title=3D"">s=
upsub;</code> </td> <td> U+02AD4 </td> <td>=
 <span class=3Dglyph title=3D"">⫔</span>=
 </td> <tr id=3Dentity-supsup><td> <code title=3D&qu=
ot;">supsup;</code> </td> <td> U+02AD6 </td&=
gt; <td> <span class=3Dglyph title=3D"">&supsup=
;</span> </td> <tr id=3Dentity-swarhk><td> <co=
de title=3D"">swarhk;</code> </td> <td> U+=
02926 </td> <td> <span class=3Dglyph title=3D""&=
gt;⤦</span> </td> <tr id=3Dentity-swArr>&l=
t;td> <code title=3D"">swArr;</code> </td>=
 <td> U+021D9 </td> <td> <span class=3Dglyph title=3D=
"">⇙</span> </td> <tr id=3Dentity-s=
warr><td> <code title=3D"">swarr;</code> &=
lt;/td> <td> U+02199 </td> <td> <span class=3Dgly=
ph title=3D"">↙</span> </td> <tr =
id=3Dentity-swarrow><td> <code title=3D"">swarro=
w;</code> </td> <td> U+02199 </td> <td> &lt=
;span class=3Dglyph title=3D"">↙</span> &l=
t;/td> <tr id=3Dentity-swnwar><td> <code title=3D"=
">swnwar;</code> </td> <td> U+0292A </td>=
 <td> <span class=3Dglyph title=3D"">⤪&l=
t;/span> </td> <tr id=3Dentity-szlig><td> <code t=
itle=3D"">szlig;</code> </td> <td> U+000DF=
 </td> <td> <span class=3Dglyph title=3D"">&a=
mp;szlig;</span> </td> <tr id=3Dentity-szlig-legacy class=3D=
impl><td> <code title=3D"">szlig</code> &l=
t;/td> <td> U+000DF </td> <td> <span title=3D&quo=
t;">ß</span> </td> </tr><!-- (inva=
lid entity with missing semicolon for legacy support only) --><tr i=
d=3Dentity-Tab><td> <code title=3D"">Tab;</co=
de> </td> <td> U+00009 </td> <td> <span cla=
ss=3D"glyph control" title=3D"">␉</s=
pan> </td> <tr id=3Dentity-target><td> <code titl=
e=3D"">target;</code> </td> <td> U+02316 &=
lt;/td> <td> <span class=3Dglyph title=3D"">&amp=
;target;</span> </td> <tr id=3Dentity-Tau><td> &l=
t;code title=3D"">Tau;</code> </td> <td> U=
+003A4 </td> <td> <span class=3Dglyph title=3D""=
>Τ</span> </td> <tr id=3Dentity-tau><td&g=
t; <code title=3D"">tau;</code> </td> <td&=
gt; U+003C4 </td> <td> <span class=3Dglyph title=3D"&=
quot;>τ</span> </td> <tr id=3Dentity-tbrk>&l=
t;td> <code title=3D"">tbrk;</code> </td> =
<td> U+023B4 </td> <td> <span class=3Dglyph title=3D=
"">⎴</span> </td> <tr id=3Dentity-Tc=
aron><td> <code title=3D"">Tcaron;</code> =
</td> <td> U+00164 </td> <td> <span class=3Dgl=
yph title=3D"">Ť</span> </td> <tr =
id=3Dentity-tcaron><td> <code title=3D"">tcaron;=
</code> </td> <td> U+00165 </td> <td> <s=
pan class=3Dglyph title=3D"">ť</span> </=
td> <tr id=3Dentity-Tcedil><td> <code title=3D"&qu=
ot;>Tcedil;</code> </td> <td> U+00162 </td> &l=
t;td> <span class=3Dglyph title=3D"">Ţ</=
span> </td> <tr id=3Dentity-tcedil><td> <code tit=
le=3D"">tcedil;</code> </td> <td> U+00163 =
</td> <td> <span class=3Dglyph title=3D"">&am=
p;tcedil;</span> </td> <tr id=3Dentity-Tcy><td> &=
lt;code title=3D"">Tcy;</code> </td> <td> =
U+00422 </td> <td> <span class=3Dglyph title=3D"&quot=
;>Т</span> </td> <tr id=3Dentity-tcy><td&=
gt; <code title=3D"">tcy;</code> </td> <td=
> U+00442 </td> <td> <span class=3Dglyph title=3D"=
">т</span> </td> <tr id=3Dentity-tdot>&=
lt;td> <code title=3D"">tdot;</code> </td>=
 <td> U+020DB </td> <td> <span class=3D"glyph c=
omposition" title=3D"">◌⃛</span&=
gt; </td> <tr id=3Dentity-telrec><td> <code title=3D=
"">telrec;</code> </td> <td> U+02315 </=
td> <td> <span class=3Dglyph title=3D"">&tel=
rec;</span> </td> <tr id=3Dentity-Tfr><td> <co=
de title=3D"">Tfr;</code> </td> <td> U+1D5=
17 </td> <td> <span class=3Dglyph title=3D"">=
𝔗</span> </td> <tr id=3Dentity-tfr><td> &=
lt;code title=3D"">tfr;</code> </td> <td> =
U+1D531 </td> <td> <span class=3Dglyph title=3D"&quot=
;>𝔱</span> </td> <tr id=3Dentity-there4><=
td> <code title=3D"">there4;</code> </td> =
<td> U+02234 </td> <td> <span class=3Dglyph title=3D=
"">∴</span> </td> <tr id=3Denti=
ty-Therefore><td> <code title=3D"">Therefore;&lt=
;/code> </td> <td> U+02234 </td> <td> <span=
 class=3Dglyph title=3D"">∴</span> </=
td> <tr id=3Dentity-therefore><td> <code title=3D"=
">therefore;</code> </td> <td> U+02234 </td&=
gt; <td> <span class=3Dglyph title=3D"">&theref=
ore;</span> </td> <tr id=3Dentity-Theta><td> <=
code title=3D"">Theta;</code> </td> <td> U=
+00398 </td> <td> <span class=3Dglyph title=3D""=
>Θ</span> </td> <tr id=3Dentity-theta><=
td> <code title=3D"">theta;</code> </td> &=
lt;td> U+003B8 </td> <td> <span class=3Dglyph title=3D&=
quot;">θ</span> </td> <tr id=3Dentity-th=
etasym><td> <code title=3D"">thetasym;</code&=
gt; </td> <td> U+003D1 </td> <td> <span class=3D=
glyph title=3D"">ϑ</span> </td> <t=
r id=3Dentity-thetav><td> <code title=3D"">theta=
v;</code> </td> <td> U+003D1 </td> <td> &lt=
;span class=3Dglyph title=3D"">ϑ</span> &lt=
;/td> <tr id=3Dentity-thickapprox><td> <code title=3D&q=
uot;">thickapprox;</code> </td> <td> U+02248 &l=
t;/td> <td> <span class=3Dglyph title=3D"">&=
thkap;</span> </td> <tr id=3Dentity-thicksim><td>=
 <code title=3D"">thicksim;</code> </td> <=
td> U+0223C </td> <td> <span class=3Dglyph title=3D&quo=
t;">∼</span> </td> <tr id=3Dentity-ThickSp=
ace><td> <code title=3D"">ThickSpace;</code&g=
t; </td> <td> U+0205F U+0200A </td> <td> <span=
 class=3D"glyph compound" title=3D"">&MediumSp=
ace; </span> </td> <tr id=3Dentity-thinsp>&l=
t;td> <code title=3D"">thinsp;</code> </td&gt=
; <td> U+02009 </td> <td> <span class=3Dglyph title=3D=
""> </span> </td> <tr id=3Dentity-=
ThinSpace><td> <code title=3D"">ThinSpace;</c=
ode> </td> <td> U+02009 </td> <td> <span cl=
ass=3Dglyph title=3D""> </span> </td>=
 <tr id=3Dentity-thkap><td> <code title=3D"">=
thkap;</code> </td> <td> U+02248 </td> <td>=
 <span class=3Dglyph title=3D"">≈</span> =
</td> <tr id=3Dentity-thksim><td> <code title=3D&quo=
t;">thksim;</code> </td> <td> U+0223C </td&g=
t; <td> <span class=3Dglyph title=3D"">∼&lt=
;/span> </td> <tr id=3Dentity-THORN><td> <code ti=
tle=3D"">THORN;</code> </td> <td> U+000DE =
</td> <td> <span class=3Dglyph title=3D"">&am=
p;THORN;</span> </td> <tr id=3Dentity-THORN-legacy class=3D=
impl><td> <code title=3D"">THORN</code> &l=
t;/td> <td> U+000DE </td> <td> <span title=3D&quo=
t;">Þ</span> </td> </tr><!-- (inva=
lid entity with missing semicolon for legacy support only) --><tr i=
d=3Dentity-thorn><td> <code title=3D"">thorn;&lt=
;/code> </td> <td> U+000FE </td> <td> <span=
 class=3Dglyph title=3D"">þ</span> </td&g=
t; <tr id=3Dentity-thorn-legacy class=3Dimpl><td> <code ti=
tle=3D"">thorn</code> </td> <td> U+000FE &=
lt;/td> <td> <span title=3D"">þ</sp=
an> </td> </tr><!-- (invalid entity with missing semico=
lon for legacy support only) --><tr id=3Dentity-Tilde><td>=
 <code title=3D"">Tilde;</code> </td> <td&=
gt; U+0223C </td> <td> <span class=3Dglyph title=3D"&=
quot;>∼</span> </td> <tr id=3Dentity-tilde>&=
lt;td> <code title=3D"">tilde;</code> </td&gt=
; <td> U+002DC </td> <td> <span class=3Dglyph title=3D=
"">˜</span> </td> <tr id=3Dentity-T=
ildeEqual><td> <code title=3D"">TildeEqual;</=
code> </td> <td> U+02243 </td> <td> <span c=
lass=3Dglyph title=3D"">≃</span> </td>=
 <tr id=3Dentity-TildeFullEqual><td> <code title=3D"&=
quot;>TildeFullEqual;</code> </td> <td> U+02245 <=
/td> <td> <span class=3Dglyph title=3D"">&co=
ng;</span> </td> <tr id=3Dentity-TildeTilde><td> =
<code title=3D"">TildeTilde;</code> </td> &lt=
;td> U+02248 </td> <td> <span class=3Dglyph title=3D&qu=
ot;">≈</span> </td> <tr id=3Dentity-time=
s><td> <code title=3D"">times;</code> <=
/td> <td> U+000D7 </td> <td> <span class=3Dglyph =
title=3D"">×</span> </td> <tr id=3D=
entity-times-legacy class=3Dimpl><td> <code title=3D"&qu=
ot;>times</code> </td> <td> U+000D7 </td> <=
td> <span title=3D"">×</span> </td&=
gt; </tr><!-- (invalid entity with missing semicolon for legacy =
support only) --><tr id=3Dentity-timesb><td> <code titl=
e=3D"">timesb;</code> </td> <td> U+022A0 &=
lt;/td> <td> <span class=3Dglyph title=3D"">&amp=
;timesb;</span> </td> <tr id=3Dentity-timesbar><td&g=
t; <code title=3D"">timesbar;</code> </td> &l=
t;td> U+02A31 </td> <td> <span class=3Dglyph title=3D&q=
uot;">⨱</span> </td> <tr id=3Dentity-=
timesd><td> <code title=3D"">timesd;</code&gt=
; </td> <td> U+02A30 </td> <td> <span class=3D=
glyph title=3D"">⨰</span> </td> <t=
r id=3Dentity-tint><td> <code title=3D"">tint;&l=
t;/code> </td> <td> U+0222D </td> <td> <spa=
n class=3Dglyph title=3D"">∭</span> </td&=
gt; <tr id=3Dentity-toea><td> <code title=3D""&g=
t;toea;</code> </td> <td> U+02928 </td> <td&gt=
; <span class=3Dglyph title=3D"">⤨</span> =
</td> <tr id=3Dentity-top><td> <code title=3D"&=
quot;>top;</code> </td> <td> U+022A4 </td> &lt=
;td> <span class=3Dglyph title=3D"">⊤</span=
> </td> <tr id=3Dentity-topbot><td> <code title=3D=
"">topbot;</code> </td> <td> U+02336 </=
td> <td> <span class=3Dglyph title=3D"">&top=
bot;</span> </td> <tr id=3Dentity-topcir><td> &lt=
;code title=3D"">topcir;</code> </td> <td>=
 U+02AF1 </td> <td> <span class=3Dglyph title=3D"&quo=
t;>⫱</span> </td> <tr id=3Dentity-Topf>&l=
t;td> <code title=3D"">Topf;</code> </td> =
<td> U+1D54B </td> <td> <span class=3Dglyph title=3D=
"">𝕋</span> </td> <tr id=3Dentity-to=
pf><td> <code title=3D"">topf;</code> <=
/td> <td> U+1D565 </td> <td> <span class=3Dglyph =
title=3D"">𝕥</span> </td> <tr id=3De=
ntity-topfork><td> <code title=3D"">topfork;<=
/code> </td> <td> U+02ADA </td> <td> <span =
class=3Dglyph title=3D"">⫚</span> </td&=
gt; <tr id=3Dentity-tosa><td> <code title=3D""&g=
t;tosa;</code> </td> <td> U+02929 </td> <td&gt=
; <span class=3Dglyph title=3D"">⤩</span> =
</td> <tr id=3Dentity-tprime><td> <code title=3D&quo=
t;">tprime;</code> </td> <td> U+02034 </td&g=
t; <td> <span class=3Dglyph title=3D"">‴=
</span> </td> <tr id=3Dentity-TRADE><td> <code=
 title=3D"">TRADE;</code> </td> <td> U+021=
22 </td> <td> <span class=3Dglyph title=3D"">=
™</span> </td> <tr id=3Dentity-trade><td&g=
t; <code title=3D"">trade;</code> </td> <t=
d> U+02122 </td> <td> <span class=3Dglyph title=3D&quot=
;">™</span> </td> <tr id=3Dentity-triang=
le><td> <code title=3D"">triangle;</code> =
</td> <td> U+025B5 </td> <td> <span class=3Dgl=
yph title=3D"">▵</span> </td> <t=
r id=3Dentity-triangledown><td> <code title=3D""&gt=
;triangledown;</code> </td> <td> U+025BF </td> &l=
t;td> <span class=3Dglyph title=3D"">&triangledown=
;</span> </td> <tr id=3Dentity-triangleleft><td> =
<code title=3D"">triangleleft;</code> </td> &=
lt;td> U+025C3 </td> <td> <span class=3Dglyph title=3D&=
quot;">◃</span> </td> <tr id=3Den=
tity-trianglelefteq><td> <code title=3D"">triang=
lelefteq;</code> </td> <td> U+022B4 </td> <td&=
gt; <span class=3Dglyph title=3D"">⊴</span&g=
t; </td> <tr id=3Dentity-triangleq><td> <code title=3D=
"">triangleq;</code> </td> <td> U+0225C &l=
t;/td> <td> <span class=3Dglyph title=3D"">&=
triangleq;</span> </td> <tr id=3Dentity-triangleright>&=
lt;td> <code title=3D"">triangleright;</code> &l=
t;/td> <td> U+025B9 </td> <td> <span class=3Dglyp=
h title=3D"">▹</span> </td> &l=
t;tr id=3Dentity-trianglerighteq><td> <code title=3D"&qu=
ot;>trianglerighteq;</code> </td> <td> U+022B5 </=
td> <td> <span class=3Dglyph title=3D"">&rtr=
ie;</span> </td> <tr id=3Dentity-tridot><td> <=
code title=3D"">tridot;</code> </td> <td> =
U+025EC </td> <td> <span class=3Dglyph title=3D"&quot=
;>◬</span> </td> <tr id=3Dentity-trie>&lt=
;td> <code title=3D"">trie;</code> </td> &=
lt;td> U+0225C </td> <td> <span class=3Dglyph title=3D&=
quot;">≜</span> </td> <tr id=3Dentit=
y-triminus><td> <code title=3D"">triminus;</c=
ode> </td> <td> U+02A3A </td> <td> <span cl=
ass=3Dglyph title=3D"">⨺</span> </td&g=
t; <tr id=3Dentity-TripleDot><td> <code title=3D"&quo=
t;>TripleDot;</code> </td> <td> U+020DB </td> =
<td> <span class=3D"glyph composition" title=3D"&=
quot;>◌⃛</span> </td> <tr id=3Denti=
ty-triplus><td> <code title=3D"">triplus;</co=
de> </td> <td> U+02A39 </td> <td> <span cla=
ss=3Dglyph title=3D"">⨹</span> </td>=
 <tr id=3Dentity-trisb><td> <code title=3D"">=
trisb;</code> </td> <td> U+029CD </td> <td>=
 <span class=3Dglyph title=3D"">⧍</span> =
</td> <tr id=3Dentity-tritime><td> <code title=3D&qu=
ot;">tritime;</code> </td> <td> U+02A3B </td=
> <td> <span class=3Dglyph title=3D"">&triti=
me;</span> </td> <tr id=3Dentity-trpezium><td> &l=
t;code title=3D"">trpezium;</code> </td> <td&=
gt; U+023E2 </td> <td> <span class=3Dglyph title=3D"&=
quot;>⏢</span> </td> <tr id=3Dentity-Tscr&=
gt;<td> <code title=3D"">Tscr;</code> </td=
> <td> U+1D4AF </td> <td> <span class=3Dglyph tit=
le=3D"">𝒯</span> </td> <tr id=3Denti=
ty-tscr><td> <code title=3D"">tscr;</code>=
 </td> <td> U+1D4C9 </td> <td> <span class=3Dg=
lyph title=3D"">𝓉</span> </td> <tr i=
d=3Dentity-TScy><td> <code title=3D"">TScy;</=
code> </td> <td> U+00426 </td> <td> <span c=
lass=3Dglyph title=3D"">Ц</span> </td> =
<tr id=3Dentity-tscy><td> <code title=3D"">ts=
cy;</code> </td> <td> U+00446 </td> <td> &l=
t;span class=3Dglyph title=3D"">ц</span> <=
/td> <tr id=3Dentity-TSHcy><td> <code title=3D"&qu=
ot;>TSHcy;</code> </td> <td> U+0040B </td> &lt=
;td> <span class=3Dglyph title=3D"">Ћ</sp=
an> </td> <tr id=3Dentity-tshcy><td> <code title=3D=
"">tshcy;</code> </td> <td> U+0045B </t=
d> <td> <span class=3Dglyph title=3D"">&tshc=
y;</span> </td> <tr id=3Dentity-Tstrok><td> <c=
ode title=3D"">Tstrok;</code> </td> <td> U=
+00166 </td> <td> <span class=3Dglyph title=3D""=
>Ŧ</span> </td> <tr id=3Dentity-tstrok>&l=
t;td> <code title=3D"">tstrok;</code> </td&gt=
; <td> U+00167 </td> <td> <span class=3Dglyph title=3D=
"">ŧ</span> </td> <tr id=3Dentity-=
twixt><td> <code title=3D"">twixt;</code> =
</td> <td> U+0226C </td> <td> <span class=3Dgl=
yph title=3D"">≬</span> </td> <tr=
 id=3Dentity-twoheadleftarrow><td> <code title=3D""=
>twoheadleftarrow;</code> </td> <td> U+0219E </td=
> <td> <span class=3Dglyph title=3D"">&twohe=
adleftarrow;</span> </td> <tr id=3Dentity-twoheadrightarro=
w><td> <code title=3D"">twoheadrightarrow;</c=
ode> </td> <td> U+021A0 </td> <td> <span cl=
ass=3Dglyph title=3D"">↠</span> =
</td> <tr id=3Dentity-Uacute><td> <code title=3D&quo=
t;">Uacute;</code> </td> <td> U+000DA </td&g=
t; <td> <span class=3Dglyph title=3D"">Ú=
</span> </td> <tr id=3Dentity-Uacute-legacy class=3Dimpl&g=
t;<td> <code title=3D"">Uacute</code> </td=
> <td> U+000DA </td> <td> <span title=3D"&qu=
ot;>Ú</span> </td> </tr><!-- (invalid =
entity with missing semicolon for legacy support only) --><tr id=3D=
entity-uacute><td> <code title=3D"">uacute;</=
code> </td> <td> U+000FA </td> <td> <span c=
lass=3Dglyph title=3D"">ú</span> </td&gt=
; <tr id=3Dentity-uacute-legacy class=3Dimpl><td> <code ti=
tle=3D"">uacute</code> </td> <td> U+000FA =
</td> <td> <span title=3D"">ú</=
span> </td> </tr><!-- (invalid entity with missing semi=
colon for legacy support only) --><tr id=3Dentity-Uarr><td&gt=
; <code title=3D"">Uarr;</code> </td> <td&=
gt; U+0219F </td> <td> <span class=3Dglyph title=3D"&=
quot;>↟</span> </td> <tr id=3Dentity-uArr>&=
lt;td> <code title=3D"">uArr;</code> </td>=
 <td> U+021D1 </td> <td> <span class=3Dglyph title=3D=
"">⇑</span> </td> <tr id=3Dentity=
-uarr><td> <code title=3D"">uarr;</code> &=
lt;/td> <td> U+02191 </td> <td> <span class=3Dgly=
ph title=3D"">↑</span> </td> <tr =
id=3Dentity-Uarrocir><td> <code title=3D"">Uarro=
cir;</code> </td> <td> U+02949 </td> <td> &=
lt;span class=3Dglyph title=3D"">⥉</span>=
 </td> <tr id=3Dentity-Ubrcy><td> <code title=3D&quo=
t;">Ubrcy;</code> </td> <td> U+0040E </td&gt=
; <td> <span class=3Dglyph title=3D"">Ў&l=
t;/span> </td> <tr id=3Dentity-ubrcy><td> <code t=
itle=3D"">ubrcy;</code> </td> <td> U+0045E=
 </td> <td> <span class=3Dglyph title=3D"">&a=
mp;ubrcy;</span> </td> <tr id=3Dentity-Ubreve><td&gt=
; <code title=3D"">Ubreve;</code> </td> <t=
d> U+0016C </td> <td> <span class=3Dglyph title=3D&quot=
;">Ŭ</span> </td> <tr id=3Dentity-ubrev=
e><td> <code title=3D"">ubreve;</code> &lt=
;/td> <td> U+0016D </td> <td> <span class=3Dglyph=
 title=3D"">ŭ</span> </td> <tr id=3D=
entity-Ucirc><td> <code title=3D"">Ucirc;</co=
de> </td> <td> U+000DB </td> <td> <span cla=
ss=3Dglyph title=3D"">Û</span> </td> &=
lt;tr id=3Dentity-Ucirc-legacy class=3Dimpl><td> <code title=3D=
"">Ucirc</code> </td> <td> U+000DB </td=
> <td> <span title=3D"">Û</span>=
 </td> </tr><!-- (invalid entity with missing semicolon fo=
r legacy support only) --><tr id=3Dentity-ucirc><td> <c=
ode title=3D"">ucirc;</code> </td> <td> U+=
000FB </td> <td> <span class=3Dglyph title=3D""&=
gt;û</span> </td> <tr id=3Dentity-ucirc-legacy c=
lass=3Dimpl><td> <code title=3D"">ucirc</code=
> </td> <td> U+000FB </td> <td> <span title=
=3D"">û</span> </td> </tr><!-=
- (invalid entity with missing semicolon for legacy support only) -->&=
lt;tr id=3Dentity-Ucy><td> <code title=3D"">Ucy;=
</code> </td> <td> U+00423 </td> <td> <s=
pan class=3Dglyph title=3D"">У</span> </td&=
gt; <tr id=3Dentity-ucy><td> <code title=3D""&gt=
;ucy;</code> </td> <td> U+00443 </td> <td> =
<span class=3Dglyph title=3D"">у</span> &lt=
;/td> <tr id=3Dentity-udarr><td> <code title=3D"&q=
uot;>udarr;</code> </td> <td> U+021C5 </td> &l=
t;td> <span class=3Dglyph title=3D"">⇅</s=
pan> </td> <tr id=3Dentity-Udblac><td> <code titl=
e=3D"">Udblac;</code> </td> <td> U+00170 &=
lt;/td> <td> <span class=3Dglyph title=3D"">&amp=
;Udblac;</span> </td> <tr id=3Dentity-udblac><td>=
 <code title=3D"">udblac;</code> </td> <td=
> U+00171 </td> <td> <span class=3Dglyph title=3D"=
">ű</span> </td> <tr id=3Dentity-udhar&=
gt;<td> <code title=3D"">udhar;</code> </t=
d> <td> U+0296E </td> <td> <span class=3Dglyph ti=
tle=3D"">⥮</span> </td> <tr id=3Den=
tity-ufisht><td> <code title=3D"">ufisht;</co=
de> </td> <td> U+0297E </td> <td> <span cla=
ss=3Dglyph title=3D"">⥾</span> </td> =
<tr id=3Dentity-Ufr><td> <code title=3D"">Ufr=
;</code> </td> <td> U+1D518 </td> <td> <=
span class=3Dglyph title=3D"">𝔘</span> </td=
> <tr id=3Dentity-ufr><td> <code title=3D""&g=
t;ufr;</code> </td> <td> U+1D532 </td> <td>=
 <span class=3Dglyph title=3D"">𝔲</span> &l=
t;/td> <tr id=3Dentity-Ugrave><td> <code title=3D"=
">Ugrave;</code> </td> <td> U+000D9 </td>=
 <td> <span class=3Dglyph title=3D"">Ù&l=
t;/span> </td> <tr id=3Dentity-Ugrave-legacy class=3Dimpl>=
<td> <code title=3D"">Ugrave</code> </td&g=
t; <td> U+000D9 </td> <td> <span title=3D"&quot=
;>Ù</span> </td> </tr><!-- (invalid en=
tity with missing semicolon for legacy support only) --><tr id=3Den=
tity-ugrave><td> <code title=3D"">ugrave;</co=
de> </td> <td> U+000F9 </td> <td> <span cla=
ss=3Dglyph title=3D"">ù</span> </td> =
<tr id=3Dentity-ugrave-legacy class=3Dimpl><td> <code titl=
e=3D"">ugrave</code> </td> <td> U+000F9 &l=
t;/td> <td> <span title=3D"">ù</sp=
an> </td> </tr><!-- (invalid entity with missing semico=
lon for legacy support only) --><tr id=3Dentity-uHar><td> =
<code title=3D"">uHar;</code> </td> <td&gt=
; U+02963 </td> <td> <span class=3Dglyph title=3D"&qu=
ot;>⥣</span> </td> <tr id=3Dentity-uharl>&l=
t;td> <code title=3D"">uharl;</code> </td>=
 <td> U+021BF </td> <td> <span class=3Dglyph title=3D=
"">↿</span> </td> <tr id=3D=
entity-uharr><td> <code title=3D"">uharr;</co=
de> </td> <td> U+021BE </td> <td> <span cla=
ss=3Dglyph title=3D"">↾</span> <=
/td> <tr id=3Dentity-uhblk><td> <code title=3D"&qu=
ot;>uhblk;</code> </td> <td> U+02580 </td> &lt=
;td> <span class=3Dglyph title=3D"">▀</sp=
an> </td> <tr id=3Dentity-ulcorn><td> <code title=
=3D"">ulcorn;</code> </td> <td> U+0231C &l=
t;/td> <td> <span class=3Dglyph title=3D"">&=
ulcorn;</span> </td> <tr id=3Dentity-ulcorner><td&gt=
; <code title=3D"">ulcorner;</code> </td> &lt=
;td> U+0231C </td> <td> <span class=3Dglyph title=3D&qu=
ot;">⌜</span> </td> <tr id=3Dentity-ulc=
rop><td> <code title=3D"">ulcrop;</code> &=
lt;/td> <td> U+0230F </td> <td> <span class=3Dgly=
ph title=3D"">⌏</span> </td> <tr i=
d=3Dentity-ultri><td> <code title=3D"">ultri;&lt=
;/code> </td> <td> U+025F8 </td> <td> <span=
 class=3Dglyph title=3D"">◸</span> </td&g=
t; <tr id=3Dentity-Umacr><td> <code title=3D""&g=
t;Umacr;</code> </td> <td> U+0016A </td> <td&g=
t; <span class=3Dglyph title=3D"">Ū</span&gt=
; </td> <tr id=3Dentity-umacr><td> <code title=3D&qu=
ot;">umacr;</code> </td> <td> U+0016B </td&g=
t; <td> <span class=3Dglyph title=3D"">ū&=
lt;/span> </td> <tr id=3Dentity-uml><td> <code ti=
tle=3D"">uml;</code> </td> <td> U+000A8 &l=
t;/td> <td> <span class=3Dglyph title=3D"">&=
die;</span> </td> <tr id=3Dentity-uml-legacy class=3Dimpl&=
gt;<td> <code title=3D"">uml</code> </td&g=
t; <td> U+000A8 </td> <td> <span title=3D"&quot=
;>¨</span> </td> </tr><!-- (invalid entit=
y with missing semicolon for legacy support only) --><tr id=3Dentit=
y-UnderBar><td> <code title=3D"">UnderBar;</c=
ode> </td> <td> U+0005F </td> <td> <span cl=
ass=3Dglyph title=3D"">_</span> </td> <tr id=3D=
entity-UnderBrace><td> <code title=3D"">UnderBra=
ce;</code> </td> <td> U+023DF </td> <td> &l=
t;span class=3Dglyph title=3D"">⏟</span&gt=
; </td> <tr id=3Dentity-UnderBracket><td> <code titl=
e=3D"">UnderBracket;</code> </td> <td> U+0=
23B5 </td> <td> <span class=3Dglyph title=3D""&g=
t;⎵</span> </td> <tr id=3Dentity-UnderParenthesis=
><td> <code title=3D"">UnderParenthesis;</cod=
e> </td> <td> U+023DD </td> <td> <span clas=
s=3Dglyph title=3D"">⏝</span> &lt=
;/td> <tr id=3Dentity-Union><td> <code title=3D"&q=
uot;>Union;</code> </td> <td> U+022C3 </td> &l=
t;td> <span class=3Dglyph title=3D"">⋃</sp=
an> </td> <tr id=3Dentity-UnionPlus><td> <code ti=
tle=3D"">UnionPlus;</code> </td> <td> U+02=
28E </td> <td> <span class=3Dglyph title=3D""&gt=
;⊎</span> </td> <tr id=3Dentity-Uogon><td&=
gt; <code title=3D"">Uogon;</code> </td> <=
td> U+00172 </td> <td> <span class=3Dglyph title=3D&quo=
t;">Ų</span> </td> <tr id=3Dentity-uogon=
><td> <code title=3D"">uogon;</code> </=
td> <td> U+00173 </td> <td> <span class=3Dglyph t=
itle=3D"">ų</span> </td> <tr id=3De=
ntity-Uopf><td> <code title=3D"">Uopf;</code&=
gt; </td> <td> U+1D54C </td> <td> <span class=3D=
glyph title=3D"">𝕌</span> </td> <tr =
id=3Dentity-uopf><td> <code title=3D"">uopf;<=
/code> </td> <td> U+1D566 </td> <td> <span =
class=3Dglyph title=3D"">𝕦</span> </td>=
 <tr id=3Dentity-UpArrow><td> <code title=3D""&g=
t;UpArrow;</code> </td> <td> U+02191 </td> <td=
> <span class=3Dglyph title=3D"">↑</spa=
n> </td> <tr id=3Dentity-Uparrow><td> <code title=
=3D"">Uparrow;</code> </td> <td> U+021D1 &=
lt;/td> <td> <span class=3Dglyph title=3D"">&amp=
;Uparrow;</span> </td> <tr id=3Dentity-uparrow><td&g=
t; <code title=3D"">uparrow;</code> </td> &lt=
;td> U+02191 </td> <td> <span class=3Dglyph title=3D&qu=
ot;">↑</span> </td> <tr id=3Dentity-Up=
ArrowBar><td> <code title=3D"">UpArrowBar;</c=
ode> </td> <td> U+02912 </td> <td> <span cl=
ass=3Dglyph title=3D"">⤒</span> </td=
> <tr id=3Dentity-UpArrowDownArrow><td> <code title=3D&=
quot;">UpArrowDownArrow;</code> </td> <td> U+02=
1C5 </td> <td> <span class=3Dglyph title=3D""&gt=
;⇅</span> </td> <tr id=3Dentity-UpDownArrow>&=
lt;td> <code title=3D"">UpDownArrow;</code> <=
/td> <td> U+02195 </td> <td> <span class=3Dglyph =
title=3D"">↕</span> </td> <tr id=3De=
ntity-Updownarrow><td> <code title=3D"">Updownar=
row;</code> </td> <td> U+021D5 </td> <td> &=
lt;span class=3Dglyph title=3D"">⇕<=
/span> </td> <tr id=3Dentity-updownarrow><td> <co=
de title=3D"">updownarrow;</code> </td> <td&g=
t; U+02195 </td> <td> <span class=3Dglyph title=3D"&q=
uot;>↕</span> </td> <tr id=3Dentity-UpEquilibr=
ium><td> <code title=3D"">UpEquilibrium;</cod=
e> </td> <td> U+0296E </td> <td> <span clas=
s=3Dglyph title=3D"">⥮</span> </td> &l=
t;tr id=3Dentity-upharpoonleft><td> <code title=3D"&quot=
;>upharpoonleft;</code> </td> <td> U+021BF </td&g=
t; <td> <span class=3Dglyph title=3D"">&upharpo=
onleft;</span> </td> <tr id=3Dentity-upharpoonright>&lt=
;td> <code title=3D"">upharpoonright;</code> &lt=
;/td> <td> U+021BE </td> <td> <span class=3Dglyph=
 title=3D"">↾</span> </td> &l=
t;tr id=3Dentity-uplus><td> <code title=3D"">upl=
us;</code> </td> <td> U+0228E </td> <td> &l=
t;span class=3Dglyph title=3D"">⊎</span> &lt=
;/td> <tr id=3Dentity-UpperLeftArrow><td> <code title=3D=
"">UpperLeftArrow;</code> </td> <td> U+021=
96 </td> <td> <span class=3Dglyph title=3D"">=
↖</span> </td> <tr id=3Dentity-UpperRightArrow=
><td> <code title=3D"">UpperRightArrow;</code=
> </td> <td> U+02197 </td> <td> <span class=
=3Dglyph title=3D"">↗</span> </td> &=
lt;tr id=3Dentity-Upsi><td> <code title=3D"">Ups=
i;</code> </td> <td> U+003D2 </td> <td> &lt=
;span class=3Dglyph title=3D"">ϒ</span> <=
/td> <tr id=3Dentity-upsi><td> <code title=3D"&quo=
t;>upsi;</code> </td> <td> U+003C5 </td> <t=
d> <span class=3Dglyph title=3D"">υ</sp=
an> </td> <tr id=3Dentity-upsih><td> <code title=3D=
"">upsih;</code> </td> <td> U+003D2 </t=
d> <td> <span class=3Dglyph title=3D"">&upsi=
h;</span> </td> <tr id=3Dentity-Upsilon><td> <=
code title=3D"">Upsilon;</code> </td> <td>=
 U+003A5 </td> <td> <span class=3Dglyph title=3D"&quo=
t;>Υ</span> </td> <tr id=3Dentity-upsilon&g=
t;<td> <code title=3D"">upsilon;</code> </=
td> <td> U+003C5 </td> <td> <span class=3Dglyph t=
itle=3D"">υ</span> </td> <tr id=3D=
entity-UpTee><td> <code title=3D"">UpTee;</co=
de> </td> <td> U+022A5 </td> <td> <span cla=
ss=3Dglyph title=3D"">⊥</span> </td> =
<tr id=3Dentity-UpTeeArrow><td> <code title=3D""=
>UpTeeArrow;</code> </td> <td> U+021A5 </td> &=
lt;td> <span class=3Dglyph title=3D"">↥&l=
t;/span> </td> <tr id=3Dentity-upuparrows><td> <c=
ode title=3D"">upuparrows;</code> </td> <td&g=
t; U+021C8 </td> <td> <span class=3Dglyph title=3D"&q=
uot;>⇈</span> </td> <tr id=3Dentity-urcorn&gt=
;<td> <code title=3D"">urcorn;</code> </td=
> <td> U+0231D </td> <td> <span class=3Dglyph tit=
le=3D"">⌝</span> </td> <tr id=3Den=
tity-urcorner><td> <code title=3D"">urcorner;&lt=
;/code> </td> <td> U+0231D </td> <td> <span=
 class=3Dglyph title=3D"">⌝</span> </td&=
gt; <tr id=3Dentity-urcrop><td> <code title=3D""=
>urcrop;</code> </td> <td> U+0230E </td> <t=
d> <span class=3Dglyph title=3D"">⌎</spa=
n> </td> <tr id=3Dentity-Uring><td> <code title=3D=
"">Uring;</code> </td> <td> U+0016E </t=
d> <td> <span class=3Dglyph title=3D"">&Urin=
g;</span> </td> <tr id=3Dentity-uring><td> <co=
de title=3D"">uring;</code> </td> <td> U+0=
016F </td> <td> <span class=3Dglyph title=3D""&g=
t;ů</span> </td> <tr id=3Dentity-urtri><td=
> <code title=3D"">urtri;</code> </td> &lt=
;td> U+025F9 </td> <td> <span class=3Dglyph title=3D&qu=
ot;">◹</span> </td> <tr id=3Dentity-Uscr=
><td> <code title=3D"">Uscr;</code> </t=
d> <td> U+1D4B0 </td> <td> <span class=3Dglyph ti=
tle=3D"">𝒰</span> </td> <tr id=3Dent=
ity-uscr><td> <code title=3D"">uscr;</code&gt=
; </td> <td> U+1D4CA </td> <td> <span class=3D=
glyph title=3D"">𝓊</span> </td> <tr =
id=3Dentity-utdot><td> <code title=3D"">utdot;&l=
t;/code> </td> <td> U+022F0 </td> <td> <spa=
n class=3Dglyph title=3D"">⋰</span> </td&=
gt; <tr id=3Dentity-Utilde><td> <code title=3D""=
>Utilde;</code> </td> <td> U+00168 </td> <t=
d> <span class=3Dglyph title=3D"">Ũ</spa=
n> </td> <tr id=3Dentity-utilde><td> <code title=3D=
"">utilde;</code> </td> <td> U+00169 </=
td> <td> <span class=3Dglyph title=3D"">&uti=
lde;</span> </td> <tr id=3Dentity-utri><td> <c=
ode title=3D"">utri;</code> </td> <td> U+0=
25B5 </td> <td> <span class=3Dglyph title=3D""&g=
t;▵</span> </td> <tr id=3Dentity-utrif>&lt=
;td> <code title=3D"">utrif;</code> </td> =
<td> U+025B4 </td> <td> <span class=3Dglyph title=3D=
"">▴</span> </td> <tr id=3Dentity-u=
uarr><td> <code title=3D"">uuarr;</code> &=
lt;/td> <td> U+021C8 </td> <td> <span class=3Dgly=
ph title=3D"">⇈</span> </td> <tr id=
=3Dentity-Uuml><td> <code title=3D"">Uuml;</c=
ode> </td> <td> U+000DC </td> <td> <span cl=
ass=3Dglyph title=3D"">Ü</span> </td> &=
lt;tr id=3Dentity-Uuml-legacy class=3Dimpl><td> <code title=3D=
"">Uuml</code> </td> <td> U+000DC </td&=
gt; <td> <span title=3D"">Ü</span> &=
lt;/td> </tr><!-- (invalid entity with missing semicolon for =
legacy support only) --><tr id=3Dentity-uuml><td> <code=
 title=3D"">uuml;</code> </td> <td> U+000F=
C </td> <td> <span class=3Dglyph title=3D"">&=
amp;uuml;</span> </td> <tr id=3Dentity-uuml-legacy class=3D=
impl><td> <code title=3D"">uuml</code> &lt=
;/td> <td> U+000FC </td> <td> <span title=3D&quot=
;">ü</span> </td> </tr><!-- (invali=
d entity with missing semicolon for legacy support only) --><tr id=3D=
entity-uwangle><td> <code title=3D"">uwangle;&lt=
;/code> </td> <td> U+029A7 </td> <td> <span=
 class=3Dglyph title=3D"">⦧</span> </td=
> <tr id=3Dentity-vangrt><td> <code title=3D"&quot=
;>vangrt;</code> </td> <td> U+0299C </td> <=
td> <span class=3Dglyph title=3D"">⦜</sp=
an> </td> <tr id=3Dentity-varepsilon><td> <code t=
itle=3D"">varepsilon;</code> </td> <td> U+=
003F5 </td> <td> <span class=3Dglyph title=3D""&=
gt;ϵ</span> </td> <tr id=3Dentity-vark=
appa><td> <code title=3D"">varkappa;</code&gt=
; </td> <td> U+003F0 </td> <td> <span class=3D=
glyph title=3D"">ϰ</span> </td> <t=
r id=3Dentity-varnothing><td> <code title=3D"">v=
arnothing;</code> </td> <td> U+02205 </td> <td=
> <span class=3Dglyph title=3D"">∅</span=
> </td> <tr id=3Dentity-varphi><td> <code title=3D=
"">varphi;</code> </td> <td> U+003D5 </=
td> <td> <span class=3Dglyph title=3D"">&phi=
v;</span> </td> <tr id=3Dentity-varpi><td> <co=
de title=3D"">varpi;</code> </td> <td> U+0=
03D6 </td> <td> <span class=3Dglyph title=3D""&g=
t;ϖ</span> </td> <tr id=3Dentity-varpropto>&l=
t;td> <code title=3D"">varpropto;</code> </td=
> <td> U+0221D </td> <td> <span class=3Dglyph tit=
le=3D"">∝</span> </td> <tr id=3Den=
tity-vArr><td> <code title=3D"">vArr;</code&g=
t; </td> <td> U+021D5 </td> <td> <span class=3D=
glyph title=3D"">⇕</span> </t=
d> <tr id=3Dentity-varr><td> <code title=3D""=
>varr;</code> </td> <td> U+02195 </td> <td&=
gt; <span class=3Dglyph title=3D"">↕</span&gt=
; </td> <tr id=3Dentity-varrho><td> <code title=3D&q=
uot;">varrho;</code> </td> <td> U+003F1 </td=
> <td> <span class=3Dglyph title=3D"">ϱ=
</span> </td> <tr id=3Dentity-varsigma><td> <c=
ode title=3D"">varsigma;</code> </td> <td>=
 U+003C2 </td> <td> <span class=3Dglyph title=3D"&quo=
t;>ς</span> </td> <tr id=3Dentity-varsubsetn=
eq><td> <code title=3D"">varsubsetneq;</code&=
gt; </td> <td> U+0228A U+0FE00 </td> <td> <spa=
n class=3D"glyph compound" title=3D"">&subsetn=
eq;︀</span> </td> <tr id=3Dentity-varsubsetneqq=
><td> <code title=3D"">varsubsetneqq;</code&g=
t; </td> <td> U+02ACB U+0FE00 </td> <td> <span=
 class=3D"glyph compound" title=3D"">&subsetne=
qq;︀</span> </td> <tr id=3Dentity-varsupsetneq&=
gt;<td> <code title=3D"">varsupsetneq;</code>=
 </td> <td> U+0228B U+0FE00 </td> <td> <span c=
lass=3D"glyph compound" title=3D"">⊋=
︀</span> </td> <tr id=3Dentity-varsupsetneqq&gt=
;<td> <code title=3D"">varsupsetneqq;</code> =
</td> <td> U+02ACC U+0FE00 </td> <td> <span cl=
ass=3D"glyph compound" title=3D"">⫌=
︀</span> </td> <tr id=3Dentity-vartheta><=
td> <code title=3D"">vartheta;</code> </td&gt=
; <td> U+003D1 </td> <td> <span class=3Dglyph title=3D=
"">ϑ</span> </td> <tr id=3Dentity-=
vartriangleleft><td> <code title=3D"">vartriangl=
eleft;</code> </td> <td> U+022B2 </td> <td>=
 <span class=3Dglyph title=3D"">⊲<=
/span> </td> <tr id=3Dentity-vartriangleright><td> &=
lt;code title=3D"">vartriangleright;</code> </td&gt=
; <td> U+022B3 </td> <td> <span class=3Dglyph title=3D=
"">⊳</span> </td> <tr id=
=3Dentity-Vbar><td> <code title=3D"">Vbar;</c=
ode> </td> <td> U+02AEB </td> <td> <span cl=
ass=3Dglyph title=3D"">⫫</span> </td> &=
lt;tr id=3Dentity-vBar><td> <code title=3D"">vBa=
r;</code> </td> <td> U+02AE8 </td> <td> &lt=
;span class=3Dglyph title=3D"">⫨</span> </=
td> <tr id=3Dentity-vBarv><td> <code title=3D"&quo=
t;>vBarv;</code> </td> <td> U+02AE9 </td> <=
td> <span class=3Dglyph title=3D"">⫩</spa=
n> </td> <tr id=3Dentity-Vcy><td> <code title=3D&=
quot;">Vcy;</code> </td> <td> U+00412 </td&g=
t; <td> <span class=3Dglyph title=3D"">В&lt=
;/span> </td> <tr id=3Dentity-vcy><td> <code titl=
e=3D"">vcy;</code> </td> <td> U+00432 <=
/td> <td> <span class=3Dglyph title=3D"">&vc=
y;</span> </td> <tr id=3Dentity-VDash><td> <co=
de title=3D"">VDash;</code> </td> <td> U+0=
22AB </td> <td> <span class=3Dglyph title=3D""&g=
t;⊫</span> </td> <tr id=3Dentity-Vdash><td=
> <code title=3D"">Vdash;</code> </td> &lt=
;td> U+022A9 </td> <td> <span class=3Dglyph title=3D&qu=
ot;">⊩</span> </td> <tr id=3Dentity-vDas=
h><td> <code title=3D"">vDash;</code> <=
/td> <td> U+022A8 </td> <td> <span class=3Dglyph =
title=3D"">⊨</span> </td> <tr id=3D=
entity-vdash><td> <code title=3D"">vdash;</co=
de> </td> <td> U+022A2 </td> <td> <span cla=
ss=3Dglyph title=3D"">⊢</span> </td> &=
lt;tr id=3Dentity-Vdashl><td> <code title=3D"">V=
dashl;</code> </td> <td> U+02AE6 </td> <td>=
 <span class=3Dglyph title=3D"">⫦</span>=
 </td> <tr id=3Dentity-Vee><td> <code title=3D"=
">Vee;</code> </td> <td> U+022C1 </td> &l=
t;td> <span class=3Dglyph title=3D"">⋁</=
span> </td> <tr id=3Dentity-vee><td> <code title=3D=
"">vee;</code> </td> <td> U+02228 </td&=
gt; <td> <span class=3Dglyph title=3D"">∨&l=
t;/span> </td> <tr id=3Dentity-veebar><td> <code =
title=3D"">veebar;</code> </td> <td> U+022=
BB </td> <td> <span class=3Dglyph title=3D"">=
⊻</span> </td> <tr id=3Dentity-veeeq><td&=
gt; <code title=3D"">veeeq;</code> </td> <=
td> U+0225A </td> <td> <span class=3Dglyph title=3D&quo=
t;">≚</span> </td> <tr id=3Dentity-velli=
p><td> <code title=3D"">vellip;</code> &lt=
;/td> <td> U+022EE </td> <td> <span class=3Dglyph=
 title=3D"">⋮</span> </td> <tr id=3D=
entity-Verbar><td> <code title=3D"">Verbar;</=
code> </td> <td> U+02016 </td> <td> <span c=
lass=3Dglyph title=3D"">‖</span> </td> =
<tr id=3Dentity-verbar><td> <code title=3D"">=
verbar;</code> </td> <td> U+0007C </td> <td&gt=
; <span class=3Dglyph title=3D"">|</span> </td&g=
t; <tr id=3Dentity-Vert><td> <code title=3D""&gt=
;Vert;</code> </td> <td> U+02016 </td> <td>=
 <span class=3Dglyph title=3D"">‖</span> &=
lt;/td> <tr id=3Dentity-vert><td> <code title=3D"&=
quot;>vert;</code> </td> <td> U+0007C </td> &l=
t;td> <span class=3Dglyph title=3D"">|</span> &l=
t;/td> <tr id=3Dentity-VerticalBar><td> <code title=3D&=
quot;">VerticalBar;</code> </td> <td> U+02223 &=
lt;/td> <td> <span class=3Dglyph title=3D"">&amp=
;mid;</span> </td> <tr id=3Dentity-VerticalLine><td&=
gt; <code title=3D"">VerticalLine;</code> </td&g=
t; <td> U+0007C </td> <td> <span class=3Dglyph title=
=3D"">|</span> </td> <tr id=3Dentity-Vertical=
Separator><td> <code title=3D"">VerticalSeparato=
r;</code> </td> <td> U+02758 </td> <td> &lt=
;span class=3Dglyph title=3D"">❘</s=
pan> </td> <tr id=3Dentity-VerticalTilde><td> <co=
de title=3D"">VerticalTilde;</code> </td> <td=
> U+02240 </td> <td> <span class=3Dglyph title=3D"=
">≀</span> </td> <tr id=3Dentity-VeryTh=
inSpace><td> <code title=3D"">VeryThinSpace;<=
/code> </td> <td> U+0200A </td> <td> <span =
class=3Dglyph title=3D""> </span> </td&g=
t; <tr id=3Dentity-Vfr><td> <code title=3D"">=
Vfr;</code> </td> <td> U+1D519 </td> <td> &=
lt;span class=3Dglyph title=3D"">𝔙</span> <=
/td> <tr id=3Dentity-vfr><td> <code title=3D"&quot=
;>vfr;</code> </td> <td> U+1D533 </td> <td&=
gt; <span class=3Dglyph title=3D"">𝔳</span>=
 </td> <tr id=3Dentity-vltri><td> <code title=3D&quo=
t;">vltri;</code> </td> <td> U+022B2 </td&gt=
; <td> <span class=3Dglyph title=3D"">&vartrian=
gleleft;</span> </td> <tr id=3Dentity-vnsub><td> =
<code title=3D"">vnsub;</code> </td> <td&g=
t; U+02282 U+020D2 </td> <td> <span class=3D"glyph co=
mpound" title=3D"">⊂⃒</span> &=
lt;/td> <tr id=3Dentity-vnsup><td> <code title=3D"=
">vnsup;</code> </td> <td> U+02283 U+020D2 <=
/td> <td> <span class=3D"glyph compound" title=3D&q=
uot;">⊃⃒</span> </td> <tr id=3D=
entity-Vopf><td> <code title=3D"">Vopf;</code=
> </td> <td> U+1D54D </td> <td> <span class=
=3Dglyph title=3D"">𝕍</span> </td> <=
tr id=3Dentity-vopf><td> <code title=3D"">vopf;&=
lt;/code> </td> <td> U+1D567 </td> <td> <sp=
an class=3Dglyph title=3D"">𝕧</span> </td&=
gt; <tr id=3Dentity-vprop><td> <code title=3D""&=
gt;vprop;</code> </td> <td> U+0221D </td> <td&=
gt; <span class=3Dglyph title=3D"">∝</span&=
gt; </td> <tr id=3Dentity-vrtri><td> <code title=3D&=
quot;">vrtri;</code> </td> <td> U+022B3 </td=
> <td> <span class=3Dglyph title=3D"">&vartr=
iangleright;</span> </td> <tr id=3Dentity-Vscr><td&g=
t; <code title=3D"">Vscr;</code> </td> <td=
> U+1D4B1 </td> <td> <span class=3Dglyph title=3D"=
">𝒱</span> </td> <tr id=3Dentity-vscr>=
<td> <code title=3D"">vscr;</code> </td&gt=
; <td> U+1D4CB </td> <td> <span class=3Dglyph title=3D=
"">𝓋</span> </td> <tr id=3Dentity-vs=
ubnE><td> <code title=3D"">vsubnE;</code> =
</td> <td> U+02ACB U+0FE00 </td> <td> <span cl=
ass=3D"glyph compound" title=3D"">⫋=
︀</span> </td> <tr id=3Dentity-vsubne><td=
> <code title=3D"">vsubne;</code> </td> &l=
t;td> U+0228A U+0FE00 </td> <td> <span class=3D"gl=
yph compound" title=3D"">⊊︀&lt=
;/span> </td> <tr id=3Dentity-vsupnE><td> <code t=
itle=3D"">vsupnE;</code> </td> <td> U+02AC=
C U+0FE00 </td> <td> <span class=3D"glyph compound&qu=
ot; title=3D"">⫌︀</span> &lt=
;/td> <tr id=3Dentity-vsupne><td> <code title=3D"&=
quot;>vsupne;</code> </td> <td> U+0228B U+0FE00 <=
/td> <td> <span class=3D"glyph compound" title=3D&q=
uot;">⊋︀</span> </td> <tr=
 id=3Dentity-Vvdash><td> <code title=3D"">Vvdash=
;</code> </td> <td> U+022AA </td> <td> <=
span class=3Dglyph title=3D"">⊪</span> <=
/td> <tr id=3Dentity-vzigzag><td> <code title=3D"&=
quot;>vzigzag;</code> </td> <td> U+0299A </td>=
 <td> <span class=3Dglyph title=3D"">⦚&=
lt;/span> </td> <tr id=3Dentity-Wcirc><td> <code =
title=3D"">Wcirc;</code> </td> <td> U+0017=
4 </td> <td> <span class=3Dglyph title=3D"">&=
amp;Wcirc;</span> </td> <tr id=3Dentity-wcirc><td&gt=
; <code title=3D"">wcirc;</code> </td> <td=
> U+00175 </td> <td> <span class=3Dglyph title=3D"=
">ŵ</span> </td> <tr id=3Dentity-wedbar&=
gt;<td> <code title=3D"">wedbar;</code> </=
td> <td> U+02A5F </td> <td> <span class=3Dglyph t=
itle=3D"">⩟</span> </td> <tr id=3D=
entity-Wedge><td> <code title=3D"">Wedge;</co=
de> </td> <td> U+022C0 </td> <td> <span cla=
ss=3Dglyph title=3D"">⋀</span> </td> =
<tr id=3Dentity-wedge><td> <code title=3D"">w=
edge;</code> </td> <td> U+02227 </td> <td> =
<span class=3Dglyph title=3D"">∧</span> &=
lt;/td> <tr id=3Dentity-wedgeq><td> <code title=3D&quot=
;">wedgeq;</code> </td> <td> U+02259 </td&gt=
; <td> <span class=3Dglyph title=3D"">≙&=
lt;/span> </td> <tr id=3Dentity-weierp><td> <code=
 title=3D"">weierp;</code> </td> <td> U+02=
118 </td> <td> <span class=3Dglyph title=3D""&gt=
;℘</span> </td> <tr id=3Dentity-Wfr><td> &=
lt;code title=3D"">Wfr;</code> </td> <td> =
U+1D51A </td> <td> <span class=3Dglyph title=3D"&quot=
;>𝔚</span> </td> <tr id=3Dentity-wfr><td&=
gt; <code title=3D"">wfr;</code> </td> <td=
> U+1D534 </td> <td> <span class=3Dglyph title=3D"=
">𝔴</span> </td> <tr id=3Dentity-Wopf>&=
lt;td> <code title=3D"">Wopf;</code> </td>=
 <td> U+1D54E </td> <td> <span class=3Dglyph title=3D=
"">𝕎</span> </td> <tr id=3Dentity-wo=
pf><td> <code title=3D"">wopf;</code> <=
/td> <td> U+1D568 </td> <td> <span class=3Dglyph =
title=3D"">𝕨</span> </td> <tr id=3De=
ntity-wp><td> <code title=3D"">wp;</code> =
</td> <td> U+02118 </td> <td> <span class=3Dgl=
yph title=3D"">℘</span> </td> <tr id=3D=
entity-wr><td> <code title=3D"">wr;</code>=
 </td> <td> U+02240 </td> <td> <span class=3Dg=
lyph title=3D"">≀</span> </td> <tr=
 id=3Dentity-wreath><td> <code title=3D"">wreath=
;</code> </td> <td> U+02240 </td> <td> <=
span class=3Dglyph title=3D"">≀</span> <=
/td> <tr id=3Dentity-Wscr><td> <code title=3D"&quo=
t;>Wscr;</code> </td> <td> U+1D4B2 </td> <t=
d> <span class=3Dglyph title=3D"">𝒲</span&=
gt; </td> <tr id=3Dentity-wscr><td> <code title=3D&q=
uot;">wscr;</code> </td> <td> U+1D4CC </td&g=
t; <td> <span class=3Dglyph title=3D"">𝓌&l=
t;/span> </td> <tr id=3Dentity-xcap><td> <code ti=
tle=3D"">xcap;</code> </td> <td> U+022C2 &=
lt;/td> <td> <span class=3Dglyph title=3D"">&amp=
;bigcap;</span> </td> <tr id=3Dentity-xcirc><td> =
<code title=3D"">xcirc;</code> </td> <td&g=
t; U+025EF </td> <td> <span class=3Dglyph title=3D"&q=
uot;>◯</span> </td> <tr id=3Dentity-xcup>&=
lt;td> <code title=3D"">xcup;</code> </td>=
 <td> U+022C3 </td> <td> <span class=3Dglyph title=3D=
"">⋃</span> </td> <tr id=3Dentity-xd=
tri><td> <code title=3D"">xdtri;</code> &l=
t;/td> <td> U+025BD </td> <td> <span class=3Dglyp=
h title=3D"">▽</span> </td> <tr id=3D=
entity-Xfr><td> <code title=3D"">Xfr;</code&g=
t; </td> <td> U+1D51B </td> <td> <span class=3D=
glyph title=3D"">𝔛</span> </td> <tr i=
d=3Dentity-xfr><td> <code title=3D"">xfr;</co=
de> </td> <td> U+1D535 </td> <td> <span cla=
ss=3Dglyph title=3D"">𝔵</span> </td> &lt=
;tr id=3Dentity-xhArr><td> <code title=3D"">xhAr=
r;</code> </td> <td> U+027FA </td> <td> &lt=
;span class=3Dglyph title=3D"">&DoubleLongLeftRightArrow=
;</span> </td> <tr id=3Dentity-xharr><td> <cod=
e title=3D"">xharr;</code> </td> <td> U+02=
7F7 </td> <td> <span class=3Dglyph title=3D""&gt=
;⟷</span> </td> <tr id=3Dentity-Xi><td>=
 <code title=3D"">Xi;</code> </td> <td>=
 U+0039E </td> <td> <span class=3Dglyph title=3D"&quo=
t;>Ξ</span> </td> <tr id=3Dentity-xi><td&g=
t; <code title=3D"">xi;</code> </td> <td&g=
t; U+003BE </td> <td> <span class=3Dglyph title=3D"&q=
uot;>ξ</span> </td> <tr id=3Dentity-xlArr>&lt=
;td> <code title=3D"">xlArr;</code> </td> =
<td> U+027F8 </td> <td> <span class=3Dglyph title=3D=
"">⟸</span> </td> <tr id=3D=
entity-xlarr><td> <code title=3D"">xlarr;</co=
de> </td> <td> U+027F5 </td> <td> <span cla=
ss=3Dglyph title=3D"">⟵</span> </td> &=
lt;tr id=3Dentity-xmap><td> <code title=3D"">xma=
p;</code> </td> <td> U+027FC </td> <td> &lt=
;span class=3Dglyph title=3D"">⟼</span> </=
td> <tr id=3Dentity-xnis><td> <code title=3D"&quot=
;>xnis;</code> </td> <td> U+022FB </td> <td=
> <span class=3Dglyph title=3D"">⋻</span&g=
t; </td> <tr id=3Dentity-xodot><td> <code title=3D&q=
uot;">xodot;</code> </td> <td> U+02A00 </td&=
gt; <td> <span class=3Dglyph title=3D"">&bigodo=
t;</span> </td> <tr id=3Dentity-Xopf><td> <cod=
e title=3D"">Xopf;</code> </td> <td> U+1D5=
4F </td> <td> <span class=3Dglyph title=3D"">=
𝕏</span> </td> <tr id=3Dentity-xopf><td>=
 <code title=3D"">xopf;</code> </td> <td&g=
t; U+1D569 </td> <td> <span class=3Dglyph title=3D"&q=
uot;>𝕩</span> </td> <tr id=3Dentity-xoplus>=
<td> <code title=3D"">xoplus;</code> </td&=
gt; <td> U+02A01 </td> <td> <span class=3Dglyph titl=
e=3D"">⨁</span> </td> <tr id=3De=
ntity-xotime><td> <code title=3D"">xotime;</c=
ode> </td> <td> U+02A02 </td> <td> <span cl=
ass=3Dglyph title=3D"">⨂</span> </td>=
 <tr id=3Dentity-xrArr><td> <code title=3D"">=
xrArr;</code> </td> <td> U+027F9 </td> <td>=
 <span class=3Dglyph title=3D"">⟹</span> =
</td> <tr id=3Dentity-xrarr><td> <code title=3D&quot=
;">xrarr;</code> </td> <td> U+027F6 </td>=
 <td> <span class=3Dglyph title=3D"">⟶&lt=
;/span> </td> <tr id=3Dentity-Xscr><td> <code tit=
le=3D"">Xscr;</code> </td> <td> U+1D4B3 &l=
t;/td> <td> <span class=3Dglyph title=3D"">&=
Xscr;</span> </td> <tr id=3Dentity-xscr><td> <=
code title=3D"">xscr;</code> </td> <td> U+=
1D4CD </td> <td> <span class=3Dglyph title=3D""&=
gt;𝓍</span> </td> <tr id=3Dentity-xsqcup><t=
d> <code title=3D"">xsqcup;</code> </td> &=
lt;td> U+02A06 </td> <td> <span class=3Dglyph title=3D&=
quot;">⨆</span> </td> <tr id=3Dentity=
-xuplus><td> <code title=3D"">xuplus;</code&g=
t; </td> <td> U+02A04 </td> <td> <span class=3D=
glyph title=3D"">⨄</span> </td> <t=
r id=3Dentity-xutri><td> <code title=3D"">xutri;=
</code> </td> <td> U+025B3 </td> <td> <s=
pan class=3Dglyph title=3D"">△</span&gt=
; </td> <tr id=3Dentity-xvee><td> <code title=3D&quo=
t;">xvee;</code> </td> <td> U+022C1 </td>=
 <td> <span class=3Dglyph title=3D"">⋁&l=
t;/span> </td> <tr id=3Dentity-xwedge><td> <code =
title=3D"">xwedge;</code> </td> <td> U+022=
C0 </td> <td> <span class=3Dglyph title=3D"">=
⋀</span> </td> <tr id=3Dentity-Yacute><td=
> <code title=3D"">Yacute;</code> </td> &l=
t;td> U+000DD </td> <td> <span class=3Dglyph title=3D&q=
uot;">Ý</span> </td> <tr id=3Dentity-Ya=
cute-legacy class=3Dimpl><td> <code title=3D"">Y=
acute</code> </td> <td> U+000DD </td> <td> =
<span title=3D"">Ý</span> </td> &l=
t;/tr><!-- (invalid entity with missing semicolon for legacy suppor=
t only) --><tr id=3Dentity-yacute><td> <code title=3D&q=
uot;">yacute;</code> </td> <td> U+000FD </td=
> <td> <span class=3Dglyph title=3D"">&yacut=
e;</span> </td> <tr id=3Dentity-yacute-legacy class=3Dimpl=
><td> <code title=3D"">yacute</code> </=
td> <td> U+000FD </td> <td> <span title=3D"&=
quot;>ý</span> </td> </tr><!-- (invali=
d entity with missing semicolon for legacy support only) --><tr id=3D=
entity-YAcy><td> <code title=3D"">YAcy;</code=
> </td> <td> U+0042F </td> <td> <span class=
=3Dglyph title=3D"">Я</span> </td> <=
tr id=3Dentity-yacy><td> <code title=3D"">yacy;&=
lt;/code> </td> <td> U+0044F </td> <td> <sp=
an class=3Dglyph title=3D"">я</span> </td&=
gt; <tr id=3Dentity-Ycirc><td> <code title=3D""&=
gt;Ycirc;</code> </td> <td> U+00176 </td> <td&=
gt; <span class=3Dglyph title=3D"">Ŷ</span&g=
t; </td> <tr id=3Dentity-ycirc><td> <code title=3D&q=
uot;">ycirc;</code> </td> <td> U+00177 </td&=
gt; <td> <span class=3Dglyph title=3D"">ŷ=
</span> </td> <tr id=3Dentity-Ycy><td> <code t=
itle=3D"">Ycy;</code> </td> <td> U+0042B &=
lt;/td> <td> <span class=3Dglyph title=3D"">&amp=
;Ycy;</span> </td> <tr id=3Dentity-ycy><td> <c=
ode title=3D"">ycy;</code> </td> <td> U+00=
44B </td> <td> <span class=3Dglyph title=3D""&gt=
;ы</span> </td> <tr id=3Dentity-yen><td> =
<code title=3D"">yen;</code> </td> <td>=
 U+000A5 </td> <td> <span class=3Dglyph title=3D"&quo=
t;>¥</span> </td> <tr id=3Dentity-yen-legacy cl=
ass=3Dimpl><td> <code title=3D"">yen</code&gt=
; </td> <td> U+000A5 </td> <td> <span title=3D=
"">¥</span> </td> </tr><!-- (in=
valid entity with missing semicolon for legacy support only) --><tr=
 id=3Dentity-Yfr><td> <code title=3D"">Yfr;</=
code> </td> <td> U+1D51C </td> <td> <span c=
lass=3Dglyph title=3D"">𝔜</span> </td> &=
lt;tr id=3Dentity-yfr><td> <code title=3D"">yfr;=
</code> </td> <td> U+1D536 </td> <td> <s=
pan class=3Dglyph title=3D"">𝔶</span> </td&=
gt; <tr id=3Dentity-YIcy><td> <code title=3D""&g=
t;YIcy;</code> </td> <td> U+00407 </td> <td&gt=
; <span class=3Dglyph title=3D"">Ї</span> =
</td> <tr id=3Dentity-yicy><td> <code title=3D"=
">yicy;</code> </td> <td> U+00457 </td> &=
lt;td> <span class=3Dglyph title=3D"">ї</s=
pan> </td> <tr id=3Dentity-Yopf><td> <code title=3D=
"">Yopf;</code> </td> <td> U+1D550 </td=
> <td> <span class=3Dglyph title=3D"">𝕐=
</span> </td> <tr id=3Dentity-yopf><td> <code =
title=3D"">yopf;</code> </td> <td> U+1D56A=
 </td> <td> <span class=3Dglyph title=3D"">&a=
mp;yopf;</span> </td> <tr id=3Dentity-Yscr><td> &=
lt;code title=3D"">Yscr;</code> </td> <td>=
 U+1D4B4 </td> <td> <span class=3Dglyph title=3D"&quo=
t;>𝒴</span> </td> <tr id=3Dentity-yscr><=
td> <code title=3D"">yscr;</code> </td> &l=
t;td> U+1D4CE </td> <td> <span class=3Dglyph title=3D&q=
uot;">𝓎</span> </td> <tr id=3Dentity-YUcy=
><td> <code title=3D"">YUcy;</code> </t=
d> <td> U+0042E </td> <td> <span class=3Dglyph ti=
tle=3D"">Ю</span> </td> <tr id=3Dent=
ity-yucy><td> <code title=3D"">yucy;</code&gt=
; </td> <td> U+0044E </td> <td> <span class=3D=
glyph title=3D"">ю</span> </td> <tr =
id=3Dentity-Yuml><td> <code title=3D"">Yuml;<=
/code> </td> <td> U+00178 </td> <td> <span =
class=3Dglyph title=3D"">Ÿ</span> </td>=
 <tr id=3Dentity-yuml><td> <code title=3D"">y=
uml;</code> </td> <td> U+000FF </td> <td> &=
lt;span class=3Dglyph title=3D"">ÿ</span> &lt=
;/td> <tr id=3Dentity-yuml-legacy class=3Dimpl><td> <co=
de title=3D"">yuml</code> </td> <td> U+000=
FF </td> <td> <span title=3D"">ÿ<=
/span> </td> </tr><!-- (invalid entity with missing sem=
icolon for legacy support only) --><tr id=3Dentity-Zacute><td=
> <code title=3D"">Zacute;</code> </td> &l=
t;td> U+00179 </td> <td> <span class=3Dglyph title=3D&q=
uot;">Ź</span> </td> <tr id=3Dentity-za=
cute><td> <code title=3D"">zacute;</code> =
</td> <td> U+0017A </td> <td> <span class=3Dgl=
yph title=3D"">ź</span> </td> <tr =
id=3Dentity-Zcaron><td> <code title=3D"">Zcaron;=
</code> </td> <td> U+0017D </td> <td> <s=
pan class=3Dglyph title=3D"">Ž</span> </=
td> <tr id=3Dentity-zcaron><td> <code title=3D"&qu=
ot;>zcaron;</code> </td> <td> U+0017E </td> &l=
t;td> <span class=3Dglyph title=3D"">ž</=
span> </td> <tr id=3Dentity-Zcy><td> <code title=3D=
"">Zcy;</code> </td> <td> U+00417 </td&=
gt; <td> <span class=3Dglyph title=3D"">З&l=
t;/span> </td> <tr id=3Dentity-zcy><td> <code tit=
le=3D"">zcy;</code> </td> <td> U+00437 &lt=
;/td> <td> <span class=3Dglyph title=3D"">&z=
cy;</span> </td> <tr id=3Dentity-Zdot><td> <co=
de title=3D"">Zdot;</code> </td> <td> U+00=
17B </td> <td> <span class=3Dglyph title=3D""&gt=
;Ż</span> </td> <tr id=3Dentity-zdot><td&gt=
; <code title=3D"">zdot;</code> </td> <td&=
gt; U+0017C </td> <td> <span class=3Dglyph title=3D"&=
quot;>ż</span> </td> <tr id=3Dentity-zeetrf&gt=
;<td> <code title=3D"">zeetrf;</code> </td=
> <td> U+02128 </td> <td> <span class=3Dglyph tit=
le=3D"">ℨ</span> </td> <tr id=3Den=
tity-ZeroWidthSpace><td> <code title=3D"">ZeroWi=
dthSpace;</code> </td> <td> U+0200B </td> <td&=
gt; <span class=3Dglyph title=3D"">&NegativeThickSpac=
e;</span> </td> <tr id=3Dentity-Zeta><td> <cod=
e title=3D"">Zeta;</code> </td> <td> U+003=
96 </td> <td> <span class=3Dglyph title=3D"">=
Ζ</span> </td> <tr id=3Dentity-zeta><td>=
 <code title=3D"">zeta;</code> </td> <td&g=
t; U+003B6 </td> <td> <span class=3Dglyph title=3D"&q=
uot;>ζ</span> </td> <tr id=3Dentity-Zfr>&lt=
;td> <code title=3D"">Zfr;</code> </td> &l=
t;td> U+02128 </td> <td> <span class=3Dglyph title=3D&q=
uot;">ℨ</span> </td> <tr id=3Dentity-zf=
r><td> <code title=3D"">zfr;</code> </t=
d> <td> U+1D537 </td> <td> <span class=3Dglyph ti=
tle=3D"">𝔷</span> </td> <tr id=3Denti=
ty-ZHcy><td> <code title=3D"">ZHcy;</code>=
 </td> <td> U+00416 </td> <td> <span class=3Dg=
lyph title=3D"">Ж</span> </td> <tr i=
d=3Dentity-zhcy><td> <code title=3D"">zhcy;</=
code> </td> <td> U+00436 </td> <td> <span c=
lass=3Dglyph title=3D"">ж</span> </td> =
<tr id=3Dentity-zigrarr><td> <code title=3D""&gt=
;zigrarr;</code> </td> <td> U+021DD </td> <td&=
gt; <span class=3Dglyph title=3D"">⇝</span=
> </td> <tr id=3Dentity-Zopf><td> <code title=3D&=
quot;">Zopf;</code> </td> <td> U+02124 </td&=
gt; <td> <span class=3Dglyph title=3D"">&intege=
rs;</span> </td> <tr id=3Dentity-zopf><td> <co=
de title=3D"">zopf;</code> </td> <td> U+1D=
56B </td> <td> <span class=3Dglyph title=3D""&gt=
;𝕫</span> </td> <tr id=3Dentity-Zscr><td&gt=
; <code title=3D"">Zscr;</code> </td> <td&=
gt; U+1D4B5 </td> <td> <span class=3Dglyph title=3D"&=
quot;>𝒵</span> </td> <tr id=3Dentity-zscr>&=
lt;td> <code title=3D"">zscr;</code> </td>=
 <td> U+1D4CF </td> <td> <span class=3Dglyph title=3D=
"">𝓏</span> </td> <tr id=3Dentity-zw=
j><td> <code title=3D"">zwj;</code> </t=
d> <td> U+0200D </td> <td> <span class=3Dglyph ti=
tle=3D"">‍</span> </td> <tr id=3Denti=
ty-zwnj><td> <code title=3D"">zwnj;</code>=
 </td> <td> U+0200C </td> <td> <span class=3Dg=
lyph title=3D"">‌</span> </td> </tab=
le><!--
+   If we want to add character references, Almorca suggests:
+   > I would add &sub1; (character U+2081), &sub2; (character=
 U+2082) and &sub3; (character U+2083).
+   > They would are the equivalent to ¹, ², and &am=
p;sup3;.
+   See also: http://www.w3.org/2003/entities/
+  --></div>
+
+  <p>This data is also available <a href=3Dentities.json>as =
a JSON file</a>.</p>
+
+  <p><i>The glyphs displayed above are non-normative. Refer =
to the Unicode specifications for formal
+  definitions of the characters listed above.</i></p>
+
+
+  <h2 id=3Dthe-xhtml-syntax><span class=3Dsecno>13 </span=
><dfn id=3Dxhtml>The XHTML syntax</dfn></h2>
+
+  <p class=3Dnote>This section only describes the rules for XML re=
sources. Rules for
+  <code><a href=3D#text/html>text/html</a></code&gt=
; resources are discussed in the section above entitled "<a href=3D=
#syntax>The HTML
+  syntax</a>".</p>
+
+
+  <div class=3Dimpl>
+
+  <h3 id=3Dwriting-xhtml-documents><span class=3Dsecno>13.1 =
</span>Writing XHTML documents</h3>
+
+  </div>
+
+  <p>The syntax for using HTML with XML, whether in XHTML document=
s or embedded in other XML
+  documents, is defined in the XML and Namespaces in XML specifications.=
 <a href=3D#refsXML>[XML]</a> <a href=3D#refsXMLNS>[XML=
NS]</a></p>
+
+  <p>This specification does not define any syntax-level requireme=
nts beyond those defined for XML
+  proper.</p>
+
+  <p>XML documents may contain a <code>DOCTYPE</code> =
if desired, but this is not required to
+  conform to this specification. This specification does not define a pu=
blic or system identifier,
+  nor provide a formal DTD.</p>
+
+  <p class=3Dnote>According to the XML specification, XML processo=
rs are not guaranteed to process
+  the external DTD subset referenced in the DOCTYPE. This means, for exa=
mple, that using <a href=3Dhttp://www.w3.org/TR/xml/#dt-entref>enti=
ty references</a> for characters in XHTML documents
+  is unsafe if they are defined in an external file (except for <code=
 title=3D""><</code>,
+  <code title=3D"">></code>, <code t=
itle=3D"">&</code>, <code title=3D&quot=
;">"</code>
+  and <code title=3D"">'</code>).<=
/p>
+
+
+  <div class=3Dimpl>
+
+  <h3 id=3Dparsing-xhtml-documents><span class=3Dsecno>13.2 =
</span>Parsing XHTML documents</h3>
+
+  <p>This section describes the relationship between XML and the D=
OM, with a particular emphasis on
+  how this interacts with HTML.</p>
+
+  <p>An <dfn id=3Dxml-parser>XML parser</dfn>, 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 c=
haracters into a
+  <code><a href=3D#document>Document</a></code> =
object.</p>
+
+  <p class=3Dnote>At the time of writing, no such rules actually e=
xist.</p>
+
+  <p>An <a href=3D#xml-parser>XML parser</a> is either=
 associated with a <code><a href=3D#document>Document</a&g=
t;</code> object when it is
+  created, or creates one implicitly.</p>
+
+  <p>This <code><a href=3D#document>Document</a>=
</code> must then be populated with DOM nodes that represent the tr=
ee
+  structure of the input passed to the parser, as defined by the XML spe=
cification, the Namespaces
+  in XML specification, and the DOM specification. DOM mutation events m=
ust not fire for the
+  operations that the <a href=3D#xml-parser>XML parser</a> p=
erforms on the <code><a href=3D#document>Document</a>&l=
t;/code>'s tree, but the
+  user agent must act as if elements and attributes were individually ap=
pended and set respectively
+  so as to trigger rules in this specification regarding what happens wh=
en an element is inserted
+  into a document or has its attributes set, and the DOM specification's=
 requirements regarding
+  mutation observers mean that mutation observers <em>are</em&g=
t; fired (unlike mutation events). <a href=3D#refsXML>[XML]</a&g=
t; <a href=3D#refsXMLNS>[XMLNS]</a> <a href=3D#refsDOM>=
[DOM]</a> <a href=3D#refsDOMEVENTS>[DOMEVENTS]</a></=
p>
+
+  <p>Between the time an element's start tag is parsed and the tim=
e either the element's end tag is
+  parsed or the parser detects a well-formedness error, the user agent m=
ust act as if the element
+  was in a <a href=3D#stack-of-open-elements>stack of open element=
s</a>.</p>
+
+  <p class=3Dnote>This is used by the <code><a href=3D#th=
e-object-element>object</a></code> element to avoid instan=
tiating plugins
+  before the <code><a href=3D#the-param-element>param</a&=
gt;</code> element children have been parsed.</p>
+
+  <p>This specification provides the following additional informat=
ion that user agents should use
+  when retrieving an external entity: the public identifiers given in th=
e following list all
+  correspond to <a href=3Ddata:application/xml-dtd;base64,PCFFTlRJVFk=
gVGFiICImI3g5OyI%2BPCFFTlRJVFkgTmV3TGluZSAiJiN4QTsiPjwhRU5USVRZIGV4Y2wgIi=
YjeDIxOyI%2BPCFFTlRJVFkgcXVvdCAiJiN4MjI7Ij48IUVOVElUWSBRVU9UICImI3gyMjsiP=
jwhRU5USVRZIG51bSAiJiN4MjM7Ij48IUVOVElUWSBkb2xsYXIgIiYjeDI0OyI%2BPCFFTlRJ=
VFkgcGVyY250ICImI3gyNTsiPjwhRU5USVRZIGFtcCAiJiN4MjY7Ij48IUVOVElUWSBBTVAgI=
iYjeDI2OyI%2BPCFFTlRJVFkgYXBvcyAiJiN4Mjc7Ij48IUVOVElUWSBscGFyICImI3gyODsi=
PjwhRU5USVRZIHJwYXIgIiYjeDI5OyI%2BPCFFTlRJVFkgYXN0ICImI3gyQTsiPjwhRU5USVR=
ZIG1pZGFzdCAiJiN4MkE7Ij48IUVOVElUWSBwbHVzICImI3gyQjsiPjwhRU5USVRZIGNvbW1h=
ICImI3gyQzsiPjwhRU5USVRZIHBlcmlvZCAiJiN4MkU7Ij48IUVOVElUWSBzb2wgIiYjeDJGO=
yI%2BPCFFTlRJVFkgY29sb24gIiYjeDNBOyI%2BPCFFTlRJVFkgc2VtaSAiJiN4M0I7Ij48IU=
VOVElUWSBsdCAiJiN4M0M7Ij48IUVOVElUWSBMVCAiJiN4M0M7Ij48IUVOVElUWSBudmx0ICI=
mI3gzQzsmI3gyMEQyOyI%2BPCFFTlRJVFkgZXF1YWxzICImI3gzRDsiPjwhRU5USVRZIGJuZS=
AiJiN4M0Q7JiN4MjBFNTsiPjwhRU5USVRZIGd0ICImI3gzRTsiPjwhRU5USVRZIEdUICImI3g=
zRTsiPjwhRU5USVRZIG52Z3QgIiYjeDNFOyYjeDIwRDI7Ij48IUVOVElUWSBxdWVzdCAiJiN4=
M0Y7Ij48IUVOVElUWSBjb21tYXQgIiYjeDQwOyI%2BPCFFTlRJVFkgbHNxYiAiJiN4NUI7Ij4=
8IUVOVElUWSBsYnJhY2sgIiYjeDVCOyI%2BPCFFTlRJVFkgYnNvbCAiJiN4NUM7Ij48IUVOVE=
lUWSByc3FiICImI3g1RDsiPjwhRU5USVRZIHJicmFjayAiJiN4NUQ7Ij48IUVOVElUWSBIYXQ=
gIiYjeDVFOyI%2BPCFFTlRJVFkgbG93YmFyICImI3g1RjsiPjwhRU5USVRZIFVuZGVyQmFyIC=
ImI3g1RjsiPjwhRU5USVRZIGdyYXZlICImI3g2MDsiPjwhRU5USVRZIERpYWNyaXRpY2FsR3J=
hdmUgIiYjeDYwOyI%2BPCFFTlRJVFkgZmpsaWcgIiYjeDY2OyYjeDZBOyI%2BPCFFTlRJVFkg=
bGN1YiAiJiN4N0I7Ij48IUVOVElUWSBsYnJhY2UgIiYjeDdCOyI%2BPCFFTlRJVFkgdmVyYmF=
yICImI3g3QzsiPjwhRU5USVRZIHZlcnQgIiYjeDdDOyI%2BPCFFTlRJVFkgVmVydGljYWxMaW=
5lICImI3g3QzsiPjwhRU5USVRZIHJjdWIgIiYjeDdEOyI%2BPCFFTlRJVFkgcmJyYWNlICImI=
3g3RDsiPjwhRU5USVRZIG5ic3AgIiYjeEEwOyI%2BPCFFTlRJVFkgTm9uQnJlYWtpbmdTcGFj=
ZSAiJiN4QTA7Ij48IUVOVElUWSBpZXhjbCAiJiN4QTE7Ij48IUVOVElUWSBjZW50ICImI3hBM=
jsiPjwhRU5USVRZIHBvdW5kICImI3hBMzsiPjwhRU5USVRZIGN1cnJlbiAiJiN4QTQ7Ij48IU=
VOVElUWSB5ZW4gIiYjeEE1OyI%2BPCFFTlRJVFkgYnJ2YmFyICImI3hBNjsiPjwhRU5USVRZI=
HNlY3QgIiYjeEE3OyI%2BPCFFTlRJVFkgRG90ICImI3hBODsiPjwhRU5USVRZIGRpZSAiJiN4=
QTg7Ij48IUVOVElUWSBEb3VibGVEb3QgIiYjeEE4OyI%2BPCFFTlRJVFkgdW1sICImI3hBODs=
iPjwhRU5USVRZIGNvcHkgIiYjeEE5OyI%2BPCFFTlRJVFkgQ09QWSAiJiN4QTk7Ij48IUVOVE=
lUWSBvcmRmICImI3hBQTsiPjwhRU5USVRZIGxhcXVvICImI3hBQjsiPjwhRU5USVRZIG5vdCA=
iJiN4QUM7Ij48IUVOVElUWSBzaHkgIiYjeEFEOyI%2BPCFFTlRJVFkgcmVnICImI3hBRTsiPj=
whRU5USVRZIGNpcmNsZWRSICImI3hBRTsiPjwhRU5USVRZIFJFRyAiJiN4QUU7Ij48IUVOVEl=
UWSBtYWNyICImI3hBRjsiPjwhRU5USVRZIHN0cm5zICImI3hBRjsiPjwhRU5USVRZIGRlZyAi=
JiN4QjA7Ij48IUVOVElUWSBwbHVzbW4gIiYjeEIxOyI%2BPCFFTlRJVFkgcG0gIiYjeEIxOyI=
%2BPCFFTlRJVFkgUGx1c01pbnVzICImI3hCMTsiPjwhRU5USVRZIHN1cDIgIiYjeEIyOyI%2B=
PCFFTlRJVFkgc3VwMyAiJiN4QjM7Ij48IUVOVElUWSBhY3V0ZSAiJiN4QjQ7Ij48IUVOVElUW=
SBEaWFjcml0aWNhbEFjdXRlICImI3hCNDsiPjwhRU5USVRZIG1pY3JvICImI3hCNTsiPjwhRU=
5USVRZIHBhcmEgIiYjeEI2OyI%2BPCFFTlRJVFkgbWlkZG90ICImI3hCNzsiPjwhRU5USVRZI=
GNlbnRlcmRvdCAiJiN4Qjc7Ij48IUVOVElUWSBDZW50ZXJEb3QgIiYjeEI3OyI%2BPCFFTlRJ=
VFkgY2VkaWwgIiYjeEI4OyI%2BPCFFTlRJVFkgQ2VkaWxsYSAiJiN4Qjg7Ij48IUVOVElUWSB=
zdXAxICImI3hCOTsiPjwhRU5USVRZIG9yZG0gIiYjeEJBOyI%2BPCFFTlRJVFkgcmFxdW8gIi=
YjeEJCOyI%2BPCFFTlRJVFkgZnJhYzE0ICImI3hCQzsiPjwhRU5USVRZIGZyYWMxMiAiJiN4Q=
kQ7Ij48IUVOVElUWSBoYWxmICImI3hCRDsiPjwhRU5USVRZIGZyYWMzNCAiJiN4QkU7Ij48IU=
VOVElUWSBpcXVlc3QgIiYjeEJGOyI%2BPCFFTlRJVFkgQWdyYXZlICImI3hDMDsiPjwhRU5US=
VRZIEFhY3V0ZSAiJiN4QzE7Ij48IUVOVElUWSBBY2lyYyAiJiN4QzI7Ij48IUVOVElUWSBBdG=
lsZGUgIiYjeEMzOyI%2BPCFFTlRJVFkgQXVtbCAiJiN4QzQ7Ij48IUVOVElUWSBBcmluZyAiJ=
iN4QzU7Ij48IUVOVElUWSBhbmdzdCAiJiN4QzU7Ij48IUVOVElUWSBBRWxpZyAiJiN4QzY7Ij=
48IUVOVElUWSBDY2VkaWwgIiYjeEM3OyI%2BPCFFTlRJVFkgRWdyYXZlICImI3hDODsiPjwhR=
U5USVRZIEVhY3V0ZSAiJiN4Qzk7Ij48IUVOVElUWSBFY2lyYyAiJiN4Q0E7Ij48IUVOVElUWS=
BFdW1sICImI3hDQjsiPjwhRU5USVRZIElncmF2ZSAiJiN4Q0M7Ij48IUVOVElUWSBJYWN1dGU=
gIiYjeENEOyI%2BPCFFTlRJVFkgSWNpcmMgIiYjeENFOyI%2BPCFFTlRJVFkgSXVtbCAiJiN4=
Q0Y7Ij48IUVOVElUWSBFVEggIiYjeEQwOyI%2BPCFFTlRJVFkgTnRpbGRlICImI3hEMTsiPjw=
hRU5USVRZIE9ncmF2ZSAiJiN4RDI7Ij48IUVOVElUWSBPYWN1dGUgIiYjeEQzOyI%2BPCFFTl=
RJVFkgT2NpcmMgIiYjeEQ0OyI%2BPCFFTlRJVFkgT3RpbGRlICImI3hENTsiPjwhRU5USVRZI=
E91bWwgIiYjeEQ2OyI%2BPCFFTlRJVFkgdGltZXMgIiYjeEQ3OyI%2BPCFFTlRJVFkgT3NsYX=
NoICImI3hEODsiPjwhRU5USVRZIFVncmF2ZSAiJiN4RDk7Ij48IUVOVElUWSBVYWN1dGUgIiY=
jeERBOyI%2BPCFFTlRJVFkgVWNpcmMgIiYjeERCOyI%2BPCFFTlRJVFkgVXVtbCAiJiN4REM7=
Ij48IUVOVElUWSBZYWN1dGUgIiYjeEREOyI%2BPCFFTlRJVFkgVEhPUk4gIiYjeERFOyI%2BP=
CFFTlRJVFkgc3psaWcgIiYjeERGOyI%2BPCFFTlRJVFkgYWdyYXZlICImI3hFMDsiPjwhRU5U=
SVRZIGFhY3V0ZSAiJiN4RTE7Ij48IUVOVElUWSBhY2lyYyAiJiN4RTI7Ij48IUVOVElUWSBhd=
GlsZGUgIiYjeEUzOyI%2BPCFFTlRJVFkgYXVtbCAiJiN4RTQ7Ij48IUVOVElUWSBhcmluZyAi=
JiN4RTU7Ij48IUVOVElUWSBhZWxpZyAiJiN4RTY7Ij48IUVOVElUWSBjY2VkaWwgIiYjeEU3O=
yI%2BPCFFTlRJVFkgZWdyYXZlICImI3hFODsiPjwhRU5USVRZIGVhY3V0ZSAiJiN4RTk7Ij48=
IUVOVElUWSBlY2lyYyAiJiN4RUE7Ij48IUVOVElUWSBldW1sICImI3hFQjsiPjwhRU5USVRZI=
GlncmF2ZSAiJiN4RUM7Ij48IUVOVElUWSBpYWN1dGUgIiYjeEVEOyI%2BPCFFTlRJVFkgaWNp=
cmMgIiYjeEVFOyI%2BPCFFTlRJVFkgaXVtbCAiJiN4RUY7Ij48IUVOVElUWSBldGggIiYjeEY=
wOyI%2BPCFFTlRJVFkgbnRpbGRlICImI3hGMTsiPjwhRU5USVRZIG9ncmF2ZSAiJiN4RjI7Ij=
48IUVOVElUWSBvYWN1dGUgIiYjeEYzOyI%2BPCFFTlRJVFkgb2NpcmMgIiYjeEY0OyI%2BPCF=
FTlRJVFkgb3RpbGRlICImI3hGNTsiPjwhRU5USVRZIG91bWwgIiYjeEY2OyI%2BPCFFTlRJVF=
kgZGl2aWRlICImI3hGNzsiPjwhRU5USVRZIGRpdiAiJiN4Rjc7Ij48IUVOVElUWSBvc2xhc2g=
gIiYjeEY4OyI%2BPCFFTlRJVFkgdWdyYXZlICImI3hGOTsiPjwhRU5USVRZIHVhY3V0ZSAiJi=
N4RkE7Ij48IUVOVElUWSB1Y2lyYyAiJiN4RkI7Ij48IUVOVElUWSB1dW1sICImI3hGQzsiPjw=
hRU5USVRZIHlhY3V0ZSAiJiN4RkQ7Ij48IUVOVElUWSB0aG9ybiAiJiN4RkU7Ij48IUVOVElU=
WSB5dW1sICImI3hGRjsiPjwhRU5USVRZIEFtYWNyICImI3gxMDA7Ij48IUVOVElUWSBhbWFjc=
iAiJiN4MTAxOyI%2BPCFFTlRJVFkgQWJyZXZlICImI3gxMDI7Ij48IUVOVElUWSBhYnJldmUg=
IiYjeDEwMzsiPjwhRU5USVRZIEFvZ29uICImI3gxMDQ7Ij48IUVOVElUWSBhb2dvbiAiJiN4M=
TA1OyI%2BPCFFTlRJVFkgQ2FjdXRlICImI3gxMDY7Ij48IUVOVElUWSBjYWN1dGUgIiYjeDEw=
NzsiPjwhRU5USVRZIENjaXJjICImI3gxMDg7Ij48IUVOVElUWSBjY2lyYyAiJiN4MTA5OyI%2=
BPCFFTlRJVFkgQ2RvdCAiJiN4MTBBOyI%2BPCFFTlRJVFkgY2RvdCAiJiN4MTBCOyI%2BPCFF=
TlRJVFkgQ2Nhcm9uICImI3gxMEM7Ij48IUVOVElUWSBjY2Fyb24gIiYjeDEwRDsiPjwhRU5US=
VRZIERjYXJvbiAiJiN4MTBFOyI%2BPCFFTlRJVFkgZGNhcm9uICImI3gxMEY7Ij48IUVOVElU=
WSBEc3Ryb2sgIiYjeDExMDsiPjwhRU5USVRZIGRzdHJvayAiJiN4MTExOyI%2BPCFFTlRJVFk=
gRW1hY3IgIiYjeDExMjsiPjwhRU5USVRZIGVtYWNyICImI3gxMTM7Ij48IUVOVElUWSBFZG90=
ICImI3gxMTY7Ij48IUVOVElUWSBlZG90ICImI3gxMTc7Ij48IUVOVElUWSBFb2dvbiAiJiN4M=
TE4OyI%2BPCFFTlRJVFkgZW9nb24gIiYjeDExOTsiPjwhRU5USVRZIEVjYXJvbiAiJiN4MTFB=
OyI%2BPCFFTlRJVFkgZWNhcm9uICImI3gxMUI7Ij48IUVOVElUWSBHY2lyYyAiJiN4MTFDOyI=
%2BPCFFTlRJVFkgZ2NpcmMgIiYjeDExRDsiPjwhRU5USVRZIEdicmV2ZSAiJiN4MTFFOyI%2B=
PCFFTlRJVFkgZ2JyZXZlICImI3gxMUY7Ij48IUVOVElUWSBHZG90ICImI3gxMjA7Ij48IUVOV=
ElUWSBnZG90ICImI3gxMjE7Ij48IUVOVElUWSBHY2VkaWwgIiYjeDEyMjsiPjwhRU5USVRZIE=
hjaXJjICImI3gxMjQ7Ij48IUVOVElUWSBoY2lyYyAiJiN4MTI1OyI%2BPCFFTlRJVFkgSHN0c=
m9rICImI3gxMjY7Ij48IUVOVElUWSBoc3Ryb2sgIiYjeDEyNzsiPjwhRU5USVRZIEl0aWxkZS=
AiJiN4MTI4OyI%2BPCFFTlRJVFkgaXRpbGRlICImI3gxMjk7Ij48IUVOVElUWSBJbWFjciAiJ=
iN4MTJBOyI%2BPCFFTlRJVFkgaW1hY3IgIiYjeDEyQjsiPjwhRU5USVRZIElvZ29uICImI3gx=
MkU7Ij48IUVOVElUWSBpb2dvbiAiJiN4MTJGOyI%2BPCFFTlRJVFkgSWRvdCAiJiN4MTMwOyI=
%2BPCFFTlRJVFkgaW1hdGggIiYjeDEzMTsiPjwhRU5USVRZIGlub2RvdCAiJiN4MTMxOyI%2B=
PCFFTlRJVFkgSUpsaWcgIiYjeDEzMjsiPjwhRU5USVRZIGlqbGlnICImI3gxMzM7Ij48IUVOV=
ElUWSBKY2lyYyAiJiN4MTM0OyI%2BPCFFTlRJVFkgamNpcmMgIiYjeDEzNTsiPjwhRU5USVRZ=
IEtjZWRpbCAiJiN4MTM2OyI%2BPCFFTlRJVFkga2NlZGlsICImI3gxMzc7Ij48IUVOVElUWSB=
rZ3JlZW4gIiYjeDEzODsiPjwhRU5USVRZIExhY3V0ZSAiJiN4MTM5OyI%2BPCFFTlRJVFkgbG=
FjdXRlICImI3gxM0E7Ij48IUVOVElUWSBMY2VkaWwgIiYjeDEzQjsiPjwhRU5USVRZIGxjZWR=
pbCAiJiN4MTNDOyI%2BPCFFTlRJVFkgTGNhcm9uICImI3gxM0Q7Ij48IUVOVElUWSBsY2Fyb2=
4gIiYjeDEzRTsiPjwhRU5USVRZIExtaWRvdCAiJiN4MTNGOyI%2BPCFFTlRJVFkgbG1pZG90I=
CImI3gxNDA7Ij48IUVOVElUWSBMc3Ryb2sgIiYjeDE0MTsiPjwhRU5USVRZIGxzdHJvayAiJi=
N4MTQyOyI%2BPCFFTlRJVFkgTmFjdXRlICImI3gxNDM7Ij48IUVOVElUWSBuYWN1dGUgIiYje=
DE0NDsiPjwhRU5USVRZIE5jZWRpbCAiJiN4MTQ1OyI%2BPCFFTlRJVFkgbmNlZGlsICImI3gx=
NDY7Ij48IUVOVElUWSBOY2Fyb24gIiYjeDE0NzsiPjwhRU5USVRZIG5jYXJvbiAiJiN4MTQ4O=
yI%2BPCFFTlRJVFkgbmFwb3MgIiYjeDE0OTsiPjwhRU5USVRZIEVORyAiJiN4MTRBOyI%2BPC=
FFTlRJVFkgZW5nICImI3gxNEI7Ij48IUVOVElUWSBPbWFjciAiJiN4MTRDOyI%2BPCFFTlRJV=
Fkgb21hY3IgIiYjeDE0RDsiPjwhRU5USVRZIE9kYmxhYyAiJiN4MTUwOyI%2BPCFFTlRJVFkg=
b2RibGFjICImI3gxNTE7Ij48IUVOVElUWSBPRWxpZyAiJiN4MTUyOyI%2BPCFFTlRJVFkgb2V=
saWcgIiYjeDE1MzsiPjwhRU5USVRZIFJhY3V0ZSAiJiN4MTU0OyI%2BPCFFTlRJVFkgcmFjdX=
RlICImI3gxNTU7Ij48IUVOVElUWSBSY2VkaWwgIiYjeDE1NjsiPjwhRU5USVRZIHJjZWRpbCA=
iJiN4MTU3OyI%2BPCFFTlRJVFkgUmNhcm9uICImI3gxNTg7Ij48IUVOVElUWSByY2Fyb24gIi=
YjeDE1OTsiPjwhRU5USVRZIFNhY3V0ZSAiJiN4MTVBOyI%2BPCFFTlRJVFkgc2FjdXRlICImI=
3gxNUI7Ij48IUVOVElUWSBTY2lyYyAiJiN4MTVDOyI%2BPCFFTlRJVFkgc2NpcmMgIiYjeDE1=
RDsiPjwhRU5USVRZIFNjZWRpbCAiJiN4MTVFOyI%2BPCFFTlRJVFkgc2NlZGlsICImI3gxNUY=
7Ij48IUVOVElUWSBTY2Fyb24gIiYjeDE2MDsiPjwhRU5USVRZIHNjYXJvbiAiJiN4MTYxOyI%=
2BPCFFTlRJVFkgVGNlZGlsICImI3gxNjI7Ij48IUVOVElUWSB0Y2VkaWwgIiYjeDE2MzsiPjw=
hRU5USVRZIFRjYXJvbiAiJiN4MTY0OyI%2BPCFFTlRJVFkgdGNhcm9uICImI3gxNjU7Ij48IU=
VOVElUWSBUc3Ryb2sgIiYjeDE2NjsiPjwhRU5USVRZIHRzdHJvayAiJiN4MTY3OyI%2BPCFFT=
lRJVFkgVXRpbGRlICImI3gxNjg7Ij48IUVOVElUWSB1dGlsZGUgIiYjeDE2OTsiPjwhRU5USV=
RZIFVtYWNyICImI3gxNkE7Ij48IUVOVElUWSB1bWFjciAiJiN4MTZCOyI%2BPCFFTlRJVFkgV=
WJyZXZlICImI3gxNkM7Ij48IUVOVElUWSB1YnJldmUgIiYjeDE2RDsiPjwhRU5USVRZIFVyaW=
5nICImI3gxNkU7Ij48IUVOVElUWSB1cmluZyAiJiN4MTZGOyI%2BPCFFTlRJVFkgVWRibGFjI=
CImI3gxNzA7Ij48IUVOVElUWSB1ZGJsYWMgIiYjeDE3MTsiPjwhRU5USVRZIFVvZ29uICImI3=
gxNzI7Ij48IUVOVElUWSB1b2dvbiAiJiN4MTczOyI%2BPCFFTlRJVFkgV2NpcmMgIiYjeDE3N=
DsiPjwhRU5USVRZIHdjaXJjICImI3gxNzU7Ij48IUVOVElUWSBZY2lyYyAiJiN4MTc2OyI%2B=
PCFFTlRJVFkgeWNpcmMgIiYjeDE3NzsiPjwhRU5USVRZIFl1bWwgIiYjeDE3ODsiPjwhRU5US=
VRZIFphY3V0ZSAiJiN4MTc5OyI%2BPCFFTlRJVFkgemFjdXRlICImI3gxN0E7Ij48IUVOVElU=
WSBaZG90ICImI3gxN0I7Ij48IUVOVElUWSB6ZG90ICImI3gxN0M7Ij48IUVOVElUWSBaY2Fyb=
24gIiYjeDE3RDsiPjwhRU5USVRZIHpjYXJvbiAiJiN4MTdFOyI%2BPCFFTlRJVFkgZm5vZiAi=
JiN4MTkyOyI%2BPCFFTlRJVFkgaW1wZWQgIiYjeDFCNTsiPjwhRU5USVRZIGdhY3V0ZSAiJiN=
4MUY1OyI%2BPCFFTlRJVFkgam1hdGggIiYjeDIzNzsiPjwhRU5USVRZIGNpcmMgIiYjeDJDNj=
siPjwhRU5USVRZIGNhcm9uICImI3gyQzc7Ij48IUVOVElUWSBIYWNlayAiJiN4MkM3OyI%2BP=
CFFTlRJVFkgYnJldmUgIiYjeDJEODsiPjwhRU5USVRZIEJyZXZlICImI3gyRDg7Ij48IUVOVE=
lUWSBkb3QgIiYjeDJEOTsiPjwhRU5USVRZIERpYWNyaXRpY2FsRG90ICImI3gyRDk7Ij48IUV=
OVElUWSByaW5nICImI3gyREE7Ij48IUVOVElUWSBvZ29uICImI3gyREI7Ij48IUVOVElUWSB0=
aWxkZSAiJiN4MkRDOyI%2BPCFFTlRJVFkgRGlhY3JpdGljYWxUaWxkZSAiJiN4MkRDOyI%2BP=
CFFTlRJVFkgZGJsYWMgIiYjeDJERDsiPjwhRU5USVRZIERpYWNyaXRpY2FsRG91YmxlQWN1dG=
UgIiYjeDJERDsiPjwhRU5USVRZIERvd25CcmV2ZSAiJiN4MzExOyI%2BPCFFTlRJVFkgQWxwa=
GEgIiYjeDM5MTsiPjwhRU5USVRZIEJldGEgIiYjeDM5MjsiPjwhRU5USVRZIEdhbW1hICImI3=
gzOTM7Ij48IUVOVElUWSBEZWx0YSAiJiN4Mzk0OyI%2BPCFFTlRJVFkgRXBzaWxvbiAiJiN4M=
zk1OyI%2BPCFFTlRJVFkgWmV0YSAiJiN4Mzk2OyI%2BPCFFTlRJVFkgRXRhICImI3gzOTc7Ij=
48IUVOVElUWSBUaGV0YSAiJiN4Mzk4OyI%2BPCFFTlRJVFkgSW90YSAiJiN4Mzk5OyI%2BPCF=
FTlRJVFkgS2FwcGEgIiYjeDM5QTsiPjwhRU5USVRZIExhbWJkYSAiJiN4MzlCOyI%2BPCFFTl=
RJVFkgTXUgIiYjeDM5QzsiPjwhRU5USVRZIE51ICImI3gzOUQ7Ij48IUVOVElUWSBYaSAiJiN=
4MzlFOyI%2BPCFFTlRJVFkgT21pY3JvbiAiJiN4MzlGOyI%2BPCFFTlRJVFkgUGkgIiYjeDNB=
MDsiPjwhRU5USVRZIFJobyAiJiN4M0ExOyI%2BPCFFTlRJVFkgU2lnbWEgIiYjeDNBMzsiPjw=
hRU5USVRZIFRhdSAiJiN4M0E0OyI%2BPCFFTlRJVFkgVXBzaWxvbiAiJiN4M0E1OyI%2BPCFF=
TlRJVFkgUGhpICImI3gzQTY7Ij48IUVOVElUWSBDaGkgIiYjeDNBNzsiPjwhRU5USVRZIFBza=
SAiJiN4M0E4OyI%2BPCFFTlRJVFkgT21lZ2EgIiYjeDNBOTsiPjwhRU5USVRZIG9obSAiJiN4=
M0E5OyI%2BPCFFTlRJVFkgYWxwaGEgIiYjeDNCMTsiPjwhRU5USVRZIGJldGEgIiYjeDNCMjs=
iPjwhRU5USVRZIGdhbW1hICImI3gzQjM7Ij48IUVOVElUWSBkZWx0YSAiJiN4M0I0OyI%2BPC=
FFTlRJVFkgZXBzaSAiJiN4M0I1OyI%2BPCFFTlRJVFkgZXBzaWxvbiAiJiN4M0I1OyI%2BPCF=
FTlRJVFkgemV0YSAiJiN4M0I2OyI%2BPCFFTlRJVFkgZXRhICImI3gzQjc7Ij48IUVOVElUWS=
B0aGV0YSAiJiN4M0I4OyI%2BPCFFTlRJVFkgaW90YSAiJiN4M0I5OyI%2BPCFFTlRJVFkga2F=
wcGEgIiYjeDNCQTsiPjwhRU5USVRZIGxhbWJkYSAiJiN4M0JCOyI%2BPCFFTlRJVFkgbXUgIi=
YjeDNCQzsiPjwhRU5USVRZIG51ICImI3gzQkQ7Ij48IUVOVElUWSB4aSAiJiN4M0JFOyI%2BP=
CFFTlRJVFkgb21pY3JvbiAiJiN4M0JGOyI%2BPCFFTlRJVFkgcGkgIiYjeDNDMDsiPjwhRU5U=
SVRZIHJobyAiJiN4M0MxOyI%2BPCFFTlRJVFkgc2lnbWF2ICImI3gzQzI7Ij48IUVOVElUWSB=
2YXJzaWdtYSAiJiN4M0MyOyI%2BPCFFTlRJVFkgc2lnbWFmICImI3gzQzI7Ij48IUVOVElUWS=
BzaWdtYSAiJiN4M0MzOyI%2BPCFFTlRJVFkgdGF1ICImI3gzQzQ7Ij48IUVOVElUWSB1cHNpI=
CImI3gzQzU7Ij48IUVOVElUWSB1cHNpbG9uICImI3gzQzU7Ij48IUVOVElUWSBwaGkgIiYjeD=
NDNjsiPjwhRU5USVRZIGNoaSAiJiN4M0M3OyI%2BPCFFTlRJVFkgcHNpICImI3gzQzg7Ij48I=
UVOVElUWSBvbWVnYSAiJiN4M0M5OyI%2BPCFFTlRJVFkgdGhldGF2ICImI3gzRDE7Ij48IUVO=
VElUWSB2YXJ0aGV0YSAiJiN4M0QxOyI%2BPCFFTlRJVFkgdGhldGFzeW0gIiYjeDNEMTsiPjw=
hRU5USVRZIFVwc2kgIiYjeDNEMjsiPjwhRU5USVRZIHVwc2loICImI3gzRDI7Ij48IUVOVElU=
WSBzdHJhaWdodHBoaSAiJiN4M0Q1OyI%2BPCFFTlRJVFkgcGhpdiAiJiN4M0Q1OyI%2BPCFFT=
lRJVFkgdmFycGhpICImI3gzRDU7Ij48IUVOVElUWSBwaXYgIiYjeDNENjsiPjwhRU5USVRZIH=
ZhcnBpICImI3gzRDY7Ij48IUVOVElUWSBHYW1tYWQgIiYjeDNEQzsiPjwhRU5USVRZIGdhbW1=
hZCAiJiN4M0REOyI%2BPCFFTlRJVFkgZGlnYW1tYSAiJiN4M0REOyI%2BPCFFTlRJVFkga2Fw=
cGF2ICImI3gzRjA7Ij48IUVOVElUWSB2YXJrYXBwYSAiJiN4M0YwOyI%2BPCFFTlRJVFkgcmh=
vdiAiJiN4M0YxOyI%2BPCFFTlRJVFkgdmFycmhvICImI3gzRjE7Ij48IUVOVElUWSBlcHNpdi=
AiJiN4M0Y1OyI%2BPCFFTlRJVFkgc3RyYWlnaHRlcHNpbG9uICImI3gzRjU7Ij48IUVOVElUW=
SB2YXJlcHNpbG9uICImI3gzRjU7Ij48IUVOVElUWSBiZXBzaSAiJiN4M0Y2OyI%2BPCFFTlRJ=
VFkgYmFja2Vwc2lsb24gIiYjeDNGNjsiPjwhRU5USVRZIElPY3kgIiYjeDQwMTsiPjwhRU5US=
VRZIERKY3kgIiYjeDQwMjsiPjwhRU5USVRZIEdKY3kgIiYjeDQwMzsiPjwhRU5USVRZIEp1a2=
N5ICImI3g0MDQ7Ij48IUVOVElUWSBEU2N5ICImI3g0MDU7Ij48IUVOVElUWSBJdWtjeSAiJiN=
4NDA2OyI%2BPCFFTlRJVFkgWUljeSAiJiN4NDA3OyI%2BPCFFTlRJVFkgSnNlcmN5ICImI3g0=
MDg7Ij48IUVOVElUWSBMSmN5ICImI3g0MDk7Ij48IUVOVElUWSBOSmN5ICImI3g0MEE7Ij48I=
UVOVElUWSBUU0hjeSAiJiN4NDBCOyI%2BPCFFTlRJVFkgS0pjeSAiJiN4NDBDOyI%2BPCFFTl=
RJVFkgVWJyY3kgIiYjeDQwRTsiPjwhRU5USVRZIERaY3kgIiYjeDQwRjsiPjwhRU5USVRZIEF=
jeSAiJiN4NDEwOyI%2BPCFFTlRJVFkgQmN5ICImI3g0MTE7Ij48IUVOVElUWSBWY3kgIiYjeD=
QxMjsiPjwhRU5USVRZIEdjeSAiJiN4NDEzOyI%2BPCFFTlRJVFkgRGN5ICImI3g0MTQ7Ij48I=
UVOVElUWSBJRWN5ICImI3g0MTU7Ij48IUVOVElUWSBaSGN5ICImI3g0MTY7Ij48IUVOVElUWS=
BaY3kgIiYjeDQxNzsiPjwhRU5USVRZIEljeSAiJiN4NDE4OyI%2BPCFFTlRJVFkgSmN5ICImI=
3g0MTk7Ij48IUVOVElUWSBLY3kgIiYjeDQxQTsiPjwhRU5USVRZIExjeSAiJiN4NDFCOyI%2B=
PCFFTlRJVFkgTWN5ICImI3g0MUM7Ij48IUVOVElUWSBOY3kgIiYjeDQxRDsiPjwhRU5USVRZI=
E9jeSAiJiN4NDFFOyI%2BPCFFTlRJVFkgUGN5ICImI3g0MUY7Ij48IUVOVElUWSBSY3kgIiYj=
eDQyMDsiPjwhRU5USVRZIFNjeSAiJiN4NDIxOyI%2BPCFFTlRJVFkgVGN5ICImI3g0MjI7Ij4=
8IUVOVElUWSBVY3kgIiYjeDQyMzsiPjwhRU5USVRZIEZjeSAiJiN4NDI0OyI%2BPCFFTlRJVF=
kgS0hjeSAiJiN4NDI1OyI%2BPCFFTlRJVFkgVFNjeSAiJiN4NDI2OyI%2BPCFFTlRJVFkgQ0h=
jeSAiJiN4NDI3OyI%2BPCFFTlRJVFkgU0hjeSAiJiN4NDI4OyI%2BPCFFTlRJVFkgU0hDSGN5=
ICImI3g0Mjk7Ij48IUVOVElUWSBIQVJEY3kgIiYjeDQyQTsiPjwhRU5USVRZIFljeSAiJiN4N=
DJCOyI%2BPCFFTlRJVFkgU09GVGN5ICImI3g0MkM7Ij48IUVOVElUWSBFY3kgIiYjeDQyRDsi=
PjwhRU5USVRZIFlVY3kgIiYjeDQyRTsiPjwhRU5USVRZIFlBY3kgIiYjeDQyRjsiPjwhRU5US=
VRZIGFjeSAiJiN4NDMwOyI%2BPCFFTlRJVFkgYmN5ICImI3g0MzE7Ij48IUVOVElUWSB2Y3kg=
IiYjeDQzMjsiPjwhRU5USVRZIGdjeSAiJiN4NDMzOyI%2BPCFFTlRJVFkgZGN5ICImI3g0MzQ=
7Ij48IUVOVElUWSBpZWN5ICImI3g0MzU7Ij48IUVOVElUWSB6aGN5ICImI3g0MzY7Ij48IUVO=
VElUWSB6Y3kgIiYjeDQzNzsiPjwhRU5USVRZIGljeSAiJiN4NDM4OyI%2BPCFFTlRJVFkgamN=
5ICImI3g0Mzk7Ij48IUVOVElUWSBrY3kgIiYjeDQzQTsiPjwhRU5USVRZIGxjeSAiJiN4NDNC=
OyI%2BPCFFTlRJVFkgbWN5ICImI3g0M0M7Ij48IUVOVElUWSBuY3kgIiYjeDQzRDsiPjwhRU5=
USVRZIG9jeSAiJiN4NDNFOyI%2BPCFFTlRJVFkgcGN5ICImI3g0M0Y7Ij48IUVOVElUWSByY3=
kgIiYjeDQ0MDsiPjwhRU5USVRZIHNjeSAiJiN4NDQxOyI%2BPCFFTlRJVFkgdGN5ICImI3g0N=
DI7Ij48IUVOVElUWSB1Y3kgIiYjeDQ0MzsiPjwhRU5USVRZIGZjeSAiJiN4NDQ0OyI%2BPCFF=
TlRJVFkga2hjeSAiJiN4NDQ1OyI%2BPCFFTlRJVFkgdHNjeSAiJiN4NDQ2OyI%2BPCFFTlRJV=
FkgY2hjeSAiJiN4NDQ3OyI%2BPCFFTlRJVFkgc2hjeSAiJiN4NDQ4OyI%2BPCFFTlRJVFkgc2=
hjaGN5ICImI3g0NDk7Ij48IUVOVElUWSBoYXJkY3kgIiYjeDQ0QTsiPjwhRU5USVRZIHljeSA=
iJiN4NDRCOyI%2BPCFFTlRJVFkgc29mdGN5ICImI3g0NEM7Ij48IUVOVElUWSBlY3kgIiYjeD=
Q0RDsiPjwhRU5USVRZIHl1Y3kgIiYjeDQ0RTsiPjwhRU5USVRZIHlhY3kgIiYjeDQ0RjsiPjw=
hRU5USVRZIGlvY3kgIiYjeDQ1MTsiPjwhRU5USVRZIGRqY3kgIiYjeDQ1MjsiPjwhRU5USVRZ=
IGdqY3kgIiYjeDQ1MzsiPjwhRU5USVRZIGp1a2N5ICImI3g0NTQ7Ij48IUVOVElUWSBkc2N5I=
CImI3g0NTU7Ij48IUVOVElUWSBpdWtjeSAiJiN4NDU2OyI%2BPCFFTlRJVFkgeWljeSAiJiN4=
NDU3OyI%2BPCFFTlRJVFkganNlcmN5ICImI3g0NTg7Ij48IUVOVElUWSBsamN5ICImI3g0NTk=
7Ij48IUVOVElUWSBuamN5ICImI3g0NUE7Ij48IUVOVElUWSB0c2hjeSAiJiN4NDVCOyI%2BPC=
FFTlRJVFkga2pjeSAiJiN4NDVDOyI%2BPCFFTlRJVFkgdWJyY3kgIiYjeDQ1RTsiPjwhRU5US=
VRZIGR6Y3kgIiYjeDQ1RjsiPjwhRU5USVRZIGVuc3AgIiYjeDIwMDI7Ij48IUVOVElUWSBlbX=
NwICImI3gyMDAzOyI%2BPCFFTlRJVFkgZW1zcDEzICImI3gyMDA0OyI%2BPCFFTlRJVFkgZW1=
zcDE0ICImI3gyMDA1OyI%2BPCFFTlRJVFkgbnVtc3AgIiYjeDIwMDc7Ij48IUVOVElUWSBwdW=
5jc3AgIiYjeDIwMDg7Ij48IUVOVElUWSB0aGluc3AgIiYjeDIwMDk7Ij48IUVOVElUWSBUaGl=
uU3BhY2UgIiYjeDIwMDk7Ij48IUVOVElUWSBoYWlyc3AgIiYjeDIwMEE7Ij48IUVOVElUWSBW=
ZXJ5VGhpblNwYWNlICImI3gyMDBBOyI%2BPCFFTlRJVFkgWmVyb1dpZHRoU3BhY2UgIiYjeDI=
wMEI7Ij48IUVOVElUWSBOZWdhdGl2ZVZlcnlUaGluU3BhY2UgIiYjeDIwMEI7Ij48IUVOVElU=
WSBOZWdhdGl2ZVRoaW5TcGFjZSAiJiN4MjAwQjsiPjwhRU5USVRZIE5lZ2F0aXZlTWVkaXVtU=
3BhY2UgIiYjeDIwMEI7Ij48IUVOVElUWSBOZWdhdGl2ZVRoaWNrU3BhY2UgIiYjeDIwMEI7Ij=
48IUVOVElUWSB6d25qICImI3gyMDBDOyI%2BPCFFTlRJVFkgendqICImI3gyMDBEOyI%2BPCF=
FTlRJVFkgbHJtICImI3gyMDBFOyI%2BPCFFTlRJVFkgcmxtICImI3gyMDBGOyI%2BPCFFTlRJ=
VFkgaHlwaGVuICImI3gyMDEwOyI%2BPCFFTlRJVFkgZGFzaCAiJiN4MjAxMDsiPjwhRU5USVR=
ZIG5kYXNoICImI3gyMDEzOyI%2BPCFFTlRJVFkgbWRhc2ggIiYjeDIwMTQ7Ij48IUVOVElUWS=
Bob3JiYXIgIiYjeDIwMTU7Ij48IUVOVElUWSBWZXJiYXIgIiYjeDIwMTY7Ij48IUVOVElUWSB=
WZXJ0ICImI3gyMDE2OyI%2BPCFFTlRJVFkgbHNxdW8gIiYjeDIwMTg7Ij48IUVOVElUWSBPcG=
VuQ3VybHlRdW90ZSAiJiN4MjAxODsiPjwhRU5USVRZIHJzcXVvICImI3gyMDE5OyI%2BPCFFT=
lRJVFkgcnNxdW9yICImI3gyMDE5OyI%2BPCFFTlRJVFkgQ2xvc2VDdXJseVF1b3RlICImI3gy=
MDE5OyI%2BPCFFTlRJVFkgbHNxdW9yICImI3gyMDFBOyI%2BPCFFTlRJVFkgc2JxdW8gIiYje=
DIwMUE7Ij48IUVOVElUWSBsZHF1byAiJiN4MjAxQzsiPjwhRU5USVRZIE9wZW5DdXJseURvdW=
JsZVF1b3RlICImI3gyMDFDOyI%2BPCFFTlRJVFkgcmRxdW8gIiYjeDIwMUQ7Ij48IUVOVElUW=
SByZHF1b3IgIiYjeDIwMUQ7Ij48IUVOVElUWSBDbG9zZUN1cmx5RG91YmxlUXVvdGUgIiYjeD=
IwMUQ7Ij48IUVOVElUWSBsZHF1b3IgIiYjeDIwMUU7Ij48IUVOVElUWSBiZHF1byAiJiN4MjA=
xRTsiPjwhRU5USVRZIGRhZ2dlciAiJiN4MjAyMDsiPjwhRU5USVRZIERhZ2dlciAiJiN4MjAy=
MTsiPjwhRU5USVRZIGRkYWdnZXIgIiYjeDIwMjE7Ij48IUVOVElUWSBidWxsICImI3gyMDIyO=
yI%2BPCFFTlRJVFkgYnVsbGV0ICImI3gyMDIyOyI%2BPCFFTlRJVFkgbmxkciAiJiN4MjAyNT=
siPjwhRU5USVRZIGhlbGxpcCAiJiN4MjAyNjsiPjwhRU5USVRZIG1sZHIgIiYjeDIwMjY7Ij4=
8IUVOVElUWSBwZXJtaWwgIiYjeDIwMzA7Ij48IUVOVElUWSBwZXJ0ZW5rICImI3gyMDMxOyI%=
2BPCFFTlRJVFkgcHJpbWUgIiYjeDIwMzI7Ij48IUVOVElUWSBQcmltZSAiJiN4MjAzMzsiPjw=
hRU5USVRZIHRwcmltZSAiJiN4MjAzNDsiPjwhRU5USVRZIGJwcmltZSAiJiN4MjAzNTsiPjwh=
RU5USVRZIGJhY2twcmltZSAiJiN4MjAzNTsiPjwhRU5USVRZIGxzYXF1byAiJiN4MjAzOTsiP=
jwhRU5USVRZIHJzYXF1byAiJiN4MjAzQTsiPjwhRU5USVRZIG9saW5lICImI3gyMDNFOyI%2B=
PCFFTlRJVFkgT3ZlckJhciAiJiN4MjAzRTsiPjwhRU5USVRZIGNhcmV0ICImI3gyMDQxOyI%2=
BPCFFTlRJVFkgaHlidWxsICImI3gyMDQzOyI%2BPCFFTlRJVFkgZnJhc2wgIiYjeDIwNDQ7Ij=
48IUVOVElUWSBic2VtaSAiJiN4MjA0RjsiPjwhRU5USVRZIHFwcmltZSAiJiN4MjA1NzsiPjw=
hRU5USVRZIE1lZGl1bVNwYWNlICImI3gyMDVGOyI%2BPCFFTlRJVFkgVGhpY2tTcGFjZSAiJi=
N4MjA1RjsmI3gyMDBBOyI%2BPCFFTlRJVFkgTm9CcmVhayAiJiN4MjA2MDsiPjwhRU5USVRZI=
EFwcGx5RnVuY3Rpb24gIiYjeDIwNjE7Ij48IUVOVElUWSBhZiAiJiN4MjA2MTsiPjwhRU5USV=
RZIEludmlzaWJsZVRpbWVzICImI3gyMDYyOyI%2BPCFFTlRJVFkgaXQgIiYjeDIwNjI7Ij48I=
UVOVElUWSBJbnZpc2libGVDb21tYSAiJiN4MjA2MzsiPjwhRU5USVRZIGljICImI3gyMDYzOy=
I%2BPCFFTlRJVFkgZXVybyAiJiN4MjBBQzsiPjwhRU5USVRZIHRkb3QgIiYjeDIwREI7Ij48I=
UVOVElUWSBUcmlwbGVEb3QgIiYjeDIwREI7Ij48IUVOVElUWSBEb3REb3QgIiYjeDIwREM7Ij=
48IUVOVElUWSBDb3BmICImI3gyMTAyOyI%2BPCFFTlRJVFkgY29tcGxleGVzICImI3gyMTAyO=
yI%2BPCFFTlRJVFkgaW5jYXJlICImI3gyMTA1OyI%2BPCFFTlRJVFkgZ3NjciAiJiN4MjEwQT=
siPjwhRU5USVRZIGhhbWlsdCAiJiN4MjEwQjsiPjwhRU5USVRZIEhpbGJlcnRTcGFjZSAiJiN=
4MjEwQjsiPjwhRU5USVRZIEhzY3IgIiYjeDIxMEI7Ij48IUVOVElUWSBIZnIgIiYjeDIxMEM7=
Ij48IUVOVElUWSBQb2luY2FyZXBsYW5lICImI3gyMTBDOyI%2BPCFFTlRJVFkgcXVhdGVybml=
vbnMgIiYjeDIxMEQ7Ij48IUVOVElUWSBIb3BmICImI3gyMTBEOyI%2BPCFFTlRJVFkgcGxhbm=
NraCAiJiN4MjEwRTsiPjwhRU5USVRZIHBsYW5jayAiJiN4MjEwRjsiPjwhRU5USVRZIGhiYXI=
gIiYjeDIxMEY7Ij48IUVOVElUWSBwbGFua3YgIiYjeDIxMEY7Ij48IUVOVElUWSBoc2xhc2gg=
IiYjeDIxMEY7Ij48IUVOVElUWSBJc2NyICImI3gyMTEwOyI%2BPCFFTlRJVFkgaW1hZ2xpbmU=
gIiYjeDIxMTA7Ij48IUVOVElUWSBpbWFnZSAiJiN4MjExMTsiPjwhRU5USVRZIEltICImI3gy=
MTExOyI%2BPCFFTlRJVFkgaW1hZ3BhcnQgIiYjeDIxMTE7Ij48IUVOVElUWSBJZnIgIiYjeDI=
xMTE7Ij48IUVOVElUWSBMc2NyICImI3gyMTEyOyI%2BPCFFTlRJVFkgbGFncmFuICImI3gyMT=
EyOyI%2BPCFFTlRJVFkgTGFwbGFjZXRyZiAiJiN4MjExMjsiPjwhRU5USVRZIGVsbCAiJiN4M=
jExMzsiPjwhRU5USVRZIE5vcGYgIiYjeDIxMTU7Ij48IUVOVElUWSBuYXR1cmFscyAiJiN4Mj=
ExNTsiPjwhRU5USVRZIG51bWVybyAiJiN4MjExNjsiPjwhRU5USVRZIGNvcHlzciAiJiN4MjE=
xNzsiPjwhRU5USVRZIHdlaWVycCAiJiN4MjExODsiPjwhRU5USVRZIHdwICImI3gyMTE4OyI%=
2BPCFFTlRJVFkgUG9wZiAiJiN4MjExOTsiPjwhRU5USVRZIHByaW1lcyAiJiN4MjExOTsiPjw=
hRU5USVRZIHJhdGlvbmFscyAiJiN4MjExQTsiPjwhRU5USVRZIFFvcGYgIiYjeDIxMUE7Ij48=
IUVOVElUWSBSc2NyICImI3gyMTFCOyI%2BPCFFTlRJVFkgcmVhbGluZSAiJiN4MjExQjsiPjw=
hRU5USVRZIHJlYWwgIiYjeDIxMUM7Ij48IUVOVElUWSBSZSAiJiN4MjExQzsiPjwhRU5USVRZ=
IHJlYWxwYXJ0ICImI3gyMTFDOyI%2BPCFFTlRJVFkgUmZyICImI3gyMTFDOyI%2BPCFFTlRJV=
FkgcmVhbHMgIiYjeDIxMUQ7Ij48IUVOVElUWSBSb3BmICImI3gyMTFEOyI%2BPCFFTlRJVFkg=
cnggIiYjeDIxMUU7Ij48IUVOVElUWSB0cmFkZSAiJiN4MjEyMjsiPjwhRU5USVRZIFRSQURFI=
CImI3gyMTIyOyI%2BPCFFTlRJVFkgaW50ZWdlcnMgIiYjeDIxMjQ7Ij48IUVOVElUWSBab3Bm=
ICImI3gyMTI0OyI%2BPCFFTlRJVFkgbWhvICImI3gyMTI3OyI%2BPCFFTlRJVFkgWmZyICImI=
3gyMTI4OyI%2BPCFFTlRJVFkgemVldHJmICImI3gyMTI4OyI%2BPCFFTlRJVFkgaWlvdGEgIi=
YjeDIxMjk7Ij48IUVOVElUWSBiZXJub3UgIiYjeDIxMkM7Ij48IUVOVElUWSBCZXJub3VsbGl=
zICImI3gyMTJDOyI%2BPCFFTlRJVFkgQnNjciAiJiN4MjEyQzsiPjwhRU5USVRZIENmciAiJi=
N4MjEyRDsiPjwhRU5USVRZIENheWxleXMgIiYjeDIxMkQ7Ij48IUVOVElUWSBlc2NyICImI3g=
yMTJGOyI%2BPCFFTlRJVFkgRXNjciAiJiN4MjEzMDsiPjwhRU5USVRZIGV4cGVjdGF0aW9uIC=
ImI3gyMTMwOyI%2BPCFFTlRJVFkgRnNjciAiJiN4MjEzMTsiPjwhRU5USVRZIEZvdXJpZXJ0c=
mYgIiYjeDIxMzE7Ij48IUVOVElUWSBwaG1tYXQgIiYjeDIxMzM7Ij48IUVOVElUWSBNZWxsaW=
50cmYgIiYjeDIxMzM7Ij48IUVOVElUWSBNc2NyICImI3gyMTMzOyI%2BPCFFTlRJVFkgb3JkZ=
XIgIiYjeDIxMzQ7Ij48IUVOVElUWSBvcmRlcm9mICImI3gyMTM0OyI%2BPCFFTlRJVFkgb3Nj=
ciAiJiN4MjEzNDsiPjwhRU5USVRZIGFsZWZzeW0gIiYjeDIxMzU7Ij48IUVOVElUWSBhbGVwa=
CAiJiN4MjEzNTsiPjwhRU5USVRZIGJldGggIiYjeDIxMzY7Ij48IUVOVElUWSBnaW1lbCAiJi=
N4MjEzNzsiPjwhRU5USVRZIGRhbGV0aCAiJiN4MjEzODsiPjwhRU5USVRZIENhcGl0YWxEaWZ=
mZXJlbnRpYWxEICImI3gyMTQ1OyI%2BPCFFTlRJVFkgREQgIiYjeDIxNDU7Ij48IUVOVElUWS=
BEaWZmZXJlbnRpYWxEICImI3gyMTQ2OyI%2BPCFFTlRJVFkgZGQgIiYjeDIxNDY7Ij48IUVOV=
ElUWSBFeHBvbmVudGlhbEUgIiYjeDIxNDc7Ij48IUVOVElUWSBleHBvbmVudGlhbGUgIiYjeD=
IxNDc7Ij48IUVOVElUWSBlZSAiJiN4MjE0NzsiPjwhRU5USVRZIEltYWdpbmFyeUkgIiYjeDI=
xNDg7Ij48IUVOVElUWSBpaSAiJiN4MjE0ODsiPjwhRU5USVRZIGZyYWMxMyAiJiN4MjE1Mzsi=
PjwhRU5USVRZIGZyYWMyMyAiJiN4MjE1NDsiPjwhRU5USVRZIGZyYWMxNSAiJiN4MjE1NTsiP=
jwhRU5USVRZIGZyYWMyNSAiJiN4MjE1NjsiPjwhRU5USVRZIGZyYWMzNSAiJiN4MjE1NzsiPj=
whRU5USVRZIGZyYWM0NSAiJiN4MjE1ODsiPjwhRU5USVRZIGZyYWMxNiAiJiN4MjE1OTsiPjw=
hRU5USVRZIGZyYWM1NiAiJiN4MjE1QTsiPjwhRU5USVRZIGZyYWMxOCAiJiN4MjE1QjsiPjwh=
RU5USVRZIGZyYWMzOCAiJiN4MjE1QzsiPjwhRU5USVRZIGZyYWM1OCAiJiN4MjE1RDsiPjwhR=
U5USVRZIGZyYWM3OCAiJiN4MjE1RTsiPjwhRU5USVRZIGxhcnIgIiYjeDIxOTA7Ij48IUVOVE=
lUWSBsZWZ0YXJyb3cgIiYjeDIxOTA7Ij48IUVOVElUWSBMZWZ0QXJyb3cgIiYjeDIxOTA7Ij4=
8IUVOVElUWSBzbGFyciAiJiN4MjE5MDsiPjwhRU5USVRZIFNob3J0TGVmdEFycm93ICImI3gy=
MTkwOyI%2BPCFFTlRJVFkgdWFyciAiJiN4MjE5MTsiPjwhRU5USVRZIHVwYXJyb3cgIiYjeDI=
xOTE7Ij48IUVOVElUWSBVcEFycm93ICImI3gyMTkxOyI%2BPCFFTlRJVFkgU2hvcnRVcEFycm=
93ICImI3gyMTkxOyI%2BPCFFTlRJVFkgcmFyciAiJiN4MjE5MjsiPjwhRU5USVRZIHJpZ2h0Y=
XJyb3cgIiYjeDIxOTI7Ij48IUVOVElUWSBSaWdodEFycm93ICImI3gyMTkyOyI%2BPCFFTlRJ=
VFkgc3JhcnIgIiYjeDIxOTI7Ij48IUVOVElUWSBTaG9ydFJpZ2h0QXJyb3cgIiYjeDIxOTI7I=
j48IUVOVElUWSBkYXJyICImI3gyMTkzOyI%2BPCFFTlRJVFkgZG93bmFycm93ICImI3gyMTkz=
OyI%2BPCFFTlRJVFkgRG93bkFycm93ICImI3gyMTkzOyI%2BPCFFTlRJVFkgU2hvcnREb3duQ=
XJyb3cgIiYjeDIxOTM7Ij48IUVOVElUWSBoYXJyICImI3gyMTk0OyI%2BPCFFTlRJVFkgbGVm=
dHJpZ2h0YXJyb3cgIiYjeDIxOTQ7Ij48IUVOVElUWSBMZWZ0UmlnaHRBcnJvdyAiJiN4MjE5N=
DsiPjwhRU5USVRZIHZhcnIgIiYjeDIxOTU7Ij48IUVOVElUWSB1cGRvd25hcnJvdyAiJiN4Mj=
E5NTsiPjwhRU5USVRZIFVwRG93bkFycm93ICImI3gyMTk1OyI%2BPCFFTlRJVFkgbndhcnIgI=
iYjeDIxOTY7Ij48IUVOVElUWSBVcHBlckxlZnRBcnJvdyAiJiN4MjE5NjsiPjwhRU5USVRZIG=
53YXJyb3cgIiYjeDIxOTY7Ij48IUVOVElUWSBuZWFyciAiJiN4MjE5NzsiPjwhRU5USVRZIFV=
wcGVyUmlnaHRBcnJvdyAiJiN4MjE5NzsiPjwhRU5USVRZIG5lYXJyb3cgIiYjeDIxOTc7Ij48=
IUVOVElUWSBzZWFyciAiJiN4MjE5ODsiPjwhRU5USVRZIHNlYXJyb3cgIiYjeDIxOTg7Ij48I=
UVOVElUWSBMb3dlclJpZ2h0QXJyb3cgIiYjeDIxOTg7Ij48IUVOVElUWSBzd2FyciAiJiN4Mj=
E5OTsiPjwhRU5USVRZIHN3YXJyb3cgIiYjeDIxOTk7Ij48IUVOVElUWSBMb3dlckxlZnRBcnJ=
vdyAiJiN4MjE5OTsiPjwhRU5USVRZIG5sYXJyICImI3gyMTlBOyI%2BPCFFTlRJVFkgbmxlZn=
RhcnJvdyAiJiN4MjE5QTsiPjwhRU5USVRZIG5yYXJyICImI3gyMTlCOyI%2BPCFFTlRJVFkgb=
nJpZ2h0YXJyb3cgIiYjeDIxOUI7Ij48IUVOVElUWSByYXJydyAiJiN4MjE5RDsiPjwhRU5USV=
RZIHJpZ2h0c3F1aWdhcnJvdyAiJiN4MjE5RDsiPjwhRU5USVRZIG5yYXJydyAiJiN4MjE5RDs=
mI3gzMzg7Ij48IUVOVElUWSBMYXJyICImI3gyMTlFOyI%2BPCFFTlRJVFkgdHdvaGVhZGxlZn=
RhcnJvdyAiJiN4MjE5RTsiPjwhRU5USVRZIFVhcnIgIiYjeDIxOUY7Ij48IUVOVElUWSBSYXJ=
yICImI3gyMUEwOyI%2BPCFFTlRJVFkgdHdvaGVhZHJpZ2h0YXJyb3cgIiYjeDIxQTA7Ij48IU=
VOVElUWSBEYXJyICImI3gyMUExOyI%2BPCFFTlRJVFkgbGFycnRsICImI3gyMUEyOyI%2BPCF=
FTlRJVFkgbGVmdGFycm93dGFpbCAiJiN4MjFBMjsiPjwhRU5USVRZIHJhcnJ0bCAiJiN4MjFB=
MzsiPjwhRU5USVRZIHJpZ2h0YXJyb3d0YWlsICImI3gyMUEzOyI%2BPCFFTlRJVFkgTGVmdFR=
lZUFycm93ICImI3gyMUE0OyI%2BPCFFTlRJVFkgbWFwc3RvbGVmdCAiJiN4MjFBNDsiPjwhRU=
5USVRZIFVwVGVlQXJyb3cgIiYjeDIxQTU7Ij48IUVOVElUWSBtYXBzdG91cCAiJiN4MjFBNTs=
iPjwhRU5USVRZIG1hcCAiJiN4MjFBNjsiPjwhRU5USVRZIFJpZ2h0VGVlQXJyb3cgIiYjeDIx=
QTY7Ij48IUVOVElUWSBtYXBzdG8gIiYjeDIxQTY7Ij48IUVOVElUWSBEb3duVGVlQXJyb3cgI=
iYjeDIxQTc7Ij48IUVOVElUWSBtYXBzdG9kb3duICImI3gyMUE3OyI%2BPCFFTlRJVFkgbGFy=
cmhrICImI3gyMUE5OyI%2BPCFFTlRJVFkgaG9va2xlZnRhcnJvdyAiJiN4MjFBOTsiPjwhRU5=
USVRZIHJhcnJoayAiJiN4MjFBQTsiPjwhRU5USVRZIGhvb2tyaWdodGFycm93ICImI3gyMUFB=
OyI%2BPCFFTlRJVFkgbGFycmxwICImI3gyMUFCOyI%2BPCFFTlRJVFkgbG9vcGFycm93bGVmd=
CAiJiN4MjFBQjsiPjwhRU5USVRZIHJhcnJscCAiJiN4MjFBQzsiPjwhRU5USVRZIGxvb3Bhcn=
Jvd3JpZ2h0ICImI3gyMUFDOyI%2BPCFFTlRJVFkgaGFycncgIiYjeDIxQUQ7Ij48IUVOVElUW=
SBsZWZ0cmlnaHRzcXVpZ2Fycm93ICImI3gyMUFEOyI%2BPCFFTlRJVFkgbmhhcnIgIiYjeDIx=
QUU7Ij48IUVOVElUWSBubGVmdHJpZ2h0YXJyb3cgIiYjeDIxQUU7Ij48IUVOVElUWSBsc2ggI=
iYjeDIxQjA7Ij48IUVOVElUWSBMc2ggIiYjeDIxQjA7Ij48IUVOVElUWSByc2ggIiYjeDIxQj=
E7Ij48IUVOVElUWSBSc2ggIiYjeDIxQjE7Ij48IUVOVElUWSBsZHNoICImI3gyMUIyOyI%2BP=
CFFTlRJVFkgcmRzaCAiJiN4MjFCMzsiPjwhRU5USVRZIGNyYXJyICImI3gyMUI1OyI%2BPCFF=
TlRJVFkgY3VsYXJyICImI3gyMUI2OyI%2BPCFFTlRJVFkgY3VydmVhcnJvd2xlZnQgIiYjeDI=
xQjY7Ij48IUVOVElUWSBjdXJhcnIgIiYjeDIxQjc7Ij48IUVOVElUWSBjdXJ2ZWFycm93cmln=
aHQgIiYjeDIxQjc7Ij48IUVOVElUWSBvbGFyciAiJiN4MjFCQTsiPjwhRU5USVRZIGNpcmNsZ=
WFycm93bGVmdCAiJiN4MjFCQTsiPjwhRU5USVRZIG9yYXJyICImI3gyMUJCOyI%2BPCFFTlRJ=
VFkgY2lyY2xlYXJyb3dyaWdodCAiJiN4MjFCQjsiPjwhRU5USVRZIGxoYXJ1ICImI3gyMUJDO=
yI%2BPCFFTlRJVFkgTGVmdFZlY3RvciAiJiN4MjFCQzsiPjwhRU5USVRZIGxlZnRoYXJwb29u=
dXAgIiYjeDIxQkM7Ij48IUVOVElUWSBsaGFyZCAiJiN4MjFCRDsiPjwhRU5USVRZIGxlZnRoY=
XJwb29uZG93biAiJiN4MjFCRDsiPjwhRU5USVRZIERvd25MZWZ0VmVjdG9yICImI3gyMUJEOy=
I%2BPCFFTlRJVFkgdWhhcnIgIiYjeDIxQkU7Ij48IUVOVElUWSB1cGhhcnBvb25yaWdodCAiJ=
iN4MjFCRTsiPjwhRU5USVRZIFJpZ2h0VXBWZWN0b3IgIiYjeDIxQkU7Ij48IUVOVElUWSB1aG=
FybCAiJiN4MjFCRjsiPjwhRU5USVRZIHVwaGFycG9vbmxlZnQgIiYjeDIxQkY7Ij48IUVOVEl=
UWSBMZWZ0VXBWZWN0b3IgIiYjeDIxQkY7Ij48IUVOVElUWSByaGFydSAiJiN4MjFDMDsiPjwh=
RU5USVRZIFJpZ2h0VmVjdG9yICImI3gyMUMwOyI%2BPCFFTlRJVFkgcmlnaHRoYXJwb29udXA=
gIiYjeDIxQzA7Ij48IUVOVElUWSByaGFyZCAiJiN4MjFDMTsiPjwhRU5USVRZIHJpZ2h0aGFy=
cG9vbmRvd24gIiYjeDIxQzE7Ij48IUVOVElUWSBEb3duUmlnaHRWZWN0b3IgIiYjeDIxQzE7I=
j48IUVOVElUWSBkaGFyciAiJiN4MjFDMjsiPjwhRU5USVRZIFJpZ2h0RG93blZlY3RvciAiJi=
N4MjFDMjsiPjwhRU5USVRZIGRvd25oYXJwb29ucmlnaHQgIiYjeDIxQzI7Ij48IUVOVElUWSB=
kaGFybCAiJiN4MjFDMzsiPjwhRU5USVRZIExlZnREb3duVmVjdG9yICImI3gyMUMzOyI%2BPC=
FFTlRJVFkgZG93bmhhcnBvb25sZWZ0ICImI3gyMUMzOyI%2BPCFFTlRJVFkgcmxhcnIgIiYje=
DIxQzQ7Ij48IUVOVElUWSByaWdodGxlZnRhcnJvd3MgIiYjeDIxQzQ7Ij48IUVOVElUWSBSaW=
dodEFycm93TGVmdEFycm93ICImI3gyMUM0OyI%2BPCFFTlRJVFkgdWRhcnIgIiYjeDIxQzU7I=
j48IUVOVElUWSBVcEFycm93RG93bkFycm93ICImI3gyMUM1OyI%2BPCFFTlRJVFkgbHJhcnIg=
IiYjeDIxQzY7Ij48IUVOVElUWSBsZWZ0cmlnaHRhcnJvd3MgIiYjeDIxQzY7Ij48IUVOVElUW=
SBMZWZ0QXJyb3dSaWdodEFycm93ICImI3gyMUM2OyI%2BPCFFTlRJVFkgbGxhcnIgIiYjeDIx=
Qzc7Ij48IUVOVElUWSBsZWZ0bGVmdGFycm93cyAiJiN4MjFDNzsiPjwhRU5USVRZIHV1YXJyI=
CImI3gyMUM4OyI%2BPCFFTlRJVFkgdXB1cGFycm93cyAiJiN4MjFDODsiPjwhRU5USVRZIHJy=
YXJyICImI3gyMUM5OyI%2BPCFFTlRJVFkgcmlnaHRyaWdodGFycm93cyAiJiN4MjFDOTsiPjw=
hRU5USVRZIGRkYXJyICImI3gyMUNBOyI%2BPCFFTlRJVFkgZG93bmRvd25hcnJvd3MgIiYjeD=
IxQ0E7Ij48IUVOVElUWSBscmhhciAiJiN4MjFDQjsiPjwhRU5USVRZIFJldmVyc2VFcXVpbGl=
icml1bSAiJiN4MjFDQjsiPjwhRU5USVRZIGxlZnRyaWdodGhhcnBvb25zICImI3gyMUNCOyI%=
2BPCFFTlRJVFkgcmxoYXIgIiYjeDIxQ0M7Ij48IUVOVElUWSByaWdodGxlZnRoYXJwb29ucyA=
iJiN4MjFDQzsiPjwhRU5USVRZIEVxdWlsaWJyaXVtICImI3gyMUNDOyI%2BPCFFTlRJVFkgbm=
xBcnIgIiYjeDIxQ0Q7Ij48IUVOVElUWSBuTGVmdGFycm93ICImI3gyMUNEOyI%2BPCFFTlRJV=
FkgbmhBcnIgIiYjeDIxQ0U7Ij48IUVOVElUWSBuTGVmdHJpZ2h0YXJyb3cgIiYjeDIxQ0U7Ij=
48IUVOVElUWSBuckFyciAiJiN4MjFDRjsiPjwhRU5USVRZIG5SaWdodGFycm93ICImI3gyMUN=
GOyI%2BPCFFTlRJVFkgbEFyciAiJiN4MjFEMDsiPjwhRU5USVRZIExlZnRhcnJvdyAiJiN4Mj=
FEMDsiPjwhRU5USVRZIERvdWJsZUxlZnRBcnJvdyAiJiN4MjFEMDsiPjwhRU5USVRZIHVBcnI=
gIiYjeDIxRDE7Ij48IUVOVElUWSBVcGFycm93ICImI3gyMUQxOyI%2BPCFFTlRJVFkgRG91Ym=
xlVXBBcnJvdyAiJiN4MjFEMTsiPjwhRU5USVRZIHJBcnIgIiYjeDIxRDI7Ij48IUVOVElUWSB=
SaWdodGFycm93ICImI3gyMUQyOyI%2BPCFFTlRJVFkgSW1wbGllcyAiJiN4MjFEMjsiPjwhRU=
5USVRZIERvdWJsZVJpZ2h0QXJyb3cgIiYjeDIxRDI7Ij48IUVOVElUWSBkQXJyICImI3gyMUQ=
zOyI%2BPCFFTlRJVFkgRG93bmFycm93ICImI3gyMUQzOyI%2BPCFFTlRJVFkgRG91YmxlRG93=
bkFycm93ICImI3gyMUQzOyI%2BPCFFTlRJVFkgaEFyciAiJiN4MjFENDsiPjwhRU5USVRZIEx=
lZnRyaWdodGFycm93ICImI3gyMUQ0OyI%2BPCFFTlRJVFkgRG91YmxlTGVmdFJpZ2h0QXJyb3=
cgIiYjeDIxRDQ7Ij48IUVOVElUWSBpZmYgIiYjeDIxRDQ7Ij48IUVOVElUWSB2QXJyICImI3g=
yMUQ1OyI%2BPCFFTlRJVFkgVXBkb3duYXJyb3cgIiYjeDIxRDU7Ij48IUVOVElUWSBEb3VibG=
VVcERvd25BcnJvdyAiJiN4MjFENTsiPjwhRU5USVRZIG53QXJyICImI3gyMUQ2OyI%2BPCFFT=
lRJVFkgbmVBcnIgIiYjeDIxRDc7Ij48IUVOVElUWSBzZUFyciAiJiN4MjFEODsiPjwhRU5USV=
RZIHN3QXJyICImI3gyMUQ5OyI%2BPCFFTlRJVFkgbEFhcnIgIiYjeDIxREE7Ij48IUVOVElUW=
SBMbGVmdGFycm93ICImI3gyMURBOyI%2BPCFFTlRJVFkgckFhcnIgIiYjeDIxREI7Ij48IUVO=
VElUWSBScmlnaHRhcnJvdyAiJiN4MjFEQjsiPjwhRU5USVRZIHppZ3JhcnIgIiYjeDIxREQ7I=
j48IUVOVElUWSBsYXJyYiAiJiN4MjFFNDsiPjwhRU5USVRZIExlZnRBcnJvd0JhciAiJiN4Mj=
FFNDsiPjwhRU5USVRZIHJhcnJiICImI3gyMUU1OyI%2BPCFFTlRJVFkgUmlnaHRBcnJvd0Jhc=
iAiJiN4MjFFNTsiPjwhRU5USVRZIGR1YXJyICImI3gyMUY1OyI%2BPCFFTlRJVFkgRG93bkFy=
cm93VXBBcnJvdyAiJiN4MjFGNTsiPjwhRU5USVRZIGxvYXJyICImI3gyMUZEOyI%2BPCFFTlR=
JVFkgcm9hcnIgIiYjeDIxRkU7Ij48IUVOVElUWSBob2FyciAiJiN4MjFGRjsiPjwhRU5USVRZ=
IGZvcmFsbCAiJiN4MjIwMDsiPjwhRU5USVRZIEZvckFsbCAiJiN4MjIwMDsiPjwhRU5USVRZI=
GNvbXAgIiYjeDIyMDE7Ij48IUVOVElUWSBjb21wbGVtZW50ICImI3gyMjAxOyI%2BPCFFTlRJ=
VFkgcGFydCAiJiN4MjIwMjsiPjwhRU5USVRZIFBhcnRpYWxEICImI3gyMjAyOyI%2BPCFFTlR=
JVFkgbnBhcnQgIiYjeDIyMDI7JiN4MzM4OyI%2BPCFFTlRJVFkgZXhpc3QgIiYjeDIyMDM7Ij=
48IUVOVElUWSBFeGlzdHMgIiYjeDIyMDM7Ij48IUVOVElUWSBuZXhpc3QgIiYjeDIyMDQ7Ij4=
8IUVOVElUWSBOb3RFeGlzdHMgIiYjeDIyMDQ7Ij48IUVOVElUWSBuZXhpc3RzICImI3gyMjA0=
OyI%2BPCFFTlRJVFkgZW1wdHkgIiYjeDIyMDU7Ij48IUVOVElUWSBlbXB0eXNldCAiJiN4MjI=
wNTsiPjwhRU5USVRZIGVtcHR5diAiJiN4MjIwNTsiPjwhRU5USVRZIHZhcm5vdGhpbmcgIiYj=
eDIyMDU7Ij48IUVOVElUWSBuYWJsYSAiJiN4MjIwNzsiPjwhRU5USVRZIERlbCAiJiN4MjIwN=
zsiPjwhRU5USVRZIGlzaW4gIiYjeDIyMDg7Ij48IUVOVElUWSBpc2ludiAiJiN4MjIwODsiPj=
whRU5USVRZIEVsZW1lbnQgIiYjeDIyMDg7Ij48IUVOVElUWSBpbiAiJiN4MjIwODsiPjwhRU5=
USVRZIG5vdGluICImI3gyMjA5OyI%2BPCFFTlRJVFkgTm90RWxlbWVudCAiJiN4MjIwOTsiPj=
whRU5USVRZIG5vdGludmEgIiYjeDIyMDk7Ij48IUVOVElUWSBuaXYgIiYjeDIyMEI7Ij48IUV=
OVElUWSBSZXZlcnNlRWxlbWVudCAiJiN4MjIwQjsiPjwhRU5USVRZIG5pICImI3gyMjBCOyI%=
2BPCFFTlRJVFkgU3VjaFRoYXQgIiYjeDIyMEI7Ij48IUVOVElUWSBub3RuaSAiJiN4MjIwQzs=
iPjwhRU5USVRZIG5vdG5pdmEgIiYjeDIyMEM7Ij48IUVOVElUWSBOb3RSZXZlcnNlRWxlbWVu=
dCAiJiN4MjIwQzsiPjwhRU5USVRZIHByb2QgIiYjeDIyMEY7Ij48IUVOVElUWSBQcm9kdWN0I=
CImI3gyMjBGOyI%2BPCFFTlRJVFkgY29wcm9kICImI3gyMjEwOyI%2BPCFFTlRJVFkgQ29wcm=
9kdWN0ICImI3gyMjEwOyI%2BPCFFTlRJVFkgc3VtICImI3gyMjExOyI%2BPCFFTlRJVFkgU3V=
tICImI3gyMjExOyI%2BPCFFTlRJVFkgbWludXMgIiYjeDIyMTI7Ij48IUVOVElUWSBtbnBsdX=
MgIiYjeDIyMTM7Ij48IUVOVElUWSBtcCAiJiN4MjIxMzsiPjwhRU5USVRZIE1pbnVzUGx1cyA=
iJiN4MjIxMzsiPjwhRU5USVRZIHBsdXNkbyAiJiN4MjIxNDsiPjwhRU5USVRZIGRvdHBsdXMg=
IiYjeDIyMTQ7Ij48IUVOVElUWSBzZXRtbiAiJiN4MjIxNjsiPjwhRU5USVRZIHNldG1pbnVzI=
CImI3gyMjE2OyI%2BPCFFTlRJVFkgQmFja3NsYXNoICImI3gyMjE2OyI%2BPCFFTlRJVFkgc3=
NldG1uICImI3gyMjE2OyI%2BPCFFTlRJVFkgc21hbGxzZXRtaW51cyAiJiN4MjIxNjsiPjwhR=
U5USVRZIGxvd2FzdCAiJiN4MjIxNzsiPjwhRU5USVRZIGNvbXBmbiAiJiN4MjIxODsiPjwhRU=
5USVRZIFNtYWxsQ2lyY2xlICImI3gyMjE4OyI%2BPCFFTlRJVFkgcmFkaWMgIiYjeDIyMUE7I=
j48IUVOVElUWSBTcXJ0ICImI3gyMjFBOyI%2BPCFFTlRJVFkgcHJvcCAiJiN4MjIxRDsiPjwh=
RU5USVRZIHByb3B0byAiJiN4MjIxRDsiPjwhRU5USVRZIFByb3BvcnRpb25hbCAiJiN4MjIxR=
DsiPjwhRU5USVRZIHZwcm9wICImI3gyMjFEOyI%2BPCFFTlRJVFkgdmFycHJvcHRvICImI3gy=
MjFEOyI%2BPCFFTlRJVFkgaW5maW4gIiYjeDIyMUU7Ij48IUVOVElUWSBhbmdydCAiJiN4MjI=
xRjsiPjwhRU5USVRZIGFuZyAiJiN4MjIyMDsiPjwhRU5USVRZIGFuZ2xlICImI3gyMjIwOyI%=
2BPCFFTlRJVFkgbmFuZyAiJiN4MjIyMDsmI3gyMEQyOyI%2BPCFFTlRJVFkgYW5nbXNkICImI=
3gyMjIxOyI%2BPCFFTlRJVFkgbWVhc3VyZWRhbmdsZSAiJiN4MjIyMTsiPjwhRU5USVRZIGFu=
Z3NwaCAiJiN4MjIyMjsiPjwhRU5USVRZIG1pZCAiJiN4MjIyMzsiPjwhRU5USVRZIFZlcnRpY=
2FsQmFyICImI3gyMjIzOyI%2BPCFFTlRJVFkgc21pZCAiJiN4MjIyMzsiPjwhRU5USVRZIHNo=
b3J0bWlkICImI3gyMjIzOyI%2BPCFFTlRJVFkgbm1pZCAiJiN4MjIyNDsiPjwhRU5USVRZIE5=
vdFZlcnRpY2FsQmFyICImI3gyMjI0OyI%2BPCFFTlRJVFkgbnNtaWQgIiYjeDIyMjQ7Ij48IU=
VOVElUWSBuc2hvcnRtaWQgIiYjeDIyMjQ7Ij48IUVOVElUWSBwYXIgIiYjeDIyMjU7Ij48IUV=
OVElUWSBwYXJhbGxlbCAiJiN4MjIyNTsiPjwhRU5USVRZIERvdWJsZVZlcnRpY2FsQmFyICIm=
I3gyMjI1OyI%2BPCFFTlRJVFkgc3BhciAiJiN4MjIyNTsiPjwhRU5USVRZIHNob3J0cGFyYWx=
sZWwgIiYjeDIyMjU7Ij48IUVOVElUWSBucGFyICImI3gyMjI2OyI%2BPCFFTlRJVFkgbnBhcm=
FsbGVsICImI3gyMjI2OyI%2BPCFFTlRJVFkgTm90RG91YmxlVmVydGljYWxCYXIgIiYjeDIyM=
jY7Ij48IUVOVElUWSBuc3BhciAiJiN4MjIyNjsiPjwhRU5USVRZIG5zaG9ydHBhcmFsbGVsIC=
ImI3gyMjI2OyI%2BPCFFTlRJVFkgYW5kICImI3gyMjI3OyI%2BPCFFTlRJVFkgd2VkZ2UgIiY=
jeDIyMjc7Ij48IUVOVElUWSBvciAiJiN4MjIyODsiPjwhRU5USVRZIHZlZSAiJiN4MjIyODsi=
PjwhRU5USVRZIGNhcCAiJiN4MjIyOTsiPjwhRU5USVRZIGNhcHMgIiYjeDIyMjk7JiN4RkUwM=
DsiPjwhRU5USVRZIGN1cCAiJiN4MjIyQTsiPjwhRU5USVRZIGN1cHMgIiYjeDIyMkE7JiN4Rk=
UwMDsiPjwhRU5USVRZIGludCAiJiN4MjIyQjsiPjwhRU5USVRZIEludGVncmFsICImI3gyMjJ=
COyI%2BPCFFTlRJVFkgSW50ICImI3gyMjJDOyI%2BPCFFTlRJVFkgdGludCAiJiN4MjIyRDsi=
PjwhRU5USVRZIGlpaW50ICImI3gyMjJEOyI%2BPCFFTlRJVFkgY29uaW50ICImI3gyMjJFOyI=
%2BPCFFTlRJVFkgb2ludCAiJiN4MjIyRTsiPjwhRU5USVRZIENvbnRvdXJJbnRlZ3JhbCAiJi=
N4MjIyRTsiPjwhRU5USVRZIENvbmludCAiJiN4MjIyRjsiPjwhRU5USVRZIERvdWJsZUNvbnR=
vdXJJbnRlZ3JhbCAiJiN4MjIyRjsiPjwhRU5USVRZIENjb25pbnQgIiYjeDIyMzA7Ij48IUVO=
VElUWSBjd2ludCAiJiN4MjIzMTsiPjwhRU5USVRZIGN3Y29uaW50ICImI3gyMjMyOyI%2BPCF=
FTlRJVFkgQ2xvY2t3aXNlQ29udG91ckludGVncmFsICImI3gyMjMyOyI%2BPCFFTlRJVFkgYX=
djb25pbnQgIiYjeDIyMzM7Ij48IUVOVElUWSBDb3VudGVyQ2xvY2t3aXNlQ29udG91ckludGV=
ncmFsICImI3gyMjMzOyI%2BPCFFTlRJVFkgdGhlcmU0ICImI3gyMjM0OyI%2BPCFFTlRJVFkg=
dGhlcmVmb3JlICImI3gyMjM0OyI%2BPCFFTlRJVFkgVGhlcmVmb3JlICImI3gyMjM0OyI%2BP=
CFFTlRJVFkgYmVjYXVzICImI3gyMjM1OyI%2BPCFFTlRJVFkgYmVjYXVzZSAiJiN4MjIzNTsi=
PjwhRU5USVRZIEJlY2F1c2UgIiYjeDIyMzU7Ij48IUVOVElUWSByYXRpbyAiJiN4MjIzNjsiP=
jwhRU5USVRZIENvbG9uICImI3gyMjM3OyI%2BPCFFTlRJVFkgUHJvcG9ydGlvbiAiJiN4MjIz=
NzsiPjwhRU5USVRZIG1pbnVzZCAiJiN4MjIzODsiPjwhRU5USVRZIGRvdG1pbnVzICImI3gyM=
jM4OyI%2BPCFFTlRJVFkgbUREb3QgIiYjeDIyM0E7Ij48IUVOVElUWSBob210aHQgIiYjeDIy=
M0I7Ij48IUVOVElUWSBzaW0gIiYjeDIyM0M7Ij48IUVOVElUWSBUaWxkZSAiJiN4MjIzQzsiP=
jwhRU5USVRZIHRoa3NpbSAiJiN4MjIzQzsiPjwhRU5USVRZIHRoaWNrc2ltICImI3gyMjNDOy=
I%2BPCFFTlRJVFkgbnZzaW0gIiYjeDIyM0M7JiN4MjBEMjsiPjwhRU5USVRZIGJzaW0gIiYje=
DIyM0Q7Ij48IUVOVElUWSBiYWNrc2ltICImI3gyMjNEOyI%2BPCFFTlRJVFkgcmFjZSAiJiN4=
MjIzRDsmI3gzMzE7Ij48IUVOVElUWSBhYyAiJiN4MjIzRTsiPjwhRU5USVRZIG1zdHBvcyAiJ=
iN4MjIzRTsiPjwhRU5USVRZIGFjRSAiJiN4MjIzRTsmI3gzMzM7Ij48IUVOVElUWSBhY2QgIi=
YjeDIyM0Y7Ij48IUVOVElUWSB3cmVhdGggIiYjeDIyNDA7Ij48IUVOVElUWSBWZXJ0aWNhbFR=
pbGRlICImI3gyMjQwOyI%2BPCFFTlRJVFkgd3IgIiYjeDIyNDA7Ij48IUVOVElUWSBuc2ltIC=
ImI3gyMjQxOyI%2BPCFFTlRJVFkgTm90VGlsZGUgIiYjeDIyNDE7Ij48IUVOVElUWSBlc2ltI=
CImI3gyMjQyOyI%2BPCFFTlRJVFkgRXF1YWxUaWxkZSAiJiN4MjI0MjsiPjwhRU5USVRZIGVx=
c2ltICImI3gyMjQyOyI%2BPCFFTlRJVFkgTm90RXF1YWxUaWxkZSAiJiN4MjI0MjsmI3gzMzg=
7Ij48IUVOVElUWSBuZXNpbSAiJiN4MjI0MjsmI3gzMzg7Ij48IUVOVElUWSBzaW1lICImI3gy=
MjQzOyI%2BPCFFTlRJVFkgVGlsZGVFcXVhbCAiJiN4MjI0MzsiPjwhRU5USVRZIHNpbWVxICI=
mI3gyMjQzOyI%2BPCFFTlRJVFkgbnNpbWUgIiYjeDIyNDQ7Ij48IUVOVElUWSBuc2ltZXEgIi=
YjeDIyNDQ7Ij48IUVOVElUWSBOb3RUaWxkZUVxdWFsICImI3gyMjQ0OyI%2BPCFFTlRJVFkgY=
29uZyAiJiN4MjI0NTsiPjwhRU5USVRZIFRpbGRlRnVsbEVxdWFsICImI3gyMjQ1OyI%2BPCFF=
TlRJVFkgc2ltbmUgIiYjeDIyNDY7Ij48IUVOVElUWSBuY29uZyAiJiN4MjI0NzsiPjwhRU5US=
VRZIE5vdFRpbGRlRnVsbEVxdWFsICImI3gyMjQ3OyI%2BPCFFTlRJVFkgYXN5bXAgIiYjeDIy=
NDg7Ij48IUVOVElUWSBhcCAiJiN4MjI0ODsiPjwhRU5USVRZIFRpbGRlVGlsZGUgIiYjeDIyN=
Dg7Ij48IUVOVElUWSBhcHByb3ggIiYjeDIyNDg7Ij48IUVOVElUWSB0aGthcCAiJiN4MjI0OD=
siPjwhRU5USVRZIHRoaWNrYXBwcm94ICImI3gyMjQ4OyI%2BPCFFTlRJVFkgbmFwICImI3gyM=
jQ5OyI%2BPCFFTlRJVFkgTm90VGlsZGVUaWxkZSAiJiN4MjI0OTsiPjwhRU5USVRZIG5hcHBy=
b3ggIiYjeDIyNDk7Ij48IUVOVElUWSBhcGUgIiYjeDIyNEE7Ij48IUVOVElUWSBhcHByb3hlc=
SAiJiN4MjI0QTsiPjwhRU5USVRZIGFwaWQgIiYjeDIyNEI7Ij48IUVOVElUWSBuYXBpZCAiJi=
N4MjI0QjsmI3gzMzg7Ij48IUVOVElUWSBiY29uZyAiJiN4MjI0QzsiPjwhRU5USVRZIGJhY2t=
jb25nICImI3gyMjRDOyI%2BPCFFTlRJVFkgYXN5bXBlcSAiJiN4MjI0RDsiPjwhRU5USVRZIE=
N1cENhcCAiJiN4MjI0RDsiPjwhRU5USVRZIG52YXAgIiYjeDIyNEQ7JiN4MjBEMjsiPjwhRU5=
USVRZIGJ1bXAgIiYjeDIyNEU7Ij48IUVOVElUWSBIdW1wRG93bkh1bXAgIiYjeDIyNEU7Ij48=
IUVOVElUWSBCdW1wZXEgIiYjeDIyNEU7Ij48IUVOVElUWSBOb3RIdW1wRG93bkh1bXAgIiYje=
DIyNEU7JiN4MzM4OyI%2BPCFFTlRJVFkgbmJ1bXAgIiYjeDIyNEU7JiN4MzM4OyI%2BPCFFTl=
RJVFkgYnVtcGUgIiYjeDIyNEY7Ij48IUVOVElUWSBIdW1wRXF1YWwgIiYjeDIyNEY7Ij48IUV=
OVElUWSBidW1wZXEgIiYjeDIyNEY7Ij48IUVOVElUWSBuYnVtcGUgIiYjeDIyNEY7JiN4MzM4=
OyI%2BPCFFTlRJVFkgTm90SHVtcEVxdWFsICImI3gyMjRGOyYjeDMzODsiPjwhRU5USVRZIGV=
zZG90ICImI3gyMjUwOyI%2BPCFFTlRJVFkgRG90RXF1YWwgIiYjeDIyNTA7Ij48IUVOVElUWS=
Bkb3RlcSAiJiN4MjI1MDsiPjwhRU5USVRZIG5lZG90ICImI3gyMjUwOyYjeDMzODsiPjwhRU5=
USVRZIGVEb3QgIiYjeDIyNTE7Ij48IUVOVElUWSBkb3RlcWRvdCAiJiN4MjI1MTsiPjwhRU5U=
SVRZIGVmRG90ICImI3gyMjUyOyI%2BPCFFTlRJVFkgZmFsbGluZ2RvdHNlcSAiJiN4MjI1Mjs=
iPjwhRU5USVRZIGVyRG90ICImI3gyMjUzOyI%2BPCFFTlRJVFkgcmlzaW5nZG90c2VxICImI3=
gyMjUzOyI%2BPCFFTlRJVFkgY29sb25lICImI3gyMjU0OyI%2BPCFFTlRJVFkgY29sb25lcSA=
iJiN4MjI1NDsiPjwhRU5USVRZIEFzc2lnbiAiJiN4MjI1NDsiPjwhRU5USVRZIGVjb2xvbiAi=
JiN4MjI1NTsiPjwhRU5USVRZIGVxY29sb24gIiYjeDIyNTU7Ij48IUVOVElUWSBlY2lyICImI=
3gyMjU2OyI%2BPCFFTlRJVFkgZXFjaXJjICImI3gyMjU2OyI%2BPCFFTlRJVFkgY2lyZSAiJi=
N4MjI1NzsiPjwhRU5USVRZIGNpcmNlcSAiJiN4MjI1NzsiPjwhRU5USVRZIHdlZGdlcSAiJiN=
4MjI1OTsiPjwhRU5USVRZIHZlZWVxICImI3gyMjVBOyI%2BPCFFTlRJVFkgdHJpZSAiJiN4Mj=
I1QzsiPjwhRU5USVRZIHRyaWFuZ2xlcSAiJiN4MjI1QzsiPjwhRU5USVRZIGVxdWVzdCAiJiN=
4MjI1RjsiPjwhRU5USVRZIHF1ZXN0ZXEgIiYjeDIyNUY7Ij48IUVOVElUWSBuZSAiJiN4MjI2=
MDsiPjwhRU5USVRZIE5vdEVxdWFsICImI3gyMjYwOyI%2BPCFFTlRJVFkgZXF1aXYgIiYjeDI=
yNjE7Ij48IUVOVElUWSBDb25ncnVlbnQgIiYjeDIyNjE7Ij48IUVOVElUWSBibmVxdWl2ICIm=
I3gyMjYxOyYjeDIwRTU7Ij48IUVOVElUWSBuZXF1aXYgIiYjeDIyNjI7Ij48IUVOVElUWSBOb=
3RDb25ncnVlbnQgIiYjeDIyNjI7Ij48IUVOVElUWSBsZSAiJiN4MjI2NDsiPjwhRU5USVRZIG=
xlcSAiJiN4MjI2NDsiPjwhRU5USVRZIG52bGUgIiYjeDIyNjQ7JiN4MjBEMjsiPjwhRU5USVR=
ZIGdlICImI3gyMjY1OyI%2BPCFFTlRJVFkgR3JlYXRlckVxdWFsICImI3gyMjY1OyI%2BPCFF=
TlRJVFkgZ2VxICImI3gyMjY1OyI%2BPCFFTlRJVFkgbnZnZSAiJiN4MjI2NTsmI3gyMEQyOyI=
%2BPCFFTlRJVFkgbEUgIiYjeDIyNjY7Ij48IUVOVElUWSBMZXNzRnVsbEVxdWFsICImI3gyMj=
Y2OyI%2BPCFFTlRJVFkgbGVxcSAiJiN4MjI2NjsiPjwhRU5USVRZIG5sRSAiJiN4MjI2NjsmI=
3gzMzg7Ij48IUVOVElUWSBubGVxcSAiJiN4MjI2NjsmI3gzMzg7Ij48IUVOVElUWSBnRSAiJi=
N4MjI2NzsiPjwhRU5USVRZIEdyZWF0ZXJGdWxsRXF1YWwgIiYjeDIyNjc7Ij48IUVOVElUWSB=
nZXFxICImI3gyMjY3OyI%2BPCFFTlRJVFkgbmdFICImI3gyMjY3OyYjeDMzODsiPjwhRU5USV=
RZIG5nZXFxICImI3gyMjY3OyYjeDMzODsiPjwhRU5USVRZIE5vdEdyZWF0ZXJGdWxsRXF1YWw=
gIiYjeDIyNjc7JiN4MzM4OyI%2BPCFFTlRJVFkgbG5FICImI3gyMjY4OyI%2BPCFFTlRJVFkg=
bG5lcXEgIiYjeDIyNjg7Ij48IUVOVElUWSBsdm5FICImI3gyMjY4OyYjeEZFMDA7Ij48IUVOV=
ElUWSBsdmVydG5lcXEgIiYjeDIyNjg7JiN4RkUwMDsiPjwhRU5USVRZIGduRSAiJiN4MjI2OT=
siPjwhRU5USVRZIGduZXFxICImI3gyMjY5OyI%2BPCFFTlRJVFkgZ3ZuRSAiJiN4MjI2OTsmI=
3hGRTAwOyI%2BPCFFTlRJVFkgZ3ZlcnRuZXFxICImI3gyMjY5OyYjeEZFMDA7Ij48IUVOVElU=
WSBMdCAiJiN4MjI2QTsiPjwhRU5USVRZIE5lc3RlZExlc3NMZXNzICImI3gyMjZBOyI%2BPCF=
FTlRJVFkgbGwgIiYjeDIyNkE7Ij48IUVOVElUWSBuTHR2ICImI3gyMjZBOyYjeDMzODsiPjwh=
RU5USVRZIE5vdExlc3NMZXNzICImI3gyMjZBOyYjeDMzODsiPjwhRU5USVRZIG5MdCAiJiN4M=
jI2QTsmI3gyMEQyOyI%2BPCFFTlRJVFkgR3QgIiYjeDIyNkI7Ij48IUVOVElUWSBOZXN0ZWRH=
cmVhdGVyR3JlYXRlciAiJiN4MjI2QjsiPjwhRU5USVRZIGdnICImI3gyMjZCOyI%2BPCFFTlR=
JVFkgbkd0diAiJiN4MjI2QjsmI3gzMzg7Ij48IUVOVElUWSBOb3RHcmVhdGVyR3JlYXRlciAi=
JiN4MjI2QjsmI3gzMzg7Ij48IUVOVElUWSBuR3QgIiYjeDIyNkI7JiN4MjBEMjsiPjwhRU5US=
VRZIHR3aXh0ICImI3gyMjZDOyI%2BPCFFTlRJVFkgYmV0d2VlbiAiJiN4MjI2QzsiPjwhRU5U=
SVRZIE5vdEN1cENhcCAiJiN4MjI2RDsiPjwhRU5USVRZIG5sdCAiJiN4MjI2RTsiPjwhRU5US=
VRZIE5vdExlc3MgIiYjeDIyNkU7Ij48IUVOVElUWSBubGVzcyAiJiN4MjI2RTsiPjwhRU5USV=
RZIG5ndCAiJiN4MjI2RjsiPjwhRU5USVRZIE5vdEdyZWF0ZXIgIiYjeDIyNkY7Ij48IUVOVEl=
UWSBuZ3RyICImI3gyMjZGOyI%2BPCFFTlRJVFkgbmxlICImI3gyMjcwOyI%2BPCFFTlRJVFkg=
Tm90TGVzc0VxdWFsICImI3gyMjcwOyI%2BPCFFTlRJVFkgbmxlcSAiJiN4MjI3MDsiPjwhRU5=
USVRZIG5nZSAiJiN4MjI3MTsiPjwhRU5USVRZIE5vdEdyZWF0ZXJFcXVhbCAiJiN4MjI3MTsi=
PjwhRU5USVRZIG5nZXEgIiYjeDIyNzE7Ij48IUVOVElUWSBsc2ltICImI3gyMjcyOyI%2BPCF=
FTlRJVFkgTGVzc1RpbGRlICImI3gyMjcyOyI%2BPCFFTlRJVFkgbGVzc3NpbSAiJiN4MjI3Mj=
siPjwhRU5USVRZIGdzaW0gIiYjeDIyNzM7Ij48IUVOVElUWSBndHJzaW0gIiYjeDIyNzM7Ij4=
8IUVOVElUWSBHcmVhdGVyVGlsZGUgIiYjeDIyNzM7Ij48IUVOVElUWSBubHNpbSAiJiN4MjI3=
NDsiPjwhRU5USVRZIE5vdExlc3NUaWxkZSAiJiN4MjI3NDsiPjwhRU5USVRZIG5nc2ltICImI=
3gyMjc1OyI%2BPCFFTlRJVFkgTm90R3JlYXRlclRpbGRlICImI3gyMjc1OyI%2BPCFFTlRJVF=
kgbGcgIiYjeDIyNzY7Ij48IUVOVElUWSBsZXNzZ3RyICImI3gyMjc2OyI%2BPCFFTlRJVFkgT=
GVzc0dyZWF0ZXIgIiYjeDIyNzY7Ij48IUVOVElUWSBnbCAiJiN4MjI3NzsiPjwhRU5USVRZIG=
d0cmxlc3MgIiYjeDIyNzc7Ij48IUVOVElUWSBHcmVhdGVyTGVzcyAiJiN4MjI3NzsiPjwhRU5=
USVRZIG50bGcgIiYjeDIyNzg7Ij48IUVOVElUWSBOb3RMZXNzR3JlYXRlciAiJiN4MjI3ODsi=
PjwhRU5USVRZIG50Z2wgIiYjeDIyNzk7Ij48IUVOVElUWSBOb3RHcmVhdGVyTGVzcyAiJiN4M=
jI3OTsiPjwhRU5USVRZIHByICImI3gyMjdBOyI%2BPCFFTlRJVFkgUHJlY2VkZXMgIiYjeDIy=
N0E7Ij48IUVOVElUWSBwcmVjICImI3gyMjdBOyI%2BPCFFTlRJVFkgc2MgIiYjeDIyN0I7Ij4=
8IUVOVElUWSBTdWNjZWVkcyAiJiN4MjI3QjsiPjwhRU5USVRZIHN1Y2MgIiYjeDIyN0I7Ij48=
IUVOVElUWSBwcmN1ZSAiJiN4MjI3QzsiPjwhRU5USVRZIFByZWNlZGVzU2xhbnRFcXVhbCAiJ=
iN4MjI3QzsiPjwhRU5USVRZIHByZWNjdXJseWVxICImI3gyMjdDOyI%2BPCFFTlRJVFkgc2Nj=
dWUgIiYjeDIyN0Q7Ij48IUVOVElUWSBTdWNjZWVkc1NsYW50RXF1YWwgIiYjeDIyN0Q7Ij48I=
UVOVElUWSBzdWNjY3VybHllcSAiJiN4MjI3RDsiPjwhRU5USVRZIHByc2ltICImI3gyMjdFOy=
I%2BPCFFTlRJVFkgcHJlY3NpbSAiJiN4MjI3RTsiPjwhRU5USVRZIFByZWNlZGVzVGlsZGUgI=
iYjeDIyN0U7Ij48IUVOVElUWSBzY3NpbSAiJiN4MjI3RjsiPjwhRU5USVRZIHN1Y2NzaW0gIi=
YjeDIyN0Y7Ij48IUVOVElUWSBTdWNjZWVkc1RpbGRlICImI3gyMjdGOyI%2BPCFFTlRJVFkgT=
m90U3VjY2VlZHNUaWxkZSAiJiN4MjI3RjsmI3gzMzg7Ij48IUVOVElUWSBucHIgIiYjeDIyOD=
A7Ij48IUVOVElUWSBucHJlYyAiJiN4MjI4MDsiPjwhRU5USVRZIE5vdFByZWNlZGVzICImI3g=
yMjgwOyI%2BPCFFTlRJVFkgbnNjICImI3gyMjgxOyI%2BPCFFTlRJVFkgbnN1Y2MgIiYjeDIy=
ODE7Ij48IUVOVElUWSBOb3RTdWNjZWVkcyAiJiN4MjI4MTsiPjwhRU5USVRZIHN1YiAiJiN4M=
jI4MjsiPjwhRU5USVRZIHN1YnNldCAiJiN4MjI4MjsiPjwhRU5USVRZIHZuc3ViICImI3gyMj=
gyOyYjeDIwRDI7Ij48IUVOVElUWSBuc3Vic2V0ICImI3gyMjgyOyYjeDIwRDI7Ij48IUVOVEl=
UWSBOb3RTdWJzZXQgIiYjeDIyODI7JiN4MjBEMjsiPjwhRU5USVRZIHN1cCAiJiN4MjI4Mzsi=
PjwhRU5USVRZIHN1cHNldCAiJiN4MjI4MzsiPjwhRU5USVRZIFN1cGVyc2V0ICImI3gyMjgzO=
yI%2BPCFFTlRJVFkgdm5zdXAgIiYjeDIyODM7JiN4MjBEMjsiPjwhRU5USVRZIG5zdXBzZXQg=
IiYjeDIyODM7JiN4MjBEMjsiPjwhRU5USVRZIE5vdFN1cGVyc2V0ICImI3gyMjgzOyYjeDIwR=
DI7Ij48IUVOVElUWSBuc3ViICImI3gyMjg0OyI%2BPCFFTlRJVFkgbnN1cCAiJiN4MjI4NTsi=
PjwhRU5USVRZIHN1YmUgIiYjeDIyODY7Ij48IUVOVElUWSBTdWJzZXRFcXVhbCAiJiN4MjI4N=
jsiPjwhRU5USVRZIHN1YnNldGVxICImI3gyMjg2OyI%2BPCFFTlRJVFkgc3VwZSAiJiN4MjI4=
NzsiPjwhRU5USVRZIHN1cHNldGVxICImI3gyMjg3OyI%2BPCFFTlRJVFkgU3VwZXJzZXRFcXV=
hbCAiJiN4MjI4NzsiPjwhRU5USVRZIG5zdWJlICImI3gyMjg4OyI%2BPCFFTlRJVFkgbnN1Yn=
NldGVxICImI3gyMjg4OyI%2BPCFFTlRJVFkgTm90U3Vic2V0RXF1YWwgIiYjeDIyODg7Ij48I=
UVOVElUWSBuc3VwZSAiJiN4MjI4OTsiPjwhRU5USVRZIG5zdXBzZXRlcSAiJiN4MjI4OTsiPj=
whRU5USVRZIE5vdFN1cGVyc2V0RXF1YWwgIiYjeDIyODk7Ij48IUVOVElUWSBzdWJuZSAiJiN=
4MjI4QTsiPjwhRU5USVRZIHN1YnNldG5lcSAiJiN4MjI4QTsiPjwhRU5USVRZIHZzdWJuZSAi=
JiN4MjI4QTsmI3hGRTAwOyI%2BPCFFTlRJVFkgdmFyc3Vic2V0bmVxICImI3gyMjhBOyYjeEZ=
FMDA7Ij48IUVOVElUWSBzdXBuZSAiJiN4MjI4QjsiPjwhRU5USVRZIHN1cHNldG5lcSAiJiN4=
MjI4QjsiPjwhRU5USVRZIHZzdXBuZSAiJiN4MjI4QjsmI3hGRTAwOyI%2BPCFFTlRJVFkgdmF=
yc3Vwc2V0bmVxICImI3gyMjhCOyYjeEZFMDA7Ij48IUVOVElUWSBjdXBkb3QgIiYjeDIyOEQ7=
Ij48IUVOVElUWSB1cGx1cyAiJiN4MjI4RTsiPjwhRU5USVRZIFVuaW9uUGx1cyAiJiN4MjI4R=
TsiPjwhRU5USVRZIHNxc3ViICImI3gyMjhGOyI%2BPCFFTlRJVFkgU3F1YXJlU3Vic2V0ICIm=
I3gyMjhGOyI%2BPCFFTlRJVFkgc3FzdWJzZXQgIiYjeDIyOEY7Ij48IUVOVElUWSBOb3RTcXV=
hcmVTdWJzZXQgIiYjeDIyOEY7JiN4MzM4OyI%2BPCFFTlRJVFkgc3FzdXAgIiYjeDIyOTA7Ij=
48IUVOVElUWSBTcXVhcmVTdXBlcnNldCAiJiN4MjI5MDsiPjwhRU5USVRZIHNxc3Vwc2V0ICI=
mI3gyMjkwOyI%2BPCFFTlRJVFkgTm90U3F1YXJlU3VwZXJzZXQgIiYjeDIyOTA7JiN4MzM4Oy=
I%2BPCFFTlRJVFkgc3FzdWJlICImI3gyMjkxOyI%2BPCFFTlRJVFkgU3F1YXJlU3Vic2V0RXF=
1YWwgIiYjeDIyOTE7Ij48IUVOVElUWSBzcXN1YnNldGVxICImI3gyMjkxOyI%2BPCFFTlRJVF=
kgc3FzdXBlICImI3gyMjkyOyI%2BPCFFTlRJVFkgU3F1YXJlU3VwZXJzZXRFcXVhbCAiJiN4M=
jI5MjsiPjwhRU5USVRZIHNxc3Vwc2V0ZXEgIiYjeDIyOTI7Ij48IUVOVElUWSBzcWNhcCAiJi=
N4MjI5MzsiPjwhRU5USVRZIFNxdWFyZUludGVyc2VjdGlvbiAiJiN4MjI5MzsiPjwhRU5USVR=
ZIHNxY2FwcyAiJiN4MjI5MzsmI3hGRTAwOyI%2BPCFFTlRJVFkgc3FjdXAgIiYjeDIyOTQ7Ij=
48IUVOVElUWSBTcXVhcmVVbmlvbiAiJiN4MjI5NDsiPjwhRU5USVRZIHNxY3VwcyAiJiN4MjI=
5NDsmI3hGRTAwOyI%2BPCFFTlRJVFkgb3BsdXMgIiYjeDIyOTU7Ij48IUVOVElUWSBDaXJjbG=
VQbHVzICImI3gyMjk1OyI%2BPCFFTlRJVFkgb21pbnVzICImI3gyMjk2OyI%2BPCFFTlRJVFk=
gQ2lyY2xlTWludXMgIiYjeDIyOTY7Ij48IUVOVElUWSBvdGltZXMgIiYjeDIyOTc7Ij48IUVO=
VElUWSBDaXJjbGVUaW1lcyAiJiN4MjI5NzsiPjwhRU5USVRZIG9zb2wgIiYjeDIyOTg7Ij48I=
UVOVElUWSBvZG90ICImI3gyMjk5OyI%2BPCFFTlRJVFkgQ2lyY2xlRG90ICImI3gyMjk5OyI%=
2BPCFFTlRJVFkgb2NpciAiJiN4MjI5QTsiPjwhRU5USVRZIGNpcmNsZWRjaXJjICImI3gyMjl=
BOyI%2BPCFFTlRJVFkgb2FzdCAiJiN4MjI5QjsiPjwhRU5USVRZIGNpcmNsZWRhc3QgIiYjeD=
IyOUI7Ij48IUVOVElUWSBvZGFzaCAiJiN4MjI5RDsiPjwhRU5USVRZIGNpcmNsZWRkYXNoICI=
mI3gyMjlEOyI%2BPCFFTlRJVFkgcGx1c2IgIiYjeDIyOUU7Ij48IUVOVElUWSBib3hwbHVzIC=
ImI3gyMjlFOyI%2BPCFFTlRJVFkgbWludXNiICImI3gyMjlGOyI%2BPCFFTlRJVFkgYm94bWl=
udXMgIiYjeDIyOUY7Ij48IUVOVElUWSB0aW1lc2IgIiYjeDIyQTA7Ij48IUVOVElUWSBib3h0=
aW1lcyAiJiN4MjJBMDsiPjwhRU5USVRZIHNkb3RiICImI3gyMkExOyI%2BPCFFTlRJVFkgZG9=
0c3F1YXJlICImI3gyMkExOyI%2BPCFFTlRJVFkgdmRhc2ggIiYjeDIyQTI7Ij48IUVOVElUWS=
BSaWdodFRlZSAiJiN4MjJBMjsiPjwhRU5USVRZIGRhc2h2ICImI3gyMkEzOyI%2BPCFFTlRJV=
FkgTGVmdFRlZSAiJiN4MjJBMzsiPjwhRU5USVRZIHRvcCAiJiN4MjJBNDsiPjwhRU5USVRZIE=
Rvd25UZWUgIiYjeDIyQTQ7Ij48IUVOVElUWSBib3R0b20gIiYjeDIyQTU7Ij48IUVOVElUWSB=
ib3QgIiYjeDIyQTU7Ij48IUVOVElUWSBwZXJwICImI3gyMkE1OyI%2BPCFFTlRJVFkgVXBUZW=
UgIiYjeDIyQTU7Ij48IUVOVElUWSBtb2RlbHMgIiYjeDIyQTc7Ij48IUVOVElUWSB2RGFzaCA=
iJiN4MjJBODsiPjwhRU5USVRZIERvdWJsZVJpZ2h0VGVlICImI3gyMkE4OyI%2BPCFFTlRJVF=
kgVmRhc2ggIiYjeDIyQTk7Ij48IUVOVElUWSBWdmRhc2ggIiYjeDIyQUE7Ij48IUVOVElUWSB=
WRGFzaCAiJiN4MjJBQjsiPjwhRU5USVRZIG52ZGFzaCAiJiN4MjJBQzsiPjwhRU5USVRZIG52=
RGFzaCAiJiN4MjJBRDsiPjwhRU5USVRZIG5WZGFzaCAiJiN4MjJBRTsiPjwhRU5USVRZIG5WR=
GFzaCAiJiN4MjJBRjsiPjwhRU5USVRZIHBydXJlbCAiJiN4MjJCMDsiPjwhRU5USVRZIHZsdH=
JpICImI3gyMkIyOyI%2BPCFFTlRJVFkgdmFydHJpYW5nbGVsZWZ0ICImI3gyMkIyOyI%2BPCF=
FTlRJVFkgTGVmdFRyaWFuZ2xlICImI3gyMkIyOyI%2BPCFFTlRJVFkgdnJ0cmkgIiYjeDIyQj=
M7Ij48IUVOVElUWSB2YXJ0cmlhbmdsZXJpZ2h0ICImI3gyMkIzOyI%2BPCFFTlRJVFkgUmlna=
HRUcmlhbmdsZSAiJiN4MjJCMzsiPjwhRU5USVRZIGx0cmllICImI3gyMkI0OyI%2BPCFFTlRJ=
VFkgdHJpYW5nbGVsZWZ0ZXEgIiYjeDIyQjQ7Ij48IUVOVElUWSBMZWZ0VHJpYW5nbGVFcXVhb=
CAiJiN4MjJCNDsiPjwhRU5USVRZIG52bHRyaWUgIiYjeDIyQjQ7JiN4MjBEMjsiPjwhRU5USV=
RZIHJ0cmllICImI3gyMkI1OyI%2BPCFFTlRJVFkgdHJpYW5nbGVyaWdodGVxICImI3gyMkI1O=
yI%2BPCFFTlRJVFkgUmlnaHRUcmlhbmdsZUVxdWFsICImI3gyMkI1OyI%2BPCFFTlRJVFkgbn=
ZydHJpZSAiJiN4MjJCNTsmI3gyMEQyOyI%2BPCFFTlRJVFkgb3JpZ29mICImI3gyMkI2OyI%2=
BPCFFTlRJVFkgaW1vZiAiJiN4MjJCNzsiPjwhRU5USVRZIG11bWFwICImI3gyMkI4OyI%2BPC=
FFTlRJVFkgbXVsdGltYXAgIiYjeDIyQjg7Ij48IUVOVElUWSBoZXJjb24gIiYjeDIyQjk7Ij4=
8IUVOVElUWSBpbnRjYWwgIiYjeDIyQkE7Ij48IUVOVElUWSBpbnRlcmNhbCAiJiN4MjJCQTsi=
PjwhRU5USVRZIHZlZWJhciAiJiN4MjJCQjsiPjwhRU5USVRZIGJhcnZlZSAiJiN4MjJCRDsiP=
jwhRU5USVRZIGFuZ3J0dmIgIiYjeDIyQkU7Ij48IUVOVElUWSBscnRyaSAiJiN4MjJCRjsiPj=
whRU5USVRZIHh3ZWRnZSAiJiN4MjJDMDsiPjwhRU5USVRZIFdlZGdlICImI3gyMkMwOyI%2BP=
CFFTlRJVFkgYmlnd2VkZ2UgIiYjeDIyQzA7Ij48IUVOVElUWSB4dmVlICImI3gyMkMxOyI%2B=
PCFFTlRJVFkgVmVlICImI3gyMkMxOyI%2BPCFFTlRJVFkgYmlndmVlICImI3gyMkMxOyI%2BP=
CFFTlRJVFkgeGNhcCAiJiN4MjJDMjsiPjwhRU5USVRZIEludGVyc2VjdGlvbiAiJiN4MjJDMj=
siPjwhRU5USVRZIGJpZ2NhcCAiJiN4MjJDMjsiPjwhRU5USVRZIHhjdXAgIiYjeDIyQzM7Ij4=
8IUVOVElUWSBVbmlvbiAiJiN4MjJDMzsiPjwhRU5USVRZIGJpZ2N1cCAiJiN4MjJDMzsiPjwh=
RU5USVRZIGRpYW0gIiYjeDIyQzQ7Ij48IUVOVElUWSBkaWFtb25kICImI3gyMkM0OyI%2BPCF=
FTlRJVFkgRGlhbW9uZCAiJiN4MjJDNDsiPjwhRU5USVRZIHNkb3QgIiYjeDIyQzU7Ij48IUVO=
VElUWSBzc3RhcmYgIiYjeDIyQzY7Ij48IUVOVElUWSBTdGFyICImI3gyMkM2OyI%2BPCFFTlR=
JVFkgZGl2b254ICImI3gyMkM3OyI%2BPCFFTlRJVFkgZGl2aWRlb250aW1lcyAiJiN4MjJDNz=
siPjwhRU5USVRZIGJvd3RpZSAiJiN4MjJDODsiPjwhRU5USVRZIGx0aW1lcyAiJiN4MjJDOTs=
iPjwhRU5USVRZIHJ0aW1lcyAiJiN4MjJDQTsiPjwhRU5USVRZIGx0aHJlZSAiJiN4MjJDQjsi=
PjwhRU5USVRZIGxlZnR0aHJlZXRpbWVzICImI3gyMkNCOyI%2BPCFFTlRJVFkgcnRocmVlICI=
mI3gyMkNDOyI%2BPCFFTlRJVFkgcmlnaHR0aHJlZXRpbWVzICImI3gyMkNDOyI%2BPCFFTlRJ=
VFkgYnNpbWUgIiYjeDIyQ0Q7Ij48IUVOVElUWSBiYWNrc2ltZXEgIiYjeDIyQ0Q7Ij48IUVOV=
ElUWSBjdXZlZSAiJiN4MjJDRTsiPjwhRU5USVRZIGN1cmx5dmVlICImI3gyMkNFOyI%2BPCFF=
TlRJVFkgY3V3ZWQgIiYjeDIyQ0Y7Ij48IUVOVElUWSBjdXJseXdlZGdlICImI3gyMkNGOyI%2=
BPCFFTlRJVFkgU3ViICImI3gyMkQwOyI%2BPCFFTlRJVFkgU3Vic2V0ICImI3gyMkQwOyI%2B=
PCFFTlRJVFkgU3VwICImI3gyMkQxOyI%2BPCFFTlRJVFkgU3Vwc2V0ICImI3gyMkQxOyI%2BP=
CFFTlRJVFkgQ2FwICImI3gyMkQyOyI%2BPCFFTlRJVFkgQ3VwICImI3gyMkQzOyI%2BPCFFTl=
RJVFkgZm9yayAiJiN4MjJENDsiPjwhRU5USVRZIHBpdGNoZm9yayAiJiN4MjJENDsiPjwhRU5=
USVRZIGVwYXIgIiYjeDIyRDU7Ij48IUVOVElUWSBsdGRvdCAiJiN4MjJENjsiPjwhRU5USVRZ=
IGxlc3Nkb3QgIiYjeDIyRDY7Ij48IUVOVElUWSBndGRvdCAiJiN4MjJENzsiPjwhRU5USVRZI=
Gd0cmRvdCAiJiN4MjJENzsiPjwhRU5USVRZIExsICImI3gyMkQ4OyI%2BPCFFTlRJVFkgbkxs=
ICImI3gyMkQ4OyYjeDMzODsiPjwhRU5USVRZIEdnICImI3gyMkQ5OyI%2BPCFFTlRJVFkgZ2d=
nICImI3gyMkQ5OyI%2BPCFFTlRJVFkgbkdnICImI3gyMkQ5OyYjeDMzODsiPjwhRU5USVRZIG=
xlZyAiJiN4MjJEQTsiPjwhRU5USVRZIExlc3NFcXVhbEdyZWF0ZXIgIiYjeDIyREE7Ij48IUV=
OVElUWSBsZXNzZXFndHIgIiYjeDIyREE7Ij48IUVOVElUWSBsZXNnICImI3gyMkRBOyYjeEZF=
MDA7Ij48IUVOVElUWSBnZWwgIiYjeDIyREI7Ij48IUVOVElUWSBndHJlcWxlc3MgIiYjeDIyR=
EI7Ij48IUVOVElUWSBHcmVhdGVyRXF1YWxMZXNzICImI3gyMkRCOyI%2BPCFFTlRJVFkgZ2Vz=
bCAiJiN4MjJEQjsmI3hGRTAwOyI%2BPCFFTlRJVFkgY3VlcHIgIiYjeDIyREU7Ij48IUVOVEl=
UWSBjdXJseWVxcHJlYyAiJiN4MjJERTsiPjwhRU5USVRZIGN1ZXNjICImI3gyMkRGOyI%2BPC=
FFTlRJVFkgY3VybHllcXN1Y2MgIiYjeDIyREY7Ij48IUVOVElUWSBucHJjdWUgIiYjeDIyRTA=
7Ij48IUVOVElUWSBOb3RQcmVjZWRlc1NsYW50RXF1YWwgIiYjeDIyRTA7Ij48IUVOVElUWSBu=
c2NjdWUgIiYjeDIyRTE7Ij48IUVOVElUWSBOb3RTdWNjZWVkc1NsYW50RXF1YWwgIiYjeDIyR=
TE7Ij48IUVOVElUWSBuc3FzdWJlICImI3gyMkUyOyI%2BPCFFTlRJVFkgTm90U3F1YXJlU3Vi=
c2V0RXF1YWwgIiYjeDIyRTI7Ij48IUVOVElUWSBuc3FzdXBlICImI3gyMkUzOyI%2BPCFFTlR=
JVFkgTm90U3F1YXJlU3VwZXJzZXRFcXVhbCAiJiN4MjJFMzsiPjwhRU5USVRZIGxuc2ltICIm=
I3gyMkU2OyI%2BPCFFTlRJVFkgZ25zaW0gIiYjeDIyRTc7Ij48IUVOVElUWSBwcm5zaW0gIiY=
jeDIyRTg7Ij48IUVOVElUWSBwcmVjbnNpbSAiJiN4MjJFODsiPjwhRU5USVRZIHNjbnNpbSAi=
JiN4MjJFOTsiPjwhRU5USVRZIHN1Y2Nuc2ltICImI3gyMkU5OyI%2BPCFFTlRJVFkgbmx0cmk=
gIiYjeDIyRUE7Ij48IUVOVElUWSBudHJpYW5nbGVsZWZ0ICImI3gyMkVBOyI%2BPCFFTlRJVF=
kgTm90TGVmdFRyaWFuZ2xlICImI3gyMkVBOyI%2BPCFFTlRJVFkgbnJ0cmkgIiYjeDIyRUI7I=
j48IUVOVElUWSBudHJpYW5nbGVyaWdodCAiJiN4MjJFQjsiPjwhRU5USVRZIE5vdFJpZ2h0VH=
JpYW5nbGUgIiYjeDIyRUI7Ij48IUVOVElUWSBubHRyaWUgIiYjeDIyRUM7Ij48IUVOVElUWSB=
udHJpYW5nbGVsZWZ0ZXEgIiYjeDIyRUM7Ij48IUVOVElUWSBOb3RMZWZ0VHJpYW5nbGVFcXVh=
bCAiJiN4MjJFQzsiPjwhRU5USVRZIG5ydHJpZSAiJiN4MjJFRDsiPjwhRU5USVRZIG50cmlhb=
mdsZXJpZ2h0ZXEgIiYjeDIyRUQ7Ij48IUVOVElUWSBOb3RSaWdodFRyaWFuZ2xlRXF1YWwgIi=
YjeDIyRUQ7Ij48IUVOVElUWSB2ZWxsaXAgIiYjeDIyRUU7Ij48IUVOVElUWSBjdGRvdCAiJiN=
4MjJFRjsiPjwhRU5USVRZIHV0ZG90ICImI3gyMkYwOyI%2BPCFFTlRJVFkgZHRkb3QgIiYjeD=
IyRjE7Ij48IUVOVElUWSBkaXNpbiAiJiN4MjJGMjsiPjwhRU5USVRZIGlzaW5zdiAiJiN4MjJ=
GMzsiPjwhRU5USVRZIGlzaW5zICImI3gyMkY0OyI%2BPCFFTlRJVFkgaXNpbmRvdCAiJiN4Mj=
JGNTsiPjwhRU5USVRZIG5vdGluZG90ICImI3gyMkY1OyYjeDMzODsiPjwhRU5USVRZIG5vdGl=
udmMgIiYjeDIyRjY7Ij48IUVOVElUWSBub3RpbnZiICImI3gyMkY3OyI%2BPCFFTlRJVFkgaX=
NpbkUgIiYjeDIyRjk7Ij48IUVOVElUWSBub3RpbkUgIiYjeDIyRjk7JiN4MzM4OyI%2BPCFFT=
lRJVFkgbmlzZCAiJiN4MjJGQTsiPjwhRU5USVRZIHhuaXMgIiYjeDIyRkI7Ij48IUVOVElUWS=
BuaXMgIiYjeDIyRkM7Ij48IUVOVElUWSBub3RuaXZjICImI3gyMkZEOyI%2BPCFFTlRJVFkgb=
m90bml2YiAiJiN4MjJGRTsiPjwhRU5USVRZIGJhcndlZCAiJiN4MjMwNTsiPjwhRU5USVRZIG=
JhcndlZGdlICImI3gyMzA1OyI%2BPCFFTlRJVFkgQmFyd2VkICImI3gyMzA2OyI%2BPCFFTlR=
JVFkgZG91YmxlYmFyd2VkZ2UgIiYjeDIzMDY7Ij48IUVOVElUWSBsY2VpbCAiJiN4MjMwODsi=
PjwhRU5USVRZIExlZnRDZWlsaW5nICImI3gyMzA4OyI%2BPCFFTlRJVFkgcmNlaWwgIiYjeDI=
zMDk7Ij48IUVOVElUWSBSaWdodENlaWxpbmcgIiYjeDIzMDk7Ij48IUVOVElUWSBsZmxvb3Ig=
IiYjeDIzMEE7Ij48IUVOVElUWSBMZWZ0Rmxvb3IgIiYjeDIzMEE7Ij48IUVOVElUWSByZmxvb=
3IgIiYjeDIzMEI7Ij48IUVOVElUWSBSaWdodEZsb29yICImI3gyMzBCOyI%2BPCFFTlRJVFkg=
ZHJjcm9wICImI3gyMzBDOyI%2BPCFFTlRJVFkgZGxjcm9wICImI3gyMzBEOyI%2BPCFFTlRJV=
FkgdXJjcm9wICImI3gyMzBFOyI%2BPCFFTlRJVFkgdWxjcm9wICImI3gyMzBGOyI%2BPCFFTl=
RJVFkgYm5vdCAiJiN4MjMxMDsiPjwhRU5USVRZIHByb2ZsaW5lICImI3gyMzEyOyI%2BPCFFT=
lRJVFkgcHJvZnN1cmYgIiYjeDIzMTM7Ij48IUVOVElUWSB0ZWxyZWMgIiYjeDIzMTU7Ij48IU=
VOVElUWSB0YXJnZXQgIiYjeDIzMTY7Ij48IUVOVElUWSB1bGNvcm4gIiYjeDIzMUM7Ij48IUV=
OVElUWSB1bGNvcm5lciAiJiN4MjMxQzsiPjwhRU5USVRZIHVyY29ybiAiJiN4MjMxRDsiPjwh=
RU5USVRZIHVyY29ybmVyICImI3gyMzFEOyI%2BPCFFTlRJVFkgZGxjb3JuICImI3gyMzFFOyI=
%2BPCFFTlRJVFkgbGxjb3JuZXIgIiYjeDIzMUU7Ij48IUVOVElUWSBkcmNvcm4gIiYjeDIzMU=
Y7Ij48IUVOVElUWSBscmNvcm5lciAiJiN4MjMxRjsiPjwhRU5USVRZIGZyb3duICImI3gyMzI=
yOyI%2BPCFFTlRJVFkgc2Zyb3duICImI3gyMzIyOyI%2BPCFFTlRJVFkgc21pbGUgIiYjeDIz=
MjM7Ij48IUVOVElUWSBzc21pbGUgIiYjeDIzMjM7Ij48IUVOVElUWSBjeWxjdHkgIiYjeDIzM=
kQ7Ij48IUVOVElUWSBwcm9mYWxhciAiJiN4MjMyRTsiPjwhRU5USVRZIHRvcGJvdCAiJiN4Mj=
MzNjsiPjwhRU5USVRZIG92YmFyICImI3gyMzNEOyI%2BPCFFTlRJVFkgc29sYmFyICImI3gyM=
zNGOyI%2BPCFFTlRJVFkgYW5nemFyciAiJiN4MjM3QzsiPjwhRU5USVRZIGxtb3VzdCAiJiN4=
MjNCMDsiPjwhRU5USVRZIGxtb3VzdGFjaGUgIiYjeDIzQjA7Ij48IUVOVElUWSBybW91c3QgI=
iYjeDIzQjE7Ij48IUVOVElUWSBybW91c3RhY2hlICImI3gyM0IxOyI%2BPCFFTlRJVFkgdGJy=
ayAiJiN4MjNCNDsiPjwhRU5USVRZIE92ZXJCcmFja2V0ICImI3gyM0I0OyI%2BPCFFTlRJVFk=
gYmJyayAiJiN4MjNCNTsiPjwhRU5USVRZIFVuZGVyQnJhY2tldCAiJiN4MjNCNTsiPjwhRU5U=
SVRZIGJicmt0YnJrICImI3gyM0I2OyI%2BPCFFTlRJVFkgT3ZlclBhcmVudGhlc2lzICImI3g=
yM0RDOyI%2BPCFFTlRJVFkgVW5kZXJQYXJlbnRoZXNpcyAiJiN4MjNERDsiPjwhRU5USVRZIE=
92ZXJCcmFjZSAiJiN4MjNERTsiPjwhRU5USVRZIFVuZGVyQnJhY2UgIiYjeDIzREY7Ij48IUV=
OVElUWSB0cnBleml1bSAiJiN4MjNFMjsiPjwhRU5USVRZIGVsaW50ZXJzICImI3gyM0U3OyI%=
2BPCFFTlRJVFkgYmxhbmsgIiYjeDI0MjM7Ij48IUVOVElUWSBvUyAiJiN4MjRDODsiPjwhRU5=
USVRZIGNpcmNsZWRTICImI3gyNEM4OyI%2BPCFFTlRJVFkgYm94aCAiJiN4MjUwMDsiPjwhRU=
5USVRZIEhvcml6b250YWxMaW5lICImI3gyNTAwOyI%2BPCFFTlRJVFkgYm94diAiJiN4MjUwM=
jsiPjwhRU5USVRZIGJveGRyICImI3gyNTBDOyI%2BPCFFTlRJVFkgYm94ZGwgIiYjeDI1MTA7=
Ij48IUVOVElUWSBib3h1ciAiJiN4MjUxNDsiPjwhRU5USVRZIGJveHVsICImI3gyNTE4OyI%2=
BPCFFTlRJVFkgYm94dnIgIiYjeDI1MUM7Ij48IUVOVElUWSBib3h2bCAiJiN4MjUyNDsiPjwh=
RU5USVRZIGJveGhkICImI3gyNTJDOyI%2BPCFFTlRJVFkgYm94aHUgIiYjeDI1MzQ7Ij48IUV=
OVElUWSBib3h2aCAiJiN4MjUzQzsiPjwhRU5USVRZIGJveEggIiYjeDI1NTA7Ij48IUVOVElU=
WSBib3hWICImI3gyNTUxOyI%2BPCFFTlRJVFkgYm94ZFIgIiYjeDI1NTI7Ij48IUVOVElUWSB=
ib3hEciAiJiN4MjU1MzsiPjwhRU5USVRZIGJveERSICImI3gyNTU0OyI%2BPCFFTlRJVFkgYm=
94ZEwgIiYjeDI1NTU7Ij48IUVOVElUWSBib3hEbCAiJiN4MjU1NjsiPjwhRU5USVRZIGJveER=
MICImI3gyNTU3OyI%2BPCFFTlRJVFkgYm94dVIgIiYjeDI1NTg7Ij48IUVOVElUWSBib3hVci=
AiJiN4MjU1OTsiPjwhRU5USVRZIGJveFVSICImI3gyNTVBOyI%2BPCFFTlRJVFkgYm94dUwgI=
iYjeDI1NUI7Ij48IUVOVElUWSBib3hVbCAiJiN4MjU1QzsiPjwhRU5USVRZIGJveFVMICImI3=
gyNTVEOyI%2BPCFFTlRJVFkgYm94dlIgIiYjeDI1NUU7Ij48IUVOVElUWSBib3hWciAiJiN4M=
jU1RjsiPjwhRU5USVRZIGJveFZSICImI3gyNTYwOyI%2BPCFFTlRJVFkgYm94dkwgIiYjeDI1=
NjE7Ij48IUVOVElUWSBib3hWbCAiJiN4MjU2MjsiPjwhRU5USVRZIGJveFZMICImI3gyNTYzO=
yI%2BPCFFTlRJVFkgYm94SGQgIiYjeDI1NjQ7Ij48IUVOVElUWSBib3hoRCAiJiN4MjU2NTsi=
PjwhRU5USVRZIGJveEhEICImI3gyNTY2OyI%2BPCFFTlRJVFkgYm94SHUgIiYjeDI1Njc7Ij4=
8IUVOVElUWSBib3hoVSAiJiN4MjU2ODsiPjwhRU5USVRZIGJveEhVICImI3gyNTY5OyI%2BPC=
FFTlRJVFkgYm94dkggIiYjeDI1NkE7Ij48IUVOVElUWSBib3hWaCAiJiN4MjU2QjsiPjwhRU5=
USVRZIGJveFZIICImI3gyNTZDOyI%2BPCFFTlRJVFkgdWhibGsgIiYjeDI1ODA7Ij48IUVOVE=
lUWSBsaGJsayAiJiN4MjU4NDsiPjwhRU5USVRZIGJsb2NrICImI3gyNTg4OyI%2BPCFFTlRJV=
FkgYmxrMTQgIiYjeDI1OTE7Ij48IUVOVElUWSBibGsxMiAiJiN4MjU5MjsiPjwhRU5USVRZIG=
JsazM0ICImI3gyNTkzOyI%2BPCFFTlRJVFkgc3F1ICImI3gyNUExOyI%2BPCFFTlRJVFkgc3F=
1YXJlICImI3gyNUExOyI%2BPCFFTlRJVFkgU3F1YXJlICImI3gyNUExOyI%2BPCFFTlRJVFkg=
c3F1ZiAiJiN4MjVBQTsiPjwhRU5USVRZIHNxdWFyZiAiJiN4MjVBQTsiPjwhRU5USVRZIGJsY=
WNrc3F1YXJlICImI3gyNUFBOyI%2BPCFFTlRJVFkgRmlsbGVkVmVyeVNtYWxsU3F1YXJlICIm=
I3gyNUFBOyI%2BPCFFTlRJVFkgRW1wdHlWZXJ5U21hbGxTcXVhcmUgIiYjeDI1QUI7Ij48IUV=
OVElUWSByZWN0ICImI3gyNUFEOyI%2BPCFFTlRJVFkgbWFya2VyICImI3gyNUFFOyI%2BPCFF=
TlRJVFkgZmx0bnMgIiYjeDI1QjE7Ij48IUVOVElUWSB4dXRyaSAiJiN4MjVCMzsiPjwhRU5US=
VRZIGJpZ3RyaWFuZ2xldXAgIiYjeDI1QjM7Ij48IUVOVElUWSB1dHJpZiAiJiN4MjVCNDsiPj=
whRU5USVRZIGJsYWNrdHJpYW5nbGUgIiYjeDI1QjQ7Ij48IUVOVElUWSB1dHJpICImI3gyNUI=
1OyI%2BPCFFTlRJVFkgdHJpYW5nbGUgIiYjeDI1QjU7Ij48IUVOVElUWSBydHJpZiAiJiN4Mj=
VCODsiPjwhRU5USVRZIGJsYWNrdHJpYW5nbGVyaWdodCAiJiN4MjVCODsiPjwhRU5USVRZIHJ=
0cmkgIiYjeDI1Qjk7Ij48IUVOVElUWSB0cmlhbmdsZXJpZ2h0ICImI3gyNUI5OyI%2BPCFFTl=
RJVFkgeGR0cmkgIiYjeDI1QkQ7Ij48IUVOVElUWSBiaWd0cmlhbmdsZWRvd24gIiYjeDI1QkQ=
7Ij48IUVOVElUWSBkdHJpZiAiJiN4MjVCRTsiPjwhRU5USVRZIGJsYWNrdHJpYW5nbGVkb3du=
ICImI3gyNUJFOyI%2BPCFFTlRJVFkgZHRyaSAiJiN4MjVCRjsiPjwhRU5USVRZIHRyaWFuZ2x=
lZG93biAiJiN4MjVCRjsiPjwhRU5USVRZIGx0cmlmICImI3gyNUMyOyI%2BPCFFTlRJVFkgYm=
xhY2t0cmlhbmdsZWxlZnQgIiYjeDI1QzI7Ij48IUVOVElUWSBsdHJpICImI3gyNUMzOyI%2BP=
CFFTlRJVFkgdHJpYW5nbGVsZWZ0ICImI3gyNUMzOyI%2BPCFFTlRJVFkgbG96ICImI3gyNUNB=
OyI%2BPCFFTlRJVFkgbG96ZW5nZSAiJiN4MjVDQTsiPjwhRU5USVRZIGNpciAiJiN4MjVDQjs=
iPjwhRU5USVRZIHRyaWRvdCAiJiN4MjVFQzsiPjwhRU5USVRZIHhjaXJjICImI3gyNUVGOyI%=
2BPCFFTlRJVFkgYmlnY2lyYyAiJiN4MjVFRjsiPjwhRU5USVRZIHVsdHJpICImI3gyNUY4OyI=
%2BPCFFTlRJVFkgdXJ0cmkgIiYjeDI1Rjk7Ij48IUVOVElUWSBsbHRyaSAiJiN4MjVGQTsiPj=
whRU5USVRZIEVtcHR5U21hbGxTcXVhcmUgIiYjeDI1RkI7Ij48IUVOVElUWSBGaWxsZWRTbWF=
sbFNxdWFyZSAiJiN4MjVGQzsiPjwhRU5USVRZIHN0YXJmICImI3gyNjA1OyI%2BPCFFTlRJVF=
kgYmlnc3RhciAiJiN4MjYwNTsiPjwhRU5USVRZIHN0YXIgIiYjeDI2MDY7Ij48IUVOVElUWSB=
waG9uZSAiJiN4MjYwRTsiPjwhRU5USVRZIGZlbWFsZSAiJiN4MjY0MDsiPjwhRU5USVRZIG1h=
bGUgIiYjeDI2NDI7Ij48IUVOVElUWSBzcGFkZXMgIiYjeDI2NjA7Ij48IUVOVElUWSBzcGFkZ=
XN1aXQgIiYjeDI2NjA7Ij48IUVOVElUWSBjbHVicyAiJiN4MjY2MzsiPjwhRU5USVRZIGNsdW=
JzdWl0ICImI3gyNjYzOyI%2BPCFFTlRJVFkgaGVhcnRzICImI3gyNjY1OyI%2BPCFFTlRJVFk=
gaGVhcnRzdWl0ICImI3gyNjY1OyI%2BPCFFTlRJVFkgZGlhbXMgIiYjeDI2NjY7Ij48IUVOVE=
lUWSBkaWFtb25kc3VpdCAiJiN4MjY2NjsiPjwhRU5USVRZIHN1bmcgIiYjeDI2NkE7Ij48IUV=
OVElUWSBmbGF0ICImI3gyNjZEOyI%2BPCFFTlRJVFkgbmF0dXIgIiYjeDI2NkU7Ij48IUVOVE=
lUWSBuYXR1cmFsICImI3gyNjZFOyI%2BPCFFTlRJVFkgc2hhcnAgIiYjeDI2NkY7Ij48IUVOV=
ElUWSBjaGVjayAiJiN4MjcxMzsiPjwhRU5USVRZIGNoZWNrbWFyayAiJiN4MjcxMzsiPjwhRU=
5USVRZIGNyb3NzICImI3gyNzE3OyI%2BPCFFTlRJVFkgbWFsdCAiJiN4MjcyMDsiPjwhRU5US=
VRZIG1hbHRlc2UgIiYjeDI3MjA7Ij48IUVOVElUWSBzZXh0ICImI3gyNzM2OyI%2BPCFFTlRJ=
VFkgVmVydGljYWxTZXBhcmF0b3IgIiYjeDI3NTg7Ij48IUVOVElUWSBsYmJyayAiJiN4Mjc3M=
jsiPjwhRU5USVRZIHJiYnJrICImI3gyNzczOyI%2BPCFFTlRJVFkgYnNvbGhzdWIgIiYjeDI3=
Qzg7Ij48IUVOVElUWSBzdXBoc29sICImI3gyN0M5OyI%2BPCFFTlRJVFkgbG9icmsgIiYjeDI=
3RTY7Ij48IUVOVElUWSBMZWZ0RG91YmxlQnJhY2tldCAiJiN4MjdFNjsiPjwhRU5USVRZIHJv=
YnJrICImI3gyN0U3OyI%2BPCFFTlRJVFkgUmlnaHREb3VibGVCcmFja2V0ICImI3gyN0U3OyI=
%2BPCFFTlRJVFkgbGFuZyAiJiN4MjdFODsiPjwhRU5USVRZIExlZnRBbmdsZUJyYWNrZXQgIi=
YjeDI3RTg7Ij48IUVOVElUWSBsYW5nbGUgIiYjeDI3RTg7Ij48IUVOVElUWSByYW5nICImI3g=
yN0U5OyI%2BPCFFTlRJVFkgUmlnaHRBbmdsZUJyYWNrZXQgIiYjeDI3RTk7Ij48IUVOVElUWS=
ByYW5nbGUgIiYjeDI3RTk7Ij48IUVOVElUWSBMYW5nICImI3gyN0VBOyI%2BPCFFTlRJVFkgU=
mFuZyAiJiN4MjdFQjsiPjwhRU5USVRZIGxvYW5nICImI3gyN0VDOyI%2BPCFFTlRJVFkgcm9h=
bmcgIiYjeDI3RUQ7Ij48IUVOVElUWSB4bGFyciAiJiN4MjdGNTsiPjwhRU5USVRZIGxvbmdsZ=
WZ0YXJyb3cgIiYjeDI3RjU7Ij48IUVOVElUWSBMb25nTGVmdEFycm93ICImI3gyN0Y1OyI%2B=
PCFFTlRJVFkgeHJhcnIgIiYjeDI3RjY7Ij48IUVOVElUWSBsb25ncmlnaHRhcnJvdyAiJiN4M=
jdGNjsiPjwhRU5USVRZIExvbmdSaWdodEFycm93ICImI3gyN0Y2OyI%2BPCFFTlRJVFkgeGhh=
cnIgIiYjeDI3Rjc7Ij48IUVOVElUWSBsb25nbGVmdHJpZ2h0YXJyb3cgIiYjeDI3Rjc7Ij48I=
UVOVElUWSBMb25nTGVmdFJpZ2h0QXJyb3cgIiYjeDI3Rjc7Ij48IUVOVElUWSB4bEFyciAiJi=
N4MjdGODsiPjwhRU5USVRZIExvbmdsZWZ0YXJyb3cgIiYjeDI3Rjg7Ij48IUVOVElUWSBEb3V=
ibGVMb25nTGVmdEFycm93ICImI3gyN0Y4OyI%2BPCFFTlRJVFkgeHJBcnIgIiYjeDI3Rjk7Ij=
48IUVOVElUWSBMb25ncmlnaHRhcnJvdyAiJiN4MjdGOTsiPjwhRU5USVRZIERvdWJsZUxvbmd=
SaWdodEFycm93ICImI3gyN0Y5OyI%2BPCFFTlRJVFkgeGhBcnIgIiYjeDI3RkE7Ij48IUVOVE=
lUWSBMb25nbGVmdHJpZ2h0YXJyb3cgIiYjeDI3RkE7Ij48IUVOVElUWSBEb3VibGVMb25nTGV=
mdFJpZ2h0QXJyb3cgIiYjeDI3RkE7Ij48IUVOVElUWSB4bWFwICImI3gyN0ZDOyI%2BPCFFTl=
RJVFkgbG9uZ21hcHN0byAiJiN4MjdGQzsiPjwhRU5USVRZIGR6aWdyYXJyICImI3gyN0ZGOyI=
%2BPCFFTlRJVFkgbnZsQXJyICImI3gyOTAyOyI%2BPCFFTlRJVFkgbnZyQXJyICImI3gyOTAz=
OyI%2BPCFFTlRJVFkgbnZIYXJyICImI3gyOTA0OyI%2BPCFFTlRJVFkgTWFwICImI3gyOTA1O=
yI%2BPCFFTlRJVFkgbGJhcnIgIiYjeDI5MEM7Ij48IUVOVElUWSByYmFyciAiJiN4MjkwRDsi=
PjwhRU5USVRZIGJrYXJvdyAiJiN4MjkwRDsiPjwhRU5USVRZIGxCYXJyICImI3gyOTBFOyI%2=
BPCFFTlRJVFkgckJhcnIgIiYjeDI5MEY7Ij48IUVOVElUWSBkYmthcm93ICImI3gyOTBGOyI%=
2BPCFFTlRJVFkgUkJhcnIgIiYjeDI5MTA7Ij48IUVOVElUWSBkcmJrYXJvdyAiJiN4MjkxMDs=
iPjwhRU5USVRZIEREb3RyYWhkICImI3gyOTExOyI%2BPCFFTlRJVFkgVXBBcnJvd0JhciAiJi=
N4MjkxMjsiPjwhRU5USVRZIERvd25BcnJvd0JhciAiJiN4MjkxMzsiPjwhRU5USVRZIFJhcnJ=
0bCAiJiN4MjkxNjsiPjwhRU5USVRZIGxhdGFpbCAiJiN4MjkxOTsiPjwhRU5USVRZIHJhdGFp=
bCAiJiN4MjkxQTsiPjwhRU5USVRZIGxBdGFpbCAiJiN4MjkxQjsiPjwhRU5USVRZIHJBdGFpb=
CAiJiN4MjkxQzsiPjwhRU5USVRZIGxhcnJmcyAiJiN4MjkxRDsiPjwhRU5USVRZIHJhcnJmcy=
AiJiN4MjkxRTsiPjwhRU5USVRZIGxhcnJiZnMgIiYjeDI5MUY7Ij48IUVOVElUWSByYXJyYmZ=
zICImI3gyOTIwOyI%2BPCFFTlRJVFkgbndhcmhrICImI3gyOTIzOyI%2BPCFFTlRJVFkgbmVh=
cmhrICImI3gyOTI0OyI%2BPCFFTlRJVFkgc2VhcmhrICImI3gyOTI1OyI%2BPCFFTlRJVFkga=
GtzZWFyb3cgIiYjeDI5MjU7Ij48IUVOVElUWSBzd2FyaGsgIiYjeDI5MjY7Ij48IUVOVElUWS=
Boa3N3YXJvdyAiJiN4MjkyNjsiPjwhRU5USVRZIG53bmVhciAiJiN4MjkyNzsiPjwhRU5USVR=
ZIG5lc2VhciAiJiN4MjkyODsiPjwhRU5USVRZIHRvZWEgIiYjeDI5Mjg7Ij48IUVOVElUWSBz=
ZXN3YXIgIiYjeDI5Mjk7Ij48IUVOVElUWSB0b3NhICImI3gyOTI5OyI%2BPCFFTlRJVFkgc3d=
ud2FyICImI3gyOTJBOyI%2BPCFFTlRJVFkgcmFycmMgIiYjeDI5MzM7Ij48IUVOVElUWSBucm=
FycmMgIiYjeDI5MzM7JiN4MzM4OyI%2BPCFFTlRJVFkgY3VkYXJyciAiJiN4MjkzNTsiPjwhR=
U5USVRZIGxkY2EgIiYjeDI5MzY7Ij48IUVOVElUWSByZGNhICImI3gyOTM3OyI%2BPCFFTlRJ=
VFkgY3VkYXJybCAiJiN4MjkzODsiPjwhRU5USVRZIGxhcnJwbCAiJiN4MjkzOTsiPjwhRU5US=
VRZIGN1cmFycm0gIiYjeDI5M0M7Ij48IUVOVElUWSBjdWxhcnJwICImI3gyOTNEOyI%2BPCFF=
TlRJVFkgcmFycnBsICImI3gyOTQ1OyI%2BPCFFTlRJVFkgaGFycmNpciAiJiN4Mjk0ODsiPjw=
hRU5USVRZIFVhcnJvY2lyICImI3gyOTQ5OyI%2BPCFFTlRJVFkgbHVyZHNoYXIgIiYjeDI5NE=
E7Ij48IUVOVElUWSBsZHJ1c2hhciAiJiN4Mjk0QjsiPjwhRU5USVRZIExlZnRSaWdodFZlY3R=
vciAiJiN4Mjk0RTsiPjwhRU5USVRZIFJpZ2h0VXBEb3duVmVjdG9yICImI3gyOTRGOyI%2BPC=
FFTlRJVFkgRG93bkxlZnRSaWdodFZlY3RvciAiJiN4Mjk1MDsiPjwhRU5USVRZIExlZnRVcER=
vd25WZWN0b3IgIiYjeDI5NTE7Ij48IUVOVElUWSBMZWZ0VmVjdG9yQmFyICImI3gyOTUyOyI%=
2BPCFFTlRJVFkgUmlnaHRWZWN0b3JCYXIgIiYjeDI5NTM7Ij48IUVOVElUWSBSaWdodFVwVmV=
jdG9yQmFyICImI3gyOTU0OyI%2BPCFFTlRJVFkgUmlnaHREb3duVmVjdG9yQmFyICImI3gyOT=
U1OyI%2BPCFFTlRJVFkgRG93bkxlZnRWZWN0b3JCYXIgIiYjeDI5NTY7Ij48IUVOVElUWSBEb=
3duUmlnaHRWZWN0b3JCYXIgIiYjeDI5NTc7Ij48IUVOVElUWSBMZWZ0VXBWZWN0b3JCYXIgIi=
YjeDI5NTg7Ij48IUVOVElUWSBMZWZ0RG93blZlY3RvckJhciAiJiN4Mjk1OTsiPjwhRU5USVR=
ZIExlZnRUZWVWZWN0b3IgIiYjeDI5NUE7Ij48IUVOVElUWSBSaWdodFRlZVZlY3RvciAiJiN4=
Mjk1QjsiPjwhRU5USVRZIFJpZ2h0VXBUZWVWZWN0b3IgIiYjeDI5NUM7Ij48IUVOVElUWSBSa=
WdodERvd25UZWVWZWN0b3IgIiYjeDI5NUQ7Ij48IUVOVElUWSBEb3duTGVmdFRlZVZlY3Rvci=
AiJiN4Mjk1RTsiPjwhRU5USVRZIERvd25SaWdodFRlZVZlY3RvciAiJiN4Mjk1RjsiPjwhRU5=
USVRZIExlZnRVcFRlZVZlY3RvciAiJiN4Mjk2MDsiPjwhRU5USVRZIExlZnREb3duVGVlVmVj=
dG9yICImI3gyOTYxOyI%2BPCFFTlRJVFkgbEhhciAiJiN4Mjk2MjsiPjwhRU5USVRZIHVIYXI=
gIiYjeDI5NjM7Ij48IUVOVElUWSBySGFyICImI3gyOTY0OyI%2BPCFFTlRJVFkgZEhhciAiJi=
N4Mjk2NTsiPjwhRU5USVRZIGx1cnVoYXIgIiYjeDI5NjY7Ij48IUVOVElUWSBsZHJkaGFyICI=
mI3gyOTY3OyI%2BPCFFTlRJVFkgcnVsdWhhciAiJiN4Mjk2ODsiPjwhRU5USVRZIHJkbGRoYX=
IgIiYjeDI5Njk7Ij48IUVOVElUWSBsaGFydWwgIiYjeDI5NkE7Ij48IUVOVElUWSBsbGhhcmQ=
gIiYjeDI5NkI7Ij48IUVOVElUWSByaGFydWwgIiYjeDI5NkM7Ij48IUVOVElUWSBscmhhcmQg=
IiYjeDI5NkQ7Ij48IUVOVElUWSB1ZGhhciAiJiN4Mjk2RTsiPjwhRU5USVRZIFVwRXF1aWxpY=
nJpdW0gIiYjeDI5NkU7Ij48IUVOVElUWSBkdWhhciAiJiN4Mjk2RjsiPjwhRU5USVRZIFJldm=
Vyc2VVcEVxdWlsaWJyaXVtICImI3gyOTZGOyI%2BPCFFTlRJVFkgUm91bmRJbXBsaWVzICImI=
3gyOTcwOyI%2BPCFFTlRJVFkgZXJhcnIgIiYjeDI5NzE7Ij48IUVOVElUWSBzaW1yYXJyICIm=
I3gyOTcyOyI%2BPCFFTlRJVFkgbGFycnNpbSAiJiN4Mjk3MzsiPjwhRU5USVRZIHJhcnJzaW0=
gIiYjeDI5NzQ7Ij48IUVOVElUWSByYXJyYXAgIiYjeDI5NzU7Ij48IUVOVElUWSBsdGxhcnIg=
IiYjeDI5NzY7Ij48IUVOVElUWSBndHJhcnIgIiYjeDI5Nzg7Ij48IUVOVElUWSBzdWJyYXJyI=
CImI3gyOTc5OyI%2BPCFFTlRJVFkgc3VwbGFyciAiJiN4Mjk3QjsiPjwhRU5USVRZIGxmaXNo=
dCAiJiN4Mjk3QzsiPjwhRU5USVRZIHJmaXNodCAiJiN4Mjk3RDsiPjwhRU5USVRZIHVmaXNod=
CAiJiN4Mjk3RTsiPjwhRU5USVRZIGRmaXNodCAiJiN4Mjk3RjsiPjwhRU5USVRZIGxvcGFyIC=
ImI3gyOTg1OyI%2BPCFFTlRJVFkgcm9wYXIgIiYjeDI5ODY7Ij48IUVOVElUWSBsYnJrZSAiJ=
iN4Mjk4QjsiPjwhRU5USVRZIHJicmtlICImI3gyOThDOyI%2BPCFFTlRJVFkgbGJya3NsdSAi=
JiN4Mjk4RDsiPjwhRU5USVRZIHJicmtzbGQgIiYjeDI5OEU7Ij48IUVOVElUWSBsYnJrc2xkI=
CImI3gyOThGOyI%2BPCFFTlRJVFkgcmJya3NsdSAiJiN4Mjk5MDsiPjwhRU5USVRZIGxhbmdk=
ICImI3gyOTkxOyI%2BPCFFTlRJVFkgcmFuZ2QgIiYjeDI5OTI7Ij48IUVOVElUWSBscGFybHQ=
gIiYjeDI5OTM7Ij48IUVOVElUWSBycGFyZ3QgIiYjeDI5OTQ7Ij48IUVOVElUWSBndGxQYXIg=
IiYjeDI5OTU7Ij48IUVOVElUWSBsdHJQYXIgIiYjeDI5OTY7Ij48IUVOVElUWSB2emlnemFnI=
CImI3gyOTlBOyI%2BPCFFTlRJVFkgdmFuZ3J0ICImI3gyOTlDOyI%2BPCFFTlRJVFkgYW5ncn=
R2YmQgIiYjeDI5OUQ7Ij48IUVOVElUWSBhbmdlICImI3gyOUE0OyI%2BPCFFTlRJVFkgcmFuZ=
2UgIiYjeDI5QTU7Ij48IUVOVElUWSBkd2FuZ2xlICImI3gyOUE2OyI%2BPCFFTlRJVFkgdXdh=
bmdsZSAiJiN4MjlBNzsiPjwhRU5USVRZIGFuZ21zZGFhICImI3gyOUE4OyI%2BPCFFTlRJVFk=
gYW5nbXNkYWIgIiYjeDI5QTk7Ij48IUVOVElUWSBhbmdtc2RhYyAiJiN4MjlBQTsiPjwhRU5U=
SVRZIGFuZ21zZGFkICImI3gyOUFCOyI%2BPCFFTlRJVFkgYW5nbXNkYWUgIiYjeDI5QUM7Ij4=
8IUVOVElUWSBhbmdtc2RhZiAiJiN4MjlBRDsiPjwhRU5USVRZIGFuZ21zZGFnICImI3gyOUFF=
OyI%2BPCFFTlRJVFkgYW5nbXNkYWggIiYjeDI5QUY7Ij48IUVOVElUWSBiZW1wdHl2ICImI3g=
yOUIwOyI%2BPCFFTlRJVFkgZGVtcHR5diAiJiN4MjlCMTsiPjwhRU5USVRZIGNlbXB0eXYgIi=
YjeDI5QjI7Ij48IUVOVElUWSByYWVtcHR5diAiJiN4MjlCMzsiPjwhRU5USVRZIGxhZW1wdHl=
2ICImI3gyOUI0OyI%2BPCFFTlRJVFkgb2hiYXIgIiYjeDI5QjU7Ij48IUVOVElUWSBvbWlkIC=
ImI3gyOUI2OyI%2BPCFFTlRJVFkgb3BhciAiJiN4MjlCNzsiPjwhRU5USVRZIG9wZXJwICImI=
3gyOUI5OyI%2BPCFFTlRJVFkgb2xjcm9zcyAiJiN4MjlCQjsiPjwhRU5USVRZIG9kc29sZCAi=
JiN4MjlCQzsiPjwhRU5USVRZIG9sY2lyICImI3gyOUJFOyI%2BPCFFTlRJVFkgb2ZjaXIgIiY=
jeDI5QkY7Ij48IUVOVElUWSBvbHQgIiYjeDI5QzA7Ij48IUVOVElUWSBvZ3QgIiYjeDI5QzE7=
Ij48IUVOVElUWSBjaXJzY2lyICImI3gyOUMyOyI%2BPCFFTlRJVFkgY2lyRSAiJiN4MjlDMzs=
iPjwhRU5USVRZIHNvbGIgIiYjeDI5QzQ7Ij48IUVOVElUWSBic29sYiAiJiN4MjlDNTsiPjwh=
RU5USVRZIGJveGJveCAiJiN4MjlDOTsiPjwhRU5USVRZIHRyaXNiICImI3gyOUNEOyI%2BPCF=
FTlRJVFkgcnRyaWx0cmkgIiYjeDI5Q0U7Ij48IUVOVElUWSBMZWZ0VHJpYW5nbGVCYXIgIiYj=
eDI5Q0Y7Ij48IUVOVElUWSBOb3RMZWZ0VHJpYW5nbGVCYXIgIiYjeDI5Q0Y7JiN4MzM4OyI%2=
BPCFFTlRJVFkgUmlnaHRUcmlhbmdsZUJhciAiJiN4MjlEMDsiPjwhRU5USVRZIE5vdFJpZ2h0=
VHJpYW5nbGVCYXIgIiYjeDI5RDA7JiN4MzM4OyI%2BPCFFTlRJVFkgaWluZmluICImI3gyOUR=
DOyI%2BPCFFTlRJVFkgaW5maW50aWUgIiYjeDI5REQ7Ij48IUVOVElUWSBudmluZmluICImI3=
gyOURFOyI%2BPCFFTlRJVFkgZXBhcnNsICImI3gyOUUzOyI%2BPCFFTlRJVFkgc21lcGFyc2w=
gIiYjeDI5RTQ7Ij48IUVOVElUWSBlcXZwYXJzbCAiJiN4MjlFNTsiPjwhRU5USVRZIGxvemYg=
IiYjeDI5RUI7Ij48IUVOVElUWSBibGFja2xvemVuZ2UgIiYjeDI5RUI7Ij48IUVOVElUWSBSd=
WxlRGVsYXllZCAiJiN4MjlGNDsiPjwhRU5USVRZIGRzb2wgIiYjeDI5RjY7Ij48IUVOVElUWS=
B4b2RvdCAiJiN4MkEwMDsiPjwhRU5USVRZIGJpZ29kb3QgIiYjeDJBMDA7Ij48IUVOVElUWSB=
4b3BsdXMgIiYjeDJBMDE7Ij48IUVOVElUWSBiaWdvcGx1cyAiJiN4MkEwMTsiPjwhRU5USVRZ=
IHhvdGltZSAiJiN4MkEwMjsiPjwhRU5USVRZIGJpZ290aW1lcyAiJiN4MkEwMjsiPjwhRU5US=
VRZIHh1cGx1cyAiJiN4MkEwNDsiPjwhRU5USVRZIGJpZ3VwbHVzICImI3gyQTA0OyI%2BPCFF=
TlRJVFkgeHNxY3VwICImI3gyQTA2OyI%2BPCFFTlRJVFkgYmlnc3FjdXAgIiYjeDJBMDY7Ij4=
8IUVOVElUWSBxaW50ICImI3gyQTBDOyI%2BPCFFTlRJVFkgaWlpaW50ICImI3gyQTBDOyI%2B=
PCFFTlRJVFkgZnBhcnRpbnQgIiYjeDJBMEQ7Ij48IUVOVElUWSBjaXJmbmludCAiJiN4MkExM=
DsiPjwhRU5USVRZIGF3aW50ICImI3gyQTExOyI%2BPCFFTlRJVFkgcnBwb2xpbnQgIiYjeDJB=
MTI7Ij48IUVOVElUWSBzY3BvbGludCAiJiN4MkExMzsiPjwhRU5USVRZIG5wb2xpbnQgIiYje=
DJBMTQ7Ij48IUVOVElUWSBwb2ludGludCAiJiN4MkExNTsiPjwhRU5USVRZIHF1YXRpbnQgIi=
YjeDJBMTY7Ij48IUVOVElUWSBpbnRsYXJoayAiJiN4MkExNzsiPjwhRU5USVRZIHBsdXNjaXI=
gIiYjeDJBMjI7Ij48IUVOVElUWSBwbHVzYWNpciAiJiN4MkEyMzsiPjwhRU5USVRZIHNpbXBs=
dXMgIiYjeDJBMjQ7Ij48IUVOVElUWSBwbHVzZHUgIiYjeDJBMjU7Ij48IUVOVElUWSBwbHVzc=
2ltICImI3gyQTI2OyI%2BPCFFTlRJVFkgcGx1c3R3byAiJiN4MkEyNzsiPjwhRU5USVRZIG1j=
b21tYSAiJiN4MkEyOTsiPjwhRU5USVRZIG1pbnVzZHUgIiYjeDJBMkE7Ij48IUVOVElUWSBsb=
3BsdXMgIiYjeDJBMkQ7Ij48IUVOVElUWSByb3BsdXMgIiYjeDJBMkU7Ij48IUVOVElUWSBDcm=
9zcyAiJiN4MkEyRjsiPjwhRU5USVRZIHRpbWVzZCAiJiN4MkEzMDsiPjwhRU5USVRZIHRpbWV=
zYmFyICImI3gyQTMxOyI%2BPCFFTlRJVFkgc21hc2hwICImI3gyQTMzOyI%2BPCFFTlRJVFkg=
bG90aW1lcyAiJiN4MkEzNDsiPjwhRU5USVRZIHJvdGltZXMgIiYjeDJBMzU7Ij48IUVOVElUW=
SBvdGltZXNhcyAiJiN4MkEzNjsiPjwhRU5USVRZIE90aW1lcyAiJiN4MkEzNzsiPjwhRU5USV=
RZIG9kaXYgIiYjeDJBMzg7Ij48IUVOVElUWSB0cmlwbHVzICImI3gyQTM5OyI%2BPCFFTlRJV=
FkgdHJpbWludXMgIiYjeDJBM0E7Ij48IUVOVElUWSB0cml0aW1lICImI3gyQTNCOyI%2BPCFF=
TlRJVFkgaXByb2QgIiYjeDJBM0M7Ij48IUVOVElUWSBpbnRwcm9kICImI3gyQTNDOyI%2BPCF=
FTlRJVFkgYW1hbGcgIiYjeDJBM0Y7Ij48IUVOVElUWSBjYXBkb3QgIiYjeDJBNDA7Ij48IUVO=
VElUWSBuY3VwICImI3gyQTQyOyI%2BPCFFTlRJVFkgbmNhcCAiJiN4MkE0MzsiPjwhRU5USVR=
ZIGNhcGFuZCAiJiN4MkE0NDsiPjwhRU5USVRZIGN1cG9yICImI3gyQTQ1OyI%2BPCFFTlRJVF=
kgY3VwY2FwICImI3gyQTQ2OyI%2BPCFFTlRJVFkgY2FwY3VwICImI3gyQTQ3OyI%2BPCFFTlR=
JVFkgY3VwYnJjYXAgIiYjeDJBNDg7Ij48IUVOVElUWSBjYXBicmN1cCAiJiN4MkE0OTsiPjwh=
RU5USVRZIGN1cGN1cCAiJiN4MkE0QTsiPjwhRU5USVRZIGNhcGNhcCAiJiN4MkE0QjsiPjwhR=
U5USVRZIGNjdXBzICImI3gyQTRDOyI%2BPCFFTlRJVFkgY2NhcHMgIiYjeDJBNEQ7Ij48IUVO=
VElUWSBjY3Vwc3NtICImI3gyQTUwOyI%2BPCFFTlRJVFkgQW5kICImI3gyQTUzOyI%2BPCFFT=
lRJVFkgT3IgIiYjeDJBNTQ7Ij48IUVOVElUWSBhbmRhbmQgIiYjeDJBNTU7Ij48IUVOVElUWS=
Bvcm9yICImI3gyQTU2OyI%2BPCFFTlRJVFkgb3JzbG9wZSAiJiN4MkE1NzsiPjwhRU5USVRZI=
GFuZHNsb3BlICImI3gyQTU4OyI%2BPCFFTlRJVFkgYW5kdiAiJiN4MkE1QTsiPjwhRU5USVRZ=
IG9ydiAiJiN4MkE1QjsiPjwhRU5USVRZIGFuZGQgIiYjeDJBNUM7Ij48IUVOVElUWSBvcmQgI=
iYjeDJBNUQ7Ij48IUVOVElUWSB3ZWRiYXIgIiYjeDJBNUY7Ij48IUVOVElUWSBzZG90ZSAiJi=
N4MkE2NjsiPjwhRU5USVRZIHNpbWRvdCAiJiN4MkE2QTsiPjwhRU5USVRZIGNvbmdkb3QgIiY=
jeDJBNkQ7Ij48IUVOVElUWSBuY29uZ2RvdCAiJiN4MkE2RDsmI3gzMzg7Ij48IUVOVElUWSBl=
YXN0ZXIgIiYjeDJBNkU7Ij48IUVOVElUWSBhcGFjaXIgIiYjeDJBNkY7Ij48IUVOVElUWSBhc=
EUgIiYjeDJBNzA7Ij48IUVOVElUWSBuYXBFICImI3gyQTcwOyYjeDMzODsiPjwhRU5USVRZIG=
VwbHVzICImI3gyQTcxOyI%2BPCFFTlRJVFkgcGx1c2UgIiYjeDJBNzI7Ij48IUVOVElUWSBFc=
2ltICImI3gyQTczOyI%2BPCFFTlRJVFkgQ29sb25lICImI3gyQTc0OyI%2BPCFFTlRJVFkgRX=
F1YWwgIiYjeDJBNzU7Ij48IUVOVElUWSBlRERvdCAiJiN4MkE3NzsiPjwhRU5USVRZIGRkb3R=
zZXEgIiYjeDJBNzc7Ij48IUVOVElUWSBlcXVpdkREICImI3gyQTc4OyI%2BPCFFTlRJVFkgbH=
RjaXIgIiYjeDJBNzk7Ij48IUVOVElUWSBndGNpciAiJiN4MkE3QTsiPjwhRU5USVRZIGx0cXV=
lc3QgIiYjeDJBN0I7Ij48IUVOVElUWSBndHF1ZXN0ICImI3gyQTdDOyI%2BPCFFTlRJVFkgbG=
VzICImI3gyQTdEOyI%2BPCFFTlRJVFkgTGVzc1NsYW50RXF1YWwgIiYjeDJBN0Q7Ij48IUVOV=
ElUWSBsZXFzbGFudCAiJiN4MkE3RDsiPjwhRU5USVRZIG5sZXMgIiYjeDJBN0Q7JiN4MzM4Oy=
I%2BPCFFTlRJVFkgTm90TGVzc1NsYW50RXF1YWwgIiYjeDJBN0Q7JiN4MzM4OyI%2BPCFFTlR=
JVFkgbmxlcXNsYW50ICImI3gyQTdEOyYjeDMzODsiPjwhRU5USVRZIGdlcyAiJiN4MkE3RTsi=
PjwhRU5USVRZIEdyZWF0ZXJTbGFudEVxdWFsICImI3gyQTdFOyI%2BPCFFTlRJVFkgZ2Vxc2x=
hbnQgIiYjeDJBN0U7Ij48IUVOVElUWSBuZ2VzICImI3gyQTdFOyYjeDMzODsiPjwhRU5USVRZ=
IE5vdEdyZWF0ZXJTbGFudEVxdWFsICImI3gyQTdFOyYjeDMzODsiPjwhRU5USVRZIG5nZXFzb=
GFudCAiJiN4MkE3RTsmI3gzMzg7Ij48IUVOVElUWSBsZXNkb3QgIiYjeDJBN0Y7Ij48IUVOVE=
lUWSBnZXNkb3QgIiYjeDJBODA7Ij48IUVOVElUWSBsZXNkb3RvICImI3gyQTgxOyI%2BPCFFT=
lRJVFkgZ2VzZG90byAiJiN4MkE4MjsiPjwhRU5USVRZIGxlc2RvdG9yICImI3gyQTgzOyI%2B=
PCFFTlRJVFkgZ2VzZG90b2wgIiYjeDJBODQ7Ij48IUVOVElUWSBsYXAgIiYjeDJBODU7Ij48I=
UVOVElUWSBsZXNzYXBwcm94ICImI3gyQTg1OyI%2BPCFFTlRJVFkgZ2FwICImI3gyQTg2OyI%=
2BPCFFTlRJVFkgZ3RyYXBwcm94ICImI3gyQTg2OyI%2BPCFFTlRJVFkgbG5lICImI3gyQTg3O=
yI%2BPCFFTlRJVFkgbG5lcSAiJiN4MkE4NzsiPjwhRU5USVRZIGduZSAiJiN4MkE4ODsiPjwh=
RU5USVRZIGduZXEgIiYjeDJBODg7Ij48IUVOVElUWSBsbmFwICImI3gyQTg5OyI%2BPCFFTlR=
JVFkgbG5hcHByb3ggIiYjeDJBODk7Ij48IUVOVElUWSBnbmFwICImI3gyQThBOyI%2BPCFFTl=
RJVFkgZ25hcHByb3ggIiYjeDJBOEE7Ij48IUVOVElUWSBsRWcgIiYjeDJBOEI7Ij48IUVOVEl=
UWSBsZXNzZXFxZ3RyICImI3gyQThCOyI%2BPCFFTlRJVFkgZ0VsICImI3gyQThDOyI%2BPCFF=
TlRJVFkgZ3RyZXFxbGVzcyAiJiN4MkE4QzsiPjwhRU5USVRZIGxzaW1lICImI3gyQThEOyI%2=
BPCFFTlRJVFkgZ3NpbWUgIiYjeDJBOEU7Ij48IUVOVElUWSBsc2ltZyAiJiN4MkE4RjsiPjwh=
RU5USVRZIGdzaW1sICImI3gyQTkwOyI%2BPCFFTlRJVFkgbGdFICImI3gyQTkxOyI%2BPCFFT=
lRJVFkgZ2xFICImI3gyQTkyOyI%2BPCFFTlRJVFkgbGVzZ2VzICImI3gyQTkzOyI%2BPCFFTl=
RJVFkgZ2VzbGVzICImI3gyQTk0OyI%2BPCFFTlRJVFkgZWxzICImI3gyQTk1OyI%2BPCFFTlR=
JVFkgZXFzbGFudGxlc3MgIiYjeDJBOTU7Ij48IUVOVElUWSBlZ3MgIiYjeDJBOTY7Ij48IUVO=
VElUWSBlcXNsYW50Z3RyICImI3gyQTk2OyI%2BPCFFTlRJVFkgZWxzZG90ICImI3gyQTk3OyI=
%2BPCFFTlRJVFkgZWdzZG90ICImI3gyQTk4OyI%2BPCFFTlRJVFkgZWwgIiYjeDJBOTk7Ij48=
IUVOVElUWSBlZyAiJiN4MkE5QTsiPjwhRU5USVRZIHNpbWwgIiYjeDJBOUQ7Ij48IUVOVElUW=
SBzaW1nICImI3gyQTlFOyI%2BPCFFTlRJVFkgc2ltbEUgIiYjeDJBOUY7Ij48IUVOVElUWSBz=
aW1nRSAiJiN4MkFBMDsiPjwhRU5USVRZIExlc3NMZXNzICImI3gyQUExOyI%2BPCFFTlRJVFk=
gTm90TmVzdGVkTGVzc0xlc3MgIiYjeDJBQTE7JiN4MzM4OyI%2BPCFFTlRJVFkgR3JlYXRlck=
dyZWF0ZXIgIiYjeDJBQTI7Ij48IUVOVElUWSBOb3ROZXN0ZWRHcmVhdGVyR3JlYXRlciAiJiN=
4MkFBMjsmI3gzMzg7Ij48IUVOVElUWSBnbGogIiYjeDJBQTQ7Ij48IUVOVElUWSBnbGEgIiYj=
eDJBQTU7Ij48IUVOVElUWSBsdGNjICImI3gyQUE2OyI%2BPCFFTlRJVFkgZ3RjYyAiJiN4MkF=
BNzsiPjwhRU5USVRZIGxlc2NjICImI3gyQUE4OyI%2BPCFFTlRJVFkgZ2VzY2MgIiYjeDJBQT=
k7Ij48IUVOVElUWSBzbXQgIiYjeDJBQUE7Ij48IUVOVElUWSBsYXQgIiYjeDJBQUI7Ij48IUV=
OVElUWSBzbXRlICImI3gyQUFDOyI%2BPCFFTlRJVFkgc210ZXMgIiYjeDJBQUM7JiN4RkUwMD=
siPjwhRU5USVRZIGxhdGUgIiYjeDJBQUQ7Ij48IUVOVElUWSBsYXRlcyAiJiN4MkFBRDsmI3h=
GRTAwOyI%2BPCFFTlRJVFkgYnVtcEUgIiYjeDJBQUU7Ij48IUVOVElUWSBwcmUgIiYjeDJBQU=
Y7Ij48IUVOVElUWSBwcmVjZXEgIiYjeDJBQUY7Ij48IUVOVElUWSBQcmVjZWRlc0VxdWFsICI=
mI3gyQUFGOyI%2BPCFFTlRJVFkgbnByZSAiJiN4MkFBRjsmI3gzMzg7Ij48IUVOVElUWSBucH=
JlY2VxICImI3gyQUFGOyYjeDMzODsiPjwhRU5USVRZIE5vdFByZWNlZGVzRXF1YWwgIiYjeDJ=
BQUY7JiN4MzM4OyI%2BPCFFTlRJVFkgc2NlICImI3gyQUIwOyI%2BPCFFTlRJVFkgc3VjY2Vx=
ICImI3gyQUIwOyI%2BPCFFTlRJVFkgU3VjY2VlZHNFcXVhbCAiJiN4MkFCMDsiPjwhRU5USVR=
ZIG5zY2UgIiYjeDJBQjA7JiN4MzM4OyI%2BPCFFTlRJVFkgbnN1Y2NlcSAiJiN4MkFCMDsmI3=
gzMzg7Ij48IUVOVElUWSBOb3RTdWNjZWVkc0VxdWFsICImI3gyQUIwOyYjeDMzODsiPjwhRU5=
USVRZIHByRSAiJiN4MkFCMzsiPjwhRU5USVRZIHNjRSAiJiN4MkFCNDsiPjwhRU5USVRZIHBy=
bkUgIiYjeDJBQjU7Ij48IUVOVElUWSBwcmVjbmVxcSAiJiN4MkFCNTsiPjwhRU5USVRZIHNjb=
kUgIiYjeDJBQjY7Ij48IUVOVElUWSBzdWNjbmVxcSAiJiN4MkFCNjsiPjwhRU5USVRZIHByYX=
AgIiYjeDJBQjc7Ij48IUVOVElUWSBwcmVjYXBwcm94ICImI3gyQUI3OyI%2BPCFFTlRJVFkgc=
2NhcCAiJiN4MkFCODsiPjwhRU5USVRZIHN1Y2NhcHByb3ggIiYjeDJBQjg7Ij48IUVOVElUWS=
Bwcm5hcCAiJiN4MkFCOTsiPjwhRU5USVRZIHByZWNuYXBwcm94ICImI3gyQUI5OyI%2BPCFFT=
lRJVFkgc2NuYXAgIiYjeDJBQkE7Ij48IUVOVElUWSBzdWNjbmFwcHJveCAiJiN4MkFCQTsiPj=
whRU5USVRZIFByICImI3gyQUJCOyI%2BPCFFTlRJVFkgU2MgIiYjeDJBQkM7Ij48IUVOVElUW=
SBzdWJkb3QgIiYjeDJBQkQ7Ij48IUVOVElUWSBzdXBkb3QgIiYjeDJBQkU7Ij48IUVOVElUWS=
BzdWJwbHVzICImI3gyQUJGOyI%2BPCFFTlRJVFkgc3VwcGx1cyAiJiN4MkFDMDsiPjwhRU5US=
VRZIHN1Ym11bHQgIiYjeDJBQzE7Ij48IUVOVElUWSBzdXBtdWx0ICImI3gyQUMyOyI%2BPCFF=
TlRJVFkgc3ViZWRvdCAiJiN4MkFDMzsiPjwhRU5USVRZIHN1cGVkb3QgIiYjeDJBQzQ7Ij48I=
UVOVElUWSBzdWJFICImI3gyQUM1OyI%2BPCFFTlRJVFkgc3Vic2V0ZXFxICImI3gyQUM1OyI%=
2BPCFFTlRJVFkgbnN1YkUgIiYjeDJBQzU7JiN4MzM4OyI%2BPCFFTlRJVFkgbnN1YnNldGVxc=
SAiJiN4MkFDNTsmI3gzMzg7Ij48IUVOVElUWSBzdXBFICImI3gyQUM2OyI%2BPCFFTlRJVFkg=
c3Vwc2V0ZXFxICImI3gyQUM2OyI%2BPCFFTlRJVFkgbnN1cEUgIiYjeDJBQzY7JiN4MzM4OyI=
%2BPCFFTlRJVFkgbnN1cHNldGVxcSAiJiN4MkFDNjsmI3gzMzg7Ij48IUVOVElUWSBzdWJzaW=
0gIiYjeDJBQzc7Ij48IUVOVElUWSBzdXBzaW0gIiYjeDJBQzg7Ij48IUVOVElUWSBzdWJuRSA=
iJiN4MkFDQjsiPjwhRU5USVRZIHN1YnNldG5lcXEgIiYjeDJBQ0I7Ij48IUVOVElUWSB2c3Vi=
bkUgIiYjeDJBQ0I7JiN4RkUwMDsiPjwhRU5USVRZIHZhcnN1YnNldG5lcXEgIiYjeDJBQ0I7J=
iN4RkUwMDsiPjwhRU5USVRZIHN1cG5FICImI3gyQUNDOyI%2BPCFFTlRJVFkgc3Vwc2V0bmVx=
cSAiJiN4MkFDQzsiPjwhRU5USVRZIHZzdXBuRSAiJiN4MkFDQzsmI3hGRTAwOyI%2BPCFFTlR=
JVFkgdmFyc3Vwc2V0bmVxcSAiJiN4MkFDQzsmI3hGRTAwOyI%2BPCFFTlRJVFkgY3N1YiAiJi=
N4MkFDRjsiPjwhRU5USVRZIGNzdXAgIiYjeDJBRDA7Ij48IUVOVElUWSBjc3ViZSAiJiN4MkF=
EMTsiPjwhRU5USVRZIGNzdXBlICImI3gyQUQyOyI%2BPCFFTlRJVFkgc3Vic3VwICImI3gyQU=
QzOyI%2BPCFFTlRJVFkgc3Vwc3ViICImI3gyQUQ0OyI%2BPCFFTlRJVFkgc3Vic3ViICImI3g=
yQUQ1OyI%2BPCFFTlRJVFkgc3Vwc3VwICImI3gyQUQ2OyI%2BPCFFTlRJVFkgc3VwaHN1YiAi=
JiN4MkFENzsiPjwhRU5USVRZIHN1cGRzdWIgIiYjeDJBRDg7Ij48IUVOVElUWSBmb3JrdiAiJ=
iN4MkFEOTsiPjwhRU5USVRZIHRvcGZvcmsgIiYjeDJBREE7Ij48IUVOVElUWSBtbGNwICImI3=
gyQURCOyI%2BPCFFTlRJVFkgRGFzaHYgIiYjeDJBRTQ7Ij48IUVOVElUWSBEb3VibGVMZWZ0V=
GVlICImI3gyQUU0OyI%2BPCFFTlRJVFkgVmRhc2hsICImI3gyQUU2OyI%2BPCFFTlRJVFkgQm=
FydiAiJiN4MkFFNzsiPjwhRU5USVRZIHZCYXIgIiYjeDJBRTg7Ij48IUVOVElUWSB2QmFydiA=
iJiN4MkFFOTsiPjwhRU5USVRZIFZiYXIgIiYjeDJBRUI7Ij48IUVOVElUWSBOb3QgIiYjeDJB=
RUM7Ij48IUVOVElUWSBiTm90ICImI3gyQUVEOyI%2BPCFFTlRJVFkgcm5taWQgIiYjeDJBRUU=
7Ij48IUVOVElUWSBjaXJtaWQgIiYjeDJBRUY7Ij48IUVOVElUWSBtaWRjaXIgIiYjeDJBRjA7=
Ij48IUVOVElUWSB0b3BjaXIgIiYjeDJBRjE7Ij48IUVOVElUWSBuaHBhciAiJiN4MkFGMjsiP=
jwhRU5USVRZIHBhcnNpbSAiJiN4MkFGMzsiPjwhRU5USVRZIHBhcnNsICImI3gyQUZEOyI%2B=
PCFFTlRJVFkgbnBhcnNsICImI3gyQUZEOyYjeDIwRTU7Ij48IUVOVElUWSBmZmxpZyAiJiN4R=
kIwMDsiPjwhRU5USVRZIGZpbGlnICImI3hGQjAxOyI%2BPCFFTlRJVFkgZmxsaWcgIiYjeEZC=
MDI7Ij48IUVOVElUWSBmZmlsaWcgIiYjeEZCMDM7Ij48IUVOVElUWSBmZmxsaWcgIiYjeEZCM=
DQ7Ij48IUVOVElUWSBBc2NyICImI3gxRDQ5QzsiPjwhRU5USVRZIENzY3IgIiYjeDFENDlFOy=
I%2BPCFFTlRJVFkgRHNjciAiJiN4MUQ0OUY7Ij48IUVOVElUWSBHc2NyICImI3gxRDRBMjsiP=
jwhRU5USVRZIEpzY3IgIiYjeDFENEE1OyI%2BPCFFTlRJVFkgS3NjciAiJiN4MUQ0QTY7Ij48=
IUVOVElUWSBOc2NyICImI3gxRDRBOTsiPjwhRU5USVRZIE9zY3IgIiYjeDFENEFBOyI%2BPCF=
FTlRJVFkgUHNjciAiJiN4MUQ0QUI7Ij48IUVOVElUWSBRc2NyICImI3gxRDRBQzsiPjwhRU5U=
SVRZIFNzY3IgIiYjeDFENEFFOyI%2BPCFFTlRJVFkgVHNjciAiJiN4MUQ0QUY7Ij48IUVOVEl=
UWSBVc2NyICImI3gxRDRCMDsiPjwhRU5USVRZIFZzY3IgIiYjeDFENEIxOyI%2BPCFFTlRJVF=
kgV3NjciAiJiN4MUQ0QjI7Ij48IUVOVElUWSBYc2NyICImI3gxRDRCMzsiPjwhRU5USVRZIFl=
zY3IgIiYjeDFENEI0OyI%2BPCFFTlRJVFkgWnNjciAiJiN4MUQ0QjU7Ij48IUVOVElUWSBhc2=
NyICImI3gxRDRCNjsiPjwhRU5USVRZIGJzY3IgIiYjeDFENEI3OyI%2BPCFFTlRJVFkgY3Njc=
iAiJiN4MUQ0Qjg7Ij48IUVOVElUWSBkc2NyICImI3gxRDRCOTsiPjwhRU5USVRZIGZzY3IgIi=
YjeDFENEJCOyI%2BPCFFTlRJVFkgaHNjciAiJiN4MUQ0QkQ7Ij48IUVOVElUWSBpc2NyICImI=
3gxRDRCRTsiPjwhRU5USVRZIGpzY3IgIiYjeDFENEJGOyI%2BPCFFTlRJVFkga3NjciAiJiN4=
MUQ0QzA7Ij48IUVOVElUWSBsc2NyICImI3gxRDRDMTsiPjwhRU5USVRZIG1zY3IgIiYjeDFEN=
EMyOyI%2BPCFFTlRJVFkgbnNjciAiJiN4MUQ0QzM7Ij48IUVOVElUWSBwc2NyICImI3gxRDRD=
NTsiPjwhRU5USVRZIHFzY3IgIiYjeDFENEM2OyI%2BPCFFTlRJVFkgcnNjciAiJiN4MUQ0Qzc=
7Ij48IUVOVElUWSBzc2NyICImI3gxRDRDODsiPjwhRU5USVRZIHRzY3IgIiYjeDFENEM5OyI%=
2BPCFFTlRJVFkgdXNjciAiJiN4MUQ0Q0E7Ij48IUVOVElUWSB2c2NyICImI3gxRDRDQjsiPjw=
hRU5USVRZIHdzY3IgIiYjeDFENENDOyI%2BPCFFTlRJVFkgeHNjciAiJiN4MUQ0Q0Q7Ij48IU=
VOVElUWSB5c2NyICImI3gxRDRDRTsiPjwhRU5USVRZIHpzY3IgIiYjeDFENENGOyI%2BPCFFT=
lRJVFkgQWZyICImI3gxRDUwNDsiPjwhRU5USVRZIEJmciAiJiN4MUQ1MDU7Ij48IUVOVElUWS=
BEZnIgIiYjeDFENTA3OyI%2BPCFFTlRJVFkgRWZyICImI3gxRDUwODsiPjwhRU5USVRZIEZmc=
iAiJiN4MUQ1MDk7Ij48IUVOVElUWSBHZnIgIiYjeDFENTBBOyI%2BPCFFTlRJVFkgSmZyICIm=
I3gxRDUwRDsiPjwhRU5USVRZIEtmciAiJiN4MUQ1MEU7Ij48IUVOVElUWSBMZnIgIiYjeDFEN=
TBGOyI%2BPCFFTlRJVFkgTWZyICImI3gxRDUxMDsiPjwhRU5USVRZIE5mciAiJiN4MUQ1MTE7=
Ij48IUVOVElUWSBPZnIgIiYjeDFENTEyOyI%2BPCFFTlRJVFkgUGZyICImI3gxRDUxMzsiPjw=
hRU5USVRZIFFmciAiJiN4MUQ1MTQ7Ij48IUVOVElUWSBTZnIgIiYjeDFENTE2OyI%2BPCFFTl=
RJVFkgVGZyICImI3gxRDUxNzsiPjwhRU5USVRZIFVmciAiJiN4MUQ1MTg7Ij48IUVOVElUWSB=
WZnIgIiYjeDFENTE5OyI%2BPCFFTlRJVFkgV2ZyICImI3gxRDUxQTsiPjwhRU5USVRZIFhmci=
AiJiN4MUQ1MUI7Ij48IUVOVElUWSBZZnIgIiYjeDFENTFDOyI%2BPCFFTlRJVFkgYWZyICImI=
3gxRDUxRTsiPjwhRU5USVRZIGJmciAiJiN4MUQ1MUY7Ij48IUVOVElUWSBjZnIgIiYjeDFENT=
IwOyI%2BPCFFTlRJVFkgZGZyICImI3gxRDUyMTsiPjwhRU5USVRZIGVmciAiJiN4MUQ1MjI7I=
j48IUVOVElUWSBmZnIgIiYjeDFENTIzOyI%2BPCFFTlRJVFkgZ2ZyICImI3gxRDUyNDsiPjwh=
RU5USVRZIGhmciAiJiN4MUQ1MjU7Ij48IUVOVElUWSBpZnIgIiYjeDFENTI2OyI%2BPCFFTlR=
JVFkgamZyICImI3gxRDUyNzsiPjwhRU5USVRZIGtmciAiJiN4MUQ1Mjg7Ij48IUVOVElUWSBs=
ZnIgIiYjeDFENTI5OyI%2BPCFFTlRJVFkgbWZyICImI3gxRDUyQTsiPjwhRU5USVRZIG5mciA=
iJiN4MUQ1MkI7Ij48IUVOVElUWSBvZnIgIiYjeDFENTJDOyI%2BPCFFTlRJVFkgcGZyICImI3=
gxRDUyRDsiPjwhRU5USVRZIHFmciAiJiN4MUQ1MkU7Ij48IUVOVElUWSByZnIgIiYjeDFENTJ=
GOyI%2BPCFFTlRJVFkgc2ZyICImI3gxRDUzMDsiPjwhRU5USVRZIHRmciAiJiN4MUQ1MzE7Ij=
48IUVOVElUWSB1ZnIgIiYjeDFENTMyOyI%2BPCFFTlRJVFkgdmZyICImI3gxRDUzMzsiPjwhR=
U5USVRZIHdmciAiJiN4MUQ1MzQ7Ij48IUVOVElUWSB4ZnIgIiYjeDFENTM1OyI%2BPCFFTlRJ=
VFkgeWZyICImI3gxRDUzNjsiPjwhRU5USVRZIHpmciAiJiN4MUQ1Mzc7Ij48IUVOVElUWSBBb=
3BmICImI3gxRDUzODsiPjwhRU5USVRZIEJvcGYgIiYjeDFENTM5OyI%2BPCFFTlRJVFkgRG9w=
ZiAiJiN4MUQ1M0I7Ij48IUVOVElUWSBFb3BmICImI3gxRDUzQzsiPjwhRU5USVRZIEZvcGYgI=
iYjeDFENTNEOyI%2BPCFFTlRJVFkgR29wZiAiJiN4MUQ1M0U7Ij48IUVOVElUWSBJb3BmICIm=
I3gxRDU0MDsiPjwhRU5USVRZIEpvcGYgIiYjeDFENTQxOyI%2BPCFFTlRJVFkgS29wZiAiJiN=
4MUQ1NDI7Ij48IUVOVElUWSBMb3BmICImI3gxRDU0MzsiPjwhRU5USVRZIE1vcGYgIiYjeDFE=
NTQ0OyI%2BPCFFTlRJVFkgT29wZiAiJiN4MUQ1NDY7Ij48IUVOVElUWSBTb3BmICImI3gxRDU=
0QTsiPjwhRU5USVRZIFRvcGYgIiYjeDFENTRCOyI%2BPCFFTlRJVFkgVW9wZiAiJiN4MUQ1NE=
M7Ij48IUVOVElUWSBWb3BmICImI3gxRDU0RDsiPjwhRU5USVRZIFdvcGYgIiYjeDFENTRFOyI=
%2BPCFFTlRJVFkgWG9wZiAiJiN4MUQ1NEY7Ij48IUVOVElUWSBZb3BmICImI3gxRDU1MDsiPj=
whRU5USVRZIGFvcGYgIiYjeDFENTUyOyI%2BPCFFTlRJVFkgYm9wZiAiJiN4MUQ1NTM7Ij48I=
UVOVElUWSBjb3BmICImI3gxRDU1NDsiPjwhRU5USVRZIGRvcGYgIiYjeDFENTU1OyI%2BPCFF=
TlRJVFkgZW9wZiAiJiN4MUQ1NTY7Ij48IUVOVElUWSBmb3BmICImI3gxRDU1NzsiPjwhRU5US=
VRZIGdvcGYgIiYjeDFENTU4OyI%2BPCFFTlRJVFkgaG9wZiAiJiN4MUQ1NTk7Ij48IUVOVElU=
WSBpb3BmICImI3gxRDU1QTsiPjwhRU5USVRZIGpvcGYgIiYjeDFENTVCOyI%2BPCFFTlRJVFk=
ga29wZiAiJiN4MUQ1NUM7Ij48IUVOVElUWSBsb3BmICImI3gxRDU1RDsiPjwhRU5USVRZIG1v=
cGYgIiYjeDFENTVFOyI%2BPCFFTlRJVFkgbm9wZiAiJiN4MUQ1NUY7Ij48IUVOVElUWSBvb3B=
mICImI3gxRDU2MDsiPjwhRU5USVRZIHBvcGYgIiYjeDFENTYxOyI%2BPCFFTlRJVFkgcW9wZi=
AiJiN4MUQ1NjI7Ij48IUVOVElUWSByb3BmICImI3gxRDU2MzsiPjwhRU5USVRZIHNvcGYgIiY=
jeDFENTY0OyI%2BPCFFTlRJVFkgdG9wZiAiJiN4MUQ1NjU7Ij48IUVOVElUWSB1b3BmICImI3=
gxRDU2NjsiPjwhRU5USVRZIHZvcGYgIiYjeDFENTY3OyI%2BPCFFTlRJVFkgd29wZiAiJiN4M=
UQ1Njg7Ij48IUVOVElUWSB4b3BmICImI3gxRDU2OTsiPjwhRU5USVRZIHlvcGYgIiYjeDFENT=
ZBOyI%2BPCFFTlRJVFkgem9wZiAiJiN4MUQ1NkI7Ij4%3D>the URL given by this l=
ink</a>. (This
+  URL is a DTD containing the <a href=3Dhttp://www.w3.org/TR/xml/#sec=
-entity-decl>entity
+  declarations</a> for the names listed in the <a href=3D#named=
-character-references>named character references</a> section.) &=
lt;a href=3D#refsXML>[XML]</a></p>
+
+  <ul class=3Dbrief><li><code title=3D"">-//=
W3C//DTD XHTML 1.0 Transitional//EN</code&g=
t;</li>
+   <li><code title=3D"">-//W3C//DTD XHTML=
 1.1//EN</code></li>
+   <li><code title=3D"">-//W3C//DTD XHTML=
 1.0 Strict//EN</code></li>
+   <li><code title=3D"">-//W3C//DTD XHTML=
 1.0 Frameset//EN</code></li>
+   <li><code title=3D"">-//W3C//DTD XHTML=
 Basic 1.0//EN</code></li>
+   <li><code title=3D"">-//W3C//DTD XHTML=
 1.1 plus MathML 2.0//EN</code>=
</li>
+   <li><code title=3D"">-//W3C//DTD XHTML=
 1.1 plus MathML 2.0 plus&am=
p;nbsp;SVG 1.1//EN</code></li>
+   <li><code title=3D"">-//W3C//DTD MathM=
L 2.0//EN</code></li>
+   <li><code title=3D"">-//WAPFORUM//DTD =
XHTML Mobile 1.0//EN</code></li>
+  </ul><p>Furthermore, user agents should attempt to retriev=
e 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.</p>
+
+  <p class=3Dnote>This is not strictly a <a href=3D#willful-vio=
lation title=3D"willful violation">violation</a> of th=
e XML
+  specification, but it does contradict the spirit of the XML specificat=
ion's requirements. This is
+  motivated by a desire for user agents to all handle entities in an int=
eroperable fashion without
+  requiring any network access for handling external subsets. <a href=
=3D#refsXML>[XML]</a></p>
+
+  <p id=3DscriptTagXML>When an <a href=3D#xml-parser>XML par=
ser</a> creates a <code><a href=3D#the-script-element>s=
cript</a></code> element, it
+  must be marked as being <a href=3D#parser-inserted>"parser-=
inserted"</a> and its <a href=3D#force-async>"force=
-async"</a> flag
+  must be unset. If the parser was originally created for the <a href=
=3D#xml-fragment-parsing-algorithm>XML fragment parsing
+  algorithm</a>, then the element must be marked as <a href=3D#=
already-started>"already started"</a> also. When the
+  element's end tag is parsed, the user agent must <a href=3D#perform=
-a-microtask-checkpoint>perform a microtask checkpoint</a>,
+  <a href=3D#provide-a-stable-state>provide a stable state</a&g=
t;, and then <a href=3D#prepare-a-script title=3D"prepare a scrip=
t">prepare</a> the
+  <code><a href=3D#the-script-element>script</a></c=
ode> element. If this causes there to be a <a href=3D#pending-parsi=
ng-blocking-script>pending parsing-blocking
+  script</a>, then the user agent must run the following steps:&lt=
;/p>
+
+  <ol><li><p>Block this instance of the <a href=3D#=
xml-parser>XML parser</a>, such that the <a href=3D#event-loo=
p>event loop</a>
+   will not run <a href=3D#concept-task title=3Dconcept-task>tasks=
</a> that invoke it.</li>
+
+   <li><p><a href=3D#spin-the-event-loop>Spin the even=
t loop</a> until the parser's <code><a href=3D#document&gt=
;Document</a></code> <a href=3D#has-no-style-sheet-that-is=
-blocking-scripts>has no
+   style sheet that is blocking scripts</a> and the <a href=3D#=
pending-parsing-blocking-script>pending parsing-blocking
+   script</a>'s <a href=3D#ready-to-be-parser-executed>&quot=
;ready to be parser-executed"</a> flag is set.</li>
+
+   <li><p>Unblock this instance of the <a href=3D#xml-par=
ser>XML parser</a>, such that <a href=3D#concept-task title=3D=
concept-task>tasks</a> that invoke it can again be run.</li&g=
t;
+
+   <li><p><a href=3D#execute-the-script-block title=3D&qu=
ot;execute the script block">Execute</a> the <a href=3D#=
pending-parsing-blocking-script>pending parsing-blocking
+   script</a>.</li>
+
+   <li><p>There is no longer a <a href=3D#pending-parsing=
-blocking-script>pending parsing-blocking script</a>.</li>
+
+  </ol><p class=3Dnote>Since the <code title=3Ddom-docume=
nt-write><a href=3D#dom-document-write>document.write()</a&gt=
;</code> API is not
+  available for <a href=3D#xml-documents>XML documents</a>, =
much of the complexity in the <a href=3D#html-parser>HTML parser&lt=
;/a>
+  is not needed in the <a href=3D#xml-parser>XML parser</a>.=
</p>
+
+  <p id=3DtemplateTagXML>When an <a href=3D#xml-parser>XML p=
arser</a> would append a node to a
+  <code><a href=3D#the-template-element>template</a>&l=
t;/code> element, it must instead append it to the <code><a h=
ref=3D#the-template-element>template</a></code> element's
+  <a href=3D#template-contents>template contents</a> (a <=
code><a href=3D#documentfragment>DocumentFragment</a></=
code> node).</p>
+
+  <p class=3Dnote>This is a <a href=3D#willful-violation>wil=
lful violation</a> of the XML specification; unfortunately,
+  XML is not formally extensible in the manner that is needed for <co=
de><a href=3D#the-template-element>template</a></code&g=
t; processing.
+  <a href=3D#refsXML>[XML]</a></p>
+
+  <p>When an <a href=3D#xml-parser>XML parser</a> crea=
tes a <code><a href=3D#node>Node</a></code> objec=
t, its <code title=3Ddom-Node-ownerDocument><a href=3D#dom-node-=
ownerdocument>ownerDocument</a></code> must be set to the =
<code><a href=3D#document>Document</a></code> of
+  the node into which the newly created node is to be inserted.</p&gt=
;
+
+  <p>Certain algorithms in this specification <dfn id=3Dfeed-th=
e-parser title=3D"feed the parser">spoon-feed the
+  parser</dfn> characters one string at a time. In such cases, the=
 <a href=3D#xml-parser>XML parser</a> must act
+  as it would have if faced with a single string consisting of the conca=
tenation of all those
+  characters.</p>
+
+  <p>When an <a href=3D#xml-parser>XML parser</a> reac=
hes the end of its input, it must <a href=3D#stop-parsing>stop
+  parsing</a>, following the same rules as the <a href=3D#html-=
parser>HTML parser</a>. An <a href=3D#xml-parser>XML
+  parser</a> can also be <a href=3D#abort-a-parser title=3D&quo=
t;abort a parser">aborted</a>, which must again by done in
+  the same way as for an <a href=3D#html-parser>HTML parser</a&=
gt;.</p>
+
+  <p>For the purposes of conformance checkers, if a resource is de=
termined to be in <a href=3D#the-xhtml-syntax>the XHTML
+  syntax</a>, then it is an <a href=3D#xml-documents title=3D&q=
uot;XML documents">XML document</a>.</p>
+
+
+<!--//HTMLPARSER-->
+
+
+  <h3 id=3Dserializing-xhtml-fragments><span class=3Dsecno>1=
3.3 </span>Serializing XHTML fragments</h3>
+
+  <p>The <dfn id=3Dxml-fragment-serialization-algorithm>XML =
fragment serialization algorithm</dfn> for a <code><a href=
=3D#document>Document</a></code> or
+  <code><a href=3D#element>Element</a></code> no=
de either returns a fragment of XML that represents that node or throws a=
n
+  exception.</p>
+
+  <p>For <code><a href=3D#document>Document</a>&=
lt;/code>s, the algorithm must return a string in the form of a <a =
href=3Dhttp://www.w3.org/TR/xml/#sec-well-formed>document entity</a=
>, if none of the error cases
+  below apply.</p>
+
+  <p>For <code><a href=3D#element>Element</a>&lt=
;/code>s, the algorithm must return a string in the form of an <a h=
ref=3Dhttp://www.w3.org/TR/xml/#wf-entities>internal general parsed en=
tity</a>, if none of the
+  error cases below apply.</p>
+
+  <p>In both cases, the string returned must be XML namespace-well=
-formed and must be an isomorphic
+  serialization of all of that node's <a href=3D#relevant-child-nodes=
>relevant child nodes</a>, in <a href=3D#tree-order>tree o=
rder</a>.
+  User agents may adjust prefixes and namespace declarations in the seri=
alization (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 and character references to represent <=
code><a href=3D#text>Text</a></code> nodes in the
+  DOM.</p>
+
+  <p>A node's <dfn id=3Drelevant-child-nodes>relevant child =
nodes</dfn> are those that apply given the following rules:</p&g=
t;
+
+  <dl><dt>For <code><a href=3D#the-template-element=
>template</a></code> elements</dt>
+
+   <dd>The <a href=3D#relevant-child-nodes>relevant child no=
des</a> are the child nodes of the <code><a href=3D#the-te=
mplate-element>template</a></code>
+   element's <a href=3D#template-contents>template contents</a&=
gt;, if any.</dd>
+
+   <dt>For all other nodes</dt>
+
+   <dd>The <a href=3D#relevant-child-nodes>relevant child no=
des</a> are the child nodes of node itself, if any.</dd>
+
+  </dl><p>For <code><a href=3D#element>Element&l=
t;/a></code>s, if any of the elements in the serialization are i=
n no namespace, the
+  default namespace in scope for those elements must be explicitly decla=
red as the empty string.<!--
+  because otherwise round-tripping might break since it'll pick up the s=
urrounding default ns when
+  setting --> (This doesn't apply in the <code><a href=3D#do=
cument>Document</a></code> case.) <a href=3D#refsXML&gt=
;[XML]</a>
+  <a href=3D#refsXMLNS>[XMLNS]</a></p>
+
+  <p>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 n=
amespace declarations whose
+  contents are the internal general parsed entity would itself be XML na=
mespace-well-formed.</p>
+
+  <p>If any of the following error cases are found in the DOM subt=
ree being serialized, then the
+  algorithm must throw an <code><a href=3D#invalidstateerror&gt=
;InvalidStateError</a></code> exception instead of returning =
a
+  string:</p>
+
+  <ul><li>A <code><a href=3D#document>Document&l=
t;/a></code> node with no child element nodes.</li>
+
+   <li>A <code><a href=3D#documenttype>DocumentType&lt=
;/a></code> node that has an external subset public identifier t=
hat contains
+   characters that are not matched by the XML <code title=3D"&qu=
ot;>PubidChar</code> production. <a href=3D#refsXML>[XML]&=
lt;/a></li>
+
+   <li>A <code><a href=3D#documenttype>DocumentType&lt=
;/a></code> node that has an external subset system identifier t=
hat contains
+   both a U+0022 QUOTATION MARK (") and a U+0027 APOSTROPHE (') or =
that contains characters that are
+   not matched by the XML <code title=3D"">Char</code=
> production. <a href=3D#refsXML>[XML]</a></li>
+
+   <li>A node with a <!--prefix or--> local name containing =
a U+003A COLON (:).</li> <!--(prefixes
+   can get adjusted, so this isn't an excuse) -->
+
+   <li>A node with a <!--prefix or--> local name that does n=
ot match the XML <code title=3D"">Name</code> produ=
ction. <a href=3D#refsXML>[XML]</a></li> <!--(again,=
 prefixes can get
+   adjusted, so this isn't an excuse) -->
+
+   <li>An <code><a href=3D#attr>Attr</a></cod=
e> node with no namespace whose local name is the lowercase string &qu=
ot;<code title=3D"">xmlns</code>". <a href=3D=
#refsXMLNS>[XMLNS]</a></li>
+
+   <li>An <code><a href=3D#element>Element</a>&l=
t;/code> node with two or more attributes with the same local name and
+   namespace.</li>
+
+   <li>An <code><a href=3D#attr>Attr</a></cod=
e> node, <code><a href=3D#text>Text</a></code>=
 node, <code><a href=3D#comment-0>Comment</a></code&=
gt; node, or
+   <code><a href=3D#processinginstruction>ProcessingInstruct=
ion</a></code> node whose data contains characters that are n=
ot matched by
+   the XML <code title=3D"">Char</code> production=
. <a href=3D#refsXML>[XML]</a></li>
+
+   <li>A <code><a href=3D#comment-0>Comment</a>&=
lt;/code> node whose data contains two adjacent U+002D HYPHEN-MINUS ch=
aracters
+   (-) or ends with such a character.</li>
+
+   <li>A <code><a href=3D#processinginstruction>Proces=
singInstruction</a></code> node whose target name is an <a=
 href=3D#ascii-case-insensitive>ASCII
+   case-insensitive</a> match for the string "<code title=3D=
"">xml</code>".</li>
+
+   <li>A <code><a href=3D#processinginstruction>Proces=
singInstruction</a></code> node whose target name contains a =
U+003A COLON (:).</li>
+
+   <li>A <code><a href=3D#processinginstruction>Proces=
singInstruction</a></code> node whose data contains the strin=
g "<code title=3D"">?></code>".&lt=
;/li>
+
+  </ul><p class=3Dnote>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=
 <code><a href=3D#document>Document</a></code> no=
de
+  will throw a <code><a href=3D#hierarchyrequesterror>Hierar=
chyRequestError</a></code> exception.</p>
+
+
+
+  <h3 id=3Dparsing-xhtml-fragments><span class=3Dsecno>13.4 =
</span>Parsing XHTML fragments</h3>
+
+  <p>The <dfn id=3Dxml-fragment-parsing-algorithm>XML fragme=
nt parsing algorithm</dfn> either returns a <code><a href=3D=
#document>Document</a></code> or throws
+  a <code><a href=3D#syntaxerror>SyntaxError</a></c=
ode> exception. Given a string <var title=3D"">input&l=
t;/var> and an optional
+  context element <var title=3Dconcept-frag-parse-context><a hr=
ef=3D#concept-frag-parse-context>context</a></var>, the al=
gorithm is as
+  follows:</p>
+
+  <ol><li>
+
+    <p>Create a new <a href=3D#xml-parser>XML parser</a&g=
t;.</p>
+
+   </li>
+
+   <li>
+
+    <p>If there is a <var title=3Dconcept-frag-parse-context&gt=
;<a href=3D#concept-frag-parse-context>context</a></var&gt=
; element, <a href=3D#feed-the-parser>feed the
+    parser</a> 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 t=
he DOM.</p>
+
+    <p>A namespace prefix is in scope if the DOM <code title=3D=
"">lookupNamespaceURI()</code> method
+    on the element would return a non-null value for that prefix.</p&=
gt;
+
+    <p>The default namespace is the namespace for which the DOM &l=
t;code title=3D"">isDefaultNamespace()</code> method o=
n the element would return true.</p>
+
+    <p class=3Dnote>If there is a <var title=3Dconcept-frag-par=
se-context><a href=3D#concept-frag-parse-context>context</a&g=
t;</var> element, no
+    <code title=3D"">DOCTYPE</code> is passed to t=
he parser, and therefore no external subset is
+    referenced, and therefore no entities will be recognized.</p>
+
+   </li>
+
+   <li>
+
+    <p><a href=3D#feed-the-parser>Feed the parser</a> =
just created the string <var title=3D"">input</var>=
.</p>
+
+   </li>
+
+   <li>
+
+    <p>If there is a <var title=3Dconcept-frag-parse-context&gt=
;<a href=3D#concept-frag-parse-context>context</a></var&gt=
; element, <a href=3D#feed-the-parser>feed the
+    parser</a> just created the string corresponding to the end ta=
g of that element.</p>
+
+   </li>
+
+   <li>
+
+    <p>If there is an XML well-formedness or XML namespace well-fo=
rmedness error, then throw a
+    <code><a href=3D#syntaxerror>SyntaxError</a></c=
ode> exception and abort these steps.</p>
+
+   </li>
+
+   <li>
+
+    <p>If there is a <var title=3Dconcept-frag-parse-context&gt=
;<a href=3D#concept-frag-parse-context>context</a></var&gt=
; element, and the root
+    element of the resulting <code><a href=3D#document>Docum=
ent</a></code> has any sibling nodes, then throw a
+    <code><a href=3D#syntaxerror>SyntaxError</a></c=
ode> exception and abort these steps.</p>
+
+    <!-- http://software.hixie.ch/utilities/js/live-dom-viewer/saved/=
1443 -->
+
+   </li>
+
+   <li>
+
+    <p>If there is a <var title=3Dconcept-frag-parse-context&gt=
;<a href=3D#concept-frag-parse-context>context</a></var&gt=
; element, then return the
+    child nodes of the root element of the resulting <code><a h=
ref=3D#document>Document</a></code>, in <a href=3D#tree=
-order>tree
+    order</a>.</p>
+
+    <p>Otherwise, return the children of the <code><a hre=
f=3D#document>Document</a></code> object, in <a href=3D=
#tree-order>tree
+    order</a>.</p>
+
+   </li>
+
+  </ol></div>
+
+
+<!--TOPIC:Rendering-->
+
+  <div class=3Dimpl>
+
+  <h2 id=3Drendering><span class=3Dsecno>14 </span>Ren=
dering</h2>
+
+  <p><i>User agents are not required to present HTML documen=
ts in any particular way. However, this
+  section provides a set of suggestions for rendering HTML documents tha=
t, if followed, are likely
+  to lead to a user experience that closely resembles the experience int=
ended by the documents'
+  authors. So as to avoid confusion regarding the normativity of this se=
ction, RFC2119 terms have
+  not been used. Instead, the term "expected" is used to indic=
ate behavior that will lead to this
+  experience. For the purposes of conformance for user agents designated=
 as <a href=3D#renderingUA>supporting the suggested default renderi=
ng</a>, the term "expected" in this
+  section has the same conformance implications as the RFC2119-defined t=
erm "must".</i></p>
+
+
+  <h3 id=3Dintroduction-13><span class=3Dsecno>14.1 </spa=
n>Introduction</h3>
+
+  <p>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 present=
ation mechanisms can derive
+  their expected behavior by translating from the CSS rules given in thi=
s section.</p>
+
+  <p>In the absence of style-layer rules to the contrary (e.g. aut=
hor style sheets), user agents are
+  expected to render an element so that it conveys to the user the meani=
ng that the element
+  <a href=3D#represents>represents</a>, as described by this=
 specification.</p>
+
+  <p>The suggestions in this section generally assume a visual out=
put medium with a resolution of
+  96dpi or greater, but HTML is intended to apply to multiple media (it =
is a
+  <i>media-independent</i> language). User agent implementor=
s are encouraged to adapt the
+  suggestions in this section to their target media.</p>
+
+  <hr><p>An element is <dfn id=3Dbeing-rendered>being =
rendered</dfn> if it has any associated CSS layout boxes, SVG layou=
t
+  boxes, or some equivalent in other styling languages.</p>
+
+  <p class=3Dnote>Just being off-screen does not mean the element =
is not <a href=3D#being-rendered>being
+  rendered</a>. The presence of the <code title=3Dattr-hidden&g=
t;<a href=3D#the-hidden-attribute>hidden</a></code> att=
ribute normally
+  means the element is not <a href=3D#being-rendered>being rendere=
d</a>, though this might be overridden by the style
+  sheets.</p>
+
+  <hr><p>User agents that do not honor author-level CSS styl=
e sheets are nonetheless expected to act as
+  if they applied the CSS rules given in these sections in a manner cons=
istent with this
+  specification and the relevant CSS and Unicode specifications. <a h=
ref=3D#refsCSS>[CSS]</a> <a href=3D#refsUNICODE>[UNICODE]&=
lt;/a> <a href=3D#refsBIDI>[BIDI]</a></p>
+
+  <p class=3Dnote>This is especially important for issues relating=
 to the 'display', 'unicode-bidi',
+  and 'direction' properties.</p>
+
+
+
+  <h3 id=3Dthe-css-user-agent-style-sheet-and-presentational-hints&gt=
;<span class=3Dsecno>14.2 </span>The CSS user agent style she=
et and presentational hints</h3>
+
+  <p>The CSS rules given in these subsections are, except where ot=
herwise specified, expected to be
+  used as part of the user-agent level style sheet defaults for all docu=
ments that contain
+  <a href=3D#html-elements>HTML elements</a>.</p>
+
+  <p>Some rules are intended for the author-level zero-specificity=
 presentational hints part of the
+  CSS cascade; these are explicitly called out as <dfn id=3Dpresentat=
ional-hints>presentational hints</dfn>.</p>
+
+  <p>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 ar=
ound on elements whose
+  'direction' property is 'rtl'. These are marked "<dfn id=3Dltr=
-specific>LTR-specific</dfn>".</p>
+
+  <p class=3Dnote>These markings only affect the handling of attri=
bute <em>values</em>, not
+  attribute names or element names.</p>
+
+  <hr><p>When the text below says that an attribute <var =
title=3D"">attribute</var> on an element <var title=
=3D"">element</var> <dfn id=3Dmaps-to-the-pixel-len=
gth-property>maps to the pixel length property</dfn> (or propert=
ies) <var title=3D"">properties</var>, it means tha=
t if <var title=3D"">element</var> has an attribute=
 <var title=3D"">attribute</var> set, and parsing t=
hat attribute's value using the <a href=3D#rules-for-parsing-non-negat=
ive-integers>rules for parsing
+  non-negative integers</a> doesn't generate an error, then the us=
er agent is expected to use the
+  parsed value as a pixel length for a <a href=3D#presentational-hint=
s title=3D"presentational hints">presentational hint</a&g=
t;
+  for <var title=3D"">properties</var>.</p>
+
+  <p>When the text below says that an attribute <var title=3D&q=
uot;">attribute</var> on an element <var title=3D"&=
quot;>element</var> <dfn id=3Dmaps-to-the-dimension-property&=
gt;maps to the dimension property</dfn> (or properties) <var tit=
le=3D"">properties</var>, it means that if <var tit=
le=3D"">element</var> has an attribute <var title=3D=
"">attribute</var> set, and parsing that attribute's v=
alue using the <a href=3D#rules-for-parsing-dimension-values>rules =
for parsing
+  dimension values</a> doesn't generate an error, then the user ag=
ent is expected to use the
+  parsed dimension as the value for a <a href=3D#presentational-hints=
 title=3D"presentational hints">presentational hint</a&gt=
;
+  for <var title=3D"">properties</var>, with the v=
alue 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.</p>
+
+  <p>When a user agent is to <dfn id=3Dalign-descendants>ali=
gn descendants</dfn> of a node, the user agent is expected to
+  align only those descendants that have both their 'margin-left' and 'm=
argin-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 t=
hemselves have an applicable
+  <code title=3Dattr-align>align</code> attribute. When mult=
iple elements are to <a href=3D#align-descendants title=3D"align
+  descendants">align</a> a particular descendant, the most=
 deeply nested such element is expected
+  to override the others. Aligned elements are expected to be aligned by=
 having the used values of
+  their left and right margins be set accordingly.</p>
+
+
+
+  <h3 id=3Dnon-replaced-elements><span class=3Dsecno>14.3 &l=
t;/span>Non-replaced elements</h3>
+
+
+  <h4 id=3Dhidden-elements><span class=3Dsecno>14.3.1 </s=
pan>Hidden elements</h4>
+
+  <pre class=3Dcss>@namespace url(http://www.w3.org/1999/xhtml);
+
+<span id=3DhiddenCSS title=3D"">[hidden]</span>, a=
rea, base, basefont, datalist, head, link, menu[type=3Dpopup i],
+meta, noembed, noframes, param, rp, script, source, style, template, tra=
ck, title {
+  display: none;
+}
+
+embed[hidden] { display: inline; height: 0; width: 0; }</pre> <=
!-- because for legacy reasons it still needs to instantiate the plugin -=
->
+
+  <p>The user agent is expected to force the 'display' property of=
 <code><a href=3D#the-noscript-element>noscript</a><=
/code> elements
+  for whom <a href=3D#concept-n-script title=3Dconcept-n-script>sc=
ripting is enabled</a> to compute to 'none',
+  irrespective of CSS rules.</p>
+
+  <p>The user agent is expected to force the 'display' property of=
 <code><a href=3D#the-input-element>input</a></code&=
gt; elements whose
+  <code title=3Dattr-input-type><a href=3D#attr-input-type>t=
ype</a></code> attribute is in the <a href=3D"#hidden=
-state-(type=3Dhidden)" title=3Dattr-input-type-hidden>Hidden<=
/a> state to compute to 'none', irrespective of CSS
+  rules.</p>
+
+
+  <h4 id=3Dthe-page><span class=3Dsecno>14.3.2 </span>=
The page</h4>
+
+  <pre class=3Dcss>@namespace url(http://www.w3.org/1999/xhtml);
+
+html, body { display: block; }</pre>
+
+
+  <!-- body { margin: 8px; } -->
+
+  <p>For each property in the table below, given a <code>&lt=
;a href=3D#the-body-element>body</a></code> element, the f=
irst attribute
+  that exists <a href=3D#maps-to-the-pixel-length-property>maps to=
 the pixel length property</a> on the <code><a href=3D#the=
-body-element>body</a></code> element. If
+  none of the attributes for a property are found, or if the value of th=
e attribute that was found
+  cannot be parsed successfully, then, if the <code><a href=3D#=
the-body-element>body</a></code> element's <code>&lt=
;a href=3D#document>Document</a></code>'s
+  <a href=3D#browsing-context>browsing context</a> does not =
have its <a href=3D#seamless-browsing-context-flag>seamless browsin=
g context flag</a> set, a
+  default value of 8px is expected to be used for that property instead.=
</p>
+
+  <table><thead><tr><th>Property
+     <th>Source
+   <tbody><tr><td rowspan=3D3>'margin-top'
+     <td><code><a href=3D#the-body-element>body</a&=
gt;</code> element's <code title=3Dattr-body-marginheight>&lt=
;a href=3D#attr-body-marginheight>marginheight</a></code> =
attribute
+    <tr><td>The <code><a href=3D#the-body-element&g=
t;body</a></code> element's <a href=3D#container-frame-ele=
ment>container frame element</a>'s <code title=3Dattr-iframe-=
marginheight><a href=3D#attr-iframe-marginheight>marginheight&lt=
;/a></code> attribute
+    <tr><td><code><a href=3D#the-body-element>bo=
dy</a></code> element's <code title=3Dattr-body-topmargin&=
gt;topmargin</code> attribute
+   <tbody><tr><td rowspan=3D3>'margin-right'
+     <td><code><a href=3D#the-body-element>body</a&=
gt;</code> element's <code title=3Dattr-body-marginwidth><=
a href=3D#attr-body-marginwidth>marginwidth</a></code> att=
ribute
+    <tr><td>The <code><a href=3D#the-body-element&g=
t;body</a></code> element's <a href=3D#container-frame-ele=
ment>container frame element</a>'s <code title=3Dattr-iframe-=
marginwidth><a href=3D#attr-iframe-marginwidth>marginwidth</a=
></code> attribute
+    <tr><td><code><a href=3D#the-body-element>bo=
dy</a></code> element's <code title=3Dattr-body-rightmargi=
n>rightmargin</code> attribute
+   <tbody><tr><td rowspan=3D3>'margin-bottom'
+     <td><code><a href=3D#the-body-element>body</a&=
gt;</code> element's <code title=3Dattr-body-marginheight>&lt=
;a href=3D#attr-body-marginheight>marginheight</a></code> =
attribute
+    <tr><td>The <code><a href=3D#the-body-element&g=
t;body</a></code> element's <a href=3D#container-frame-ele=
ment>container frame element</a>'s <code title=3Dattr-iframe-=
marginheight><a href=3D#attr-iframe-marginheight>marginheight&lt=
;/a></code> attribute
+    <tr><td><code><a href=3D#the-body-element>bo=
dy</a></code> element's <code title=3Dattr-body-bottommarg=
in>bottommargin</code> attribute
+   <tbody><tr><td rowspan=3D3>'margin-left'
+     <td><code><a href=3D#the-body-element>body</a&=
gt;</code> element's <code title=3Dattr-body-marginwidth><=
a href=3D#attr-body-marginwidth>marginwidth</a></code> att=
ribute
+    <tr><td>The <code><a href=3D#the-body-element&g=
t;body</a></code> element's <a href=3D#container-frame-ele=
ment>container frame element</a>'s <code title=3Dattr-iframe-=
marginwidth><a href=3D#attr-iframe-marginwidth>marginwidth</a=
></code> attribute
+    <tr><td><code><a href=3D#the-body-element>bo=
dy</a></code> element's <code title=3Dattr-body-leftmargin=
>leftmargin</code> attribute
+  </table><p>If the <code><a href=3D#the-body-eleme=
nt>body</a></code> element's <code><a href=3D#doc=
ument>Document</a></code>'s <a href=3D#browsing-context=
>browsing context</a> is a
+  <a href=3D#nested-browsing-context>nested browsing context</a=
>, and the <a href=3D#browsing-context-container>browsing contex=
t container</a> of that
+  <a href=3D#nested-browsing-context>nested browsing context</a=
> is a <code><a href=3D#frame>frame</a></code>=
 or <code><a href=3D#the-iframe-element>iframe</a></=
code> element, then
+  the <dfn id=3Dcontainer-frame-element>container frame element&lt=
;/dfn> of the <code><a href=3D#the-body-element>body</a=
></code> element is that <code><a href=3D#frame>fram=
e</a></code>
+  or <code><a href=3D#the-iframe-element>iframe</a>&lt=
;/code> element. Otherwise, there is no <a href=3D#container-frame-=
element>container frame element</a>.</p>
+
+  <p class=3Dwarning>The above requirements imply that a page can =
change the margins of another page
+  (including one from another <a href=3D#origin>origin</a>) =
using, for example, an <code><a href=3D#the-iframe-element>if=
rame</a></code>. This
+  is potentially a security risk, as it might in some cases allow an att=
ack to contrive a situation
+  in which a page is rendered not as the author intended, possibly for t=
he purposes of phishing or
+  otherwise misleading the user.</p>
+
+  <hr><p>If the <code><a href=3D#document>Docume=
nt</a></code> has a <a href=3D#root-element>root elemen=
t</a>, and the <code><a href=3D#document>Document</a=
></code>'s
+  <a href=3D#browsing-context>browsing context</a> is a <=
a href=3D#nested-browsing-context>nested browsing context</a>, a=
nd the <a href=3D#browsing-context-container>browsing
+  context container</a> of that <a href=3D#nested-browsing-cont=
ext>nested browsing context</a> is a <code><a href=3D#f=
rame>frame</a></code> or
+  <code><a href=3D#the-iframe-element>iframe</a></c=
ode> element, and that element has a <code title=3Dattr-frames-scro=
lling>scrolling</code> attribute, then the user agent is expecte=
d to
+  compare the value of the attribute in an <a href=3D#ascii-case-inse=
nsitive>ASCII case-insensitive</a> 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 <a href=3D#presentational-hin=
ts title=3D"presentational hints">presentational
+  hint</a> for the aforementioned root element's 'overflow' proper=
ty, setting it to the value
+  given in the corresponding cell on the same row in the second column:&=
lt;/p>
+
+  <table><thead><tr><th> Attribute value
+     <th> 'overflow' value
+   <tbody><tr><td><code title=3D"">on&=
lt;/code>
+     <td>'scroll'
+    <tr><td><code title=3D"">scroll</code=
>
+     <td>'scroll'
+    <tr><td><code title=3D"">yes</code&gt=
;
+     <td>'scroll'
+    <tr><td><code title=3D"">off</code&gt=
;
+     <td>'hidden'
+    <tr><td><code title=3D"">noscroll</co=
de>
+     <td>'hidden'
+    <tr><td><code title=3D"">no</code>
+     <td>'hidden'
+    <tr><td><code title=3D"">auto</code&g=
t;
+     <td>'auto'
+  </table><hr><p>When a <code><a href=3D#the-=
body-element>body</a></code> element has a <code title=3D=
attr-background><a href=3D#attr-background>background</a>&=
lt;/code>
+  attribute set to a non-empty value, the new value is expected to be &l=
t;a href=3D#resolve-a-url title=3D"resolve a
+  url">resolved</a> relative to the element, and if this i=
s successful, the user agent is
+  expected to treat the attribute as a <a href=3D#presentational-hint=
s title=3D"presentational hints">presentational hint</a&g=
t;
+  setting the element's 'background-image' property to the resulting &lt=
;a href=3D#absolute-url>absolute URL</a>.</p>
+
+  <p>When a <code><a href=3D#the-body-element>body<=
/a></code> element has a <code title=3Dattr-body-bgcolor>&=
lt;a href=3D#attr-body-bgcolor>bgcolor</a></code> attribut=
e
+  set, the new value is expected to be parsed using the <a href=3D#ru=
les-for-parsing-a-legacy-color-value>rules for parsing a legacy color
+  value</a>, and if that does not return an error, the user agent =
is expected to treat the
+  attribute as a <a href=3D#presentational-hints title=3D"presen=
tational hints">presentational hint</a> setting the element=
's
+  'background-color' property to the resulting color.</p>
+
+  <p>When a <code><a href=3D#the-body-element>body<=
/a></code> element has a <code title=3Dattr-body-text><=
a href=3D#attr-body-text>text</a></code> attribute, its
+  value is expected to be parsed using the <a href=3D#rules-for-parsi=
ng-a-legacy-color-value>rules for parsing a legacy color value</a&g=
t;, and
+  if that does not return an error, the user agent is expected to treat =
the attribute as a <a href=3D#presentational-hints title=3D"prese=
ntational hints">presentational hint</a> setting the elemen=
t's 'color' property to
+  the resulting color.</p>
+
+  <p>When a <code><a href=3D#the-body-element>body<=
/a></code> element has a <code title=3Dattr-body-link><=
a href=3D#attr-body-link>link</a></code> attribute, its
+  value is expected to be parsed using the <a href=3D#rules-for-parsi=
ng-a-legacy-color-value>rules for parsing a legacy color value</a&g=
t;, and
+  if that does not return an error, the user agent is expected to treat =
the attribute as a <a href=3D#presentational-hints title=3D"prese=
ntational hints">presentational hint</a> setting the 'color=
' property of any
+  element in the <code><a href=3D#document>Document</a&gt=
;</code> matching the ':link' pseudo-class to the resulting color.&=
lt;/p>
+
+  <p>When a <code><a href=3D#the-body-element>body<=
/a></code> element has a <code title=3Dattr-body-vlink>&lt=
;a href=3D#attr-body-vlink>vlink</a></code> attribute,
+  its value is expected to be parsed using the <a href=3D#rules-for-p=
arsing-a-legacy-color-value>rules for parsing a legacy color value<=
/a>,
+  and if that does not return an error, the user agent is expected to tr=
eat the attribute as a <a href=3D#presentational-hints title=3D"p=
resentational hints">presentational hint</a> setting the 'c=
olor' property of any
+  element in the <code><a href=3D#document>Document</a&gt=
;</code> matching the ':visited' pseudo-class to the resulting
+  color.</p>
+
+  <p>When a <code><a href=3D#the-body-element>body<=
/a></code> element has an <code title=3Dattr-body-alink>&l=
t;a href=3D#attr-body-alink>alink</a></code> attribute,
+  its value is expected to be parsed using the <a href=3D#rules-for-p=
arsing-a-legacy-color-value>rules for parsing a legacy color value<=
/a>,
+  and if that does not return an error, the user agent is expected to tr=
eat the attribute as a <a href=3D#presentational-hints title=3D"p=
resentational hints">presentational hint</a> setting the 'c=
olor' property of any
+  element in the <code><a href=3D#document>Document</a&gt=
;</code> matching the ':active' pseudo-class and either the ':link'
+  pseudo-class or the ':visited' pseudo-class to the resulting color.&lt=
;/p>
+
+
+
+  <h4 id=3Dflow-content-1><span class=3Dsecno>14.3.3 </sp=
an>Flow content</h4>
+
+  <!-- del, ins, and map are inline. -->
+
+  <pre class=3Dcss>@namespace url(http://www.w3.org/1999/xhtml);
+
+address, blockquote, center, div, figure, figcaption, footer, form,
+header, hr, legend, listing, main, p, plaintext, pre, summary, xmp {
+  display: block;<!-- see also unicode-bidi: isolate rules-->
+}
+
+blockquote, figure, listing, p, plaintext, pre, xmp {
+  margin-top: 1em; margin-bottom: 1em;
+}
+
+blockquote, figure { margin-left: 40px; margin-right: 40px; }
+
+address { font-style: italic; }
+listing, plaintext, pre, xmp {
+  font-family: monospace; white-space: pre;
+}
+
+dialog:not([open]) { display: none; }
+dialog {
+  position: absolute;
+  left: 0; right: 0;
+  width: fit-content;
+  height: fit-content;
+  margin: auto;
+  border: solid;
+  padding: 1em;
+  background: white;
+  color: black;
+}
+dialog::backdrop {
+  position: fixed;
+  top: 0; right: 0; bottom: 0; left: 0;
+  background: rgba(0,0,0,0.1);
+}</pre>
+
+  <p>The following rules are also expected to apply, as <a href=
=3D#presentational-hints>presentational hints</a>:</p>
+
+  <pre class=3Dcss>@namespace url(http://www.w3.org/1999/xhtml);
+
+pre[wrap] { white-space: pre-wrap; }</pre>
+
+  <p>In <a href=3D#quirks-mode>quirks mode</a>, the fo=
llowing rules are also expected to apply:</p>
+
+  <pre class=3Dcss>@namespace url(http://www.w3.org/1999/xhtml);
+
+form { margin-bottom: 1em; }</pre>
+
+  <hr><p>The <code><a href=3D#center>center</=
a></code> element, and the <code><a href=3D#the-div-ele=
ment>div</a></code> element when it has an <code title=3D=
attr-div-align><a href=3D#attr-div-align>align</a></cod=
e> attribute whose value is an <a href=3D#ascii-case-insensitive&gt=
;ASCII
+  case-insensitive</a> match for either the string "<code =
title=3D"">center</code>" or the string
+  "<code title=3D"">middle</code>", are =
expected to center text within themselves, as if they had
+  their 'text-align' property set to 'center' in a <a href=3D#present=
ational-hints title=3D"presentational hints">presentational
+  hint</a>, and to <a href=3D#align-descendants>align descen=
dants</a> to the center.</p>
+
+  <p>The <code><a href=3D#the-div-element>div</a&gt=
;</code> element, when it has an <code title=3Dattr-align>ali=
gn</code> attribute
+  whose value is an <a href=3D#ascii-case-insensitive>ASCII case-i=
nsensitive</a> match for the string "<code title=3D"&q=
uot;>left</code>", is expected to left-align text within it=
self, as if it had its 'text-align'
+  property set to 'left' in a <a href=3D#presentational-hints title=3D=
"presentational hints">presentational hint</a>, and to
+  <a href=3D#align-descendants>align descendants</a> to the =
left.</p>
+
+  <p>The <code><a href=3D#the-div-element>div</a&gt=
;</code> element, when it has an <code title=3Dattr-align>ali=
gn</code> attribute
+  whose value is an <a href=3D#ascii-case-insensitive>ASCII case-i=
nsensitive</a> match for the string "<code title=3D"&q=
uot;>right</code>", is expected to right-align text within =
itself, as if it had its
+  'text-align' property set to 'right' in a <a href=3D#presentational=
-hints title=3D"presentational hints">presentational
+  hint</a>, and to <a href=3D#align-descendants>align descen=
dants</a> to the right.</p>
+
+  <p>The <code><a href=3D#the-div-element>div</a&gt=
;</code> element, when it has an <code title=3Dattr-align>ali=
gn</code> attribute
+  whose value is an <a href=3D#ascii-case-insensitive>ASCII case-i=
nsensitive</a> match for the string "<code title=3D"&q=
uot;>justify</code>", is expected to full-justify text with=
in itself, as if it had its
+  'text-align' property set to 'justify' in a <a href=3D#presentation=
al-hints title=3D"presentational hints">presentational
+  hint</a>, and to <a href=3D#align-descendants>align descen=
dants</a> to the left.</p>
+
+
+
+  <h4 id=3Dphrasing-content-1><span class=3Dsecno>14.3.4 &lt=
;/span>Phrasing content</h4>
+
+  <pre class=3Dcss>@namespace url(http://www.w3.org/1999/xhtml);
+
+cite, dfn, em, i, var { font-style: italic; }
+b, strong { font-weight: bolder; }
+code, kbd, samp, tt { font-family: monospace; }
+big { font-size: larger; }
+small { font-size: smaller; }
+
+sub { vertical-align: sub; }
+sup { vertical-align: super; }
+sub, sup { line-height: normal; font-size: smaller; }
+
+ruby { display: ruby; }
+rt { display: ruby-text; }
+
+:link { color: #0000EE; }
+:visited { color: #551A8B; }
+:link, :visited { text-decoration: underline; }
+a:link[rel~=3Dhelp], a:visited[rel~=3Dhelp],
+area:link[rel~=3Dhelp], area:visited[rel~=3Dhelp] { cursor: help; }
+
+:focus { outline: auto; }
+
+mark { background: yellow; color: black; } /* this color is just a sugge=
stion and can be changed based on implementation feedback */
+
+abbr[title], acronym[title] { text-decoration: dotted underline; }<!-=
- CSS3 http://dev.w3.org/csswg/css3-text/#text-decoration-style -->
+ins, u { text-decoration: underline; }
+del, s, strike { text-decoration: line-through; }
+blink { text-decoration: blink; }
+
+q::before { content: open-quote; }
+q::after { content: close-quote; }
+
+br { content: '\A'; white-space: pre; }
+nobr { white-space: nowrap; }
+wbr { content: '\200B'; }
+nobr wbr { white-space: normal; }</pre>
+
+  <p>The following rules are also expected to apply, as
+  <a href=3D#presentational-hints>presentational hints</a>:&=
lt;/p>
+
+  <pre class=3Dcss>@namespace url(http://www.w3.org/1999/xhtml);
+
+br[clear=3Dleft i] { clear: left; }
+br[clear=3Dright i] { clear: right; }
+br[clear=3Dall i], br[clear=3Dboth i] { clear: both; }</pre>
+
+  <p>For the purposes of the CSS ruby model, runs of children of &=
lt;code><a href=3D#the-ruby-element>ruby</a></code> =
elements that are
+  not <code><a href=3D#the-rt-element>rt</a></code&=
gt; or <code><a href=3D#the-rp-element>rp</a></code&=
gt; elements are expected to be wrapped in anonymous boxes
+  whose 'display' property has the value 'ruby-base'. <a href=3D#refs=
CSSRUBY>[CSSRUBY]</a></p>
+
+  <p>When a particular part of a ruby has more than one annotation=
, the annotations should be
+  distributed on both sides of the base text so as to minimize the stack=
ing of ruby annotations on
+  one side.</p>
+
+  <p class=3Dnote>When it becomes possible to do so, the preceding=
 requirement will be updated to be
+  expressed in terms of CSS ruby. (Currently, CSS ruby does not handle n=
ested <code><a href=3D#the-ruby-element>ruby</a></co=
de>
+  elements or multiple sequential <code><a href=3D#the-rt-eleme=
nt>rt</a></code> elements, which is how this semantic is
+  expressed.)</p>
+
+  <p>User agents that do not support correct ruby rendering are ex=
pected to render parentheses
+  around the text of <code><a href=3D#the-rt-element>rt</=
a></code> elements in the absence of <code><a href=3D#t=
he-rp-element>rp</a></code> elements.</p>
+
+  <hr><p>User agents are expected to support the 'clear' pro=
perty on inline elements (in order to render
+  <code><a href=3D#the-br-element>br</a></code> =
elements with <code title=3Dattr-br-clear><a href=3D#attr-br-cle=
ar>clear</a></code> attributes) in the manner
+  described in the non-normative note to this effect in CSS2.1.</p&gt=
; <!-- section 9.5.2 of CSS2.1 -->
+
+  <p>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 canva=
s' background is expected to
+  be white.</p>
+
+  <hr><p>When a <code><a href=3D#font>font</a=
></code> element has a <code title=3Dattr-font-color>color=
</code> attribute,
+  its value is expected to be parsed using the <a href=3D#rules-for-p=
arsing-a-legacy-color-value>rules for parsing a legacy color value<=
/a>,
+  and if that does not return an error, the user agent is expected to tr=
eat the attribute as a <a href=3D#presentational-hints title=3D"p=
resentational hints">presentational hint</a> setting the el=
ement's 'color' property to
+  the resulting color.</p>
+
+  <p>When a <code><a href=3D#font>font</a></c=
ode> element has a <code title=3Dattr-font-face>face</code&gt=
; attribute, the
+  user agent is expected to treat the attribute as a <a href=3D#prese=
ntational-hints title=3D"presentational
+  hints">presentational hint</a> setting the element's 'fo=
nt-family' property to the attribute's
+  value.</p>
+
+  <!-- (Apparently only IE supports this?) (Note: if you add this bac=
k, make sure to define which of
+  'size' vs 'pointsize' wins.)
+
+  <p>When a <code>font</code> element has a <code t=
itle=3D"attr-font-pointsize">pointsize</code>
+  attribute, the user agent is expected to parse that attribute's value =
using the <span>rules for
+  parsing non-negative integers</span>, and if this doesn't genera=
te an error, then the user agent
+  is expected to use the parsed value as a <em>point</em> le=
ngth for a <span title=3D"presentational
+  hints">presentational hint</span> for the 'font-size' pr=
operty on the element.</p>
+  -->
+
+  <p>When a <code><a href=3D#font>font</a></c=
ode> element has a <code title=3Dattr-font-size>size</code&gt=
; attribute, the
+  user agent is expected to use the following steps, known as the <df=
n id=3Drules-for-parsing-a-legacy-font-size>rules for parsing a legacy
+  font size</dfn>, to treat the attribute as a <a href=3D#prese=
ntational-hints title=3D"presentational hints">presentationa=
l
+  hint</a> setting the element's 'font-size' property:</p>
+
+  <ol><li><p>Let <var title=3D"">input=
</var> be the attribute's value.</li>
+
+   <li><p>Let <var title=3D"">position</v=
ar> be a pointer into <var title=3D"">input</var&gt=
;, initially
+   pointing at the start of the string.</li>
+
+   <li><p><a href=3D#skip-whitespace>Skip whitespace&l=
t;/a>.</li>
+
+   <li><p>If <var title=3D"">position</va=
r> is past the end of <var title=3D"">input</var&gt=
;, there is no
+   <a href=3D#presentational-hints title=3D"presentational hints=
">presentational hint</a>. Abort these steps.</li>
+
+   <li><p>If the character at <var title=3D""&g=
t;position</var> is a U+002B PLUS SIGN character (+), then
+   let <var title=3D"">mode</var> be <i>rela=
tive-plus</i>, and advance <var title=3D"">position=
</var> to
+   the next character. Otherwise, if the character at <var title=3D&q=
uot;">position</var> is a U+002D
+   HYPHEN-MINUS character (-), then let <var title=3D"">=
mode</var> be <i>relative-minus</i>, and
+   advance <var title=3D"">position</var> to the n=
ext character. Otherwise, let <var title=3D"">mode</va=
r> be <i>absolute</i>.</li>
+
+   <li><p><a href=3D#collect-a-sequence-of-characters>=
Collect a sequence of characters</a> that are <a href=3D#ascii-d=
igits>ASCII digits</a>, and let the
+   resulting sequence be <var title=3D"">digits</var&=
gt;.</li>
+
+   <li><p>If <var title=3D"">digits</var&=
gt; is the empty string, there is no <a href=3D#presentational-hints t=
itle=3D"presentational
+   hints">presentational hint</a>. Abort these steps.</=
li>
+
+   <li><p>Interpret <var title=3D"">digits&l=
t;/var> as a base-ten integer. Let <var title=3D"">val=
ue</var>
+   be the resulting number.</li>
+
+   <li>
+
+    <!-- basefont support would go here, but we removed it -->
+
+    <p>If <var title=3D"">mode</var> is <=
i>relative-plus</i>, then increment <var title=3D""=
>value</var>
+    by 3. If <var title=3D"">mode</var> is <i&g=
t;relative-minus</i>, then let <var title=3D"">valu=
e</var>
+    be the result of subtracting <var title=3D"">value&l=
t;/var> from 3.</p>
+
+   </li>
+
+   <li><p>If <var title=3D"">value</var&g=
t; is greater than 7, let it be 7.</li>
+
+   <li><p>If <var title=3D"">value</var&g=
t; is less than 1, let it be 1.</li>
+
+   <li>
+
+    <p>Set 'font-size' to the keyword corresponding to the value o=
f <var title=3D"">value</var>
+    according to the following table:</p>
+
+    <table><thead><tr><th><var title=3D"=
">value</var>
+       <th>'font-size' keyword
+       <th>Notes
+     <tbody><tr><td>1
+       <td>x-small
+       <td>
+      <tr><td>2
+       <td>small
+       <td>
+      <tr><td>3
+       <td>medium
+       <td>
+      <tr><td>4
+       <td>large
+       <td>
+      <tr><td>5
+       <td>x-large
+       <td>
+      <tr><td>6
+       <td>xx-large
+       <td>
+      <tr><td>7
+       <td>x<!---->xx-large
+       <td><i>see below</i>
+    </table><p class=3Dtablenote><small>The 'x<!---=
->xx-large' value is a non-CSS value used here to
+    indicate a font size 50% larger than 'xx-large'.</small></p=
>
+
+   </li>
+
+  </ol><h4 id=3Dbidirectional-text><span class=3Dsecno&gt=
;14.3.5 </span>Bidirectional text</h4>
+
+  <pre class=3Dcss>@namespace url(http://www.w3.org/1999/xhtml);
+
+[dir]:dir(ltr), bdi:dir(ltr), input[type=3Dtel]:dir(ltr) { direction: lt=
r; }
+[dir]:dir(rtl), bdi:dir(rtl) { direction: rtl; }
+
+address, blockquote, center, div, figure, figcaption, footer, form,
+header, hr, legend, listing, main, p, plaintext, pre, summary, xmp, arti=
cle,
+aside, h1, h2, h3, h4, h5, h6, hgroup, nav, section, table, caption,
+colgroup, col, thead, tbody, tfoot, tr, td, th, dir, dd, dl, dt, menu,
+ol, ul, li {
+  unicode-bidi: isolate;<!-- basically anything that is display:block=
-like -->
+}
+
+:matches([dir=3Dltr i], [dir=3Drtl i], [dir=3Dauto i]):not(address):not(=
blockquote
+):not(center):not(div):not(figure):not(figcaption):not(footer):not(form
+):not(header):not(hr):not(legend):not(listing):not(main):not(p):not(plai=
ntext):not(pre
+):not(summary):not(xmp):not(article):not(aside):not(h1):not(h2):not(h3):=
not(h4
+):not(h5):not(h6):not(hgroup):not(nav):not(section):not(table):not(capti=
on
+):not(colgroup):not(col):not(thead):not(tbody):not(tfoot):not(tr):not(td
+):not(th):not(dir):not(dd):not(dl):not(dt):not(menu):not(ol):not(ul):not=
(li) {
+  unicode-bidi: embed;
+}
+
+bdi, bdi:matches([dir=3Dltr i], [dir=3Drtl i]),
+output, output:matches([dir=3Dltr i], [dir=3Drtl i]),
+[dir=3Dauto i] {
+  unicode-bidi: isolate;
+}
+
+bdo, bdo:matches([dir=3Dltr i], [dir=3Drtl i]) { unicode-bidi: bidi-over=
ride; }
+bdo[dir=3Dauto i] { unicode-bidi: isolate-override; }
+
+textarea[dir=3Dauto i], pre[dir=3Dauto i] { unicode-bidi: plaintext; }&l=
t;/pre>
+
+  <p>Input fields (i.e. <code><a href=3D#the-textarea-ele=
ment>textarea</a></code> elements, and <code><a h=
ref=3D#the-input-element>input</a></code> elements when th=
eir
+  <code title=3Dattr-input-type><a href=3D#attr-input-type>t=
ype</a></code> attribute is in the <a href=3D"#text-(=
type=3Dtext)-state-and-search-state-(type=3Dsearch)" title=3Dattr-in=
put-type-text>Text</a>, <a href=3D"#text-(type=3Dtext)-s=
tate-and-search-state-(type=3Dsearch)" title=3Dattr-input-type-searc=
h>Search</a>,
+  <a href=3D"#telephone-state-(type=3Dtel)" title=3Dattr-in=
put-type-tel>Telephone</a>, <a href=3D"#url-state-(type=3D=
url)" title=3Dattr-input-type-url>URL</a>,
+  or <a href=3D"#e-mail-state-(type=3Demail)" title=3Dattr-=
input-type-email>E-mail</a> state) are expected to present an ed=
iting
+  user interface with a directionality that matches the element's 'direc=
tion' property.</p>
+
+
+  <h4 id=3Dquotes><span class=3Dsecno>14.3.6 </span>Qu=
otes</h4>
+
+  <p>This block is automatically generated from the Unicode Common=
 Locale Data Repository. <a href=3D#refsCLDR>[CLDR]</a></p=
>
+
+  <p>User agents are expected to use either the block below (which=
 will be regularly updated) or to
+  automatically generate their own copy directly from the source materia=
l. The language codes are
+  derived from the CLDR file names. The quotes are derived from the <=
code title=3D"">delimiter</code>
+  blocks, with fallback handled as specified in the CLDR documentation.&=
lt;/p>
+
+  <pre class=3Dcss>@namespace url(http://www.w3.org/1999/xhtml);
+
+:root                                                         { quotes: =
'\201c' '\201d' '\2018' '\2019' } /* “ ” ‘ =
’ */
+:root:lang(af),       :not(:lang(af)) > :lang(af)             { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(agq),      :not(:lang(agq)) > :lang(agq)           { q=
uotes: '\201e' '\201d' '\201a' '\2019' } /* „ ” &amp=
;sbquo; ’ */
+:root:lang(ak),       :not(:lang(ak)) > :lang(ak)             { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(am),       :not(:lang(am)) > :lang(am)             { q=
uotes: '\00ab' '\00bb' '\2039' '\203a' } /* « » &=
lsaquo; › */
+:root:lang(ar),       :not(:lang(ar)) > :lang(ar)             { q=
uotes: '\201d' '\201c' '\2019' '\2018' } /* ” “ &=
rsquor; ‘ */
+:root:lang(asa),      :not(:lang(asa)) > :lang(asa)           { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(az),       :not(:lang(az)) > :lang(az)             { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(az-Cyrl),  :not(:lang(az-Cyrl)) > :lang(az-Cyrl)   { q=
uotes: '\00ab' '\00bb' '\2039' '\203a' } /* « » &=
lsaquo; › */
+:root:lang(bas),      :not(:lang(bas)) > :lang(bas)           { q=
uotes: '\00ab' '\00bb' '\201e' '\201c' } /* « » &=
ldquor; “ */
+:root:lang(bem),      :not(:lang(bem)) > :lang(bem)           { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(bez),      :not(:lang(bez)) > :lang(bez)           { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(bg),       :not(:lang(bg)) > :lang(bg)             { q=
uotes: '\201e' '\201c' '\201e' '\201c' } /* „ “ &amp=
;ldquor; “ */
+:root:lang(bm),       :not(:lang(bm)) > :lang(bm)             { q=
uotes: '\00ab' '\00bb' '\201c' '\201d' } /* « » &=
ldquo; ” */
+:root:lang(bn),       :not(:lang(bn)) > :lang(bn)             { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(br),       :not(:lang(br)) > :lang(br)             { q=
uotes: '\00ab' '\00bb' '\2039' '\203a' } /* « » &=
lsaquo; › */
+:root:lang(brx),      :not(:lang(brx)) > :lang(brx)           { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(bs-Cyrl),  :not(:lang(bs-Cyrl)) > :lang(bs-Cyrl)   { q=
uotes: '\201e' '\201c' '\201a' '\2018' } /* „ “ &amp=
;sbquo; ‘ */
+:root:lang(ca),       :not(:lang(ca)) > :lang(ca)             { q=
uotes: '\201c' '\201d' '\00ab' '\00bb' } /* “ ” &=
laquo; » */
+:root:lang(cgg),      :not(:lang(cgg)) > :lang(cgg)           { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(chr),      :not(:lang(chr)) > :lang(chr)           { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(cs),       :not(:lang(cs)) > :lang(cs)             { q=
uotes: '\201e' '\201c' '\201a' '\2018' } /* „ “ &amp=
;sbquo; ‘ */
+:root:lang(cy),       :not(:lang(cy)) > :lang(cy)             { q=
uotes: '\2018' '\2019' '\201c' '\201d' } /* ‘ ’ &amp=
;ldquo; ” */
+:root:lang(da),       :not(:lang(da)) > :lang(da)             { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(dav),      :not(:lang(dav)) > :lang(dav)           { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(de),       :not(:lang(de)) > :lang(de)             { q=
uotes: '\201e' '\201c' '\201a' '\2018' } /* „ “ &amp=
;sbquo; ‘ */
+:root:lang(de-CH),    :not(:lang(de-CH)) > :lang(de-CH)       { q=
uotes: '\00ab' '\00bb' '\2039' '\203a' } /* « » &=
lsaquo; › */
+:root:lang(dje),      :not(:lang(dje)) > :lang(dje)           { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(dua),      :not(:lang(dua)) > :lang(dua)           { q=
uotes: '\00ab' '\00bb' '\2018' '\2019' } /* « » &=
lsquo; ’ */
+:root:lang(dyo),      :not(:lang(dyo)) > :lang(dyo)           { q=
uotes: '\00ab' '\00bb' '\201c' '\201d' } /* « » &=
ldquo; ” */
+:root:lang(dz),       :not(:lang(dz)) > :lang(dz)             { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(ebu),      :not(:lang(ebu)) > :lang(ebu)           { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(ee),       :not(:lang(ee)) > :lang(ee)             { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(el),       :not(:lang(el)) > :lang(el)             { q=
uotes: '\00ab' '\00bb' '\0022' '\0022' } /* « » &quot=
; " */
+:root:lang(en),       :not(:lang(en)) > :lang(en)             { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(es),       :not(:lang(es)) > :lang(es)             { q=
uotes: '\00ab' '\00bb' '\201c' '\201d' } /* « » &=
ldquo; ” */
+:root:lang(et),       :not(:lang(et)) > :lang(et)             { q=
uotes: '\201e' '\201c' '\201a' '\2018' } /* „ “ &amp=
;sbquo; ‘ */
+:root:lang(eu),       :not(:lang(eu)) > :lang(eu)             { q=
uotes: '\00ab' '\00bb' '\201c' '\201d' } /* « » &=
ldquo; ” */
+:root:lang(ewo),      :not(:lang(ewo)) > :lang(ewo)           { q=
uotes: '\00ab' '\00bb' '\201c' '\201d' } /* « » &=
ldquo; ” */
+:root:lang(fa),       :not(:lang(fa)) > :lang(fa)             { q=
uotes: '\00ab' '\00bb' '\2039' '\203a' } /* « » &=
lsaquo; › */
+:root:lang(ff),       :not(:lang(ff)) > :lang(ff)             { q=
uotes: '\201e' '\201d' '\201a' '\2019' } /* „ ” &amp=
;sbquo; ’ */
+:root:lang(fi),       :not(:lang(fi)) > :lang(fi)             { q=
uotes: '\201d' '\201d' '\2019' '\2019' } /* ” ” &=
rsquor; ’ */
+:root:lang(fil),      :not(:lang(fil)) > :lang(fil)           { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(fr),       :not(:lang(fr)) > :lang(fr)             { q=
uotes: '\00ab' '\00bb' '\00ab' '\00bb' } /* « » &=
laquo; » */
+:root:lang(fr-CA),    :not(:lang(fr-CA)) > :lang(fr-CA)       { q=
uotes: '\00ab' '\00bb' '\2039' '\203a' } /* « » &=
lsaquo; › */
+:root:lang(fr-CH),    :not(:lang(fr-CH)) > :lang(fr-CH)       { q=
uotes: '\00ab' '\00bb' '\2039' '\203a' } /* « » &=
lsaquo; › */
+:root:lang(gsw),      :not(:lang(gsw)) > :lang(gsw)           { q=
uotes: '\00ab' '\00bb' '\2039' '\203a' } /* « » &=
lsaquo; › */
+:root:lang(gu),       :not(:lang(gu)) > :lang(gu)             { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(guz),      :not(:lang(guz)) > :lang(guz)           { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(ha),       :not(:lang(ha)) > :lang(ha)             { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(he),       :not(:lang(he)) > :lang(he)             { q=
uotes: '\05f4' '\05f4' '\05f3' '\05f3' } /* ״ ״ &=
#x5f3; ׳ */
+:root:lang(hi),       :not(:lang(hi)) > :lang(hi)             { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(hr),       :not(:lang(hr)) > :lang(hr)             { q=
uotes: '\201e' '\201c' '\201a' '\2018' } /* „ “ &amp=
;sbquo; ‘ */
+:root:lang(hu),       :not(:lang(hu)) > :lang(hu)             { q=
uotes: '\201e' '\201d' '\00bb' '\00ab' } /* „ ” &amp=
;raquo; « */
+:root:lang(hy),       :not(:lang(hy)) > :lang(hy)             { q=
uotes: '\00ab' '\00bb' '\00ab' '\00bb' } /* « » &=
laquo; » */
+:root:lang(id),       :not(:lang(id)) > :lang(id)             { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(ig),       :not(:lang(ig)) > :lang(ig)             { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(it),       :not(:lang(it)) > :lang(it)             { q=
uotes: '\00ab' '\00bb' '\201c' '\201d' } /* « » &=
ldquo; ” */
+:root:lang(ja),       :not(:lang(ja)) > :lang(ja)             { q=
uotes: '\300c' '\300d' '\300e' '\300f' } /* 「 」 &am=
p;#x300e; 』 */
+:root:lang(jgo),      :not(:lang(jgo)) > :lang(jgo)           { q=
uotes: '\00ab' '\00bb' '\2039' '\203a' } /* « » &=
lsaquo; › */
+:root:lang(jmc),      :not(:lang(jmc)) > :lang(jmc)           { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(ka),       :not(:lang(ka)) > :lang(ka)             { q=
uotes: '\201e' '\201c' '\00ab' '\00bb' } /* „ “ &amp=
;laquo; » */
+:root:lang(kab),      :not(:lang(kab)) > :lang(kab)           { q=
uotes: '\00ab' '\00bb' '\201c' '\201d' } /* « » &=
ldquo; ” */
+:root:lang(kam),      :not(:lang(kam)) > :lang(kam)           { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(kde),      :not(:lang(kde)) > :lang(kde)           { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(kea),      :not(:lang(kea)) > :lang(kea)           { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(khq),      :not(:lang(khq)) > :lang(khq)           { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(ki),       :not(:lang(ki)) > :lang(ki)             { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(kk),       :not(:lang(kk)) > :lang(kk)             { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(kkj),      :not(:lang(kkj)) > :lang(kkj)           { q=
uotes: '\00ab' '\00bb' '\2039' '\203a' } /* « » &=
lsaquo; › */
+:root:lang(kln),      :not(:lang(kln)) > :lang(kln)           { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(km),       :not(:lang(km)) > :lang(km)             { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(kn),       :not(:lang(kn)) > :lang(kn)             { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(ko),       :not(:lang(ko)) > :lang(ko)             { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(ksb),      :not(:lang(ksb)) > :lang(ksb)           { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(ksf),      :not(:lang(ksf)) > :lang(ksf)           { q=
uotes: '\00ab' '\00bb' '\2018' '\2019' } /* « » &=
lsquo; ’ */
+:root:lang(ky),       :not(:lang(ky)) > :lang(ky)             { q=
uotes: '\00ab' '\00bb' '\201e' '\201c' } /* « » &=
ldquor; “ */
+:root:lang(lag),      :not(:lang(lag)) > :lang(lag)           { q=
uotes: '\201d' '\201d' '\2019' '\2019' } /* ” ” &=
rsquor; ’ */
+:root:lang(lg),       :not(:lang(lg)) > :lang(lg)             { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(ln),       :not(:lang(ln)) > :lang(ln)             { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(lo),       :not(:lang(lo)) > :lang(lo)             { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(lt),       :not(:lang(lt)) > :lang(lt)             { q=
uotes: '\201e' '\201c' '\201e' '\201c' } /* „ “ &amp=
;ldquor; “ */
+:root:lang(lu),       :not(:lang(lu)) > :lang(lu)             { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(luo),      :not(:lang(luo)) > :lang(luo)           { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(luy),      :not(:lang(luy)) > :lang(luy)           { q=
uotes: '\201e' '\201c' '\201a' '\2018' } /* „ “ &amp=
;sbquo; ‘ */
+:root:lang(lv),       :not(:lang(lv)) > :lang(lv)             { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(mas),      :not(:lang(mas)) > :lang(mas)           { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(mer),      :not(:lang(mer)) > :lang(mer)           { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(mfe),      :not(:lang(mfe)) > :lang(mfe)           { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(mg),       :not(:lang(mg)) > :lang(mg)             { q=
uotes: '\00ab' '\00bb' '\201c' '\201d' } /* « » &=
ldquo; ” */
+:root:lang(mgo),      :not(:lang(mgo)) > :lang(mgo)           { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(mk),       :not(:lang(mk)) > :lang(mk)             { q=
uotes: '\201e' '\201c' '\201a' '\2018' } /* „ “ &amp=
;sbquo; ‘ */
+:root:lang(ml),       :not(:lang(ml)) > :lang(ml)             { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(mn),       :not(:lang(mn)) > :lang(mn)             { q=
uotes: '\2018' '\2019' '\201c' '\201d' } /* ‘ ’ &amp=
;ldquo; ” */
+:root:lang(mr),       :not(:lang(mr)) > :lang(mr)             { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(ms),       :not(:lang(ms)) > :lang(ms)             { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(mua),      :not(:lang(mua)) > :lang(mua)           { q=
uotes: '\00ab' '\00bb' '\201c' '\201d' } /* « » &=
ldquo; ” */
+:root:lang(my),       :not(:lang(my)) > :lang(my)             { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(naq),      :not(:lang(naq)) > :lang(naq)           { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(nb),       :not(:lang(nb)) > :lang(nb)             { q=
uotes: '\00ab' '\00bb' '\2018' '\2019' } /* « » &=
lsquo; ’ */
+:root:lang(nd),       :not(:lang(nd)) > :lang(nd)             { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(nl),       :not(:lang(nl)) > :lang(nl)             { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(nmg),      :not(:lang(nmg)) > :lang(nmg)           { q=
uotes: '\201e' '\201d' '\00ab' '\00bb' } /* „ ” &amp=
;laquo; » */
+:root:lang(nn),       :not(:lang(nn)) > :lang(nn)             { q=
uotes: '\00ab' '\00bb' '\2018' '\2019' } /* « » &=
lsquo; ’ */
+:root:lang(nnh),      :not(:lang(nnh)) > :lang(nnh)           { q=
uotes: '\00ab' '\00bb' '\201c' '\201d' } /* « » &=
ldquo; ” */
+:root:lang(nus),      :not(:lang(nus)) > :lang(nus)           { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(nyn),      :not(:lang(nyn)) > :lang(nyn)           { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(pa),       :not(:lang(pa)) > :lang(pa)             { q=
uotes: '\0027' '\0027' '\0022' '\0022' } /* ' ' " " */
+:root:lang(pl),       :not(:lang(pl)) > :lang(pl)             { q=
uotes: '\201e' '\201d' '\00ab' '\00bb' } /* „ ” &amp=
;laquo; » */
+:root:lang(pt),       :not(:lang(pt)) > :lang(pt)             { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(pt-PT),    :not(:lang(pt-PT)) > :lang(pt-PT)       { q=
uotes: '\00ab' '\00bb' '\201c' '\201d' } /* « » &=
ldquo; ” */
+:root:lang(rn),       :not(:lang(rn)) > :lang(rn)             { q=
uotes: '\201d' '\201d' '\2019' '\2019' } /* ” ” &=
rsquor; ’ */
+:root:lang(ro),       :not(:lang(ro)) > :lang(ro)             { q=
uotes: '\201e' '\201d' '\00ab' '\00bb' } /* „ ” &amp=
;laquo; » */
+:root:lang(rof),      :not(:lang(rof)) > :lang(rof)           { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(ru),       :not(:lang(ru)) > :lang(ru)             { q=
uotes: '\00ab' '\00bb' '\201e' '\201c' } /* « » &=
ldquor; “ */
+:root:lang(rw),       :not(:lang(rw)) > :lang(rw)             { q=
uotes: '\00ab' '\00bb' '\2018' '\2019' } /* « » &=
lsquo; ’ */
+:root:lang(rwk),      :not(:lang(rwk)) > :lang(rwk)           { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(saq),      :not(:lang(saq)) > :lang(saq)           { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(sbp),      :not(:lang(sbp)) > :lang(sbp)           { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(seh),      :not(:lang(seh)) > :lang(seh)           { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(ses),      :not(:lang(ses)) > :lang(ses)           { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(sg),       :not(:lang(sg)) > :lang(sg)             { q=
uotes: '\00ab' '\00bb' '\201c' '\201d' } /* « » &=
ldquo; ” */
+:root:lang(shi),      :not(:lang(shi)) > :lang(shi)           { q=
uotes: '\00ab' '\00bb' '\201e' '\201d' } /* « » &=
ldquor; ” */
+:root:lang(shi-Latn), :not(:lang(shi-Latn)) > :lang(shi-Latn) { q=
uotes: '\00ab' '\00bb' '\201e' '\201d' } /* « » &=
ldquor; ” */
+:root:lang(si),       :not(:lang(si)) > :lang(si)             { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(sk),       :not(:lang(sk)) > :lang(sk)             { q=
uotes: '\201e' '\201c' '\201a' '\2018' } /* „ “ &amp=
;sbquo; ‘ */
+:root:lang(sl),       :not(:lang(sl)) > :lang(sl)             { q=
uotes: '\201e' '\201c' '\201a' '\2018' } /* „ “ &amp=
;sbquo; ‘ */
+:root:lang(sn),       :not(:lang(sn)) > :lang(sn)             { q=
uotes: '\201d' '\201d' '\2019' '\2019' } /* ” ” &=
rsquor; ’ */
+:root:lang(so),       :not(:lang(so)) > :lang(so)             { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(sq),       :not(:lang(sq)) > :lang(sq)             { q=
uotes: '\00ab' '\00bb' '\201c' '\201d' } /* « » &=
ldquo; ” */
+:root:lang(sr),       :not(:lang(sr)) > :lang(sr)             { q=
uotes: '\201e' '\201c' '\201a' '\2018' } /* „ “ &amp=
;sbquo; ‘ */
+:root:lang(sr-Latn),  :not(:lang(sr-Latn)) > :lang(sr-Latn)   { q=
uotes: '\201e' '\201c' '\201a' '\2018' } /* „ “ &amp=
;sbquo; ‘ */
+:root:lang(sv),       :not(:lang(sv)) > :lang(sv)             { q=
uotes: '\201d' '\201d' '\2019' '\2019' } /* ” ” &=
rsquor; ’ */
+:root:lang(sw),       :not(:lang(sw)) > :lang(sw)             { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(swc),      :not(:lang(swc)) > :lang(swc)           { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(ta),       :not(:lang(ta)) > :lang(ta)             { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(te),       :not(:lang(te)) > :lang(te)             { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(teo),      :not(:lang(teo)) > :lang(teo)           { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(th),       :not(:lang(th)) > :lang(th)             { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(ti-ER),    :not(:lang(ti-ER)) > :lang(ti-ER)       { q=
uotes: '\2018' '\2019' '\201c' '\201d' } /* ‘ ’ &amp=
;ldquo; ” */
+:root:lang(to),       :not(:lang(to)) > :lang(to)             { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(tr),       :not(:lang(tr)) > :lang(tr)             { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(twq),      :not(:lang(twq)) > :lang(twq)           { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(tzm),      :not(:lang(tzm)) > :lang(tzm)           { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(uk),       :not(:lang(uk)) > :lang(uk)             { q=
uotes: '\00ab' '\00bb' '\201e' '\201c' } /* « » &=
ldquor; “ */
+:root:lang(ur),       :not(:lang(ur)) > :lang(ur)             { q=
uotes: '\201d' '\201c' '\2019' '\2018' } /* ” “ &=
rsquor; ‘ */
+:root:lang(uz),       :not(:lang(uz)) > :lang(uz)             { q=
uotes: '\0022' '\0022' '\0027' '\0027' } /* " " ' ' */
+:root:lang(uz-Cyrl),  :not(:lang(uz-Cyrl)) > :lang(uz-Cyrl)   { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(vai),      :not(:lang(vai)) > :lang(vai)           { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(vai-Latn), :not(:lang(vai-Latn)) > :lang(vai-Latn) { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(vi),       :not(:lang(vi)) > :lang(vi)             { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(vun),      :not(:lang(vun)) > :lang(vun)           { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(xh),       :not(:lang(xh)) > :lang(xh)             { q=
uotes: '\2018' '\2019' '\201c' '\201d' } /* ‘ ’ &amp=
;ldquo; ” */
+:root:lang(xog),      :not(:lang(xog)) > :lang(xog)           { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(yav),      :not(:lang(yav)) > :lang(yav)           { q=
uotes: '\00ab' '\00bb' '\00ab' '\00bb' } /* « » &=
laquo; » */
+:root:lang(yo),       :not(:lang(yo)) > :lang(yo)             { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(yo-BJ),    :not(:lang(yo-BJ)) > :lang(yo-BJ)       { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(zgh),      :not(:lang(zgh)) > :lang(zgh)           { q=
uotes: '\00ab' '\00bb' '\201e' '\201d' } /* « » &=
ldquor; ” */
+:root:lang(zh),       :not(:lang(zh)) > :lang(zh)             { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+:root:lang(zh-Hant),  :not(:lang(zh-Hant)) > :lang(zh-Hant)   { q=
uotes: '\300c' '\300d' '\300e' '\300f' } /* 「 」 &am=
p;#x300e; 』 */
+:root:lang(zu),       :not(:lang(zu)) > :lang(zu)             { q=
uotes: '\201c' '\201d' '\2018' '\2019' } /* “ ” &=
lsquo; ’ */
+</pre> =20
+
+
+  <h4 id=3Dsections-and-headings><span class=3Dsecno>14.3.7 =
</span>Sections and headings</h4>
+
+  <pre class=3Dcss>@namespace url(http://www.w3.org/1999/xhtml);
+
+article, aside, h1, h2, h3, h4, h5, h6, hgroup, nav, section {
+  display: block;<!-- see also unicode-bidi: isolate rules-->
+}
+
+h1 { margin-top: 0.67em; margin-bottom: 0.67em; font-size: 2.00em; font-=
weight: bold; }
+h2 { margin-top: 0.83em; margin-bottom: 0.83em; font-size: 1.50em; font-=
weight: bold; }
+h3 { margin-top: 1.00em; margin-bottom: 1.00em; font-size: 1.17em; font-=
weight: bold; }
+h4 { margin-top: 1.33em; margin-bottom: 1.33em; font-size: 1.00em; font-=
weight: bold; }
+h5 { margin-top: 1.67em; margin-bottom: 1.67em; font-size: 0.83em; font-=
weight: bold; }
+h6 { margin-top: 2.33em; margin-bottom: 2.33em; font-size: 0.67em; font-=
weight: bold; }</pre>
+
+  <p>The <code><a href=3D#the-article-element>article&=
lt;/a></code>, <code><a href=3D#the-aside-element>as=
ide</a></code>, <code><a href=3D#the-nav-element>=
nav</a></code>, and <code><a href=3D#the-section-ele=
ment>section</a></code>
+  elements are expected to affect the margins and font size of <code&=
gt;<a href=3D#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h1</a>&=
lt;/code> elements, as well as
+  <code><a href=3D#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h=
2</a></code>–<code><a href=3D#the-h1,-h2,-=
h3,-h4,-h5,-and-h6-elements>h5</a></code> elements that fo=
llow <code><a href=3D#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements&gt=
;h1</a></code> elements in
+  <code><a href=3D#the-hgroup-element>hgroup</a></c=
ode> elements, based on the nesting depth. If <var title=3D"&q=
uot;>x</var> is a selector
+  that matches elements that are either <code><a href=3D#the-ar=
ticle-element>article</a></code>, <code><a href=3D=
#the-aside-element>aside</a></code>, <code><a hre=
f=3D#the-nav-element>nav</a></code>,
+  or <code><a href=3D#the-section-element>section</a>&=
lt;/code> elements, then the following rules capture what is expected:=
</p>
+
+  <pre class=3Dcss>@namespace url(http://www.w3.org/1999/xhtml);
+
+<var title=3D"">x</var> h1 { margin-top: 0.83em; m=
argin-bottom: 0.83em; font-size: 1.50em; }
+<var title=3D"">x</var> <var title=3D"&quo=
t;>x</var> h1 { margin-top: 1.00em; margin-bottom: 1.00em; font-=
size: 1.17em; }
+<var title=3D"">x</var> <var title=3D"&quo=
t;>x</var> <var title=3D"">x</var> h1 { ma=
rgin-top: 1.33em; margin-bottom: 1.33em; font-size: 1.00em; }
+<var title=3D"">x</var> <var title=3D"&quo=
t;>x</var> <var title=3D"">x</var> <var=
 title=3D"">x</var> h1 { margin-top: 1.67em; margin-bo=
ttom: 1.67em; font-size: 0.83em; }
+<var title=3D"">x</var> <var title=3D"&quo=
t;>x</var> <var title=3D"">x</var> <var=
 title=3D"">x</var> <var title=3D"">x&=
lt;/var> h1 { margin-top: 2.33em; margin-bottom: 2.33em; font-size: 0.=
67em; }
+
+<var title=3D"">x</var> hgroup > h1 ~ h2 { =
margin-top: 1.00em; margin-bottom: 1.00em; font-size: 1.17em; }
+<var title=3D"">x</var> <var title=3D"&quo=
t;>x</var> hgroup > h1 ~ h2 { margin-top: 1.33em; margin-=
bottom: 1.33em; font-size: 1.00em; }
+<var title=3D"">x</var> <var title=3D"&quo=
t;>x</var> <var title=3D"">x</var> hgroup =
> h1 ~ h2 { margin-top: 1.67em; margin-bottom: 1.67em; font-size: =
0.83em; }
+<var title=3D"">x</var> <var title=3D"&quo=
t;>x</var> <var title=3D"">x</var> <var=
 title=3D"">x</var> hgroup > h1 ~ h2 { margin-t=
op: 2.33em; margin-bottom: 2.33em; font-size: 0.67em; }
+
+<var title=3D"">x</var> hgroup > h1 ~ h3 { =
margin-top: 1.33em; margin-bottom: 1.33em; font-size: 1.00em; }
+<var title=3D"">x</var> <var title=3D"&quo=
t;>x</var> hgroup > h1 ~ h3 { margin-top: 1.67em; margin-=
bottom: 1.67em; font-size: 0.83em; }
+<var title=3D"">x</var> <var title=3D"&quo=
t;>x</var> <var title=3D"">x</var> hgroup =
> h1 ~ h3 { margin-top: 2.33em; margin-bottom: 2.33em; font-size: =
0.67em; }
+
+<var title=3D"">x</var> hgroup > h1 ~ h4 { =
margin-top: 1.67em; margin-bottom: 1.67em; font-size: 0.83em; }
+<var title=3D"">x</var> <var title=3D"&quo=
t;>x</var> hgroup > h1 ~ h4 { margin-top: 2.33em; margin-=
bottom: 2.33em; font-size: 0.67em; }
+
+<var title=3D"">x</var> hgroup > h1 ~ h5 { =
margin-top: 2.33em; margin-bottom: 2.33em; font-size: 0.67em; }</pre&g=
t;
+
+
+
+  <h4 id=3Dlists><span class=3Dsecno>14.3.8 </span>Lis=
ts</h4>
+
+  <pre class=3Dcss>@namespace url(http://www.w3.org/1999/xhtml);
+
+dir, dd, dl, dt, menu, ol, ul { display: block; }<!-- see also unicod=
e-bidi:isolate rules -->
+li { display: list-item; }<!-- see also unicode-bidi:isolate rules --=
>
+
+dir, dl, menu, ol, ul { 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;
+}
+
+dd { margin-left: 40px; } /* <a href=3D#ltr-specific>LTR-specific&=
lt;/a>: use 'margin-right' for rtl elements */
+dir, menu, ol, ul { padding-left: 40px; } /* <a href=3D#ltr-specific&=
gt;LTR-specific</a>: use 'padding-right' for rtl elements */
+
+ol { list-style-type: decimal; }
+
+dir, menu, ul { list-style-type: disc; }
+
+dir dir, dir menu, dir ul,
+menu dir, menu menu, menu ul,
+ol dir, ol menu, ol ul,
+ul dir, ul menu, ul ul {
+  list-style-type: circle;
+}
+
+dir dir dir, dir dir menu, dir dir ul,
+dir menu dir, dir menu menu, dir menu ul,
+dir ol dir, dir ol menu, dir ol ul,
+dir ul dir, dir ul menu, dir ul ul,
+menu dir dir, menu dir menu, menu dir ul,
+menu menu dir, menu menu menu, menu menu ul,
+menu ol dir, menu ol menu, menu ol ul,
+menu ul dir, menu ul menu, menu ul ul,
+ol dir dir, ol dir menu, ol dir ul,
+ol menu dir, ol menu menu, ol menu ul,
+ol ol dir, ol ol menu, ol ol ul,
+ol ul dir, ol ul menu, ol ul ul,
+ul dir dir, ul dir menu, ul dir ul,
+ul menu dir, ul menu menu, ul menu ul,
+ul ol dir, ul ol menu, ul ol ul,
+ul ul dir, ul ul menu, ul ul ul {
+  list-style-type: square;
+}</pre>
+
+  <p id=3Ddecohints>The following rules are also expected to apply=
, as <a href=3D#presentational-hints>presentational
+  hints</a>:</p>
+
+  <pre class=3Dcss>@namespace url(http://www.w3.org/1999/xhtml);
+
+ol[type=3D1], li[type=3D1] { list-style-type: decimal; }
+ol[type=3Da], li[type=3Da] { list-style-type: lower-alpha; }
+ol[type=3DA], li[type=3DA] { list-style-type: upper-alpha; }
+ol[type=3Di], li[type=3Di] { list-style-type: lower-roman; }
+ol[type=3DI], li[type=3DI] { list-style-type: upper-roman; }
+ul[type=3Ddisc i], li[type=3Ddisc i] { list-style-type: disc; }
+ul[type=3Dcircle i], li[type=3Dcircle i] { list-style-type: circle; }
+ul[type=3Dsquare i], li[type=3Dsquare i] { list-style-type: square; }&lt=
;/pre>
+
+  <p>When rendering <code><a href=3D#the-li-element>li=
</a></code> elements, non-CSS user agents are expected to use=
 the
+  <a href=3D#ordinal-value>ordinal value</a> of the <code=
><a href=3D#the-li-element>li</a></code> element to =
render the counter in the list item
+  marker.</p>
+
+  <p class=3Dcritical id=3Dcss-list-rendering>This specification d=
oes not yet define the
+  CSS-specific rules for rendering <code><a href=3D#the-li-elem=
ent>li</a></code> elements, because CSS doesn't yet provid=
e
+  sufficient hooks for this purpose.</p>
+
+
+  <h4 id=3Dtables><span class=3Dsecno>14.3.9 </span>Ta=
bles</h4>
+
+  <pre class=3Dcss>@namespace url(http://www.w3.org/1999/xhtml);
+
+table { display: table; }<!-- see also unicode-bidi:isolate rules --&=
gt;
+caption { display: table-caption; }<!-- see also unicode-bidi:isolate=
 rules -->
+colgroup, colgroup[hidden] { display: table-column-group; }<!-- see a=
lso unicode-bidi:isolate rules -->
+col, col[hidden] { display: table-column; }<!-- see also unicode-bidi=
:isolate rules -->
+thead, thead[hidden] { display: table-header-group; }<!-- see also un=
icode-bidi:isolate rules -->
+tbody, tbody[hidden] { display: table-row-group; }<!-- see also unico=
de-bidi:isolate rules -->
+tfoot, tfoot[hidden] { display: table-footer-group; }<!-- see also un=
icode-bidi:isolate rules -->
+tr, tr[hidden] { display: table-row; }<!-- see also unicode-bidi:isol=
ate rules -->
+td, th, td[hidden], th[hidden] { display: table-cell; }<!-- see also =
unicode-bidi:isolate rules -->
+
+colgroup[hidden], col[hidden], thead[hidden], tbody[hidden],
+tfoot[hidden], tr[hidden], td[hidden], th[hidden] {
+  visibility: collapse;
+}
+
+table {
+  box-sizing: border-box;
+  border-spacing: 2px;
+  border-collapse: separate;
+  text-indent: initial;
+}
+td, th { padding: 1px; }
+th { font-weight: bold; }
+
+thead, tbody, tfoot, table > tr { vertical-align: middle; }
+tr, td, th { vertical-align: inherit; }
+
+table, td, th { border-color: gray; }
+thead, tbody, tfoot, tr { border-color: inherit; }
+table[rules=3Dnone i], table[rules=3Dgroups i], table[rules=3Drows i],
+table[rules=3Dcols i], table[rules=3Dall i], table[frame=3Dvoid i],
+table[frame=3Dabove i], table[frame=3Dbelow i], table[frame=3Dhsides i],
+table[frame=3Dlhs i], table[frame=3Drhs i], table[frame=3Dvsides i],
+table[frame=3Dbox i], table[frame=3Dborder i],
+table[rules=3Dnone i] > tr > td, table[rules=3Dnone i] &am=
p;gt; tr > th,
+table[rules=3Dgroups i] > tr > td, table[rules=3Dgroups i]=
 > tr > th,
+table[rules=3Drows i] > tr > td, table[rules=3Drows i] &am=
p;gt; tr > th,
+table[rules=3Dcols i] > tr > td, table[rules=3Dcols i] &am=
p;gt; tr > th,
+table[rules=3Dall i] > tr > td, table[rules=3Dall i] &=
gt; tr > th,
+table[rules=3Dnone i] > thead > tr > td, table[rule=
s=3Dnone i] > thead > tr > th,
+table[rules=3Dgroups i] > thead > tr > td, table[ru=
les=3Dgroups i] > thead > tr > th,
+table[rules=3Drows i] > thead > tr > td, table[rule=
s=3Drows i] > thead > tr > th,
+table[rules=3Dcols i] > thead > tr > td, table[rule=
s=3Dcols i] > thead > tr > th,
+table[rules=3Dall i] > thead > tr > td, table[rules=
=3Dall i] > thead > tr > th,
+table[rules=3Dnone i] > tbody > tr > td, table[rule=
s=3Dnone i] > tbody > tr > th,
+table[rules=3Dgroups i] > tbody > tr > td, table[ru=
les=3Dgroups i] > tbody > tr > th,
+table[rules=3Drows i] > tbody > tr > td, table[rule=
s=3Drows i] > tbody > tr > th,
+table[rules=3Dcols i] > tbody > tr > td, table[rule=
s=3Dcols i] > tbody > tr > th,
+table[rules=3Dall i] > tbody > tr > td, table[rules=
=3Dall i] > tbody > tr > th,
+table[rules=3Dnone i] > tfoot > tr > td, table[rule=
s=3Dnone i] > tfoot > tr > th,
+table[rules=3Dgroups i] > tfoot > tr > td, table[ru=
les=3Dgroups i] > tfoot > tr > th,
+table[rules=3Drows i] > tfoot > tr > td, table[rule=
s=3Drows i] > tfoot > tr > th,
+table[rules=3Dcols i] > tfoot > tr > td, table[rule=
s=3Dcols i] > tfoot > tr > th,
+table[rules=3Dall i] > tfoot > tr > td, table[rules=
=3Dall i] > tfoot > tr > th {
+  border-color: black;
+}</pre>
+
+  <p>The following rules are also expected to apply, as <a href=
=3D#presentational-hints>presentational hints</a>:</p>
+
+  <pre class=3Dcss>@namespace url(http://www.w3.org/1999/xhtml);
+
+table[align=3Dleft i] { float: left; }
+table[align=3Dright i] { float: right; }
+table[align=3Dcenter i] { margin-left: auto; margin-right: auto; }
+thead[align=3Dabsmiddle i], tbody[align=3Dabsmiddle i], tfoot[align=3Dab=
smiddle i],
+tr[align=3Dabsmiddle i], td[align=3Dabsmiddle i], th[align=3Dabsmiddle i=
] {
+  text-align: center;
+}
+
+caption[align=3Dbottom i] { caption-side: bottom; }
+p[align=3Dleft i], h1[align=3Dleft i], h2[align=3Dleft i], h3[align=3Dle=
ft i],
+h4[align=3Dleft i], h5[align=3Dleft i], h6[align=3Dleft i] {
+  text-align: left;
+}
+p[align=3Dright i], h1[align=3Dright i], h2[align=3Dright i], h3[align=3D=
right i],
+h4[align=3Dright i], h5[align=3Dright i], h6[align=3Dright i] {
+  text-align: right;
+}
+p[align=3Dcenter i], h1[align=3Dcenter i], h2[align=3Dcenter i], h3[alig=
n=3Dcenter i],
+h4[align=3Dcenter i], h5[align=3Dcenter i], h6[align=3Dcenter i] {
+  text-align: center;
+}
+p[align=3Djustify i], h1[align=3Djustify i], h2[align=3Djustify i], h3[a=
lign=3Djustify i],
+h4[align=3Djustify i], h5[align=3Djustify i], h6[align=3Djustify i] {
+  text-align: justify;
+}
+thead[valign=3Dtop i], tbody[valign=3Dtop i], tfoot[valign=3Dtop i],
+tr[valign=3Dtop i], td[valign=3Dtop i], th[valign=3Dtop i] {
+  vertical-align: top;
+}
+thead[valign=3Dmiddle i], tbody[valign=3Dmiddle i], tfoot[valign=3Dmiddl=
e i],
+tr[valign=3Dmiddle i], td[valign=3Dmiddle i], th[valign=3Dmiddle i] {
+  vertical-align: middle;
+}
+thead[valign=3Dbottom i], tbody[valign=3Dbottom i], tfoot[valign=3Dbotto=
m i],
+tr[valign=3Dbottom i], td[valign=3Dbottom i], th[valign=3Dbottom i] {
+  vertical-align: bottom;
+}
+thead[valign=3Dbaseline i], tbody[valign=3Dbaseline i], tfoot[valign=3Db=
aseline i],
+tr[valign=3Dbaseline i], td[valign=3Dbaseline i], th[valign=3Dbaseline i=
] {
+  vertical-align: baseline;
+}
+
+td[nowrap], th[nowrap] { white-space: nowrap; }
+
+table[rules=3Dnone i], table[rules=3Dgroups i], table[rules=3Drows i],
+table[rules=3Dcols i], table[rules=3Dall i] {
+  border-style: hidden;
+  border-collapse: collapse;
+}
+table[border] { border-style: outset; } /* <a href=3D#magic-border-se=
lector>only if border is not equivalent to zero</a> */
+table[frame=3Dvoid i] { border-style: hidden; }
+table[frame=3Dabove i] { border-style: outset hidden hidden hidden; }
+table[frame=3Dbelow i] { border-style: hidden hidden outset hidden; }
+table[frame=3Dhsides i] { border-style: outset hidden outset hidden; }
+table[frame=3Dlhs i] { border-style: hidden hidden hidden outset; }
+table[frame=3Drhs i] { border-style: hidden outset hidden hidden; }
+table[frame=3Dvsides i] { border-style: hidden outset; }
+table[frame=3Dbox i], table[frame=3Dborder i] { border-style: outset; }
+
+table[border] > tr > td, table[border] > tr &gt=
; th,
+table[border] > thead > tr > td, table[border] &amp=
;gt; thead > tr > th,
+table[border] > tbody > tr > td, table[border] &amp=
;gt; tbody > tr > th,
+table[border] > tfoot > tr > td, table[border] &amp=
;gt; tfoot > tr > th {
+  /* <a href=3D#magic-border-selector>only if border is not equiva=
lent to zero</a> */
+  border-width: 1px;
+  border-style: inset;
+}
+table[rules=3Dnone i] > tr > td, table[rules=3Dnone i] &am=
p;gt; tr > th,
+table[rules=3Dnone i] > thead > tr > td, table[rule=
s=3Dnone i] > thead > tr > th,
+table[rules=3Dnone i] > tbody > tr > td, table[rule=
s=3Dnone i] > tbody > tr > th,
+table[rules=3Dnone i] > tfoot > tr > td, table[rule=
s=3Dnone i] > tfoot > tr > th,
+table[rules=3Dgroups i] > tr > td, table[rules=3Dgroups i]=
 > tr > th,
+table[rules=3Dgroups i] > thead > tr > td, table[ru=
les=3Dgroups i] > thead > tr > th,
+table[rules=3Dgroups i] > tbody > tr > td, table[ru=
les=3Dgroups i] > tbody > tr > th,
+table[rules=3Dgroups i] > tfoot > tr > td, table[ru=
les=3Dgroups i] > tfoot > tr > th,
+table[rules=3Drows i] > tr > td, table[rules=3Drows i] &am=
p;gt; tr > th,
+table[rules=3Drows i] > thead > tr > td, table[rule=
s=3Drows i] > thead > tr > th,
+table[rules=3Drows i] > tbody > tr > td, table[rule=
s=3Drows i] > tbody > tr > th,
+table[rules=3Drows i] > tfoot > tr > td, table[rule=
s=3Drows i] > tfoot > tr > th {
+  border-width: 1px;
+  border-style: none;
+}
+table[rules=3Dcols i] > tr > td, table[rules=3Dcols i] &am=
p;gt; tr > th,
+table[rules=3Dcols i] > thead > tr > td, table[rule=
s=3Dcols i] > thead > tr > th,
+table[rules=3Dcols i] > tbody > tr > td, table[rule=
s=3Dcols i] > tbody > tr > th,
+table[rules=3Dcols i] > tfoot > tr > td, table[rule=
s=3Dcols i] > tfoot > tr > th {
+  border-width: 1px;
+  border-style: none solid;
+}
+table[rules=3Dall i] > tr > td, table[rules=3Dall i] &=
gt; tr > th,
+table[rules=3Dall i] > thead > tr > td, table[rules=
=3Dall i] > thead > tr > th,
+table[rules=3Dall i] > tbody > tr > td, table[rules=
=3Dall i] > tbody > tr > th,
+table[rules=3Dall i] > tfoot > tr > td, table[rules=
=3Dall i] > tfoot > tr > th {
+  border-width: 1px;
+  border-style: solid;
+}
+
+table[rules=3Dgroups i] > colgroup {
+  border-left-width: 1px;
+  border-left-style: solid;
+  border-right-width: 1px;
+  border-right-style: solid;
+}
+table[rules=3Dgroups i] > thead,
+table[rules=3Dgroups i] > tbody,
+table[rules=3Dgroups i] > tfoot {
+  border-top-width: 1px;
+  border-top-style: solid;
+  border-bottom-width: 1px;
+  border-bottom-style: solid;
+}
+
+table[rules=3Drows i] > tr, table[rules=3Drows i] > thead =
> tr,
+table[rules=3Drows i] > tbody > tr, table[rules=3Drows i] =
> tfoot > tr {
+  border-top-width: 1px;
+  border-top-style: solid;
+  border-bottom-width: 1px;
+  border-bottom-style: solid;
+}</pre>
+
+<!--
+ Demos that the above (and prose below) must explain:
+   http://software.hixie.ch/utilities/js/live-dom-viewer/saved/1191
+   http://software.hixie.ch/utilities/js/live-dom-viewer/saved/1194
+   http://software.hixie.ch/utilities/js/live-dom-viewer/saved/1195
+   http://software.hixie.ch/utilities/js/live-dom-viewer/saved/1196
+   http://software.hixie.ch/utilities/js/live-dom-viewer/saved/1197
+   http://software.hixie.ch/utilities/js/live-dom-viewer/saved/1199
+   http://software.hixie.ch/utilities/js/live-dom-viewer/saved/1200
+   http://software.hixie.ch/utilities/js/live-dom-viewer/saved/1201
+   http://software.hixie.ch/utilities/js/live-dom-viewer/saved/1209
+-->
+
+
+  <p>In <a href=3D#quirks-mode>quirks mode</a>, the fo=
llowing rules are also expected to apply:</p>
+
+  <pre class=3Dcss>@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;
+}</pre>
+
+  <hr><p>For the purposes of the CSS table model, the <co=
de><a href=3D#the-col-element>col</a></code> element=
 is expected to be treated
+  as if it was present as many times as its <code title=3Dattr-col-sp=
an><a href=3D#attr-col-span>span</a></code> attribut=
e <a href=3D#rules-for-parsing-non-negative-integers title=3D"rul=
es for parsing non-negative integers">specifies</a>.</p&=
gt;
+
+  <p>For the purposes of the CSS table model, the <code><=
a href=3D#the-colgroup-element>colgroup</a></code> element=
, if it contains no
+  <code><a href=3D#the-col-element>col</a></code&gt=
; element, is expected to be treated as if it had as many such children a=
s its
+  <code title=3Dattr-colgroup-span><a href=3D#attr-colgroup-spa=
n>span</a></code> attribute <a href=3D#rules-for-parsin=
g-non-negative-integers title=3D"rules for parsing non-negative
+  integers">specifies</a>.</p>
+
+  <p>For the purposes of the CSS table model, the <code title=3D=
attr-tdth-colspan><a href=3D#attr-tdth-colspan>colspan</a>=
</code> and
+  <code title=3Dattr-tdth-rowspan><a href=3D#attr-tdth-rowspan&=
gt;rowspan</a></code> attributes on <code><a href=3D=
#the-td-element>td</a></code> and <code><a href=3D=
#the-th-element>th</a></code>
+  elements are expected to <a href=3D#rules-for-parsing-non-negative-=
integers title=3D"rules for parsing non-negative integers">p=
rovide</a> the
+  <i>special knowledge</i> regarding cells spanning rows and=
 columns.</p>
+
+  <p>In <a href=3D#html-documents>HTML documents</a>, =
the user agent is expected to force the 'display' property of
+  <code><a href=3D#the-form-element>form</a></code&=
gt; elements that are children of <code><a href=3D#the-table-ele=
ment>table</a></code>, <code><a href=3D#the-thead=
-element>thead</a></code>,
+  <code><a href=3D#the-tbody-element>tbody</a></cod=
e>, <code><a href=3D#the-tfoot-element>tfoot</a><=
/code>, or <code><a href=3D#the-tr-element>tr</a>&lt=
;/code> elements to compute to 'none',
+  irrespective of CSS rules.</p>
+
+  <hr><p>The <code><a href=3D#the-table-element>=
table</a></code> element's <code title=3Dattr-table-cellsp=
acing><a href=3D#attr-table-cellspacing>cellspacing</a>&lt=
;/code>
+  attribute <a href=3D#maps-to-the-pixel-length-property>maps to t=
he pixel length property</a> 'border-spacing' on the element.</p=
>
+
+  <p>The <code><a href=3D#the-table-element>table</=
a></code> element's <code title=3Dattr-table-cellpadding>&=
lt;a href=3D#attr-table-cellpadding>cellpadding</a></code>
+  attribute <a href=3D#maps-to-the-pixel-length-property title=3D&quo=
t;maps to the pixel length property">maps to the pixel length
+  properties</a> 'padding-top', 'padding-right', 'padding-bottom',=
 and 'padding-left' of any
+  <code><a href=3D#the-td-element>td</a></code> =
and <code><a href=3D#the-th-element>th</a></code>=
 elements that have corresponding <a href=3D#concept-cell title=3Dconc=
ept-cell>cells</a> in the <a href=3D#concept-table title=3Dco=
ncept-table>table</a> corresponding to
+  the <code><a href=3D#the-table-element>table</a><=
/code> element.</p>
+
+  <p>The <code><a href=3D#the-table-element>table</=
a></code> element's <code title=3Dattr-table-hspace>hspace=
</code> attribute <a href=3D#maps-to-the-dimension-property titl=
e=3D"maps to the dimension property">maps to the dimension p=
roperties</a> 'margin-left' and
+  'margin-right' on the <code><a href=3D#the-table-element>t=
able</a></code> element.</p>
+
+  <p>The <code><a href=3D#the-table-element>table</=
a></code> element's <code title=3Dattr-table-vspace>vspace=
</code> attribute <a href=3D#maps-to-the-dimension-property titl=
e=3D"maps to the dimension property">maps to the dimension p=
roperties</a> 'margin-top' and
+  'margin-bottom' on the <code><a href=3D#the-table-element>=
table</a></code> element.</p>
+
+  <p>The <code><a href=3D#the-table-element>table</=
a></code> element's <code title=3Dattr-table-height>height=
</code> attribute
+  <a href=3D#maps-to-the-dimension-property>maps to the dimension =
property</a> 'height' on the <code><a href=3D#the-table-el=
ement>table</a></code> element.</p>
+
+  <p>The <code><a href=3D#the-table-element>table</=
a></code> element's <code title=3Dattr-table-width><a h=
ref=3D#attr-table-width>width</a></code> attribute
+  <a href=3D#maps-to-the-dimension-property>maps to the dimension =
property</a> 'width' on the <code><a href=3D#the-table-ele=
ment>table</a></code> element.</p>
+
+  <p>The <code><a href=3D#the-col-element>col</a&gt=
;</code> element's <code title=3Dattr-col-width><a href=3D=
#attr-col-width>width</a></code> attribute <a href=3D#m=
aps-to-the-dimension-property>maps
+  to the dimension property</a> 'width' on the <code><a h=
ref=3D#the-col-element>col</a></code> element.</p>
+
+  <p>The <code><a href=3D#the-tr-element>tr</a>&=
lt;/code> element's <code title=3Dattr-tr-height>height</code=
> attribute <a href=3D#maps-to-the-dimension-property>maps
+  to the dimension property</a> 'height' on the <code><a =
href=3D#the-tr-element>tr</a></code> element.</p>
+
+  <p>The <code><a href=3D#the-td-element>td</a>&=
lt;/code> and <code><a href=3D#the-th-element>th</a>=
</code> elements' <code title=3Dattr-tdth-height><a href=3D=
#attr-tdth-height>height</a></code>
+  attributes <a href=3D#maps-to-the-dimension-property title=3D"=
maps to the dimension property">map to the dimension property<=
/a>
+  'height' on the element.</p>
+
+  <p>The <code><a href=3D#the-td-element>td</a>&=
lt;/code> and <code><a href=3D#the-th-element>th</a>=
</code> elements' <code title=3Dattr-tdth-width><a href=3D=
#attr-tdth-width>width</a></code>
+  attributes <a href=3D#maps-to-the-dimension-property title=3D"=
maps to the dimension property">map to the dimension property<=
/a>
+  'width' on the element.</p>
+
+  <hr><p>The <code><a href=3D#the-caption-element&g=
t;caption</a></code> element unless specified otherwise below=
, and the <code><a href=3D#the-thead-element>thead</a>&=
lt;/code>,
+  <code><a href=3D#the-tbody-element>tbody</a></cod=
e>, <code><a href=3D#the-tfoot-element>tfoot</a><=
/code>, <code><a href=3D#the-tr-element>tr</a></c=
ode>, <code><a href=3D#the-td-element>td</a></cod=
e>, and <code><a href=3D#the-th-element>th</a></c=
ode>
+  elements when they have an <code title=3Dattr-div-align><a hr=
ef=3D#attr-div-align>align</a></code> attribute whose valu=
e is an
+  <a href=3D#ascii-case-insensitive>ASCII case-insensitive</a&g=
t; match for either the string "<code title=3D"">cen=
ter</code>" or
+  the string "<code title=3D"">middle</code>&=
quot;, are expected to center text within themselves, as if
+  they had their 'text-align' property set to 'center' in a <a href=3D=
#presentational-hints title=3D"presentational
+  hints">presentational hint</a>, and to <a href=3D#ali=
gn-descendants>align descendants</a> to the center.</p>
+
+  <p>The <code><a href=3D#the-caption-element>caption&=
lt;/a></code>, <code><a href=3D#the-thead-element>th=
ead</a></code>, <code><a href=3D#the-tbody-element&g=
t;tbody</a></code>, <code><a href=3D#the-tfoot-eleme=
nt>tfoot</a></code>,
+  <code><a href=3D#the-tr-element>tr</a></code>,=
 <code><a href=3D#the-td-element>td</a></code>, a=
nd <code><a href=3D#the-th-element>th</a></code> =
elements, when they have an <code title=3Dattr-align>align</code=
> attribute whose value is an <a href=3D#ascii-case-insensitive>=
ASCII case-insensitive</a>
+  match for the string "<code title=3D"">left</c=
ode>", are expected to left-align text within
+  themselves, as if they had their 'text-align' property set to 'left' i=
n a <a href=3D#presentational-hints title=3D"presentational hints=
">presentational hint</a>, and to <a href=3D#align-desce=
ndants>align descendants</a> to
+  the left.</p>
+
+  <p>The <code><a href=3D#the-caption-element>caption&=
lt;/a></code>, <code><a href=3D#the-thead-element>th=
ead</a></code>, <code><a href=3D#the-tbody-element&g=
t;tbody</a></code>, <code><a href=3D#the-tfoot-eleme=
nt>tfoot</a></code>,
+  <code><a href=3D#the-tr-element>tr</a></code>,=
 <code><a href=3D#the-td-element>td</a></code>, a=
nd <code><a href=3D#the-th-element>th</a></code> =
elements, when they have an <code title=3Dattr-align>align</code=
> attribute whose value is an <a href=3D#ascii-case-insensitive>=
ASCII case-insensitive</a>
+  match for the string "<code title=3D"">right</=
code>", are expected to right-align text within
+  themselves, as if they had their 'text-align' property set to 'right' =
in a <a href=3D#presentational-hints title=3D"presentational hint=
s">presentational hint</a>, and to <a href=3D#align-desc=
endants>align descendants</a> to
+  the right.</p>
+
+  <p>The <code><a href=3D#the-caption-element>caption&=
lt;/a></code>, <code><a href=3D#the-thead-element>th=
ead</a></code>, <code><a href=3D#the-tbody-element&g=
t;tbody</a></code>, <code><a href=3D#the-tfoot-eleme=
nt>tfoot</a></code>,
+  <code><a href=3D#the-tr-element>tr</a></code>,=
 <code><a href=3D#the-td-element>td</a></code>, a=
nd <code><a href=3D#the-th-element>th</a></code> =
elements, when they have an <code title=3Dattr-align>align</code=
> attribute whose value is an <a href=3D#ascii-case-insensitive>=
ASCII case-insensitive</a>
+  match for the string "<code title=3D"">justify&lt=
;/code>", are expected to full-justify text within
+  themselves, as if they had their 'text-align' property set to 'justify=
' in a <a href=3D#presentational-hints title=3D"presentational hi=
nts">presentational hint</a>, and to <a href=3D#align-de=
scendants>align descendants</a> to
+  the left.</p>
+
+  <p>User agents are expected to have a rule in their user agent s=
tylesheet that matches
+  <code><a href=3D#the-th-element>th</a></code> =
elements that have a parent node whose computed value for the 'text-align=
'
+  property is its initial value, whose declaration block consists of jus=
t a single declaration that
+  sets the 'text-align' property to the value 'center'.</p> <!-=
- q.v. '-moz-center-or-inherit' -->
+
+  <hr><p>When a <code><a href=3D#the-table-element&=
gt;table</a></code>, <code><a href=3D#the-thead-elem=
ent>thead</a></code>, <code><a href=3D#the-tbody-=
element>tbody</a></code>, <code><a href=3D#the-tf=
oot-element>tfoot</a></code>,
+  <code><a href=3D#the-tr-element>tr</a></code>,=
 <code><a href=3D#the-td-element>td</a></code>, o=
r <code><a href=3D#the-th-element>th</a></code> e=
lement has a <code title=3Dattr-background><a href=3D#attr-backg=
round>background</a></code> attribute set to a non-empty v=
alue, the new value is
+  expected to be <a href=3D#resolve-a-url title=3D"resolve a url=
">resolved</a> relative to the element, and if this is
+  successful, the user agent is expected to treat the attribute as a &lt=
;a href=3D#presentational-hints title=3D"presentational
+  hints">presentational hint</a> setting the element's 'ba=
ckground-image' property to the
+  resulting <a href=3D#absolute-url>absolute URL</a>.</p&=
gt;
+
+  <p>When a <code><a href=3D#the-table-element>table&l=
t;/a></code>, <code><a href=3D#the-thead-element>the=
ad</a></code>, <code><a href=3D#the-tbody-element&gt=
;tbody</a></code>, <code><a href=3D#the-tfoot-elemen=
t>tfoot</a></code>,
+  <code><a href=3D#the-tr-element>tr</a></code>,=
 <code><a href=3D#the-td-element>td</a></code>, o=
r <code><a href=3D#the-th-element>th</a></code> e=
lement has a <code title=3D"">bgcolor</code>
+  attribute set, the new value is expected to be parsed using the <a =
href=3D#rules-for-parsing-a-legacy-color-value>rules for parsing a leg=
acy
+  color value</a>, and if that does not return an error, the user =
agent is expected to treat the
+  attribute as a <a href=3D#presentational-hints title=3D"presen=
tational hints">presentational hint</a> setting the element=
's
+  'background-color' property to the resulting color.</p>
+
+  <p>When a <code><a href=3D#the-table-element>table&l=
t;/a></code> element has a <code title=3Dattr-table-bordercol=
or><a href=3D#attr-table-bordercolor>bordercolor</a></c=
ode>
+  attribute, its value is expected to be parsed using the <a href=3D#=
rules-for-parsing-a-legacy-color-value>rules for parsing a legacy colo=
r
+  value</a>, and if that does not return an error, the user agent =
is expected to treat the
+  attribute as a <a href=3D#presentational-hints title=3D"presen=
tational hints">presentational hint</a> setting the element=
's
+  'border-top-color', 'border-right-color', 'border-bottom-color', and '=
border-right-color'
+  properties to the resulting color.</p>
+
+  <hr><p>The <code><a href=3D#the-table-element>=
table</a></code> element's <code title=3Dattr-table-border=
><a href=3D#attr-table-border>border</a></code> attr=
ibute <a href=3D#maps-to-the-pixel-length-property title=3D"maps =
to the pixel length property">maps to the pixel length properties=
</a>
+  'border-top-width', 'border-right-width', 'border-bottom-width', 'bord=
er-left-width' on the
+  element. If the attribute is present but parsing the attribute's value=
 using the <a href=3D#rules-for-parsing-non-negative-integers>rules=
 for
+  parsing non-negative integers</a> generates an error, a default =
value of 1px is expected to be
+  used for that property instead.</p>
+
+  <p>Rules marked "<dfn id=3Dmagic-border-selector>only=
 if border is not equivalent to zero</dfn>"
+  in the CSS block above is expected to only be applied if the <code =
title=3Dattr-table-border><a href=3D#attr-table-border>border&lt=
;/a></code> attribute mentioned in the selectors for the rule is=
 not
+  only present but, when parsed using the <a href=3D#rules-for-parsin=
g-non-negative-integers>rules for parsing non-negative integers</a&=
gt;, is
+  also found to have a value other than zero or to generate an error.&lt=
;/p>
+
+  <hr><p>In <a href=3D#quirks-mode>quirks mode</a&g=
t;, a <code><a href=3D#the-td-element>td</a></code&g=
t; element or a <code><a href=3D#the-th-element>th</a>&=
lt;/code> element that has a
+  <code title=3Dattr-tdth-nowrap><a href=3D#attr-tdth-nowrap&gt=
;nowrap</a></code> attribute but also has a <code title=3D=
attr-tdth-width><a href=3D#attr-tdth-width>width</a></c=
ode> attribute whose value, when parsed using the <a href=3D#rules-=
for-parsing-dimension-values>rules for
+  parsing dimension values</a>, is found to be a length (not an er=
ror or a number classified as a
+  percentage), is expected to have a <a href=3D#presentational-hints =
title=3D"presentational hints">presentational hint</a>
+  setting the element's 'white-space' property to 'normal', overriding t=
he rule in the CSS block
+  above that sets it to 'nowrap'.</p> <!--
+  http://software.hixie.ch/utilities/js/live-dom-viewer/saved/1793 --&gt=
; <!-- note that the "rules for
+  parsing dimension values" can't return 0, if the value is "0=
" they treat it as an error -->
+
+  <hr><p id=3Dsortable-ui>User agents are expected to render=
 <a href=3D#sorting-interface-th-element title=3D"sorting interfa=
ce th
+  element">sorting interface <code>th</code> element=
s</a> in such a manner as to indicate that
+  activating the elements will cause the table to be sorted.</p>
+
+
+  <h4 id=3Dmargin-collapsing-quirks><span class=3Dsecno>14.3=
.10 </span>Margin collapsing quirks</h4>
+
+  <p>A node is <dfn id=3Dconcept-rendering-substantial title=3D=
concept-rendering-substantial>substantial</dfn> if it is a text =
node
+  that is not <a href=3D#inter-element-whitespace>inter-element wh=
itespace</a>, or if it is an element node.</p>
+
+  <p>A node is <dfn id=3Dconcept-rendering-blank title=3Dconcep=
t-rendering-blank>blank</dfn> if it is an element that contains =
no
+  <a href=3D#concept-rendering-substantial title=3Dconcept-rendering-=
substantial>substantial</a> nodes.</p>
+
+  <p>The <dfn id=3Dconcept-rendering-elements-with-margins titl=
e=3Dconcept-rendering-elements-with-margins>elements with default marg=
ins</dfn>
+  are the following elements: <code><a href=3D#the-blockquote-e=
lement>blockquote</a></code>, <code><a href=3D#di=
r>dir</a></code>, <code><a href=3D#the-dl-element=
>dl</a></code>,
+  <code><a href=3D#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h=
1</a></code>, <code><a href=3D#the-h1,-h2,-h3,-h4,-h=
5,-and-h6-elements>h2</a></code>, <code><a href=3D=
#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h3</a></code>, &l=
t;code><a href=3D#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h4<=
/a></code>, <code><a href=3D#the-h1,-h2,-h3,-h4,-h5,-an=
d-h6-elements>h5</a></code>,
+  <code><a href=3D#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h=
6</a></code>, <code><a href=3D#listing>listing&lt=
;/a></code>, <code><a href=3D#the-menu-element>menu&=
lt;/a></code>, <code><a href=3D#multicol>multicol&lt=
;/a></code>, <code><a href=3D#the-ol-element>ol</=
a></code>,
+  <code><a href=3D#the-p-element>p</a></code>, &=
lt;code><a href=3D#plaintext>plaintext</a></code>, &=
lt;code><a href=3D#the-pre-element>pre</a></code>, &=
lt;code><a href=3D#the-ul-element>ul</a></code>, &lt=
;code><a href=3D#xmp>xmp</a></code></p>
+
+  <p>In <a href=3D#quirks-mode>quirks mode</a>, any &l=
t;a href=3D#concept-rendering-elements-with-margins title=3Dconcept-rende=
ring-elements-with-margins>element
+  with default margins</a> that is the child of a <code><=
a href=3D#the-body-element>body</a></code>, <code>&l=
t;a href=3D#the-td-element>td</a></code>, or
+  <code><a href=3D#the-th-element>th</a></code> =
element and has no <a href=3D#concept-rendering-substantial title=3Dco=
ncept-rendering-substantial>substantial</a>
+  previous siblings is expected to have a user-agent level style sheet r=
ule that sets its
+  'margin-top' property to zero.</p>
+
+  <p>In <a href=3D#quirks-mode>quirks mode</a>, any &l=
t;a href=3D#concept-rendering-elements-with-margins title=3Dconcept-rende=
ring-elements-with-margins>element
+  with default margins</a> that is the child of a <code><=
a href=3D#the-body-element>body</a></code>, <code>&l=
t;a href=3D#the-td-element>td</a></code>, or
+  <code><a href=3D#the-th-element>th</a></code> =
element, has no <a href=3D#concept-rendering-substantial title=3Dconce=
pt-rendering-substantial>substantial</a>
+  previous siblings, and is <a href=3D#concept-rendering-blank title=3D=
concept-rendering-blank>blank</a>, is expected to have
+  a user-agent level style sheet rule that sets its 'margin-bottom' prop=
erty to zero also.</p>
+
+  <p>In <a href=3D#quirks-mode>quirks mode</a>, any &l=
t;a href=3D#concept-rendering-elements-with-margins title=3Dconcept-rende=
ring-elements-with-margins>element
+  with default margins</a> that is the child of a <code><=
a href=3D#the-td-element>td</a></code> or <code><=
a href=3D#the-th-element>th</a></code> element, has
+  no <a href=3D#concept-rendering-substantial title=3Dconcept-renderi=
ng-substantial>substantial</a> following siblings, and is <a =
href=3D#concept-rendering-blank title=3Dconcept-rendering-blank>blank&=
lt;/a>, is expected to have a user-agent level style sheet
+  rule that sets its 'margin-top' property to zero.</p>
+
+  <p>In <a href=3D#quirks-mode>quirks mode</a>, any &l=
t;code><a href=3D#the-p-element>p</a></code> element=
 that is the child of a <code><a href=3D#the-td-element>td&lt=
;/a></code>
+  or <code><a href=3D#the-th-element>th</a></code&g=
t; element and has no <a href=3D#concept-rendering-substantial title=3D=
concept-rendering-substantial>substantial</a> following siblings=
, is expected to have a
+  user-agent level style sheet rule that sets its 'margin-bottom' proper=
ty to zero.</p>
+
+
+  <h4 id=3Dform-controls><span class=3Dsecno>14.3.11 </sp=
an>Form controls</h4>
+
+  <pre class=3Dcss>@namespace url(http://www.w3.org/1999/xhtml);
+
+input, select, option, optgroup, button, textarea, keygen {
+  text-indent: initial;
+}
+
+textarea { white-space: pre-wrap; }
+
+input[type=3D"radio"], input[type=3D"checkbox"], inp=
ut[type=3D"reset"], input[type=3D"button"],
+input[type=3D"submit"], select, button {
+  box-sizing: border-box;
+}</pre>
+
+  <p>In <a href=3D#quirks-mode>quirks mode</a>, the fo=
llowing rules are also expected to apply:</p>
+
+  <pre class=3Dcss>@namespace url(http://www.w3.org/1999/xhtml);
+
+input:not([type=3Dimage]), textarea { box-sizing: border-box; }</pre&=
gt;
+
+  <p>Each kind of form control is also given a specific default bi=
nding, as described in subsequent
+  sections, which implements the look and feel of the control.</p>
+
+
+
+  <h4 id=3Dthe-hr-element-0><span class=3Dsecno>14.3.12 <=
/span>The <code><a href=3D#the-hr-element>hr</a><=
/code> element</h4>
+
+  <pre class=3Dcss>@namespace url(http://www.w3.org/1999/xhtml);
+
+hr { color: gray; border-style: inset; border-width: 1px; margin: 0.5em =
auto; }</pre>
+
+  <p>The following rules are also expected to apply, as <a href=
=3D#presentational-hints>presentational hints</a>:</p>
+
+  <pre class=3Dcss>@namespace url(http://www.w3.org/1999/xhtml);
+
+hr[align=3Dleft] { margin-left: 0; margin-right: auto; }
+hr[align=3Dright] { margin-left: auto; margin-right: 0; }
+hr[align=3Dcenter] { margin-left: auto; margin-right: auto; }
+hr[color], hr[noshade] { border-style: solid; }</pre>
+
+  <p>If an <code><a href=3D#the-hr-element>hr</a&gt=
;</code> element has either a <code title=3Dattr-hr-color>&lt=
;a href=3D#attr-hr-color>color</a></code> attribute
+  or a <code title=3Dattr-hr-noshade><a href=3D#attr-hr-noshade=
>noshade</a></code> attribute, and furthermore also has a =
<code title=3Dattr-hr-size><a href=3D#attr-hr-size>size</a=
></code> attribute, and parsing that attribute's value using the
+  <a href=3D#rules-for-parsing-non-negative-integers>rules for par=
sing non-negative integers</a> doesn't generate an error, then the =
user
+  agent is expected to use the parsed value divided by two as a pixel le=
ngth for
+  <a href=3D#presentational-hints>presentational hints</a> f=
or the properties 'border-top-width', 'border-right-width',
+  'border-bottom-width', and 'border-left-width' on the element.</p&g=
t;
+
+  <p>Otherwise, if an <code><a href=3D#the-hr-element>=
hr</a></code> element has neither a <code title=3Dattr-hr-=
color><a href=3D#attr-hr-color>color</a></code>
+  attribute nor a <code title=3Dattr-hr-noshade><a href=3D#attr=
-hr-noshade>noshade</a></code> attribute, but does have a =
<code title=3Dattr-hr-size><a href=3D#attr-hr-size>size</a=
></code> attribute, and parsing that attribute's value using the
+  <a href=3D#rules-for-parsing-non-negative-integers>rules for par=
sing non-negative integers</a> doesn't generate an error, then: if =
the
+  parsed value is one, then the user agent is expected to use the attrib=
ute as a <a href=3D#presentational-hints title=3D"presentational =
hints">presentational hint</a> 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 <a href=3D#presentational-hints>presentational
+  hints</a> for the 'height' property on the element.</p>
+
+  <p>The <code title=3Dattr-hr-width><a href=3D#attr-hr-w=
idth>width</a></code> attribute on an <code><a hr=
ef=3D#the-hr-element>hr</a></code> element <a href=3D#m=
aps-to-the-dimension-property>maps
+  to the dimension property</a> 'width' on the element.</p>
+
+  <p>When an <code><a href=3D#the-hr-element>hr</a&=
gt;</code> element has a <code title=3Dattr-hr-color><a hr=
ef=3D#attr-hr-color>color</a></code> attribute, its
+  value is expected to be parsed using the <a href=3D#rules-for-parsi=
ng-a-legacy-color-value>rules for parsing a legacy color value</a&g=
t;, and
+  if that does not return an error, the user agent is expected to treat =
the attribute as a <a href=3D#presentational-hints title=3D"prese=
ntational hints">presentational hint</a> setting the elemen=
t's 'color' property to
+  the resulting color.</p>
+
+
+
+  <h4 id=3Dthe-fieldset-and-legend-elements><span class=3Dsecno=
>14.3.13 </span>The <code><a href=3D#the-fieldset-eleme=
nt>fieldset</a></code> and <code><a href=3D#the-l=
egend-element>legend</a></code> elements</h4>
+
+  <pre class=3Dcss>@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;
+}
+
+legend {
+  padding-left: 2px; padding-right: 2px;
+}</pre>
+
+  <p>The <code><a href=3D#the-fieldset-element>fieldse=
t</a></code> element is expected to establish a new block for=
matting context.</p>
+
+  <p>If the <code><a href=3D#the-fieldset-element>fiel=
dset</a></code> element has a child that matches the conditio=
ns in the list below,
+  then the first such child is the <code><a href=3D#the-fieldse=
t-element>fieldset</a></code> element's <dfn id=3Drende=
red-legend>rendered legend</dfn>:</p>
+
+  <ul class=3Dbrief><li>The child is a <code><a hre=
f=3D#the-legend-element>legend</a></code> element.</li&=
gt;
+
+   <li>The child is not out-of-flow (e.g. not absolutely positione=
d or floated).</li>
+
+   <li>The child is generating a box (e.g. it is not 'display:none=
').</li>
+
+  </ul><p>A <code><a href=3D#the-fieldset-element&g=
t;fieldset</a></code> element's <a href=3D#rendered-legend=
>rendered legend</a>, if any, is expected to be
+  rendered over the top border edge of the <code><a href=3D#the=
-fieldset-element>fieldset</a></code> element as a 'block'=
 box
+  (overriding any explicit 'display' value). In the absence of an explic=
it width, the box should
+  shrink-wrap. If the <code><a href=3D#the-legend-element>le=
gend</a></code> element in question has an <code title=3Da=
ttr-legend-align><a href=3D#attr-legend-align>align</a>&lt=
;/code> attribute, and its value is an <a href=3D#ascii-case-insens=
itive>ASCII
+  case-insensitive</a> match for one of the strings in the first c=
olumn of the following table,
+  then the <code><a href=3D#the-legend-element>legend</a&=
gt;</code> 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.</p>
+
+  <table><thead><tr><th>Attribute value
+     <th>Alignment position
+   <tbody><tr><td><code title=3D"">lef=
t</code>
+     <td>On the left
+    <tr><td><code title=3D"">right</code&=
gt;
+     <td>On the right
+    <tr><td><code title=3D"">center</code=
>
+     <td>In the middle
+  </table><h3 id=3Dreplaced-elements><span class=3Dsecno&=
gt;14.4 </span>Replaced elements</h3>
+
+  <h4 id=3Dembedded-content-2><span class=3Dsecno>14.4.1 &lt=
;/span>Embedded content</h4>
+
+  <p>The <code><a href=3D#the-embed-element>embed</=
a></code>, <code><a href=3D#the-iframe-element>ifram=
e</a></code>, and <code><a href=3D#the-video-element=
>video</a></code> elements are expected to be
+  treated as replaced elements.</p>
+
+  <p>A <code><a href=3D#the-canvas-element>canvas</=
a></code> element that <a href=3D#represents>represents&lt=
;/a> <a href=3D#embedded-content>embedded content</a> is
+  expected to be treated as a replaced element; the contents of such ele=
ments are the element's
+  bitmap, if any, or else a transparent black bitmap with the same intri=
nsic dimensions as the
+  element. Other <code><a href=3D#the-canvas-element>canvas&=
lt;/a></code> elements are expected to be treated as ordinary el=
ements in the
+  rendering model.</p>
+
+  <p>An <code><a href=3D#the-object-element>object<=
/a></code> element that <a href=3D#represents>represents&l=
t;/a> an image, plugin, or <a href=3D#nested-browsing-context>ne=
sted
+  browsing context</a> is expected to be treated as a replaced ele=
ment. Other <code><a href=3D#the-object-element>object</a&=
gt;</code>
+  elements are expected to be treated as ordinary elements in the render=
ing model.</p>
+
+  <p>An <code><a href=3D#the-applet-element>applet<=
/a></code> element that <a href=3D#represents>represents&l=
t;/a> a <a href=3D#plugin>plugin</a> is expected
+  to be treated as a replaced element. Other <code><a href=3D#t=
he-applet-element>applet</a></code> elements are expected =
to be treated
+  as ordinary elements in the rendering model.</p>
+
+  <p>The <code><a href=3D#the-audio-element>audio</=
a></code> element, when it is <a href=3D#expose-a-user-interf=
ace-to-the-user title=3D"expose a user interface to the
+  user">exposing a user interface</a>, is expected to be t=
reated as a replaced element about one
+  line high, as wide as is necessary to expose the user agent's user int=
erface features. When an
+  <code><a href=3D#the-audio-element>audio</a></cod=
e> element is not <a href=3D#expose-a-user-interface-to-the-user ti=
tle=3D"expose a user interface to the user">exposing a
+  user interface</a>, the user agent is expected to force its 'dis=
play' property to compute to
+  'none', irrespective of CSS rules.</p>
+
+  <p>Whether a <code><a href=3D#the-video-element>vide=
o</a></code> element is <a href=3D#expose-a-user-interface=
-to-the-user title=3D"expose a user interface to the
+  user">exposing a user interface</a> is not expected to a=
ffect the size of the rendering;
+  controls are expected to be overlaid above the page content without ca=
using any layout changes,
+  and are expected to disappear when the user does not need them.</p&=
gt;
+
+  <p>When a <code><a href=3D#the-video-element>video&l=
t;/a></code> 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 t=
han the <code><a href=3D#the-video-element>video</a>&lt=
;/code>
+  element itself, and is expected to be centered in the <code><=
a href=3D#the-video-element>video</a></code> element.</=
p>
+
+  <p>Any subtitles or captions are expected to be overlayed direct=
ly on top of their
+  <code><a href=3D#the-video-element>video</a></cod=
e> element, as defined by the relevant rendering rules; for <a href=
=3D#webvtt>WebVTT</a>,
+  those are the <a href=3D#rules-for-updating-the-display-of-webvtt-t=
ext-tracks>rules for updating the display of WebVTT text tracks</a&=
gt;. <a href=3D#refsWEBVTT>[WEBVTT]</a></p>
+
+  <p>When the user agent starts <a href=3D#expose-a-user-interf=
ace-to-the-user title=3D"expose a user interface to the user"&g=
t;exposing a user
+  interface</a> for a <code><a href=3D#the-video-element&=
gt;video</a></code> element, the user agent should run the &l=
t;a href=3D#rules-for-updating-the-text-track-rendering>rules for
+  updating the text track rendering</a> of each of the <a href=3D=
#text-track title=3D"text track">text
+  tracks</a> in the <code><a href=3D#the-video-element&gt=
;video</a></code> element's <a href=3D#list-of-text-tracks=
>list of text tracks</a> that are <a href=3D#text-track-showi=
ng title=3D"text track showing">showing</a> and whose =
<a href=3D#text-track-kind>text track kind</a> is one of <=
code title=3Ddom-TextTrack-kind-subtitles><a href=3D#dom-texttrack-=
kind-subtitles>subtitles</a></code> or <code title=3Ddo=
m-TextTrack-kind-captions><a href=3D#dom-texttrack-kind-captions&gt=
;captions</a></code> (e.g., for <a href=3D#text-track titl=
e=3D"text track">text
+  tracks</a> based on <a href=3D#webvtt>WebVTT</a>, th=
e <a href=3D#rules-for-updating-the-display-of-webvtt-text-tracks>r=
ules for updating the display of WebVTT
+  text tracks</a>). <a href=3D#refsWEBVTT>[WEBVTT]</a>=
</p>
+
+  <p class=3Dnote>Resizing <code><a href=3D#the-video-ele=
ment>video</a></code> and <code><a href=3D#the-ca=
nvas-element>canvas</a></code> elements does not interrupt
+  video playback or clear the canvas.</p>
+
+  <hr><p>The following CSS rules are expected to apply:</=
p>
+
+  <pre class=3Dcss>@namespace url(http://www.w3.org/1999/xhtml);
+
+iframe:not([seamless]) { border: 2px inset; }
+iframe[seamless] { display: block; }
+<span id=3Dvideo-object-fit>video { object-fit: contain; }</spa=
n></pre>
+
+
+  <h4 id=3Dimages-0><span class=3Dsecno>14.4.2 </span>=
Images</h4>
+
+  <p>When an <code><a href=3D#the-img-element>img</=
a></code> element or an <code><a href=3D#the-input-elem=
ent>input</a></code> element when its <code title=3Datt=
r-input-type><a href=3D#attr-input-type>type</a></code&=
gt; attribute is in the <a href=3D"#image-button-state-(type=3Dim=
age)" title=3Dattr-input-type-image>Image
+  Button</a> state <a href=3D#represents>represents</a&gt=
; an image, it is expected to be treated as a replaced
+  element.</p>
+
+  <p>When an <code><a href=3D#the-img-element>img</=
a></code> element or an <code><a href=3D#the-input-elem=
ent>input</a></code> element when its <code title=3Datt=
r-input-type><a href=3D#attr-input-type>type</a></code&=
gt; attribute is in the <a href=3D"#image-button-state-(type=3Dim=
age)" title=3Dattr-input-type-image>Image
+  Button</a> state does not <a href=3D#represents title=3Drepre=
sents>represent</a> an image, but the element
+  already has intrinsic dimensions (e.g. from the <a href=3D#dimensio=
n-attributes>dimension attributes</a> or CSS rules),
+  and either the user agent has reason to believe that the image will be=
come <i title=3Dimg-available><a href=3D#img-available>availa=
ble</a></i><!--input-img-available also--> and be rende=
red in due course
+  or the <code><a href=3D#document>Document</a></co=
de> is in <a href=3D#quirks-mode>quirks mode</a>, the elem=
ent is expected to be treated
+  as a replaced element whose content is the text that the element repre=
sents, if any, optionally
+  alongside an icon indicating that the image is being obtained. For &lt=
;code><a href=3D#the-input-element>input</a></code> =
elements,
+  the text is expected to appear button-like to indicate that the elemen=
t is a <a href=3D#concept-button title=3Dconcept-button>button</=
a>.</p>
+
+  <p>When an <code><a href=3D#the-img-element>img</=
a></code> element <a href=3D#represents>represents</a&g=
t; some text and the user agent does not
+  expect this to change, the element is expected to be treated as a non-=
replaced phrasing element
+  whose content is the text, optionally with an icon indicating that an =
image is missing, so that
+  the user can request the image be displayed or investigate why it is n=
ot rendering. In
+  non-graphical contexts, such an icon should be omitted.</p>
+
+  <p>When an <code><a href=3D#the-img-element>img</=
a></code> element <a href=3D#represents>represents</a&g=
t; nothing and the user agent does not
+  expect this to change, the element is expected to not be rendered at a=
ll.</p>
+
+  <p>When an <code><a href=3D#the-img-element>img</=
a></code> element might be a key part of the content, but neithe=
r 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 a non-replaced phrasing element w=
hose content is an icon
+  indicating that an image is missing.</p> <!-- there's also a =
should requirement for this case in
+  the <img> section itself -->
+
+  <p>When an <code><a href=3D#the-input-element>input&=
lt;/a></code> element whose <code title=3Dattr-input-type>=
<a href=3D#attr-input-type>type</a></code> attribute is
+  in the <a href=3D"#image-button-state-(type=3Dimage)" tit=
le=3Dattr-input-type-image>Image Button</a> state does not <a=
 href=3D#represents title=3Drepresents>represent</a> an image an=
d 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 but=
ton are expected to be about
+  one line in height and whatever width is necessary to render the text =
on one line.</p>
+
+  <p>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 e=
nvironment, 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, a=
re expected to provide
+  access to the context menu that would have come up if the user interac=
ted with the actual
+  image.</p>
+
+  <hr><p>All animated images with the same <a href=3D#abs=
olute-url>absolute URL</a> and the same image data are
+  expected to be rendered synchronized to the same timeline as a group, =
with the timeline starting
+  at the time of the most recent addition to the group.</p>
+
+  <p class=3Dnote>In other words, the animation loop of an animate=
d image is restarted each time
+  another image with the same <a href=3D#absolute-url>absolute URL=
</a> and image data begins to animate, e.g. after
+  being inserted into the document.</p>
+
+  <hr><p>The following CSS rules are expected to apply when =
the <code><a href=3D#document>Document</a></code>=
 is in <a href=3D#quirks-mode>quirks
+  mode</a>:</p>
+
+  <pre class=3Dcss>@namespace url(http://www.w3.org/1999/xhtml);
+
+img[align=3Dleft i] { margin-right: 3px; }
+img[align=3Dright i] { margin-left: 3px; }</pre>
+
+  </div>
+
+
+  <div class=3Dimpl>
+
+  <h4 id=3Dattributes-for-embedded-content-and-images><span cla=
ss=3Dsecno>14.4.3 </span>Attributes for embedded content and ima=
ges</h4>
+
+  <p>The following CSS rules are expected to apply as <a href=3D=
#presentational-hints>presentational hints</a>:</p>
+
+  <pre class=3Dcss>@namespace url(http://www.w3.org/1999/xhtml);
+
+iframe[frameborder=3D0], iframe[frameborder=3Dno i] { border: none; }
+
+applet[align=3Dleft i], embed[align=3Dleft i], iframe[align=3Dleft i],
+img[align=3Dleft i], input[type=3Dimage i][align=3Dleft i], object[align=
=3Dleft i] {
+  float: left;
+}
+
+applet[align=3Dright i], embed[align=3Dright i], iframe[align=3Dright i]=
,
+img[align=3Dright i], input[type=3Dimage i][align=3Dright i], object[ali=
gn=3Dright i] {
+  float: right;
+}
+
+applet[align=3Dtop i], embed[align=3Dtop i], iframe[align=3Dtop i],
+img[align=3Dtop i], input[type=3Dimage i][align=3Dtop i], object[align=3D=
top i] {
+  vertical-align: top;
+}
+
+applet[align=3Dbaseline i], embed[align=3Dbaseline i], iframe[align=3Dba=
seline i],
+img[align=3Dbaseline i], input[type=3Dimage i][align=3Dbaseline i], obje=
ct[align=3Dbaseline i] {
+  vertical-align: baseline;
+}
+
+applet[align=3Dtexttop i], embed[align=3Dtexttop i], iframe[align=3Dtext=
top i],
+img[align=3Dtexttop i], input[type=3Dimage i][align=3Dtexttop i], object=
[align=3Dtexttop i] {
+  vertical-align: text-top;
+}
+
+applet[align=3Dabsmiddle i], embed[align=3Dabsmiddle i], iframe[align=3D=
absmiddle i],
+img[align=3Dabsmiddle i], input[type=3Dimage i][align=3Dabsmiddle i], ob=
ject[align=3Dabsmiddle i],
+applet[align=3Dabscenter i], embed[align=3Dabscenter i], iframe[align=3D=
abscenter i],
+img[align=3Dabscenter i], input[type=3Dimage i][align=3Dabscenter i], ob=
ject[align=3Dabscenter i] {
+  vertical-align: middle;
+}
+
+applet[align=3Dbottom i], embed[align=3Dbottom i], iframe[align=3Dbottom=
 i],
+img[align=3Dbottom i], input[type=3Dimage i][align=3Dbottom i],
+object[align=3Dbottom i] {
+  vertical-align: bottom;
+}</pre>
+
+  <p>When an <code><a href=3D#the-applet-element>apple=
t</a></code>, <code><a href=3D#the-embed-element>=
embed</a></code>, <code><a href=3D#the-iframe-elemen=
t>iframe</a></code>, <code><a href=3D#the-img-ele=
ment>img</a></code>, or
+  <code><a href=3D#the-object-element>object</a></c=
ode> element, or an <code><a href=3D#the-input-element>inp=
ut</a></code> element whose <code title=3Dattr-input-type&=
gt;<a href=3D#attr-input-type>type</a></code> attribute=
 is in the <a href=3D"#image-button-state-(type=3Dimage)" ti=
tle=3Dattr-input-type-image>Image
+  Button</a> state, has an <code title=3Dattr-dim-align>alig=
n</code> attribute whose value is an
+  <a href=3D#ascii-case-insensitive>ASCII case-insensitive</a&g=
t; match for the string "<code title=3D"">center<=
/code>" or the
+  string "<code title=3D"">middle</code>&quot=
;, 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.</p>
+
+  <p>The <code title=3Dattr-dim-hspace>hspace</code> a=
ttribute of <code><a href=3D#the-applet-element>applet</a&=
gt;</code>,
+  <code><a href=3D#the-embed-element>embed</a></cod=
e>, <code><a href=3D#the-iframe-element>iframe</a>&l=
t;/code>, <code><a href=3D#the-img-element>img</a>&l=
t;/code>, or <code><a href=3D#the-object-element>object&lt=
;/a></code> elements, and
+  <code><a href=3D#the-input-element>input</a></cod=
e> elements with a <code title=3Dattr-input-type><a href=3D#a=
ttr-input-type>type</a></code> attribute in the
+  <a href=3D"#image-button-state-(type=3Dimage)" title=3Dat=
tr-input-type-image>Image Button</a> state, <a href=3D#maps-t=
o-the-dimension-property title=3D"maps to the dimension
+  property">maps to the dimension properties</a> 'margin-l=
eft' and 'margin-right' on the
+  element.</p>
+
+  <p>The <code title=3Dattr-dim-vspace>vspace</code> a=
ttribute of <code><a href=3D#the-applet-element>applet</a&=
gt;</code>,
+  <code><a href=3D#the-embed-element>embed</a></cod=
e>, <code><a href=3D#the-iframe-element>iframe</a>&l=
t;/code>, <code><a href=3D#the-img-element>img</a>&l=
t;/code>, or <code><a href=3D#the-object-element>object&lt=
;/a></code> elements, and
+  <code><a href=3D#the-input-element>input</a></cod=
e> elements with a <code title=3Dattr-input-type><a href=3D#a=
ttr-input-type>type</a></code> attribute in the
+  <a href=3D"#image-button-state-(type=3Dimage)" title=3Dat=
tr-input-type-image>Image Button</a> state, <a href=3D#maps-t=
o-the-dimension-property title=3D"maps to the dimension
+  property">maps to the dimension properties</a> 'margin-t=
op' and 'margin-bottom' on the
+  element.</p>
+
+  <p>When an <code><a href=3D#the-img-element>img</=
a></code> element, <code><a href=3D#the-object-element&=
gt;object</a></code> element, or <code><a href=3D#th=
e-input-element>input</a></code> element
+  with a <code title=3Dattr-input-type><a href=3D#attr-input-ty=
pe>type</a></code> attribute in the <a href=3D"#im=
age-button-state-(type=3Dimage)" title=3Dattr-input-type-image>Im=
age Button</a> state has a <code title=3Dattr-dim-border>bord=
er</code> attribute whose value, when parsed using the <a href=3D=
#rules-for-parsing-non-negative-integers>rules for
+  parsing non-negative integers</a>, is found to be a number great=
er than zero, the user agent is
+  expected to use the parsed value for eight <a href=3D#presentationa=
l-hints>presentational hints</a>: 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 se=
tting the element's
+  'border-top-style', 'border-right-style', 'border-bottom-style', and '=
border-left-style'
+  properties to the value 'solid'.</p>
+
+  <p id=3DdimRendering>The <code title=3Dattr-dim-width><=
a href=3D#attr-dim-width>width</a></code> and <code tit=
le=3Dattr-dim-height><a href=3D#attr-dim-height>height</a>=
</code> attributes on <code><a href=3D#the-applet-element&=
gt;applet</a></code>, <code><a href=3D#the-embed-ele=
ment>embed</a></code>,
+  <code><a href=3D#the-iframe-element>iframe</a></c=
ode>, <code><a href=3D#the-object-element>object</a>=
</code> or <code><a href=3D#the-video-element>video<=
/a></code> elements, and <code><a href=3D#the-input-ele=
ment>input</a></code>
+  elements with a <code title=3Dattr-input-type><a href=3D#attr=
-input-type>type</a></code> attribute in the <a href=3D=
"#image-button-state-(type=3Dimage)" title=3Dattr-input-type-im=
age>Image Button</a> state and that either represents an image o=
r
+  that the user expects will eventually represent an image, <a href=3D=
#maps-to-the-dimension-property title=3D"maps to the dimension
+  property">map to the dimension properties</a> 'width' an=
d 'height' on the element
+  respectively.</p>
+
+  </div>
+
+
+  <div class=3Dimpl>
+
+  <h4 id=3Dimage-maps-0><span class=3Dsecno>14.4.4 </span=
>Image maps</h4>
+
+  <p>Shapes on an <a href=3D#image-map>image map</a> a=
re expected to act, for the purpose of the CSS cascade, as
+  elements independent of the original <code><a href=3D#the-are=
a-element>area</a></code> element that happen to match the=
 same style
+  rules but inherit from the <code><a href=3D#the-img-element&g=
t;img</a></code> or <code><a href=3D#the-object-elem=
ent>object</a></code> element.</p>
+
+  <p>For the purposes of the rendering, only the 'cursor' property=
 is expected to have any effect on
+  the shape.</p>
+
+  <p class=3Dexample>Thus, for example, if an <code><a hr=
ef=3D#the-area-element>area</a></code> element has a <c=
ode title=3Dattr-style><a href=3D#the-style-attribute>style</=
a></code> attribute that sets the 'cursor' property to 'help', t=
hen when the
+  user designates that shape, the cursor would change to a Help cursor.&=
lt;/p>
+
+  <p class=3Dexample>Similarly, if an <code><a href=3D#th=
e-area-element>area</a></code> element had a CSS rule that=
 set its 'cursor'
+  property to 'inherit' (or if no rule setting the 'cursor' property mat=
ched the element at all),
+  the shape's cursor would be inherited from the <code><a href=3D=
#the-img-element>img</a></code> or <code><a href=3D=
#the-object-element>object</a></code> element of
+  the <a href=3D#image-map>image map</a>, not from the paren=
t of the <code><a href=3D#the-area-element>area</a><=
/code> element.</p>
+
+  </div>
+
+
+  <div class=3Dimpl>
+
+  <h3 id=3Dbindings><span class=3Dsecno>14.5 </span>Bi=
ndings</h3>
+
+  <h4 id=3Dintroduction-14><span class=3Dsecno>14.5.1 </s=
pan>Introduction</h4>
+
+  <p>A number of elements have their rendering defined in terms of=
 the 'binding' property. <a href=3D#refsBECSS>[BECSS]</a><=
/p>
+
+  <p>The CSS snippets below set the 'binding' property to a user-a=
gent-defined value, represented
+  below by keywords like <code title=3D""><i title=3D=
"">button</i></code>. The rules then described f=
or
+  these bindings are only expected to apply if the element's 'binding' p=
roperty has not been
+  overridden (e.g. by the author) to have another value.</p>
+
+  <p>Exactly how the bindings are implemented is not specified by =
this specification. User agents
+  are encouraged to make their bindings set the 'appearance' CSS propert=
y appropriately to achieve
+  platform-native appearances for widgets, and are expected to implement=
 any relevant animations,
+  etc, that are appropriate for the platform. <a href=3D#refsCSSUI&gt=
;[CSSUI]</a></p>
+
+  </div>
+
+
+  <div class=3Dimpl>
+
+  <h4 id=3Dthe-button-element-0><span class=3Dsecno>14.5.2 &=
lt;/span>The <code><a href=3D#the-button-element>button&lt=
;/a></code> element</h4>
+
+  <pre class=3Dcss>@namespace url(http://www.w3.org/1999/xhtml);
+
+button { binding: <i title=3D"">button</i>; }</=
pre>
+
+  <p>When the <i title=3D"">button</i> bindi=
ng applies to a <code><a href=3D#the-button-element>button&lt=
;/a></code> element, the element
+  is expected to render as an 'inline-block' box rendered as a button wh=
ose contents are the
+  contents of the element.</p>
+
+  <p>When the <code><a href=3D#the-button-element>butt=
on</a></code> element's <code title=3Dattr-button-type>=
<a href=3D#attr-button-type>type</a></code> attribute i=
s
+  in the <a href=3D#attr-button-type-menu-state title=3Dattr-button-t=
ype-menu-state>Menu</a> state, the user agent is expected to
+  indicate that activating the element will display a menu, e.g. by disp=
laying a down-pointing
+  triangle after the button's label.</p>
+
+  </div>
+
+
+  <div class=3Dimpl>
+
+  <h4 id=3Dthe-details-element-0><span class=3Dsecno>14.5.3 =
</span>The <code><a href=3D#the-details-element>details=
</a></code> element</h4>
+
+  <pre class=3Dcss>@namespace url(http://www.w3.org/1999/xhtml);
+
+details { binding: <i title=3D"">details</i>; }&lt=
;/pre>
+
+  <p>When the <i title=3D"">details</i> bind=
ing applies to a <code><a href=3D#the-details-element>details=
</a></code> element, the element
+  is expected to render as a 'block' box with its 'padding-left' propert=
y set to '40px' for
+  left-to-right elements (<a href=3D#ltr-specific>LTR-specific<=
/a>) and with its 'padding-right' property set to
+  '40px' for right-to-left elements. The element's shadow tree is expect=
ed to take the element's
+  first child <code><a href=3D#the-summary-element>summary&l=
t;/a></code> element, if any, and place it in a first 'block' bo=
x container,
+  and then take the element's remaining descendants, if any, and place t=
hem in a second 'block' box
+  container.</p>
+
+  <p>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 po=
sitioned within the left
+  padding of the <code><a href=3D#the-details-element>detail=
s</a></code> element. That widget is expected to allow the us=
er to request
+  that the details be shown or hidden.</p>
+
+  <p>The second container is expected to have its 'overflow' prope=
rty set to 'hidden'. When the
+  <code><a href=3D#the-details-element>details</a><=
/code> element does not have an <code title=3Dattr-details-open>=
<a href=3D#attr-details-open>open</a></code>
+  attribute, this second container is expected to be removed from the re=
ndering.</p>
+
+  <!-- http://mail.gnome.org/archives/usability/2006-June/msg00015.ht=
ml -->
+
+  </div>
+
+  <div class=3Dimpl>
+
+  <h4 id=3Dthe-input-element-as-a-text-entry-widget><span class=
=3Dsecno>14.5.4 </span>The <code><a href=3D#the-input-e=
lement>input</a></code> element as a text entry widget<=
/h4>
+
+  <pre class=3Dcss>@namespace url(http://www.w3.org/1999/xhtml);
+
+input { binding: <i title=3D"">input-textfield</i>=
; }
+input[type=3Dpassword i] { binding: <i title=3D"">input-=
password</i>; }
+/* later rules override this for other values of type=3D"" */&=
lt;/pre>
+
+  <p>When the <i title=3D"">input-textfield</i&=
gt; binding applies to an <code><a href=3D#the-input-element>=
input</a></code> element whose
+  <code title=3Dattr-input-type><a href=3D#attr-input-type>t=
ype</a></code> attribute is in the <a href=3D"#text-(=
type=3Dtext)-state-and-search-state-(type=3Dsearch)" title=3Dattr-in=
put-type-text>Text</a>, <a href=3D"#text-(type=3Dtext)-s=
tate-and-search-state-(type=3Dsearch)" title=3Dattr-input-type-searc=
h>Search</a>,
+  <a href=3D"#telephone-state-(type=3Dtel)" title=3Dattr-in=
put-type-tel>Telephone</a>, <a href=3D"#url-state-(type=3D=
url)" title=3Dattr-input-type-url>URL</a>,
+  or <a href=3D"#e-mail-state-(type=3Demail)" title=3Dattr-=
input-type-email>E-mail</a> state, the element is expected to re=
nder as
+  an 'inline-block' box rendered as a text field.</p>
+
+  <p>When the <i title=3D"">input-password</i&g=
t; binding applies, to an <code><a href=3D#the-input-element>=
input</a></code> element whose
+  <code title=3Dattr-input-type><a href=3D#attr-input-type>t=
ype</a></code> attribute is in the <a href=3D"#passwo=
rd-state-(type=3Dpassword)" title=3Dattr-input-type-password>Pass=
word</a> state, the element is expected to render as an
+  'inline-block' box rendered as a text field whose contents are obscure=
d.</p>
+
+  <p>If an <code><a href=3D#the-input-element>input&lt=
;/a></code> element whose <code title=3Dattr-input-type>&l=
t;a href=3D#attr-input-type>type</a></code> attribute is
+  in one of the above states has a <code title=3Dattr-input-size>&=
lt;a href=3D#attr-input-size>size</a></code> attribute, an=
d parsing
+  that attribute's value using the <a href=3D#rules-for-parsing-non-n=
egative-integers>rules for parsing non-negative integers</a> doe=
sn't
+  generate an error, then the user agent is expected to use the attribut=
e as a <a href=3D#presentational-hints title=3D"presentational hi=
nts">presentational hint</a> for the 'width' property on th=
e element,
+  with the value obtained from applying the <a href=3D#converting-a-c=
haracter-width-to-pixels>converting a character width to pixels</a&=
gt;
+  algorithm to the value of the attribute.</p>
+
+  <p>If an <code><a href=3D#the-input-element>input&lt=
;/a></code> element whose <code title=3Dattr-input-type>&l=
t;a href=3D#attr-input-type>type</a></code> attribute is
+  in one of the above states does <em>not</em> have a <co=
de title=3Dattr-input-size><a href=3D#attr-input-size>size</a=
></code>
+  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
+  <a href=3D#converting-a-character-width-to-pixels>converting a c=
haracter width to pixels</a> algorithm to the number 20.</p>
+
+  <p>The <dfn id=3Dconverting-a-character-width-to-pixels>co=
nverting a character width to pixels</dfn> algorithm returns <sp=
an title=3D"">(<var title=3D"">size</var&=
gt;-1)×<var title=3D"">avg</var>&nbsp=
;+ <var title=3D"">max</var></span>,
+  where <var title=3D"">size</var> is the characte=
r width to convert, <var title=3D"">avg</var> is th=
e
+  average character width of the primary font for the element for which =
the algorithm is being run,
+  in pixels, and <var title=3D"">max</var> is the =
maximum character width of that same font, also in
+  pixels. (The element's 'letter-spacing' property does not affect the r=
esult.)</p>
+
+  </div>
+
+
+  <div class=3Dimpl>
+
+  <h4 id=3Dthe-input-element-as-domain-specific-widgets><span c=
lass=3Dsecno>14.5.5 </span>The <code><a href=3D#the-inp=
ut-element>input</a></code> element as domain-specific wid=
gets</h4>
+
+  <pre class=3Dcss>@namespace url(http://www.w3.org/1999/xhtml);
+
+input[type=3Ddatetime i] { binding: <i title=3D"">input-=
datetime</i>; }
+input[type=3Ddate i] { binding: <i title=3D"">input-date=
</i>; }
+input[type=3Dmonth i] { binding: <i title=3D"">input-mon=
th</i>; }
+input[type=3Dweek i] { binding: <i title=3D"">input-week=
</i>; }
+input[type=3Dtime i] { binding: <i title=3D"">input-time=
</i>; }
+input[type=3Ddatetime-local i] { binding: <i title=3D"">=
input-datetime-local</i>; }
+input[type=3Dnumber i] { binding: <i title=3D"">input-nu=
mber</i>; }</pre>
+
+  <p>When the <i title=3D"">input-datetime</i&g=
t; binding applies to an <code><a href=3D#the-input-element>i=
nput</a></code> element whose
+  <code title=3Dattr-input-type><a href=3D#attr-input-type>t=
ype</a></code> attribute is in the <a href=3D"#date-a=
nd-time-state-(type=3Ddatetime)" title=3Dattr-input-type-datetime&gt=
;Date and Time</a> state, the element is expected to render as
+  an 'inline-block' box depicting a Date and Time control.</p>
+
+  <p>When the <i title=3D"">input-date</i> b=
inding applies to an <code><a href=3D#the-input-element>input=
</a></code> element whose
+  <code title=3Dattr-input-type><a href=3D#attr-input-type>t=
ype</a></code> attribute is in the <a href=3D"#date-s=
tate-(type=3Ddate)" title=3Dattr-input-type-date>Date</a> s=
tate, the element is expected to render as an
+  'inline-block' box depicting a Date control.</p>
+
+  <p>When the <i title=3D"">input-month</i> =
binding applies to an <code><a href=3D#the-input-element>inpu=
t</a></code> element whose
+  <code title=3Dattr-input-type><a href=3D#attr-input-type>t=
ype</a></code> attribute is in the <a href=3D"#month-=
state-(type=3Dmonth)" title=3Dattr-input-type-month>Month</a&g=
t; state, the element is expected to render as an
+  'inline-block' box depicting a Month control.</p>
+
+  <p>When the <i title=3D"">input-week</i> b=
inding applies to an <code><a href=3D#the-input-element>input=
</a></code> element whose
+  <code title=3Dattr-input-type><a href=3D#attr-input-type>t=
ype</a></code> attribute is in the <a href=3D"#week-s=
tate-(type=3Dweek)" title=3Dattr-input-type-week>Week</a> s=
tate, the element is expected to render as an
+  'inline-block' box depicting a Week control.</p>
+
+  <p>When the <i title=3D"">input-time</i> b=
inding applies to an <code><a href=3D#the-input-element>input=
</a></code> element whose
+  <code title=3Dattr-input-type><a href=3D#attr-input-type>t=
ype</a></code> attribute is in the <a href=3D"#time-s=
tate-(type=3Dtime)" title=3Dattr-input-type-time>Time</a> s=
tate, the element is expected to render as an
+  'inline-block' box depicting a Time control.</p>
+
+  <p>When the <i title=3D"">input-datetime-local&l=
t;/i> binding applies to an <code><a href=3D#the-input-elemen=
t>input</a></code> element
+  whose <code title=3Dattr-input-type><a href=3D#attr-input-typ=
e>type</a></code> attribute is in the <a href=3D"#=
local-date-and-time-state-(type=3Ddatetime-local)" title=3Dattr-inpu=
t-type-datetime-local>Local Date and Time</a> state, the element=
 is expected
+  to render as an 'inline-block' box depicting a Local Date and Time con=
trol.</p>
+
+  <p>When the <i title=3D"">input-number</i>=
 binding applies to an <code><a href=3D#the-input-element>inp=
ut</a></code> element whose
+  <code title=3Dattr-input-type><a href=3D#attr-input-type>t=
ype</a></code> attribute is in the <a href=3D"#number=
-state-(type=3Dnumber)" title=3Dattr-input-type-number>Number<=
/a> state, the element is expected to render as an
+  'inline-block' box depicting a Number control.</p>
+
+  <p>These controls are all expected to be about one line high, an=
d about as wide as necessary to
+  show the widest possible value.</p>
+
+  </div>
+
+
+  <div class=3Dimpl>
+
+  <h4 id=3Dthe-input-element-as-a-range-control><span class=3Ds=
ecno>14.5.6 </span>The <code><a href=3D#the-input-eleme=
nt>input</a></code> element as a range control</h4>
+
+  <pre class=3Dcss>@namespace url(http://www.w3.org/1999/xhtml);
+
+input[type=3Drange i] { binding: <i title=3D"">input-ran=
ge</i>; }</pre>
+
+  <p>When the <i title=3D"">input-range</i> =
binding applies to an <code><a href=3D#the-input-element>inpu=
t</a></code> element whose
+  <code title=3Dattr-input-type><a href=3D#attr-input-type>t=
ype</a></code> attribute is in the <a href=3D"#range-=
state-(type=3Drange)" title=3Dattr-input-type-range>Range</a&g=
t; state, the element is expected to render as an
+  'inline-block' box depicting a slider control.</p>
+
+  <p>When the control is wider than it is tall (or square), the co=
ntrol is expected to be a
+  horizontal slider, with the lowest value on the right if the 'directio=
n' property on this element
+  has a computed value of 'rtl', and on the left otherwise. When the con=
trol is taller than it is
+  wide, it is expected to be a vertical slider, with the lowest value on=
 the bottom.</p>
+
+  <p>Predefined suggested values (provided by the <code title=3D=
attr-input-list><a href=3D#attr-input-list>list</a></co=
de>
+  attribute) are expected to be shown as tick marks on the slider, which=
 the slider can snap to.</p>
+
+  <p>User agents are expected to use the used value of the 'direct=
ion' property on the element to
+  determine the direction in which the slider operates. Typically, a lef=
t-to-right ('ltr')
+  horizontal control would have the lowest value on the left and the hig=
hest value on the right, and
+  vice versa.</p>
+
+  </div>
+
+
+  <div class=3Dimpl>
+
+  <h4 id=3Dthe-input-element-as-a-color-well><span class=3Dsecn=
o>14.5.7 </span>The <code><a href=3D#the-input-element&=
gt;input</a></code> element as a color well</h4>
+
+  <pre class=3Dcss>@namespace url(http://www.w3.org/1999/xhtml);
+
+input[type=3Dcolor i] { binding: <i title=3D"">input-col=
or</i>; }</pre>
+
+  <p>When the <i title=3D"">input-color</i> =
binding applies to an <code><a href=3D#the-input-element>inpu=
t</a></code> element whose
+  <code title=3Dattr-input-type><a href=3D#attr-input-type>t=
ype</a></code> attribute is in the <a href=3D"#color-=
state-(type=3Dcolor)" title=3Dattr-input-type-color>Color</a&g=
t; state, the element is expected to render as an
+  'inline-block' box depicting a color well, which, when activated, prov=
ides the user with a color
+  picker (e.g. a color wheel or color palette) from which the color can =
be changed.</p>
+
+  <p>Predefined suggested values (provided by the <code title=3D=
attr-input-list><a href=3D#attr-input-list>list</a></co=
de>
+  attribute) are expected to be shown in the color picker interface, not=
 on the color well
+  itself.</p>
+
+  </div>
+
+
+  <div class=3Dimpl>
+
+  <h4 id=3Dthe-input-element-as-a-checkbox-and-radio-button-widgets&g=
t;<span class=3Dsecno>14.5.8 </span>The <code><a hre=
f=3D#the-input-element>input</a></code> element as a check=
box and radio button widgets</h4>
+
+  <pre class=3Dcss>@namespace url(http://www.w3.org/1999/xhtml);
+
+input[type=3Dcheckbox i] { binding: <i title=3D"">input-=
checkbox</i>; }
+input[type=3Dradio i] { binding: <i title=3D"">input-rad=
io</i>; }</pre>
+
+  <p>When the <i title=3D"">input-checkbox</i&g=
t; binding applies to an <code><a href=3D#the-input-element>i=
nput</a></code> element whose
+  <code title=3Dattr-input-type><a href=3D#attr-input-type>t=
ype</a></code> attribute is in the <a href=3D"#checkb=
ox-state-(type=3Dcheckbox)" title=3Dattr-input-type-checkbox>Chec=
kbox</a> state, the element is expected to render as an
+  'inline-block' box containing a single checkbox control, with no label=
.</p>
+
+  <p>When the <i title=3D"">input-radio</i> =
binding applies to an <code><a href=3D#the-input-element>inpu=
t</a></code> element whose
+  <code title=3Dattr-input-type><a href=3D#attr-input-type>t=
ype</a></code> attribute is in the <a href=3D"#radio-=
button-state-(type=3Dradio)" title=3Dattr-input-type-radio>Radio =
Button</a> state, the element is expected to render as an
+  'inline-block' box containing a single radio button control, with no l=
abel.</p>
+
+  </div>
+
+
+  <div class=3Dimpl>
+
+  <h4 id=3Dthe-input-element-as-a-file-upload-control><span cla=
ss=3Dsecno>14.5.9 </span>The <code><a href=3D#the-input=
-element>input</a></code> element as a file upload control=
</h4>
+
+  <pre class=3Dcss>@namespace url(http://www.w3.org/1999/xhtml);
+
+input[type=3Dfile i] { binding: <i title=3D"">input-file=
</i>; }</pre>
+
+  <p>When the <i title=3D"">input-file</i> b=
inding applies to an <code><a href=3D#the-input-element>input=
</a></code> element whose
+  <code title=3Dattr-input-type><a href=3D#attr-input-type>t=
ype</a></code> attribute is in the <a href=3D"#file-u=
pload-state-(type=3Dfile)" title=3Dattr-input-type-file>File Uplo=
ad</a> state, the element is expected to render as an
+  'inline-block' box containing a span of text giving the file name(s) o=
f the <a href=3D#concept-input-type-file-selected title=3Dconcept-inpu=
t-type-file-selected>selected files</a>, if any, followed by a b=
utton that,
+  when activated, provides the user with a file picker from which the se=
lection can be changed.</p>
+
+  </div>
+
+
+  <div class=3Dimpl>
+
+  <h4 id=3Dthe-input-element-as-a-button><span class=3Dsecno&gt=
;14.5.10 </span>The <code><a href=3D#the-input-element>=
input</a></code> element as a button</h4>
+
+  <pre class=3Dcss>@namespace url(http://www.w3.org/1999/xhtml);
+
+input[type=3Dsubmit i], input[type=3Dreset i], input[type=3Dbutton i] {
+  binding: <i title=3D"">input-button</i>;
+}</pre>
+
+  <p>When the <i title=3D"">input-button</i>=
 binding applies to an <code><a href=3D#the-input-element>inp=
ut</a></code> element whose
+  <code title=3Dattr-input-type><a href=3D#attr-input-type>t=
ype</a></code> attribute is in the <a href=3D"#submit=
-button-state-(type=3Dsubmit)" title=3Dattr-input-type-submit>Sub=
mit Button</a>, <a href=3D"#reset-button-state-(type=3Drese=
t)" title=3Dattr-input-type-reset>Reset
+  Button</a>, or <a href=3D"#button-state-(type=3Dbutton)&=
quot; title=3Dattr-input-type-button>Button</a> state, the eleme=
nt is
+  expected to render as an 'inline-block' box rendered as a button, abou=
t one line high, containing
+  the contents of the element's <code title=3Dattr-input-value>&lt=
;a href=3D#attr-input-value>value</a></code> attribute, if=
 any, or
+  text derived from the element's <code title=3Dattr-input-type>&l=
t;a href=3D#attr-input-type>type</a></code> attribute in a
+  user-agent-defined (and probably locale-specific) fashion, if not.<=
/p>
+
+  </div>
+
+
+  <div class=3Dimpl>
+
+  <h4 id=3Dthe-marquee-element-0><span class=3Dsecno>14.5.11=
 </span>The <code><a href=3D#the-marquee-element>marque=
e</a></code> element</h4>
+
+  <pre class=3Dcss>@namespace url(http://www.w3.org/1999/xhtml);
+
+marquee { binding: <i title=3D"">marquee</i>; }&lt=
;/pre>
+
+  <p>When the <i title=3D"">marquee</i> bind=
ing applies to a <code><a href=3D#the-marquee-element>marquee=
</a></code> element, while the
+  element is <a href=3D#concept-marquee-on title=3Dconcept-marquee-on=
>turned on</a>, the element is expected to render in
+  an animated fashion according to its attributes as follows:</p>
+
+  <dl><dt>If the element's <code title=3Dattr-marquee-beh=
avior><a href=3D#attr-marquee-behavior>behavior</a></co=
de> attribute is in the
+   <a href=3D#attr-marquee-behavior-scroll title=3Dattr-marquee-behav=
ior-scroll>scroll</a> state</dt>
+
+   <dd>
+
+    <p>Slide the contents of the element in the direction describe=
d by the <code title=3Dattr-marquee-direction><a href=3D#attr-ma=
rquee-direction>direction</a></code> attribute as defined =
below, such that it begins
+    off the start side of the <code><a href=3D#the-marquee-elem=
ent>marquee</a></code>, and ends flush with the inner end =
side.</p>
+
+    <p class=3Dexample>For example, if the <code title=3Dattr-m=
arquee-direction><a href=3D#attr-marquee-direction>direction<=
/a></code>
+    attribute is <a href=3D#attr-marquee-direction-left title=3Dattr-=
marquee-direction-left>left</a> (the default), then the
+    contents would start such that their left edge are off the side of t=
he right edge of the
+    <code><a href=3D#the-marquee-element>marquee</a>&l=
t;/code>'s content area, and the contents would then slide up to the p=
oint where the
+    left edge of the contents are flush with the left inner edge of the =
<code><a href=3D#the-marquee-element>marquee</a></co=
de>'s
+    content area.</p>
+
+    <p>Once the animation has ended, the user agent is expected to=
 <a href=3D#increment-the-marquee-current-loop-index>increment the =
marquee
+    current loop index</a>. If the element is still <a href=3D#=
concept-marquee-on title=3Dconcept-marquee-on>turned
+    on</a> after this, then the user agent is expected to restart =
the animation.</p>
+
+   </dd>
+
+   <dt>If the element's <code title=3Dattr-marquee-behavior>=
<a href=3D#attr-marquee-behavior>behavior</a></code> at=
tribute is in the
+   <a href=3D#attr-marquee-behavior-slide title=3Dattr-marquee-behavi=
or-slide>slide</a> state</dt>
+
+   <dd>
+
+    <p>Slide the contents of the element in the direction describe=
d by the <code title=3Dattr-marquee-direction><a href=3D#attr-ma=
rquee-direction>direction</a></code> attribute as defined =
below, such that it begins
+    off the start side of the <code><a href=3D#the-marquee-elem=
ent>marquee</a></code>, and ends off the end side of the
+    <code><a href=3D#the-marquee-element>marquee</a>&l=
t;/code>.</p>
+
+    <p class=3Dexample>For example, if the <code title=3Dattr-m=
arquee-direction><a href=3D#attr-marquee-direction>direction<=
/a></code>
+    attribute is <a href=3D#attr-marquee-direction-left title=3Dattr-=
marquee-direction-left>left</a> (the default), then the
+    contents would start such that their left edge are off the side of t=
he right edge of the
+    <code><a href=3D#the-marquee-element>marquee</a>&l=
t;/code>'s content area, and the contents would then slide up to the p=
oint where the
+    <em>right</em> edge of the contents are flush with the l=
eft inner edge of the
+    <code><a href=3D#the-marquee-element>marquee</a>&l=
t;/code>'s content area.</p>
+
+    <p>Once the animation has ended, the user agent is expected to=
 <a href=3D#increment-the-marquee-current-loop-index>increment the =
marquee
+    current loop index</a>. If the element is still <a href=3D#=
concept-marquee-on title=3Dconcept-marquee-on>turned
+    on</a> after this, then the user agent is expected to restart =
the animation.</p>
+
+   </dd>
+
+   <dt>If the element's <code title=3Dattr-marquee-behavior>=
<a href=3D#attr-marquee-behavior>behavior</a></code> at=
tribute is in the
+   <a href=3D#attr-marquee-behavior-alternate title=3Dattr-marquee-be=
havior-alternate>alternate</a> state</dt>
+
+   <dd>
+
+    <p>When the <a href=3D#marquee-current-loop-index>marque=
e current loop index</a> is even (or zero), slide the contents of t=
he
+    element in the direction described by the <code title=3Dattr-marq=
uee-direction><a href=3D#attr-marquee-direction>direction</a&=
gt;</code>
+    attribute as defined below, such that it begins flush with the start=
 side of the
+    <code><a href=3D#the-marquee-element>marquee</a>&l=
t;/code>, and ends flush with the end side of the <code><a hr=
ef=3D#the-marquee-element>marquee</a></code>.</p>
+
+    <p>When the <a href=3D#marquee-current-loop-index>marque=
e current loop index</a> is odd, slide the contents of the element =
in
+    the opposite direction than that described by the <code title=3Da=
ttr-marquee-direction><a href=3D#attr-marquee-direction>directio=
n</a></code> attribute as defined below, such that it begins
+    flush with the end side of the <code><a href=3D#the-marquee=
-element>marquee</a></code>, and ends flush with the start=
 side of the
+    <code><a href=3D#the-marquee-element>marquee</a>&l=
t;/code>.</p>
+
+    <p class=3Dexample>For example, if the <code title=3Dattr-m=
arquee-direction><a href=3D#attr-marquee-direction>direction<=
/a></code>
+    attribute is <a href=3D#attr-marquee-direction-left title=3Dattr-=
marquee-direction-left>left</a> (the default), then the
+    contents would with their right edge flush with the right inner edge=
 of the
+    <code><a href=3D#the-marquee-element>marquee</a>&l=
t;/code>'s content area, and the contents would then slide up to the p=
oint where the
+    <em>left</em> edge of the contents are flush with the le=
ft inner edge of the
+    <code><a href=3D#the-marquee-element>marquee</a>&l=
t;/code>'s content area.</p>
+
+    <p>Once the animation has ended, the user agent is expected to=
 <a href=3D#increment-the-marquee-current-loop-index>increment the =
marquee
+    current loop index</a>. If the element is still <a href=3D#=
concept-marquee-on title=3Dconcept-marquee-on>turned
+    on</a> after this, then the user agent is expected to continue=
 the animation.</p>
+
+   </dd>
+
+  </dl><p>The <code title=3Dattr-marquee-direction>&lt=
;a href=3D#attr-marquee-direction>direction</a></code> att=
ribute has the meanings described
+  in the following table:</p>
+
+  <table><thead><tr><th><code title=3Dattr-ma=
rquee-direction><a href=3D#attr-marquee-direction>direction</=
a></code> attribute state
+     <th>Direction of animation
+     <th>Start edge
+     <th>End edge
+     <th>Opposite direction
+   <tbody><tr><td><a href=3D#attr-marquee-direction=
-left title=3Dattr-marquee-direction-left>left</a>
+     <td>← Right to left
+     <td>Right
+     <td>Left
+     <td>→ Left to Right
+    <tr><td><a href=3D#attr-marquee-direction-right title=
=3Dattr-marquee-direction-right>right</a>
+     <td>→ Left to Right
+     <td>Left
+     <td>Right
+     <td>← Right to left
+    <tr><td><a href=3D#attr-marquee-direction-up title=3D=
attr-marquee-direction-up>up</a>
+     <td>↑ Up (Bottom to Top)
+     <td>Bottom
+     <td>Top
+     <td>↓ Down (Top to Bottom)
+    <tr><td><a href=3D#attr-marquee-direction-down title=3D=
attr-marquee-direction-down>down</a>
+     <td>↓ Down (Top to Bottom)
+     <td>Top
+     <td>Bottom
+     <td>↑ Up (Bottom to Top)
+  </table><p>In any case, the animation should proceed such =
that there is a delay given by the <a href=3D#marquee-scroll-interval&=
gt;marquee
+  scroll interval</a> between each frame, and such that the conten=
t moves at most the distance
+  given by the <a href=3D#marquee-scroll-distance>marquee scroll d=
istance</a> with each frame.</p>
+
+  <p>When a <code><a href=3D#the-marquee-element>marqu=
ee</a></code> element has a <code title=3Dattr-marquee-bgc=
olor>bgcolor</code>
+  attribute set, the value is expected to be parsed using the <a href=
=3D#rules-for-parsing-a-legacy-color-value>rules for parsing a legacy =
color
+  value</a>, and if that does not return an error, the user agent =
is expected to treat the
+  attribute as a <a href=3D#presentational-hints title=3D"presen=
tational hints">presentational hint</a> setting the element=
's
+  'background-color' property to the resulting color.</p>
+
+  <p>The <code title=3Dattr-marquee-width>width</code>=
 and <code title=3Dattr-marquee-height>height</code> attribut=
es on a <code><a href=3D#the-marquee-element>marquee</a&gt=
;</code> element <a href=3D#maps-to-the-dimension-property title=
=3D"maps to the dimension property">map to the dimension pro=
perties</a> 'width' and 'height'
+  on the element respectively.</p>
+
+  <p>The intrinsic height of a <code><a href=3D#the-marqu=
ee-element>marquee</a></code> element with its <code ti=
tle=3Dattr-marquee-direction><a href=3D#attr-marquee-direction>d=
irection</a></code> attribute in the <a href=3D#attr-marqu=
ee-direction-up title=3Dattr-marquee-direction-up>up</a> or <=
a href=3D#attr-marquee-direction-down title=3Dattr-marquee-direction-down=
>down</a> states is 200 CSS pixels.</p>
+
+  <p>The <code title=3Dattr-marquee-vspace>vspace</code&g=
t; attribute of a <code><a href=3D#the-marquee-element>marque=
e</a></code> element
+  <a href=3D#maps-to-the-dimension-property title=3D"maps to the=
 dimension property">maps to the dimension properties</a> '=
margin-top'
+  and 'margin-bottom' on the element. The <code title=3Dattr-marquee-=
hspace>hspace</code> attribute
+  of a <code><a href=3D#the-marquee-element>marquee</a&gt=
;</code> element <a href=3D#maps-to-the-dimension-property title=
=3D"maps to the dimension property">maps to the
+  dimension properties</a> 'margin-left' and 'margin-right' on the=
 element.</p>
+
+  <p>The 'overflow' property on the <code><a href=3D#the-=
marquee-element>marquee</a></code> element is expected to =
be ignored; overflow
+  is expected to always be hidden.</p>
+
+  </div>
+
+
+  <div class=3Dimpl>
+
+  <h4 id=3Dthe-meter-element-0><span class=3Dsecno>14.5.12 &=
lt;/span>The <code><a href=3D#the-meter-element>meter</=
a></code> element</h4>
+
+  <pre class=3Dcss>@namespace url(http://www.w3.org/1999/xhtml);
+
+meter { binding: <i title=3D"">meter</i>; }</pr=
e>
+
+  <p>When the <i title=3D"">meter</i> bindin=
g applies to a <code><a href=3D#the-meter-element>meter</a=
></code> element, the element is
+  expected to render as an 'inline-block' box with a 'height' of '1em' a=
nd a 'width' of '5em', a
+  'vertical-align' of '-0.2em', and with its contents depicting a gauge.=
</p>
+
+  <p>When the element is wider than it is tall (or square), the de=
piction is expected to be of a
+  horizontal gauge, with the minimum value on the right if the 'directio=
n' property on this element
+  has a computed value of 'rtl', and on the left otherwise. When the ele=
ment is taller than it is
+  wide, it is expected to depict a vertical gauge, with the minimum valu=
e on the bottom.</p>
+
+  <p>User agents are expected to use a presentation consistent wit=
h platform conventions for gauges,
+  if any.</p>
+
+  <p class=3Dnote>Requirements for what must be depicted in the ga=
uge are included in the definition
+  of the <code><a href=3D#the-meter-element>meter</a>&=
lt;/code> element.</p>
+
+  </div>
+
+
+  <div class=3Dimpl>
+
+  <h4 id=3Dthe-progress-element-0><span class=3Dsecno>14.5.1=
3 </span>The <code><a href=3D#the-progress-element>prog=
ress</a></code> element</h4>
+
+  <pre class=3Dcss>@namespace url(http://www.w3.org/1999/xhtml);
+
+progress { binding: <i title=3D"">progress</i>; }&=
lt;/pre>
+
+  <p>When the <i title=3D"">progress</i> bin=
ding applies to a <code><a href=3D#the-progress-element>progr=
ess</a></code> element, the
+  element is expected to render as an 'inline-block' box with a 'height'=
 of '1em' and a 'width' of
+  '10em', and a 'vertical-align' of '-0.2em'.</p>
+
+  <!-- http://software.hixie.ch/utilities/js/canvas/?c.clearRect(0%2C=
%200%2C%20640%2C%20480)%3B%0Ac.save()%3B%0Atry%20{%0A%20%20c.fillStyle%20=
%3D%20'black'%3B%0A%20%20c.font%20%3D%20'8px%20sans-serif'%3B%0A%20%20c.f=
illText('Wide'%2C%2043%2C105)%3B%0A%20%20c.fillText('Tall'%2C%20100%2C105=
)%3B%0A%20%20c.fillText('Square'%2C%20128%2C105)%3B%0A%20%20c.font%20%3D%=
20'700%2010px%20sans-serif'%3B%0A%20%20c.fillText('Progress%20Bars'%2C%20=
13%2C30)%3B%0A%20%20c.font%20%3D%20'100%2010px%20sans-serif'%3B%0A%20%20c=
.fillText('(80%25)'%2C%2037%2C45)%3B%0A%20%20c.beginPath()%3B%0A%20%20var=
%20g%20%3D%20c.createLinearGradient(10%2C0%2C80%2C0)%3B%0A%20%20g.addColo=
rStop(0%2C%20'%2300FF00')%3B%0A%20%20g.addColorStop(0.8%2C%20'%2300FF00')=
%3B%0A%20%20g.addColorStop(0.9%2C%20'%23FFFF00')%3B%0A%20%20c.fillStyle%2=
0%3D%20g%3B%0A%20%20c.rect(10%2C80%2C80%2C15)%3B%0A%20%20c.fill()%3B%0A%2=
0%20c.strokeStyle%20%3D%20'black'%3B%0A%20%20c.stroke()%3B%0A%20%20c.begi=
nPath()%3B%0A%20%20var%20g%20%3D%20c.createLinearGradient(0%2C80%2C0%2C20=
)%3B%0A%20%20g.addColorStop(0%2C%20'%2300FF00')%3B%0A%20%20g.addColorStop=
(0.75%2C%20'%2300FF00')%3B%0A%20%20g.addColorStop(0.85%2C%20'%23FFFF00')%=
3B%0A%20%20c.fillStyle%20%3D%20g%3B%0A%20%20c.rect(100%2C15%2C15%2C80)%3B=
%0A%20%20c.fill()%3B%0A%20%20c.strokeStyle%20%3D%20'black'%3B%0A%20%20c.s=
troke()%3B%0A%0A%20%20c.beginPath()%3B%0A%20%20c.fillStyle%20%3D%20'yello=
w'%3B%0A%20%20c.arc(140%2C80%2C15%2C0%2C2*Math.PI%2C%20true)%3B%0A%20%20c=
.fill()%3B%0A%20%20c.beginPath()%3B%0A%20%20c.fillStyle%20%3D%20'lime'%3B=
%0A%20%20c.moveTo(140%2C80)%3B%0A%20%20c.arc(140%2C80%2C15%2C-Math.PI%2F2=
%2C1.2*Math.PI%2C%20false)%3B%0A%20%20c.fill()%3B%0A%20%20c.beginPath()%3=
B%0A%20%20c.arc(140%2C80%2C15%2C0%2C2*Math.PI%2C%20true)%3B%0A%20%20c.str=
okeStyle%20%3D%20'black'%3B%0A%20%20c.stroke()%3B%0A}%20finally%20{%0A%20=
%20c.restore()%3B%0A}%0A -->
+
+  <p> <img src=3Dhttp://images.whatwg.org/sample-progress.png w=
idth=3D157 class=3Dextra alt=3D"" height=3D103> When the
+  element is wider than it is tall, the element is expected to be depict=
ed as a horizontal progress
+  bar, with the start on the right and the end on the left if the 'direc=
tion' property on this
+  element has a computed value of 'rtl', and with the start on the left =
and the end on the right
+  otherwise. When the element is taller than it is wide, it is expected =
to depicted as a vertical
+  progress bar, with the lowest value on the bottom. When the element is=
 square, it is expected to
+  be depicted as a direction-independent progress widget (e.g. a circula=
r progress ring).</p>
+
+  <p>User agents are expected to use a presentation consistent wit=
h platform conventions for
+  progress bars. In particular, user agents are expected to use differen=
t presentations for
+  determinate and indeterminate progress bars. User agents are also expe=
cted to vary the
+  presentation based on the dimensions of the element.</p>
+
+  <p class=3Dexample>For example, on some platforms for showing in=
determinate 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 th=
e element is wide.</p>
+
+  <p class=3Dnote>Requirements for how to determine if the progres=
s bar is determinate or
+  indeterminate, and what progress a determinate progress bar is to show=
, are included in the
+  definition of the <code><a href=3D#the-progress-element>pr=
ogress</a></code> element.</p>
+
+  </div>
+
+
+  <div class=3Dimpl>
+
+  <h4 id=3Dthe-select-element-0><span class=3Dsecno>14.5.14 =
</span>The <code><a href=3D#the-select-element>select&l=
t;/a></code> element</h4>
+
+  <pre class=3Dcss>@namespace url(http://www.w3.org/1999/xhtml);
+
+select { binding: <i title=3D"">select</i>; }</=
pre>
+
+  <p>When the <i title=3D"">select</i> bindi=
ng applies to a <code><a href=3D#the-select-element>select&lt=
;/a></code> element whose <code title=3Dattr-select-multiple&=
gt;<a href=3D#attr-select-multiple>multiple</a></code> =
attribute is present, the element is expected to
+  render as a multi-select list box.</p>
+
+  <p>When the <i title=3D"">select</i> bindi=
ng applies to a <code><a href=3D#the-select-element>select&lt=
;/a></code> element whose <code title=3Dattr-select-multiple&=
gt;<a href=3D#attr-select-multiple>multiple</a></code> =
attribute is absent, and the element's <a href=3D#concept-select-size =
title=3Dconcept-select-size>display size</a> is greater than 1, =
the element is expected to
+  render as a single-select list box.</p>
+
+  <p>When the element renders as a list box, it is expected to ren=
der as an 'inline-block' box whose
+  'height' is the height necessary to contain as many rows for items as =
given by the element's <a href=3D#concept-select-size title=3Dconcept-=
select-size>display size</a>, or four rows if the attribute is a=
bsent, and
+  whose 'width' is the <a href=3D"#width-of-the-select's-labels&=
quot;>width of the <code>select</code>'s labels</a> =
plus the width of a
+  scrollbar.</p>
+
+  <p>When the <i title=3D"">select</i> bindi=
ng applies to a <code><a href=3D#the-select-element>select&lt=
;/a></code> element whose <code title=3Dattr-select-multiple&=
gt;<a href=3D#attr-select-multiple>multiple</a></code> =
attribute is absent, and the element's <a href=3D#concept-select-size =
title=3Dconcept-select-size>display size</a> is 1, the element i=
s expected to render as a
+  one-line drop down box whose width is the <a href=3D"#width-of=
-the-select's-labels">width of the <code>select</code&gt=
;'s
+  labels</a>.</p>
+
+  <p>In either case (list box or drop-down box), the element's ite=
ms are expected to be the
+  element's <a href=3D#concept-select-option-list title=3Dconcept-sel=
ect-option-list>list of options</a>, with the element's
+  <code><a href=3D#the-optgroup-element>optgroup</a>&l=
t;/code> element children providing headers for groups of options wher=
e
+  applicable.</p>
+
+  <p>An <code><a href=3D#the-optgroup-element>optgroup=
</a></code> element is expected to be rendered by displaying =
the element's <code title=3Dattr-optgroup-label><a href=3D#attr-=
optgroup-label>label</a></code> attribute.</p>
+
+  <p>An <code><a href=3D#the-option-element>option<=
/a></code> element is expected to be rendered by displaying the =
element's <a href=3D#concept-option-label title=3Dconcept-option-label=
>label</a>, indented under its <code><a href=3D#the-opt=
group-element>optgroup</a></code> element if it
+  has one.</p>
+
+  <p>The <dfn id=3D"width-of-the-select's-labels">=
width of the <code>select</code>'s labels</dfn> is the =
wider of the width necessary to
+  render the widest <code><a href=3D#the-optgroup-element>op=
tgroup</a></code>, and the width necessary to render the wide=
st
+  <code><a href=3D#the-option-element>option</a></c=
ode> element in the element's <a href=3D#concept-select-option-list=
 title=3Dconcept-select-option-list>list of
+  options</a> (including its indent, if any).</p>
+
+  <p>If a <code><a href=3D#the-select-element>select&l=
t;/a></code> element contains a <a href=3D#placeholder-label-=
option>placeholder label option</a>, the user
+  agent is expected to render that <code><a href=3D#the-option-=
element>option</a></code> in a manner that conveys that it=
 is a label,
+  rather than a valid option of the control. This can include preventing=
 the <a href=3D#placeholder-label-option>placeholder label
+  option</a> from being explicitly selected by the user. When the =
<a href=3D#placeholder-label-option>placeholder label
+  option</a>'s <a href=3D#concept-option-selectedness title=3Dc=
oncept-option-selectedness>selectedness</a> is true, the control
+  is expected to be displayed in a fashion that indicates that no valid =
option is currently
+  selected.</p>
+
+  <p>User agents are expected to render the labels in a <code&g=
t;<a href=3D#the-select-element>select</a></code> in su=
ch a manner that
+  any alignment remains consistent whether the label is being displayed =
as part of the page or in a
+  menu control.</p>
+
+  </div>
+
+
+  <div class=3Dimpl>
+
+  <h4 id=3Dthe-textarea-element-0><span class=3Dsecno>14.5.1=
5 </span>The <code><a href=3D#the-textarea-element>text=
area</a></code> element</h4>
+
+  <pre class=3Dcss>@namespace url(http://www.w3.org/1999/xhtml);
+
+textarea { binding: <i title=3D"">textarea</i>; wh=
ite-space: pre-wrap; }</pre>
+
+  <p>When the <i title=3D"">textarea</i> bin=
ding applies to a <code><a href=3D#the-textarea-element>texta=
rea</a></code> element, the
+  element is expected to render as an 'inline-block' box rendered as a m=
ultiline text field.</p>
+
+  <p>If the element has a <code title=3Dattr-textarea-cols>&=
lt;a href=3D#attr-textarea-cols>cols</a></code> attribute,=
 and parsing that
+  attribute's value using the <a href=3D#rules-for-parsing-non-negati=
ve-integers>rules for parsing non-negative integers</a> doesn't =
generate
+  an error, then the user agent is expected to use the attribute as a &l=
t;a href=3D#presentational-hints title=3D"presentational
+  hints">presentational hint</a> for the 'width' property =
on the element, with the value being
+  the <a href=3D#textarea-effective-width>textarea effective width=
</a> (as defined below). Otherwise, the user agent is
+  expected to act as if it had a user-agent-level style sheet rule setti=
ng the 'width' property on
+  the element to the <a href=3D#textarea-effective-width>textarea =
effective width</a>.</p>
+
+  <p>The <dfn id=3Dtextarea-effective-width>textarea effecti=
ve width</dfn> of a <code><a href=3D#the-textarea-element&=
gt;textarea</a></code> element is <span title=3D"&quo=
t;><var title=3D"">size</var>×<var =
title=3D"">avg</var> + <var title=
=3D"">sbw</var></span>, where <var title=3D&q=
uot;">size</var> is the element's <a href=3D#attr-textar=
ea-cols-value title=3Dattr-textarea-cols-value>character width</a&g=
t;, <var title=3D"">avg</var> is the average
+  character width of the primary font of the element, in CSS pixels, and=
 <var title=3D"">sbw</var> is
+  the width of a scroll bar, in CSS pixels. (The element's 'letter-spaci=
ng' property does not affect
+  the result.)</p>
+
+  <p>If the element has a <code title=3Dattr-textarea-rows>&=
lt;a href=3D#attr-textarea-rows>rows</a></code> attribute,=
 and parsing that
+  attribute's value using the <a href=3D#rules-for-parsing-non-negati=
ve-integers>rules for parsing non-negative integers</a> doesn't =
generate
+  an error, then the user agent is expected to use the attribute as a &l=
t;a href=3D#presentational-hints title=3D"presentational
+  hints">presentational hint</a> for the 'height' property=
 on the element, with the value being
+  the <a href=3D#textarea-effective-height>textarea effective heig=
ht</a> (as defined below). Otherwise, the user agent is
+  expected to act as if it had a user-agent-level style sheet rule setti=
ng the 'height' property on
+  the element to the <a href=3D#textarea-effective-height>textarea=
 effective height</a>.</p>
+
+  <p>The <dfn id=3Dtextarea-effective-height>textarea effect=
ive height</dfn> of a <code><a href=3D#the-textarea-elemen=
t>textarea</a></code> element is the height in
+  CSS pixels of the number of lines specified the element's <a href=3D=
#attr-textarea-rows-value title=3Dattr-textarea-rows-value>character h=
eight</a>, plus the height of a scrollbar in CSS
+  pixels.</p>
+
+  <p>User agents are expected to apply the 'white-space' CSS prope=
rty to <code><a href=3D#the-textarea-element>textarea</a&g=
t;</code>
+  elements. For historical reasons, if the element has a <code title=3D=
attr-textarea-wrap><a href=3D#attr-textarea-wrap>wrap</a>&=
lt;/code> attribute whose value is an <a href=3D#ascii-case-insensi=
tive>ASCII
+  case-insensitive</a> match for the string "<code title=3D=
attr-textarea-wrap-off>off</code>",
+  then the user agent is expected to treat the attribute as a <a href=
=3D#presentational-hints title=3D"presentational
+  hints">presentational hint</a> setting the element's 'wh=
ite-space' property to 'pre'.</p>
+
+  </div>
+
+
+  <div class=3Dimpl>
+
+  <h4 id=3Dthe-keygen-element-0><span class=3Dsecno>14.5.16 =
</span>The <code><a href=3D#the-keygen-element>keygen&l=
t;/a></code> element</h4>
+
+  <pre class=3Dcss>@namespace url(http://www.w3.org/1999/xhtml);
+
+keygen { binding: <i title=3D"">keygen</i>; }</=
pre>
+
+  <p>When the <i title=3D"">keygen</i> bindi=
ng applies to a <code><a href=3D#the-keygen-element>keygen&lt=
;/a></code> element, the element
+  is expected to render as an 'inline-block' box containing a user inter=
face to configure the key
+  pair to be generated.</p>
+
+  </div>
+
+
+
+  <div class=3Dimpl>
+
+  <h3 id=3Dframes-and-framesets><span class=3Dsecno>14.6 &lt=
;/span>Frames and framesets</h3>
+
+  <p>User agent are expected to render <code><a href=3D#f=
rameset>frameset</a></code> elements as a box with the hei=
ght and
+  width of the viewport, with a surface rendered according to the follow=
ing layout algorithm:</p>
+
+  <ol><li>
+
+    <p>The <var title=3D"">cols</var> and &l=
t;var title=3D"">rows</var> variables are lists of zer=
o or more
+    pairs consisting of a number and a unit, the unit being one of <i=
>percentage</i>,
+    <i>relative</i>, and <i>absolute</i>.</p&=
gt;
+
+    <p>Use the <a href=3D#rules-for-parsing-a-list-of-dimension=
s>rules for parsing a list of dimensions</a> to parse the value =
of the
+    element's <code title=3Dattr-frameset-cols>cols</code> a=
ttribute, if there is one. Let <var title=3D"">cols</v=
ar> be the result, or an empty list if there is no such attribute.<=
/p>
+
+    <p>Use the <a href=3D#rules-for-parsing-a-list-of-dimension=
s>rules for parsing a list of dimensions</a> to parse the value =
of the
+    element's <code title=3Dattr-frameset-rows>rows</code> a=
ttribute, if there is one. Let <var title=3D"">rows</v=
ar> be the result, or an empty list if there is no such attribute.<=
/p>
+
+   </li>
+
+   <li>
+
+    <p>For any of the entries in <var title=3D"">c=
ols</var> or <var title=3D"">rows</var> that =
have the
+    number zero and the unit <i>relative</i>, change the ent=
ry's number to one.</p>
+
+   </li>
+
+   <li>
+
+    <p>If <var title=3D"">cols</var> has no =
entries, then add a single entry consisting of the value 1
+    and the unit <i>relative</i> to <var title=3D"&q=
uot;>cols</var>.</p>
+
+    <p>If <var title=3D"">rows</var> has no =
entries, then add a single entry consisting of the value 1
+    and the unit <i>relative</i> to <var title=3D"&q=
uot;>rows</var>.</p>
+
+   </li>
+
+   <li>
+
+    <p>Invoke the algorithm defined below to <a href=3D#convert=
-a-list-of-dimensions-to-a-list-of-pixel-values>convert a list of dime=
nsions to a list of pixel
+    values</a> using <var title=3D"">cols</var&=
gt; as the input list, and the width of the surface
+    that the <code><a href=3D#frameset>frameset</a>&lt=
;/code> is being rendered into, in CSS pixels, as the input dimension.
+    Let <var title=3D"">sized cols</var> be the re=
sulting list.</p>
+
+    <p>Invoke the algorithm defined below to <a href=3D#convert=
-a-list-of-dimensions-to-a-list-of-pixel-values>convert a list of dime=
nsions to a list of pixel
+    values</a> using <var title=3D"">rows</var&=
gt; as the input list, and the height of the surface
+    that the <code><a href=3D#frameset>frameset</a>&lt=
;/code> is being rendered into, in CSS pixels, as the input dimension.
+    Let <var title=3D"">sized rows</var> be the re=
sulting list.</p>
+
+   </li>
+
+   <li>
+
+    <p>Split the surface into a grid of <span title=3D"&qu=
ot;><var title=3D"">w</var>×<var ti=
tle=3D"">h</var></span> rectangles, where <va=
r title=3D"">w</var> is the number of entries in <v=
ar title=3D"">sized cols</var> and <var title=3D&qu=
ot;">h</var> is the number of entries in <var title=3D&q=
uot;">sized rows</var>.</p>
+
+    <p>Size the columns so that each column in the grid is as many=
 CSS pixels wide as the
+    corresponding entry in the <var title=3D"">sized col=
s</var> list.</p>
+
+    <p>Size the rows so that each row in the grid is as many CSS p=
ixels high as the corresponding
+    entry in the <var title=3D"">sized rows</var> =
list.</p>
+
+   </li>
+
+   <li>
+
+    <p>Let <var title=3D"">children</var> be=
 the list of <code><a href=3D#frame>frame</a></code&=
gt; and <code><a href=3D#frameset>frameset</a></code=
>
+    elements that are children of the <code><a href=3D#frameset=
>frameset</a></code> element for which the algorithm was
+    invoked.</p>
+
+   </li>
+
+   <li>
+
+    <p>For each row of the grid of rectangles created in the previ=
ous step, from top to bottom, run
+    these substeps:</p>
+
+    <ol><li>
+
+      <p>For each rectangle in the row, from left to right, run th=
ese substeps:</p>
+
+      <ol><li>
+
+        <p>If there are any elements left in <var title=3D&quot=
;">children</var>, take the first element in
+        the list, and assign it to the rectangle.</p>
+
+        <p>If this is a <code><a href=3D#frameset>fram=
eset</a></code> element, then recurse the entire <code>=
<a href=3D#frameset>frameset</a></code>
+        layout algorithm for that <code><a href=3D#frameset>=
frameset</a></code> element, with the rectangle as the
+        surface.</p>
+
+        <p>Otherwise, it is a <code><a href=3D#frame>f=
rame</a></code> element; create a <a href=3D#nested-browsi=
ng-context>nested browsing
+        context</a> sized to fit the rectangle.</p>
+
+       </li>
+
+       <li>
+
+        <p>If there are any elements left in <var title=3D&quot=
;">children</var>, remove the first element
+        from <var title=3D"">children</var>.</p=
>
+
+      </ol></li>
+
+    </ol></li>
+
+   <li>
+
+    <p>If the <code><a href=3D#frameset>frameset</a=
></code> element <a href=3D#has-a-border>has a border</=
a>, draw an outer set of borders
+    around the rectangles, using the element's <a href=3D#frame-borde=
r-color>frame border color</a>.</p>
+
+    <p>For each rectangle, if there is an element assigned to that=
 rectangle, and that element
+    <a href=3D#has-a-border>has a border</a>, draw an inner =
set of borders around that rectangle, using the
+    element's <a href=3D#frame-border-color>frame border color<=
/a>.</p>
+
+    <p>For each (visible) border that does not abut a rectangle th=
at is assigned a
+    <code><a href=3D#frame>frame</a></code> elem=
ent with a <code title=3Dattr-frame-noresize>noresize</code> =
attribute
+    (including rectangles in further nested <code><a href=3D#fr=
ameset>frameset</a></code> elements), the user agent is
+    expected to allow the user to move the border, resizing the rectangl=
es within, keeping the
+    proportions of any nested <code><a href=3D#frameset>fram=
eset</a></code> grids.</p>
+
+    <p>A <code><a href=3D#frameset>frameset</a>&=
lt;/code> or <code><a href=3D#frame>frame</a></co=
de> element <dfn id=3Dhas-a-border>has a border</dfn> if t=
he
+    following algorithm returns true:</p>
+
+    <ol><li><p>If the element has a <code title=3Da=
ttr-frames-frameborder>frameborder</code> attribute
+     whose value is not the empty string and whose first character is ei=
ther 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.</li>
+
+     <li><p>Otherwise, if the element has a <code title=3D=
attr-frames-frameborder>frameborder</code>
+     attribute, return false.</li>
+
+     <li><p>Otherwise, if the element has a parent element t=
hat is a <code><a href=3D#frameset>frameset</a></cod=
e> element,
+     then return true if <em>that</em> element <a href=3D=
#has-a-border>has a border</a>, and false if it does
+     not.</li>
+
+     <li><p>Otherwise, return true.</li>
+
+    </ol><p>The <dfn id=3Dframe-border-color>frame bor=
der color</dfn> of a <code><a href=3D#frameset>frameset=
</a></code> or <code><a href=3D#frame>frame</a=
></code> element is
+    the color obtained from the following algorithm:</p>
+
+    <ol><li><p>If the element has a <code title=3Da=
ttr-frames-bordercolor>bordercolor</code> attribute,
+     and applying the <a href=3D#rules-for-parsing-a-legacy-color-val=
ue>rules for parsing a legacy color value</a> to that attribute'=
s value
+     does not result in an error, then return the color so obtained.<=
/li>
+
+     <li><p>Otherwise, if the element has a parent element t=
hat is a <code><a href=3D#frameset>frameset</a></cod=
e> element,
+     then return the <a href=3D#frame-border-color>frame border co=
lor</a> of that element.</p>
+
+     <li><p>Otherwise, return gray.</li>
+
+    </ol></li>
+
+  </ol><p>The algorithm to <dfn id=3Dconvert-a-list-of-di=
mensions-to-a-list-of-pixel-values>convert a list of dimensions to a l=
ist of pixel values</dfn> consists of
+  the following steps:</p>
+
+  <ol><li>
+
+    <p>Let <var title=3D"">input list</var> =
be the list of numbers and units passed to the
+    algorithm.</p>
+
+    <p>Let <var title=3D"">output list</var>=
 be a list of numbers the same length as <var title=3D"">=
input list</var>, all zero.</p>
+
+    <p>Entries in <var title=3D"">output list</=
var> correspond to the entries in <var title=3D"">inpu=
t
+    list</var> that have the same position.</p>
+
+   </li>
+
+   <li><p>Let <var title=3D"">input dimensio=
n</var> be the size passed to the algorithm.</p>
+
+   <li>
+
+    <p>Let <var title=3D"">count percentage</va=
r> be the number of entries in <var title=3D"">input
+    list</var> whose unit is <i>percentage</i>.</p&=
gt;
+
+    <p>Let <var title=3D"">total percentage</va=
r> be the sum of all the numbers in <var title=3D"">in=
put
+    list</var> whose unit is <i>percentage</i>.</p&=
gt;
+
+    <p>Let <var title=3D"">count relative</var&=
gt; be the number of entries in <var title=3D"">input
+    list</var> whose unit is <i>relative</i>.</p&gt=
;
+
+    <p>Let <var title=3D"">total relative</var&=
gt; be the sum of all the numbers in <var title=3D"">inpu=
t
+    list</var> whose unit is <i>relative</i>.</p&gt=
;
+
+    <p>Let <var title=3D"">count absolute</var&=
gt; be the number of entries in <var title=3D"">input
+    list</var> whose unit is <i>absolute</i>.</p&gt=
;
+
+    <p>Let <var title=3D"">total absolute</var&=
gt; be the sum of all the numbers in <var title=3D"">inpu=
t
+    list</var> whose unit is <i>absolute</i>.</p&gt=
;
+
+    <p>Let <var title=3D"">remaining space</var=
> be the value of <var title=3D"">input
+    dimension</var>.</p>
+
+   </li>
+
+   <li>
+
+    <p>If <var title=3D"">total absolute</var&g=
t; is greater than <var title=3D"">remaining space</va=
r>,
+    then for each entry in <var title=3D"">input list&lt=
;/var> whose unit is <i>absolute</i>, set the
+    corresponding value in <var title=3D"">output list&l=
t;/var> to the number of the entry in <var title=3D"">=
input list</var> multiplied by <var title=3D"">rema=
ining space</var> and divided by <var title=3D"">to=
tal absolute</var>. Then, set <var title=3D"">remai=
ning space</var> to zero.</p>
+
+    <p>Otherwise, for each entry in <var title=3D""&g=
t;input list</var> whose unit is <i>absolute</i>,
+    set the corresponding value in <var title=3D"">outpu=
t list</var> to the number of the entry in
+    <var title=3D"">input list</var>. Then, decrem=
ent <var title=3D"">remaining space</var> by <va=
r title=3D"">total absolute</var>.</p>
+
+   </li>
+
+   <li>
+
+    <p>If <var title=3D"">total percentage</var=
> multiplied by the <var title=3D"">input dimension&lt=
;/var>
+    and divided by 100 is greater than <var title=3D"">r=
emaining space</var>, then for each entry in
+    <var title=3D"">input list</var> whose unit is=
 <i>percentage</i>, set the corresponding value in
+    <var title=3D"">output list</var> to the numbe=
r of the entry in <var title=3D"">input list</var>
+    multiplied by <var title=3D"">remaining space</va=
r> and divided by <var title=3D"">total
+    percentage</var>. Then, set <var title=3D"">re=
maining space</var> to zero.</p>
+
+    <p>Otherwise, for each entry in <var title=3D""&g=
t;input list</var> whose unit is <i>percentage</i>,
+    set the corresponding value in <var title=3D"">outpu=
t list</var> to the number of the entry in
+    <var title=3D"">input list</var> multiplied by=
 the <var title=3D"">input dimension</var> and divi=
ded
+    by 100. Then, decrement <var title=3D"">remaining sp=
ace</var> by <var title=3D"">total
+    percentage</var> multiplied by the <var title=3D"&quot=
;>input dimension</var> and divided by 100.</p>
+
+   </li>
+
+   <li>
+
+    <p>For each entry in <var title=3D"">input lis=
t</var> whose unit is <i>relative</i>, set the
+    corresponding value in <var title=3D"">output list&l=
t;/var> to the number of the entry in <var title=3D"">=
input list</var> multiplied by <var title=3D"">rema=
ining space</var> and divided by <var title=3D"">to=
tal relative</var>.</p>
+
+   </li>
+
+   <li><p>Return <var title=3D"">output list=
</var>.</li>
+
+  </ol><p>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 <i>relative</i>, then equally (not pro=
portionally) to each entry whose unit is
+  <i>percentage</i>, then equally (not proportionally) to ea=
ch entry whose unit is <i>absolute</i>,
+  and finally, failing all else, to the last entry.</p>
+
+  </div>
+
+
+  <div class=3Dimpl>
+
+  <h3 id=3Dinteractive-media><span class=3Dsecno>14.7 </s=
pan>Interactive media</h3>
+
+  <h4 id=3Dlinks,-forms,-and-navigation><span class=3Dsecno>=
14.7.1 </span>Links, forms, and navigation</h4>
+
+  <p>User agents are expected to allow the user to control aspects=
 of <a href=3D#hyperlink>hyperlink</a>
+  activation and <a href=3D#form-submission>form submission</a&=
gt;, such as which <a href=3D#browsing-context>browsing context<=
/a> is to be
+  used for the subsequent <a href=3D#navigate title=3Dnavigate>nav=
igation</a>.</p>
+
+  <p>User agents are expected to allow users to discover the desti=
nation of <a href=3D#hyperlink title=3Dhyperlink>hyperlinks</a&g=
t; and of <a href=3D#the-form-element title=3Dform>forms</a> =
before triggering their
+  <a href=3D#navigate title=3Dnavigate>navigation</a>.</p=
>
+
+  <p>User agents are expected to inform the user of whether a <=
a href=3D#hyperlink>hyperlink</a> includes
+  <a href=3D#hyperlink-auditing>hyperlink auditing</a>, and =
to let them know at a minimum which domains will be contacted
+  as part of such auditing.</p>
+
+  <p>User agents may allow users to <a href=3D#navigate>navi=
gate</a><!--DONAV cite=3D""--> <a href=3D#browsi=
ng-context title=3D"browsing
+  context">browsing contexts</a> to the resources <a hr=
ef=3D#resolve-a-url title=3D"resolve a url">indicated</a&=
gt; by
+  the <code title=3D"">cite</code> attributes on &=
lt;code><a href=3D#the-q-element>q</a></code>, <c=
ode><a href=3D#the-blockquote-element>blockquote</a></c=
ode>,
+  <code><a href=3D#the-ins-element>ins</a></code&gt=
;, and <code><a href=3D#the-del-element>del</a></cod=
e> elements.</p>
+
+  <p>User agents may surface <a href=3D#hyperlink title=3Dhyper=
link>hyperlinks</a> created by <code><a href=3D#the-lin=
k-element>link</a></code>
+  elements in their user interface.</p>
+
+  <p class=3Dnote>While <code><a href=3D#the-link-element=
>link</a></code> elements that create <a href=3D#hyperl=
ink title=3Dhyperlink>hyperlinks</a> 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 <code title=3Devent-click><=
a href=3D#event-click>click</a></code> events and the like=
.</p>
+
+
+
+
+  <h4 id=3Dthe-title-attribute-0><span class=3Dsecno>14.7.2 =
</span>The <code title=3Dattr-title><a href=3D#attr-title&=
gt;title</a></code> attribute</h4>
+
+  <p>User agents are expected to expose the <a href=3D#advisory=
-information>advisory information</a> of elements upon user
+  request, and to make the user aware of the presence of such informatio=
n.</p>
+
+  <p>On interactive graphical systems where the user can use a poi=
nting device, this could take the
+  form of a tooltip. When the user is unable to use a pointing device, t=
hen the user agent is
+  expected to make the content available in some other fashion, e.g. by =
making the element focusable
+  and always displaying the <a href=3D#advisory-information>adviso=
ry information</a> of the currently focused element, or
+  by showing the <a href=3D#advisory-information>advisory informat=
ion</a> of the elements under the user's finger on a
+  touch device as the user pans around the screen.</p>
+
+  <p>U+000A LINE FEED (LF) characters are expected to cause line b=
reaks in the tooltip; U+0009
+  CHARACTER TABULATION (tab) characters are expected to render as a non-=
zero horizontal shift that
+  lines up the next glyph with the next tab stop, with tab stops occurri=
ng at points that are
+  multiples of 8 times the width of a U+0020 SPACE character.</p>
+
+  <div class=3Dexample>
+
+   <p>For example, a visual user agent could make elements with a =
<code title=3Dattr-title><a href=3D#attr-title>title</a&gt=
;</code> attribute focusable, and could make any focused element wi=
th a
+   <code title=3Dattr-title><a href=3D#attr-title>title</=
a></code> attribute show its tooltip under the element while the
+   element has focus. This would allow a user to tab around the document=
 to find all the advisory
+   text.</p>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>As another example, a screen reader could provide an audio c=
ue when reading an element with a
+   tooltip, with an associated key to read the last tooltip for which a =
cue was played.</p>
+
+  </div>
+
+
+  <h4 id=3Dediting-hosts><span class=3Dsecno>14.7.3 </spa=
n>Editing hosts</h4>
+
+  <p>The current text editing caret (i.e. the <a href=3D#active=
-range>active range</a>, if it is empty and in an
+  <a href=3D#editing-host>editing host</a>), if any, is expe=
cted 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.</p>
+
+  <p class=3Dnote>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 t=
hrough the element.</p>
+
+
+
+  <h4 id=3Dtext-rendered-in-native-user-interfaces><span class=3D=
secno>14.7.4 </span>Text rendered in native user interfaces</=
h4>
+
+  <p>User agents are expected to honor the Unicode semantics of te=
xt that is exposed in user
+  interfaces, for example supporting the bidirectional algorithm in text=
 shown in dialogs, title
+  bars, pop-up menus, and tooltips. Text from the contents of elements i=
s expected to be rendered in
+  a manner that honors <a href=3D#the-directionality>the direction=
ality</a> of the element from which the text was
+  obtained. Text from attributes is expected to be rendered in a manner =
that honours the
+  <a href=3D#directionality-of-the-attribute>directionality of the=
 attribute</a>.</p>
+
+  <div class=3Dexample>
+
+   <p>Consider the following markup, which has Hebrew text asking =
for a programming language, the
+   languages being text for which a left-to-right direction is important=
 given the punctuation in
+   some of their names:</p>
+
+   <pre><p dir=3D"rtl" lang=3D"he"&=
gt;
+ <label>
+  <span dir=3Drtl lang=3Dhe title=3D"">ב&#=
x5d7;ר שפת תכ=
נות:</span>
+  <select>
+   <option dir=3D"ltr">C++</option&gt=
;
+   <option dir=3D"ltr">C#</option>
+   <option dir=3D"ltr">FreePascal</option=
>
+   <option dir=3D"ltr">F#</option>
+  </select>
+ </label>
+</p></pre>
+
+   <p>If the <code><a href=3D#the-select-element>selec=
t</a></code> element was rendered as a drop down box, a corre=
ct rendering would
+   ensure that the punctuation was the same both in the drop down, and i=
n the box showing the
+   current selection.</p>
+
+   <p><img src=3Dhttp://images.whatwg.org/bidiselect.png width=3D=
206 alt=3D"" height=3D105></p> <!-- no need for alt
+   text, the previous paragraph describes it completely -->
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>The directionality of attributes depends on the attribute an=
d on the element's <code title=3Dattr-dir><a href=3D#the-dir-att=
ribute>dir</a></code> attribute, as the following example =
demonstrates. Consider this
+   markup:</p>
+
+   <pre><bdo dir=3Dltr><table>
+ <tr>
+  <th abbr=3D"(א" dir=3Dltr>A
+  <th abbr=3D"(א" dir=3Drtl>A
+  <th abbr=3D"(א" dir=3Dauto>A
+</table></bdo></pre>
+
+   <p>If the <code title=3Dattr-th-abbr><a href=3D#attr-t=
h-abbr>abbr</a></code> attributes are rendered, e.g. in a =
tooltip or
+   other user interface, the first will have a left parenthesis (because=
 the direction is 'ltr'),
+   the second will have a right parenthesis (because the direction is 'r=
tl'), and the third will
+   have a right parenthesis (because the direction is determined <em&=
gt;from the attribute value</em>
+   to be 'rtl').</p>
+
+   <p>However, if instead the attribute was not a <a href=3D#di=
rectionality-capable-attribute>directionality-capable attribute</a&=
gt;, the
+   results would be different:</p>
+
+   <pre><bdo dir=3Dltr><table>
+ <tr>
+  <th data-abbr=3D"(א" dir=3Dltr>A
+  <th data-abbr=3D"(א" dir=3Drtl>A
+  <th data-abbr=3D"(א" dir=3Dauto>A
+</table></bdo></pre>
+
+   <p>In this case, if the user agent were to expose the <code =
title=3D"">data-abbr</code> attribute
+   in the user interface (e.g. in a debugging environment), the last cas=
e would be rendered with a
+   <em>left</em> parenthesis, because the direction would be=
 determined from the element's
+   contents.</p>
+
+  </div>
+
+  <p>A string provided by a script (e.g. the argument to <code =
title=3Ddom-alert><a href=3D#dom-alert>window.alert()</a>&=
lt;/code>) is expected to be treated as an independent set of one or
+  more bidirectional algorithm paragraphs when displayed, as defined by =
the bidirectional algorithm,
+  including, for instance, supporting the paragraph-breaking behaviour o=
f U+000A LINE FEED (LF)
+  characters. For the purposes of determining the paragraph level of suc=
h text in the bidirectional
+  algorithm, this specification does <em>not</em> provide a =
higher-level override of rules P2 and
+  P3. <a href=3D#refsBIDI>[BIDI]</a></p>
+
+  <p>When necessary, authors can enforce a particular direction fo=
r a given paragraph by starting it
+  with the Unicode U+200E LEFT-TO-RIGHT MARK or U+200F RIGHT-TO-LEFT MAR=
K characters.</p>
+
+  <div class=3Dexample>
+
+   <p>Thus, the following script:</p>
+
+   <pre>alert('\u05DC\u05DE\u05D3 HTML \u05D4\u05D9\u05D5\u05DD!')=
</pre>
+
+   <p>...would always result in a message reading
+        "<bdo dir=3Drtl lang=3D"" title=3D""=
>למד LMTH ה&=
amp;#x5d9;ום!</bdo>"
+   (not "<bdo dir=3Dltr lang=3D"" title=3D""=
>דמל HTML ם&=
amp;#x5d5;יה!</bdo>"),
+   regardless of the language of the user agent interface or the
+   direction of the page or any of its elements.</p>
+
+  </div>
+
+  <div class=3Dexample>
+
+   <p>For a more complex example, consider the following script:&l=
t;/p>
+
+   <pre class=3Dbad>/* Warning: this script does not handle right-=
to-left scripts correctly */
+var s;
+if (s =3D prompt('What is your name?')) {
+  alert(s + '! Ok, Fred, ' + s + ', and Wilma will get the car.');
+}</pre>
+
+   <p>When the user enters "<kbd>Kitty</kbd>&quot=
;, the user agent would alert "<samp>Kitty! Ok, Fred,
+   Kitty, and Wilma will get the car.</samp>". However, if th=
e user enters "<kbd dir=3Drtl lang=3Dar>لا=
 أفهم</kbd>",=
 then the bidirectional
+   algorithm will determine that the direction of the paragraph is right=
-to-left, and so the output
+   will be the following unintended mess: "<samp lang=3D"&q=
uot;><bdo dir=3Drtl>لا أ&=
amp;#x641;هم! derF ,kO, &a=
mp;#x644;ا أفه&#x645=
;, rac eht teg lliw amliW&am=
p;nbsp;dna.</bdo></samp>"</p>
+
+   <p>To force an alert that starts with user-provided text (or ot=
her text of unknown
+   directionality) to render left-to-right, the string can be prefixed w=
ith a U+200E LEFT-TO-RIGHT
+   MARK character:</p>
+
+   <pre>var s;
+if (s =3D prompt('What is your name?')) {
+  alert('<strong>\u200E</strong>' + s + '! Ok, Fred, ' + s +=
 ', and Wilma will get the car.');
+}</pre>
+
+  </div>
+
+
+
+  <h3 id=3Dprint-media><span class=3Dsecno>14.8 </span&gt=
;Print media</h3>
+
+  <p>User agents are expected to allow the user to request the opp=
ortunity to <dfn id=3Dobtain-a-physical-form>obtain a physical
+  form</dfn> (or a representation of a physical form) of a <cod=
e><a href=3D#document>Document</a></code>. For examp=
le,
+  selecting the option to print a page or convert it to PDF format. <=
a href=3D#refsPDF>[PDF]</a></p>
+
+  <p>When the user actually <a href=3D#obtain-a-physical-form t=
itle=3D"obtain a physical form">obtains a physical form</=
a> (or
+  a representation of a physical form) of a <code><a href=3D#do=
cument>Document</a></code>, the user agent is expected to
+  create a new rendering of the <code><a href=3D#document>Do=
cument</a></code> for the print media.</p>
+
+
+
+  <h3 id=3Dunstyled-xml-documents><span class=3Dsecno>14.9 &=
lt;/span>Unstyled XML documents</h3>
+
+  <!-- http://hixie.ch/tests/evil/xml/ -->
+
+  <p>HTML user agents may, in certain circumstances, find themselv=
es rendering non-HTML documents
+  that use vocabularies for which they lack any built-in knowledge. This=
 section provides for a way
+  for user agents to handle such documents in a somewhat useful manner.&=
lt;/p>
+
+  <p>While a <code><a href=3D#document>Document</a&=
gt;</code> is an <a href=3D#unstyled-document>unstyled docume=
nt</a>, the user agent is expected
+  to render <a href=3D#an-unstyled-document-view>an unstyled docum=
ent view</a>.</p>
+
+  <p>A <code><a href=3D#document>Document</a>&lt=
;/code> is an <dfn id=3Dunstyled-document>unstyled document</=
dfn> while it matches the following
+  conditions:</p>
+
+  <ul><li>The <code><a href=3D#document>Document=
</a></code> has no author style sheets (whether referenced by=
 HTTP headers, processing instructions, elements like <code><a h=
ref=3D#the-link-element>link</a></code>, inline elements l=
ike <code><a href=3D#the-style-element>style</a></co=
de>, or any other mechanism).
+   <li>None of the elements in the <code><a href=3D#docum=
ent>Document</a></code> have any <a href=3D#presentatio=
nal-hints>presentational hints</a>.
+   <li>None of the elements in the <code><a href=3D#docum=
ent>Document</a></code> have any <a href=3D#css-styling=
-attribute title=3D"CSS styling attribute">CSS styling attri=
butes</a>.
+   <li>None of the elements in the <code><a href=3D#docum=
ent>Document</a></code> are in any of the following namesp=
aces: <a href=3D#html-namespace-0>HTML namespace</a>, <a h=
ref=3D#svg-namespace>SVG namespace</a>, <a href=3D#mathml-nam=
espace>MathML namespace</a>
+   <li>The <code><a href=3D#document>Document</a&gt=
;</code> has no <a href=3D#focusable>focusable</a> elem=
ents (e.g. from XLink).
+   <li>The <code><a href=3D#document>Document</a&gt=
;</code> has no <a href=3D#hyperlink title=3Dhyperlink>hyperl=
inks</a> (e.g. from XLink).
+   <li>There exists no <a href=3D#concept-script title=3Dconcep=
t-script>script</a> whose <a href=3D#settings-object>setti=
ngs object</a> specifies this <code><a href=3D#document&gt=
;Document</a></code> as the <a href=3D#responsible-documen=
t>responsible document</a>.
+   <li>None of the elements in the <code><a href=3D#docum=
ent>Document</a></code> have any registered event listener=
s.
+  </ul><p><dfn id=3Dan-unstyled-document-view>An unsty=
led document view</dfn> is one where the DOM is not rendered accord=
ing to CSS
+  (which would, since there are no applicable styles in this context, ju=
st result in a wall of
+  text), but is instead rendered in a manner that is useful for a develo=
per. This could consist of
+  just showing the <code><a href=3D#document>Document</a&=
gt;</code> object's source, maybe with syntax highlighting, or it
+  could consist of displaying just the DOM tree, or simply a message say=
ing that the page is not a
+  styled document.</p>
+
+  <p class=3Dnote>If a <code><a href=3D#document>Docum=
ent</a></code> stops being an <a href=3D#unstyled-document=
>unstyled document</a>, then the
+  conditions above stop applying, and thus a user agent following these =
requirements will switch to
+  using the regular CSS rendering.</p>
+
+  </div>
+
+
+
+  <!--TOPIC:HTML-->
+
+  <h2 id=3Dobsolete><span class=3Dsecno>15 </span>Obso=
lete features</h2>
+
+  <h3 id=3Dobsolete-but-conforming-features><span class=3Dsecno=
>15.1 </span>Obsolete but conforming features</h3>
+
+  <p>Features listed in this section will trigger warnings in conf=
ormance checkers.</p>
+
+  <p>Authors should not specify a <code title=3Dattr-img-border=
><a href=3D#attr-img-border>border</a></code> attrib=
ute on an
+  <code><a href=3D#the-img-element>img</a></code&gt=
; element. If the attribute is present, its value must be the string &quo=
t;<code title=3D"">0</code>". CSS should be us=
ed instead.</p>
+
+  <p>Authors should not specify a <code title=3Dattr-script-lan=
guage><a href=3D#attr-script-language>language</a></cod=
e> attribute on a
+  <code><a href=3D#the-script-element>script</a></c=
ode> element. If the attribute is present, its value must be an <a =
href=3D#ascii-case-insensitive>ASCII
+  case-insensitive</a> match for the string "<code title=3D=
"">JavaScript</code>" and either the
+  <code title=3Dattr-script-type><a href=3D#attr-script-type&gt=
;type</a></code> attribute must be omitted or its value must =
be an
+  <a href=3D#ascii-case-insensitive>ASCII case-insensitive</a&g=
t; match for the string "<code title=3D"">text/javas=
cript</code>".
+  The attribute should be entirely omitted instead (with the value &quot=
;<code title=3D"">JavaScript</code>", it has n=
o effect), or replaced with use of the <code title=3Dattr-script-type&=
gt;<a href=3D#attr-script-type>type</a></code> attribut=
e.</p>
+
+  <p>Authors should not specify the <code title=3Dattr-a-name&g=
t;<a href=3D#attr-a-name>name</a></code> attribute on
+  <code><a href=3D#the-a-element>a</a></code> el=
ements. If the attribute is present, its value must not be the empty stri=
ng and
+  must neither be equal to the value of any of the <a href=3D#concept=
-id title=3Dconcept-id>IDs</a> in the
+  element's <a href=3D#home-subtree>home subtree</a> other t=
han the element's own <a href=3D#concept-id title=3Dconcept-id>ID&l=
t;/a>, if any, nor be equal to the value of any of the other <code =
title=3Dattr-a-name><a href=3D#attr-a-name>name</a></co=
de> attributes on <code><a href=3D#the-a-element>a</a&g=
t;</code> elements in the element's <a href=3D#home-subtree>h=
ome
+  subtree</a>. If this attribute is present and the element has an=
 <a href=3D#concept-id title=3Dconcept-id>ID</a>, then the at=
tribute's value must be equal to the element's <a href=3D#concept-id t=
itle=3Dconcept-id>ID</a>. In earlier versions of the language, t=
his attribute was intended as
+  a way to specify possible targets for fragment identifiers in <a hr=
ef=3D#url title=3DURL>URLs</a>. The
+  <code title=3Dattr-id><a href=3D#the-id-attribute>id</a=
></code> attribute should be used instead.</p>
+
+  <!-- remove this once type=3Dnumber is widely supported -->
+  <p>Authors should not, but may despite requirements to the contr=
ary elsewhere in this
+  specification, specify the <code title=3Dattr-input-maxlength>&l=
t;a href=3D#attr-input-maxlength>maxlength</a></code> and =
<code title=3Dattr-input-size><a href=3D#attr-input-size>size=
</a></code> attributes on <code><a href=3D#the-input=
-element>input</a></code> elements whose <code title=3D=
attr-input-type><a href=3D#attr-input-type>type</a></co=
de> attributes are in the <a href=3D"#number-state-(type=3Dnum=
ber)" title=3Dattr-input-type-number>Number</a> state. One =
valid reason for using these attributes
+  regardless is to help legacy user agents that do not support <code&=
gt;<a href=3D#the-input-element>input</a></code> elemen=
ts with
+  <code title=3D"">type=3D"number"</code&gt=
; to still render the text field with a useful width.</p>
+
+  <p class=3Dnote>In <a href=3D#syntax>the HTML syntax</a=
>, specifying a <a href=3D#syntax-doctype title=3Dsyntax-DOCTYPE&gt=
;DOCTYPE</a> that is an <a href=3D#obsolete-permitted-doctype&gt=
;obsolete permitted DOCTYPE</a> will also
+  trigger a warning.</p>
+
+
+  <div class=3Dimpl>
+
+  <h4 id=3Dwarnings-for-obsolete-but-conforming-features><span =
class=3Dsecno>15.1.1 </span>Warnings for obsolete but conforming=
 features</h4>
+
+  <p>To ease the transition from HTML4 Transitional documents to t=
he language defined in
+  <em>this</em> specification, and to discourage certain fea=
tures 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 hav=
e no effect, and are allowed
+  only to distinguish between likely mistakes (regular conformance error=
s) and mere vestigial markup
+  or unusual and discouraged practices (these warnings).</p>
+
+  <p>The following features must be categorized as described
+  above:</p>
+
+  <ul><!-- downplayed list --><li><p>The presenc=
e of an <a href=3D#obsolete-permitted-doctype>obsolete permitted DO=
CTYPE</a> in an <a href=3D#html-documents title=3D"HTML
+   documents">HTML document</a>.</li>
+
+   <li><p>The presence of a <code title=3Dattr-img-border=
><a href=3D#attr-img-border>border</a></code> attrib=
ute on an
+   <code><a href=3D#the-img-element>img</a></code&g=
t; element if its value is the string "<code title=3D""=
>0</code>".</li>
+
+   <li><p>The presence of a <code title=3Dattr-script-lan=
guage><a href=3D#attr-script-language>language</a></cod=
e> attribute on a
+   <code><a href=3D#the-script-element>script</a></=
code> element if its value is an <a href=3D#ascii-case-insensitive&=
gt;ASCII case-insensitive</a> match for the
+   string "<code title=3D"">JavaScript</code>=
" and if there is no <code title=3Dattr-script-type><a href=
=3D#attr-script-type>type</a></code> attribute or there is=
 and its value is an <a href=3D#ascii-case-insensitive>ASCII
+   case-insensitive</a> match for the string "<code title=3D=
"">text/javascript</code>".</li>
+
+   <li><p>The presence of a <code title=3Dattr-a-name>=
<a href=3D#attr-a-name>name</a></code> attribute on an =
<code><a href=3D#the-a-element>a</a></code>
+   element, if its value is not the empty string.</li>
+
+   <li><p>The presence of a <code title=3Dattr-input-maxl=
ength><a href=3D#attr-input-maxlength>maxlength</a></co=
de> attribute on an
+   <code><a href=3D#the-input-element>input</a></co=
de> element whose <code title=3Dattr-input-type><a href=3D#at=
tr-input-type>type</a></code> attribute is in the
+   <a href=3D"#number-state-(type=3Dnumber)" title=3Dattr-i=
nput-type-number>Number</a> state.</li>
+
+   <li><p>The presence of a <code title=3Dattr-input-size=
><a href=3D#attr-input-size>size</a></code> attribut=
e on an
+   <code><a href=3D#the-input-element>input</a></co=
de> element whose <code title=3Dattr-input-type><a href=3D#at=
tr-input-type>type</a></code> attribute is in the
+   <a href=3D"#number-state-(type=3Dnumber)" title=3Dattr-i=
nput-type-number>Number</a> state.</li>
+
+  </ul><p>Conformance checkers must distinguish between page=
s that have no conformance errors and have
+  none of these obsolete features, and pages that have no conformance er=
rors but do have some of
+  these obsolete features.</p>
+
+  <p class=3Dexample>For example, a validator could report some pa=
ges as "Valid HTML" and others as
+  "Valid HTML with warnings".</p>
+
+  </div>
+
+
+  <h3 id=3Dnon-conforming-features><span class=3Dsecno>15.2 =
</span>Non-conforming features</h3>
+
+  <p>Elements in the following list are entirely obsolete, and mus=
t not be used by authors:</p>
+
+  <dl><!-- alphabetical by first element in the group, except C=
SS goes last --><dt><code><a href=3D#the-applet-element=
>applet</a></code></dt>
+   <dd><p>Use <code><a href=3D#the-embed-element&gt=
;embed</a></code> or <code><a href=3D#the-object-ele=
ment>object</a></code> instead.</dd>
+
+   <dt><dfn id=3Dacronym><code>acronym</code>&lt=
;/dfn></dt>
+   <dd><p>Use <code><a href=3D#the-abbr-element>=
abbr</a></code> instead.</dd>
+
+   <dt><dfn id=3Dbgsound><code>bgsound</code>&lt=
;/dfn></dt>
+   <dd><p>Use <code><a href=3D#the-audio-element&gt=
;audio</a></code> instead.</dd>
+
+   <dt><dfn id=3Ddir><code>dir</code></dfn&gt=
;</dt>
+   <dd><p>Use <code><a href=3D#the-ul-element>ul=
</a></code> instead.</dd>
+
+   <dt><code><a href=3D#frame>frame</a></code=
></dt>
+   <dt><code><a href=3D#frameset>frameset</a>&lt=
;/code></dt>
+   <dt><dfn id=3Dnoframes><code>noframes</code>&=
lt;/dfn></dt>
+   <dd><p>Either use <code><a href=3D#the-iframe-el=
ement>iframe</a></code> and CSS instead, or use server-sid=
e includes to generate complete pages with the various invariant parts me=
rged in.</dd>
+
+   <dt><dfn id=3Disindex-0><code>isindex</code>&=
lt;/dfn></dt>
+   <dd><p>Use an explicit <code><a href=3D#the-form=
-element>form</a></code> and <a href=3D"#text-(typ=
e=3Dtext)-state-and-search-state-(type=3Dsearch)" title=3Dattr-input=
-type-text>text field</a> combination instead.</dd>
+
+   <dt><dfn id=3Dlisting><code>listing</code>&lt=
;/dfn></dt>
+   <dd><p>Use <code><a href=3D#the-pre-element>p=
re</a></code> and <code><a href=3D#the-code-element&=
gt;code</a></code> instead.</dd>
+
+   <dt><dfn id=3Dnextid><code>nextid</code></=
dfn></dt>
+   <dd><p>Use GUIDs instead.</dd>
+
+   <dt><dfn id=3Dnoembed><code>noembed</code>&lt=
;/dfn></dt>
+   <dd><p>Use <code><a href=3D#the-object-element&g=
t;object</a></code> instead of <code><a href=3D#the-=
embed-element>embed</a></code> when fallback is necessary.=
</dd>
+
+   <dt><dfn id=3Dplaintext><code>plaintext</code&gt=
;</dfn></dt>
+   <dd><p>Use the "<code>text/plain</code>&=
quot; <a href=3D#mime-type>MIME type</a> instead.</dd>
+
+   <dt><dfn id=3Drb><code>rb</code></dfn>&=
lt;/dt>
+   <dd><p>Providing the ruby base directly inside the <co=
de><a href=3D#the-ruby-element>ruby</a></code> eleme=
nt is sufficient; the <code><a href=3D#rb>rb</a></co=
de> element is unnecessary. Omit it altogether.</dd>
+
+   <dt><dfn id=3Dstrike><code>strike</code></=
dfn></dt>
+   <dd><p>Use <code><a href=3D#the-del-element>d=
el</a></code> instead if the element is marking an edit, othe=
rwise use <code><a href=3D#the-s-element>s</a></code=
> instead.</dd>
+
+   <dt><dfn id=3Dxmp><code>xmp</code></dfn&gt=
;</dt>
+   <dd><p>Use <code><a href=3D#the-pre-element>p=
re</a></code> and <code><a href=3D#the-code-element&=
gt;code</a></code> instead, and escape "<code title=3D=
""><</code>" and "<code title=3D&q=
uot;">&</code>" characters as "<code t=
itle=3D""><</code>" and "<code=
 title=3D"">&</code>" respectively.&l=
t;/dd>
+
+   <dt><dfn id=3Dbasefont><code>basefont</code>&=
lt;/dfn></dt>
+   <dt><dfn id=3Dbig><code>big</code></dfn&gt=
;</dt>
+   <dt><dfn id=3Dblink><code>blink</code></df=
n></dt>
+   <dt><dfn id=3Dcenter><code>center</code></=
dfn></dt>
+   <dt><dfn id=3Dfont><code>font</code></dfn&=
gt;</dt>
+   <dt><code><a href=3D#the-marquee-element>marquee&lt=
;/a></code></dt>
+   <dt><dfn id=3Dmulticol><code>multicol</code>&=
lt;/dfn></dt>
+   <dt><dfn id=3Dnobr><code>nobr</code></dfn&=
gt;</dt>
+   <dt><dfn id=3Dspacer><code>spacer</code></=
dfn></dt>
+   <dt><dfn id=3Dtt><code>tt</code></dfn>&=
lt;/dt>
+
+   <dd>
+
+    <p>Use appropriate elements or CSS instead.</p>
+
+    <p>Where the <code><a href=3D#tt>tt</a></=
code> element would have been used for marking up keyboard input,
+    consider the <code><a href=3D#the-kbd-element>kbd</a&=
gt;</code> element; for variables, consider the <code><a h=
ref=3D#the-var-element>var</a></code> element; for
+    computer code, consider the <code><a href=3D#the-code-eleme=
nt>code</a></code> element; and for computer output, consi=
der the
+    <code><a href=3D#the-samp-element>samp</a></cod=
e> element.</p>
+
+    <p>Similarly, if the <code><a href=3D#big>big</=
a></code> element is being used to denote a heading, consider us=
ing
+    the <code><a href=3D#the-h1,-h2,-h3,-h4,-h5,-and-h6-element=
s>h1</a></code> element; if it is being used for marking u=
p important passages, consider the
+    <code><a href=3D#the-strong-element>strong</a><=
/code> element; and if it is being used for highlighting text for refe=
rence
+    purposes, consider the <code><a href=3D#the-mark-element&gt=
;mark</a></code> element.</p>
+
+    <p>See also the <a href=3D#usage-summary>text-level sema=
ntics usage summary</a> for more
+    suggestions with examples.</p>
+
+   </dd>
+
+  </dl><hr><p>The following attributes are obsolete (t=
hough the elements are still part of the language), and
+  must not be used by authors:</p>
+
+  <dl><!-- alphabetical by element then attribute of first item=
 in group, except CSS goes last --><dt><dfn id=3Dattr-a-chars=
et title=3Dattr-a-charset><code>charset</code></dfn>=
 on <code><a href=3D#the-a-element>a</a></code> e=
lements</dt>
+   <dt><dfn id=3Dattr-link-charset title=3Dattr-link-charset&gt=
;<code>charset</code></dfn> on <code><a href=3D=
#the-link-element>link</a></code> elements</dt>
+   <dd><p>Use an HTTP Content-Type header on the linked reso=
urce instead.</dd>
+
+   <dt><dfn id=3Dattr-a-coords title=3Dattr-a-coords><cod=
e>coords</code></dfn> on <code><a href=3D#the-a-e=
lement>a</a></code> elements</dt>
+   <dt><dfn id=3Dattr-a-shape title=3Dattr-a-shape><code&=
gt;shape</code></dfn> on <code><a href=3D#the-a-elem=
ent>a</a></code> elements</dt>
+   <dd><p>Use <code><a href=3D#the-area-element>=
area</a></code> instead of <code><a href=3D#the-a-el=
ement>a</a></code> for image maps.</dd>
+
+   <dt><dfn id=3Dattr-a-methods title=3Dattr-a-methods><c=
ode>methods</code></dfn> on <code><a href=3D#the-=
a-element>a</a></code> elements</dt>
+   <dt><dfn id=3Dattr-link-methods title=3Dattr-link-methods&gt=
;<code>methods</code></dfn> on <code><a href=3D=
#the-link-element>link</a></code> elements</dt>
+   <dd><p>Use the HTTP OPTIONS feature instead.</dd>
+
+   <dt><dfn id=3Dattr-a-name title=3Dattr-a-name><code&gt=
;name</code></dfn> on <code><a href=3D#the-a-element=
>a</a></code> elements (except as noted in the previous se=
ction)</dt>
+   <dt><dfn id=3Dattr-embed-name title=3Dattr-embed-name>&lt=
;code>name</code></dfn> on <code><a href=3D#the-e=
mbed-element>embed</a></code> elements</dt>
+   <dt><dfn id=3Dattr-img-name title=3Dattr-img-name><cod=
e>name</code></dfn> on <code><a href=3D#the-img-e=
lement>img</a></code> elements</dt>
+   <dt><dfn id=3Dattr-option-name title=3Dattr-option-name>&=
lt;code>name</code></dfn> on <code><a href=3D#the=
-option-element>option</a></code> elements</dt>
+   <dd><p>Use the <code title=3Dattr-id><a href=3D#=
the-id-attribute>id</a></code> attribute instead.</dd&g=
t;
+
+   <dt><dfn id=3Dattr-a-rev title=3Dattr-a-rev><code>r=
ev</code></dfn> on <code><a href=3D#the-a-element&gt=
;a</a></code> elements</dt>
+   <dt><dfn id=3Dattr-link-rev title=3Dattr-link-rev><cod=
e>rev</code></dfn> on <code><a href=3D#the-link-e=
lement>link</a></code> elements</dt>
+   <dd><p>Use the <code title=3Dattr-hyperlink-rel>&lt=
;a href=3D#attr-hyperlink-rel>rel</a></code>
+   attribute instead, with an opposite term. (For example, instead of
+   <code title=3D"">rev=3D"made"</code>,=
 use <code title=3D"">rel=3D"author"</code&g=
t;.)</dd>
+
+   <dt><dfn id=3Dattr-a-urn title=3Dattr-a-urn><code>u=
rn</code></dfn> on <code><a href=3D#the-a-element&gt=
;a</a></code> elements</dt>
+   <dt><dfn id=3Dattr-link-urn title=3Dattr-link-urn><cod=
e>urn</code></dfn> on <code><a href=3D#the-link-e=
lement>link</a></code> elements</dt>
+   <dd><p>Specify the preferred persistent identifier using =
the <code title=3Dattr-hyperlink-href><a href=3D#attr-hyperlink-=
href>href</a></code> attribute instead.</dd>
+
+   <dt><dfn id=3Dattr-form-accept title=3Dattr-form-accept>&=
lt;code>accept</code></dfn> on <code><a href=3D#t=
he-form-element>form</a></code> elements</dt>
+   <dd><p>Use the <code title=3Dattr-input-accept><=
a href=3D#attr-input-accept>accept</a></code> attribute di=
rectly on the <code><a href=3D#the-input-element>input</a&=
gt;</code> elements instead.</dd>
+
+   <dt><dfn id=3Dattr-area-nohref title=3Dattr-area-nohref>&=
lt;code>nohref</code></dfn> on <code><a href=3D#t=
he-area-element>area</a></code> elements</dt>
+   <dd><p>Omitting the <code title=3Dattr-hyperlink-href&=
gt;<a href=3D#attr-hyperlink-href>href</a></code>
+   attribute is sufficient; the <code title=3Dattr-area-nohref>&lt=
;a href=3D#attr-area-nohref>nohref</a></code> attribute is
+   unnecessary. Omit it altogether.</dd>
+
+   <dt><dfn id=3Dattr-head-profile title=3Dattr-head-profile&gt=
;<code>profile</code></dfn> on <code><a href=3D=
#the-head-element>head</a></code> elements</dt>
+   <dd><p>When used for declaring which <code><a hr=
ef=3D#the-meta-element>meta</a></code> terms are
+   used in the document, unnecessary; omit it altogether, and <a href=
=3D#concept-meta-extensions title=3Dconcept-meta-extensions>register t=
he names</a>.</dd>
+   <dd><p>When used for triggering specific user agent behav=
iors: use
+   a <code><a href=3D#the-link-element>link</a></co=
de> element instead.</dd>
+
+   <dt><dfn id=3Dattr-html-version title=3Dattr-html-version&gt=
;<code>version</code></dfn> on <code><a href=3D=
#the-html-element>html</a></code> elements</dt>
+   <dd><p>Unnecessary. Omit it altogether.</dd>
+
+   <dt><dfn id=3Dattr-input-ismap title=3Dattr-input-ismap>&=
lt;code>ismap</code></dfn> on <code><a href=3D#th=
e-input-element>input</a></code> elements</dt>
+   <dd><p>Unnecessary. Omit it altogether. All <code>&=
lt;a href=3D#the-input-element>input</a></code> elements w=
ith a <code title=3Dattr-input-type><a href=3D#attr-input-type&g=
t;type</a></code> attribute in the <a href=3D"#image-=
button-state-(type=3Dimage)" title=3Dattr-input-type-image>Image
+   Button</a> state are processed as server-side image maps.</d=
d>
+
+   <dt><dfn id=3Dattr-input-usemap title=3Dattr-input-usemap&gt=
;<code>usemap</code></dfn> on <code><a href=3D=
#the-input-element>input</a></code> elements</dt>
+   <dd><p>Use <code><a href=3D#the-img-element>i=
mg</a></code> instead of <code><a href=3D#the-input-=
element>input</a></code> for image maps.</dd>
+
+   <dt><dfn id=3Dattr-iframe-longdesc title=3Dattr-iframe-longd=
esc><code>longdesc</code></dfn> on <code><a=
 href=3D#the-iframe-element>iframe</a></code> elements<=
/dt>
+   <dt><dfn id=3Dattr-img-longdesc title=3Dattr-img-longdesc&gt=
;<code>longdesc</code></dfn> on <code><a href=3D=
#the-img-element>img</a></code> elements</dt>
+   <dd><p>Use a regular <code><a href=3D#the-a-elem=
ent>a</a></code> element to link to the
+   description, or (in the case of images) use an <a href=3D#image-ma=
p>image
+   map</a> to provide a link from the image to the image's
+   description.</dd>
+
+   <dt><dfn id=3Dattr-img-lowsrc title=3Dattr-img-lowsrc>&lt=
;code>lowsrc</code></dfn> on <code><a href=3D#the=
-img-element>img</a></code> elements</dt>
+   <dd><p>Use a progressive JPEG image (given in the <cod=
e title=3Dattr-img-src><a href=3D#attr-img-src>src</a><=
/code> attribute),
+   instead of using two separate images.</dd>
+
+   <dt><dfn id=3Dattr-link-target title=3Dattr-link-target>&=
lt;code>target</code></dfn> on <code><a href=3D#t=
he-link-element>link</a></code> elements</dt>
+   <dd><p>Unnecessary. Omit it altogether.</dd>
+
+   <dt><dfn id=3Dattr-meta-scheme title=3Dattr-meta-scheme>&=
lt;code>scheme</code></dfn> on <code><a href=3D#t=
he-meta-element>meta</a></code> elements</dt>
+   <dd><p>Use only one scheme per field, or make the scheme =
declaration part of the value.</dd>
+
+   <dt><dfn id=3Dattr-object-archive title=3Dattr-object-archiv=
e><code>archive</code></dfn> on <code><a hr=
ef=3D#the-object-element>object</a></code> elements</dt=
>
+   <dt><dfn id=3Dattr-object-classid title=3Dattr-object-classi=
d><code>classid</code></dfn> on <code><a hr=
ef=3D#the-object-element>object</a></code> elements</dt=
>
+   <dt><dfn id=3Dattr-object-code title=3Dattr-object-code>&=
lt;code>code</code></dfn> on <code><a href=3D#the=
-object-element>object</a></code> elements</dt>
+   <dt><dfn id=3Dattr-object-codebase title=3Dattr-object-codeb=
ase><code>codebase</code></dfn> on <code><a=
 href=3D#the-object-element>object</a></code> elements<=
/dt>
+   <dt><dfn id=3Dattr-object-codetype title=3Dattr-object-codet=
ype><code>codetype</code></dfn> on <code><a=
 href=3D#the-object-element>object</a></code> elements<=
/dt>
+   <dd><p>Use the <code title=3Dattr-object-data><a=
 href=3D#attr-object-data>data</a></code> and <code tit=
le=3Dattr-object-type><a href=3D#attr-object-type>type</a>=
</code> attributes to invoke <a href=3D#plugin title=3Dplugin&gt=
;plugins</a>. To set parameters with these names
+   in particular, the <code><a href=3D#the-param-element>par=
am</a></code> element can be used.</dd>
+
+   <dt><dfn id=3Dattr-object-declare title=3Dattr-object-declar=
e><code>declare</code></dfn> on <code><a hr=
ef=3D#the-object-element>object</a></code> elements</dt=
>
+   <dd><p>Repeat the <code><a href=3D#the-object-el=
ement>object</a></code> element completely each time the r=
esource is to be reused.</dd>
+
+   <dt><dfn id=3Dattr-object-standby title=3Dattr-object-standb=
y><code>standby</code></dfn> on <code><a hr=
ef=3D#the-object-element>object</a></code> elements</dt=
>
+   <dd><p>Optimize the linked resource so that it loads quic=
kly or, at least, incrementally.</dd>
+
+   <dt><dfn id=3Dattr-param-type title=3Dattr-param-type>&lt=
;code>type</code></dfn> on <code><a href=3D#the-p=
aram-element>param</a></code> elements</dt>
+   <dt><dfn id=3Dattr-param-valuetype title=3Dattr-param-valuet=
ype><code>valuetype</code></dfn> on <code><=
a href=3D#the-param-element>param</a></code> elements</=
dt>
+   <dd><p>Use the <code title=3Dattr-param-name><a =
href=3D#attr-param-name>name</a></code> and <code title=
=3Dattr-param-value><a href=3D#attr-param-value>value</a>&=
lt;/code> attributes without declaring
+   value types.</dd>
+
+   <dt><dfn id=3Dattr-script-language title=3Dattr-script-langu=
age><code>language</code></dfn> on <code><a=
 href=3D#the-script-element>script</a></code> elements (ex=
cept as noted in the previous section)</dt>
+   <dd><p>Use the <code title=3Dattr-script-type><a=
 href=3D#attr-script-type>type</a></code> attribute
+   instead.</dd>
+
+   <dt><dfn id=3Dattr-script-event title=3Dattr-script-event&gt=
;<code>event</code></dfn> on <code><a href=3D#=
the-script-element>script</a></code> elements</dt>
+   <dt><dfn id=3Dattr-script-for title=3Dattr-script-for>&lt=
;code>for</code></dfn> on <code><a href=3D#the-sc=
ript-element>script</a></code> elements</dt>
+   <dd><p>Use DOM Events mechanisms to register event listen=
ers. <a href=3D#refsDOM>[DOM]</a></dd>
+
+   <dt><dfn id=3Dattr-table-datapagesize title=3Dattr-table-dat=
apagesize><code>datapagesize</code></dfn> on <cod=
e><a href=3D#the-table-element>table</a></code> elem=
ents</dt>
+   <dd><p>Unnecessary. Omit it altogether.</dd>
+
+   <dt><dfn id=3Dattr-table-summary title=3Dattr-table-summary&=
gt;<code>summary</code></dfn> on <code><a href=
=3D#the-table-element>table</a></code> elements</dt>=
<!-- 2.65% pages -->
+   <dd><p>Use one of the <a href=3D#table-descriptions-te=
chniques>techniques for describing
+   tables</a> given in the <code><a href=3D#the-table-ele=
ment>table</a></code> section instead.</dd>
+
+   <dt><dfn id=3Dattr-td-abbr title=3Dattr-td-abbr><code&=
gt;abbr</code></dfn> on <code><a href=3D#the-td-elem=
ent>td</a></code> elements</dt>
+   <dd><p>Use text that begins in an unambiguous and terse m=
anner, and include any more elaborate text after that. The <code title=
=3Dattr-title><a href=3D#attr-title>title</a></code>=
 attribute can also be useful in including more detailed text, so that th=
e cell's contents can be made terse. If it's a heading, use <code>&=
lt;a href=3D#the-th-element>th</a></code> (which has an &l=
t;code title=3Dattr-th-abbr><a href=3D#attr-th-abbr>abbr</a&g=
t;</code> attribute).</p>
+
+   <dt><dfn id=3Dattr-tdth-axis title=3Dattr-tdth-axis><c=
ode>axis</code></dfn> on <code><a href=3D#the-td-=
element>td</a></code> and <code><a href=3D#the-th=
-element>th</a></code> elements</dt>
+   <dd><p>Use the <code title=3Dattr-th-scope><a hr=
ef=3D#attr-th-scope>scope</a></code> attribute on the rele=
vant <code><a href=3D#the-th-element>th</a></code&gt=
;.</p>
+
+   <dt><dfn id=3Dattr-td-scope title=3Dattr-td-scope><cod=
e>scope</code></dfn> on <code><a href=3D#the-td-e=
lement>td</a></code> elements</dt>
+   <dd><p>Use <code><a href=3D#the-th-element>th=
</a></code> elements for heading cells.</p>
+
+   <dt><dfn id=3Dattr-datasrc title=3Dattr-datasrc><code&=
gt;datasrc</code></dfn> on <code><a href=3D#the-a-el=
ement>a</a></code>, <code><a href=3D#the-applet-e=
lement>applet</a></code>, <code><a href=3D#the-bu=
tton-element>button</a></code>, <code><a href=3D#=
the-div-element>div</a></code>, <code><a href=3D#=
frame>frame</a></code>, <code><a href=3D#the-ifra=
me-element>iframe</a></code>, <code><a href=3D#th=
e-img-element>img</a></code>, <code><a href=3D#th=
e-input-element>input</a></code>, <code><a href=3D=
#the-label-element>label</a></code>, <code><a hre=
f=3D#the-legend-element>legend</a></code>, <code>&lt=
;a href=3D#the-marquee-element>marquee</a></code>, <cod=
e><a href=3D#the-object-element>object</a></code>, &=
lt;code><a href=3D#the-option-element>option</a></code&=
gt;, <code><a href=3D#the-select-element>select</a><=
/code>, <code><a href=3D#the-span-element>span</a>&l=
t;/code>, <code><a href=3D#the-table-element>table</a&g=
t;</code>, and <code><a href=3D#the-textarea-element>te=
xtarea</a></code> elements</dt>
+   <dt><dfn id=3Dattr-datafld title=3Dattr-datafld><code&=
gt;datafld</code></dfn> on <code><a href=3D#the-a-el=
ement>a</a></code>, <code><a href=3D#the-applet-e=
lement>applet</a></code>, <code><a href=3D#the-bu=
tton-element>button</a></code>, <code><a href=3D#=
the-div-element>div</a></code>, <code><a href=3D#=
the-fieldset-element>fieldset</a></code>, <code><=
a href=3D#frame>frame</a></code>, <code><a href=3D=
#the-iframe-element>iframe</a></code>, <code><a h=
ref=3D#the-img-element>img</a></code>, <code><a h=
ref=3D#the-input-element>input</a></code>, <code>&lt=
;a href=3D#the-label-element>label</a></code>, <code&gt=
;<a href=3D#the-legend-element>legend</a></code>, <c=
ode><a href=3D#the-marquee-element>marquee</a></code&gt=
;, <code><a href=3D#the-object-element>object</a></c=
ode>, <code><a href=3D#the-param-element>param</a>&l=
t;/code>, <code><a href=3D#the-select-element>select</a=
></code>, <code><a href=3D#the-span-element>span<=
/a></code>, and <code><a href=3D#the-textarea-element&g=
t;textarea</a></code> elements</dt>
+   <dt><dfn id=3Dattr-dataformatas title=3Dattr-dataformatas&gt=
;<code>dataformatas</code></dfn> on <code><a h=
ref=3D#the-button-element>button</a></code>, <code>&=
lt;a href=3D#the-div-element>div</a></code>, <code>&=
lt;a href=3D#the-input-element>input</a></code>, <code&=
gt;<a href=3D#the-label-element>label</a></code>, <c=
ode><a href=3D#the-legend-element>legend</a></code>,=
 <code><a href=3D#the-marquee-element>marquee</a></c=
ode>, <code><a href=3D#the-object-element>object</a>=
</code>, <code><a href=3D#the-option-element>option<=
/a></code>, <code><a href=3D#the-select-element>sele=
ct</a></code>, <code><a href=3D#the-span-element>=
span</a></code>, and <code><a href=3D#the-table-elem=
ent>table</a></code> elements</dt>
+   <dd><p>Use script and a mechanism such as <code>XML=
HttpRequest</code> to populate the page dynamically. <a href=3D#=
refsXHR>[XHR]</a></dd>
+
+   <dt><dfn id=3Dattr-body-alink title=3Dattr-body-alink>&lt=
;code>alink</code></dfn> on <code><a href=3D#the-=
body-element>body</a></code> elements</dt>
+   <dt><dfn id=3Dattr-body-bgcolor title=3Dattr-body-bgcolor&gt=
;<code>bgcolor</code></dfn> on <code><a href=3D=
#the-body-element>body</a></code> elements</dt>
+   <dt><dfn id=3Dattr-body-link title=3Dattr-body-link><c=
ode>link</code></dfn> on <code><a href=3D#the-bod=
y-element>body</a></code> elements</dt>
+   <dt><dfn id=3Dattr-body-marginbottom title=3Dattr-body-margi=
nbottom><code>marginbottom</code></dfn> on <code&=
gt;<a href=3D#the-body-element>body</a></code> elements=
</dt>
+   <dt><dfn id=3Dattr-body-marginheight title=3Dattr-body-margi=
nheight><code>marginheight</code></dfn> on <code&=
gt;<a href=3D#the-body-element>body</a></code> elements=
</dt>
+   <dt><dfn id=3Dattr-body-marginleft title=3Dattr-body-marginl=
eft><code>marginleft</code></dfn> on <code>&lt=
;a href=3D#the-body-element>body</a></code> elements</d=
t>
+   <dt><dfn id=3Dattr-body-marginright title=3Dattr-body-margin=
right><code>marginright</code></dfn> on <code>=
<a href=3D#the-body-element>body</a></code> elements&lt=
;/dt>
+   <dt><dfn id=3Dattr-body-margintop title=3Dattr-body-marginto=
p><code>margintop</code></dfn> on <code><a =
href=3D#the-body-element>body</a></code> elements</dt&g=
t;
+   <dt><dfn id=3Dattr-body-marginwidth title=3Dattr-body-margin=
width><code>marginwidth</code></dfn> on <code>=
<a href=3D#the-body-element>body</a></code> elements&lt=
;/dt>
+   <dt><dfn id=3Dattr-body-text title=3Dattr-body-text><c=
ode>text</code></dfn> on <code><a href=3D#the-bod=
y-element>body</a></code> elements</dt>
+   <dt><dfn id=3Dattr-body-vlink title=3Dattr-body-vlink>&lt=
;code>vlink</code></dfn> on <code><a href=3D#the-=
body-element>body</a></code> elements</dt>
+   <dt><dfn id=3Dattr-br-clear title=3Dattr-br-clear><cod=
e>clear</code></dfn> on <code><a href=3D#the-br-e=
lement>br</a></code> elements</dt>
+   <dt><dfn id=3Dattr-caption-align title=3Dattr-caption-align&=
gt;<code>align</code></dfn> on <code><a href=3D=
#the-caption-element>caption</a></code> elements</dt&gt=
;
+   <dt><dfn id=3Dattr-col-align title=3Dattr-col-align><c=
ode>align</code></dfn> on <code><a href=3D#the-co=
l-element>col</a></code> elements</dt>
+   <dt><dfn id=3Dattr-col-char title=3Dattr-col-char><cod=
e>char</code></dfn> on <code><a href=3D#the-col-e=
lement>col</a></code> elements</dt>
+   <dt><dfn id=3Dattr-col-charoff title=3Dattr-col-charoff>&=
lt;code>charoff</code></dfn> on <code><a href=3D#=
the-col-element>col</a></code> elements</dt>
+   <dt><dfn id=3Dattr-col-valign title=3Dattr-col-valign>&lt=
;code>valign</code></dfn> on <code><a href=3D#the=
-col-element>col</a></code> elements</dt>
+   <dt><dfn id=3Dattr-col-width title=3Dattr-col-width><c=
ode>width</code></dfn> on <code><a href=3D#the-co=
l-element>col</a></code> elements</dt>
+   <dt><dfn id=3Dattr-div-align title=3Dattr-div-align><c=
ode>align</code></dfn> on <code><a href=3D#the-di=
v-element>div</a></code> elements</dt>
+   <dt><dfn id=3Dattr-dl-compact title=3Dattr-dl-compact>&lt=
;code>compact</code></dfn> on <code><a href=3D#th=
e-dl-element>dl</a></code> elements</dt>
+   <dt><dfn id=3Dattr-embed-align title=3Dattr-embed-align>&=
lt;code>align</code></dfn> on <code><a href=3D#th=
e-embed-element>embed</a></code> elements</dt>
+   <dt><dfn id=3Dattr-embed-hspace title=3Dattr-embed-hspace&gt=
;<code>hspace</code></dfn> on <code><a href=3D=
#the-embed-element>embed</a></code> elements</dt>
+   <dt><dfn id=3Dattr-embed-vspace title=3Dattr-embed-vspace&gt=
;<code>vspace</code></dfn> on <code><a href=3D=
#the-embed-element>embed</a></code> elements</dt>
+   <dt><dfn id=3Dattr-hr-align title=3Dattr-hr-align><cod=
e>align</code></dfn> on <code><a href=3D#the-hr-e=
lement>hr</a></code> elements</dt>
+   <dt><dfn id=3Dattr-hr-color title=3Dattr-hr-color><cod=
e>color</code></dfn> on <code><a href=3D#the-hr-e=
lement>hr</a></code> elements</dt>
+   <dt><dfn id=3Dattr-hr-noshade title=3Dattr-hr-noshade>&lt=
;code>noshade</code></dfn> on <code><a href=3D#th=
e-hr-element>hr</a></code> elements</dt>
+   <dt><dfn id=3Dattr-hr-size title=3Dattr-hr-size><code&=
gt;size</code></dfn> on <code><a href=3D#the-hr-elem=
ent>hr</a></code> elements</dt>
+   <dt><dfn id=3Dattr-hr-width title=3Dattr-hr-width><cod=
e>width</code></dfn> on <code><a href=3D#the-hr-e=
lement>hr</a></code> elements</dt>
+   <dt><dfn id=3Dattr-hx-align title=3Dattr-hx-align><cod=
e>align</code></dfn> on <code><a href=3D#the-h1,-=
h2,-h3,-h4,-h5,-and-h6-elements>h1</a></code>—&l=
t;code><a href=3D#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h6<=
/a></code> elements</dt>
+   <dt><dfn id=3Dattr-iframe-align title=3Dattr-iframe-align&gt=
;<code>align</code></dfn> on <code><a href=3D#=
the-iframe-element>iframe</a></code> elements</dt>
+   <dt><dfn id=3Dattr-iframe-allowtransparency title=3Dattr-ifr=
ame-allowtransparency><code>allowtransparency</code></d=
fn> on <code><a href=3D#the-iframe-element>iframe</a&gt=
;</code> elements</dt>
+   <dt><dfn id=3Dattr-iframe-frameborder title=3Dattr-iframe-fr=
ameborder><code>frameborder</code></dfn> on <code=
><a href=3D#the-iframe-element>iframe</a></code> ele=
ments</dt>
+   <dt><dfn id=3Dattr-iframe-hspace title=3Dattr-iframe-hspace&=
gt;<code>hspace</code></dfn> on <code><a href=3D=
#the-iframe-element>iframe</a></code> elements</dt>
+   <dt><dfn id=3Dattr-iframe-marginheight title=3Dattr-iframe-m=
arginheight><code>marginheight</code></dfn> on <c=
ode><a href=3D#the-iframe-element>iframe</a></code> =
elements</dt>
+   <dt><dfn id=3Dattr-iframe-marginwidth title=3Dattr-iframe-ma=
rginwidth><code>marginwidth</code></dfn> on <code=
><a href=3D#the-iframe-element>iframe</a></code> ele=
ments</dt>
+   <dt><dfn id=3Dattr-iframe-scrolling title=3Dattr-iframe-scro=
lling><code>scrolling</code></dfn> on <code>&l=
t;a href=3D#the-iframe-element>iframe</a></code> elements&=
lt;/dt>
+   <dt><dfn id=3Dattr-iframe-vspace title=3Dattr-iframe-vspace&=
gt;<code>vspace</code></dfn> on <code><a href=3D=
#the-iframe-element>iframe</a></code> elements</dt>
+   <dt><dfn id=3Dattr-input-align title=3Dattr-input-align>&=
lt;code>align</code></dfn> on <code><a href=3D#th=
e-input-element>input</a></code> elements</dt>
+   <dt><dfn id=3Dattr-input-hspace title=3Dattr-input-hspace&gt=
;<code>hspace</code></dfn> on <code><a href=3D=
#the-input-element>input</a></code> elements</dt>
+   <dt><dfn id=3Dattr-input-vspace title=3Dattr-input-vspace&gt=
;<code>vspace</code></dfn> on <code><a href=3D=
#the-input-element>input</a></code> elements</dt>
+   <dt><dfn id=3Dattr-img-align title=3Dattr-img-align><c=
ode>align</code></dfn> on <code><a href=3D#the-im=
g-element>img</a></code> elements</dt>
+   <dt><dfn id=3Dattr-img-border title=3Dattr-img-border>&lt=
;code>border</code></dfn> on <code><a href=3D#the=
-img-element>img</a></code> elements (except as noted in t=
he previous section)</dt>
+   <dt><dfn id=3Dattr-img-hspace title=3Dattr-img-hspace>&lt=
;code>hspace</code></dfn> on <code><a href=3D#the=
-img-element>img</a></code> elements</dt>
+   <dt><dfn id=3Dattr-img-vspace title=3Dattr-img-vspace>&lt=
;code>vspace</code></dfn> on <code><a href=3D#the=
-img-element>img</a></code> elements</dt>
+   <dt><dfn id=3Dattr-legend-align title=3Dattr-legend-align&gt=
;<code>align</code></dfn> on <code><a href=3D#=
the-legend-element>legend</a></code> elements</dt>
+   <dt><dfn id=3Dattr-li-type title=3Dattr-li-type><code&=
gt;type</code></dfn> on <code><a href=3D#the-li-elem=
ent>li</a></code> elements</dt>
+   <dt><dfn id=3Dattr-menu-compact title=3Dattr-menu-compact&gt=
;<code>compact</code></dfn> on <code><a href=3D=
#the-menu-element>menu</a></code> elements</dt>
+   <dt><dfn id=3Dattr-object-align title=3Dattr-object-align&gt=
;<code>align</code></dfn> on <code><a href=3D#=
the-object-element>object</a></code> elements</dt>
+   <dt><dfn id=3Dattr-object-border title=3Dattr-object-border&=
gt;<code>border</code></dfn> on <code><a href=3D=
#the-object-element>object</a></code> elements</dt>
+   <dt><dfn id=3Dattr-object-hspace title=3Dattr-object-hspace&=
gt;<code>hspace</code></dfn> on <code><a href=3D=
#the-object-element>object</a></code> elements</dt>
+   <dt><dfn id=3Dattr-object-vspace title=3Dattr-object-vspace&=
gt;<code>vspace</code></dfn> on <code><a href=3D=
#the-object-element>object</a></code> elements</dt>
+   <dt><dfn id=3Dattr-ol-compact title=3Dattr-ol-compact>&lt=
;code>compact</code></dfn> on <code><a href=3D#th=
e-ol-element>ol</a></code> elements</dt>
+   <dt><dfn id=3Dattr-p-align title=3Dattr-p-align><code&=
gt;align</code></dfn> on <code><a href=3D#the-p-elem=
ent>p</a></code> elements</dt>
+   <dt><dfn id=3Dattr-pre-width title=3Dattr-pre-width><c=
ode>width</code></dfn> on <code><a href=3D#the-pr=
e-element>pre</a></code> elements</dt>
+   <dt><dfn id=3Dattr-table-align title=3Dattr-table-align>&=
lt;code>align</code></dfn> on <code><a href=3D#th=
e-table-element>table</a></code> elements</dt>
+   <dt><dfn id=3Dattr-table-bgcolor title=3Dattr-table-bgcolor&=
gt;<code>bgcolor</code></dfn> on <code><a href=
=3D#the-table-element>table</a></code> elements</dt>
+   <dt><dfn id=3Dattr-table-border title=3Dattr-table-border&gt=
;<code>border</code></dfn> on <code><a href=3D=
#the-table-element>table</a></code> elements</dt>
+   <dt><dfn id=3Dattr-table-bordercolor title=3Dattr-table-bord=
ercolor><code>bordercolor</code></dfn> on <code&g=
t;<a href=3D#the-table-element>table</a></code> element=
s</dt>
+   <dt><dfn id=3Dattr-table-cellpadding title=3Dattr-table-cell=
padding><code>cellpadding</code></dfn> on <code&g=
t;<a href=3D#the-table-element>table</a></code> element=
s</dt>
+   <dt><dfn id=3Dattr-table-cellspacing title=3Dattr-table-cell=
spacing><code>cellspacing</code></dfn> on <code&g=
t;<a href=3D#the-table-element>table</a></code> element=
s</dt>
+   <dt><dfn id=3Dattr-table-frame title=3Dattr-table-frame>&=
lt;code>frame</code></dfn> on <code><a href=3D#th=
e-table-element>table</a></code> elements</dt>
+   <dt><dfn id=3Dattr-table-rules title=3Dattr-table-rules>&=
lt;code>rules</code></dfn> on <code><a href=3D#th=
e-table-element>table</a></code> elements</dt>
+   <dt><dfn id=3Dattr-table-width title=3Dattr-table-width>&=
lt;code>width</code></dfn> on <code><a href=3D#th=
e-table-element>table</a></code> elements</dt>
+   <dt><dfn id=3Dattr-tbody-align title=3Dattr-tbody-align>&=
lt;code>align</code></dfn> on <code><a href=3D#th=
e-tbody-element>tbody</a></code>, <code><a href=3D=
#the-thead-element>thead</a></code>, and <code><a=
 href=3D#the-tfoot-element>tfoot</a></code> elements</d=
t>
+   <dt><dfn id=3Dattr-tbody-char title=3Dattr-tbody-char>&lt=
;code>char</code></dfn> on <code><a href=3D#the-t=
body-element>tbody</a></code>, <code><a href=3D#t=
he-thead-element>thead</a></code>, and <code><a h=
ref=3D#the-tfoot-element>tfoot</a></code> elements</dt&=
gt;
+   <dt><dfn id=3Dattr-tbody-charoff title=3Dattr-tbody-charoff&=
gt;<code>charoff</code></dfn> on <code><a href=
=3D#the-tbody-element>tbody</a></code>, <code><a =
href=3D#the-thead-element>thead</a></code>, and <code&g=
t;<a href=3D#the-tfoot-element>tfoot</a></code> element=
s</dt>
+   <dt><dfn id=3Dattr-tbody-valign title=3Dattr-tbody-vAlign&gt=
;<code>valign</code></dfn> on <code><a href=3D=
#the-tbody-element>tbody</a></code>, <code><a hre=
f=3D#the-thead-element>thead</a></code>, and <code>&=
lt;a href=3D#the-tfoot-element>tfoot</a></code> elements&l=
t;/dt>
+   <dt><dfn id=3Dattr-tdth-align title=3Dattr-tdth-align>&lt=
;code>align</code></dfn> on <code><a href=3D#the-=
td-element>td</a></code> and <code><a href=3D#the=
-th-element>th</a></code> elements</dt>
+   <dt><dfn id=3Dattr-tdth-bgcolor title=3Dattr-tdth-bgcolor&gt=
;<code>bgcolor</code></dfn> on <code><a href=3D=
#the-td-element>td</a></code> and <code><a href=3D=
#the-th-element>th</a></code> elements</dt>
+   <dt><dfn id=3Dattr-tdth-char title=3Dattr-tdth-char><c=
ode>char</code></dfn> on <code><a href=3D#the-td-=
element>td</a></code> and <code><a href=3D#the-th=
-element>th</a></code> elements</dt>
+   <dt><dfn id=3Dattr-tdth-charoff title=3Dattr-tdth-charoff&gt=
;<code>charoff</code></dfn> on <code><a href=3D=
#the-td-element>td</a></code> and <code><a href=3D=
#the-th-element>th</a></code> elements</dt>
+   <dt><dfn id=3Dattr-tdth-height title=3Dattr-tdth-height>&=
lt;code>height</code></dfn> on <code><a href=3D#t=
he-td-element>td</a></code> and <code><a href=3D#=
the-th-element>th</a></code> elements</dt>
+   <dt><dfn id=3Dattr-tdth-nowrap title=3Dattr-tdth-nowrap>&=
lt;code>nowrap</code></dfn> on <code><a href=3D#t=
he-td-element>td</a></code> and <code><a href=3D#=
the-th-element>th</a></code> elements</dt>
+   <dt><dfn id=3Dattr-tdth-valign title=3Dattr-tdth-valign>&=
lt;code>valign</code></dfn> on <code><a href=3D#t=
he-td-element>td</a></code> and <code><a href=3D#=
the-th-element>th</a></code> elements</dt>
+   <dt><dfn id=3Dattr-tdth-width title=3Dattr-tdth-width>&lt=
;code>width</code></dfn> on <code><a href=3D#the-=
td-element>td</a></code> and <code><a href=3D#the=
-th-element>th</a></code> elements</dt>
+   <dt><dfn id=3Dattr-tr-align title=3Dattr-tr-align><cod=
e>align</code></dfn> on <code><a href=3D#the-tr-e=
lement>tr</a></code> elements</dt>
+   <dt><dfn id=3Dattr-tr-bgcolor title=3Dattr-tr-bgcolor>&lt=
;code>bgcolor</code></dfn> on <code><a href=3D#th=
e-tr-element>tr</a></code> elements</dt>
+   <dt><dfn id=3Dattr-tr-char title=3Dattr-tr-char><code&=
gt;char</code></dfn> on <code><a href=3D#the-tr-elem=
ent>tr</a></code> elements</dt>
+   <dt><dfn id=3Dattr-tr-charoff title=3Dattr-tr-charoff>&lt=
;code>charoff</code></dfn> on <code><a href=3D#th=
e-tr-element>tr</a></code> elements</dt>
+   <dt><dfn id=3Dattr-tr-valign title=3Dattr-tr-valign><c=
ode>valign</code></dfn> on <code><a href=3D#the-t=
r-element>tr</a></code> elements</dt>
+   <dt><dfn id=3Dattr-ul-compact title=3Dattr-ul-compact>&lt=
;code>compact</code></dfn> on <code><a href=3D#th=
e-ul-element>ul</a></code> elements</dt>
+   <dt><dfn id=3Dattr-ul-type title=3Dattr-ul-type><code&=
gt;type</code></dfn> on <code><a href=3D#the-ul-elem=
ent>ul</a></code> elements</dt>
+   <dt><dfn id=3Dattr-background title=3Dattr-background>&lt=
;code>background</code></dfn> on <code><a href=3D=
#the-body-element>body</a></code>, <code><a href=3D=
#the-table-element>table</a></code>, <code><a hre=
f=3D#the-thead-element>thead</a></code>, <code><a=
 href=3D#the-tbody-element>tbody</a></code>, <code>&=
lt;a href=3D#the-tfoot-element>tfoot</a></code>, <code&=
gt;<a href=3D#the-tr-element>tr</a></code>, <code&gt=
;<a href=3D#the-td-element>td</a></code>, and <code&=
gt;<a href=3D#the-th-element>th</a></code> elements<=
/dt>
+   <dd><p>Use CSS instead.</dd>
+
+  </dl><div class=3Dimpl>
+
+  <h3 id=3Drequirements-for-implementations><span class=3Dsecno=
>15.3 </span>Requirements for implementations</h3>
+
+  <h4 id=3Dthe-applet-element><span class=3Dsecno>15.3.1 &lt=
;/span>The <dfn><code>applet</code></dfn> elem=
ent</h4>
+
+  <p>The <code><a href=3D#the-applet-element>applet&lt=
;/a></code> element is a Java-specific variant of the <code&g=
t;<a href=3D#the-embed-element>embed</a></code> element=
.
+  The <code><a href=3D#the-applet-element>applet</a>&l=
t;/code> element is now obsoleted so that all extension frameworks (Ja=
va, .NET,
+  Flash, etc) are handled in a consistent manner.</p>
+
+  <p>When the element matches any of the following conditions, it =
<a href=3D#represents>represents</a> its
+  contents:</p>
+
+  <ul class=3Dbrief><li>The element is still in the <a hr=
ef=3D#stack-of-open-elements>stack of open elements</a> of an &l=
t;a href=3D#html-parser>HTML
+   parser</a> or <a href=3D#xml-parser>XML parser</a>.=
</li>
+
+   <li>The element is not <a href=3D#in-a-document>in a <=
code>Document</code></a>.</li>
+
+   <li>The element's <code><a href=3D#document>Documen=
t</a></code> is not <a href=3D#fully-active>fully activ=
e</a>.</li>
+
+   <li id=3DsandboxPluginApplet>The element's <code><a hr=
ef=3D#document>Document</a></code>'s <a href=3D#active-=
sandboxing-flag-set>active sandboxing flag
+   set</a> has its <a href=3D#sandboxed-plugins-browsing-contex=
t-flag>sandboxed plugins browsing context flag</a> set.</li&g=
t;
+
+   <li>The element has an ancestor <a href=3D#media-element>=
media element</a>.</li>
+
+   <li>The element has an ancestor <code><a href=3D#the-o=
bject-element>object</a></code> element that is <em>=
not</em> showing its
+   <a href=3D#fallback-content>fallback content</a>.</li&=
gt;
+
+   <li>No Java Language runtime <a href=3D#plugin>plugin<=
/a> is available.</li>
+
+   <li>A Java runtime <a href=3D#plugin>plugin</a> is =
available but it is disabled.</li>
+
+  </ul><!-- we assume here that the Java plugin can't be <sp=
an
+  title=3D"concept-plugin-secure">secured</span>; if =
anyone does end up securing one we can always
+  change this --><p>Otherwise, the user agent should instantiat=
e a Java Language runtime <a href=3D#plugin>plugin</a>, 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 or=
dered in source order, and
+  then a parameter named "PARAM" whose value is null, and then=
 all the names and values of <a href=3D#concept-param-parameter title=3D=
concept-param-parameter>parameters</a> given by <code><=
a href=3D#the-param-element>param</a></code> elements that=
 are
+  children of the <code><a href=3D#the-applet-element>applet=
</a></code> element, in <a href=3D#tree-order>tree orde=
r</a>, to the
+  <a href=3D#plugin>plugin</a> used. If the <a href=3D#pl=
ugin>plugin</a> supports a scriptable interface, the
+  <code><a href=3D#htmlappletelement>HTMLAppletElement</a=
></code> object representing the element should expose that inte=
rface. The
+  <code><a href=3D#the-applet-element>applet</a></c=
ode> element <a href=3D#represents>represents</a> the <=
a href=3D#plugin>plugin</a>.</p>
+
+  <!-- If we ever make this fetch anything manually, remember to dela=
y the load event, and to
+  include ", from the element's <span>browsing context scope =
origin</span> if it has one" when
+  fetching -->
+
+  <p class=3Dnote>The <code><a href=3D#the-applet-element=
>applet</a></code> element is unaffected by the CSS 'displ=
ay' property. The
+  Java Language runtime is instantiated even if the element is hidden wi=
th a 'display:none' CSS
+  style.</p>
+
+  <p>The <code><a href=3D#the-applet-element>applet&lt=
;/a></code> element must implement the <code><a href=3D=
#htmlappletelement>HTMLAppletElement</a></code>
+  interface.</p>
+
+  <pre class=3Didl>interface <dfn id=3Dhtmlappletelement>HTM=
LAppletElement</dfn> : <a href=3D#htmlelement>HTMLElement<=
/a> {
+           attribute DOMString <a href=3D#dom-applet-align title=3Ddo=
m-applet-align>align</a>;
+           attribute DOMString <a href=3D#dom-applet-alt title=3Ddom-=
applet-alt>alt</a>;
+           attribute DOMString <a href=3D#dom-applet-archive title=3D=
dom-applet-archive>archive</a>;
+           attribute DOMString <a href=3D#dom-applet-code title=3Ddom=
-applet-code>code</a>;
+           attribute DOMString <a href=3D#dom-applet-codebase title=3D=
dom-applet-codeBase>codeBase</a>;
+           attribute DOMString <a href=3D#dom-applet-height title=3Dd=
om-applet-height>height</a>;
+           attribute unsigned long <a href=3D#dom-applet-hspace title=
=3Ddom-applet-hspace>hspace</a>;
+           attribute DOMString <a href=3D#dom-applet-name title=3Ddom=
-applet-name>name</a>;
+           attribute DOMString _<a href=3D#dom-applet-object title=3D=
dom-applet-object>object</a>; // the underscore is not part of t=
he identifier <!-- it's a Web IDL escaping mechanism -->
+           attribute unsigned long <a href=3D#dom-applet-vspace title=
=3Ddom-applet-vspace>vspace</a>;
+           attribute DOMString <a href=3D#dom-applet-width title=3Ddo=
m-applet-width>width</a>;
+};</pre>
+
+  <p>The <dfn id=3Ddom-applet-align title=3Ddom-applet-align&gt=
;<code>align</code></dfn>, <dfn id=3Ddom-applet-alt =
title=3Ddom-applet-alt><code>alt</code></dfn>, <d=
fn id=3Ddom-applet-archive title=3Ddom-applet-archive><code>arch=
ive</code></dfn>, <dfn id=3Ddom-applet-code title=3Ddom-ap=
plet-code><code>code</code></dfn>, <dfn id=3Ddom-=
applet-height title=3Ddom-applet-height><code>height</code&gt=
;</dfn>, <dfn id=3Ddom-applet-hspace title=3Ddom-applet-hspace&g=
t;<code>hspace</code></dfn>, <dfn id=3Ddom-applet-na=
me title=3Ddom-applet-name><code>name</code></dfn>, =
<dfn id=3Ddom-applet-object title=3Ddom-applet-object><code>o=
bject</code></dfn>, <dfn id=3Ddom-applet-vspace title=3Ddo=
m-applet-vspace><code>vspace</code></dfn>, and <d=
fn id=3Ddom-applet-width title=3Ddom-applet-width><code>width&lt=
;/code></dfn> IDL attributes must <a href=3D#reflect>refle=
ct</a> the
+  respective content attributes of the same name. For the purposes of re=
flection, the
+  <code><a href=3D#the-applet-element>applet</a></c=
ode> element's <code title=3Dattr-applet-object>object</code&=
gt; content attribute is
+  defined as containing a <a href=3D#url>URL</a>.</p>
+
+  <p>The <dfn id=3Ddom-applet-codebase title=3Ddom-applet-codeB=
ase><code>codeBase</code></dfn> IDL attribute must
+  <a href=3D#reflect>reflect</a> the <code title=3Dattr-a=
pplet-codebase>codebase</code> content attribute,
+  which for the purposes of reflection is defined as containing a <a =
href=3D#url>URL</a>.</p>
+
+
+  <h4 id=3Dthe-marquee-element><span class=3Dsecno>15.3.2 &l=
t;/span>The <dfn><code>marquee</code></dfn> el=
ement</h4>
+
+  <p>The <code><a href=3D#the-marquee-element>marquee&=
lt;/a></code> element is a presentational element that animates =
content. CSS
+  transitions and animations are a more appropriate mechanism. <a hre=
f=3D#refsCSSANIMATIONS>[CSSANIMATIONS]</a> <a href=3D#refsCSS=
TRANSITIONS>[CSSTRANSITIONS]</a></p>
+
+  <p>The <a href=3D#task-source>task source</a> for ta=
sks mentioned in this section is the <a href=3D#dom-manipulation-task-=
source>DOM manipulation
+  task source</a>.</p>
+
+  <p>The <code><a href=3D#the-marquee-element>marquee&=
lt;/a></code> element must implement the <code><a href=3D=
#htmlmarqueeelement>HTMLMarqueeElement</a></code>
+  interface.</p>
+
+  <pre class=3Didl>interface <dfn id=3Dhtmlmarqueeelement>HT=
MLMarqueeElement</dfn> : <a href=3D#htmlelement>HTMLElement&l=
t;/a> {
+           attribute DOMString <a href=3D#dom-marquee-behavior title=3D=
dom-marquee-behavior>behavior</a>;
+           attribute DOMString <a href=3D#dom-marquee-bgcolor title=3D=
dom-marquee-bgColor>bgColor</a>;
+           attribute DOMString <a href=3D#dom-marquee-direction title=
=3Ddom-marquee-direction>direction</a>;
+           attribute DOMString <a href=3D#dom-marquee-height title=3D=
dom-marquee-height>height</a>;
+           attribute unsigned long <a href=3D#dom-marquee-hspace titl=
e=3Ddom-marquee-hspace>hspace</a>;
+           attribute long <a href=3D#dom-marquee-loop title=3Ddom-mar=
quee-loop>loop</a>;
+           attribute unsigned long <a href=3D#dom-marquee-scrollamoun=
t title=3Ddom-marquee-scrollamount>scrollAmount</a>;
+           attribute unsigned long <a href=3D#dom-marquee-scrolldelay=
 title=3Ddom-marquee-scrollDelay>scrollDelay</a>;
+           attribute boolean <a href=3D#dom-marquee-truespeed title=3D=
dom-marquee-trueSpeed>trueSpeed</a>;
+           attribute unsigned long <a href=3D#dom-marquee-vspace titl=
e=3Ddom-marquee-vspace>vspace</a>;
+           attribute DOMString <a href=3D#dom-marquee-width title=3Dd=
om-marquee-width>width</a>;
+
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-marquee-onbounce title=3Dhandler-marquee-onbounce=
>onbounce</a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-marquee-onfinish title=3Dhandler-marquee-onfinish=
>onfinish</a>;
+           attribute <a href=3D#eventhandler>EventHandler</a&gt=
; <a href=3D#handler-marquee-onstart title=3Dhandler-marquee-onstart&g=
t;onstart</a>;
+
+  void <a href=3D#dom-marquee-start title=3Ddom-marquee-start>star=
t</a>();
+  void <a href=3D#dom-marquee-stop title=3Ddom-marquee-stop>stop&l=
t;/a>();
+};</pre>
+
+  <p>A <code><a href=3D#the-marquee-element>marquee&lt=
;/a></code> element can be <dfn id=3Dconcept-marquee-on title=
=3Dconcept-marquee-on>turned on</dfn> or <dfn id=3Dconcept-ma=
rquee-off title=3Dconcept-marquee-off>turned off</dfn>. When it =
is created, it is <a href=3D#concept-marquee-on title=3Dconcept-marque=
e-on>turned on</a>.</p>
+
+  <p>When the <dfn id=3Ddom-marquee-start title=3Ddom-marquee-s=
tart><code>start()</code></dfn> method is called, th=
e
+  <code><a href=3D#the-marquee-element>marquee</a><=
/code> element must be <a href=3D#concept-marquee-on title=3Dconcep=
t-marquee-on>turned on</a>.</p>
+
+  <p>When the <dfn id=3Ddom-marquee-stop title=3Ddom-marquee-st=
op><code>stop()</code></dfn> method is called, the
+  <code><a href=3D#the-marquee-element>marquee</a><=
/code> element must be <a href=3D#concept-marquee-off title=3Dconce=
pt-marquee-off>turned off</a>.</p>
+
+  <p>When a <code><a href=3D#the-marquee-element>marqu=
ee</a></code> element is created, the user agent must <a h=
ref=3D#queue-a-task>queue a task</a>
+  to <a href=3D#fire-a-simple-event>fire a simple event</a> =
named <code title=3Devent-start>start</code> at the
+  element.</p>
+
+  <hr><p>The <dfn id=3Dattr-marquee-behavior title=3Dattr=
-marquee-behavior><code>behavior</code></dfn> conten=
t attribute on
+  <code><a href=3D#the-marquee-element>marquee</a><=
/code> elements is an <a href=3D#enumerated-attribute>enumerated=
 attribute</a> with the following keywords
+  (all non-conforming):</p>
+
+  <table><thead><tr><th>Keyword
+     <th>State
+   <tbody><tr><td><code title=3D"">scr=
oll</code>
+     <td><dfn id=3Dattr-marquee-behavior-scroll title=3Dattr-ma=
rquee-behavior-scroll>scroll</dfn>
+    <tr><td><code title=3D"">slide</code&=
gt;
+     <td><dfn id=3Dattr-marquee-behavior-slide title=3Dattr-mar=
quee-behavior-slide>slide</dfn>
+    <tr><td><code title=3D"">alternate</c=
ode>
+     <td><dfn id=3Dattr-marquee-behavior-alternate title=3Dattr=
-marquee-behavior-alternate>alternate</dfn>
+  </table><p>The <i>missing value default</i> is=
 the <a href=3D#attr-marquee-behavior-scroll title=3Dattr-marquee-beha=
vior-scroll>scroll</a> state.</p>
+
+  <hr><p>The <dfn id=3Dattr-marquee-direction title=3Datt=
r-marquee-direction><code>direction</code></dfn> con=
tent attribute on
+  <code><a href=3D#the-marquee-element>marquee</a><=
/code> elements is an <a href=3D#enumerated-attribute>enumerated=
 attribute</a> with the following keywords
+  (all non-conforming):</p>
+
+  <table><thead><tr><th>Keyword
+     <th>State
+   <tbody><tr><td><code title=3D"">lef=
t</code>
+     <td><dfn id=3Dattr-marquee-direction-left title=3Dattr-mar=
quee-direction-left>left</dfn>
+    <tr><td><code title=3D"">right</code&=
gt;
+     <td><dfn id=3Dattr-marquee-direction-right title=3Dattr-ma=
rquee-direction-right>right</dfn>
+    <tr><td><code title=3D"">up</code>
+     <td><dfn id=3Dattr-marquee-direction-up title=3Dattr-marqu=
ee-direction-up>up</dfn>
+    <tr><td><code title=3D"">down</code&g=
t;
+     <td><dfn id=3Dattr-marquee-direction-down title=3Dattr-mar=
quee-direction-down>down</dfn>
+  </table><p>The <i>missing value default</i> is=
 the <a href=3D#attr-marquee-direction-left title=3Dattr-marquee-direc=
tion-left>left</a>
+  state.</p>
+
+  <hr><p>The <dfn id=3Dattr-marquee-truespeed title=3Datt=
r-marquee-truespeed><code>truespeed</code></dfn> con=
tent attribute on
+  <code><a href=3D#the-marquee-element>marquee</a><=
/code> elements is a <a href=3D#boolean-attribute>boolean attrib=
ute</a>.</p>
+
+  <hr><p>A <code><a href=3D#the-marquee-element>=
marquee</a></code> element has a <dfn id=3Dmarquee-scroll-=
interval>marquee scroll interval</dfn>, which is obtained as
+  follows:</p>
+
+  <ol><li><p>If the element has a <code title=3Datt=
r-marquee-scrolldelay>scrolldelay</code> attribute,
+   and parsing its value using the <a href=3D#rules-for-parsing-non-n=
egative-integers>rules for parsing non-negative integers</a> doe=
s not
+   return an error, then let <var title=3D"">delay</v=
ar> be the parsed value. Otherwise, let <var title=3D""&g=
t;delay</var> be 85.</li>
+
+   <li><p>If the element does not have a <code title=3Dat=
tr-marquee-truespeed><a href=3D#attr-marquee-truespeed>truespeed=
</a></code>
+   attribute, and the <var title=3D"">delay</var> =
value is less than 60, then let <var title=3D"">delay<=
/var> be 60 instead.</li>
+
+   <li><p>The <a href=3D#marquee-scroll-interval>marqu=
ee scroll interval</a> is <var title=3D"">delay<=
/var>, interpreted in
+   milliseconds.</li>
+
+  </ol><hr><p>A <code><a href=3D#the-marquee-=
element>marquee</a></code> element has a <dfn id=3Dmarq=
uee-scroll-distance>marquee scroll distance</dfn>, which, if the=
 element
+  has a <code title=3Dattr-marquee-scrollamount>scrollamount</c=
ode> attribute, and parsing its value
+  using the <a href=3D#rules-for-parsing-non-negative-integers>rul=
es for parsing non-negative integers</a> does not return an error, =
is the
+  parsed value interpreted in CSS pixels, and otherwise is 6 CSS pixels.=
</p>
+
+  <hr><p>A <code><a href=3D#the-marquee-element>=
marquee</a></code> element has a <dfn id=3Dmarquee-loop-co=
unt>marquee loop count</dfn>, which, if the element has a
+  <code title=3Dattr-marquee-loop>loop</code> attribute, and=
 parsing its value using the <a href=3D#rules-for-parsing-integers>=
rules
+  for parsing integers</a> does not return an error or a number le=
ss than 1, is the parsed value,
+  and otherwise is −1.</p>
+
+  <p>The <dfn id=3Ddom-marquee-loop title=3Ddom-marquee-loop&gt=
;<code>loop</code></dfn> IDL attribute, on getting, mus=
t
+  return the element's <a href=3D#marquee-loop-count>marquee loop =
count</a>; and on setting, if the new value is
+  different than the element's <a href=3D#marquee-loop-count>marqu=
ee loop count</a> and either greater than zero or equal
+  to −1, must set the element's <code title=3Dattr-marquee-=
loop>loop</code> content attribute
+  (adding it if necessary) to the <a href=3D#valid-integer>valid i=
nteger</a> that represents the new value. (Other
+  values are ignored.)</p>
+
+  <p>A <code><a href=3D#the-marquee-element>marquee&lt=
;/a></code> element also has a <dfn id=3Dmarquee-current-loop=
-index>marquee current loop index</dfn>, which is zero
+  when the element is created.</p>
+
+  <p>The rendering layer will occasionally <dfn id=3Dincrement-=
the-marquee-current-loop-index>increment the marquee current loop inde=
x</dfn>,
+  which must cause the following steps to be run:</p>
+
+  <ol><li><p>If the <a href=3D#marquee-loop-count&g=
t;marquee loop count</a> is −1, then abort these steps.&l=
t;/p>
+
+   <li><p>Increment the <a href=3D#marquee-current-loop-i=
ndex>marquee current loop index</a> by one.</li>
+
+   <li>
+
+    <p>If the <a href=3D#marquee-current-loop-index>marquee =
current loop index</a> is now equal to or greater than the element'=
s
+    <a href=3D#marquee-loop-count>marquee loop count</a>, &l=
t;a href=3D#concept-marquee-off title=3Dconcept-marquee-off>turn off&l=
t;/a> the
+    <code><a href=3D#the-marquee-element>marquee</a>&l=
t;/code> element and <a href=3D#queue-a-task>queue a task</a&=
gt; to <a href=3D#fire-a-simple-event>fire a simple event</a>
+    named <code title=3Devent-finish>finish</code> at the &l=
t;code><a href=3D#the-marquee-element>marquee</a></code=
> element.</p>
+
+    <p>Otherwise, if the <code title=3Dattr-marquee-behavior&gt=
;<a href=3D#attr-marquee-behavior>behavior</a></code> a=
ttribute is in the
+    <a href=3D#attr-marquee-behavior-alternate title=3Dattr-marquee-b=
ehavior-alternate>alternate</a> state, then <a href=3D#queue-=
a-task>queue a
+    task</a> to <a href=3D#fire-a-simple-event>fire a simple=
 event</a> named <code title=3Devent-bounce>bounce</code&g=
t;
+    at the <code><a href=3D#the-marquee-element>marquee</=
a></code> element.</p>
+
+    <p>Otherwise, <a href=3D#queue-a-task>queue a task</a=
> to <a href=3D#fire-a-simple-event>fire a simple event</a&gt=
; named <code title=3Devent-start>start</code> at the <cod=
e><a href=3D#the-marquee-element>marquee</a></code> =
element.</p>
+
+   </li>
+
+  </ol><hr><p>The following are the <a href=3D#even=
t-handlers>event handlers</a> (and their corresponding <a hre=
f=3D#event-handler-event-type title=3D"event
+  handler event type">event handler event types</a>) that =
must be supported, as <a href=3D#event-handler-content-attributes>e=
vent handler content attributes</a> and <a href=3D#event-handler=
-idl-attributes>event handler IDL
+  attributes</a>, by <code><a href=3D#the-marquee-element=
>marquee</a></code> elements:</p>
+
+  <table><thead><tr><th><a href=3D#event-hand=
lers title=3D"event handlers">Event handler</a> <th=
><a href=3D#event-handler-event-type>Event handler event type&lt=
;/a>
+   <tbody><tr><td><dfn id=3Dhandler-marquee-onbounc=
e title=3Dhandler-marquee-onbounce><code>onbounce</code>&l=
t;/dfn> <td> <code title=3Devent-bounce>bounce</code&gt=
;
+    <tr><td><dfn id=3Dhandler-marquee-onfinish title=3Dha=
ndler-marquee-onfinish><code>onfinish</code></dfn> &=
lt;td> <code title=3Devent-finish>finish</code>
+    <tr><td><dfn id=3Dhandler-marquee-onstart title=3Dhan=
dler-marquee-onstart><code>onstart</code></dfn> <=
td> <code title=3Devent-start>start</code>
+  </table><hr><p>The <dfn id=3Ddom-marquee-behavior=
 title=3Ddom-marquee-behavior><code>behavior</code></df=
n>, <dfn id=3Ddom-marquee-direction title=3Ddom-marquee-direction&g=
t;<code>direction</code></dfn>, <dfn id=3Ddom-marque=
e-height title=3Ddom-marquee-height><code>height</code>&lt=
;/dfn>, <dfn id=3Ddom-marquee-hspace title=3Ddom-marquee-hspace>=
<code>hspace</code></dfn>, <dfn id=3Ddom-marquee-vsp=
ace title=3Ddom-marquee-vspace><code>vspace</code></dfn=
>, and <dfn id=3Ddom-marquee-width title=3Ddom-marquee-width>&lt=
;code>width</code></dfn> IDL attributes must <a href=3D=
#reflect>reflect</a> the
+  respective content attributes of the same name.</p>
+
+  <p>The <dfn id=3Ddom-marquee-bgcolor title=3Ddom-marquee-bgCo=
lor><code>bgColor</code></dfn> IDL attribute must
+  <a href=3D#reflect>reflect</a> the <code title=3Dattr-m=
arquee-bgcolor>bgcolor</code> content attribute.</p>
+
+  <p>The <dfn id=3Ddom-marquee-scrollamount title=3Ddom-marquee=
-scrollAmount><code>scrollAmount</code></dfn> IDL at=
tribute must
+  <a href=3D#reflect>reflect</a> the <code title=3Dattr-m=
arquee-scrollamount>scrollamount</code> content
+  attribute. The default value is 6.</p>
+
+  <p>The <dfn id=3Ddom-marquee-scrolldelay title=3Ddom-marquee-=
scrollDelay><code>scrollDelay</code></dfn> IDL attri=
bute must
+  <a href=3D#reflect>reflect</a> the <code title=3Dattr-m=
arquee-scrolldelay>scrolldelay</code> content
+  attribute. The default value is 85.</p>
+
+  <p>The <dfn id=3Ddom-marquee-truespeed title=3Ddom-marquee-tr=
ueSpeed><code>trueSpeed</code></dfn> IDL attribute m=
ust
+  <a href=3D#reflect>reflect</a> the <code title=3Dattr-m=
arquee-truespeed><a href=3D#attr-marquee-truespeed>truespeed<=
/a></code> content
+  attribute.</p>
+
+
+  <h4 id=3Dframes><span class=3Dsecno>15.3.3 </span>Fr=
ames</h4>
+
+  <p>The <dfn id=3Dframeset><code>frameset</code&gt=
;</dfn> element acts as <a href=3D#the-body-element-0>the bod=
y element</a> in documents
+  that use frames.</p>
+
+  <p>The <code><a href=3D#frameset>frameset</a>&=
lt;/code> element must implement the <code><a href=3D#htmlfra=
mesetelement>HTMLFrameSetElement</a></code>
+  interface.</p>
+
+  <pre class=3Didl>interface <dfn id=3Dhtmlframesetelement>H=
TMLFrameSetElement</dfn> : <a href=3D#htmlelement>HTMLElement=
</a> {
+           attribute DOMString <a href=3D#dom-frameset-cols title=3Dd=
om-frameset-cols>cols</a>;
+           attribute DOMString <a href=3D#dom-frameset-rows title=3Dd=
om-frameset-rows>rows</a>;
+};
+<a href=3D#htmlframesetelement>HTMLFrameSetElement</a> imple=
ments <a href=3D#windoweventhandlers>WindowEventHandlers</a>;=
</pre>
+
+  <p>The <dfn id=3Ddom-frameset-cols title=3Ddom-frameset-cols&=
gt;<code>cols</code></dfn> and <dfn id=3Ddom-framese=
t-rows title=3Ddom-frameset-rows><code>rows</code></dfn=
> IDL attributes of the <code><a href=3D#frameset>frameset=
</a></code>
+  element must <a href=3D#reflect>reflect</a> the respective=
 content attributes of the same name.</p>
+
+  <p>The <code><a href=3D#frameset>frameset</a>&=
lt;/code> element exposes as <a href=3D#event-handler-content-attri=
butes>event handler
+  content attributes</a> a number of the <a href=3D#event-handl=
ers>event
+  handlers</a> of the <code><a href=3D#window>Window&l=
t;/a></code> object. It also mirrors
+  their <a href=3D#event-handler-idl-attributes>event handler IDL =
attributes</a>.</p>
+
+  <p>The <code title=3Dhandler-onblur><a href=3D#handler-=
onblur>onblur</a></code>, <code title=3Dhandler-onerror=
><a href=3D#handler-onerror>onerror</a></code>, <=
code title=3Dhandler-onfocus><a href=3D#handler-onfocus>onfocus&=
lt;/a></code>, <code title=3Dhandler-onload><a href=3D#=
handler-onload>onload</a></code>,
+  and <code title=3Dhandler-onscroll><a href=3D#handler-onscrol=
l>onscroll</a></code> <a href=3D#event-handlers>even=
t handlers</a> of the
+  <code><a href=3D#window>Window</a></code> obje=
ct, exposed on the <code><a href=3D#frameset>frameset</a&g=
t;</code> element, replace the generic
+  <a href=3D#event-handlers>event handlers</a> with the same=
 names normally supported by <a href=3D#html-elements>HTML elements=
</a>.</p>
+
+  <hr><p>The <dfn id=3Dframe><code>frame</cod=
e></dfn> element defines a <a href=3D#nested-browsing-context=
>nested browsing context</a>
+  similar to the <code><a href=3D#the-iframe-element>iframe&=
lt;/a></code> element, but rendered within a <code><a h=
ref=3D#frameset>frameset</a></code>
+  element.</p>
+
+  <!-- START of section that's very similar to <iframe> -->
+
+  <p>A <code><a href=3D#frame>frame</a></code=
> element is said to be an <dfn id=3Dactive-frame-element>active=
 <code>frame</code> element</dfn> when
+  it is <a href=3D#in-a-document>in a <code>Document</cod=
e></a> and its parent element, if any, is a
+  <code><a href=3D#frameset>frameset</a></code> =
element.</p>
+
+  <p>When a <code><a href=3D#frame>frame</a><=
/code> element is created as an <a href=3D#active-frame-element>=
active <code>frame</code>
+  element</a>, or becomes an <a href=3D#active-frame-element&gt=
;active <code>frame</code> element</a> after not having=
 been
+  one, the user agent must create a <a href=3D#nested-browsing-contex=
t>nested browsing context</a>, and then <a href=3D#process-th=
e-frame-attributes>process the
+  <code>frame</code> attributes</a> for the first time=
.</p>
+
+  <p>When a <code><a href=3D#frame>frame</a><=
/code> element stops being an <a href=3D#active-frame-element>ac=
tive <code>frame</code>
+  element</a>, the user agent must <a href=3D#a-browsing-contex=
t-is-discarded title=3D"a browsing context is discarded">dis=
card</a>
+  the <a href=3D#nested-browsing-context>nested browsing context&l=
t;/a>.</p>
+
+  <p>Whenever a <code><a href=3D#frame>frame</a>=
</code> element with a <a href=3D#nested-browsing-context>nes=
ted browsing context</a> has its <code title=3Dattr-frame-src&gt=
;src</code> attribute set, changed, or removed, the user agent must
+  <a href=3D#process-the-frame-attributes>process the <code>=
frame</code> attributes</a>.</p> <!-- It doesn't hap=
pen when the base
+  URL is changed, though. -->
+
+  <p>When the user agent is to <dfn id=3Dprocess-the-frame-attr=
ibutes>process the <code>frame</code> attributes</dfn&g=
t;, it must run the
+  first appropriate steps from the following list:</p>
+
+  <dl class=3Dswitch><dt>If the element has no <code titl=
e=3Dattr-frame-src>src</code> attribute specified, and the
+   user agent is processing the <code><a href=3D#frame>frame=
</a></code>'s attributes for the first time</dt>
+
+   <dd>
+
+    <p><a href=3D#queue-a-task>Queue a task</a> to &lt=
;a href=3D#fire-a-simple-event>fire a simple event</a> named &lt=
;code title=3Devent-load>load</code> at the <code><a hr=
ef=3D#frame>frame</a></code> element.</p>
+
+   </dd>
+
+   <dt>Otherwise</dt>
+
+   <dd>
+
+    <ol><li>
+
+      <p>If the value of the <code title=3Dattr-frame-src>sr=
c</code> attribute is the empty string,
+      let <var title=3D"">url</var> be the string =
"<code><a href=3D#about:blank>about:blank</a></=
code>".</p>
+
+      <p>Otherwise, <a href=3D#resolve-a-url title=3D"reso=
lve a url">resolve</a> the value of the <code title=3Dat=
tr-frame-src>src</code> attribute, relative to the <code>&=
lt;a href=3D#frame>frame</a></code> element.</p>
+
+      <p>If that is not successful, then let <var title=3D&quot=
;">url</var> be the string
+      "<code><a href=3D#about:blank>about:blank</a&g=
t;</code>". Otherwise, let <var title=3D"">url=
</var> be the resulting
+      <a href=3D#absolute-url>absolute URL</a>.</p>
+
+     </li>
+
+     <li>
+
+      <p><a href=3D#navigate>Navigate</a><!--DONAV =
frame--> the element's <a href=3D#child-browsing-context>child b=
rowsing context</a>
+      to <var title=3D"">url</var>.</p>
+     =20
+     </li>
+
+    </ol></dd>
+
+  </dl><p>Any <a href=3D#navigate title=3Dnavigate>nav=
igation</a> required of the user agent in the <a href=3D#process=
-the-frame-attributes>process
+  the <code>frame</code> attributes</a> algorithm must=
 be completed as an <a href=3D#explicit-self-navigation-override>ex=
plicit
+  self-navigation override</a> and with the <code><a href=
=3D#frame>frame</a></code> element's document's
+  <a href=3D#browsing-context>browsing context</a> as the &l=
t;a href=3D#source-browsing-context>source browsing context</a>.=
</p>
+
+  <p>Furthermore, if the <a href=3D#active-document>active d=
ocument</a> of the element's <a href=3D#child-browsing-context&g=
t;child browsing
+  context</a> before such a <a href=3D#navigate title=3Dnavigat=
e>navigation</a> was not <a href=3D#completely-loaded>comp=
letely
+  loaded</a> at the time of the new <a href=3D#navigate title=3D=
navigate>navigation</a>, then the <a href=3D#navigate title=3D=
navigate>navigation</a> must be completed with <a href=3D#rep=
lacement-enabled>replacement enabled</a>.</p>
+
+  <p>Similarly, if the <a href=3D#child-browsing-context>chi=
ld browsing context</a>'s <a href=3D#session-history>session =
history</a> contained
+  only one <code><a href=3D#document>Document</a></=
code> when the <a href=3D#process-the-frame-attributes>process t=
he <code>frame</code> attributes</a>
+  algorithm was invoked, and that was the <code><a href=3D#abou=
t:blank>about:blank</a></code> <code><a href=3D#d=
ocument>Document</a></code> created
+  when the <a href=3D#child-browsing-context>child browsing contex=
t</a> was created, then any <a href=3D#navigate title=3Dnavigate=
>navigation</a> required of the user agent in that algorithm mus=
t be completed
+  with <a href=3D#replacement-enabled>replacement enabled</a&gt=
;.</p> <!-- see also the note near similar text for the
+  location.assign() method -->
+
+  <!-- next few paragraphs are also from <iframe> but less deta=
iled -->
+
+  <p>When a <code><a href=3D#document>Document</a&g=
t;</code> in a <code><a href=3D#frame>frame</a>&l=
t;/code> is marked as <a href=3D#completely-loaded>completely
+  loaded</a>, the user agent must <a href=3D#queue-a-task>qu=
eue a task</a> to <a href=3D#fire-a-simple-event>fire a simpl=
e event</a>
+  named <code title=3Devent-load>load</code> at the <code=
><a href=3D#frame>frame</a></code> element.</p&gt=
;
+
+  <p>The <a href=3D#task-source>task source</a> for th=
e <a href=3D#concept-task title=3Dconcept-task>tasks</a> abov=
e is the
+  <a href=3D#dom-manipulation-task-source>DOM manipulation task so=
urce</a>.</p>
+
+  <p>When there is an <a href=3D#active-parser>active parser=
</a> in the <code><a href=3D#frame>frame</a></=
code>, and when anything in the
+  <code><a href=3D#frame>frame</a></code> is &lt=
;a href=3D#delay-the-load-event title=3D"delay the load event"&=
gt;delaying the load event</a> of the
+  <code><a href=3D#frame>frame</a></code>'s <=
a href=3D#browsing-context>browsing context</a>'s <a href=3D#=
active-document>active document</a>, the
+  <code><a href=3D#frame>frame</a></code> must &=
lt;a href=3D#delay-the-load-event>delay the load event</a> of it=
s document.</p>
+
+  <!-- END of section that's very similar to <iframe> -->
+
+  <p>When the browsing context is created, if a <code title=3Da=
ttr-frame-name>name</code> attribute
+  is present, the <a href=3D#browsing-context-name>browsing contex=
t name</a> must be set to the value of this attribute;
+  otherwise, the <a href=3D#browsing-context-name>browsing context=
 name</a> must be set to the empty string.</p>
+
+  <p>Whenever the <code title=3Dattr-frame-name>name</cod=
e> attribute is set, the nested
+  <a href=3D#browsing-context>browsing context</a>'s <a h=
ref=3D#browsing-context-name title=3D"browsing context name"&gt=
;name</a> must be changed to
+  the new value. If the attribute is removed, the <a href=3D#browsing=
-context-name>browsing context name</a> must be set to
+  the empty string.</p>
+
+  <p>The <code><a href=3D#frame>frame</a></co=
de> element must implement the <code><a href=3D#htmlframeelem=
ent>HTMLFrameElement</a></code> interface.</p>
+
+  <pre class=3Didl>interface <dfn id=3Dhtmlframeelement>HTML=
FrameElement</dfn> : <a href=3D#htmlelement>HTMLElement</a=
> {
+           attribute DOMString <a href=3D#dom-frame-name title=3Ddom-=
frame-name>name</a>;
+           attribute DOMString <a href=3D#dom-frame-scrolling title=3D=
dom-frame-scrolling>scrolling</a>;
+           attribute DOMString <a href=3D#dom-frame-src title=3Ddom-f=
rame-src>src</a>;
+           attribute DOMString <a href=3D#dom-frame-frameborder title=
=3Ddom-frame-frameBorder>frameBorder</a>;
+           attribute DOMString <a href=3D#dom-frame-longdesc title=3D=
dom-frame-longDesc>longDesc</a>;
+           attribute boolean <a href=3D#dom-frame-noresize title=3Ddo=
m-frame-noResize>noResize</a>;
+  readonly attribute Document? <a href=3D#dom-frame-contentdocument t=
itle=3Ddom-frame-contentDocument>contentDocument</a>;
+  readonly attribute <a href=3D#windowproxy>WindowProxy</a>?=
 <a href=3D#dom-frame-contentwindow title=3Ddom-frame-contentWindow&gt=
;contentWindow</a>;
+
+  [TreatNullAs=3DEmptyString] attribute DOMString <a href=3D#dom-fram=
e-marginheight title=3Ddom-frame-marginHeight>marginHeight</a>;
+  [TreatNullAs=3DEmptyString] attribute DOMString <a href=3D#dom-fram=
e-marginwidth title=3Ddom-frame-marginWidth>marginWidth</a>;
+};</pre>
+
+  <p>The <dfn id=3Ddom-frame-name title=3Ddom-frame-name>&lt=
;code>name</code></dfn>, <dfn id=3Ddom-frame-scrolling =
title=3Ddom-frame-scrolling><code>scrolling</code></dfn=
>, and <dfn id=3Ddom-frame-src title=3Ddom-frame-src><code&gt=
;src</code></dfn> IDL attributes of the <code><a hre=
f=3D#frame>frame</a></code> element must
+  <a href=3D#reflect>reflect</a> the respective content attr=
ibutes of the same name. For the purposes of
+  reflection, the <code><a href=3D#frame>frame</a><=
/code> element's <code title=3Dattr-frame-src>src</code> c=
ontent
+  attribute is defined as containing a <a href=3D#url>URL</a&gt=
;.</p>
+
+  <p>The <dfn id=3Ddom-frame-frameborder title=3Ddom-frame-fram=
eBorder><code>frameBorder</code></dfn> IDL attribute=
 of the
+  <code><a href=3D#frame>frame</a></code> elemen=
t must <a href=3D#reflect>reflect</a> the element's <code =
title=3Dattr-frame-frameborder>frameborder</code> content attrib=
ute.</p>
+
+  <p>The <dfn id=3Ddom-frame-longdesc title=3Ddom-frame-longDes=
c><code>longDesc</code></dfn> IDL attribute of the
+  <code><a href=3D#frame>frame</a></code> elemen=
t must <a href=3D#reflect>reflect</a> the element's <code =
title=3Dattr-frame-longdesc>longdesc</code> content attribute, w=
hich for the purposes of
+  reflection is defined as containing a <a href=3D#url>URL</a&g=
t;.</p>
+
+  <p>The <dfn id=3Ddom-frame-noresize title=3Ddom-frame-noResiz=
e><code>noResize</code></dfn> IDL attribute of the
+  <code><a href=3D#frame>frame</a></code> elemen=
t must <a href=3D#reflect>reflect</a> the element's <code =
title=3Dattr-frame-noresize>noresize</code> content attribute.&l=
t;/p>
+
+  <p>The <dfn id=3Ddom-frame-contentdocument title=3Ddom-frame-=
contentDocument><code>contentDocument</code></dfn> I=
DL attribute of
+  the <code><a href=3D#frame>frame</a></code> el=
ement must return the <code><a href=3D#document>Document</=
a></code> object of the <a href=3D#active-document>active
+  document</a> of the <code><a href=3D#frame>frame<=
/a></code> element's <a href=3D#nested-browsing-context>ne=
sted browsing context</a>.</p>
+
+  <p>The <dfn id=3Ddom-frame-contentwindow title=3Ddom-frame-co=
ntentWindow><code>contentWindow</code></dfn> IDL att=
ribute must
+  return the <code><a href=3D#windowproxy>WindowProxy</a&=
gt;</code> object of the <code><a href=3D#frame>frame&l=
t;/a></code> element's <a href=3D#nested-browsing-context>=
nested
+  browsing context</a>.</p>
+
+  <p>The <dfn id=3Ddom-frame-marginheight title=3Ddom-frame-mar=
ginHeight><code>marginHeight</code></dfn> IDL attrib=
ute of the
+  <code><a href=3D#frame>frame</a></code> elemen=
t must <a href=3D#reflect>reflect</a> the element's <code =
title=3Dattr-frame-marginheight>marginheight</code> content attr=
ibute.</p>
+
+  <p>The <dfn id=3Ddom-frame-marginwidth title=3Ddom-frame-marg=
inWidth><code>marginWidth</code></dfn> IDL attribute=
 of the
+  <code><a href=3D#frame>frame</a></code> elemen=
t must <a href=3D#reflect>reflect</a> the element's <code =
title=3Dattr-frame-marginwidth>marginwidth</code> content attrib=
ute.</p>
+
+
+
+  <h4 id=3Dother-elements,-attributes-and-apis><span class=3Dse=
cno>15.3.4 </span>Other elements, attributes and APIs</h4>=
 <!-- alphabetical by name and attribute -->
+
+  <p>User agents must treat <code><a href=3D#acronym>a=
cronym</a></code> elements in a manner
+  equivalent to <code><a href=3D#the-abbr-element>abbr</a=
></code> elements in terms of semantics and
+  for purposes of rendering.</p>
+
+  <hr><pre class=3Didl>partial interface <a href=3D#htmla=
nchorelement id=3DHTMLAnchorElement-partial>HTMLAnchorElement</a&gt=
; {
+           attribute DOMString <a href=3D#dom-a-coords title=3Ddom-a-=
coords>coords</a>;
+           attribute DOMString <a href=3D#dom-a-charset title=3Ddom-a=
-charset>charset</a>;
+           attribute DOMString <a href=3D#dom-a-name title=3Ddom-a-na=
me>name</a>;
+           attribute DOMString <a href=3D#dom-a-rev title=3Ddom-a-rev=
>rev</a>;
+           attribute DOMString <a href=3D#dom-a-shape title=3Ddom-a-s=
hape>shape</a>;
+};</pre>
+
+  <p>The <dfn id=3Ddom-a-coords title=3Ddom-a-coords><cod=
e>coords</code></dfn>, <dfn id=3Ddom-a-charset title=3D=
dom-a-charset><code>charset</code></dfn>, <dfn id=
=3Ddom-a-name title=3Ddom-a-name><code>name</code></dfn=
>, <dfn id=3Ddom-a-rev title=3Ddom-a-rev><code>rev</cod=
e></dfn>, and <dfn id=3Ddom-a-shape title=3Ddom-a-shape>&l=
t;code>shape</code></dfn> IDL attributes of the
+  <code><a href=3D#the-a-element>a</a></code> el=
ement must <a href=3D#reflect>reflect</a> the respective
+  content attributes of the same name.</p>
+
+  <hr><pre class=3Didl>partial interface <a href=3D#htmla=
reaelement id=3DHTMLAreaElement-partial>HTMLAreaElement</a> {
+           attribute boolean <a href=3D#dom-area-nohref title=3Ddom-a=
rea-noHref>noHref</a>;
+};</pre>
+
+  <p>The <dfn id=3Ddom-area-nohref title=3Ddom-area-noHref>&=
lt;code>noHref</code></dfn> IDL attribute of the
+  <code><a href=3D#the-area-element>area</a></code&=
gt; element must <a href=3D#reflect>reflect</a> the element's=
 <code title=3Dattr-area-nohref><a href=3D#attr-area-nohref>n=
ohref</a></code> content attribute.</p>
+
+<!--(removed for https://www.w3.org/Bugs/Public/show_bug.cgi?id=3D211=
42 in the hope that we can drop it entirely
+  <hr>
+
+  <p>The <code>basefont</code> element must implement =
the
+  <code>HTMLBaseFontElement</code> interface.</p>
+
+  <pre class=3D"idl">interface <dfn>HTMLBaseFontEl=
ement</dfn> : <span>HTMLElement</span> {
+           attribute DOMString <span title=3D"dom-basefont-color=
">color</span>;
+           attribute DOMString <span title=3D"dom-basefont-face&=
quot;>face</span>;
+           attribute long <span title=3D"dom-basefont-size"=
>size</span>; <!- - yes, long, not DOMString (so says DOM2 HT=
ML) - ->
+};</pre>
+
+  <p>The <dfn title=3D"dom-basefont-color"><cod=
e>color</code></dfn>, <dfn
+  title=3D"dom-basefont-face"><code>face</code>=
</dfn>, and <dfn
+  title=3D"dom-basefont-size"><code>size</code>=
</dfn> IDL attributes of the <code>basefont</code>
+  element must <span>reflect</span> the respective content a=
ttributes of the same name.</p>
+-->
+
+  <hr><pre class=3Didl>partial interface <a href=3D#htmlb=
odyelement id=3DHTMLBodyElement-partial>HTMLBodyElement</a> {
+  [TreatNullAs=3DEmptyString] attribute DOMString <a href=3D#dom-body=
-text title=3Ddom-body-text>text</a>;
+  [TreatNullAs=3DEmptyString] attribute DOMString <a href=3D#dom-body=
-link title=3Ddom-body-link>link</a>;
+  [TreatNullAs=3DEmptyString] attribute DOMString <a href=3D#dom-body=
-vlink title=3Ddom-body-vLink>vLink</a>;
+  [TreatNullAs=3DEmptyString] attribute DOMString <a href=3D#dom-body=
-alink title=3Ddom-body-aLink>aLink</a>;
+  [TreatNullAs=3DEmptyString] attribute DOMString <a href=3D#dom-body=
-bgcolor title=3Ddom-body-bgColor>bgColor</a>;
+                            attribute DOMString <a href=3D#dom-body-b=
ackground title=3Ddom-body-background>background</a>;
+};</pre>
+
+  <p>The <dfn id=3Ddom-body-text title=3Ddom-body-text><c=
ode>text</code></dfn> IDL attribute of the <code>&lt=
;a href=3D#the-body-element>body</a></code>
+  element must <a href=3D#reflect>reflect</a> the element's =
<code title=3Dattr-body-text><a href=3D#attr-body-text>text&l=
t;/a></code> content
+  attribute.</p>
+
+  <p>The <dfn id=3Ddom-body-link title=3Ddom-body-link><c=
ode>link</code></dfn> IDL attribute of the <code>&lt=
;a href=3D#the-body-element>body</a></code>
+  element must <a href=3D#reflect>reflect</a> the element's =
<code title=3Dattr-body-link><a href=3D#attr-body-link>link&l=
t;/a></code> content
+  attribute.</p>
+
+  <p>The <dfn id=3Ddom-body-alink title=3Ddom-body-aLink>&lt=
;code>aLink</code></dfn> IDL attribute of the <code>=
<a href=3D#the-body-element>body</a></code>
+  element must <a href=3D#reflect>reflect</a> the element's =
<code title=3Dattr-body-alink><a href=3D#attr-body-alink>alin=
k</a></code> content
+  attribute.</p>
+
+  <p>The <dfn id=3Ddom-body-vlink title=3Ddom-body-vLink>&lt=
;code>vLink</code></dfn> IDL attribute of the <code>=
<a href=3D#the-body-element>body</a></code>
+  element must <a href=3D#reflect>reflect</a> the element's =
<code title=3Dattr-body-vlink><a href=3D#attr-body-vlink>vlin=
k</a></code> content
+  attribute.</p>
+
+  <p>The <dfn id=3Ddom-body-bgcolor title=3Ddom-body-bgColor&gt=
;<code>bgColor</code></dfn> IDL attribute of the
+  <code><a href=3D#the-body-element>body</a></code&=
gt; element must <a href=3D#reflect>reflect</a> the element's=
 <code title=3Dattr-body-bgcolor><a href=3D#attr-body-bgcolor&gt=
;bgcolor</a></code> content attribute.</p>
+
+  <p>The <dfn id=3Ddom-body-background title=3Ddom-body-backgro=
und><code>background</code></dfn> IDL attribute of t=
he
+  <code><a href=3D#the-body-element>body</a></code&=
gt; element must <a href=3D#reflect>reflect</a> the element's=
 <code title=3Dattr-background><a href=3D#attr-background>bac=
kground</a></code> content attribute. (The <code title=3Da=
ttr-background><a href=3D#attr-background>background</a>&l=
t;/code> content is <em>not</em> defined to contain a
+  <a href=3D#url>URL</a>, despite rules regarding its handli=
ng in the rendering section above.)</p>
+
+  <hr><pre class=3Didl>partial interface <a href=3D#htmlb=
relement id=3DHTMLBRElement-partial>HTMLBRElement</a> {
+           attribute DOMString <a href=3D#dom-br-clear title=3Ddom-br=
-clear>clear</a>;
+};</pre>
+
+  <p>The <dfn id=3Ddom-br-clear title=3Ddom-br-clear><cod=
e>clear</code></dfn> IDL attribute of the <code><=
a href=3D#the-br-element>br</a></code>
+  element must <a href=3D#reflect>reflect</a> the content at=
tribute of the same name.</p>
+
+  <hr><pre class=3Didl>partial interface <a href=3D#htmlt=
ablecaptionelement id=3DHTMLTableCaptionElement-partial>HTMLTableCapti=
onElement</a> {
+           attribute DOMString <a href=3D#dom-caption-align title=3Dd=
om-caption-align>align</a>;
+};</pre>
+
+  <p>The <dfn id=3Ddom-caption-align title=3Ddom-caption-align&=
gt;<code>align</code></dfn> IDL attribute of the
+  <code><a href=3D#the-caption-element>caption</a><=
/code> element must <a href=3D#reflect>reflect</a> the con=
tent attribute of the same name.</p>
+
+  <hr><pre class=3Didl>partial interface <a href=3D#htmlt=
ablecolelement id=3DHTMLTableColElement-partial>HTMLTableColElement&lt=
;/a> {
+           attribute DOMString <a href=3D#dom-col-align title=3Ddom-c=
ol-align>align</a>;
+           attribute DOMString <a href=3D#dom-col-ch title=3Ddom-col-=
ch>ch</a>;
+           attribute DOMString <a href=3D#dom-col-choff title=3Ddom-c=
ol-chOff>chOff</a>;
+           attribute DOMString <a href=3D#dom-col-valign title=3Ddom-=
col-vAlign>vAlign</a>;
+           attribute DOMString <a href=3D#dom-col-width title=3Ddom-c=
ol-width>width</a>;
+};</pre>
+
+  <p>The <dfn id=3Ddom-col-align title=3Ddom-col-align><c=
ode>align</code></dfn> and <dfn id=3Ddom-col-width titl=
e=3Ddom-col-width><code>width</code></dfn> IDL attri=
butes of the <code><a href=3D#the-col-element>col</a>&l=
t;/code> element must
+  <a href=3D#reflect>reflect</a> the respective content attr=
ibutes of the same name.</p>
+
+  <p>The <dfn id=3Ddom-col-ch title=3Ddom-col-ch><code&gt=
;ch</code></dfn> IDL attribute of the <code><a href=3D=
#the-col-element>col</a></code> element
+  must <a href=3D#reflect>reflect</a> the element's <code=
 title=3Dattr-col-char><a href=3D#attr-col-char>char</a>&l=
t;/code> content
+  attribute.</p>
+
+  <p>The <dfn id=3Ddom-col-choff title=3Ddom-col-chOff><c=
ode>chOff</code></dfn> IDL attribute of the <code>&l=
t;a href=3D#the-col-element>col</a></code>
+  element must <a href=3D#reflect>reflect</a> the element's =
<code title=3Dattr-col-charoff><a href=3D#attr-col-charoff>ch=
aroff</a></code>
+  content attribute.</p>
+
+  <p>The <dfn id=3Ddom-col-valign title=3Ddom-col-vAlign>&lt=
;code>vAlign</code></dfn> IDL attribute of the <code&gt=
;<a href=3D#the-col-element>col</a></code>
+  element must <a href=3D#reflect>reflect</a> the element's =
<code title=3Dattr-col-valign><a href=3D#attr-col-valign>vali=
gn</a></code>
+  content attribute.</p>
+
+  <hr><p>User agents must treat <code><a href=3D#di=
r>dir</a></code> elements in a manner equivalent to <co=
de><a href=3D#the-ul-element>ul</a></code>
+  elements in terms of semantics and for purposes of rendering.</p&gt=
;
+
+  <p>The <code><a href=3D#dir>dir</a></code&g=
t; element must implement the <code><a href=3D#htmldirectoryelem=
ent>HTMLDirectoryElement</a></code>
+  interface.</p>
+
+  <pre class=3Didl>interface <dfn id=3Dhtmldirectoryelement>=
HTMLDirectoryElement</dfn> : <a href=3D#htmlelement>HTMLEleme=
nt</a> {
+           attribute boolean <a href=3D#dom-dir-compact title=3Ddom-d=
ir-compact>compact</a>;
+};</pre>
+
+  <p>The <dfn id=3Ddom-dir-compact title=3Ddom-dir-compact>&=
lt;code>compact</code></dfn> IDL attribute of the
+  <code><a href=3D#dir>dir</a></code> element mu=
st <a href=3D#reflect>reflect</a> the content attribute of th=
e same name.</p>
+
+  <hr><pre class=3Didl>partial interface <a href=3D#htmld=
ivelement id=3DHTMLDivElement-partial>HTMLDivElement</a> {
+           attribute DOMString <a href=3D#dom-div-align title=3Ddom-d=
iv-align>align</a>;
+};</pre>
+
+  <p>The <dfn id=3Ddom-div-align title=3Ddom-div-align><c=
ode>align</code></dfn> IDL attribute of the <code>&l=
t;a href=3D#the-div-element>div</a></code>
+  element must <a href=3D#reflect>reflect</a> the content at=
tribute of the same name.</p>
+
+  <hr><pre class=3Didl>partial interface <a href=3D#htmld=
listelement id=3DHTMLDListElement-partial>HTMLDListElement</a> {
+           attribute boolean <a href=3D#dom-dl-compact title=3Ddom-dl=
-compact>compact</a>;
+};</pre>
+
+  <p>The <dfn id=3Ddom-dl-compact title=3Ddom-dl-compact>&lt=
;code>compact</code></dfn> IDL attribute of the <code&g=
t;<a href=3D#the-dl-element>dl</a></code>
+  element must <a href=3D#reflect>reflect</a> the content at=
tribute of the same name.</p>
+
+  <hr><pre class=3Didl>partial interface <a href=3D#htmle=
mbedelement id=3DHTMLEmbedElement-partial>HTMLEmbedElement</a> {
+           attribute DOMString <a href=3D#dom-embed-align title=3Ddom=
-embed-align>align</a>;
+           attribute DOMString <a href=3D#dom-embed-name title=3Ddom-=
embed-name>name</a>;
+};</pre>
+
+  <p>The <dfn id=3Ddom-embed-name title=3Ddom-embed-name>&lt=
;code>name</code></dfn> and <dfn id=3Ddom-embed-align t=
itle=3Ddom-embed-align><code>align</code></dfn> IDL =
attributes of the <code><a href=3D#the-embed-element>embed&lt=
;/a></code> element
+  must <a href=3D#reflect>reflect</a> the respective content=
 attributes of the same name.</p>
+
+  <hr><p>The <code><a href=3D#font>font</a&gt=
;</code> element must implement the <code><a href=3D#htmlf=
ontelement>HTMLFontElement</a></code> interface.</p>
+
+  <pre class=3Didl>interface <dfn id=3Dhtmlfontelement>HTMLF=
ontElement</dfn> : <a href=3D#htmlelement>HTMLElement</a&g=
t; {
+  [TreatNullAs=3DEmptyString] attribute DOMString <a href=3D#dom-font=
-color title=3Ddom-font-color>color</a>;
+                            attribute DOMString <a href=3D#dom-font-f=
ace title=3Ddom-font-face>face</a>;
+                            attribute DOMString <a href=3D#dom-font-s=
ize title=3Ddom-font-size>size</a>; <!-- yes, DOMString, not =
long (so says DOM2 HTML) -->
+};</pre>
+
+  <p>The <dfn id=3Ddom-font-color title=3Ddom-font-color>&lt=
;code>color</code></dfn>, <dfn id=3Ddom-font-face title=
=3Ddom-font-face><code>face</code></dfn>, and <df=
n id=3Ddom-font-size title=3Ddom-font-size><code>size</code&g=
t;</dfn> IDL attributes of the <code><a href=3D#font>fo=
nt</a></code> element must
+  <a href=3D#reflect>reflect</a> the respective content attr=
ibutes of the same name.</p>
+
+  <hr><pre class=3Didl>partial interface <a href=3D#htmlh=
eadingelement id=3DHTMLHeadingElement-partial>HTMLHeadingElement</a=
> {
+           attribute DOMString <a href=3D#dom-hx-align title=3Ddom-hx=
-align>align</a>;
+};</pre>
+
+  <p>The <dfn id=3Ddom-hx-align title=3Ddom-hx-align><cod=
e>align</code></dfn> IDL attribute of the
+  <code><a href=3D#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h=
1</a></code>–<code><a href=3D#the-h1,-h2,-=
h3,-h4,-h5,-and-h6-elements>h6</a></code> elements must &l=
t;a href=3D#reflect>reflect</a> the content attribute of
+  the same name.</p>
+
+  <hr><p class=3Dnote>The <dfn id=3Ddom-head-profile titl=
e=3Ddom-head-profile><code>profile</code></dfn> IDL =
attribute on
+  <code><a href=3D#the-head-element>head</a></code&=
gt; elements (with the <code><a href=3D#htmlheadelement>HTMLH=
eadElement</a></code> interface) is intentionally
+  omitted. Unless so required by <a href=3D#other-applicable-specific=
ations title=3D"other applicable specifications">another app=
licable
+  specification</a>, implementations would therefore not support t=
his attribute. (It is mentioned
+  here as it was defined in a previous version of the DOM specifications=
.)</p>
+
+  <hr><pre class=3Didl>partial interface <a href=3D#htmlh=
relement id=3DHTMLHRElement-partial>HTMLHRElement</a> {
+           attribute DOMString <a href=3D#dom-hr-align title=3Ddom-hr=
-align>align</a>;
+           attribute DOMString <a href=3D#dom-hr-color title=3Ddom-hr=
-color>color</a>;
+           attribute boolean <a href=3D#dom-hr-noshade title=3Ddom-hr=
-noShade>noShade</a>;
+           attribute DOMString <a href=3D#dom-hr-size title=3Ddom-hr-=
size>size</a>;
+           attribute DOMString <a href=3D#dom-hr-width title=3Ddom-hr=
-width>width</a>;
+};</pre>
+
+  <p>The <dfn id=3Ddom-hr-align title=3Ddom-hr-align><cod=
e>align</code></dfn>, <dfn id=3Ddom-hr-color title=3Ddo=
m-hr-color><code>color</code></dfn>, <dfn id=3Ddo=
m-hr-size title=3Ddom-hr-size><code>size</code></dfn&gt=
;,
+  and <dfn id=3Ddom-hr-width title=3Ddom-hr-width><code>widt=
h</code></dfn> IDL attributes of the <code><a href=3D=
#the-hr-element>hr</a></code>
+  element must <a href=3D#reflect>reflect</a> the respective=
 content attributes of the same name.</p>
+
+  <p>The <dfn id=3Ddom-hr-noshade title=3Ddom-hr-noShade>&lt=
;code>noShade</code></dfn> IDL attribute of the <code&g=
t;<a href=3D#the-hr-element>hr</a></code>
+  element must <a href=3D#reflect>reflect</a> the element's =
<code title=3Dattr-hr-noshade><a href=3D#attr-hr-noshade>nosh=
ade</a></code>
+  content attribute.</p>
+
+  <hr><pre class=3Didl>partial interface <a href=3D#htmlh=
tmlelement id=3DHTMLHtmlElement-partial>HTMLHtmlElement</a> {
+           attribute DOMString <a href=3D#dom-html-version title=3Ddo=
m-html-version>version</a>;
+};</pre>
+
+  <p>The <dfn id=3Ddom-html-version title=3Ddom-html-version&gt=
;<code>version</code></dfn> IDL attribute of the
+  <code><a href=3D#the-html-element>html</a></code&=
gt; element must <a href=3D#reflect>reflect</a> the content a=
ttribute of the same name.</p>
+
+  <hr><pre class=3Didl>partial interface <a href=3D#htmli=
frameelement id=3DHTMLIFrameElement-partial>HTMLIFrameElement</a&gt=
; {
+           attribute DOMString <a href=3D#dom-iframe-align title=3Ddo=
m-iframe-align>align</a>;
+           attribute DOMString <a href=3D#dom-iframe-scrolling title=3D=
dom-iframe-scrolling>scrolling</a>;
+           attribute DOMString <a href=3D#dom-iframe-frameborder titl=
e=3Ddom-iframe-frameBorder>frameBorder</a>;
+           attribute DOMString <a href=3D#dom-iframe-longdesc title=3D=
dom-iframe-longDesc>longDesc</a>;
+
+  [TreatNullAs=3DEmptyString] attribute DOMString <a href=3D#dom-ifra=
me-marginheight title=3Ddom-iframe-marginHeight>marginHeight</a>=
;
+  [TreatNullAs=3DEmptyString] attribute DOMString <a href=3D#dom-ifra=
me-marginwidth title=3Ddom-iframe-marginWidth>marginWidth</a>;
+};</pre>
+
+  <p>The <dfn id=3Ddom-iframe-align title=3Ddom-iframe-align&gt=
;<code>align</code></dfn> and <dfn id=3Ddom-iframe-s=
crolling title=3Ddom-iframe-scrolling><code>scrolling</code&g=
t;</dfn> IDL attributes of the
+  <code><a href=3D#the-iframe-element>iframe</a></c=
ode> element must <a href=3D#reflect>reflect</a> the respe=
ctive content attributes of the
+  same name.</p>
+
+  <p>The <dfn id=3Ddom-iframe-frameborder title=3Ddom-iframe-fr=
ameBorder><code>frameBorder</code></dfn> IDL attribu=
te of the
+  <code><a href=3D#the-iframe-element>iframe</a></c=
ode> element must <a href=3D#reflect>reflect</a> the eleme=
nt's <code title=3Dattr-iframe-frameborder><a href=3D#attr-ifram=
e-frameborder>frameborder</a></code> content attribute.&lt=
;/p>
+
+  <p>The <dfn id=3Ddom-iframe-longdesc title=3Ddom-iframe-longD=
esc><code>longDesc</code></dfn> IDL attribute of the
+  <code><a href=3D#the-iframe-element>iframe</a></c=
ode> element must <a href=3D#reflect>reflect</a> the eleme=
nt's <code title=3Dattr-iframe-longdesc><a href=3D#attr-iframe-l=
ongdesc>longdesc</a></code> content attribute, which for t=
he purposes of
+  reflection is defined as containing a <a href=3D#url>URL</a&g=
t;.</p>
+
+  <p>The <dfn id=3Ddom-iframe-marginheight title=3Ddom-iframe-m=
arginHeight><code>marginHeight</code></dfn> IDL attr=
ibute of the
+  <code><a href=3D#the-iframe-element>iframe</a></c=
ode> element must <a href=3D#reflect>reflect</a> the eleme=
nt's <code title=3Dattr-iframe-marginheight><a href=3D#attr-ifra=
me-marginheight>marginheight</a></code> content attribute.=
</p>
+
+  <p>The <dfn id=3Ddom-iframe-marginwidth title=3Ddom-iframe-ma=
rginWidth><code>marginWidth</code></dfn> IDL attribu=
te of the
+  <code><a href=3D#the-iframe-element>iframe</a></c=
ode> element must <a href=3D#reflect>reflect</a> the eleme=
nt's <code title=3Dattr-iframe-marginwidth><a href=3D#attr-ifram=
e-marginwidth>marginwidth</a></code> content attribute.&lt=
;/p>
+
+  <hr><pre class=3Didl>partial interface <a href=3D#htmli=
mageelement id=3DHTMLImageElement-partial>HTMLImageElement</a> {
+           attribute DOMString <a href=3D#dom-img-name title=3Ddom-im=
g-name>name</a>;
+           attribute DOMString <a href=3D#dom-img-lowsrc title=3Ddom-=
img-lowsrc>lowsrc</a>;
+           attribute DOMString <a href=3D#dom-img-align title=3Ddom-i=
mg-align>align</a>;
+           attribute unsigned long <a href=3D#dom-img-hspace title=3D=
dom-img-hspace>hspace</a>;
+           attribute unsigned long <a href=3D#dom-img-vspace title=3D=
dom-img-vspace>vspace</a>;
+           attribute DOMString <a href=3D#dom-img-longdesc title=3Ddo=
m-img-longDesc>longDesc</a>;
+
+  [TreatNullAs=3DEmptyString] attribute DOMString <a href=3D#dom-img-=
border title=3Ddom-img-border>border</a>;
+};</pre>
+
+  <p>The <dfn id=3Ddom-img-name title=3Ddom-img-name><cod=
e>name</code></dfn>, <dfn id=3Ddom-img-align title=3Ddo=
m-img-align><code>align</code></dfn>, <dfn id=3Dd=
om-img-border title=3Ddom-img-border><code>border</code>&l=
t;/dfn>, <dfn id=3Ddom-img-hspace title=3Ddom-img-hspace><cod=
e>hspace</code></dfn>, and <dfn id=3Ddom-img-vspace tit=
le=3Ddom-img-vspace><code>vspace</code></dfn> IDL at=
tributes of the <code><a href=3D#the-img-element>img</a&gt=
;</code> element
+  must <a href=3D#reflect>reflect</a> the respective content=
 attributes of the same name.</p>
+
+  <p>The <dfn id=3Ddom-img-longdesc title=3Ddom-img-longDesc&gt=
;<code>longDesc</code></dfn> IDL attribute of the
+  <code><a href=3D#the-img-element>img</a></code&gt=
; element must <a href=3D#reflect>reflect</a> the element's &=
lt;code title=3Dattr-img-longdesc><a href=3D#attr-img-longdesc>l=
ongdesc</a></code> content attribute, which for the purposes =
of reflection
+  is defined as containing a <a href=3D#url>URL</a>.</p&g=
t;
+
+  <p>The <dfn id=3Ddom-img-lowsrc title=3Ddom-img-lowsrc>&lt=
;code>lowsrc</code></dfn> IDL attribute of the <code&gt=
;<a href=3D#the-img-element>img</a></code>
+  element must <a href=3D#reflect>reflect</a> the element's =
<code title=3Dattr-img-lowsrc><a href=3D#attr-img-lowsrc>lows=
rc</a></code>
+  content attribute, which for the purposes of reflection is defined as =
containing a
+  <a href=3D#url>URL</a>.</p>
+
+  <hr><pre class=3Didl>partial interface <a href=3D#htmli=
nputelement id=3DHTMLInputElement-partial>HTMLInputElement</a> {
+           attribute DOMString <a href=3D#dom-input-align title=3Ddom=
-input-align>align</a>;
+           attribute DOMString <a href=3D#dom-input-usemap title=3Ddo=
m-input-useMap>useMap</a>;
+};</pre>
+
+  <p>The <dfn id=3Ddom-input-align title=3Ddom-input-align>&=
lt;code>align</code></dfn> IDL attribute of the
+  <code><a href=3D#the-input-element>input</a></cod=
e> element must <a href=3D#reflect>reflect</a> the content=
 attribute of the same name.</p>
+
+  <p>The <dfn id=3Ddom-input-usemap title=3Ddom-input-useMap&gt=
;<code>useMap</code></dfn> IDL attribute of the
+  <code><a href=3D#the-input-element>input</a></cod=
e> element must <a href=3D#reflect>reflect</a> the element=
's <code title=3Dattr-input-usemap><a href=3D#attr-input-usemap&=
gt;usemap</a></code> content attribute.</p>
+
+  <hr><pre class=3Didl>partial interface <a href=3D#htmll=
egendelement id=3DHTMLLegendElement-partial>HTMLLegendElement</a&gt=
; {
+           attribute DOMString <a href=3D#dom-legend-align title=3Ddo=
m-legend-align>align</a>;
+};</pre>
+
+  <p>The <dfn id=3Ddom-legend-align title=3Ddom-legend-align&gt=
;<code>align</code></dfn> IDL attribute of the
+  <code><a href=3D#the-legend-element>legend</a></c=
ode> element must <a href=3D#reflect>reflect</a> the conte=
nt attribute of the same name.</p>
+
+  <hr><pre class=3Didl>partial interface <a href=3D#htmll=
ielement id=3DHTMLLIElement-partial>HTMLLIElement</a> {
+           attribute DOMString <a href=3D#dom-li-type title=3Ddom-li-=
type>type</a>;
+};</pre>
+
+  <p>The <dfn id=3Ddom-li-type title=3Ddom-li-type><code&=
gt;type</code></dfn> IDL attribute of the <code><a h=
ref=3D#the-li-element>li</a></code>
+  element must <a href=3D#reflect>reflect</a> the content at=
tribute of the same name.</p>
+
+  <hr><pre class=3Didl>partial interface <a href=3D#htmll=
inkelement id=3DHTMLLinkElement-partial>HTMLLinkElement</a> {
+           attribute DOMString <a href=3D#dom-link-charset title=3Ddo=
m-link-charset>charset</a>;
+           attribute DOMString <a href=3D#dom-link-rev title=3Ddom-li=
nk-rev>rev</a>;
+           attribute DOMString <a href=3D#dom-link-target title=3Ddom=
-link-target>target</a>;
+};</pre>
+
+  <p>The <dfn id=3Ddom-link-charset title=3Ddom-link-charset&gt=
;<code>charset</code></dfn>, <dfn id=3Ddom-link-rev =
title=3Ddom-link-rev><code>rev</code></dfn>, and &lt=
;dfn id=3Ddom-link-target title=3Ddom-link-target><code>target&l=
t;/code></dfn> IDL attributes of the <code><a href=3D#t=
he-link-element>link</a></code> element
+  must <a href=3D#reflect>reflect</a> the respective content=
 attributes of the same name.</p>
+
+  <hr><p>User agents must treat <code><a href=3D#li=
sting>listing</a></code> elements in a manner equivalent t=
o <code><a href=3D#the-pre-element>pre</a></code>
+  elements in terms of semantics and for purposes of rendering.</p&gt=
;
+
+  <hr><pre class=3Didl>partial interface <a href=3D#htmlm=
enuelement id=3DHTMLMenuElement-partial>HTMLMenuElement</a> {
+           attribute boolean <a href=3D#dom-menu-compact title=3Ddom-=
menu-compact>compact</a>;
+};</pre>
+
+  <p>The <dfn id=3Ddom-menu-compact title=3Ddom-menu-compact&gt=
;<code>compact</code></dfn> IDL attribute of the
+  <code><a href=3D#the-menu-element>menu</a></code&=
gt; element must <a href=3D#reflect>reflect</a> the content a=
ttribute of the same name.</p>
+
+  <hr><pre class=3Didl>partial interface <a href=3D#htmlm=
etaelement id=3DHTMLMetaElement-partial>HTMLMetaElement</a> {
+           attribute DOMString <a href=3D#dom-meta-scheme title=3Ddom=
-meta-scheme>scheme</a>;
+};</pre>
+
+  <p>User agents may treat the <code title=3Dattr-meta-scheme&g=
t;<a href=3D#attr-meta-scheme>scheme</a></code> content=
 attribute on the
+  <code><a href=3D#the-meta-element>meta</a></code&=
gt; element as an extension of the element's <code title=3Dattr-meta-n=
ame><a href=3D#attr-meta-name>name</a></code> conten=
t attribute when processing a <code><a href=3D#the-meta-element&=
gt;meta</a></code> element
+  with a <code title=3Dattr-meta-name><a href=3D#attr-meta-name=
>name</a></code> attribute whose value is one that the use=
r agent
+  recognizes as supporting the <code title=3Dattr-meta-scheme><=
a href=3D#attr-meta-scheme>scheme</a></code> attribute.&lt=
;/p>
+
+  <p>User agents are encouraged to ignore the <code title=3Datt=
r-meta-scheme><a href=3D#attr-meta-scheme>scheme</a></c=
ode> attribute
+  and instead process the value given to the metadata name as if it had =
been specified for each
+  expected value of the <code title=3Dattr-meta-scheme><a href=3D=
#attr-meta-scheme>scheme</a></code> attribute.</p>
+
+  <div class=3Dexample>
+
+   <p>For example, if the user agent acts on <code><a hre=
f=3D#the-meta-element>meta</a></code> elements with <co=
de title=3Dattr-meta-name><a href=3D#attr-meta-name>name</a&g=
t;</code> attributes having the value "eGMS.subject.keyword&qu=
ot;, and knows
+   that the <code title=3Dattr-meta-scheme><a href=3D#attr-meta=
-scheme>scheme</a></code> attribute is used with this meta=
data name,
+   then it could take the <code title=3Dattr-meta-scheme><a hre=
f=3D#attr-meta-scheme>scheme</a></code> attribute into acc=
ount,
+   acting as if it was an extension of the <code title=3Dattr-meta-na=
me><a href=3D#attr-meta-name>name</a></code> attribu=
te. Thus
+   the following two <code><a href=3D#the-meta-element>meta&=
lt;/a></code> elements could be treated as two elements giving v=
alues for
+   two different metadata names, one consisting of a combination of &quo=
t;eGMS.subject.keyword" and
+   "LGCL", and the other consisting of a combination of "=
eGMS.subject.keyword" and "ORLY":</p>
+
+   <pre class=3Dbad><!-- this markup is invalid -->
+<meta name=3D"eGMS.subject.keyword" scheme=3D"LGCL=
" content=3D"Abandoned vehicles">
+<meta name=3D"eGMS.subject.keyword" scheme=3D"ORLY=
" content=3D"Mah car: kthxbye"></pre>
+
+   <p>The suggested processing of this markup, however, would be e=
quivalent to the following:</p>
+
+   <pre><meta name=3D"eGMS.subject.keyword" conte=
nt=3D"Abandoned vehicles">
+<meta name=3D"eGMS.subject.keyword" content=3D"Mah=
 car: kthxbye"></pre>
+
+  </div>
+
+  <p>The <dfn id=3Ddom-meta-scheme title=3Ddom-meta-scheme>&=
lt;code>scheme</code></dfn> IDL attribute of the
+  <code><a href=3D#the-meta-element>meta</a></code&=
gt; element must <a href=3D#reflect>reflect</a> the content a=
ttribute of the same name.</p>
+
+  <hr><pre class=3Didl>partial interface <a href=3D#htmlo=
bjectelement id=3DHTMLObjectElement-partial>HTMLObjectElement</a&gt=
; {
+           attribute DOMString <a href=3D#dom-object-align title=3Ddo=
m-object-align>align</a>;
+           attribute DOMString <a href=3D#dom-object-archive title=3D=
dom-object-archive>archive</a>;
+           attribute DOMString <a href=3D#dom-object-code title=3Ddom=
-object-code>code</a>;
+           attribute boolean <a href=3D#dom-object-declare title=3Ddo=
m-object-declare>declare</a>;
+           attribute unsigned long <a href=3D#dom-object-hspace title=
=3Ddom-object-hspace>hspace</a>;
+           attribute DOMString <a href=3D#dom-object-standby title=3D=
dom-object-standby>standby</a>;
+           attribute unsigned long <a href=3D#dom-object-vspace title=
=3Ddom-object-vspace>vspace</a>;
+           attribute DOMString <a href=3D#dom-object-codebase title=3D=
dom-object-codeBase>codeBase</a>;
+           attribute DOMString <a href=3D#dom-object-codetype title=3D=
dom-object-codeType>codeType</a>;
+
+  [TreatNullAs=3DEmptyString] attribute DOMString <a href=3D#dom-obje=
ct-border title=3Ddom-object-border>border</a>;
+};</pre>
+
+  <p>The <dfn id=3Ddom-object-align title=3Ddom-object-align&gt=
;<code>align</code></dfn>, <dfn id=3Ddom-object-arch=
ive title=3Ddom-object-archive><code>archive</code></df=
n>, <dfn id=3Ddom-object-border title=3Ddom-object-border><co=
de>border</code></dfn>, <dfn id=3Ddom-object-code title=
=3Ddom-object-code><code>code</code></dfn>, <dfn =
id=3Ddom-object-declare title=3Ddom-object-declare><code>declare=
</code></dfn>, <dfn id=3Ddom-object-hspace title=3Ddom-obj=
ect-hspace><code>hspace</code></dfn>, <dfn id=3Dd=
om-object-standby title=3Ddom-object-standby><code>standby</c=
ode></dfn>, and <dfn id=3Ddom-object-vspace title=3Ddom-objec=
t-vspace><code>vspace</code></dfn> IDL attributes of=
 the <code><a href=3D#the-object-element>object</a><=
/code>
+  element must <a href=3D#reflect>reflect</a> the respective=
 content attributes of the same name.</p>
+
+  <p>The <dfn id=3Ddom-object-codebase title=3Ddom-object-codeB=
ase><code>codeBase</code></dfn> IDL attribute of the
+  <code><a href=3D#the-object-element>object</a></c=
ode> element must <a href=3D#reflect>reflect</a> the eleme=
nt's <code title=3Dattr-object-codebase><a href=3D#attr-object-c=
odebase>codebase</a></code> content attribute, which for t=
he purposes of
+  reflection is defined as containing a <a href=3D#url>URL</a&g=
t;.</p>
+
+  <p>The <dfn id=3Ddom-object-codetype title=3Ddom-object-codeT=
ype><code>codeType</code></dfn> IDL attribute of the
+  <code><a href=3D#the-object-element>object</a></c=
ode> element must <a href=3D#reflect>reflect</a> the eleme=
nt's <code title=3Dattr-object-codetype><a href=3D#attr-object-c=
odetype>codetype</a></code> content attribute.</p>
+
+  <hr><pre class=3Didl>partial interface <a href=3D#htmlo=
listelement id=3DHTMLOListElement-partial>HTMLOListElement</a> {
+           attribute boolean <a href=3D#dom-ol-compact title=3Ddom-ol=
-compact>compact</a>;
+};</pre>
+
+  <p>The <dfn id=3Ddom-ol-compact title=3Ddom-ol-compact>&lt=
;code>compact</code></dfn> IDL attribute of the <code&g=
t;<a href=3D#the-ol-element>ol</a></code>
+  element must <a href=3D#reflect>reflect</a> the content at=
tribute of the same name.</p>
+
+  <hr><pre class=3Didl>partial interface <a href=3D#htmlp=
aragraphelement id=3DHTMLParagraphElement-partial>HTMLParagraphElement=
</a> {
+           attribute DOMString <a href=3D#dom-p-align title=3Ddom-p-a=
lign>align</a>;
+};</pre>
+
+  <p>The <dfn id=3Ddom-p-align title=3Ddom-p-align><code&=
gt;align</code></dfn> IDL attribute of the <code><a =
href=3D#the-p-element>p</a></code>
+  element must <a href=3D#reflect>reflect</a> the content at=
tribute of the same name.</p>
+
+  <hr><pre class=3Didl>partial interface <a href=3D#htmlp=
aramelement id=3DHTMLParamElement-partial>HTMLParamElement</a> {
+           attribute DOMString <a href=3D#dom-param-type title=3Ddom-=
param-type>type</a>;
+           attribute DOMString <a href=3D#dom-param-valuetype title=3D=
dom-param-valueType>valueType</a>;
+};</pre>
+
+  <p>The <dfn id=3Ddom-param-type title=3Ddom-param-type>&lt=
;code>type</code></dfn> IDL attribute of the <code>&=
lt;a href=3D#the-param-element>param</a></code>
+  element must <a href=3D#reflect>reflect</a> the content at=
tribute of the same name.</p>
+
+  <p>The <dfn id=3Ddom-param-valuetype title=3Ddom-param-valueT=
ype><code>valueType</code></dfn> IDL attribute of th=
e
+  <code><a href=3D#the-param-element>param</a></cod=
e> element must <a href=3D#reflect>reflect</a> the element=
's <code title=3Dattr-param-valuetype><a href=3D#attr-param-valu=
etype>valuetype</a></code> content attribute.</p>
+
+  <hr><p>User agents must treat <code><a href=3D#pl=
aintext>plaintext</a></code> elements in a manner equivale=
nt to
+  <code><a href=3D#the-pre-element>pre</a></code&gt=
; elements in terms of semantics and for purposes of rendering. (The pars=
er has
+  special behavior for this element, though.)</p>
+
+  <hr><pre class=3Didl>partial interface <a href=3D#htmlp=
reelement id=3DHTMLPreElement-partial>HTMLPreElement</a> {
+           attribute long <a href=3D#dom-pre-width title=3Ddom-pre-wi=
dth>width</a>;
+};</pre>
+
+  <p>The <dfn id=3Ddom-pre-width title=3Ddom-pre-width><c=
ode>width</code></dfn> IDL attribute of the <code>&l=
t;a href=3D#the-pre-element>pre</a></code>
+  element must <a href=3D#reflect>reflect</a> the content at=
tribute of the same name.</p>
+
+  <hr><pre class=3Didl>partial interface <a href=3D#htmls=
criptelement id=3DHTMLScriptElement-partial>HTMLScriptElement</a&gt=
; {
+           attribute DOMString <a href=3D#dom-script-event title=3Ddo=
m-script-event>event</a>;
+           attribute DOMString <a href=3D#dom-script-htmlfor title=3D=
dom-script-htmlFor>htmlFor</a>;
+};</pre>
+
+  <p>The <dfn id=3Ddom-script-event title=3Ddom-script-event&gt=
;<code>event</code></dfn> and <dfn id=3Ddom-script-h=
tmlfor title=3Ddom-script-htmlFor><code>htmlFor</code><=
/dfn> IDL attributes of the <code><a href=3D#the-script-eleme=
nt>script</a></code>
+  element must return the empty string on getting, and do nothing on set=
ting.</p>
+
+  <hr><pre class=3Didl>partial interface <a href=3D#htmlt=
ableelement id=3DHTMLTableElement-partial>HTMLTableElement</a> {
+           attribute DOMString <a href=3D#dom-table-align title=3Ddom=
-table-align>align</a>;
+           attribute DOMString <a href=3D#dom-table-border title=3Ddo=
m-table-border>border</a>;
+           attribute DOMString <a href=3D#dom-table-frame title=3Ddom=
-table-frame>frame</a>;
+           attribute DOMString <a href=3D#dom-table-rules title=3Ddom=
-table-rules>rules</a>;
+           attribute DOMString <a href=3D#dom-table-summary title=3Dd=
om-table-summary>summary</a>;
+           attribute DOMString <a href=3D#dom-table-width title=3Ddom=
-table-width>width</a>;
+
+  [TreatNullAs=3DEmptyString] attribute DOMString <a href=3D#dom-tabl=
e-bgcolor title=3Ddom-table-bgColor>bgColor</a>;
+  [TreatNullAs=3DEmptyString] attribute DOMString <a href=3D#dom-tabl=
e-cellpadding title=3Ddom-table-cellPadding>cellPadding</a>;
+  [TreatNullAs=3DEmptyString] attribute DOMString <a href=3D#dom-tabl=
e-cellspacing title=3Ddom-table-cellSpacing>cellSpacing</a>;
+};</pre>
+
+  <p>The <dfn id=3Ddom-table-align title=3Ddom-table-align>&=
lt;code>align</code></dfn>, <dfn id=3Ddom-table-border =
title=3Ddom-table-border><code>border</code></dfn>, =
<dfn id=3Ddom-table-frame title=3Ddom-table-frame><code>frame=
</code></dfn>, <dfn id=3Ddom-table-summary title=3Ddom-tab=
le-summary><code>summary</code></dfn>, <dfn id=3D=
dom-table-rules title=3Ddom-table-rules><code>rules</code>=
</dfn>, and <dfn id=3Ddom-table-width title=3Ddom-table-width&gt=
;<code>width</code></dfn>, IDL attributes of the <co=
de><a href=3D#the-table-element>table</a></code> ele=
ment
+  must <a href=3D#reflect>reflect</a> the respective content=
 attributes of the same name.</p>
+
+  <p>The <dfn id=3Ddom-table-bgcolor title=3Ddom-table-bgColor&=
gt;<code>bgColor</code></dfn> IDL attribute of the
+  <code><a href=3D#the-table-element>table</a></cod=
e> element must <a href=3D#reflect>reflect</a> the element=
's <code title=3Dattr-table-bgcolor><a href=3D#attr-table-bgcolo=
r>bgcolor</a></code> content attribute.</p>
+
+  <p>The <dfn id=3Ddom-table-cellpadding title=3Ddom-table-cell=
Padding><code>cellPadding</code></dfn> IDL attribute=
 of the
+  <code><a href=3D#the-table-element>table</a></cod=
e> element must <a href=3D#reflect>reflect</a> the element=
's <code title=3Dattr-table-cellpadding><a href=3D#attr-table-ce=
llpadding>cellpadding</a></code> content attribute.</p&=
gt;
+
+  <p>The <dfn id=3Ddom-table-cellspacing title=3Ddom-table-cell=
Spacing><code>cellSpacing</code></dfn> IDL attribute=
 of the
+  <code><a href=3D#the-table-element>table</a></cod=
e> element must <a href=3D#reflect>reflect</a> the element=
's <code title=3Dattr-table-cellspacing><a href=3D#attr-table-ce=
llspacing>cellspacing</a></code> content attribute.</p&=
gt;
+
+  <hr><pre class=3Didl>partial interface <a href=3D#htmlt=
ablesectionelement id=3DHTMLTableSectionElement-partial>HTMLTableSecti=
onElement</a> {
+           attribute DOMString <a href=3D#dom-tbody-align title=3Ddom=
-tbody-align>align</a>;
+           attribute DOMString <a href=3D#dom-tbody-ch title=3Ddom-tb=
ody-ch>ch</a>;
+           attribute DOMString <a href=3D#dom-tbody-choff title=3Ddom=
-tbody-chOff>chOff</a>;
+           attribute DOMString <a href=3D#dom-tbody-valign title=3Ddo=
m-tbody-vAlign>vAlign</a>;
+};</pre>
+
+  <p>The <dfn id=3Ddom-tbody-align title=3Ddom-tbody-align>&=
lt;code>align</code></dfn> IDL attribute of the
+  <code><a href=3D#the-tbody-element>tbody</a></cod=
e>, <code><a href=3D#the-thead-element>thead</a><=
/code>, and <code><a href=3D#the-tfoot-element>tfoot</a=
></code> elements must <a href=3D#reflect>reflect</a&gt=
;
+  the content attribute of the same name.</p>
+
+  <p>The <dfn id=3Ddom-tbody-ch title=3Ddom-tbody-ch><cod=
e>ch</code></dfn> IDL attribute of the <code><a h=
ref=3D#the-tbody-element>tbody</a></code>,
+  <code><a href=3D#the-thead-element>thead</a></cod=
e>, and <code><a href=3D#the-tfoot-element>tfoot</a>=
</code> elements must <a href=3D#reflect>reflect</a> th=
e elements' <code title=3Dattr-tbody-char><a href=3D#attr-tbody-=
char>char</a></code> content attributes.</p>
+
+  <p>The <dfn id=3Ddom-tbody-choff title=3Ddom-tbody-chOff>&=
lt;code>chOff</code></dfn> IDL attribute of the
+  <code><a href=3D#the-tbody-element>tbody</a></cod=
e>, <code><a href=3D#the-thead-element>thead</a><=
/code>, and <code><a href=3D#the-tfoot-element>tfoot</a=
></code> elements must <a href=3D#reflect>reflect</a&gt=
;
+  the elements' <code title=3Dattr-tbody-charoff><a href=3D#att=
r-tbody-charoff>charoff</a></code> content attributes.<=
/p>
+
+  <p>The <dfn id=3Ddom-tbody-valign title=3Ddom-tbody-vAlign&gt=
;<code>vAlign</code></dfn> IDL attribute of the
+  <code><a href=3D#the-tbody-element>tbody</a></cod=
e>, <code><a href=3D#the-thead-element>thead</a><=
/code>, and <code><a href=3D#the-tfoot-element>tfoot</a=
></code> element must <a href=3D#reflect>reflect</a>
+  the elements' <code title=3Dattr-tbody-valign><a href=3D#attr=
-tbody-valign>valign</a></code> content attributes.</p&=
gt;
+
+  <hr><pre class=3Didl>partial interface <a href=3D#htmlt=
ablecellelement id=3DHTMLTableCellElement-partial>HTMLTableCellElement=
</a> {
+           attribute DOMString <a href=3D#dom-tdth-align title=3Ddom-=
tdth-align>align</a>;
+           attribute DOMString <a href=3D#dom-tdth-axis title=3Ddom-t=
dth-axis>axis</a>;
+           attribute DOMString <a href=3D#dom-tdth-height title=3Ddom=
-tdth-height>height</a>;
+           attribute DOMString <a href=3D#dom-tdth-width title=3Ddom-=
tdth-width>width</a>;
+
+           attribute DOMString <a href=3D#dom-tdth-ch title=3Ddom-tdt=
h-ch>ch</a>;
+           attribute DOMString <a href=3D#dom-tdth-choff title=3Ddom-=
tdth-chOff>chOff</a>;
+           attribute boolean <a href=3D#dom-tdth-nowrap title=3Ddom-t=
dth-noWrap>noWrap</a>;
+           attribute DOMString <a href=3D#dom-tdth-valign title=3Ddom=
-tdth-vAlign>vAlign</a>;
+
+  [TreatNullAs=3DEmptyString] attribute DOMString <a href=3D#dom-tdth=
-bgcolor title=3Ddom-tdth-bgColor>bgColor</a>;
+};</pre>
+
+  <p>The <dfn id=3Ddom-tdth-align title=3Ddom-tdth-align>&lt=
;code>align</code></dfn>, <dfn id=3Ddom-tdth-axis title=
=3Ddom-tdth-axis><code>axis</code></dfn>, <dfn id=
=3Ddom-tdth-height title=3Ddom-tdth-height><code>height</code=
></dfn>, and <dfn id=3Ddom-tdth-width title=3Ddom-tdth-width&=
gt;<code>width</code></dfn> IDL attributes of the <c=
ode><a href=3D#the-td-element>td</a></code> and
+  <code><a href=3D#the-th-element>th</a></code> =
elements must <a href=3D#reflect>reflect</a> the respective c=
ontent attributes of the same
+  name.</p>
+
+  <p>The <dfn id=3Ddom-tdth-ch title=3Ddom-tdth-ch><code&=
gt;ch</code></dfn> IDL attribute of the <code><a hre=
f=3D#the-td-element>td</a></code> and
+  <code><a href=3D#the-th-element>th</a></code> =
elements must <a href=3D#reflect>reflect</a> the elements' &l=
t;code title=3Dattr-tdth-char><a href=3D#attr-tdth-char>char<=
/a></code> content attributes.</p>
+
+  <p>The <dfn id=3Ddom-tdth-choff title=3Ddom-tdth-chOff>&lt=
;code>chOff</code></dfn> IDL attribute of the <code>=
<a href=3D#the-td-element>td</a></code>
+  and <code><a href=3D#the-th-element>th</a></code&=
gt; elements must <a href=3D#reflect>reflect</a> the elements=
' <code title=3Dattr-tdth-charoff><a href=3D#attr-tdth-charoff&g=
t;charoff</a></code> content attributes.</p>
+
+  <p>The <dfn id=3Ddom-tdth-nowrap title=3Ddom-tdth-noWrap>&=
lt;code>noWrap</code></dfn> IDL attribute of the <code&=
gt;<a href=3D#the-td-element>td</a></code>
+  and <code><a href=3D#the-th-element>th</a></code&=
gt; elements must <a href=3D#reflect>reflect</a> the elements=
' <code title=3Dattr-tdth-nowrap><a href=3D#attr-tdth-nowrap>=
nowrap</a></code> content attributes.</p>
+
+  <p>The <dfn id=3Ddom-tdth-valign title=3Ddom-tdth-vAlign>&=
lt;code>vAlign</code></dfn> IDL attribute of the <code&=
gt;<a href=3D#the-td-element>td</a></code>
+  and <code><a href=3D#the-th-element>th</a></code&=
gt; element must <a href=3D#reflect>reflect</a> the elements'=
 <code title=3Dattr-tdth-valign><a href=3D#attr-tdth-valign>v=
align</a></code> content attributes.</p>
+
+  <p>The <dfn id=3Ddom-tdth-bgcolor title=3Ddom-tdth-bgColor&gt=
;<code>bgColor</code></dfn> IDL attribute of the
+  <code><a href=3D#the-td-element>td</a></code> =
and <code><a href=3D#the-th-element>th</a></code>=
 elements must <a href=3D#reflect>reflect</a> the elements' &=
lt;code title=3Dattr-tdth-bgcolor><a href=3D#attr-tdth-bgcolor>b=
gcolor</a></code> content attributes.</p>
+
+  <hr><pre class=3Didl>partial interface <a href=3D#htmlt=
abledatacellelement id=3DHTMLTableDataCellElement-partial>HTMLTableDat=
aCellElement</a> {
+           attribute DOMString <a href=3D#dom-td-abbr title=3Ddom-td-=
abbr>abbr</a>;
+};</pre>
+
+  <p>The <dfn id=3Ddom-td-abbr title=3Ddom-td-abbr><code&=
gt;abbr</code></dfn> IDL attribute of the <code><a h=
ref=3D#the-td-element>td</a></code>
+  element must <a href=3D#reflect>reflect</a> the respective=
 content attributes of the same name.</p>
+
+  <hr><pre class=3Didl>partial interface <a href=3D#htmlt=
ablerowelement id=3DHTMLTableRowElement-partial>HTMLTableRowElement&lt=
;/a> {
+           attribute DOMString <a href=3D#dom-tr-align title=3Ddom-tr=
-align>align</a>;
+           attribute DOMString <a href=3D#dom-tr-ch title=3Ddom-tr-ch=
>ch</a>;
+           attribute DOMString <a href=3D#dom-tr-choff title=3Ddom-tr=
-chOff>chOff</a>;
+           attribute DOMString <a href=3D#dom-tr-valign title=3Ddom-t=
r-vAlign>vAlign</a>;
+
+  [TreatNullAs=3DEmptyString] attribute DOMString <a href=3D#dom-tr-b=
gcolor title=3Ddom-tr-bgColor>bgColor</a>;
+};</pre>
+
+  <p>The <dfn id=3Ddom-tr-align title=3Ddom-tr-align><cod=
e>align</code></dfn> IDL attribute of the <code><=
a href=3D#the-tr-element>tr</a></code>
+  element must <a href=3D#reflect>reflect</a> the content at=
tribute of the same name.</p>
+
+  <p>The <dfn id=3Ddom-tr-ch title=3Ddom-tr-ch><code>c=
h</code></dfn> IDL attribute of the <code><a href=3D=
#the-tr-element>tr</a></code> element
+  must <a href=3D#reflect>reflect</a> the element's <code=
 title=3Dattr-tr-char><a href=3D#attr-tr-char>char</a><=
/code> content
+  attribute.</p>
+
+  <p>The <dfn id=3Ddom-tr-choff title=3Ddom-tr-chOff><cod=
e>chOff</code></dfn> IDL attribute of the <code><=
a href=3D#the-tr-element>tr</a></code>
+  element must <a href=3D#reflect>reflect</a> the element's =
<code title=3Dattr-tr-charoff><a href=3D#attr-tr-charoff>char=
off</a></code>
+  content attribute.</p>
+
+  <p>The <dfn id=3Ddom-tr-valign title=3Ddom-tr-vAlign><c=
ode>vAlign</code></dfn> IDL attribute of the <code>&=
lt;a href=3D#the-tr-element>tr</a></code>
+  element must <a href=3D#reflect>reflect</a> the element's =
<code title=3Dattr-tr-valign><a href=3D#attr-tr-valign>valign=
</a></code> content
+  attribute.</p>
+
+  <p>The <dfn id=3Ddom-tr-bgcolor title=3Ddom-tr-bgColor>&lt=
;code>bgColor</code></dfn> IDL attribute of the <code&g=
t;<a href=3D#the-tr-element>tr</a></code>
+  element must <a href=3D#reflect>reflect</a> the element's =
<code title=3Dattr-tr-bgcolor><a href=3D#attr-tr-bgcolor>bgco=
lor</a></code>
+  content attribute.</p>
+
+  <hr><pre class=3Didl>partial interface <a href=3D#htmlu=
listelement id=3DHTMLUListElement-partial>HTMLUListElement</a> {
+           attribute boolean <a href=3D#dom-ul-compact title=3Ddom-ul=
-compact>compact</a>;
+           attribute DOMString <a href=3D#dom-ul-type title=3Ddom-ul-=
type>type</a>;
+};</pre>
+
+  <p>The <dfn id=3Ddom-ul-compact title=3Ddom-ul-compact>&lt=
;code>compact</code></dfn> and <dfn id=3Ddom-ul-type ti=
tle=3Ddom-ul-type><code>type</code></dfn> IDL attrib=
utes of the <code><a href=3D#the-ul-element>ul</a></=
code> element must
+  <a href=3D#reflect>reflect</a> the respective content attr=
ibutes of the same name.</p>
+
+  <hr><p>User agents must treat <code><a href=3D#xm=
p>xmp</a></code> elements in a manner equivalent to <co=
de><a href=3D#the-pre-element>pre</a></code>
+  elements in terms of semantics and for purposes of rendering. (The par=
ser has special behavior for
+  this element though.)</p>
+
+  <hr><p>The <code><a href=3D#blink>blink</a&=
gt;</code>, <code><a href=3D#bgsound>bgsound</a>&=
lt;/code>, <code><a href=3D#isindex-0>isindex</a>&lt=
;/code>, <code><a href=3D#multicol>multicol</a></=
code>,
+  <code><a href=3D#nextid>nextid</a></code>, &lt=
;code><a href=3D#rb>rb</a></code>, and <code>&=
lt;a href=3D#spacer>spacer</a></code> elements must use th=
e
+  <code><a href=3D#htmlunknownelement>HTMLUnknownElement<=
/a></code> interface.</p> <!-- has to be explicitly lis=
ted because
+  technically we define the elements in the spec, albeit as obsolete, an=
d then we say that only
+  elements not defined in this spec use HTMLUnknownElement. -->
+
+  <hr><pre class=3Didl>partial interface <a href=3D#docum=
ent id=3DDocument-partial>Document</a> {
+  [TreatNullAs=3DEmptyString] attribute DOMString <a href=3D#dom-docu=
ment-fgcolor title=3Ddom-document-fgColor>fgColor</a>;
+  [TreatNullAs=3DEmptyString] attribute DOMString <a href=3D#dom-docu=
ment-linkcolor title=3Ddom-document-linkColor>linkColor</a>;
+  [TreatNullAs=3DEmptyString] attribute DOMString <a href=3D#dom-docu=
ment-vlinkcolor title=3Ddom-document-vlinkColor>vlinkColor</a>;
+  [TreatNullAs=3DEmptyString] attribute DOMString <a href=3D#dom-docu=
ment-alinkcolor title=3Ddom-document-alinkColor>alinkColor</a>;
+  [TreatNullAs=3DEmptyString] attribute DOMString <a href=3D#dom-docu=
ment-bgcolor title=3Ddom-document-bgColor>bgColor</a>;
+
+  readonly attribute <a href=3D#htmlcollection>HTMLCollection</=
a> <a href=3D#dom-document-anchors title=3Ddom-document-anchors>=
anchors</a>;
+  readonly attribute <a href=3D#htmlcollection>HTMLCollection</=
a> <a href=3D#dom-document-applets title=3Ddom-document-applets>=
applets</a>;
+
+  void <a href=3D#dom-document-clear title=3Ddom-document-clear>cl=
ear</a>();
+  void <a href=3D#dom-document-captureevents title=3Ddom-document-cap=
tureEvents>captureEvents</a>(long dummy);
+  void <a href=3D#dom-document-releaseevents title=3Ddom-document-rel=
easeEvents>releaseEvents</a>(long dummy);
+
+  readonly attribute <a href=3D#htmlallcollection>HTMLAllCollectio=
n</a> <a href=3D#dom-document-all title=3Ddom-document-all>al=
l</a>;
+};</pre>
+
+  <p>The attributes of the <code><a href=3D#document>D=
ocument</a></code> object listed in the first column of the f=
ollowing
+  table must <a href=3D#reflect>reflect</a> the content attr=
ibute on <a href=3D#the-body-element-0>the body element</a> w=
ith the
+  name given in the corresponding cell in the second column on the same =
row, if <a href=3D#the-body-element-0>the body
+  element</a> is a <code><a href=3D#the-body-element>b=
ody</a></code> element (as opposed to a <code><a hre=
f=3D#frameset>frameset</a></code> element).
+  When there is no <a href=3D#the-body-element-0 title=3D"the bo=
dy element">body element</a> or if it is a
+  <code><a href=3D#frameset>frameset</a></code> =
element, the attributes must instead return the empty string on getting a=
nd
+  do nothing on setting.</p>
+
+  <table><thead><tr><th> IDL attribute
+     <th> Content attribute
+   <tbody><tr><td><dfn id=3Ddom-document-fgcolor ti=
tle=3Ddom-document-fgColor><code>fgColor</code></dfn&gt=
;
+     <td><code title=3Dattr-body-text><a href=3D#attr-bod=
y-text>text</a></code>
+    <tr><td><dfn id=3Ddom-document-linkcolor title=3Ddom-=
document-linkColor><code>linkColor</code></dfn>
+     <td><code title=3Dattr-body-link><a href=3D#attr-bod=
y-link>link</a></code>
+    <tr><td><dfn id=3Ddom-document-vlinkcolor title=3Ddom=
-document-vlinkColor><code>vlinkColor</code></dfn>
+     <td><code title=3Dattr-body-vlink><a href=3D#attr-bo=
dy-vlink>vlink</a></code>
+    <tr><td><dfn id=3Ddom-document-alinkcolor title=3Ddom=
-document-alinkColor><code>alinkColor</code></dfn>
+     <td><code title=3Dattr-body-alink><a href=3D#attr-bo=
dy-alink>alink</a></code>
+    <tr><td><dfn id=3Ddom-document-bgcolor title=3Ddom-do=
cument-bgColor><code>bgColor</code></dfn>
+     <td><code title=3Dattr-body-bgcolor><a href=3D#attr-=
body-bgcolor>bgcolor</a></code>
+  </table><hr><p>The <dfn id=3Ddom-document-anchors=
 title=3Ddom-document-anchors><code>anchors</code></dfn=
> attribute must return an
+  <code><a href=3D#htmlcollection>HTMLCollection</a>&l=
t;/code> rooted at the <code><a href=3D#document>Document&=
lt;/a></code> node, whose filter matches only
+  <code><a href=3D#the-a-element>a</a></code> el=
ements with <code title=3Dattr-a-name><a href=3D#attr-a-name>=
name</a></code> attributes.</p>
+
+  <p>The <dfn id=3Ddom-document-applets title=3Ddom-document-ap=
plets><code>applets</code></dfn> attribute must retu=
rn an
+  <code><a href=3D#htmlcollection>HTMLCollection</a>&l=
t;/code> rooted at the <code><a href=3D#document>Document&=
lt;/a></code> node, whose filter matches only
+  <code><a href=3D#the-applet-element>applet</a></c=
ode> elements.</p>
+
+  <p>The <dfn id=3Ddom-document-clear title=3Ddom-document-clea=
r><code>clear()</code></dfn>, <dfn id=3Ddom-docum=
ent-captureevents title=3Ddom-document-captureEvents><code>captu=
reEvents()</code></dfn>, and <dfn id=3Ddom-document-releas=
eevents title=3Ddom-document-releaseEvents><code>releaseEvents()=
</code></dfn> methods must do nothing.</p>
+
+  <hr><p>The <dfn id=3Ddom-document-all title=3Ddom-docum=
ent-all><code>all</code></dfn> attribute must return=
 an
+  <code><a href=3D#htmlallcollection>HTMLAllCollection</a=
></code> rooted at the <code><a href=3D#document>Doc=
ument</a></code> node, whose filter matches all
+  elements.</p>
+
+  <p>The object returned for <code title=3Ddom-document-all>=
<a href=3D#dom-document-all>all</a></code> has several =
unusual
+  behaviors:</p>
+
+  <ul><li><p>The user agent must act as if the ToBoole=
an() operator in JavaScript converts the object
+   returned for <code title=3Ddom-document-all><a href=3D#dom-d=
ocument-all>all</a></code> to the false value.</li>
+
+   <li><p>The user agent must act as if, for the purposes of=
 the <code title=3D"">=3D=3D</code> and <code ti=
tle=3D"">!=3D</code> operators in JavaScript, the obje=
ct returned for <code title=3Ddom-document-all><a href=3D#dom-do=
cument-all>all</a></code> compares as equal to the <cod=
e title=3D"">undefined</code> and
+   <code title=3D"">null</code> values. (Compariso=
ns using the <code title=3D"">=3D=3D=3D</code> oper=
ator, and
+   comparisons to other values such as strings or objects, are unaffecte=
d.)</li>
+
+   <li><p>The user agent must act such that the <code tit=
le=3D"">typeof</code> operator in JavaScript
+   returns the string <code title=3D"">undefined</cod=
e> when applied to the object returned for <code title=3Ddom-docume=
nt-all><a href=3D#dom-document-all>all</a></code>.&l=
t;/li>
+
+  </ul><p class=3Dnote>These requirements are a <a href=3D=
#willful-violation>willful violation</a> of the JavaScript
+  specification current at the time of writing (ECMAScript edition 5). T=
he 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 <code title=3D"&=
quot;>undefined</code> for the purposes of
+  certain operators. This violation is motivated by a desire for compati=
bility with two classes of
+  legacy content: one that uses the presence of <code title=3Ddom-doc=
ument-all><a href=3D#dom-document-all>document.all</a><=
/code>
+  as a way to detect legacy user agents, and one that only supports thos=
e legacy user agents and
+  uses the <code title=3Ddom-document-all><a href=3D#dom-docume=
nt-all>document.all</a></code> object without testing for =
its
+  presence first. <a href=3D#refsECMA262>[ECMA262]</a></p=
>
+
+  <hr><pre class=3Didl>partial interface <a href=3D#windo=
w id=3DWindow-partial>Window</a> {
+  void <a href=3D#dom-window-captureevents title=3Ddom-window-capture=
Events>captureEvents</a>(long dummy);
+  void <a href=3D#dom-window-releaseevents title=3Ddom-window-release=
Events>releaseEvents</a>(long dummy);
+};</pre>
+
+  <p>The <dfn id=3Ddom-window-captureevents title=3Ddom-window-=
captureEvents><code>captureEvents()</code></dfn> and=
 <dfn id=3Ddom-window-releaseevents title=3Ddom-window-releaseEvents&g=
t;<code>releaseEvents()</code></dfn> methods must do no=
thing.</p>
+
+  </div>
+
+
+
+  <h2 id=3Diana><span class=3Dsecno>16 </span>IANA con=
siderations</h2>
+
+  <!-- http://www.w3.org/2002/06/registering-mediatype.html -->
+
+
+  <h3 id=3Dtext/html><span class=3Dsecno>16.1 </span>&=
lt;dfn><code>text/html</code></dfn></h3>
+
+  <p>This registration is for community review and will be submitt=
ed to the IESG for review,
+  approval, and registration with IANA.</p>
+
+  <!--
+   To: ietf-types at iana.org
+   Subject: Registration of media type text/html
+  -->
+
+  <!--
+   Obsoletes:
+   http://tools.ietf.org/html/rfc2854
+
+   Include a request to retire RFC 2854 persuant to section 6.4 of RFC 2=
026.
+  -->
+
+  <dl><dt>Type name:</dt>
+   <dd>text</dd>
+   <dt>Subtype name:</dt>
+   <dd>html</dd>
+   <dt>Required parameters:</dt>
+   <dd>No required parameters</dd>
+   <dt>Optional parameters:</dt>
+   <dd>
+    <dl><dt><code title=3D"">charset</cod=
e></dt>
+     <dd>
+
+      <p>The <code title=3D"">charset</code>=
 parameter may be provided to definitively specify the
+      <a href=3D"#document's-character-encoding">documen=
t's character encoding</a>, overriding any <a href=3D#character-=
encoding-declaration title=3D"character encoding
+      declaration">character encoding declarations</a> in =
the document. The parameter's value
+      must be one of the <a href=3D#encoding-label title=3D"enco=
ding label">labels</a> of the <a href=3D#encoding title=3D=
encoding>character encoding</a> used to serialize the file. <=
a href=3D#refsENCODING>[ENCODING]</a></p>
+
+     </dd>
+    </dl></dd>
+   <dt>Encoding considerations:</dt>
+   <dd>
+
+    8bit (see the section on <a href=3D#character-encoding-declaratio=
n title=3D"character encoding declaration">character encodin=
g
+    declarations</a>)
+
+   </dd>
+<!--ADD-TOPIC:Security-->
+   <dt>Security considerations:</dt>
+   <dd>
+
+    <p>Entire novels have been written about the security consider=
ations that apply to HTML
+    documents. Many are listed in this document, to which the reader is =
referred for more details.
+    Some general concerns bear mentioning here, however:</p>
+
+    <p>HTML is scripted language, and has a large number of APIs (=
some of which are described in
+    this document). Script can expose the user to potential risks of inf=
ormation leakage, credential
+    leakage, cross-site scripting attacks, cross-site request forgeries,=
 and a host of other
+    problems. While the designs in this specification are intended to be=
 safe if implemented
+    correctly, a full implementation is a massive undertaking and, as wi=
th any software, user agents
+    are likely to have security bugs.</p>
+
+    <p>Even without scripting, there are specific features in HTML=
 which, for historical reasons,
+    are required for broad compatibility with legacy content but that ex=
pose the user to unfortunate
+    security problems. In particular, the <code><a href=3D#the-=
img-element>img</a></code> element can be used in conjunct=
ion with
+    some other features as a way to effect a port scan from the user's l=
ocation on the Internet.
+    This can expose local network topologies that the attacker would oth=
erwise not be able to
+    determine.</p>
+
+    <p>HTML relies on a compartmentalization scheme sometimes know=
n as the <i>same-origin
+    policy</i>. An <a href=3D#origin>origin</a> in mos=
t cases consists of all the pages served from the same
+    host, on the same port, using the same protocol.</p>
+
+    <p>It is critical, therefore, to ensure that any untrusted con=
tent that forms part of a site be
+    hosted on a different <a href=3D#origin>origin</a> than =
any sensitive content on that site. Untrusted
+    content can easily spoof any other page on the same origin, read dat=
a from that origin, cause
+    scripts in that origin to execute, submit forms to and from that ori=
gin even if they are
+    protected from cross-site request forgery attacks by unique tokens, =
and make use of any
+    third-party resources exposed to or rights granted to that origin.&l=
t;/p>
+
+   </dd>
+<!--REMOVE-TOPIC:Security-->
+   <dt>Interoperability considerations:</dt>
+   <dd>
+    Rules for processing both conforming and non-conforming content
+    are defined in this specification.
+   </dd>
+   <dt>Published specification:</dt>
+   <dd id=3Dauthors-using-html>
+    This document is the relevant specification. Labeling a resource
+    with the <code><a href=3D#text/html>text/html</a>&=
lt;/code> type asserts that the resource is
+    an <a href=3D#html-documents title=3D"HTML documents"&g=
t;HTML document</a> using
+    <a href=3D#syntax>the HTML syntax</a>.
+   </dd>
+   <dt>Applications that use this media type:</dt>
+   <dd>
+    Web browsers, tools for processing Web content, HTML authoring
+    tools, search engines, validators.
+   </dd>
+   <dt>Additional information:</dt>
+   <dd>
+    <dl><dt>Magic number(s):</dt>
+     <dd>No sequence of bytes can uniquely identify an HTML
+     document. More information on detecting HTML documents is
+     available in the MIME Sniffing specification. <a href=3D#refsMIM=
ESNIFF>[MIMESNIFF]</a></dd>
+     <dt>File extension(s):</dt>
+     <dd>"<code title=3D"">html</code>&=
quot; and "<code title=3D"">htm</code>"
+     are commonly, but certainly not exclusively, used as the
+     extension for HTML documents.</dd>
+     <dt>Macintosh file type code(s):</dt>
+     <dd><code title=3D"">TEXT</code></dd=
>
+    </dl></dd>
+   <dt>Person & email address to contact for further infor=
mation:</dt>
+   <dd>Ian Hickson <ian at hixie.ch></dd>
+   <dt>Intended usage:</dt>
+   <dd>Common</dd>
+   <dt>Restrictions on usage:</dt>
+   <dd>No restrictions apply.</dd>
+   <dt>Author:</dt>
+   <dd>Ian Hickson <ian at hixie.ch></dd>
+   <dt>Change controller:</dt>
+   <dd>W3C</dd>
+  </dl><p>Fragment identifiers used with <code><a h=
ref=3D#text/html>text/html</a></code> resources either ref=
er to <a href=3D#the-indicated-part-of-the-document>the
+  indicated part of the document</a> or provide state information =
for in-page scripts.</p>
+
+
+
+
+  <h3 id=3Dmultipart/x-mixed-replace><span class=3Dsecno>16.=
2 </span><dfn><code>multipart/x-mixed-replace</code&=
gt;</dfn></h3>
+
+  <p>This registration is for community review and will be submitt=
ed to the IESG for review,
+  approval, and registration with IANA.</p>
+
+  <!--
+   To: ietf-types at iana.org
+   Subject: Registration of media type multipart/x-mixed-replace
+  -->
+
+  <dl><dt>Type name:</dt>
+   <dd>multipart</dd>
+   <dt>Subtype name:</dt>
+   <dd>x-mixed-replace</dd>
+   <dt>Required parameters:</dt>
+   <dd>
+    <ul class=3Dbrief><li><code title=3D"">b=
oundary</code> (defined in RFC2046) <a href=3D#refsRFC2046>[R=
FC2046]</a>
+    </ul></dd>
+   <dt>Optional parameters:</dt>
+   <dd>No optional parameters.</dd>
+   <dt>Encoding considerations:</dt>
+   <dd>binary</dd>
+<!--ADD-TOPIC:Security-->
+   <dt>Security considerations:</dt>
+   <dd>
+    Subresources of a <code><a href=3D#multipart/x-mixed-replac=
e>multipart/x-mixed-replace</a></code>
+    resource can be of any type, including types with non-trivial
+    security implications such as <code><a href=3D#text/html&gt=
;text/html</a></code>.
+   </dd>
+<!--REMOVE-TOPIC:Security-->
+   <dt>Interoperability considerations:</dt>
+   <dd>
+    None.
+   </dd>
+   <dt>Published specification:</dt>
+   <dd>
+    This specification describes processing rules for Web browsers.
+    Conformance requirements for generating resources with this type are=
 the same as for <code>multipart/mixed</code>. <a href=3D#=
refsRFC2046>[RFC2046]</a>
+   </dd>
+   <dt>Applications that use this media type:</dt>
+   <dd>
+    This type is intended to be used in resources generated by Web serve=
rs, for consumption by Web browsers.
+   </dd>
+   <dt>Additional information:</dt>
+   <dd>
+    <dl><dt>Magic number(s):</dt>
+     <dd>No sequence of bytes can uniquely identify a <code>=
<a href=3D#multipart/x-mixed-replace>multipart/x-mixed-replace</=
a></code> resource.</dd>
+     <dt>File extension(s):</dt>
+     <dd>No specific file extensions are recommended for this type=
.</dd>
+     <dt>Macintosh file type code(s):</dt>
+     <dd>No specific Macintosh file type codes are recommended for=
 this type.</dd>
+    </dl></dd>
+   <dt>Person & email address to contact for further infor=
mation:</dt>
+   <dd>Ian Hickson <ian at hixie.ch></dd>
+   <dt>Intended usage:</dt>
+   <dd>Common</dd>
+   <dt>Restrictions on usage:</dt>
+   <dd>No restrictions apply.</dd>
+   <dt>Author:</dt>
+   <dd>Ian Hickson <ian at hixie.ch></dd>
+   <dt>Change controller:</dt>
+   <dd>W3C</dd>
+  </dl><p>Fragment identifiers used with <code><a h=
ref=3D#multipart/x-mixed-replace>multipart/x-mixed-replace</a>&l=
t;/code> resources apply to each
+  body part as defined by the type used by that body part.</p>
+
+
+  <h3 id=3Dapplication/xhtml+xml><span class=3Dsecno>16.3 &l=
t;/span><dfn><code>application/xhtml+xml</code></=
dfn></h3>
+
+  <p>This registration is for community review and will be submitt=
ed to the IESG for review,
+  approval, and registration with IANA.</p>
+
+  <!--
+   To: ietf-types at iana.org
+   Subject: Registration of media type application/xhtml+xml
+  -->
+
+  <!--
+   Obsoletes:
+   http://tools.ietf.org/html/rfc3236
+  -->
+
+  <dl><dt>Type name:</dt>
+   <dd>application</dd>
+   <dt>Subtype name:</dt>
+   <dd>xhtml+xml</dd>
+   <dt>Required parameters:</dt>
+   <dd>Same as for <code>application/xml</code> <a =
href=3D#refsRFC3023>[RFC3023]</a></dd>
+   <dt>Optional parameters:</dt>
+   <dd>Same as for <code>application/xml</code> <a =
href=3D#refsRFC3023>[RFC3023]</a></dd>
+   <dt>Encoding considerations:</dt>
+   <dd>Same as for <code>application/xml</code> <a =
href=3D#refsRFC3023>[RFC3023]</a></dd>
+<!--ADD-TOPIC:Security-->
+   <dt>Security considerations:</dt>
+   <dd>Same as for <code>application/xml</code> <a =
href=3D#refsRFC3023>[RFC3023]</a></dd>
+<!--REMOVE-TOPIC:Security-->
+   <dt>Interoperability considerations:</dt>
+   <dd>Same as for <code>application/xml</code> <a =
href=3D#refsRFC3023>[RFC3023]</a></dd>
+   <dt id=3Dauthors-using-xhtml>Published specification:</dt&gt=
;
+   <dd>
+    Labeling a resource with the <code><a href=3D#application/x=
html+xml>application/xhtml+xml</a></code>
+    type asserts that the resource is an XML document that likely has
+    a root element from the <a href=3D#html-namespace-0>HTML names=
pace</a>. Thus, the
+    relevant specifications are the XML specification, the Namespaces
+    in XML specification, and this specification. <a href=3D#refsXML&=
gt;[XML]</a> <a href=3D#refsXMLNS>[XMLNS]</a>
+   </dd>
+   <dt>Applications that use this media type:</dt>
+   <dd>Same as for <code>application/xml</code> <a =
href=3D#refsRFC3023>[RFC3023]</a></dd>
+   <dt>Additional information:</dt>
+   <dd>
+    <dl><dt>Magic number(s):</dt>
+     <dd>Same as for <code>application/xml</code> <=
a href=3D#refsRFC3023>[RFC3023]</a></dd>
+     <dt>File extension(s):</dt>
+     <dd>"<code title=3D"">xhtml</code>=
" and "<code title=3D"">xht</code>"
+     are sometimes used as extensions for XML resources that have a
+     root element from the <a href=3D#html-namespace-0>HTML namesp=
ace</a>.</dd>
+     <dt>Macintosh file type code(s):</dt>
+     <dd><code title=3D"">TEXT</code></dd=
>
+    </dl></dd>
+   <dt>Person & email address to contact for further infor=
mation:</dt>
+   <dd>Ian Hickson <ian at hixie.ch></dd>
+   <dt>Intended usage:</dt>
+   <dd>Common</dd>
+   <dt>Restrictions on usage:</dt>
+   <dd>No restrictions apply.</dd>
+   <dt>Author:</dt>
+   <dd>Ian Hickson <ian at hixie.ch></dd>
+   <dt>Change controller:</dt>
+   <dd>W3C</dd>
+  </dl><p>Fragment identifiers used with <code><a h=
ref=3D#application/xhtml+xml>application/xhtml+xml</a></code&=
gt; resources have the same
+  semantics as with any <a href=3D#xml-mime-type>XML MIME type<=
/a>. <a href=3D#refsRFC3023>[RFC3023]</a></p>
+
+
+  <h3 id=3Dapplication/x-www-form-urlencoded><span class=3Dsecn=
o>16.4 </span><dfn><code>application/x-www-form-urle=
ncoded</code></dfn></h3>
+
+  <p>This registration is for community review and will be submitt=
ed to the IESG for review,
+  approval, and registration with IANA.</p>
+
+  <!--
+   To: ietf-types at iana.org
+   Subject: Registration of media type application/x-www-form-urlencoded
+  -->
+
+  <dl><dt>Type name:</dt>
+   <dd>application</dd>
+   <dt>Subtype name:</dt>
+   <dd>x-www-form-urlencoded</dd>
+   <dt>Required parameters:</dt>
+   <dd>No parameters</dd>
+   <dt>Optional parameters:</dt>
+   <dd>No parameters</dd>
+   <dt>Encoding considerations:</dt>
+   <dd>7bit (US-ASCII encoding of octets that themselves can be en=
coding text using any <a href=3D#ascii-compatible-character-encoding&g=
t;ASCII-compatible character encoding</a>)</dd>
+<!--ADD-TOPIC:Security-->
+   <dt>Security considerations:</dt>
+   <dd>
+    <p>In isolation, an <code><a href=3D#application/x-ww=
w-form-urlencoded>application/x-www-form-urlencoded</a></code=
>
+    payload poses no security risks. However, as this type is usually
+    used as part of a form submission, all the risks that apply to
+    HTML forms need to be considered in the context of this type.</p&=
gt;
+   </dd>
+<!--REMOVE-TOPIC:Security-->
+   <dt>Interoperability considerations:</dt>
+   <dd>
+    Rules for generating and processing
+    <code><a href=3D#application/x-www-form-urlencoded>appli=
cation/x-www-form-urlencoded</a></code> payloads are
+    defined in this specification.
+   </dd>
+   <dt>Published specification:</dt>
+   <dd>
+    This document is the relevant specification.
+    Algorithms for <a href=3D#application/x-www-form-urlencoded-encod=
ing-algorithm title=3D"application/x-www-form-urlencoded encoding al=
gorithm">encoding</a>
+    and <a href=3D#application/x-www-form-urlencoded-decoding-algorit=
hm title=3D"application/x-www-form-urlencoded decoding algorithm&quo=
t;>decoding</a> are defined.
+   </dd>
+   <dt>Applications that use this media type:</dt>
+   <dd>
+    Web browsers and servers.
+   </dd>
+   <dt>Additional information:</dt>
+   <dd>
+    <dl><dt>Magic number(s):</dt>
+     <dd>There is no reliable mechanism for recognising <code&g=
t;<a href=3D#application/x-www-form-urlencoded>application/x-www-fo=
rm-urlencoded</a></code> payloads.</dd>
+     <dt>File extension(s):</dt>
+     <dd>Not applicable.</dd>
+     <dt>Macintosh file type code(s):</dt>
+     <dd>Not applicable.</dd>
+    </dl></dd>
+   <dt>Person & email address to contact for further infor=
mation:</dt>
+   <dd>Ian Hickson <ian at hixie.ch></dd>
+   <dt>Intended usage:</dt>
+   <dd>Common</dd>
+   <dt>Restrictions on usage:</dt>
+   <dd>This type is only intended to be used to describe HTML form
+   submission payloads.</dd>
+   <dt>Author:</dt>
+   <dd>Ian Hickson <ian at hixie.ch></dd>
+   <dt>Change controller:</dt>
+   <dd>W3C</dd>
+  </dl><p>Fragment identifiers have no meaning with the <=
code><a href=3D#application/x-www-form-urlencoded>application/x-=
www-form-urlencoded</a></code>
+  type.</p>
+
+
+  <h3 id=3Dtext/cache-manifest><span class=3Dsecno>16.5 <=
/span><dfn><code>text/cache-manifest</code></dfn&=
gt;</h3>
+
+  <p>This registration is for community review and will be submitt=
ed
+  to the IESG for review, approval, and registration with IANA.</p&gt=
;
+
+  <!--
+   To: ietf-types at iana.org
+   Subject: Registration of media type text/cache-manifest
+  -->
+
+  <dl><dt>Type name:</dt>
+   <dd>text</dd>
+   <dt>Subtype name:</dt>
+   <dd>cache-manifest</dd>
+   <dt>Required parameters:</dt>
+   <dd>No parameters</dd>
+   <dt>Optional parameters:</dt>
+   <dd>
+    <dl><dt><code title=3D"">charset</cod=
e></dt>
+     <dd>
+
+      <p>The <code title=3D"">charset</code>=
 parameter may be provided. The parameter's value must be
+      "<code title=3D"">utf-8</code>". T=
his parameter serves no purpose; it is only allowed for
+      compatibility with legacy servers.</p>
+
+     </dd>
+    </dl></dd>
+   <dt>Encoding considerations:</dt>
+   <dd>8bit (always UTF-8)</dd>
+<!--ADD-TOPIC:Security-->
+   <dt>Security considerations:</dt>
+   <dd>
+    <p>Cache manifests themselves pose no immediate risk unless
+    sensitive information is included within the
+    manifest. Implementations, however, are required to follow
+    specific rules when populating a cache based on a cache manifest,
+    to ensure that certain origin-based restrictions are
+    honored. Failure to correctly implement these rules can result in
+    information leakage, cross-site scripting attacks, and the
+    like.</p>
+   </dd>
+<!--REMOVE-TOPIC:Security-->
+   <dt>Interoperability considerations:</dt>
+   <dd>
+    Rules for processing both conforming and non-conforming content
+    are defined in this specification.
+   </dd>
+   <dt>Published specification:</dt>
+   <dd>
+    This document is the relevant specification.
+   </dd>
+   <dt>Applications that use this media type:</dt>
+   <dd>
+    Web browsers.
+   </dd>
+   <dt>Additional information:</dt>
+   <dd>
+    <dl><dt>Magic number(s):</dt>
+     <dd>Cache manifests begin with the string "<code titl=
e=3D"">CACHE
+     MANIFEST</code>", followed by either a U+0020 SPACE char=
acter, a
+     U+0009 CHARACTER TABULATION (tab) character, a U+000A LINE FEED
+     (LF) character, or a U+000D CARRIAGE RETURN (CR) character.</dd&=
gt;
+     <dt>File extension(s):</dt>
+     <dd>"<code title=3D"">appcache</code&=
gt;"</dd>
+     <dt>Macintosh file type code(s):</dt>
+     <dd>No specific Macintosh file type codes are recommended for=
 this type.</dd>
+    </dl></dd>
+   <dt>Person & email address to contact for further infor=
mation:</dt>
+   <dd>Ian Hickson <ian at hixie.ch></dd>
+   <dt>Intended usage:</dt>
+   <dd>Common</dd>
+   <dt>Restrictions on usage:</dt>
+   <dd>No restrictions apply.</dd>
+   <dt>Author:</dt>
+   <dd>Ian Hickson <ian at hixie.ch></dd>
+   <dt>Change controller:</dt>
+   <dd>W3C</dd>
+  </dl><p>Fragment identifiers have no meaning with <code=
><a href=3D#text/cache-manifest>text/cache-manifest</a>&lt=
;/code> resources.</p>
+
+
+  <h3 id=3Dtext/ping><span class=3Dsecno>16.6 </span>&=
lt;dfn><code>text/ping</code></dfn></h3>
+
+  <p>This registration is for community review and will be submitt=
ed to the IESG for review,
+  approval, and registration with IANA.</p>
+
+  <!--
+   To: ietf-types at iana.org
+   Subject: Registration of media type text/ping
+  -->
+
+  <dl><dt>Type name:</dt>
+   <dd>text</dd>
+   <dt>Subtype name:</dt>
+   <dd>ping</dd>
+   <dt>Required parameters:</dt>
+   <dd>No parameters</dd>
+   <dt>Optional parameters:</dt>
+   <dd>
+    <dl><dt><code title=3D"">charset</cod=
e></dt>
+     <dd>
+
+      <p>The <code title=3D"">charset</code>=
 parameter may be provided. The parameter's value must be
+      "<code title=3D"">utf-8</code>". T=
his parameter serves no purpose; it is only allowed for
+      compatibility with legacy servers.</p>
+
+     </dd>
+    </dl></dd>
+   <dt>Encoding considerations:</dt>
+   <dd>Not applicable.</dd>
+<!--ADD-TOPIC:Security-->
+   <dt>Security considerations:</dt>
+   <dd>
+    <p>If used exclusively in the fashion described in the context=
 of
+    <a href=3D#hyperlink-auditing>hyperlink auditing</a>, th=
is type introduces no new
+    security concerns.</p>
+   </dd>
+<!--REMOVE-TOPIC:Security-->
+   <dt>Interoperability considerations:</dt>
+   <dd>
+    Rules applicable to this type are defined in this specification.
+   </dd>
+   <dt>Published specification:</dt>
+   <dd>
+    This document is the relevant specification.
+   </dd>
+   <dt>Applications that use this media type:</dt>
+   <dd>
+    Web browsers.
+   </dd>
+   <dt>Additional information:</dt>
+   <dd>
+    <dl><dt>Magic number(s):</dt>
+     <dd><code><a href=3D#text/ping>text/ping</a&gt=
;</code> resources always consist of the four
+     bytes 0x50 0x49 0x4E 0x47 (ASCII 'PING').</dd>
+     <dt>File extension(s):</dt>
+     <dd>No specific file extension is recommended for this type.&=
lt;/dd>
+     <dt>Macintosh file type code(s):</dt>
+     <dd>No specific Macintosh file type codes are recommended for=
 this type.</dd>
+    </dl></dd>
+   <dt>Person & email address to contact for further infor=
mation:</dt>
+   <dd>Ian Hickson <ian at hixie.ch></dd>
+   <dt>Intended usage:</dt>
+   <dd>Common</dd>
+   <dt>Restrictions on usage:</dt>
+   <dd>Only intended for use with HTTP POST requests generated as =
part
+   of a Web browser's processing of the <code title=3Dattr-hyperlink-=
ping><a href=3D#ping>ping</a></code> attribute.</=
dd>
+   <dt>Author:</dt>
+   <dd>Ian Hickson <ian at hixie.ch></dd>
+   <dt>Change controller:</dt>
+   <dd>W3C</dd>
+  </dl><p>Fragment identifiers have no meaning with <code=
><a href=3D#text/ping>text/ping</a></code> resources=
.</p>
+
+
+<!--TOPIC:Microdata-->
+  <h3 id=3Dapplication/microdata+json><span class=3Dsecno>16=
.7 </span><dfn><code>application/microdata+json</cod=
e></dfn></h3>
+
+  <p>This registration is for community review and will be submitt=
ed to the IESG for review,
+  approval, and registration with IANA.</p>
+
+  <!--
+   To: ietf-types at iana.org
+   Subject: Registration of media type application/microdata+json
+  -->
+
+  <dl><dt>Type name:</dt>
+   <dd>application</dd>
+   <dt>Subtype name:</dt>
+   <dd>microdata+json</dd>
+   <dt>Required parameters:</dt>
+   <dd>Same as for <code>application/json</code> <a=
 href=3D#refsJSON>[JSON]</a></dd>
+   <dt>Optional parameters:</dt>
+   <dd>Same as for <code>application/json</code> <a=
 href=3D#refsJSON>[JSON]</a></dd>
+   <dt>Encoding considerations:</dt>
+   <dd>8bit (always UTF-8)</dd>
+<!--ADD-TOPIC:Security-->
+   <dt>Security considerations:</dt>
+   <dd>Same as for <code>application/json</code> <a=
 href=3D#refsJSON>[JSON]</a></dd>
+<!--REMOVE-TOPIC:Security-->
+   <dt>Interoperability considerations:</dt>
+   <dd>Same as for <code>application/json</code> <a=
 href=3D#refsJSON>[JSON]</a></dd>
+   <dt>Published specification:</dt>
+   <dd>
+
+    Labeling a resource with the <code><a href=3D#application/m=
icrodata+json>application/microdata+json</a></code> type a=
sserts that the
+    resource is a JSON text that consists of an object with a single ent=
ry called "<code title=3D"">items</code>"=
 consisting of an array of entries, each of which consists of an object
+    with an entry called "<code title=3D"">id</c=
ode>" whose value is a string, an entry called "<code tit=
le=3D"">type</code>" whose value is another strin=
g, and an entry called "<code title=3D"">properties&=
lt;/code>" whose value is an object whose entries each have a val=
ue consisting
+    of an array of either objects or strings, the objects being of the s=
ame form as the objects in
+    the aforementioned "<code title=3D"">items</=
code>" entry. Thus, the relevant specifications are
+    the JSON specification and this specification. <a href=3D#refsJSO=
N>[JSON]</a>
+
+   </dd>
+   <dt>Applications that use this media type:</dt>
+   <dd>
+
+    <p>Applications that transfer data intended for use with HTML'=
s microdata feature, especially in
+    the context of drag-and-drop, are the primary application class for =
this type.</p>
+
+   </dd>
+   <dt>Additional information:</dt>
+   <dd>
+    <dl><dt>Magic number(s):</dt>
+     <dd>Same as for <code>application/json</code> &lt=
;a href=3D#refsJSON>[JSON]</a></dd>
+     <dt>File extension(s):</dt>
+     <dd>Same as for <code>application/json</code> &lt=
;a href=3D#refsJSON>[JSON]</a></dd>
+     <dt>Macintosh file type code(s):</dt>
+     <dd>Same as for <code>application/json</code> &lt=
;a href=3D#refsJSON>[JSON]</a></dd>
+    </dl></dd>
+   <dt>Person & email address to contact for further infor=
mation:</dt>
+   <dd>Ian Hickson <ian at hixie.ch></dd>
+   <dt>Intended usage:</dt>
+   <dd>Common</dd>
+   <dt>Restrictions on usage:</dt>
+   <dd>No restrictions apply.</dd>
+   <dt>Author:</dt>
+   <dd>Ian Hickson <ian at hixie.ch></dd>
+   <dt>Change controller:</dt>
+   <dd>W3C</dd>
+  </dl><p>Fragment identifiers used with <code><a h=
ref=3D#application/microdata+json>application/microdata+json</a>=
</code> resources have the same
+  semantics as when used with <code>application/json</code> =
(namely, at the time of writing, no
+  semantics at all). <a href=3D#refsJSON>[JSON]</a></p&gt=
;
+
+
+<!--TOPIC:HTML-->
+  <h3 id=3Dping-from><span class=3Dsecno>16.8 </span>&=
lt;dfn title=3Dhttp-ping-from><code>Ping-From</code></d=
fn></h3>
+
+  <p>This section describes a header for registration in the Perma=
nent Message Header Field
+  Registry. <a href=3D#refsRFC3864>[RFC3864]</a></p>
+
+  <dl><dt>Header field name:</dt>
+   <dd>Ping-From</dd>
+   <dt>Applicable protocol:</dt>
+   <dd>http</dd>
+   <dt>Status:</dt>
+   <dd>standard</dd>
+   <dt>Author/Change controller:</dt>
+   <dd>W3C</dd>
+   <dt>Specification document(s):</dt>
+   <dd>
+    This document is the relevant specification.
+   </dd>
+   <dt>Related information:</dt>
+   <dd>None.</dd>
+  </dl><h3 id=3Dping-to><span class=3Dsecno>16.9 </=
span><dfn title=3Dhttp-ping-to><code>Ping-To</code>&=
lt;/dfn></h3>
+
+  <p>This section describes a header for registration in the Perma=
nent Message Header Field
+  Registry. <a href=3D#refsRFC3864>[RFC3864]</a></p>
+
+  <dl><dt>Header field name:</dt>
+   <dd>Ping-To</dd>
+   <dt>Applicable protocol:</dt>
+   <dd>http</dd>
+   <dt>Status:</dt>
+   <dd>standard</dd>
+   <dt>Author/Change controller:</dt>
+   <dd>W3C</dd>
+   <dt>Specification document(s):</dt>
+   <dd>
+    This document is the relevant specification.
+   </dd>
+   <dt>Related information:</dt>
+   <dd>None.</dd>
+  </dl><h3 id=3Dweb+-scheme-prefix><span class=3Dsecno&gt=
;16.10 </span><dfn title=3Dscheme-web><code>web+</co=
de> scheme prefix</dfn></h3>
+
+  <p>This section describes a convention for use with the IANA URI=
 scheme registry. It does not
+  itself register a specific scheme. <a href=3D#refsRFC4395>[RFC43=
95]</a></p>
+
+  <dl><dt>URI scheme name:</dt>
+   <dd>
+    Schemes starting with the four characters "<code title=3D&qu=
ot;">web+</code>" followed by one or more letters in t=
he range
+    <code title=3D"">a</code>-<code title=3D&qu=
ot;">z</code>.
+   </dd>
+   <dt>Status:</dt>
+   <dd>permanent</dd>
+   <dt>URI scheme syntax:</dt>
+   <dd>Scheme-specific.</dd>
+   <dt>URI scheme semantics:</dt>
+   <dd>Scheme-specific.</dd>
+   <dt>Encoding considerations:</dt>
+   <dd>All "<code title=3D"">web+</code&gt=
;" schemes should use UTF-8 encodings where relevant.</dd>
+   <dt>Applications/protocols that use this URI scheme name:</d=
t>
+   <dd>Scheme-specific.</dd>
+   <dt>Interoperability considerations:</dt>
+   <dd>The scheme is expected to be used in the context of Web app=
lications.</dd>
+<!--ADD-TOPIC:Security-->
+   <dt>Security considerations:</dt>
+   <dd>
+
+    Any Web page is able to register a handler for all "<code ti=
tle=3D"">web+</code>" schemes. As
+    such, these schemes must not be used for features intended to be cor=
e platform features (e.g.
+    network transfer protocols like HTTP or FTP). Similarly, such scheme=
s must not store
+    confidential information in their URLs, such as usernames, passwords=
, personal information, or
+    confidential project names.
+
+   </dd>
+<!--REMOVE-TOPIC:Security-->
+   <dt>Contact:</dt>
+   <dd>Ian Hickson <ian at hixie.ch></dd>
+   <dt>Author/Change controller:</dt>
+   <dd>Ian Hickson <ian at hixie.ch></dd>
+   <dt>References:</dt>
+   <dd>
+    <cite>Custom scheme and content handlers</cite>, HTML Li=
ving Standard:
+    <a href=3D#custom-handlers>http://www.whatwg.org/specs/web-app=
s/current-work/#custom-handlers</a>
+   </dd>
+  </dl><h2 class=3Dno-num id=3Dindex>Index</h2>
+
+  <div class=3Dimpl>
+
+  <p>The following sections only cover conforming elements and fea=
tures.</p>
+
+  </div>
+
+  <h3 class=3Dno-num id=3Delements-1>Elements</h3>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <!-- XXX this index doesn't list the palpable elements -->
+
+  <table><caption>List of elements</caption>
+   <thead><tr><th> Element
+     <th> Description
+     <th> Categories
+     <th> Parents†
+     <th> Children
+     <th> Attributes
+     <th> Interface
+   <tbody><tr><th><code><a href=3D#the-a-elem=
ent>a</a></code></th>
+     <td>Hyperlink</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>;
+         <a href=3D#phrasing-content title=3D"Phrasing content&q=
uot;>phrasing</a>*;
+         <a href=3D#interactive-content title=3D"Interactive con=
tent">interactive</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#transparent>transparent</a>*</t=
d>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a>;
+         <code title=3Dattr-hyperlink-href><a href=3D#attr-hype=
rlink-href>href</a></code>;
+         <code title=3Dattr-hyperlink-target><a href=3D#attr-hy=
perlink-target>target</a></code>;
+         <code title=3Dattr-hyperlink-download><a href=3D#attr-=
hyperlink-download>download</a></code>;
+         <code title=3Dattr-hyperlink-ping><a href=3D#ping>p=
ing</a></code>;
+         <code title=3Dattr-hyperlink-rel><a href=3D#attr-hyper=
link-rel>rel</a></code>;
+         <code title=3Dattr-hyperlink-hreflang><a href=3D#attr-=
hyperlink-hreflang>hreflang</a></code>;
+         <code title=3Dattr-hyperlink-type><a href=3D#attr-hype=
rlink-type>type</a></code></td>
+     <td><code><a href=3D#htmlanchorelement>HTMLAnchor=
Element</a></code></td>
+    <tr><th><code><a href=3D#the-abbr-element>ab=
br</a></code></th>
+     <td>Abbreviation</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>;
+         <a href=3D#phrasing-content title=3D"Phrasing content&q=
uot;>phrasing</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a></td>
+     <td><code><a href=3D#htmlelement>HTMLElement</=
a></code></td>
+    <tr><th><code><a href=3D#the-address-element&gt=
;address</a></code></th>
+     <td>Contact information for a page or <code><a href=3D=
#the-article-element>article</a></code> element</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a></td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a></td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>*</td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a></td>
+     <td><code><a href=3D#htmlelement>HTMLElement</=
a></code></td>
+    <tr><th><code><a href=3D#the-area-element>ar=
ea</a></code></th>
+     <td>Hyperlink or dead area on an image map</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>;
+         <a href=3D#phrasing-content title=3D"Phrasing content&q=
uot;>phrasing</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a>*</td>
+     <td>empty</td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a>;
+         <code title=3Dattr-area-alt><a href=3D#attr-area-alt&g=
t;alt</a></code>;
+         <code title=3Dattr-area-coords><a href=3D#attr-area-co=
ords>coords</a></code>;
+         <code title=3Dattr-area-shape><a href=3D#attr-area-sha=
pe>shape</a></code>;
+         <code title=3Dattr-hyperlink-href><a href=3D#attr-hype=
rlink-href>href</a></code>;
+         <code title=3Dattr-hyperlink-target><a href=3D#attr-hy=
perlink-target>target</a></code>;
+         <code title=3Dattr-hyperlink-download><a href=3D#attr-=
hyperlink-download>download</a></code>;
+         <code title=3Dattr-hyperlink-ping><a href=3D#ping>p=
ing</a></code>;
+         <code title=3Dattr-hyperlink-rel><a href=3D#attr-hyper=
link-rel>rel</a></code>;
+         <code title=3Dattr-hyperlink-hreflang><a href=3D#attr-=
hyperlink-hreflang>hreflang</a></code>;
+         <code title=3Dattr-hyperlink-type><a href=3D#attr-hype=
rlink-type>type</a></code></td>
+     <td><code><a href=3D#htmlareaelement>HTMLAreaElem=
ent</a></code></td>
+    <tr><th><code><a href=3D#the-article-element&gt=
;article</a></code></th>
+     <td>Self-contained syndicatable or reusable composition</t=
d>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>;
+         <a href=3D#sectioning-content title=3D"Sectioning conte=
nt">sectioning</a></td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a></td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a></td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a></td>
+     <td><code><a href=3D#htmlelement>HTMLElement</=
a></code></td>
+    <tr><th><code><a href=3D#the-aside-element>a=
side</a></code></th>
+     <td>Sidebar for tangentially related content</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>;
+         <a href=3D#sectioning-content title=3D"Sectioning conte=
nt">sectioning</a></td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a></td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a></td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a></td>
+     <td><code><a href=3D#htmlelement>HTMLElement</=
a></code></td>
+    <tr><th><code><a href=3D#the-audio-element>a=
udio</a></code></th>
+     <td>Audio player</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>;
+         <a href=3D#phrasing-content title=3D"Phrasing content&q=
uot;>phrasing</a>;
+         <a href=3D#embedded-content title=3D"Embedded content&q=
uot;>embedded</a>;
+         <a href=3D#interactive-content title=3D"Interactive con=
tent">interactive</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><code><a href=3D#the-source-element>source&lt=
;/a></code>*;
+         <a href=3D#transparent>transparent</a>*</td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a>;
+         <code title=3Dattr-media-src><a href=3D#attr-media-src=
>src</a></code>;
+         <code title=3Dattr-media-crossorigin><a href=3D#attr-m=
edia-crossorigin>crossorigin</a></code>;
+         <code title=3Dattr-media-preload><a href=3D#attr-media=
-preload>preload</a></code>;
+         <code title=3Dattr-media-autoplay><a href=3D#attr-medi=
a-autoplay>autoplay</a></code>;
+         <code title=3Dattr-media-mediagroup><a href=3D#attr-me=
dia-mediagroup>mediagroup</a></code>;
+         <code title=3Dattr-media-loop><a href=3D#attr-media-lo=
op>loop</a></code>;
+         <code title=3Dattr-media-muted><a href=3D#attr-media-m=
uted>muted</a></code>;
+         <code title=3Dattr-media-controls><a href=3D#attr-medi=
a-controls>controls</a></code></td>
+     <td><code><a href=3D#htmlaudioelement>HTMLAudioEl=
ement</a></code></td>
+    <tr><th><code><a href=3D#the-b-element>b<=
/a></code></th>
+     <td>Keywords</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>;
+         <a href=3D#phrasing-content title=3D"Phrasing content&q=
uot;>phrasing</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a></td>
+     <td><code><a href=3D#htmlelement>HTMLElement</=
a></code></td>
+    <tr><th><code><a href=3D#the-base-element>ba=
se</a></code></th>
+     <td>Base URL and default target <a href=3D#browsing-contex=
t>browsing context</a> for <a href=3D#attr-hyperlink-target t=
itle=3Dattr-hyperlink-target>hyperlinks</a> and <a href=3D#at=
tr-fs-target title=3Dattr-fs-target>forms</a></td>
+     <td><a href=3D#metadata-content title=3D"Metadata con=
tent">metadata</a></td>
+     <td><code><a href=3D#the-head-element>head</a&=
gt;</code>;
+         <code><a href=3D#the-template-element>template</=
a></code></td>
+     <td>empty</td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a>;
+         <code title=3Dattr-base-href><a href=3D#attr-base-href=
>href</a></code>;
+         <code title=3Dattr-base-target><a href=3D#attr-base-ta=
rget>target</a></code></td>
+     <td><code><a href=3D#htmlbaseelement>HTMLBaseElem=
ent</a></code></td>
+    <tr><th><code><a href=3D#the-bdi-element>bdi=
</a></code></th>
+     <td>Text directionality isolation</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>;
+         <a href=3D#phrasing-content title=3D"Phrasing content&q=
uot;>phrasing</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a></td>
+     <td><code><a href=3D#htmlelement>HTMLElement</=
a></code></td>
+    <tr><th><code><a href=3D#the-bdo-element>bdo=
</a></code></th>
+     <td>Text directionality formatting</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>;
+         <a href=3D#phrasing-content title=3D"Phrasing content&q=
uot;>phrasing</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a></td>
+     <td><code><a href=3D#htmlelement>HTMLElement</=
a></code></td>
+    <tr><th><code><a href=3D#the-blockquote-element=
>blockquote</a></code></th>
+     <td>A section quoted from another source</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>;
+         <a href=3D#sectioning-root title=3D"Sectioning root&quo=
t;>sectioning root</a></td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a></td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a></td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a>;
+         <code title=3Dattr-blockquote-cite><a href=3D#attr-blo=
ckquote-cite>cite</a></code></td>
+     <td><code><a href=3D#htmlquoteelement>HTMLQuoteEl=
ement</a></code></td>
+    <tr><th><code><a href=3D#the-body-element>bo=
dy</a></code></th>
+     <td>Document body</td>
+     <td><a href=3D#sectioning-root title=3D"Sectioning ro=
ot">sectioning root</a></td>
+     <td><code><a href=3D#the-html-element>html</a&=
gt;</code></td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a></td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a>;
+         <code title=3Dhandler-window-onafterprint><a href=3D#h=
andler-window-onafterprint>onafterprint</a></code>;
+         <code title=3Dhandler-window-onbeforeprint><a href=3D#=
handler-window-onbeforeprint>onbeforeprint</a></code>;
+         <code title=3Dhandler-window-onbeforeunload><a href=3D=
#handler-window-onbeforeunload>onbeforeunload</a></code>;
+         <code title=3Dhandler-window-onhashchange><a href=3D#h=
andler-window-onhashchange>onhashchange</a></code>;
+         <code title=3Dhandler-window-onmessage><a href=3D#hand=
ler-window-onmessage>onmessage</a></code>;
+         <code title=3Dhandler-window-onoffline><a href=3D#hand=
ler-window-onoffline>onoffline</a></code>;
+         <code title=3Dhandler-window-ononline><a href=3D#handl=
er-window-ononline>ononline</a></code>;
+         <code title=3Dhandler-window-onpagehide><a href=3D#han=
dler-window-onpagehide>onpagehide</a></code>;
+         <code title=3Dhandler-window-onpageshow><a href=3D#han=
dler-window-onpageshow>onpageshow</a></code>;
+         <code title=3Dhandler-window-onpopstate><a href=3D#han=
dler-window-onpopstate>onpopstate</a></code>;
+         <code title=3Dhandler-window-onresize><a href=3D#handl=
er-window-onresize>onresize</a></code>;
+         <code title=3Dhandler-window-onstorage><a href=3D#hand=
ler-window-onstorage>onstorage</a></code>;
+         <code title=3Dhandler-window-onunload><a href=3D#handl=
er-window-onunload>onunload</a></code></td>
+     <td><code><a href=3D#htmlbodyelement>HTMLBodyElem=
ent</a></code></td>
+    <tr><th><code><a href=3D#the-br-element>br&l=
t;/a></code></th>
+     <td>Line break, e.g. in poem or postal address</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>;
+         <a href=3D#phrasing-content title=3D"Phrasing content&q=
uot;>phrasing</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td>empty</td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a></td>
+     <td><code><a href=3D#htmlbrelement>HTMLBRElement&=
lt;/a></code></td>
+    <tr><th><code><a href=3D#the-button-element>=
button</a></code></th>
+     <td>Button control</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>;
+         <a href=3D#phrasing-content title=3D"Phrasing content&q=
uot;>phrasing</a>;
+         <a href=3D#interactive-content title=3D"Interactive con=
tent">interactive</a>;
+         <a href=3D#category-listed title=3Dcategory-listed>listed=
</a>;
+         <a href=3D#category-label title=3Dcategory-label>labelabl=
e</a>;
+         <a href=3D#category-submit title=3Dcategory-submit>submit=
table</a>;
+         <a href=3D#category-form-attr title=3Dcategory-form-attr>=
reassociateable</a>;
+         <a href=3D#form-associated-element title=3D"Form-associ=
ated element">form-associated</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a>*</td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a>;
+         <code title=3Dattr-fe-autofocus><a href=3D#attr-fe-aut=
ofocus>autofocus</a></code>;
+         <code title=3Dattr-fe-disabled><a href=3D#attr-fe-disa=
bled>disabled</a></code>;
+         <code title=3Dattr-fae-form><a href=3D#attr-fae-form&g=
t;form</a></code>;
+         <code title=3Dattr-fs-formaction><a href=3D#attr-fs-fo=
rmaction>formaction</a></code>;
+         <code title=3Dattr-fs-formenctype><a href=3D#attr-fs-f=
ormenctype>formenctype</a></code>;
+         <code title=3Dattr-fs-formmethod><a href=3D#attr-fs-fo=
rmmethod>formmethod</a></code>;
+         <code title=3Dattr-fs-formnovalidate><a href=3D#attr-f=
s-formnovalidate>formnovalidate</a></code>;
+         <code title=3Dattr-fs-formtarget><a href=3D#attr-fs-fo=
rmtarget>formtarget</a></code>;
+         <code title=3Dattr-button-menu><a href=3D#attr-button-=
menu>menu</a></code>;
+         <code title=3Dattr-fe-name><a href=3D#attr-fe-name>=
name</a></code>;
+         <code title=3Dattr-button-type><a href=3D#attr-button-=
type>type</a></code>;
+         <code title=3Dattr-button-value><a href=3D#attr-button=
-value>value</a></code></td>
+     <td><code><a href=3D#htmlbuttonelement>HTMLButton=
Element</a></code></td>
+    <tr><th><code><a href=3D#the-canvas-element>=
canvas</a></code></th>
+     <td>Scriptable bitmap canvas</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>;
+         <a href=3D#phrasing-content title=3D"Phrasing content&q=
uot;>phrasing</a>;
+         <a href=3D#embedded-content title=3D"Embedded content&q=
uot;>embedded</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#transparent>transparent</a></td=
>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a>;
+         <code title=3Dattr-canvas-width><a href=3D#attr-canvas=
-width>width</a></code>;
+         <code title=3Dattr-canvas-height><a href=3D#attr-canva=
s-height>height</a></code></td>
+     <td><code><a href=3D#htmlcanvaselement>HTMLCanvas=
Element</a></code></td>
+    <tr><th><code><a href=3D#the-caption-element&gt=
;caption</a></code></th>
+     <td>Table caption</td>
+     <td>none</td>
+     <td><code><a href=3D#the-table-element>table</=
a></code>;
+         <code><a href=3D#the-template-element>template</=
a></code></td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>*</td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a></td>
+     <td><code><a href=3D#htmltablecaptionelement>HTML=
TableCaptionElement</a></code></td>
+    <tr><th><code><a href=3D#the-cite-element>ci=
te</a></code></th>
+     <td>Title of a work</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>;
+         <a href=3D#phrasing-content title=3D"Phrasing content&q=
uot;>phrasing</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a></td>
+     <td><code><a href=3D#htmlelement>HTMLElement</=
a></code></td>
+    <tr><th><code><a href=3D#the-code-element>co=
de</a></code></th>
+     <td>Computer code</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>;
+         <a href=3D#phrasing-content title=3D"Phrasing content&q=
uot;>phrasing</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a></td>
+     <td><code><a href=3D#htmlelement>HTMLElement</=
a></code></td>
+    <tr><th><code><a href=3D#the-col-element>col=
</a></code></th>
+     <td>Table column</td>
+     <td>none</td>
+     <td><code><a href=3D#the-colgroup-element>colgrou=
p</a></code>;
+         <code><a href=3D#the-template-element>template</=
a></code></td>
+     <td>empty</td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a>;
+         <code title=3Dattr-col-span><a href=3D#attr-col-span&g=
t;span</a></code></td>
+     <td><code><a href=3D#htmltablecolelement>HTMLTabl=
eColElement</a></code></td>
+    <tr><th><code><a href=3D#the-colgroup-element&g=
t;colgroup</a></code></th>
+     <td>Group of columns in a table</td>
+     <td>none</td>
+     <td><code><a href=3D#the-table-element>table</=
a></code>;
+         <code><a href=3D#the-template-element>template</=
a></code></td>
+     <td><code><a href=3D#the-col-element>col</a&gt=
;</code>*;
+         <a href=3D#script-supporting-elements>script-supporting e=
lements</a>*</td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a>;
+         <code title=3Dattr-colgroup-span><a href=3D#attr-colgr=
oup-span>span</a></code></td>
+     <td><code><a href=3D#htmltablecolelement>HTMLTabl=
eColElement</a></code></td>
+    <tr><th><code><a href=3D#the-data-element>da=
ta</a></code></th>
+     <td>Machine-readable equivalent</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>;
+         <a href=3D#phrasing-content title=3D"Phrasing content&q=
uot;>phrasing</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a>;
+         <code title=3Dattr-data-value><a href=3D#attr-data-val=
ue>value</a></code></td>
+     <td><code><a href=3D#htmldataelement>HTMLDataElem=
ent</a></code></td>
+    <tr><th><code><a href=3D#the-datalist-element&g=
t;datalist</a></code></th>
+     <td>Container for options for <a href=3D#attr-input-list t=
itle=3Dattr-input-list>combo box control</a></td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>;
+         <a href=3D#phrasing-content title=3D"Phrasing content&q=
uot;>phrasing</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a>;
+         <code><a href=3D#the-option-element>option</a&gt=
;</code></td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a></td>
+     <td><code><a href=3D#htmldatalistelement>HTMLData=
ListElement</a></code></td>
+    <tr><th><code><a href=3D#the-dd-element>dd&l=
t;/a></code></th>
+     <td>Content for corresponding <code><a href=3D#the-d=
t-element>dt</a></code> element(s)</td>
+     <td>none</td>
+     <td><code><a href=3D#the-dl-element>dl</a>&=
lt;/code>;
+         <code><a href=3D#the-template-element>template</=
a></code></td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a></td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a></td>
+     <td><code><a href=3D#htmlelement>HTMLElement</=
a></code></td>
+    <tr><th><code><a href=3D#the-del-element>del=
</a></code></th>
+     <td>A removal from the document</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>;
+         <a href=3D#phrasing-content title=3D"Phrasing content&q=
uot;>phrasing</a>*</td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#transparent>transparent</a></td=
>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a>;
+         <code title=3Dattr-mod-cite><a href=3D#attr-mod-cite&g=
t;cite</a></code>;
+         <code title=3Dattr-mod-datetime><a href=3D#attr-mod-da=
tetime>datetime</a></code></td>
+     <td><code><a href=3D#htmlmodelement>HTMLModElemen=
t</a></code></td>
+    <tr><th><code><a href=3D#the-details-element&gt=
;details</a></code></th>
+     <td>Disclosure control for hiding details</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>;
+         <a href=3D#sectioning-root title=3D"Sectioning root&quo=
t;>sectioning root</a>;
+         <a href=3D#interactive-content title=3D"Interactive con=
tent">interactive</a></td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a></td>
+     <td><code><a href=3D#the-summary-element>summary&=
lt;/a></code>*;
+         <a href=3D#flow-content title=3D"Flow content">=
flow</a></td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a>;
+         <code title=3Dattr-details-open><a href=3D#attr-detail=
s-open>open</a></code></td>
+     <td><code><a href=3D#htmldetailselement>HTMLDetai=
lsElement</a></code></td>
+    <tr><th><code><a href=3D#the-dfn-element>dfn=
</a></code></th>
+     <td>Defining instance</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>;
+         <a href=3D#phrasing-content title=3D"Phrasing content&q=
uot;>phrasing</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a>*</td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a></td>
+     <td><code><a href=3D#htmlelement>HTMLElement</=
a></code></td>
+    <tr><th><code><a href=3D#the-dialog-element>=
dialog</a></code></th>
+     <td>Dialog box or window</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>;
+         <a href=3D#sectioning-root title=3D"Sectioning root&quo=
t;>sectioning root</a></td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a></td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a></td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a>;
+         <code title=3Dattr-dialog-open><a href=3D#attr-dialog-=
open>open</a></code></td>
+     <td><code><a href=3D#htmldialogelement>HTMLDialog=
Element</a></code></td>
+    <tr><th><code><a href=3D#the-div-element>div=
</a></code></th>
+     <td>Generic flow container</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a></td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a></td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a></td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a></td>
+     <td><code><a href=3D#htmldivelement>HTMLDivElemen=
t</a></code></td>
+    <tr><th><code><a href=3D#the-dl-element>dl&l=
t;/a></code></th>
+     <td>Association list consisting of zero or more name-value gr=
oups</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a></td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a></td>
+     <td><code><a href=3D#the-dt-element>dt</a>&=
lt;/code>*;
+         <code><a href=3D#the-dd-element>dd</a></co=
de>*;
+         <a href=3D#script-supporting-elements>script-supporting e=
lements</a></td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a></td>
+     <td><code><a href=3D#htmldlistelement>HTMLDListEl=
ement</a></code></td>
+    <tr><th><code><a href=3D#the-dt-element>dt&l=
t;/a></code></th>
+     <td>Legend for corresponding <code><a href=3D#the-dd=
-element>dd</a></code> element(s)</td>
+     <td>none</td>
+     <td><code><a href=3D#the-dl-element>dl</a>&=
lt;/code>;
+         <code><a href=3D#the-template-element>template</=
a></code></td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>*</td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a></td>
+     <td><code><a href=3D#htmlelement>HTMLElement</=
a></code></td>
+    <tr><th><code><a href=3D#the-em-element>em&l=
t;/a></code></th>
+     <td>Stress emphasis</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>;
+         <a href=3D#phrasing-content title=3D"Phrasing content&q=
uot;>phrasing</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a></td>
+     <td><code><a href=3D#htmlelement>HTMLElement</=
a></code></td>
+    <tr><th><code><a href=3D#the-embed-element>e=
mbed</a></code></th>
+     <td><a href=3D#plugin>Plugin</a></td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>;
+         <a href=3D#phrasing-content title=3D"Phrasing content&q=
uot;>phrasing</a>;
+         <a href=3D#embedded-content title=3D"Embedded content&q=
uot;>embedded</a>;
+         <a href=3D#interactive-content title=3D"Interactive con=
tent">interactive</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td>empty</td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a>;
+         <code title=3Dattr-embed-src><a href=3D#attr-embed-src=
>src</a></code>;
+         <code title=3Dattr-embed-type><a href=3D#attr-embed-ty=
pe>type</a></code>;
+         <code title=3Dattr-dim-width><a href=3D#attr-dim-width=
>width</a></code>;
+         <code title=3Dattr-dim-height><a href=3D#attr-dim-heig=
ht>height</a></code>;
+         any*</td>
+     <td><code><a href=3D#htmlembedelement>HTMLEmbedEl=
ement</a></code></td>
+    <tr><th><code><a href=3D#the-fieldset-element&g=
t;fieldset</a></code></th>
+     <td>Group of form controls</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>;
+         <a href=3D#sectioning-root title=3D"Sectioning root&quo=
t;>sectioning root</a>;
+         <a href=3D#category-listed title=3Dcategory-listed>listed=
</a>;
+         <a href=3D#category-form-attr title=3Dcategory-form-attr>=
reassociateable</a>;
+         <a href=3D#form-associated-element title=3D"Form-associ=
ated element">form-associated</a></td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a></td>
+     <td><code><a href=3D#the-legend-element>legend&lt=
;/a></code>*;
+         <a href=3D#flow-content title=3D"Flow content">=
flow</a></td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a>;
+         <code title=3Dattr-fieldset-disabled><a href=3D#attr-f=
ieldset-disabled>disabled</a></code>;
+         <code title=3Dattr-fae-form><a href=3D#attr-fae-form&g=
t;form</a></code>;
+         <code title=3Dattr-fe-name><a href=3D#attr-fe-name>=
name</a></code></td>
+     <td><code><a href=3D#htmlfieldsetelement>HTMLFiel=
dSetElement</a></code></td>
+    <tr><th><code><a href=3D#the-figcaption-element=
>figcaption</a></code></th>
+     <td>Caption for <code><a href=3D#the-figure-element&=
gt;figure</a></code></td>
+     <td>none</td>
+     <td><code><a href=3D#the-figure-element>figure&lt=
;/a></code>;
+         <code><a href=3D#the-template-element>template</=
a></code></td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a></td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a></td>
+     <td><code><a href=3D#htmlelement>HTMLElement</=
a></code></td>
+    <tr><th><code><a href=3D#the-figure-element>=
figure</a></code></th>
+     <td>Figure with optional caption</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>;
+         <a href=3D#sectioning-root title=3D"Sectioning root&quo=
t;>sectioning root</a></td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a></td>
+     <td><code><a href=3D#the-figcaption-element>figca=
ption</a></code>*;
+         <a href=3D#flow-content title=3D"Flow content">=
flow</a></td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a></td>
+     <td><code><a href=3D#htmlelement>HTMLElement</=
a></code></td>
+    <tr><th><code><a href=3D#the-footer-element>=
footer</a></code></th>
+     <td>Footer for a page or section</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a></td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a></td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>*</td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a></td>
+     <td><code><a href=3D#htmlelement>HTMLElement</=
a></code></td>
+    <tr><th><code><a href=3D#the-form-element>fo=
rm</a></code></th>
+     <td>User-submittable form</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a></td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a></td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>*</td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a>;
+         <code title=3Dattr-form-accept-charset><a href=3D#attr=
-form-accept-charset>accept-charset</a></code>;
+         <code title=3Dattr-fs-action><a href=3D#attr-fs-action=
>action</a></code>;
+         <code title=3Dattr-form-autocomplete><a href=3D#attr-f=
orm-autocomplete>autocomplete</a></code>;
+         <code title=3Dattr-fs-enctype><a href=3D#attr-fs-encty=
pe>enctype</a></code>;
+         <code title=3Dattr-fs-method><a href=3D#attr-fs-method=
>method</a></code>;
+         <code title=3Dattr-form-name><a href=3D#attr-form-name=
>name</a></code>;
+         <code title=3Dattr-fs-novalidate><a href=3D#attr-fs-no=
validate>novalidate</a></code>;
+         <code title=3Dattr-fs-target><a href=3D#attr-fs-target=
>target</a></code></td>
+     <td><code><a href=3D#htmlformelement>HTMLFormElem=
ent</a></code></td>
+    <tr><th><code><a href=3D#the-h1,-h2,-h3,-h4,-h5=
,-and-h6-elements>h1</a></code>, <code><a href=3D=
#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h2</a></code>, &l=
t;code><a href=3D#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h3<=
/a></code>, <code><a href=3D#the-h1,-h2,-h3,-h4,-h5,-an=
d-h6-elements>h4</a></code>, <code><a href=3D#the=
-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h5</a></code>, <co=
de><a href=3D#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h6</a&g=
t;</code></th>
+     <td>Section heading</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>;
+         <a href=3D#heading-content title=3D"Heading content&quo=
t;>heading</a></td>
+     <td><code><a href=3D#the-hgroup-element>hgroup&lt=
;/a></code>;
+         <a href=3D#flow-content title=3D"Flow content">=
flow</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a></td>
+     <td><code><a href=3D#htmlheadingelement>HTMLHeadi=
ngElement</a></code></td>
+    <tr><th><code><a href=3D#the-head-element>he=
ad</a></code></th>
+     <td>Container for document metadata</td>
+     <td>none</td>
+     <td><code><a href=3D#the-html-element>html</a&=
gt;</code></td>
+     <td><a href=3D#metadata-content title=3D"Metadata con=
tent">metadata content</a>*</td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a></td>
+     <td><code><a href=3D#htmlheadelement>HTMLHeadElem=
ent</a></code></td>
+    <tr><th><code><a href=3D#the-header-element>=
header</a></code></th>
+     <td>Introductory or navigational aids for a page or section&l=
t;/td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a></td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a></td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>*</td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a></td>
+     <td><code><a href=3D#htmlelement>HTMLElement</=
a></code></td>
+    <tr><th><code><a href=3D#the-hgroup-element>=
hgroup</a></code></th>
+     <td>heading group</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>;
+         <a href=3D#heading-content title=3D"Heading content&quo=
t;>heading</a></td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a></td>
+     <td>One or more <code><a href=3D#the-h1,-h2,-h3,-h4,=
-h5,-and-h6-elements>h1</a></code>, <code><a href=
=3D#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h2</a></code>,=
 <code><a href=3D#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h3&=
lt;/a></code>, <code><a href=3D#the-h1,-h2,-h3,-h4,-h5,=
-and-h6-elements>h4</a></code>, <code><a href=3D#=
the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h5</a></code>, &lt=
;code><a href=3D#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h6</=
a></code>, and <a href=3D#script-supporting-elements>scrip=
t-supporting elements</a></td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a></td>
+     <td><code><a href=3D#htmlelement>HTMLElement</=
a></code></td>
+    <tr><th><code><a href=3D#the-hr-element>hr&l=
t;/a></code></th>
+     <td>Thematic break</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a></td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a></td>
+     <td>empty</td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a></td>
+     <td><code><a href=3D#htmlhrelement>HTMLHRElement&=
lt;/a></code></td>
+    <tr><th><code><a href=3D#the-html-element>ht=
ml</a></code></th>
+     <td>Root element</td>
+     <td>none</td>
+     <td>none*</td>
+     <td><code><a href=3D#the-head-element>head</a&=
gt;</code>*;
+         <code><a href=3D#the-body-element>body</a>&lt=
;/code>*</td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a>;
+         <code title=3Dattr-html-manifest><a href=3D#attr-html-=
manifest>manifest</a></code></td>
+     <td><code><a href=3D#htmlhtmlelement>HTMLHtmlElem=
ent</a></code></td>
+    <tr><th><code><a href=3D#the-i-element>i<=
/a></code></th>
+     <td>Alternate voice</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>;
+         <a href=3D#phrasing-content title=3D"Phrasing content&q=
uot;>phrasing</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a></td>
+     <td><code><a href=3D#htmlelement>HTMLElement</=
a></code></td>
+    <tr><th><code><a href=3D#the-iframe-element>=
iframe</a></code></th>
+     <td><a href=3D#nested-browsing-context>Nested browsing =
context</a></td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>;
+         <a href=3D#phrasing-content title=3D"Phrasing content&q=
uot;>phrasing</a>;
+         <a href=3D#embedded-content title=3D"Embedded content&q=
uot;>embedded</a>;
+         <a href=3D#interactive-content title=3D"Interactive con=
tent">interactive</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td>text*</td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a>;
+         <code title=3Dattr-iframe-src><a href=3D#attr-iframe-s=
rc>src</a></code>;
+         <code title=3Dattr-iframe-srcdoc><a href=3D#attr-ifram=
e-srcdoc>srcdoc</a></code>;
+         <code title=3Dattr-iframe-name><a href=3D#attr-iframe-=
name>name</a></code>;
+         <code title=3Dattr-iframe-sandbox><a href=3D#attr-ifra=
me-sandbox>sandbox</a></code>;
+         <code title=3Dattr-iframe-seamless><a href=3D#attr-ifr=
ame-seamless>seamless</a></code>;
+         <code title=3Dattr-iframe-allowfullscreen><a href=3D#a=
ttr-iframe-allowfullscreen>allowfullscreen</a></code>;
+         <code title=3Dattr-dim-width><a href=3D#attr-dim-width=
>width</a></code>;
+         <code title=3Dattr-dim-height><a href=3D#attr-dim-heig=
ht>height</a></code></td>
+     <td><code><a href=3D#htmliframeelement>HTMLIFrame=
Element</a></code></td>
+    <tr><th><code><a href=3D#the-img-element>img=
</a></code></th>
+     <td>Image</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>;
+         <a href=3D#phrasing-content title=3D"Phrasing content&q=
uot;>phrasing</a>;
+         <a href=3D#embedded-content title=3D"Embedded content&q=
uot;>embedded</a>;
+         <a href=3D#interactive-content title=3D"Interactive con=
tent">interactive</a>*;
+         <a href=3D#form-associated-element title=3D"Form-associ=
ated element">form-associated</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td>empty</td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a>;
+         <code title=3Dattr-img-alt><a href=3D#attr-img-alt>=
alt</a></code>;
+         <code title=3Dattr-img-src><a href=3D#attr-img-src>=
src</a></code>;
+         <code title=3Dattr-img-srcset><a href=3D#attr-img-srcs=
et>srcset</a></code>;
+         <code title=3Dattr-img-crossorigin><a href=3D#attr-img=
-crossorigin>crossorigin</a></code>;
+         <code title=3Dattr-hyperlink-usemap><a href=3D#attr-hy=
perlink-usemap>usemap</a></code>;
+         <code title=3Dattr-img-ismap><a href=3D#attr-img-ismap=
>ismap</a></code>;
+         <code title=3Dattr-dim-width><a href=3D#attr-dim-width=
>width</a></code>;
+         <code title=3Dattr-dim-height><a href=3D#attr-dim-heig=
ht>height</a></code></td>
+     <td><code><a href=3D#htmlimageelement>HTMLImageEl=
ement</a></code></td>
+    <tr><th><code><a href=3D#the-input-element>i=
nput</a></code></th>
+     <td>Form control</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>;
+         <a href=3D#phrasing-content title=3D"Phrasing content&q=
uot;>phrasing</a>;
+         <a href=3D#interactive-content title=3D"Interactive con=
tent">interactive</a>*;
+         <a href=3D#category-listed title=3Dcategory-listed>listed=
</a>;
+         <a href=3D#category-label title=3Dcategory-label>labelabl=
e</a>;
+         <a href=3D#category-submit title=3Dcategory-submit>submit=
table</a>;
+         <a href=3D#category-reset title=3Dcategory-reset>resettab=
le</a>;
+         <a href=3D#category-form-attr title=3Dcategory-form-attr>=
reassociateable</a>;
+         <a href=3D#form-associated-element title=3D"Form-associ=
ated element">form-associated</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td>empty</td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a>;
+         <code title=3Dattr-input-accept><a href=3D#attr-input-=
accept>accept</a></code>;
+         <code title=3Dattr-input-alt><a href=3D#attr-input-alt=
>alt</a></code>;
+         <code title=3Dattr-fe-autocomplete><a href=3D#attr-fe-=
autocomplete>autocomplete</a></code>;
+         <code title=3Dattr-fe-autofocus><a href=3D#attr-fe-aut=
ofocus>autofocus</a></code>;
+         <code title=3Dattr-input-checked><a href=3D#attr-input=
-checked>checked</a></code>;
+         <code title=3Dattr-fe-dirname><a href=3D#attr-fe-dirna=
me>dirname</a></code>;
+         <code title=3Dattr-fe-disabled><a href=3D#attr-fe-disa=
bled>disabled</a></code>;
+         <code title=3Dattr-fae-form><a href=3D#attr-fae-form&g=
t;form</a></code>;
+         <code title=3Dattr-fs-formaction><a href=3D#attr-fs-fo=
rmaction>formaction</a></code>;
+         <code title=3Dattr-fs-formenctype><a href=3D#attr-fs-f=
ormenctype>formenctype</a></code>;
+         <code title=3Dattr-fs-formmethod><a href=3D#attr-fs-fo=
rmmethod>formmethod</a></code>;
+         <code title=3Dattr-fs-formnovalidate><a href=3D#attr-f=
s-formnovalidate>formnovalidate</a></code>;
+         <code title=3Dattr-fs-formtarget><a href=3D#attr-fs-fo=
rmtarget>formtarget</a></code>;
+         <code title=3Dattr-dim-height><a href=3D#attr-dim-heig=
ht>height</a></code>;
+         <code title=3Dattr-input-list><a href=3D#attr-input-li=
st>list</a></code>;
+         <code title=3Dattr-input-max><a href=3D#attr-input-max=
>max</a></code>;
+         <code title=3Dattr-input-maxlength><a href=3D#attr-inp=
ut-maxlength>maxlength</a></code>;
+         <code title=3Dattr-input-min><a href=3D#attr-input-min=
>min</a></code>;
+         <code title=3Dattr-input-minlength><a href=3D#attr-inp=
ut-minlength>minlength</a></code>;
+         <code title=3Dattr-input-multiple><a href=3D#attr-inpu=
t-multiple>multiple</a></code>;
+         <code title=3Dattr-fe-name><a href=3D#attr-fe-name>=
name</a></code>;
+         <code title=3Dattr-input-pattern><a href=3D#attr-input=
-pattern>pattern</a></code>;
+         <code title=3Dattr-input-placeholder><a href=3D#attr-i=
nput-placeholder>placeholder</a></code>;
+         <code title=3Dattr-input-readonly><a href=3D#attr-inpu=
t-readonly>readonly</a></code>;
+         <code title=3Dattr-input-required><a href=3D#attr-inpu=
t-required>required</a></code>;
+         <code title=3Dattr-input-size><a href=3D#attr-input-si=
ze>size</a></code>;
+         <code title=3Dattr-input-src><a href=3D#attr-input-src=
>src</a></code>;
+         <code title=3Dattr-input-step><a href=3D#attr-input-st=
ep>step</a></code>;
+         <code title=3Dattr-input-type><a href=3D#attr-input-ty=
pe>type</a></code>;
+         <code title=3Dattr-input-value><a href=3D#attr-input-v=
alue>value</a></code>;
+         <code title=3Dattr-dim-width><a href=3D#attr-dim-width=
>width</a></code></td>
+     <td><code><a href=3D#htmlinputelement>HTMLInputEl=
ement</a></code></td>
+    <tr><th><code><a href=3D#the-ins-element>ins=
</a></code></th>
+     <td>An addition to the document</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>;
+         <a href=3D#phrasing-content title=3D"Phrasing content&q=
uot;>phrasing</a>*</td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#transparent>transparent</a></td=
>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a>;
+         <code title=3Dattr-mod-cite><a href=3D#attr-mod-cite&g=
t;cite</a></code>;
+         <code title=3Dattr-mod-datetime><a href=3D#attr-mod-da=
tetime>datetime</a></code></td>
+     <td><code><a href=3D#htmlmodelement>HTMLModElemen=
t</a></code></td>
+    <tr><th><code><a href=3D#the-kbd-element>kbd=
</a></code></th>
+     <td>User input</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>;
+         <a href=3D#phrasing-content title=3D"Phrasing content&q=
uot;>phrasing</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a></td>
+     <td><code><a href=3D#htmlelement>HTMLElement</=
a></code></td>
+    <tr><th><code><a href=3D#the-keygen-element>=
keygen</a></code></th>
+     <td>Cryptographic key-pair generator form control</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>;
+         <a href=3D#phrasing-content title=3D"Phrasing content&q=
uot;>phrasing</a>;
+         <a href=3D#interactive-content title=3D"Interactive con=
tent">interactive</a>;
+         <a href=3D#category-listed title=3Dcategory-listed>listed=
</a>;
+         <a href=3D#category-label title=3Dcategory-label>labelabl=
e</a>;
+         <a href=3D#category-submit title=3Dcategory-submit>submit=
table</a>;
+         <a href=3D#category-reset title=3Dcategory-reset>resettab=
le</a>;
+         <a href=3D#category-form-attr title=3Dcategory-form-attr>=
reassociateable</a>;
+         <a href=3D#form-associated-element title=3D"Form-associ=
ated element">form-associated</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td>empty</td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a>;
+         <code title=3Dattr-fe-autofocus><a href=3D#attr-fe-aut=
ofocus>autofocus</a></code>;
+         <code title=3Dattr-keygen-challenge><a href=3D#attr-ke=
ygen-challenge>challenge</a></code>;
+         <code title=3Dattr-fe-disabled><a href=3D#attr-fe-disa=
bled>disabled</a></code>;
+         <code title=3Dattr-fae-form><a href=3D#attr-fae-form&g=
t;form</a></code>;
+         <code title=3Dattr-keygen-keytype><a href=3D#attr-keyg=
en-keytype>keytype</a></code>;
+         <code title=3Dattr-fe-name><a href=3D#attr-fe-name>=
name</a></code></td>
+     <td><code><a href=3D#htmlkeygenelement>HTMLKeygen=
Element</a></code></td>
+    <tr><th><code><a href=3D#the-label-element>l=
abel</a></code></th>
+     <td>Caption for a form control</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>;
+         <a href=3D#phrasing-content title=3D"Phrasing content&q=
uot;>phrasing</a>;
+         <a href=3D#interactive-content title=3D"Interactive con=
tent">interactive</a>;
+         <a href=3D#category-form-attr title=3Dcategory-form-attr>=
reassociateable</a>;
+         <a href=3D#form-associated-element title=3D"Form-associ=
ated element">form-associated</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a>*</td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a>;
+         <code title=3Dattr-fae-form><a href=3D#attr-fae-form&g=
t;form</a></code>;
+         <code title=3Dattr-label-for><a href=3D#attr-label-for=
>for</a></code></td>
+     <td><code><a href=3D#htmllabelelement>HTMLLabelEl=
ement</a></code></td>
+    <tr><th><code><a href=3D#the-legend-element>=
legend</a></code></th>
+     <td>Caption for <code><a href=3D#the-fieldset-elemen=
t>fieldset</a></code></td>
+     <td>none</td>
+     <td><code><a href=3D#the-fieldset-element>fieldse=
t</a></code>;
+         <code><a href=3D#the-template-element>template</=
a></code></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a></td>
+     <td><code><a href=3D#htmllegendelement>HTMLLegend=
Element</a></code></td>
+    <tr><th><code><a href=3D#the-li-element>li&l=
t;/a></code></th>
+     <td>List item</td>
+     <td>none</td>
+     <td><code><a href=3D#the-ol-element>ol</a>&=
lt;/code>;
+         <code><a href=3D#the-ul-element>ul</a></co=
de>;
+         <code><a href=3D#the-menu-element>menu</a>&lt=
;/code>*;
+         <code><a href=3D#the-template-element>template</=
a></code></td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a></td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a>;
+         <code title=3Dattr-li-value><a href=3D#attr-li-value&g=
t;value</a></code>*</td>
+     <td><code><a href=3D#htmllielement>HTMLLIElement&=
lt;/a></code></td>
+    <tr><th><code><a href=3D#the-link-element>li=
nk</a></code></th>
+     <td>Link metadata</td>
+     <td><a href=3D#metadata-content title=3D"Metadata con=
tent">metadata</a>;
+         <a href=3D#flow-content title=3D"Flow content">=
flow</a>*;
+         <a href=3D#phrasing-content title=3D"Phrasing content&q=
uot;>phrasing</a>*</td>
+     <td><code><a href=3D#the-head-element>head</a&=
gt;</code>;
+         <code><a href=3D#the-template-element>template</=
a></code>;
+         <code><a href=3D#the-noscript-element>noscript</=
a></code>*;
+         <a href=3D#phrasing-content title=3D"phrasing content&q=
uot;>phrasing</a>*</td>
+     <td>empty</td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a>;
+         <code title=3Dattr-link-href><a href=3D#attr-link-href=
>href</a></code>;
+         <code title=3Dattr-link-crossorigin><a href=3D#attr-li=
nk-crossorigin>crossorigin</a></code>;
+         <code title=3Dattr-link-rel><a href=3D#attr-link-rel&g=
t;rel</a></code>;
+         <code title=3Dattr-link-media><a href=3D#attr-link-med=
ia>media</a></code>;
+         <code title=3Dattr-link-hreflang><a href=3D#attr-link-=
hreflang>hreflang</a></code>;
+         <code title=3Dattr-link-type><a href=3D#attr-link-type=
>type</a></code>;
+         <code title=3Dattr-link-sizes><a href=3D#attr-link-siz=
es>sizes</a></code></td>
+     <td><code><a href=3D#htmllinkelement>HTMLLinkElem=
ent</a></code></td>
+    <tr><th><code><a href=3D#the-main-element>ma=
in</a></code></th>
+     <td>Container for the dominant contents of another element&lt=
;/td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a></td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a></td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a></td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a></td>
+     <td><code><a href=3D#htmlelement>HTMLElement</=
a></code></td>
+    <tr><th><code><a href=3D#the-map-element>map=
</a></code></th>
+     <td><a href=3D#image-map>Image map</a></td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>;
+         <a href=3D#phrasing-content title=3D"Phrasing content&q=
uot;>phrasing</a>*</td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#transparent>transparent</a>;
+         <code><a href=3D#the-area-element>area</a>&lt=
;/code>*</td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a>;
+         <code title=3Dattr-map-name><a href=3D#attr-map-name&g=
t;name</a></code></td>
+     <td><code><a href=3D#htmlmapelement>HTMLMapElemen=
t</a></code></td>
+    <tr><th><code><a href=3D#the-mark-element>ma=
rk</a></code></th>
+     <td>Highlight</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>;
+         <a href=3D#phrasing-content title=3D"Phrasing content&q=
uot;>phrasing</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a></td>
+     <td><code><a href=3D#htmlelement>HTMLElement</=
a></code></td>
+    <tr><th><code><a href=3D#the-menu-element>me=
nu</a></code></th>
+     <td>Menu of commands</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a></td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>;
+         <code><a href=3D#the-menu-element>menu</a>&lt=
;/code>*</td>
+     <td><code><a href=3D#the-li-element>li</a>&=
lt;/code>*;
+         <a href=3D#flow-content title=3D"Flow content">=
flow</a>*;
+         <code><a href=3D#the-menuitem-element>menuitem</=
a></code>*;
+         <code><a href=3D#the-hr-element>hr</a></co=
de>*;
+         <code><a href=3D#the-menu-element>menu</a>&lt=
;/code>*;
+         <a href=3D#script-supporting-elements>script-supporting e=
lements</a>*</td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a>;
+         <code title=3Dattr-menu-type><a href=3D#attr-menu-type=
>type</a></code>;
+         <code title=3Dattr-menu-label><a href=3D#attr-menu-lab=
el>label</a></code></td>
+     <td><code><a href=3D#htmlmenuelement>HTMLMenuElem=
ent</a></code></td>
+    <tr><th><code><a href=3D#the-menuitem-element&g=
t;menuitem</a></code></th>
+     <td>Menu command</td>
+     <td>none</td>
+     <td><code><a href=3D#the-menu-element>menu</a&=
gt;</code>;    =20
+         <code><a href=3D#the-template-element>template</=
a></code></td>
+     <td>empty</td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a>;
+         <code title=3Dattr-menuitem-type><a href=3D#attr-menui=
tem-type>type</a></code>;
+         <code title=3Dattr-menuitem-label><a href=3D#attr-menu=
item-label>label</a></code>;
+         <code title=3Dattr-menuitem-icon><a href=3D#attr-menui=
tem-icon>icon</a></code>;
+         <code title=3Dattr-menuitem-disabled><a href=3D#attr-m=
enuitem-disabled>disabled</a></code>;
+         <code title=3Dattr-menuitem-checked><a href=3D#attr-me=
nuitem-checked>checked</a></code>;
+         <code title=3Dattr-menuitem-radiogroup><a href=3D#attr=
-menuitem-radiogroup>radiogroup</a></code>;
+         <code title=3Dattr-menuitem-default><a href=3D#attr-me=
nuitem-default>default</a></code>;
+         <code title=3Dattr-menuitem-command><a href=3D#attr-me=
nuitem-command>command</a></code></td>
+     <td><code><a href=3D#htmlmenuitemelement>HTMLMenu=
ItemElement</a></code></td>
+    <tr><th><code><a href=3D#the-meta-element>me=
ta</a></code></th>
+     <td>Text metadata</td>
+     <td><a href=3D#metadata-content title=3D"Metadata con=
tent">metadata</a>;
+         <a href=3D#flow-content title=3D"Flow content">=
flow</a>*;
+         <a href=3D#phrasing-content title=3D"Phrasing content&q=
uot;>phrasing</a>*</td>
+     <td><code><a href=3D#the-head-element>head</a&=
gt;</code>;
+         <code><a href=3D#the-template-element>template</=
a></code>;
+         <code><a href=3D#the-noscript-element>noscript</=
a></code>*;
+         <a href=3D#phrasing-content title=3D"phrasing content&q=
uot;>phrasing</a>*</td>
+     <td>empty</td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a>;
+         <code title=3Dattr-meta-name><a href=3D#attr-meta-name=
>name</a></code>;
+         <code title=3Dattr-meta-http-equiv><a href=3D#attr-met=
a-http-equiv>http-equiv</a></code>;
+         <code title=3Dattr-meta-content><a href=3D#attr-meta-c=
ontent>content</a></code>;
+         <code title=3Dattr-meta-charset><a href=3D#attr-meta-c=
harset>charset</a></code></td>
+     <td><code><a href=3D#htmlmetaelement>HTMLMetaElem=
ent</a></code></td>
+    <tr><th><code><a href=3D#the-meter-element>m=
eter</a></code></th>
+     <td>Gauge</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>;
+         <a href=3D#phrasing-content title=3D"Phrasing content&q=
uot;>phrasing</a>;
+         <a href=3D#category-label title=3Dcategory-label>labelabl=
e</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a>*</td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a>;
+         <code title=3Dattr-meter-value><a href=3D#attr-meter-v=
alue>value</a></code>;
+         <code title=3Dattr-meter-min><a href=3D#attr-meter-min=
>min</a></code>;
+         <code title=3Dattr-meter-max><a href=3D#attr-meter-max=
>max</a></code>;
+         <code title=3Dattr-meter-low><a href=3D#attr-meter-low=
>low</a></code>;
+         <code title=3Dattr-meter-high><a href=3D#attr-meter-hi=
gh>high</a></code>;
+         <code title=3Dattr-meter-optimum><a href=3D#attr-meter=
-optimum>optimum</a></code></td>
+     <td><code><a href=3D#htmlmeterelement>HTMLMeterEl=
ement</a></code></td>
+    <tr><th><code><a href=3D#the-nav-element>nav=
</a></code></th>
+     <td>Section with navigational links</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>;
+         <a href=3D#sectioning-content title=3D"Sectioning conte=
nt">sectioning</a></td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a></td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a></td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a></td>
+     <td><code><a href=3D#htmlelement>HTMLElement</=
a></code></td>
+    <tr><th><code><a href=3D#the-noscript-element&g=
t;noscript</a></code></th>
+     <td>Fallback content for script</td>
+     <td><a href=3D#metadata-content title=3D"Metadata con=
tent">metadata</a>;
+         <a href=3D#flow-content title=3D"Flow content">=
flow</a>;
+         <a href=3D#phrasing-content title=3D"Phrasing content&q=
uot;>phrasing</a></td>
+     <td><code><a href=3D#the-head-element>head</a&=
gt;</code>*;
+         <code><a href=3D#the-template-element>template</=
a></code>*;
+         <a href=3D#phrasing-content title=3D"Phrasing content&q=
uot;>phrasing</a>*</td>
+     <td>varies*</td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a></td>
+     <td><code><a href=3D#htmlelement>HTMLElement</=
a></code></td>
+    <tr><th><code><a href=3D#the-object-element>=
object</a></code></th>
+     <td>Image, <a href=3D#nested-browsing-context>nested br=
owsing context</a>, or <a href=3D#plugin>plugin</a><=
/td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>;
+         <a href=3D#phrasing-content title=3D"Phrasing content&q=
uot;>phrasing</a>;
+         <a href=3D#embedded-content title=3D"Embedded content&q=
uot;>embedded</a>;
+         <a href=3D#interactive-content title=3D"Interactive con=
tent">interactive</a>*;
+         <a href=3D#category-listed title=3Dcategory-listed>listed=
</a>;
+         <a href=3D#category-submit title=3Dcategory-submit>submit=
table</a>;
+         <a href=3D#category-form-attr title=3Dcategory-form-attr>=
reassociateable</a>;
+         <a href=3D#form-associated-element title=3D"Form-associ=
ated element">form-associated</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><code><a href=3D#the-param-element>param</=
a></code>*;
+         <a href=3D#transparent>transparent</a></td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a>;
+         <code title=3Dattr-object-data><a href=3D#attr-object-=
data>data</a></code>;
+         <code title=3Dattr-object-type><a href=3D#attr-object-=
type>type</a></code>;
+         <code title=3Dattr-object-typemustmatch><a href=3D#att=
r-object-typemustmatch>typemustmatch</a></code>;
+         <code title=3Dattr-object-name><a href=3D#attr-object-=
name>name</a></code>;
+         <code title=3Dattr-hyperlink-usemap><a href=3D#attr-hy=
perlink-usemap>usemap</a></code>;
+         <code title=3Dattr-fae-form><a href=3D#attr-fae-form&g=
t;form</a></code>;
+         <code title=3Dattr-dim-width><a href=3D#attr-dim-width=
>width</a></code>;
+         <code title=3Dattr-dim-height><a href=3D#attr-dim-heig=
ht>height</a></code></td>
+     <td><code><a href=3D#htmlobjectelement>HTMLObject=
Element</a></code></td>
+    <tr><th><code><a href=3D#the-ol-element>ol&l=
t;/a></code></th>
+     <td>Ordered list</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a></td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a></td>
+     <td><code><a href=3D#the-li-element>li</a>&=
lt;/code>;
+         <a href=3D#script-supporting-elements>script-supporting e=
lements</a></td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a>;
+         <code title=3Dattr-ol-reversed><a href=3D#attr-ol-reve=
rsed>reversed</a></code>;
+         <code title=3Dattr-ol-start><a href=3D#attr-ol-start&g=
t;start</a></code>;
+         <code title=3Dattr-ol-type><a href=3D#attr-ol-type>=
type</a></code></td>
+     <td><code><a href=3D#htmlolistelement>HTMLOListEl=
ement</a></code></td>
+    <tr><th><code><a href=3D#the-optgroup-element&g=
t;optgroup</a></code></th>
+     <td>Group of options in a list box</td>
+     <td>none</td>
+     <td><code><a href=3D#the-select-element>select&lt=
;/a></code>;
+         <code><a href=3D#the-template-element>template</=
a></code></td>
+     <td><code><a href=3D#the-option-element>option&lt=
;/a></code>;
+         <a href=3D#script-supporting-elements>script-supporting e=
lements</a></td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a>;
+         <code title=3Dattr-optgroup-disabled><a href=3D#attr-o=
ptgroup-disabled>disabled</a></code>;
+         <code title=3Dattr-optgroup-label><a href=3D#attr-optg=
roup-label>label</a></code></td>
+     <td><code><a href=3D#htmloptgroupelement>HTMLOptG=
roupElement</a></code></td>
+    <tr><th><code><a href=3D#the-option-element>=
option</a></code></th>
+     <td>Option in a list box or combo box control</td>
+     <td>none</td>
+     <td><code><a href=3D#the-select-element>select&lt=
;/a></code>;
+         <code><a href=3D#the-datalist-element>datalist</=
a></code>;
+         <code><a href=3D#the-optgroup-element>optgroup</=
a></code>;
+         <code><a href=3D#the-template-element>template</=
a></code></td>
+     <td><a href=3D#text-content title=3D"text content&quo=
t;>text</a>*</td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a>;
+         <code title=3Dattr-option-disabled><a href=3D#attr-opt=
ion-disabled>disabled</a></code>;
+         <code title=3Dattr-option-label><a href=3D#attr-option=
-label>label</a></code>;
+         <code title=3Dattr-option-selected><a href=3D#attr-opt=
ion-selected>selected</a></code>;
+         <code title=3Dattr-option-value><a href=3D#attr-option=
-value>value</a></code></td>
+     <td><code><a href=3D#htmloptionelement>HTMLOption=
Element</a></code></td>
+    <tr><th><code><a href=3D#the-output-element>=
output</a></code></th>
+     <td>Calculated output value</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>;
+         <a href=3D#phrasing-content title=3D"Phrasing content&q=
uot;>phrasing</a>;
+         <a href=3D#category-listed title=3Dcategory-listed>listed=
</a>;
+         <a href=3D#category-label title=3Dcategory-label>labelabl=
e</a>;
+         <a href=3D#category-reset title=3Dcategory-reset>resettab=
le</a>;
+         <a href=3D#category-form-attr title=3Dcategory-form-attr>=
reassociateable</a>;
+         <a href=3D#form-associated-element title=3D"Form-associ=
ated element">form-associated</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a>;
+         <code title=3Dattr-output-for><a href=3D#attr-output-f=
or>for</a></code>;
+         <code title=3Dattr-fae-form><a href=3D#attr-fae-form&g=
t;form</a></code>;
+         <code title=3Dattr-fe-name><a href=3D#attr-fe-name>=
name</a></code></td>
+     <td><code><a href=3D#htmloutputelement>HTMLOutput=
Element</a></code></td>
+    <tr><th><code><a href=3D#the-p-element>p<=
/a></code></th>
+     <td>Paragraph</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a></td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a></td>
+     <td><code><a href=3D#htmlparagraphelement>HTMLPar=
agraphElement</a></code></td>
+    <tr><th><code><a href=3D#the-param-element>p=
aram</a></code></th>
+     <td>Parameter for <code><a href=3D#the-object-elemen=
t>object</a></code></td>
+     <td>none</td>
+     <td><code><a href=3D#the-object-element>object&lt=
;/a></code>;
+         <code><a href=3D#the-template-element>template</=
a></code></td>
+     <td>empty</td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a>;
+         <code title=3Dattr-param-name><a href=3D#attr-param-na=
me>name</a></code>;
+         <code title=3Dattr-param-value><a href=3D#attr-param-v=
alue>value</a></code></td>
+     <td><code><a href=3D#htmlparamelement>HTMLParamEl=
ement</a></code></td>
+    <tr><th><code><a href=3D#the-pre-element>pre=
</a></code></th>
+     <td>Block of preformatted text</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a></td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a></td>
+     <td><code><a href=3D#htmlpreelement>HTMLPreElemen=
t</a></code></td>
+    <tr><th><code><a href=3D#the-progress-element&g=
t;progress</a></code></th>
+     <td>Progress bar</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>;
+         <a href=3D#phrasing-content title=3D"Phrasing content&q=
uot;>phrasing</a>;
+         <a href=3D#category-label title=3Dcategory-label>labelabl=
e</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a>*</td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a>;
+         <code title=3Dattr-progress-value><a href=3D#attr-prog=
ress-value>value</a></code>;
+         <code title=3Dattr-progress-max><a href=3D#attr-progre=
ss-max>max</a></code></td>
+     <td><code><a href=3D#htmlprogresselement>HTMLProg=
ressElement</a></code></td>
+    <tr><th><code><a href=3D#the-q-element>q<=
/a></code></th>
+     <td>Quotation</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>;
+         <a href=3D#phrasing-content title=3D"Phrasing content&q=
uot;>phrasing</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a>;
+         <code title=3Dattr-q-cite><a href=3D#attr-q-cite>ci=
te</a></code></td>
+     <td><code><a href=3D#htmlquoteelement>HTMLQuoteEl=
ement</a></code></td>
+    <tr><th><code><a href=3D#the-rp-element>rp&l=
t;/a></code></th>
+     <td>Parenthesis for ruby annotation text</td>
+     <td>none</td>
+     <td><code><a href=3D#the-ruby-element>ruby</a&=
gt;</code>;
+         <code><a href=3D#the-template-element>template</=
a></code></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a></td>
+     <td><code><a href=3D#htmlelement>HTMLElement</=
a></code></td>
+    <tr><th><code><a href=3D#the-rt-element>rt&l=
t;/a></code></th>
+     <td>Ruby annotation text</td>
+     <td>none</td>
+     <td><code><a href=3D#the-ruby-element>ruby</a&=
gt;</code>;
+         <code><a href=3D#the-template-element>template</=
a></code></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a></td>
+     <td><code><a href=3D#htmlelement>HTMLElement</=
a></code></td>
+    <tr><th><code><a href=3D#the-ruby-element>ru=
by</a></code></th>
+     <td>Ruby annotation(s)</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>;
+         <a href=3D#phrasing-content title=3D"Phrasing content&q=
uot;>phrasing</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a>;
+         <code><a href=3D#the-rt-element>rt</a></co=
de>;
+         <code><a href=3D#the-rp-element>rp</a></co=
de>*</td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a></td>
+     <td><code><a href=3D#htmlelement>HTMLElement</=
a></code></td>
+    <tr><th><code><a href=3D#the-s-element>s<=
/a></code></th>
+     <td>Inaccurate text</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>;
+         <a href=3D#phrasing-content title=3D"Phrasing content&q=
uot;>phrasing</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a></td>
+     <td><code><a href=3D#htmlelement>HTMLElement</=
a></code></td>
+    <tr><th><code><a href=3D#the-samp-element>sa=
mp</a></code></th>
+     <td>Computer output</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>;
+         <a href=3D#phrasing-content title=3D"Phrasing content&q=
uot;>phrasing</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a></td>
+     <td><code><a href=3D#htmlelement>HTMLElement</=
a></code></td>
+    <tr><th><code><a href=3D#the-script-element>=
script</a></code></th>
+     <td>Embedded script</td>
+     <td><a href=3D#metadata-content title=3D"Metadata con=
tent">metadata</a>;
+         <a href=3D#flow-content title=3D"Flow content">=
flow</a>;
+         <a href=3D#phrasing-content title=3D"Phrasing content&q=
uot;>phrasing</a>;
+         <a href=3D#script-supporting-elements title=3D"Script-s=
upporting elements">script-supporting</a></td>
+     <td><code><a href=3D#the-head-element>head</a&=
gt;</code>;
+         <a href=3D#phrasing-content title=3D"Phrasing content&q=
uot;>phrasing</a>;
+         <a href=3D#script-supporting-elements title=3D"Script-s=
upporting elements">script-supporting</a></td>
+     <td>script, data, or script documentation*</td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a>;
+         <code title=3Dattr-script-src><a href=3D#attr-script-s=
rc>src</a></code>;
+         <code title=3Dattr-script-type><a href=3D#attr-script-=
type>type</a></code>;
+         <code title=3Dattr-script-charset><a href=3D#attr-scri=
pt-charset>charset</a></code>;
+         <code title=3Dattr-script-async><a href=3D#attr-script=
-async>async</a></code>;
+         <code title=3Dattr-script-defer><a href=3D#attr-script=
-defer>defer</a></code>;
+         <code title=3Dattr-script-crossorigin><a href=3D#attr-=
script-crossorigin>crossorigin</a></code></td>
+     <td><code><a href=3D#htmlscriptelement>HTMLScript=
Element</a></code></td>
+    <tr><th><code><a href=3D#the-section-element&gt=
;section</a></code></th>
+     <td>Generic document or application section</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>;
+         <a href=3D#sectioning-content title=3D"Sectioning conte=
nt">sectioning</a></td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a></td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a></td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a></td>
+     <td><code><a href=3D#htmlelement>HTMLElement</=
a></code></td>
+    <tr><th><code><a href=3D#the-select-element>=
select</a></code></th>
+     <td>List box control</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>;
+         <a href=3D#phrasing-content title=3D"Phrasing content&q=
uot;>phrasing</a>;
+         <a href=3D#interactive-content title=3D"Interactive con=
tent">interactive</a>;
+         <a href=3D#category-listed title=3Dcategory-listed>listed=
</a>;
+         <a href=3D#category-label title=3Dcategory-label>labelabl=
e</a>;
+         <a href=3D#category-submit title=3Dcategory-submit>submit=
table</a>;
+         <a href=3D#category-reset title=3Dcategory-reset>resettab=
le</a>;
+         <a href=3D#category-form-attr title=3Dcategory-form-attr>=
reassociateable</a>;
+         <a href=3D#form-associated-element title=3D"Form-associ=
ated element">form-associated</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><code><a href=3D#the-option-element>option&lt=
;/a></code>, <code><a href=3D#the-optgroup-element>o=
ptgroup</a></code></td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a>;
+         <code title=3Dattr-fe-autofocus><a href=3D#attr-fe-aut=
ofocus>autofocus</a></code>;
+         <code title=3Dattr-fe-disabled><a href=3D#attr-fe-disa=
bled>disabled</a></code>;
+         <code title=3Dattr-fae-form><a href=3D#attr-fae-form&g=
t;form</a></code>;
+         <code title=3Dattr-select-multiple><a href=3D#attr-sel=
ect-multiple>multiple</a></code>;
+         <code title=3Dattr-fe-name><a href=3D#attr-fe-name>=
name</a></code>;
+         <code title=3Dattr-select-required><a href=3D#attr-sel=
ect-required>required</a></code>;
+         <code title=3Dattr-select-size><a href=3D#attr-select-=
size>size</a></code></td>
+     <td><code><a href=3D#htmlselectelement>HTMLSelect=
Element</a></code></td>
+    <tr><th><code><a href=3D#the-small-element>s=
mall</a></code></th>
+     <td>Side comment</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>;
+         <a href=3D#phrasing-content title=3D"Phrasing content&q=
uot;>phrasing</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a></td>
+     <td><code><a href=3D#htmlelement>HTMLElement</=
a></code></td>
+    <tr><th><code><a href=3D#the-source-element>=
source</a></code></th>
+     <td>Media source for <code><a href=3D#the-video-elem=
ent>video</a></code> or <code><a href=3D#the-audi=
o-element>audio</a></code></td>
+     <td>none</td>
+     <td><code><a href=3D#the-video-element>video</=
a></code>;
+         <code><a href=3D#the-audio-element>audio</a>&=
lt;/code>;
+         <code><a href=3D#the-template-element>template</=
a></code></td>
+     <td>empty</td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a>;
+         <code title=3Dattr-source-src><a href=3D#attr-source-s=
rc>src</a></code>;
+         <code title=3Dattr-source-type><a href=3D#attr-source-=
type>type</a></code>;
+         <code title=3Dattr-source-media><a href=3D#attr-source=
-media>media</a></code></td>
+     <td><code><a href=3D#htmlsourceelement>HTMLSource=
Element</a></code></td>
+    <tr><th><code><a href=3D#the-span-element>sp=
an</a></code></th>
+     <td>Generic phrasing container</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>;
+         <a href=3D#phrasing-content title=3D"Phrasing content&q=
uot;>phrasing</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a></td>
+     <td><code><a href=3D#htmlspanelement>HTMLSpanElem=
ent</a></code></td>
+    <tr><th><code><a href=3D#the-strong-element>=
strong</a></code></th>
+     <td>Importance</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>;
+         <a href=3D#phrasing-content title=3D"Phrasing content&q=
uot;>phrasing</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a></td>
+     <td><code><a href=3D#htmlelement>HTMLElement</=
a></code></td>
+    <tr><th><code><a href=3D#the-style-element>s=
tyle</a></code></th>
+     <td>Embedded styling information</td>
+     <td><a href=3D#metadata-content title=3D"Metadata con=
tent">metadata</a>;
+         <a href=3D#flow-content title=3D"Flow content">=
flow</a></td>
+     <td><code><a href=3D#the-head-element>head</a&=
gt;</code>;
+         <code><a href=3D#the-noscript-element>noscript</=
a></code>*;
+         <a href=3D#flow-content title=3D"flow content">=
flow</a>*</td>
+     <td>varies*</td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a>;
+         <code title=3Dattr-style-media><a href=3D#attr-style-m=
edia>media</a></code>;
+         <code title=3Dattr-style-type><a href=3D#attr-style-ty=
pe>type</a></code>;
+         <code title=3Dattr-style-scoped><a href=3D#attr-style-=
scoped>scoped</a></code></td>
+     <td><code><a href=3D#htmlstyleelement>HTMLStyleEl=
ement</a></code></td>
+    <tr><th><code><a href=3D#the-sub-and-sup-elemen=
ts>sub</a></code></th>
+     <td>Subscript</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>;
+         <a href=3D#phrasing-content title=3D"Phrasing content&q=
uot;>phrasing</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a></td>
+     <td><code><a href=3D#htmlelement>HTMLElement</=
a></code></td>
+    <tr><th><code><a href=3D#the-summary-element&gt=
;summary</a></code></th>
+     <td>Caption for <code><a href=3D#the-details-element=
>details</a></code></td>
+     <td>none</td>
+     <td><code><a href=3D#the-details-element>details&=
lt;/a></code></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a></td>
+     <td><code><a href=3D#htmlelement>HTMLElement</=
a></code></td>
+    <tr><th><code><a href=3D#the-sub-and-sup-elemen=
ts>sup</a></code></th>
+     <td>Superscript</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>;
+         <a href=3D#phrasing-content title=3D"Phrasing content&q=
uot;>phrasing</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a></td>
+     <td><code><a href=3D#htmlelement>HTMLElement</=
a></code></td>
+    <tr><th><code><a href=3D#the-table-element>t=
able</a></code></th>
+     <td>Table</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a></td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a></td>
+     <td><code><a href=3D#the-caption-element>caption&=
lt;/a></code>*;
+         <code><a href=3D#the-colgroup-element>colgroup</=
a></code>*;
+         <code><a href=3D#the-thead-element>thead</a>&=
lt;/code>*;
+         <code><a href=3D#the-tbody-element>tbody</a>&=
lt;/code>*;
+         <code><a href=3D#the-tfoot-element>tfoot</a>&=
lt;/code>*;
+         <code><a href=3D#the-tr-element>tr</a></co=
de>*;
+         <a href=3D#script-supporting-elements>script-supporting e=
lements</a></td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a></td>
+     <td><code><a href=3D#htmltableelement>HTMLTableEl=
ement</a></code></td>
+    <tr><th><code><a href=3D#the-tbody-element>t=
body</a></code></th>
+     <td>Group of rows in a table</td>
+     <td>none</td>
+     <td><code><a href=3D#the-table-element>table</=
a></code>;
+         <code><a href=3D#the-template-element>template</=
a></code></td>
+     <td><code><a href=3D#the-tr-element>tr</a>&=
lt;/code>;
+         <a href=3D#script-supporting-elements>script-supporting e=
lements</a></td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a></td>
+     <td><code><a href=3D#htmltablesectionelement>HTML=
TableSectionElement</a></code></td>
+    <tr><th><code><a href=3D#the-td-element>td&l=
t;/a></code></th>
+     <td>Table cell</td>
+     <td><a href=3D#sectioning-root title=3D"Sectioning ro=
ot">sectioning root</a></td>
+     <td><code><a href=3D#the-tr-element>tr</a>&=
lt;/code>;
+         <code><a href=3D#the-template-element>template</=
a></code></td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a></td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a>;
+         <code title=3Dattr-tdth-colspan><a href=3D#attr-tdth-c=
olspan>colspan</a></code>;
+         <code title=3Dattr-tdth-rowspan><a href=3D#attr-tdth-r=
owspan>rowspan</a></code>;
+         <code title=3Dattr-tdth-headers><a href=3D#attr-tdth-h=
eaders>headers</a></code></td>
+     <td><code><a href=3D#htmltabledatacellelement>HTM=
LTableDataCellElement</a></code></td>
+    <tr><th><code><a href=3D#the-template-element&g=
t;template</a></code></th>
+     <td>Template</td>
+     <td><a href=3D#metadata-content title=3D"Metadata con=
tent">metadata</a>;
+         <a href=3D#flow-content title=3D"Flow content">=
flow</a>;
+         <a href=3D#phrasing-content title=3D"Phrasing content&q=
uot;>phrasing</a>;
+         <a href=3D#script-supporting-elements title=3D"Script-s=
upporting elements">script-supporting</a></td>
+     <td><a href=3D#metadata-content title=3D"Metadata con=
tent">metadata</a>;
+         <a href=3D#phrasing-content title=3D"Phrasing content&q=
uot;>phrasing</a>;
+         <a href=3D#script-supporting-elements title=3D"Script-s=
upporting elements">script-supporting</a>;
+         <code><a href=3D#the-colgroup-element>colgroup</=
a></code>*</td>
+     <td>it's complicated*</td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a></td>
+     <td><code><a href=3D#htmltemplateelement>HTMLTemp=
lateElement</a></code></td>
+    <tr><th><code><a href=3D#the-textarea-element&g=
t;textarea</a></code></th>
+     <td>Multiline text field</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>;
+         <a href=3D#phrasing-content title=3D"Phrasing content&q=
uot;>phrasing</a>;
+         <a href=3D#interactive-content title=3D"Interactive con=
tent">interactive</a>;
+         <a href=3D#category-listed title=3Dcategory-listed>listed=
</a>;
+         <a href=3D#category-label title=3Dcategory-label>labelabl=
e</a>;
+         <a href=3D#category-submit title=3Dcategory-submit>submit=
table</a>;
+         <a href=3D#category-reset title=3Dcategory-reset>resettab=
le</a>;
+         <a href=3D#category-form-attr title=3Dcategory-form-attr>=
reassociateable</a>;
+         <a href=3D#form-associated-element title=3D"Form-associ=
ated element">form-associated</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#text-content title=3D"text content&quo=
t;>text</a></td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a>;
+         <code title=3Dattr-fe-autofocus><a href=3D#attr-fe-aut=
ofocus>autofocus</a></code>;
+         <code title=3Dattr-textarea-cols><a href=3D#attr-texta=
rea-cols>cols</a></code>;
+         <code title=3Dattr-fe-dirname><a href=3D#attr-fe-dirna=
me>dirname</a></code>;
+         <code title=3Dattr-fe-disabled><a href=3D#attr-fe-disa=
bled>disabled</a></code>;
+         <code title=3Dattr-fae-form><a href=3D#attr-fae-form&g=
t;form</a></code>;
+         <code title=3Dattr-textarea-maxlength><a href=3D#attr-=
textarea-maxlength>maxlength</a></code>;
+         <code title=3Dattr-textarea-minlength><a href=3D#attr-=
textarea-minlength>minlength</a></code>;
+         <code title=3Dattr-fe-name><a href=3D#attr-fe-name>=
name</a></code>;
+         <code title=3Dattr-textarea-placeholder><a href=3D#att=
r-textarea-placeholder>placeholder</a></code>;
+         <code title=3Dattr-textarea-readonly><a href=3D#attr-t=
extarea-readonly>readonly</a></code>;
+         <code title=3Dattr-textarea-required><a href=3D#attr-t=
extarea-required>required</a></code>;
+         <code title=3Dattr-textarea-rows><a href=3D#attr-texta=
rea-rows>rows</a></code>;
+         <code title=3Dattr-textarea-wrap><a href=3D#attr-texta=
rea-wrap>wrap</a></code></td>
+     <td><code><a href=3D#htmltextareaelement>HTMLText=
AreaElement</a></code></td>
+    <tr><th><code><a href=3D#the-tfoot-element>t=
foot</a></code></th>
+     <td>Group of footer rows in a table</td>
+     <td>none</td>
+     <td><code><a href=3D#the-table-element>table</=
a></code>;
+         <code><a href=3D#the-template-element>template</=
a></code></td>
+     <td><code><a href=3D#the-tr-element>tr</a>&=
lt;/code>;
+         <a href=3D#script-supporting-elements>script-supporting e=
lements</a></td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a></td>
+     <td><code><a href=3D#htmltablesectionelement>HTML=
TableSectionElement</a></code></td>
+    <tr><th><code><a href=3D#the-th-element>th&l=
t;/a></code></th>
+     <td>Table header cell</td>
+     <td>none</td>
+     <td><code><a href=3D#the-tr-element>tr</a>&=
lt;/code>;
+         <code><a href=3D#the-template-element>template</=
a></code></td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>*</td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a>;
+         <code title=3Dattr-tdth-colspan><a href=3D#attr-tdth-c=
olspan>colspan</a></code>;
+         <code title=3Dattr-tdth-rowspan><a href=3D#attr-tdth-r=
owspan>rowspan</a></code>;
+         <code title=3Dattr-tdth-headers><a href=3D#attr-tdth-h=
eaders>headers</a></code>;
+         <code title=3Dattr-th-scope><a href=3D#attr-th-scope&g=
t;scope</a></code>;
+         <code title=3Dattr-th-sorted><a href=3D#attr-th-sorted=
>sorted</a></code>;
+         <code title=3Dattr-th-abbr><a href=3D#attr-th-abbr>=
abbr</a></code></td>
+     <td><code><a href=3D#htmltableheadercellelement>H=
TMLTableHeaderCellElement</a></code></td>
+    <tr><th><code><a href=3D#the-thead-element>t=
head</a></code></th>
+     <td>Group of heading rows in a table</td>
+     <td>none</td>
+     <td><code><a href=3D#the-table-element>table</=
a></code>;
+         <code><a href=3D#the-template-element>template</=
a></code></td>
+     <td><code><a href=3D#the-tr-element>tr</a>&=
lt;/code>;
+         <a href=3D#script-supporting-elements>script-supporting e=
lements</a></td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a></td>
+     <td><code><a href=3D#htmltablesectionelement>HTML=
TableSectionElement</a></code></td>
+    <tr><th><code><a href=3D#the-time-element>ti=
me</a></code></th>
+     <td>Machine-readable equivalent of date- or time-related data=
</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>;
+         <a href=3D#phrasing-content title=3D"Phrasing content&q=
uot;>phrasing</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a>;
+         <code title=3Dattr-time-datetime><a href=3D#attr-time-=
datetime>datetime</a></code></td>
+     <td><code><a href=3D#htmltimeelement>HTMLTimeElem=
ent</a></code></td>
+    <tr><th><code><a href=3D#the-title-element>t=
itle</a></code></th>
+     <td>Document title</td>
+     <td><a href=3D#metadata-content title=3D"Metadata con=
tent">metadata</a></td>
+     <td><code><a href=3D#the-head-element>head</a&=
gt;</code>;
+         <code><a href=3D#the-template-element>template</=
a></code></td>
+     <td><a href=3D#text-content title=3D"text content&quo=
t;>text</a>*</td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a></td>
+     <td><code><a href=3D#htmltitleelement>HTMLTitleEl=
ement</a></code></td>
+    <tr><th><code><a href=3D#the-tr-element>tr&l=
t;/a></code></th>
+     <td>Table row</td>
+     <td>none</td>
+     <td><code><a href=3D#the-table-element>table</=
a></code>;
+         <code><a href=3D#the-thead-element>thead</a>&=
lt;/code>;
+         <code><a href=3D#the-tbody-element>tbody</a>&=
lt;/code>;
+         <code><a href=3D#the-tfoot-element>tfoot</a>&=
lt;/code>;
+         <code><a href=3D#the-template-element>template</=
a></code></td>
+     <td><code><a href=3D#the-th-element>th</a>&=
lt;/code>*;
+         <code><a href=3D#the-td-element>td</a></co=
de>;
+         <a href=3D#script-supporting-elements>script-supporting e=
lements</a></td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a></td>
+     <td><code><a href=3D#htmltablerowelement>HTMLTabl=
eRowElement</a></code></td>
+    <tr><th><code><a href=3D#the-track-element>t=
rack</a></code></th>
+     <td>Timed text track</td>
+     <td>none</td>
+     <td><code><a href=3D#the-audio-element>audio</=
a></code>;
+         <code><a href=3D#the-video-element>video</a>&=
lt;/code>;
+         <code><a href=3D#the-template-element>template</=
a></code></td>
+     <td>empty</td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a>;
+         <code title=3Dattr-track-default><a href=3D#attr-track=
-default>default</a></code>;
+         <code title=3Dattr-track-kind><a href=3D#attr-track-ki=
nd>kind</a></code>;
+         <code title=3Dattr-track-label><a href=3D#attr-track-l=
abel>label</a></code>;
+         <code title=3Dattr-track-src><a href=3D#attr-track-src=
>src</a></code>;
+         <code title=3Dattr-track-srclang><a href=3D#attr-track=
-srclang>srclang</a></code></td>
+     <td><code><a href=3D#htmltrackelement>HTMLTrackEl=
ement</a></code></td>
+    <tr><th><code><a href=3D#the-u-element>u<=
/a></code></th>
+     <td>Keywords</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>;
+         <a href=3D#phrasing-content title=3D"Phrasing content&q=
uot;>phrasing</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a></td>
+     <td><code><a href=3D#htmlelement>HTMLElement</=
a></code></td>
+    <tr><th><code><a href=3D#the-ul-element>ul&l=
t;/a></code></th>
+     <td>List</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a></td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a></td>
+     <td><code><a href=3D#the-li-element>li</a>&=
lt;/code>;
+         <a href=3D#script-supporting-elements>script-supporting e=
lements</a></td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a></td>
+     <td><code><a href=3D#htmlulistelement>HTMLUListEl=
ement</a></code></td>
+    <tr><th><code><a href=3D#the-var-element>var=
</a></code></th>
+     <td>Variable</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>;
+         <a href=3D#phrasing-content title=3D"Phrasing content&q=
uot;>phrasing</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a></td>
+     <td><code><a href=3D#htmlelement>HTMLElement</=
a></code></td>
+    <tr><th><code><a href=3D#the-video-element>v=
ideo</a></code></th>
+     <td>Video player</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>;
+         <a href=3D#phrasing-content title=3D"Phrasing content&q=
uot;>phrasing</a>;
+         <a href=3D#embedded-content title=3D"Embedded content&q=
uot;>embedded</a>;
+         <a href=3D#interactive-content title=3D"Interactive con=
tent">interactive</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td><code><a href=3D#the-source-element>source&lt=
;/a></code>*;
+         <a href=3D#transparent>transparent</a>*</td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a>;
+         <code title=3Dattr-media-src><a href=3D#attr-media-src=
>src</a></code>;
+         <code title=3Dattr-media-crossorigin><a href=3D#attr-m=
edia-crossorigin>crossorigin</a></code>;
+         <code title=3Dattr-video-poster><a href=3D#attr-video-=
poster>poster</a></code>;
+         <code title=3Dattr-media-preload><a href=3D#attr-media=
-preload>preload</a></code>;
+         <code title=3Dattr-media-autoplay><a href=3D#attr-medi=
a-autoplay>autoplay</a></code>;
+         <code title=3Dattr-media-mediagroup><a href=3D#attr-me=
dia-mediagroup>mediagroup</a></code>;
+         <code title=3Dattr-media-loop><a href=3D#attr-media-lo=
op>loop</a></code>;
+         <code title=3Dattr-media-muted><a href=3D#attr-media-m=
uted>muted</a></code>;
+         <code title=3Dattr-media-controls><a href=3D#attr-medi=
a-controls>controls</a></code>;
+         <code title=3Dattr-dim-width><a href=3D#attr-dim-width=
>width</a></code>;
+         <code title=3Dattr-dim-height><a href=3D#attr-dim-heig=
ht>height</a></code></td>
+     <td><code><a href=3D#htmlvideoelement>HTMLVideoEl=
ement</a></code></td>
+    <tr><th><code><a href=3D#the-wbr-element>wbr=
</a></code></th>
+     <td>Line breaking opportunity</td>
+     <td><a href=3D#flow-content title=3D"Flow content&quo=
t;>flow</a>;
+         <a href=3D#phrasing-content title=3D"Phrasing content&q=
uot;>phrasing</a></td>
+     <td><a href=3D#phrasing-content title=3D"Phrasing con=
tent">phrasing</a></td>
+     <td>empty</td>
+     <td><a href=3D#global-attributes title=3D"global attr=
ibutes">globals</a></td>
+     <td><code><a href=3D#htmlelement>HTMLElement</=
a></code></td>
+    </table><p class=3Dtablenote><small>An asterisk (*=
) in a cell indicates that the actual rules are more
+  complicated than indicated in the table above.</small></p>
+
+  <p>† Categories in the "Parents" column ref=
er to parents that list the given categories in
+  their content model, not to elements that themselves are in those cate=
gories. For example, the
+  <code><a href=3D#the-a-element>a</a></code> el=
ement's "Parents" column says "phrasing", so any elem=
ent whose content model
+  contains the "phrasing" category could be a parent of an &lt=
;code><a href=3D#the-a-element>a</a></code> element.=
 Since the "flow"
+  category includes all the "phrasing" elements, that means th=
e <code><a href=3D#the-th-element>th</a></code> e=
lement could be a
+  parent to an <code><a href=3D#the-a-element>a</a>&lt=
;/code> element.</p>
+
+
+
+  <h3 class=3Dno-num id=3Delement-content-categories>Element conte=
nt categories</h3>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <!-- when updating this also check the category-list <ul>s --=
>
+
+  <table><caption>List of element content categories</cap=
tion>
+   <thead><tr><th> Category
+     <th> Elements
+     <th> Elements with exceptions
+   <tbody><tr><td> <a href=3D#metadata-content>M=
etadata content</a>
+     <td>
+      <code><a href=3D#the-base-element>base</a></c=
ode>;
+      <code><a href=3D#the-link-element>link</a></c=
ode>;
+      <code><a href=3D#the-meta-element>meta</a></c=
ode>;
+      <code><a href=3D#the-noscript-element>noscript</a&g=
t;</code>;
+      <code><a href=3D#the-script-element>script</a>&l=
t;/code>;
+      <code><a href=3D#the-style-element>style</a><=
/code>;
+      <code><a href=3D#the-template-element>template</a&g=
t;</code>;
+      <code><a href=3D#the-title-element>title</a><=
/code>
+     <td>
+      —
+
+    <tr><td> <a href=3D#flow-content>Flow content</=
a>
+     <td>
+      <code><a href=3D#the-a-element>a</a></code&gt=
;;
+      <code><a href=3D#the-abbr-element>abbr</a></c=
ode>;
+      <code><a href=3D#the-address-element>address</a>=
</code>;
+      <code><a href=3D#the-article-element>article</a>=
</code>;
+      <code><a href=3D#the-aside-element>aside</a><=
/code>;
+      <code><a href=3D#the-audio-element>audio</a><=
/code>;
+      <code><a href=3D#the-b-element>b</a></code&gt=
;;
+      <code><a href=3D#the-bdi-element>bdi</a></cod=
e>;
+      <code><a href=3D#the-bdo-element>bdo</a></cod=
e>;
+      <code><a href=3D#the-blockquote-element>blockquote<=
/a></code>;
+      <code><a href=3D#the-br-element>br</a></code&=
gt;;
+      <code><a href=3D#the-button-element>button</a>&l=
t;/code>;
+      <code><a href=3D#the-canvas-element>canvas</a>&l=
t;/code>;
+      <code><a href=3D#the-cite-element>cite</a></c=
ode>;
+      <code><a href=3D#the-code-element>code</a></c=
ode>;
+      <code><a href=3D#the-data-element>data</a></c=
ode>;
+      <code><a href=3D#the-datalist-element>datalist</a&g=
t;</code>;
+      <code><a href=3D#the-del-element>del</a></cod=
e>;
+      <code><a href=3D#the-details-element>details</a>=
</code>;
+      <code><a href=3D#the-dfn-element>dfn</a></cod=
e>;
+      <code><a href=3D#the-dialog-element>dialog</a>&l=
t;/code>;
+      <code><a href=3D#the-div-element>div</a></cod=
e>;
+      <code><a href=3D#the-dl-element>dl</a></code&=
gt;;
+      <code><a href=3D#the-em-element>em</a></code&=
gt;;
+      <code><a href=3D#the-embed-element>embed</a><=
/code>;
+      <code><a href=3D#the-fieldset-element>fieldset</a&g=
t;</code>;
+      <code><a href=3D#the-figure-element>figure</a>&l=
t;/code>;
+      <code><a href=3D#the-footer-element>footer</a>&l=
t;/code>;
+      <code><a href=3D#the-form-element>form</a></c=
ode>;
+      <code><a href=3D#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements&=
gt;h1</a></code>;
+      <code><a href=3D#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements&=
gt;h2</a></code>;
+      <code><a href=3D#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements&=
gt;h3</a></code>;
+      <code><a href=3D#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements&=
gt;h4</a></code>;
+      <code><a href=3D#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements&=
gt;h5</a></code>;
+      <code><a href=3D#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements&=
gt;h6</a></code>;
+      <code><a href=3D#the-header-element>header</a>&l=
t;/code>;
+      <code><a href=3D#the-hgroup-element>hgroup</a>&l=
t;/code>;
+      <code><a href=3D#the-hr-element>hr</a></code&=
gt;;
+      <code><a href=3D#the-i-element>i</a></code&gt=
;;
+      <code><a href=3D#the-iframe-element>iframe</a>&l=
t;/code>;
+      <code><a href=3D#the-img-element>img</a></cod=
e>;
+      <code><a href=3D#the-input-element>input</a><=
/code>;
+      <code><a href=3D#the-ins-element>ins</a></cod=
e>;
+      <code><a href=3D#the-kbd-element>kbd</a></cod=
e>;
+      <code><a href=3D#the-keygen-element>keygen</a>&l=
t;/code>;
+      <code><a href=3D#the-label-element>label</a><=
/code>;
+      <code><a href=3D#the-main-element>main</a></c=
ode>;
+      <code><a href=3D#the-map-element>map</a></cod=
e>;
+      <code><a href=3D#the-mark-element>mark</a></c=
ode>;
+      <code><a href=3D#math>math</a></code>;
+      <code><a href=3D#the-menu-element>menu</a></c=
ode>;
+      <code><a href=3D#the-meter-element>meter</a><=
/code>;
+      <code><a href=3D#the-nav-element>nav</a></cod=
e>;
+      <code><a href=3D#the-noscript-element>noscript</a&g=
t;</code>;
+      <code><a href=3D#the-object-element>object</a>&l=
t;/code>;
+      <code><a href=3D#the-ol-element>ol</a></code&=
gt;;
+      <code><a href=3D#the-output-element>output</a>&l=
t;/code>;
+      <code><a href=3D#the-p-element>p</a></code&gt=
;;
+      <code><a href=3D#the-pre-element>pre</a></cod=
e>;
+      <code><a href=3D#the-progress-element>progress</a&g=
t;</code>;
+      <code><a href=3D#the-q-element>q</a></code&gt=
;;
+      <code><a href=3D#the-ruby-element>ruby</a></c=
ode>;
+      <code><a href=3D#the-s-element>s</a></code&gt=
;;
+      <code><a href=3D#the-samp-element>samp</a></c=
ode>;
+      <code><a href=3D#the-script-element>script</a>&l=
t;/code>;
+      <code><a href=3D#the-section-element>section</a>=
</code>;
+      <code><a href=3D#the-select-element>select</a>&l=
t;/code>;
+      <code><a href=3D#the-small-element>small</a><=
/code>;
+      <code><a href=3D#the-span-element>span</a></c=
ode>;
+      <code><a href=3D#the-strong-element>strong</a>&l=
t;/code>;
+      <code><a href=3D#the-sub-and-sup-elements>sub</a&gt=
;</code>;
+      <code><a href=3D#the-sub-and-sup-elements>sup</a&gt=
;</code>;
+      <code><a href=3D#svg>svg</a></code>;
+      <code><a href=3D#the-table-element>table</a><=
/code>;
+      <code><a href=3D#the-template-element>template</a&g=
t;</code>;
+      <code><a href=3D#the-textarea-element>textarea</a&g=
t;</code>;
+      <code><a href=3D#the-time-element>time</a></c=
ode>;
+      <code><a href=3D#the-u-element>u</a></code&gt=
;;
+      <code><a href=3D#the-ul-element>ul</a></code&=
gt;;
+      <code><a href=3D#the-var-element>var</a></cod=
e>;
+      <code><a href=3D#the-video-element>video</a><=
/code>;
+      <code><a href=3D#the-wbr-element>wbr</a></cod=
e>;
+      <a href=3D#text-content title=3D"text content">Tex=
t</a>
+     <td>
+      <code><a href=3D#the-area-element>area</a></c=
ode> (if it is a descendant of a <code><a href=3D#the-map-ele=
ment>map</a></code> element);
+      <code><a href=3D#the-link-element>link</a></c=
ode> (if the <code title=3Dattr-itemprop><a href=3D#names:-th=
e-itemprop-attribute>itemprop</a></code> attribute is pres=
ent);
+      <code><a href=3D#the-meta-element>meta</a></c=
ode> (if the <code title=3Dattr-itemprop><a href=3D#names:-th=
e-itemprop-attribute>itemprop</a></code> attribute is pres=
ent);
+      <code><a href=3D#the-style-element>style</a><=
/code> (if the <code title=3Dattr-style-scoped><a href=3D#att=
r-style-scoped>scoped</a></code> attribute is present)
+
+    <tr><td> <a href=3D#sectioning-content>Sectioning =
content</a>
+     <td>
+      <code><a href=3D#the-article-element>article</a>=
</code>;
+      <code><a href=3D#the-aside-element>aside</a><=
/code>;
+      <code><a href=3D#the-nav-element>nav</a></cod=
e>;
+      <code><a href=3D#the-section-element>section</a>=
</code>
+     <td>
+      —
+
+    <tr><td> <a href=3D#heading-content>Heading conten=
t</a>
+     <td>
+      <code><a href=3D#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements&=
gt;h1</a></code>;
+      <code><a href=3D#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements&=
gt;h2</a></code>;
+      <code><a href=3D#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements&=
gt;h3</a></code>;
+      <code><a href=3D#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements&=
gt;h4</a></code>;
+      <code><a href=3D#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements&=
gt;h5</a></code>;
+      <code><a href=3D#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements&=
gt;h6</a></code>;
+      <code><a href=3D#the-hgroup-element>hgroup</a>&l=
t;/code>
+     <td>
+      —
+
+    <tr><td> <a href=3D#phrasing-content>Phrasing cont=
ent</a>
+     <td>
+      <code><a href=3D#the-a-element>a</a></code&gt=
;;
+      <code><a href=3D#the-abbr-element>abbr</a></c=
ode>;
+      <code><a href=3D#the-audio-element>audio</a><=
/code>;
+      <code><a href=3D#the-b-element>b</a></code&gt=
;;
+      <code><a href=3D#the-bdi-element>bdi</a></cod=
e>;
+      <code><a href=3D#the-bdo-element>bdo</a></cod=
e>;
+      <code><a href=3D#the-br-element>br</a></code&=
gt;;
+      <code><a href=3D#the-button-element>button</a>&l=
t;/code>;
+      <code><a href=3D#the-canvas-element>canvas</a>&l=
t;/code>;
+      <code><a href=3D#the-cite-element>cite</a></c=
ode>;
+      <code><a href=3D#the-code-element>code</a></c=
ode>;
+      <code><a href=3D#the-data-element>data</a></c=
ode>;
+      <code><a href=3D#the-datalist-element>datalist</a&g=
t;</code>;
+      <code><a href=3D#the-del-element>del</a></cod=
e>;
+      <code><a href=3D#the-dfn-element>dfn</a></cod=
e>;
+      <code><a href=3D#the-em-element>em</a></code&=
gt;;
+      <code><a href=3D#the-embed-element>embed</a><=
/code>;
+      <code><a href=3D#the-i-element>i</a></code&gt=
;;
+      <code><a href=3D#the-iframe-element>iframe</a>&l=
t;/code>;
+      <code><a href=3D#the-img-element>img</a></cod=
e>;
+      <code><a href=3D#the-input-element>input</a><=
/code>;
+      <code><a href=3D#the-ins-element>ins</a></cod=
e>;
+      <code><a href=3D#the-kbd-element>kbd</a></cod=
e>;
+      <code><a href=3D#the-keygen-element>keygen</a>&l=
t;/code>;
+      <code><a href=3D#the-label-element>label</a><=
/code>;
+      <code><a href=3D#the-map-element>map</a></cod=
e>;
+      <code><a href=3D#the-mark-element>mark</a></c=
ode>;
+      <code><a href=3D#math>math</a></code>;
+      <code><a href=3D#the-meter-element>meter</a><=
/code>;
+      <code><a href=3D#the-noscript-element>noscript</a&g=
t;</code>;
+      <code><a href=3D#the-object-element>object</a>&l=
t;/code>;
+      <code><a href=3D#the-output-element>output</a>&l=
t;/code>;
+      <code><a href=3D#the-progress-element>progress</a&g=
t;</code>;
+      <code><a href=3D#the-q-element>q</a></code&gt=
;;
+      <code><a href=3D#the-ruby-element>ruby</a></c=
ode>;
+      <code><a href=3D#the-s-element>s</a></code&gt=
;;
+      <code><a href=3D#the-samp-element>samp</a></c=
ode>;
+      <code><a href=3D#the-script-element>script</a>&l=
t;/code>;
+      <code><a href=3D#the-select-element>select</a>&l=
t;/code>;
+      <code><a href=3D#the-small-element>small</a><=
/code>;
+      <code><a href=3D#the-span-element>span</a></c=
ode>;
+      <code><a href=3D#the-strong-element>strong</a>&l=
t;/code>;
+      <code><a href=3D#the-sub-and-sup-elements>sub</a&gt=
;</code>;
+      <code><a href=3D#the-sub-and-sup-elements>sup</a&gt=
;</code>;
+      <code><a href=3D#svg>svg</a></code>;
+      <code><a href=3D#the-template-element>template</a&g=
t;</code>;
+      <code><a href=3D#the-textarea-element>textarea</a&g=
t;</code>;
+      <code><a href=3D#the-time-element>time</a></c=
ode>;
+      <code><a href=3D#the-u-element>u</a></code&gt=
;;
+      <code><a href=3D#the-var-element>var</a></cod=
e>;
+      <code><a href=3D#the-video-element>video</a><=
/code>;
+      <code><a href=3D#the-wbr-element>wbr</a></cod=
e>;
+      <a href=3D#text-content title=3D"text content">Tex=
t</a>
+     <td>
+      <code><a href=3D#the-area-element>area</a></c=
ode> (if it is a descendant of a  <code><a href=3D#the-map-el=
ement>map</a></code> element);
+      <code><a href=3D#the-link-element>link</a></c=
ode> (if the <code title=3Dattr-itemprop><a href=3D#names:-th=
e-itemprop-attribute>itemprop</a></code> attribute is pres=
ent);
+      <code><a href=3D#the-meta-element>meta</a></c=
ode> (if the <code title=3Dattr-itemprop><a href=3D#names:-th=
e-itemprop-attribute>itemprop</a></code> attribute is pres=
ent)
+
+    <tr><td> <a href=3D#embedded-content>Embedded cont=
ent</a>
+     <td>
+      <code><a href=3D#the-audio-element>audio</a><=
/code>
+      <code><a href=3D#the-canvas-element>canvas</a>&l=
t;/code>
+      <code><a href=3D#the-embed-element>embed</a><=
/code>
+      <code><a href=3D#the-iframe-element>iframe</a>&l=
t;/code>
+      <code><a href=3D#the-img-element>img</a></cod=
e>
+      <code><a href=3D#math>math</a></code>
+      <code><a href=3D#the-object-element>object</a>&l=
t;/code>
+      <code><a href=3D#svg>svg</a></code>
+      <code><a href=3D#the-video-element>video</a><=
/code>
+     <td>
+      —
+
+    <tr><td> <a href=3D#interactive-content>Interactiv=
e content</a>
+     <td>
+      <code><a href=3D#the-a-element>a</a></code&gt=
;;
+      <code><a href=3D#the-button-element>button</a>&l=
t;/code>;
+      <code><a href=3D#the-details-element>details</a>=
</code>;
+      <code><a href=3D#the-embed-element>embed</a><=
/code>;
+      <code><a href=3D#the-iframe-element>iframe</a>&l=
t;/code>;
+      <code><a href=3D#the-keygen-element>keygen</a>&l=
t;/code>;
+      <code><a href=3D#the-label-element>label</a><=
/code>;
+      <code><a href=3D#the-select-element>select</a>&l=
t;/code>;
+      <code><a href=3D#the-textarea-element>textarea</a&g=
t;</code>;
+     <td>
+      <code><a href=3D#the-audio-element>audio</a><=
/code> (if the <code title=3Dattr-media-controls><a href=3D#a=
ttr-media-controls>controls</a></code> attribute is presen=
t);
+      <code><a href=3D#the-img-element>img</a></cod=
e> (if the <code title=3Dattr-hyperlink-usemap><a href=3D#att=
r-hyperlink-usemap>usemap</a></code> attribute is present)=
;
+      <code><a href=3D#the-input-element>input</a><=
/code> (if the <code title=3Dattr-input-type><a href=3D#attr-=
input-type>type</a></code> attribute is <em>not</=
em> in the <a href=3D"#hidden-state-(type=3Dhidden)" titl=
e=3Dattr-input-type-hidden>Hidden</a> state);
+      <code><a href=3D#the-object-element>object</a>&l=
t;/code> (if the <code title=3Dattr-hyperlink-usemap><a href=3D=
#attr-hyperlink-usemap>usemap</a></code> attribute is pres=
ent)<!-- see also comment in <object> section -->;
+      <code><a href=3D#the-video-element>video</a><=
/code> (if the <code title=3Dattr-media-controls><a href=3D#a=
ttr-media-controls>controls</a></code> attribute is presen=
t)
+
+    <tr><td> <a href=3D#sectioning-root title=3D"sec=
tioning root">Sectioning roots</a>
+     <td>
+      <code><a href=3D#the-blockquote-element>blockquote<=
/a></code>;
+      <code><a href=3D#the-body-element>body</a></c=
ode>;
+      <code><a href=3D#the-details-element>details</a>=
</code>;
+      <code><a href=3D#the-dialog-element>dialog</a>&l=
t;/code>;
+      <code><a href=3D#the-fieldset-element>fieldset</a&g=
t;</code>;
+      <code><a href=3D#the-figure-element>figure</a>&l=
t;/code>;
+      <code><a href=3D#the-td-element>td</a></code&=
gt;
+     <td>
+      —
+
+    <tr><td> <a href=3D#form-associated-element title=3D&=
quot;form-associated element">Form-associated elements</a>
+     <td>
+      <code><a href=3D#the-button-element>button</a>&l=
t;/code>;
+      <code><a href=3D#the-fieldset-element>fieldset</a&g=
t;</code>;
+      <code><a href=3D#the-input-element>input</a><=
/code>;
+      <code><a href=3D#the-keygen-element>keygen</a>&l=
t;/code>;
+      <code><a href=3D#the-label-element>label</a><=
/code>;
+      <code><a href=3D#the-object-element>object</a>&l=
t;/code>;
+      <code><a href=3D#the-output-element>output</a>&l=
t;/code>;
+      <code><a href=3D#the-select-element>select</a>&l=
t;/code>;
+      <code><a href=3D#the-textarea-element>textarea</a&g=
t;</code>;
+      <code><a href=3D#the-img-element>img</a></cod=
e>
+     <td>
+      —
+
+    <tr><td> <a href=3D#category-listed title=3Dcategory-=
listed>Listed elements</a>
+     <td>
+      <code><a href=3D#the-button-element>button</a>&l=
t;/code>;
+      <code><a href=3D#the-fieldset-element>fieldset</a&g=
t;</code>;
+      <code><a href=3D#the-input-element>input</a><=
/code>;
+      <code><a href=3D#the-keygen-element>keygen</a>&l=
t;/code>;
+      <code><a href=3D#the-object-element>object</a>&l=
t;/code>;
+      <code><a href=3D#the-output-element>output</a>&l=
t;/code>;
+      <code><a href=3D#the-select-element>select</a>&l=
t;/code>;
+      <code><a href=3D#the-textarea-element>textarea</a&g=
t;</code>
+     <td>
+      —
+
+    <tr><td> <a href=3D#category-submit title=3Dcategory-=
submit>Submittable elements</a>
+     <td>
+      <code><a href=3D#the-button-element>button</a>&l=
t;/code>;
+      <code><a href=3D#the-input-element>input</a><=
/code>;
+      <code><a href=3D#the-keygen-element>keygen</a>&l=
t;/code>;
+      <code><a href=3D#the-object-element>object</a>&l=
t;/code>;
+      <code><a href=3D#the-select-element>select</a>&l=
t;/code>;
+      <code><a href=3D#the-textarea-element>textarea</a&g=
t;</code>
+     <td>
+      —
+
+    <tr><td> <a href=3D#category-reset title=3Dcategory-r=
eset>Resettable elements</a>
+     <td>
+      <code><a href=3D#the-input-element>input</a><=
/code>;
+      <code><a href=3D#the-keygen-element>keygen</a>&l=
t;/code>;
+      <code><a href=3D#the-output-element>output</a>&l=
t;/code>;
+      <code><a href=3D#the-select-element>select</a>&l=
t;/code>;
+      <code><a href=3D#the-textarea-element>textarea</a&g=
t;</code>
+     <td>
+      —
+
+    <tr><td> <a href=3D#category-label title=3Dcategory-l=
abel>Labelable elements</a>
+     <td>
+      <code><a href=3D#the-button-element>button</a>&l=
t;/code>;
+      <code><a href=3D#the-input-element>input</a><=
/code>;
+      <code><a href=3D#the-keygen-element>keygen</a>&l=
t;/code>;
+      <code><a href=3D#the-meter-element>meter</a><=
/code>;
+      <code><a href=3D#the-output-element>output</a>&l=
t;/code>;
+      <code><a href=3D#the-progress-element>progress</a&g=
t;</code>;
+      <code><a href=3D#the-select-element>select</a>&l=
t;/code>;
+      <code><a href=3D#the-textarea-element>textarea</a&g=
t;</code>
+     <td>
+      —
+
+    <tr><td> <a href=3D#category-form-attr title=3Dcatego=
ry-form-attr>Reassociateable elements</a>
+     <td>
+      <code><a href=3D#the-button-element>button</a>&l=
t;/code>;
+      <code><a href=3D#the-fieldset-element>fieldset</a&g=
t;</code>;
+      <code><a href=3D#the-input-element>input</a><=
/code>;
+      <code><a href=3D#the-keygen-element>keygen</a>&l=
t;/code>;
+      <code><a href=3D#the-label-element>label</a><=
/code>;
+      <code><a href=3D#the-object-element>object</a>&l=
t;/code>;
+      <code><a href=3D#the-output-element>output</a>&l=
t;/code>;
+      <code><a href=3D#the-select-element>select</a>&l=
t;/code>;
+      <code><a href=3D#the-textarea-element>textarea</a&g=
t;</code>
+     <td>
+      —
+
+    <tr><td> <a href=3D#palpable-content>Palpable cont=
ent</a>
+     <td>
+      <code><a href=3D#the-a-element>a</a></code&gt=
;;
+      <code><a href=3D#the-abbr-element>abbr</a></c=
ode>;
+      <code><a href=3D#the-address-element>address</a>=
</code>;
+      <code><a href=3D#the-article-element>article</a>=
</code>;
+      <code><a href=3D#the-aside-element>aside</a><=
/code>;
+      <code><a href=3D#the-b-element>b</a></code&gt=
;;
+      <code><a href=3D#the-bdi-element>bdi</a></cod=
e>;
+      <code><a href=3D#the-bdo-element>bdo</a></cod=
e>;
+      <code><a href=3D#the-blockquote-element>blockquote<=
/a></code>;
+      <code><a href=3D#the-button-element>button</a>&l=
t;/code>;
+      <code><a href=3D#the-canvas-element>canvas</a>&l=
t;/code>;
+      <code><a href=3D#the-cite-element>cite</a></c=
ode>;
+      <code><a href=3D#the-code-element>code</a></c=
ode>;
+      <code><a href=3D#the-data-element>data</a></c=
ode>;
+      <code><a href=3D#the-details-element>details</a>=
</code>;
+      <code><a href=3D#the-dfn-element>dfn</a></cod=
e>;
+      <code><a href=3D#the-div-element>div</a></cod=
e>;
+      <code><a href=3D#the-em-element>em</a></code&=
gt;;
+      <code><a href=3D#the-embed-element>embed</a><=
/code>;
+      <code><a href=3D#the-fieldset-element>fieldset</a&g=
t;</code>;
+      <code><a href=3D#the-figure-element>figure</a>&l=
t;/code>;
+      <code><a href=3D#the-footer-element>footer</a>&l=
t;/code>;
+      <code><a href=3D#the-form-element>form</a></c=
ode>;
+      <code><a href=3D#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements&=
gt;h1</a></code>;
+      <code><a href=3D#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements&=
gt;h2</a></code>;
+      <code><a href=3D#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements&=
gt;h3</a></code>;
+      <code><a href=3D#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements&=
gt;h4</a></code>;
+      <code><a href=3D#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements&=
gt;h5</a></code>;
+      <code><a href=3D#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements&=
gt;h6</a></code>;
+      <code><a href=3D#the-header-element>header</a>&l=
t;/code>;
+      <code><a href=3D#the-hgroup-element>hgroup</a>&l=
t;/code>;
+      <code><a href=3D#the-i-element>i</a></code&gt=
;;
+      <code><a href=3D#the-iframe-element>iframe</a>&l=
t;/code>;
+      <code><a href=3D#the-img-element>img</a></cod=
e>;
+      <code><a href=3D#the-ins-element>ins</a></cod=
e>;
+      <code><a href=3D#the-kbd-element>kbd</a></cod=
e>;
+      <code><a href=3D#the-keygen-element>keygen</a>&l=
t;/code>;
+      <code><a href=3D#the-label-element>label</a><=
/code>;
+      <code><a href=3D#the-main-element>main</a></c=
ode>;
+      <code><a href=3D#the-map-element>map</a></cod=
e>;
+      <code><a href=3D#the-mark-element>mark</a></c=
ode>;
+      <code><a href=3D#math>math</a></code>;
+      <code><a href=3D#the-meter-element>meter</a><=
/code>;
+      <code><a href=3D#the-nav-element>nav</a></cod=
e>;
+      <code><a href=3D#the-object-element>object</a>&l=
t;/code>;
+      <code><a href=3D#the-output-element>output</a>&l=
t;/code>;
+      <code><a href=3D#the-p-element>p</a></code&gt=
;;
+      <code><a href=3D#the-pre-element>pre</a></cod=
e>;
+      <code><a href=3D#the-progress-element>progress</a&g=
t;</code>;
+      <code><a href=3D#the-q-element>q</a></code&gt=
;;
+      <code><a href=3D#the-ruby-element>ruby</a></c=
ode>;
+      <code><a href=3D#the-s-element>s</a></code&gt=
;;
+      <code><a href=3D#the-samp-element>samp</a></c=
ode>;
+      <code><a href=3D#the-section-element>section</a>=
</code>;
+      <code><a href=3D#the-select-element>select</a>&l=
t;/code>;
+      <code><a href=3D#the-small-element>small</a><=
/code>;
+      <code><a href=3D#the-span-element>span</a></c=
ode>;
+      <code><a href=3D#the-strong-element>strong</a>&l=
t;/code>;
+      <code><a href=3D#the-sub-and-sup-elements>sub</a&gt=
;</code>;
+      <code><a href=3D#the-sub-and-sup-elements>sup</a&gt=
;</code>;
+      <code><a href=3D#svg>svg</a></code>;
+      <code><a href=3D#the-table-element>table</a><=
/code>;
+      <code><a href=3D#the-textarea-element>textarea</a&g=
t;</code>;
+      <code><a href=3D#the-time-element>time</a></c=
ode>;
+      <code><a href=3D#the-u-element>u</a></code&gt=
;;
+      <code><a href=3D#the-var-element>var</a></cod=
e>;
+      <code><a href=3D#the-video-element>video</a><=
/code>
+     <td>
+      <code><a href=3D#the-audio-element>audio</a><=
/code> (if the <code title=3Dattr-media-controls><a href=3D#a=
ttr-media-controls>controls</a></code> attribute is presen=
t);
+      <code><a href=3D#the-dl-element>dl</a></code&=
gt; (if the element's children include at least one name-value group);
+      <code><a href=3D#the-input-element>input</a><=
/code> (if the <code title=3Dattr-input-type><a href=3D#attr-=
input-type>type</a></code> attribute is <em>not</=
em> in the <a href=3D"#hidden-state-(type=3Dhidden)" titl=
e=3Dattr-input-type-hidden>Hidden</a> state);
+      <code><a href=3D#the-menu-element>menu</a></c=
ode> (if the <code title=3Dattr-menu-type><a href=3D#attr-men=
u-type>type</a></code> attribute is in the <a href=3D#t=
oolbar-state title=3D"toolbar state">toolbar</a> state=
);
+      <code><a href=3D#the-ol-element>ol</a></code&=
gt; (if the element's children include at least one <code><a hre=
f=3D#the-li-element>li</a></code> element);
+      <code><a href=3D#the-ul-element>ul</a></code&=
gt; (if the element's children include at least one <code><a hre=
f=3D#the-li-element>li</a></code> element);
+      <a href=3D#text-content title=3D"text content">Tex=
t</a> that is not <a href=3D#inter-element-whitespace>inter-e=
lement whitespace</a>
+
+    <tr><td> <a href=3D#script-supporting-elements>Scr=
ipt-supporting elements</a>
+     <td>
+      <code><a href=3D#the-script-element>script</a>&l=
t;/code>;
+      <code><a href=3D#the-template-element>template</a&g=
t;</code>
+     <td>
+      —
+
+  </table><h3 class=3Dno-num id=3Dattributes-1>Attributes&lt=
;/h3>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <table><caption>List of attributes (excluding event handle=
r content attributes)</caption>
+   <thead><tr><th> Attribute
+     <th> Element(s)
+     <th> Description
+     <th> Value
+   <tbody><tr><th> <code title=3D"">ab=
br</code>
+     <td> <code title=3Dattr-th-abbr><a href=3D#attr-th-a=
bbr>th</a></code>
+     <td> Alternative label to use for the header cell when refere=
ncing the cell in other contexts
+     <td> <a href=3D#attribute-text>Text</a>*
+    <tr><th> <code title=3D"">accept</cod=
e>
+     <td> <code title=3Dattr-input-accept><a href=3D#attr=
-input-accept>input</a></code>
+     <td> Hint for expected file type in <a href=3D"#file-=
upload-state-(type=3Dfile)" title=3Dattr-input-type-file>file upl=
oad controls</a>
+     <td> <a href=3D#set-of-comma-separated-tokens>Set of co=
mma-separated tokens</a>* consisting of <a href=3D#valid-mime-ty=
pe title=3D"valid MIME type">valid MIME types with no parame=
ters</a> or <code title=3D"">audio/*</code>, =
<code title=3D"">video/*</code>, or <code title=3D=
"">image/*</code>
+    <tr><th> <code title=3D"">accept-charset=
</code>
+     <td> <code title=3Dattr-form-accept-charset><a href=3D=
#attr-form-accept-charset>form</a></code>
+     <td> Character encodings to use for <a href=3D#form-submis=
sion>form submission</a>
+     <td> <a href=3D#ordered-set-of-unique-space-separated-toke=
ns>Ordered set of unique space-separated tokens</a>, <a href=3D=
#ascii-case-insensitive>ASCII case-insensitive</a>, consisting o=
f <a href=3D#encoding-label title=3D"encoding label">labe=
ls</a> of <a href=3D#ascii-compatible-character-encoding title=3D=
"ASCII-compatible character encoding">ASCII-compatible chara=
cter encodings</a>*
+    <tr><th> <code title=3D"">accesskey</=
code>
+     <td> <a href=3D#the-accesskey-attribute title=3Dattr-acces=
skey>HTML elements</a>
+     <td> Keyboard shortcut to activate or focus element
+     <td> <a href=3D#ordered-set-of-unique-space-separated-toke=
ns>Ordered set of unique space-separated tokens</a>, <a href=3D=
#case-sensitive>case-sensitive</a>, consisting of one Unicode co=
de point in length
+    <tr><th> <code title=3D"">action</cod=
e>
+     <td> <code title=3Dattr-fs-action><a href=3D#attr-fs=
-action>form</a></code>
+     <td> <a href=3D#url>URL</a> to use for <a href=
=3D#form-submission>form submission</a>
+     <td> <a href=3D#valid-non-empty-url-potentially-surrounded=
-by-spaces>Valid non-empty URL potentially surrounded by spaces</a&=
gt;
+    <tr><th> <code title=3D"">allowfullscree=
n</code>
+     <td> <code title=3Dattr-iframe-allowfullscreen><a hr=
ef=3D#attr-iframe-allowfullscreen>iframe</a></code>
+     <td> Whether to allow the <code><a href=3D#the-ifram=
e-element>iframe</a></code>'s contents to use <code tit=
le=3Ddom-element-requestFullscreen><a href=3D#dom-element-requestfu=
llscreen>requestFullscreen()</a></code>
+     <td> <a href=3D#boolean-attribute>Boolean attribute<=
/a>
+    <tr><th> <code title=3D"">alt</code&g=
t;
+     <td> <code title=3Dattr-area-alt><a href=3D#attr-are=
a-alt>area</a></code>;
+          <code title=3Dattr-img-alt><a href=3D#attr-img-alt&gt=
;img</a></code>;
+          <code title=3Dattr-input-alt><a href=3D#attr-input-al=
t>input</a></code>
+     <td> Replacement text for use when images are not available
+     <td> <a href=3D#attribute-text>Text</a>*
+    <tr><th> <code title=3D"">async</code=
>
+     <td> <code title=3Dattr-script-async><a href=3D#attr=
-script-async>script</a></code>
+     <td> Execute script asynchronously
+     <td> <a href=3D#boolean-attribute>Boolean attribute<=
/a>
+    <tr><th> <code title=3D"">autocomplete&l=
t;/code>
+     <td> <code title=3Dattr-form-autocomplete><a href=3D=
#attr-form-autocomplete>form</a></code>
+     <td> Default setting for autofill feature for controls in the=
 form
+     <td> "<code title=3D"">on</code>&q=
uot;; "<code title=3D"">off</code>"
+    <tr><th> <code title=3D"">autocomplete&l=
t;/code>
+     <td> <code title=3Dattr-fe-autocomplete><a href=3D#a=
ttr-fe-autocomplete>input</a></code>;
+          <code title=3Dattr-fe-autocomplete><a href=3D#attr-fe=
-autocomplete>select</a></code>;
+          <code title=3Dattr-fe-autocomplete><a href=3D#attr-fe=
-autocomplete>textarea</a></code>
+     <td> Hint for form autofill feature
+     <td> <a href=3D#autofill-field title=3D"autofill fiel=
d">Autofill field</a> name and related tokens*
+    <tr><th> <code title=3D"">autofocus</=
code>
+     <td> <code title=3Dattr-fe-autofocus><a href=3D#attr=
-fe-autofocus>button</a></code>;
+          <code title=3Dattr-fe-autofocus><a href=3D#attr-fe-au=
tofocus>input</a></code>;
+          <code title=3Dattr-fe-autofocus><a href=3D#attr-fe-au=
tofocus>keygen</a></code>;
+          <code title=3Dattr-fe-autofocus><a href=3D#attr-fe-au=
tofocus>select</a></code>;
+          <code title=3Dattr-fe-autofocus><a href=3D#attr-fe-au=
tofocus>textarea</a></code>
+     <td> Automatically focus the form control when the page is lo=
aded
+     <td> <a href=3D#boolean-attribute>Boolean attribute<=
/a>
+    <tr><th> <code title=3D"">autoplay</c=
ode>
+     <td> <code title=3Dattr-media-autoplay><a href=3D#at=
tr-media-autoplay>audio</a></code>;
+          <code title=3Dattr-media-autoplay><a href=3D#attr-med=
ia-autoplay>video</a></code>
+     <td> Hint that the <a href=3D#media-resource>media reso=
urce</a> can be started automatically when the page is loaded
+     <td> <a href=3D#boolean-attribute>Boolean attribute<=
/a>
+    <tr><th> <code title=3D"">challenge</=
code>
+     <td> <code title=3Dattr-keygen-challenge><a href=3D#=
attr-keygen-challenge>keygen</a></code>
+     <td> String to package with the generated and signed public k=
ey
+     <td> <a href=3D#attribute-text>Text</a>
+    <tr><th> <code title=3D"">charset</co=
de>
+     <td> <code title=3Dattr-meta-charset><a href=3D#attr=
-meta-charset>meta</a></code>
+     <td> <a href=3D#character-encoding-declaration>Characte=
r encoding declaration</a>
+     <td> <a href=3D#encoding-label>Encoding label</a>=
*
+    <tr><th> <code title=3D"">charset</co=
de>
+     <td> <code title=3Dattr-script-charset><a href=3D#at=
tr-script-charset>script</a></code>
+     <td> Character encoding of the external script resource
+     <td> <a href=3D#encoding-label>Encoding label</a>=
*
+    <tr><th> <code title=3D"">checked</co=
de>
+     <td> <code title=3Dattr-menuitem-checked><a href=3D#=
attr-menuitem-checked>menuitem</a></code>;
+          <code title=3Dattr-input-checked><a href=3D#attr-inpu=
t-checked>input</a></code>
+     <td> Whether the command or control is checked
+     <td> <a href=3D#boolean-attribute>Boolean attribute<=
/a>
+    <tr><th> <code title=3D"">cite</code&=
gt;
+     <td> <code title=3Dattr-blockquote-cite><a href=3D#a=
ttr-blockquote-cite>blockquote</a></code>;
+          <code title=3Dattr-mod-cite><a href=3D#attr-mod-cite&=
gt;del</a></code>;
+          <code title=3Dattr-mod-cite><a href=3D#attr-mod-cite&=
gt;ins</a></code>;
+          <code title=3Dattr-q-cite><a href=3D#attr-q-cite>q=
</a></code>
+     <td> Link to the source of the quotation or more information =
about the edit
+     <td> <a href=3D#valid-url-potentially-surrounded-by-spaces=
>Valid URL potentially surrounded by spaces</a>
+    <tr><th> <code title=3D"">class</code=
>
+     <td> <a href=3D#classes title=3Dattr-class>HTML element=
s</a>
+     <td> Classes to which the element belongs
+     <td> <a href=3D#set-of-space-separated-tokens>Set of sp=
ace-separated tokens</a>
+    <tr><th> <code title=3D"">cols</code&=
gt;
+     <td> <code title=3Dattr-textarea-cols><a href=3D#att=
r-textarea-cols>textarea</a></code>
+     <td> Maximum number of characters per line
+     <td> <a href=3D#valid-non-negative-integer>Valid non-ne=
gative integer</a> greater than zero
+    <tr><th> <code title=3D"">colspan</co=
de>
+     <td> <code title=3Dattr-tdth-colspan><a href=3D#attr=
-tdth-colspan>td</a></code>;
+          <code title=3Dattr-tdth-colspan><a href=3D#attr-tdth-=
colspan>th</a></code>
+     <td> Number of columns that the cell is to span
+     <td> <a href=3D#valid-non-negative-integer>Valid non-ne=
gative integer</a> greater than zero
+    <tr><th> <code title=3D"">command</co=
de>
+     <td> <code title=3Dattr-menuitem-command><a href=3D#=
attr-menuitem-command>menuitem</a></code>
+     <td> Command definition
+     <td> <a href=3D#concept-id title=3Dconcept-id>ID</a&=
gt;*
+    <tr><th> <code title=3D"">content</co=
de>
+     <td> <code title=3Dattr-meta-content><a href=3D#attr=
-meta-content>meta</a></code>
+     <td> Value of the element
+     <td> <a href=3D#attribute-text>Text</a>*
+    <tr><th> <code title=3D"">contenteditabl=
e</code>
+     <td> <a href=3D#attr-contenteditable title=3Dattr-contente=
ditable>HTML elements</a>
+     <td> Whether the element is editable
+     <td> "<code title=3D"">true</code>=
"; "<code title=3D"">false</code>"
+    <tr><th> <code title=3D"">contextmenu&lt=
;/code>
+     <td> <a href=3D#attr-contextmenu title=3Dattr-contextmenu&=
gt;HTML elements</a>
+     <td> The element's context menu
+     <td> <a href=3D#concept-id title=3Dconcept-id>ID</a&=
gt;*
+    <tr><th> <code title=3D"">controls</c=
ode>
+     <td> <code title=3Dattr-media-controls><a href=3D#at=
tr-media-controls>audio</a></code>;
+          <code title=3Dattr-media-controls><a href=3D#attr-med=
ia-controls>video</a></code>
+     <td> Show user agent controls
+     <td> <a href=3D#boolean-attribute>Boolean attribute<=
/a>
+    <tr><th> <code title=3D"">coords</cod=
e>
+     <td> <code title=3Dattr-area-coords><a href=3D#attr-=
area-coords>area</a></code>
+     <td> Coordinates for the shape to be created in an <a href=
=3D#image-map>image map</a>
+     <td> <a href=3D#valid-list-of-integers>Valid list of in=
tegers</a>*
+    <tr><th> <code title=3D"">crossorigin&lt=
;/code>
+     <td> <code title=3Dattr-media-crossorigin><a href=3D=
#attr-media-crossorigin>audio</a></code>;
+          <code title=3Dattr-img-crossorigin><a href=3D#attr-im=
g-crossorigin>img</a></code>;
+          <code title=3Dattr-link-crossorigin><a href=3D#attr-l=
ink-crossorigin>link</a></code>;
+          <code title=3Dattr-script-crossorigin><a href=3D#attr=
-script-crossorigin>script</a></code>;
+          <code title=3Dattr-media-crossorigin><a href=3D#attr-=
media-crossorigin>video</a></code>
+     <td> How the element handles crossorigin requests
+     <td> "<code title=3Dattr-crossorigin-anonymous-keywor=
d><a href=3D#attr-crossorigin-anonymous-keyword>anonymous</a&=
gt;</code>"; "<code title=3Dattr-crossorigin-use-crede=
ntials-keyword><a href=3D#attr-crossorigin-use-credentials-keyword&=
gt;use-credentials</a></code>"
+    <tr><th> <code title=3D"">data</code&=
gt;
+     <td> <code title=3Dattr-object-data><a href=3D#attr-=
object-data>object</a></code>
+     <td> Address of the resource
+     <td> <a href=3D#valid-non-empty-url-potentially-surrounded=
-by-spaces>Valid non-empty URL potentially surrounded by spaces</a&=
gt;
+    <tr><th> <code title=3D"">datetime</c=
ode>
+     <td> <code title=3Dattr-mod-datetime><a href=3D#attr=
-mod-datetime>del</a></code>;
+          <code title=3Dattr-mod-datetime><a href=3D#attr-mod-d=
atetime>ins</a></code>
+     <td> Date and (optionally) time of the change
+     <td> <a href=3D#valid-date-string-with-optional-time>Va=
lid date string with optional time</a>
+    <tr><th> <code title=3D"">datetime</c=
ode>
+     <td> <code title=3Dattr-time-datetime><a href=3D#att=
r-time-datetime>time</a></code>
+     <td> Machine-readable value
+     <td> <a href=3D#valid-month-string>Valid month string&l=
t;/a>,
+          <a href=3D#valid-date-string>valid date string</a>=
,
+          <a href=3D#valid-yearless-date-string>valid yearless dat=
e string</a>,
+          <a href=3D#valid-time-string>valid time string</a>=
,
+          <a href=3D#valid-local-date-and-time-string>valid local =
date and time string</a>,
+          <a href=3D#valid-time-zone-offset-string>valid time-zone=
 offset string</a>,
+          <a href=3D#valid-global-date-and-time-string>valid globa=
l date and time string</a>,
+          <a href=3D#valid-week-string>valid week string</a>=
,
+          <a href=3D#valid-non-negative-integer>valid non-negative=
 integer</a>, or
+          <a href=3D#valid-duration-string>valid duration string&l=
t;/a>
+    <tr><th> <code title=3D"">default</co=
de>
+     <td> <code title=3Dattr-menuitem-default><a href=3D#=
attr-menuitem-default>menuitem</a></code>
+     <td> Mark the command as being a default command
+     <td> <a href=3D#boolean-attribute>Boolean attribute<=
/a>
+    <tr><th> <code title=3D"">default</co=
de>
+     <td> <code title=3Dattr-track-default><a href=3D#att=
r-track-default>track</a></code>
+     <td> Enable the track if no other <a href=3D#text-track&gt=
;text track</a> is more suitable
+     <td> <a href=3D#boolean-attribute>Boolean attribute<=
/a>
+    <tr><th> <code title=3D"">defer</code=
>
+     <td> <code title=3Dattr-script-defer><a href=3D#attr=
-script-defer>script</a></code>
+     <td> Defer script execution
+     <td> <a href=3D#boolean-attribute>Boolean attribute<=
/a>
+    <tr><th> <code title=3D"">dir</code&g=
t;
+     <td> <a href=3D#the-dir-attribute title=3Dattr-dir>HTML=
 elements</a>
+     <td> <a href=3D#the-directionality title=3D"the direc=
tionality">The text directionality</a> of the element
+     <td> "<code title=3Dattr-dir-ltr><a href=3D#att=
r-dir-ltr>ltr</a></code>"; "<code title=3Datt=
r-dir-rtl><a href=3D#attr-dir-rtl>rtl</a></code>&quo=
t;; "<code title=3Dattr-dir-auto><a href=3D#attr-dir-auto&g=
t;auto</a></code>"
+    <tr><th> <code title=3D"">dirname</co=
de>
+     <td> <code title=3Dattr-fe-dirname><a href=3D#attr-f=
e-dirname>input</a></code>;
+          <code title=3Dattr-fe-dirname><a href=3D#attr-fe-dirn=
ame>textarea</a></code>
+     <td> Name of form field to use for sending the element's <=
a href=3D#the-directionality title=3D"the directionality">di=
rectionality</a> in <a href=3D#form-submission>form submissio=
n</a>
+     <td> <a href=3D#attribute-text>Text</a>*
+    <tr><th> <code title=3D"">disabled</c=
ode>
+     <td> <code title=3Dattr-fe-disabled><a href=3D#attr-=
fe-disabled>button</a></code>;
+          <code title=3Dattr-menuitem-disabled><a href=3D#attr-=
menuitem-disabled>menuitem</a></code>;
+          <code title=3Dattr-fieldset-disabled><a href=3D#attr-=
fieldset-disabled>fieldset</a></code>;
+          <code title=3Dattr-fe-disabled><a href=3D#attr-fe-dis=
abled>input</a></code>;
+          <code title=3Dattr-fe-disabled><a href=3D#attr-fe-dis=
abled>keygen</a></code>;
+          <code title=3Dattr-optgroup-disabled><a href=3D#attr-=
optgroup-disabled>optgroup</a></code>;
+          <code title=3Dattr-option-disabled><a href=3D#attr-op=
tion-disabled>option</a></code>;
+          <code title=3Dattr-fe-disabled><a href=3D#attr-fe-dis=
abled>select</a></code>;
+          <code title=3Dattr-fe-disabled><a href=3D#attr-fe-dis=
abled>textarea</a></code>
+     <td> Whether the form control is disabled
+     <td> <a href=3D#boolean-attribute>Boolean attribute<=
/a>
+    <tr><th> <code title=3D"">download</c=
ode>
+     <td> <code title=3Dattr-hyperlink-download><a href=3D=
#attr-hyperlink-download>a</a></code>;
+          <code title=3Dattr-hyperlink-download><a href=3D#attr=
-hyperlink-download>area</a></code>
+     <td> Whether to download the resource instead of navigating t=
o it, and its file name if so
+     <td> Text
+    <tr><th> <code title=3D"">draggable</=
code>
+     <td> <a href=3D#the-draggable-attribute title=3Dattr-dragg=
able>HTML elements</a>
+     <td> Whether the element is draggable
+     <td> "<code title=3D"">true</code>=
"; "<code title=3D"">false</code>"
+    <tr><th> <code title=3D"">dropzone</c=
ode>
+     <td> <a href=3D#the-dropzone-attribute title=3Dattr-dropzo=
ne>HTML elements</a>
+     <td> Accepted item types for drag-and-drop
+     <td> <a href=3D#unordered-set-of-unique-space-separated-to=
kens>Unordered set of unique space-separated tokens</a>, <a h=
ref=3D#ascii-case-insensitive>ASCII case-insensitive</a>, consis=
ting of accepted types and drag feedback*
+    <tr><th> <code title=3D"">enctype</co=
de>
+     <td> <code title=3Dattr-fs-enctype><a href=3D#attr-f=
s-enctype>form</a></code>
+     <td> Form data set encoding type to use for <a href=3D#for=
m-submission>form submission</a>
+     <td> "<code title=3Dattr-fs-enctype-urlencoded>&lt=
;a href=3D#attr-fs-enctype-urlencoded>application/x-www-form-urlencode=
d</a></code>"; "<code title=3Dattr-fs-enctype-fo=
rmdata><a href=3D#attr-fs-enctype-formdata>multipart/form-data&l=
t;/a></code>"; "<code title=3Dattr-fs-enctype-text&=
gt;<a href=3D#attr-fs-enctype-text>text/plain</a></code&gt=
;"
+    <tr><th> <code title=3D"">for</code&g=
t;
+     <td> <code title=3Dattr-label-for><a href=3D#attr-la=
bel-for>label</a></code>
+     <td> Associate the label with form control
+     <td> <a href=3D#concept-id title=3Dconcept-id>ID</a&=
gt;*
+    <tr><th> <code title=3D"">for</code&g=
t;
+     <td> <code title=3Dattr-output-for><a href=3D#attr-o=
utput-for>output</a></code>
+     <td> Specifies controls from which the output was calculated
+     <td> <a href=3D#unordered-set-of-unique-space-separated-to=
kens>Unordered set of unique space-separated tokens</a>, <a h=
ref=3D#case-sensitive>case-sensitive</a>, consisting of IDs*
+    <tr><th> <code title=3D"">form</code&=
gt;
+     <td> <code title=3Dattr-fae-form><a href=3D#attr-fae=
-form>button</a></code>;
+          <code title=3Dattr-fae-form><a href=3D#attr-fae-form&=
gt;fieldset</a></code>;
+          <code title=3Dattr-fae-form><a href=3D#attr-fae-form&=
gt;input</a></code>;
+          <code title=3Dattr-fae-form><a href=3D#attr-fae-form&=
gt;keygen</a></code>;
+          <code title=3Dattr-fae-form><a href=3D#attr-fae-form&=
gt;label</a></code>;
+          <code title=3Dattr-fae-form><a href=3D#attr-fae-form&=
gt;object</a></code>;
+          <code title=3Dattr-fae-form><a href=3D#attr-fae-form&=
gt;output</a></code>;
+          <code title=3Dattr-fae-form><a href=3D#attr-fae-form&=
gt;select</a></code>;
+          <code title=3Dattr-fae-form><a href=3D#attr-fae-form&=
gt;textarea</a></code>
+     <td> Associates the control with a <code><a href=3D#=
the-form-element>form</a></code> element
+     <td> <a href=3D#concept-id title=3Dconcept-id>ID</a&=
gt;*
+    <tr><th> <code title=3D"">formaction<=
/code>
+     <td> <code title=3Dattr-fs-formaction><a href=3D#att=
r-fs-formaction>button</a></code>;
+          <code title=3Dattr-fs-formaction><a href=3D#attr-fs-f=
ormaction>input</a></code>
+     <td> <a href=3D#url>URL</a> to use for <a href=
=3D#form-submission>form submission</a>
+     <td> <a href=3D#valid-non-empty-url-potentially-surrounded=
-by-spaces>Valid non-empty URL potentially surrounded by spaces</a&=
gt;
+    <tr><th> <code title=3D"">formenctype&lt=
;/code>
+     <td> <code title=3Dattr-fs-formenctype><a href=3D#at=
tr-fs-formenctype>button</a></code>;
+          <code title=3Dattr-fs-formenctype><a href=3D#attr-fs-=
formenctype>input</a></code>
+     <td> Form data set encoding type to use for <a href=3D#for=
m-submission>form submission</a>
+     <td> "<code title=3Dattr-fs-enctype-urlencoded>&lt=
;a href=3D#attr-fs-enctype-urlencoded>application/x-www-form-urlencode=
d</a></code>"; "<code title=3Dattr-fs-enctype-fo=
rmdata><a href=3D#attr-fs-enctype-formdata>multipart/form-data&l=
t;/a></code>"; "<code title=3Dattr-fs-enctype-text&=
gt;<a href=3D#attr-fs-enctype-text>text/plain</a></code&gt=
;"
+    <tr><th> <code title=3D"">formmethod<=
/code>
+     <td> <code title=3Dattr-fs-formmethod><a href=3D#att=
r-fs-formmethod>button</a></code>;
+          <code title=3Dattr-fs-formmethod><a href=3D#attr-fs-f=
ormmethod>input</a></code>
+     <td> HTTP method to use for <a href=3D#form-submission>=
form submission</a>
+     <td> "<code title=3D"">GET</code>&=
quot;; "<code title=3D"">POST</code>"
+    <tr><th> <code title=3D"">formnovalidate=
</code>
+     <td> <code title=3Dattr-fs-formnovalidate><a href=3D=
#attr-fs-formnovalidate>button</a></code>;
+          <code title=3Dattr-fs-formnovalidate><a href=3D#attr-=
fs-formnovalidate>input</a></code>
+     <td> Bypass form control validation for <a href=3D#form-su=
bmission>form submission</a>
+     <td> <a href=3D#boolean-attribute>Boolean attribute<=
/a>
+    <tr><th> <code title=3D"">formtarget<=
/code>
+     <td> <code title=3Dattr-fs-formtarget><a href=3D#att=
r-fs-formtarget>button</a></code>;
+          <code title=3Dattr-fs-formtarget><a href=3D#attr-fs-f=
ormtarget>input</a></code>
+     <td> <a href=3D#browsing-context>Browsing context</a=
> for <a href=3D#form-submission>form submission</a>
+     <td> <a href=3D#valid-browsing-context-name-or-keyword>=
Valid browsing context name or keyword</a>
+    <tr><th> <code title=3D"">headers</co=
de>
+     <td> <code title=3Dattr-tdth-headers><a href=3D#attr=
-tdth-headers>td</a></code>;
+          <code title=3Dattr-tdth-headers><a href=3D#attr-tdth-=
headers>th</a></code>
+     <td> The header cells for this cell
+     <td> <a href=3D#unordered-set-of-unique-space-separated-to=
kens>Unordered set of unique space-separated tokens</a>, <a h=
ref=3D#case-sensitive>case-sensitive</a>, consisting of IDs*
+    <tr><th> <code title=3D"">height</cod=
e>
+     <td> <code title=3Dattr-canvas-height><a href=3D#att=
r-canvas-height>canvas</a></code>;
+          <code title=3Dattr-dim-height><a href=3D#attr-dim-hei=
ght>embed</a></code>;
+          <code title=3Dattr-dim-height><a href=3D#attr-dim-hei=
ght>iframe</a></code>;
+          <code title=3Dattr-dim-height><a href=3D#attr-dim-hei=
ght>img</a></code>;
+          <code title=3Dattr-dim-height><a href=3D#attr-dim-hei=
ght>input</a></code>;
+          <code title=3Dattr-dim-height><a href=3D#attr-dim-hei=
ght>object</a></code>;
+          <code title=3Dattr-dim-height><a href=3D#attr-dim-hei=
ght>video</a></code>
+     <td> Vertical dimension
+     <td> <a href=3D#valid-non-negative-integer>Valid non-ne=
gative integer</a>
+    <tr><th> <code title=3D"">hidden</cod=
e>
+     <td> <a href=3D#the-hidden-attribute title=3Dattr-hidden&g=
t;HTML elements</a>
+     <td> Whether the element is relevant
+     <td> <a href=3D#boolean-attribute>Boolean attribute<=
/a>
+    <tr><th> <code title=3D"">high</code&=
gt;
+     <td> <code title=3Dattr-meter-high><a href=3D#attr-m=
eter-high>meter</a></code>
+     <td> Low limit of high range
+     <td> <a href=3D#valid-floating-point-number>Valid float=
ing-point number</a>*
+    <tr><th> <code title=3D"">href</code&=
gt;
+     <td> <code title=3Dattr-hyperlink-href><a href=3D#at=
tr-hyperlink-href>a</a></code>;
+          <code title=3Dattr-hyperlink-href><a href=3D#attr-hyp=
erlink-href>area</a></code>
+     <td> Address of the <a href=3D#hyperlink>hyperlink</=
a>
+     <td> <a href=3D#valid-url-potentially-surrounded-by-spaces=
>Valid URL potentially surrounded by spaces</a>
+    <tr><th> <code title=3D"">href</code&=
gt;
+     <td> <code title=3Dattr-link-href><a href=3D#attr-li=
nk-href>link</a></code>
+     <td> Address of the <a href=3D#hyperlink>hyperlink</=
a>
+     <td> <a href=3D#valid-non-empty-url-potentially-surrounded=
-by-spaces>Valid non-empty URL potentially surrounded by spaces</a&=
gt;
+    <tr><th> <code title=3D"">href</code&=
gt;
+     <td> <code title=3Dattr-base-href><a href=3D#attr-ba=
se-href>base</a></code>
+     <td> <a href=3D#document-base-url>Document base URL<=
/a>
+     <td> <a href=3D#valid-url-potentially-surrounded-by-spaces=
>Valid URL potentially surrounded by spaces</a>
+    <tr><th> <code title=3D"">hreflang</c=
ode>
+     <td> <code title=3Dattr-hyperlink-hreflang><a href=3D=
#attr-hyperlink-hreflang>a</a></code>;
+          <code title=3Dattr-hyperlink-hreflang><a href=3D#attr=
-hyperlink-hreflang>area</a></code>;
+          <code title=3Dattr-link-hreflang><a href=3D#attr-link=
-hreflang>link</a></code>
+     <td> Language of the linked resource
+     <td> Valid BCP 47 language tag
+    <tr><th> <code title=3D"">http-equiv<=
/code>
+     <td> <code title=3Dattr-meta-http-equiv><a href=3D#a=
ttr-meta-http-equiv>meta</a></code>
+     <td> Pragma directive
+     <td> <a href=3D#attribute-text>Text</a>*
+    <tr><th> <code title=3D"">icon</code&=
gt;
+     <td> <code title=3Dattr-menuitem-icon><a href=3D#att=
r-menuitem-icon>menuitem</a></code>
+     <td> Icon for the command
+     <td> <a href=3D#valid-non-empty-url-potentially-surrounded=
-by-spaces>Valid non-empty URL potentially surrounded by spaces</a&=
gt;
+    <tr><th> <code title=3D"">id</code&gt=
;
+     <td> <a href=3D#the-id-attribute title=3Dattr-id>HTML e=
lements</a>
+     <td> The element's <a href=3D#concept-id title=3Dconcept-i=
d>ID</a>
+     <td> <a href=3D#attribute-text>Text</a>*
+    <tr><th> <code title=3D"">inert</code=
>
+     <td> <a href=3D#the-inert-attribute title=3Dattr-inert>=
HTML elements</a>
+     <td> Whether the element is inert
+     <td> <a href=3D#boolean-attribute>Boolean attribute<=
/a>
+    <tr><th> <code title=3D"">inputmode</=
code>
+     <td> <code title=3Dattr-fe-inputmode><a href=3D#attr=
-fe-inputmode>input</a></code>;
+          <code title=3Dattr-fe-inputmode><a href=3D#attr-fe-in=
putmode>textarea</a></code>
+     <td> Hint for selecting an input modality
+     <td> <code title=3Dattr-fe-inputmode-keyword-verbatim>&=
lt;a href=3D#attr-fe-inputmode-keyword-verbatim>verbatim</a><=
/code>;=20
+          <code title=3Dattr-fe-inputmode-keyword-latin><a href=
=3D#attr-fe-inputmode-keyword-latin>latin</a></code>;=20
+          <code title=3Dattr-fe-inputmode-keyword-latin-name><a=
 href=3D#attr-fe-inputmode-keyword-latin-name>latin-name</a><=
/code>;=20
+          <code title=3Dattr-fe-inputmode-keyword-latin-prose><=
a href=3D#attr-fe-inputmode-keyword-latin-prose>latin-prose</a>&=
lt;/code>;=20
+          <code title=3Dattr-fe-inputmode-keyword-full-width-latin&gt=
;<a href=3D#attr-fe-inputmode-keyword-full-width-latin>full-width-l=
atin</a></code>;=20
+          <code title=3Dattr-fe-inputmode-keyword-kana><a href=3D=
#attr-fe-inputmode-keyword-kana>kana</a></code>;=20
+          <code title=3Dattr-fe-inputmode-keyword-katakana><a h=
ref=3D#attr-fe-inputmode-keyword-katakana>katakana</a></code&=
gt;;=20
+          <!-- <code title=3D"attr-fe-inputmode-keyword-half-=
width-katakana">half-width-katakana</code>; -->
+          <code title=3Dattr-fe-inputmode-keyword-numeric><a hr=
ef=3D#attr-fe-inputmode-keyword-numeric>numeric</a></code>=
;=20
+          <code title=3Dattr-fe-inputmode-keyword-tel><a href=3D=
#attr-fe-inputmode-keyword-tel>tel</a></code>;=20
+          <code title=3Dattr-fe-inputmode-keyword-email><a href=
=3D#attr-fe-inputmode-keyword-email>email</a></code>;=20
+          <code title=3Dattr-fe-inputmode-keyword-url><a href=3D=
#attr-fe-inputmode-keyword-url>url</a></code>
+    <tr><th> <code title=3D"">ismap</code=
>
+     <td> <code title=3Dattr-img-ismap><a href=3D#attr-im=
g-ismap>img</a></code>
+     <td> Whether the image is a server-side image map
+     <td> <a href=3D#boolean-attribute>Boolean attribute<=
/a>
+    <tr><th> <code title=3D"">itemid</cod=
e>
+     <td> <a href=3D#attr-itemid title=3Dattr-itemid>HTML el=
ements</a>
+     <td> <a href=3D#global-identifier>Global identifier<=
/a> for a microdata item
+     <td> <a href=3D#valid-url-potentially-surrounded-by-spaces=
>Valid URL potentially surrounded by spaces</a>
+    <tr><th> <code title=3D"">itemprop</c=
ode>
+     <td> <a href=3D#names:-the-itemprop-attribute title=3Dattr=
-itemprop>HTML elements</a>
+     <td> <a href=3D#property-names>Property names</a>=
 of a microdata item
+     <td> <a href=3D#unordered-set-of-unique-space-separated-to=
kens>Unordered set of unique space-separated tokens</a>, <a h=
ref=3D#case-sensitive>case-sensitive</a>, consisting of <a hr=
ef=3D#absolute-url title=3D"absolute URL">valid absolute URL=
s</a>, <a href=3D#defined-property-name title=3D"defined pr=
operty name">defined property names</a>, or text*
+    <tr><th> <code title=3D"">itemref</co=
de>
+     <td> <a href=3D#attr-itemref title=3Dattr-itemref>HTML =
elements</a>
+     <td> Referenced elements
+     <td> <a href=3D#unordered-set-of-unique-space-separated-to=
kens>Unordered set of unique space-separated tokens</a>, <a h=
ref=3D#case-sensitive>case-sensitive</a>, consisting of IDs*
+    <tr><th> <code title=3D"">itemscope</=
code>
+     <td> <a href=3D#attr-itemscope title=3Dattr-itemscope>H=
TML elements</a>
+     <td> Introduces a microdata item
+     <td> <a href=3D#boolean-attribute>Boolean attribute<=
/a>
+    <tr><th> <code title=3D"">itemtype</c=
ode>
+     <td> <a href=3D#attr-itemtype title=3Dattr-itemtype>HTM=
L elements</a>
+     <td> <a href=3D#item-types>Item types</a> of a mi=
crodata item
+     <td> <a href=3D#unordered-set-of-unique-space-separated-to=
kens>Unordered set of unique space-separated tokens</a>, <a h=
ref=3D#case-sensitive>case-sensitive</a>, consisting of <a hr=
ef=3D#absolute-url title=3D"absolute URL">valid absolute URL=
</a>*
+    <tr><th> <code title=3D"">keytype</co=
de>
+     <td> <code title=3Dattr-keygen-keytype><a href=3D#at=
tr-keygen-keytype>keygen</a></code>
+     <td> The type of cryptographic key to generate
+     <td> <a href=3D#attribute-text>Text</a>*
+    <tr><th> <code title=3D"">kind</code&=
gt;
+     <td> <code title=3Dattr-track-kind><a href=3D#attr-t=
rack-kind>track</a></code>
+     <td> The type of text track
+     <td> "<code title=3Dattr-track-kind-subtitles><=
a href=3D#attr-track-kind-subtitles>subtitles</a></code>&q=
uot;;
+          "<code title=3Dattr-track-kind-captions><a href=3D=
#attr-track-kind-captions>captions</a></code>";
+          "<code title=3Dattr-track-kind-descriptions><a h=
ref=3D#attr-track-kind-descriptions>descriptions</a></code&gt=
;";
+          "<code title=3Dattr-track-kind-chapters><a href=3D=
#attr-track-kind-chapters>chapters</a></code>";
+          "<code title=3Dattr-track-kind-metadata><a href=3D=
#attr-track-kind-metadata>metadata</a></code>"
+    <tr><th> <code title=3D"">label</code=
>
+     <td> <code title=3Dattr-menuitem-label><a href=3D#at=
tr-menuitem-label>menuitem</a></code>;
+          <code title=3Dattr-menu-label><a href=3D#attr-menu-la=
bel>menu</a></code>;
+          <code title=3Dattr-optgroup-label><a href=3D#attr-opt=
group-label>optgroup</a></code>;
+          <code title=3Dattr-option-label><a href=3D#attr-optio=
n-label>option</a></code>;
+          <code title=3Dattr-track-label><a href=3D#attr-track-=
label>track</a></code>
+     <td> User-visible label
+     <td> <a href=3D#attribute-text>Text</a>
+    <tr><th> <code title=3D"">lang</code&=
gt;
+     <td> <a href=3D#attr-lang title=3Dattr-lang>HTML elemen=
ts</a>
+     <td> <a href=3D#language>Language</a> of the elem=
ent
+     <td> Valid BCP 47 language tag or the empty string
+    <tr><th> <code title=3D"">list</code&=
gt;
+     <td> <code title=3Dattr-input-list><a href=3D#attr-i=
nput-list>input</a></code>
+     <td> List of autocomplete options
+     <td> <a href=3D#concept-id title=3Dconcept-id>ID</a&=
gt;*
+    <tr><th> <code title=3D"">loop</code&=
gt;
+     <td> <code title=3Dattr-media-loop><a href=3D#attr-m=
edia-loop>audio</a></code>;
+          <code title=3Dattr-media-loop><a href=3D#attr-media-l=
oop>video</a></code>
+     <td> Whether to loop the <a href=3D#media-resource>medi=
a resource</a>
+     <td> <a href=3D#boolean-attribute>Boolean attribute<=
/a>
+    <tr><th> <code title=3D"">low</code&g=
t;
+     <td> <code title=3Dattr-meter-low><a href=3D#attr-me=
ter-low>meter</a></code>
+     <td> High limit of low range
+     <td> <a href=3D#valid-floating-point-number>Valid float=
ing-point number</a>*
+    <tr><th> <code title=3D"">manifest</c=
ode>
+     <td> <code title=3Dattr-html-manifest><a href=3D#att=
r-html-manifest>html</a></code>
+     <td> <a href=3D#concept-appcache-manifest title=3Dconcept-=
appcache-manifest>Application cache manifest</a>
+     <td> <a href=3D#valid-non-empty-url-potentially-surrounded=
-by-spaces>Valid non-empty URL potentially surrounded by spaces</a&=
gt;
+    <tr><th> <code title=3D"">max</code&g=
t;
+     <td> <code title=3Dattr-input-max><a href=3D#attr-in=
put-max>input</a></code>
+     <td> Maximum value
+     <td> Varies*
+    <tr><th> <code title=3D"">max</code&g=
t;
+     <td> <code title=3Dattr-meter-max><a href=3D#attr-me=
ter-max>meter</a></code>;
+          <code title=3Dattr-progress-max><a href=3D#attr-progr=
ess-max>progress</a></code>
+     <td> Upper bound of range
+     <td> <a href=3D#valid-floating-point-number>Valid float=
ing-point number</a>*
+    <tr><th> <code title=3D"">maxlength</=
code>
+     <td> <code title=3Dattr-input-maxlength><a href=3D#a=
ttr-input-maxlength>input</a></code>;
+          <code title=3Dattr-textarea-maxlength><a href=3D#attr=
-textarea-maxlength>textarea</a></code>
+     <td> Maximum length of value
+     <td> <a href=3D#valid-non-negative-integer>Valid non-ne=
gative integer</a>
+    <tr><th> <code title=3D"">media</code=
>
+     <td> <code title=3Dattr-link-media><a href=3D#attr-l=
ink-media>link</a></code>;
+          <code title=3Dattr-source-media><a href=3D#attr-sourc=
e-media>source</a></code>;
+          <code title=3Dattr-style-media><a href=3D#attr-style-=
media>style</a></code>
+     <td> Applicable media
+     <td> <a href=3D#valid-media-query>Valid media query<=
/a>
+    <tr><th> <code title=3D"">mediagroup<=
/code>
+     <td> <code title=3Dattr-media-mediagroup><a href=3D#=
attr-media-mediagroup>audio</a></code>;
+          <code title=3Dattr-media-mediagroup><a href=3D#attr-m=
edia-mediagroup>video</a></code>
+     <td> Groups <a href=3D#media-element title=3D"media e=
lement">media elements</a> together with an implicit <co=
de><a href=3D#mediacontroller>MediaController</a></code=
>
+     <td> <a href=3D#attribute-text>Text</a>
+    <tr><th> <code title=3D"">menu</code&=
gt;
+     <td> <code title=3Dattr-button-menu><a href=3D#attr-=
button-menu>button</a></code>
+     <td> Specifies the element's <a href=3D#designated-pop-up-=
menu>designated pop-up menu</a>
+     <td> <a href=3D#concept-id title=3Dconcept-id>ID</a&=
gt;*
+    <tr><th> <code title=3D"">method</cod=
e>
+     <td> <code title=3Dattr-fs-method><a href=3D#attr-fs=
-method>form</a></code>
+     <td> HTTP method to use for <a href=3D#form-submission>=
form submission</a>
+     <td> "<code title=3Dattr-fs-method-GET-keyword>&lt=
;a href=3D#attr-fs-method-get-keyword>GET</a></code>"=
;
+          "<code title=3Dattr-fs-method-POST-keyword><a hr=
ef=3D#attr-fs-method-post-keyword>POST</a></code>";
+          "<code title=3Dattr-fs-method-dialog-keyword><a =
href=3D#attr-fs-method-dialog-keyword>dialog</a></code>&qu=
ot;
+    <tr><th> <code title=3D"">min</code&g=
t;
+     <td> <code title=3Dattr-input-min><a href=3D#attr-in=
put-min>input</a></code>
+     <td> Minimum value
+     <td> Varies*
+    <tr><th> <code title=3D"">min</code&g=
t;
+     <td> <code title=3Dattr-meter-min><a href=3D#attr-me=
ter-min>meter</a></code>
+     <td> Lower bound of range
+     <td> <a href=3D#valid-floating-point-number>Valid float=
ing-point number</a>*
+    <tr><th> <code title=3D"">minlength</=
code>
+     <td> <code title=3Dattr-input-minlength><a href=3D#a=
ttr-input-minlength>input</a></code>;
+          <code title=3Dattr-textarea-minlength><a href=3D#attr=
-textarea-minlength>textarea</a></code>
+     <td> Minimum length of value
+     <td> <a href=3D#valid-non-negative-integer>Valid non-ne=
gative integer</a>
+    <tr><th> <code title=3D"">multiple</c=
ode>
+     <td> <code title=3Dattr-input-multiple><a href=3D#at=
tr-input-multiple>input</a></code>;
+          <code title=3Dattr-select-multiple><a href=3D#attr-se=
lect-multiple>select</a></code>
+     <td> Whether to allow multiple values
+     <td> <a href=3D#boolean-attribute>Boolean attribute<=
/a>
+    <tr><th> <code title=3D"">muted</code=
>
+     <td> <code title=3Dattr-media-muted><a href=3D#attr-=
media-muted>audio</a></code>;
+          <code title=3Dattr-media-muted><a href=3D#attr-media-=
muted>video</a></code>
+     <td> Whether to mute the <a href=3D#media-resource>medi=
a resource</a> by default
+     <td> <a href=3D#boolean-attribute>Boolean attribute<=
/a>
+    <tr><th> <code title=3D"">name</code&=
gt;
+     <td> <code title=3Dattr-fe-name><a href=3D#attr-fe-n=
ame>button</a></code>;
+          <code title=3Dattr-fe-name><a href=3D#attr-fe-name&gt=
;fieldset</a></code>;
+          <code title=3Dattr-fe-name><a href=3D#attr-fe-name&gt=
;input</a></code>;
+          <code title=3Dattr-fe-name><a href=3D#attr-fe-name&gt=
;keygen</a></code>;
+          <code title=3Dattr-fe-name><a href=3D#attr-fe-name&gt=
;output</a></code>;
+          <code title=3Dattr-fe-name><a href=3D#attr-fe-name&gt=
;select</a></code>;
+          <code title=3Dattr-fe-name><a href=3D#attr-fe-name&gt=
;textarea</a></code>
+     <td> Name of form control to use for <a href=3D#form-submi=
ssion>form submission</a> and in the <code title=3Ddom-form-e=
lements><a href=3D#dom-form-elements>form.elements</a><=
/code> API
+     <td> <a href=3D#attribute-text>Text</a>*
+    <tr><th> <code title=3D"">name</code&=
gt;
+     <td> <code title=3Dattr-form-name><a href=3D#attr-fo=
rm-name>form</a></code>
+     <td> Name of form to use in the <code title=3Ddom-document=
-forms><a href=3D#dom-document-forms>document.forms</a>&lt=
;/code> API
+     <td> <a href=3D#attribute-text>Text</a>*
+    <tr><th> <code title=3D"">name</code&=
gt;
+     <td> <code title=3Dattr-iframe-name><a href=3D#attr-=
iframe-name>iframe</a></code>;
+          <code title=3Dattr-object-name><a href=3D#attr-object=
-name>object</a></code>
+     <td> Name of <a href=3D#nested-browsing-context>nested =
browsing context</a>
+     <td> <a href=3D#valid-browsing-context-name-or-keyword>=
Valid browsing context name or keyword</a>
+    <tr><th> <code title=3D"">name</code&=
gt;
+     <td> <code title=3Dattr-map-name><a href=3D#attr-map=
-name>map</a></code>
+     <td> Name of <a href=3D#image-map>image map</a> t=
o reference from the <code title=3Dattr-hyperlink-usemap><a href=
=3D#attr-hyperlink-usemap>usemap</a></code> attribute
+     <td> <a href=3D#attribute-text>Text</a>*
+    <tr><th> <code title=3D"">name</code&=
gt;
+     <td> <code title=3Dattr-meta-name><a href=3D#attr-me=
ta-name>meta</a></code>
+     <td> Metadata name
+     <td> <a href=3D#attribute-text>Text</a>*
+    <tr><th> <code title=3D"">name</code&=
gt;
+     <td> <code title=3Dattr-param-name><a href=3D#attr-p=
aram-name>param</a></code>
+     <td> Name of parameter
+     <td> <a href=3D#attribute-text>Text</a>
+    <tr><th> <code title=3D"">novalidate<=
/code>
+     <td> <code title=3Dattr-fs-novalidate><a href=3D#att=
r-fs-novalidate>form</a></code>
+     <td> Bypass form control validation for <a href=3D#form-su=
bmission>form submission</a>
+     <td> <a href=3D#boolean-attribute>Boolean attribute<=
/a>
+    <tr><th> <code title=3D"">open</code&=
gt;
+     <td> <code title=3Dattr-details-open><a href=3D#attr=
-details-open>details</a></code>
+     <td> Whether the details are visible
+     <td> <a href=3D#boolean-attribute>Boolean attribute<=
/a>
+    <tr><th> <code title=3D"">open</code&=
gt;
+     <td> <code title=3Dattr-dialog-open><a href=3D#attr-=
dialog-open>dialog</a></code>
+     <td> Whether the dialog box is showing
+     <td> <a href=3D#boolean-attribute>Boolean attribute<=
/a>
+    <tr><th> <code title=3D"">optimum</co=
de>
+     <td> <code title=3Dattr-meter-optimum><a href=3D#att=
r-meter-optimum>meter</a></code>
+     <td> Optimum value in gauge
+     <td> <a href=3D#valid-floating-point-number>Valid float=
ing-point number</a>*
+    <tr><th> <code title=3D"">pattern</co=
de>
+     <td> <code title=3Dattr-input-pattern><a href=3D#att=
r-input-pattern>input</a></code>
+     <td> Pattern to be matched by the form control's value
+     <td> Regular expression matching the JavaScript <i title=3D=
"">Pattern</i> production
+    <tr><th> <code title=3D"">ping</code&=
gt;
+     <td> <code title=3Dattr-hyperlink-ping><a href=3D#pi=
ng>a</a></code>;
+          <code title=3Dattr-hyperlink-ping><a href=3D#ping>=
area</a></code>
+     <td> <a href=3D#url title=3DURL>URLs</a> to ping
+     <td> <a href=3D#set-of-space-separated-tokens>Set of sp=
ace-separated tokens</a> consisting of <a href=3D#valid-non-empt=
y-url title=3D"valid non-empty URL">valid non-empty URLs<=
/a>
+    <tr><th> <code title=3D"">placeholder&lt=
;/code>
+     <td> <code title=3Dattr-input-placeholder><a href=3D=
#attr-input-placeholder>input</a></code>;
+          <code title=3Dattr-textarea-placeholder><a href=3D#at=
tr-textarea-placeholder>textarea</a></code>
+     <td> User-visible label to be placed within the form control
+     <td> <a href=3D#attribute-text>Text</a>*
+    <tr><th> <code title=3D"">poster</cod=
e>
+     <td> <code title=3Dattr-video-poster><a href=3D#attr=
-video-poster>video</a></code>
+     <td> Poster frame to show prior to video playback
+     <td> <a href=3D#valid-non-empty-url-potentially-surrounded=
-by-spaces>Valid non-empty URL potentially surrounded by spaces</a&=
gt;
+    <tr><th> <code title=3D"">preload</co=
de>
+     <td> <code title=3Dattr-media-preload><a href=3D#att=
r-media-preload>audio</a></code>;
+          <code title=3Dattr-media-preload><a href=3D#attr-medi=
a-preload>video</a></code>
+     <td> Hints how much buffering the <a href=3D#media-resourc=
e>media resource</a> will likely need
+     <td> "<code title=3Dattr-media-preload-none><a =
href=3D#attr-media-preload-none>none</a></code>";
+          "<code title=3Dattr-media-preload-metadata><a hr=
ef=3D#attr-media-preload-metadata>metadata</a></code>&quot=
;;
+          "<code title=3Dattr-media-preload-auto><a href=3D=
#attr-media-preload-auto>auto</a></code>"
+    <tr><th> <code title=3D"">radiogroup<=
/code>
+     <td> <code title=3Dattr-menuitem-radiogroup><a href=3D=
#attr-menuitem-radiogroup>menuitem</a></code>
+     <td> Name of group of commands to treat as a radio button gro=
up
+     <td> <a href=3D#attribute-text>Text</a>
+    <tr><th> <code title=3D"">readonly</c=
ode>
+     <td> <code title=3Dattr-input-readonly><a href=3D#at=
tr-input-readonly>input</a></code>;
+          <code title=3Dattr-textarea-readonly><a href=3D#attr-=
textarea-readonly>textarea</a></code>
+     <td> Whether to allow the value to be edited by the user
+     <td> <a href=3D#boolean-attribute>Boolean attribute<=
/a>
+    <tr><th> <code title=3D"">rel</code&g=
t;
+     <td> <code title=3Dattr-hyperlink-rel><a href=3D#att=
r-hyperlink-rel>a</a></code>;
+          <code title=3Dattr-hyperlink-rel><a href=3D#attr-hype=
rlink-rel>area</a></code>;
+          <code title=3Dattr-link-rel><a href=3D#attr-link-rel&=
gt;link</a></code>
+     <td> Relationship between the document containing the hyperli=
nk and the destination resource
+     <td> <a href=3D#set-of-space-separated-tokens>Set of sp=
ace-separated tokens</a>*
+    <tr><th> <code title=3D"">required</c=
ode>
+     <td> <code title=3Dattr-input-required><a href=3D#at=
tr-input-required>input</a></code>;
+          <code title=3Dattr-select-required><a href=3D#attr-se=
lect-required>select</a></code>;
+          <code title=3Dattr-textarea-required><a href=3D#attr-=
textarea-required>textarea</a></code>
+     <td> Whether the control is required for <a href=3D#form-s=
ubmission>form submission</a>
+     <td> <a href=3D#boolean-attribute>Boolean attribute<=
/a>
+    <tr><th> <code title=3D"">reversed</c=
ode>
+     <td> <code title=3Dattr-ol-reversed><a href=3D#attr-=
ol-reversed>ol</a></code>
+     <td> Number the list backwards
+     <td> <a href=3D#boolean-attribute>Boolean attribute<=
/a>
+    <tr><th> <code title=3D"">rows</code&=
gt;
+     <td> <code title=3Dattr-textarea-rows><a href=3D#att=
r-textarea-rows>textarea</a></code>
+     <td> Number of lines to show
+     <td> <a href=3D#valid-non-negative-integer>Valid non-ne=
gative integer</a> greater than zero
+    <tr><th> <code title=3D"">rowspan</co=
de>
+     <td> <code title=3Dattr-tdth-rowspan><a href=3D#attr=
-tdth-rowspan>td</a></code>;
+          <code title=3Dattr-tdth-rowspan><a href=3D#attr-tdth-=
rowspan>th</a></code>
+     <td> Number of rows that the cell is to span
+     <td> <a href=3D#valid-non-negative-integer>Valid non-ne=
gative integer</a>
+    <tr><th> <code title=3D"">sandbox</co=
de>
+     <td> <code title=3Dattr-iframe-sandbox><a href=3D#at=
tr-iframe-sandbox>iframe</a></code>
+     <td> Security rules for nested content
+     <td> <a href=3D#unordered-set-of-unique-space-separated-to=
kens>Unordered set of unique space-separated tokens</a>, <a h=
ref=3D#ascii-case-insensitive>ASCII case-insensitive</a>, consis=
ting of
+          "<code title=3Dattr-iframe-sandbox-allow-forms><=
a href=3D#attr-iframe-sandbox-allow-forms>allow-forms</a></co=
de>",
+          "<code title=3Dattr-iframe-sandbox-allow-pointer-lock&=
gt;<a href=3D#attr-iframe-sandbox-allow-pointer-lock>allow-pointer-=
lock</a></code>",
+          "<code title=3Dattr-iframe-sandbox-allow-popups>&lt=
;a href=3D#attr-iframe-sandbox-allow-popups>allow-popups</a><=
/code>",
+          "<code title=3Dattr-iframe-sandbox-allow-same-origin&g=
t;<a href=3D#attr-iframe-sandbox-allow-same-origin>allow-same-origi=
n</a></code>",
+          "<code title=3Dattr-iframe-sandbox-allow-scripts>&l=
t;a href=3D#attr-iframe-sandbox-allow-scripts>allow-scripts</a>&=
lt;/code> and
+          "<code title=3Dattr-iframe-sandbox-allow-top-navigatio=
n><a href=3D#attr-iframe-sandbox-allow-top-navigation>allow-top-=
navigation</a></code>"
+    <tr><th> <code title=3D"">spellcheck<=
/code>
+     <td> <a href=3D#attr-spellcheck title=3Dattr-spellcheck&gt=
;HTML elements</a>
+     <td> Whether the element is to have its spelling and grammar =
checked
+     <td> "<code title=3D"">true</code>=
"; "<code title=3D"">false</code>"
+    <tr><th> <code title=3D"">scope</code=
>
+     <td> <code title=3Dattr-th-scope><a href=3D#attr-th-=
scope>th</a></code>
+     <td> Specifies which cells the header cell applies to
+     <td> "<code title=3Dattr-th-scope-row><a href=3D=
#attr-th-scope-row>row</a></code>";
+          "<code title=3Dattr-th-scope-col><a href=3D#attr=
-th-scope-col>col</a></code>";
+          "<code title=3Dattr-th-scope-rowgroup><a href=3D=
#attr-th-scope-rowgroup>rowgroup</a></code>";
+          "<code title=3Dattr-th-scope-colgroup><a href=3D=
#attr-th-scope-colgroup>colgroup</a></code>"
+    <tr><th> <code title=3D"">scoped</cod=
e>
+     <td> <code title=3Dattr-style-scoped><a href=3D#attr=
-style-scoped>style</a></code>
+     <td> Whether the styles apply to the entire document or just =
the parent subtree
+     <td> <a href=3D#boolean-attribute>Boolean attribute<=
/a>
+    <tr><th> <code title=3D"">seamless</c=
ode>
+     <td> <code title=3Dattr-iframe-seamless><a href=3D#a=
ttr-iframe-seamless>iframe</a></code>
+     <td> Whether to apply the document's styles to the nested con=
tent
+     <td> <a href=3D#boolean-attribute>Boolean attribute<=
/a>
+    <tr><th> <code title=3D"">selected</c=
ode>
+     <td> <code title=3Dattr-option-selected><a href=3D#a=
ttr-option-selected>option</a></code>
+     <td> Whether the option is selected by default
+     <td> <a href=3D#boolean-attribute>Boolean attribute<=
/a>
+    <tr><th> <code title=3D"">shape</code=
>
+     <td> <code title=3Dattr-area-shape><a href=3D#attr-a=
rea-shape>area</a></code>
+     <td> The kind of shape to be created in an <a href=3D#imag=
e-map>image map</a>
+     <td> "<code title=3Dattr-area-shape-keyword-circle&gt=
;<a href=3D#attr-area-shape-keyword-circle>circle</a></cod=
e>";
+          "<code title=3Dattr-area-shape-keyword-default><=
a href=3D#attr-area-shape-keyword-default>default</a></code&g=
t;";
+          "<code title=3Dattr-area-shape-keyword-poly><a h=
ref=3D#attr-area-shape-keyword-poly>poly</a></code>";
+          "<code title=3Dattr-area-shape-keyword-rect><a h=
ref=3D#attr-area-shape-keyword-rect>rect</a></code>"
+    <tr><th> <code title=3D"">size</code&=
gt;
+     <td> <code title=3Dattr-input-size><a href=3D#attr-i=
nput-size>input</a></code>;
+          <code title=3Dattr-select-size><a href=3D#attr-select=
-size>select</a></code>
+     <td> Size of the control
+     <td> <a href=3D#valid-non-negative-integer>Valid non-ne=
gative integer</a> greater than zero
+    <tr><th> <code title=3D"">sizes</code=
>
+     <td> <code title=3Dattr-link-sizes><a href=3D#attr-l=
ink-sizes>link</a></code>
+     <td> Sizes of the icons (for <code title=3Dattr-link-rel&g=
t;<a href=3D#attr-link-rel>rel</a></code>=3D"<c=
ode title=3Drel-icon><a href=3D#rel-icon>icon</a></code=
>")
+     <td> <a href=3D#unordered-set-of-unique-space-separated-to=
kens>Unordered set of unique space-separated tokens</a>, <a h=
ref=3D#ascii-case-insensitive>ASCII case-insensitive</a>, consis=
ting of sizes*
+    <tr><th> <code title=3D"">sorted</cod=
e>
+     <td> <code title=3Dattr-th-sorted><a href=3D#attr-th=
-sorted>th</a></code>
+     <td> <a href=3D#column-sort-direction>Column sort direc=
tion</a> and <a href=3D#column-key-ordinality title=3D"colu=
mn key ordinality">ordinality</a>
+     <td> <a href=3D#set-of-space-separated-tokens>Set of sp=
ace-separated tokens</a>, <a href=3D#ascii-case-insensitive>A=
SCII case-insensitive</a>, consisting of neither, one, or both of &=
quot;<code title=3Dattr-th-sorted-reversed><a href=3D#attr-th-so=
rted-reversed>reversed</a></code>" and a <a href=3D=
#valid-non-negative-integer>valid non-negative integer</a> great=
er than zero
+    <tr><th> <code title=3D"">span</code&=
gt;
+     <td> <code title=3Dattr-col-span><a href=3D#attr-col=
-span>col</a></code>;
+          <code title=3Dattr-colgroup-span><a href=3D#attr-colg=
roup-span>colgroup</a></code>
+     <td> Number of columns spanned by the element
+     <td> <a href=3D#valid-non-negative-integer>Valid non-ne=
gative integer</a> greater than zero
+    <tr><th> <code title=3D"">src</code&g=
t;
+     <td> <code title=3Dattr-media-src><a href=3D#attr-me=
dia-src>audio</a></code>;
+          <code title=3Dattr-embed-src><a href=3D#attr-embed-sr=
c>embed</a></code>;
+          <code title=3Dattr-iframe-src><a href=3D#attr-iframe-=
src>iframe</a></code>;
+          <code title=3Dattr-img-src><a href=3D#attr-img-src&gt=
;img</a></code>;
+          <code title=3Dattr-input-src><a href=3D#attr-input-sr=
c>input</a></code>;
+          <code title=3Dattr-script-src><a href=3D#attr-script-=
src>script</a></code>;
+          <code title=3Dattr-source-src><a href=3D#attr-source-=
src>source</a></code>;
+          <code title=3Dattr-track-src><a href=3D#attr-track-sr=
c>track</a></code>;
+          <code title=3Dattr-media-src><a href=3D#attr-media-sr=
c>video</a></code>
+     <td> Address of the resource
+     <td> <a href=3D#valid-non-empty-url-potentially-surrounded=
-by-spaces>Valid non-empty URL potentially surrounded by spaces</a&=
gt;
+    <tr><th> <code title=3D"">srcdoc</cod=
e>
+     <td> <code title=3Dattr-iframe-srcdoc><a href=3D#att=
r-iframe-srcdoc>iframe</a></code>
+     <td> A document to render in the <code><a href=3D#th=
e-iframe-element>iframe</a></code>
+     <td> The source of <a href=3D#an-iframe-srcdoc-document&gt=
;an <code>iframe</code> <code title=3Dattr-iframe-srcdoc&g=
t;srcdoc</code> document</a>*
+    <tr><th> <code title=3D"">srclang</co=
de>
+     <td> <code title=3Dattr-track-srclang><a href=3D#att=
r-track-srclang>track</a></code>
+     <td> Language of the text track
+     <td> Valid BCP 47 language tag
+    <tr><th> <code title=3D"">srcset</cod=
e>
+     <td> <code title=3Dattr-img-srcset><a href=3D#attr-i=
mg-srcset>img</a></code>
+     <td> Images to use in different situations (e.g. high-resolut=
ion displays, small monitors, etc)
+     <td> Comma-separated list of <span>image candidate stri=
ngs</span>
+    <tr><th> <code title=3D"">start</code=
>
+     <td> <code title=3Dattr-ol-start><a href=3D#attr-ol-=
start>ol</a></code>
+     <td> <a href=3D#ordinal-value>Ordinal value</a> o=
f the first item
+     <td> <a href=3D#valid-integer>Valid integer</a>
+    <tr><th> <code title=3D"">step</code&=
gt;
+     <td> <code title=3Dattr-input-step><a href=3D#attr-i=
nput-step>input</a></code>
+     <td> Granularity to be matched by the form control's value
+     <td> <a href=3D#valid-floating-point-number>Valid float=
ing-point number</a> greater than zero, or "<code title=3D&=
quot;">any</code>"
+    <tr><th> <code title=3D"">style</code=
>
+     <td> <a href=3D#the-style-attribute title=3Dattr-style>=
HTML elements</a>
+     <td> Presentational and formatting instructions
+     <td> CSS declarations*
+    <tr><th> <code title=3D"">tabindex</c=
ode>
+     <td> <a href=3D#attr-tabindex title=3Dattr-tabindex>HTM=
L elements</a>
+     <td> Whether the element is focusable, and the relative order=
 of the element for the purposes of sequential focus navigation
+     <td> <a href=3D#valid-integer>Valid integer</a>
+    <tr><th> <code title=3D"">target</cod=
e>
+     <td> <code title=3Dattr-hyperlink-target><a href=3D#=
attr-hyperlink-target>a</a></code>;
+          <code title=3Dattr-hyperlink-target><a href=3D#attr-h=
yperlink-target>area</a></code>
+     <td> <a href=3D#browsing-context>Browsing context</a=
> for <a href=3D#hyperlink>hyperlink</a> <a href=3D#nav=
igate title=3Dnavigate>navigation</a>
+     <td> <a href=3D#valid-browsing-context-name-or-keyword>=
Valid browsing context name or keyword</a>
+    <tr><th> <code title=3D"">target</cod=
e>
+     <td> <code title=3Dattr-base-target><a href=3D#attr-=
base-target>base</a></code>
+     <td> Default <a href=3D#browsing-context>browsing conte=
xt</a> for <a href=3D#hyperlink>hyperlink</a> <a hre=
f=3D#navigate title=3Dnavigate>navigation</a> and <a href=3D#=
form-submission>form submission</a>
+     <td> <a href=3D#valid-browsing-context-name-or-keyword>=
Valid browsing context name or keyword</a>
+    <tr><th> <code title=3D"">target</cod=
e>
+     <td> <code title=3Dattr-fs-target><a href=3D#attr-fs=
-target>form</a></code>
+     <td> <a href=3D#browsing-context>Browsing context</a=
> for <a href=3D#form-submission>form submission</a>
+     <td> <a href=3D#valid-browsing-context-name-or-keyword>=
Valid browsing context name or keyword</a>
+    <tr><th> <code title=3D"">title</code=
>
+     <td> <a href=3D#attr-title title=3Dattr-title>HTML elem=
ents</a>
+     <td> Advisory information for the element
+     <td> <a href=3D#attribute-text>Text</a>
+    <tr><th> <code title=3D"">title</code=
>
+     <td> <code title=3Dattr-abbr-title><a href=3D#attr-a=
bbr-title>abbr</a></code>;
+          <code title=3Dattr-dfn-title><a href=3D#attr-dfn-titl=
e>dfn</a></code>
+     <td> Full term or expansion of abbreviation
+     <td> <a href=3D#attribute-text>Text</a>
+    <tr><th> <code title=3D"">title</code=
>
+     <td> <code title=3Dattr-menuitem-title><a href=3D#at=
tr-menuitem-title>menuitem</a></code>
+     <td> Hint describing the command
+     <td> <a href=3D#attribute-text>Text</a>
+    <tr><th> <code title=3D"">title</code=
>
+     <td> <code title=3Dattr-link-title><a href=3D#attr-l=
ink-title>link</a></code>
+     <td> Title of the link
+     <td> <a href=3D#attribute-text>Text</a>
+    <tr><th> <code title=3D"">title</code=
>
+     <td> <code title=3Dattr-link-title><a href=3D#attr-l=
ink-title>link</a></code>;
+          <code title=3Dattr-style-title><a href=3D#attr-style-=
title>style</a></code>
+     <td> Alternative style sheet set name
+     <td> <a href=3D#attribute-text>Text</a>
+    <tr><th> <code title=3D"">translate</=
code>
+     <td> <a href=3D#attr-translate title=3Dattr-translate>H=
TML elements</a>
+     <td> Whether the element is to be translated when the page is=
 localized
+     <td> "<code title=3D"">yes</code>&=
quot;; "<code title=3D"">no</code>"
+    <tr><th> <code title=3D"">type</code&=
gt;
+     <td> <code title=3Dattr-hyperlink-type><a href=3D#at=
tr-hyperlink-type>a</a></code>;
+          <code title=3Dattr-hyperlink-type><a href=3D#attr-hyp=
erlink-type>area</a></code>;
+          <code title=3Dattr-link-type><a href=3D#attr-link-typ=
e>link</a></code>
+     <td> Hint for the type of the referenced resource
+     <td> <a href=3D#valid-mime-type>Valid MIME type</a&g=
t;
+    <tr><th> <code title=3D"">type</code&=
gt;
+     <td> <code title=3Dattr-button-type><a href=3D#attr-=
button-type>button</a></code>
+     <td> Type of button
+     <td> "<code title=3Dattr-button-type-submit><a =
href=3D#attr-button-type-submit>submit</a></code>";
+          "<code title=3Dattr-button-type-reset><a href=3D=
#attr-button-type-reset>reset</a></code>";
+          "<code title=3Dattr-button-type-button><a href=3D=
#attr-button-type-button>button</a></code>";
+          "<code title=3Dattr-button-type-menu><a href=3D#=
attr-button-type-menu>menu</a></code>"
+    <tr><th> <code title=3D"">type</code&=
gt;
+     <td> <code title=3Dattr-embed-type><a href=3D#attr-e=
mbed-type>embed</a></code>;
+          <code title=3Dattr-object-type><a href=3D#attr-object=
-type>object</a></code>;
+          <code title=3Dattr-script-type><a href=3D#attr-script=
-type>script</a></code>;
+          <code title=3Dattr-source-type><a href=3D#attr-source=
-type>source</a></code>;
+          <code title=3Dattr-style-type><a href=3D#attr-style-t=
ype>style</a></code>
+     <td> Type of embedded resource
+     <td> <a href=3D#valid-mime-type>Valid MIME type</a&g=
t;
+    <tr><th> <code title=3D"">type</code&=
gt;
+     <td> <code title=3Dattr-input-type><a href=3D#attr-i=
nput-type>input</a></code>
+     <td> Type of form control
+     <td> <a href=3D#attr-input-type title=3Dattr-input-type&gt=
;<code>input</code> type keyword</a>
+    <tr><th> <code title=3D"">type</code&=
gt;
+     <td> <code title=3Dattr-menu-type><a href=3D#attr-me=
nu-type>menu</a></code>
+     <td> Type of menu
+     <td> "<code title=3D"popup menu state">&=
lt;a href=3D#popup-menu-state>popup</a></code>"; &quo=
t;<code title=3D"toolbar state"><a href=3D#toolbar-sta=
te>toolbar</a></code>"
+    <tr><th> <code title=3D"">type</code&=
gt;
+     <td> <code title=3Dattr-menuitem-type><a href=3D#att=
r-menuitem-type>menuitem</a></code>
+     <td> Type of command
+     <td> "<code title=3Dattr-menuitem-type-keyword-comman=
d><a href=3D#attr-menuitem-type-keyword-command>command</a&gt=
;</code>";
+          "<code title=3Dattr-menuitem-type-keyword-checkbox>=
<a href=3D#attr-menuitem-type-keyword-checkbox>checkbox</a>&l=
t;/code>";
+          "<code title=3Dattr-menuitem-type-keyword-radio>&lt=
;a href=3D#attr-menuitem-type-keyword-radio>radio</a></code&g=
t;"
+    <tr><th> <code title=3D"">type</code&=
gt;
+     <td> <code title=3Dattr-ol-type><a href=3D#attr-ol-t=
ype>ol</a></code>
+     <td> Kind of list marker
+     <td> "<code title=3Dattr-ol-type-keyword-decimal>&=
lt;a href=3D#attr-ol-type-keyword-decimal>1</a></code>&quo=
t;;
+          "<code title=3Dattr-ol-type-keyword-lower-alpha>&lt=
;a href=3D#attr-ol-type-keyword-lower-alpha>a</a></code>&q=
uot;;
+          "<code title=3Dattr-ol-type-keyword-upper-alpha>&lt=
;a href=3D#attr-ol-type-keyword-upper-alpha>A</a></code>&q=
uot;;
+          "<code title=3Dattr-ol-type-keyword-lower-roman>&lt=
;a href=3D#attr-ol-type-keyword-lower-roman>i</a></code>&q=
uot;;
+          "<code title=3Dattr-ol-type-keyword-upper-roman>&lt=
;a href=3D#attr-ol-type-keyword-upper-roman>I</a></code>&q=
uot;
+    <tr><th> <code title=3D"">typemustmatch&=
lt;/code>
+     <td> <code title=3Dattr-object-typemustmatch><a href=
=3D#attr-object-typemustmatch>object</a></code>
+     <td> Whether the <code title=3Dattr-object-type><a h=
ref=3D#attr-object-type>type</a></code> attribute and the =
<a href=3D#content-type>Content-Type</a> value need to match =
for the resource to be used
+     <td> <a href=3D#boolean-attribute>Boolean attribute<=
/a>
+    <tr><th> <code title=3D"">usemap</cod=
e>
+     <td> <code title=3Dattr-hyperlink-usemap><a href=3D#=
attr-hyperlink-usemap>img</a></code>;
+          <code title=3Dattr-hyperlink-usemap><a href=3D#attr-h=
yperlink-usemap>object</a></code>
+     <td> Name of <a href=3D#image-map>image map</a> t=
o use
+     <td> <a href=3D#valid-hash-name-reference>Valid hash-na=
me reference</a>*
+    <tr><th> <code title=3D"">value</code=
>
+     <td> <code title=3Dattr-button-value><a href=3D#attr=
-button-value>button</a></code>;
+          <code title=3Dattr-option-value><a href=3D#attr-optio=
n-value>option</a></code>
+     <td> Value to be used for <a href=3D#form-submission>fo=
rm submission</a>
+     <td> <a href=3D#attribute-text>Text</a>
+    <tr><th> <code title=3D"">value</code=
>
+     <td> <code title=3Dattr-data-value><a href=3D#attr-d=
ata-value>data</a></code>
+     <td> Machine-readable value
+     <td> <a href=3D#attribute-text>Text</a>*
+    <tr><th> <code title=3D"">value</code=
>
+     <td> <code title=3Dattr-input-value><a href=3D#attr-=
input-value>input</a></code>
+     <td> Value of the form control
+     <td> Varies*
+    <tr><th> <code title=3D"">value</code=
>
+     <td> <code title=3Dattr-li-value><a href=3D#attr-li-=
value>li</a></code>
+     <td> <a href=3D#ordinal-value>Ordinal value</a> o=
f the list item
+     <td> <a href=3D#valid-integer>Valid integer</a>
+    <tr><th> <code title=3D"">value</code=
>
+     <td> <code title=3Dattr-meter-value><a href=3D#attr-=
meter-value>meter</a></code>;
+          <code title=3Dattr-progress-value><a href=3D#attr-pro=
gress-value>progress</a></code>
+     <td> Current value of the element
+     <td> <a href=3D#valid-floating-point-number>Valid float=
ing-point number</a>
+    <tr><th> <code title=3D"">value</code=
>
+     <td> <code title=3Dattr-param-value><a href=3D#attr-=
param-value>param</a></code>
+     <td> Value of parameter
+     <td> <a href=3D#attribute-text>Text</a>
+    <tr><th> <code title=3D"">width</code=
>
+     <td> <code title=3Dattr-canvas-width><a href=3D#attr=
-canvas-width>canvas</a></code>;
+          <code title=3Dattr-dim-width><a href=3D#attr-dim-widt=
h>embed</a></code>;
+          <code title=3Dattr-dim-width><a href=3D#attr-dim-widt=
h>iframe</a></code>;
+          <code title=3Dattr-dim-width><a href=3D#attr-dim-widt=
h>img</a></code>;
+          <code title=3Dattr-dim-width><a href=3D#attr-dim-widt=
h>input</a></code>;
+          <code title=3Dattr-dim-width><a href=3D#attr-dim-widt=
h>object</a></code>;
+          <code title=3Dattr-dim-width><a href=3D#attr-dim-widt=
h>video</a></code>
+     <td> Horizontal dimension
+     <td> <a href=3D#valid-non-negative-integer>Valid non-ne=
gative integer</a>
+    <tr><th> <code title=3D"">wrap</code&=
gt;
+     <td> <code title=3Dattr-textarea-wrap><a href=3D#att=
r-textarea-wrap>textarea</a></code>
+     <td> How the value of the form control is to be wrapped for &=
lt;a href=3D#form-submission>form submission</a>
+     <td> "<code title=3Dattr-textarea-wrap-soft><a =
href=3D#attr-textarea-wrap-soft>soft</a></code>";
+          "<code title=3Dattr-textarea-wrap-hard><a href=3D=
#attr-textarea-wrap-hard>hard</a></code>"
+  </table><p class=3Dtablenote><small>An asterisk (*) =
in a cell indicates that the actual rules are more
+  complicated than indicated in the table above.</small></p>
+
+  <hr><table id=3Dix-event-handlers><caption>List of e=
vent handler content attributes</caption>
+   <thead><tr><th> Attribute
+     <th> Element(s)
+     <th> Description
+     <th> Value
+   <tbody><tr><th id=3Dix-handler-onabort> <code ti=
tle=3D"">onabort</code>
+     <td> <a href=3D#handler-onabort title=3Dhandler-onabort&gt=
;HTML elements</a>
+     <td> <code title=3Devent-abort>abort</code> event=
 handler
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-window-onafterprint> <code ti=
tle=3D"">onafterprint</code>
+     <td> <code title=3Dhandler-window-onafterprint><a hr=
ef=3D#handler-window-onafterprint>body</a></code>
+     <td> <code title=3Devent-afterprint>afterprint</code=
> event handler for <code><a href=3D#window>Window</a&g=
t;</code> object
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-window-onbeforeprint> <code t=
itle=3D"">onbeforeprint</code>
+     <td> <code title=3Dhandler-window-onbeforeprint><a h=
ref=3D#handler-window-onbeforeprint>body</a></code>
+     <td> <code title=3Devent-beforeprint>beforeprint</co=
de> event handler for <code><a href=3D#window>Window</a=
></code> object
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-window-onbeforeunload> <code =
title=3D"">onbeforeunload</code>
+     <td> <code title=3Dhandler-window-onbeforeunload><a =
href=3D#handler-window-onbeforeunload>body</a></code>
+     <td> <code title=3Devent-beforeunload>beforeunload</=
code> event handler for <code><a href=3D#window>Window<=
/a></code> object
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-onblur> <code title=3D"&=
quot;>onblur</code>
+     <td> <a href=3D#handler-onblur title=3Dhandler-onblur>H=
TML elements</a>
+     <td> <code title=3Devent-blur>blur</code> event h=
andler
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-oncancel> <code title=3D&quot=
;">oncancel</code>
+     <td> <a href=3D#handler-oncancel title=3Dhandler-oncancel&=
gt;HTML elements</a>
+     <td> <code title=3Devent-cancel><a href=3D#event-can=
cel>cancel</a></code> event handler
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-oncanplay> <code title=3D&quo=
t;">oncanplay</code>
+     <td> <a href=3D#handler-oncanplay title=3Dhandler-oncanpla=
y>HTML elements</a>
+     <td> <code title=3Devent-media-canplay><a href=3D#ev=
ent-media-canplay>canplay</a></code> event handler
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-oncanplaythrough> <code title=
=3D"">oncanplaythrough</code>
+     <td> <a href=3D#handler-oncanplaythrough title=3Dhandler-o=
ncanplaythrough>HTML elements</a>
+     <td> <code title=3Devent-media-canplaythrough><a hre=
f=3D#event-media-canplaythrough>canplaythrough</a></code> =
event handler
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-onchange> <code title=3D&quot=
;">onchange</code>
+     <td> <a href=3D#handler-onchange title=3Dhandler-onchange&=
gt;HTML elements</a>
+     <td> <code title=3Devent-change>change</code> eve=
nt handler
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-onclick> <code title=3D"=
">onclick</code>
+     <td> <a href=3D#handler-onclick title=3Dhandler-onclick&gt=
;HTML elements</a>
+     <td> <code title=3Devent-click><a href=3D#event-clic=
k>click</a></code> event handler
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-onclose> <code title=3D"=
">onclose</code>
+     <td> <a href=3D#handler-onclose title=3Dhandler-onclose&gt=
;HTML elements</a>
+     <td> <code title=3Devent-close><a href=3D#event-clos=
e>close</a></code> event handler
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-oncontextmenu> <code title=3D=
"">oncontextmenu</code>
+     <td> <a href=3D#handler-oncontextmenu title=3Dhandler-onco=
ntextmenu>HTML elements</a>
+     <td> <code title=3Devent-contextmenu>contextmenu</co=
de> event handler
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-oncuechange> <code title=3D&q=
uot;">oncuechange</code>
+     <td> <a href=3D#handler-oncuechange title=3Dhandler-oncuec=
hange>HTML elements</a>
+     <td> <code title=3Devent-cuechange>cuechange</code&g=
t; event handler
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-ondblclick> <code title=3D&qu=
ot;">ondblclick</code>
+     <td> <a href=3D#handler-ondblclick title=3Dhandler-ondblcl=
ick>HTML elements</a>
+     <td> <code title=3Devent-dblclick>dblclick</code>=
 event handler
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-ondrag> <code title=3D"&=
quot;>ondrag</code>
+     <td> <a href=3D#handler-ondrag title=3Dhandler-ondrag>H=
TML elements</a>
+     <td> <code title=3Devent-drag><a href=3D#event-drag&=
gt;drag</a></code> event handler
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-ondragend> <code title=3D&quo=
t;">ondragend</code>
+     <td> <a href=3D#handler-ondragend title=3Dhandler-ondragen=
d>HTML elements</a>
+     <td> <code title=3Devent-dragend><a href=3D#event-dr=
agend>dragend</a></code> event handler
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-ondragenter> <code title=3D&q=
uot;">ondragenter</code>
+     <td> <a href=3D#handler-ondragenter title=3Dhandler-ondrag=
enter>HTML elements</a>
+     <td> <code title=3Devent-dragenter><a href=3D#event-=
dragenter>dragenter</a></code> event handler
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-ondragexit> <code title=3D&qu=
ot;">ondragexit</code>
+     <td> <a href=3D#handler-ondragexit title=3Dhandler-ondrage=
xit>HTML elements</a>
+     <td> <code title=3Devent-dragexit><a href=3D#event-d=
ragexit>dragexit</a></code> event handler
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-ondragleave> <code title=3D&q=
uot;">ondragleave</code>
+     <td> <a href=3D#handler-ondragleave title=3Dhandler-ondrag=
leave>HTML elements</a>
+     <td> <code title=3Devent-dragleave><a href=3D#event-=
dragleave>dragleave</a></code> event handler
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-ondragover> <code title=3D&qu=
ot;">ondragover</code>
+     <td> <a href=3D#handler-ondragover title=3Dhandler-ondrago=
ver>HTML elements</a>
+     <td> <code title=3Devent-dragover><a href=3D#event-d=
ragover>dragover</a></code> event handler
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-ondragstart> <code title=3D&q=
uot;">ondragstart</code>
+     <td> <a href=3D#handler-ondragstart title=3Dhandler-ondrag=
start>HTML elements</a>
+     <td> <code title=3Devent-dragstart><a href=3D#event-=
dragstart>dragstart</a></code> event handler
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-ondrop> <code title=3D"&=
quot;>ondrop</code>
+     <td> <a href=3D#handler-ondrop title=3Dhandler-ondrop>H=
TML elements</a>
+     <td> <code title=3Devent-drop><a href=3D#event-drop&=
gt;drop</a></code> event handler
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-ondurationchange> <code title=
=3D"">ondurationchange</code>
+     <td> <a href=3D#handler-ondurationchange title=3Dhandler-o=
ndurationchange>HTML elements</a>
+     <td> <code title=3Devent-media-durationchange><a hre=
f=3D#event-media-durationchange>durationchange</a></code> =
event handler
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-onemptied> <code title=3D&quo=
t;">onemptied</code>
+     <td> <a href=3D#handler-onemptied title=3Dhandler-onemptie=
d>HTML elements</a>
+     <td> <code title=3Devent-media-emptied><a href=3D#ev=
ent-media-emptied>emptied</a></code> event handler
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-onended> <code title=3D"=
">onended</code>
+     <td> <a href=3D#handler-onended title=3Dhandler-onended&gt=
;HTML elements</a>
+     <td> <code title=3Devent-media-ended><a href=3D#even=
t-media-ended>ended</a></code> event handler
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-onerror> <code title=3D"=
">onerror</code>
+     <td> <a href=3D#handler-onerror title=3Dhandler-onerror&gt=
;HTML elements</a>
+     <td> <code title=3Devent-error>error</code> event=
 handler
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-onfocus> <code title=3D"=
">onfocus</code>
+     <td> <a href=3D#handler-onfocus title=3Dhandler-onfocus&gt=
;HTML elements</a>
+     <td> <code title=3Devent-focus>focus</code> event=
 handler
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-window-onhashchange> <code ti=
tle=3D"">onhashchange</code>
+     <td> <code title=3Dhandler-window-onhashchange><a hr=
ef=3D#handler-window-onhashchange>body</a></code>
+     <td> <code title=3Devent-hashchange><a href=3D#event=
-hashchange>hashchange</a></code> event handler for <co=
de><a href=3D#window>Window</a></code> object
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-oninput> <code title=3D"=
">oninput</code>
+     <td> <a href=3D#handler-oninput title=3Dhandler-oninput&gt=
;HTML elements</a>
+     <td> <code title=3Devent-input>input</code> event=
 handler
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-oninvalid> <code title=3D&quo=
t;">oninvalid</code>
+     <td> <a href=3D#handler-oninvalid title=3Dhandler-oninvali=
d>HTML elements</a>
+     <td> <code title=3Devent-invalid>invalid</code> e=
vent handler
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-onkeydown> <code title=3D&quo=
t;">onkeydown</code>
+     <td> <a href=3D#handler-onkeydown title=3Dhandler-onkeydow=
n>HTML elements</a>
+     <td> <code title=3Devent-keydown>keydown</code> e=
vent handler
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-onkeypress> <code title=3D&qu=
ot;">onkeypress</code>
+     <td> <a href=3D#handler-onkeypress title=3Dhandler-onkeypr=
ess>HTML elements</a>
+     <td> <code title=3Devent-keypress>keypress</code>=
 event handler
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-onkeyup> <code title=3D"=
">onkeyup</code>
+     <td> <a href=3D#handler-onkeyup title=3Dhandler-onkeyup&gt=
;HTML elements</a>
+     <td> <code title=3Devent-keyup>keyup</code> event=
 handler
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-onload> <code title=3D"&=
quot;>onload</code>
+     <td> <a href=3D#handler-onload title=3Dhandler-onload>H=
TML elements</a>
+     <td> <code title=3Devent-load>load</code> event h=
andler
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-onloadeddata> <code title=3D&=
quot;">onloadeddata</code>
+     <td> <a href=3D#handler-onloadeddata title=3Dhandler-onloa=
deddata>HTML elements</a>
+     <td> <code title=3Devent-media-loadeddata><a href=3D=
#event-media-loadeddata>loadeddata</a></code> event handle=
r
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-onloadedmetadata> <code title=
=3D"">onloadedmetadata</code>
+     <td> <a href=3D#handler-onloadedmetadata title=3Dhandler-o=
nloadedmetadata>HTML elements</a>
+     <td> <code title=3Devent-media-loadedmetadata><a hre=
f=3D#event-media-loadedmetadata>loadedmetadata</a></code> =
event handler
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-onloadstart> <code title=3D&q=
uot;">onloadstart</code>
+     <td> <a href=3D#handler-onloadstart title=3Dhandler-onload=
start>HTML elements</a>
+     <td> <code title=3Devent-media-loadstart><a href=3D#=
event-media-loadstart>loadstart</a></code> event handler
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-window-onmessage> <code title=
=3D"">onmessage</code>
+     <td> <code title=3Dhandler-window-onmessage><a href=3D=
#handler-window-onmessage>body</a></code>
+     <td> <code title=3Devent-message><a href=3D#event-me=
ssage>message</a></code> event handler for <code>&lt=
;a href=3D#window>Window</a></code> object
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-onmousedown> <code title=3D&q=
uot;">onmousedown</code>
+     <td> <a href=3D#handler-onmousedown title=3Dhandler-onmous=
edown>HTML elements</a>
+     <td> <code title=3Devent-mousedown>mousedown</code&g=
t; event handler
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-onmouseenter> <code title=3D&=
quot;">onmouseenter</code>
+     <td> <a href=3D#handler-onmouseenter title=3Dhandler-onmou=
seenter>HTML elements</a>
+     <td> <code title=3Devent-mouseenter>mouseenter</code=
> event handler
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-onmouseleave> <code title=3D&=
quot;">onmouseleave</code>
+     <td> <a href=3D#handler-onmouseleave title=3Dhandler-onmou=
seleave>HTML elements</a>
+     <td> <code title=3Devent-mouseleave>mouseleave</code=
> event handler
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-onmousemove> <code title=3D&q=
uot;">onmousemove</code>
+     <td> <a href=3D#handler-onmousemove title=3Dhandler-onmous=
emove>HTML elements</a>
+     <td> <code title=3Devent-mousemove>mousemove</code&g=
t; event handler
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-onmouseout> <code title=3D&qu=
ot;">onmouseout</code>
+     <td> <a href=3D#handler-onmouseout title=3Dhandler-onmouse=
out>HTML elements</a>
+     <td> <code title=3Devent-mouseout>mouseout</code>=
 event handler
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-onmouseover> <code title=3D&q=
uot;">onmouseover</code>
+     <td> <a href=3D#handler-onmouseover title=3Dhandler-onmous=
eover>HTML elements</a>
+     <td> <code title=3Devent-mouseover>mouseover</code&g=
t; event handler
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-onmouseup> <code title=3D&quo=
t;">onmouseup</code>
+     <td> <a href=3D#handler-onmouseup title=3Dhandler-onmouseu=
p>HTML elements</a>
+     <td> <code title=3Devent-mouseup>mouseup</code> e=
vent handler
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-onmousewheel> <code title=3D&=
quot;">onmousewheel</code>
+     <td> <a href=3D#handler-onmousewheel title=3Dhandler-onmou=
sewheel>HTML elements</a>
+     <td> <code title=3Devent-mousewheel>mousewheel</code=
> event handler
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-window-onoffline> <code title=
=3D"">onoffline</code>
+     <td> <code title=3Dhandler-window-onoffline><a href=3D=
#handler-window-onoffline>body</a></code>
+     <td> <code title=3Devent-offline><a href=3D#event-of=
fline>offline</a></code> event handler for <code>&lt=
;a href=3D#window>Window</a></code> object
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-window-ononline> <code title=3D=
"">ononline</code>
+     <td> <code title=3Dhandler-window-ononline><a href=3D=
#handler-window-ononline>body</a></code>
+     <td> <code title=3Devent-online><a href=3D#event-onl=
ine>online</a></code> event handler for <code><a =
href=3D#window>Window</a></code> object
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-window-onpagehide> <code titl=
e=3D"">onpagehide</code>
+     <td> <code title=3Dhandler-window-onpagehide><a href=
=3D#handler-window-onpagehide>body</a></code>
+     <td> <code title=3Devent-pagehide><a href=3D#event-p=
agehide>pagehide</a></code> event handler for <code>=
<a href=3D#window>Window</a></code> object
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-window-onpageshow> <code titl=
e=3D"">onpageshow</code>
+     <td> <code title=3Dhandler-window-onpageshow><a href=
=3D#handler-window-onpageshow>body</a></code>
+     <td> <code title=3Devent-pageshow><a href=3D#event-p=
ageshow>pageshow</a></code> event handler for <code>=
<a href=3D#window>Window</a></code> object
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-onpause> <code title=3D"=
">onpause</code>
+     <td> <a href=3D#handler-onpause title=3Dhandler-onpause&gt=
;HTML elements</a>
+     <td> <code title=3Devent-media-pause><a href=3D#even=
t-media-pause>pause</a></code> event handler
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-onplay> <code title=3D"&=
quot;>onplay</code>
+     <td> <a href=3D#handler-onplay title=3Dhandler-onplay>H=
TML elements</a>
+     <td> <code title=3Devent-media-play><a href=3D#event=
-media-play>play</a></code> event handler
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-onplaying> <code title=3D&quo=
t;">onplaying</code>
+     <td> <a href=3D#handler-onplaying title=3Dhandler-onplayin=
g>HTML elements</a>
+     <td> <code title=3Devent-media-playing><a href=3D#ev=
ent-media-playing>playing</a></code> event handler
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-window-onpopstate> <code titl=
e=3D"">onpopstate</code>
+     <td> <code title=3Dhandler-window-onpopstate><a href=
=3D#handler-window-onpopstate>body</a></code>
+     <td> <code title=3Devent-popstate><a href=3D#event-p=
opstate>popstate</a></code> event handler for <code>=
<a href=3D#window>Window</a></code> object
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-onprogress> <code title=3D&qu=
ot;">onprogress</code>
+     <td> <a href=3D#handler-onprogress title=3Dhandler-onprogr=
ess>HTML elements</a>
+     <td> <code title=3Devent-media-progress><a href=3D#e=
vent-media-progress>progress</a></code> event handler
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-onratechange> <code title=3D&=
quot;">onratechange</code>
+     <td> <a href=3D#handler-onratechange title=3Dhandler-onrat=
echange>HTML elements</a>
+     <td> <code title=3Devent-media-ratechange><a href=3D=
#event-media-ratechange>ratechange</a></code> event handle=
r
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-onreset> <code title=3D"=
">onreset</code>
+     <td> <a href=3D#handler-onreset title=3Dhandler-onreset&gt=
;HTML elements</a>
+     <td> <code title=3Devent-reset>reset</code> event=
 handler
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-window-onresize> <code title=3D=
"">onresize</code>
+     <td> <code title=3Dhandler-window-onresize><a href=3D=
#handler-window-onresize>body</a></code>
+     <td> <code title=3Devent-resize>resize</code> eve=
nt handler for <code><a href=3D#window>Window</a></c=
ode> object
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-onscroll> <code title=3D&quot=
;">onscroll</code>
+     <td> <a href=3D#handler-onscroll title=3Dhandler-onscroll&=
gt;HTML elements</a>
+     <td> <code title=3Devent-scroll>scroll</code> eve=
nt handler
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-onseeked> <code title=3D&quot=
;">onseeked</code>
+     <td> <a href=3D#handler-onseeked title=3Dhandler-onseeked&=
gt;HTML elements</a>
+     <td> <code title=3Devent-media-seeked><a href=3D#eve=
nt-media-seeked>seeked</a></code> event handler
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-onseeking> <code title=3D&quo=
t;">onseeking</code>
+     <td> <a href=3D#handler-onseeking title=3Dhandler-onseekin=
g>HTML elements</a>
+     <td> <code title=3Devent-media-seeking><a href=3D#ev=
ent-media-seeking>seeking</a></code> event handler
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-onselect> <code title=3D&quot=
;">onselect</code>
+     <td> <a href=3D#handler-onselect title=3Dhandler-onselect&=
gt;HTML elements</a>
+     <td> <code title=3Devent-select>select</code> eve=
nt handler
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-onshow> <code title=3D"&=
quot;>onshow</code>
+     <td> <a href=3D#handler-onshow title=3Dhandler-onshow>H=
TML elements</a>
+     <td> <code title=3Devent-show>show</code> event h=
andler
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-onsort> <code title=3D"&=
quot;>onsort</code>
+     <td> <a href=3D#handler-onsort title=3Dhandler-onsort>H=
TML elements</a>
+     <td> <code title=3Devent-sort>sort</code> event h=
andler
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-onstalled> <code title=3D&quo=
t;">onstalled</code>
+     <td> <a href=3D#handler-onstalled title=3Dhandler-onstalle=
d>HTML elements</a>
+     <td> <code title=3Devent-media-stalled><a href=3D#ev=
ent-media-stalled>stalled</a></code> event handler
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-window-onstorage> <code title=
=3D"">onstorage</code>
+     <td> <code title=3Dhandler-window-onstorage><a href=3D=
#handler-window-onstorage>body</a></code>
+     <td> <code title=3Devent-storage><a href=3D#event-st=
orage>storage</a></code> event handler for <code>&lt=
;a href=3D#window>Window</a></code> object
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-onsubmit> <code title=3D&quot=
;">onsubmit</code>
+     <td> <a href=3D#handler-onsubmit title=3Dhandler-onsubmit&=
gt;HTML elements</a>
+     <td> <code title=3Devent-submit>submit</code> eve=
nt handler
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-onsuspend> <code title=3D&quo=
t;">onsuspend</code>
+     <td> <a href=3D#handler-onsuspend title=3Dhandler-onsuspen=
d>HTML elements</a>
+     <td> <code title=3Devent-media-suspend><a href=3D#ev=
ent-media-suspend>suspend</a></code> event handler
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-ontimeupdate> <code title=3D&=
quot;">ontimeupdate</code>
+     <td> <a href=3D#handler-ontimeupdate title=3Dhandler-ontim=
eupdate>HTML elements</a>
+     <td> <code title=3Devent-media-timeupdate><a href=3D=
#event-media-timeupdate>timeupdate</a></code> event handle=
r
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-ontoggle> <code title=3D&quot=
;">ontoggle</code>
+     <td> <a href=3D#handler-ontoggle title=3Dhandler-ontoggle&=
gt;HTML elements</a>
+     <td> <code title=3Devent-toggle>toggle</code> eve=
nt handler
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-window-onunload> <code title=3D=
"">onunload</code>
+     <td> <code title=3Dhandler-window-onunload><a href=3D=
#handler-window-onunload>body</a></code>
+     <td> <code title=3Devent-unload>unload</code> eve=
nt handler for <code><a href=3D#window>Window</a></c=
ode> object
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-onvolumechange> <code title=3D=
"">onvolumechange</code>
+     <td> <a href=3D#handler-onvolumechange title=3Dhandler-onv=
olumechange>HTML elements</a>
+     <td> <code title=3Devent-media-volumechange><a href=3D=
#event-media-volumechange>volumechange</a></code> event ha=
ndler
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+    <tr><th id=3Dix-handler-onwaiting> <code title=3D&quo=
t;">onwaiting</code>
+     <td> <a href=3D#handler-onwaiting title=3Dhandler-onwaitin=
g>HTML elements</a>
+     <td> <code title=3Devent-media-waiting><a href=3D#ev=
ent-media-waiting>waiting</a></code> event handler
+     <td> <a href=3D#event-handler-content-attributes title=3D&=
quot;event handler content attributes">Event handler content attr=
ibute</a>
+
+  </table><!-- v2 for completeness: (also search for REFLECTIDL=
)
+  <h3 class=3D"no-num">Reflecting IDL attributes</h3&=
gt;
+
+  <p><i>This section is non-normative.</i></p>
+
+  <table>
+   <caption>List of <dfn>reflecting IDL attributes</dfn&g=
t;</caption>
+   <thead>
+    <tr>
+     <th> Interface
+     <th> Element(s)
+     <th> IDL attribute
+     <th> Reflects...
+   <tbody>
+    ...
+    <tr>
+     <td> <code>HTMLElement</code>
+     <td> <span>HTML elements</span>
+     <td> <code title=3D"dom-contextMenu">contextM=
enu</code>
+     <td> <code title=3D"attr-contextmenu">context=
menu</code>
+    <tr>
+     <td> <code>HTMLOptionElement</code>
+     <td> <code>option</code>
+     <td> <code title=3D"dom-option-text">text<=
/code>
+     <td> <code>textContent</code>
+  </table>
+  ( include option.text; textarea.defaultValue, and other attributes tha=
t "reflect" the element's textContent )
+--><h3 class=3Dno-num id=3Delement-interfaces>Element Interface=
s</h3>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <table><caption>List of interfaces for elements</captio=
n>
+   <thead><tr><th> Element(s)
+     <th> Interface(s)
+   <tbody><tr><td> <code><a href=3D#the-a-ele=
ment>a</a></code>
+     <td> <code><a href=3D#htmlanchorelement>HTMLAncho=
rElement</a></code> : <code><a href=3D#htmlelement&g=
t;HTMLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-abbr-element>a=
bbr</a></code>
+     <td> <code><a href=3D#htmlelement>HTMLElement<=
/a></code>
+
+    <tr><td> <code><a href=3D#the-address-element&g=
t;address</a></code>
+     <td> <code><a href=3D#htmlelement>HTMLElement<=
/a></code>
+
+    <tr><td> <code><a href=3D#the-area-element>a=
rea</a></code>
+     <td> <code><a href=3D#htmlareaelement>HTMLAreaEle=
ment</a></code> : <code><a href=3D#htmlelement>HT=
MLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-article-element&g=
t;article</a></code>
+     <td> <code><a href=3D#htmlelement>HTMLElement<=
/a></code>
+
+    <tr><td> <code><a href=3D#the-aside-element>=
aside</a></code>
+     <td> <code><a href=3D#htmlelement>HTMLElement<=
/a></code>
+
+    <tr><td> <code><a href=3D#the-audio-element>=
audio</a></code>
+     <td> <code><a href=3D#htmlaudioelement>HTMLAudioE=
lement</a></code> : <code><a href=3D#htmlmediaelemen=
t>HTMLMediaElement</a></code> : <code><a href=3D#=
htmlelement>HTMLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-b-element>b&lt=
;/a></code>
+     <td> <code><a href=3D#htmlelement>HTMLElement<=
/a></code>
+
+    <tr><td> <code><a href=3D#the-base-element>b=
ase</a></code>
+     <td> <code><a href=3D#htmlbaseelement>HTMLBaseEle=
ment</a></code> : <code><a href=3D#htmlelement>HT=
MLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-bdi-element>bd=
i</a></code>
+     <td> <code><a href=3D#htmlelement>HTMLElement<=
/a></code>
+
+    <tr><td> <code><a href=3D#the-bdo-element>bd=
o</a></code>
+     <td> <code><a href=3D#htmlelement>HTMLElement<=
/a></code>
+
+    <tr><td> <code><a href=3D#the-blockquote-elemen=
t>blockquote</a></code>
+     <td> <code><a href=3D#htmlquoteelement>HTMLQuoteE=
lement</a></code> : <code><a href=3D#htmlelement>=
HTMLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-body-element>b=
ody</a></code>
+     <td> <code><a href=3D#htmlbodyelement>HTMLBodyEle=
ment</a></code> : <code><a href=3D#htmlelement>HT=
MLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-br-element>br&=
lt;/a></code>
+     <td> <code><a href=3D#htmlbrelement>HTMLBRElement=
</a></code> : <code><a href=3D#htmlelement>HTMLEl=
ement</a></code>
+
+    <tr><td> <code><a href=3D#the-button-element&gt=
;button</a></code>
+     <td> <code><a href=3D#htmlbuttonelement>HTMLButto=
nElement</a></code> : <code><a href=3D#htmlelement&g=
t;HTMLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-canvas-element&gt=
;canvas</a></code>
+     <td> <code><a href=3D#htmlcanvaselement>HTMLCanva=
sElement</a></code> : <code><a href=3D#htmlelement&g=
t;HTMLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-caption-element&g=
t;caption</a></code>
+     <td> <code><a href=3D#htmltablecaptionelement>HTM=
LTableCaptionElement</a></code> : <code><a href=3D#h=
tmlelement>HTMLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-cite-element>c=
ite</a></code>
+     <td> <code><a href=3D#htmlelement>HTMLElement<=
/a></code>
+
+    <tr><td> <code><a href=3D#the-code-element>c=
ode</a></code>
+     <td> <code><a href=3D#htmlelement>HTMLElement<=
/a></code>
+
+    <tr><td> <code><a href=3D#the-col-element>co=
l</a></code>
+     <td> <code><a href=3D#htmltablecolelement>HTMLTab=
leColElement</a></code> : <code><a href=3D#htmleleme=
nt>HTMLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-colgroup-element&=
gt;colgroup</a></code>
+     <td> <code><a href=3D#htmltablecolelement>HTMLTab=
leColElement</a></code> : <code><a href=3D#htmleleme=
nt>HTMLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-menuitem-element&=
gt;menuitem</a></code>
+     <td> <code><a href=3D#htmlmenuitemelement>HTMLMen=
uItemElement</a></code> : <code><a href=3D#htmleleme=
nt>HTMLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-data-element>d=
ata</a></code>
+     <td> <code><a href=3D#htmldataelement>HTMLDataEle=
ment</a></code> : <code><a href=3D#htmlelement>HT=
MLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-datalist-element&=
gt;datalist</a></code>
+     <td> <code><a href=3D#htmldatalistelement>HTMLDat=
aListElement</a></code> : <code><a href=3D#htmleleme=
nt>HTMLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-dd-element>dd&=
lt;/a></code>
+     <td> <code><a href=3D#htmlelement>HTMLElement<=
/a></code>
+
+    <tr><td> <code><a href=3D#the-del-element>de=
l</a></code>
+     <td> <code><a href=3D#htmlmodelement>HTMLModEleme=
nt</a></code> : <code><a href=3D#htmlelement>HTML=
Element</a></code>
+
+    <tr><td> <code><a href=3D#the-details-element&g=
t;details</a></code>
+     <td> <code><a href=3D#htmldetailselement>HTMLDeta=
ilsElement</a></code> : <code><a href=3D#htmlelement=
>HTMLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-dfn-element>df=
n</a></code>
+     <td> <code><a href=3D#htmlelement>HTMLElement<=
/a></code>
+
+    <tr><td> <code><a href=3D#the-dialog-element&gt=
;dialog</a></code>
+     <td> <code><a href=3D#htmldialogelement>HTMLDialo=
gElement</a></code> : <code><a href=3D#htmlelement&g=
t;HTMLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-div-element>di=
v</a></code>
+     <td> <code><a href=3D#htmldivelement>HTMLDivEleme=
nt</a></code> : <code><a href=3D#htmlelement>HTML=
Element</a></code>
+
+    <tr><td> <code><a href=3D#the-dl-element>dl&=
lt;/a></code>
+     <td> <code><a href=3D#htmldlistelement>HTMLDListE=
lement</a></code> : <code><a href=3D#htmlelement>=
HTMLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-dt-element>dt&=
lt;/a></code>
+     <td> <code><a href=3D#htmlelement>HTMLElement<=
/a></code>
+
+    <tr><td> <code><a href=3D#the-em-element>em&=
lt;/a></code>
+     <td> <code><a href=3D#htmlelement>HTMLElement<=
/a></code>
+
+    <tr><td> <code><a href=3D#the-embed-element>=
embed</a></code>
+     <td> <code><a href=3D#htmlembedelement>HTMLEmbedE=
lement</a></code> : <code><a href=3D#htmlelement>=
HTMLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-fieldset-element&=
gt;fieldset</a></code>
+     <td> <code><a href=3D#htmlfieldsetelement>HTMLFie=
ldSetElement</a></code> : <code><a href=3D#htmleleme=
nt>HTMLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-figcaption-elemen=
t>figcaption</a></code>
+     <td> <code><a href=3D#htmlelement>HTMLElement<=
/a></code>
+
+    <tr><td> <code><a href=3D#the-figure-element&gt=
;figure</a></code>
+     <td> <code><a href=3D#htmlelement>HTMLElement<=
/a></code>
+
+    <tr><td> <code><a href=3D#the-footer-element&gt=
;footer</a></code>
+     <td> <code><a href=3D#htmlelement>HTMLElement<=
/a></code>
+
+    <tr><td> <code><a href=3D#the-form-element>f=
orm</a></code>
+     <td> <code><a href=3D#htmlformelement>HTMLFormEle=
ment</a></code> : <code><a href=3D#htmlelement>HT=
MLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-h1,-h2,-h3,-h4,-h=
5,-and-h6-elements>h1</a></code>
+     <td> <code><a href=3D#htmlheadingelement>HTMLHead=
ingElement</a></code> : <code><a href=3D#htmlelement=
>HTMLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-h1,-h2,-h3,-h4,-h=
5,-and-h6-elements>h2</a></code>
+     <td> <code><a href=3D#htmlheadingelement>HTMLHead=
ingElement</a></code> : <code><a href=3D#htmlelement=
>HTMLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-h1,-h2,-h3,-h4,-h=
5,-and-h6-elements>h3</a></code>
+     <td> <code><a href=3D#htmlheadingelement>HTMLHead=
ingElement</a></code> : <code><a href=3D#htmlelement=
>HTMLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-h1,-h2,-h3,-h4,-h=
5,-and-h6-elements>h4</a></code>
+     <td> <code><a href=3D#htmlheadingelement>HTMLHead=
ingElement</a></code> : <code><a href=3D#htmlelement=
>HTMLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-h1,-h2,-h3,-h4,-h=
5,-and-h6-elements>h5</a></code>
+     <td> <code><a href=3D#htmlheadingelement>HTMLHead=
ingElement</a></code> : <code><a href=3D#htmlelement=
>HTMLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-h1,-h2,-h3,-h4,-h=
5,-and-h6-elements>h6</a></code>
+     <td> <code><a href=3D#htmlheadingelement>HTMLHead=
ingElement</a></code> : <code><a href=3D#htmlelement=
>HTMLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-head-element>h=
ead</a></code>
+     <td> <code><a href=3D#htmlheadelement>HTMLHeadEle=
ment</a></code> : <code><a href=3D#htmlelement>HT=
MLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-header-element&gt=
;header</a></code>
+     <td> <code><a href=3D#htmlelement>HTMLElement<=
/a></code>
+
+    <tr><td> <code><a href=3D#the-hgroup-element&gt=
;hgroup</a></code>
+     <td> <code><a href=3D#htmlelement>HTMLElement<=
/a></code>
+
+    <tr><td> <code><a href=3D#the-hr-element>hr&=
lt;/a></code>
+     <td> <code><a href=3D#htmlhrelement>HTMLHRElement=
</a></code> : <code><a href=3D#htmlelement>HTMLEl=
ement</a></code>
+
+    <tr><td> <code><a href=3D#the-html-element>h=
tml</a></code>
+     <td> <code><a href=3D#htmlhtmlelement>HTMLHtmlEle=
ment</a></code> : <code><a href=3D#htmlelement>HT=
MLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-i-element>i&lt=
;/a></code>
+     <td> <code><a href=3D#htmlelement>HTMLElement<=
/a></code>
+
+    <tr><td> <code><a href=3D#the-iframe-element&gt=
;iframe</a></code>
+     <td> <code><a href=3D#htmliframeelement>HTMLIFram=
eElement</a></code> : <code><a href=3D#htmlelement&g=
t;HTMLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-img-element>im=
g</a></code>
+     <td> <code><a href=3D#htmlimageelement>HTMLImageE=
lement</a></code> : <code><a href=3D#htmlelement>=
HTMLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-input-element>=
input</a></code>
+     <td> <code><a href=3D#htmlinputelement>HTMLInputE=
lement</a></code> : <code><a href=3D#htmlelement>=
HTMLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-ins-element>in=
s</a></code>
+     <td> <code><a href=3D#htmlmodelement>HTMLModEleme=
nt</a></code> : <code><a href=3D#htmlelement>HTML=
Element</a></code>
+
+    <tr><td> <code><a href=3D#the-kbd-element>kb=
d</a></code>
+     <td> <code><a href=3D#htmlelement>HTMLElement<=
/a></code>
+
+    <tr><td> <code><a href=3D#the-keygen-element&gt=
;keygen</a></code>
+     <td> <code><a href=3D#htmlkeygenelement>HTMLKeyge=
nElement</a></code> : <code><a href=3D#htmlelement&g=
t;HTMLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-label-element>=
label</a></code>
+     <td> <code><a href=3D#htmllabelelement>HTMLLabelE=
lement</a></code> : <code><a href=3D#htmlelement>=
HTMLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-legend-element&gt=
;legend</a></code>
+     <td> <code><a href=3D#htmllegendelement>HTMLLegen=
dElement</a></code> : <code><a href=3D#htmlelement&g=
t;HTMLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-li-element>li&=
lt;/a></code>
+     <td> <code><a href=3D#htmllielement>HTMLLIElement=
</a></code> : <code><a href=3D#htmlelement>HTMLEl=
ement</a></code>
+
+    <tr><td> <code><a href=3D#the-link-element>l=
ink</a></code>
+     <td> <code><a href=3D#htmllinkelement>HTMLLinkEle=
ment</a></code> : <code><a href=3D#htmlelement>HT=
MLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-main-element>m=
ain</a></code>
+     <td> <code><a href=3D#htmlelement>HTMLElement<=
/a></code>
+
+    <tr><td> <code><a href=3D#the-map-element>ma=
p</a></code>
+     <td> <code><a href=3D#htmlmapelement>HTMLMapEleme=
nt</a></code> : <code><a href=3D#htmlelement>HTML=
Element</a></code>
+
+    <tr><td> <code><a href=3D#the-mark-element>m=
ark</a></code>
+     <td> <code><a href=3D#htmlelement>HTMLElement<=
/a></code>
+
+    <tr><td> <code><a href=3D#the-menu-element>m=
enu</a></code>
+     <td> <code><a href=3D#htmlmenuelement>HTMLMenuEle=
ment</a></code> : <code><a href=3D#htmlelement>HT=
MLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-meta-element>m=
eta</a></code>
+     <td> <code><a href=3D#htmlmetaelement>HTMLMetaEle=
ment</a></code> : <code><a href=3D#htmlelement>HT=
MLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-meter-element>=
meter</a></code>
+     <td> <code><a href=3D#htmlmeterelement>HTMLMeterE=
lement</a></code> : <code><a href=3D#htmlelement>=
HTMLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-nav-element>na=
v</a></code>
+     <td> <code><a href=3D#htmlelement>HTMLElement<=
/a></code>
+
+    <tr><td> <code><a href=3D#the-noscript-element&=
gt;noscript</a></code>
+     <td> <code><a href=3D#htmlelement>HTMLElement<=
/a></code>
+
+    <tr><td> <code><a href=3D#the-object-element&gt=
;object</a></code>
+     <td> <code><a href=3D#htmlobjectelement>HTMLObjec=
tElement</a></code> : <code><a href=3D#htmlelement&g=
t;HTMLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-ol-element>ol&=
lt;/a></code>
+     <td> <code><a href=3D#htmlolistelement>HTMLOListE=
lement</a></code> : <code><a href=3D#htmlelement>=
HTMLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-optgroup-element&=
gt;optgroup</a></code>
+     <td> <code><a href=3D#htmloptgroupelement>HTMLOpt=
GroupElement</a></code> : <code><a href=3D#htmleleme=
nt>HTMLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-option-element&gt=
;option</a></code>
+     <td> <code><a href=3D#htmloptionelement>HTMLOptio=
nElement</a></code> : <code><a href=3D#htmlelement&g=
t;HTMLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-output-element&gt=
;output</a></code>
+     <td> <code><a href=3D#htmloutputelement>HTMLOutpu=
tElement</a></code> : <code><a href=3D#htmlelement&g=
t;HTMLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-p-element>p&lt=
;/a></code>
+     <td> <code><a href=3D#htmlparagraphelement>HTMLPa=
ragraphElement</a></code> : <code><a href=3D#htmlele=
ment>HTMLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-param-element>=
param</a></code>
+     <td> <code><a href=3D#htmlparamelement>HTMLParamE=
lement</a></code> : <code><a href=3D#htmlelement>=
HTMLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-pre-element>pr=
e</a></code>
+     <td> <code><a href=3D#htmlpreelement>HTMLPreEleme=
nt</a></code> : <code><a href=3D#htmlelement>HTML=
Element</a></code>
+
+    <tr><td> <code><a href=3D#the-progress-element&=
gt;progress</a></code>
+     <td> <code><a href=3D#htmlprogresselement>HTMLPro=
gressElement</a></code> : <code><a href=3D#htmleleme=
nt>HTMLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-q-element>q&lt=
;/a></code>
+     <td> <code><a href=3D#htmlquoteelement>HTMLQuoteE=
lement</a></code> : <code><a href=3D#htmlelement>=
HTMLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-rp-element>rp&=
lt;/a></code>
+     <td> <code><a href=3D#htmlelement>HTMLElement<=
/a></code>
+
+    <tr><td> <code><a href=3D#the-rt-element>rt&=
lt;/a></code>
+     <td> <code><a href=3D#htmlelement>HTMLElement<=
/a></code>
+
+    <tr><td> <code><a href=3D#the-ruby-element>r=
uby</a></code>
+     <td> <code><a href=3D#htmlelement>HTMLElement<=
/a></code>
+
+    <tr><td> <code><a href=3D#the-s-element>s&lt=
;/a></code>
+     <td> <code><a href=3D#htmlelement>HTMLElement<=
/a></code>
+
+    <tr><td> <code><a href=3D#the-samp-element>s=
amp</a></code>
+     <td> <code><a href=3D#htmlelement>HTMLElement<=
/a></code>
+
+    <tr><td> <code><a href=3D#the-script-element&gt=
;script</a></code>
+     <td> <code><a href=3D#htmlscriptelement>HTMLScrip=
tElement</a></code> : <code><a href=3D#htmlelement&g=
t;HTMLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-section-element&g=
t;section</a></code>
+     <td> <code><a href=3D#htmlelement>HTMLElement<=
/a></code>
+
+    <tr><td> <code><a href=3D#the-select-element&gt=
;select</a></code>
+     <td> <code><a href=3D#htmlselectelement>HTMLSelec=
tElement</a></code> : <code><a href=3D#htmlelement&g=
t;HTMLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-small-element>=
small</a></code>
+     <td> <code><a href=3D#htmlelement>HTMLElement<=
/a></code>
+
+    <tr><td> <code><a href=3D#the-source-element&gt=
;source</a></code>
+     <td> <code><a href=3D#htmlsourceelement>HTMLSourc=
eElement</a></code> : <code><a href=3D#htmlelement&g=
t;HTMLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-span-element>s=
pan</a></code>
+     <td> <code><a href=3D#htmlspanelement>HTMLSpanEle=
ment</a></code> : <code><a href=3D#htmlelement>HT=
MLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-strong-element&gt=
;strong</a></code>
+     <td> <code><a href=3D#htmlelement>HTMLElement<=
/a></code>
+
+    <tr><td> <code><a href=3D#the-style-element>=
style</a></code>
+     <td> <code><a href=3D#htmlstyleelement>HTMLStyleE=
lement</a></code> : <code><a href=3D#htmlelement>=
HTMLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-sub-and-sup-eleme=
nts>sub</a></code>
+     <td> <code><a href=3D#htmlelement>HTMLElement<=
/a></code>
+
+    <tr><td> <code><a href=3D#the-summary-element&g=
t;summary</a></code>
+     <td> <code><a href=3D#htmlelement>HTMLElement<=
/a></code>
+
+    <tr><td> <code><a href=3D#the-sub-and-sup-eleme=
nts>sup</a></code>
+     <td> <code><a href=3D#htmlelement>HTMLElement<=
/a></code>
+
+    <tr><td> <code><a href=3D#the-table-element>=
table</a></code>
+     <td> <code><a href=3D#htmltableelement>HTMLTableE=
lement</a></code> : <code><a href=3D#htmlelement>=
HTMLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-tbody-element>=
tbody</a></code>
+     <td> <code><a href=3D#htmltablesectionelement>HTM=
LTableSectionElement</a></code> : <code><a href=3D#h=
tmlelement>HTMLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-td-element>td&=
lt;/a></code>
+     <td> <code><a href=3D#htmltabledatacellelement>HT=
MLTableDataCellElement</a></code> : <code><a href=3D=
#htmltablecellelement>HTMLTableCellElement</a></code> : &l=
t;code><a href=3D#htmlelement>HTMLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-template-element&=
gt;template</a></code>
+     <td> <code><a href=3D#htmltemplateelement>HTMLTem=
plateElement</a></code> : <code><a href=3D#htmleleme=
nt>HTMLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-textarea-element&=
gt;textarea</a></code>
+     <td> <code><a href=3D#htmltextareaelement>HTMLTex=
tAreaElement</a></code> : <code><a href=3D#htmleleme=
nt>HTMLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-tfoot-element>=
tfoot</a></code>
+     <td> <code><a href=3D#htmltablesectionelement>HTM=
LTableSectionElement</a></code> : <code><a href=3D#h=
tmlelement>HTMLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-th-element>th&=
lt;/a></code>
+     <td> <code><a href=3D#htmltableheadercellelement>=
HTMLTableHeaderCellElement</a></code> : <code><a hre=
f=3D#htmltablecellelement>HTMLTableCellElement</a></code> =
: <code><a href=3D#htmlelement>HTMLElement</a></code=
>
+
+    <tr><td> <code><a href=3D#the-thead-element>=
thead</a></code>
+     <td> <code><a href=3D#htmltablesectionelement>HTM=
LTableSectionElement</a></code> : <code><a href=3D#h=
tmlelement>HTMLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-time-element>t=
ime</a></code>
+     <td> <code><a href=3D#htmltimeelement>HTMLTimeEle=
ment</a></code> : <code><a href=3D#htmlelement>HT=
MLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-title-element>=
title</a></code>
+     <td> <code><a href=3D#htmltitleelement>HTMLTitleE=
lement</a></code> : <code><a href=3D#htmlelement>=
HTMLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-tr-element>tr&=
lt;/a></code>
+     <td> <code><a href=3D#htmltablerowelement>HTMLTab=
leRowElement</a></code> : <code><a href=3D#htmleleme=
nt>HTMLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-track-element>=
track</a></code>
+     <td> <code><a href=3D#htmltrackelement>HTMLTrackE=
lement</a></code> : <code><a href=3D#htmlelement>=
HTMLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-u-element>u&lt=
;/a></code>
+     <td> <code><a href=3D#htmlelement>HTMLElement<=
/a></code>
+
+    <tr><td> <code><a href=3D#the-ul-element>ul&=
lt;/a></code>
+     <td> <code><a href=3D#htmlulistelement>HTMLUListE=
lement</a></code> : <code><a href=3D#htmlelement>=
HTMLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-var-element>va=
r</a></code>
+     <td> <code><a href=3D#htmlelement>HTMLElement<=
/a></code>
+
+    <tr><td> <code><a href=3D#the-video-element>=
video</a></code>
+     <td> <code><a href=3D#htmlvideoelement>HTMLVideoE=
lement</a></code> : <code><a href=3D#htmlmediaelemen=
t>HTMLMediaElement</a></code> : <code><a href=3D#=
htmlelement>HTMLElement</a></code>
+
+    <tr><td> <code><a href=3D#the-wbr-element>wb=
r</a></code>
+     <td> <code><a href=3D#htmlelement>HTMLElement<=
/a></code>
+
+  </table><h3 class=3Dno-num id=3Dall-interfaces>All Interfa=
ces</h3>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <ul class=3D"brief">
+   <li><code><a href=3D#abstractworker>AbstractWorker&=
lt;/a></code>
+   <li><code><a href=3D#applicationcache>ApplicationCa=
che</a></code>
+   <li><code><a href=3D#audiotrack>AudioTrack</a&gt=
;</code>
+   <li><code><a href=3D#audiotracklist>AudioTrackList&=
lt;/a></code>
+   <li><code><a href=3D#barprop>BarProp</a></=
code>
+   <li><code><a href=3D#beforeunloadevent>BeforeUnload=
Event</a></code>
+   <li><code><a href=3D#canvasdrawingstyles>CanvasDraw=
ingStyles</a></code>
+   <li><code><a href=3D#canvasgradient>CanvasGradient&=
lt;/a></code>
+   <li><code><a href=3D#canvaspathmethods>CanvasPathMe=
thods</a></code>
+   <li><code><a href=3D#canvaspattern>CanvasPattern&lt=
;/a></code>
+   <li><code><a href=3D#canvasproxy>CanvasProxy</a&=
gt;</code>
+   <li><code><a href=3D#canvasrenderingcontext2d>Canva=
sRenderingContext2D</a></code>
+   <li><code><a href=3D#closeevent>CloseEvent</a&gt=
;</code>
+   <li><code><a href=3D#domelementmap>DOMElementMap&lt=
;/a></code>
+   <li><code><a href=3D#domstringmap>DOMStringMap</=
a></code>
+   <li><code><a href=3D#datatransfer>DataTransfer</=
a></code>
+   <li><code><a href=3D#datatransferitem>DataTransferI=
tem</a></code>
+   <li><code><a href=3D#datatransferitemlist>DataTrans=
ferItemList</a></code>
+   <li><code><a href=3D#dedicatedworkerglobalscope>Ded=
icatedWorkerGlobalScope</a></code>
+   <li><code><a href=3D#document>Document</a>&lt=
;/code>, <a href=3D#Document-partial>partial</a>
+   <li><code><a href=3D#dragevent>DragEvent</a>&=
lt;/code>
+   <li><code><a href=3D#drawingstyle>DrawingStyle</=
a></code>
+   <li><code><a href=3D#errorevent>ErrorEvent</a&gt=
;</code>
+   <li><code><a href=3D#eventsource>EventSource</a&=
gt;</code>
+   <li><code><a href=3D#external>External</a>&lt=
;/code>
+   <li><code><a href=3D#globaleventhandlers>GlobalEven=
tHandlers</a></code>
+   <li><code><a href=3D#htmlallcollection>HTMLAllColle=
ction</a></code>
+   <li><code><a href=3D#htmlanchorelement>HTMLAnchorEl=
ement</a></code>, <a href=3D#HTMLAnchorElement-partial>=
partial</a>
+   <li><code><a href=3D#htmlappletelement>HTMLAppletEl=
ement</a></code>
+   <li><code><a href=3D#htmlareaelement>HTMLAreaElemen=
t</a></code>, <a href=3D#HTMLAreaElement-partial>partia=
l</a>
+   <li><code><a href=3D#htmlaudioelement>HTMLAudioElem=
ent</a></code>
+   <li><code><a href=3D#htmlbrelement>HTMLBRElement&lt=
;/a></code>, <a href=3D#HTMLBRElement-partial>partial</=
a>
+   <li><code><a href=3D#htmlbaseelement>HTMLBaseElemen=
t</a></code>
+   <li><code><a href=3D#htmlbodyelement>HTMLBodyElemen=
t</a></code>, <a href=3D#HTMLBodyElement-partial>partia=
l</a>
+   <li><code><a href=3D#htmlbuttonelement>HTMLButtonEl=
ement</a></code>
+   <li><code><a href=3D#htmlcanvaselement>HTMLCanvasEl=
ement</a></code>
+   <li><code><a href=3D#htmldlistelement>HTMLDListElem=
ent</a></code>, <a href=3D#HTMLDListElement-partial>par=
tial</a>
+   <li><code><a href=3D#htmldataelement>HTMLDataElemen=
t</a></code>
+   <li><code><a href=3D#htmldatalistelement>HTMLDataLi=
stElement</a></code>
+   <li><code><a href=3D#htmldetailselement>HTMLDetails=
Element</a></code>
+   <li><code><a href=3D#htmldialogelement>HTMLDialogEl=
ement</a></code>
+   <li><code><a href=3D#htmldirectoryelement>HTMLDirec=
toryElement</a></code>
+   <li><code><a href=3D#htmldivelement>HTMLDivElement&=
lt;/a></code>, <a href=3D#HTMLDivElement-partial>partial&l=
t;/a>
+   <li><code><a href=3D#htmlelement>HTMLElement</a&=
gt;</code>
+   <li><code><a href=3D#htmlembedelement>HTMLEmbedElem=
ent</a></code>, <a href=3D#HTMLEmbedElement-partial>par=
tial</a>
+   <li><code><a href=3D#htmlfieldsetelement>HTMLFieldS=
etElement</a></code>
+   <li><code><a href=3D#htmlfontelement>HTMLFontElemen=
t</a></code>
+   <li><code><a href=3D#htmlformcontrolscollection>HTM=
LFormControlsCollection</a></code>
+   <li><code><a href=3D#htmlformelement>HTMLFormElemen=
t</a></code>
+   <li><code><a href=3D#htmlframeelement>HTMLFrameElem=
ent</a></code>
+   <li><code><a href=3D#htmlframesetelement>HTMLFrameS=
etElement</a></code>
+   <li><code><a href=3D#htmlhrelement>HTMLHRElement&lt=
;/a></code>, <a href=3D#HTMLHRElement-partial>partial</=
a>
+   <li><code><a href=3D#htmlheadelement>HTMLHeadElemen=
t</a></code>
+   <li><code><a href=3D#htmlheadingelement>HTMLHeading=
Element</a></code>, <a href=3D#HTMLHeadingElement-partial&=
gt;partial</a>
+   <li><code><a href=3D#htmlhtmlelement>HTMLHtmlElemen=
t</a></code>, <a href=3D#HTMLHtmlElement-partial>partia=
l</a>
+   <li><code><a href=3D#htmliframeelement>HTMLIFrameEl=
ement</a></code>, <a href=3D#HTMLIFrameElement-partial>=
partial</a>
+   <li><code><a href=3D#htmlimageelement>HTMLImageElem=
ent</a></code>, <a href=3D#HTMLImageElement-partial>par=
tial</a>
+   <li><code><a href=3D#htmlinputelement>HTMLInputElem=
ent</a></code>, <a href=3D#HTMLInputElement-partial>par=
tial</a>
+   <li><code><a href=3D#htmlkeygenelement>HTMLKeygenEl=
ement</a></code>
+   <li><code><a href=3D#htmllielement>HTMLLIElement&lt=
;/a></code>, <a href=3D#HTMLLIElement-partial>partial</=
a>
+   <li><code><a href=3D#htmllabelelement>HTMLLabelElem=
ent</a></code>
+   <li><code><a href=3D#htmllegendelement>HTMLLegendEl=
ement</a></code>, <a href=3D#HTMLLegendElement-partial>=
partial</a>
+   <li><code><a href=3D#htmllinkelement>HTMLLinkElemen=
t</a></code>, <a href=3D#HTMLLinkElement-partial>partia=
l</a>
+   <li><code><a href=3D#htmlmapelement>HTMLMapElement&=
lt;/a></code>
+   <li><code><a href=3D#htmlmarqueeelement>HTMLMarquee=
Element</a></code>
+   <li><code><a href=3D#htmlmediaelement>HTMLMediaElem=
ent</a></code>
+   <li><code><a href=3D#htmlmenuelement>HTMLMenuElemen=
t</a></code>, <a href=3D#HTMLMenuElement-partial>partia=
l</a>
+   <li><code><a href=3D#htmlmenuitemelement>HTMLMenuIt=
emElement</a></code>
+   <li><code><a href=3D#htmlmetaelement>HTMLMetaElemen=
t</a></code>, <a href=3D#HTMLMetaElement-partial>partia=
l</a>
+   <li><code><a href=3D#htmlmeterelement>HTMLMeterElem=
ent</a></code>
+   <li><code><a href=3D#htmlmodelement>HTMLModElement&=
lt;/a></code>
+   <li><code><a href=3D#htmlolistelement>HTMLOListElem=
ent</a></code>, <a href=3D#HTMLOListElement-partial>par=
tial</a>
+   <li><code><a href=3D#htmlobjectelement>HTMLObjectEl=
ement</a></code>, <a href=3D#HTMLObjectElement-partial>=
partial</a>
+   <li><code><a href=3D#htmloptgroupelement>HTMLOptGro=
upElement</a></code>
+   <li><code><a href=3D#htmloptionelement>HTMLOptionEl=
ement</a></code>
+   <li><code><a href=3D#htmloptionscollection>HTMLOpti=
onsCollection</a></code>
+   <li><code><a href=3D#htmloutputelement>HTMLOutputEl=
ement</a></code>
+   <li><code><a href=3D#htmlparagraphelement>HTMLParag=
raphElement</a></code>, <a href=3D#HTMLParagraphElement-pa=
rtial>partial</a>
+   <li><code><a href=3D#htmlparamelement>HTMLParamElem=
ent</a></code>, <a href=3D#HTMLParamElement-partial>par=
tial</a>
+   <li><code><a href=3D#htmlpreelement>HTMLPreElement&=
lt;/a></code>, <a href=3D#HTMLPreElement-partial>partial&l=
t;/a>
+   <li><code><a href=3D#htmlprogresselement>HTMLProgre=
ssElement</a></code>
+   <li><code><a href=3D#htmlpropertiescollection>HTMLP=
ropertiesCollection</a></code>
+   <li><code><a href=3D#htmlquoteelement>HTMLQuoteElem=
ent</a></code>
+   <li><code><a href=3D#htmlscriptelement>HTMLScriptEl=
ement</a></code>, <a href=3D#HTMLScriptElement-partial>=
partial</a>
+   <li><code><a href=3D#htmlselectelement>HTMLSelectEl=
ement</a></code>
+   <li><code><a href=3D#htmlsourceelement>HTMLSourceEl=
ement</a></code>
+   <li><code><a href=3D#htmlspanelement>HTMLSpanElemen=
t</a></code>
+   <li><code><a href=3D#htmlstyleelement>HTMLStyleElem=
ent</a></code>
+   <li><code><a href=3D#htmltablecaptionelement>HTMLTa=
bleCaptionElement</a></code>, <a href=3D#HTMLTableCaptionE=
lement-partial>partial</a>
+   <li><code><a href=3D#htmltablecellelement>HTMLTable=
CellElement</a></code>, <a href=3D#HTMLTableCellElement-pa=
rtial>partial</a>
+   <li><code><a href=3D#htmltablecolelement>HTMLTableC=
olElement</a></code>, <a href=3D#HTMLTableColElement-parti=
al>partial</a>
+   <li><code><a href=3D#htmltabledatacellelement>HTMLT=
ableDataCellElement</a></code>, <a href=3D#HTMLTableDataCe=
llElement-partial>partial</a>
+   <li><code><a href=3D#htmltableelement>HTMLTableElem=
ent</a></code>, <a href=3D#HTMLTableElement-partial>par=
tial</a>
+   <li><code><a href=3D#htmltableheadercellelement>HTM=
LTableHeaderCellElement</a></code>
+   <li><code><a href=3D#htmltablerowelement>HTMLTableR=
owElement</a></code>, <a href=3D#HTMLTableRowElement-parti=
al>partial</a>
+   <li><code><a href=3D#htmltablesectionelement>HTMLTa=
bleSectionElement</a></code>, <a href=3D#HTMLTableSectionE=
lement-partial>partial</a>
+   <li><code><a href=3D#htmltemplateelement>HTMLTempla=
teElement</a></code>
+   <li><code><a href=3D#htmltextareaelement>HTMLTextAr=
eaElement</a></code>
+   <li><code><a href=3D#htmltimeelement>HTMLTimeElemen=
t</a></code>
+   <li><code><a href=3D#htmltitleelement>HTMLTitleElem=
ent</a></code>
+   <li><code><a href=3D#htmltrackelement>HTMLTrackElem=
ent</a></code>
+   <li><code><a href=3D#htmlulistelement>HTMLUListElem=
ent</a></code>, <a href=3D#HTMLUListElement-partial>par=
tial</a>
+   <li><code><a href=3D#htmlunknownelement>HTMLUnknown=
Element</a></code>
+   <li><code><a href=3D#htmlvideoelement>HTMLVideoElem=
ent</a></code>
+   <li><code><a href=3D#hashchangeevent>HashChangeEven=
t</a></code>
+   <li><code><a href=3D#history-0>History</a>&lt=
;/code>
+   <li><code><a href=3D#imagebitmap>ImageBitmap</a&=
gt;</code>
+   <li><code><a href=3D#imagebitmapfactories>ImageBitm=
apFactories</a></code>
+   <li><code><a href=3D#imagedata>ImageData</a>&=
lt;/code>
+   <li><code><a href=3D#location>Location</a>&lt=
;/code>
+   <li><code><a href=3D#mediacontroller>MediaControlle=
r</a></code>
+   <li><code><a href=3D#mediaerror>MediaError</a&gt=
;</code>
+   <li><code><a href=3D#messagechannel>MessageChannel&=
lt;/a></code>
+   <li><code><a href=3D#messageevent>MessageEvent</=
a></code>
+   <li><code><a href=3D#messageport>MessagePort</a&=
gt;</code>
+   <li><code><a href=3D#mimetype>MimeType</a>&lt=
;/code>
+   <li><code><a href=3D#mimetypearray>MimeTypeArray&lt=
;/a></code>
+   <li><code>MouseEvent</code>, <a href=3D#MouseEve=
nt-partial>partial</a>
+   <li><code><a href=3D#navigator>Navigator</a>&=
lt;/code>
+   <li><code><a href=3D#navigatorcontentutils>Navigato=
rContentUtils</a></code>
+   <li><code><a href=3D#navigatorid>NavigatorID</a&=
gt;</code>
+   <li><code><a href=3D#navigatorlanguage>NavigatorLan=
guage</a></code>
+   <li><code><a href=3D#navigatoronline>NavigatorOnLin=
e</a></code>
+   <li><code><a href=3D#navigatorplugins>NavigatorPlug=
ins</a></code>
+   <li><code><a href=3D#navigatorstorageutils>Navigato=
rStorageUtils</a></code>
+   <li><code><a href=3D#pagetransitionevent>PageTransi=
tionEvent</a></code>
+   <li><code><a href=3D#path>Path</a></code&g=
t;
+   <li><code><a href=3D#dom-plugin>Plugin</a>&lt=
;/code>
+   <li><code><a href=3D#pluginarray>PluginArray</a&=
gt;</code>
+   <li><code><a href=3D#popstateevent>PopStateEvent&lt=
;/a></code>
+   <li><code><a href=3D#portcollection>PortCollection&=
lt;/a></code>
+   <li><code><a href=3D#propertynodelist>PropertyNodeL=
ist</a></code>
+   <li><code><a href=3D#radionodelist>RadioNodeList&lt=
;/a></code>
+   <li><code><a href=3D#relatedevent>RelatedEvent</=
a></code>
+   <li><code>Screen</code>, <a href=3D#Screen-parti=
al>partial</a>
+   <li><code><a href=3D#sharedworker>SharedWorker</=
a></code>
+   <li><code><a href=3D#sharedworkerglobalscope>Shared=
WorkerGlobalScope</a></code>
+   <li><code><a href=3D#storage-0>Storage</a>&lt=
;/code>
+   <li><code><a href=3D#storageevent>StorageEvent</=
a></code>
+   <li><code><a href=3D#textmetrics>TextMetrics</a&=
gt;</code>
+   <li><code><a href=3D#texttrack>TextTrack</a>&=
lt;/code>
+   <li><code><a href=3D#texttrackcue>TextTrackCue</=
a></code>
+   <li><code><a href=3D#texttrackcuelist>TextTrackCueL=
ist</a></code>
+   <li><code><a href=3D#texttracklist>TextTrackList&lt=
;/a></code>
+   <li><code><a href=3D#timeranges>TimeRanges</a&gt=
;</code>
+   <li><code><a href=3D#trackevent>TrackEvent</a&gt=
;</code>
+   <li><code><a href=3D#transferable>Transferable</=
a></code>
+   <li><code><a href=3D#validitystate>ValidityState&lt=
;/a></code>
+   <li><code><a href=3D#videotrack>VideoTrack</a&gt=
;</code>
+   <li><code><a href=3D#videotracklist>VideoTrackList&=
lt;/a></code>
+   <li><code><a href=3D#websocket>WebSocket</a>&=
lt;/code>
+   <li><code><a href=3D#window>Window</a></co=
de>, <a href=3D#Window-partial>partial</a>
+   <li><code><a href=3D#windowbase64>WindowBase64</=
a></code>
+   <li><code><a href=3D#windoweventhandlers>WindowEven=
tHandlers</a></code>
+   <li><code><a href=3D#windowlocalstorage>WindowLocal=
Storage</a></code>
+   <li><code><a href=3D#windowmodal>WindowModal</a&=
gt;</code>
+   <li><code><a href=3D#windowsessionstorage>WindowSes=
sionStorage</a></code>
+   <li><code><a href=3D#windowtimers>WindowTimers</=
a></code>
+   <li><code><a href=3D#worker>Worker</a></co=
de>
+   <li><code><a href=3D#workerglobalscope>WorkerGlobal=
Scope</a></code>, <a href=3D#WorkerGlobalScope-partial>=
partial</a>
+   <li><code><a href=3D#workerlocation>WorkerLocation&=
lt;/a></code>
+   <li><code><a href=3D#workernavigator>WorkerNavigato=
r</a></code>
+   <li><code>XMLDocument</code>, <a href=3D#xmldocu=
ment>partial</a>
+  </ul>
+
+
+
+
+  <h2 class=3Dno-num id=3Dreferences>References</h2><!--R=
EFS-->
+
+  <p>All references are normative unless marked "Non-normativ=
e".</p>
+
+  <!-- Dates are only included for standards older than the Web, beca=
use the newer ones keep changing. -->
+
+  <dl><dt id=3DrefsABNF>[ABNF]</dt>
+   <dd><cite><a href=3Dhttp://www.ietf.org/rfc/std/std68.=
txt>Augmented BNF for Syntax Specifications: ABNF</a></cite&g=
t;, D. Crocker, P. Overell. IETF.</dd>
+
+   <dt id=3DrefsABOUT>[ABOUT]</dt>
+   <dd><cite><a href=3Dhttp://tools.ietf.org/html/rfc6694=
>The 'about' URI scheme</a></cite>, S. Moonesamy. IETF.&lt=
;/dd>
+
+   <dt id=3DrefsAGIF>[AGIF]</dt>
+   <dd>(Non-normative) <cite><a href=3Dhttp://odur.let.ru=
g.nl/~kleiweg/gif/netscape.html>GIF Application Extension: NETSCAPE2.0=
</a></cite>. R. Frazier.</dd> <!-- (rather a dubious=
 reference; let me know if you know a better one) -->
+
+   <dt id=3DrefsAPNG>[APNG]</dt>
+   <dd>(Non-normative) <cite><a href=3Dhttps://wiki.mozil=
la.org/APNG_Specification>APNG Specification</a></cite>. S=
. Parmenter, V. Vukicevic, A. Smith. Mozilla.</dd>
+
+   <dt id=3DrefsARIA>[ARIA]</dt>
+   <dd><cite><a href=3Dhttp://www.w3.org/WAI/PF/aria/>=
Accessible Rich Internet Applications (WAI-ARIA)</a></cite>, =
J. Craig, M. Cooper, L. Pappas, R. Schwerdtfeger, L. Seeman. W3C.</dd&=
gt;
+
+   <dt id=3DrefsARIAIMPL>[ARIAIMPL]</dt>
+   <dd><cite><a href=3Dhttp://www.w3.org/WAI/PF/aria-impl=
ementation/>WAI-ARIA 1.0 User Agent Implementation Guide</a><=
/cite>, A. Snow-Weaver, M. Cooper. W3C.</dd>
+
+   <dt id=3DrefsATAG>[ATAG]</dt>
+   <dd>(Non-normative) <cite><a href=3Dhttp://www.w3.org/=
TR/ATAG20/>Authoring Tool Accessibility Guidelines (ATAG) 2.0</a&gt=
;</cite>, J. Richards, J. Spellman, J. Treviranus. W3C.</dd>
+
+   <dt id=3DrefsATOM>[ATOM]</dt>
+   <dd>(Non-normative) <cite><a href=3Dhttp://tools.ietf.=
org/html/rfc4287>The Atom Syndication Format</a></cite>, M=
. Nottingham, R. Sayre. IETF.</dd>
+
+   <dt id=3DrefsBCP47>[BCP47]</dt>
+   <dd><cite><a href=3Dhttp://www.ietf.org/rfc/bcp/bcp47.=
txt>Tags for Identifying Languages; Matching of Language Tags</a&gt=
;</cite>, A. Phillips, M. Davis. IETF.</dd>
+
+   <dt id=3DrefsBECSS>[BECSS]</dt>
+   <dd><cite><a href=3Dhttp://www.w3.org/TR/becss/>Beh=
avioral Extensions to CSS</a></cite>, I. Hickson. W3C.</dd=
>
+
+   <dt id=3DrefsBEZIER>[BEZIER]</dt>
+   <dd><cite>Courbes à poles</cite>, P. de =
Casteljau. INPI, 1959.</dd>
+
+   <dt id=3DrefsBIDI>[BIDI]</dt>
+   <dd><cite><a href=3Dhttp://www.unicode.org/reports/tr9=
/>UAX #9: Unicode Bidirectional Algorithm</a></cite>, M. D=
avis. Unicode Consortium.</dd>
+
+   <dt id=3DrefsBOCU1>[BOCU1]</dt>
+   <dd>(Non-normative) <cite><a href=3Dhttp://www.unicode=
.org/notes/tn6/>UTN #6: BOCU-1: MIME-Compatible Unicode Compression&lt=
;/a></cite>, M. Scherer, M. Davis. Unicode Consortium.</dd&gt=
;
+
+   <dt id=3DrefsCESU8>[CESU8]</dt>
+   <dd>(Non-normative) <cite><a href=3Dhttp://www.unicode=
.org/reports/tr26/>UTR #26: Compatibility Encoding Scheme For UTF-16: =
8-BIT (CESU-8)</a></cite>, T. Phipps. Unicode Consortium.<=
/dd>
+
+   <dt id=3DrefsCHARMOD>[CHARMOD]</dt>
+   <dd>(Non-normative) <cite><a href=3Dhttp://www.w3.org/=
TR/charmod/>Character Model for the World Wide Web 1.0: Fundamentals&l=
t;/a></cite>, M. Dürst, F. Yergeau, R. Ishida, M. Wolf,=
 T. Texin. W3C.</dd>
+
+   <dt id=3DrefsCLDR>[CLDR]</dt>
+   <dd><cite><a href=3Dhttp://cldr.unicode.org/>Unicod=
e Common Locale Data Repository</a></cite>. Unicode.</dd&g=
t;
+
+   <dt id=3DrefsCOMPOSITE>[COMPOSITE]</dt>
+   <dd><cite><a href=3Dhttp://dev.w3.org/fxtf/compositing=
/>Compositing and Blending</a></cite>. R. Cabanier, N. And=
ronikos. W3C.</dd>
+
+   <dt id=3DrefsCOMPUTABLE>[COMPUTABLE]</dt>
+   <dd>(Non-normative) <cite><a href=3Dhttp://www.turinga=
rchive.org/browse.php/B/12>On computable numbers, with an application =
to the Entscheidungsproblem</a></cite>, A. Turing. In <cit=
e>Proceedings of the London Mathematical Society</cite>, series =
2, volume 42, pages 230-265. London Mathematical Society, 1937.</dd&gt=
;
+
+   <dt id=3DrefsCOOKIES>[COOKIES]</dt>
+   <dd><cite><a href=3Dhttp://tools.ietf.org/html/rfc6265=
>HTTP State Management Mechanism</a></cite>, A. Barth. IET=
F.</dd>
+
+   <dt id=3DrefsCORS>[CORS]</dt>
+   <dd><cite><a href=3Dhttp://fetch.spec.whatwg.org/>C=
ross-Origin Resource Sharing</a></cite>, A. van Kesteren. WHA=
TWG.</dd>
+
+   <dt id=3DrefsCP50220>[CP50220]</dt>
+   <dd>(Non-normative) <cite><a href=3Dhttp://www.iana.or=
g/assignments/charset-reg/CP50220>CP50220</a></cite>, Y. N=
aruse. IANA.</dd> <!-- really should be "NARUSE, Y." o=
r some such, but there's a western bias to these references for consisten=
cy. sorry. -->
+
+   <dt id=3DrefsCSP>[CSP]</dt>
+   <dd>(Non-normative) <cite><a href=3Dhttp://dvcs.w3.org=
/hg/content-security-policy/raw-file/tip/csp-specification.dev.html>Co=
ntent Security Policy</a></cite>, B. Sterne, A. Barth. W3C.&l=
t;/dd>
+
+   <dt id=3DrefsCSS>[CSS]</dt>
+   <dd><cite><a href=3Dhttp://www.w3.org/TR/CSS2/>Casc=
ading Style Sheets Level 2 Revision 1</a></cite>, B. Bos, T. =
Çelik, I. Hickson, H. Lie. W3C.</dd>
+
+   <dt id=3DrefsCSSANIMATIONS>[CSSANIMATIONS]</dt>
+   <dd>(Non-normative) <cite><a href=3Dhttp://dev.w3.org/=
csswg/css3-animations/>CSS Animations</a></cite>, D. Jacks=
on, D. Hyatt, C. Marrin, S. Galineau, L. Baron. W3C.</dd>
+
+   <dt id=3DrefsCSSATTR>[CSSATTR]</dt>
+   <dd><cite><a href=3Dhttp://dev.w3.org/csswg/css-style-=
attr/>CSS Styling Attribute Syntax</a></cite>, T. &Cce=
dil;elik, E. Etemad. W3C.</dd>
+
+   <dt id=3DrefsCSSCOLOR>[CSSCOLOR]</dt>
+   <dd><cite><a href=3Dhttp://dev.w3.org/csswg/css3-color=
/>CSS Color Module Level 3</a></cite>, T. Çelik=
, C. Lilley, L. Baron. W3C.</dd>
+
+   <dt id=3DrefsCSSFONTLOAD>[CSSFONTLOAD]</dt>
+   <dd><cite><a href=3Dhttp://dev.w3.org/csswg/css-font-l=
oad-events/>CSS Font Load Events</a></cite>, J. Daggett. W=
3C.</dd>
+
+   <dt id=3DrefsCSSFONTS>[CSSFONTS]</dt>
+   <dd><cite><a href=3Dhttp://dev.w3.org/csswg/css3-fonts=
/>CSS Fonts</a></cite>, J. Daggett. W3C.</dd>
+
+   <dt id=3DrefsCSSIMAGES>[CSSIMAGES]</dt>
+   <dd><cite><a href=3Dhttp://dev.w3.org/csswg/css-images=
/>CSS Image Values and Replaced Content Module</a></cite>,=
 E. Etemad, T. Atkins. W3C.</dd>
+
+   <dt id=3DrefsCSSOM>[CSSOM]</dt>
+   <dd><cite><a href=3Dhttp://dev.w3.org/csswg/cssom/>=
Cascading Style Sheets Object Model (CSSOM)</a></cite>, S. Pi=
eters, G. Adams. W3C.</dd>
+
+   <dt id=3DrefsCSSOMVIEW>[CSSOMVIEW]</dt>
+   <dd><cite><a href=3Dhttp://dev.w3.org/csswg/cssom-view=
/>CSSOM View Module</a></cite>, S. Pieters, G. Adams. W3C.=
</dd>
+
+   <dt id=3DrefsCSSRUBY>[CSSRUBY]</dt>
+   <dd><cite><a href=3Dhttp://dev.w3.org/csswg/css3-ruby/=
>CSS3 Ruby Module</a></cite>, R. Ishida. W3C.</dd>
+
+   <dt id=3DrefsCSSTRANSITIONS>[CSSTRANSITIONS]</dt>
+   <dd>(Non-normative) <cite><a href=3Dhttp://dev.w3.org/=
csswg/css3-transitions/>CSS Transitions</a></cite>, D. Jac=
kson, D. Hyatt, C. Marrin, L. Baron. W3C.</dd>
+
+   <dt id=3DrefsCSSUI>[CSSUI]</dt>
+   <dd><cite><a href=3Dhttp://dev.w3.org/csswg/css3-ui/&g=
t;CSS3 Basic User Interface Module</a></cite>, T. &Ccedil=
;elik. W3C.</dd>
+
+   <!-- one day this reference will exist! then we can update this! -=
->
+   <dt id=3DrefsCSSSCOPED>[CSSSCOPED]</dt>
+   <dd><cite>CSS Scoped Style Sheets</cite>, T. Atkins=
. Your Imagination.</dd>
+
+   <dt id=3DrefsCSSVALUES>[CSSVALUES]</dt>
+   <dd><cite><a href=3Dhttp://dev.w3.org/csswg/css3-value=
s/>CSS3 Values and Units</a></cite>, H. Lie, T. Atkins, E.=
 Etemad. W3C.</dd>
+
+   <dt id=3DrefsCUSTOM>[CUSTOM]</dt>
+   <dd><cite><a href=3Dhttp://w3c.github.io/webcomponents=
/spec/custom/>Custom Elements</a></cite>, D. Glazkov. W3C.=
</dd>
+
+   <dt id=3DrefsDASH>[DASH]</dt>
+   <dd><cite><a href=3D"http://www.iso.org/iso/iso_c=
atalogue/catalogue_tc/catalogue_detail.htm?csnumber=3D57623">Dyna=
mic adaptive streaming over HTTP (DASH)</a></cite>. ISO.</=
dd>
+
+   <dt id=3DrefsDOM>[DOM]</dt>
+   <dd><cite><a href=3Dhttp://dom.spec.whatwg.org/>DOM=
</a></cite>, A. van Kesteren, A. Gregor, Ms2ger. WHATWG.</=
dd>
+
+   <dt id=3DrefsDOMEVENTS>[DOMEVENTS]</dt>
+   <dd><cite><a href=3Dhttp://dev.w3.org/2006/webapi/DOM-=
Level-3-Events/html/DOM3-Events.html>Document Object Model (DOM) Level=
 3 Events Specification</a></cite>, T. Leithead, J. Rossi, D.=
 Schepers, B. Höhrmann, P. Le Hégaret, T. Pixley. W3C=
.</dd>
+
+   <dt id=3DrefsDOMPARSING>[DOMPARSING]</dt>
+   <dd><cite><a href=3Dhttp://domparsing.spec.whatwg.org/=
>DOM Parsing and Serialization</a></cite>, Ms2ger. WHATWG.=
</dd>
+
+   <dt id=3DrefsDOT>[DOT]</dt>
+   <dd>(Non-normative) <cite><a href=3Dhttp://www.graphvi=
z.org/content/dot-language>The DOT Language</a></cite>. Gr=
aphviz.</dd>
+
+   <dt id=3DrefsE163>[E163]</dt>
+   <dd><cite>Recommendation E.163 — Numbering Plan=
 for The International Telephone Service</cite>, CCITT Blue Book, F=
ascicle II.2, pp. 128-134, November 1988.</dd>
+
+   <dt id=3DrefsECMA262>[ECMA262]</dt>
+   <dd><cite><a href=3Dhttp://www.ecma-international.org/=
publications/standards/Ecma-262.htm>ECMAScript Language Specification&=
lt;/a></cite>. ECMA.</dd>
+
+   <dt id=3DrefsECMA357>[ECMA357]</dt>
+   <dd>(Non-normative) <cite><a href=3Dhttp://www.ecma-in=
ternational.org/publications/standards/Ecma-357.htm>ECMAScript for XML=
 (E4X) Specification</a></cite>. ECMA.</dd>
+
+   <dt id=3DrefsEDITING>[EDITING]</dt>
+   <dd><cite><a href=3Dhttp://dvcs.w3.org/hg/editing/raw-=
file/tip/editing.html>HTML Editing APIs</a></cite>, A. Gre=
gor. W3C Editing APIs CG.</dd>
+
+   <dt id=3DrefsENCODING>[ENCODING]</dt>
+   <dd><cite><a href=3Dhttp://encoding.spec.whatwg.org/&g=
t;Encoding</a></cite>, A. van Kesteren, J. Bell. WHATWG.</=
dd>
+
+   <dt id=3DrefsFILEAPI>[FILEAPI]</dt>
+   <dd><cite><a href=3Dhttp://dev.w3.org/2006/webapi/File=
Upload/publish/FileAPI.html>File API</a></cite>, A. Rangan=
athan. W3C.</dd>
+
+   <dt id=3DrefsFULLSCREEN>[FULLSCREEN]</dt>
+   <dd><cite><a href=3Dhttp://fullscreen.spec.whatwg.org/=
>Fullscreen</a></cite>, A. van Kesteren, T. Çel=
ik. WHATWG.</dd>
+
+   <dt id=3DrefsGIF>[GIF]</dt>
+   <dd>(Non-normative) <cite><a href=3Dhttp://www.w3.org/=
Graphics/GIF/spec-gif89a.txt>Graphics Interchange Format</a><=
/cite>. CompuServe.</dd>
+
+   <dt id=3DrefsGRAPHICS>[GRAPHICS]</dt>
+   <dd>(Non-normative) <cite>Computer Graphics: Principles a=
nd Practice in C</cite>, Second Edition, J. Foley, A. van Dam, S. F=
einer, J. Hughes. Addison-Wesley. ISBN 0-201-84840-6.</dd>
+   <!--
+   This book ("Computer Graphics: Principles and Practice in C&quot=
;)
+   apparently does not make any references to literature in the
+   bibliographic section to define the "even-odd" rule for pol=
ygon
+   filling and hit testing. In the absence of such a reference, I
+   guess that this book is the most authoritative reference.
+   -->
+
+   <dt id=3DrefsGREGORIAN>[GREGORIAN]</dt>
+   <dd>(Non-normative) <cite>Inter Gravissimas</cite>,=
 A. Lilius, C. Clavius. Gregory XIII Papal Bull, February 1582.</dd&gt=
;
+
+   <dt id=3DrefsHTTP>[HTTP]</dt>
+   <dd><cite><a href=3Dhttp://tools.ietf.org/html/rfc2616=
>Hypertext Transfer Protocol — HTTP/1.1</a></cite&g=
t;, R. Fielding, J. Gettys, J. Mogul, H.  Frystyk, L. Masinter, P. Leach,=
 T. Berners-Lee. IETF.</dd>
+
+   <dt id=3DrefsHTTPS>[HTTPS]</dt>
+   <dd>(Non-normative) <cite><a href=3Dhttp://tools.ietf.=
org/html/rfc2818>HTTP Over TLS</a></cite>, E. Rescorla. IE=
TF.</dd>
+
+   <dt id=3DrefsIANAPERMHEADERS>[IANAPERMHEADERS]</dt>
+   <dd><cite><a href=3Dhttp://www.iana.org/assignments/me=
ssage-headers/perm-headers.html>Permanent Message Header Field Names&l=
t;/a></cite>. IANA.</dd>
+
+   <dt id=3DrefsISO3166>[ISO3166]</dt>
+   <dd><cite><a href=3Dhttp://www.iso.org/iso/home/standa=
rds/country_codes.htm>ISO 3166: Codes for the representation of names =
of countries and their subdivisions</a></cite>. ISO.</dd&g=
t;
+
+   <dt id=3DrefsISO8601>[ISO8601]</dt>
+   <dd>(Non-normative) <cite><a href=3D"http://isotc=
.iso.org/livelink/livelink/4021199/ISO_8601_2004_E.zip?func=3Ddoc.Fetch&a=
mp;amp;nodeid=3D4021199">ISO8601: Data elements and interchange f=
ormats — Information interchange — Representation of =
dates and times</a></cite>. ISO.</dd>
+
+   <dt id=3DrefsJLREQ>[JLREQ]</dt>
+   <dd><cite><a href=3Dhttp://www.w3.org/TR/jlreq/>Req=
uirements for Japanese Text Layout</a></cite>. W3C.</dd&gt=
; <!-- too many editors to list -->
+
+   <dt id=3DrefsJPEG>[JPEG]</dt>
+   <dd><cite><a href=3Dhttp://www.w3.org/Graphics/JPEG/jf=
if3.pdf>JPEG File Interchange Format</a></cite>, E. Hamilt=
on.</dd>
+
+   <dt id=3DrefsJSON>[JSON]</dt>
+   <dd><cite><a href=3Dhttp://tools.ietf.org/html/rfc4627=
>The application/json Media Type for JavaScript Object Notation (JSON)=
</a></cite>, D. Crockford. IETF.</dd>
+
+   <dt id=3DrefsJSURL>[JSURL]</dt>
+   <dd><cite><a href=3Dhttp://tools.ietf.org/html/draft-h=
oehrmann-javascript-scheme>The 'javascript' resource identifier scheme=
</a></cite>, B. Höhrmann. IETF.
+   <!-- Sadly this reference has been dead for a while. Unfortunately=
 it's the closest thing we current have to a spec. -->
+   </dd>
+
+   <dt id=3DrefsMAILTO>[MAILTO]</dt>
+   <dd>(Non-normative) <cite><a href=3Dhttp://tools.ietf.=
org/html/rfc6068>The 'mailto' URI scheme</a></cite>, M. Du=
erst, L. Masinter, J. Zawinski. IETF.</dd>
+
+   <dt id=3DrefsMATHML>[MATHML]</dt>
+   <dd><cite><a href=3Dhttp://www.w3.org/TR/MathML/>Ma=
thematical Markup Language (MathML)</a></cite>, D. Carlisle, =
P. Ion, R. Miner, N. Poppelier. W3C.</dd>
+
+   <dt id=3DrefsMEDIAFRAG>[MEDIAFRAG]</dt>
+   <dd><cite><a href=3Dhttp://www.w3.org/2008/WebVideo/Fr=
agments/WD-media-fragments-spec/>Media Fragments URI</a></cit=
e>, R. Troncy, E. Mannens, S. Pfeiffer, D. Van Deursen. W3C.</dd&gt=
;
+
+   <dt id=3DrefsMFREL>[MFREL]</dt>
+   <dd><cite><a href=3Dhttp://microformats.org/wiki/exist=
ing-rel-values#HTML5_link_type_extensions>Microformats Wiki: existing =
rel values</a></cite>. Microformats.</dd>
+
+   <dt id=3DrefsMIMESNIFF>[MIMESNIFF]</dt>
+   <dd><cite><a href=3Dhttp://mimesniff.spec.whatwg.org/&=
gt;MIME Sniffing</a></cite>, G. Hemsley. WHATWG.</dd>
+
+   <dt id=3DrefsMNG>[MNG]</dt>
+   <dd><cite><a href=3Dhttp://www.libpng.org/pub/mng/spec=
/>MNG (Multiple-image Network Graphics) Format</a></cite>.=
 G. Randers-Pehrson.</dd>
+
+   <dt id=3DrefsMPEG2>[MPEG2]</dt>
+   <dd><cite>ISO/IEC 13818-1: Information technology &md=
ash; Generic coding of moving pictures and associated audio information: =
Systems</cite>. ISO/IEC.</dd>
+   <!-- search for ["bytes are removed from this buffer at a rat=
e defined by sb_leak_rate"] to find it -->
+
+   <dt id=3DrefsMPEG4>[MPEG4]</dt>
+   <dd><cite>ISO/IEC 14496-12: ISO base media file format&lt=
;/cite>. ISO/IEC.</dd>
+   <!-- search for ["Box Structure was and subsequent clauses we=
re re-organized"] to find it -->
+
+   <dt id=3DrefsMQ>[MQ]</dt>
+   <dd><cite><a href=3Dhttp://dev.w3.org/csswg/css3-media=
queries/>Media Queries</a></cite>, H. Lie, T.  &Ccedil=
;elik, D. Glazman, A. van Kesteren. W3C.</dd>
+
+   <dt id=3DrefsNPAPI>[NPAPI]</dt>
+   <dd>(Non-normative) <cite><a href=3Dhttps://developer.=
mozilla.org/en/Gecko_Plugin_API_Reference>Gecko Plugin API Reference&l=
t;/a></cite>. Mozilla.</dd>
+
+   <dt id=3DrefsOGGSKELETONHEADERS>[OGGSKELETONHEADERS]</dt>
+   <dd><cite><a href=3Dhttp://wiki.xiph.org/SkeletonHeade=
rs>SkeletonHeaders</a></cite>. Xiph.Org.</dd>
+
+   <dt id=3DrefsOPENSEARCH>[OPENSEARCH]</dt>
+   <dd><cite><a href=3Dhttp://www.opensearch.org/Specific=
ations/OpenSearch/1.1#Autodiscovery_in_HTML.2FXHTML>Autodiscovery in H=
TML/XHTML</a></cite>. In <cite>OpenSearch 1.1 Draft 4&l=
t;/cite>, Section 4.6.2. OpenSearch.org.</dd>
+
+   <dt id=3DrefsORIGIN>[ORIGIN]</dt>
+   <dd><cite><a href=3Dhttp://tools.ietf.org/html/rfc6454=
>The Web Origin Concept</a></cite>, A. Barth. IETF.</dd=
>  =20
+
+   <dt id=3DrefsPAGEVIS>[PAGEVIS]</dt>
+   <dd>(Non-normative) <cite><a href=3Dhttp://www.w3c-tes=
t.org/webperf/specs/PageVisibility/>Page Visibility</a></cite=
>, J. Mann, A. Jain. W3C.</dd>  =20
+
+   <dt id=3DrefsPDF>[PDF]</dt>
+   <dd>(Non-normative) <cite><a href=3Dhttp://www.adobe.c=
om/devnet/acrobat/pdfs/PDF32000_2008.pdf>Document management &mdas=
h; Portable document format — Part 1: PDF</a></cite&gt=
;. ISO.</dd>  =20
+
+   <dt id=3DrefsPINGBACK>[PINGBACK]</dt>
+   <dd><cite><a href=3Dhttp://www.hixie.ch/specs/pingback=
/pingback>Pingback 1.0</a></cite>, S. Langridge, I. Hickso=
n.</dd>
+
+   <dt id=3DrefsPNG>[PNG]</dt>
+   <dd><cite><a href=3Dhttp://www.w3.org/TR/PNG/>Porta=
ble Network Graphics (PNG) Specification</a></cite>, D. Duce.=
 W3C.</dd>
+
+   <dt id=3DrefsPOINTERLOCK>[POINTERLOCK]</dt>
+   <dd><cite><a href=3Dhttp://dvcs.w3.org/hg/pointerlock/=
raw-file/default/index.html>Pointer Lock</a></cite>, V. Sc=
heib. W3C.</dd>
+
+   <dt id=3DrefsPPUTF8>[PPUTF8]</dt>
+   <dd>(Non-normative) <cite><a href=3Dhttp://www.sw.it.a=
oyama.ac.jp/2012/pub/IUC11-UTF-8.pdf>The Properties and Promises <!=
-- Promizes (sic) --> of UTF-8</a></cite>, M. Dür=
st. University of Zürich. In <cite>Proceedings of the 11th=
 International Unicode Conference</cite>.</dd>
+
+   <dt id=3DrefsPSL>[PSL]</dt>
+   <dd><cite><a href=3Dhttp://publicsuffix.org/>Public=
 Suffix List</a></cite>.
+   Mozilla Foundation.</dd>
+
+   <dt id=3DrefsRFC1034>[RFC1034]</dt>
+   <dd><cite><a href=3Dhttp://tools.ietf.org/html/rfc1034=
>Domain Names - Concepts and Facilities</a></cite>, P. Moc=
kapetris. IETF, November 1987.</dd>
+
+   <dt id=3DrefsRFC1123>[RFC1123]</dt>
+   <dd><cite><a href=3Dhttp://tools.ietf.org/html/rfc1123=
>Requirements for Internet Hosts -- Application and Support</a>&=
lt;/cite>, R. Braden. IETF, October 1989.</dd>
+
+   <dt id=3DrefsRFC1345>[RFC1345]</dt>
+   <dd>(Non-normative) <cite><a href=3Dhttp://tools.ietf.=
org/html/rfc1345>Character Mnemonics and Character Sets</a></=
cite>, K. Simonsen. IETF.</dd>
+
+   <dt id=3DrefsRFC1468>[RFC1468]</dt>
+   <dd>(Non-normative) <cite><a href=3Dhttp://tools.ietf.=
org/html/rfc1468>Japanese Character Encoding for Internet Messages<=
/a></cite>, J. Murai, M. Crispin, E. van der Poel. IETF.</dd&=
gt;
+
+   <dt id=3DrefsRFC1554>[RFC1554]</dt>
+   <dd>(Non-normative) <cite><a href=3Dhttp://tools.ietf.=
org/html/rfc1554>ISO-2022-JP-2: Multilingual Extension of ISO-2022-JP&=
lt;/a></cite>, M. Ohta, K. Handa. IETF.</dd>
+
+   <dt id=3DrefsRFC1557>[RFC1557]</dt>
+   <dd>(Non-normative) <cite><a href=3Dhttp://tools.ietf.=
org/html/rfc1557>Korean Character Encoding for Internet Messages</a=
></cite>, U. Choi, K. Chon, H. Park. IETF.</dd>
+
+   <dt id=3DrefsRFC1842>[RFC1842]</dt>
+   <dd>(Non-normative) <cite><a href=3Dhttp://tools.ietf.=
org/html/rfc1842>ASCII Printable Characters-Based Chinese Character En=
coding for Internet Messages</a></cite>, Y. Wei, Y. Zhang, J.=
 Li, J. Ding, Y. Jiang. IETF.</dd>
+
+   <dt id=3DrefsRFC1922>[RFC1922]</dt>
+   <dd>(Non-normative) <cite><a href=3Dhttp://tools.ietf.=
org/html/rfc1922>Chinese Character Encoding for Internet Messages</=
a></cite>, HF. Zhu, DY. Hu, ZG. Wang, TC. Kao, WCH. Chang, M. Cr=
ispin. IETF.</dd>
+
+   <dt id=3DrefsRFC2046>[RFC2046]</dt>
+   <dd><cite><a href=3Dhttp://tools.ietf.org/html/rfc2046=
>Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types&lt=
;/a></cite>, N. Freed, N.  Borenstein. IETF.</dd> <!-- =
for text/plain and "Internet Media type"; not for definition of=
 "valid MIME type". -->
+
+   <dt id=3DrefsRFC2119>[RFC2119]</dt>
+   <dd><cite><a href=3Dhttp://tools.ietf.org/html/rfc2119=
>Key words for use in RFCs to Indicate Requirement Levels</a>&lt=
;/cite>, S. Bradner. IETF.</dd>
+
+   <dt id=3DrefsRFC2237>[RFC2237]</dt>
+   <dd>(Non-normative) <cite><a href=3Dhttp://tools.ietf.=
org/html/rfc2237>Japanese Character Encoding for Internet Messages<=
/a></cite>, K. Tamaru. IETF.</dd>
+
+   <dt id=3DrefsRFC2313>[RFC2313]</dt>
+   <dd><cite><a href=3Dhttp://tools.ietf.org/html/rfc2313=
>PKCS #1: RSA Encryption</a></cite>, B. Kaliski. IETF.<=
/dd>
+
+   <dt id=3DrefsRFC2318>[RFC2318]</dt>
+   <dd><cite><a href=3Dhttp://tools.ietf.org/html/rfc2318=
>The text/css Media Type</a></cite>, H. Lie, B. Bos, C. Li=
lley. IETF.</dd>
+
+   <dt id=3DrefsRFC2388>[RFC2388]</dt>
+   <dd><cite><a href=3Dhttp://tools.ietf.org/html/rfc2388=
>Returning Values from Forms: multipart/form-data</a></cite&g=
t;, L. Masinter. IETF.</dd>
+
+   <dt id=3DrefsRFC2397>[RFC2397]</dt>
+   <dd><cite><a href=3Dhttp://tools.ietf.org/html/rfc2397=
>The "data" URL scheme</a></cite>, L. Masinter. =
IETF.</dd>
+
+   <dt id=3DrefsRFC2445>[RFC2445]</dt>
+   <dd><cite><a href=3Dhttp://tools.ietf.org/html/rfc2445=
>Internet Calendaring and Scheduling Core Object Specification (iCalen=
dar)</a></cite>, F. Dawson, D. Stenerson. IETF.</dd>
+
+   <dt id=3DrefsRFC2483>[RFC2483]</dt>
+   <dd><cite><a href=3Dhttp://tools.ietf.org/html/rfc2483=
>URI Resolution Services Necessary for URN Resolution</a></ci=
te>, M. Mealling, R. Daniel. IETF.</dd>
+
+   <dt id=3DrefsRFC3676>[RFC3676]</dt>
+   <dd><cite><a href=3Dhttp://tools.ietf.org/html/rfc3676=
>The Text/Plain Format and DelSp Parameters</a></cite>, R.=
 Gellens. IETF.</dd>
+
+   <dt id=3DrefsRFC3023>[RFC3023]</dt>
+   <dd><cite><a href=3Dhttp://tools.ietf.org/html/rfc3023=
>XML Media Types</a></cite>, M. Murata, S. St. Laurent, D.=
 Kohn. IETF.</dd>
+
+   <dt id=3DrefsRFC3279>[RFC3279]</dt>
+   <dd><cite><a href=3Dhttp://tools.ietf.org/html/rfc3279=
>Algorithms and Identifiers for the Internet X.509 Public Key Infrastr=
ucture Certificate and Certificate Revocation List (CRL) Profile</a&gt=
;</cite>, W. Polk, R. Housley, L. Bassham. IETF.</dd>
+
+   <dt id=3DrefsRFC3490>[RFC3490]</dt>
+   <dd><cite><a href=3Dhttp://tools.ietf.org/html/rfc3490=
>Internationalizing Domain Names in Applications (IDNA)</a></=
cite>, P. Faltstrom, P. Hoffman, A. Costello. IETF.</dd>
+
+   <dt id=3DrefsRFC3629>[RFC3629]</dt>
+   <dd><cite><a href=3Dhttp://tools.ietf.org/html/rfc3629=
>UTF-8, a transformation format of ISO 10646</a></cite>, F=
. Yergeau. IETF.</dd>
+
+   <dt id=3DrefsRFC3864>[RFC3864]</dt>
+   <dd><cite><a href=3Dhttp://tools.ietf.org/html/rfc3864=
>Registration Procedures for Message Header Fields</a></cite&=
gt;, G. Klyne, M. Nottingham, J. Mogul. IETF.</dd>
+
+   <dt id=3DrefsRFC4281>[RFC4281]</dt>
+   <dd><cite><a href=3Dhttp://tools.ietf.org/html/rfc4281=
>The Codecs Parameter for "Bucket" Media Types</a><=
/cite>, R. Gellens, D. Singer, P. Frojdh. IETF.</dd>
+
+   <dt id=3DrefsRFC4329>[RFC4329]</dt>
+   <dd>(Non-normative) <cite><a href=3Dhttp://tools.ietf.=
org/html/rfc4329>Scripting Media Types</a></cite>, B. H&am=
p;ouml;hrmann. IETF.</dd>
+
+   <dt id=3DrefsRFC4395>[RFC4395]</dt>
+   <dd><cite><a href=3Dhttp://tools.ietf.org/html/rfc4395=
>Guidelines and Registration Procedures for New URI Schemes</a>&=
lt;/cite>, T. Hansen, T. Hardie, L. Masinter. IETF.</dd>
+
+   <dt id=3DrefsRFC4648>[RFC4648]</dt>
+   <dd><cite><a href=3Dhttp://tools.ietf.org/html/rfc4648=
>The Base16, Base32, and Base64 Data Encodings</a></cite>,=
 S. Josefsson. IETF.</dd>
+
+   <dt id=3DrefsRFC5280>[RFC5280]</dt>
+   <dd><cite><a href=3Dhttp://tools.ietf.org/html/rfc5280=
>Internet X.509 Public Key Infrastructure Certificate and Certificate =
Revocation List (CRL) Profile</a></cite>, D. Cooper, S. Sante=
sson, S. Farrell, S. Boeyen, R. Housley, W. Polk. IETF.</dd>
+
+   <dt id=3DrefsRFC5322>[RFC5322]</dt>
+   <dd><cite><a href=3Dhttp://tools.ietf.org/html/rfc5322=
>Internet Message Format</a></cite>, P. Resnick. IETF.<=
/dd>
+
+   <dt id=3DrefsRFC5724>[RFC5724]</dt>
+   <dd><cite><a href=3Dhttp://tools.ietf.org/html/rfc5724=
>URI Scheme for Global System for Mobile Communications (GSM) Short Me=
ssage Service (SMS)</a></cite>, E. Wilde, A. Vaha-Sipila. IET=
F.</dd>
+
+   <dt id=3DrefsRFC6266>[RFC6266]</dt>
+   <dd><cite><a href=3Dhttp://tools.ietf.org/html/rfc6266=
>Use of the Content-Disposition Header Field in the Hypertext Transfer=
 Protocol (HTTP)</a></cite>, J. Reschke. IETF.</dd>
+
+   <dt id=3DrefsRFC6350>[RFC6350]</dt>
+   <dd><cite><a href=3Dhttp://tools.ietf.org/html/rfc6350=
>vCard Format Specification</a></cite>, S. Perreault. IETF=
.</dd>
+
+   <dt id=3DrefsSCSU>[SCSU]</dt>
+   <dd>(Non-normative) <cite><a href=3Dhttp://www.unicode=
.org/reports/tr6/>UTR #6: A Standard Compression Scheme For Unicode&lt=
;/a></cite>, M. Wolf, K. Whistler, C. Wicksteed, M. Davis, A. Fr=
eytag, M. Scherer. Unicode Consortium.</dd>
+
+   <dt id=3DrefsSELECTORS>[SELECTORS]</dt>
+   <dd><cite><a href=3Dhttp://dev.w3.org/csswg/selectors/=
>Selectors</a></cite>, E. Etemad, T. Çelik, D. =
Glazman, I. Hickson, P. Linss, J. Williams. W3C.</dd>
+
+   <dt id=3DrefsSRGB>[SRGB]</dt>
+   <dd><cite lang=3Den-GB><a href=3D"http://webstore=
.iec.ch/webstore/webstore.nsf/artnum/025408!OpenDocument&Click=3D=
">IEC 61966-2-1: Multimedia systems and equipment — Col=
our measurement and management — Part 2-1: Colour management &a=
mp;mdash; Default RGB colour space — sRGB</a></cite&gt=
;. IEC.</dd>
+
+   <dt id=3DrefsSVG>[SVG]</dt>
+   <dd><cite><a href=3Dhttp://www.w3.org/TR/SVGTiny12/&gt=
;Scalable Vector Graphics (SVG) Tiny 1.2 Specification</a></cite=
>, O. Andersson, R. Berjon, E. Dahlström, A. Emmons, J. Ferra=
iolo, A. Grasso, V. Hardy, S. Hayman, D. Jackson, C. Lilley, C. McCormack=
, A. Neumann, C. Northway, A. Quint, N. Ramani, D. Schepers, A. Shellshea=
r. W3C.</dd>
+
+   <dt id=3DrefsTOR>[TOR]</dt>
+   <dd>(Non-normative) <cite><a href=3Dhttps://www.torpro=
ject.org/>Tor</a></cite>.</dd>
+
+   <dt id=3DrefsTYPEDARRAY>[TYPEDARRAY]</dt>
+   <dd><cite><a href=3Dhttp://www.khronos.org/registry/ty=
pedarray/specs/latest/>Typed Array Specification</a></cite&gt=
;, D. Herman, K. Russell. Khronos.</dd>
+
+   <dt id=3DrefsTZDATABASE>[TZDATABASE]</dt>
+   <dd>(Non-normative) <cite><a href=3Dhttp://www.iana.or=
g/time-zones>Time Zone Database</a></cite>. IANA.</dd&g=
t;
+
+   <dt id=3DrefsUAAG>[UAAG]</dt>
+   <dd>(Non-normative) <cite><a href=3Dhttp://www.w3.org/=
TR/UAAG20/>User Agent Accessibility Guidelines (UAAG) 2.0</a>&lt=
;/cite>, J. Allan, K. Ford, J. Richards, J. Spellman. W3C.</dd>
+
+   <dt id=3DrefsUCA>[UCA]</dt>
+   <dd><cite><a href=3Dhttp://www.unicode.org/reports/tr1=
0/>UTR #10: Unicode Collation Algorithm</a></cite>, M. Dav=
is, K. Whistler. Unicode Consortium.</dd>
+
+   <dt id=3DrefsUNDO>[UNDO]</dt>
+   <dd><cite><a href=3Dhttp://rniwa.com/editing/undomanag=
er.html>UndoManager and DOM Transaction</a></cite>, R. Niw=
a.</dd>
+
+   <dt id=3DrefsUNICODE>[UNICODE]</dt>
+   <dd><cite><a href=3Dhttp://www.unicode.org/versions/&g=
t;The Unicode Standard</a></cite>. Unicode Consortium.</dd=
>
+
+   <dt id=3DrefsUNIVCHARDET>[UNIVCHARDET]</dt>
+   <dd>(Non-normative) <cite><a href=3Dhttp://www.mozilla=
.org/projects/intl/UniversalCharsetDetection.html>A composite approach=
 to language/encoding detection</a></cite>, S. Li, K. Momoi. =
Netscape. In <cite>Proceedings of the 19th International Unicode Co=
nference</cite>.</dd>
+
+   <dt id=3DrefsURL>[URL]</dt>
+   <dd><cite><a href=3Dhttp://url.spec.whatwg.org/>URL=
</a></cite>, A. van Kesteren. WHATWG.</dd>
+
+   <dt id=3DrefsUTF7>[UTF7]</dt>
+   <dd>(Non-normative) <cite><a href=3Dhttp://tools.ietf.=
org/html/rfc2152>UTF-7: A Mail-Safe Transformation Format of Unicode&l=
t;/a></cite>, D. Goldsmith, M. Davis. IETF.</dd>
+
+   <dt id=3DrefsUTF8DET>[UTF8DET]</dt>
+   <dd>(Non-normative) <cite><a href=3Dhttp://www.w3.org/=
International/questions/qa-forms-utf-8>Multilingual form encoding</=
a></cite>, M. Dürst. W3C.</dd>
+
+   <dt id=3DrefsUTR36>[UTR36]</dt>
+   <dd>(Non-normative) <cite><a href=3Dhttp://www.unicode=
.org/reports/tr36/>UTR #36: Unicode Security Considerations</a>&=
lt;/cite>, M. Davis, M. Suignard. Unicode Consortium.</dd>
+
+   <dt id=3DrefsWCAG>[WCAG]</dt>
+   <dd>(Non-normative) <cite><a href=3Dhttp://www.w3.org/=
TR/WCAG20/>Web Content Accessibility Guidelines (WCAG) 2.0</a>&l=
t;/cite>, B. Caldwell, M. Cooper, L. Reid, G. Vanderheiden. W3C.</d=
d>
+
+   <dt id=3DrefsWEBGL>[WEBGL]</dt>
+   <dd><cite><a href=3Dhttp://www.khronos.org/registry/we=
bgl/specs/latest/>WebGL Specification</a></cite>, D. Jacks=
on. Khronos Group.</dd>
+
+   <dt id=3DrefsWEBIDL>[WEBIDL]</dt>
+   <dd><cite><a href=3Dhttp://dev.w3.org/2006/webapi/WebI=
DL/>Web IDL</a></cite>, C. McCormack. W3C.</dd>
+
+   <dt id=3DrefsWEBLINK>[WEBLINK]</dt>
+   <dd><cite><a href=3Dhttp://tools.ietf.org/html/rfc5988=
>Web Linking</a></cite>, M. Nottingham. IETF.</dd>
+
+   <dt id=3DrefsWEBMCG>[WEBMCG]</dt>
+   <dd><cite><a href=3Dhttp://www.webmproject.org/code/sp=
ecs/container/>WebM Container Guidelines</a></cite>. The W=
ebM Project.</dd>
+
+   <dt id=3DrefsWEBVTT>[WEBVTT]</dt>
+   <dd><cite><a href=3Dhttp://dev.w3.org/html5/webvtt/&gt=
;WebVTT</a></cite>, I. Hickson. W3C.</dd>
+
+   <dt id=3DrefsWHATWGWIKI>[WHATWGWIKI]</dt>
+   <dd><cite><a href=3Dhttp://wiki.whatwg.org/>The WHA=
TWG Wiki</a></cite>. WHATWG.</dd>
+
+   <dt id=3DrefsWSP>[WSP]</dt>
+   <dd><cite><a href=3Dhttp://tools.ietf.org/html/rfc6455=
>The WebSocket protocol</a></cite>, I. Fette, A. Melnikov.=
 IETF.</dd>
+
+   <dt id=3DrefsX121>[X121]</dt>
+   <dd><cite>Recommendation X.121 — International =
Numbering Plan for Public Data Networks</cite>, CCITT Blue Book, Fa=
scicle VIII.3, pp. 317-332.</dd>
+
+   <dt id=3DrefsX690>[X690]</dt>
+   <dd><cite><a href=3Dhttp://www.itu.int/ITU-T/studygrou=
ps/com17/languages/X.690-0207.pdf>Recommendation X.690 — Inf=
ormation Technology — ASN.1 Encoding Rules — Specific=
ation of Basic Encoding Rules (BER), Canonical Encoding Rules (CER), and =
Distinguished Encoding Rules (DER)</a></cite>. International =
Telecommunication Union.</dd>
+
+   <dt id=3DrefsXFN>[XFN]</dt>
+   <dd><cite><a href=3Dhttp://gmpg.org/xfn/11>XFN 1.1 =
profile</a></cite>, T. Çelik, M. Mullenweg, E. Mey=
er. GMPG.</dd>
+
+   <dt id=3DrefsXHR>[XHR]</dt>
+   <dd><cite><a href=3Dhttp://xhr.spec.whatwg.org/>&lt=
;code>XMLHttpRequest</code></a></cite>, A. van Keste=
ren. WHATWG.</dd>
+
+   <dt id=3DrefsXML>[XML]</dt>
+   <dd><cite><a href=3Dhttp://www.w3.org/TR/xml/>Exten=
sible Markup Language</a></cite>, T. Bray, J. Paoli, C. Sperb=
erg-McQueen, E. Maler, F. Yergeau. W3C.</dd>
+
+   <dt id=3DrefsXMLBASE>[XMLBASE]</dt>
+   <dd><cite><a href=3Dhttp://www.w3.org/TR/xmlbase/>X=
ML Base</a></cite>, J. Marsh, R. Tobin. W3C.</dd>
+
+   <dt id=3DrefsXMLNS>[XMLNS]</dt>
+   <dd><cite><a href=3Dhttp://www.w3.org/TR/xml-names/&gt=
;Namespaces in XML</a></cite>, T. Bray, D. Hollander, A. Laym=
an, R. Tobin. W3C.</dd>
+
+   <dt id=3DrefsXPATH10>[XPATH10]</dt>
+   <dd><cite><a href=3Dhttp://www.w3.org/TR/1999/REC-xpat=
h-19991116>XML Path Language (XPath) Version 1.0</a></cite&gt=
;, J. Clark, S. DeRose. W3C.</dd>
+
+   <dt id=3DrefsXSLT10>[XSLT10]</dt>
+   <dd>(Non-normative) <cite><a href=3Dhttp://www.w3.org/=
TR/1999/REC-xslt-19991116>XSL Transformations (XSLT) Version 1.0</a=
></cite>, J. Clark. W3C.</dd>
+
+<!--(once XSLTProcessor is defined somewhere, update this and the pla=
ce that references this)
+   <dt id=3D"refsXSLTP">[XSLTP]</dt>
+   <dd>(Non-normative) <cite><a href=3D"">&l=
t;/a></cite>, . .</dd>
+-->
+
+  </dl><h2 class=3Dno-num id=3Dacknowledgments>Acknowledgmen=
ts</h2> <!-- ACKS -->
+
+  <p>Thanks to Tim Berners-Lee for inventing HTML, without which n=
one
+  of this would exist.</p>
+
+  <p>Thanks to
+
+  Aankhen,
+  Aaron Boodman,
+  Aaron Leventhal,
+  Adam Barth,
+  Adam de Boor,
+  Adam Hepton,
+  Adam Klein,
+  Adam Roben,
+  Addison Phillips,
+  Adele Peterson,
+  Adrian Bateman,
+  Adrian Sutton,
+  Agustín Fernández,
+  Aharon (Vladimir) Lanin,
+  Ajai Tirumali,
+  Akatsuki Kitamura,
+  Alan Plum,
+  Alastair Campbell,
+  Alejandro G. Castro,
+  Alex Bishop,
+  Alex Nicolaou,
+  Alex Rousskov,
+  Alexander Farkas,
+  Alexander J. Vincent,
+  Alexandre Morgaut,
+  Alexey Feldgendler,
+  Алексей &amp=
;Pcy;роскуря&amp=
;kcy;ов (Alexey Proskuryakov),
+  Alexis Deveria,
+  Allan Clements,
+  Amos Jeffries,
+  Anders Carlsson,
+  Andreas<!-- mqmq87 -->,
+  Andreas Kling,
+  Andrei Popescu,
+  André E. Veltstra,
+  Andrew Barfield,
+  Andrew Clover,
+  Andrew Gove,
+  Andrew Grieve,
+  Andrew Oakley,
+  Andrew Sidwell,
+  Andrew Simons,
+  Andrew Smith,
+  Andrew W. Hagen,
+  Andrey V. Lukyanov,
+  Andry Rendy,
+  Andy Earnshaw,
+  Andy Heydon,
+  Andy Palay,
+  Anne van Kesteren,
+  Anthony Boyd,
+  Anthony Bryan,
+  Anthony Hickson,
+  Anthony Ricaud,
+  Antti Koivisto,
+  Arne Thomassen,
+  Aron Spohr,
+  Arphen Lin,
+  Arthur Stolyar,
+  Arun Patole,
+  Aryeh Gregor,
+  Asbjørn Ulsberg,
+  Ashley Gullen,
+  Ashley Sheridan,
+  Atsushi Takayama,
+  Aurelien Levy,
+  Ave Wrigley,
+  Axel Dahmen,
+  Ben Boyle,
+  Ben Godfrey,
+  Ben Lerner,
+  Ben Leslie,
+  Ben Meadowcroft,
+  Ben Millard,
+  Benjamin Carl Wiley Sittler,
+  Benjamin Hawkes-Lewis,
+  Benoit Ren,
+  Bert Bos,
+  Bijan Parsia,
+  Bil Corry,
+  Bill Mason,
+  Bill McCoy,
+  Billy Wong,
+  Bjartur Thorlacius,
+  Björn Höhrmann,
+  Blake Frantz,
+  Bob Lund,
+  Bob Owen,
+  Boris Zbarsky,
+  Brad Fults,
+  Brad Neuberg,
+  Brad Spencer,
+  Brady Eidson,
+  Brendan Eich,
+  Brenton Simpson,
+  Brett Wilson,
+  Brett Zamir,
+  Brian Campbell,
+  Brian Korver,
+  Brian Kuhn,
+  Brian M. Dube,
+  Brian Ryner,
+  Brian Smith,
+  Brian Wilson,
+  Bryan Sullivan,
+  Bruce Bailey,
+  Bruce D'Arcus,
+  Bruce Lawson,
+  Bruce Miller,
+  C. Williams,
+  Cameron McCormack,
+  Cameron Zemek,
+  Cao Yipeng,
+  Carlos Amengual,
+  Carlos Gabriel Cardona,
+  Carlos Perelló Marín,
+  Chao Cai,
+  윤석찬 (Channy Yun),
+  Charl van Niekerk,
+  Charles Iliya Krempeaux,
+  Charles McCathieNevile,
+  Chris Apers,
+  Chris Cressman,
+  Chris Evans,
+  Chris Morris,
+  Chris Pearce,
+  Chris Peterson,
+  Chris Weber,
+  Christian Biesinger,
+  Christian Johansen,
+  Christian Schmidt,
+  Christoph Päper,
+  Christophe Dumez,
+  Christopher Aillon,
+  Christopher Ferris,
+  Chriswa,
+  Clark Buehler,
+  Cole Robison,
+  Colin Fine,
+  Collin Jackson,
+  Corprew Reed,
+  Craig Cockburn,
+  Csaba Gabor,
+  Csaba Marton,
+  Cynthia Shelly,
+  Dan Yoder,
+  Daniel Barclay,
+  Daniel Bratell,
+  Daniel Brooks,
+  Daniel Brumbaugh Keeney,
+  Daniel Cheng,
+  Daniel Davis,
+  Daniel Glazman,
+  Daniel Peng,
+  Daniel Schattenkirchner,
+  Daniel Spång,
+  Daniel Steinberg,
+  Daniel Trebbien,
+  Danny Sullivan,
+  Darin Adler,
+  Darin Fisher,
+  Darxus,
+  Dave Camp,
+  Dave Hodder,
+  Dave Lampton,
+  Dave Singer,
+  Dave Townsend<!-- Mossop on moz irc -->,
+  David Baron,
+  David Bloom,
+  David Bruant,
+  David Carlisle,
+  David E. Cleary,
+  David Egan Evans,
+  David Flanagan,
+  David Gerard,
+  David Håsäther,
+  David Hyatt,
+  David I. Lehn,
+  David John Burrowes,
+  David Kendal,
+  David Matja,
+  David Remahl,
+  David Smith,
+  David Woolley,
+  DeWitt Clinton,
+  Dean Edridge,
+  Dean Edwards,
+  Debi Orton,
+  Derek Featherstone,
+  Devarshi Pant,
+  Devdatta,
+  Dimitri Glazkov,
+  Dimitry Golubovsky,
+  Dirk Pranke,
+  Dirk Schulze,
+  Dirkjan Ochtman,
+  Divya Manian,
+  Dmitry Titov,
+  dolphinling,
+  Domenic Denicola,
+  Dominique Hazaël-Massieux,
+  Don Brutzman,
+  Doron Rosenberg,
+  Doug Kramer,
+  Doug Simpkinson,
+  Drew Wilson,
+  Edmund Lai,
+  Eduard Pascual,
+  Eduardo Vela,
+  Edward O'Connor,
+  Edward Welbourne,
+  Edward Z. Yang,
+  Ehsan Akhgari,
+  Eira Monstad,
+  Eitan Adler,
+  Eliot Graff,
+  Elisabeth Robson,
+  Elizabeth Castro,
+  Elliott Sprehn,
+  Elliotte Harold,
+  Eric Carlson,
+  Eric Lawrence,
+  Eric Rescorla,
+  Eric Semling,
+  Erik Arvidsson,
+  Erik Rose,
+  Evan Martin,
+  Evan Prodromou,
+  Evert,
+  fantasai,
+  Felix Sasaki,
+  Francesco Schwarz,
+  Francis Brosnan Blazquez,
+  Franck 'Shift' Quélain,
+  Frank Barchard,
+  鵜飼文敏 (Fumitoshi Ukai),
+  Futomi Hatano,
+  Gavin Carothers,
+  Gavin Kistner,
+  Gareth Rees,
+  Garrett Smith,
+  Geoff Richards,
+  Geoffrey Garen,
+  Geoffrey Sneddon,
+  George Lund,
+  Gianmarco Armellin,
+  Giovanni Campagna,
+  Giuseppe Pascale,
+  Glenn Adams,
+  Glenn Maynard,
+  Graham Klyne,
+  Greg Botten,
+  Greg Houston,
+  Greg Wilkins,
+  Gregg Tavares,
+  Gregory J. Rosmaita,
+  Grey,
+  Guilherme Johansson Tramontina,
+  Gytis Jakutonis,
+  Håkon Wium Lie,
+  Hallvord Reiar Michaelsen Steen,
+  Hans S. Tømmerhalt,
+  Hans Stimer,
+  Harald Alvestrand,
+  Henri Sivonen,
+  Henrik Lied,
+  Henry Mason,
+  Hugh Guiney,
+  Hugh Winkler,
+  Ian Bicking,
+  Ian Clelland,
+  Ian Davis,
+  Ian Fette,
+  Ido Green,
+  Ignacio Javier,
+  Ivan Enderlin,
+  Ivo Emanuel Gonçalves,
+  J. King,
+  Jacob Davies,
+  Jacques Distler,
+  Jake Verbaten,
+  Jakub Łopuszański,
+  James Craig,
+  James Graham,
+  James Greene,
+  James Justin Harrell,
+  James Kozianski,
+  James M Snell,
+  James Perrett,
+  James Robinson,
+  Jamie Lokier,
+  Janusz Majnert,
+  Jan-Klaas Kollhof,
+  Jared Jacobs,
+  Jason Duell,
+  Jason Kersey,
+  Jason Lustig,
+  Jason White,
+  Jasper Bryant-Greene,
+  Jasper St. Pierre,
+  Jatinder Mann,
+  Jed Hartman,
+  Jeff Balogh,
+  Jeff Cutsinger,
+  Jeff Schiller,
+  Jeff Walden,
+  Jeffrey Zeldman,
+  胡慧鋒 (Jennifer Braithwaite),
+  Jens Bannmann,
+  Jens Fendler,
+  Jens Lindström,
+  Jens Meiert,
+  Jeremey Hustman,
+  Jeremy Keith,
+  Jeremy Orlow,
+  Jeroen van der Meer,
+  Jian Li,
+  Jim Jewett,
+  Jim Ley,
+  Jim Meehan,
+  Jim Michaels,
+  Jirka Kosek,
+  Jjgod Jiang,
+  João Eiras,
+  Joe Clark,
+  Joe Gregorio,
+  Joel Spolsky,
+  Joel Verhagen,
+  Johan Herland,
+  John Boyer,
+  John Bussjaeger,
+  John Carpenter,
+  John Daggett,
+  John Fallows,
+  John Foliot,
+  John Harding,
+  John Keiser,
+  John Snyders,
+  John Stockton,
+  John-Mark Bell,
+  Johnny Stenback,
+  Jon Ferraiolo,
+  Jon Gibbins,
+  Jon Perlow,
+  Jonas Sicking,
+  Jonathan Cook,
+  Jonathan Rees,
+  Jonathan Watt,
+  Jonathan Worent,
+  Jonny Axelsson,
+  Jordan Tucker,
+  Jorgen Horstink,
+  Jorunn Danielsen Newth,
+  Joseph Kesselman,
+  Joseph Mansfield,
+  Joseph Pecoraro,
+  Josh Aas,
+  Josh Hart,
+  Josh Levenberg,
+  Joshua Bell,
+  Joshua Randall,
+  Jukka K. Korpela,
+  Jules Clément-Ripoche,
+  Julian Reschke,
+  Jürgen Jeka,
+  Justin Lebar,
+  Justin Novosad,
+  Justin Schuh,
+  Justin Sinclair,
+  Ka-Sing Chou,
+  Kai Hendry,
+  呂康豪 (KangHao Lu)<!-- Kenny, kennyl=
uck-->,
+  Kartikaya Gupta,
+  Kathy Walton,
+  Kelly Ford,
+  Kelly Norton,
+  Kevin Benson,
+  Kevin Gadd,
+  Kevin Cole,
+  Kornél Pál,
+  Kornel Lesinski,
+  Kris Northfield,
+  Kristof Zelechovski,
+  Krzysztof Maczyński,
+  黒澤剛志 (Kurosawa Takeshi),
+  Kyle Barnhart,
+  Kyle Hofmann<!-- Ozob -->,
+  Kyle Huey,
+  Léonard Bouchet,
+  Léonie Watson,
+  Lachlan Hunt,
+  Larry Masinter,
+  Larry Page,
+  Lars Gunther<!-- Keryx Web -->,
+  Lars Solberg,
+  Laura Carlson,
+  Laura Granka,
+  Laura L. Carlson,
+  Laura Wisewell,
+  Laurens Holst,
+  Lawrence Forooghian,
+  Lee Kowalkowski,
+  Leif Halvard Silli,
+  Lenny Domnitser,
+  Leonard Rosenthol,
+  Leons Petrazickis,
+  Lobotom Dysmon,
+  Logan<!-- on moz irc -->,
+  Loune,
+  Luke Kenneth Casson Leighton,
+  Maciej Stachowiak,
+  Magnus Kristiansen<!-- Dashiva -->,
+  Maik Merten,
+  Malcolm Rowe,
+  Manish Tripathi,
+  Marcus Bointon,
+  Mark Birbeck,
+  Mark Davis,
+  Mark Miller,
+  Mark Nottingham,
+  Mark Pilgrim,
+  Mark Rowe<!--bdash-->,
+  Mark Schenk,
+  Mark Vickers,
+  Mark Wilton-Jones,
+  Martijn Wargers,
+  Martin Atkins,
+  Martin Dürst,
+  Martin Honnen,
+  Martin Janecke,
+  Martin Kutschker,
+  Martin Nilsson,
+  Martin Thomson,
+  Masataka Yakura,
+  Mathias Bynens,
+  Mathieu Henri,
+  Matias Larsson,
+  Matt Falkenhagen,
+  Matt Schmidt,
+  Matt Wright,
+  Matthew Gregan,
+  Matthew Mastracci,
+  Matthew Raymond,
+  Matthew Thomas,
+  Mattias Waldau,
+  Max Romantschuk,
+  Menno van Slooten,
+  Micah Dubinko,
+  Michael 'Ratt' Iannarelli,
+  Michael A. Nachbaur,
+  Michael A. Puls II<!--Shadow2531-->,
+  Michael Carter,
+  Michael Daskalov,
+  Michael Day,
+  Michael Dyck,
+  Michael Enright,
+  Michael Gratton,
+  Michael Nordman,
+  Michael Powers,
+  Michael Rakowski,
+  Michael(tm) Smith,
+  Michal Zalewski,
+  Michel Fortin,
+  Michelangelo De Simone,
+  Michiel van der Blonk,
+  Mihai Şucan<!-- from ROBO Design -->,
+  Mihai Parparita,
+  Mike Brown,
+  Mike Dierken<!-- S. Mike Dierken -->,
+  Mike Dixon,
+  Mike Hearn,
+  Mike Schinkel,
+  Mike Shaver,
+  Mikko Rantalainen,
+  Mohamed Zergaoui<!-- Innovimax SARL -->,
+  Mohammad Al Houssami,
+  Mounir Lamouri,
+  Ms2ger,
+  Nadia Heninger,
+  NARUSE Yui,
+  Neil Deakin,
+  Neil Rashbrook,
+  Neil Soiffer,
+  Nicholas Shanks,
+  Nicholas Stimpson,
+  Nicholas Zakas,
+  Nickolay Ponomarev,
+  Nicolas Gallagher,
+  Noah Mendelsohn,
+  Noah Slater,
+  Noel Gordon,
+  Nolan Waite,
+  NoozNooz42,
+  Norbert Lindenberg,
+  Ojan Vafai,
+  Olaf Hoffmann,
+  Olav Junker Kjær,
+  Oldřich Vetešník,
+  Oli Studholme,
+  Oliver Hunt,
+  Oliver Rigby,
+  Olivier Gendrin,
+  Olli Pettay,
+  oSand, <!-- from reddit -->
+  Pablo Flouret,
+  Patrick Garies,
+  Patrick H. Lauke,
+  Patrik Persson,
+  Paul Adenot,
+  Paul Norman,
+  Per-Erik Brodin,
+  Perry Smith,
+  Peter Beverloo,
+  Peter Karlsson,
+  Peter Kasting,
+  Peter Moulder,
+  Peter Occil,
+  Peter Stark,
+  Peter Van der Beken,
+  Peter-Paul Koch,
+  Phil Pickering,
+  Philip Jägenstedt,
+  Philip Taylor,
+  Philip TAYLOR<!-- a different one -->,
+  Philippe De Ryck,
+  Prateek Rungta,
+  Pravir Gupta,
+  李普君 (Pujun Li)<!-- masa jack --&gt=
;,
+  Rachid Finge,
+  Rafael Weinstein,
+  Rafał Miłecki,
+  Raj Doshi,
+  Rajas Moonka,
+  Ralf Stoltze,
+  Ralph Giles,
+  Raphael Champeimont,
+  Remci Mizkur,
+  Remco,
+  Remy Sharp,
+  Rene Saarsoo,
+  Rene Stach,
+  Ric Hardacre,
+  Rich Clark,
+  Rich Doughty,
+  Richard Ishida,
+  Rigo Wenning,
+  Rikkert Koppes,
+  Rimantas Liubertas,
+  Riona Macnamara,
+  Rob Ennals,
+  Rob Jellinghaus,
+  Rob S,
+  Robert Blaut,
+  Robert Collins,
+  Robert Kieffer,
+  Robert Millan,
+  Robert O'Callahan,
+  Robert Sayre,
+  Robin Berjon,
+  Rodger Combs,
+  Roland Steiner,
+  Roma Matusevich,
+  Roman Ivanov,
+  Roy Fielding,
+  Ruud Steltenpool,
+  Ryan King,
+  Ryosuke Niwa,
+  S. Mike Dierken,
+  Salvatore Loreto,
+  Sam Dutton,
+  Sam Kuper,
+  Sam Ruby,
+  Sam Weinig,
+  Samuel Bronson,
+  Samy Kamkar,
+  Sander van Lambalgen,
+  Sarven Capadisli,
+  Scott González,
+  Scott Hess,
+  Sean Fraser,
+  Sean Hayes,
+  Sean Hogan,
+  Sean Knapp,
+  Sebastian Markbåge,
+  Sebastian Schnitzenbaumer,
+  Seth Call,
+  Seth Dillingham,
+  Shanti Rao,
+  Shaun Inman,
+  Shiki Okasaka,
+  Sierk Bornemann,
+  Sigbjørn Vik,
+  Silver Ghost, <!-- see bug 19614 -->
+  Silvia Pfeiffer,
+  Šime Vidas,
+  Simon Montagu,
+  Simon Pieters,
+  Simon Spiegel,
+  skeww, <!-- on reddit -->
+  Smylers,
+  Stanton McCandlish,
+  Stefan Håkansson,
+  Stefan Haustein,
+  Stefan Santesson,
+  Stefan Weiss,
+  Steffen Meschkat,
+  Stephen Ma,
+  Stephen White,
+  Steve Comstock,
+  Steve Faulkner,
+  Steve Runyon,
+  Steven Bennett,
+  Steven Garrity,
+  Steven Tate,
+  Stewart Brodie,
+  Stuart Ballard,
+  Stuart Langridge,
+  Stuart Parmenter,
+  Subramanian Peruvemba,
+  Sunava Dutta,
+  Susan Borgrink,
+  Susan <!--G.--> Lesch,
+  Sylvain Pasche,
+  T. J. Crowder,
+  Tab Atkins,
+  Takeshi Yoshino,
+  <span lang=3Dtr title=3D"">Tantek Çelik<=
/span>,
+  田村健人 (TAMURA Kent),
+  Ted Mielczarek,
+  Terrence Wood,
+  Thijs van der Vossen,
+  Thomas Broyer,
+  Thomas Koetter,
+  Thomas O'Connor,
+  Tim Altman,
+  Tim Johansson,
+  TJ VanToll,
+  Toby Inkster,
+  Todd Moody,
+  Tom Baker,
+  Tom Pike,
+  Tommy Thorsen,
+  Tony Ross,
+  Travis Leithead,
+  Tyler Close,
+  Victor Carbune,
+  Vitya Muhachev,
+  Vladimir Katardjiev,
+  Vladimir Vukićević,
+  voracity,
+  Wakaba,
+  Wayne Carr,
+  Wayne Pollock,
+  Wellington Fernando de Macedo,
+  Weston Ruter,
+  Wilhelm Joys Andersen,
+  Will Levine,
+  William Swanson,
+  Wladimir Palant,
+  Wojciech Mach,
+  Wolfram Kriesing,
+  Xan Gregg,
+  Yang Chen,
+  Ye-Kui Wang,
+  Yehuda Katz,
+  Yi-An Huang,
+  Yngve Nysaeter Pettersen,
+  Yonathan Randolph,
+  Yuzo Fujishima,
+  Zhenbin Xu,
+  Zoltan Herczeg,
+  and
+  Øistein E. Andersen,
+
+  for their useful comments, both large and small, that have led to chan=
ges to this specification
+  over the years.</p>
+
+  <p>Thanks also to everyone who has ever posted about HTML to the=
ir blogs, public mailing lists, or
+  forums, including all the contributors to the <a href=3Dhttp://www.=
w3.org/html/wg/lists/>various
+  W3C HTML WG lists</a> and the <a href=3Dhttp://www.whatwg.org=
/mailing-list>various WHATWG
+  lists</a>.
+
+  <p>Special thanks to Richard Williamson for creating the first i=
mplementation of
+  <code><a href=3D#the-canvas-element>canvas</a></c=
ode> in Safari, from which the canvas feature was designed.</p>
+
+  <p>Special thanks also to the Microsoft employees who first impl=
emented the event-based
+  drag-and-drop mechanism, <code title=3Dattr-contenteditable><=
a href=3D#attr-contenteditable>contenteditable</a></code>,=
 and other
+  features first widely deployed by the Windows Internet Explorer browse=
r.</p>
+
+  <p>Thanks to the participants of the microdata usability study f=
or allowing us to use their
+  mistakes as a guide for designing the microdata feature.</p>
+
+  <div class=3Dimpl>
+
+  <p>Special thanks and $10,000 to David Hyatt who came up with a =
broken implementation of the <a href=3D#adoptionAgency>adoption age=
ncy algorithm</a> that the editor had to reverse engineer and
+  fix before using it in the parsing section.</p>
+
+  </div>
+
+  <p>Thanks to the many sources that provided inspiration for the =
examples used in the
+  specification.</p>
+
+ =20
+
+  <div itemscope=3D"" itemtype=3Dhttp://n.whatwg.org/work&g=
t;
+   <p>The image in the introduction is based on <a itemprop=3Dw=
ork href=3Dhttp://www.flickr.com/photos/wonderlane/2986252088/>a photo=
</a>
+   by <a itemprop=3Dhttp://creativecommons.org/ns#attributionURL href=
=3Dhttp://www.flickr.com/photos/wonderlane/>Wonderlane</a>.
+   (<a itemprop=3Dlicense href=3Dhttp://creativecommons.org/licenses/=
by/2.0/>CC BY 2.0</a>)
+  </div>
+
+ =20
+
+  <div itemscope=3D"" itemtype=3Dhttp://n.whatwg.org/work&g=
t;
+   <p>The image of two cute kittens in a basket used in the contex=
t menu example is based on
+   <a itemprop=3Dwork href=3Dhttp://www.flickr.com/photos/digidreamgr=
afix/8370087640/>a photo</a>
+   by <a itemprop=3Dhttp://creativecommons.org/ns#attributionURL href=
=3Dhttp://www.flickr.com/photos/digidreamgrafix/>Alex G</a>.
+   (<a itemprop=3Dlicense href=3Dhttp://creativecommons.org/licenses/=
by/2.0/>CC BY 2.0</a>)
+  </div>
+
+  <div itemscope=3D"" itemtype=3Dhttp://n.whatwg.org/work&g=
t;
+   <p>The Blue Robot Player sprite used in the canvas demo is base=
d on
+   <a itemprop=3Dwork href=3Dhttp://johncolburn.deviantart.com/art/Bl=
ue-Robot-Player-Sprite-323813997>a work</a> by
+   <a itemprop=3Dhttp://creativecommons.org/ns#attributionURL href=3D=
http://johncolburn.deviantart.com/>JohnColburn</a>.
+   (<a itemprop=3Dlicense href=3Dhttp://creativecommons.org/licenses/=
by-sa/3.0/>CC BY-SA 3.0</a>)</p>
+  </div>
+
+  <p>Thanks also to the Microsoft blogging community for some idea=
s, to the attendees of the W3C
+  Workshop on Web Applications and Compound Documents for inspiration, t=
o the #mrt crew, the #mrt.no
+  crew, and the #whatwg crew, and to Pillar and Hedral for their ideas a=
nd support.</p>
+
+  <!-- Hopefully Kam won't notice he's covered by these acknowledgeme=
nts three times! -->
+
+<!--
+ v2  * library of resources:
+        var library =3D new ZipFile("data.zip");
+        library.onload =3D function() {
+          var sound1 =3D library.getAudio("sound1.wav"); // re=
turns an Audio object
+          var image1 =3D library.getImage("image1.png"); // re=
turns an HTMLImageElement
+          var doc1 =3D library.getXMLDocument("doc1.xml"); // =
returns a Document (XML Document mode)
+          var doc2 =3D library.getHTMLDocument("doc1.html"); /=
/ returns a Document (HTML Document mode)
+        }
+       or:
+        var library =3D new ResourceLoader("data.zip");
+        library.add("moredata.zip");
+        library.onload =3D function() { ... }
+        library.onloading =3D function() {
+          reportLoadProgress(library.progress); // 0.0 .. 1.0
+        }
+       or:
+        var library =3D new AudioZip("sounds.zip");
+        library.onload =3D function() {
+          var sound1 =3D library["sound1.wav"];
+          sound.play();
+        }
+ v2  * a fairly common situation for web authors is to have two lists, w=
here
+       the contents of the second depends on the value of the first. Is =
there
+       any way we could extend the current model to include this functio=
nality?
+       (e.g. bugzilla product/component ui)
+ v2  * quick-searchable select
+ v2  * include/exclude selectors (two multi-select columns with arrows t=
o
+       move selected items) and that sort of thing.
+       http://slashdot.org/comments.pl?sid=3D110240&cid=3D9357022
+ v2  * Oh, and forms need a standardized Help widget/icon. I know I can
+       turn my cursor into a question mark, but I'm looking for somethin=
g
+       simple and pervasive. Maybe you can wrap fields in a help tag, ju=
st
+       as you do for fieldsets. And in that help tag, attributes are
+       available that allow for a nice, formatted, clean, full help text
+       popup/area/thing.
+       http://slashdot.org/comments.pl?sid=3D110240&cid=3D9359006
+ v2  * Validating only part of a form. - Anja Lehmann
+ v2  * Reminder to add a way to expose access keys in buttons, i.e.
+       Sub&mit where & signifies the m is the access key to use.=
 Possibly
+       automatic? <input accesskey=3D"m" value=3D"Subm=
it"> browser would be
+       smart enough to underline the first instance of the access key if
+       it exists (case insensitive)? - kerz
+       [or deprecate the lot (->web apps)]
+ v2  * need an attribute that says "the children of this element ar=
e in
+       their own tabbing universe, tabindex should be relative to each
+       other, not to the document"
+       -> web apps?
+ v2  * make select widgets have multiple columns
+       or ->web apps with list view
+ v2  * required as a group (one of the following must be available):
+       + i propose something like the following:
+           <input type=3D"text" group=3D"contact"=
 name=3D"voicephone"> Voice phone
+           <input type=3D"text" group=3D"contact"=
 name=3D"fax"> Fax
+           <input type=3D"text" group=3D"contact"=
 name=3D"mobile"> Mobile phone
+           <input type=3D"text" group=3D"contact"=
 name=3D"email"> E-mail
+         if the user fills out none of the form fields in the "cont=
act"
+         group, an error message is shown and the form is not submitted.
+         - Peter-Paul Koch
+ v2  * formatting of number fields, text fields, etc, so that when the
+       field is not focused, the value is displayed differently. Seems
+       like this would also be useful e.g. for <output> or somethi=
ng so
+       you can display localised dates, etc.
+ v2  * being able to select date range (from day x to day y)
+ v2  * ways of visualizing a linefeed in a <textarea> so it looks =
different
+       from wrapping text
+ v2  * all login systems have
+         1. enter username and password
+         2. create new account
+         3. lost password
+       some way of integrating this into one system, since it's so commo=
n
+ v2  * way of identifying different sorts of mailadresses
+         a) mailing-list
+         b) person
+         c) department in a company ("support", "marketin=
g" and such)
+         d) general mail (like "info", "mail", &quot=
;contact" and such)
+         e) other sorts of groupings
+       (or ->web apps; this is talking about in mailto: links, I thin=
k)
+ v2  * hotswapping login identities like in windows xp
+         you are logged in on operamail.com, and you want to check the m=
ail
+         of another user. somehow, combined with the wand or whatever,
+         the browser will remember the login page, and it can re-submit =
it
+         without having to load the initial page (saving time)
+ v2  * provide different measuring systems, like having the html indicat=
e
+       fluid in both fluid ounces and liters, and the browser can displa=
y
+       one or the other based on regional settings in the browser or ui,
+       display conversions in a tooltip, or let the user decide which
+       format to display.
+ v2  * indicate "x days ago" or "y days into the future&q=
uot; rather than date
+ v2  * input control for anniversaries
+ v2  * only submit fields that have changed, or a way to include in the
+       submission a list of which form controls were changed from their
+       default value
+ v2  * type=3D"time" value=3D"now"
+ v2  * add something to type=3D"number" to support basic curre=
ncy and unit
+       formatting of input
+ v2  * <fieldset enabled-if-checked=3D"myCheckboxOrRadioButton&q=
uot;>
+       ...to allow sections to only be enabled if a radio button makes i=
t
+       relevant, for instance.
+ v2  * Yan Morin proposed a multi-column dropdown <select> or <=
datalist>:
+         _________________
+        |_New_York______|V|_________________  <- input  with a table =
link and a down arrow
+        |_City__________|_State_|_Country_|_| <- header of the table
+        | Montreal      |  QC   | Canada  |A| <- top arrow of the scr=
oll
+        |>New York     <|  NY   | US      | | <- selected row
+        | Washington    |  DC   | US      |X| <- cursor scroll
+        | San Francisco |  CA   | US      | |
+        |_Toronto_______|__ON___|_Canada__|V| <- bottom arrow of the =
scroll
+
+ v2  * add for=3D"" attribute to <input type=3D"passwo=
rd"> so that you can
+       link usernames and passwords. (Jonas Sicking)
+ v2  * value for unchecked checkbox?
+ v2  * A way to specify the default button - Michael Gratton
+ v2  * <fieldset readonly>?
+ v2  * dolphinling suggests having a way to mark certain parts of a
+       form as being dependent on another (mutually exclusive parts of
+       a form)
+ v2  * expose the form data set, either as an object (on which one can
+       invoke the JSON serialiser), or in the form of a method on
+       HTMLFormElement that returns the form data set serialised
+       according to a particular encoding (defaulting to the form's
+       enctype=3D"" one, probably). This would allow forms to =
be used
+       with XHR-like systems without having to manually construct the
+       form data set the way that is done today.
+ v2  * expose the file upload progress when uploading files in a form
+       (ideally using the same mechanism as XHR2?); ack Rob Evans
+
+Consistency in editorial style:
+ v2  * need to become consistent about whether or not to quote keyword
+       ("<code title=3D"">foo</code>" vs=
 <code>foo</code>)
+ v2  * make the spec consistent about whether the word "algorithm&q=
uot; is part of
+       an algorithm's name or not ("</dfn> algorithm", &=
quot;</span> algorithm")
+ v2  * make the spec more consistent about its use of "hexadecimal&=
quot;
+       and "base-sixteen", the order that 0-9 A-Z a-z is menti=
oned,
+       and the detail to which the spec explains how to interpret a
+       string as a hexadecimal number.
+ v2  * become more consistent about what markup we use to mark up
+       productions (nothing? <i>? <code>?)
+ v2  * use <code>Document</code> consistently instead of 'do=
cument'.
+ v2  * be clearer about arrays/lists/collections being zero-based
+       despite using the term "/index/th".
+ v2  * use the sample widgets:
+          <li><img alt=3D"A text field with editable secti=
ons for each
+          value, with a button to pop up a dialog showing a calendar or
+          clock." src=3D"sample-datetime-ui-2"></li=
>
+          <li><img alt=3D"A calendar grid with a clock in =
the upper right
+          hand corner." src=3D"sample-datetime-ui-3">&=
lt;/li>
+-->
+=20
</ins></span></pre>
</div>
</div>

</body>
</html>


More information about the webkit-changes mailing list