Home > Article > Web Front-end > How can we include legal number ranges for input fields in HTML?
Use the step attribute to include legal numeric intervals for input fields in HTML. The HTML input type step attribute sets the legal number interval. Steps are numerical steps, such as 0, 5, 10, 15, 20, etc. The step attribute can be used with the max and min attributes to create legal range values.
You can try running the following code to implement StepsProperties -
<!DOCTYPE html> <html> <head> <title>HTML input step attribute</title> </head> <body> <form action = "" method = "get"> <input type = "number" name = "points" step = "5"><br> <input type = "submit" value = "Submit"> </form> </body> </html>
The above is the detailed content of How can we include legal number ranges for input fields in HTML?. For more information, please follow other related articles on the PHP Chinese website!