Playing with CSS classes for web links

Hello Gang,

I have written a basic CSS style block to alter web links on a web page. However, I just wanted to push myself a bit further and write a CSS class that alters the weblinks too.

My CSS style block is this

a:link {color: blue;} a:hover {text-decoration: underline;} a:visited {color: blue;}

Now I wanted to convert this into a class and assign to one link only. So I thought this

.link { color: blue; another option here another option here }

As you can see I have a basic idea for the CSS class, but have no idea what values I put for visited links, and hover options .

Any ideas how I write that bit of code?


You need to use pseudo classes :wink:, check this link

1 Like

Hi thomlom,

thank you very much. Onwards to the link and more learning. Thank you again.