"Converting" XHTML 1.0 Strict to HTML5

Jack picture Jack · Jun 26, 2010 · Viewed 18.6k times · Source

OK folks,

So I have a valid XHTML 1.0 Strict webpage. I'm aware of the differences between XHTML and HTML, but, what are the differences between XHTML and HTML 5?

Would a 'conversion' be as easy as changing the Doctype, and it would all still validate OK?

Or, are there markup differences that would need to be changed first?

Thanks!

Jack

Answer

Andrew picture Andrew · Apr 15, 2014

To summarize this post and this post...

All you need to do to start taking advantage of the benefits of HTML5 is to convert your doctype from XHTML to HTML5. HTML5 is compatible with XHTML.

If you want to introduce new HTML5 tags, you will also want to add a polyfill like Modernizr so that Internet Explorer can figure out how to render the new HTML5 elements.