Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

HTML How to Make a Website Responsive Web Design and Testing Website Testing

Liliana Leyva
Liliana Leyva
3,711 Points

Why do I get this warning when trying to validate html? I do not know how to add the code.

Warning: Section lacks heading. Consider using h2-h6 elements to add identifying headings to all sections. From line 28, column 5; to line 28, column 13 per">↩ <section>↩

2 Answers

Liam English
Liam English
3,837 Points

It would appear that <section> requires a heading element, as per best practices.

<section>
     <h2>Hello</h2> 
</section>

The <h2> that I have used above could also be an h3, h4, h5 or h6, as recommended.

Liliana Leyva
Liliana Leyva
3,711 Points

Thank you Liam, I am going to check about it.

Gray Milmine
Gray Milmine
3,012 Points

Thanks Liam - worked for me!

Mark Johnes
Mark Johnes
3,627 Points

Where about in the code should this section be placed?