skip to Main Content

I there any way to remove the default hover effect of an anchor tag.
By default, on hovering anchor tag its background turns somthing like light blue.

Imo this is not possible, but trying my luck if somebody had done it before.

Below is the example of an anchor tag(without any link).

<a href="#">This is a link</>

I have tried :hover, :focus, :active but didn’t got the solution.

2

Answers


  1. You didn’t close your anchor tag properly. You would simply use a:hover to set default hover attributes for all anchor tags.

    a:hover {
     color: crimson;
     /* Add more default hover styling here. */
    }
    <a href="#">This is a link</a>
    Login or Signup to reply.
  2. Try this

    <style>
        a {
            background: none;
            text-decoration: none;
            color: inherit;
        }
    
        a:hover,
        a:focus,
        a:active {
            background: none;
            text-decoration: none;
            color: inherit;
        }
    </style>
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search