Opens in a new tab
A picture of Jeff Brigman
I CODE TODAY FOR
A BETTER TOMORROW

Glossary Term

HTML button element

3 tags 1 category

The <button> HTML element is an interactive element activated by a user with a mouse, keyboard, finger, voice command, or other assistive technology. Once activated, it then performs an action, such as submitting a form or opening a dialog.

By default, HTML buttons are presented in a style resembling the platform the user agent runs on, but you can change buttons’ appearance with CSS.

Attributes: autofocus This Boolean attribute specifies that the button should have input focus when the page loads. Only one element in a document can have this attribute.

Attributes: commandfor Turns a <button> element into a command button, controlling a given interactive element by issuing the command specified in the button’s command attribute. The commandfor attribute takes the ID of the element to control as its value. This is a more general version of popovertarget. disabled This Boolean attribute prevents the user from interacting with the button: it cannot be pressed or focused. form The <form> element to associate the button with (its form owner). The value of this attribute must be the id of a <form> in the same document. (If this attribute is not set, the <button> is associated with its ancestor <form> element, if any.)

Term Connections

Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.

Loading term connections…