strictly, <p> inside <div> ok?

X

Xah Lee

with strict HTML spec, can one have <p> tags inside table's <td> tag?

also, in strict XHTML, can one have <p> tages inside <div>?

Thanks.

Xah
(e-mail address removed)
∑ http://xahlee.org/
 
C

C. M. Sperberg-McQueen

Xah Lee said:
with strict HTML spec, can one have <p> tags inside table's <td>
tag?

In general, I suspect one of the HTML groups might be a
better place to ask questions like this.

But since you asked in in a general XML group, here's a general
answer. The DTD is your friend; read it. The HTML 4.01 DTD
(http://www.w3.org/TR/html4/strict.dtd) reads in part:

<!ELEMENT (TH|TD) - O (%flow;)* -- table header cell, table data cell-->

The parameter entity 'flow' is declared as:

<!ENTITY % flow "%block; | %inline;">

The parameter entity 'block', in turn, is:

<!ENTITY % block
"P | %heading; | %list; | %preformatted; | DL | DIV | NOSCRIPT |
BLOCKQUOTE | FORM | HR | TABLE | FIELDSET | ADDRESS">

So the answer is yes.
also, in strict XHTML, can one have <p> tages inside <div>?

The DTD is at http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd --
except for differences of upper and lower case, the same parameter
entities are involved; I'll leave the details as an exercise for the
reader.

-C. M. Sperberg-McQueen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,001
Messages
2,570,249
Members
46,846
Latest member
BettinaOsw

Latest Threads

Top