Cbarker.WS

Cbarker.WS

Cbarker.ws, consultancy services specializes within search engine optimization, organic seo, search engine marketing, web innovation, web development and Web Analytics. (Resonate SEO, SEM, Web Standards & Web Analytics Consultant... [more]

Cbarker.ws, consultancy services specializes within search engine optimization, organic seo, search engine marketing, web innovation, web development and Web Analytics. (Resonate SEO, SEM, Web Standards & Web Analytics Consultant). Cbarker.ws based in East Riding of Yorkshire, United Kingdom. While based in Yorkshire, Resonate SEO, SEM, Web Standards & Web Analytics Consultancy this an excellent choice for local Yorkshire seo sem search engine optimization services, with this in mind Cbarker.ws offers seo sem search engine marketing optimization services on a global scale.

(X)HTML DOCTYPE


Declare a DOCTYPE. The DOCTYPE goes before the opening html tag at the top of the page and tells the browser whether the page contains HTML, XHTML, or a mix of both, so that it can correctly interpret the markup. There are three main DOCTYPEs that let the browser know what kind of markup it is dealing with:

Strict:

All markup is XHTML-compliant.

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

Transitional:

This states that the markup is a mix of XHTML and deprecated HTML. Many well-established sites are currently using this one, so their old HTML code can exist happily in the document alongside the XHTML they are now adding.

Transitional//EN” “http://www.w3.org/TR/html4/loose.dtd”>

Frameset:

This is the same as transitional but in this case frames, which are deprecated under XHTML, are OK, too.

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

It is important to specify a DOCTYPE. Browsers that don’t see a DOCTYPE in the markup assume that the site page was coded for browsers developed long before Web standards. My recommendation is that if you are building a site from scratch, and can therefore avoid deprecated or abandoned tag attributes, such as FONT and COLOR, use the XHTML Strict DOCTYPE listed previously.
When encountering a page without a DOCTYPE, many browsers go into what is known as Quirks mode, a backwards-compatibility feature supported by Mozilla, Internet Explorer 6 for Windows, and Internet Explorer 5 for Macintosh.
In Quirks mode, the browser functions as if it has no knowledge of the modern DOM (document object model) and pretends it has never heard of Web standards. This ability to switch modes depending on the DOCTYPE, or lack thereof, enables browsers to do the best possible job of interpreting the code of both standards- compliant and noncompliant sites.
Note that for some weird reason, the DOCTYPE tag does not need to be closed with a slash and DOCTYPE is always in caps.

Sponsors
Comments
Be the first to leave a comment!
Add a Comment:
Already a member? Log In
Sponsors
About the Author

0 Kudos
Top Geek Articles
Celebrities on the Phone
Cell phones are to celebrities like bats are to baseball: no one runs too far without them.
Why every guy should buy their girlfriend Wii Fit.
Gratuitous...
Hot Geeks -- The Sexiest Geeky Girls
These girls are gorgeous AND they'll play Warcraft with you. Doesn't get much better than that.
More From Zimbio
Copyright © 2009 - Zimbio, Inc. Some rights reserved.