Languages
[Edit]
EN

HTML - set number input minimum value

0 points
Created by:
Elias999
819

In this article, we would like to show you how to set the number input element minimum value in HTML.

Quick solution:

// ONLINE-RUNNER:browser;

<label>
  <span>Select the number:</span>
  <input type="number" name="input-name" min="5" />
</label>

 

Practical example

In this example, we use number input element's min attribute to set its minimum value.

// ONLINE-RUNNER:browser;

<!doctype html>
<html>
<body>
  <form>
    <label>
      <span>Select the number:</span>
      <input type="number" name="my-number" min="10" />
    </label>
  </form>
</body>
</html>

References

Alternative titles

  1. HTML - specify number input minimum value
  2. HTML - set number input min value
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join