How exactly declaring page doctype as HTML5 reduces the error in W3C markup validation
Posted on:I have a website which has got around 1000 pages. I declared all html doctype to use XHTML 1.0 strict
I checked the website pages using W3C markup validation tool, I got 320 errors, Then I changed the doctype to HTML 4.0 the errors reduced to 300.
Then I used the HTML5 doctype, Then errors got reduced to 75. So How these errors got reduced by just changing the doctype.
My Question is:
1) Validating my pages against XHTML1.0 standards gives me more than 300 errors, Which is quite huge and bit difficult to resolve them.
2) Validating my pages against HTML5 standards gives me around 70 errors, Which is not a issue and can resolve them easily.
So In this case which HTML version i have to use so that It does not affects SEO of the pages, Because w3c validation also affects the SEO
If i just use HTML5 doctype but not exactly the page structure (nav, header, section, footer, article ….), Will this really matters Because I have got around 1000 pages which is very difficult make them to follow the HTML5 page structure.
What i am thinking is to reduce the errors in w3c, I will just change the doctype to HTML5 and resolve the w3c errors. Is this a good idea. Or If any please suggest me.
Yes, change the doctype to HTML5 and resolve the w3c errors, this will be the good idea.
W3C validation doesn’t really improve the SEO of your site, what it does improve is accessibility and cross browser rendering issues. The HTML5 doctype causes fewer errors because it’s rules are less strict than XHTML. You can safely use the HTML5 doctype on your site, and you don’t need to replace everything with the new tags.
The Doctype elements makes it clear to the browser upfront at start that all the content on the document comform to the standards and specifications of HTML5 see the demo here http://www.tutorialspark.com/html5/HTML5_Basic_document.php