Can i use H1, H2, H3, H4, H5, H6
inside the table TH
tags? - HTML
I tryed to validate with the w3 validator, but it doesn't validate. I get this:
The element h4 must not appear as a descendant of the th element.
<th><h4>Orange</h4></th>
I use HTML5, so i think that the best idea is to use <div>
to make a table and then put the <H4>
tags in it. Or is this a bad idea too? Because then it looks something like this:
<h4>first title</h4> <h4>second title</h4> <h4>third title</h4>
<p>first parahraph</p> <p>second parahraph</p> <p>third parahraph</p>
And i don't know how this looks, 3 heading tags that close, without any text or paragraphs between that.
th
element and style it as you need. Why bother with the header elements? – Lifeless<td>
, and you can use<td>
in the same places that<th>
is allowed. So your example works if you change it to<td><h4>Orange</h4></td>
. It's still probably a better idea to put tabular data in a table and just style the<th>
elements appropriately, but this might be useful as a workaround for anyone searching this in the future. – Duchess