47 of 133 menu

Tag button

The button tag creates a button for use in HTML forms, or simply as a design element (in which case it is often nested within a link).

Attributes

Attribute Description
type Specifies the button type.
Optional attribute. Defaults to button.

Values ​​of the type attribute

Meaning Description
button Normal button (default value).
submit Creates a button that submits form data to the server.
reset Creates a button that clears a completed form.

Example

Let's create a button using the button tag:

<button>click me</button>

:

See also

  • button submit,
    used to submit the form
  • button reset,
    used to reset form fields
byenru