Pseudo-classes
A pseudo-class can be used to style an element based on the state it is in. Some of the most common examples of pseudo-classes are those used to show the states of hyperlinks, including link
, visited
, hover
, and active
(between click and release), which should be listed in this order to be effective.
Click on the hyperlinks in the example to see them in action. There is no value for visited
since the lack of an anchorA source or destination of a hyperlink. makes it impossible for a visit to take place.
Note:
Hints:
- undefined
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
<!DOCTYPE html>
<html lang="en">
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
p {
font-size: 2em;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX