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

Validation....

I am validating my website and it says I have 1 error and 3 warnings but I cannot figure it out. Help!

Alan Johnson
Alan Johnson
7,625 Points

Please share the errors you're getting and your markup, and that should help us all help you a little more easily.

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Marta Cook | Web Developer</title>
    <link rel="stylesheet" href="css/normalize.css">
    <link href='http://fonts.googleapis.com/css?family=Changa+One|Open+Sans:400italic,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> Marta Cook </h1>
      <h2> Web Developer </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-09.jpg">
            <img src="IMG/numbers-09.jpg" alt="">
              <p> Drips created using Photoshop brushes.</p>
           </a> 
        </li>
      </ul>
    </section>
    <footer>
      <a href="http://twitter.com/Miss_Marta003"><img src="IMG/twitter-wrap.png" alt="Twitter Logo" class="social icon"></a>
      <a href="http://facebook.com/marta.c.cook"><img src="IMG/facebook-wrap.png" alt="Facebook Logo" class="social icon"></a>
    <p> &copy; 2014 Marta Cook</p>
    </footer>
      </div>
  </body>
</html>

this is the mesage I received after I checked it through validator.....

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

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

Syntax of URL:
    Any URL. For example: /hello, #canvas, or http://example.org/. Characters should be represented in NFC and spaces should be escaped as %20. 

Warning Line 27, Column 13: Section lacks heading. Consider using h2-h6 elements to add identifying headings to all sections.

    <section>

2 Answers

Alan Johnson
Alan Johnson
7,625 Points

Try changing the font url to:

http://fonts.googleapis.com/css?family=Changa%2BOne%7COpen%2BSans%3A400italic%2C700italic%2C400%2C700%2C800

For whatever reason, it looks like the default font urls that come out of Google aren't valid according to the W3C. The url above is the same, but escapes a lot of the characters. That seems to resolve it.

The second issue is because the validator wants you to have an h2-h6 within the section tags. It's a warning because it's not a requirement - it's just something that's a good idea.

Thank you so much!

Bruno Van der Straten
Bruno Van der Straten
7,079 Points

If you use the W3C validator it should say what is wrong.

I used it and looked at what was wrong and "fixed" it but it still is saying the same thing.