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

index.html

<!DOCTYPE html>
<html>
<head>
    <title> Styling Links in CSS </title>
    <style>
       
    </style>
</head>
<body>
    <a href="https://www.geekshelp.org" target="_blank"> Geeks Help </a>
</body>
</html>


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

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

Top Post Ad

Below Post Ad