Home <button> vs. <input type="button" />. Which to use?
Reply: 0

<button> vs. <input type="button" />. Which to use?

user7881
1#
user7881 Published in September 19, 2018, 7:17 pm

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?
share|improve this question
  • 4
    Button has a lot of issues, as listed here: stackoverflow.com/questions/1903453/… – Kzqai Dec 3 '11 at 15:50
  • 16
    tl;dr - button used to have issues (e.g. IE<=6). But not now. Use it - e.g. css-tricks.com/use-button-element – Snowcrash Jul 11 '14 at 18:51
  • 1
    use of input is best left for more advanced tasks like a select list or radio input or even check-box lists. where the button even with compat issues is more custom and need only to perform 1 function minimum. – CMS_95 Oct 27 '14 at 20:28

15 Answers 15

active oldest votes
up vote 595 down vote accepted
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.395447 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO