Languages
[Edit]
EN

HTML - set number input minimum value

0 points
Created by:
Elias999
489

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

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