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

Chinthaka Senanayake
seal-mask
.a{fill-rule:evenodd;}techdegree
Chinthaka Senanayake
Front End Web Development Techdegree Student 8,813 Points

Project passes through W3C validator, but reviewer finds an error

Hello! I recently submitted a project after running it through the linked W3C HTML validator as well as the W3C CSS validator and both showed no errors.

I just got my review results back though, and they've claimed the following


Unfortunately, there is an error when running the html through the validator. :

"Error: The character encoding was not declared. Proceeding using windows-1252."

No errors in the CSS. If you fix this, it will be perfect.

I ran it through the validators again and I'm not getting this error. :-/

Is my reviewer using some other validator than the one linked in the project description or what am I doing wrong?

3 Answers

Matthew Long
Matthew Long
28,407 Points

The validator you used probably guessed what character encoding was being used. Where your reviewers did not guess correctly. If you add the following in your <head> tag you should be fine:

<meta charset="UTF-8">

This is based off what your reviewer said.

Chinthaka Senanayake
seal-mask
.a{fill-rule:evenodd;}techdegree
Chinthaka Senanayake
Front End Web Development Techdegree Student 8,813 Points

Thank you so much! I've added that line and am now resubmitting.

This should really be taught in the early parts of the course or at the very least the reviewers should be using the same validator that is linked in the project description. That line wasn't in any of my previous projects and there wasn't a problem. I hope this "Needs work" doesn't go against my final results!

Thanks again Matthew! Much appreciated

HIDAYATULLAH ARGHANDABI
HIDAYATULLAH ARGHANDABI
21,058 Points

it is better to just copy your codes and past in W3 web consortium that can be very helpful .