HTML5 Video Player logo
HTML5 Video Player for Mac and Windows

New Doctype Declaration in HTML5

At the very top of any HTML 5 page you will see the doctype declaration as . If you are using Firefox on a Windows PC, open any website, right click on any black area, then select “View page source”, you will find the source code and HTML markups. The

declaration is not an HTML tag; it is an instruction to the web browser about what version of HTML the page is written in. In HTML 5, means the page is written in HTML5. Unlike earlier versions of HTML, such as HTML 4.01 which has different
declarations and require a DTD reference, The doctype in HTML 5 has just one word, without any references.

How to use DOCTYPE in HTML 5 pages?

  • 1. The
  • declaration is not an HTML tag; The HTML 5 DOCTYPE declaration must be at the top of any HTML 5 page, before the tag.
  • 2. HTML5 does not require a reference to a DTD. Here is an example of one common type of XHTML 1.0 Transitional:
  • 3. Always add the HTML 5 doctype declaration to any HTML 5 documents, so that the browser knows what version of HTML the page is written in.
  • 4. The HTML 5 DOCTYPE tag does not have an end tag.
  • 5. The DOCTYPE in HTML 5 declaration is NOT case sensitive.
  • ,

    Comments are currently closed.

    One Response to “New Doctype Declaration in HTML5”