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 trialFlavio Vento
1,542 PointsHelp with an error in my HTML validation.
Line 7, Column 135: Bad value http://fonts.googleapis.com/css?family=Arimo:400,700,400italic,700italic|Fredoka+One for attribute href on element link: Illegal character in query: not a URL code point. β¦rimo:400,700,400italic,700italic|Fredoka+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.
What does this mean?
Michele Carraglia
790 PointsDid the trick for me too. Thanks!
4 Answers
Sean T. Unwin
28,690 PointsIt's a warning given when there are special characters and spaces are found in an URL when validating. You don't have to worry about it, really, in this case. The warning is there because most servers don't like that sort of thing.
The Google Font URL has a pipe ('|') which the validator doesn't like and is requesting that you use escape characters for them, such as what is suggested for spaces -- %20
is the URL encoded character for a space.
Again, in the case of a Google Font URL it's generally considered okay, but if it was an href
for an anchor tag pointing to a typical webpage it would likely result in an error when loading the page.
Flavio Vento
1,542 PointsGot it, Thanks
Jacobus Hindson
14,429 PointsFalvio,
Try this URL instead:
http://fonts.googleapis.com/css?family=Arimo:400,700,400italic,700italic%7CFredoka+One
Flavio Vento
1,542 PointsThank You Jacobus,
That worked, but why?
Jacobus Hindson
14,429 Pointsthe %7C is the equivalent of | character. Sean gives a great explanation below.
Jacobus Hindson
14,429 Pointsthe %7C is the equivalent of | character. Sean gives a great explanation below.
dominique
2,178 PointsA short explanation plus a handy reference table for converting special characters to their URL %-encoded counterparts: http://www.w3schools.com/tags/ref_urlencode.asp
Rashid Marri
5,825 Pointsi have same problem and this my code :
<link href='http://fonts.googleapis.com/css? family=Ubuntu:400,700,500,300|Lobster' rel='stylesheet' type='text/css'>
Fernando Claussen
9,324 PointsFernando Claussen
9,324 PointsPlease post the block of code. You might have a mispelling.