Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial


Seth Goldberger
Seth Goldberger
2,340 Points

Checking my html on validator.w3.org....error is Warning: Section lacks heading. Consider using h2-h6 elements to add id

am I missing a h1 element? Here is my code ... problem is with line 27

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Seth Goldberger</title> <link rel="stylesheet" href="css/normalize.css"> <link href='http://fonts.googleapis.com/css?family=Changa+One%7COpen+Sans:400,700,700italic,400italic,800' rel='stylesheet' type='text/css'> <link rel="stylesheet" href="css/main.css"> <link rel="stylesheet" href="css/responsive.css"> <meta name="viewport" content="width-device-width, initial-scale=1.0"> </head> <body> <header> <a href="index.html" id="Logo"> <h1>Seth Goldberger</h1> <h2>Designer</h2> </a> <nav> <ul> <li><a href="index.html" class="selected">Portfolio</a></li> <li><a href="about.html">About</a></li> <li><a href="contact.html">Contact</a></li> </ul> </nav> </header> <div id="wrapper"> <section> <ul id="gallery"> <li> <a href="img/numbers-01.jpg"> <img src="img/numbers-01.jpg" alt=""> <p>Experimentation with Color and Texture</p> </a> </li> <li> <a href="img/numbers-02.jpg"> <img src="img/numbers-02.jpg" alt=""> <p>Playing with blending modes in Photoshop</p> </a> </li> <li> <a href="img/numbers-06.jpg"> <img src="img/numbers-06.jpg" alt=""> <p>Trying to create an 80's style of glows</p> </a> </li> <li> <a href="img/numbers-09.jpg"> <img src="img/numbers-09.jpg" alt=""> <p>Drips created using Photoshop brushes</p> </a> </li> <li> <a href="img/numbers-12.jpg"> <img src="img/numbers-12.jpg" alt=""> <p>Creating shapes using repetition</p> </a> </li> </ul> </section> <footer> <a href="https://twitter.com/h2baplaya"><img src="img/twitter-wrap.png" alt="Twitter Logo" class="social-icon"></a> <a href="https://www.facebook.com/MoneyMaker921"><img src="img/facebook-wrap.png" alt="Facebook Logo" class="social-icon"></a> <p>© 2015 Seth Goldberger.</p> </footer> </div> </body> </html>

Hi there,

looks like you are missing opening and closing <html><body><head> tags. Head is not the same thing as <header>. Good luck!

1 Answer

It's just a warning, not necessarily a problem. It's just a recommendation set by W3C, see here.

The section element represents a generic section of a document or application. A section, in this context, is a thematic grouping of content. The theme of each section should be identified, typically by including a heading (h1-h6 element) as a child of the section element.

It's nice to have headers, but as the designer of your website, it's ultimately up to you to decide how it should look.

Edit: Perry brought up a good point, you should have head tags wrapped around your first 7 lines. This isn't what the warning was for, however.

Edit 2: I should stress this for others searching this issue --- you will get this warning even if you follow the lesson properly, you didn't do anything wrong. Don't worry about it. :)

Seth Goldberger
Seth Goldberger
2,340 Points

OK didn't really understand what Perry was saying...either way I thought I did it word for word from what Nick did in the class so I didn't understand the error.

Yep, it's not your fault. Anybody who follows that lesson will get that error, so you're all good!