![]() |
To use an HTML button as a link, you have to add some JavaScript code. |
Example:
HTML
<!DOCTYPE html>
<html>
<body>
<h2>Button as a Links</h2>
<p>Click the button to go to the HTML tutorial.</p>
<button onclick="document.location='https://itupto.com'">HTML Tutorial</button>
</body>
</html>
What is HTML Links | HTML Links |
How to create HTML Links - Syntax | HTML Links |
How to create HTML Links The target Attribute | HTML Links |
What is Absolute URLs vs. Relative URLs | HTML Links |
How to use an Image as a Link | HTML Links |
How to use Link to an Email Address | HTML Links |
How to create Button as a Link | HTML Links |
How to use a title in Link | HTML Links |
Full Example of Button as a Link | HTML Links |
Read Full: | HTML Links |
Category: | Web Tutorial |
Sub Category: | HTML Links |
Uploaded: | 1 year ago |
Uploaded by: | Admin |
Views: | 171 |
Reffered: https://www.w3schools.com/html/tryit.asp?filename=tryhtml_links_button_element