ITSourceCode.com

We Exist to Provide 100% Free Source Code and Tutorials

Custom Search

07-CSS Links

A person can style the links using CSS .
Links can be designed depending on their states:

  1. a:link– normal ,unvisited link by the user
  2. a:visited– link by the user
  3. a:hover– a link which changes it color when the user takes the mouse over it.
  4. a:active– a link which shows it color when it is just clicked.

 

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <style>
  5. /* unvisited link */
  6. a:link {
  7.     color: yellow;
  8. }
  9. /* visited link */
  10. a:visited {
  11.     color: blue;
  12. }
  13. /* mouse hover link */
  14. a:hover {
  15.     color: green;
  16. }
  17. /* selected link */
  18. a:active {
  19.     color: orange;
  20. }
  21. </style>
  22. </head>
  23. <body>
  24.  
  25. <p><b><a href=http://itsourcecode.com/ target="_blank">Here is a link</a></b></p>
  26. </body>
  27. </html>

 

You can even try different CSS properties in these links.

Facebook Comments

Check Your Domain Ranking

Leave a Reply

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

ITSourceCode.com © 2016 Frontier Theme

Subscribe For Latest Updates

Signup for our newsletter and get notified when we publish new articles for free!