css as a better <pre> replacement

M.W.Chang linuxism
Mon May 17 11:28:48 PDT 2004


<pre>, <xmp> and <plaintext>: they are either deprecated, or required
the use of character entity &lt; and &gt;.

After talking to a modern generation of web programmer, this is what I
learnt about using the best replacement for them. I would resubmit my
stuffs.

#All documents should have this in the <head> section.
<style type="text/css">
div.escape
{
        -moz-binding : url(preformatted-text.xml#preformat);
        behavior : url(preformatted-text.htc);
}
</style>

#then use this to replace the <pre> tags in the <body> section
<div class="escape">
<b>What do you think?</b>
</div>>

-- 
May the Force and Farce be with Linux and you.
Join the friendly chit-chat in http://www.linux-sxs.org &
news://news.hkpcug.org



More information about the Linux-users mailing list