Obsolete HTML elements and attributes
Metadata
If the version
attribute of an html
element is present, its value MAY be any
string.
If the http-equiv
attribute
of a meta
element is in the content-language
state, the content
attribute
value MUST be a valid BCP 47 language
tag.
If the http-equiv
attribute
of a meta
element is in the cookie state, the content
attribute value MUST be a set-cookie-string
[COOKIES]. For the purpose of
validation of this attribute value, the character set of the ABNF
production rule of the set-cookie-string
is Unicode.
The content model of
the basefont
element is nothing.
If the scheme
attribute of the meta
element is present, its value MAY be any
string.
The content model of
the bgsound
element
is nothing.
If the prefix
attribute
of an html
or head
element is specified, it
value MUST be one of these values:
og: http://ogp.me/ns#
og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#
og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# article: http://ogp.me/ns/article#
The property
attribute might be used as part of
OGP.
Flow content
The content model of
the center
element is same as the div
element.
The content model of xmp
, listing
, and plaintext
elements are text.
Lists
The content model of the dir
element, including the content model of the child
li
elements of the elements, is same as the
ul
element.
If the type
attribute of a ul
element is present, its value MUST be equal to one of disc
,
circle
, and square
, ASCII case-insensitively. If
the type
attribute of
an li
element is
present, its value MUST be one of values
allowed for type
attributes of ul
and
ol
elements.
The compact
attribute of the dir
, dl
, menu
,
ol
, or ul
element is a boolean
attribute.
Tables
If the abbr
attribute of a td
element is present, its value MUST be a syntactically valid value of the abbr
attribute of the th
element.
If the axis
attribute of a td
or th
element is present,
its value MAY be any string.
If the scope
attribute of a td
element is present, its value MUST be a syntactically valid value of the scope
attribute of the th
element.
The marquee
element
The content model of the marquee
element is same as the div
element.
If the scrolldelay
attribute of a
marquee
element is present, its value MUST be a valid non-negative
integer.
If the scrollamount
attribute of a
marquee
element is present, its value MUST be a valid non-negative
integer.
If the loop
attribute of a marquee
element is present, its value MUST be a
valid integer that represents −1 or an integer
greater than 0.
Attributes behavior
and direction
of the
marquee
element are enumerated attributes. Attribute truespeed
of the
marquee
element is a boolean attribute.
The following attributes of the marquee
element are
event handler content attributes:
onbounce
, onfinish
, and onstart
.
Boxes
Dimension
If the height
or width
attribute of
a table
, td
, th
, or
marquee
element is specified, its value MUST be a valid non-negative
integer.
The col
element's width
attribute value MUST be a valid non-negative integer.
The hr
element's width
attribute value MUST be a valid non-negative integer.
The tr
element's height
attribute value MUST be a valid non-negative integer.
If the width
attribute of a
colgroup
element [HTML4] is present, its value MUST be a valid dimension value or an
optional valid non-negative integer followed by a U+002A
ASTERISK
character (*).
The pre
element's width
attribute value MUST be a valid non-negative
integer.
The hr
element's size
attribute value MUST be a valid non-negative integer.
Margin and padding
The body
element's marginheight
, marginwidth
, topmargin
, and
rightmargin
attribute values MUST be valid non-negative integers. The iframe
and frame
elements' marginheight
and marginwidth
attribute values MUST be valid non-negative integers.
The table
element's cellspacing
, cellpadding
, and cellborder
[SAFARI] attribute values MUST be valid non-negative integers.
If the hspace
or
vspace
attribute of
an embed
, iframe
, img
,
input
, marquee
, object
,
or table
element is specified, its
value MUST be a valid dimension
value. The hspace
and vspace
attributes of
the input
element apply only to elements
whoes type
attribute is in
the Image Button
state.
The units
attribute of the embed
element [DEVEDGE] [MSDN] is an
enumerated attribute with keywords pixels
, px
, en
, and em
.
Borders
The rules
attribute of a table
element is an enumerated
attribute with keywords none
, groups
, rows
, cols
,
and all
.
The frame
attribute of a table
element is an enumerated
attribute with keywords void
, above
, below
, hsides
, lhs
, rhs
,
vsides
, box
, and border
.
The table
element's border
attribute value MUST either be the empty string or the value 1
.
The table
element's tableborder
attribute value [SAFARI]
MUST be a valid non-negative
integer.
If the border
attribute of an embed
[DEVEDGE],
img
, or object
element, or an
input
element whose type
attribute is in the Image Button state is specified,
its value MUST be a valid non-negative
integer.
The hr
element's noshade
attribute is a boolean
attribute.
Overflow
The scrolling
attribute of a
frame
or iframe
element is an
enumerated attribute with keywords on
,
scroll
, yes
, off
, noscroll
, no
,
and auto
. Keywords other than yes
, no
, and auto
are non‐
conforming.
Background images and colors
The body
, table
, thead
,
tbody
, tfoot
, tr
,
td
, and th
elements' background
attribute
values MUST be valid non-empty URLs potentially
surrounded by spaces.
A valid legacy color value is either a U+0023 NUMBER SIGN
character (#) followed by six (6)
characters in the range U+0030 DIGIT ZERO
(0) to U+0039 DIGIT NINE
(9), U+0041 LATIN CAPITAL LETTER A
to U+0046 LATIN CAPITAL LETTER F
, and U+0061 LATIN SMALL LETTER A
to U+0066 LATIN SMALL LETTER F
, or a string that ASCII case-insensitively matches
to one of the keywords listed in the SVG color
keywords section of the CSS Color specification [CSSCOLOR].
The body
, table
, thead
,
tbody
, tfoot
, tr
,
td
, th
, and marquee
elements'
bgcolor
attribute
values MUST be valid legacy color values.
The body
element's text
, link
, vlink
, and alink
attribute values MUST be valid legacy color values.
The table
, tr
[MSDN], td
[MSDN], and th
[MSDN]
elements' bordercolor
attribute values MUST be valid legacy color values. The table
,
tr
, td
, and th
elements' bordercolordark
and bordercolorlight
attribute
values [MSDN] MUST be valid legacy color values.
The color
attribute value of the font
element, if present, MUST be a valid legacy color
value.
The hr
element's color
attribute value MUST be a valid legacy color
value.
The allowtransparency
attribute of
frame
and iframe
element [MSDN] is an
enumerated attribute with keywords true
and false
.
The application
attribute of
frame
and iframe
element [MSDN] is an
enumerated attribute with keywords yes
and no
.
The bgproperties
attribute of the
body
element [MSDN] is an enumerated
attribute with two keywords: fixed
and the
empty string.
Alignments
The align
attribute of a table
element is an enumerated
attribute with keywords left
, right
, center
, middle
, abscenter
, and absmiddle
. Keywords middle
, abscenter
, and absmiddle
are non‐
conforming.
The align
attribute of a caption
element is an enumerated attribute with keywords left
, right
, top
,
and bottom
,
The align
attribute of a legend
element is an enumerated
attribute with keywords left
, right
, and center
.
The align
attribute of
elements div
, h1
, h2
,
h3
, h4
, h5
, h6
,
and p
, is an enumerated attribute with
keywords left
, right
, center
, and justify
.
The align
attribute of a hr
element is an enumerated
attribute with keywords left
, right
, and center
.
The align
attribute of a col
, colgroup
[HTML4],
thead
, tbody
, tfoot
,
tr
, th
, or td
element is an
enumerated attribute with keywords left
, center
, middle
,
absmiddle
, right
, justify
, and char
, where middle
and absmiddle
are
non-conforming.
The align
attribute of
an embed
, iframe
, img
,
input
, or object
element is
an enumerated attribute with
keywords left
, right
,
top
, bottom
,
baseline
, center
,
middle
, texttop
,
absmiddle
, abscenter
. Keywords
other than left
, right
,
top
, middle
,
and bottom
are non-conforming.
The align
attribute of
the input
element applies only to input
elements whose type
attribute is in
the Image Button
state.
The valign
attribute of a col
,
colgroup
[HTML4], thead
,
tbody
, tfoot
, tr
,
th
, or td
attribute is an enumerated
attribute with keywords top
, middle
, bottom
, and baseline
.
The valign
attribute of a
caption
element [MSDN] is an enumerated
attribute with keywords top
and bottom
.
If the char
attribute of a col
, colgroup
[HTML4],
thead
, tbody
, tfoot
,
tr
, th
, or td
element is
present, its value MUST be a string whose
length is one (1), i.e. a character.
If the charoff
attribute of a col
,
colgroup
[HTML4], thead
,
tbody
, tfoot
, tr
,
th
, or td
element is present, its value MUST be a valid dimension value.
Line breaks
The nowrap
attribute of body
, dt
, dd
, and
div
elements [MSDN], as well as of td
and
th
elements, is a boolean attribute.
The wrap
attribute of the pre
element is a boolean
attribute.
The clear
attribute of the br
element and address
,
blockquote
, center
, h1
,
h2
, h3
, h4
, h5
,
h6
, listing
, p
,
plaintext
, pre
, and xmp
elements [MSDN] is an enumerated
attribute with keywords none
, left
, right
, all
,
and both
, where both
is
non-conforming.
Phrasing content
The content model of acronym
,
big
, blink
, nobr
, strike
, and tt
elements are same as the span
element.
The font
element
Content model of the font
element
is transparent.
If the face
attribute of a font
element is present, its value MAY be any string.
If the size
attribute of a font
element is present, its value MUST be an optional U+002B PLUS SIGN
character (+) or an optional U+002D HYPHEN-MINUS
character (-), followed by a
character in the range U+0031 DIGIT ONE
(1) to U+0037 DIGIT SEVEN
(7).
Hyperlinks
A valid hash-ID reference to an element of type type is a string consisting of a U+0023 NUMBER SIGN
character (#) followed by a string
which exactly matches the ID of an element with type type
in the same home subtree.
The x-ms-format-detection
attribute
of HTML elements [MSDN] is enumerated attribute
with keywords all
, none
, and
phone
.
The nohref
attribute of the area
element is a boolean
attribute.
If the charset
attribute of an
a
or link
element is present, its
value MUST be a label. The term
label is defined by the
Encoding
Standard.
If the coords
attribute and/or the shape
attribute of an a
element is
present, their values, and their presence themselves, MUST be valid if they were specified for an
area
element with appropriate href
and
alt
attributes specified.
Embedded content
If there are embed
, and/or img
elements
with their name
attributes specified, those elements
MUST be treated as if they were a
elements for the purpose of conformance of name
attributes of a
, embed
,
and img
elements in the document, except that use of the
name
attributes for these
elements are always non-conforming. (Use of
the name
attribute for
the a
element is sometimes obsolete but conforming
according to HTML Standard.)
The img
element
If the usemap
attribute of the input
element is present, its value MUST be a
valid hash-name reference to a map
element.
The usemap
attribute of the
input
element applies only to input
elements
whose type
attribute is in the
Image Button state.
If the longdesc
attribute of the frame
, iframe
, or
img
element is present, its value MUST be a valid URL potentially surrounded by
spaces.
The composite
attribute of the
img
element [SAFARI] is a enumerated
attribute with the keyword source-over
.
Image sources
If the dynsrc
[MSDN],
lowsrc
[DEVEDGE]
[MSDN], or vrml
[MSDN] attribute of the img
or
input
element is present, its value MUST be a valid non-empty URL potentially
surrounded by spaces. The dynsrc
, lowsrc
, or vrml
attribute of the input
element applies only to
input
elements whose type
attribute is in the Image Button state.
If the oversrc
[SAFARI] attribute of
the img
element is present, its value MUST be a valid non-empty URL potentially
surrounded by spaces.
The embed
element
If the pluginpage
[SAFARI], pluginspage
, or pluginurl
attribute of the embed
element [DEVEDGE] is present,
its value MUST be a valid URL potentially
surrounded by spaces.
The content model of
the noembed
element
is text.
The object
and param
elements
If the archive
attribute of the
object
element is present, its value MUST be a set of space-separated
tokens, each of which MUST be a
valid non-empty URL.
When a URL specified within
the archive
attribute of the
object
element is resolved, the URL obtained by resolving the value of the codebase
attribute of the element,
if any, MUST be used as the base
URL.
If the classid
attribute of an
object
element is present, its value MUST be a valid non-empty URL potentially
surrounded by spaces and MUST be an
absolute URL.
If the code
attribute of an
embed
[SAFARI], or object
element
is present, its MUST be a valid non-empty
URL potentially surrounded by spaces.
If the codebase
attribute of an
object
element is present,
its MUST be a valid non-empty URL
potentially surrounded by spaces.
If the codetype
attribute of an
object
element is present, its MUST be a valid MIME type. This
attribute SHOULD be presented if the element
has a classid
attribute.
The declare
attribute of the
object
element is a boolean attribute.
If the standby
attribute of the
object
element is present, its value MAY be any string.
The palette
attribute of the
embed
element [DEVEDGE] is an enumerated
attribute with keywords foreground
and background
.
If the type
attribute of a param
element is present, its value MUST be a valid MIME type.
The valuetype
attribute of a
param
element is an enumerated attribute
with keywords data
, ref
, and
object
.
Audio and video
The start
attribute of
the img
or input
element [MSDN] is an
enumerated attribute with keywords fileopen
and mouseover
. The start
attribute of the input
element applies only to input
elements whose type
attribute is in the Image Button state. The attribute
MUST NOT be specified unless the element also
has the dynsrc
attribute specified.
Frames
The frameset
element
The content model of the frameset
element is one or more frame
or frameset
elements. Additionally, there can be a
noframes
element in some
case.
A valid list of dimensions is a set of
comma-separated tokens, each of which MUST be one of a valid dimension
value, an optional valid non-negative integer
followed by a U+002A ASTERISK
character
(*), or a U+002A ASTERISK
character
(*).
If the cols
or rows
attribute of a frameset
element is present, its value MUST be a
valid list of dimensions.
The frame
element
The content model of the frame
element is nothing.
If the src
attribute of a frame
element is present, its value MUST be a valid non-empty URL potentially
surrounded by spaces.
If the name
attribute of a frame
element is present, its value MUST be a valid browsing context
name.
The noresize
attribute of
frame
and iframe
elements [MSDN] is
boolean attributes.
Frame borders
The frameborder
attribute of a
frame
, frameset
, iframe
, or
embed
[DEVEDGE] element is an enumerated
attribute, with keywords 1
, yes
, 0
, and no
,
where keywords yes
and no
are
non‐conforming.
If the border
attribute of a
frameset
[DEVEDGE] or iframe
element
[MSDN]
is present, its value MUST be a valid
non-negative integer.
The frame
and frameset
elements' bordercolor
attribute values MUST be valid legacy color values.
If the framespacing
attribute of
frame
, frameset
, or iframe
element [MSDN] is present, its value MUST be a valid non-negative
integer.
The noframes
element
The content model of
the noframes
element
is text.
The noframes
element MAY be used as a child of the frameset
element. However, it MUST NOT have more than
one ancestor frameset
elements.
Scripting
If the for
attribute of a script
element is present, its value MUST be the ID of an element in the
same home subtree.
If the event
attribute of a script
element is present, its value MAY be any
string.
The following attributes of HTML elements [MSDN] MUST be treated as event handler content
attributes:
onactivate
,
onafterupdate
,
onbeforeactivate
,
onbeforecopy
,
onbeforecut
,
onbeforedeactivate
,
onbeforeeditfocus
,
onbeforepaste
,
onbeforeupdate
,
oncellchange
,
oncontrolselect
,
ondataavailable
,
ondatasetchanged
,
ondatasetcomplete
,
ondeactivate
,
onerrorupdate
,
onfilterchange
,
onfocusin
,
onfocusout
,
onhelp
,
onlayoutcomplete
,
onlosecapture
,
onmouseenter
,
onmouseleave
,
onmove
,
onmoveend
,
onmovestart
,
onpropertychange
,
onresizeend
,
onresizestart
,
onrowenter
,
onrowexit
,
onrowsdelete
,
onrowsinserted
, and
onselectstart
.
The following attributes of HTML elements [SAFARI] MUST be treated as event handler content
attributes:
ongesturechange
,
ongestureend
,
ongesturestart
,
onorientationchange
,
onsearch
,
ontouchcancel
,
ontouchend
,
ontouchmove
, and
ontouchstart
.
Forms
If this specification says an attribute applies to certain states
of input
or button
elements, the attribute
MUST NOT be specified unless the attribute
applies to the element.
The wrap
attribute of a textarea
element, for the purpose of conformance checking, MUST be treated as if there are additional
keywords: off
, virtual
, and
physical
. However, these keywords are
non‐conforming.
The autocorrect
attribute of
the input
and textarea
elements [SAFARI]
are enumerated attribute with
keywords on
and off
.
The autocorrect
attribute of
the
input
element applies only
to input
elements
whose type
attribute
is in the
Text, Search, URL, E-mail, Telephone,
or Password
state.
The content model of the keygen
element is nothing.
If the precision
attribute of an
input
element [SAFARI] is present, its value MUST be given in one of the following forms: one or
more of characters in the range U+0030 DIGIT
ZERO
(0) to U+0039 DIGIT NINE
(9),
followed by keyword dp
or sf
,
keyword integer
, or keyword float
. The precision
attribute of the
input
element applies only to input
elements
whose type
attribute is in the
Number or Range state.
Autocomplete
If the autosave
attribute of an
input
element [SAFARI] is present, its value MAY be any string. The autosave
attribute of the
input
element applies only to input
elements
whose type
attribute is in the
Search state.
The incremental
attribute of an
input
element [SAFARI] is a boolean
attribute. The incremental
attribute of the
input
element applies only to input
elements
whose type
attribute is in the
Search state.
If the results
attribute of an
input
element [SAFARI] is present, its value MUST be a valid non-negative integer.
The results
attribute of the
input
element applies only to input
elements
whose type
attribute is in the
Search state.
The vcard_name
attribute of the
input
element is an enumerated attribute
with keywords
vCard.Business.City
,
vCard.Business.Country
,
vCard.Business.Fax
,
vCard.Business.Phone
,
vCard.Business.State
,
vCard.Business.StreetAddress
,
vCard.Business.URL
,
vCard.Business.Zipcode
,
vCard.Cellular
,
vCard.Company
,
vCard.Department
,
vCard.DisplayName
,
vCard.Email
,
vCard.FirstName
,
vCard.Gender
,
vCard.Home.City
,
vCard.Home.Country
,
vCard.Home.Fax
,
vCard.Home.Phone
,
vCard.Home.State
,
vCard.Home.StreetAddress
,
vCard.Home.Zipcode
,
vCard.Homepage
,
vCard.JobTitle
,
vCard.LastName
,
vCard.MiddleName
,
vCard.Notes
,
vCard.Office
, and
vCard.Pager
.
The vcard_name
attribute of
the input
element applies only to input
elements whose type
attribute is in
the Text, Search, Password, URL, E-mail, or Telephone state.
User interaction
The atomicselection
attribute of an HTML element [MSDN] is an
enumerated attribute with keywords true
and false
.
The hidefocus
attribute of an HTML element [MSDN] is a
boolean attribute.
The unselectable
attribute of an HTML element [MSDN] is an
enumerated attribute with keywords on
and off
.
The disabled
attribute of an HTML element [MSDN] is a
boolean attribute.
The HTML Standard defines the (conforming) disabled
attribute for several HTML
elements. This requirement does not (or in fact cannot)
override it in any way.