Header Ads

Types of Doctype

What is Doctype?
The document type tells Web browsers and other user agents which version of HTML you have used so that they know how to render your pages.

doctype

A page without a doctype will usually render in quirks mode, which means it may behave the way an older browser would rather the way current browsers do. This can result in more inconsistencies between browsers than usual and generally leads to much frustration.

Html Doctypes

HTML 5 Doctype:
<!DOCTYPE html>

HTML 4.01 Strict Doctype:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

XHTML Doctypes

XHTML 1.1 Doctype:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

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

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

Read More here

No comments:



Powered by Blogger.