Saturday, November 19, 2011

Blog Anchors and Internal Links


This is some documentation so I can remember how to create an internal link (a jump from one spot on a page to another spot on the page.  The example I provide is from the States page where I jump from the "N" to "Nebraska."

Here is the code where I want to jump to:
First, you should create the document and decide where you want your internal links to go. You label these using the anchor tag (a) with the name and id attributes. The name and id attributes should be identical.

e.g. <a name="anchor1" id="anchor1">Anchor text</a>

Here is the code where I want to jump from:
Then second, you create the link to the site using the anchor tag (a) and the href attribute. You indicate the named area with a pound-sign (#). 

e.g. <a href="site.html#anchor1">Anchor link</a>

The important thing is that href= (enter the page URL you want to create a jump).

(no spaces) Also, to write an example of code in a blogger post without it being interpreted use these instructions:
Replace all the < characters with  & l t;(no spaces) 
And all the > characters with & g t;(no spaces) 




No comments:

Post a Comment

Blog Archive