Post Reply 
[HTML][P:5] !DOCTYPE Declaration
07-28-2011, 05:51 AM
Post: #1
Information [HTML][P:5] !DOCTYPE Declaration
<!DOCTYPE> Declaration

The Document Type Declaration (DTD) specifies the rules for the markup language, so that browsers can render the content correctly.
The doctype declaration has the form:
Code:
<!DOCTYPE root-element PUBLIC
  "FPI"
  ["URI"]
>

or

<!DOCTYPE root-element SYSTEM
  ["URI"]
>

[Image: 9b1664099585afbb30944d58faa95767.png]

Note: The doctype declaration should be the very first line in an HTML document.

There are three HTML DTDs:

•Strict

•Transitional

•Frameset

HTML 4.01 Strict
Contains all HTML elements and attributes, but DOES NOT include presentational or deprecated elements. Framesets are not allowed.
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD
HTML 4.01//EN" "http://www.w3.org/
TR/html4/strict.dtd">
HTML 4.01 Transitional
Contains all HTML elements and attributes, INCLUDING presentational and deprecated elements. Framesets are not allowed.
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD
HTML 4.01 Transitional//EN" "http://
www.w3.org/TR/html4/loose.dtd">

HTML 4.01 Frameset
Same as HTML 4.01 Transitional, but allows frameset content.
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD
HTML 4.01 Frameset//EN" "http://
www.w3.org/TR/html4/frameset.dtd">

Older Doctypes

HTML 2.0

This doctype is widely supported by browsers but lacks support for most commonly used presentational elements and attributes, tables, frames, and internationalization.
Code:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD
HTML//EN">
HTML 3.2
This doctype is supported by most browsers but has limited support for style sheets and no support for HTML 4 features such as frames and internationalization.
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD
HTML 3.2 Final//EN">

Like my posts? Feel free to rep+ me or donate some points.
User Tools
Quote this message in a reply


Post Reply 


Forum Jump:



User(s) browsing this thread:
1 Guest(s)