Languages
[Edit]
EN

CSS - styling web page links (default, active, visited, hover)

3 points
Created by:
Walter
586

In this article, we would like to show you how to style web page links using CSS.

Quick solution:

Note:

It is important to keep the order of the styles above because they may not work in other configurations.

 

Preview:

Links styles created using pseudo-classes in CSS.
Links styles created using pseudo-classes in CSS.

Practical example

Edit

In this example, we specify the styles for links on our web page using :link, :visited, :hover and :active pseudo-classes keeping the correct order.

 

See also

Edit
  1. CSS - remove link underline

  2. CSS - change visited link style

  3. CSS - change link style on mouse hover

References

Edit
  1. :link - CSS: Cascading Style Sheets | MDN
  2. :visited - CSS: Cascading Style Sheets | MDN
  3. :hover - CSS: Cascading Style Sheets | MDN
  4. :active - CSS: Cascading Style Sheets | MDN
  5. Pseudo-classes - CSS: Cascading Style Sheets | MDN

Alternative titles

  1. CSS - style web page links (default, active, visited, hover)
1
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join