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?
In HTML, a section is a semantic element for creating standalone sections in a web page. These sections should be made up of related content, like contact information. The section element should only be used if there isn't a more specific element to represent the related content.
The footer element is not sectioning content; it doesn't introduce a new section. Here is an example which shows the footer element being used both for a site-wide footer and for a section footer.
<section> is a new HTML 5 element that defines an important section of a document. It can be used within articles, in the header or footer, or to define navigation.
The <section> HTML element represents a generic standalone section of a document, which doesn't have a more specific semantic element to represent it.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With