In your 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: Having 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 <h:...>
tags is given in http://java.sun.com/jsf/html
.
In short:
If you're only serving documention purely in HTML5 format, use the default:
<!DOCTYPE html>
<html>
<!-- sua página -->
</html>
But if you want to serve documents with XHTML5 format, then you need to include the xmlns
attribute in the html tag:
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<!-- sua página -->
</html>
Differences between HTLM5 and HTML4 en can be useful.