HyperText Markup Language/Tag List/button

From Wikibooks, open books for an open world
Jump to navigation Jump to search

This tag is used for declaring a button on the HTML page. The input tag is more common in declaring a button.

Example

[edit | edit source]
<button name="button_one" value="click">Click Me</button>

Optional attributes

[edit | edit source]

disable

[edit | edit source]

Used to disable the button.

Names the button. Used for pages with scripts on them.

Declares the type of the button. The user has three choices:

  • button: Standard button
  • reset: Resets the form that the button is in.
  • submit: submits the form to a page specified.

value

[edit | edit source]

Declares a value in the button. Used with scripts.

Standard attributes

[edit | edit source]

More info

[edit | edit source]

w3school button tag