html redirect button code example

Example 1: html button redirect

For button redirection you can use below code:

Using these two type <button> and <input> tag:

<a href="http://www.google.com/">
   <button>Visit Google</button>
</a>
  
or:

<a href="http://www.google.com/">
   <input type="button" value="Visit Google" />
</a>
  
<!--
I hope it will help you.
Namaste
-->

Example 2: js go to page

window.location.href = "http://example.com/new_url";

Example 3: how to make a button in html go to another address

<a href="google.com">
  <button>Visit Google</button>
</a>