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 trialzoe yan
3,298 Pointserror when validate the index.html file
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Zoe Yan | CS Rookie</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'>
Hi all, the top contents are my code. After I validate it on the validator website, one error came up. It says: Line 7, Column 144: 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.
I have no idea what the above is , can anyone explain it to me? Thanks
1 Answer
Germán Campos
18,374 PointsThat seems normal to me. It is simply how google fonts embeds the necessary info into the css call so that:
A) the relevant fonts are called for B) the relevant font weights are called for
Said syntax is not understood by your validator tool and thus returns that error. I honestly wouldn't worry about it.
If it is really important for you to pass the validation test, then simply call for the fonts through any other means (provided by google fonts itself) such as JS instead of CSS.
zoe yan
3,298 Pointszoe yan
3,298 Pointsthank you for your reply.