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.

**Syntax:

**Example: In this example, we will demonstrate the use of HTML element.

html `

HTML input Type Number
<h2>HTML &lt;input type="number"&gt;</h2>

<form action="#">
    <label for="number">Enter Number:</label>
    <input type="number" id="number" 
        value="10" step="5">
</form>

`