Is your page world ready?
Character encoding | Code | |
---|---|---|
HTTP Content-Type | utf-8 |
Content-Type: text/html; charset=utf-8 |
Byte order mark (BOM) | No | |
Meta tag | us-ascii |
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii"/> |
Language | Code | |
HTML tag | en |
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> |
HTTP Content-Language | None found | |
All language tags | en |
Click each tag to check it. |
Text direction | Code | |
Default direction | LTR (by default) | |
Unicode control codes | None found | |
Markup | Code | |
Non-ascii class or id names | None | |
Non-NFC class or id names | None | |
Notable attributes | lang 1 | |
Notable elements | None found | |
Request headers | Code | |
Accept-Language | None found | |
Accept-Charset | None found |
The following character encoding declarations are inconsistent:
Content-Type: text/html; charset=utf-8
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii"/>
Browsers will apply precedence rules to determine the character encoding to use for the page, but this may not be the encoding you intended.
Change the character encoding declarations so that they match. Ensure that your document is actually saved in the encoding you choose.
The page currently uses the following non-UTF-8 character encoding declaration(s):
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii"/>
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. The HTML5 specification and the Encoding specification recommend its use in the strongest terms.
(UTF-16 is also a character encoding based on Unicode, but is little used on the Web, and you should not use it.)
Set your authoring tool to save your content as UTF-8, and change the encoding declarations.
The page currently declares the character encoding using a non-preferred name:
US-ASCII
The preferred encoding name is:
WINDOWS-1252
A wider range of browsers will support your page if you use the preferred encoding name. However, it is strongly recommended that you convert your page to use the UTF-8 character encoding.
Preferably, set your authoring tool to save your content as UTF-8, and change the encoding declarations. Otherwise, change the name of the encoding for your page to the preferred name. (Legacy encoding names are listed in the Encoding specification, in the left column of the table in the section Names and labels.)
meta
character encoding declaration uses http-equiv
This page uses the following character encoding declaration with an http-equiv
attribute:
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii"/>
This is fine, however you may find it easier to use the meta
element with a charset
attribute instead. For example:
<meta charset="us-ascii">
If you want to change, replace the http-equiv
and content
attributes in your meta
tag with a charset
attribute.
Interested in “developing” your developer skills? In W3Cx’s hands-on Professional Certificate Program, learn how to code the right way by creating Web sites and apps that use the latest Web standards. Find out more!
Donate and help us build better tools for a better web.