When writing in HTML (Hypertext Markup Language), the declaration lets an Internet browser know a page HTML version or document type. This declaration is not only mandatory on every page; it must be the first thing you type.

Doctype example

In the above example, the web page document type is defined as HTML. When designing a web page, this is the most common example of what would be used because most pages are written in HTML. A different type of document type could be an XML page.

Compatibility

Browser, Compatibility, Web design terms

  • HTML and web design help and support.