September 1, 201016 yr Hey, I recently tested my code with the W3C validator. I got a few errors, but I've managed to fix them all bar two. I was wondering if someone could point out where I'm going wrong with these simple errors. I'm sure they're not hard to fix, but I don't really understand the FAQ it supplies for these two specific errors: Here are the errors: [using 4.01 transitional] ------------------------------------------------------------------------------------------------------------------------------- Line 181, Column 49: end tag for element "DIV" which is not open echo '<div id="dark" class="transparent"></div>'; The Validator found an end tag for the above element, but that element is not currently open. This is often caused by a leftover end tag from an element that was removed during editing, or by an implicitly closed element (if you have an error related to an element being used where it is not allowed, this is almost certainly the case). In the latter case this error will disappear as soon as you fix the original problem. ------------------------------------------------------------------------------------------------------------------------------- Line 181, Column 50: character data is not allowed here echo '<div id="dark" class="transparent"></div>'; You have used character data somewhere it is not permitted to appear. Mistakes that can cause this error include: putting text directly in the body of the document without wrapping it in a container element (such as a <p>aragraph</p>), or forgetting to quote an attribute value (where characters such as "%" and "/" are common, but cannot appear without surrounding quotes), or ------------------------------------------------------------------------------------------------------------------------------- Like I say I understand what the erorrs are telling me, but a bit confused how to fix them, I can't see why it's not saying the DIV not open...anyone mind pointing out how to fix these? Thanks alot.
September 1, 201016 yr It looks like you're trying to validate php code. You need to open the page with your php server running, take the source code and validate that
September 1, 201016 yr Author Thanks for the help, managed to get rid of the two erorrs. Thanks for all the help +1
Create an account or sign in to comment