Untitled Document



 Introduction to HTML
 Structure of HTML
 Creating First HTML  Document
 Building Your HTML  Document
 Tables
 Frames
 Including Images into  Document
 Including Multimedia
 Developing HTML  FORMS
 Anatomy of a FORM
 Developing HTML  FORMS
 Anatomy of a FORM
 Simple Form Layout
 
 Simple Form Layout
 The INPUT elements
 
   The INPUT elements
   The Button Value
   The Reset Value
   The Submit Value
   The Image Value
   The Checkbox Value
   The Radio Value
   The Hidden Value
   The Text Value
   The Password Value
   Other Attributes
 The INPUT Tags
 The BUTTON Element
 
 The BUTTON Element
 The SELECT and OPTION  Elements
 
 The SELECT and  OPTION Elements
 The TEXTAREA Element
 
 The TEXTAREA  Element
 The LABEL Element
 
 The LABEL Element
 The FIELDSET and  LEGEND Elements
 
 The FIELDSET and  LEGEND Elements
 Tab Navigation
 
 Tab Navigation
 Access Keys
 
 Access Keys
 Using Style Sheet
 Understanding URLs
 Using JavaScript
 Using Java

Copyrights : Layout Galaxy All Rights Reserved
No part of this tutorial may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, electrostatic, magnetic tape, mechanical or otherwise, without prior permission in writing from Layout Galaxy.




  Developing HTML Forms > The INPUT elements

  The Hidden Value

The Hidden value of the type attribute enables you to submit form information that's invisible to the user.

Example:

<INPUT type = "hidden"
               name = "Page"
               value = "specialty pies">

Note: Name is the value by which the element is referenced.Hidden controls are not completely hidden, since a surfer can always view the source and will see the name/value pair in the URL when the form is submitted.

  The Text Value

Text asks for input in the form of a single-line. A number of text responses could be string together to create a meaningful Form. The size attribute sets the length of the text box in characters. You can also set the maximum number of characters that can be entered by using the maxlength attribute. The text can be locked against change by the read only attribute.

Syntax:

<INPUT type = "text"
               name = "" size= ""
               maxlength= "">

Example:

<INPUT type= "text" name= "order-name" size= "50" >

Note: If a form consists solely of a text box, the enter key will submit the form.

  The Password Value

The Password value of the type attribute is exactly like the text attributes, except that the visible response on the Form is masked with an asterisk or similar character so that no one can read what the user types.

Example:

<INPUT type = "password"
               name = " secret"
               size = "30">

Note: Size is the number of characters allowed in a password text box.

  Other Attributes

The other attributes associated with the Input element are the disabled, alt and usemap. When an element is disabled its contents are not only unalterable but also unusable. The alt attribute is used for those web browsers that can't accept Forms. It only allows the users to see what elements the Form is composed of, but does not interact with those elements in any way. The usemap attribute can be used to include a client-side image map in the INPUT element.

Example:

<INPUT alt = "this is a submit button"
               type = "submit">
<INPUT usemap= "#mapx">

  The INPUT Tags

In this Exercise, you will learn to create a Form using the INPUT tag element with the text, password, checkbox, radio button, image, submit and reset attributes.

The Type attribute of the input element is specified as image and it displays the image "image1.gif" when viewed in the browser.

The Text attribute of the input element displays a text box with the size of the box set to 20 characters.

The Password attribute of the Input element displays a text box for entering the password where the actual text typed will be masked with special characters.

Back Next


Copyrights : Layout Galaxy All Rights Reserved
No part of this tutorial may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, electrostatic, magnetic tape, mechanical or otherwise, without prior permission in writing from Layout Galaxy.




17, Vadsarvala Nivas, 65-A, J. Nehru Road, Mulund (W), Mumbai - 400 080 INDIA
Tel : 91-22-25795588, 91-22-25780444 Fax : 91-22-25793397
Email : ionline@vsnl.com
© Image Online 2001-2003