CSS links

Unique beauty

CSS Links:

A link is a connection from one web page to another web page. CSS property can be used to style the links in various different ways.

➡States of Link:

 Before discussing CSS properties, it is important to know the states of a link. Links can exist in different states and they can be styled using pseudo-classes. 

➡There are four states of links given below: 


*a:link => This is a normal, unvisited link.
*a:visited => This is a link visited by user at least once
*a:hover => This is a link when mouse hovers over it
*a:active => This is a link that is just clicked.

Syntax: 

a:link {
    color:color_name;
}

➡The default value of links: 

👉By default the links created are underlined.
👉When the mouse is hovered above a link, it changes to a hand icon.
👉Normal/unvisited links are blue.
👉Visited links a colored purple.
👉Active links are colored red.
👉When a link is focused, it has an outline around it.

➡Example: This example shows the basic use of links in CSS.

<!DOCTYPE html>
<html>
 
<head>
    <title>CSS links</title>
    <style>
        p {
            font-size: 25px;
            text-align: center;
        }
    </style>
</head>
 
<body>
    <p>
        <a href="https://Uniquebeautyyy.blogspot.com/">
           Unique beauty Simple Link
        </a>
    </p>
</body>
 
</html>

Output:

Unique beauty This link will change colours with different  states







Our website uses cookies to enhance your experience. Learn More
Accept !

GocourseAI

close
send