Is there any way to bookmark or link to a section of a page without an anchor?

前端 未结 6 1567
情话喂你
情话喂你 2020-12-01 06:29

Is there any way to bookmark or link to an HTML page (which I am not author of) without having an anchor in the html code ?

I want the page to get scrolled down to a

6条回答
  •  情话喂你
    2020-12-01 07:01

    There is a relatively recent W3C Working Group Note on Selectors and States which would allow linking to selected text.

    Here is a Firefox webextension partially implementing the link format (allowing you to "create" a link, based on the selection, as well as, obviously, open such a link, highlighting the correct selection):

    https://addons.mozilla.org/en-US/firefox/addon/precise-links/

    As of 2019 it seems to work fine.

    Its source code is available here.

提交回复
热议问题