How to disable a link in HTML? - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

How to disable a link in HTML?

Damian99Damian99 USAPosts: 116Member

I need to disable a link in the HTML file. Can we do this using JavaScript?

Tagged:

Comments

  • DavidMDavidM USAPosts: 342Member
    <style>
    .disabledLink{
        /*Disabled link style*/
        color:black;
    }
    </style>
    
    <a class="disabledLink" href="javascript:void(0)">Your disabled link</a>
    
Sign In or Register to comment.