I don't think I really explained that well in the title so I'll try describe a bit more.
Currently I am using <a id="x"> and <a href="#x"> in order to link parts of a page to a table of contents. I would like to be able to have the linked text become highlighted after clicking on its link(does that sound right?) so that its a bit more clear which part you read.