Remove blue highlight from tag

AYUSH KUSHWAHA
1
How to remove blue highlight form a tag

In This Blog I am going to tell you about how can you remove this blue highlight form


 

   <a href="#"></a>

  

 

I will tell you a very simple method then you can also remove.

EXAMPLE

With Highlight.

Click

without Highlight

Click

Have you seen the difference? Now I will tell you how to do this.

Have You ever heard about BOM(Browser Object Model)?

SEE THIS EXAMPLE

HTML 👇👇


    

 <h1 id="demo">CLICK ME TO VISIT</h1>

    

  

Now I will use javascript BOM(Browser Object Model).


    

 document.getElementById("demo").addEventListener("click", myFunction);

function myFunction() {

  window.location.href='https://curiouscoderayush.blogspot.com/'

}

  

All process is completed. You can Try it yourself.

If you have any problem kindly contact us or comment below,Thanks

Post a Comment

1Comments

  1. You can use CSS to remove the color, underline and tap-highlight color like this:
    `
    a:link {
    color: #000;
    text-decoration: none;
    -webkit'tap-highlight-color: transparent;
    }
    `

    ReplyDelete
Post a Comment