button
The button element represents a control allowing a user to trigger actions, when enabled. It is labeled by its content. 4.10.6. The button element
Links about button
HTMHell - #20 HTMHell special: close buttons
A collection of bad practices in HTML, copied from real websites.
A Complete Guide to Links and Buttons | CSS-Tricks
Our complete guide to links, buttons, and button-like inputs in HTML, CSS, and JavaScript.
The Links vs. Buttons Showdown — Marcy Sutton: #ID24 Nov 2017
Who would win in a showdown between HTML Links and Buttons? Marcy Sutton will settle it once and for all by pitting these opponents against each other in a d...
Tags:Just use button -- A11ycasts #05
Talking about tabindex and custom controls is super fun, and we’ll definitely be doing more of it in the future. But I wanted to pause for a moment and shine...
Tags:Unbuttoning Buttons | scottohara.me
Regardless of how one might feel about using CSS to disguise an HTML element as another, it can’t be denied that it’s a common, and sometimes necessary, prac...
Tags:HTMHell - #14 not my type
A collection of bad practices in HTML, copied from real websites.
HTMHell - #5 button-like-link
A collection of bad practices in HTML, copied from real websites.
HTMHell - #3 image-buttons
A collection of bad practices in HTML, copied from real websites.
HTMHell - #2 div with button role
A collection of bad practices in HTML, copied from real websites.
HTMHell - #1 button disguised as a link
A collection of bad practices in HTML, copied from real websites.
<button>: The Button element
The HTML button element represents a clickable button, used to submit forms or anywhere in a document for accessible, standard button functionality.
Code sample
<button type="submit">
Look ma', I'm not a div.
</button>
Explore other pages
- type="range"
Represents a control for setting the element’s value to a string representing a number.
- data-
Stores data in a custom attribute.
- display: contents
An element doesn't generate any boxes, but its children still do.
- svg
SVG is a language for describing two-dimensional graphics.