How to link from one location to another location in the same page
Here is how to hyperlink from one location of a post or page to another. The code is some descriptive text where instead of writing some descriptive text as for standard hyperlink, in place of the URL is #anchor where anchor can be any identifying character but is a usually a character descriptive of the section. For example, I want to hyperlink to the section describing the generator, I would use the easily remembered #generator.
Now at start of the location you want to link to, just write the code or and the hyperlink would be anchored to (linked to) this location.
I will use that post AdSense Privacy Policy Generator for AdSense publlishers. Around the beginning of the post, I wrote:
(if you just want to comply to their requirement and learn how to generate the policy, just go over to How to easily generate AdSense Privacy Policy)
Then at the section where there is a heading
How to easily generate AdSense Privacy Policy
just before writing the code for the above heading, I write and thus ended up withor alternatively
Note that while the name attribute had been deprecated for XHTML, the id attribute may not work for some older browsers. In my case, I think it is prudent to write both to cover all contingencies and thus I end up with



No comments:
Post a Comment