- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
HTML step Attribute
The HTML step attribute define a number interval for an <input> element in an HTML document.
Syntax
Following is the syntax −
<input step=”number”>
Let us see an example of HTML step Attribute −
Example
<!DOCTYPE html> <html> <style> body { color: #000; height: 100vh; background-color: #8BC6EC; background-image: linear-gradient(135deg, #8BC6EC 0%, #9599E2 100%); text-align: center; } </style> <body> <h1>HTML step Demo</h1> <p>Enter the number of order:</p> <input type="number" step="5" value="0"> </body> </html>
Output
Now enter any number and then try to increment or decrement it by using arrow up/down key.
- Related Articles
- How to use step attribute in HTML?
- How to use different step attribute in one range input in HTML?
- HTML DOM Input Month step Property
- HTML DOM Input Number step Property
- HTML DOM Input Range step property
- HTML DOM Input Date step Property
- HTML DOM Input DatetimeLocal step Property
- HTML DOM Input Time step Property
- HTML DOM Input Week step Property
- HTML pattern Attribute
- HTML novalidate Attribute
- HTML maxlength Attribute
- HTML wrap Attribute
- HTML disabled Attribute
- HTML for Attribute

Advertisements