manakai's Conformance Checking Guideline for Obsolete HTML Elements and Attributes

The manakai project, 17 June 2017

Latest version
https://manakai.github.io/spec-obsvocab/
Version history
https://github.com/manakai/spec-obsvocab/commits/gh-pages

Abstract

This specification defines authors' requirements for historical HTML elements and attributes, which are not defined in the HTML Standard or listed but marked as obsolete, such that conformance checkers can find authoring errors against these requirements. Use of such non‐conforming elements and attributes are sometimes necessary for compatibility with legacy or Galápagos user agents and/or historical authoring practices. A conformance checker that reports a non‐conforming elements and attributes just as non‐conforming is not useful enough to ease authoring processes in such legacy circumstances. The scope of this specification is explicitly limited to the conformance checking of documents (or parts of documents) that contains obsolete elements and attributes for the purpose of comaptibility.

This specification is developed as part of the manakai project. Although it might be useful to other parties, the only intended audiences of this specification are contributors of the project. This specification does not define or describe any kind of standard.

Status of this document

This section describes the status of this document at the time of its publication. Other documents might supersede this document.

This document is a technical specification, produced as part of the manakai project. It might be updated, replaced, or obsoleted by other documents at any time.

Comments on this document are welcome and may be sent to the author.

Translations of thie document might be available. The English version of the document is the only normative version.

Table of contents

  1. 1 Introduction
    1. 1.1 How requirements for non‐conforming elements and attributes are defined
    2. 1.2 Stability of this document
  2. 2 Common infrastructure
    1. 2.1 Terminology
    2. 2.2 Namespaces
  3. 3 Obsolete HTML elements and attributes
    1. 3.1 Metadata
      1. 3.1.1 Metadata elements
      2. 3.1.2 The bgsound element
      3. 3.1.3 Hidden metadata
    2. 3.2 Flow content
      1. 3.2.1 Lists
      2. 3.2.2 Tables
      3. 3.2.3 The marquee element
    3. 3.3 Boxes
      1. 3.3.1 Dimension
      2. 3.3.2 Margin and padding
      3. 3.3.3 Borders
      4. 3.3.4 Overflow
    4. 3.4 Background images and colors
    5. 3.5 Alignments
    6. 3.6 Line breaks
    7. 3.7 Phrasing content
      1. 3.7.1 The font element
    8. 3.8 Hyperlinks
      1. 3.8.1 Link destinations
      2. 3.8.2 Metadata
      3. 3.8.3 Profile data
      4. 3.8.4 Activation and presentation
    9. 3.9 Embedded content
      1. 3.9.1 The img element
        1. 3.9.1.1 Image sources
        2. 3.9.1.2 Presentation
      2. 3.9.2 The embed element
      3. 3.9.3 The applet, object, and param elements
      4. 3.9.4 Audio and video
      5. 3.9.5 Vibration
      6. 3.9.6 Embedded data
    10. 3.10 Frames
      1. 3.10.1 The frameset element
      2. 3.10.2 The frame element
      3. 3.10.3 Frame borders
      4. 3.10.4 The noframes element
    11. 3.11 Scripting
    12. 3.12 Forms
      1. 3.12.1 Value constraints and input mode
      2. 3.12.2 Autocomplete
    13. 3.13 User interaction
  4. 4 Elements and attributes not included in this specification
  5. 5 Machine-readable data
  6. Index
  7. References
    1. Normative references
    2. Non-normative references
  8. Author

1 Introduction

This section is non‐normative.

The HTML Standard defines the language vocabulary of HTML, i.e. a set of conforming HTML elements and attributes. Any other HTML elements and attributes are non‐conforming unless otherwise defined by some applicable specification. In particular, the HTML Standard identifies a number of non‐conforming elements and attributes as obsolete. It does not define any specific conformance requirement for such elements and attributes, as the use of them is by definition non‐conforming.

However, authors are sometimes forced to use such non‐conforming elements and attributes, for compatibility with legacy or Galápagos user agents and/or historical authoring practices. A conformance checker that reports a non‐conforming elements and attributes just as non‐conforming is not useful enough to ease authoring processes in such legacy circumstances.

