
- HTML Tutorial
- HTML - Home
- HTML - Overview
- HTML - Basic Tags
- HTML - Elements
- HTML - Attributes
- HTML - Formatting
- HTML - Phrase Tags
- HTML - Meta Tags
- HTML - Comments
- HTML - Images
- HTML - Tables
- HTML - Lists
- HTML - Text Links
- HTML - Image Links
- HTML - Email Links
- HTML - Frames
- HTML - Iframes
- HTML - Blocks
- HTML - Backgrounds
- HTML - Colors
- HTML - Fonts
- HTML - Forms
- HTML - Embed Multimedia
- HTML - Marquees
- HTML - Header
- HTML - Style Sheet
- HTML - Javascript
- HTML - Layouts
- HTML References
- HTML - Tags Reference
- HTML - Attributes Reference
- HTML - Events Reference
- HTML - Fonts Reference
- HTML - ASCII Codes
- ASCII Table Lookup
- HTML - Color Names
- HTML - Entities
- HTML - Fonts Ref
- HTML - Events Ref
- MIME Media Types
- HTML - URL Encoding
- Language ISO Codes
- HTML - Character Encodings
- HTML - Deprecated Tags
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.
Example
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>
- Related Articles
- 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 take password input in HTML forms?
- How do we reset all the input fields in HTML forms?
- How do we set the input type for an Android EditText programatically?
- How to disable autocomplete of an HTML input field?
- How do we set the input type for an Android EditText programmatically using Kotlin?

Advertisements