Multi Page Websites

Linking your pages to other pages can be done with the <a> tag using the href attribute. This makes it exactly where you want the link to go to e.g. a url. E.g. <a href="url goes here"> This is what the link text is. </a> With this you will have the power to be able to link up your pages and make your page have many sites. By default, link will be like this: Click Me!. However this can be easily changed with CSS. Many complexity. Not.

All The Tags Used in This Lesson and Their Definitions
Tags Definition
<a>...</a> The a tag defines a hyperlink, which is used to link from one page to another.
href="link goes here" The href attribute specifies the location (URL) of the external resource (most often a style sheet file).
target The target target attribute specifies where to open the linked document.

The most basic way of linking pages is to use this format:

<a href="url">link text</a>

This means that "link text" will be linkd with the url.


A local link (link to the same web site) is specified with a relative URL (without http://www....) is done like this.

<a href="html_images.asp">HTML Images</a>

Now this page has pages within its own website. Wow.


The target attribute specifies where to open the linked document, which can have one of the following values:

for an example, this:

<a href="url" target="_blank">click me!</a>

will open the in a new tab when "click me!" is clicked. Crikey.