Horje

How to add An HTML form with a read-only input field - HTML readonly Attribute

Input Example. The input readonly attribute.
index.html
Example: HTML
<!DOCTYPE html>
<html>
<body>

<h1>The input readonly attribute</h1>

<form action="/action_page.php">
  <label for="fname">First name:</label>
  <input type="text" id="fname" name="fname"><br><br>
  <label for="country">Country:</label>  
  <input type="text" id="country" name="country" value="Norway" readonly><br><br>
  <input type="submit" value="Submit">
</form>

</body>
</html>

Output should be:

How to add An HTML form with a read-only input field - HTML readonly Attribute




Type:
html
Category:
Web Tutorial
Sub Category:
HTML Attribute
Uploaded by:
Admin