Skip to content
Justice Tech School

Link Colours and States

Links are blue, visited links purple and active links red by default. Style the states with CSS pseudo classes: a:link, a:visited, a:hover and a:active.

Example
<style>
  a:link { color: #14b8a6 }
  a:visited { color: #a78bfa }
  a:hover { color: #f59e0b; text-decoration: none }
</style>
<a href="#one">Hover or click me</a>

Exercise

State when the mouse is over.

a: { color: red }

Quiz Test

Which state is a clicked link?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.