Home : Technical Terms : Namespace Definition


A namespace is a group of related elements that each have a unique name or identifier. There are several different types of namespaces, and each one has a specific syntax used to define the corresponding elements. Each element within a namespace has a "local name" that serves as a unique identifier.

Namespaces are used in many areas of computing, such as domain names, file paths, and XML documents. Below are examples of these different applications.

  1. Domain Names - The namespace syntax for domain names is specified by the Domain Name System, or DNS. It includes the top-level domain, (e.g. "techterms.com") and a subdomain, such as "www." In the URL "www.techterms.com," the namespace identifier is "techterms.com," while the local name is "www."
  2. File Paths - File locations may be specified using a file path, which can include multiple directories. A file path, which uses syntax defined by the operating system, is considered a namespace. For example, C:\Program Files\Internet Explorer is the namespace that describes where Internet Explorer files on a Windows computer. The namespace /usr/local/apache/ defines the location of Apache files on a Unix-based web server. Individual filenames within these directories serve as unique identifiers.
  3. XML Documents - XML namespaces (XMLNS) are used to associate a document's element and attribute names with a namespace identified by an external URI. For example, an XML file may include HTML elements that are specified at "http://www.w3.org/1999/xhtml." This reference might appear as "<html:html xmlns:html='http://www.w3.org/1999/xhtml'>" near the top of the XML document.

The above examples are just a few types of namespaces used in computing. They are also used to define network devices and other types of computer hardware. Additionally, computer programmers often used namespaces to group related variables within the source code of a program. While there are many different types of namespaces, they all serve the same purpose — to contain a logical grouping of related elements.

Updated: April 25, 2013

Cite this definition:


TechTerms - The Tech Terms Computer Dictionary

This page contains a technical definition of Namespace. It explains in computing terminology what Namespace means and is one of many technical terms in the TechTerms dictionary.

All definitions on the TechTerms website are written to be technically accurate but also easy to understand. If you find this Namespace definition to be helpful, you can reference it using the citation links above. If you think a term should be updated or added to the TechTerms dictionary, please email TechTerms!

Subscribe to the TechTerms Newsletter to get featured terms and quizzes right in your inbox. You can choose to receive either a daily or weekly email.

Sign up for the free TechTerms Newsletter

How often would you like to receive an email?

You can unsubscribe at any time.
Questions? Please contact us.