471,337 Members | 829 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,337 software developers and data experts.

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 3365
"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 Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.