6

I didn’t know about the <button> tag until today.

TRiG
  • 10,148
  • 7
  • 57
  • 107
omg
  • 136,412
  • 142
  • 288
  • 348

4 Answers4

8

Check this article

Inputs vs Buttons

Buttons created with the BUTTON element function just like buttons created with the INPUT element, but they offer richer rendering possibilities: the BUTTON element may have content. For example, a BUTTON element that contains an image functions like and may resemble an INPUT element whose type is set to “image”, but the BUTTON element type allows content.

rahul
  • 184,426
  • 49
  • 232
  • 263
7

Basically, <button> is more flexible as it can contain other tags inside it. Like,

<button type="submit"><strong>Click</strong> me, <em>user!</em></button>

You won't be able to do this with regular <input>.

n1313
  • 20,555
  • 7
  • 31
  • 46
0

You can include images in a <button> tag, but not in an <input> tag, amoung other differences

Amandasaurus
  • 58,203
  • 71
  • 188
  • 248
0

See: W3C site.

They are very similar but the <button> tag has a few extras that can be useful on the odd occasion.

TRiG
  • 10,148
  • 7
  • 57
  • 107
CJM
  • 11,908
  • 20
  • 77
  • 115