为什么我的<a> tag not work in </a> <button> <a> tag?

时间:2018-10-27 13:37:46

标签: html

This is my code (for example) and a tag dose not work:

<!doctype html>
<html>
 <head>
  <title> index </title> 
 </head>
 <body>   
  <button><a href="https://stackoverflow.com/">stack</a></button>
 </body>
</html>

2 个答案:

答案 0 :(得分:0)

转过来:将按钮换成a标签:

 <a href="https://stackoverflow.com/"><button>stack</button></a>

答案 1 :(得分:0)

您可以像

一样旋转
<a href=“link.com”><button><\button><\a>

或者有一个简单的选择

 <form action="http://link.com">
    <input type="submit" value="Go to Link”/>
</form>