0

I have a section that contains a form only and doesn't need a heading due to my website structure.

<section>
  <form>...</form>
</section>

W3C validator gives me this warning:

Section lacks heading. Consider using h2-h6 elements to add identifying headings to all sections.

What is a valid workaround for this? Should I add a transparent header or get rid of the section tag at all? Any other ideas?

sdvnksv
  • 9,350
  • 18
  • 56
  • 108

1 Answers1

0

You could get rid of the section and wrap it up in a div instead. A div isn't required to have a heading where as a section is (by the w3c standards this is).

  • yeah, as @IvinRaj commented, see the answers at http://stackoverflow.com/questions/24155024/w3c-html-validation-error-section-lacks-heading-consider-using-h2-h6-elements/24155036#24155036 and http://stackoverflow.com/questions/24155024/w3c-html-validation-error-section-lacks-heading-consider-using-h2-h6-elements/26185873#26185873 It doesn’t see like there’s any good reason to use `section` for a case like this; it doesn’t add anything over just using `div`. – sideshowbarker May 23 '16 at 15:24