2. Hyperlinks
• A hyperlink is a reference (an address)
to a resource on the web.
• Hyperlinks can point to any resource
on the web: an HTML page, an image,
a sound file, a movie, etc.
• The HTML anchor element <A>, is
used to define both hyperlinks and
anchors.
3. Hyperlinks
• Browser distinguishes hyperlinks
from normal text.
• Appears blue in color
• Default color setting
• Can be changed dynamically
• Hyperlink text is underlined
• When the mouse cursor is placed
over it, it will change to hand.
4. Hyperlinks
• Hyperlinking is done by using <A></A> anchor
tag. Syntax: <a href="url">Link text</a>
• The text between opening and closing <A> tag
act as a start/destination of a link.
• HREF attribute specifies URL of the destination
document/webpage/image.
5. Hyperlinks
• Link to a page on world wide web
<a href="http://www.globalinfochannel/">
Visit globalinfochannel!</a>
9. Hyperlinks
Link to same page
<A HREF =“#samepage”>This is link</A>
.
.
.
.
<A NAME=“samepage”>You are in same
page</A>
10. Hyperlinks
Link to different sections of different documents:
File A.html:
<A HREF =“fileB.html #difflink”>This is link</A>
File B.html:
<A NAME=“difflink”>You are on different
page</A>
11. Hyperlinks
Link to mail:
<A HREF =“mailto:emailid@host”>Mail
me</A>
Ex:<A HREF =“mailto:abc@gmail.com”>Mail
me</A>