- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How do we include the legal number intervals for an input field in HTML?
Use the step attribute to include the legal number intervals for an input field in HTML. The HTML input type step attribute sets the legal number intervals. Steps are number steps like 0, 5, 10, 15, 20, etc. The step attribute can be used together with the max and min attributes to create a range of legal values.
You can try to run the following code to implement step attribute −
<!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>
- How to include an input field in HTML?
- How do we include an anchor in HTML?
- How do we include an emphasized text in HTML?
- How do we include attributes for table columns in HTML?
- How do we include a section in an HTML document?
- How do we include an inline sub window in HTML?
- How do we add a single-line input field in HTML?
- How do we include big text in HTML?
- How do we include a table caption in HTML?
- How do we include the direction of text display in HTML?
- How do we set the input type for an Android EditText programatically?
- How do we add the width in characters for <input> in HTML?
- How do we take password input in HTML forms?
- How do we reset all the input fields in HTML forms?
- How to disable autocomplete of an HTML input field?