You are currently browsing the page Anchors in the HTML category.

Anchors

Anchors are used to mark a special part of your page. For example, if your page is very long, you can divide it into 2 or more parts. Add an anchor where you want to mark the beginning of one part and then, add a link to this anchor.

To add an anchor:

<a name="anchor_name"></a> Then, to link to this anchor, add:

<a href="#anchor_name">Go to second part?</a> As you can see, you must add # before the anchor's name in the link. If the anchor isn't in the current page, you can also write otherpage.htm#anchor.

Back to top? You can do that easily, just make a link to # alone.

Print This Post Print This Post



Sponsors


Leave a Comment

Works? Doesn't work? Other tips? Please leave a comment! :)

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>

To post codes, please go to SimpleCode and transform your codes first, so that it will displayed properly. Indeed, < and > need to be converted to &lt; and &gt; :)


Close
E-mail It