html - How exactly declaring page doctype as HTML5 reduces the error in W3C markup validation -


i have website has got around 1000 pages. declared html doctype use xhtml 1.0 strict

i checked website pages using w3c markup validation tool, got 320 errors, changed doctype html 4.0 errors reduced 300.

then used html5 doctype, errors got reduced 75. how these errors got reduced changing doctype.

edit

my question is:

1) validating pages against xhtml1.0 standards gives me more 300 errors, quite huge , bit difficult resolve them.

2) validating pages against html5 standards gives me around 70 errors, not issue , can resolve them easily.

so in case html version have use not affects seo of pages, because w3c validation affects seo

if use html5 doctype not page structure (nav, header, section, footer, article ....), matters because have got around 1000 pages difficult make them follow html5 page structure.

what thinking reduce errors in w3c, change doctype html5 , resolve w3c errors. idea. or if please suggest me.

as @quentin says, there many differences between xhtml 1.0 strict , html5. apart new tags, there other significative differences, examples:

1 - xhtml tags , attributes should written in lower case.

  • is there uppercase tags or attributes in code?

2 - in xhtml, when use singleton tag <br/> required include trailing slash in element valid xhtml. in html 5, trailing slash optional.

  • have self-closing singleton tags?

3 - xhtml attribute values must quoted. in html5, don’t need place quotation marks around attribute values if there no spaces.

  • are attribute values quoted?

4 - xhtml tags must nested properly.

  • is case?

5 - html5 <meta> tag charset attribute simpler in xhtml: <meta charset=utf-8>

  • if you're using tag document fails in xhtml

6 - there’s no need include type attribute style sheet links , scripts.

  • if didn't declare attribute, document fails in xhtml

these few examples of how different can validation changing doctype. check these points see if there case.

you can retrieve info here: baby steps xhtml html5

i change doctype html5 , resolve w3c errors. idea?

well, html5 more "easier" construct, because more flexible, decision must decide before start making website. suggest read w3c specifications xhtml 1.0 , html5 specifications, , decide language fits better requirements , how code have valid markup.


Comments