How to use a hyperlink with button tag. | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 3

How to use a hyperlink with button tag.

12th Jun 2018, 12:02 PM
aditya
aditya - avatar
4 Respostas
+ 1
Either this: <a href = ā€œwebsite-name.comā€><button>Click to go to website-name.com</button></a> Or this: <button onclick = ā€œwindow.open(ā€˜website-name.comā€™);ā€>Click to go to website-name.com</button> In both examples, replace website-name.com with the name of the website. Hope this helps!
13th Jun 2018, 6:22 AM
Rowsej
Rowsej - avatar
+ 5
<a href="#"><button></button></a> if you want to make any element behave like an hyperlink...just nest in <a></a> tags
12th Jun 2018, 12:13 PM
į Œį ŒBrains[Abidemi]
į Œį ŒBrains[Abidemi] - avatar
+ 1
<a href= "#"><button>#</button></a> Nest the button tag in the <a> hyperlink tag
14th Jun 2018, 12:38 PM
Ayodeji .T. Sokan
Ayodeji .T. Sokan - avatar