VOOZH about

URL: https://www.geeksforgeeks.org/html/html-input-typenumber/

⇱ HTML <input type="number"> - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

HTML <input type="number">

Last Updated : 25 May, 2026

The HTML <input type="number"> element is used to create a numeric input field in a form. It allows users to enter only numerical values.

  • Used to accept numeric input from users.
  • Created using <input type="number"> inside a form.
  • Supports attributes like min, max, step, value, and required.

Syntax:

<input type="number">

Example: In this example, we will demonstrate the use of HTML <input type="number"> element.

Comment
Article Tags: