Run ❯
Get your
own
website
Result Size:
625 x 565
×
Change Orientation
Save Code
Change Theme, Dark/Light
Go to Spaces
<!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 type attribute of the link above to "text/html".</p> <button onclick="myFunction()">Try it</button> <p id="demo"></p> <script> function myFunction() { document.getElementById("myAnchor").type = "text/html"; document.getElementById("demo").innerHTML = "The value of the type attribute of the link above is now 'text/html'."; } </script> </body> </html>