Skip to Main Content >

IT Accessibility Curriculum and Resources

Standard 3:
Document Standards

  • STANDARD 3.1   Web pages will be created using the most current web document specification (e.g., HTML, XML, XHTML).
    • Comment:  This standard requires web page developers to reference valid document types when preparing web pages, and requires them to use the "most current" technology available — for example, the current version of HTML is 4.01. The World Wide Web Consortium (W3C), a collaborative organization of web developers, industry representatives and academicians, develops these technology standards, and publishes them as specifications, or "grammars."

      Coding your page to a published formal grammar and declaring that specification at the beginning of a document via a "document type declaration" (DTD) lets the user agent know how to interpret the commands (elements, attributes, semantics, etc.) used to mark up the page. The DTD also lets validation programs know the grammar against which to measure your document. Validation programs check your document's markup against the specification to judge whether or not the structure of the document is sound. The W3C Validation Service validates documents against a whole list of published grammars. See http://validator.w3.org/sgml-lib/catalog for a list.

      Since the W3C is the de facto standard-setting body for web-based technologies such as HTML, HTTP, XHTML and XML, validate to W3C grammars. See http://www.w3.org/TR/WCAG10-CORE-TECHS/#access-reviewed for a list of "current" technologies.

      The element <DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> is a document type declaration specifying the technology (in this case, which version of HTML) was used in development. This element should always be the first element within any HTML document and is required for all DTD-compliant documents. Although HTML 4.01 has three DTDs (Strict, Transitional, and Frameset), Strict DTDs are preferred, as transitional DTDs allow the use of deprecated elements and attributes (which are discouraged to promote more accessible alternatives) and frameset DTDs allow the use of frames (which are also discouraged).

    • HTML Elements Affected:  <!DOCTYPE>
    • Code Example:  <DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
  • STANDARD 3.2  All web pages will include a valid document type declaration (DTD).
    • Comment:  Declaring which published formal grammar was used to mark up your document at the beginning of a document lets the user agent know which rules to use in rendering your document. It also lets the user agent know where to look for semantics if it needs to. This declaration is also what validation programs will use to determine which set of rules to compare your document to in the validation process. The W3C Validation Service validates documents against a whole list of published grammars. (See Standard 3.1 for a link to the W3C published grammars.) Most validation programs will try to validate to W3C grammars.

    • HTML Elements Affected:  <!DOCTYPE>
    • Code Example:   <!DOCTYPE HTML PUBLIC ";//w3c//dtd html 4.01//en" "http://www.w3.org/TR/html40/strict.dtd">
  • STANDARD 3.3   The use of deprecated elements or attributes is not allowed (e.g., the usage of the font, bold or italic elements are deprecated).
    • Comment:  "Deprecated" means the element is still supported for backward compatibility, but its use is discouraged because it may be completely dropped during the next major revision of the standard. An element becomes deprecated when a newer element, a new technique, or a new method of use for an existing element, is developed that duplicated, improves, or supersedes the functionality of an existing element.

    • HTML Elements Affected:  See Deprecated HTML 4.0 (4.01) Elements, a document published by the NYS Forum Accessibility Committee, for a complete list of items that have been deprecated or discouraged in HTML 4.01.
    • Code Example:  Deprecated HTML 4.0 (4.01) Elements, a document published by the NYS Forum Accessibility Committee.
  • STANDARD 3.4  Web pages will be created using style sheets to achieve formatting and stylistic effects whenever possible. When style sheets are utilized the web pages must convey all relevant information in an accessible manner if the style sheet is disabled for any reason.
    • Comment:  Style sheets separate the content of a web page from presentation attributes. This is a concept widely recommended by experts and widely used by web developers for years. Styles sheets are often discussed in concert with accessibility intiatives because their use segregates the presentational aspects of a web page from the structure and the content. For example, using stylesheets obviates the need for page developers to squeeze their content into HTML tables to enforce some control over its positioning.

      Along the same lines and within the context of HTML authoring, the use of style sheets promotes the centralization of presentation, thus allowing the author to change attributes for an unlimited number of documents from a single location. HTML's presentation attributes are quite limited and do not offer the extensive flexibility that style sheets offer. Style sheets promote usability in that centralizing the presentation attributes inherently decreases the size of downloaded documents.

      Accessibility specific benefits of using style sheets include:

      • Properties to control font appearance allow authors to eliminate inaccessible bit-mapped text images.
      • Positioning properties allow authors to eliminate mark-up tricks (e.g., invisible images) to force layout.
      • The semantics of !important rules mean that users with particular presentation requirements can override the author's style sheets.
      • The 'inherit' value for all properties improves cascading generality and allows for easier and more consistent style tuning.
      • Improved media support, including media groups and the braille, embossed, and tty media types, will allow users and authors to tailor pages to those devices.

      The W3C developed the CSS 1 and CSS 2 specifications, and has promoted the use of style sheets since their inception.

    • Code Example:
      • Discouraged:
        (See a page showing what the code looks like in your user agent [browser].)

        <html>
        <head>
        <title>Table Layout Sample</title>
        </head>
        <body bgcolor="white">
        <table cellpadding="0" cellspacing="0" border="0">
        <tr>
        <td colspan="2" valign="top">
        <font color="navy">
        This is text that spans across the top of the page.
        </font>
        </td>
        </tr>

        <tr>
        <td width="210" valign="top">
        <font color="teal">
        A column on the left side.
        </font>
        </td>

        <td valign="top">
        <font color="red">
        A column on the right side.
        </font>
        </td>
        </tr>
        </table>
        </body>
        </html>

      • Preferred:
        (See a page showing what the code looks like in your user agent [browser].)

        <html>
        <head>
        <title>Equivalent CSS Layout Sample</title>
        <style type="text/css"> body {
        background:white;
        }

        #leftside {
        color:teal;
        position: absolute;
        left:10px;
        width:210px;
        }

        #rightside {
        color:red;
        margin-left: 190px;
        margin-right:190px;
        }

        #acrosstop {
        color:navy;
        }
        </style>
        </head>
        <body>
        <div id="acrosstop">
        This is text that spans across the top of the page.
        </div>

        <div id="leftside">
        A column on the left side.
        </div>

        <div id="rightside">
        A column on the right side.
        </div>
        </body>
        </html>

      For the purposes of illustrating this example, the style sheet has been embedded. Best current practices dictate that the style sheets should be external.

  • STANDARD 3.5   All natural language usage will be clarified using the LANG attribute when the written language is not English.
    • Comment:   The lang attribute dictates the base language of an element's attribute values and text content. The overall language for the document is usually specified in the document type declaration (see Standards 3.1 and 3.2 above). This attribute should be used to mark up any elements that deviate from the base language of the page (as specified in the <thml> element).

      Language information specified via the lang attribute may be used by a user agent to control rendering in a variety of ways. Some situations where author-supplied language information may be helpful include:

      • Assisting search engines
      • Assisting speech synthesizers
      • Helping a user agent select glyph variants for high quality typography
      • Helping a user agent choose a set of quotation marks
      • Helping a user agent make decisions about hyphenation, ligatures, and spacing
      • Assisting spell checkers and grammar checkers

      The intent of the lang attribute is to allow user agents to render content more meaningfully based on accepted cultural practice for a given language. For a full list of language abbreviations, see Code for the Representation of the Names of Languages. From ISO 639, revised 1989. (http://www.oasis-open.org/cover/iso639a.html)

    • HTML Elements Affected (may include deprecated tags):  All elements except <applet>, <base>, <basefont>, <br>, <frame>, <frameset>, <iframe>, <param>, <script>
    • Code Example:
      <p>He chose a gaudy diamond and emerald bracelet set in gold and held it up for her perusal. Within a few seconds, though, she smiled and shook her head. She pointed to a plain platinum bangle and smiled. "That will do," she said. "It has a certain <span lang="fr">je ne sais quoi."</span><p>

      (See a page showing how your user agent [browser] renders this code.)

Back to NYS Standards Discussion HOME