This specification defines authors' requirements for HTML elements and attributes not defined in the HTML Standard or those marked as obsolete, such that conformance checkers can find authoring errors against these requirements. The scope of this specification is explicitly limited to the conformance checking of documents (or parts of documents) that contains obsolete elements and attributes for the purpose of comaptibility. Elements and attributes conforming to these requirements are still non‐conforming. Especially, this specification cannot be an applicable specification in the context of the HTML Standard for the purpose of authors' requirements.

This specification is developed as part of the manakai project. Although it might be useful to other parties, the only intended audiences of this specification are contributors of the project. This specification does not define or describe any kind of standard.

1.1 How requirements for non‐conforming elements and attributes are defined

As a general rule, requirements for non‐conforming elements and attributes are derived by the following rules:

  1. If an element or attribute a is defined in a historical standard specification:
    • If the HTML Standard defines user agent requirements for a, author requirements for a should be derived from them.
    • Otherwise, if there is an element or attribute b that shares the definition or requirements with a in the specification, and b is defined in the HTML Standard, then b should share the same requirements as a's in the HTML Standard.
    • Otherwise, a's expected syntax in the specification should be used as requirements.
  2. Otherwise, if a is described in the first implementor's official reference documentation, a best effort attempt should be made to formalize a's expected usage documented there as requirements.

If an attribute maps to the pixel length property, the attribute value has to be a valid non-negative integer.

If an attribute maps to the dimension property, the attribute value has to be a valid dimension value.

1.2 Stability of this document

This document is a Living Standard. That is, requirements in this document could be modified at any time. Earlier revisions of this document is available from the version history page.

Requirements in this document are modified, sometimes incompatibly, for several reasons, including but not limited to:

2 Common infrastructure

This specification depends on the Infra Standard.

2.1 Terminology

The term HTML namespace is defined by the Infra Standard.

Terms applicable specifications, ASCII case-insensitive, HTML elements, XML documents, home subtree, valid integer, valid non-negative integer, set of comma-separated tokens, set of space-separated tokens, unordered set of unique space-separated tokens, valid browsing context name, valid browsing context name or keyword, boolean attribute, enumerated attribute, valid hash-name reference, event handler content attributes, content model, nothing, text, MIME type, valid MIME type, XML MIME type, URL, valid URL potentially surrounded by spaces, valid non-empty URL, valid non-empty URL potentially surrounded by spaces, absolute URL, resolve a URL, valid e-mail address, maps to the pixel length property, and maps to the dimension property are defined by the HTML Standard.

The term valid dimension value is defined in a commented out paragraph of the HTML Standard.

A string is a valid BCP 47 language tag if it is a valid language tag as defined by the IETF Language Tag specification [BCP47].

2.2 Namespaces

Except where otherwise stated, all elements defined or mentioned in this specification are in the HTML namespace, and all attributes deinfed or mentioned in this specification have no namespace.

3 Obsolete HTML elements and attributes

3.1 Metadata

If the profile attribute of the head element is present, its value MUST be a set of space-separated tokens, each of which MUST be a valid non-empty URL. For the purpose of conformance of the base element, however, this is not an attribute defined as taking URLs.

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.

3.1.1 Metadata elements

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.

3.1.2 The bgsound element

The content model of the bgsound element is nothing.

If the src attribute of a bgsound element [MSDN] is present, its value MUST be a valid non-empty URL potentially surrounded by spaces. The src attribute MUST be present.

If the balance attribute of a bgsound element [MSDN] is present, its value MUST be a valid integer that represents an integer in the range −10,000 to 10,000, inclusive.

The volume attribute of the bgsound element [SOFTBANK] is an enumerated attribute with keywords high, middle, low, and 0.

3.1.3 Hidden metadata

Attributes about, resource, content, datatype, typeof, property, rel, and rev [RDFA, XHTMLRDFA11] of an HTML element, if present, MAY have any value.

Attributes prefix and vocab of an HTML element [XHTMLRDFA11], if present, MAY have any value.

