Widely available Supported across all major browsers. Safe to use in production.

Browser support

Feature Desktop Mobile
Chrome
Edge
Firefox
Safari
Chrome Android
Safari iOS
1
12
1
1
18
1
1+Supported (version) Not supported Has note Sub-feature descriptions sourced from MDN Web Docs (CC BY-SA 2.5)

Syntax

HTML
<input type="button" value="クリック"
  onclick="alert('クリックされました')">
<!-- 推奨: <button type="button">クリック</button> -->

Live demo

button type Input

clickpossiblebutton create.button element and. comparison. with input type=button

PreviewFullscreen

Button element and. Comparison

Input type=button and button element. Difference.

PreviewFullscreen

forminside. button

submit / reset / button Compare usage. with forminside.

PreviewFullscreen

Use cases

  • Using <input type="button">

    <input> elements of type button are rendered as push buttons, which can be programmed to control custom functionality anywhere on a webpage as required when assigned an event handler function (typically for the click event).

Cautions

  • May not be supported in older browsers.

Accessibility

  • Verify how this element is announced by screen readers.