soycharliente Posted January 14, 2010 Share Posted January 14, 2010 Can anyone help me find a reference online where it says that tables cannot go inside paragraph tags? The output for the W3C Markup Validator reads: document type does not allow element "table" here Also reads: One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>"). I was doing a test to see if putting table inside p validated. However, I'm not putting a block-level element inside an inline element. I'm putting block-level inside block-level. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <body> <p> <table> <tr><td>hello</td><td>world</td><td>!</td></tr> </table> </p> </body> </html> I'm trying to find where the documentation addresses that. Thanks. Quote Link to comment Share on other sites More sharing options...
soycharliente Posted January 14, 2010 Author Share Posted January 14, 2010 The only thing I can find thus far is this site (http://xhtml.com/en/xhtml/reference/) saying that p tags only allow inline elements. Guess that's good enough. Quote Link to comment Share on other sites More sharing options...
haku Posted January 14, 2010 Share Posted January 14, 2010 That's exactly what it is. You can't put block elements in a p tag. And besides, a table isn't a paragraph, so even if you could do that, it's semantically incorrect. Quote Link to comment Share on other sites More sharing options...
soycharliente Posted January 15, 2010 Author Share Posted January 15, 2010 Going to mark solved. If anyone HAS A LINK, feel free to post. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.