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

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 UTC