# Linking Pages

## What We'll Be Building

![](https://3764443643-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M1CV_PDi4uSEWhb3GlC%2F-MBVmfVse6ZWe6P5Ra21%2F-MBVoXP2TCTxYsWQSSi_%2F7.JPG?alt=media\&token=1c9bdfec-b805-45e1-ae37-e288d59148d8)

When using websites, we rarely ever stay on one page the entire time, we move around from one webpage to another whilst on the same website. This is accomplished by linking our pages together. To link pages together we're going to use something called an anchor tag.

Anchor tags look like this: `<a href="page-to-link">`

Anchor tags are similar to image tags which we looked at a little earlier, in that they have an attribute that takes a URL. For the image tag it was the **src** attribute, and now for the anchor tag, it's the **href** attribute, which tells the link where to take you after you've clicked it.

{% code title="links.html" %}

```markup
<!DOCTYPE html>
<html>
    <body>
        <a href="https://www.Google.com"> This Link's to Google </a>
    </body>
</html>
```

{% endcode %}

## Exercises

1. Create one new HTML page called **links.html** and another called **secret.html**.&#x20;
2. On **links.html** add an anchor tag that links to **secret.html**. For example, on **links.html** I can create and anchor tag that looks like this: `<a href="secret.html"> Lists Page </a>` which will link a user to my **secret.html**.
