468,101 Members | 1,338 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,101 developers. It's quick & easy.

strictly, <p> inside <div> ok?

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
xa*@xahlee.org
∑ http://xahlee.org/

Jul 20 '05 #1
1 3255
"Xah Lee" <xa*@xahlee.org> writes:
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
Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

61 posts views Thread by Toby Austin | last post: by
3 posts views Thread by Josef K. | last post: by
2 posts views Thread by Nikolai Onken | last post: by
28 posts views Thread by Kent Feiler | last post: by
5 posts views Thread by chakradhari.ashish | last post: by
nathj
5 posts views Thread by nathj | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.