A fragment identifier is a short string of characters that refers to a resource that is subordinate to another, primary resource. The primary resource is identified by a Uniform Resource Identifier (URI), and the fragment identifier points to the subordinate resource. Typically, the fragment identifier is appended to the Uniform Resource Locator (URL —a type of URI) for a hypertext document and is meant to identify a portion of that document. In various branches of mathematics and computer science, strings are sequences of various simple objects (symbols, tokens, characters, etc. ... A resource is anything that has identity. ... A Uniform Resource Identifier (URI), is an Internet protocol element consisting of a short string of characters that conform to a certain syntax. ... A Uniform Resource Locator, URL (either pronounced as earl — IPA: (American) or (British) — or spelled out), or Web address, is a standardized address for some resource (such as a document or image) on the Internet (or elsewhere). ... In computing, hypertext is a user interface paradigm for displaying documents which contain automated cross-references to other documents called hyperlinks. ...
A fragment identifier is defined by RFC 3986 as an optional component of a URI reference, and it must conform to a certain syntax. The syntax requires that the fragment identifier be separated from the rest of the URI reference by a # (number sign) character. The separator is not considered part of the fragment identifier. Number sign is the Unicode preferred name for the glyph or symbol #. The name was chosen from serveral used in the United States and Canada. ...
Examples
In HTML applications, http://www.foobar.org/schmoo.html#tag1 will refer to the element containing the "anchor" attribute name="tag1" in the document named "http://www.foobar.org/schmoo.html". It does not matter if the document is actually accessible at that location on the Internet.
In XML applications, http://www.foobar.org/schmoo.xml#xpointer(//Rube) should employ an XPointer, returning all XML elements named "Rube" from the document named "http://www.foobar.org/schmoo.xml". It does not matter if the document is actually accessible at that location on the Internet.
A Uniform Resource Locator (URL) is a URI that, in addition to identifying a resource, provides a means of acting upon or obtaining a representation of the resource by describing its primary access mechanism or network "location".
An optional fragmentidentifier, preceded by "#", may be present at the end of a URI reference.
If a fragmentidentifier is present in the URI reference, it is preserved during the merging process.