<input type=”text”>

Sharing is caring!

Value of
<input type="">
What does <input type="text"> do?
Defines a text entry field in a form.

Code Example

<form action="myform.cgi">
<input type="text" name="text" id="text" maxlength="10">
<label for="text"> Type your name here</label>
<br><input type="submit" value="Submit">

The text value of input defines a single-line text entry field.

If you need to obfuscate the contents of a text entry field, for basic security purposes, uses the password input type instead.

Claire is seasoned technical writer, editor, and HTML enthusiast. She writes for HTML.com and runs a content agency, Red Robot Media.

Browser Support for text