The HTML Standard defines the (conforming) content and rel attributes for several HTML elements. This requirement does not (or in fact cannot) override them in any way.

3.2 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.

3.2.1 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 or dir [IMODE] 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.

3.2.2 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.

3.2.3 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.

3.3 Boxes

3.3.1 Dimension

If the height or width attribute of an applet, 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.

3.3.2 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 applet, 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.

3.3.3 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.

3.3.4 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.

The scroll attribute of a body or html element [MSDN] is an enumerated attribute with keywords yes, no, and auto.

3.4 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.

3.5 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 applet, 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.

3.6 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.

3.7 Phrasing content

The content model of acronym, big, blink, nobr, strike, and tt elements are same as the span element.

3.7.1 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).

3.8 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.

3.8.1 Link destinations

If the src attribute of the a element [SOFTBANK] is present, its value MUST be a valid non-empty URL potentially surrounded by spaces.

If the cti attribute of the a element [IMODE] is present, its value MUST be one or more characters in the range U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9), U+002A ASTERISK character (*), U+0023 NUMBER SIGN character (#), U+002C COMMA character (,), or U+002F SOLIDUS character (/). There MUST NOT be a U+002F SOLIDUS character (/) immediately following another U+002F SOLIDUS character (/) in the attribute value. The length of the attribute value MUST NOT be greater than 128.

If the ijam attribute of the a element [IMODE] is present, its value MUST be the ID of an object element in the same home subtree or a valid hash-ID reference to an object element. The href attribute MUST be specified if the ijam attribute is specified. If the target attribute is specified, the ijam attribute MUST NOT be specified.

If the ista attribute of the a element [IMODE] is present, its value MUST be the ID of an object element in the same home subtree. The href attribute MUST be specified if the ista attribute is specified. The ista attribute MUST NOT be specified if the ijam attribute is specified. If the target attribute is specified, the ista attribute MUST NOT be specified.

If ilet, iswf, or irst attribute of the a element [IMODE] is present, its value MUST be a valid hash-ID reference to an object element. The href attribute MUST be specified if ilet, iswf, or irst attribute is specified. If the target attribute is specified, ilet, iswf, and irst attributes MUST NOT be specified.

If ifb or ib attribute of the a element [IMODE] is present, its value MUST be a valid URL potentially surrounded by spaces. The href attribute MUST be specified if ifb or ib attribute is specified. If the target attribute is specified, ifb and ib attributes MUST NOT be specified.

The utn attribute of the a or form element [IMODE] is a boolean attribute. If the target attribute is specified, the utn attribute MUST NOT be specified.

The lcs attribute of a and form elements [IMODE] is a boolean attribute. The href attribute MUST be specified if the lcs attribute of the a element is specified. If the target attribute is specified, the lcs attribute MUST NOT be specified.

The nohref attribute of the area element is a boolean attribute.

3.8.2 Metadata

If the charset attribute of an a or link element is present, its value MUST be syntactically valid charset attribute value for a script element.

3.8.3 Profile data

If telbook or kana attribute of an a element [IMODE] is present, its value MAY be any string.

If the email attribute of an a element [IMODE] is present, its value MUST be a valid e-mail address.

If the memoryname attribute of an a element [SOFTBANK] is present, its value MUST be a string whose length is greater than two (2). The attribute value MUST contain a U+002D HYPHEN-MINUS character (-) in the middle.

3.8.4 Activation and presentation

If the directkey attribute of an a or input element [SOFTBANK] is present, its value MUST be a string that is syntactically valid as an accesskey attribute value. The directkey attribute of the input element applies only to input elements whose type attribute is in the Submit Button state. If the directkey attribute is specified for an input element, the value attribute MUST also be specified.

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.

3.9 Embedded content

If there are applet, 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, applet, 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.)

3.9.1 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.

3.9.1.1 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.

If the localsrc attribute of the img element [EZWEB] is present, its value MUST be a string consist of one or more characters in the range U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9), U+0041 LATIN CAPITAL LETTER A to U+005A LATIN CAPITAL LETTER Z, and U+0061 LATIN SMALL LETTER A to U+007A LATIN SMALL LETTER Z. The value SHOULD be a character in the range U+0031 DIGIT ONE (1) to U+0039 DIGIT NINE (9), followed by zero or more characters in the range U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9)

