Define a field for entering a number (You can also set restrictions on what numbers are accepted):
The <input type="number">
defines a field for entering a number.
Use the following attributes to specify restrictions:
Tip: Always add the <label>
tag for best accessibility practices!
<input type="number">
Example:
HTML
<label for="quantity">Quantity (between 1 and 5):</label>
<input type="number" id="quantity" name="quantity" min="1" max="5">
Type: | Html |
Category: | Web Tutorial |
Sub Category: | HTML Tag |
Uploaded by: | Admin |