Inserting Controls

The <TEXTAREA> element
 
The TEXTAREA element is used to accept free-form text from your visitors. It requires a start and end tag:
<TEXTAREA></TEXTAREA>
The attributes are:
 
name  This is the name of the value or values that are returned to the script for processing.
 
rows  This is the number of rows of text that are visible on the screen.
 
cols  This is the number of columns of text.
 
readonly  This attribute shows the contents of the TEXTAREA element but does not allow editing the text.
 
accesskey  This attribute defines the shortcut key that will be used for this form element.

The <LABEL> element
 
The Label element enables you to attach text to the control. The LABEL element makes control more visible to visitors. This element consist of a start and end tag. The content is text and the attributes are:
 
accesskey  This is the shortcut key for this form element
 
for  This attribute indicates the ID value of the control it is associated with.
 
How does the LABEL element work? First you need to create a control with a specific id attribute. Now we need a LABEL element with the text we want to associated to that control we just created. The for attribute of the label element must match with the value of the id attribute of the control. And now you have text with your form control.
 
Here is an example on how both TEXTAREA and LABEL element are used.
 


<label for="one">
Example
</label>
<textarea rows="3" cols="10" id="one" name="area51">
Type your text here
</textarea>

More controls......next page

 

Copyright © 2000, 2001 Proxima Design
Back Home Links e-Mail