In HTML5, is the <form> element a sectioning element, like <section>? -


in html5, elements (like <section> , <article>) create new sectioning context in document‘s outline, per outlining algorithm.

this means can use <h1> top-level heading inside them without screwing document’s generated outline.

does <form> element create sectioning context?

no, because it’s not sectioning content. following elements sectioning content:

  • <article>
  • <aside>
  • <nav>
  • <section>

however, <fieldset> element sectioning root. means creates new sectioning context (like sectioning content element), but headings , sections within don’t contribute outlines of ancestors.

so can blindly use <h1> inside <fieldset> element without screwing 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 full description , examples.


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -