3 ms·
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button https://developer.mozilla.org/en-US/docs/Web/HTML/Element/bu...
by ehsanu1 13y ago
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button https://developer.mozilla.org/en-US/docs/Web/HTML/Element/bu...
- weland 13y agoI think we both know that's not what I was referring to. It's stuff like this one (PhoneGap, but really, it's like this almost everywhere): <a href='#' class="button header-button header-button-left">Back</a>. Unless I am mistaken and you can build the whole UI out of form elements (perhaps you can, but I'm not sure I've actually seen that done anywhere), that's simply not sufficient.
- ehsanu1 13y agoI took your comment to mean that no button element exists, but I suppose that was not your intention. But I did realize you were referring to links being abused as buttons. I think the issue is simply that buttons tend to have more default styling you need to override, which is more likely to vary across platforms since the default style is generally chosen to mimic the system's native buttons. Whereas default styling for links is quite simple across all platforms. Besides that, there is no particular problem with using real button elements instead of link elements as far as I'm aware, just a matter of habit and convenience.