Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I am getting a warning when I try to validate my page in http://validator.w3.org :

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

My code is as below :

<section id="slider-wrapper-new">     <div class="slider-container-new">         // some code..     </div> </section> 

How can I remove this error ? Do I compulsory need to add h1-h6 tags inside section heading ?

like image 866
Vidhi Avatar asked Jun 11 '14 05:06

Vidhi


1 Answers

Either:

  1. Add a heading (h1, ..., h6) tag to your section element.
  2. Replace your section element with a div element.
  3. Ignore the warning. The message you're seeing is a non-normative usage recommendation, as per the HTML5 spec (highlighting mine):

    The theme of each section should be identified, typically by including a heading (h1-h6 element) as a child of the section element.

like image 177
Robby Cornelissen Avatar answered Oct 06 '22 04:10

Robby Cornelissen