[whatwg] Content Model Restrictions on table>tr in HTML

Bjoern Hoehrmann wrote:
> I may be able to make additional suggestions once someone showed me 
> an example of HTML syntax where a 'p' element has a 'pre' child 
> element.

The pre element is allowed to occur where structured inline-level 
elements are allowed.

http://www.whatwg.org/specs/web-apps/current-work/#the-pre

The p element is allowed to contain significant inline-level content. 
Inline-level content includes structured inline-level elements.

http://www.whatwg.org/specs/web-apps/current-work/#the-p

Therefore a p element can contain a pre element in XHTML.

<p>This paragraph contains a pre element
   <pre>
     This is some preformatted
     text inside a paragraph.
   </pre>
in XHTML only.</p>

That cannot occur in the HTML serialisation because <pre> must imply 
</p> due to backwards compatibility constraints.

-- 
Lachlan Hunt
http://lachy.id.au/

Received on Monday, 4 December 2006 19:54:29 UTC