Horje

How to add An HTML form with initial (default) values - HTML value Attribute

<input> Example.
index.html
Example: HTML
<!DOCTYPE html>
<html>
<body>

<h1>The input value attribute</h1>

<form action="/action_page.php">
  <label for="fname">First name:</label>
  <input type="text" id="fname" name="fname" value="John"><br><br>
  <label for="lname">Last name:</label>
  <input type="text" id="lname" name="lname" value="Doe"><br><br>
  <input type="submit" value="Submit">
</form>

</body>
</html>

Output should be:

How to add An HTML form with initial (default) values - HTML value Attribute




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