attribute reflects the value of the tabIndex
content attribute. If the attribute
is not present (or has an invalid value) then the DOM attribute must
return the UA's default value for that element, which will be either 0
(for elements in the tab order) or -1 (for elements not in the tab order).
The scrollIntoView([top])
method, when called, must cause the
element on which the method was called to have the attention of the user
called to it.
In a speech browser, this could happen by having the current playback position move to the start of the given element.
In visual user agents, if the argument is present and has the value false, the user agent should scroll the element into view such that both the bottom and the top of the element are in the viewport, with the bottom of the element aligned with the bottom of the viewport. If it isn't possible to show the entire element in that way, or if the argument is omitted or is true, then the user agent must instead simply align the top of the element with the top of the viewport.
Non-visual user agents may ignore the argument, or may treat it in some media-specific manner most useful to the user.
html
elementhead
element followed by a body
element.
manifest
HTMLElement
.The html
element represents the root of
an HTML document.
The manifest
attribute gives the
address of the document's application cache manifest, if
there is one. If the attribute is present, the attribute's value must be a
valid URI (or IRI).
The manifest
attribute only has an
effect during the early stages of document load. Changing the
attribute dynamically thus has no effect (and thus, no DOM API is provided
for this attribute). Furthermore, as it is processed before any base
elements are seen, its value is not subject
to being made relative to any base URI.
Though it has absolutely no effect and no meaning, the html
element, in HTML
documents, may have an xmlns
attribute
specified, if, and only if, it has the exact value
"http://www.w3.org/1999/xhtml
". This does not apply to XML documents.
In HTML, the xmlns
attribute has
absolutely no effect. It is basically a talisman. It is allowed merely to
make migration to and from XHTML mildly easier. When parsed by an HTML parser, the attribute ends up in the null
namespace, not the "http://www.w3.org/2000/xmlns/
" namespace
like namespace declaration attributes in XML do.
In XML, an xmlns
attribute is part of
the namespace declaration mechanism, and an element cannot actually have
an xmlns
attribute in the null namespace specified.
head
elementhtml
element.
title
element.
HTMLElement
.
The head
element collects the
document's metadata.
title
elementhead
element containing no other
title
elements.
HTMLElement
.
The title
element represents the
document's title or name. Authors should use titles that identify their
documents even when they are used out of context, for example in a user's
history or bookmarks, or in search results. The document's title is often
different from its first header, since the first header does not have to
stand alone when taken out of context.
There must be no more than one title
element per document.
The title
element must not contain
any elements.
Here are some examples of appropriate titles, contrasted with the top-level headers that might be used on those same pages.
<title>Introduction to The Mating Rituals of Bees</title> ...
Introduction

This companion guide to the highly successful Introduction to Medieval Bee-Keeping book is...
The next page might be a part of the same site. Note how the title describes the subject matter unambiguously, while the first header assumes the reader knowns what the context is and therefore won't wonder if the dances are Salsa or Waltz:
<title>Dances used during bee mating rituals</title> ...
The Dances

