jump

HTML 5: The Markup Language (ARIA Edition)

button type=resetreset button # T

The button element with a type attribute whose value is "reset" represents a button for resetting a form.

Permitted contents #

Permitted attributes #

global attributes
Any attributes permitted globally.
name = string #
The name part of the name/value pair associated with this element for the purposes of form submission.
disabled = d:string "disabled" or d:string "" #
Specifies that the element represents a disabled control.
form = ID reference NEW #
The value of the id attribute on the form with which to associate the element.
type = d:string "reset" #
Specifies that its button element is a button for resetting a form.
value = string #
The value part of the name/value pair associated with this button for the purposes of form submission.
autofocus = d:string "autofocus" or d:string "" NEW #
Specifies that the element represents a control to which a UA is meant to give focus as soon as the document is loaded.

Additional constraints and admonitions #

Tag omission #

A button element must have both a start tag and an end tag.

Permitted parent elements #

any element that can contain phrasing elements

DOM interface #

interface HTMLButtonElement : HTMLElement {
           attribute boolean autofocus;
           attribute boolean disabled;
  readonly attribute HTMLFormElement? form;
           attribute DOMString formAction;
           attribute DOMString formEnctype;
           attribute DOMString formMethod;
           attribute boolean formNoValidate;
           attribute DOMString formTarget;
           attribute DOMString name;
           attribute DOMString type;
           attribute DOMString value;

  readonly attribute boolean willValidate;
  readonly attribute ValidityState validity;
  readonly attribute DOMString validationMessage;
  boolean checkValidity();
  void setCustomValidity(DOMString error);

  readonly attribute NodeList labels;
};