No Namespaces in HTML5

by Stephen Fluin 2010.03.17

When writing earlier versions of HTML, it was appropriate to specify any extra namespaces as attributes in the html tag. In HTML5, there are no longer traditional namespaces. Instead, standard namespaces such as SVG are automatically recognized in the children tags of an SVG element. This means that if you had a facebook connect integration on your site, with a namespace declaration:

<html lang="en" xmlns:fb="http://www.facebook.com/2008/fbml">

You should replace this line with:

<html lang="en">

This change will help your HTML5 to validate, and shouldn't affect the functionality of your webpage, unless you are doing something unusual such as having integration with non-browser XML parsers that need the namespace declarations.


permalink