HTML <input type="number"> (original) (raw)
Last Updated : 25 May, 2026
The HTML element is used to create a numeric input field in a form. It allows users to enter only numerical values.
- Used to accept numeric input from users.
- Created using inside a form.
- Supports attributes like min, max, step, value, and required.
**Syntax:
**Example: In this example, we will demonstrate the use of HTML element.
html `
HTML input Type Number<h2>HTML <input type="number"></h2>
<form action="#">
<label for="number">Enter Number:</label>
<input type="number" id="number"
value="10" step="5">
</form>
`