how do i make a link of a button go on a different page

Hello developers! In this post I have shared the details about “how do i make a link of a button go on a different page”. Okay, let’s move on to the post.

how do i make a link of a button go on a different page

//To make button work like a tag do this:
<button type="button" onclick="window.location.href="https://www.codegrepper.com/code-examples/html/index.html"">Go Back</button>
<button type="button" onclick="window.location.href="https://www.codegrepper.com/code-examples/html/the link you want the button to take you to"">Click me</button>
<form method="get" action="/page2">
    <button type="submit">Continue</button>
</form>
a.button 
    -webkit-appearance: button;
    -moz-appearance: button;
    appearance: button;

    text-decoration: none;
    color: initial;

Conclusion

I hope this tutorial helps you to know about “how do i make a link of a button go on a different page”. If you have any doubts regarding this post please let us know via the comment section. Share this post with your friends & family via social networks.

Hi, I'm Ranjith a full-time Blogger, YouTuber, Affiliate Marketer, & founder of Coder Diksha. Here, I post about programming to help developers.

Share on:

Leave a Comment