Languages
[Edit]
EN

HTML - disabled input

0 points
Created by:
Eshaal-Wilkinson
384

In this article, we would like to show you how to create disabled input in HTML.

Quick solution:

// ONLINE-RUNNER:browser;

<input type="text" disabled />

 

Practical example

In this example, we use input element's disable attribute to disable the input.

// ONLINE-RUNNER:browser;

<!doctype html>
<html>
<body>
  <form>
    <label>
      <span>Disabled:</span>
      <input type="text" disabled />
    </label>
    <br />
    <br />
    <label>
      <span>Enabled:</span>
      <input type="text" />
    </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