In his example, xmlns="http://www.w3.org/1999/xhtml"
indicates that the syntax used in the document is actually XHTML5 and not HTML5.
The following lines create several namespaces XML, used to define your own tags. Example: taking xmlns:h="http://java.sun.com/jsf/html"
you could have tags in your document as follows:
<h:pessoa>
<h:nome>NOME</h:nome>
<h:idade>IDADE</h:idade>
</h:pessoa>
where the definition of tags <h:...>
is given in http://java.sun.com/jsf/html
.
In short:
If you are serving only documents purely in format HTML5, use the pattern:
<!DOCTYPE html>
<html>
<!-- sua página -->
</html>
But if you want to serve documents with format XHTML5, then it is necessary to include the attribute xmlns
in the html tag:
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<!-- sua página -->
</html>
The differences between HTLM5 and HTML4en may be useful.