views:

5944

answers:

4

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

<input type="button" />

instead of:

<button></button>
  • What are the main differences between the two, if any?
  • Are there valid reasons to use one instead of the other?
  • Are there valid reasons to use combine them?
  • Does using <button> come with compatibility issues, seeing it is not very widely used?
+6  A: 

Quote

Important: If you use the button element in an HTML form, different browsers will submit different values. Internet Explorer will submit the text between the <button> and </button> tags, while other browsers will submit the content of the value attribute. Use the input element to create buttons in an HTML form.

From : http://www.w3schools.com/tags/tag_button.asp

If I understand correctly, the answer is compatibility and input consistency from browser to browser

Please use correct formatting for quotes. http://stackoverflow.com/editing-help
Gumbo
+6  A: 

This article seems to offer a pretty good overview of the difference.

Noldorin
+1 Great article. Thanks.
Alan
+2  A: 

Quoting the Forms Page in the HTML manual:

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.

gimel
+17  A: 
  • Here's a page describing the differences (basically you can put html into a <button></button>)
  • And an other page describing why people avoid <button></button> (Hint: IE6)

Also, an other IE problem to consider:

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.

DrJokepu
what was the other IE problem your 3rd link was supposed to go to (its a dead link now)?
J3M 7OR3
@J3M 7OR3: It's quoted just below the link, in the grey box.
DrJokepu