type="number"
The input element represents a control for setting the element’s value to a string representing a number. 4.10.5.1.12. Number state (type=number)
Links about type="number"
Why the GOV.UK Design System team changed the input type for numbers
We take a look at why the GOV.UK Design System changed the element it uses for inputting numbers, making it more accessible and easier to use
Tags:You probably don’t need input type=“number”
Last week I got a call from my bank regarding a wire transfer I had just scheduled. The customer support guy had me repeat everything back to him because there seemed to be a problem with the information. “Hmmmm, everything you said is right right except the last 3 digits of the account number.”
Tags:<input type=“number”>
input elements of type number are used to let the user enter a number. They include built-in validation to reject non-numerical entries.
Code sample
<label>
How much do you want to charge?
$<input type="number" min="0" step="0.01">
</label>
Explore other pages
- clip-path
Specifies a basic shape or references a clipPath element to create a clipping path.
- multiple
Enables form controls to accept one or more values.
- progress
Represents the completion progress of a task.
- type="search"
A text field designed for the user to enter search queries into.