CSS Links

CSS Links

Styling of links is quite important for any website. The hyperlinks should be clearly visible to every user and should be given a proper styling. Here, we will learn about CSS links.

Links have some states, such as hover when you place mouse cursor over it, visited means the link you have visited, active when a link is clicked, and link is an unvisited link that will be visible to users.

Here, we will see all the above states,

Set color for Link (:link)

Here’s an example to show how you can set color for a link.

Here’s the output,

CSS Links property

Visited Link Color (:visited)

Here’s an example showing how to set the color of the links already visited by the user,

Here’s the output,

CSS Visited Link property

Hover Link Color

Here, with hover, set the hover link color. As in the following code and figure, whenever you will hover the mouse cursor over the link, it will shows you the link color #6dc430,

Here’s the output,

CSS Hover Link property

Active Link Color (:active)

Here, with active, set the active link color.

Here’s the output,

CSS Active Link property

Link Color

We saw before how to work around CSS links i.e. adding hover link color, visited link color, etc. Use the following color property to change the color of links,

Here’s the output,

CSS links color

CSS Fonts
CSS Images
Studyopedia Editorial Staff
Studyopedia Editorial Staff
[email protected]

We work to create free tutorials for all.

No Comments

Post A Comment