W3C home > Mailing lists > Public > www-validator@w3.org > January 2005

Re: [VE][79] Error Message Feedback

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Mon, 24 Jan 2005 18:06:43 +0200 (EET)
To: Benjamin HINOJOSA <benjamin.hinojosa@univ-lille3.fr>
Cc: www-validator@w3.org
Message-ID: <Pine.GSO.4.58.0501241803150.9226@korppi.cs.tut.fi>

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

Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/
Received on Monday, 24 January 2005 16:07:17 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:17:44 UTC