Working with Text Areas

Text areas are multiline fields for text input, as Figure 68.12 shows.

Listing 68.12. View Source for Figure 68.12.
<form>
  <textarea name="typeTextHere" cols="50" rows="5">Type text here.</textarea>
</form>
Figure 68.12. Use text areas for multiline text input.

The cols attribute of the textarea tag gives the horizontal size of the text area in characters, not pixels, while the rows attribute determines the vertical size of the text area in the number of lines. So, the example in Figure 68.12 is 50 characters wide and 5 lines tall.

The preset text of a text area appears between the textarea tags, ...

Get Web Design Garage now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.