What would be your take on Doctype version detection. One solution comes to mind – feature detection, but is that the correct way to go? What I need in particular is to know wether the document is HTML4, XHTML (don't need the version) or HTML5.
Ideas?