Section 1 - Introduction
Section 2 - Basics
Section 3 - Next Level
Section 4 - Advanced
Forms
How forms are sent
Input field
Buttons
Input types
Fieldset
For more help...
You try it
Advanced Tables
Frames
Style Sheets
Image Maps
Section 5 - Publishing
Section 6 - Extras
Appendices
|
Text Area:
You are about to learn one tag that doesn't contain the <input> command. This tag allows you to create a large area where the user can type. A complete message can be sent, not just a word or sentence. What you need is a text box.
You may have noticed that <input> did not have a closing tag (</input>). The textarea tag MUST have a closing tag though. Failure to use it causes your whole page to become problematic. The "textarea" tag looks like this:
-
<textarea> </textarea>
Of course, there are a lot of things you can do to modify one of these boxes. You can give it a name, a default value, specify how many columns and rows you want displayed, and even whether you want the words to wrap or not. Here's the more complicated version with it's appearance:
Code |
---|
<form>
<textarea cols="20" rows="5" name="Fred" wrap="soft">
</textarea>
</form>
|
| |
Let's look at a few variations of this text area. In this one, there is no wordwrap, and the size has been changed.
Code |
---|
<form>
<textarea cols="40" rows="7" name="Ginger" wrap="off">
</textarea>
</form>
|
| |
One more time, only this one has had a value added, the wrap is set to "hard" and it's smaller.
Code |
---|
<form>
<textarea cols="10" rows="3" name="Roy" wrap="hard">
Type your comments here:
You know you want to.
</textarea>
</form>
|
|
What you see |
|
|
This isn't everything you can do with text area, but it's the important stuff.
There is just one more mini-area and you'll have a good idea of what forms can do.
- Text
- Checkboxes
- Radio Buttons
- Passwords
- Hidden
- File
- Image
- Textarea
- Select and Option
|