How to Link to a Specific Part Of A Webpage & Share it.
When you click on a URL, the browser opens it in a new tab and takes you to the top of the web page. But what if you want to navigate to a specific part of a web page. For example, a Wikipedia entry about Steve Jobs’ childhood, a separate post on Facebook, or a question on the Stack Exchange. This way, your audience doesn’t have to spend time navigating your site.
A link to a specific part of a webpage
1. Use your ID card
Let’s say you’re writing an article that links to a specific answer from StackOverflow. Unlike Reddit, StackOverflow doesn’t have a permalink, so you’ll have to manually edit the HTML.
Fortunately, most browsers have the ability to validate elements.
Just go to the answer you want to link to and right click in the area next to it. In the context menu, select the item “Check element”. It will show you HTML code, look for ID tag or Value parameter. Once you find it, copy it to your clipboard.
Then take the URL of the webpage and add #ID to the end.
For example, if the url of the page is http://stackoverflow.com/questions/214741/what-is-a-stackoverflowerror
and its id is 29279234, then the referral URL becomes – http://stackoverflow.com/questions/214741/what-is-a-stackoverflowerror#29279234
And when someone clicks on that link, they take them directly to that part of the page.
2. Chrome extension
In a recent Chrome update, Google Search now highlights the text you’re looking for on web pages to make it easier for the reader. Hence, for web developers, to make it easier to link to specific text on a web page, Google launched the Link to Text Fragment Chrome extension.
After installing the extension, you can create links to a specific part of the web page. Select a portion of the text on the web page, right-click and select Copy Link To Selected Text. It will generate a link and automatically copy it to the clipboard.
The extension is fairly new and has a couple of bugs. If the piece of text you selected contains a hyperlink or image, mostly a non-text element, it generates an error: “Unable to create a unique link, please select a longer sequence of words.” The error message is completely incorrect. The problem is that the extension doesn’t work if the selected text contains a hyperlink or non-text elements.
3. Facebook
To link to a specific post on popular sites like Facebook, Twitter or even Stack Exchange, etc., look for post timestamps. Once you find it, right click it and copy its url. Now if you paste the URL into a new tab, you will only see this message. This works for most websites using timestamps.
3. Wikipedia
If you link to a wiki page frequently, you can easily link a section by copying the link in the content section.