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 trialBrian Coffelt
12,071 PointsCan't figure out validator.w3.org HTML error
validator.w3.org found the an error with the following code:
<link href='http://fonts.googleapis.com/css?family=Changa+One|Open+Sans:400italic,700italic,400,700,800' rel='stylesheet' type='text/css'>
I've checked Nick Pettit's example several times & can't figure out the error. Let me know if more clarification is required.
5 Answers
Jean Paiva
7,128 PointsAs I see...it's the " | " between the 2 fonts that's the problem.
Try to use the fonts separately, like this:
<link href='http://fonts.googleapis.com/css?family=Changa+One' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700,800' rel='stylesheet' type='text/css'>
James Barnett
39,199 PointsSince |
character is invalid in a URL, a better solution is to encode the |
character by changing it to %7c
Brian Coffelt
12,071 PointsThanks
John Wheal
27,969 PointsShouldn't you use double quotes? I'm not sure if that will cause an error with w3 validator.
I seem to think I've seen this issue before and it's related to the URL that Google has given you. It doesn't like | characters.
Brian Coffelt
12,071 PointsI thought the same thing & changed to double quotes. The w3 validator still rejected it. Doubled-checked Nick Pettit's example. Thanks for the input.
Brian Coffelt
12,071 Points@Jean Paiva.....Thanks. I'll give it a try your way.
Jean Paiva
7,128 PointsNicee :P
Brian Coffelt
12,071 PointsBrian Coffelt
12,071 PointsThat solved it. Thanks again.