HTML: Hyperlinks to anchors

This entry is part 25 of 34 in the series HTML

An anchor is a market within an HTML document, roughly analogous to a bookmark in a Word document.

You define a specific location in the document with an anchor name and then you can hyperlink to that anchor.

In this example, this is how I mark the 3 anchor locations.

<h3><a name='southernmost'>Southernmost city in the world</a></h3>
<h3><a name='understand'>Understand the city</a></h3>
<h3><a name='tosee'>What to see in Ushuaia</a></h3>

This is how I create the hyperlinks that refer to them.

<li><a href='#southernmost'>Southernmost city in the world</a></li>
<li><a href='#understand'>Understand the city</a></li>
<li><a href='#tosee'>What to see in Ushuaia</a></li>

You can click on the 3 links on top of the page and it will jump to the specified locations in the page.

Series Navigation<< HTML: Setting a target window
HTML: Hyperlinking to an Email address >>