Saturday , February 23 2019

DOCTYPE HTML Tag Declaration, Examples

Basically DOCTYPE HTML is not an HTML element, it is an instruction that tells the browser, what type of the HTML version is used in the HTML file.

The <!DOCTYPE> document type declaration is very important and must be inserted before the <HTML> tag.

Read: What is HTML (Hypertext Markup Language)?

Read: Complete HTML Tags List

Example of DOCTYPE html Tag

<!DOCTYPE html>



<title>Title of the document</title>



<p> Body content of the document </p>



Different <!DOCTYPE html> Declaration:


The HTML5 is using is very simple document type.

<!DOCTYPE html>

HTML 4.01 Strict


HTML 4.01 Transitional

<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” “”>

HTML 4.01 Frameset

<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Frameset//EN” “”>

XHTML 1.0 Strict

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN” “”>

XHTML 1.0 Transitional

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “”>

XHTML 1.0 Frameset

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Frameset//EN” “”>


<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.1//EN” “”>

Browser Support <!DOCTYPE HTML>:

  • Inter Explorer (all)
  • Google Chrome (all)
  • Firefox (all)
  • Safari (all)
  • Opera (all)

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.