Hyperlinks

Hyperlinks connect anchors to:

  • another webpage (an external link)
  • a location within the same web page (an internal link)

External Links

Using text to open an external link

<a href="http://www.anderson.shetland.sch.uk">Anderson High School</a>

The link may be part of a paragraph, or other blocks of text:

<p>The <a href="http://www.anderson.shetland.sch.uk">Anderson 
High School</a> is the largest school in Shetland.</p>

Using an image to open an external link

<a href="http://www.anderson.shetland.sch.uk"><img src="ahslogo.png" 
width="100" height="100" alt="AHS Logo"></a>

Internal Links

An internal link requires two items – an id for the destination and the hyperlink

Setting destination id

The id can be put into any HTML tag. Every id on a page must be unique:

<h1 id="title">Anderson High School</h1>

Hyperlink

<a href="#title">Go to top of page</a>