Using Hyperlinks

Lesson 3

Hyperlinks point to a whole page or a specific element within a page.  They are a ‘Navigation’ element.

  1. Open the file that you created in Lesson 1.
  2. Delete any code between the <body> </body> tags.

Your screen should now look like this:

  1. Now type the following between the <body> </body>
    <a href="https://socialmediamanager.ie">Visit Social Media Manager</a>
  2. Now ‘Save’ & ‘Run’ your page.

When the page runs, what do you see?

  • You should see the words Visit Social Media Manager notice how all hyperlinks are in blue and are underlined.
  1. Click the link; the Social Media Manager web page should appear in place of your web page.
  2. Now append the code to the following:

<a href="https://socialmediamanager.ie" target="_blank">Social Media Manager</a>

Repeat this exercise using some of the other options listed below and see what happens.

Value Description
_blank Opens the linked document in a new window or tab
_self Opens the linked document in the same frame as it was clicked (this is the default)
_parent Opens the linked document in the parent frame
_top Opens the linked document in the full body of the window
  1. Now replace:

<a href="https://socialmediamanager.ie" target="_blank">Visit Social Media Manager</a>

With

<a href="file:///C:/">Your hard drive.</a>

  1. ‘Save’ and ‘Run’ your page, click the ‘Your hard drive link’. What happens:
  • Windows Explorer opens showing the contents of your C:/ drive. While this exercise is useful, it’s unlikely you would ever use this.

Take me to lesson 4 'Working with images'

Scroll to Top