Re: [VE][79] Error Message Feedback

On Sun, 23 Jan 2005, Benjamin HINOJOSA wrote:

> I really don't understand why this page is not valide because the p balise
> is OPEN and CLOSED...

In a sense, that _is_ the problem. :-) The p element is implicitly closed.

> <p>
> <table  width="550" cellpadding="0" cellspacing="0" align="center">

There you have an empty p element, which is valid but explicitly
frowned upon in the HTML 4.01 specification. The point is that the
<table> element implicitly closes the open p element, as if there were
</p> before it. The reason is that a paragraph cannot contain a table.

> </table></p>

This is the syntax error. The p element had already been closed, so the
</p> tag is homeless.

If you wanted to use <p> and </p> tags to create spacing, it is better to
use the CSS properties margin-top and margin-bottom for the table element
instead.

-- 
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/

Received on Monday, 24 January 2005 16:07:17 UTC