Anchor Links | How to Use Them and Why They Help

Christopher Lin

anchor links

Anchor links are links that take you to a separate section of the same web page.  They can be useful to help your readers find what they need quickly in the “table of contents” at the top of a page or the beginning of an article.  In addition to the user experience improvement, anchor links are also believed by some SEO professionals to have an indirect positive impact on search rankings.  In this article, we’ll quickly review how to use anchor links so that you can implement this on your blog, whether you’re writing for your own photography blog or contributing to a website such as SLR Lounge.

Anchor Link Example

The easiest way to explain an anchor link is to show you exactly what it does.  In many articles on our website, you’ll notice that directly after the first paragraph, we create a bullet point list of topics that we will cover in the article and link each of those bullet points to the section of the page containing the information.  Let’s do that now for this article.  In this article, we’ll review the following:

Notice how each of the links above take you to the section of this page that contains the corresponding information.

How to create a link to an anchor on same page

To link to a section of the same page, first, create the link you want to link from with the following code:

<a href=”#example”>Example Text</a>

Next, markup the section of the page where you want that link to take the user.  In our case, we use the headers, so we would use the following:

<h2 id=”example”>Example Header</h2>

Alternatively, you can use the following code:

<h2><a id=”example”></a>Example Header</h2>

When the user clicks the “example text” link, they will be taken to the “Example Header.”

How to create a link to an anchor on another page

Sometimes you may want to link to a specific section of another page on your own website or another website.  To do this, you simply do the following:

<a href=”https://www.examplewebsite.com/example-web-page#example”>Example Text</a>

The code will create this link to the section labeled with the id #example on the page https://www.examplewebsite.com/example-web-page

Just make sure the page that https://www.examplewebsite.com/example-web-page has a section with the id #example.  Otherwise the link will simply take the user to the top of the page https://www.examplewebsite.com/example-web-page.

Conclusion

Although SLR Lounge is a photography website, we include tips and tricks that related to better blogging and better website experiences to help you grow your businesses.  You may also be interested in the following related article:  Why Photography Blogging Is Overrated and Better Alternatives for Photographers.

 

Christopher Lin

Chris Lin is the co-founder and CEO of SLR Lounge and Lin & Jirsa Photography. A former CPA who transitioned into photography during the 2008 recession, Chris brings a unique combination of business acumen and creative experience to his work overseeing SLR Lounge's direction, content, and partnerships. Based in Southern California.

More articles by Christopher Lin →

RELATED POSTS

jewelry photography wedding ring feature

Jewelry Photography Tips and Ideas

August 27, 2026

Of all the niches that fall under the umbrella of product photography, jewelry photography...

Urban Wedding Photography: 8 Tips for Shooting City and Skyline Venues

August 26, 2026

City venues hand you a background most photographers would pay for, and...

How to Fix a RAW SD Card – A Data First Guide for Photographers

August 26, 2026

Whether you shoot with a camera, cinema rig, or drone, an SD...

cloudy day photography rainy cloud backdrop

Cloudy Day Photography | How to Get Great Pictures with Overcast Skies

August 24, 2026

If you didn't know better, you might consider cloudy weather and overcast skies a...