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
You can write HTML5 with XHTML 1.0 syntax, since HTML5 permits XML syntax and it explicitly allows an XHTML 1.0 doctype as “legacy doctype” in the XHTML syntax.
XHTML 1.0 Transitional is the XML equivalent of HTML 4.01 Transitional, and includes the presentational elements (such as center , font and strike ) excluded from the strict version.
There is no strict rules on structure when using HTML, but you should follow strict structure rules in XHTML. If you are using HTML, then you can use upper case and lower case for tags and attributes However, in XHTML, tags and attributes are strictly lower case.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With