Diagram of XHTML, CSS, JavaScript as types of code in a web page

XHTML, CSS, Javascript as part of a web page

XHTML, CSS, Javascript: Cumulative aspects of a web page. Click the image for a larger version.

I’m thinking of using this diagram in an XHTML class I may be teaching in a couple weeks. The idea is to put XHTML, CSS, and Javascript in context with each other—yet to also illustrate that they are separate types of code and often are actually different files altogether.

Why use CSS-based layouts?

I was prepping for a Dreamweaver class a couple months ago and was fiddling around with the practice files that came as part of the course material. There is a whole lesson devoted to using html tables as a tool to do page layouts. This poses an issue for me.

My primary job for the last six years or so has been to create web sites. It has been about three years since I did a web site that relied on tables for layout. Simply, there is no really compelling reason to continue to use tables for web page layouts anymore. Further, there are solid reasons to stop.

So, I reworked their basic practice file to use xhtml and css instead of html and tables. Here’s a comparison of the two versions.