TOPIC 2.2 Hyperlink
TOPIC 2.2 Hyperlink
HTML Hyperlink
• HTML links are hyperlinks. The link text does not have to be text.
It can be an HTML image or any
• A hyperlink is a text or an image you can click on, and jump other HTML element.
to another document.
syntax
<a href="url">link text</a>
<style>
a:link {color:green; background-color:transparent; text-decoration:none}
a:visited {color:pink; background-color:transparent; text-decoration:none}
a:hover {color:red; background-color:transparent; text-decoration:underline}
a:active {color:yellow; background-color:transparent; text-decoration:underline}
</style>
5
HTML Hyperlink
HTML Links - The target Attribute
6
HTML Hyperlink
HTML Links - The target Attribute
HTML Hyperlink
HTML Links - Image as Link
<a href="default.asp">
<img src="smiley.gif" alt="HTML
tutorial" style="width:42px;height:42px;border:0">
</a>
8
HTML Hyperlink
HTML Links - Create a Bookmark
Page 1
Page 2
11
Activity 2.5: HTML Links
Create a link to the google.com and
1. On click of the link it in the same page
2. On click of the link it should open it in a new page