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! While you're at it, check out some resources Treehouse students have shared here.

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

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

The section is lacking a header when i was checking my index.html. on Validator.w3.

Here is my code. What do i need to do to fix it so it checks out?

</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/IMG_0490-Rev"> <img src="img/IMG_0490-Rev" alt=""> <p>Two teddy bears sitting together.</p> </a>
</li> <li> <a href="img/IMG_0510-Rev-2"> <img src="img/IMG_0510-Rev-2" alt=""> <p>T-shirt design inspired by 9/11/01.</p> </a>
</li>
<li> <a href="img/IMG_0511-Rev-2"> <img src="img/IMG_0511-Rev-2" alt=""> <p>Palm tree on the beach.</p> </a>
</li>
<li> <a href="img/IMG_0618-Rev-2"> <img src="img/IMG_0618-Rev-2" alt=""> <p>Puppies playing with a shoe.</p> </a>
</li> <li> <a href="img/IMG_0621-Rev"> <img src="img/IMG_0621-Rev" alt=""> <p>Teddy bear holding a rose.</p> </a>
</li> </ul> </section> <footer>:

4 Answers

roxannecarlson
roxannecarlson
8,131 Points

Like a newspaper, your code can have more than one "header". The first header would be for the portion of your code that relates to the headline in the newspaper. The other header(s) relate to the titles of each article. It is not necessary, but because your code has div and then section elements, the validation software is asking if you wanted to have a header to label your section.

Thanks for responding. I am still confused what should the code look like so it checks out and I can move on to check all other parts of my website to make sure they work too?

roxannecarlson
roxannecarlson
8,131 Points

I just re-read your code. If your code starts at this point (I assumed it did not), you are missing !DOCTYPE html and then on the next line "head" and then "header" on the next line. (Don't forget the greater than and less than signs on each side.) You will need to close the head element after your closing header element.

i have looked and looked over this code and i don't see any errors that would cause this to problem to persist when checking my code on validator. w3. org. Since i only copy and pasted part of the code the first time, an error somewhere else may be causing the problem so i am copy and pasting all of my code to see if there is something else i missed. i usually can figure it out on my own, but this one truly has me stumped. Here is all of my code for index.html.:

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Susan Rusie | Artist</title> <link rel="stylesheet" href="css/normalize.css"> <link href='http://fonts.googleapis.com/css?family=Changa+One:400,400italic%7COpen+Sans:700italic,400,700,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>Susan Rusie</h1> <h2>Artist</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/IMG_0490-Rev"> <img src="img/IMG_0490-Rev" alt=""> <p>Two teddy bears sitting together.</p> </a>
</li> <li> <a href="img/IMG_0510-Rev-2"> <img src="img/IMG_0510-Rev-2" alt=""> <p>T-shirt design inspired by 9/11/01.</p> </a>
</li>
<li> <a href="img/IMG_0511-Rev-2"> <img src="img/IMG_0511-Rev-2" alt=""> <p>Palm tree on the beach.</p> </a>
</li>
<li> <a href="img/IMG_0618-Rev-2"> <img src="img/IMG_0618-Rev-2" alt=""> <p>Puppies playing with a shoe.</p> </a>
</li> <li> <a href="img/IMG_0621-Rev"> <img src="img/IMG_0621-Rev" alt=""> <p>Teddy bear holding a rose.</p> </a>
</li> </ul> </section> <footer> <a href="http://facebook.com/susanrusie"><img src="img/facebook-wrap.png" alt="Facebook Logo" class="social icon"></a> <a href="http://twitter.com/s_rusie"><img src="img/twitter-wrap.png" alt="Twitter Logo" class="social icon"></a> <p>© 2015 Susan Rusie.</p> </footer> </div> </body> </html>

roxannecarlson
roxannecarlson
8,131 Points

I am in the process of re-learning HTML. However, what I remember and what my current lessons are showing is a beginning set up for the HTML structure that goes something like this: !Doctype HTML ... html ... head ... header ... stuff in header ... /header ... /head ... body ... stuff in body ... footer ... /footer ... /body ... /html I don't know if this will make a difference or not.

i asked my sister who also knows HTML if she could help me figure out what was missing in my HTML and she said to add some text to my HTML so it should look like this:

  <section><h2>This is my heading</h2>
    <ul id="gallery">
       <li>

I had originally thought it had to do with my pictures which are now labeled as "artwork-01.Jpg through artwork-05.jpg" since Nick's were all with the title "numbers" and i was using my own artwork for this project instead to personalize my website, but I still got the same message that the section was lacking a header until I made this change. Anyway, that change seems to work except I got some statements that i wasn't sure of in the message filtering part just below my HTML that I pasted in the website to be checked. This is what it said verbatim:

  1. Info: The Content Type was text/html. Using the HTML parser.

  2. Info: Using the schema for HTML with SVG 1.1, MathML 3.0, RDFa 1.1, and ITS 2.0 support.

Since i didn't get the message "This document was successfully checked by HTML5" like it was in the video, i wasn't sure what this meant. It appears to have checked out but i just want to know for sure so i can check everything else before i move on to the next steps. Any help on this would be greatly appreciated.