htmlbuttoncompatibility

<button> vs. <input type="button"> -- which to use?


When looking at most sites (including SO), most of them use:

<input type="button" />

instead of:

<button></button>

Solution

  • Another IE problem when using <button />:

    And while we're talking about IE, it's got a couple of bugs related to the width of buttons. It'll mysteriously add extra padding when you're trying to add styles, meaning you have to add a tiny hack to get things under control.