Re: Valid XHTML

On 5 Jun 2004, at 20:37, Håvard Hvassing wrote:
> Shouldn’t this code be altered? I mean; it is both invalid and you  
> can’t use
> <p> inside a <div> tag.

[Snip copy of validator success message]

Wrong on both counts.


<div> elements can contain <p> elements. (<p> elements cannot contain  
<div> elements, but the validator success message does not suggest you  
do that).

> Of course; those of the users who makes valid XHTML-pages can alter  
> this by
> themselves without problem, as Kynn Bartlett wrote.

As I said around the same time:  

> However; how about replacing the <p>-tags with a <div>-tag?

There might be a case for that, but only one of semantics (can two  
words and a digit be considered a paragraph?), not of validity.

David Dorward

Received on Saturday, 5 June 2004 17:33:23 UTC