Anvendelse av de nyeste W3C-teknologiene

(Henvisende UWEM-test: 11.1_HTML_01)

Testinformasjon

Feil på grunn av

Denne nettsiden anvender ikke de nyeste W3C-teknologiene.

Dokumentet anvender en utdatert dokumenttype eller en ugyldig dokumenttype-innholdstypekombinasjon.

Løsning

Bruk en av de følgende innholdstype- og dokumenttypekombinasjonene:

  • Dokumenttypen er HTML 4.01 eller XHTML 1.0 og innholdstypen er "text/html", eller
  • Dokumenttypen er XHTML 1.1 og innholdstypen er "application/xhtml+xml".

Referanse

Henvisning til WCAG 1.0-kontrollpunkt

11.1

"Bruk W3C-teknologier når du har tilgang til dem og de er passende for en oppgave. Bruk også den nyeste versjonen når de er støttet." [Prioritet 2]
WCAG 1.0 Checkpoint 11.1

Henvisning til UWEM-test

11.1_HTML_01

Denne testen er rettet for å finne ut om de nyeste versjonene av W3C-teknologier for HTML og XHML har blitt brukt.

Eksempler

  • 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".

    Dårlig eksempel:
    <!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>
    Godt eksempel:
    <!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>
    Spørsmål, forslag, innvendinger? Gi oss en tilbakemelding!
  • 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.

    Dårlig eksempel:
    <!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>
    Godt eksempel:
    <!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>
    Spørsmål, forslag, innvendinger? Gi oss en tilbakemelding!
  • 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".

    Dårlig eksempel:
    <!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>
    Godt eksempel:
    <!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>
    Spørsmål, forslag, innvendinger? Gi oss en tilbakemelding!
  • 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".

    Dårlig eksempel:
    <!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>
    Godt eksempel:
    <!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>
    Spørsmål, forslag, innvendinger? Gi oss en tilbakemelding!
Spørsmål, forslag, innvendinger? Gi oss en tilbakemelding!