Answers for "link list button to link"

6

a link button

<input type="button" onclick="location.href='https://google.com';" value="Go to Google" />
Posted by: Guest on December-27-2020
-1

How to create an HTML button that acts like a link

<!-- VIA HTML -->

<form action="https://google.com">
    <input type="submit" value="Go to Google" />
</form>

<!-- VIA CSS -->

<a href="https://google.com" class="button">Go to Google</a>
a.button {
    -webkit-appearance: button;
    -moz-appearance: button;
    appearance: button;

    text-decoration: none;
    color: initial;
}


<!-- VIA JAVASCRIPT -->

<input type="button" onclick="location.href='https://google.com';" value="Go to Google" />
Posted by: Guest on April-03-2022

Browse Popular Code Answers by Language