Validate by URI

Enter the URI of a document you would like checked

Validate by File Upload

Choose the document you would like checked

Results for http://catb.org/jargon/html/B/bit-rot.html

Error 2Warning 1Suggestion 1

HTML5  -  text/html Information

Character encoding Code
HTTP Content-Type utf-8 Content-Type: text/html; charset=utf-8
Byte order mark (BOM) No
XML declaration ISO-8859-1 <?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
Meta tag None found
Language Code
HTML tag None <html>
HTTP Content-Language None found
Text direction Code
Default direction LTR (by default)
Class & id names Code
Non-ascii class or id names None
Non-NFC class or id names None
Request headers Code
Accept-Language en-US en Accept-Language: en-US,en;q=0.5
Accept-Charset None found

TOP

Detailed report

  1. ErrorXML declaration used

    Explanation

    This page currently uses the following XML declaration:

    <?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>

    HTML5 only allows comments before the Doctype, so this prevents the use of the XML declaration.

    What to do

    Remove the XML declaration from your page. Use a meta element instead to declare the character encoding of the page.

    Further reading

    1. Character encodings explained
    2. Declaring the character encoding for HTML

    TOP

  2. ErrorConflicting character encoding declarations

    Explanation

    The following character encoding declarations are inconsistent:

    1. Content-Type: text/html; charset=utf-8
    2. <?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>

    Browsers will apply precedence rules to determine the character encoding to use for the page, but this may not be the encoding you intended.

    What to do

    Change the character encoding declarations so that they match. Ensure that your document is actually saved in the encoding you choose.

    Further reading

    1. Character encodings explained
    2. Choosing a character encoding
    3. Changing the encoding of a document

    TOP

  3. WarningThe html tag has no language attribute

    Explanation

    There is no language attribute in the html tag.

    <html>

    A language attribute on the html tag sets the default natural language for the page. This information can be used for processing the content in various ways, including such things as spell-checking, accessibility, data formatting, and choice of styles for rendering the page. Every page should have the correct default language specified.

    For HTML files, this should be a lang attribute. For XHTML served as HTML you should use both the lang and xml:lang attributes. For files served as XML only, you should have xml:lang, but you don't need to have the lang attribute.

    What to do

    Add a lang attribute that indicates the default language of your page.

    Example: lang='de'

    Further reading

    1. Language declarations explained
    2. Using attributes to declare language
    3. Choosing language values

    TOP

  4. SuggestionNon-UTF-8 character encoding declared

    Explanation

    The page currently uses the following non-UTF-8 character encoding declaration(s):

    <?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>

    UTF-8 is based on Unicode. A Unicode character encoding makes it easier to use a wide range of characters, from the registered trademark symbol to characters in multiple languages. It also simplifies the use of scripts and databases for multilingual sites, and allows you to more easily expand your site to cover new languages, when needed. Using non-UTF-8 encodings can also have unexpected results on form submission and URL encodings, which use the document's character encoding by default. It is not a requirement to use UTF-8, but the HTML5 specification recommends its use, and you should consider it.

    UTF-16 is also a character encoding based on Unicode, but is little used on the Web, and generally best avoided.

    What to do

    Set your authoring tool to save your content as UTF-8, and change the encoding declarations.

    Further reading

    1. Character encodings explained
    2. Choosing a character encoding
    3. Changing the encoding of a document

    TOP