Thursday, September 4

HTML5 DOCTYPE

The DOCTYPE is an important signal to browsers and allows them to interpret the content of a document in the context of the rules associated with the doucment type. If this is omitted the browser will revert to its tradition rule set and the may produce very different results from one browser to another or even one version to another.

There is typically no version number attached to HTML in the DOCTYPE. There is also no Document Type Definition (DTD) defining the rules of the markup language. The reason for this is that HTML5 is not based on SGML like earlier version of HTML.

Although HTML5 is not based on any other standard, it is possible to write HTML5 in XML serialisation mode. The following would be the skeletion for a HTML5 page inat serializes to XML:



   






HTML documents that utilize XML mode should have a document type of application/xhtml+xml

No comments: