This repository was archived by the owner on Feb 1, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 310
W007
Chris Rebert edited this page Mar 28, 2015
·
2 revisions
It's best-practice to always set a type
on <button>
s. If a <button>
lacks a type
attribute, it defaults to being a type="submit"
button, which will cause it to, when clicked, submit any form it's associated with. This behavior is often not desired, so it's best to be explicit about the type
of all your <button>
s. Valid type
s are: type="button"
, type="submit"
, and type="reset"
.
See also: WTF, HTML and CSS?: Always set a type
on <button>
s
Bootlint documentation wiki content is licensed under the CC BY 3.0 License, and based on Bootstrap's docs which are copyright Twitter, Inc.