Menu Close

How to change link color of the current page with CSS?

Sometimes, we want to change link color of the current page with CSS.

In this article, we’ll look at how to change link color of the current page with CSS.

How to change link color of the current page with CSS?

To change link color of the current page with CSS, we set the color and background-color properties.

For instance, we write

.currentLink {
  color: #640200;
  background-color: #000000;
}

to set the text color of the link with the currentLink class to #640200.

And we set the background color to #000000.

Conclusion

To change link color of the current page with CSS, we set the color and background-color properties.

Posted in CSS