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

Annette Maza
Annette Maza
1,006 Points

Had a few errors validating my html. Can anyone help me fix them?

Errors: Info: The Content-Type was text/html. Using the HTML parser. Info: Using the schema for HTML with SVG 1.1, MathML 3.0, RDFa 1.1, and ITS 2.0 support. Error: 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. From line 7, column 5; to line 7, column 142 css">↩ <link href='http://fonts.googleapis.com/css?family=Changa+One|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: Section lacks heading. Consider using h2-h6 elements to add identifying headings to all sections. From line 27, column 7; to line 27, column 15 r">↩ <section>↩

My code:

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Annette Maza|Practice</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>Annette Maza</h1> <h2>HTML, CSS and Javascrip Student</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>Experimentation with color and Texture</p> </a> </li> <li> <a href="img/numbers-06.jpg"> <img src="img/numbers-06.jpg" alt=""> <p>Experimentation with color and Texture</p> </a> </li> <li> <a href="img/numbers-09.jpg"> <img src="img/numbers-09.jpg" alt=""> <p>Experimentation with color and Texture</p> </a> </li> <li> <a href="img/numbers-12.jpg"> <img src="img/numbers-12.jpg" alt=""> <p>Experimentation with color and Texture</p> </a> </li>
</ul> </section> <footer> <a href="https://twitter.com/nettymaza"><img src="img/twitter-wrap.png" alt="Twitter Logo" class="social-icon"></a> <a href="https://www.facebook.com/annette.maza.9"><img src="img/facebook-wrap.png" alt="Facebook Logo" class="social-icon"></a> <p>© 2015 Annette Maza</p> </footer> </div> </body> </html>

3 Answers

Jason Anders
MOD
Jason Anders
Treehouse Moderator 145,860 Points

Hi Annette, Google Fonts will always throw an error in the validators, as the validators do not like the pipe symbol (|). Personally, I leave it alone. It will not affect your site in any way. If you want, however, you can replace the | with %7C (no spaces before or after and a capital C).

The 'header' part is actually not an error, but rather just a warning an are also meaningless for site functionality. This is just telling you that you aren't using any h tags... at worst this may affect you SEO and/or people with screen readers, but it will not 'break' the site.

In short, your code is fine.

Keep Coding. :)

Sean T. Unwin
Sean T. Unwin
28,690 Points

I know this is touched on in the Teacher's Notes, but it should also have the replacement text ( %7C ) for the pipe so people can get their page to validate because this question gets asked a lot.

Make sure your Google Fonts link is correct. It should be this:

<link href='http://fonts.googleapis.com/css?family=Changa+One:400,400italic|Open+Sans' rel='stylesheet' type='text/css'>

Where do you get this error from? w3c validator?

Annette Maza
Annette Maza
1,006 Points

Thanks for the help!