Styling Links | Sololearn: Learn to code for FREE!


Styling Links

What does this statement mean ? When setting the style for several link states, there are some order rules: - a:hover MUST come after a:link and a:visited - a:active MUST come after a:hover Thank you for the answer !!

2/14/2017 11:37:22 AM

Samuele Sacchetti

3 Answers

New Answer


As @Roman Santa suggested: The order of these declaration are much more important than most of others ( but order is primordial too, just after priority rules of selectors ^^ ), as each can override others... so you need to always respect the right order to avoid unexpected result ( or get an expected one :P )


CSS is not my cup of tea but i think this rules are there to avoid "overriding" styles before. So, if you use hover and then link.. link could not appear correctly as expected. #imo


so if I will write both a:link and a:hover I have to write before a:link and then a:hover, right ?