1
I noticed in the HTML5 documentation that the use of the attribute is still allowed xmlns
in the root element (tag) html
. This attribute, according to my study, gives a "qualified unique name" to the element associating to the namespace (value of the attribute), not only for it, but for all its other child elements that do not possess another statement of the attribute xmlns
different. It doesn’t matter if the attribute has a present prefix (xmlns:prefixo="url"
) or not (xmlns="url"
). Remember that the address used to identify the namespace, is not used by parser to seek information. The sole purpose is to give the namespace a "qualified unique name". Phew! Question: Should we still use prefixes in HTML5 elements (tags)? Is there a real example of usage in HTML5? It seems to me that it still exists because of the natural process of transition between languages, or else it wouldn’t even be there anymore, is it true? Thank you!
<!DOCTYPE html>
<html xmlns:book="http://www.book.com">
<book:head>
...
</book:head>
<book:body>
<book:h1>Title</book:h1>
...
</book:body>
</html>
@Bacco :) This is different: here the focus is on the use of prefixes in HTML5 elements. Since xmlns is still allowed in HTML5 and its main goal is to qualify names in elements within a group of elements, there is an incentive to use prefixes in tags. I wanted to make sure that this is it and when I really need to use the prefixes. Thank you!
– Ingrid Farabulini