W3C home > Mailing lists > Public > www-validator@w3.org > March 2001

RE: Error in validator

From: Thanasis Kinias <tkinias@asu.edu>
Date: Tue, 13 Mar 2001 11:00:47 -0700
To: "'Peter Foti (PeterF)'" <PeterF@SystolicNetworks.com>, "'www-validator@w3.org'" <www-validator@w3.org>
Message-id: <A021872EC2BDD411AB3600902746A055016047C9@mainex4.asu.edu>
Peter Foti wrote:

> I am getting the error below in an XHTML strict document.  I don't
> understand this because isn't the <p> element a block-level element?

> Line 36, column 55: 
>      <p><table border="0" cellspacing="0" cellpadding="0">
                                                         ^
> Error: element "table" not allowed here; possible cause is an inline
> element containing a block-level element

<p> _is_ a block-level element, but not all block-level elements can contain
all other block-level elements.

From the DTD <http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd>:

> <!ELEMENT p %Inline;>
> <!ATTLIST p
>   %attrs;
>   >

That means <p> can contain only inline elements; <table> is a block-level
element (like <p>).

Why would you _want_ to put a <table> in a <p>?

Thanasis Kinias
Information Dissemination Team, Information Technology
Arizona State University
Tempe, Ariz., U.S.A.

Qui nos rodunt confundantur
et cum iustis non scribantur.
Received on Tuesday, 13 March 2001 13:01:08 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:13:55 GMT