Fragments

Often, only part of the file identified by the URL is required. It is therefore possible to supply further information, which is appended to the URL but is not formally part of it (but is part of the specification provided by RFC 2396). This is known as a fragment identifier. In HTML, the fragment identifier, '#', usually refers to the value of the Name attribute in an Anchor element:

...<A HREF="../myfiles/detail.xml#part3">
See details, part 3</A>...
...
<H2><A NAME="part3">Part Three</A></H2>
...

A Web browser first separates the fragment from the true URL, retrieves the file using the URL, then uses the fragment name to scroll to the desired part of the document.

When a URL reference consists of nothing but a fragment identifier, ...

Get XML Companion, The, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.