The string to use as the document's title is given by the document.title
DOM attribute. User
agents should use the document's title when referring to the document in
their user interface.
base
elementhead
element containing no other
base
elements.
href
target
interface HTMLBaseElement : HTMLElement { attribute DOMString href; attribute DOMString target; };
The base
element allows authors to
specify the document's base URI for the purposes of resolving relative
URIs, and the name of the default browsing
context for the purposes of following
hyperlinks.
There must be no more than one base
element per document.
A base
element must have either an
href
attribute, a
target
attribute, or both.
The href
content
attribute, if specified, must contain a URI (or IRI).
A base
element, if it has an href
attribute, must come
before any other elements in the tree that have attributes with URIs
(except the html
element and its manifest
attribute).
User agents must use the value of the href
attribute of the first base
element that is both a child of the head
element and has an href
attribute, if there is such an element, as
the document entity's base URI for the purposes of section 5.1.1 of RFC
3986 ("Establishing a Base URI": "Base URI Embedded in Content"). This
base URI from RFC 3986 is referred to by the algorithm given in XML Base,
which is a normative part of this specification. [RFC3986]
If the base URI given by this attribute is a relative URI, it must be
resolved relative to the higher-level base URIs (i.e. the base URI from
the encapsulating entity or the URI used to retrieve the entity) to obtain
an absolute base URI. All xml:base
attributes must be ignored when resolving relative URIs in this href
attribute.
If there are multiple base
elements with href
attributes, all but
the first are ignored.
The target
attribute, if specified, must contain a valid browsing
context name. User agents use this name when following hyperlinks.
A base
element, if it has a target
attribute, must
come before any elements in the tree that represent hyperlinks.
The href
and target
DOM attributes
must reflect the content attributes of the same
name.
link
elementnoscript
element that is a
child of a head
element.
href
rel
media
hreflang
type
title
attribute has special semantics on this
element.
interface HTMLLinkElement : HTMLElement { attribute boolean disabled; attribute DOMString href; attribute DOMString rel; readonly attribute DOMTokenList relList; attribute DOMString media; attribute DOMString hreflang; attribute DOMString type; };
The LinkStyle
interface must also be implemented by this
element, the styling processing model defines
how. [CSSOM]
The link
element allows authors to link
their document to other resources.
The destination of the link is given by the href
attribute, which must be
present and must contain a URI (or IRI). If the href
attribute is absent,
then the element does not define a link.
The type of link indicated (the relationship) is given by the value of
the rel
attribute,
which must be present, and must have a value that is a set of space-separated tokens. The allowed values and their meanings are defined in a
later section. If the rel
attribute is absent, or if the value used is
not allowed according to the definitions in this specification, then the
element does not define a link.
Two categories of links can be created using the link
element. Links to external resources are links to resources
that are to be used to augment the current document, and hyperlink links are links to other documents. The link types section defines whether a particular link
type is an external resource or a hyperlink. One element can create
multiple links (of which some might be external resource links and some
might be hyperlinks). User agents should process the links on a per-link
basis, not a per-element basis.
The exact behaviour for links to external resources depends on the exact relationship, as defined for the relevant link type. Some of the attributes control whether or not the external resource is to be applied (as defined below). For external resources that are represented in the DOM (for example, style sheets), the DOM representation must be made available even if the resource is not applied. (However, user agents may opt to only fetch such resources when they are needed, instead of pro-actively downloading all the external resources that are not applied.)
Interactive user agents should provide users with a means to follow the hyperlinks
created using the link
element, somewhere
within their user interface. The exact interface is not defined by this
specification, but it should include the following information (obtained
from the element's attributes, again as defined below), in some form or
another (possibly simplified), for each hyperlink created with each
link
element in the document:
rel
attribute)
title
attribute).
href
attribute).
hreflang
attribute).
media
attribute).
User agents may also include other information, such as the type of the
resource (as given by the type
attribute).
The media
attribute says which media the resource applies to. The value must be a
valid media query. [MQ]
If the link is a hyperlink then the media
attribute is purely advisory, and
describes for which media the document in question was designed.
However, if the link is an external resource link,
then the media
attribute is prescriptive. The user agent must only apply the external
resource to views while their state match
the listed media.
The default, if the media
attribute is omitted, is all
,
meaning that by default links apply to all media.
The hreflang
attribute on the
link
element has the same semantics as
the hreflang
attribute on hyperlink
elements.
The type
attribute
gives the MIME type of the linked resource. It is purely advisory. The
value must be a valid MIME type, optionally with parameters. [RFC2046]
For external resource links, user agents may use the type given in this attribute to decide whether or not to consider using the resource at all. If the UA does not support the given MIME type for the given link relationship, then the UA may opt not to download and apply the resource.
User agents must not consider the type
attribute authoritative — upon fetching
the resource, user agents must not use metadata included in the link to
the resource to determine its type.
If the attribute is omitted, then the UA must fetch the resource to determine its type and thus determine if it supports (and can apply) that external resource.
If a document contains three style sheet links labelled as follows:
<link rel="stylesheet" href="A" type="text/css"> <link rel="stylesheet" href="B" type="text/plain"> <link rel="stylesheet" href="C">
...then a compliant UA that supported only CSS style sheets would fetch
the A and C files, and skip the B file (since text/plain
is
not the MIME type for CSS style sheets). For these two files, it would
then check the actual types returned by the UA. For those that are sent
as text/css
, it would apply the styles, but for those
labelled as text/plain
, or any other type, it would not.
The title
attribute gives the title of the link. With one exception, it is purely
advisory. The value is text. The exception is for style sheet links, where
the title
attribute defines alternative style sheet sets.
The title
attribute on link
elements differs from the global title
attribute of most other
elements in that a link without a title does not inherit the title of the
parent element: it merely has no title.
Some versions of HTTP defined a Link:
header, to
be processed like a series of link
elements. When processing links, those must be taken into consideration as
well. For the purposes of ordering, links defined by HTTP headers must be
assumed to come before any links in the document, in the order that they
were given in the HTTP entity header. Relative URIs in these headers must
be resolved according to the rules given in HTTP, not relative to base
URIs set by the document (e.g. using a base
element or xml:base
attributes). [RFC2616] [RFC2068]
The DOM attributes href
, rel
, media
, hreflang
, and type
each must reflect the respective content attributes of the same
name.
The DOM attribute relList
must reflect the rel
content attribute.
The DOM attribute disabled
only applies to style
sheet links. When the link
element
defines a style sheet link, then the disabled
attribute behaves as defined for the alternative style
sheets DOM. For all other link
elements it always return false and does nothing on setting.
meta
elementcharset
attribute is present: as the first
element in a head
element.
http-equiv
attribute is present: in a
head
element.
http-equiv
attribute is present: in a
noscript
element that is a child of
a head
element.
name
attribute is present: where metadata content is
expected.
name
http-equiv
content
charset
(HTML only)
interface HTMLMetaElement : HTMLElement { attribute DOMString content; attribute DOMString name; attribute DOMString httpEquiv; };
The meta
element represents various
kinds of metadata that cannot be expressed using the title
, base
,
link
, style
, and script
elements.
The meta
element can represent
document-level metadata with the name
attribute, pragma directives with the http-equiv
attribute, and the file's character encoding declaration when an HTML
document is serialised to string form (e.g. for transmission over the
network or for disk storage) with the charset
attribute.
Exactly one of the name
, http-equiv
, and charset
attributes
must be specified.
If either name
or
http-equiv
is specified, then the content
attribute
must also be specified. Otherwise, it must be omitted.
The charset
attribute may only be specified in HTML
documents, it must not be used in XML
documents. If the charset
attribute is specified, the element
must be the first element in the head
element of the file.
The content
attribute gives the value of the document metadata or pragma directive
when the element is used for those purposes. The allowed values depend on
the exact context, as described in subsequent sections of this
specification.
If a meta
element has a name
attribute, it sets document
metadata. Document metadata is expressed in terms of name/value pairs, the
name
attribute on
the meta
element giving the name, and
the content
attribute on the same element giving the value. The name specifies what
aspect of metadata is being set; valid names and the meaning of their
values are described in the following sections. If a meta
element has no content
attribute,
then the value part of the metadata name/value pair is the empty string.
If a meta
element has the http-equiv
attribute specified, it must be either in a head
element or in a noscript
element that itself is in a head
element. If a meta
element does not have the http-equiv
attribute specified, it must be in a head
element.
The DOM attributes name
and content
must reflect the respective content attributes of the same
name. The DOM attribute httpEquiv
must reflect the
content attribute http-equiv
.
This specification defines a few names for the name
attribute of the
meta
element.
The value must be a free-form string that identifies the software used to generate the document. This value must not be used on hand-authored pages. WYSIWYG editors have additional constraints on the value used with this metadata name.
The value must be an ordered set of unique space-separated tokens, each word of which is a host name. The list allows authors to provide a list of host names that the user is expected to subsequently need. User agents may, according to user preferences and prevailing network conditions, pre-emptively resolve the given DNS names (extracting the names from the value using the rules for splitting a string on spaces), thus precaching the DNS information for those hosts and potentially reducing the time between page loads for subsequent user interactions. Higher priority should be given to host names given earlier in the list.
Extensions to the predefined set of metadata names may be registered in the WHATWG Wiki MetaExtensions page.
Anyone is free to edit the WHATWG Wiki MetaExtensions page at any time to add a type. These new names must be specified with the following information:
The actual name being defined. The name should not be confusingly similar to any other defined name (e.g. differing only in case).
A short description of what the metadata name's meaning is, including the format the value is required to be in.
A list of other names that have exactly the same processing requirements. Authors should not use the names defined to be synonyms, they are only intended to allow user agents to support legacy content.
One of the following:
If a metadata name is added with the "proposal" status and found to be redundant with existing values, it should be removed and listed as a synonym for the existing value.
Conformance checkers must use the information given on the WHATWG Wiki MetaExtensions page to establish if a value not explicitly defined in this specification is allowed or not. When an author uses a new type not defined by either this specification or the Wiki page, conformance checkers should offer to add the value to the Wiki, with the details described above, with the "proposal" status.
This specification does not define how new values will get approved. It is expected that the Wiki will have a community that addresses this.
Metadata names whose values are to be URIs must not be proposed or
accepted. Links must be represented using the link
element, not the meta
element.
When the http-equiv
attribute is
specified on a meta
element, the element
is a pragma directive.
The http-equiv
attribute is an
enumerated attribute. The following table lists
the keywords defined for this attribute. The states given in the first
cell of the the rows with keywords give the states to which those keywords
map.
| State | Keywords |
|---|---|
| Refresh | refresh
|
| Default style | default-style
|
When a meta
element is inserted into
the document, if its http-equiv
attribute is present and
represents one of the above states, then the user agent must run the
algorithm appropriate for that state, as described in the following list:
If another meta
element in the Refresh state
has already been successfully processed (i.e. when it was inserted the
user agent processed it and reached the last step of this list of
steps), then abort these steps.
If the meta
element has no content
attribute, or if that attribute's value is the empty string, then
abort these steps.
Let input be the value of the element's content
attribute.
Let position point at the first character of input.
Collect a sequence of characters in the range U+0030 DIGIT ZERO to U+0039 DIGIT NINE, and parse the resulting string using the rules for parsing non-negative integers. If the sequence of characters collected is the empty string, then no number will have been parsed; abort these steps. Otherwise, let time be the parsed number.
Collect
a sequence of characters in the range U+0030 DIGIT ZERO to U+0039
DIGIT NINE and U+002E FULL STOP (".
"). Ignore
any collected characters.
Let url be the address of the current page.
If the character in input pointed to by position is a U+003B SEMICOLON (";
"), then advance position to the
next character. Otherwise, jump to the last step.
If the character in input pointed to by position is one of U+0055 LATIN CAPITAL LETTER U or U+0075 LATIN SMALL LETTER U, then advance position to the next character. Otherwise, jump to the last step.
If the character in input pointed to by position is one of U+0052 LATIN CAPITAL LETTER R or U+0072 LATIN SMALL LETTER R, then advance position to the next character. Otherwise, jump to the last step.
If the character in input pointed to by position is one of U+004C LATIN CAPITAL LETTER L or U+006C LATIN SMALL LETTER L, then advance position to the next character. Otherwise, jump to the last step.
If the character in input pointed to by position is a U+003D EQUALS SIGN ("=
"), then advance position to the
next character. Otherwise, jump to the last step.
Let url be equal to the substring of input from the character at position to the end of the string.
Strip any trailing space characters from the end of url.
Strip any U+0009 CHARACTER TABULATION, U+000A LINE FEED (LF), and U+000D CARRIAGE RETURN (CR) characters from url.
Resolve the url value to an absolute URI using
the base URI of the meta
element.
Set a timer so that in time seconds, if the user has not canceled the redirect, the user agent navigates to url, with replacement enabled.
For meta
elements in the Refresh state,
the content
attribute must have a value consisting either of:
;
), followed by one or more space characters, followed by
either a U+0055 LATIN CAPITAL LETTER U or a U+0075 LATIN SMALL LETTER
U, a U+0052 LATIN CAPITAL LETTER R or a U+0072 LATIN SMALL LETTER R, a
U+004C LATIN CAPITAL LETTER L or a U+006C LATIN SMALL LETTER L, a
U+003D EQUALS SIGN (=
), and then a valid URI (or
IRI).
In the former case, the integer represents a number of seconds before the page is to be reloaded; in the latter case the integer represents a number of seconds before the page is to be replaced by the page at the given URI.
The meta
element may also be used to
provide UAs with character encoding information for HTML files, by setting the charset
attribute to the name
of a character encoding. This is called a character encoding declaration.
The following restrictions apply to character encoding declarations:
If the document does not start with a BOM, and if its encoding is not
explicitly given by Content-Type metadata, then the character encoding
used must be a superset of US-ASCII (specifically, ANSI_X3.4-1968) for
bytes in the range 0x09 - 0x0D, 0x20, 0x21, 0x22, 0x26, 0x27, 0x2C - 0x3F,
0x41 - 0x5A, and 0x61 - 0x7A
,
and, in addition, if that encoding isn't US-ASCII itself, then the
encoding must be specified using a meta
element with a charset
attribute.
Authors should not use JIS_X0212-1990, x-JIS0208, and encodings based on EBCDIC. Authors should not use UTF-32. Authors must not use the CESU-8, UTF-7, BOCU-1 and SCSU encodings. [CESU8] [UTF7] [BOCU1] [SCSU]
Authors are encouraged to use UTF-8. Conformance checkers may advise against authors using legacy encodings.
In XHTML, the XML declaration should be used for inline character encoding information, if necessary.
style
elementscoped
attribute is present: prose content.
scoped
attribute is absent: where metadata content is expected.
scoped
attribute is absent: in a noscript
element that is a child of a
head
element.
scoped
attribute is present: where prose content is expected, but before any sibling
elements other than style
elements and
before any text nodes other than inter-element
whitespace.
type
attribute.
media
type
scoped
title
attribute has special semantics on this
element.
interface HTMLStyleElement : HTMLElement { attribute booleandisabled
; attribute DOMStringmedia
; attribute DOMStringtype
; attribute booleanscoped
; };
The LinkStyle
interface must also be implemented by this
element, the styling processing model defines
how. [CSSOM]
The style
element allows authors to
embed style information in their documents. The style
element is one of several inputs to the styling processing model.
If the type
attribute is given, it must contain a valid MIME type, optionally with
parameters, that designates a styling language. [RFC2046] If the attribute is absent, the type
defaults to text/css
. [RFC2138]
When examining types to determine if they support the language, user agents must not ignore unknown MIME parameters — types with unknown parameters must be assumed to be unsupported.
The media
attribute says which media the styles apply to. The value must be a valid
media query. [MQ] User agents must only apply the
styles to views while their state match the listed media. [DOM3VIEWS]
The default, if the media
attribute is
omitted, is all
, meaning that by default styles apply to all
media.
The scoped
attribute is a boolean attribute. If the attribute
is present, then the user agent must only apply the specified style
information to the style
element's
parent element (if any), and that element's child nodes. Otherwise, the
specified styles must, if applied, be applied to the entire document.

If the scoped
attribute is specified, then the style
element must be the child of a prose content element, before any text nodes other than
inter-element whitespace, and before any
elements other than other style
elements.
The title
attribute on style
elements defines alternative style sheet sets. If the style
element has no title
attribute, then
it has no title; the title
attribute of ancestors does not apply to
the style
element.
The title
attribute on style
elements, like the title
attribute on
link
elements, differs from the global
title
attribute in that
a style
block without a title does not
inherit the title of the parent element: it merely has no title.
All descendant elements must be processed, according to their semantics,
before the style
element itself is
evaluated. For styling languages that consist of pure text, user agents
must evaluate style
elements by passing
the concatenation of the contents of all the text nodes that are direct children of the style
element (not any other nodes such as
comments or elements), in tree order, to the
style system. For XML-based styling languages, user agents must pass all
the children nodes of the style
element
to the style system.
This specification does not specify a style system, but CSS is expected to be supported by most Web browsers. [CSS21]
The media
, type
and scoped
DOM attributes must reflect the respective content attributes of the same
name.
The DOM disabled
attribute behaves as
defined for the
alternative style sheets DOM.
The link
and style
elements can provide styling information
for the user agent to use when rendering the document. The DOM Styling
specification specifies what styling information is to be used by the user
agent and how it is to be used. [CSSOM]
The style
and link
elements implement the LinkStyle
interface. [CSSOM]
For style
elements, if the user agent
does not support the specified styling language, then the sheet
attribute of the element's
LinkStyle
interface must return null. Similarly, link
elements that do not represent external resource links that
contribute to the styling processing model (i.e. that do not have a
stylesheet
keyword in their rel
attribute), and link
elements whose
specified resource has not yet been downloaded, or is not in a supported
styling language, must have their LinkStyle
interface's sheet
attribute return null.
Otherwise, the LinkStyle
interface's sheet
attribute must return a
StyleSheet
object with the attributes implemented as follows:
[CSSOM]
type
DOM
attribute)
The content type must be the same as the style's specified type. For
style
elements, this is the same as
the type
content
attribute's value, or text/css
if that is omitted.
For link
elements, this is the Content-Type metadata of the
specified resource.
href
DOM
attribute)
For link
elements, the location must
be the URI given by the element's href
content attribute. For style
elements, there is no location.
media
DOM attribute)
The media must be the same as the value of the element's media
content attribute.
title
DOM attribute)
The title must be the same as the value of the element's title
content attribute. If the attribute is absent,
then the style sheet does not have a title. The title is used for
defining alternative style sheet sets.
The disabled
DOM attribute on
link
and style
elements must return false and do nothing
on setting, if the sheet
attribute
of their LinkStyle
interface is null. Otherwise, it must
return the value of the StyleSheet
interface's disabled
attribute on getting, and
forward the new value to that same attribute on setting.
Some elements, for example address
elements, are scoped to their nearest
ancestor sectioning content. For such elements x, the
elements that apply to a sectioning content
element e are all the x elements
whose nearest sectioning content ancestor is
e.
body
elementhtml
element.
HTMLElement
.
The body
element represents the main
content of the document.
In conforming documents, there is only one body
element. The document.body
DOM
attribute provides scripts with easy access to a document's body
element.
Some DOM operations (for example, parts of the drag and drop model) are defined in terms of "the body element". This refers to a particular
element in the DOM, as per the definition of the term, and not any
arbitrary body
element.
section
elementHTMLElement
.
The section
element represents a
generic document or application section. A section, in this context, is a
thematic grouping of content, typically with a header, possibly with a
footer.
Examples of sections would be chapters, the various tabbed pages in a tabbed dialog box, or the numbered sections of a thesis. A Web site's home page could be split into sections for an introduction, news items, contact information.
nav
elementHTMLElement
.
The nav
element represents a section of
a page that links to other pages or to parts within the page: a section
with navigation links.
article
elementHTMLElement
.
The article
element represents a
section of a page that consists of a composition that forms an independent
part of a document, page, or site. This could be a forum post, a magazine
or newspaper article, a Web log entry, a user-submitted comment, or any
other independent item of content.
An article
element is
"independent" in that its contents could stand alone, for example in
syndication. However, the element is still associated with its ancestors;
for instance, contact information that applies to a parent body
element still covers the article
as well.
When article
elements are nested,
the inner article
elements represent
articles that are in principle related to the contents of the outer
article. For instance, a Web log entry on a site that accepts
user-submitted comments could represent the comments as article
elements nested within the article
element for the Web log entry.
Author information associated with an article
element (q.v. the address
element) does not apply to nested
article
elements.
blockquote
elementcite
interface HTMLQuoteElement : HTMLElement { attribute DOMString cite; };
The HTMLQuoteElement
interface is also
used by the q
element.
The blockquote
element represents
a section that is quoted from another source.
Content inside a blockquote
must
be quoted from another source, whose URI, if it has one, should be cited
in the cite
attribute.
If the cite
attribute is present, it must be a URI (or IRI). User agents should allow
users to follow such citation links.
If a blockquote
element is preceded or followed by a paragraph that contains a single cite
element and is itself not preceded or followed by another blockquote
element and does not itself have
a q
element descendant, then, the citation
given by that cite
element gives the
source of the quotation contained in the blockquote
element.
The cite
DOM
attribute reflects
the element's cite
content attribte.
The best way to represent a conversation is not with the
cite
and blockquote
elements, but with the dialog
element.
aside
elementHTMLElement
.
The aside
element represents a section
of a page that consists of content that is tangentially related to the
content around the aside
element, and
which could be considered separate from that content. Such sections are
often represented as sidebars in printed typography.
h1
, h2
, h3
, h4
, h5
, and h6
elementsHTMLElement
.
These elements define headers for their sections.
The semantics and meaning of these elements are defined in the section on headings and sections.
These elements have a rank given by the number in
their name. The h1
element is said to have
the highest rank, the h6
element has the
lowest rank, and two elements with the same name have equal rank.
header
elementheader
element descendants, and no footer
element descendants.
HTMLElement
.
The header
element represents the
header of a section. Headers may contain more than just the section's
heading — for example it would be reasonable for the header to
include version history information.
For the purposes of document summaries, outlines, and the like, header
elements are equivalent to the highest ranked h1
-h6
element
descendant of the header
element (the
first such element if there are multiple elements with that rank).
Other heading elements in the header
element indicate subheadings or subtitles.
Here are some examples of valid headers. In each case, the emphasised text represents the text that would be used as the header in an application extracting header data and ignoring subheadings.