3.9.1.2 Presentation

The suppress attribute of the img element [DEVEDGE] is a boolean attribute.

The composite attribute of the img element [SAFARI] is a enumerated attribute with the keyword source-over.

The galleryimg attribute of the img element [MSDN] is a enumerated attribute with keywords yes, true, no, and false.


The nosave attribute of the img element [SAFARI] is a boolean attribute.

The copyright attribute [EZWEB] of img and object elements is enumerated attribute with keywords yes and no.

3.9.2 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.

3.9.3 The applet, object, and param elements

The content model of the applet element is same as the object element.

If the alt attribute of the applet element is present, its value MAY be any string. This is not a required attribute.

The width attribute and the height attribute of the applet element MUST be specified.


If the archive attribute of the applet element is present, its value MUST be a set of comma-separated tokens, each of which MUST be a valid non-empty URL that contains no U+002C COMMA character (,).

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 applet or 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 applet, embed [SAFARI], or object element is present, its MUST be a valid non-empty URL potentially surrounded by spaces.

If the object attribute of an applet element is present, its MUST be a valid non-empty URL potentially surrounded by spaces.

For an applet element at least one of code and object attribute MUST be specified.

If the codebase attribute of an applet or 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 mayscript attribute of the applet element [DEVEDGE] is a boolean attribute.

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.

3.9.4 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.

The soundstart attribute of a or input element [SOFTBANK] is an enumerated attribute with keywords select and focus. This attribute MUST NOT be specified unless the href attribute of the a element or the src attribute of the input element is also specified. The soundstart attribute of the input element applies only to input elements whose type attribute is in the Submit Button state.

If the loop attribute of the input, or bgsound element [MSDN] is present, its value MUST be a valid integer that represents an integer greater than or equal to −1. The loop attribute of the input element applies only to input elements whose type attribute is in the Image Button state.

If the loop attribute of the a element [SOFTBANK] is present, its value MUST be a valid non-negative integer or a string infinite. This attribute MUST NOT be specified unless the href attribute of the a element is also specified.

The volume attribute of the a and input elements [SOFTBANK] is an enumerated attribute with keywords high, middle, and low. This attribute MUST NOT be specified unless the href attribute of the a element or the src attribute of the input element is also specified. The volume attribute of the input element applies only to input elements whose type attribute is in the Submit Button state.

3.9.5 Vibration

The vibration attribute of a and input elements [SOFTBANK] are an enumerated attribute with keywords select and focus. The vibration attribute of the input element applies only to input elements whose type attribute is not in the Hidden state.

If the viblength attribute of a and input elements [SOFTBANK] is present, its value MUST be a valid non-negative integer that represents a number in the range 1 to 9 (inclusive). This attribute MUST NOT be specified unless the vibration attribute is also specified. The viblength attribute of the input element applies only to input elements whose type attribute is not in the Hidden state.

3.9.6 Embedded data

If the datasrc attribute of an element a, applet, button, div, frame, iframe, img, input, label, legend, marquee, object, option, select, span, table, or textarea is present, its value MUST be a valid non-empty URL potentially surrounded by spaces.

If the datafld attribute of an element a, applet, button, div, fieldset, frame, iframe, img, input, label, legend, marquee, object, param, select, span, or textarea is present, its value MAY be any string.

The dataformatas attribute of an element button, div, input, label, legend, marquee, object, option, select, span, or table is an enumerated attribute with keywords text, html, and localized-text.

If the datapagesize attribute of a table element is present, its value MUST be a valid non-negative integer.

3.10 Frames

3.10.1 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 following attributes of the frameset element are event handler content attributes: onafterprint, onbeforeprint, onbeforeunload, onhashchange, onmessage, onoffline, ononline, onpagehide, onpageshow, onpopstate, onstorage, and onunload.

3.10.2 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.

The security attribute of frame and iframe elements [MSDN] is an enumerated attribute with the keyword restricted.

3.10.3 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.

