xmlns
namespace declarations in the <html> tag
How to declare namespaces in an HTML document
The easiest way to declare namespaces is by putting the xmlns
attributes in the top element of the XML document, which in this case is the <html> tag:
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:mathml="http://www.w3.org/1998/Math/MathML" xmlns:svg="http://www.w3.org/2000/svg" >
In HTML 5, all elements (HTML tags) are automatically considered to be qualified with the HTML 5 namespace, which makes the declaration of the HTML namespace optional, but this only works with HTML browsers with HTML 5 support that are parsing the web page as an HTML version 5 document. It's best to continue coding the xmlns="http://www.w3.org/1999/xhtml"
xmlns
attribute explicitly to provide backward compatibility with browsers lacking full HTML 5 support and other types of programs that may be processing HTML documents, such as RSS feed readers and generic XML parsers - otherwise all of the HTML tags will appear to be in the partition with no namespace URI.