Text Fragment

An explanation of text fragments in web pages

Text fragments offer a way to direct to a specific spot in an HTML file.

The documentation from MDM is here.

Anchor <a> tags in their href can redirect to an element's id using a hash like so.

<a href="#os.environ">hello</a>

This is an example taken from pydocs.

The fragment is captured in the url like so.

https://docs.python.org/3/library/os.html#os.environ

Known Issues

Some browsers support the ability to create fragments based on a selection of text.

However Firefox does not support this and the feature is prone to browser compatability issues in general.