This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
It helps in organizing a page and applying CSS to have an element that can be used for dividing the source code in the page. The issue with HTML5 is that what elements are included within such a division should not matter. Comments can be used but that won't allow minimization (diagnosis often depends on examining the source code received over the Internet, not preproduction files). I use the div element but was recently reminded by a validator (https://validator.w3.org/nu/) not to use it for nonflow content. That probably also excludes use for nonflow descendants that are not children. The issue was with a div element that was only for a script. That div is within another div, defining a column. The divs have CSS. I'd rather not take the script out of a div if doing so will take it out of the website's look produced by CSS. In HTML5, either the div element should be redefined to allow use for any kind of content or a new all-content-type element should be defined soi as to be consistent with the purpose of organizing source code within the body element. As it is, HTML5 in section 3.2.4 permits other specs to require an element be used elsewhere than allowed by HTML5, which means non-HTML5 use is not barred but probably depends on browser designers having a reason to recognize it. At the least, if some content types would be a problem for a div, either those types should be explicitly enumerated or more types should be explicitly allowed. I probably chose the wrong component for this report, but I was unable to determine the proper component from the bug form picklist's choices.
To file additional issues or re-open this issue please use the W3C HTML5 Issue tracker: https://github.com/w3c/html/issues/new Thanks!
I reopened (https://github.com/w3c/html/issues/355). The WONTFIX status here was unexplained and no question was raised here. Thanks.