The reality dysfunction

Space is not the only void

Welcome to...

Voidwars!

Scalable Vector Graphics (SVG) 1.2

W3C Working Draft 27 October 2004

This version:

http://www.w3.org/TR/2004/WD-SVG12-20041027/

Previous version:

http://www.w3.org/TR/2004/WD-SVG12-20040510/

Latest version of SVG 1.2:

http://www.w3.org/TR/SVG12/

Latest SVG Recommendation:

http://www.w3.org/TR/SVG/

Editor:

Dean Jackson, W3C, <a href="mailto:dean<EMAIL_ADDRESS>
Authors:

See Author List

<a href="http://www.w3.org/Consortium/Legal/ipr-notic ...
The section on headings and sections defines
how header
elements are assigned to
individual sections.
The rank of a header
element is the same as for an h1
element (the highest rank).
footer
elementfooter
element descendants.
HTMLElement
.
The footer
element represents the
footer for the section it applies to. A
footer typically contains information about its section such as who wrote
it, links to related documents, copyright data, and the like.
Contact information for the section given in a footer
should be marked up using the address
element.
address
elementfooter
element descendants, and no address
element descendants.
HTMLElement
.
The address
element represents the
contact information for the section it applies to.
For example, a page at the W3C Web site related to HTML might include the following contact information:
<ADDRESS> Dave Raggett, Arnaud Le Hors, contact persons for the W3C HTML Activity </ADDRESS>
The address
element must not be used
to represent arbitrary addresses (e.g. postal addresses), unless those
addresses are contact information for the section. (The p
element is the appropriate element for marking up
such addresses.)
The address
element must not contain
information other than contact information.
For example, the following is non-conforming use of the address
element:
<ADDRESS>Last Modified: 1999/12/24 23:37:50</ADDRESS>
Typically, the address
element would
be included with other information in a footer
element.
To determine the contact information for a sectioning element (such as a
document's body
element, which would
give the contact information for the page), UAs must collect all the
address
elements that apply to that sectioning element and its
ancestor sectioning elements. The contact information is the collection of
all the information given by those elements.
Contact information for one sectioning element, e.g. an
aside
element, does not apply to its
ancestor elements, e.g. the page's body
.
The h1
-h6
elements and the header
element are
headings.
The first element of heading content in an element of sectioning content gives the header for that section. Subsequent headers of equal or higher rank start new (implied) sections, headers of lower rank start subsections that are part of the previous one.
Sectioning elements other than blockquote
are always considered subsections
of their nearest ancestor element of sectioning
content, regardless of what implied sections other headings may have
created. However, blockquote
elements are associated with implied sections. Effectively,
blockquote
elements act like
sections on the inside, and act opaquely on the outside.
For the following fragment:

Foo

Bar

Bla

Baz

Quux

Thud

Grunt

...the structure would be:
body
section)
blockquote
section)
section
section)
Notice how the blockquote
nests
inside an implicit section while the section
does not (and in fact, ends the
earlier implicit section so that a later paragraph is back at the top
level).
Sections may contain headers of any rank, but
authors are strongly encouraged to either use only h1
elements, or to use elements of the appropriate
rank for the section's nesting level.
Authors are also encouraged to explictly wrap sections in elements of sectioning content, instead of relying on the implicit sections generated by having multiple heading in one element of sectioning content.
For example, the following is correct:

Apples

Apples are fruit.

Taste

They taste lovely.

Sweet

Red apples are sweeter than green ones.

Color

Apples come in various colors.

However, the same document would be more clearly expressed as:

Apples

Apples are fruit.

Taste

They taste lovely.

Sweet

Red apples are sweeter than green ones.

Color

Apples come in various colors.

Both of the documents above are semantically identical and would produce the same outline in compliant user agents.
This section will be rewritten at some point. The algorithm likely won't change, but its description will be dramatically simplified.
Documents can be viewed as a tree of sections, which defines how each element in the tree is semantically related to the others, in terms of the overall section structure. This tree is related to the document tree, but there is not a one-to-one relationship between elements in the DOM and the document's sections.
The tree of sections should be used when generating document outlines, for example when generating tables of contents.
To derive the tree of sections from the document tree, a hypothetical
tree is used, consisting of a view of the document tree containing only
the elements of heading content and the elements
of sectioning content other than blockquote
. Descendants of h1
-h6
, header
, and blockquote
elements must be removed from
this view.
The hypothetical tree must be rooted at the root
element or at an element of sectioning
content. In particular, while the sections inside blockquote
s do not contribute to the
document's tree of sections, blockquote
s can have outlines of their own.
UAs must take this hypothetical tree (which will become the outline) and mutate it by walking it depth first in tree order and, for each element of heading content that is not the first element of its parent sectioning content element, inserting a new element of sectioning content, as follows:
header
element,
or if it is an h1
-h6
node of rank equal to or
higher than the first element in the parent element of sectioning content (assuming that is also an
h1
-h6
node), or if the first element of the parent element of sectioning content is an element of sectioning content:
header
element, or
h1
-h6
of
equal or higher rank, whichever comes first, into the
new element of sectioning content, then insert
the new element of sectioning content where
the current header was.
The outline is then the resulting hypothetical tree. The ranks of the headers become irrelevant at this point: each element of sectioning content in the hypothetical tree contains either no or one heading element child. If there is one, then it gives the section's heading, of there isn't, the section has no heading.
Sections are nested as in the hypothetical tree. If a sectioning element is a child of another, that means it is a subsection of that other section.
When creating an interactive table of contents, entries should jump the user to the relevant section element, if it was a real element in the original document, or to the heading, if the section element was one of those created during the above process.
Selecting the first section of the document therefore
always takes the user to the top of the document, regardless of where the
first header in the body
is to be found.
The hypothetical tree (before mutations) could be generated by creating
a TreeWalker
with the following NodeFilter
(described here as an anonymous ECMAScript function). [DOMTR] [ECMA262]
function (n) { // This implementation only knows about HTML elements. // An implementation that supports other languages might be // different.  The algorithm likely won't change, but its description will be dramatically simplified.
Given a particular node, user agents must use the following algorithm, in the given order, to determine which heading and section the node is most closely associated with. The processing of this algorithm must stop as soon as the associated section and heading are established (even if they are established to be nothing).
header
element, then the associated heading is
the most distant such ancestor. The associated section is that header
's associated section (i.e. repeat this
algorithm for that header
).
h1
-h6
element, then
the associated heading is the most distant such ancestor. The associated
section is that heading's section (i.e. repeat this algorithm for that
heading element).
h1
-h6
element or a header
element, then the associated heading is
the element itself. The UA must then generate the hypothetical section tree described in the previous
section, rooted at the nearest section ancestor (or the root element if there is no such ancestor). If
the parent of the heading in that hypothetical tree is an element in the
real document tree, then that element is the associated section.
Otherwise, there is no associated section element.
h1
-h6
element or a header
element, then that
element is the associated heading. Otherwise, there is no associated
heading element.
footer
or address
element, then the associated section
is the nearest ancestor element of sectioning
content, if there is one. The node's associated heading is the same
as that element of sectioning content's
associated heading (i.e. repeat this algorithm for that element of sectioning content). If there is no ancestor
element of sectioning content, the element has
no associated section nor an associated heading.
h1
-h6
elements, header
elements, the node
itself, and elements of sectioning content
other than blockquote
elements.
(Descendants of any of the nodes in this view can be ignored, as can any
node later in the tree than the node in question, as the algorithm below
merely walks backwards up this view.)
h1
or header
element, then return that element as the answer.
h2
-h6
element, and
heading candidates are not being searched for, then return that element
as the answer.
h2
-h6
element, and
either c is still null, or c is
a heading of lower rank than this one, then set
c to be this element, and continue going backwards
through the previous siblings.
h1
-h6
element or a
header
element, then the associated
heading is that element and the associated section is that heading
element's associated section (i.e. repeat this algorithm for that
heading).
Not all nodes have an associated header or section. For example, if a section is implied, as when multiple headers are found in one element of sectioning content, then a node in that section has an anonymous associated section (its section is not represented by a real element), and the algorithm above does not associate that node with any particular element of sectioning content.
For the following fragment:

X

X

X

X

Text Node A

X

Text Node B

The associations are as follows (not all associations are shown):
| Node | Associated heading | Associated section |
|---|---|---|

|

|
|

|

|
|

|

| None. |

|

| None. |

|

|

|

|

| None. |
Text Node A
|

| None. |
Text Node B
|

|
|
Given the hypothetical section tree, but
ignoring any sections created for nav
and
aside
elements, and any of their
descendants, if the root of the tree is the
body
element's section, and it has only a single
subsection which is created by an article
element, then the header of the body
element should be assumed to
be a site-wide header, and the header of the article
element should be assumed to be the
page's header.
If a page starts with a heading that is common to the whole site, the
document must be authored such that, in the document's hypothetical section tree, ignoring any sections
created for nav
and aside
elements and any of their descendants, the
root of the tree is the body
element's section, its heading is the site-wide heading, the body
element has just one
subsection, that subsection is created by an article
element, and that article
's header is the page heading.
If a page does not contain a site-wide heading, then the page must be
authored such that, in the document's hypothetical
section tree, ignoring any sections created for nav
and aside
elements and any of their descendants, either the
body
element has no subsections, or it has more than one
subsection, or it has a single subsection but that subsection is not
created by an article
element.
Conceptually, a site is thus a document with many articles — when those articles are split into many pages, the heading of the original single page becomes the heading of the site, repeated on every page.
p
elementHTMLElement
.
The p
element represents a paragraph.
The following examples are conforming HTML fragments:

The little kitten gently seated himself on a piece of carpet. Later in his life, this would be referred to as the time the cat sat on the mat.

<fieldset> <legend>Personal information</legend>
 Name: <input name="n"> <input name="anon" type="checkbox"> Hide from other users

Address: <textarea name="a"></textarea>
 </fieldset>

There was once an example from Femley,
 Whose markup was of dubious quality.
 The validator complained,
 So the author was pained,
 To move the error from the markup to the rhyming.

The p
element should not be used when a
more specific element is more appropriate.
The following example is technically correct:

