Why is step necessary in a form?

What does step mean and does it have to be used when creating forms using number values

If we have a number input element:

image

you see those arrows on the right hand side? they are steps, they increase (top arrow) or decrease (bottom arrow) the value in the input field.

by default, clicking the top arrow, will increase the value by one. But with step, we can control how much the value is increased. If we use step 2, clicking the top arrow will increase the value with 2.

Go ahead and try and experiment with different step values to see how they work. Sometimes trail and error can be a good way to learn

here is the docs:

<input type="number"> - HTML: HyperText Markup Language | MDN

for even more information

Trial and error is a bit like putting something through its paces, something I am wholeheartedly on @stetim94’s side in doing. This one concept is best played out so we identify with various outcomes and can describe how they came about. Play with this stuff as much as you can. It won’t break anything.