whatwg / html

HTML Standard
https://html.spec.whatwg.org/multipage/
Other
8.05k stars 2.64k forks source link

Clarify context of §4.12.2 the `<noscript>` element #10159

Open doriantaylor opened 7 months ago

doriantaylor commented 7 months ago

What is the issue with the HTML Standard?

Where §4.12.2 reads:

Contexts in which this element can be used: In a head element of an HTML document, if there are no ancestor noscript elements. Where phrasing content is expected in HTML documents, if there are no ancestor noscript elements.

Consider adding the following sentence:

Where flow content is expected in HTML documents, if there are no ancestor noscript elements.

Such a change would not only make the spec consistent with itself, but also HTML 4.01 and XHTML 1. See validator/validator#1694 for additional information.

Kaiido commented 7 months ago

I'm not sure to understand. <noscript> is already valid as a child of <body> in an HTML document, (your document is parsed as an XHTML one).
Pardon my possible naivety, but what inconsistency are you referring to? Why should the HTML specs be changed? How would that fix the issue with XML and XHTML?