After hearing so much about HTML5, I decided to take the plunge and create a website using it yesterday. Surprisingly, everything looked fine on Chrome and my desktop PC, as well as on notebooks and netbooks. However, when I tested it on a Samsung S4 using Chrome and Opera for Android, the website looked terrible.
Feeling frustrated, I switched the doctype from HTML5 to 4.1 strict and re-uploaded the website. To my surprise, the site started looking good again on Chrome and an older version of Opera (not the new mini).
Now come the questions:
How is it possible that a website built with HTML5 is not recognized by certain browsers with its specified doctype, yet switching to an older doctype makes it work?
What would be your recommendation for the doctype in this case to ensure multi-browser compatibility, given that HTML5 is still not fully supported by all browsers?
Lastly, remember how I mentioned that my website was looking bad due to the doctype issue yesterday? Well, today the same page with the HTML doctype is suddenly working fine on Chrome for Android again. Could it be related to caching from the copy I uploaded while using the 4.1 strict doctype?
And here is the doctype I am currently using:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">