Horje
Text Fields

The <input type="text"> defines a single-line input field for text input.


Example of Text Fields

A form with input fields for text:
index.html
Example: HTML
<!DOCTYPE html>
<html>
<body>

<h2>Text input fields</h2>

<form>
  <label for="fname">First name:</label><br>
  <input type="text" id="fname" name="fname" value="John"><br>
  <label for="lname">Last name:</label><br>
  <input type="text" id="lname" name="lname" value="Doe">
</form>

<p>Note that the form itself is not visible.</p>

<p>Also note that the default width of text input fields is 20 characters.</p>

</body>
</html>

Output should be:

Example of Text Fields





Category:
Web Tutorial
Sub Category:
HTML Forms
Uploaded by:
Admin


Read Article
https://develop.horje.com/learn/1434/reference