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 How to Make a Website Responsive Web Design and Testing Website Testing

Heidi Vasterling-Ford
Heidi Vasterling-Ford
7,806 Points

When I checked my website the checker said "error" because of using "|" in the href for the font I chose. How do I fix?

I chose a different font from the one the teacher provided; here is the code: <link href="https://fonts.googleapis.com/css?family=Crimson+Text:400,400i,700|Nunito:300,400,700" rel="stylesheet">

Validator.w3 gave me an error because of the "|" used before 'Nunito' How do I fix this?

3 Answers

Sometimes validator will show these things, but as long as you know what they are and they are correct, they don't need to be fixed

28,558 Points

As Ash mentions minor errors like that won't realistically cause you any actual issues, but you can fix it pretty easily if you really want your site to be 100% HTML compliant. The reason it complains is that URLs are only supposed to use characters found in the ASCII standard, any characters outside of it should be represented by an UTF-8 Character Code.

The UTF-8 code for the | symbol is 7C and to indicate you are using a UTF-8 code in the URL you have to prepend a % sign. Put a bit more simply you just need to replace the | with %7C in the URL like this:

 <link href="https://fonts.googleapis.com/css?family=Crimson+Text:400,400i,700%7CNunito:300,400,700" rel="stylesheet">

That way the URL will still work the same, but be completely standards compliant.