W3C home > Mailing lists > Public > whatwg@whatwg.org > September 2011

[whatwg] [html5] r6088 - [e] (0) clarification Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=12165

From: Ian Hickson <ian@hixie.ch>
Date: Fri, 9 Sep 2011 22:46:56 +0000 (UTC)
Message-ID: <Pine.LNX.4.64.1109092246210.10005@ps20323.dreamhostps.com>
On Sat, 10 Sep 2011, Shaun Moss wrote:
>
> On the contrary, I've often seen <pre> used with <code> to mark up 
> pre-formatted code. If you leave out the <code> tag then you've removed 
> the semantics of the content, plus some source-code highlighting 
> libraries look specifically for <code> tags. If the <pre> tag is left 
> out and CSS is used to style code elements as pre-formatted, without CSS 
> classes this interferes with marking up code inline.

The spec now says to use both.


> However, (perhaps tangential to the topic) as far as I know there are no 
> rules to say whether the <pre> tags should wrap the <code> tags or 
> vice-versa.

<pre> isn't allowed inside <code> (<pre> is flow content, <code>'s 
content model only accepts phrasing content).

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Friday, 9 September 2011 15:46:56 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:36 UTC