|
From: Bill B. <bb...@co...> - 2002-12-24 05:58:02
|
On Tuesday, Dec 24, 2002, at 00:21 US/Eastern, David Goodger wrote: > Are you sure about that? <code> is an inline HTML element (like > <em>), and > <pre> is a block/body-level element (like <p>). How does O'Reilly use > them? > The html4css1 writer produces <pre> for literal blocks and <tt> for > ``inline > literals``. I chose <tt> because it's neutral and generic, whereas > <code> > is more specific. It would be easy to use <code> instead of <tt> if > required. That'd make sense-- the spec really doesn't specify usage by example. Since I haven't actually immersed myself in tag definitions in a while, I decided to do a bit of research: http://www.abiglime.com/webmaster/reference/html/tags/code.htm http://www.abiglime.com/webmaster/reference/html/tags/pre.htm http://werbach.com/barebones/barebones.html http://developer.netscape.com/docs/manuals/htmlguid/alphlist.htm So-- as David kindly indicated-- <code></code> is used inline whereas <pre></pre> is used to mark the preformatted nature of large chunks of text. Makes sense and also makes sense in the context of an article-- use /code/ to delineate an inline example and /pre/ to show off a big chunk of text. (Making up abbreviations on the fly here-- /code/ seems like a nice way to abbreviate <code></code>). I understand that :: basically leads to a literal block, but I don't see anything that causes a parsed-literal to be used instead? Confused, but less so.... b.bum |