[thelist] Advice please on CSS XML XHTML etc.

David.Cantrell at Gunter.AF.mil David.Cantrell at Gunter.AF.mil
Wed Oct 9 12:01:17 CDT 2002


>So to get a general idea I'd like some opinions/advice on what to spend my
>current thirst for knowledge on, I'm stuck between:
>
>Following WC3 recommends and building CSS sites, getting messy with XHTML.

XHTML is not messy -- in fact it is cleaned-up HTML with a slight change in
syntax to make it readable by XML parsers.

Is this important to you? Maybe, maybe not. But remember, browsers are
becoming more and more standards-based every day. And the point of XHTML is
that you get "forward" compatibility built in.

I have a fully-dynamic site in ASP that I am redesigning, and while it's not
technically XHTML yet (for backward compatibility purposes) I do use XHTML
syntax (self-closing tags, etc) to make the move easier, and have already
found one benefit to using the XHTML approach: easy migration to other
output devices. I use a table-based layout but all styling is done via CSS.
All navigational and "chrome" elements (global nav, masthead, site toolbar,
main body, and footer) are given a unique ID. Before, nobody could print out
reports or information from our site, or if they could they got page after
page littered with toolbars and such. Now with the new approach, I just slap
in a print stylesheet and inside it I set all the unnecessary sections to
"display: none" and *poof* like magic I get easy printouts. Gotta love it.
:D

The idea expands to other platforms as well, i.e. if you have to develop for
browsers and PDAs, then XHTML allows you to write the *structure* once, and
then write a stylesheet or two for each of the target platforms, and it
works.

My site doesn't work that way, because our layout requires tables so far
(CSS isn't quite capable of it yet, and not all browsers support what it is
capable of) but it's going to be a heck of a lot easier when the time comes
to migrate.

>Learning ASP and incorporating more CSS into our table layouts.

ASP has nothing to do with it. ASP is a server-side dynamic scripting
framework. XHTML is client-side, ASP is server-side. The ASP generates the
XHTML and sends it to the browser, which interprets the XHTML (and CSS, etc)
and displays the page.

Soooo... you can learn both! :D

-dave



More information about the thelist mailing list