SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In Sharepoint (2010) wiki pages it is easy enough to add a hyperlink, but how can one add a hyperlink anchor without editing the messy html?

You can see here that, although I've got a link and typed in an anchor into the bookmark field, it complains. I can save it, and it seems to remember what I put there, but when I try to use it by linking to the anchor, it doesn't jump (that is, <a href="#anchor1">jump</a> doesn't work).

I've looked over this tutorial, but it doesn't seem to work.

enter image description here

But the blurb there in the screenshot says, "You can make hyperlinks that jump directly to a bookmarked location" - okay, fine, well, how do I do that?

share|improve this question
has anyone had luck creating bookmarks like this within easy tabs? I am having problems doing so. – Kevin Feb 16 at 21:50
up vote 13 down vote accepted

I have managed to make this work by combining the information here and here.

  • To enable the bookmark functionality you need to get an admin to enable SharePoint Server Publishing Infrastructure feature on the site collection level and then the SharePoint Server Publishing feature must be activated on the site level.

    1. Start by selecting the text that you want the link to point to.
      Link selection

    2. Insert a new link From Address
      Insert new hyperlink

    3. Paste the current page address in the Address field Paste destination address

    4. Add your bookmark name (without the hash) Add bookmark name

    5. Select the text that should point to your bookmark and insert a new link From Address Insert new hyperlink

    6. Type the name of the destination bookmark (don't forget the hash) Add name of destination bookmark

    7. Save the page

share|improve this answer
Your answer creates a hyperlink TO a destination. The question I asked was how to add the anchor - how do you add the DESTINATION in the first place? – bgmCoder Mar 3 '14 at 15:24
The anchor is added in step 4 – MoonSire Mar 4 '14 at 6:14
Ah, you got me on that, sorry! It does seem to work - I can't believe it. I spent hours on that. The trick was creating the hyperlink anchor with the page address as the hyperlink destination. This is a better solution than mine, so I'm marking yours correct. Thank you! – bgmCoder Mar 4 '14 at 15:08
I would like to thank the person who posted the answer to the bookmark question as he saved me a lot of time - thanks for sharing the tip. I had problems adding a simple bookmark to my page and only worked after reading this post. THANK YOU HEAPS Basem Sydney - Australia – user30186 Jul 2 '14 at 2:58
[Revisiting solution] This works quite well as long as you don't change the name of the page! – bgmCoder Jan 7 '15 at 20:46

The only way to do it is use an anchor tag in the code:

<a name="MyAnchor"></a>

Then add a hyperlink to the page the anchor is on, but include #MyAnchor:

If there's a better way, let me know.

share|improve this answer
Yeah, I don't want to do it in the code. I've folks whose mind would leave their body if I asked them to edit code. Besides, the code-editor is quite unwieldy. – bgmCoder Jul 17 '13 at 4:17
Okay, there is a better way... :) – bgmCoder Jul 17 '13 at 22:26
May not have answered the OP's question but I ended up here when looking to do exactly this so thanks for sharing. – RyanfaeScotland Feb 3 '15 at 10:43

Ah, here is a way.

The idea is that the user using the wiki editor will create a new hyperlink and use a special token to denote an anchor. In my example, the token is /__

I chose that because the hyperlink has to start with something that the editor would accept - and it will accept a /. Also, because it is very rare to see a hyperlink with /__ anywhere in the string.

Thus, the user would use the regular wiki richtext editor, then use the "insert hyperlink" button, and specify a hyperlink like this:


The function

This needs to be added in a Content Editor or in the master page somewhere. The function will look for that pattern and add a hyperlink name based on the specified link that was given, and then remove the false hyperlink (where the optional parameter specifies a # which causes it to be a hyperlink to that same page, which means it doesn't cause any navigation), or, if the parameter is specified, it will supply that url as a default.

function WikiLinks(defaulthyperlink){
          defaulthyperlink = "#";
    $(".ms-wikicontent a").each(function(){
        var thishref = $(this).attr('href');    
        if(thishref.indexOf('/__') >= 0){
            thisanchor = String(thishref).substring(3, String(thishref).length);            
            $(this).attr('name', thisanchor );

If you decide to use a different token, make sure the change the length in the thisanchor substring search.


The catch to this is that you must call the function after the UI is loaded. This means that the function works (like a charm) only within a single page. You can't use it to link to an anchor in another page because the linkage fires before the script gets to add the anchor name.

share|improve this answer
Did this work for you? – TempaC Jul 19 '13 at 7:40
Yes, it works as long as you load the function after the UI is loaded, but it only works within a single page. You can't link to anchours in other pages. I'll explain in my answer. – bgmCoder Jul 19 '13 at 13:43

The wiki editor could make this easier :-)

This method works for me...

  1. Highlight a word in the header where you want to insert an anchor; then copy the word
  2. Press Ctrl-K. In my instance default text appears in the address field "/site/site/", click OK to accept the default
  3. You'll notice that a Link Tools ribbon appears. Paste the anchor name into the anchor field
  4. Go to your link text and highlight it; then insert a link "from address." Add "#" and paste again.

I have no idea if this will work in your case. Step 2 is weird. But it's the only way that I can invoke the "link tools" ribbon. Too bad this isn't part of the Link options from the get go.

[[EDIT: I didn't notice this before but SharePoint inserts the anchor/id AND a href link and there's nothing you can do about it except edit the HTML so my answer isn't much of a solution, unfortuntately.]]

share|improve this answer
Sorry so slow to respond... No, editing the html is not the answer. I tried your method, but the "bookmark" field is grayed out and it doesn't save. – bgmCoder Jul 17 '13 at 4:13

To jump from 'Heading 1' to 'Section 1' on the same wiki page:

Highlight 'Heading 1', insert link 'from address' Text to Display: Heading 1 Address: #Section 1 click ok


Highlight 'Section 1', insert link 'from address' Text to Display: Section 1 Address: # click ok

Highlight 'Section 1' again In Bookmark (in link tab) write: Section 1

Save page.

share|improve this answer

This is a rather old post, but hopefully this will help someone else in the future.

In regards to intra-page hyperlinking in SharePoint 2010, I found it is easiest to do through MS Word with book marks, and hyperlinks.

Highlight destination, click Insert> Bookmark. Label Bookmark and hit add. Then highlight your source (what you want to click on to take you to your destination bookmark), click insert> hyperlink> Place in this document > Select your bookmark.

When you copy and paste this into SharePoint 2010, it will work, or at least has for me.

share|improve this answer
I think you've missed the point - the point was to achieve the inter-page hyperlinking inside a sharepoint WIKI PAGE - not a Word document. The Wiki Page has issues. – bgmCoder Jan 31 '14 at 22:23
@TimothyHerlihy Does this action work on a Wiki-page too, and not only a content editor non wiki page/web part? – Benny Skogberg Feb 1 '14 at 2:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.