I have been writing few series of new HTML5 input types and this is another post on same series. In this post I am going to explain Number input types. The number type is for numeric values. When you use number input type it will have spinner with up and down arrow and with the help of this you can increase or decrease of value.
Attributes of Number Input type:
There are four attributes of Number input types.- Value : This attribute is used to specify the default value of the input type once its first loaded. So what ever you put there in input value it will be there.
- Min: As name suggest it defines minimum value for a range that you can you can choose in number input types.
- Max: It defines maximum number value for the range a number input type can have.
- Step: This attribute defines the number which will decrease or increase number value. If you don’t specify the value for it the default value for this will be 1.