Copy link to clipboard
Copied
w3c validator (on text input) inserts <html lang=''><!DOCTYPE html> following the <!DOCTYPE html> that already exists in page source.
Also shows a non-existent </style> tag after </html> that is not in page source.
How is it that code appears as error when no such code exists in page source?
Error on Google Analytics expected as site source on a local server.
FF Dev shows no console errors aside from google code.
=====Actual page source======
<!DOCTYPE html>
<html lang-‘en’>
<head>
============Validation Results==================
====Validation also shows/creates </style> tag after </html>========
</body>↩
</html>↩
</style>
========Actual page source code as follows============
</body>
</html>
Copy link to clipboard
Copied
Are you looking at source code on live server and validating with the online validation service?
The W3C Markup Validation Service
It's possible your web host is adding junk to the page without your knowledge. GoDaddy has started this recently with their OPT OUT analytics tracking.
Copy link to clipboard
Copied
Thanks, Nancy.
As this was a single instance event, I rebuilt the page. It's likely I added a character space or some other inadvertent fumble of the fingers,
Thanks for your time.
Copy link to clipboard
Copied
It is impossible to give you an accurate answer unless you post a link to your actual page... putting snippets of code in a forum post is rarely effective in permitting a proper analysis. Is your page available to view online?
Copy link to clipboard
Copied
Thanks for your response, Al.
Only posted a snippet in order to focus on my primary question: "How the extra code (which was not on page source) just appears in the validation result.
That really piqued my curiosity, but not enough to spend a lot of time on it. Easier to just rebuild a single page.
Thanks for your time.
w3c validator (on text input) inserts <html lang=''><!DOCTYPE html> following the <!DOCTYPE html> that already exists in page source.
Also shows a non-existent </style> tag after </html> that is not in page source.