3.10.4 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.

3.11 Scripting

Unless otherwise specified, the language attribute of HTML elements, if present, MUST have a value that is ASCII case-insensitively equal to JavaScript.

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.

If the archive attribute of a script element [DEVEDGE] is present, its value MUST be a valid non-empty URL potentially surrounded by spaces.


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.

3.12 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.

Attributes autocapitalize and autocorrect of the input and textarea elements [SAFARI] are enumerated attributes with keywords on and off. Attributes autocapitalize and autocorrect 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.

3.12.1 Value constraints and input mode

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.

The istyle attribute of an input or textarea element [IMODE] is an enumerated attribute with keywords 1, 2, 3, and 4. The istyle 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.

The mode attribute of input and textarea elements [SOFTBANK] is an enumerated attribute with keywords hiragana, katakana, hankakukana, alphabet, and numeric. The mode 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.

If the format attribute of an input or textarea element [EZWEB] is present, its value MUST be a valid input mask. A valid input mask is a string consist of one or more format codes. A format code is one of characters A, a, N, n, X, x, M, and m, optionally preceded either by a U+002A ASTERISK character (*) or by one or more characters in the range U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9). Alternatively, a format code can be a U+005C REVERSE SOLIDUS character (\) followed by a character. The format 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.

The emptyok attribute of an input or textarea element [EZWEB] is an enumerated attribute with keywords true and false. The emptyok attribute of the input element applies only to input elements whoes type attribute is in the Text, Search, Password, URL, E-mail, or Telephone state.

3.12.2 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.

The iprof attribute of an input or textarea element [IMODE] is an enumerated attribute with keywords: name1, name2, name, kana1, kana2, kana, tel1, tel2, mail1, mail2, zip, address1, address2, address3, address4, address, birthday1, birthday2, birthday3, and birthday. The iprof 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.

3.13 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.

4 Elements and attributes not included in this specification

This section is non-normative.

Following features are not included in this specification, as they are not implemented by current Web browsers such that checking against them in validators will not help anyone:

Some of features listed in this section were defined in this specification but dropped as described in an earlier section.

This section does not intend to enumerate all obsolete HTML features. A JSON data file in the data-web-defs repository (documentation) is trying to list any known obsolete HTML elements and attributes.

5 Machine-readable data

This section is non-normative.

Some of data for elements and attributes in this specification are available as JSON data in the data-web-defs repository (documentation).

Test data for validators are also available in the tests-web repository.

Index

This section is non-normative.

