Blog for web designers

Common document type deceleration – DTD

HTML5

There is no DTD for HTML5 but we use a small tag to start a page with HTML5.

<!DOCTYPE html>

There are other 3 common document type decleration

  1. Transitional
  2. Frameset
  3. Strict

HTML 4.01 Transitional: DTD

It is most common DTD used in HTML page. It allows you to write all the depreciated html tags such as fonts, center, applet, etc.. Below is the DTD code for HTML 4.01 transitional.

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

HTML 4.01 Frameset: DTD

It allow you to use the frame in the document. You can open multiple website on the same page.

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

HTML 4.01 strict: DTD

Strict document type definition doesn’t let you write depreciated element in the document. Unlike transitional you are only allowed to write tags that are not depreciated.

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

In the same way we have it for Extensible Hyper Text Markup Language(XHTML)

XHTML 1.0 transitional: DTD

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

XHTML 1.0 Frameset: DTD

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

XHTML 1.0 strict: DTD

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

Click here to validate you document.

Santosh Shah

My name is Santosh Shah and blogs at santosh-shah.com


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.