![]() |
Here is a list of some common input restrictions:
You will learn more about input restrictions in the next chapter. The following example displays a numeric input field, where you can enter a value from 0 to 100, in steps of 10. The default value is 30: |
Example:
HTML
<!DOCTYPE html>
<html>
<body>
<h2>Numeric Steps</h2>
<p>Depending on browser support: Fixed steps will apply in the input field.</p>
<form action="/action_page.php">
<label for="quantity">Quantity:</label>
<input type="number" id="quantity" name="quantity" min="0" max="100" step="10" value="30">
<input type="submit" value="Submit">
</form>
</body>
</html>
Example | HTML Input Types |
Read Full: | HTML Input Types |
Category: | Web Tutorial |
Sub Category: | HTML Input Types |
Uploaded: | 1 year ago |
Uploaded by: | Admin |
Views: | 54 |
Reffered: https://www.w3schools.com/html/html_form_input_types.asp