Last modified: 2001-04-23

Author<EMAIL_ADDRESS>

However, it would be better marked-up as:

  Last modified: 2001-04-23 <address>Author<EMAIL_ADDRESS>

Or:

Last modified: 2001-04-23
 <address>Author<EMAIL_ADDRESS>

hr
elementHTMLElement
.
The hr
element represents a paragraph-level thematic break, e.g. a scene change
in a story, or a transition to another topic within a section of a
reference book.
br
elementHTMLElement
.
The br
element represents a line break.
br
elements must be empty. Any content
inside br
elements must not be considered
part of the surrounding text.
br
elements must only be used for line
breaks that are actually part of the content, as in poems or addresses.
The following example is correct usage of the br
element:

P. Sherman
 42 Wallaby Way
 Sydney

br
elements must not be used for
separating thematic groups in a paragraph.
The following examples are non-conforming, as they abuse the br
element:

34 comments.
 Add a comment.

Name: <input name="name">
 Address: <input name="address">

Here are alternatives to the above, which are correct:

34 comments.

Add a comment.

Name: <input name="name">

Address: <input name="address">

If a paragraph consists of nothing but a single
br
element, it represents a placeholder
blank line (e.g. as in a template). Such blank lines must not be used for
presentation purposes.
dialog
elementdt
and dd
elements.
HTMLElement
.
The dialog
element represents a
conversation.
Each part of the conversation must have an explicit talker (or speaker)
given by a dt
element, and a discourse (or
quote) given by a dd
element.
This example demonstrates this using an extract from Abbot and Costello's famous sketch, Who's on first:
<dialog>
 Costello
 Look, you gotta first baseman?
 Abbott
 Certainly.
 Costello
 Who's playing first?
 Abbott
 That's right.
 Costello
 When you pay off the first baseman every month, who gets the money?
 Abbott
 Every dollar of it. </dialog>
Text in a dt
element in a
dialog
element is implicitly the source
of the text given in the following dd
element, and the contents of the dd
element
are implicitly a quote from that speaker. There is thus no need to include
cite
, q
,
or blockquote
elements in this
markup. Indeed, a q
element inside a
dd
element in a conversation would actually
imply the people talking were themselves quoting someone else. See the
cite
, q
,
and blockquote
elements for other
ways to cite or quote.
pre
elementHTMLElement
.
The pre
element represents a block of
preformatted text, in which structure is represented by typographic
conventions rather than by elements.
Some examples of cases where the pre
element could be used:
To represent a block of computer code, the pre
element can be used with a code
element; to represent a block of computer
output the pre
element can be used with a
samp
element. Similarly, the kbd
element can be used within a pre
element to indicate text that the user is to
enter.
In the following snippet, a sample of computer code is presented.

This is the Panel constructor:

function Panel(element, canClose, closeHandler) { this.element = element; this.canClose = canClose; this.closeHandler = function () { if (closeHandler) closeHandler() }; }

In the following snippet, samp
and
kbd
elements are mixed in the contents of
a pre
element to show a session of Zork
I.

<samp>You are in an open field west of a big white house with a boarded front door. There is a small mailbox here. ></samp> open mailbox <samp>Opening the mailbox reveals: A leaflet. ></samp>

The following shows a contemporary poem that uses the pre
element to preserve its unusual formatting,
which forms an intrinsic part of the poem itself.

 maxling it is with a heart heavy that i admit loss of a feline so loved a friend lost to the unknown (night) ~cdr 11dec07

ol
elementli
elements.
start
interface HTMLOListElement : HTMLElement { attribute long start; };
The ol
element represents an ordered list
of items (which are represented by li
elements).
The start
attribute, if present, must be a valid integer
giving the ordinal value of the first list item.
If the start
attribute is present, user agents must parse it as an integer, in order to determine the
attribute's value. The default value, used if the attribute is missing or
if the value cannot be converted to a number according to the referenced
algorithm, is 1.
The items of the list are the li
element
child nodes of the ol
element, in tree order.
The first item in the list has the ordinal value given by the ol
element's start
attribute, unless that li
element has a value
attribute with a value that can be
successfully parsed, in which case it has the ordinal value given by that
value
attribute.
Each subsequent item in the list has the ordinal value given by its
value
attribute, if
it has one, or, if it doesn't, the ordinal value of the previous item,
plus one.
The start
DOM
attribute must reflect the value of the start
content attribute.
ul
elementli
elements.
HTMLElement
.
The ul
element represents an unordered
list of items (which are represented by li
elements).
The items of the list are the li
element
child nodes of the ul
element.
li
elementol
elements.
ul
elements.
menu
elements.
menu
element: phrasing content.ol
element: value
ol
element: None.
interface HTMLLIElement : HTMLElement { attribute long value; };
The li
element represents a list item. If
its parent element is an ol
, ul
, or menu
element, then the element is an item of the parent element's list, as
defined for those elements. Otherwise, the list item has no defined
list-related relationship to any other li
element.
The value
attribute, if present, must be a valid integer
giving the ordinal value of the first list item.
If the value
attribute is present, user agents must parse it as an integer, in order to determine the
attribute's value. If the attribute's value cannot be converted to a
number, the attribute must be treated as if it was absent. The attribute
has no default value.
The value
attribute is processed relative to the element's parent ol
element (q.v.), if there is one. If there is not,
the attribute has no effect.
The value
DOM
attribute must reflect the value of the value
content attribute.
dl
elementdt
elements followed by one or mode dd
elements.
HTMLElement
.
The dl
element introduces an unordered
association list consisting of zero or more name-value groups (a
description list). Each group must consist of one or more names (dt
elements) followed by one or more values
(dd
elements).
Name-value groups may be terms and definitions, metadata topics and values, or any other groups of name-value data.
The following are all conforming HTML fragments.
In the following example, one entry ("Authors") is linked to two values ("John" and "Luke").

 Authors
 John
 Luke
 Editor
 Frank

In the following example, one definition is linked to two terms.

 <dfn>color</dfn>

 <dfn>colour</dfn>

 A sensation which (in humans) derives from the ability of the fine structure of the eye to distinguish three differently filtered analyses of a view.

The following example illustrates the use of the dl
element to mark up metadata of sorts. At the end
of the example, one group has two metadata labels ("Authors" and
"Editors") and two values ("Robert Rothman" and "Daniel Jackson").

 Last modified time

 2004-12-23T23:33Z

 Recommended update interval

 60s

 Authors

 Editors

 Robert Rothman

 Daniel Jackson

If a dl
element is empty, it contains no
groups.
If a dl
element contains non-whitespace text nodes, or elements other than
dt
and dd
,
then those elements or text
nodes do not form part of any groups in that dl
, and the document is non-conforming.
If a dl
element contains only dt
elements, then it consists of one group with
names but no values, and the document is non-conforming.
If a dl
element contains only dd
elements, then it consists of one group with
values but no names, and the document is non-conforming.
The dl
element is
inappropriate for marking up dialogue, since dialogue is ordered (each
speaker/line pair comes after the next). For an example of how to mark up
dialogue, see the dialog
element.
dt
elementdd
or dt
elements inside dl
elements.
dd
element inside a dialog
element.
HTMLElement
.
The dt
element represents the term, or
name, part of a term-description group in a description list (dl
element), and the talker, or speaker, part of a
talker-discourse pair in a conversation (dialog
element).
The dt
element itself, when
used in a dl
element, does not indicate
that its contents are a term being defined, but this can be indicated
using the dfn
element.
dd
elementdt
or dd
elements inside dl
elements.
dt
element inside a dialog
element.
HTMLElement
.
The dd
element represents the
description, definition, or value, part of a term-description group in a
description list (dl
element), and the
discourse, or quote, part in a conversation (dialog
element).
a
elementhref
target
ping
rel
media
hreflang
type
interface HTMLAnchorElement : HTMLElement { attribute DOMString href; attribute DOMString target; attribute DOMString ping; attribute DOMString rel; readonly attribute DOMTokenList relList; attribute DOMString media; attribute DOMString hreflang; attribute DOMString type; };
The Command
interface must also be implemented by this element.
If the a
element has an href
attribute, then
it represents a hyperlink.
If the a
element has no href
attribute, then
the element is a placeholder for where a link might otherwise have been
placed, if it had been relevant.
The target
, ping
, rel
, media
, hreflang
, and type
attributes
must be omitted if the href
attribute is not present.
If a site uses a consistent navigation toolbar on every page, then the
link that would normally link to the page itself could be marked up using
an a
element:

 Home

 News

 Examples

 Legal

Interactive user agents should allow users to follow hyperlinks created using the
a
element. The href
, target
and ping
attributes
decide how the link is followed. The rel
, media
, hreflang
, and type
attributes may
be used to indicate to the user the likely nature of the target resource
before the user follows the link.
The activation behavior of a
elements that represent hyperlinks is
to run the following steps:
If the DOMActivate
event in
question is not trusted (i.e.
a click()
method call
was the reason for the event being dispatched), and the a
element's target
attribute is ... then raise an INVALID_ACCESS_ERR
exception and abort these steps.
If the target of the DOMActivate
event is an img
element with an ismap
attribute
specified, then server-side image map processing must be performed, as
follows:
DOMActivate
event was
dispatched as the result of a real pointing-device-triggered click
event on the img
element, then let x be
the distance in CSS pixels from the left edge of the image to the
location of the click, and let y be the distance in
CSS pixels from the top edge of the image to the location of the click.
Otherwise, let x and y be zero.
Finally, the user agent must follow the hyperlink defined by the a
element. If the steps above defined a hyperlink suffix, then take that into
account when following the hyperlink.
One way that a user agent can enable users to follow
hyperlinks is by allowing a
elements to be
clicked, or focussed and activated by the keyboard. This will cause the aforementioned activation behavior to be invoked.
The DOM attributes href
, ping
, target
, rel
, media
, hreflang
, and type
, must each reflect the respective content attributes of the same
name.
The DOM attribute relList
must reflect the rel
content attribute.
q
elementcite
q
element uses the HTMLQuoteElement
interface.
The q
element represents a part of a
paragraph quoted from another source.
Content inside a q
element must be quoted
from another source, whose URI, if it has one, should be cited in the cite
attribute.
If the cite
attribute is present, it must be a URI (or IRI). User agents should allow
users to follow such citation links.
If a q
element is contained (directly or
indirectly) in a paragraph that contains a single
cite
element and has no other q
element descendants, then, the citation given by
that cite
element gives the source of
the quotation contained in the q
element.
cite
elementHTMLElement
.The cite
element represents a
citation: the source, or reference, for a quote or statement made in the
document.
A citation is not a quote (for which the
q
element is appropriate).
This is incorrect usage:

This is wrong!, said Ian.

This is the correct way to do it:

<q>This is correct!</q>, said Ian.

This is also wrong, because the title and the name are not references or citations:

My favourite book is The Reality Dysfunction by Peter F. Hamilton.

This is correct, because even though the source is not quoted, it is cited:

According to the Wikipedia article on HTML, HTML is defined in formal specifications that were developed and published throughout the 1990s.

The cite
element can apply
to blockquote
and q
elements in certain cases described in the
definitions of those elements.
em
elementHTMLElement
.
The em
element represents stress emphasis
of its contents.
The level of emphasis that a particlar piece of content has is given by
its number of ancestor em
elements.
The placement of emphasis changes the meaning of the sentence. The element thus forms an integral part of the content. The precise way in which emphasis is used in this way depends on the language.
These examples show how changing the emphasis changes the meaning. First, a general statement of fact, with no emphasis:

Cats are cute animals.

By emphasising the first word, the statement implies that the kind of animal under discussion is in question (maybe someone is asserting that dogs are cute):

Cats are cute animals.

Moving the emphasis to the verb, one highlights that the truth of the entire sentence is in question (maybe someone is saying cats are not cute):

Cats are cute animals.

By moving it to the adjective, the exact nature of the cats is reasserted (maybe someone suggested cats were mean animals):

