Stuff that occurs to me

All of my 'how to' posts are tagged here. The most popular posts are about blocking and private accounts on Twitter, also the science communication jobs list. None of the science or medical information I might post to this blog should be taken as medical advice (I'm not medically trained).

Think of this blog as a sort of nursery for my half-baked ideas hence 'stuff that occurs to me'.

Contact: @JoBrodie Email: jo DOT brodie AT gmail DOT com

Science in London: The 2018/19 scientific society talks in London blog post

Saturday 19 February 2011

Teeny blog post to remind me how to anchor in-post text

In some of my longer multi-part blog posts (eg Open Air Cinema Screens in London and Where Science Communicators might work - both posts linked on the right hand side panel) it's potentially useful to be able to jump to a section. I've done this on several occasions on other website and nearly always forget the succinct html code that lets me do this.

There are several ways of doing it that will work, but some are better for a wider variety of browsers and some methods aren't recommended (see deprecated tags). This method was recommended by @DavidWaldock and worked well in the Open Air Cinema Screens post. I've reproduced the rubric below to remind myself when I come to tweak posts in future and want to anchor to various sections.

All { and } need to be replaced with < and >.

This is the pointer, which on clicking will take the user to the anchored section.
Jump to {a href="http://brodiesnotes.blogspot.com/2010/04/open-air-cinema-screens-in-london.html#2011"}2011 screening information{/a}.

This is the 'pointee' or anchor to which the pointer above will jump.
{a name="2011"}2011 :: 2011 :: 2011{/a}

No comments:

Post a Comment

Comment policy: I enthusiastically welcome corrections and I entertain polite disagreement ;) Because of the nature of this blog it attracts a LOT - 5 a day at the moment - of spam comments (I write about spam practices,misleading marketing and unevidenced quackery) and so I'm more likely to post a pasted version of your comment, removing any hyperlinks.

Comments written in ALL CAPS LOCK will be deleted and I won't publish any pro-homeopathy comments, that ship has sailed I'm afraid (it's nonsense).