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 Debugging HTML and CSS Problems Continue Learning

W3C Validator Errors

I entered my index.html code into the W3C validator and got a bunch of errors that Nick did not get:

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 /Users/thania/Desktop/Web Development Exercises/css/normalize.css for attribute href on element link: Illegal character in path segment: space is not allowed. From line 6, column 3; to line 6, column 98 /title>↩ <link rel="stylesheet" href="/Users/thania/Desktop/Web Development Exercises/css/normalize.css">↩ <li 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.

Error: 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: | is not allowed. From line 7, column 3; to line 7, column 140 e.css">↩ <link href='http://fonts.googleapis.com/css?family=Changa+One|Open+Sans:400italic,700italic,400,700,800' rel='stylesheet' type='text/css'>↩ <li 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.

Error: Bad value /Users/thania/Desktop/Web Development Exercises/css/main.css for attribute href on element link: Illegal character in path segment: space is not allowed. From line 8, column 3; to line 8, column 93 t/css'>↩ <link rel="stylesheet" href="/Users/thania/Desktop/Web Development Exercises/css/main.css">↩ <li 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.

Error: Bad value /Users/thania/Desktop/Web Development Exercises/css/responsive.css for attribute href on element link: Illegal character in path segment: space is not allowed. From line 9, column 3; to line 9, column 99 n.css">↩ <link rel="stylesheet" href="/Users/thania/Desktop/Web Development Exercises/css/responsive.css">↩ <me 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.

Error: Bad value /Users/thania/Desktop/Web Development Exercises/img/numbers-01.jpg for attribute href on element a: Illegal character in path segment: space is not allowed. From line 30, column 11; to line 30, column 87 <a href="/Users/thania/Desktop/Web Development Exercises/img/numbers-01.jpg">↩
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.

Error: Bad value /Users/thania/Desktop/Web Development Exercises/img/numbers-01.jpg for attribute src on element img: Illegal character in path segment: space is not allowed. From line 31, column 15; to line 31, column 99 <img src="/Users/thania/Desktop/Web Development Exercises/img/numbers-01.jpg" alt="">↩
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.

Error: Bad value /Users/thania/Desktop/Web Development Exercises/img/numbers-02.jpg for attribute href on element a: Illegal character in path segment: space is not allowed. From line 36, column 11; to line 36, column 87 <a href="/Users/thania/Desktop/Web Development Exercises/img/numbers-02.jpg">↩
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.

Error: Bad value /Users/thania/Desktop/Web Development Exercises/img/numbers-02.jpg for attribute src on element img: Illegal character in path segment: space is not allowed. From line 37, column 15; to line 37, column 99 <img src="/Users/thania/Desktop/Web Development Exercises/img/numbers-02.jpg" alt="">↩
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.

Error: Bad value /Users/thania/Desktop/Web Development Exercises/img/numbers-06.jpg for attribute href on element a: Illegal character in path segment: space is not allowed. From line 42, column 11; to line 42, column 87 <a href="/Users/thania/Desktop/Web Development Exercises/img/numbers-06.jpg">↩
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.

Error: Bad value /Users/thania/Desktop/Web Development Exercises/img/numbers-06.jpg for attribute src on element img: Illegal character in path segment: space is not allowed. From line 43, column 15; to line 43, column 99 <img src="/Users/thania/Desktop/Web Development Exercises/img/numbers-06.jpg" alt="">↩
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.

Error: Bad value /Users/thania/Desktop/Web Development Exercises/img/numbers-09.jpg for attribute href on element a: Illegal character in path segment: space is not allowed. From line 48, column 11; to line 48, column 87 <a href="/Users/thania/Desktop/Web Development Exercises/img/numbers-09.jpg">↩
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.

Error: Bad value /Users/thania/Desktop/Web Development Exercises/img/numbers-09.jpg for attribute src on element img: Illegal character in path segment: space is not allowed. From line 49, column 15; to line 49, column 99 <img src="/Users/thania/Desktop/Web Development Exercises/img/numbers-09.jpg" alt="">↩
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.

Error: Bad value /Users/thania/Desktop/Web Development Exercises/img/numbers-12.jpg for attribute href on element a: Illegal character in path segment: space is not allowed. From line 54, column 11; to line 54, column 87 <a href="/Users/thania/Desktop/Web Development Exercises/img/numbers-12.jpg">↩
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.

Error: Bad value /Users/thania/Desktop/Web Development Exercises/img/numbers-12.jpg for attribute src on element img: Illegal character in path segment: space is not allowed. From line 55, column 15; to line 55, column 99 <img src="/Users/thania/Desktop/Web Development Exercises/img/numbers-12.jpg" alt="">↩
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 27, column 5; to line 27, column 13 per">↩ <section>↩

Error: Bad value /Users/thania/Desktop/Web Development Exercises/img/twitter-wrap.png for attribute src on element img: Illegal character in path segment: space is not allowed. From line 62, column 51; to line 62, column 169 abrahams"><img src="/Users/thania/Desktop/Web Development Exercises/img/twitter-wrap.png" alt="Twitter logo" class="social-icon"></a>↩ 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.

Error: Bad value /Users/thania/Desktop/Web Development Exercises/img/facebook-wrap.png for attribute src on element img: Illegal character in path segment: space is not allowed. From line 63, column 46; to line 63, column 166 tye_1509"><img src="/Users/thania/Desktop/Web Development Exercises/img/facebook-wrap.png" alt="Facebook logo" class="social-icon"></a>↩ 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.

Do I need to be worried about any of these? Also, how do I correct the spaces? Or correct when the font stylesheet itsel came with "|"?

1 Answer

John Coolidge
John Coolidge
12,614 Points

I got similar errors when doing this project some time ago. Since then I've built a couple of websites and put them on the internet live with no issues.

The pipe character is supplied by the link from Google fonts so don't worry about that.

Spaces in a web address exist but you don't see them as spaces. They are, as the error says, shown by the use of %20. If you have typed in a physical space on a link then that is a problem. If you haven't used any spaces, then don't worry about the error message.

Finally, the bad value for your attribute source is because you are running this website locally on your own machine. When you make a live website, your source will be the server you've hosted your website on and this error will go away.

Admittedly, I know less about this than I should and so others might have better or more complete answers.

I hope this helps,

John