W3C home > Mailing lists > Public > whatwg@whatwg.org > December 2006

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

From: Lachlan Hunt <lachlan.hunt@lachy.id.au>
Date: Tue, 05 Dec 2006 14:54:29 +1100
Message-ID: <4574ED75.3030805@lachy.id.au>
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

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:31 UTC