Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions files/en-us/web/uri/reference/fragment/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ spec-urls: https://www.rfc-editor.org/rfc/rfc3986.html#section-3.5
sidebar: urlsidebar
---

The **fragment** of a URI is the last part of the URI, starting with the `#` character. It is used to identify a specific part of the resource, such as a section of a document or a position in a video. The fragment is not sent to the server when the URI is requested, but it is processed by the client (such as the browser) after the resource is retrieved.
The **fragment** of a URI is the last part of the URI, starting with the `#` character. It is used to identify a specific part of the resource, such as a section of a document or a position in a video. The fragment is not sent to the server when the URI is requested; it is processed by the client (e.g., the browser) after the resource is retrieved.

## Syntax

Expand All @@ -27,8 +27,8 @@ Consider the following URL:
http://www.example.com:80/path/to/myfile.html?key1=value1&key2=value2#SomewhereInTheDocument
```

`#SomewhereInTheDocument` is the _fragment_ of the URL, which is an anchor to another part of the resource itself. An anchor represents a sort of "bookmark" inside the resource, giving the browser the directions to show the content located at that spot. In an HTML document, for example, the browser will scroll to the point where the anchor is defined. It can be the [`id`](/en-US/docs/Web/HTML/Reference/Global_attributes/id) attribute of an element, and the browser will scroll to that element
In a video or audio document, it can be a [media fragment](https://www.w3.org/TR/media-frags/) in the form of `#t=...`, which makes the video or audio start playing from that time.
`#SomewhereInTheDocument` is the _fragment_ of the URL, which is an anchor to another part of the resource itself. An anchor represents a sort of "bookmark" inside the resource, giving the browser the directions to show the content located at that spot. In an HTML document, for example, the browser will scroll to the point where the anchor is defined. It can be the [`id`](/en-US/docs/Web/HTML/Reference/Global_attributes/id) attribute of an element, and the browser will scroll to that element.
In a video or audio document, it can be a [media fragment](/en-US/docs/Web/URI/Reference/Fragment/Media_fragments) in the form of `#t=...`, which makes the video or audio start playing from that time.

There's a special [text fragment](/en-US/docs/Web/URI/Reference/Fragment/Text_fragments) feature that allows you to link to a specific part of a web page identified by its text content.

Expand Down
Loading