HTML Guide: How to assign a link to a button?

Problem:
I want to create a button that redirects to another webpage when you click it. Can I do that only using HTML?

Answer:
You just have to put the url from the website you want to redirect into the the from tag “<form>” and assign it to the action attribute.

Example:
<form id=”id01″ action=”https://speedrun.com”
<input type =”submit” value=”Visit Speedrun.com” />
</form>


More about HTML


W3Schools


back