XML is useful for exchange of documents. A finite number of element type names is available to use to contain the document content. In a global Web, how do we handle the possibility of two element type names being the same? The solution that the W3C chose is namespaces.
A namespace is a collection of names. In XML, a namespace refers to a collection of element type names and attribute names.
So, exactly why do we need namespaces? You might have document fragments such as the following:
<html> <head> <title>My XHTML document</title> </head> <body>Some content.</body> </html>