Intelligence Community Design System ICDS Get started Accessibility Styles Components Patterns Community
Show navigation section

Doctypes

Introduction

All HTML documents must start with a<!DOCTYPE> declaration above the<html> tag.

This tells the browser how to render the HTML, as in this example:

<!DOCTYPE html>

This is the HTML5 doctype but W3C provides information on choosing the right doctype .

When it goes wrong

If no valid<!DOCTYPE> is declared, the browser switches to quirks mode . This means it emulates non-standard behaviour of deprecated browsers.

In this case, elements from the HTML5 specification may not parse or render properly. This can cause issues for people who use assistive technologies.


Last reviewed 18 April 2024 .
Navigated to Doctypes - Intelligence Community Design System