The HTML document type declaration, also known as DOCTYPE, is the first line of code required in every HTML or XHTML document. When you are designing a Website, it is indicated by a code called DOCTYPE html (Document Type Definition DTD), which is placed at the beginning of the HTML document.