Advertisement
here2share

HTML link states

Aug 16th, 2016
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.60 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <style>
  5. /* unvisited link */
  6. a:link {
  7.     color: blue;
  8. }
  9.  
  10. /* visited link */
  11. a:visited {
  12.     color: red;
  13. }
  14.  
  15. /* mouse over link */
  16. a:hover {
  17.     color: green;
  18. }
  19.  
  20. /* selected link */
  21. a:active {
  22.     color: orange;
  23. }
  24. </style>
  25. </head>
  26. <body>
  27.  
  28. <p><b><a href="http://www.w3schools.com" target="_blank">This is a link</a></b></p>
  29. <p><b>Note:</b> a:hover MUST come after a:link and a:visited in the CSS definition in order to be effective.</p>
  30. <p><b>Note:</b> a:active MUST come after a:hover in the CSS definition in order to be effective.</p>
  31.  
  32. </body>
  33. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement