Hyperlink to a specific text in a webpage
Solution 1:
If you use Chrome (or Edge) as your browser, you could try Link to text Fragment. It's a:
Browser extension that allows for linking to arbitrary text on a page.
This extension allows for easily creating a special link to the currently selected text on a page via the context menu. When opening such a special link, a compatible browser will scroll the selected text into view and highlight it.
Here is the link to "C Thread Termination Example". I highlighted the whole paragraph, but I could have just highlighted the its title. Another link from the same page.
Here are the instructions on how to use it:
- Select the text that you want to link to.
- Right-click and choose "Copy Link to Selected Text" from the context menu.
- If the link creation succeeded, the selected text will be briefly highlighted in yellow.
- Paste your link wherever you want to share it.
- 💡 Pro-tip: use a keyboard shortcut (by default: Command+Shift+L or Ctrl+Shift+L).
Note: I have tested with more browsers, at times after clicking the links the paragrah that should be highlighted is not shown. Pressing Enter on the address bar, then shows it.
Disclaimer: I am just a user of the extension.