[whatwg] <p> elements containing other block-level elements

Ian Hickson wrote:
> I agree that it doesn't seem to make much sense to nest paragraphs inside 
> those tables though.

Agreed.

>    <pre><code> ... </code></pre>
>    <blockcode> ... </blockcode>
> 
> ...and given that the former would work in all existing UAs and the second 
> wouldn't, and the former has the same semantics as the second, I don't see 
> much of an advantage to the second.

It's similar to the distinction between
   <div><q> ... </q></div>
and
   <blockquote> ... </blockquote>

>>That is indirectly nesting P elements, a bit ugly IMHO. It also doesn't 
>>make sense.
> 
> Agreed.
> 
>>>  <ol>
>>>   <li>
>>>    <p>
>>
>>Why would you want a P element there?
> 
> It would probably be part of something bigger, as in:
> 
>    <ol>
>     <li>
>      <p>...</p>
>      <p>...</p>
>      <p>...</p>
>      <p>
>       ...
>       <ol>
>        <li>...

You're still indirectly nesting paragraphs here. Although I agree that you
get nested paragraphs with blockquote, I don't think that the author's own
text would have a paragraph within a paragraph, list markers notwithstanding.

>>>  <pre>
>>>   <p>...</p>
>>>   <p>...</p>
>>>  </pre>
>>
>>Ouch! Forbid this.
> 
> I probably agree with this, but I'm not 100% sure. What about <pre> 
> blocks around e-mails:

<pre> means <preformatted> not <preserve whitespace>. You should not
have block-level markup within <pre>; block-level distinctions within
<preformatted> text (such as plaintext emails) are given by the previous
formatting (e.g. whitespace).

(Yes, I meant 'e.g.'; C code is preformatted, too, but its block level
distinctions are given by braces and the like.)

~fantasai

Received on Monday, 11 April 2005 13:46:05 UTC