Monday 27 February 2012

CSS Anchors

I've known how to make hyperlinks from day one but it's taken me this long to finally learn how to make an anchor link! But it's pretty simple, just using HTML.

This is how I've been using it on a website which has a contact and about section at the bottom.


I used this code if the anchor's on the same page:
<a href="#about">ABOUT 
And this code if it's on another page:
<a href="http://site.com/page.htm#about">ABOUT 

This code is placed just above my "ABOUT" section:
<a id="about" name="about section"></a>



No comments: