HTML step Attribute

HTML step Attribute: This attribute defines the legal number intervals for an <input> element. While the default stepping value for number inputs is 1.

Usage: It works with the following input types: number, range, date, datetime, month, time.

HTML step Attribute

This attribute can be applied to the <input> element. And the step attribute is new in HTML5.

Syntax: <input step = “value”>

Browser Support

This attribute is supported by the following browsers:

  • Chrome-6.0
  • Firefox-16.0
  • Internet Explorer-10.0
  • Safari-5.0
  • Opera-10.6

Example: for <input> element

<!DOCTYPE html>
<html>
<body>
<form action="/action_page.php">
  <input type="number" name="points" step="3">
  <input type="submit">
</form>
</body>
</html>

Output:

HTML step attribute