Advertisement
Home Open Editor ❯

HTML <input> type Attribute

Example

<input type="number" name="rate" min="1" max="5">

Try this code ❯

Meaning

Provides control for entering a number.

Displays a spinner and adds default validation when supported. Displays a numeric keypad in some devices with dynamic keypads.

Following attributes to restrict on entry:


Standard Syntax

HTML: <input type="number">

XHTML: <input type="number" />


Advertisement

Home Open Editor ❯
Advertisement