Link styling in CSS

How to style buttons?

  • CSS pseudo selectors are used for styling buttons and links.

  • For styling buttons and links, we use: visited, hover, and active pseudo selectors.

This will be our basic boilerplate code for Link Styling in CSS


<!DOCTYPE html>
    <title> Styling Links in CSS </title>
    <a href="" target="_blank"> Geeks Help </a>

Uses of some pseudo Selectors

i) hover - This selector is used when we want to apply any changes on hover. 

a:hover {
        color: white;
        background: red;

ii) active - This selector is used when we want to show the active state of the button or link.

a:active {
        color: white;
        background: darkblue;

iii) visited - It is used when we want to apply changes to the link after visiting the link.

a:visited {
        color: purple;

Links styling in CSS Part-9 PDF

Post a Comment

* Please Don't Spam Here. All the Comments are Reviewed by Admin.

Top Post Ad

Below Post Ad

Ads Section