195 users online (0 members and 195 guests)  


  HTML Form Input Type Text

The input type text creates a single line the user can enter text into.

Here is an example:

Please put in your e-mail: <input type="text" name="email" size="40" maxlength="39">

The code above would result in this (but only if with in <form> tags).

Please put in your e-mail:

This input type is very versatile. Here are the attributes to this input type

  • input * - tells the browser that this is part of the form

  • type * - tells the browser what input type it is

  • name * - when the form is submitted, this is the header the information in this field will go under

  • size * - how wide the text window will be

  • maxlength - controls how much text can be put in the window (without this, it's unlimited, even if the window is small)

* = mandatory

Back to the HTML menu.