How to remove the dotted line around the clicked a element in CSS?

Spread the love

Sometimes, we want to remove the dotted line around the clicked a element in CSS.

In this article, we’ll look at how to remove the dotted line around the clicked a element in CSS.

How to remove the dotted line around the clicked a element in CSS?

To remove the dotted line around the clicked a element in CSS, we set the outline property.

For instance, we write

a,
a:active,
a:focus {
  outline: none;
}

to add the outline: none; style to the a element to remove its outline when it’s active or focused on or not.

Conclusion

To remove the dotted line around the clicked a element in CSS, we set the outline property.

Leave a Reply

Your email address will not be published. Required fields are marked *