dresden_phoenix — 2011-04-14T02:00:51-04:00 — #1
I am curious, what is the considered best practice for using the <input type='button'> vs <button type='button'> on a form. Is there an advantage of using one over the other.. does each have some sort of semantic meaning, or is one easier to style than the other???
the wisdom of the experts is much appreciated.
felgall — 2011-04-14T02:48:18-04:00 — #2
Using <button> allows you to use HTML to define the button content whereas using <input type="button"> doesn't.
as compared to
<input type="button" value="Press here.">
dresden_phoenix — 2011-04-14T02:54:30-04:00 — #3
is that the only difference? no behavioral change or semantic meaning? is it poor form ( no pun) to use buttons as ... well, buttons... for example in a dynamic form when you are addig/revealing or hiding fields... I am tempted to use buttons (and by extension wondered about input type button) when providing a user with an interface to hide /show/add/remove fields in a form....