Element <!DOCTYPE>

The <!DOCTYPE> element indicates in which standard to display the current page.

This element is indicated at the very beginning of the HTML code. Comments should also go after the definition of <!DOCTYPE>.

There are several types of <!DOCTYPE>, but in the modern standard HTML 5 is used as in the code below:

<!DOCTYPE html>
<html>
<!-- page code -->
</html>

If <!DOCTYPE> is not specified, the browser will display the page in compatibility mode (quirk mode), i.e. according to the old html standard. This mode is necessary for compatibility of old browsers.