HTML and CSS Reference
In-Depth Information
Figure 11.13 shows a textarea element in action.
.
Output
FIGURE 11.13
Use textarea to
create large text-
entry areas.
TIP
You can also change the size of a textarea with the height and
width CSS properties. You can alter the font in the text area
using the CSS font properties, too.
Creating Menus with select and option
The select element creates a menu that can be configured to enable users to select one
or more options from a pull-down menu or a scrollable menu that shows several options
at once. The <select> tag defines how the menu will be displayed and the name of the
parameter associated with the field. The <option> tag is used to add selections to the
menu. The default appearance of select lists is to display a pull-down list that enables the
user to select one of the options. Here's an example of how one is created:
Input
<label for=”location”> Please pick a travel destination </label>
<select name=“location”>
<option> Indiana </option>
<option> Fuji </option>
<option> Timbuktu </option>
<option> Alaska </option>
</select>
As you can see in the code, the field name is assigned using the name attribute of the
<select> tag. The field created using that code appears in Figure 11.14.
 
 
Search WWH ::




Custom Search