• Skip to primary navigation
  • Skip to main content
  • Freebies
    • Pinterest Dashboard
    • Start a Blog Guide
    • Start Checklist
  • Planner
  • Blogging Tips
  • Pinterest Tips
  • Start a Blog
  • Login
  • Kristie Hill

How to Create a link to a different section within a blog post

November 4, 2014

Have you ever wanted to link to a different section within your own blog post?

I actually always forget how to create links to different sections within my posts. I leave the code up on my desktop so that I can quickly refer back to it. Now I can clean off my desktop and just refer to this post, and so can you!

How to create links to different sections within a blog post

I like using links to different sections within my posts for a few reasons:

To create an index or outline for long posts.
I frequently list what will be discussed within the post at the beginning and create links so that my readers can jump down to the section they are most interested in. An example is my post on how to write a WordPress blog post

To direct people to a specific part of a post.
It’s a great feature to use if you have long posts or you discuss different elements within a post. For example: you might have a story along with a recipe you are sharing. At the beginning of the post you could put a link that says, skip to the recipe. When readers click that link, it automatically scrolls down to the recipe.

I also utilize this when sharing on social media if I want to refer someone to a specific part of the article

How to code links to jump within a post

There are two parts to creating a link to a different section within a post: the link itself and the id. The id is telling the link where to go within the post.

Here is an example:
The link.

<a href=”https://kristiehill.com/write-wordpress-post/#content”>How to write captivating content</a>

The id:

<h2 id=”content”>Add a new WordPress post</h2>

The result:
How to write captivating content
(Try it out! When you click it you are not taken to the blog post, but to a section in the middle of the article.)

The text behind the hash tag of the URL needs to be identical to the text within the quotation marks of the id. The example above adds the id to a heading tag. You can add the id to any code; use a section of bold text or even an image.

Let’s break down the code for the URL:

  1. Your domain name: http://yourblog.com
  2. Add the post slug: http://yourblog.com/blog-post
  3. Add a tag: http://yourblog.com/blog-post/#tag

The link is usually placed at the top of a blog post, and the id is placed where you want the reader to jump to within the post.

How do you plan on using links to different sections within a page or post?

FacebookTweetPinShares30

Filed Under: CSS and HTML Tutorials Conversation: 38 Comments

Save to Pinterest!

Reader Interactions

