Blog


The Common DOCTYPES for Web Development
  • Comments: 1
  • 01 December 2010 03:45
  • in Business
  • by admin
  • Visits: 3444
  • Last Modified: 23 February 2013 16:35

The Common DOCTYPES for Web Development

The doctype declaration should be the very first thing in an HTML document, before the tag. The doctype declaration is not an HTML tag; it is an instruction to the web browser about what version of the markup language the page is written in. The doctype declaration refers to a Document Type Definition (DTD). The DTD specifies the rules for the markup language, so that the browsers can render the content correctly.

According to HTML standards, each HTML document requires a document type declaration. The "DOCTYPE” begins the HTML document and tells a validator which version of HTML to use in checking the document’s syntax.

If standard HTML does not meet your needs but you still wish to gain the benefits of HTML validation, see the section on using a custom DTD.

The following DOCTYPEs are commonly used:

"http://www.w3.org/TR/html4/strict.dtd">

This declares the document to be HTML 4.01 Strict. HTML 4.01 Strict is a trimmed down version of HTML 4.01 that emphasizes structure over presentation. Deprecated elements and attributes (including most presentational attributes), frames, and link targets are not allowed in HTML 4 Strict. By writing to HTML 4 Strict, authors can achieve accessible, structurally rich documents that easily adapt to style sheets and different browsing situations. However, HTML 4 Strict documents may look bland on very old browsers that lack support for style sheets.

Newer browsers such as Internet Explorer 5 for Mac, Netscape 6, and Mozilla use a standards-compliant rendering for HTML 4 Strict documents. These browsers use a "quirks” mode for most other document types to emulate rendering bugs in older browsers.

"http://www.w3.org/TR/html4/loose.dtd">

This declares the document to be HTML 4.01 Transitional. HTML 4 Transitional includes all elements and attributes of HTML 4 Strict but adds presentational attributes, deprecated elements, and link targets.

Newer browsers such as Internet Explorer 5 for Mac, Netscape 6, and Mozilla use a standards-compliant rendering for HTML 4.01 Transitional documents that include the URI of the DTD in the DOCTYPE. These browsers use a "quirks” mode to emulate rendering bugs in older browsers if the URI is omitted:

"http://www.w3.org/TR/html4/frameset.dtd">

This declares the document to be HTML 4.01 Frameset. HTML 4 Frameset is a variant of HTML 4 Transitional for documents that use frames.

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

This declares the document to be XHTML 1.0 Strict. XHTML 1.0 Strict is an XML version of HTML 4 Strict.

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

This declares the document to be XHTML 1.0 Transitional. XHTML 1.0 Transitional is an XML version of HTML 4 Transitional.

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
This declares the document to be XHTML 1.0 Frameset. XHTML 1.0 Frameset is an XML version of HTML 4 Frameset.


This declares the document to be HTML 3.2. HTML 3.2 is well supported by most browsers in use. However, HTML 3.2 has limited support for style sheets and no support for HTML 4 features such as frames and internationalization.


This declares the document to be HTML 2.0. HTML 2.0 is widely supported by browsers but lacks support for tables, frames, and internationalization, as well as many commonly used presentational elements and attributes.
Share
  • Twitter
  • del.icio.us
  • Digg
  • Facebook
  • Technorati
  • Reddit
  • Yahoo Buzz
  • StumbleUpon

This post has 1 Comments

Leave a reply

Name: Required Field.
Email Address: Required Field. Not visible
Website:
Captcha Code: Required Field.
Comment: Required Field.

Latest Twitts

Loading

Testimonials

We had to be extremely careful when choosing a Web Development Company. They built us a wonderful site in very quick time and at a very reasonable price. They gave us many good ideas, which have enabled us to increase our business base substantially.

Nick Lee, DJL Zen

Contact Information

  • E-mail: support@bitset.org
  • Mobile: +880 1918 376666
  • Telephone: 0000 000 000
  • Web: www.bitset.org
  • Address: 4th Floor, House #323, Road #18, Nirala R/A, Khulna-9100, Bangladesh.