Forms: HTML
Create a Text Block
| Create a Form | Remember that you create a form field with
the <FORM></FORM> tag pair.
Within the <FORM> tags will go the entire form, i.e. both the questions you ask and the form elements, i., e., the box and button spaces where the user will supply responses. |
|
| The Text Block | A text block allows the user
to write a response in a larger space.
Text blocks are useful for short answer responses. A text block can hold up to 32,700 characters. Scroll bars will appear in the text block if they are needed. |
|
| Example | ||
| To create a text block, start with the <TEXTAREA></TEXTAREA> tag pair. | ||
| Within the opening <TEXTAREA> tag add the NAME attribute to specify the class of information being gathered in the text box. | ||
| Thus, the HTML code for the sample text box above is: | ||
| <TEXTAREA NAME="why"></TEXTAREA> | ||
| Note the use of a closing tag.
The default number of rows that appear on the screen in a text block is 4. To specify a different length for the text block, add the ROWS attribute to the opening <TEXTAREA> tag. The default number of characters in one line of a text block is 40. To specify a different width for the text block, add the COLS attribute to the opening <TEXTAREA> tag. |
||
| If you wish, you can insert text between the two TEXTAREA tags. This text will display inside the text box. | ||
| Example | ||
| The HTML code for the sample text block above is: | ||
|
Why are you taking this class? <BR> |
||
| Remember that this code goes within the <FORM></FORM> tag pair | ||
Forms: HTML
Overview
Create a Form
Create Text and Password Boxes
Create Radio Buttons
Create Checkboxes
Create Menu Boxes
Create Text Blocks
Create the Reset and Submit Buttons
Web Design Center
Last Revised:
February 9, 2004
© Agatha Taormina