[thelist] Tag order question

David Dorward evolt at david.us-lot.org
Tue Dec 16 10:49:01 CST 2003

On 16 Dec 2003, at 16:42, Jayde Van Doorn wrote:
> Most of the text on the pages is in this format: 
> <p><div>text</div></p> I
> have always coded as <div><p>text</p></div>, and even then only if 
> I've got
> multiple paragraphs for one div.
> So, I guess what I'm asking is, which is right? Or is it really just a
> matter of personal preference?

In the above example - the latter is right, the former is invalid.
In HTML, paragraphs can not contain <div>s.

<http://validator.w3.org/> is your friend.

David Dorward

More information about the thelist mailing list