you are here: Home arrow HTML Basics arrow Using Anchors on websites
Using Anchors on websites
User Rating: / 2
PoorBest 
Saturday, 20 May 2006

Anchors allow you to specify a place on a page that you can link to, to move the page to that point without needing to scroll down.  This is very handy on pages that are very long with a lot of content.

Back to Top links

Just below the <body> tag add this code:

<a name="top" id="top"></a>

This adds an anchor at the top of the page.

To create a link to the top of the page you need to use this code:

<a xhref="http://skeletorscorpse.com/joomla/#top">Back to Top</a>

Page sections

You can also use anchors on main sections of your site.

Such as:

<a name="section 1" id="section1"></a>Section 1

To get to this section you need to add a link elsewhere on your page.

<a xhref="http://skeletorscorpse.com/joomla/#section1">Go to Section 1</a>

Anchor point on another page

You can also link to another section on a completely different page.

Add the anchor to the a page then in a different page add a link like this:

<a xhref="page5a.html#section1">Go to Section 1 on Page 5a</a>





Reddit!Del.icio.us!Google!Live!Facebook!Slashdot!Netscape!Technorati!StumbleUpon!Newsvine!Furl!Yahoo!Ma.gnolia!Squidoo!Free social bookmarking plugins and extensions for Joomla! websites!
 
< Prev   Next >
Based on valid XHTML 1.0 and CSS 2.0 code design by:pixelsparadise.com