Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

HTML | <input type=”number”>

  • Last Updated : 29 May, 2019

The HTML <input type=”number”> is used to specify an input field for entering a number.

Syntax:

Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML  course.

<input type="number">

Example:




<!DOCTYPE html> 
<html
    <head>
        <title>
            HTML input type number
        </title>
    </head>
      
    <body style="text-align:center;"
  
        <h1 style="color:green;"
            GeeksForGeeks 
        </h1
  
        <h2>HTML <Input Type="Number"></h2
  
        <input type="number" id="myNumber"
                value="10"
    </body
</html>                    

Output:

Supported Browsers: The browsers supported by <input type=”number”> are listed below:

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Safari
  • Opera
My Personal Notes arrow_drop_up
Recommended Articles
Page :