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

Validator.w3.org states that I have a bad value on my Hyperlink I got from Google Fonts. Can someone help me why it is?

Line 7, Column 110: Bad value http://fonts.googleapis.com/css?family=Open+Sans|Changa+One for attribute href on element link: Illegal character in query: not a URL code point. …ogleapis.com/css?family=Open+Sans|Changa+One' 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.

3 Answers

Hey Patrick, there's some notes near the bottom of the video which explain a little about this:

Validation Errors

You may encounter validation errors when using the W3C validators. For example, in this project, the vertical pipes in a Google Font URL might cause an error because they're not escaped using HTML entities. It's a good idea to fix as many errors as possible, because more errors can mean increasingly unpredictable cross-browser results.

And here's the solution, which involves simply replacing the pipe symbol " | " with %7C. Below is an example for you.

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

Thank you for the solution and quick reply Dustin!

thanks was starting to get worried that I had missed something:)