Glossary

What is Doctype and charset?

Also called: UTF-8, Character encoding

The doctype is the first line, <!doctype html>, which tells the browser to use standard rules. The charset says which letter set the page uses, and UTF-8 is the standard choice.

Why it matters

Without them, accents and symbols can show as strange characters, and browsers may fall back to older display rules.

How Onbiom checks it

"Your letters and symbols show right" reads the homepage as first loaded. It needs the page to start with <!doctype html> (comments before it are allowed) and a character set declared as UTF-8, either in the first 1024 bytes of the page or in the Content-Type header. It fails when the doctype is missing, when no charset is declared, or when another charset is declared.

In your report this appears as: Doctype and early UTF-8 charset.

How to check it yourself

  1. Open your page source and check the first line is <!doctype html>.
  2. Look for <meta charset="utf-8"> near the top of the head.
curl -s https://example.com/ | head -c 300

Not sure about your own site? Paste your address and see in a minute which of these checks your site passes. Free, no account needed.

Check your site

How to fix it

Ask your web person
Standard themes include both. If missing, the theme header file needs them.
Any website
Start the page with <!doctype html> and put <meta charset="utf-8"> first in the head.

Related terms

Sources and further reading

Last reviewed: