Contact Us
   
   
 
   
   
 
     
 
 
HTML Tag Tutorial
 
 
 

HTML <!Doctype> Tag

 
 
Print   Email
 
     
 

The example of DocType in Web page

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

<html>
<head>
<title>title of Document</title>
</head>

<body>
Html tags inside body
</body>
</html>

 

Every web page is defined doctype at the very top of webpage. Doctype is used to validate XHTML and CSS according to W3C standard Document Object Model (DOM) to manipulate dynamic webpage elements.

A doctype DTD (Document type Declaration) informs the validator about which version of XHTML or HTML going to use in webpage. It is an instruction given to web browser about version of XHTML or HTML (about Markup language) of webpage.

DTD document type definition defines the rules for mark up language, the web browser have to follow. These browser follow DTD, is Mozilla, Netscape.

Opera browser doesn't play these rules. It always attempts to render pages in standard mode rules.

All web standards are lead by W3C. Therefore, all DTD is provided by W3C website w3.org. W3.org provides the list of Doctype on its site.

DOCTYPE DTD Lists

HTML 4.01

HTML 4.01 provides three list of doctype

  • Strict
  • Transitional
  • Frameset

Strict includes no deprecated elements of HTML in HTML 4.01 version DTD and does not allow presentational markup with the argument.

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

Transitional DTD allows some older elements and attributes that have been deprecated. But frameset is not allowed.

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

Frameset include all transitional elements + frameset

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
   "http://www.w3.org/TR/html4/frameset.dtd">

XHTML 1.0

XHTML provide three list of doctype DTD

  • Strict
  • Transitional
  • Frameset

No deprecated tags are supported in XHTML 1.0 with markup language and well written XML

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

Include all deprecated tags with xml but with no frameset

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

Frameset include all transitional XHTML 1.0 and include Frameset elements

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

The list of Doctype available here http://www.w3.org/QA/2002/04/valid-dtd-list.html

 
     
 
If You Like this Article, share this

  



Feedback
 
     
   
Table 'easyways_easywayserver.wp_posts' doesn't exist