Forum Moderators: open
<!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">
<head>
<title>Paragraphs And Tables </title>
</head>
<body>
<p>
<table>
<tr><th> </th><th>Row Number</th></tr>
<tr><td>1st row</td><td>1</td></tr>
<tr><td>2nd row</td><td>2</td></tr>
</table>
</p>
</body>
</html>
</p> is optional (in HTML parsing mode), the paragraph is closed by any following block. Using an
object to enclose a table is inappropriate (a table does not fit the definition of an object in this instance). A table is a block-level element on its own, it does not need any container.
A paragraph cannot contain any other block-level elements - and as the closing </p> is optional (in HTML parsing mode), the paragraph is closed by any following block.Using an object to enclose a table is inappropriate (a table does not fit the definition of an object in this instance). A table is a block-level element on its own, it does not need any container.
Validation Output: 1 Error
Line 8, Column 6:
document type does not allow element "table" here; missing one of "object", "ins", "del", "map", "button" start-tag.
@Ronin
I put the table inside the P tag because of semantic reasons not for the layout. The pages layout is actualy tableless and I am only using the table to show information.