## Introduction to HTML5 (Part 2)

Introduction to HTML5 Part 2 of 2

The link is built using the anchor element and then declaring the following values:

• href - destination of the link
• May contain absolute or relative destination (discussed below)
• title - tooltip text of the link
• target - designates where the link will open
• _blank will open the link in a new tab/window
• _self will open he link in the current tab/window

As was stated above, when creating a link, you can point it to either an absolute address or a relative address. In this section, we will be looking at the absolute address.

An absolute address is typically used when you are creating a link to a page that is NOT part of your current site. An example of this would be creating a link to Facebook from your site.

An absolute address MUST begin with the protocol (typically this is http://) when setting the value for the href.

In contrast to absolute addressing, relative addressing is when you are referring to the destination page in relationship to the page you are building the link on.

A relative address begins with either the directory or the destination file name. The protocol is not used in relative addressing.

Using the image above, the value of the href to navigate from the index.html page to the collected_works.html page would be as follows:

collected_works.html

Continuing with the image above, the value of the href to navigate from the index.html page to the resume.pdf page would be as follows:

media/resume.pdf

### The Code

<a href="http://www.facebook.com" title="Facebook Social Networking" target="_blank">Click Here</a> to visit Facebook.
The <a href="collected_works.html" title="My Collected Works" target="_self">Collected Works</a> of Eric Evans.