Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

HTML

Jermaine Witter
Jermaine Witter
29,422 Points

Cannot validate HTML Markup

Hi all,

I'm hoping someone can help. I just completed the make you own website course, but my HTML will not validate and I'm not sure why. It has something to do with the Google fonts but Nicks markup validated fine and mine's identical. Any suggestions will be appreciated? (see error below).

Thanks Hayden. The error I get is

Error Line 7, Column 156: Bad value http://fonts.googleapis.com/css?family=Changa+One:400,400italic|Open+Sans:400italic,700italic,400,700,800 for attribute href on element link: Illegal character in query: not a URL code point. …ic|Open+Sans:400italic,700italic,400,700,800' rel='stylesheet' type='text/css'> Syntax of IRI reference: Any URL. For example: /hello, #canvas, or http://example.org/. Characters should be represented in NFC and spaces should be escaped as %20.

Thanks for the tip on posting code, didn't know it get's stripped out of the post

Hayden Taylor
Hayden Taylor
5,076 Points

When you validate your html it usually tells you what it doesn't like.

Could you copy the error that the validator is giving you and edit your question with that stuff in it please.

Also note that if you want to post code put 4 of these together at the start " " and 4 of them at the end of the code " " and... that key is the shit tilda key just below the esc key. Put 4 of them sidebyside

2 Answers

Hi Jermaine,

You have to url encode the vertical bar | that is in the google fonts url.

Replace with %7C