HTML Links

It consist of anchor element which is used to create a link between a source anchor and destination anchor. The anchor tag can be embedded between text, image, video or button.

HTML Links Syntax:

<a href="url">link text</a>

Example: <a href="">Tutorial for Html</a>

Here, <a>: Anchor tag which add the link to any reference text, image etc.

href (hypertext reference): It specify the destination for the anchor tag.

  • Local Links: It is specified with a relative URL. E.g. html_tutorials.php
  • Global Links: It is an absolute URL (Full website address). E.g.

HTML Link Colors

Color of the link is distributed into three category of type of links:

  • Unvisited Link: Link is not visited even once i.e. first time color of a link.
  • Visited Link: When Unvisited link reaches the destination i.e. color of a link changes if visited
  • Active Link: Link color on click that shows link is working.
a:link {    color: red;    }  
a:visited {  color: yellow;  }  
a:active {   color: blue;  }  
<a href="html_tutorials.php" >HTML tutorials</a></body>  


  • Text as Link: <a href ="">Html Tutorial</a>


Html Tutorial
  • Image as Link: <a href =""> <img src="/image/logo.png" alt= "tutotrialandexample"></a>



Send Mail