Link styling in CSS
- CSS pseudo selectors are used for styling buttons and links.
- For styling buttons and links, we use: visited, hover, and active pseudo selectors.
Basic code for Link Styling
<!DOCTYPE html>
<html>
<head>
<title> Links</title>
<link rel=" shortcut icon" href=" favicon.png" >
<link rel=" stylesheet" href=" style.css" >
</head>
<body>
<a href="url" target="_blank"> Mallu Coder Sugu</a>
</body>
</html>
Uses of some pseudo selectors :
- Hover -
This selector is used when we want to apply any changes on hover.a :hover {color: red;background:white} - active -
This selector is used when we want to show the active state of the button or link.a :active {color: white;background:blue} - visited -
It is used when we want to apply changes to the link after visiting the link.a :visit {color: purple;}
Introduction to CSS Part-2 PDF Click here to download
Easy Pickup
- 1. CSS More Samples
- 2. CSS Malayalam Classes
- 3. CSS Malayalam Notes