One way users can enter data into a HTML document is via text. The most common
scenario is when users have to enter a username and password to enter a site.
There are three common types of text input:
text: In this type of input, we get a single-line text box to enter data. The texts typed appear directly on the web page.
The syntax is <input type=text name=c>. Here, the key for this text input value is 'c'. Below is an example:
Text example:
password: In this type of inpu, we get a single-line text box to enter data. The text typed do not appear directly on the web page.
The syntax is <input type=password name=pwd>. Here, the key for this password input is 'pwd'. Below is an example:
Text example:
textbox: In this type of input, we get a multi-lin text book to enter data. The texts typed appear directly on the web page.
The syntax is <textarea rows=[row height] name=area>. The key for this textarea input is 'area'. Below is an example, with [row height] = 2:
Link to this page: If you find this page useful, we encourage you to link to this page. Simply copy and paste the code below to your website, blog, or profile.