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 trialErle Robinson
792 PointsError When validating Code
Hello, I get an error specific to the code below when I try to validate the code from index.html.
line 8 <link href='http://fonts.googleapis.com/css ?family=Changa+One|Open+Sans:400italic,700italic,400,700,800' line 9 rel='stylesheet' type='text/css'> line 10 <link rel="stylesheet" href="css/main.css"> Below is the explanation of the error. However, my code looks exactly as the code in the lesson from Nick Please help Thank you
Line 9, Column 39: 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. 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
Erle Robinson
792 PointsI tried changing the | which is Shift plus the characters under the delete key on a Mac, but to no avail
Rich Bagley
25,869 PointsHi Erie,
John has posted a possible solution above which I would try first.
Thanks
-Rich
Erle Robinson
792 PointsSorry Rich, Here is all the code between the <head> - Note I inserted Line 3 and Line 9 for easy reading The error is below the code
line 3 <head>
<!--This defines the character set for the document-->
<meta charset="utf-8">
<title>Adys Ann Guerra | Cute Baby</title>
<link rel="stylesheet" href="css/normalize.css">
<link href='http://fonts.googleapis.com/css ?family=Changa+One %7C Open+Sans:400italic,700italic,400,700,800'
line 9 rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="css/main.css">
<link rel="stylesheet" href="css/responsive.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
ERROR
Line 9, Column 39: Bad value http://fonts.googleapis.com/css ?family=Changa+One %7C Open+Sans:400italic,700italic,400,700,800 for attribute href on element link: Illegal character in path segment: not a URL code point. 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.
Rich Bagley
25,869 PointsHi Erie,
Try removing the space before and after the %7C.
Thanks
-Rich
Erle Robinson
792 PointsHi Rich, Removing the space before and after the %7C worked. Thank you
John Reed
12,911 PointsJohn Reed
12,911 Pointsthe | character in the url should be replaced with %7C instead.