0

i want to create a button in html which will take me to another page

2 Answers2

1

Try this code using button onclick event:

<html>
   <head>
      <title>Title of the document</title>
   </head>
   <body>
      <button onclick="window.location.href = 'https://www.w3schools.com/';">Click Here</button>
   </body>
</html
Pushprajsinh Chudasama
  • 7,772
  • 4
  • 20
  • 43
0

try this code

<a href='https://www.freecodecamp.org/'><button>Link To freeCodeCamp</button></a>