HTML Anchors? (not Discourse bookmarks)


I tried to use HTML to pop some bookmarks into a post today, so that from another link you could get to a specific point in a lengthy post.

I couldn’t seem to get it to work, is this something which isn’t currently supported?

I added this within the post;

<a id="bookmark"></a>

…and then, on the end of the URL in the browser, added;


I hit enter, but nothing changed, e.g. I wasn’t scrolled down to the bookmark automatically. What I am trying to incorporate is the same functionality I suppose as you already use for the replies to a topic (the reply numbers etc), but this would be for say a wiki post which doesn’t have replies, it’s just quite long.

Go to:

Edit, and check how it’s working there :wink:



I didn’t think of that!

Interestingly though, I did try it using the name attribute first and when that didn’t work I used the id instead.

Can you think of any reason why it wouldn’t work if the #bookmark part of the URL was on the end of the topic number?

For example, looking at this topic, I see this in the browser;

I appreciate the /2 on the end is for the reply, and the previous number, /77241 is the topic, so, should /77241#bookmark work?


Interesting, taking one the links from the /guidelines page and opening it in a new tab (Chrome) also didn’t exhibit the desired behaviour!

For example;

Only seem to work if they are clicked on, on the actual page…

This was implemented recently – here you go:

Summary: Use headings and make sure the id starts with heading-- and it’ll work :slight_smile:


Thanks for this, is the use of headings mandatory? In my specific case the lengthy page has a number of images on it which I wanted to direct people to specifically, without having to add a heading above each one etc.

I will go and test, but anything further would be appreciated.

I couldn’t get it to work with an <a> element, so I think it must be a heading.

1 Like

Thanks for the info, and yeah, I can’t either… hmm… will have to think on this one as having the text isn’t really what I wanted to do.


/facepalm moment two…

Ok, so I just added an empty heading tag and of course it works perfectly… it does render a little extra “space” where the heading tag would be, but nothing that’s really a problem.

Thanks both - all good now :slight_smile: