HTML
The plain HTML way is to put it in a <form>
wherein you specify the desired target URL in the action
attribute.
<form action="http://google.com">
<input type="submit" value="Go to Google">
</form>
Set if necessary CSS display: inline;
on the form to keep it in the flow with the surrounding text.
CSS
If CSS is allowed, simply use an <a>
which you style to look like a button using among others the appearance
property (only IE support is currently (July 2015) still poor).
<a href="http://google.com" class="button">Go to Google</a>
a.button {
-webkit-appearance: button;
-moz-appearance: button;
appearance: button;
text-decoration: none;
color: initial;
}
Or pick one of those many CSS libraries like Bootstrap.
JS
If JavaScript is allowed, set the window.location.href
.
<input type="button" onclick="location.href='http://google.com';" value="Go to Google" />
Source