85
15 Obsolete features
15.1 Obsolete but conforming features
Features listed in this section will trigger warnings in conformance checkers.
Authors should not specify aborderp1110
attribute on animgp280
element. If the attribute is present, its value must be the string "0". CSS should be
used instead.
Authors should not specify alanguagep1108
attribute on ascriptp564
element. If the attribute is present, its value must be anASCII case-
insensitivep63
match for the string "JavaScript" and either thetypep565
attribute must be omitted or its value must be anASCII case-
insensitivep63
match for the string "text/javascript". The attribute should be entirely omitted instead (with the value "JavaScript", it has no
effect), or replaced with use of thetypep565
attribute.
Authors should not specify thenamep1107
attribute onap207
elements. If the attribute is present, its value must not be the empty string and must
neither be equal to the value of any of theIDs
in the element'stree
other than the element's ownID
, if any, nor be equal to the value of any of the
othernamep1107
attributes onap207
elements in the element'stree
. If this attribute is present and the element has anID
, then the attribute's value
must be equal to the element'sID
. In earlier versions of the language, this attribute was intended as a way to specify possible targets forfragments
inURLs
. Theidp122
attribute should be used instead.
Authors should not, but may despite requirements to the contrary elsewhere in this specification, specify themaxlengthp463
andsizep463
attributes oninputp434
elements whosetypep436
attributes are in theNumberp450
state. One valid reason for using these attributes regardless is to
help legacy user agents that do not supportinputp434
elements withtype="number"to still render the text field with a useful width.
To ease the transition from HTML4 Transitional documents to the language defined inthisspecification, and to discourage certain features that are
only allowed in very few circumstances, conformance checkers must warn the user when the following features are used in a document. These are
generally old obsolete features that have no effect, and are allowed only to distinguish between likely mistakes (regular conformance errors) and
mere vestigial markup or unusual and discouraged practices (these warnings).
The following features must be categorised as described above:
• The presence of anobsolete permitted DOCTYPEp952
in anHTML document
.
• The presence of aborderp1110
attribute on animgp280
element if its value is the string "0".
• The presence of alanguagep1108
attribute on ascriptp564
element if its value is anASCII case-insensitivep63
match for the string
"JavaScript" and if there is notypep565
attribute or there is and its value is anASCII case-insensitivep63
match for the string "text/
javascript".
• The presence of anamep1107
attribute on anap207
element, if its value is not the empty string.
• The presence of amaxlengthp463
attribute on aninputp434
element whosetypep436
attribute is in theNumberp450
state.
• The presence of asizep463
attribute on aninputp434
element whosetypep436
attribute is in theNumberp450
state.
Conformance checkers must distinguish between pages that have no conformance errors and have none of these obsolete features, and pages that
have no conformance errors but do have some of these obsolete features.
Inthe HTML syntaxp951
, specifying aDOCTYPEp951
that is anobsolete permitted DOCTYPEp952
will also trigger a warning.
Note
For example, a validator could report some pages as "Valid HTML" and others as "Valid HTML with warnings".
Example
15.1.1 Warnings for obsolete but conforming features
1105