DOCTYPE is an instruction to the web browser about the version of the markup language the page is written in. The DOCTYPE declaration need to be the first thing in your HTML document, before the <html> tag. The Doctype declaration points to a Document Type Definition (DTD). The doctype provides markup language rules, so a browser can interpret the content correctly.