For styling hyperlinks in CSS, you never want to target the <a> tag itself; instead you want to target the attributes of the <a> tag for styling. There are 4 main tags that you’ll likely stylize for hyperlinks:
1) a:link – This determines the styling of a link when its idle (I.E not being hovered over or clicked.) You’ll most likely only stylize the color of the idle hyperlink, or remove the underline links have with “text-decoration: none;”.
2) a:visited – This determines the link if you already visited the site it links to already. Most of the time you’ll either not stylize this attribute, or just change its color (mostly to the same color as an idle non-visited link, if anything.)
3) a:hover – This determines what happens to the link when you hover over it. This one is the one hyperlink styling attribute you would style the most. Some popular choices of styling would be the color, the font-weight, and the text-decoration.
4) a:active – This determines what happens when you click the link. Again, you’ll likely not stylize this link attribute too much, if anything, as the most you’ll likely ever do is change the link color, background-color, font-style, and/or font-weight.
