Tag: Layout
Fix Your Site With the Right DOCTYPE!
by Ayush on Jun.02, 2009, under XHTML
Original article by Jeffrey Zeldman
You’ve done all the right stuff, but your site doesn’t look or work as it should in the latest browsers.
You’ve written valid XHTML and CSS. You’ve used the W3C standard Document Object Model (DOM) to manipulate dynamic page elements. Yet, in browsers designed to support these very standards, your site is failing. A faulty DOCTYPE is likely to blame.
This little article will provide you with DOCTYPEs that work, and explain the practical, real–world effect of these seemingly abstract tags.
WHY A DOCTYPE?
Per HTML and XHTML standards, a DOCTYPE (short for “document type declaration”) informs the validator which version of (X)HTML you’re using, and must appear at the very top of every web page. DOCTYPEs are a key component of compliant web pages: your markup and CSS won’t validate without them. (continue reading…)