Rad Goes Strict (XHTML 1.0)

| | TrackBacks (0)

I converted the homepage to » XHTML 1.0 Strict (document type declaration) from XHTML 1.0 Transitional (which applies the rules associated with rendering web pages more loosely).

Strict

Only problem I had was the square Google AdSense ad, which I've traditionally wrapped in a <table> tag/element .. which is not the correct way to code it. (Cuz it's not really a table. Rather it's a JavaScript script.)

In Strict, I needed to convert the <table> to a <div> and "float it" left (in CSS) .. otherwise none of the other text would wrap up alongside the ad (like it does now).

All the images in the center section had to be assigned a class and 'floated' right (in CSS), cuz the Strict DTD does not allow you to align="right" .. like I used to do.

Aligning deals with "presentation" (as opposed to structure and content), and the Strict DTD moves everything pertaining to presentation out of XHTML (and into CSS).

I'm actually fairly comfortable with the requirements of the XHTML 1.0 Strict DTD .. enough to begin creating all new pages using the Strict doc-type declaration.

••• today's entry continues here below •••

Dreamweaver has the ability to convert any web page from one doc-type to another (which is what I did with this page). But it's always best to start fresh (from scratch) when using a new doc-type declaration.

Starting over from scratch is exactly what I did earlier this year when I converted this page from a table-based layout to CSS-based. (That was actually much more work than I anticipated .. sukus maximus.)

A Doc Type Declaration tells your browser how to render the page. A Strict DTD looks like this:

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

Let me know if you notice any quirky display anomalies (along with your browser and its version number).

For more along these lines, here's a Google search preconfigured for the query » convert web page xhtml strict dtd

« Previous Rad entry ||| NEXT Rad entry »

0 TrackBacks

Listed below are links to blogs that reference this entry: Rad Goes Strict (XHTML 1.0).

TrackBack URL for this entry: http://radified.com/cgi-bin/xmt4/mt-tb.cgi/96

About this Entry

This page contains a single entry by Rad published on December 27, 2008 3:05 PM.

Christmas 2008 + Quotes on Intellectual Freedom was the previous entry in this blog.

Freedom from a Sense of Futility in 2009 is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.