8

I'm just wondering if input is part of the HTML5 spec or is button the better way or is there something else even better to use.

<input type="submit" value="submit"/>

<button type="submit">submit</button>
Venus
  • 81
  • 1
  • 2
  • 1
    possible duplicate of [ – Roman Jun 06 '13 at 13:30
  • 1
    Take a look at [this question](http://stackoverflow.com/questions/469059/button-vs-input-type-button-which-to-use). – Daanvn Jun 06 '13 at 13:30
  • Good link. It's type=submit here, though, so not an exact duplicate. – Thilo Jun 06 '13 at 13:32

2 Answers2

3

From the MDC docs:

"<button> elements are much easier to style than <input> elements. You can add inner HTML content (think <em>, <strong> or even <img>), and make use of :after and :before pseudo-element to achieve complex rendering while <input> only accepts a text value attribute."

Russell Zahniser
  • 16,188
  • 39
  • 30
1

Their difference lies in how you use them. Whilst their basic function is the same the main difference is that you can put HTML in a <button> element.

<button> also is known to have issues in some versions of IE (IE6)

Colin Bacon
  • 15,436
  • 7
  • 52
  • 72