Get your own website Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<body>
<p><a id="myAnchor" href="https://www.w3schools.com">W3Schools</a></p>
<p>Click the button to set the value of the rel attribute of the link above to "nofollow".</p>
<button onclick="myFunction()">Try it</button>
<p id="demo"></p>
<script>
function myFunction() {
  document.getElementById("myAnchor").rel = "nofollow";
  document.getElementById("demo").innerHTML = "The value of the rel attribute of the link above is now 'nofollow'.";
}
</script>
</body>
</html>