In html, is it valid to have a table inside of a table?
<table> <tr> <td> <table> <tr> <td></td> </tr> </table> </td> </tr> <tr></tr> </table>
HTML supports this functionality and is known as the nesting of the tables. Tables can be nested together to create a table inside a table. To create a nested table, we need to create a table using the <table> tag. This table is known as the outer table.
A table can be created within another table by simply using the table tags like <table>, <tr>, <td>, etc., to create our nested table. Since nesting tables can lead to higher complexity levels, remember to begin and end the nesting tables within the same cell.
table tag isn't deprecated (you can look at the html spec). What you've heard of is probably tableless layouts, because tables should not be used for positioning elements on the page.
The HTML 4 specification states: "Tables should not be used purely as a means to layout document content as this may present problems when rendering to non-visual media." So, if you want to write valid HTML 4.01, you can't use tables for layout.
Yes, perfectly valid.
By pasting what you have into the W3C validator, the only errors are regarding doctype, head tags, etc... nothing ever mentioned of nesting table within table (even after adding all the correct tags that it errored on) It suggests using a tbody
http://validator.w3.org/check
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With