Cats are cute animals.

Similarly, if someone asserted that cats were vegetables, someone correcting this might emphasise the last word:

Cats are cute animals.

By emphasising the entire sentence, it becomes clear that the speaker is fighting hard to get the point across. This kind of emphasis also typically affects the punctuation, hence the exclamation mark here.

Cats are cute animals!

Anger mixed with emphasising the cuteness could lead to markup such as:

Cats are cute animals!

strong
elementHTMLElement
.
The strong
element represents strong
importance for its contents.
The relative level of importance of a piece of content is given by its
number of ancestor strong
elements;
each strong
element increases the
importance of its contents.
Changing the importance of a piece of text with the strong
element does not change the meaning of
the sentence.
Here is an example of a warning notice in a game, with the various parts marked up according to how important they are:

Warning. This dungeon is dangerous. Avoid the ducks. Take any gold you find. Do not take any of the diamonds, they are explosive and will destroy anything within ten meters. You have been warned.

small
elementHTMLElement
.
The small
element represents small
print (part of a document often describing legal restrictions, such as
copyrights or other disadvantages), or other side comments.
The small
element does not
"de-emphasise" or lower the importance of text emphasised by the em
element or marked as important with the strong
element.
In this example the footer contains contact information and a copyright.
 <address> For more details, contact <a<EMAIL_ADDRESS>Smith. </address>
© copyright 2038 Example Corp.

In this second example, the small
element is used for a side comment.

Example Corp today announced record profits for the second quarter (Full Disclosure: Foo News is a subsidiary of Example Corp), leading to speculation about a third quarter merger with Demo Group.

In this last example, the small
element is marked as being important small print.

Continued use of this service will result in a kiss.

m
elementHTMLElement
.
This section has a large number of outstanding comments and will likely be rewritten or removed from the spec.
The m
element represents a run of text
marked or highlighted.
In the following snippet, a paragraph of text refers to a specific part of a code fragment.

The highlighted part below is where the error lies:

var i: Integer; begin i := <m>1.1</m>; end.

Another example of the m
element is
highlighting parts of a document that are matching some search string. If
someone looked at a document, and the server knew that the user was
searching for the word "kitten", then the server might return the
document with one paragraph modified as follows:

I also have some <m>kitten</m>s who are visiting me these days. They're really cute. I think they like my garden!

dfn
elementdfn
elements.
title
attribute has special semantics on this
element.
HTMLElement
.
The dfn
element represents the defining
instance of a term. The paragraph, description list group, or section that contains the dfn
element contains the definition for the term
given by the contents of the dfn
element.
Defining term: If the dfn
element has a title
attribute, then the exact
value of that attribute is the term being defined. Otherwise, if it
contains exactly one element child node and no child text nodes, and that child element is an abbr
element with a title
attribute, then the exact value of
that attribute is the term being defined. Otherwise, it is the
exact textContent
of the dfn
element that gives the term being defined.
If the title
attribute of the dfn
element is present,
then it must only contain the term being defined.
There must only be one dfn
element per
document for each term defined (i.e. there must not be any duplicate terms).
The title
attribute of ancestor elements does not affect dfn
elements.
The dfn
element enables
automatic cross-references. Specifically, any span
, abbr
,
code
, var
, samp
, or
i
element that has a non-empty title
attribute whose value
exactly equals the term of a
dfn
element in the same document, or which
has no title
attribute
but whose textContent
exactly
equals the term of a
dfn
element in the document, and that has
no interactive elements or dfn
elements either as ancestors or descendants,
and has no other elements as ancestors that are themselves matching these
conditions, should be presented in such a way that the user can jump from
the element to the first dfn
element
giving the defining instance of that term.
In the following fragment, the term "GDO" is first defined in the first
paragraph, then used in the second. A compliant UA could provide a link
from the abbr
element in the second
paragraph to the dfn
element in the
first.

The <dfn>GDO</dfn> is a device that allows off-world teams to open the iris.

Teal'c activated his GDO and so Hammond ordered the iris to be opened.

abbr
elementtitle
attribute has special semantics on this
element.
HTMLElement
.
The abbr
element represents an
abbreviation or acronym. The title
attribute should be used to
provide an expansion of the abbreviation. If present, the attribute must
only contain an expansion of the abbreviation.
The paragraph below contains an abbreviation marked up with the
abbr
element.

The WHATWG is a loose unofficial collaboration of Web browser manufacturers and interested parties who wish to develop new technologies designed to allow authors to write and deploy Applications over the World Wide Web.

The title
attribute may be omitted if there is a dfn
element in the document whose defining term is the
abbreviation (the textContent
of
the abbr
element).
In the example below, the word "Zat" is used as an abbreviation in the
second paragraph. The abbreviation is defined in the first, so the
explanatory title
attribute has been omitted. Because of
the way dfn
elements are defined, the
second abbr
element in this example
would be connected (in some UA-specific way) to the first.

The <dfn>Zat</dfn>, short for Zat'ni'catel, is a weapon.

Jack used a Zat to make the boxes of evidence disappear.

time
elementdatetime
interface HTMLTimeElement : HTMLElement { attribute DOMString dateTime; readonly attribute DOMTimeStamp date; readonly attribute DOMTimeStamp time; readonly attribute DOMTimeStamp timezone; };
The time
element represents a date
and/or a time.
The datetime
attribute, if
present, must contain a date or time string that
identifies the date or time being specified.
If the datetime
attribute is not present, then the
date or time must be specified in the content of the element, such that
parsing the element's textContent
according to the rules for parsing date or time strings in content successfully
extracts a date or time.
The dateTime
DOM attribute must reflect the datetime
content attribute.
User agents, to obtain the date, time, and timezone represented by a time
element, must follow these steps:
datetime
attribute is present, then parse it
according to the rules for parsing date or time strings in attributes, and
let the result be result.
textContent
according to the rules for
parsing date or time strings in content, and let the result be
result.
The date
DOM
attribute must return null if the date is unknown, and otherwise must return the
time corresponding to midnight UTC (i.e. the first second) of the given date.
The time
DOM
attribute must return null if the time is unknown, and otherwise must return the
time corresponding to the given time of 1970-01-01, with the timezone UTC.
The timezone
DOM attribute must
return null if the timezone is unknown, and otherwise must
return the time corresponding to 1970-01-01 00:00 UTC in the given timezone, with the
timezone set to UTC (i.e. the time corresponding to 1970-01-01 at 00:00
UTC plus the offset corresponding to the timezone).
In the following snippet:

Our first date was <time datetime="2006-09-23">a saturday</time>.

...the time
element's date
attribute would have
the value 1,158,969,600,000ms, and the time
and timezone
attributes would return null.
In the following snippet:

We stopped talking at <time datetime="2006-09-24 05:00 -7">5am the next morning</time>.

...the time
element's date
attribute would have
the value 1,159,056,000,000ms, the time
attribute would have the value
18,000,000ms, and the timezone
attribute would return
-25,200,000ms. To obtain the actual time, the three attributes can be
added together, obtaining 1,159,048,800,000, which is the specified date
and time in UTC.
Finally, in the following snippet:

Many people get up at <time>08:00</time>.

...the time
element's date
attribute would have
the value null, the time
attribute would have the value
28,800,000ms, and the timezone
attribute would return null.
These APIs may be suboptimal. Comments on making them more useful to JS authors are welcome. The primary use cases for these elements are for marking up publication dates e.g. in blog entries, and for marking event dates in hCalendar markup. Thus the DOM APIs are likely to be used as ways to generate interactive calendar widgets or some such.
progress
elementvalue
max
interface HTMLProgressElement : HTMLElement { attribute float value; attribute float max; readonly attribute float position; };
The progress
element represents the
completion progress of a task. The progress is either indeterminate,
indicating that progress is being made but that it is not clear how much
more work remains to be done before the task is complete (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.
There are two attributes that determine the current task completion represented by the element.
The value
attribute specifies how much of the task has been completed, and the max
attribute specifies
how much work the task requires in total. The units are arbitrary and not
specified.
Instead of using the attributes, authors are recommended to simply include the current value and the maximum value inline as text inside the element.
Here is a snippet of a Web application that shows the progress of some automated task:

Task Progress

Progress: <progress>0%</progress>

(The updateProgress()
method in this example would be
called by some other code on the page to update the actual progress bar
as the task progressed.)
Author requirements: The max
and value
attributes,
when present, must have values that are valid floating point numbers. The max
attribute, if
present, must have a value greater than zero. The value
attribute, if
present, must have a value equal to or greater than zero, and less than or
equal to the value of the max
attribute, if present.
User agent requirements: User agents must parse the
max
and value
attributes'
values according to the rules for parsing floating point
number values.
If the value
attribute is omitted, then user agents
must also parse the textContent
of
the progress
element in question
using the steps for finding one or two numbers of a ratio
in a string. These steps will return nothing, one number, one number
with a denominator punctuation character, or two numbers.
Using the results of this processing, user agents must determine whether the progress bar is an indeterminate progress bar, or whether it is a determinate progress bar, and in the latter case, what its current and maximum values are, all as follows:
max
attribute is omitted, and the value
is omitted, and the results of parsing
the textContent
was nothing, then
the progress bar is an indeterminate progress bar. Abort these steps.
max
attribute is included, then, if a value could be parsed out of it, then
the maximum value is that value.
max
attribute is absent but the value
attribute is
present, or, if the max
attribute is present but no value could be
parsed from it, then the maximum is 1.
textContent
contained one number with an
associated denominator punctuation character, then the maximum value is
the value associated with that denominator punctuation
character; otherwise, if the textContent
contained two numbers, the
maximum value is the higher of the two values; otherwise, the maximum
value is 1.
value
attribute is present on the element and a
value could be parsed out of it, that value is the current value of the
progress bar. Otherwise, if the attribute is present but no value could
be parsed from it, the current value is zero.
value
attribute is absent and the max
attribute is
present, then, if the textContent
was parsed and found to contain just one number, with no associated
denominator punctuation character, then the current value is that number.
Otherwise, if the value
attribute is absent and the max
attribute is
present then the current value is zero.
textContent
of the element.
UA requirements for showing the progress bar: When
representing a progress
element to
the user, the UA should indicate whether it is a determinate or
indeterminate progress bar, and in the former case, should indicate the
relative position of the current value relative to the maximum value.
The max
and value
DOM attributes
must reflect the elements' content attributes of the same name. When the
relevant content attributes are absent, the DOM attributes must return
zero. The value parsed from the textContent
never affects the DOM values.
Would be cool to have the value
DOM attribute
update the textContent
in-line...
If the progress bar is an indeterminate progress bar, then the position
DOM
attribute must return -1. Otherwise, it must return the result of dividing
the current value by the maximum value.
meter
elementvalue
min
low
high
max
optimum
interface HTMLMeterElement : HTMLElement { attribute long value; attribute long min; attribute long max; attribute long low; attribute long high; attribute long optimum; };
The meter
element represents 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 candidate.
This is also known as a gauge.
The meter
element should
not be used to indicate progress (as in a progress bar). For that role,
HTML provides a separate progress
element.
The meter
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.
There are six attributes that determine the semantics of the gauge represented by the element.
The min
attribute
specifies the lower bound of the range, and the max
attribute specifies the upper
bound. The value
attribute specifies the value to have the gauge indicate as the "measured"
value.
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 low
attribute specifies the range
that is considered to be the "low" part, and the high
attribute specifies the
range that is considered to be the "high" part. The optimum
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 indicates that lower values are better, and
naturally if it is in between then it indicates that neither high nor low
values are good.
Authoring requirements: The recommended way of giving the value is to include it as contents of the element, either as two numbers (the higher number represents the maximum, the other number the current value), or as a percentage or similar (using one of the characters such as "%"), or as a fraction.
The value
,
min
, low
, high
, max
, and optimum
attributes
are all optional. When present, they must have values that are valid floating point
numbers.
The following examples all represent a measurement of three quarters (of the maximum of whatever is being measured):
<meter>75%</meter> <meter>750‰</meter> <meter>3/4</meter> <meter>6 blocks used (out of 8 total)</meter> <meter>max: 100; current: 75</meter> <meter><object data="graph75.png">0.75</object></meter> <meter min="0" max="100" value="75"></meter>
The following example is incorrect use of the element, because it doesn't give a range (and since the default maximum is 1, both of the gauges would end up looking maxed out):

The grapefruit pie had a radius of <meter>12cm</meter> and a height of <meter>2cm</meter>.

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 pies:

The grapefruit pie had a radius of 12cm and a height of 2cm.

Radius:
 <meter min=0 max=20 value=12>12cm</meter>
Height:
 <meter min=0 max=10 value=2>2cm</meter>

There is no explicit way to specify units in the meter
element, but the units may be specified in
the title
attribute in
freeform text.
The example above could be extended to mention the units:

Radius:
 <meter min=0 max=20 value=12 title="centimeters">12cm</meter>
Height:
 <meter min=0 max=10 value=2 title="centimeters">2cm</meter>

User agent requirements: User agents must parse the
min
, max
, value
, low
, high
, and optimum
attributes
using the rules for parsing floating point number
values.
If the value
attribute has been omitted, the user agent must also process the textContent
of the element according to the
steps for finding one or two numbers of a ratio in a
string. These steps will return nothing, one number, one number with a
denominator punctuation character, or two numbers.
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.)
If the min
attribute is specified and a value could be parsed out of it, then the
minimum value is that value. Otherwise, the minimum value is zero.
If the max
attribute is specified and a value could be parsed out of it, the
maximum value is that value.
Otherwise, if the max
attribute is specified but no value could be
parsed out of it, or if it was not specified, but either or both of the
min
or value
attributes
were specified, then the maximum value is 1.
Otherwise, none of the max
, min
, and value
attributes were specified. If the result
of processing the textContent
of
the element was either nothing or just one number with no denominator
punctuation character, then the maximum value is 1; if the result was
one number but it had an associated denominator punctuation character,
then the maximum value is the value associated
with that denominator punctuation character; and finally, if there
were two numbers parsed out of the textContent
, then the maximum is the
higher of those two numbers.
If the above machinations result in a maximum value less than the minimum value, then the maximum value is actually the same as the minimum value.
If the value
attribute is specified and a value could be parsed out of it, then that
value is the actual value.
If the value
attribute is not specified but the max
attribute is specified and the
result of processing the textContent
of the element was one number
with no associated denominator punctuation character, then that number
is the actual value.
If neither of the value
and max
attributes are specified, then, if the
result of processing the textContent
of the element was one number
(with or without an associated denominator punctuation character), then
that is the actual value, and if the result of processing the textContent
of the element was two
numbers, then the actual value is the lower of the two numbers found.
Otherwise, if none of the above apply, the actual value is zero.
If the above procedure results in an actual value less than the minimum value, then the actual value is actually the same as the minimum value.
If, on the other hand, the result is an actual value greater than the maximum value, then the actual value is the maximum value.
If the low
attribute is specified and a value could be parsed out of it, then the
low boundary is that value. Otherwise, the low boundary is the same as
the minimum value.
If the above results in a low boundary that is less than the minimum value, the low boundary is the minimum value.
If the high
attribute is specified and a value could be parsed out of it, then the
high boundary is that value. Otherwise, the high boundary is the same as
the maximum value.
If the above results in a high boundary that is higher than the maximum value, the high boundary is the maximum value.
If the optimum
attribute is specified and a value
could be parsed out of it, then the optimum point is that value.
Otherwise, the optimum point is the midpoint between the minimum value
and the maximum value.
If the optimum point is then less than the minimum value, then the optimum point is actually the same as the minimum value. Similarly, if the optimum point is greater than the maximum value, then it is actually the maximum value instead.
All of which should result in the following inequalities all being true:
UA requirements for regions of the gauge: If the optimum point is equal to the low boundary or the high boundary, or anywhere in between them, then the 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 optimum point is less than the low boundary, then the region between the minimum value and the low boundary must be treated as the optimum region, the region between the low boundary and the high boundary must be treated as a suboptimal region, and the region between the high boundary and the maximum value must be treated as an even less good region. Finally, if the optimum point is higher than the high boundary, then the situation is reversed; the region between the high boundary and the maximum value must be treated as the optimum region, the region between the high boundary and the low boundary must be treated as a suboptimal region, and the remaining region between the low boundary and the minimum value must be treated as an even less good region.
UA requirements for showing the gauge: When
representing a meter
element to the
user, the UA should indicate the relative position of the actual value to
the minimum and maximum values, and the relationship between the actual
value and the three regions of the gauge.
The following markup:

Suggested groups
 <menu type="toolbar"> Hide suggested groups </menu>

comp.infosystems.www.authoring.stylesheets - join

Group description: Layout/presentation on the WWW.

<meter value="0.5">Moderate activity,</meter> Usenet, 618 subscribers

netscape.public.mozilla.xpinstall - join

Group description: Mozilla XPInstall discussion.

<meter value="0.25">Low activity,</meter> Usenet, 22 subscribers

mozilla.dev.general - join

<meter value="0.25">Low activity,</meter> Usenet, 66 subscribers

Might be rendered as follows:
User agents may combine the value of the title
attribute and the other attributes to
provide context-sensitive help or inline text detailing the actual values.
For example, the following snippet:
<meter min=0 max=60 value=23.2 title=seconds></meter>
...might cause the user agent to display a gauge with a tooltip saying "Value: 23.2 out of 60." on one line and "seconds" on a second line.
The min
, max
, value
, low
, high
, and optimum
DOM attributes must
reflect the elements' content attributes of the same name. When the
relevant content attributes are absent, the DOM attributes must return
zero. The value parsed from the textContent
never affects the DOM values.
Would be cool to have the value
DOM attribute update the textContent
in-line...
code
elementtitle
attribute has special semantics on this element when used with the
dfn
element.
HTMLElement
.
The code
element represents a fragment
of computer code. This could be an XML element name, a filename, a
computer program, or any other string that a computer would recognise.
Although there is no formal way to indicate the language of computer
code being marked up, authors who wish to mark code
elements with the language used, e.g. so that
syntax highlighting scripts can use the right rules, may do so by adding a
class prefixed with "language-
" to the element.
The following example shows how a block of code could be marked up
using the pre
and code
elements.

var i: Integer; begin i := 1; end.

A class is used in that example to indicate the language used.
See the pre
element for more
detais.
var
elementtitle
attribute has special semantics on this element when used with the
dfn
element.
HTMLElement
.
The var
element represents a variable.
This could be an actual variable in a mathematical expression or
programming context, or it could just be a term used as a placeholder in
prose.
In the paragraph below, the letter "n" is being used as a variable in prose:

If there are <var>n</var> pipes leading to the ice cream factory then I expect at least <var>n</var> flavours of ice cream to be available for purchase!

samp
elementtitle
attribute has special semantics on this element when used with the
dfn
element.
HTMLElement
.
The samp
element represents (sample)
output from a program or computing system.
See the pre
and kbd
elements for more detais.
This example shows the samp
element
being used inline:

The computer said <samp>Too much cheese in tray two</samp> but I didn't know what that meant.

This second example shows a block of sample output. Nested samp
and kbd
elements allow for the styling of specific elements of the sample output
using a style sheet.

<samp><samp class="prompt">jdoe@mowmow:~$</samp> ssh demo.example.com Last login: Tue Apr 12 09:10:17 2005 from mowmow.example.com on pts/1 Linux demo 2.6.10-grsec+gg3+e+fhs6b+nfs+gr0501+++p3+c4a+gr2b-reslog-v6.189 #1 SMP Tue Feb 1 11:22:36 PST 2005 i686 unknown <samp class="prompt">jdoe@demo:~$</samp> <samp class="cursor">_</samp></samp>

kbd
elementHTMLElement
.
The kbd
element represents user input
(typically keyboard input, although it may also be used to represent other
input, such as voice commands).
When the kbd
element is nested inside a
samp
element, it represents the input as
it was echoed by the system.
When the kbd
element contains a
samp
element, it represents input based
on system output, for example invoking a menu item.
When the kbd
element is nested inside
another kbd
element, it represents an
actual key or other single unit of input as appropriate for the input
mechanism.
Here the kbd
element is used to
indicate keys to press:

To make George eat an apple, press Shift+F3

In this second example, the user is told to pick a particular menu
item. The outer kbd
element marks up a
block of input, with the inner kbd
elements representing each individual step of the input, and the samp
elements inside them indicating that the
steps are input based on something being displayed by the system, in this
case menu labels:

To make George eat an apple, select <samp>File</samp>|<samp>Eat Apple...</samp>

sub
and sup
elementsHTMLElement
.
The sup
element represents a superscript
and the sub
element represents a
subscript.
These elements must only be used to mark up typographical conventions
with specific meanings, not for typographical presentation for
presentation's sake. For example, it would be inappropriate for the
sub
and sup
elements to be used in the name of the LaTeX
document preparation system. In general, authors should only use these
elements if the absence of those elements would change the
meaning of the content.
When the sub
element is used inside a
var
element, it represents the subscript
that identifies the variable in a family of variables.

The coordinate of the <var>i</var>th point is (<var>x<var>i</var></var>, <var>y<var>i</var></var>). For example, the 10th point has coordinate (<var>x10</var>, <var>y10</var>).

In certain languages, superscripts are part of the typographical conventions for some abbreviations.

The most beautiful women are Mlle Gwendoline and Mme Denise.

Mathematical expressions often use subscripts and superscripts.
<var>E</var>=<var>m</var><var>c</var>2
f(<var>x</var>, <var>n</var>) = log4<var>x</var><var>n</var>
span
elementtitle
attribute has special semantics on this element when used with the
dfn
element.
HTMLElement
.
The span
element doesn't mean anything
on its own, but can be useful when used together with other attributes,
e.g. class
, lang
, or dir
, or when used in conjunction
with the dfn
element.
i
elementtitle
attribute has special semantics on this element when used with the
dfn
element.
HTMLElement
.
The i
element represents a span of text in
an alternate voice or mood, or otherwise offset from the normal prose,
such as a taxonomic designation, a technical term, an idiomatic phrase
from another language, a thought, a ship name, or some other prose whose
typical typographic presentation is italicized.
Terms in languages different from the main text should be annotated with
lang
attributes (xml:lang
in XML).
The examples below show uses of the i
element:

The felis silvestris catus is cute.

The term prose content is defined above.

There is a certain je ne sais quoi in the air.

In the following example, a dream sequence is marked up using i
elements.

Raymond tried to sleep.

The ship sailed away on Thursday, he dreamt. The ship had many people aboard, including a beautiful princess called Carey. He watched her, day-in, day-out, hoping she would notice him, but she never did.

Finally one night he picked up the courage to speak with her—

Raymond woke with a start as the fire alarm rang out.

The i
element should be used as a last
resort when no other element is more appropriate. In particular, citations
should use the cite
element, defining
instances of terms should use the dfn
element, stress emphasis should use the em
element, importance should be denoted with the strong
element, quotes should be marked up with
the q
element, and small print should use
the small
element.
Style sheets can be used to format i
elements, just like any other element can be
restyled. Thus, it is not the case that content in i
elements will necessarily be italicised.
b
elementHTMLElement
.
The b
element represents a span of text to
be stylistically offset from the normal prose without conveying any extra
importance, such as key words in a document abstract, product names in a
review, or other spans of text whose typical typographic presentation is
boldened.
The following example shows a use of the b
element to highlight key words without marking
them up as important:

The frobonitor and barbinator components are fried.

The following would be incorrect usage:

WARNING! Do not frob the barbinator!

In the previous example, the correct element to use would have been
strong
, not b
.
In the following example, objects in a text adventure are highlighted
as being special by use of the b
element.