Comments

  1. Nancy says

    October 20, 2018 at 5:32 am

    Thanks so much for the detailed insight. I am going to start following this.
    Nancy
    My Everyday Challenges

    Reply
  2. Varun Gera says

    June 19, 2018 at 1:55 pm

    Hello KRISTIE! Thanks for writing this, I found this helpful! Will you go a little bit deep to help me – what to write in b/w the id (Add a new WordPress post)?
    Add a new WordPress post
    Thanks!

    Reply
  3. Shubhanker Gupta says

    June 1, 2018 at 2:15 am

    How to do the same in blogger ?

    Reply
  4. Xiaomi note 5a prime says

    October 4, 2017 at 9:23 pm

    This is the best blog about blogging

    Reply
    • Kristie Hill says

      March 12, 2018 at 6:25 am

      thanks!

      Reply
  5. amit chavan says

    September 13, 2017 at 5:50 am

    I like ur articles basically the way u present it Its very interesting n useful

    Reply
  6. Maria says

    September 11, 2017 at 3:42 am

    No doubt this share Is effective. Thank’s @Kristie Hill

    Reply
  7. Luci says

    September 10, 2017 at 10:00 pm

    Finally find out my solution !! Thank’s @Kristie Hill

    Reply
  8. eclipsion says

    September 4, 2017 at 1:55 pm

    So you never left any directions like “put this here, now paste this here” – you just gave the code. And that’s nice, I’m glad I have the code, but nothing is working for me (I’m using blogspot). Could you tell me what I should actually do?

    It would also be helpful if you edited your post and included that so I wouldn’t have to go to the comments section for a tutorial πŸ˜‰

    Thank you.

    Reply
    • Kristie Hill says

      September 6, 2017 at 6:41 am

      Sorry the tutorial wasn’t clear for you. I’ll think of a way to update it and get back to you. I didn’t include where to paste it, because there isn’t a set place. You can use the link inside the post or just share it in an email. And the ID is placed wherever you want the link to jump to. I’ll work on re-writing the tutorial for you.

      Reply
      • Cassandre says

        November 24, 2019 at 2:03 pm

        you should do a video explaining…i don’t understand any of this

        Reply
        • Kristie Hill says

          November 26, 2019 at 11:31 am

          I’ll work on that and see if I can help you out. Actually, this whole post needs updated because it is WAY easier now. WordPress has made some changes.

          Reply
  9. rajesh says

    July 17, 2017 at 8:20 am

    hey Kristie Hill can I use this method on my website happy diwali images 2017
    Please reply this comment.

    Reply
    • Kristie Hill says

      July 18, 2017 at 7:06 am

      Yes.

      Reply
  10. Latiful Mousom says

    June 12, 2017 at 7:40 pm

    Hi, Kristie Hill
    Thanks for the article. Keep the good work. I will try it on my site http://happydiwaliimages.in

    Again. Big thanks for your help.

    Reply
    • Kristie Hill says

      June 13, 2017 at 8:05 am

      You’re welcome!

      Reply
      • happy Diwali images says

        July 20, 2017 at 1:46 am

        Thank you ! for your reply.

        Reply
  11. Chaktty says

    May 2, 2017 at 5:37 pm

    can this be used with blogspot blog as I really need this for long posts @ http://www.healthriskfood.com

    Reply
    • Kristie Hill says

      May 4, 2017 at 7:19 am

      Yes! This will work inside blogspot.

      Reply
  12. John says

    March 23, 2017 at 5:43 am

    I don’t get it….are you suppose to write the id text straight after the link text? In the insert link box?

    Reply
    • John says

      March 23, 2017 at 6:50 am

      Ok I found that I need to write it in the text box….but now all my links at the top of the blog are all going to the same places as the first one I did?

      Reply
      • con.fusion says

        September 4, 2017 at 1:50 pm

        I’m super confused too. I’d like to have some directions but all she gives are the codes so I guess I just need to figure it out myself. Sorry, but I am glad I’m not the only one who doesn’t get what to do. πŸ™‚

        Reply
        • Kristie Hill says

          September 6, 2017 at 6:44 am

          Sorry that this wasn’t clear enough. I didn’t include where to paste it, because there isn’t a set place. You can use the link inside the post or just share it in the email. And the ID is placed wherever you want the link to jump to. I’ll work on re-writing the tutorial for you.

          Reply
  13. alison says

    March 18, 2017 at 12:05 pm

    Hi. I am in the middle of writing a large post that really needs this! I spent all last night trying to work this out. Now I’ve found this clear explanation I will have another try this evening. I will let you know how I get on. Thanks for sharing and looking forward to making it happen later on. πŸ™‚

    Reply
    • alison says

      March 18, 2017 at 6:06 pm

      Sorted. You superstar. Thank you. I even managed to put my links into a pretty coloured box. Awesome!

      Reply
      • Kristie Hill says

        March 18, 2017 at 10:56 pm

        That’s fabulous news Alison! I’m glad it worked for you. Let me know when the post is live so that I can check out your beautiful links!

        Reply
        • alison says

          March 19, 2017 at 1:22 pm

          Hi. Here it is. My son doesn’t like the blue so I will change it later. πŸ™‚

          https://bestforthegarden.com/top-10-outdoor-dining-sets

          Again. Big thanks for your help.

          Reply
          • Kristie Hill says

            March 20, 2017 at 7:37 am

            It looks great and so professional! Very easy to navigate.

          • alison lockley says

            March 20, 2017 at 3:56 pm

            Thanks Kristie. I’m am enjoying ‘drifting’ around your blog and thinking – oh, must try that next! You rock. πŸ˜€

          • Kristie Hill says

            March 27, 2017 at 6:40 am

            Drifters are always welcome here Alison. Let me know if you have any questions or if there is a tutorial I can create for you.

  14. Francis Concepcion says

    February 16, 2015 at 5:03 pm

    I’ve been searching for how to do this for a while now. Thankfully I came across your post. Thanks Kristie! πŸ™‚

    Reply
    • Kristie Hill says

      February 17, 2015 at 1:05 pm

      You’re welcome! I know when I was first trying to create these type of links in my posts, I didn’t even know what to google! I ended up figuring it out with my favorite app: firebug. I’m curious, what did you type into google search?

      Reply
      • Doveranalyst says

        January 27, 2016 at 10:08 pm

        How to create hyperlinks within a blogger blog post

        That’s what I typed into Google and landed here.

        I can so well relate to this feeling on how the readers landed on my page. Sometimes I feel blogger stats offers better keyword search details than google analytics!

        Reply
  15. Sarah Nenni Daher says

    November 4, 2014 at 2:40 pm

    Oh!!!! This is awesome and I abandoned a blog post because I didn’t even know how to search Google for the “how do I do (__ fill in the blank) because I didn’t know what it was called. Pinned, tweeted, saved to bookmarks – thanks for this!

    Reply
    • Kristie Hill says

      November 4, 2014 at 9:53 pm

      I don’t know what it is officially called either! I had the exact same problem you did. I couldn’t find a tutorial on it anywhere, so I figured it out (using firebug!) and created my own tutorial. Have fun using it now Sarah!

      Reply
  16. [email protected] Peaceful Haven says

    November 4, 2014 at 7:24 am

    This is fascinating and so very helpful for a non-computer savvy blogger! I will refer to this often and thank you for helping yet again! VERY INFORMATIVE!

    Reply
    • Kristie Hill says

      November 4, 2014 at 9:53 pm

      You’re welcome, again!

      Reply
      • Jayash says

        April 12, 2018 at 8:35 pm

        very helpful, I have a question can we simply write #content instead of witting that much long url.

        Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Kristie Hill

Copyright © 2023 Β· Splendor Theme on Genesis Framework Β· WordPress Β· Log in