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

Nicholas Sarlo
Nicholas Sarlo
849 Points

Invalid HTML?

I'm getting this error and can't seem to figure out why 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 IRI reference: Any URL. For example: /hello, #canvas, or http://example.org/. Characters should be represented in NFC and spaces should be escaped as %20.

2 Answers

This seems to have started happening on http://validator.w3.org

The validator is complaining about the | symbol. To get your html to pass change | to %7C

eg:

<link href="http://fonts.googleapis.com/css?family=Changa+One%7COpen+Sans:400,400italic,700,700italic,800" rel="stylesheet" type="text/css">

Nick Pettit I suspect this is going to confuse a lot of new users .... might be worth updating the teacher notes on that lesson.

Nick Pettit
STAFF
Nick Pettit
Treehouse Teacher

Thanks for spotting this! I added a note to the video: http://teamtreehouse.com/library/how-to-make-a-website/responsive-web-design-and-testing/website-testing

I actually don't think this particular issue is that big of a deal, however. More errors can mean more unpredictable cross-browser results, but that mostly applies to unclosed tags or typos in the names of elements and attributes. If this is the code Google is suggesting, I'm 99% positive it will work everywhere.

Nicholas Sarlo
Nicholas Sarlo
849 Points

Thanks! That's why it was confusing. It seemed to work fine, but I couldn't figure out why I was getting the error.