untitled
viviti
 HTML Amigo HomeHome
 HTML
   Introduction to HTML
   Using Notepad
   General Form
   Meta Tags
   Text Formatting
   Lists
   FTP
   Links
   Tables
   Images/Multimedia
   Frames
   Forms
     General Form
     Text Boxes
     Checkboxes
     Radio Buttons
     Dropdowns
     Textarea
     A Note About Forms
   Style Sheets
   Javascript
   Web Hosting
   Special Characters
   Glossary
 Help Forums
   HTML Help Forum
Fast connection
   HTML Help Forum
Slow connection
 Extra (Important) Stuff
   Comments
   Link To Us
   Web Tools
   Resources
   The Poll Page


Making A Text Box

      In this section you will learn how to include textboxes in a form. Text boxes are useful for extracting information such as: names, adresses, e-mail, age etc. So now let's include it into the the form.

The < INPUT> Tag

      The input tags allows you to insert input type fields into a form. So this tag is also used for almost all of the other types of inputs. This tag does not need a closing tag.

Textboxes take the following general form (if all properties are used - not all are needed):

< INPUT TYPE = "text" SIZE = "size" MAXLENGTH = "#ofchar" VALUE="val.dislplayed" Name = "name">

Properties of the text box:

TYPE = "text"
SIZE = "size"
MAXLENGTH="maxlength"
VALUE="valdislplayed"
Name = "name"
Hey! It's a text box.
Width of the text box
Maximum characters entered into a text box
Used if you want a value diplayed
Name of the text box (recommended that you name each field)


The Code


The Result

Name:
Age:  


FOR DEMONSTRATION ONLY!!

      What about if you want to create a password type text box. One that hides what the user enters. Well, this is very simple to do. All the same properties apply except that TYPE now equals PASSWORD.




Password:
FOR DEMONSTRATION ONLY!!

Try typing something in. You'll notice that no one can see what it is. Neat if you want to password-protect your page.

Looking at the code we notice a few things:

  1. We must put something before the text box to let the visitor know what it is.
  2. The size shrinks the width of the text box.
  3. The maximum length of the age was restricted to three characters max. (e.g. 100)
  4. The value in the last text box was placed there by code.
  5. If TYPE = PASSWORD the value entered by the user is kept confidential.
Rate Tutorial:
12345
Rated: 0 out of 5
Votes: 0
Free Email Forms from Bravenet.com

Let's learn how to make checkboxes in our fom. Continue to Checkboxes



© HTML Amigo 2005


Web Hosting · Blog · Guestbooks · Message Forums · Mailing Lists
Easiest Website Builder ever! · Build your own toolbar · Free Talking Character · Email Marketing
powered by a free webtools company bravenet.com