Common attributes of HTML elements
about
atomicselection
content
datatype
disabled
hidefocus
language
onactivate
onafterupdate
onbeforeactivate
onbeforecopy
onbeforecut
onbeforedeactivate
onbeforeeditfocus
onbeforepaste
onbeforeupdate
oncellchange
oncontrolselect
ondataavailable
ondatasetchanged
ondatasetcomplete
ondeactivate
onerrorupdate
onfilterchange
onfocusin
onfocusout
ongesturechange
ongestureend
ongesturestart
onhelp
onlayoutcomplete
onlosecapture
onmouseenter
onmouseleave
onmove
onmoveend
onmovestart
onorientationchange
onpropertychange
onresizeend
onresizestart
onrowenter
onrowexit
onrowsdelete
onrowsinserted
onselectstart
onsearch
ontouchcancel
ontouchend
ontouchmove
ontouchstart
prefix
property
rel
resource
rev
typeof
unselectable
vocab
x-ms-format-detection
The a element
charset
coords
cti
datafld
datasrc
directkey
email
ib
ifb
ijam
ilet
irst
ista
iswf
kana
lcs
loop
memoryname
shape
soundstart
src
telbook
utn
viblength
vibration
volume
The acronym element
No element-specific attribute.
The address element
clear
The applet element
align
alt
archive
code
codebase
datafld
datasrc
height
hspace
mayscript
name
object
vspace
width
The area element
nohref
The basefont element
No element-specific attribute.
The bgsound element
balance
loop
src
volume
The big element
No element-specific attribute.
The blink element
No element-specific attribute.
The body element
alink
background
bgcolor
bgproperties
link
marginheight
marginwidth
nowrap
rightmargin
scroll
text
topmargin
vlink
The br element
clear
The button element
datafld
dataformatas
datasrc
The caption element
align
valign
The center element
clear
The col element
align
char
charoff
valign
width
The colgroup element
align
char
charoff
valign
width
The dd element
nowrap
The dir element
compact
type
The div element
align
datafld
dataformatas
datasrc
nowrap
The dl element
compact
The dt element
nowrap
The embed element
align
border
code
hspace
name
palette
pluginpage
pluginspage
pluginurl
units
vspace
The fieldset element
datafld
The font element
color
face
size
The form element
lcs
utn
The frame element
allowtransparency
application
bordercolor
datafld
datasrc
frameborder
framespacing
longdesc
marginheight
marginwidth
name
noresize
scrolling
security
src
The frameset element
cols
border
bordercolor
frameborder
framespacing
onafterprint
onbeforeprint
onbeforeunload
onhashchange
onmessage
onoffline
ononline
onpagehide
onpageshow
onpopstate
onstorage
onunload
rows
The h1 element
align
clear
The h2 element
align
clear
The h3 element
align
clear
The h4 element
align
clear
The h5 element
align
clear
The h6 element
align
clear
The head element
profile
The hr element
align
color
noshade
size
width
The html element
scroll
version
The iframe element
align
allowtransparency
application
border
datafld
datasrc
frameborder
framespacing
hspace
longdesc
marginheight
marginwidth
noresize
scrolling
security
vspace
The img element
align
border
composite
copyright
datafld
datasrc
dynsrc
galleryimg
hspace
localsrc
longdesc
lowsrc
name
nosave
oversrc
start
suppress
vrml
vspace
The input element's attributes
align
autocapitalize
autocorrect
autosave
border
datafld
dataformatas
datasrc
directkey
dynsrc
emptyok
format
hspace
incremental
iprof
istyle
loop
lowsrc
mode
precision
results
soundstart
start
usemap
vcard_name
viblength
vibration
volume
vrml
vspace
The keygen element
No element-specific attribute.
The label element
datafld
dataformatas
datasrc
The legend element
align
datafld
dataformatas
datasrc
The li element
type
The link element
charset
The listing element
clear
The marquee element
behavior
datafld
dataformatas
datasrc
direction
height
hspace
loop
onbounce
onfinish
onstart
scrollamount
scrolldelay
truespeed
vspace
width
The menu element
compact
The meta element
scheme
The nobr element
No element-specific attribute.
The noembed element
No element-specific attribute.
The noframes element
No element-specific attribute.
The object element
align
archive
border
classid
code
codebase
codetype
copyright
datafld
dataformatas
datasrc
declare
hspace
standby
vspace
The ol element
compact
The option element
dataformatas
datasrc
The p element
align
clear
The param element
type
valuetype
The plaintext element
clear
The pre element
clear
width
wrap
The script element
archive
event
for
The select element
data
datafld
dataformatas
datasrc
The span element
datafld
dataformatas
datasrc
The strike element
No element-specific attribute.
The table element
align
background
bgcolor
border
bordercolor
bordercolordark
bordercolorlight
cellborder
cellpadding
cellspacing
dataformatas
datapagesize
datasrc
frame
height
hspace
rules
tableborder
vspace
width
The tbody element
align
background
bgcolor
char
charoff
valign
The td element
align
abbr
axis
background
bgcolor
bordercolor
bordercolordark
bordercolorlight
char
charoff
height
nowrap
scope
valign
width
The textarea element
autocapitalize
autocorrect
datafld
datasrc
emptyok
format
iprof
istyle
mode
The tfoot element
align
background
bgcolor
char
charoff
valign
The th element
align
axis
background
bgcolor
bordercolor
bordercolordark
bordercolorlight
char
charoff
height
nowrap
valign
width
The thead element
align
background
bgcolor
char
charoff
valign
The tr element
align
background
bgcolor
bordercolor
bordercolordark
bordercolorlight
char
charoff
height
valign
The tt element
No element-specific attribute.
The ul element
compact
type
The xmp element
clear

