HTML Missing DOCTYPE

A DOCTYPE declaration tells the browser which HTML version to use. Missing or wrong DOCTYPE can cause quirks mode.

Common causes

How to fix

Examples

Good

<!DOCTYPE html>
<html>

FAQ

Is DOCTYPE required?
Best practice; validators expect it.
What DOCTYPE for HTML5?
<!DOCTYPE html>.

Fix it now

Try in validator (prefill this example)

Related

All tools · Canonical