Skip to content
Y
yTube.SITE v8.0.4
media / worlds / tools / internet oddities
YouTube / video information

Learn HTML - Number input

Video information, playback and saved actions.

Learn HTML - Number input

Description: More on input of type number: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/number

The 'number' input type is used to create a field for users to input numeric values. It's perfect for fields like age, height, weight, and any other numerical data that you might need to collect from your users.

Let's take a look at an example. Say you want to create a form where users can input their age. You can use the 'number' input type to create a field where users can only input numeric values.

Here setting a minimum value of 0 and a maximum value of 120, which means users can only input numbers between 0 and 120.

When a user inputs a value that is not a number, the browser will display an error message letting them know they need to input a valid number. This is really helpful for ensuring that users input the correct type of data into your form. Close description
      
Videos related to "Learn HTML - Number input"