The :link
pseudo-class allows you to select links within elements.
It will select any link that has not yet been visited, even those that are already styled, using selectors with other link-related pseudo-classes like :hover
, :active
or :visited
. To style links properly, you need to insert :link
rules before others, as defined by the LVHA order: :link
- :visited
- :hover
- :active
. The :focus
pseudo-class is usually placed right before or right after :hover
, depending on the desired effect.
element:link {
property: value;
}