Fair point, <pre> was indented purely for presentation. However, it
does have a small bit of semantic significance, insofaras it says
"whitespace is important". Sure, it indents that in terms of
presentation but the implied meaning is not irrelevent (especially in
the context of languages where the whitespace is important (Pyton?
Possibly). This is the way in which I think of it at the moment, until
XHTML2's <blockcode> element gains support. <blockcode> replaces <pre>
for code and effectively 'fixes' the problem.

Although, all that said, does the <code> tag apply default white-space
formatting in the major browsers? If so, wrapping it in a <div> would
be ample. I seem to remember that for some reason <code> didn't format
the whitespace without CSS, though.

Ben

On 5/31/05, Patrick Lauke <[EMAIL PROTECTED]> wrote:
> > Ben Ward
> 
>  <pre> is semantically pretty sound
> > for this, since code is pre-formatted and some languages are
> > white-space sensitive, for example.
> 
> To split hairs, though, the problem with <pre> seems to be that it
> appears very much like a presentational, rather than a semantic element.
> Any semantics seem to be inferred by the fact that the content is
> preformatted, which is a rather weak argument...by the same rationale,
> one might as well say that <B>, <I>, <U> etc are semantic.
> 
> Heck, even the spec's definition
> 
> 'The PRE element tells visual user agents that the enclosed text is
> "preformatted".'
> http://www.w3.org/TR/html4/struct/text.html#edef-PRE
> 
> strikes me as purely presentational.
> 
> Patrick
> ________________________________
> Patrick H. Lauke
> Webmaster / University of Salford
> http://www.salford.ac.uk
> 
> ******************************************************
> The discussion list for  http://webstandardsgroup.org/
> 
>  See http://webstandardsgroup.org/mail/guidelines.cfm
>  for some hints on posting to the list & getting help
> ******************************************************
> 
> 


-- 
http://www.ben-ward.co.uk
******************************************************
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list & getting help
******************************************************

Reply via email to