This section defines datatypes that are referenced by attribute definitions in the HTML elements, Common attributes, and Forms attributes sections.
For any attribute definition in this document that references the string datatype, a string is defined as normal character data.
The Attributes section of this document describes additional restrictions on strings in attribute values — in particular, restrictions for the following cases:
For any attribute definition in this document that references the token datatype, a token is defined as a string that does not contain any space characters.
_"
character_blank_self_parent_topPrevious versions of HTML placed greater restrictions on the content of ID values (for example, they did not permit ID values to begin with a number).
#"
character, followed by a string which
exactly matches the value of the
name
attribute of an element in the document with type
type.0—9,
optionally prefixed with a
"-"
character.0—9.-"
character.0—9".."
character0—9"e"
character or
"E"
character-"
character or
"+"
character0—9".-"
characterT and
Z in the date/time syntax must always be
uppercaseExamples:
1990-12-31T23:59:60Z1996-12-19T16:39:57-08:00
The empty string is a valid IRI-reference, so the empty string is allowed as the value of any attribute for which this document defines URI as the allowed datatype.
Example:
http://example.org/hello
Examples:
/hello#canvashttp://example.org/
any"0"
character and that are separated by a single
"x"
character.For documents in the
HTML syntax:
a
case-insensitive match
for any
character set name
given in a Name or Alias field
labeled as “preferred MIME name” in the IANA
Character Sets registry
[IANACHARSET],
if there is one; or if none of the Alias
fields are so labeled, a
case-insensitive match
for a Name field in the registry.
For documents in the XML
syntax, any
case-insensitive match
for the string
"UTF-8".
text/html;".charset=".;"
character.url=".0".allow-same-origin"allow-forms"allow-scripts"Example:
1996-12-19
-".Example:
1996-12
-W".Example:
1996-W16
#"
character.0–9,
a–f,
and
A–F.