W3C Validator issues

Hey guys, I’m trying to use the regular W3C Code Validator, and when I paste my code into the box and click ‘Check’ the validator seems to remove a large portion of my code and only checks a small amount. Tried it in a few different Browsers and not sure what’s causing it. Anyone else had a similar issue before or know of a solution?

@Doomdave, when I’ve seen that happen it’s because there’s an unrecoverable error. It usually tells you that and where/why.

It’s because you have FCC’s test script incorrectly placed.
Codepen only requires the code you’d put in the body element but you didn’t do that. You’ve added the html and body elements so the validator sees the script outside and it’s an unrecoverable error. The test script belongs right before the closing body tag.
If you followed codepen’s setup, you wouldn’t have to worry about where the test script was placed.

1 Like