Horje

How to add HTML <input type="text">

Define a single-line text field that a user can enter text into.

Definition and Usage

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

The default width of the text field is 20 characters.

Tip: Always add the <label> tag for best accessibility practices!


Browser Support

Syntax

<input type="text">

index.html
Example: HTML
<label for="fname">First name:</label>
<input type="text" id="fname" name="fname"> 

Output should be:

How to add HTML <input type="text">




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