HTML Links

HTML links is used to navigate from current page to another pages. We can navigate pages by clicking on text, images.

HTML links is called as Hyperlinks. We can use Hyperlinks <a> tag for linking web page, image, document like pdf, docs etc.

Syntax :

<a href="" title="" target="">Click</a>

HTML Link <a> tag  or HTML anchor tag attribute

  1. href : It specifies destination  the path of document like web page, pdf, docs etc. link.

  2. title :  It specifies title of destination link. It is recommened for good SEO purpose.

  3. target : It specifies where to open the linked page or document. Target value are _blank,  _parent. _self, _top.  By default, the linked page will be displayed in the current browser window. 
        _self - Default. It Opens the document in the same window/tab as it was clicked.
        _blank - It Opens the document in a new window or tab.
        _parent - It Opens the document in the parent frame.
        _top - It Opens the document in the full body of the window.

 

We can apply hyperlinks as below.

  1. Text :  We can set text between the opening <a> tag and the closing </a> tag
  2. Images Tag : We can set image between the opening <a> tag and the closing </a> tag
  3. Email Tag : HTML <a> tag provides you option mailto: email address to specify an email address to send an email.

Also html link is called as HTML anchor tag.

 

Example :

<!DOCTYPE html>
<html>
<head>
<title>Learn HTML Links by aryatechno</title>
</head>
<body>
<table>
<tr>
<td>
<h2>HTML Links for Text </h2>
<p><a href="https://www.aryatechno.com/page/html/141/html-image.html" title="Learn HTML image Tag" target="_parent" title="learn HTML image Tag" >Click to learn HTML image Tag</a> </p>
<h2>HTML Links for image </h2>
<p><a href="https://www.aryatechno.com/blog.html" title="Learn HTML image Tag" target="_parent" title="learn html, php" ><img src="https://www.aryatechno.com/all/img/logo.png" border="0" alt="Learn HTML tutoial" align="left" style="" class="imgarya" /> </a>
</p>
<h2>HTML Links for Email </h2>
<p> <a href ="mailto: [email protected]">Send Email</a></p>
</td>
</tr>
</table>
</body>
</html>

Output :

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

40657