Apply Colors to the Hyperlinks

This “Apply Colors to Hyperlinks” post explains how to apply colors to different links such as default link color, visited link color and Active link with suitable examples.

Colors to Hyperlinks:

  • The default hyperlink color is blue when we click on the link the color changes to purple.
  • If we want to apply a color to the hyperlink, we have to use 3 attributes namely link, alink, vlink.
  • alink stands for the Active link.
  • vlink stands for the Visited link.
  • By using ‘link’ attribute we can apply the color to the hyperlink that would appear on web page.
  • We can change the color when we click on that link by using ‘alink’ attribute.
  • Suppose we want to change the color of the hyperlink once the external web page is opened to that corresponding link, we use ‘vlink’.

<!DOCTYPE html>
<body link=”red” alink=”green” vlink=”black”>
<a href=””>Search</a></br>
<a href=””>Send Mail</a></br>
<a href=””>News</a></br>
<a href=””>Social Media</a>

Next Topic:                    HTML Comments – HTML Tutorial

Share this