Re[7]: CSS dead?

by Gerhard Schoening <g.sch(at)onlinehome.de>

 Date:  Fri, 21 Dec 2001 17:55:47 +0100
 To:  "Brian Costner" <brian(at)ecoculture.com>
 Cc:  "HWG Style" <hwg-style(at)hwg.org>
 References:  windesk
  todo: View Thread, Original
Hi Brian,

On Friday, December 21, 2001 at 15:14 you wrote:



>> Brian> In HTML 4.01, <pre> is deprecated. See spec section 9.3.4 at:
>>
>> Brian> http://www.w3.org/TR/html401/struct/text.html#h-9.3.4
>>
>>
>> OK - but what do you use to cite something "literally", like code
>> examples? I never used the "cite" and "code" tags, though...
>>

Brian> As you mention, use

Brian> <code>some code</code>

Brian> for code, and you have cite, quote, and blockquote for other things.

Brian> The advantage over <pre> is that these tags better indicate the structural
Brian> content. <pre> is a reference to a style -- a layout device that only
Brian> applies to visual browsers. It says: always display this type with the same
Brian> spacing. <code> says: this is some computer code. Then the browser or other
Brian> device can present the code as it's been instructed (either through internal
Brian> defaults or an associated style sheet).

Brian> Note that <pre> is deprecated, not obsolete. Browsers still support <pre>,
Brian> but authors are encourage to use other tags in conjunction with stylesheets.

Well, on the following simple page all five paragraphs look different,
more or less, in the browser but only <pre> preserves the LINE BREAKS
(what makes it look as intended) - the other ones show just one (or
two: <code>) spaces ...?

<html lang="en">
<head>
<title>Document</title>
</head>

<body>

        <p><pre>pre
                &lt;html lang="en">
                &lt;head>
                &lt;title>Document&lt;/title>
                &lt;/head>
        </pre></p>
        <p><code>code
                &lt;html lang="en">
                &lt;head>
                &lt;title>Document&lt;/title>
                &lt;/head>
        </code></p>
        <p><cite>cite
                &lt;html lang="en">
                &lt;head>
                &lt;title>Document&lt;/title>
                &lt;/head>
        </cite></p>
        <p><quote>quote
                &lt;html lang="en">
                &lt;head>
                &lt;title>Document&lt;/title>
                &lt;/head>
        </quote></p>
        <p><blockquote>blockquote
                &lt;html lang="en">
                &lt;head>
                &lt;title>Document&lt;/title>
                &lt;/head>
        </blockquote></p>

</body>
</html>


I can't achieve line breaks by any style, of course, so does that mean
I have to insert them "manually" if I want to avoid <pre>, just like
replacing "<" with "&lt;", for example?


Best regards,

Gerhard

g.sch(at)onlinehome.de
www.gerhard.purespace.de


---------------------------
Sch�ning OnLine

Gerhard Sch�ning, Freelancer
Bilingual Web Services
Web Design and Programming

http://www.schoening-online.com
gerhard(at)schoening-online.com

HWG hwg-style mailing list archives, maintained by Webmasters @ IWA