Full width home advertisement

How To

Science

Post Page Advertisement [Top]


The HTML <!DOCTYPE> Declaration

The <!DOCTYPE> declaration tag is generally used by any web browser to understand the version of the HTML used in the document or web page. Current version of HTML is 5 and it makes use of the following declaration:

<!DOCTYPE html>

There are many other declaration types which can be used in HTML document depending on what version of HTML is being used.


DOCTYPE : a Document Type Declaration, or DOCTYPE, is a first instruction or guide that consociates or connects a particular SGML or XML document or webpage with a document type definition (DTD).


List of HTML DOCTYPEs

HTML5 DOCTYPE

<!DOCTYPE html>

In case of an HTML generator that cannot output the short DOCTYPE you can use a legacy this string:

<!DOCTYPE html SYSTEM "about:legacy-compat">


HTML4 DOCTYPEs

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


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


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

Older DOCTYPE Declarations


HTML 3 DOCTYPE (Deprecated)

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">


HTML 2 DOCTYPE (Deprecated)

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">


XHTML 1 DOCTYPEs

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


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


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

No comments:

Post a Comment

Bottom Ad [Post Page]

| Designed by Colorlib