Use of latest W3C technologies

(Referring UWEM Test: 11.1_HTML_01)

Test info

Failure cause

This page does not use the latest W3C technologies.

The document uses an outdated Doctype or an invalid Doctype-Contenttype combination.

Good Example

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Page with VALID DOCTYPE AND CONTENT-TYPE</title>

</head>
<body>

Page with valid document-type declaration (HTML 4.01).

</body>
</html>

Solution

Use one of the following content-type and document-type combinations:

  • The document-type is HTML 4.01 or XHTML 1.0 and the content-type is "text/html".
  • The document type is XHTML 1.1 and the content-type is "application/xhtml+xml".

References

Related WCAG 1.0 Checkpoint

11.1

"Use W3C technologies when they are available and appropriate for a task and use the latest versions when supported." [Priority 2]
WCAG 1.0 Checkpoint 11.1

Referring UWEM Test

11.1_HTML_01

This test is targeted to find out whether the latest versions of W3C technologies for HTML and XHML have been used.

Examples

  • HTML 4.01

    In the following example, the doctype is HTML 4.01, but the content type is not specified.
    For this kind of document, the content type should be "text/html".

    Bad example:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

    <html>
    <head>
    <title>HTML 4.01 document</title>
     
    </head>
    <body>
    This is the content of the page.
    </body>
    </html>
    Good example:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

    <html>
    <head>
    <title>HTML 4.01 document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    </head>
    <body>
    This is the content of the page.
    </body>
    </html>
  • Upgrading to HTML 4.01

    In the following example the doctype is set to HTML 3.2, which is outdated.
    We decide to update the page and use the HTML 4.01 Transitional doctype.

    Bad example:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
    <html>
    <head>
    <title>Page with old HTML 3.2 doctype declaration</title>
    </head>
    <body>
    This is the content of the page.
    </body>
    </html>
    Good example:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

    <html>
    <head>
    <title>Page with valid HTML 4.01 doctype</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    </head>
    <body>
    This is the content of the page.
    </body>
    </html>
  • XHTML 1.0

    In the following example, the doctype is XHTML 1.0, but the content type is not specified.
    For this kind of document, the content type should be "text/html".

    Bad example:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">

    <head>
    <title>XHTML 1.0 document</title>
     
    </head>
    <body>
    This is the content of the page.
    </body>
    </html>
    Good example:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">

    <head>
    <title>XHTML 1.0 document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    </head>
    <body>
    This is the content of the page.
    </body>
    </html>
  • XHTML 1.1

    In the following example, the doctype is XHTML 1.1, but the content type is not specified.
    For this kind of document, the content type should be "application/xhtml+xml".

    Bad example:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">

    <head>
    <title>XHTML 1.0 document</title>
     
    </head>
    <body>
    This is the content of the page.
    </body>
    </html>
    Good example:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">

    <head>
    <title>XHTML 1.0 document</title>
    <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
    </head>
    <body>
    This is the content of the page.
    </body>
    </html>