[thelist] how does XHTML/CSS seperate content from design more than using nested tables and the like?

Ben Phillips ben at inchima.com
Thu May 9 13:37:00 CDT 2002

> 2. is javascript compatible with XHTML? in a page i'm trying
> to convert now (just to XHTML well-formedness, not a no-tables
> layout) the validator gives errors for two onClick events.
> are these not allowed in XHTML or is there a different wa
> to utilize the same thing?

yes it is (as far as i know). try using onclick instead of onClick, as
attribute names have to be lower case. check w3c.org for more detailed
information about xhtml and what is/isn't allowed.

> 3. how does XHTML/CSS, when used correctly, seperate content
> from design more than using tables does? in a regular HTML
> page with nested tables etc. you have to define what goes
> where and how it should look. and likewise a page with a bunch
> of DIV tags and CSS definitions you still have to do the same
> thing. please explain how it makes redesigning/adjusting layouts

with html, the layouts and positioning of elements are defined in with
the page code.


<font size=2>This is a page title</font>

using css, you would semantically define the page content. so:

<h1>This is a page title</h1>

you would then use the css to define what the h1 text looks like in a
web browser. voila - style separate from content.

so, say you have 3,000 pages all with a <h1>page title</h1> - with one
change of style you can change the entire look of your website. the
style and layout is handled by a css file, not included with the

there are some great articles on the web about this, but i don't have
any to hand at the moment.


More information about the thelist mailing list