How to link to a location in same page

It is often convenient to create a hyperlink to another location in the same post or webpage. For example, in a post explaining AdSense Privacy Policy Generator for AdSense publishers, there is a whole section on the relevant portion of AdSense Program Policies before the actual content on how to use an AdSense Privacy Policy Generator. For the convenience of visitors who have no interest in reading about AdSense Program Policies and just want to learn how to easily create the required policy for their blogs, it is thus good to create a hyperlink at the beginning of the post so that they can click on it to bypass the unwanted portion of the post and jump straight to the portion explaining how to create the AdSense Privacy Policy with the generator.



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 with


How to easily generate AdSense Privacy Policy



or alternatively

How to easily generate AdSense Privacy Policy



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

How to easily generate AdSense Privacy Policy

Related Posts Plugin for WordPress, Blogger...

No comments:

Post a Comment

Dota-Ultimatum © 2009-2011 Home

  © Blog design based on by dzelque ' Header by D...j ' 2010

Back to TOP