Lesson 3
Hyperlinks point to a whole page or a specific element within a page. They are a ‘Navigation’ element.
- Open the file that you created in Lesson 1.
- Delete any code between the <body> </body> tags.
Your screen should now look like this:
- Now type the following between the <body> </body>
<a href="https://socialmediamanager.ie">Visit Social Media Manager</a>
- 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.
- Click the link; the Social Media Manager web page should appear in place of your web page.
- 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 |
- Now replace:
<a href="https://socialmediamanager.ie" target="_blank">Visit Social Media Manager</a>
With
<a href="file:///C:/">Your hard drive.</a>
- ‘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'