a:hover {
color: blue;
}
You will notice that we have added on a state modifier with the ‘:hover’. This code now means that whenever we hover over the link, the text will turn blue. There are four states in total that we can watch out for. They are:
By using these states we are able to enhance our websites and convey extra meaning to our users about the links on our website.
Now that we have covered the essentials of CSS and a number of crucial concepts, Chapter 5 will build upon this knowledge as we look at colour, borders, margins, padding, floats and more about the box model.