Answers for "how to create link with button in html"

40

html button link

<button><a href='https://google.com' alt='Broken Link'>This is a button</a></button>
Posted by: Guest on February-02-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

Code answers related to "how to create link with button in html"

Browse Popular Code Answers by Language