Skip to content Skip to sidebar Skip to footer

Why Does The W3c Validator Not Take
I was trying to validate a simple HTML5 page, and it successfully validates everything except three instances of

Solution 1:

Those PHP tags should not show up in your markup. They'll be written in your code, but only your web server should see those -the page generated by your server will not have those tags visible.

I'm guessing you are copying your source and pasting into the validator? Try viewing the page in your browser instead (assuming you are running a local web server, like Wamp or Xampp), view source, and then copy and paste that code, instead of directly from your editor.

Solution 2:

<?php is not valid HTML in any dialect. An HTML parser should never see <?php tags, since they're evaluated on the server. As such, it's correct that the validator complains.

Solution 3:

<\?php include() ?> is PHP tag which needs to be rendered by PHP processor. It's not a valid HTML tag

Post a Comment for "Why Does The W3c Validator Not Take