0". CSS should be used instead.
Authors should not specify a charset attribute on a <{script}> element. If the
attribute is present, its value must be an [=ASCII case-insensitive=] match for the string
"utf-8". [[!ENCODING]]
Authors should not specify a <{script/language}> attribute on a <{script}> element. If
the attribute is present, its value must be an [=ASCII case-insensitive=] match for the string
"JavaScript" and either the <{script/type}> attribute must be omitted or its value
must be an [=ASCII case-insensitive=] match for the string "text/javascript".
The attribute should be entirely omitted instead (with the value "JavaScript", it has
no effect), or replaced with use of the <{script/type}> attribute.
Authors should not specify the <{a/name}> attribute on <{a}> elements. If the
attribute is present, its value must not be the empty string and must neither be equal to the
value of any of the [=IDs=] in the element's [=tree=] other than the element's own
[=ID=] if any, nor be equal to the value of any of the other <{a/name}> attributes on
<{a}> elements in the element's [=tree=]. If this attribute is present and the
element has an [=ID=], then the attribute's value must be equal to the element's [=ID=]. In
earlier versions of the language, this attribute was intended as a way to specify possible targets
for fragments in URLs. The <{global/id}> attribute should be used instead.
Authors should not, but may despite requirements to the contrary elsewhere in this specification,
specify the <{input/maxlength}> and <{input/size}> attributes on <{input}> elements
whose <{input/type}> attributes are in the <{input/Number}> state. One
valid reason for using these attributes regardless is to help legacy user agents that do not
support <{input}> elements with type="number" to still render the text control with a
useful width.
0".
* The presence of a charset attribute on a <{script}> element if its value is an
[=ASCII case-insensitive=] match for "utf-8".
* The presence of a <{script/language}> attribute on a <{script}> element if its value is an
[=ASCII case-insensitive=] match for the string "JavaScript" and if there is no
<{script/type}> attribute or there is and its value is an [=ASCII case-insensitive=] match
for the string "text/javascript".
* The presence of a <{a/name}> attribute on an <{a}> element, if its value is not the empty string.
* The presence of a <{input/maxlength}> attribute on an <{input}> element whose <{input/type}>
attribute is in the <{input/Number}> state.
* The presence of a <{input/size}> attribute on an <{input}> element whose <{input/type}>
attribute is in the <{input/Number}> state.
Conformance checkers must distinguish between pages that have no conformance errors and have none
of these obsolete features, and pages that have no conformance errors but do have some of these
obsolete features.
For example, a validator could report some pages as "Valid HTML" and others as "Valid HTML with warnings".
acronym
:: Use <{abbr}> instead.
: bgsound
:: Use <{audio}> instead.
: dir
:: Use <{ul}> instead.
: frame
: frameset
: noframes
:: Either use <{iframe}> and CSS instead, or use server-side includes to generate
complete pages with the various invariant parts merged in.
: hgroup
:: To mark up subheadings, consider putting the subheading into a <{p}> element after
the <{h1}>—<{h6}> element containing the main heading, or putting the subheading
directly within the h1-h6 element containing the
main heading, but separated from the main heading by punctuation and/or within,
for example, a span class="subheading" element with differentiated styling.
Headings and subheadings, alternative titles, or taglines can be grouped using
the <{header}> or <{div}> elements.
: isindex
:: Use an explicit <{form}> and <{input/Text|text control}> combination instead.
: listing
:: Use <{pre}> and <{code}> instead.
: nextid
:: Use GUIDs instead.
: noembed
:: Use <{object}> instead of <{embed}> when fallback is necessary.
: plaintext
:: Use the "text/plain" [=MIME type=] instead.
: strike
:: Use <{del}> instead if the element is marking an edit, otherwise use <{s}> instead.
: xmp
:: Use <{pre}> and <{code}> instead, and escape "<" and
"&" characters as "<" and "&"
respectively.
: basefont
: big
: blink
: center
: font
: <{marquee}>
: menu
: menuitem
: multicol
: nobr
: spacer
: tt
:: Use appropriate elements or CSS instead.
Where the <{tt}> element would have been used for marking up keyboard input,
consider the <{kbd}> element; for variables, consider the <{var}> element;
for computer code, consider the <{code}> element; and for computer output, consider
the <{samp}> element.
Similarly, if the <{big}> element is being used to denote a heading, consider using
the <{h1}> element; if it is being used for marking up important passages, consider
the <{strong}> element; and if it is being used for highlighting text for reference
purposes, consider the <{mark}> element.
See also the text-level semantics usage summary for more suggestions with examples.
charset on <{a}> elements
: charset on <{link}> elements
:: Use an HTTP Content-Type header on the linked resource instead.
: charset on <{script}> elements
(except as noted in the previous section)
:: Omit the attribute. Both documents and scripts are required to use UTF-8. It is
redundant to specify it on the <{script}> element since it inherits from the document.
: coords on <{a}> elements
: shape on <{a}> elements
:: Use <{area}> instead of <{a}> for image maps.
: methods on <{a}> elements
: methods on <{link}> elements
:: Use the HTTP OPTIONS feature instead.
: name on <{a}> elements (except as noted in the
previous section)
: name on <{embed}> elements
: name on <{img}> elements
: name on <{option}> elements
:: Use the <{global/id}> attribute instead.
: urn on <{a}> elements
: urn on <{link}> elements
:: Specify the preferred persistent identifier using the <{link/href}> attribute instead.
: accept on <{form}> elements
:: Use the <{input/accept}> attribute directly on the <{input}> elements instead.
: nohref on <{area}> elements
:: Omitting the <{links/href}> attribute is sufficient; the nohref attribute is
unnecessary. Omit it altogether.
: profile on <{head}> elements
:: When used for declaring which meta terms are used in the document, unnecessary;
omit it altogether, and [=register the names=].
:: When used for triggering specific user agent behaviors: use a <{link}> element instead.
: version on <{html}> elements
:: Unnecessary. Omit it altogether.
: ismap on <{input}> elements
:: Unnecessary. Omit it altogether. All <{input}> elements with a <{input/type}> attribute in
the <{input/Image|Image Button}> state are processed as server-side image maps.
: usemap on <{input}> elements
:: Use <{img}> instead of <{input}> for image maps.
: longdesc on <{iframe}> elements
:: Use a regular <{a}> element to link to the description.
: lowsrc on <{img}> elements
:: Use a progressive JPEG image (given in the <{img/src}> attribute), instead of using two
separate images.
: target on <{link}> elements
:: Unnecessary. Omit it altogether.
: scheme on <{meta}> elements
:: If more than one scheme needs to be declared for a <{meta}> element
make the scheme declaration part of the value.
: archive on <{object}> elements
: classid on <{object}> elements
: code on <{object}> elements
: codebase on <{object}> elements
: codetype on <{object}> elements
:: Use the <{object/data}> and <{object/type}> attributes to invoke [=plugins=]. To set
parameters with these names in particular, the <{param}> element can be used.
: declare on <{object}> elements
:: Repeat the <{object}> element completely each time the resource is to be reused.
: standby on <{object}> elements
:: Optimize the linked resource so that it loads quickly or, at least, incrementally.
: type on <{param}> elements
: valuetype on <{param}> elements
:: Use the <{param/name}> and <{param/value}> attributes without declaring value types.
: language on <{script}> elements (except as
noted in the previous section)
:: For Javascript, do nothing. For other content, use the <{script/type}> attribute instead.
: event on <{script}> elements
: for on <{script}> elements
:: Use DOM events mechanisms to register event listeners. [[!DOM]]
: datapagesize on <{table}> elements
:: Unnecessary. Omit it altogether.
: summary on <{table}> elements
:: Use one of the [[#sec-techniques-for-describing-tables|techniques]] given in the table
section instead.
: abbr on <{td}> elements
:: Use text that begins in an unambiguous and terse manner, and include any more elaborate text
after that. The <{global/title}> attribute can also be useful in including more detailed
text, so that the cell's contents can be made terse. If it's a heading, use <{th}>
(which has an <{th/abbr}> attribute).
: axis on <{td}> and <{th}> elements
:: Use the <{th/scope}> attribute on the relevant <{th}>.
: scope on <{td}> elements
:: Use <{th}> elements for heading cells.
: datasrc on <{a}>, <{button}>,
<{div}>, <{frame}>, <{iframe}>, <{img}>, <{input}>, <{label}>, <{legend}>, <{marquee}>,
<{object}>, <{option}>, <{select}>, <{a}>, <{table}>, and <{textarea}> elements
: datafld on <{a}>, <{button}>,
<{div}>, <{fieldset}>, <{frame}>, <{iframe}>, <{img}>, <{input}>, <{label}>, <{legend}>,
<{marquee}>, <{object}>, <{param}>, <{select}>, <{a}>, and <{textarea}> elements
: dataformatas on <{button}>, <{div}>,
<{input}>, <{label}>, <{legend}>, <{marquee}>, <{object}>, <{option}>, <{select}>, <{a}>,
and <{table}> elements
:: Use script and a mechanism such as XMLHttpRequest to populate the page
dynamically. [[!XHR]]
: alink on <{body}> elements
: bgcolor on <{body}> elements
: bottommargin on <{body}> elements
: leftmargin on <{body}> elements
: link on <{body}> elements
: marginheight on <{body}> elements
: marginwidth on <{body}> elements
: rightmargin on <{body}> elements
: text on <{body}> elements
: topmargin on <{body}> elements
: vlink on <{body}> elements
: clear on <{br}> elements
: align on <{caption}> elements
: align on <{col}> elements
: char on <{col}> elements
: charoff on <{col}> elements
: valign on <{col}> elements
: width on <{col}> elements
: align on <{div}> elements
: compact on <{dl}> elements
: align on <{embed}> elements
: hspace on <{embed}> elements
: vspace on <{embed}> elements
: bordercolor on <{frame}> elements
: align on <{hr}> elements
: color on <{hr}> elements
: noshade on <{hr}> elements
: size on <{hr}> elements
: width on <{hr}> elements
: align on <{h1}>—<{h6}> elements
: align on <{iframe}> elements
: allowtransparency on <{iframe}> elements
: frameborder on <{iframe}> elements
: framespacing on <{iframe}> elements
: hspace on <{iframe}> elements
: marginheight on <{iframe}> elements
: marginwidth on <{iframe}> elements
: scrolling on <{iframe}> elements
: vspace on <{iframe}> elements
: align on <{input}> elements
: border on <{input}> elements
: hspace on <{input}> elements
: vspace on <{input}> elements
: align on <{img}> elements
: border on <{img}> elements (except as noted in the previous section)
: hspace on <{img}> elements
: vspace on <{img}> elements
: align on <{legend}> elements
: type on <{li}> elements
: compact on <{menu}> elements
: bgcolor on <{marquee}> elements
: height on <{marquee}> elements
: hspace on <{marquee}> elements
: vspace on <{marquee}> elements
: width on <{marquee}> elements
: align on <{object}> elements
: border on <{object}> elements
: hspace on <{object}> elements
: vspace on <{object}> elements
: compact on <{ol}> elements
: align on <{p}> elements
: width on <{pre}> elements
: align on <{table}> elements
: bgcolor on <{table}> elements
: bordercolor on <{table}> elements
: cellpadding on <{table}> elements
: cellspacing on <{table}> elements
: frame on <{table}> elements
: height on <{table}> elements
: rules on <{table}> elements
: width on <{table}> elements
: align on <{tbody}>,
<{thead}>, and <{tfoot}> elements
: char on <{tbody}>,
<{thead}>, and <{tfoot}> elements
: charoff on <{tbody}>,
<{thead}>, and <{tfoot}> elements
: valign on <{tbody}>,
<{thead}>, and <{tfoot}> elements
: align on <{td}> and <{th}> elements
: bgcolor on <{td}> and <{th}> elements
: char on <{td}> and <{th}> elements
: charoff on <{td}> and <{th}> elements
: height on <{td}> and <{th}> elements
: nowrap on <{td}> and <{th}> elements
: valign on <{td}> and <{th}> elements
: width on <{td}> and <{th}> elements
: align on <{tr}> elements
: bgcolor on <{tr}> elements
: char on <{tr}> elements
: charoff on <{tr}> elements
: height on <{tr}> elements
: valign on <{tr}> elements
: compact on <{ul}> elements
: type on <{ul}> elements
: background
on <{body}>, <{table}>, <{thead}>, <{tbody}>, <{tfoot}>, <{tr}>, <{td}>, and <{th}> elements
:: Use CSS instead.
marquee elementHTMLMarqueeElement interface.
[HTMLConstructor]
interface HTMLMarqueeElement : HTMLElement {
[CEReactions] attribute DOMString behavior;
[CEReactions] attribute DOMString bgColor;
[CEReactions] attribute DOMString direction;
[CEReactions] attribute DOMString height;
[CEReactions] attribute unsigned long hspace;
[CEReactions] attribute long loop;
[CEReactions] attribute unsigned long scrollAmount;
[CEReactions] attribute unsigned long scrollDelay;
[CEReactions] attribute boolean trueSpeed;
[CEReactions] attribute unsigned long vspace;
[CEReactions] attribute DOMString width;
attribute EventHandler onbounce;
attribute EventHandler onfinish;
attribute EventHandler onstart;
void start();
void stop();
};
A <{marquee}> element can be turned on or turned off. When it is created, it
is [=turned on=].
When the start() method is called, the
<{marquee}> element must be [=turned on=].
When the stop() method is called, the
<{marquee}> element must be [=turned off=].
When a <{marquee}> element is created, the user agent must [=queue a task=] to
[=fire an event=] named start at the element.
behavior content attribute on <{marquee}>
elements is an [=enumerated attribute=] with the following keywords (all non-conforming):
| Keyword | State |
|---|---|
scroll |
scroll |
slide |
slide |
alternate |
alternate |
direction content attribute on <{marquee}>
elements is an [=enumerated attribute=] with the following keywords (all non-conforming):
| Keyword | State |
|---|---|
left |
left |
right |
right |
up |
up |
down |
down |
truespeed content attribute on <{marquee}>
elements is a [=boolean attribute=].
scrolldelay attribute,
and parsing its value using the [=rules for parsing non-negative integers=] does not return
an error, then let delay be the parsed value. Otherwise, let delay be
85.
2. If the element does not have a <{marquee/truespeed}> attribute, and the delay value
is less than 60, then let delay be 60 instead.
3. The [=marquee scroll interval=] is delay, interpreted in milliseconds.
scrollamount attribute, and
parsing its value using the [=rules for parsing non-negative integers=] does not return an
error, is the parsed value interpreted in CSS pixels, and otherwise is 6 CSS pixels.
loop content attribute, and parsing its value
using the [=rules for parsing integers=] does not return an error or a number less than 1, is
the parsed value, and otherwise is -1.
The loop IDL attribute, on getting,
must return the element's [=marquee loop count=]; and on setting, if the new value is different
than the element's [=marquee loop count=] and either greater than zero or equal to -1, must set
the element's <{marquee/loop}> content attribute (adding it if necessary) to the
[=valid integer=] that represents the new value. (Other values are ignored.)
A <{marquee}> element also has a marquee current loop index, which is zero when the
element is created.
The rendering layer will occasionally increment the marquee current loop index, which
must cause the following steps to be run:
1. If the [=marquee loop count=] is -1, then abort these steps.
2. Increment the [=marquee current loop index=] by one.
3. If the [=marquee current loop index=] is now equal to or greater than the element's
[=marquee loop count=], turn off the <{marquee}> element and
[=queue a task=] to [=fire an event=] named finish at the
<{marquee}> element.
Otherwise, if the {{HTMLMarqueeElement/behavior}} attribute is in the
alternate state, then [=queue a task=] to
[=fire an event=] named bounce at the <{marquee}> element.
Otherwise, [=queue a task=] to [=fire an event=] named
start at the <{marquee}> element.
| [=Event handler=] | [=Event handler event type=] |
|---|---|
onbounce |
bounce |
onfinish |
finish |
onstart |
start |
behavior,
direction,
height,
hspace,
vspace,
and width IDL attributes must
[=reflect=] the respective content attributes of the same name.
The bgColor IDL attribute must
[=reflect=] the <{marquee/bgcolor}> content attribute.
The scrollAmount IDL attribute must
[=reflect=] the <{marquee/scrollamount}> content attribute. The default value is 6.
The scrollDelay IDL attribute must
[=reflect=] the <{marquee/scrolldelay}> content attribute. The default value is 85.
The trueSpeed IDL attribute must
[=reflect=] the <{marquee/truespeed}> content attribute.
frameset element acts as the <{body}> element in documents
that use frames.
The <{frameset}> element must implement the {{HTMLFrameSetElement}} interface.
[HTMLConstructor]
interface HTMLFrameSetElement : HTMLElement {
[CEReactions] attribute DOMString cols;
[CEReactions] attribute DOMString rows;
};
HTMLFrameSetElement implements WindowEventHandlers;
The cols and
rows content attributes for the <{frameset}>
element.
The cols and
rows IDL attributes of the
<{frameset}> element must [=reflect=] the respective content attributes of the same name.
The <{frameset}> element exposes as [=event handler content attributes=] a number of the
[=event handlers=] of the {{Window}} object. It also mirrors their
[=event handler IDL attributes=].
The onblur,
onerror,
onfocus,
onload,
onresize, and
onscroll [=event handlers=] of the
{{Window}} object, exposed on the <{frameset}> element, replace the generic [=event handlers=]
with the same names normally supported by [=HTML elements=].
frame element defines a [=nested browsing context=] similar
to the <{iframe}> element, but rendered within a <{frameset}> element.
A <{frame}> element is said to be an active <{frame}> element when it is
in a document.
When a <{frame}> element is created as an active frame element, or becomes an
active frame element after not having been one, the user agent must
[=create a new browsing context=], set the element's [=nested browsing context=] to the
newly-created [=browsing context=], and then process the frame attributes
for the first time. If the element has a <{frame/name}> attribute, the
[=browsing context name=] must be set to the value of this attribute; otherwise, the
[=browsing context name=] must be set to the empty string.
When a <{frame}> element stops being an active frame element, the
user agent must [=discard=] the element's [=nested browsing context=], and then set the
element's [=nested browsing context=] to null..
Whenever a <{frame}> element with a non-null [=nested browsing context=] has its <{frame/src}>
attribute set, changed, or removed, the user agent must
process the frame attributes.
When the user agent is to process the <{frame}> attributes, it must run the first
appropriate steps from the following list:
src attribute
specified, and the user agent is processing the <{frame}>'s attributes for the first time
load at the <{frame}> element.
frame attributes algorithm must use the <{frame}> element's
[=node document=]'s [=browsing context=] as the [=source browsing context=].
Furthermore, if the [=active document=] of the element's [=nested browsing context=] before
such a [=navigation=] was not [=completely loaded=] at the time of the new
[=navigation=], then the [=navigation=] must be completed with [=replacement enabled=].
Similarly, if the [=nested browsing context=]'s [=session history=] contained
only one {{Document}} when the process the frame attributes
algorithm was invoked, and that was the about:blank {{Document}} created
when the [=nested browsing context=] was created, then any [=navigation=] required of the
user agent in that algorithm must be completed with [=replacement enabled=].
When a {{Document}} in a <{frame}> is marked as [=completely loaded=], the user agent must
[=queue a task=] to [=fire an event=] named load at
the <{frame}> element.
The [=task source=] for the [=tasks=] above is the [=DOM manipulation task source=].
When a <{frame}> element's has a non-null [=nested browsing context=], and its
[=nested browsing context=]'s [=active document=] is not
[=ready for post-load tasks=], and when anything is [=delaying the load event=] of the
<{frame}> element's [=browsing context=]'s [=active document=], and when the <{frame}>
element's [=browsing context=] is in the delaying load events mode, the
<{frame}> must [=delay the load event=] of its document.
Whenever the <name attribute is set and the
<{frame}> element's [=nested browsing context=] is non-null, the
[=nested browsing context=]'s name must be changed to the
new value. If the attribute is removed, the [=browsing context name=] must be set to the
empty string.
The <{frame}> element must implement the {{HTMLFrameElement}} interface.
[HTMLConstructor]
interface HTMLFrameElement : HTMLElement {
[CEReactions] attribute DOMString name;
[CEReactions] attribute DOMString scrolling;
[CEReactions] attribute USVString src;
[CEReactions] attribute DOMString frameBorder;
[CEReactions] attribute USVString longDesc;
[CEReactions] attribute boolean noResize;
readonly attribute Document? contentDocument;
readonly attribute WindowProxy? contentWindow;
[CEReactions, TreatNullAs=EmptyString] attribute DOMString marginHeight;
[CEReactions, TreatNullAs=EmptyString] attribute DOMString marginWidth;
};
The name,
scrolling, and
src IDL attributes of the <{frame}>
element must [=reflect=] the respective content attributes of the same name. For the purposes
of reflection, the <{frame}> element's <{frame/src}> content attribute is defined as containing a
[=url/URL=].
The frameBorder IDL attribute of the
<{frame}> element must [=reflect=] the element's
frameborder content attribute.
The longDesc IDL attribute of the
<{frame}> element must [=reflect=] the element's longdesc content attribute, which
for the purposes of reflection is defined as containing a [=url/URL=].
The noResize IDL attribute of the
<{frame}> element must [=reflect=] the element's
noresize content attribute.
The contentDocument IDL attribute, on
getting, must return the [=content document=].
The contentWindow IDL attribute must
return the WindowProxy object of the <{frame}> element's
[=nested browsing context=], if the element's [=nested browsing context=] is non-null, or
return null otherwise.
The marginHeight IDL attribute of the
<{frame}> element must [=reflect=] the element's marginheight content attribute.
The marginWidth IDL attribute of the
<{frame}> element must [=reflect=] the element's marginwidth content attribute.
partial interface HTMLAnchorElement {
[CEReactions] attribute DOMString coords;
[CEReactions] attribute DOMString charset;
[CEReactions] attribute DOMString name;
[CEReactions] attribute DOMString shape;
};
The coords,
charset,
name, and
shape IDL attributes of the
<{th}> element must [=reflect=] the respective content attributes of the same name.
partial interface HTMLAreaElement {
[CEReactions] attribute boolean noHref;
};
The noHref IDL attribute of the <{area}>
element must [=reflect=] the element's <{area/nohref}> content attribute.
partial interface HTMLBodyElement {
[CEReactions, TreatNullAs=EmptyString] attribute DOMString text;
[CEReactions, TreatNullAs=EmptyString] attribute DOMString link;
[CEReactions, TreatNullAs=EmptyString] attribute DOMString vLink;
[CEReactions, TreatNullAs=EmptyString] attribute DOMString aLink;
[CEReactions, TreatNullAs=EmptyString] attribute DOMString bgColor;
attribute DOMString background;
};
The text IDL attribute of the <{body}>
element must [=reflect=] the element's <{body/text}> content attribute.
The link IDL attribute of the <{body}>
element must [=reflect=] the element's <{body/link}> content attribute.
The aLink IDL attribute of the <{body}>
element must [=reflect=] the element's <{body/alink}> content attribute.
The vLink IDL attribute of the <{body}>
element must [=reflect=] the element's <{body/vlink}> content attribute.
The bgColor IDL attribute of the <{body}>
element must [=reflect=] the element's <{body/bgcolor}> content attribute.
The background IDL attribute of the
<{body}> element must [=reflect=] the element's <{body/background}> content attribute. (The
<{body/background}> content is not defined to contain a [=url/URL=], despite
rules regarding its handling in [[#rendering|the Rendering section]] above.)
partial interface HTMLBRElement {
[CEReactions] attribute DOMString clear;
};
The clear IDL attribute of the <{br}>
element must [=reflect=] the content attribute of the same name.
partial interface HTMLTableCaptionElement {
[CEReactions] attribute DOMString align;
};
The align IDL attribute of the
<{caption}> element must [=reflect=] the content attribute of the same name.
partial interface HTMLTableColElement {
[CEReactions] attribute DOMString align;
[CEReactions] attribute DOMString ch;
[CEReactions] attribute DOMString chOff;
[CEReactions] attribute DOMString vAlign;
[CEReactions] attribute DOMString width;
};
The align and
width IDL attributes of the <{col}>
element must [=reflect=] the respective content attributes of the same name.
The ch IDL attribute of the <{col}>
element must [=reflect=] the element's <{col/char}> content attribute.
The chOff IDL attribute of the
<{col}> element must [=reflect=] the element's <{col/charoff}> content attribute.
The vAlign IDL attribute of the
<{col}> element must [=reflect=] the element's <{col/valign}> content attribute.
ul
elements in terms of semantics and for purposes of rendering.
The <{dir}> element must implement the HTMLDirectoryElement interface.
[HTMLConstructor]
interface HTMLDirectoryElement : HTMLElement {
[CEReactions] attribute boolean compact;
};
The compact IDL attribute of the
<{dir}> element must [=reflect=] the content attribute of the same name.
partial interface HTMLDivElement {
[CEReactions] attribute DOMString align;
};
The align IDL attribute of the <{div}>
element must [=reflect=] the content attribute of the same name.
partial interface HTMLDListElement {
[CEReactions] attribute boolean compact;
};
The compact IDL attribute of the <{dl}>
element must [=reflect=] the content attribute of the same name.
partial interface HTMLEmbedElement {
[CEReactions] attribute DOMString align;
[CEReactions] attribute DOMString name;
};
The name and
align IDL attributes of the <{embed}>
element must [=reflect=] the respective content attributes of the same name.
HTMLFontElement interface.
[HTMLConstructor]
interface HTMLFontElement : HTMLElement {
[CEReactions, TreatNullAs=EmptyString] attribute DOMString color;
[CEReactions] attribute DOMString face;
[CEReactions] attribute DOMString size;
};
The color,
face, and
size
IDL attributes of the <{font}> element must [=reflect=] the respective content
attributes of the same name.
partial interface HTMLHeadingElement {
[CEReactions] attribute DOMString align;
};
The align IDL attribute of the
<{h1}>—<{h6}> elements must [=reflect=] the content attribute of the same name.
The profile IDL attribute on <{head}>
elements (with the {{HTMLHeadElement}} interface) is intentionally omitted. Unless so required
by another applicable specification, implementations would
therefore not support this attribute. (It is mentioned here as it was defined in a previous
version of the DOM specifications.)
partial interface HTMLHRElement {
[CEReactions] attribute DOMString align;
[CEReactions] attribute DOMString color;
[CEReactions] attribute boolean noShade;
[CEReactions] attribute DOMString size;
[CEReactions] attribute DOMString width;
};
The align,
color,
size,
and width IDL attributes of the <{hr}>
element must [=reflect=] the respective content attributes of the same name.
The noShade IDL attribute of the <{hr}>
element must [=reflect=] the element's noshade content attribute.
partial interface HTMLHtmlElement {
[CEReactions] attribute DOMString version;
};
The version IDL attribute of the <{html}>
element must [=reflect=] the content attribute of the same name.
partial interface HTMLIFrameElement {
[CEReactions] attribute DOMString align;
[CEReactions] attribute DOMString scrolling;
[CEReactions] attribute DOMString frameBorder;
[CEReactions] attribute USVString longDesc;
[CEReactions, TreatNullAs=EmptyString] attribute DOMString marginHeight;
[CEReactions, TreatNullAs=EmptyString] attribute DOMString marginWidth;
};
The align and
scrolling IDL attributes of the
<{iframe}> element must [=reflect=] the respective content attributes of the same name.
The frameBorder IDL attribute of the
<{iframe}> element must [=reflect=] the element's <{iframe/frameborder}> content attribute.
The longDesc IDL attribute of the
<{iframe}> element must [=reflect=] the element's <{iframe/longdesc}> content attribute,
which for the purposes of reflection is defined as containing a [=url/URL=].
The marginHeight IDL attribute of the
<{iframe}> element must [=reflect=] the element's <{iframe/marginheight}> content attribute.
The marginWidth IDL attribute of the
<{iframe}> element must [=reflect=] the element's <{iframe/marginwidth}> content attribute.
partial interface HTMLImageElement {
[CEReactions] attribute DOMString name;
[CEReactions] attribute USVString lowsrc;
[CEReactions] attribute DOMString align;
[CEReactions] attribute unsigned long hspace;
[CEReactions] attribute unsigned long vspace;
[CEReactions, TreatNullAs=EmptyString] attribute DOMString border;
};
The name,
align,
border,
hspace, and
vspace IDL attributes of the <{img}>
element must [=reflect=] the respective content attributes of the same name.
The lowsrc IDL attribute of the <{img}>
element must [=reflect=] the element's <{img/lowsrc}> content attribute, which for the
purposes of reflection is defined as containing a [=url/URL=].
partial interface HTMLInputElement {
[CEReactions] attribute DOMString align;
[CEReactions] attribute DOMString useMap;
};
The align IDL attribute of the <{input}>
element must [=reflect=] the content attribute of the same name.
The useMap IDL attribute of the <{input}>
element must [=reflect=] the element's <{input/usemap}> content attribute.
partial interface HTMLLegendElement {
[CEReactions] attribute DOMString align;
};
The align IDL attribute of the
<{legend}> element must [=reflect=] the content attribute of the same name.
partial interface HTMLLIElement {
[CEReactions] attribute DOMString type;
};
The type IDL attribute of the <{li}> element
must [=reflect=] the content attribute of the same name.
partial interface HTMLLinkElement {
[CEReactions] attribute DOMString charset;
[CEReactions] attribute DOMString target;
};
The charset and
target IDL attributes of the <{link}>
element must [=reflect=] the respective content attributes of the same name.
pre elements in
terms of semantics and for purposes of rendering.
partial interface HTMLMenuElement {
[CEReactions] attribute boolean compact;
};
The compact IDL attribute of the <{menu}>
element must [=reflect=] the content attribute of the same name.
partial interface HTMLMetaElement {
[CEReactions] attribute DOMString scheme;
};
User agents may treat the <{meta/scheme}> content attribute
on the <{meta}> element as an extension of the element's <{meta/name}> content attribute when
processing a <{meta}> element with a <{meta/name}> attribute whose value is one that the user
agent recognizes as supporting the <{meta/scheme}> attribute.
User agents are encouraged to ignore the <{meta/scheme}> attribute and instead process the
value given to the metadata name as if it had been specified for each expected value of the
<{meta/scheme}> attribute.
scheme IDL attribute of the <{meta}>
element must [=reflect=] the content attribute of the same name.
partial interface HTMLObjectElement {
[CEReactions] attribute DOMString align;
[CEReactions] attribute DOMString archive;
[CEReactions] attribute DOMString code;
[CEReactions] attribute boolean declare;
[CEReactions] attribute unsigned long hspace;
[CEReactions] attribute DOMString standby;
[CEReactions] attribute unsigned long vspace;
[CEReactions] attribute DOMString codeBase;
[CEReactions] attribute DOMString codeType;
[CEReactions, TreatNullAs=EmptyString] attribute DOMString border;
};
The align,
archive,
border,
code,
declare,
hspace,
standby, and
vspace IDL attributes of the <{object}>
element must [=reflect=] the respective content attributes of the same name.
The codeBase IDL attribute of the
<{object}> element must [=reflect=] the element's <{object/codebase}> content attribute,
which for the purposes of reflection is defined as containing a [=url/URL=].
The codeType IDL attribute of the
<{object}> element must [=reflect=] the element's <{object/codetype}> content attribute.
partial interface HTMLOListElement {
[CEReactions] attribute boolean compact;
};
The compact IDL attribute of the <{ol}>
element must [=reflect=] the content attribute of the same name.
partial interface HTMLParagraphElement {
[CEReactions] attribute DOMString align;
};
The align IDL attribute of the <{p}>
element must [=reflect=] the content attribute of the same name.
partial interface HTMLParamElement {
[CEReactions] attribute DOMString type;
[CEReactions] attribute DOMString valueType;
};
The type IDL attribute of the <{param}>
element must [=reflect=] the content attribute of the same name.
The valueType IDL attribute of the
<{param}> element must [=reflect=] the element's <{param/valuetype}> content attribute.
pre elements
in terms of semantics and for purposes of rendering. (The parser has special behavior for this
element, though.)
partial interface HTMLPreElement {
[CEReactions] attribute long width;
};
The width IDL attribute of the <{pre}>
element must [=reflect=] the content attribute of the same name.
partial interface HTMLScriptElement {
[CEReactions] attribute DOMString charset;
[CEReactions] attribute DOMString event;
[CEReactions] attribute DOMString htmlFor;
};
The charset IDL attribute of the
<{script}> element must reflect the element's charset content attribute.
The event IDL attribute of the
<{script}> element must reflect the element's <{script/event}> content attribute.
The htmlFor IDL attribute of the
<{script}> element must reflect the element's <{script/for}> content attribute.
partial interface HTMLTableElement {
[CEReactions] attribute DOMString align;
[CEReactions] attribute DOMString border;
[CEReactions] attribute DOMString frame;
[CEReactions] attribute DOMString rules;
[CEReactions] attribute DOMString summary;
[CEReactions] attribute DOMString width;
[CEReactions, TreatNullAs=EmptyString] attribute DOMString bgColor;
[CEReactions, TreatNullAs=EmptyString] attribute DOMString cellPadding;
[CEReactions, TreatNullAs=EmptyString] attribute DOMString cellSpacing;
};
The align,
border,
frame,
summary,
rules, and
width,
IDL attributes of the <{table}> element must [=reflect=] the respective content
attributes of the same name.
The bgColor IDL attribute of the
<{table}> element must [=reflect=] the element's <{table/bgcolor}> content attribute.
The cellPadding IDL attribute of the
<{table}> element must [=reflect=] the element's <{table/cellpadding}> content attribute.
The cellSpacing IDL attribute of the
<{table}> element must [=reflect=] the element's <{table/cellspacing}> content attribute.
partial interface HTMLTableSectionElement {
[CEReactions] attribute DOMString align;
[CEReactions] attribute DOMString ch;
[CEReactions] attribute DOMString chOff;
[CEReactions] attribute DOMString vAlign;
};
The align IDL attribute of the
<{tbody}>, <{thead}>, and <{tfoot}> elements must [=reflect=] the content attribute of the same
name.
The ch IDL attribute of the
<{tbody}>, <{thead}>, and <{tfoot}> elements must [=reflect=] the elements'
<{tablesection/char}> content attributes.
The chOff IDL attribute of the
<{tbody}>, <{thead}>, and <{tfoot}> elements must [=reflect=] the elements'
<{tablesection/charoff}> content attributes.
The vAlign IDL attribute of the
<{tbody}>, <{thead}>, and <{tfoot}> element must [=reflect=] the elements'
<{tablesection/valign}> content attributes.
partial interface HTMLTableCellElement {
[CEReactions] attribute DOMString align;
[CEReactions] attribute DOMString axis;
[CEReactions] attribute DOMString height;
[CEReactions] attribute DOMString width;
[CEReactions] attribute DOMString ch;
[CEReactions] attribute DOMString chOff;
[CEReactions] attribute boolean noWrap;
[CEReactions] attribute DOMString vAlign;
[CEReactions, TreatNullAs=EmptyString] attribute DOMString bgColor;
};
The align,
axis,
height,
and width IDL attributes of the
<{td}> and <{th}> elements must [=reflect=] the respective content attributes of the same name.
The ch IDL attribute of the <{td}>
and <{th}> elements must [=reflect=] the elements' <{tablecells/char}> content attributes.
The chOff IDL attribute of the <{td}>
and <{th}> elements must [=reflect=] the elements' <{tablecells/charoff}> content attributes.
The noWrap IDL attribute of the
<{td}> and <{th}> elements must [=reflect=] the elements' <{tablecells/nowrap}> content
attributes.
The vAlign IDL attribute of the
<{td}> and <{th}> elements must [=reflect=] the elements' <{tablecells/valign}> content
attributes.
The bgColor IDL attribute of the
<{td}> and <{th}> elements must [=reflect=] the elements' <{tablecells/bgcolor}> content
attributes.
partial interface HTMLTableRowElement {
[CEReactions] attribute DOMString align;
[CEReactions] attribute DOMString ch;
[CEReactions] attribute DOMString chOff;
[CEReactions] attribute DOMString vAlign;
[CEReactions, TreatNullAs=EmptyString] attribute DOMString bgColor;
};
The align IDL attribute of the <{tr}>
element must [=reflect=] the content attribute of the same name.
The ch IDL attribute of the <{tr}>
element must [=reflect=] the element's <{tr/char}> content attribute.
The chOff IDL attribute of the <{tr}>
element must [=reflect=] the element's <{tr/charoff}> content attribute.
The vAlign IDL attribute of the <{tr}>
element must [=reflect=] the element's <{tr/valign}> content attribute.
The bgColor IDL attribute of the
<{tr}> element must [=reflect=] the element's <{tr/bgcolor}> content attribute.
partial interface HTMLUListElement {
[CEReactions] attribute boolean compact;
[CEReactions] attribute DOMString type;
};
The compact and
type
IDL attributes of the <{ul}> element must [=reflect=] the respective content attributes of the
same name.
partial interface Document {
[CEReactions, TreatNullAs=EmptyString] attribute DOMString fgColor;
[CEReactions, TreatNullAs=EmptyString] attribute DOMString linkColor;
[CEReactions, TreatNullAs=EmptyString] attribute DOMString vlinkColor;
[CEReactions, TreatNullAs=EmptyString] attribute DOMString alinkColor;
[CEReactions, TreatNullAs=EmptyString] attribute DOMString bgColor;
[SameObject] readonly attribute HTMLCollection anchors;
[SameObject] readonly attribute HTMLCollection applets;
void clear();
void captureEvents();
void releaseEvents();
[SameObject] readonly attribute HTMLAllCollection all;
};
The attributes of the {{Document}} object listed in the first column of the following table must
[=reflect=] the content attribute on the <{body}> element with the name given in the
corresponding cell in the second column on the same row, if the <{body}> element is a <{body}>
element (as opposed to a <{frameset}> element). When there is no <{body}> element or if it is a
<{frameset}> element, the attributes must instead return the empty string on getting and do
nothing on setting.
| IDL attribute | Content attribute |
|---|---|
fgColor |
<{body/text}> |
linkColor |
<{body/link}> |
vlinkColor |
<{body/vlink}> |
alinkColor |
<{body/alink}> |
bgColor |
<{body/bgcolor}> |
anchors attribute must return an
{{HTMLCollection}} rooted at the {{Document}} node, whose filter matches only <{a}> elements with
<{a/name}> attributes.
The applets attribute must return an
{{HTMLCollection}} rooted at the {{Document}} node, whose filter matches nothing. (This exists
for historical reasons.)
The clear(),
captureEvents(), and
releaseEvents() methods must do nothing.
all attribute must return an
{{HTMLAllCollection}} rooted at the {{Document}} node, whose filter matches all elements.
The object returned for {{Document/all}} has several unusual behaviors:
* The user agent must act as if the [=ToBoolean=] abstract operator in JavaScript converts the
object returned for {{Document/all}} to the false value.
* The user agent must act as if the [=Abstract Equality Comparison=] algorithm, when given the
object returned for {{Document/all}}, returns true when compared to the undefined
and null values. (Comparisons using the [=Strict Equality Comparison=] algorithm,
and Abstract Equality comparisons to other values such as strings or objects, are unaffected.)
* The user agent must act such that the typeof operator in JavaScript returns the
string undefined when applied to the object returned for {{Document/all}}.
These requirements are a [=willful violation=] of the JavaScript specification current at the
time of writing. The JavaScript specification requires that ToBoolean return true for all
objects to the true value, and does not have provisions for objects acting as if they were
undefined for the purposes of certain operators. This violation is motivated by a
desire for compatibility with two classes of legacy content: one that uses the presence of
{{Document/all|document.all}} as a way to detect legacy user agents, and one that only supports
those legacy user agents and uses the {{Document/all|document.all}} object without testing for
its presence first. [[!ECMA-262]]
partial interface Window {
void captureEvents();
void releaseEvents();
[Replaceable, SameObject] readonly attribute External external;
};
The captureEvents() and
releaseEvents() methods must do nothing.
The external attribute of the {{Window}} interface
must return an instance of the {{External}} interface:
[NoInterfaceObject]
interface External {
void AddSearchProvider();
void IsSearchProviderInstalled();
};
The AddSearchProvider() and
IsSearchProviderInstalled() methods must do nothing.
This feature is in the process of being removed from the Web platform. (This is a long process that takes many years.) Using the plugins API at this time is highly discouraged.
Navigator implements NavigatorPlugins;
[NoInterfaceObject]
interface NavigatorPlugins {
[SameObject] readonly attribute PluginArray plugins;
[SameObject] readonly attribute MimeTypeArray mimeTypes;
boolean javaEnabled();
};
interface PluginArray {
void refresh(optional boolean reload = false);
readonly attribute unsigned long length;
getter Plugin? item(unsigned long index);
getter Plugin? namedItem(DOMString name);
};
interface MimeTypeArray {
readonly attribute unsigned long length;
getter MimeType? item(unsigned long index);
getter MimeType? namedItem(DOMString name);
};
interface Plugin {
readonly attribute DOMString name;
readonly attribute DOMString description;
readonly attribute DOMString filename;
readonly attribute unsigned long length;
getter MimeType? item(unsigned long index);
getter MimeType? namedItem(DOMString name);
};
interface MimeType {
readonly attribute DOMString type;
readonly attribute DOMString description;
readonly attribute DOMString suffixes; // comma-separated
readonly attribute Plugin enabledPlugin;
};
The plugins attribute must
return a PluginArray object.
The mimeTypes attribute must
return a MimeTypeArray object.
PluginArray object represents none, some, or all of the plugins supported by the user agent, each of which is represented by a Plugin object. Each of these Plugin
objects may be hidden plugins. A hidden plugin can't
be enumerated, but can still be inspected by using its name.
The fewer plugins are represented by the
PluginArray object, and of those, the more that are hidden, the more the user's privacy will be protected. Each exposed plugin
increases the number of bits that can be derived for fingerprinting. Hiding a plugin helps, but
unless it is an extremely rare plugin, it is likely that a site attempting 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 plugin at all is preferred.
Unfortunately, many legacy sites use this feature to determine, for example, which plugin to use
to play video. Not exposing any plugins at all might therefore not be entirely plausible.
PluginArray objects created by a user agent must not be live. The
set of plugins represented by the objects must not change once an object is created, except when
it is updated by the refresh() method.
Each plugin represented by a PluginArray can support a number of
MIME types. For each such plugin, the user agent must
pick one or more of these MIME types to be those that are
explicitly supported.
The explicitly supported MIME types of
a plugin are those that are exposed through the Plugin and MimeTypeArray interfaces. As with plugins themselves, any variation between users regarding what is exposed
allows sites to fingerprint users. User agents are therefore encouraged to expose the same MIME types for all users of a plugin, regardless of the
actual types supported... at least, within the constraints imposed by compatibility with legacy
content.
PluginArray object are the
numbers from zero to the number of non-hidden plugins represented by the object, if any.
The length attribute must return the
number of non-hidden plugins
represented by the object.
The item(unsigned long index) method of a
PluginArray object must return null if the argument is not one of the object's
supported property indices, and otherwise must return the result of running the
following steps, using the method's argument as index:
Plugin objects
representing the non-hidden plugins represented by the PluginArray object.name of each Plugin.It is important for privacy that the order of plugins not leak additional information, e.g., the order in which plugins were installed.
The supported property names of aPluginArray object are the values
of the name attributes of all the Plugin objects represented by the PluginArray object. The
properties exposed in this way must be unenumerable.
The namedItem(DOMString name) method of a
PluginArray object must return null if the argument is not one of the object's
supported property names, and otherwise must return the Plugin object, of those represented by the PluginArray
object, that has a name equal to the method's argument.
The refresh() method of the
PluginArray object of a Navigator object, when invoked, must check to
see if any plugins have been installed or reconfigured since the user
agent created the PluginArray object. If so, and the method's argument is true, then
the user agent must act as if the location.reload()
method was called instead. Otherwise, the user agent must update the PluginArray
object and MimeTypeArray object created for attributes of that Navigator
object, and the Plugin and MimeType objects created
for those PluginArray and MimeTypeArray objects, using the same Plugin objects for cases where the name is the same, and the same MimeType objects for
cases where the type is the same, and creating new objects
for cases where there were no matching objects immediately prior to the refresh() call. Old Plugin
and MimeType objects must continue to return the same values that they had prior to
the update, though naturally now the data is stale and may appear inconsistent (for example, an
old MimeType entry might list as its enabledPlugin a Plugin
object that no longer lists that MimeType as a supported MimeType).
MimeTypeArray object represents the MIME types
explicitly supported by plugins supported by the user
agent, each of which is represented by a MimeType object.
The MimeTypeArray objects created by a user agent must not be live.
The set of MIME types represented by the objects must not change once an object is created, except
when it is updated by the PluginArray object's refresh() method.
The supported property indices of a MimeTypeArray object are the
numbers from zero to the number of MIME types explicitly
supported by non-hidden plugins represented by the corresponding PluginArray object, if
any.
The length attribute must return the
number of MIME types explicitly supported by non-hidden plugins represented by the
corresponding PluginArray object, if any.
The item(unsigned long index) method of a
MimeTypeArray object must return null if the argument is not one of the object's
supported property indices, and otherwise must return the result of running the
following steps, using the method's argument as index:
MimeType objects representing the MIME types explicitly supported by non-hidden plugins represented by the corresponding
PluginArray object, if any.type of each MimeType.It is important for privacy that the order of MIME types not leak additional information, e.g., the order in which plugins were installed.
The supported property names of aMimeTypeArray object are the values
of the type attributes of all the MimeType
objects represented by the MimeTypeArray object. The properties exposed in this way
must be unenumerable.
The namedItem(DOMString name) method of a
MimeTypeArray object must return null if the argument is not one of the object's
supported property names, and otherwise must return the MimeType object
that has a type equal to the method's argument.
Plugin object represents a plugin. It has
several attributes to provide details about the plugin, and can be enumerated to obtain the list
of MIME types that it explicitly supports.
The Plugin objects created by a user agent must not be
live. The set of MIME types represented by the objects, and the values of the
objects' attributes, must not change once an object is created, except when updated by the
PluginArray object's refresh() method.
The reported MIME types for a Plugin object are the
MIME types explicitly supported by the corresponding
plugin when this object was last created or updated by
PluginArray.refresh(), whichever happened most recently.
The supported property indices of a Plugin object
are the numbers from zero to the number of reported MIME types.
The length attribute must return the number
of reported MIME types.
The item(unsigned long index) method of a Plugin object must return null if the argument is not one of the
object's supported property indices, and otherwise must return the result of running
the following steps, using the method's argument as index:
MimeType objects representing the
reported MIME types.type of each MimeType.It is important for privacy that the order of MIME types not leak additional information, e.g., the order in which plugins were installed.
The supported property names of aPlugin object are the values
of the type attributes of the MimeType objects representing the
reported MIME types. The properties exposed in this way must be unenumerable.
The namedItem(DOMString name) method of
a Plugin object must return null if the argument is not one of the
object's supported property names, and otherwise must return the
MimeType object that has a type equal to the method's argument.
The name attribute must return the
plugin's name.
The description and filename attributes must return user-agent-defined
(or, in all likelihood, plugin-defined) strings. In each case, the same string must
be returned each time, except that the strings returned may change when the PluginArray.refresh() method updates the object.
If the values returned by the description or filename attributes
vary between versions of a plugin, they can be used both as a fingerprinting vector
and, even more importantly, as a trivial way to determine what security vulnerabilities a
plugin (and thus a browser) may have. It is thus highly recommended that the
description attribute just return the same value as the name
attribute, and that the filename attribute return the empty string.
MimeType object represents a MIME type that is, or was,
explicitly supported by a plugin.
The MimeType objects created by a user agent must not be live. The
values of the objects' attributes must not change once an object is created, except when updated
by the PluginArray object's refresh() method.
The type attribute must return the
valid MIME type with no parameters describing the MIME type.
The description and
suffixes attributes must return
user-agent-defined (or, in all likelihood, plugin-defined) strings. In each case, the
same string must be returned each time, except that the strings returned may change when the PluginArray.refresh() method updates the object.
If the values returned by the description or suffixes
attributes vary between versions of a plugin, they can be used both as a
fingerprinting vector and, even more importantly, as a trivial way to determine what
security vulnerabilities a plugin (and thus a browser) may have. It is thus highly
recommended that the description attribute just return the same value as the
type attribute, and that the suffixes attribute return the
empty string.
Commas in the suffixes attribute are interpreted as separating
subsequent filename extensions, as in "htm,html".
enabledPlugin attribute must
return the Plugin object that represents the plugin
that explicitly supported the MIME type that this MimeType
object represents when this object was last created or updated by PluginArray.refresh(), whichever happened most
recently.
javaEnabled() attribute
must return true if the user agent supports a plugin that supports the MIME
type "application/x-java-vm"; otherwise it must return false.