HTML | <input type=”text”>
The HTML <input type=”text”> is used to define a single-line text field . The default width of the text field is 20 characters.
Syntax:
<input type="text">
Example:
html
<!DOCTYPE html>
< html >
< head >
< title >
HTML input type text
</ title >
</ head >
< body style="text-align:center;">
< h1 style="color:green;">
GeeksForGeeks
</ h1 >
< h2 >
HTML <Input Type="text">
</ h2 >
< form >
Name: < input type="text">
</ form >
</ body >
</ html >
|
Output:
Supported Browsers: The browsers supported by <input type=”text”> are listed below:
- Google Chrome 1
- Edge 12
- Internet Explorer
- Firefox 1
- Safari 1
- Opera
Last Updated :
26 Jul, 2022
Like Article
Save Article
Share your thoughts in the comments
Please Login to comment...