Skip to content

What is Name Space in xhtml??

Manindu Manaka edited this page May 7, 2024 · 1 revision

In XHTML, a namespace is a way to avoid naming conflicts by allowing elements and attributes from different specifications or vocabularies to coexist within the same document. Namespaces are declared using the xmlns attribute in the root element of the document, typically <html>. This declaration defines a unique identifier for each namespace used in the document. Namespaces enable XHTML documents to incorporate elements and attributes from various sources, such as XHTML itself, SVG, MathML, or custom namespaces defined by the author. They promote interoperability and extensibility by ensuring that elements with the same name but from different namespaces are recognized and processed correctly.

Back