You enter a small room. Your sword glows brighter. A rat scurries past the corner wall.

Another case where the b
element is
appropriate is in marking up the lede (or lead) sentence or paragraph.
The following example shows how a BBC
article about kittens adopting a rabbit as their own could be marked
up using HTML5 elements:

Kittens 'adopted' by pet rabbit

Six abandoned kittens have found an unexpected new mother figure — a pet rabbit.

Veterinary nurse Melanie Humble took the three-week-old kittens to her Aberdeen home.
 [...]
The b
element should be used as a last
resort when no other element is more appropriate. In particular, headers
should use the h1
to h6
elements, stress emphasis should use the em
element, importance should be denoted with the
strong
element, and text marked or
highlighted should use the m
element.
Style sheets can be used to format b
elements, just like any other element can be
restyled. Thus, it is not the case that content in b
elements will necessarily be boldened.
bdo
elementdir
global attribute has special requirements on this element.
HTMLElement
.
The bdo
element allows authors to
override the Unicode bidi algorithm by explicitly specifying a direction
override. [BIDI]
Authors must specify the dir
attribute on this element, with the value
ltr
to specify a left-to-right override and with the value
rtl
to specify a right-to-left override.
If the element has the dir
attribute set to the exact value
ltr
, then for the purposes of the bidi algorithm, the user
agent must act as if there was a U+202D LEFT-TO-RIGHT OVERRIDE character
at the start of the element, and a U+202C POP DIRECTIONAL FORMATTING at
the end of the element.
If the element has the dir
attribute set to the exact value
rtl
, then for the purposes of the bidi algorithm, the user
agent must act as if there was a U+202E RIGHT-TO-LEFT OVERRIDE character
at the start of the element, and a U+202C POP DIRECTIONAL FORMATTING at
the end of the element.
The requirements on handling the bdo
element for the bidi algorithm may be implemented indirectly through the
style layer. For example, an HTML+CSS user agent should implement these
requirements by implementing the CSS unicode-bidi
property.
[CSS21]
The ins
and del
elements represent edits to the document.
Since the ins
and del
elements do not affect paragraphing, it is possible, in some cases where
paragraphs are implied (without
explicit p
elements), for an ins
or del
element
to span both an entire paragraph or other non-phrasing content elements and part of another
paragraph.
For example:

 This is a paragraph that was inserted.
 This is another paragraph whose first sentence was inserted at the same time as the paragraph above.  This is a second sentence, which was there all along.

By only wrapping some paragraphs in p
elements, one can even get the end of one paragraph, a whole second
paragraph, and the start of a third paragraph to be covered by the same
ins
or del
element (though this is very confusing, and
not considered good practice):

 This is the first paragraph. This sentence was inserted.
This second paragraph was inserted.
 This sentence was inserted too. This is the third paragraph in this example.

However, due to the way implied
paragraphs are defined, it is not possible to mark up the end of one
paragraph and the start of the very next one using the same ins
or del
element. You instead have to use one (or two) p
element(s) and two ins
or del
elements:
For example:

This is the first paragraph. This sentence was deleted.

This sentence was deleted too. That sentence needed a separate  element.

Partly because of the confusion described above, authors are strongly
recommended to always mark up all paragraphs with the p
element, and to not have any ins
or del
elements that cross across any implied paragraphs.
ins
elementcite
datetime
HTMLModElement
interface.
The ins
element represents an addition
to the document.
The following represents the addition of a single paragraph:

 I like fruit.

As does this, because everything in the aside
element here counts as phrasing content and therefore there is just one paragraph:
  Apples are tasty.   So are pears.
ins
elements should not cross implied paragraph boundaries.
The following example represents the addition of two paragraphs, the
second of which was inserted in two parts. The first ins
element in this example thus crosses a
paragraph boundary, which is considered poor form.

 I like fruit.
 Apples are tasty.   So are pears.
Here is a better way of marking this up. It uses more elements, but none of the elements cross implied paragraph boundaries.

 I like fruit.
   Apples are tasty.   So are pears.
del
elementcite
datetime
HTMLModElement
interface.
The del
element represents a removal
from the document.
del
elements should not cross implied paragraph boundaries.
ins
and del
elementsThe cite
attribute
may be used to specify a URI that explains the change. When that document
is long, for instance the minutes of a meeting, authors are encouraged to
include a fragment identifier pointing to the specific part of that
document that discusses the change.
If the cite
attribute is present, it must be a URI (or IRI) that explains the change.
User agents should allow users to follow such citation links.
The datetime
attribute may be used
to specify the time and date of the change.
If present, the datetime
attribute must be a valid datetime value.
User agents must parse the datetime
attribute according to the parse a string as a datetime value algorithm.
If that doesn't return a time, then the modification has no associated
timestamp (the value is non-conforming; it is not a valid datetime). Otherwise, the modification is marked
as having been made at the given datetime. User agents should use the
associated timezone information to determine which timezone to present the
given datetime in.
The ins
and del
elements must implement the HTMLModElement
interface:
interface HTMLModElement : HTMLElement { attribute DOMString cite; attribute DOMString dateTime; };
The cite
DOM
attribute must reflect the element's >cite
content attribute. The dateTime
DOM attribute must
reflect the element's datetime
content attribute.
figure
elementlegend
element followed
by prose content.
legend
element.
HTMLElement
.
The figure
element represents some prose content with a caption.
The first legend
element child of the
element, if any, represents the caption of the figure
element's contents. If there is no child
legend
element, then there is no
caption.
The remainder of the element's contents, if any, represents the captioned content.
img
elementalt
src
usemap
ismap
width
height
interface HTMLImageElement : HTMLElement { attribute DOMString alt; attribute DOMString src; attribute DOMString useMap; attribute boolean isMap; attribute long width; attribute long height; readonly attribute boolean complete; };
An instance of HTMLImageElement
can be obtained
using the Image
constructor.
An img
element represents an image.
The image given by the src
attribute is the embedded
content, and the value of the alt
attribute is the img
element's fallback
content.
Authoring requirements: The src
attribute must be present, and must contain a
URI (or IRI).
Should we restrict the URI to pointing to an image? What's an image? Is PDF an image? (Safari supports PDFs in  elements.) How about SVG? (Opera supports those). WMFs? XPMs? HTML?
The requirements for the alt
attribute depend on what the image is intended
to represent:
Sometimes something can be more clearly stated in graphical form, for
example as a flowchart, a diagram, a graph, or a simple map showing
directions. In such cases, an image can be given using the img
element, but the lesser textual version must
still be given, so that users who are unable to view the image (e.g.
because they have a very slow connection, or because they are using a
text-only browser, or because they are listening to the page being read
out by a hands-free automobile voice Web browser, or simply because they
are blind) are still able to understand the message being conveyed.
The text must be given in the alt
attribute, and must convey the same message
as the the image specified in the src
attribute.
In the following example we have a flowchart in image form,
with text in the alt
attribute rephrasing the flowchart in prose form:

In the common case, the data handled by the tokenisation stage comes from the network, but it can also come from script.

Here's another example, showing a good solution and a bad solution to the problem of including an image in a description.
First, here's the good solution. This sample shows how the alternative text should just be what you would have put in the prose if the image had never existed.

 You are standing in an open field west of a house.  There is a small mailbox here.

Second, here's the bad solution. In this incorrect way of doing things, the alternative text is simply a description of the image, instead of a textual replacement for the image. It's bad because when the image isn't shown, the text doesn't flow as well as in the first example.

 You are standing in an open field west of a house.  There is a small mailbox here.

It is important to realise that the alternative text is a replacement for the image, not a description of the image.
A document can contain information in iconic form. The icon is intended to help users of visual browsers to recognise features at a glance.
In some cases, the icon is supplemental to a text label conveying the
same meaning. In those cases, the alt
attribute must be present but must be empty.
Here the icons are next to text that conveys the same meaning, so
they have an empty alt
attribute:

 Help

 Configuration Tools

In other cases, the icon has no text next to it describing what it
means; the icon is supposed to be self-explanatory. In those cases, an
equivalent textual label must be given in the alt
attribute.
Here, posts on a news site are labelled with an icon indicating their topic.

Ratatouille wins Best Movie of the Year award

Pixar has won yet another Best Movie of the Year award, making this its 8th win in the last 12 years.

Latest TWiT episode is online

The latest TWiT episode has been posted, in which we hear several tech news stories as well as learning much more about the iPhone. This week, the panelists compare how reflective their iPhones' Apple logos are.

Many pages include logos, insignia, flags, or emblems, which stand for a particular entity such as a company, organisation, project, band, software package, country, or some such.
If the logo is being used to represent the entity, the alt
attribute must contain
the name of the entity being represented by the logo. The alt
attribute must
not contain text like the word "logo", as it is not the fact
that it is a logo that is being conveyed, it's the entity itself.
If the logo is being used next to the name of the entity that it
represents, then the logo is supplemental, and its alt
attribute must instead
be empty.
If the logo is merely used as decorative material (as branding, or, for example, as a side image in an article that mentions the entity to which the logo belongs), then the entry below on purely decorative images applies. If the logo is actually being discussed, then it is being used as a phrase or paragraph (the description of the logo) with an alternative graphical representation (the logo itself), and the first entry above applies.
In the following snippets, all four of the above cases are present. First, we see a logo used to represent a company:

Next, we see a paragraph which uses a logo right next to the company name, and so doesn't have any alternative text:

News

We have recently been looking at buying the  ΑΒΓ company, a small Greek company specialising in our type of product.

In this third snippet, we have a logo being used in an aside, as part of the larger article discussing the acquisition:

The ΑΒΓ company has had a good quarter, and our pie chart studies of their accounts suggest a much bigger blue slice than its green and orange slices, which is always a good sign.

Finally, we have an opinion piece talking about a logo, and the logo is therefore described in detail in the alternative text.

Consider for a moment their logo:

How unoriginal can you get?  They could at least have tried for some sort of, I don't know, sequence of rounded squares with varying shades of green and bold white outlines, at least that would look good on the cover of a blue book.

This example shows how the alternative text should be written such that if the image isn't available, and the text is used instead, the text flows seamlessly into the surrounding text, as if the image had never been there in the first place.
In many cases, the image is actually just supplementary, and its
presence merely reinforces the surrounding text. In these cases, the
alt
attribute must be
present but its value must be the empty string.
A flowchart that repeats the previous paragraph in graphical form:

The network passes data to the Tokeniser stage, which passes data to the Tree Construction stage. From there, data goes to both the DOM and to Script Execution. Script Execution is linked to the DOM, and, using document.write(), passes data to the Tokeniser.

A graph that repeats the previous paragraph in graphical form:

According to a study covering several billion pages, about 62% of documents on the Web in 2007 triggered the Quirks rendering mode of Web browsers, about 30% triggered the Almost Standards mode, and about 9% triggered the Standards mode.

In general, an image falls into this category if removing the image doesn't make the page any less useful, but including the image makes it a lot easier for users of visual browsers to understand the concept.
In some cases, the image isn't discussed by the surrounding text, but
it has some relevance. Such images are decorative, but still form part
of the content. In these cases, the alt
attribute must be present but its value must
be the empty string.
Examples where the image is purely decorative despite being relevant would include things like a photo of the Black Rock City landscape in a blog post about an event at Burning Man, or an image of a painting inspired by a poem, on a page reciting that poem. The following snippet shows an example of the latter case (only the first verse is included in this snippet):

The Lady of Shalott

On either side the river lie
 Long fields of barley and of rye,
 That clothe the wold and meet the sky;
 And through the field the road run by
 To many-tower'd Camelot;
 And up and down the people go,
 Gazing where the lilies blow
 Round an island there below,
 The island of Shalott.

