HTML - Hyperlink

Hyperlink are one of the most important characteristics of web pages.a link moves us from the current page to a destination that is specified in the HTML page,a URL is just an address that tells the browser precisely where on the internet the resource is to be found.

Hyper links can be divided into four base categories.

      Hyperlink

      Image Hyperlink

      Mail to Hyperlink

      Reference link


Hyperlink

The simple hyperlink created using the following syntax.


<a href="URL">Text Displayed as Hyperlink</a>
							

Here href attribute is used to specify hyperlink reference(URL) of a page to be open after clicking the hyperlink,follow the example.

Example


<html>
<head>
	<title>Hyperlink>/title>
</head>
<body>
<a href="https://virtualhax.com">VH</a>
</body>
</html>
							

Rather than creating simple hyperlink if you want to create an image hyperlink,then you have to simply replace text to be displayed as hyperlink.

Syntax


<a href="URL">
	<img src="Image Path" border="width of border" height="height of an image" width="width of an image">
</a>
							

Example


<html>
<head>
	<title>Image Hyperlink>/title>
</head>
<body>
<a href="https://veewom.com">
<img src="images/logo.png" border="2" height="50" width="200">
</a>
</body>
</html>
							

Mail to Hyperlink

This kind of link which allows sending email just clicking the specified address on the site.to work with mail to link,user must have an email sending program downloaded on their computers.

When computer user click on this link,browser open user's email sending program and opens a new message.

In this link & symbol is used to separate the items in the value field of href attribute to send the message to more than one,e-mail address is written in optional 'CC'.

Syntax


<a href="mailto:email address &cc=email address">
	Text to be displayed as Hyperlink
</a>
							

Example


<html>
<head>
	<title>Mail to Hyperlink>/title>
</head>
<body>
<a href="mailto:info@Veewom.com &cc=info@Veewom.org">Send</a>
</body>
</html>							
							

Reference Link

To establish an internal link within the same page at particular position,first of all an anchor is to be created.an anchor name can be using name attribute of the anchor element in this system.

Syntax


<a name="name of the reference">Text to be Displayed</a>
							

Example


<html>
<head>
	<title>Reference Link>/title>
</head>
<body>
<h2>This is TOP Area</h2>
<a href="#bottom">Bottom</a>
<br>
<br>
<br>
<br>
<a href="#top">Top</a>
<h2>This is Bottom Area</h2>
</body>
</html>
							
Share Share on Facebook Share on Twitter Share on LinkedIn Pin on Pinterest Share on Stumbleupon Share on Tumblr Share on Reddit Share on Diggit

You may also like this!