Different links can have different styles.
Links can be styled with any CSS property (for example
The style of the link can be any CSS property (such as color, font, background, etc.).
Special links can have different styles, depending on their status.
The four link states are:
- a: link-Normal, unvisited link
- a: visited-the link the user has visited
- a: hover-when the user mouses over the link
- a: active-the moment the link is clicked
When set to the style of several link states, there are some order rules:
- a: hover must follow a: link and a: visited
- a: active must follow a: hover
Common link styles
Based on the example of the color change of the link above, see what state it is in.
Let's go to the link style in some other common ways:
text-decoration attribute is mainly used to remove underscores in links:
The background color property specifies the link background color: