W3C home > Mailing lists > Public > public-html@w3.org > July 2007

Re: (code, sample output and keyboard/device input <code>, <samp>, <kybd>) part of my review of 3.12 Phrase elements

From: Robert Burns <rob@robburns.com>
Date: Fri, 20 Jul 2007 06:56:07 -0500
Message-Id: <8E9663B8-CFF9-4E35-846A-A5E66EED7255@robburns.com>
Cc: "HTML WG" <public-html@w3.org>
To: Anne van Kesteren <annevk@opera.com>


On Jul 20, 2007, at 5:48 AM, Anne van Kesteren wrote:

>
> On Fri, 20 Jul 2007 08:55:48 +0200, Robert Burns <rob@robburns.com>  
> wrote:
>> The <pre><code> example seems  like less than best practice. Why  
>> not simply use <code style='white-space: pre;' >some code with  
>> line-breaks</code> or even just <pre class='c-plusplus-code' >some  
>> c++ code here</pre>. Either of those contain the same or more  
>> semantics without adding another level to the hierarchy.
>
> The former won't work when CSS is disabled (CSS is an optional  
> language).

Yes, I know. Did I say anything that would make you think I wasn't  
aware of that. If our CSS linking and embedding mechanisms are so  
broken that this is an overriding concern, we should really be  
focussing all of our attention on that.

> The latter doesn't give you any semantics unless you define some  
> microformat.

How does:

<pre><code> some c++ code here.</code></pre>

provide more semantics than

<pre class='c-plusplus-code' >some c++ code here</pre>

Are you really saying that if a microformat doesn't tell you what I  
mean, you cannot discern anything from that source code. Granted, a  
user would have to look at the HTML source (unless UAs provide a  
mechanism to see class attribute values and element names), but they  
wouldn't se anything more presented from the first example without  
looking at the HTML source.

Take care,
Rob
Received on Friday, 20 July 2007 11:56:58 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:02 GMT