Precision Linking

People sometimes ask me, “How do I link to this part of a page, or this paragraph?”  This is useful when you want to direct people to a certain part of a web page or you want to cite from a particular passage of a long post.

The NYTimes has created a sophisticated tool called Emphasis to solve this problem.  If you go to a NYTimes news post and hit the Shift key twice, you’ll expose small paragraph links at the head of each paragraph.  You can fine-tune these links by selecting individual sentences within each paragraph.  The url will change to link directly to that sentence or paragraph:

Amazingly, the NYTimes has open-sourced the code for Emphasis.  I’d be happy to fit this code to our blogs if our editors feel it’ll be useful.  My only hesitation is that adding another js library to our sites would need a thorough round of testing to make sure that it is not conflicting with any of our other libraries.

In the meantime, the easiest way to link to a particular spot in one of our posts, is to edit that post and put an anchor tag at the place where you want to link to, such as this one:

<a name="plink"></a>

Then you can link to that spot on the page like this:

Here’s an example of linking directly to the image of this post.  The text “plink” is arbitrary and can be set to anything.

One Response to “Precision Linking”

  1. Elizabeth Green Says:

    Let’s do it!! I see no reason not to.