you want to disable anchor tag in html using css, jquery and javascript. you will learn how to disable a tag in html.
I am explaining you, how to disable anchor tag in html using css. let’s see example :
Example 1 :
<!DOCTYPE html>
<html>
<head>
<title>How to Disable a Anchor Tag in HTML using css ? </title>
<style type="text/css">
a.disabled {
pointer-events: none;
cursor: default;
opacity: .6;
}
</style>
</head>
<body>
<h1>How to Disable a Anchor Tag in HTML using css ?</h1>
<a href="https://webdeveloperindia.in" class="disabled">https://webdeveloperindia.in</a>
</body>
</html>
I am explaining you, how to disable anchor tag in html using jQuery. let’s see example :
Example 2 :
<!DOCTYPE html>
<html>
<head>
<title>How to Disable a Anchor Tag in HTML using jQuery ?</title>
</head>
<body>
<h1>How to Disable a Anchor Tag in HTML using jQuery ?</h1>
<a href="https://webdeveloperindia.in" onclick="return false;">https://webdeveloperindia.in</a>
</body>
</html>
I am explaining you, how to disable anchor tag in html using javascript. let’s see example :
Example 3 :
<!DOCTYPE html>
<html>
<head>
<title>How to Disable a Anchor Tag in HTML using javascript ?</title>
</head>
<body>
<h1>How to Disable a Anchor Tag in HTML using javascript ?</h1>
<a href="javascript:void(0);">https://webdeveloperindia.in</a>
</body>
</html>
Hello, Welcome to webdeveloperindia.in. I am a full-stack web developer. Email – [email protected] | Skype – azaruddin23. I have knowledge of PHP, Laravel, Magento 1/2, Codeigniter, WordPress, Joomla, Shopify, Git, Bitbuket, jQuery, Ajax, Javascript and ReactJS.