Add links on buttons

How do i add a link on a button? so when they click the button it goes to another website

Simply wrap the <button> element in an <a> element.

If you are missing the “hand” cursor, you can add the css rule button { cursor : pointer; }


.btn {
	background: #08a;
	color: white;
	padding: 4px 16px;
	border: none;
	border-radius: 16px;
div {
	margin: 2em 0;
button {
	cursor: pointer;

    <a href=""><button>Native button</button></a>

    <a href=""><button class="btn">Styled button</button></a>

<button onclick=" window.location = '' ">Click me!</button>

u can just do a href="(link)" inside the buttons scripts