July 10, 2008

10:52

Website-Design

The Standards Compliant Foundation

Everyone's heard it said before in reference to a myriad of different subjects, "Every building needs a solid foundation in order to withstand the elements and everyday use. [Insert topic] is similar to the building in that it needs a solid foundation as well."  I wish I could spare the metaphor, but alas, I cannot.

Think of the site as the building and the web browser as the ground  the building will sit on (if IE6, we're talking about the absolute dirtiest, filthiest, goopiest mud than can by imagined... think man-eating.)  We're also going to need some foundation to lay that will lend solid footing.  In the case of our standards-compliant website, that foundation will be our DOCTYPE.  What exactly is a DOCTYPE?  Well, it's a single tag inserted on the first line of any page that tells web browsers how to translate the rest of the code that follows.  In the (X)HTML world there are seven basic choices:

HTML 4.01 STRICT,  TRANSITIONAL, FRAMESET

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

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

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

XHTML 1.0 STRICT, TRANSITIONAL, FRAMESET

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

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

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

XHTML 1.1

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

Which DOCTYPE to use in a specific instance would be another entire article in itself, but for further reading, view WDG's DOCTYPE page.  Also, more can be found on Web Standards Project and W3C.

It's always a good idea to double-check your DOCTYPE, especially if using web authoring software.  Even some of the larger suites include incomplete or invalid DOCTYPEs in their page templates.  Ensuring that the DOCTYPE is correct will save plenty of time when debugging a site.

Once the footing is down, we get to move on to constructing the "first floor" of our building.

...Next time The <head> Section

posted by: John Crain





Comment

Textile Help

Categories

Latest Posts

The Archives
November 2008
Franklin Is Sizzling! Make your vote count! Action Figure or Dinosaur? Five Questions with John Crain concerning CMS You need us....You know you do - Part 3
October 2008
Your backporch to history... Is your website designed for you or for the people you hope will visit it? Creekstone Model Home Opening Five Questions with John Crain concerning ActionScript A Mom's HEART Franklin's Fabulous Fall Events Bean: Cheap and Easy A Regular Guy's (Partial) Conversion to Apple: Part 2 of 3 A Sense of Style Wii Love a Challenge You need us....You know you do - Part 2 be yourself Trick or Treat? A Regular Guy's (Partial) Conversion to Apple: Part 1 of 3
September 2008
2008: A year of change Bringing in the big guns... Living Out Loud You need us....You know you do - Part 1
August 2008
Random thoughts while editting America's Last Best Hope Can't Live Without It The Franklin Classic – Running for a Cause Web Statistic Reports New hires, well wishes Using Your <head> RGB vs CMYK
July 2008
Girls Just Want To Design Bag it, tag it, sell it to the butcher in the store Thoughts from the Development Attaché FranklinIs.com will be resource for local parents The Standards Compliant Foundation Interns, interns everywhere! Step Two: “I said ‘branding,’ not Brandy…”
June 2008
A Network All Your Own Any Colour You Like Experiences as an Intern Introducing... Me JLB Open House identify yourself Introduction to Web Standards Harpeth River Watershed Association's New Vibe
May 2008
Party Pics! Not exactly superheros...
April 2008
JLB launches e-mail marketing section Vespa + JLB = Funtime starbucks Introspective Thoughts from the Development Attaché
March 2008
From one blog to another... Color
February 2008
The Ning's the Thing... Spring Brings Change So you've got something to say... Graphic Design? Macs vs. PCs (what Dell doesn't want you to know) What is AP Style?
January 2008
Development, meet Design JLB WORKS honored for WilliamsonCountyFair.org Fashion Influences Banner Ad Designs Google offers easy dictionary check New sign in our yard! New designs, expanded services