HomeReferencesHTML Tags

HTML Tag: button

Defines a form button that has content within it.

HTML Dog, The Book HTML Dog book cover

HTML Dog is hosted by Titan Internet

Required Attributes

  • None.

Optional Attributes

  • accesskey can be used to associate a particular keyboard shortcut to the element.
  • tabindex can be used to specify where the element appears in the tab order of the page.
  • disabled can be used to disable the button. It must be used in the format disabled="disabled".
  • name can be used to associate a name to the button so that it can be processed by a form-handling script.
  • type can be used to specify the button type. Values can be button (doesn't do anything), submit (default; submits the form when the button is selected) or reset (resets the form).
  • value can be used to specify an initial value.
  • Common attributes

Example


<button>Push my <strong>button</strong> baby</button>