So, i am creating this webpage, that opens another page in the same directory on the click of a button. While doing so, I observed something which I couldn't find an satisfactory explanation to. The button code I am using is this
<a class="class1" href="webpage2.html"><button type="button">Button1</button></a>
this seems to work, but not this,
<button type="button"><a class="class1" href="webpage2.html">Button1</a></button>
Why is this so? (Am I missing something very simple?)