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
Maya Liberman
Full Stack JavaScript Techdegree Graduate 26,360 PointsI have bugs in my HTML codes. I have tested it in the W3 validator. https://validator.w3.org/nu/#l8c142
How can I fix these bugs?
2 Answers
jeffreyl
2,021 PointsHey Maya!
I had the same problem the other day!
Replace the | in your google font link to %7c so your code would read:
link href="http://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700,800%7cChanga+One' rel='stylesheet' type='text/css'>
NO LONGER: link href='http://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700,800|Changa+One' rel='stylesheet' type='text/css'>
This is because | (the vertical bar) does not parse to unicode and instead when replaced with %7c will give same result and no error!
Hope that helps, Elena :)
jeffreyl
2,021 PointsJust if you want to read a bit more for yourself Maya I included the link Validator Error Explanation where I got the answer.
Maya Liberman
Full Stack JavaScript Techdegree Graduate 26,360 PointsMaya Liberman
Full Stack JavaScript Techdegree Graduate 26,360 PointsHere what is wrong:
Info: The Content-Type was text/html. Using the HTML parser. Info: Using the schema for HTML with SVG 1.1, MathML 3.0, RDFa 1.1, and ITS 2.0 support. Error: Bad value http://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700,800|Changa+One for attribute href on element link: Illegal character in query: not a URL code point. From line 8, column 5; to line 8, column 142 css">↩ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700,800|Changa+One' rel='stylesheet' type='text/css'>↩ <l 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. Warning: Section lacks heading. Consider using h2-h6 elements to add identifying headings to all sections. From line 32, column 7; to line 32, column 15 r">↩ <section>↩
Error: No space between attributes. At line 73, column 101 ="Facbook logo"class="social-i Error: Stray start tag style. From line 80, column 1; to line 80, column 7
Here is my code:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title> Nick Pettie | Designer </title> <link rel="stylesheet" href="css/normlize.css"> <link rel="stylesheet" href="css/normlize.css"> <link href='http://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700,800|Changa+One' 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><body> <header>
</footer> </div> </body>
</html>