Text Field can contain multiple types of input
For example:
<body>
<form>
<!-- Text field -->
<input type="text" />
<!-- Number field -->
<input type="number" />
<!-- password field -->
<input type="password" />
<!-- date field -->
<input type="date" />
<!-- email field -->
<input type="email" />
</form>
</body>
More HTML Input Element
To type multiple lines of text (a block of textfield):
<body>
<form>
<textarea cols="30" rows="10"></textarea>
</form>
</body>
Common attributes in text fields
value
: The initial value of the control. placeholder
: Text that appears in the form control when it has no value set readonly
: Boolean. The value is not editable disabled
: Whether the form control is disabled (Value won’t be submitted) maxlength
: Maximum length (number of characters) of value
autofocus
: Automatically focus the form control when the page is loaded
<input type="text" value="Hello" placeholder="Name" readonly />
<!-- default value should be added in the tag -->
<textarea>Comments...</textarea>