Changes in HTML 5 - <html> Tag
What's new in HTML 5
In addition to the xmlns
attribute for the HTML namespace, the <html> tag may specify prefixes for other element namespaces, such as for SVG tags or MathML tags.
The manifest attribute has been added.
Differences between HTML 5 and earlier versions of HTML
In the year 2000 the xmlns
attribute was introduced in Recommendations from the W3C HTML Working Group to specify the namespace of the HTML elements. However, many documents on the web are still coded without it and therefore may fall back to the older 1997 HTML version 4 standard, so going forward you should make sure that the <html> tag in any HTML pages include the xmlns
attribute.
For 2000 W3C HTML, HTML 5 and later, the <html> tag should be coded like this:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> ... </html>
In addition to being required by the 2000 W3C standard, specifying the namespace for the elements in the document using the xmlns
attribute allows the documents, or a subset of nodes in the document, to be aggregated with other content. If the namespace for the elements is not specified, a reader of a combined documents created by an aggregator will be unable to distinguish the elements in one namespace from those in another. This is the biggest limitation of RSS 0.92 version 2.0 although RSS version 1.0 does use namespaces to solve the issue.
The following attributes should not be coded on the <html> tag because they either have been deprecated or were never officially supported:
version
- use thexmlns
attribute described above instead