This section describes data types (microsyntaxes) that are referenced by attribute descriptions in the HTML elements, and Global attributes sections.
The Attributes section of this document describes additional restrictions on strings in attribute values — in particular, restrictions for the following cases:
,
"
(comma) character. Each string itself
must
not begin or end with any
space characters,
and each string itself
must
not contain any
",
"
(comma) characters._blank
",
"_self
",
"_parent
",
or
"_top
".
Previous 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).
id
attribute of an element of type
type
anywhere in the document.#
"
character, followed by a string which
exactly matches the value of the
name
attribute of an element of type
type
anywhere in the document.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:60Z
1996-12-19T16:39:57-08:00
The empty string is a valid IRI reference, so the empty string is allowed anywhere this reference lists the URL datatype as being allowed.
Example:
http://example.org/hello
The empty string is a valid URL, so the empty string is allowed anywhere this reference lists the URL potentially surrounded by spaces datatype as being allowed.
any
"0
"
character and that are separated by a single
"x
"
character.Name
or Alias
field
labeled as “preferred MIME name”;
or, if none of the Alias
fields are so labeled, a
case-insensitive match
for a Name
field in the registry.UTF-8
".text/html;
".charset=
".;
"
character.url=
".0
".allow-forms
"allow-scripts
"allow-top-navigation
"allow-same-origin
"Because an unordered set of unique space-separated tokens can contain zero tokens, this datatype also allows the following:
Example:
1985-04-12T23:20:50.52
1996-12-19T16:39:57
Example:
1996-12-19
-
".Example:
1996-12
-W
".52
or
53
,
depending on the particular year.Example:
1996-W16
1*( atext / "." ) "@" ldh-str 1*( "." ldh-str )
…where atext is as defined in [RFC 5322], and ldh-str is as defined in [RFC 1034].
Examples:
foo-bar.baz@example.com
#
"
character.0–9
,
a–f
,
and
A–F
.Color keywords (for example, strings such as “red” or “green”) are not allowed.