Open In App

HTML | <input type=”text”>

Improve
Improve
Like Article
Like
Save
Share
Report

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 &lt;Input Type="text"&gt;
    </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
Previous
Next
Share your thoughts in the comments
Similar Reads