In HTML5, some elements (like <section> and <article>) create a new sectioning context in the document‘s outline, as per the outlining algorithm.
This basically means that you can use <h1> as the top-level heading inside them without screwing up the document’s generated outline.
Does the <form> element create a sectioning context?
No, because it’s not sectioning content. Only the following elements are sectioning content:
<article><aside><nav><section>However, the
<fieldset>element is a sectioning root. This means that it creates a new sectioning context (like a sectioning content element), but headings and sections within it don’t contribute to the outlines of their ancestors.So you can blindly use
<h1>inside a<fieldset>element without screwing up your document’s outline.Sectioning roots are:
<blockquote><body><details><dialog><fieldset><figure><td>See http://dev.w3.org/html5/spec/Overview.html#headings-and-sections for a full description and examples.