hyperlinks in html
Post on 26-May-2015
698 Views
Preview:
TRANSCRIPT
Hyperlinksin HTML
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.
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.
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.
Hyperlinks
• Link to a page on world wide web
<a href="http://www.globalinfochannel/"> Visit globalinfochannel!</a>
Result of Hyperlink Code
HyperlinksLink to an image by image as a link
<a href=“image2.jpg"> <img src =“image1.jpg”></a>
HyperlinksLink to document located to different directory
<a href=“d:\active\abc.html”> Click here</a>
HyperlinksLink to same page<A HREF =“#samepage”>This is link</A>
.
.
.
.<A NAME=“samepage”>You are in same page</A>
HyperlinksLink 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>
HyperlinksLink to mail:<A HREF =“mailto:emailid@host”>Mail me</A>Ex:<A HREF =“mailto:abc@gmail.com”>Mail me</A>
top related