make a button link to another page html code example

Example 1: href on a button

<button onclick="window.location.href='/page2'">Continue</button>

Example 2: how to add button to open a website using html

<button onclick="window.open('http://www.example.com')">
</button>

Example 3: button html link to another page

<input type="button" onclick="location.href='https://google.com';" value="Go to Google" />

Example 4: button href

a.button {
    -webkit-appearance: button;
    -moz-appearance: button;
    appearance: button;

    text-decoration: none;
    color: initial;
}

Tags:

Css Example