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

fitrobotic
fitrobotic
1,290 Points

Markup Validator found 28 errors, 7 warnings

Hi

The code works since the website to me looks exactly like the one being built in the presentation videos. I read through the errors and it seems to me that they are related to spacing or missing characters. When I look at the code it doesn't appear different than what was shown in the video. Here is the code:

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Curtis Fitness Personal Training | South Bay Personal Trainer</title>
    <link rel="stylesheet" href="css/normalize.css">
    <link href='http://fonts.googleapis.com/css?family=Changa+One|Open+Sans:400,400italic,700italic,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>Curtis Fisher</h1>
        <h2>Personal Trainer</h2>
     </a>
      <nav>
        <ul>
          <li><a href="index.html" class="selected">Services</a></li>
          <li><a href="about.html">About</a></li>
          <li><a href="contact.html">Contact</a></li>
          <li><a href="blog.html">Blog</a></li>
        </ul>
      </nav>
  </header>
    <div id="wrapper">
      <section>
        <ul id="gallery">
          <li>
        <a href="img/numbers-01.jpg"</li>
          <img src="img/numbers-01.jpg" alt="">
          <p>Experimentation with color and texture</p>
        </a>
        </li>
             <li>
        <a href="img/numbers-02.jpg"</li>
          <img src="img/numbers-02.jpg" alt="">
          <p>Playing with blends in Photoshop</p>
        </a>
        </li>
              <li>
        <a href="img/numbers-06.jpg"</li>
          <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"</li>
          <img src="img/numbers-09.jpg" alt="">
          <p>Drips created using Photoshop brushes</p>
          </a>
        </li>
              <li>
        <a href="img/numbers-12.jpg"</li>
          <img src="img/numbers-12.jpg" alt="">
          <p>Experimentation with color and texture</p>
        </a>
        </li> 
      </ul>
      </section>
      <footer>
          <a href="http://twitter.com/nickrp"><img src="img/twitter-wrap.png" alt="Twitter Logo"class="social-icon"></a>
           <a href="http://facebook.com/nickpetit"><img src="img/facebook-wrap.png" alt="Facebook Logo" class="social-icon"></a>
        <p>&copy; 2014 Curtis Fisher.</p>
      </footer>
        </div>
      </body>
    </html>

I was thinking that if there were spacing or character issues that the code wouldn't work? What do these errors mean?

Thanks,

Davina

4 Answers

Evan Moore
Evan Moore
11,814 Points

Hi Davina,

Try removing the </li from inside your <a> tags.

For example,
<a href="img/numbers-12.jpg"</li>
should look like...
<a href="img/numbers-12.jpg">

Hi Davina,

For your last error the vertical bar | needs to be url encoded. Replace it with %7C

fitrobotic
fitrobotic
1,290 Points

I changed the vertical bar to %7C and the error did not change.

The error is exactly the same?

Can you either post what your google fonts link looks like or post the error message again?

The google fonts url should look something like this: http://fonts.googleapis.com/css?family=Changa+One%7COpen+Sans:400,400italic,700italic,700,800

I've replaced the vertical bar with %7C

fitrobotic
fitrobotic
1,290 Points

Thanks Evan. That cleared up most of the errors. I still have 1 that I can't figure out what it is telling me:

Line 7, Column 142: Bad value http://fonts.googleapis.com/css?family=Changa+One|Open+Sans:400,400italic,700italic,700,800 for attribute href on element link: Illegal character in query: not a URL code point.

…ne|Open+Sans:400,400italic,700italic,700,800' rel='stylesheet' type='text/css'>

fitrobotic
fitrobotic
1,290 Points

Ah, I see. I thought you were referring to another vertical bar. I replaced and it worked. I wonder why the same error did not show on the video since I copied and pasted the same code that the instructor did.

Thanks Jason.

Hi Davina,

My guess would be that the w3c validator has since been updated in response to google using the | in their url's. Maybe it wasn't something that it checked at the time Nick used it.

The Teacher's Notes for this video mentions that you might get an error on this but I'm not sure why it doesn't tell you what to do about it.