Welcome Guest! (App Version 3.1)

websitnero logo name

HTML Doctype


  • To write Doctype is not necessary to render HTML Pages.
  • It is only a metadata to inform browser what version of HTML is being followed.
  • It sits to the top of HTML page, even outside <html> tags.

Use of HTML Doctype

However it is not compulsory to add the doctype to your web pages but while making professional websites it helps in rendering the web pages depending on the doctype declaration that you have mentioned on the top of the web 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.

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.