4

Why there are different approach to create a button, and which one to use when.

<form>
<input type="button">
<button type="button"></button>
</form>

I would like to have some explanation.

Mario
  • 679
  • 6
  • 10
  • 2
    With a – Oliwol May 09 '17 at 16:53

1 Answers1

1

There are several difference but from you code the most relevant is

<input type="button"> as an input field is submited when the form is sended to the server for elab and you could eval serverside the content of value attribute assigne to the input nutton

<button type="button"></button> is only a client local tag

ScaisEdge
  • 131,976
  • 10
  • 91
  • 107