Quick answer

A URL fragment is the part after #. It usually points to a section or state within a resource, such as #examples in a page address.

Original example

Link to two sections on one page

https://example.com/guide#start and https://example.com/guide#examples request the same guide from the server, then identify different sections for the browser to show.

What happens to the fragment

The fragment is interpreted by the client, such as a web browser. It is not included in the HTTP request sent to the server for the resource.

On an HTML page, a fragment often matches an element ID. Applications may also use it for client-side state, so its exact meaning depends on the resource and software handling it.

Common misunderstandings

  • The # character starts the fragment; it is not part of the fragment value itself in every API view.
  • A fragment is not sent as an ordinary server query parameter.

Related answers

Sources

This is an unreviewed preview draft. Corrections can be sent after the owner configures a verified contact address.