HTML <button> tag

Usage

Creates a button, which may contain text or an image. Differs from the <input> Submit and Reset buttons in that you can get it to perform any action you choose by using scripting or a normal HTML hyperlink.

Example

Code:

<button>
Click here!
</button>

Output:

Required Attributes

  • none

Optional Attributes

  • disabled - disables the button by default
  • name - a unique name for the list
  • type - button, submit, reset - defines the type of button to be used
  • value - specifies the text to be shown on the button

Core Attributes