Jo Smo Jo Smo - 3 months ago 19
HTML Question

Are H1 (HTML heading) allowed inside a table th or td tag?

TLDR: It's not allowed.

I found my answer here:

Permitted parent elements for h1: Any element that can contain flow elements,

Source: and


The HTML living standard explicity forbids this. The th element content model is as follows (emphasis added):

Flow content, but with no header, footer, sectioning content, or heading content descendants.

"Heading content" refers to the h1, h2 etc. elements, as well as the hgroup element:

Heading content defines the header of a section (whether explicitly marked up using sectioning content elements, or implied by the heading content itself).

h1 h2 h3 h4 h5 h6 hgroup