In general, if an image is decorative but isn't especially page-specific, for example an image that forms part of a site-wide design scheme, the image should be specified in the site's CSS, not in the markup of the document.
In certain rare cases, the image is simply a critical part of the content, and there might even be no alternative text available. This could be the case, for instance, in a photo gallery, where a user has uploaded 3000 photos from a vacation trip, without providing any descriptions of the images. The images are the whole point of the pages containing them.
In such cases, the alt
attribute may be omitted, but the alt
attribute should be
included, with a useful value, if at all possible. If an image is a key
part of the content, the alt
attribute must not be specified with an empty
value.
A photo on a photo-sharing site:

  <legend>Bubbles traveled everywhere with us.</legend>

A screenshot in a gallery of screenshots for a new OS:

  <legend>Screenshot of a KDE desktop.</legend>

In both cases, though, it would be better if a detailed description of the important parts of the image were included.
Sometimes there simply is no text that can do justice to an image. For example, there is little that can be said to usefully describe a Rorschach inkblot test.

  <legend>A black outline of the first of the ten cards in the Rorschach inkblot test.</legend>

Note that the following would be a very bad use of alternative text:

  <legend>A black outline of the first of the ten cards in the Rorschach inkblot test.</legend>

Including the caption in the alternative text like this isn't useful because it effectively duplicates the caption for users who don't have images, taunting them twice yet not helping them any more than if they had only read or heard the caption once.
Since some users cannot use images at all (e.g. because they have a
very slow connection, or because they are using a text-only browser, or
because they are listening to the page being read out by a hands-free
automobile voice Web browser, or simply because they are blind), the
alt
attribute should
only be omitted when no alternative text is available and none can be
made available, e.g. on automated image gallery sites.
When an image is included in a communication (such as an HTML e-mail)
aimed at someone who is known to be able to view images, the alt
attribute may be
omitted. However, even in such cases it is stongly recommended that
alternative text be included (as appropriate according to the kind of
image involved, as described in the above entries), so that the e-mail
is still usable should the user use a mail client that does not support
images, or should the e-mail be forwarded on to other users whose
abilities might not include easily seeing images.
The img
must not be used as a layout
tool. In particular, img
elements should
not be used to display fully transparent images, as they rarely convey
meaning and rarely add anything useful to the document.
There has been some suggestion that the longdesc
attribute from HTML4, or some other mechanism
that is more powerful than alt=""
, should be
included. This has not yet been considered.
User agent requirements: When the alt
attribute is present and
its value is the empty string, the image supplements the surrounding
content. In such cases, the image may be omitted without affecting the
meaning of the document.
When the alt
attribute is present and its value is not the empty string, the image is a
graphical equivalent of the string given in the alt
attribute. In such cases,
the image may be replaced in the rendering by the string given in the
attribute without significantly affecting the meaning of the document.
When the alt
attribute is missing, the image represents a key part of the content.
Non-visual user agents should apply image analysis heuristics to help the
user make sense of the image.
The alt
attribute
does not represent advisory information. User agents must not present the
contents of the alt
attribute in the same way as content of the title
attribute.
If the src
attribute
is omitted, the image represents whatever string is given by the element's
alt
attribute, if any,
or nothing, if that attribute is empty or absent.
When the src
attribute is set, the user agent must immediately begin to download the
specified
resource,
unless the user agent cannot support images, or its support for images has
been disabled.
The download of the image must delay the load
event.
This, unfortunately, can be used to perform a rudimentary port scan of the user's local network (especially in conjunction with scripting, though scripting isn't actually necessary to carry out such an attack). User agents may implement cross-origin access control policies that mitigate this attack.
Once the download has completed, if the image is a valid image, the user
agent must fire a load
event on the img
element. If the
download fails or it completes but the image is not a valid or supported
image, the user agent must fire an error
event on the img
element.
The remote server's response metadata (e.g. an HTTP 404 status code, or associated Content-Type headers) must be ignored when determining whether the resource obtained is a valid image or not.
This allows servers to return images with error responses.
User agents must not support non-image resources with the img
element.
The usemap
attribute, if present, can indicate that
the image has an associated image map.
The ismap
attribute, when used on an element that is a descendant of an a
element with an href
attribute, indicates by its presence that
the element provides access to a server-side image map. This affects how
events are handled on the corresponding a
element.
The ismap
attribute is a boolean attribute. The attribute
must not be specified on an element that does not have an ancestor
a
element with an href
attribute.
The img
element supports dimension attributes.
The DOM attributes alt
, src
, useMap
, and isMap
each must reflect the respective content attributes of the same
name.
The DOM attributes height
and width
must return the rendered
height and width of the image, in CSS pixels, if the image is being
rendered, and is being rendered to a visual medium, or 0 otherwise. [CSS21]
The DOM attribute complete
must return true if the
user agent has downloaded the image specified in the src
attribute, and it is a
valid image, and false otherwise.
iframe
elementsrc
interface HTMLIFrameElement : HTMLElement { attribute DOMString src; };
Objects implementing the HTMLIFrameElement
interface must
also implement the EmbeddingElement
interface defined in
the Window Object specification. [WINDOW]
The iframe
element introduces a new
nested browsing context.
The src
attribute,
if present, must be a URI (or IRI) to a page that the nested browsing context is to contain. When the browsing
context is created, if the attribute is present, the user agent must navigate this browsing context to the given URI, with
replacement enabled. If the user navigates away from this page, the
iframe
's corresponding Window
object will reference new
Document
objects, but the src
attribute will not change.
Whenever the src
attribute is set, the nested browsing context
must be navigated to the given URI.
If the src
attribute is not set when the element is created, the browsing context
will remain at the initial about:blank
page.
When content loads in an iframe
,
after any load
events
are fired within the content itself, the user agent must fire a load
event at the
iframe
element. When content fails to
load (e.g. due to a network error), then the user agent must fire an error
event at
the element instead.
When there is an active parser in the iframe
, and when anything in the iframe
that is delaying the load
event
in the iframe
's browsing context, the iframe
must delay the load
event.
If, during the handling of the load
event, the browsing
context in the iframe
is again navigated, that will further delay the load
event.
An iframe
element never has fallback content, as it will always create a nested
browsing context, regardless of whether the
specified initial contents are successfully used.
Descendants of iframe
elements
represent nothing. (In legacy user agents that do not support iframe
elements, the contents would be parsed as
markup that could act as fallback content.)
The content model of iframe
elements
is text, except that the text must be such that ...
anyone have any bright ideas?
The HTML parser treats markup inside
iframe
elements as text.
The DOM attribute src
must reflect the content attribute of the same name.
embed
elementsrc
type
width
height
interface HTMLEmbedElement : HTMLElement { attribute DOMString src; attribute DOMString type; attribute long width; attribute long height; };
Depending on the type of content instantiated by the embed
element, the node may also support other
interfaces.
The embed
element represents an
integration point for an external (typically non-HTML) application or
interactive content.
The src
attribute
gives the address of the resource being embedded. The attribute must be
present and contain a URI (or IRI).
If the src
attribute is missing, then the embed
element must be ignored.
When the src
attribute is set, user agents are expected to find an appropriate handler
for the specified resource, based on the content's type, and hand that handler the
content of the resource. If the handler supports a scriptable interface,
the HTMLEmbedElement
object
representing the element should expose that interfaces.
The download of the resource must delay the load
event.
The user agent should pass the names and values of all the attributes of
the embed
element that have no namespace
to the handler used. Any (namespace-less) attribute may be specified on
the embed
element.
This specification does not define a mechanism for interacting with third-party handlers, as it is expected to be user-agent-specific. Some UAs might opt to support a plugin mechanism such as the Netscape Plugin API; others may use remote content convertors or have built-in support for certain types. [NPAPI]
The embed
element has no fallback content. If the user agent can't display the
specified resource, e.g. because the given type is not supported, then the
user agent must use a default handler for the content. (This default could
be as simple as saying "Unsupported Format", of course.)
The type
attribute, if present, gives the MIME type of the linked resource. The
value must be a valid MIME type, optionally with parameters. [RFC2046]
The type of the content being embedded is defined as follows:
type
attribute, then the value of the type
attribute is the
content's type.
Should we instead say that the content-sniffing that we're going to define for top-level browsing contexts should apply here?
Should we require the type attribute to match the server information?
We should say that 404s, etc, don't affect whether the resource is used or not. Not sure how to say it here though.
Browsers should take extreme care when interacting with external content intended for third-party renderers. When third-party software is run with the same privileges as the user agent itself, vulnerabilities in the third-party software become as dangerous as those in the user agent.
The embed
element supports dimension attributes.
The DOM attributes src
and type
each must reflect the respective content attributes of the same
name.
object
elementparam
elements, then,
transparent.
data
type
usemap
width
height
interface HTMLObjectElement : HTMLElement { attribute DOMString data; attribute DOMString type; attribute DOMString useMap; attribute long width; attribute long height; };
Objects implementing the HTMLObjectElement
interface must
also implement the EmbeddingElement
interface defined in
the Window Object specification. [WINDOW]
Depending on the type of content instantiated by the object
element, the node may also support
other interfaces.
The object
element can represent an
external resource, which, depending on the type of the resource, will
either be treated as an image, as a nested browsing
context, or as an external resource to be processed by a third-party
software package.
The data
attribute, if present, specifies the address of the resource. If present,
the attribute must be a URI (or IRI).
The type
attribute, if present, specifies the type of the resource. If present, the
attribute must be a valid MIME type, optionally with parameters. [RFC2046]
One or both of the data
and type
attributes must be present.
Whenever the data
attribute changes, or, if the data
attribute is not
present, whenever the type
attribute changes, the user agent must run
the following steps to determine what the object
element represents:
If the data
attribute is present, then:
Begin a load for the resource.
The download of the resource must delay the load
event.
If the resource is not yet available (e.g. because the resource was not available in the cache, so that loading the resource required making a request over the network), then jump to step 3 in the overall set of steps (fallback). When the resource becomes available, or if the load fails, restart this algorithm from this step. Resources can load incrementally; user agents may opt to consider a resource "available" whenever enough data has been obtained to begin processing the resource.
If the load failed (e.g. DNS error), fire an
error
event at the element, then
jump to step 3 in the overall set of steps (fallback).
Determine the resource type, as follows:
This says to trust the type. Should we instead use the same mechanism as for browsing contexts?
type
attribute is present
type
attribute.
Handle the content as given by the first of the following cases that matches:
The user agent should find an appropriate handler for the
specified resource, based on the resource type found in the
previous step, and pass the content of the resource to that handler.
If the handler supports a scriptable interface, the HTMLObjectElement
object
representing the element should expose that interface. The handler
is not a nested browsing context. If no
appropriate handler can be found, then jump to step 3 in the overall
set of steps (fallback).
The user agent should pass the names and values of all the parameters given by param
elements that are children of the
object
element to the handler
used.
This specification does not define a mechanism for interacting with third-party handlers, as it is expected to be user-agent-specific. Some UAs might opt to support a plugin mechanism such as the Netscape Plugin API; others may use remote content convertors or have built-in support for certain types. [NPAPI]
this doesn't completely duplicate the navigation section, since it handles <param>, etc, but surely some work should be done to work with it
image/
"
The object
element must be
associated with a nested browsing context,
if it does not already have one. The element's nested browsing context must then be navigated to the given resource,
with replacement enabled. (The data
attribute of
the object
element doesn't get
updated if the browsing context gets further navigated to other
locations.)
navigation might end up treating it as something else, because it can do sniffing. how should we handle that?
The object
element represents
the specified image. The image is not a nested browsing context.
shouldn't we use the image-sniffing stuff here?
The object
element represents
the specified image, but the image cannot be shown. Jump to step 3
below in the overall set of steps (fallback).
The element's contents are not part of what the object
element represents.
Once the resource is completely loaded, fire a
load
event at the element.
If the data
attribute is absent but the type
attribute is present, and if the user
agent can find a handler suitable according to the value of the type
attribute, then
that handler should be used. If the handler supports a scriptable
interface, the HTMLObjectElement
object
representing the element should expose that interface. The handler is