Welcome Guest! (App Version 3.1)

websitnero logo name

HTML Doctype


  • Doctype mention is not necessary to write an HTML Page.
  • Doctype provides information regarding the version of HTML to be followed by the browser for a specific HTML page (to render it correctly).

Use of Doctype

However, it is not compulsory to add a doctype to your web page but while making professional websites it helps in rendering the web pages correctly (by the browser), depending on the doctype declaration you made for that particular HTML page.

<!doctype html>

Doctype declaration helps the browser (eg: chrome or firefox) to understand what version of html are you using for your web pages, and what protocols are to be followed to render these web pages correctly.

Doctype Versions

The following table shows various doctype versions and their implementation codes:

HTML 4.01<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
XHTML<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Further Reading

1. Doctype

WebsiteNero is highly optimized for learning various website developing technlogies. We try our best to add maximum modules and examples to help learn the concepts clearly and vividly. We try to present all content and examples as simple as we can removing any complexity to hurdle easy understanding. We try best provide you with worthful content, but we cannot guarantee full correctness of all the content on this site. While using this website, you agree to have read and accepted all our terms of use and conditions, cookie, and privacy policy. Copyright, 2013-2018 by websitenero.com. All Rights Reserved.