Re: <U> Deprecated

> The idea behind using style sheets is to separate content from
> presentation. So don't ask yourself "how do I underline?", first ask
> "what am I trying to represent?".
> If the answer is "defining instances of a word" then code your HTML
> like this:
> 	A <span class="define">programmer</span> is a device for
> 	turning coffee into programs.
> If you are underlining a sentence because it is important, classify it 
> that way:
> 	<span class="important">Don't mention the war!</span>
> and so on.

Each of these examples would be better handled by using HTML tags
which carry the *meaning* of what you're trying to describe and then
using stylesheets to customize the appearance if you like:

	A <dfn class="underlined">programmer</dfn> is ...

	<em class="underlined">Don't mention the war!</em>

with the stylesheet declaration

	.underlined {text-decoration: underline; font-style: normal}

> By the way, some people prefer to use <strong> or <em> instead of
> <span> since the words then still show up differently on CSS
> deficient browsers.

Or because this allows the content information to be retained in the
HTML.  Marking up all phrase elements with <span> doesn't separate
content from style, it just transfers them both to the stylesheet.
Where HTML provides phrase elements that carry meaning, it's
preferable to use those rather than relying on people reading the
class names attached to your <span>s.  For instance, a robot
extracting all the defining instances of terms would have a much
easier time picking out the <dfn> elements than guessing how many
variants of "def" "defn" "definition" etc are possible class names.

					John T. Whelan

          only 38 days until the Swiss premiere of
         Star Wars Episode I: "The Phantom Menace"!
                Thank you for not spoiling.

Received on Tuesday, 20 July 1999 13:47:35 UTC