Related Articles

Related Articles

HTML | <input type=”text”>
  • Last Updated : 20 Oct, 2020

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:

filter_none

edit
close

play_arrow

link
brightness_4
code

<!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>                    

chevron_right


Output:

Supported Browsers: The browsers supported by <input type=”text”> are listed below:

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Safari
  • Opera

full-stack-img

My Personal Notes arrow_drop_up
Recommended Articles
Page :