HTML Anchors

An anchor in its most generic form is created using the code below

<a class="style" id="name" target="text" type="text" href="source">Description</a>

As with any other HTML element it is possible to redefine style attributes for the anchor inline using the format style="..." . A non-standard attribute that you may want to consider using with some anchors is rel="nofollow". This attribute has been used since 2005 by Google - and now by all major search engines - to ignore hyperlinks so they do not end up artifically boosting the pagerank of the resource they link to. You would, for instance, use this with text-link advertisements or to any links that arise from user contributions to the page.

A warning worth adding on the subject of mailto anchors - putting in email addresses on a website is a great way to invite email address harvesters to get hold of your email address and shower you with junk mail. There are two ways of reducing this risk:

Jump To...

Colophon