Re: Missed HTML syntax error in Nu Html Checker

> Note the nesting structure <a><img><h1></h1></a>.
> 
> If I read the HTML5 spec correctly, the content of an <a> element must be phrasing content, and an <h1> element is not phrasing content.

No, the spec is more permissive when it comes to what `a` may contain: https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-a-element

It details this as well, for example stating: “The `a` element can be wrapped around entire paragraphs, lists, tables, and so forth, even entire sections, so long as there is no interactive content within (e.g., buttons or other links).”

This handling seems to be correct.

Best,

 Jens.

--
Jens Oliver Meiert
https://meiert.com/

Received on Tuesday, 28 April 2026 14:39:22 UTC