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. `._.-(,_..'--(,_..'`-.;.'