References

Normative references

BCP47
Tags for Identifying Languages; Matching of Language Tags, A. Phillips, M. Davis. IETF BCP 47.
COOKIES
HTTP State Management Mechanism, A. Barth. IETF RFC 6265.
CSSCOLOR
CSS Color Module Level 3, Tantek Çelik, Chris Lilley, L. David Baron. W3C Editor's Draft.

Non-normative references

ACCESS
XHTML Access Module, Mark Birbeck, Shane McCarron, Steven Pemberton, T. V. Raman, Richard Schwerdtfeger, W3C Editor's Draft, .
DEVEDGE
HTML Tag Reference, netscape devedge, Netscape, .
EZWEB
XHTML Basic について (About XHTML Basic), KDDI. (In Japanese)
HTML20
Hypertext Markup Language - 2.0, Tim Berners-Lee, Daniel W. Connolly, RFC 1866, IETF Proposed Standard (obsolete), November 1995.
HTML2x
Internationalization of the Hypertext Markup Language, Frangois Yergeau, Gavin Thomas Nicol, Glenn Adams, Martin J. Dürst, RFC 2070, IETF Proposed Standard (obsolete), January 1997.
HTML30
HyperText Markup Language Specification Version 3.0, David Raggett, March 1995.
HTML4
HTML 4.01 Specification, Dave Raggett, Arnaud Le Hors, Ian Jacobs, W3C Recommendation, .
HTMLPLUS
A Review of the HTML+ Document Format, David Raggett.
IMODE
iモードブラウザ (i-mode browser), NTT docomo. (In Japanese)
M12N11
XHTMLTM Modularization 1.1, Daniel Austin, Subramanian Peruvemba, Shane McCarron, Masayasu Ishikawa, Mark Birbeck, W3C Proposed Edited Recommendation, .
MDC
HTML - MDC, Mozilla Developer Center (MDC).
MSDN
HTML and CSS, Microsoft Developer Network (msdn).
RFC1942
HTML Tables, Dave Raggett, RFC 1942, IETF Experimental RFC (obsolete), May 1996.
RFC2659
Security Extensions For HTML, Eric Rescorla, Allan M. Schiffman, RFC 2659, IETF Experimental RFC, August 1999.
RDFA
RDFa in XHTML: Syntax and Processing, Ben Adida, Mark Birbeck, Shane McCarron, Steven Pemberton, W3C Recommendation, .
ROLE
XHTML Role Attribute Module, Mark Birbeck, Shane McCarron, Steven Pemberton, T. V. Raman, Richard Schwerdtfeger, W3C Editor's Draft, .
RUBY
Ruby Annotation, Marcin Sawicki, Michel Suignard, 石川雅康, Martin Dürst, Tex Texin, W3C Recommendation, .
SAFARI
Safari HTML Reference, Apple, .
SOFTBANK
ウェブコンテンツ開発ガイド [HTML 編] Version 2.1.0 (Web Content Development Guide [HTML] Version 2.1.0), ソフトバンクモバイル株式会社, . Available from MC (Mobile Creation), WEB & NETWORK 技術資料. (In Japanese)
WF2
Web Forms 2.0, Ian Hickson, WHATWG Working Draft (superceded), .
XHTML2
XHTMLTM 2.0, Jonny Axelsson, Mark Birbeck, Micah Dubinko, Beth Epperson, Masayasu Ishikawa, Shane McCarron, Ann Navarro, Steven Pemberton, W3C Working Draft, .
XHTML2ED
XHTMLTM 2.0, Jonny Axelsson, Mark Birbeck, Micah Dubinko, Beth Epperson, Masayasu Ishikawa, Shane McCarron, Ann Navarro, Steven Pemberton, W3C Editor's Draft, .
XHTMLRDFA11
XHTML+RDFa 1.1, Shane McCarron, W3C Recommendation, .

Author

This document is written by Wakaba <wakaba@suikawiki.org>.

This document is developed as part of the the manakai project.

Per CC0, to the extent possible under law, the author has waived all copyright and related or neighboring rights to this work.