HyperText Markup Language/Tag List/button

From Wikibooks, the open-content textbooks collection

Jump to: navigation, search

Contents

[edit] Use

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

[edit] Example

<button name="button_one" value="click">Click Me</button>

[edit] Optional attributes

[edit] disable

Used to disable the button.

[edit] name

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

[edit] type

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.

[edit] value

Decalares a value in the button. Used with scripts.

[edit] Standard attributes

[edit] id

[edit] class

[edit] title

[edit] style

[edit] dir

[edit] lang

[edit] xml:lang

[edit] accesskey

[edit] tabindex

[edit] More info

w3school button tag