I started using a diagnostic css stylesheet, e.g. http://snipplr.com/view/6770/css-diagnostics--highlight-deprecated-html-with-css--more/
One of the suggested rules highlights input tags with the type submit, with the recommendation to use <button>
as a more semantic solution. This is a new tag to me, do you guys recommend it, or are there disadvantages (such as with browser compatibility) that you have run across?
Edit:
Just to be clear, I understand the spec of <button>
, it has a defined start and end, it can contain various elements, whereas input is a singlet and can't contain stuff. What I want to know essentially is whether it's broken or not. So despite never having used it before, I'd love to start using it, I just don't know how well it works in the real world. The first answer below does seem to imply that it is broken for uses except outside of forms, unfortunately.
Edit:
Conclusion
Button tag: not worth the trouble, just use input for now.
Button is essentially not worth it while ie6 and ie7 remain in circulation, it seems to be much much more trouble than the minor benefit that it might have been worth.