The Doctype

The Document Type Declaration, or doctype is simply a way to tell the browser—or any other parsers—what type of document they’re looking at.

In the case of HTML files, it means the specific version and flavor of HTML.

The doctype should always be the first item at the top of all your HTML files.

For Html5 doctype declaration is given below.

<!doctype html>

In the past, the doctype declaration was an ugly and hard-to-remember mess.

For XHTML 1.0 Strict:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

For HTML4 Transitional:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
Related Tutorial
Follow Us
https://www.facebook.com/Rookie-Nerd-638990322793530 https://twitter.com/RookieNerdTutor https://plus.google.com/b/117136517396468545840 #
Contents +