hyperlinks in html

11
Hyperlinks in HTML

Upload: aarti-p

Post on 26-May-2015

698 views

Category:

Education


49 download

TRANSCRIPT

Page 1: Hyperlinks in HTML

Hyperlinksin HTML

Page 2: Hyperlinks in 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.

Page 3: Hyperlinks in HTML

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.

Page 4: Hyperlinks in HTML

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.

Page 5: Hyperlinks in HTML

Hyperlinks

• Link to a page on world wide web

<a href="http://www.globalinfochannel/"> Visit globalinfochannel!</a>

Page 6: Hyperlinks in HTML

Result of Hyperlink Code

Page 7: Hyperlinks in HTML

HyperlinksLink to an image by image as a link

<a href=“image2.jpg"> <img src =“image1.jpg”></a>

Page 8: Hyperlinks in HTML

HyperlinksLink to document located to different directory

<a href=“d:\active\abc.html”> Click here</a>

Page 9: Hyperlinks in HTML

HyperlinksLink to same page<A HREF =“#samepage”>This is link</A>

.

.

.

.<A NAME=“samepage”>You are in same page</A>

Page 10: Hyperlinks in HTML

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>

Page 11: Hyperlinks in HTML

HyperlinksLink to mail:<A HREF =“mailto:emailid@host”>Mail me</A>Ex:<A HREF =“mailto:[email protected]”>Mail me</A>