freeCodeCamp/guide/english/css/selectors/pseudo/link/index.md

27 lines
441 B
Markdown
Raw Normal View History

2018-10-12 19:37:13 +00:00
---
title: Link
---
## Link
The `:link` CSS pseudo-class is used to target all unvisited elements (e.g. anchor `<a>` elements) that have an `href` attribute, even if the `href` has an empty value.
General Syntax:
```css
target:link
```
## Example
```css
/* Selects any <a> that has not been visited yet */
a:link {
color: red;
}
```
#### More Information:
- [:link (MDN)](https://developer.mozilla.org/en-US/docs/Web/CSS/:link)