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

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

Michael Plemmons
Michael Plemmons
9,393 Points

A few errors

I'm having a few issues with my code.

<!DOCTYPE HTML> <HTML> <head> <meta charset="utf-8"> <title> Andrew Mcfarland | Video Editor </title> <link rel="stylesheet" href="css/normalize.css"> <link href='http://fonts.googleapis.com/css?family=Changa+One|Open+Sans:400,400italic,700,700italic,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-sacle=1.0"> </head> <body> <header> <a href="index.html" id ="logo"> <h1>Andrew Mcfarland</h1> <h2>Video Editor</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> <p>Ā© 2015 Andrew McFarland.</p> <a href="http://twitter.com/andrew.mcfarland"><img src="img/twitter-wrap.png" alt="twitter logo" class="social-icon"></a> <a href="https://www.facebook.com/michael.plemmons.75?fref=ts&ref=br_tf"><img src="img/facebook-wrap.png" alt="facebook logo" class="social-icon"></a> </footer> </div> </body> </HTML>

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

From line 30, column 9; to line 30, column 17

ā†© <section>ā†©

Error: & did not start a character reference. (& probably should have been escaped as &.)

At line 67, column 72

mons.75?fref=ts&ref=br_tf"><im

4 Answers

Terry Scrimsher
Terry Scrimsher
46,658 Points

There doesn't seem to be either "head" or "body" elements in your code here. You should wrap your meta data code in between opening and closing head tags like this:

<head>
    <meta charset="utf-8">
    ...
    <meta name="viewport" content="width=device-width, initial-sacle=1.0">
</head>

While the rest of your code below that should be wrapped in between an opening and closing "body" elements.

<body>
    <header>
        <a href="index.html" id ="logo">
        ...
        </footer>
    </div>
</body>

Also below your opening <section> element you should include an h2 or h3 tag.

Example:

<section>
    <h2>Gallery</h2>
    ...
</section>
Jason Anders
MOD
Jason Anders
Treehouse Moderator 145,860 Points

Hi Michael, Technically, there is nothing wrong with your code that will have any negative impact on the workings of the site. That's the thing with a "code checker." Don't get me wrong, they do provide a very valuable service in keeping the structure of the website pretty static across the board.

As for the errors you were getting... You can ignore the "Warning" you got.

The first error has to do with your Google fonts link. The checker does not like the | character. If you replace the | with %7C (make sure the C is Uppercase and you don't need a space after the C) that will eliminate that error. (The checker like ASCII character code)

Your second error is similar to the first. The code-checker doesn't like the & sign in your Facebook link in the Footer. Just replace that with &amp; (including the semi-colon) and that will eliminate that error.

All that will leave you is the h2-h6 warning, which really means nothing in style or performance.

Keep Coding! :)

Michael Plemmons
Michael Plemmons
9,393 Points

That was weird. I just noticed my code does have the <head></head> tags for the meta data. It just didn't copy and paste those tags for some reason.