HTML Links

It consists 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.


<a href="">PHPGurukul | Programmong Blog</a>

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

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

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

HTML Link Colors

The color of the link is distributed into three categories 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="php_tutorials.php" >PHP tutorials</a></body>


Link Usage

Text as link

<a href="">PHP Tutorials</a>


PHP Tutorials

Image as link

<a href=””><img src=””></a>


Email tag

<a href="">Send Mail </a>


Send Mail
Leave A Reply

Your email address will not be published.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More

Privacy & Cookies Policy