[thelist] how does XHTML/CSS separate content from design mor e than using nested tables and the like?

Arlen.P.Walker at jci.com Arlen.P.Walker at jci.com
Thu May 9 16:49:01 CDT 2002

>i understand and agree that with CSS it's very easy to redefine the <h1>
>and <h2> tags than it is to go through each page and change every <font>
>tag. but other than that how is the eample i've given(hopefully it is
>suitable) seperating content from design? i'm not saying it's not, or
>that the concept is wrong, i'm just saying, "i don't fully understand
>this idea of content design seperation."

The basic difference is that <h1> says nothing more than "This is a main
heading." That is, it defines the structure of the that part of the
document. It says nothing whatever about how the browser will display the
phrase enclosed by that tag. OTOH, <font size=7 color=red> contains no
information at all about the structure of the document (is the phrase it
encloses, a heading, a subhead, a quote from a book, or just a shout on the
page?) but describes how the text should be displayed.

The point of separating presentation from structure is so the structure can
be presented in different ways, depending on the viewing agent. On screen
you want <h1> displayed one way, when the page is printed you want it
treated a little differently, when it's passed to a PDA you want it a
little different, and when the screen reader/aural browser reads the page
aloud, you want it to treat it differently from ordinary text. So you build
your stylesheets, and the viewing agent selects the right sheet for its
purpose and mangles your page accordingly.

Perhaps your disconnect here is that you're only thinking of the way <h1>
would be displayed, rather than what it actually means. It's easy to get
into that paradigm, as that's the way we've been designing for the web
until recently. We selected the tag which would achieve the presentation we
wanted, not the tag which identified the logical structure of that element
of the document.

Proper use of CSS takes us out of that paradigm (thankfully) so that we can
let the HTML tags go back to meaning what they were intended to mean, "This
is a main heading" rather than "This is large boldface type." So we put the
tags in which are necessary to define the structure of the document, then
style those tags in our CSS.

Have fun,
Chief Managing Director In Charge, Department of Redundancy Department
DNRC 224

Arlen.P.Walker at JCI.Com
In God we trust; all others must provide data.
Opinions expressed are mine and mine alone.
If JCI had an opinion on this, they'd hire someone else to deliver it.

More information about the thelist mailing list