Working with Text Areas

In some instances, you want to provide an area for feedback or input that is more flexible than just a text input control, which supports only one line of text. Text areas are the perfect solution.

Text areas are created using the textarea element along with the rows and cols attributes to determine a visible field. Unlike tables, the rows and columns in the instance of text areas define how the text area is managed. Rows determine how many rows of text the resulting box will allow, and columns define how wide the box is (see Example 5-9).

Example 5-9. Creating a text area

<form method="get" action="http://www.myserver.com/cgi-bin/mailscript/"><p>Please let us know if you have any special requests:</p><textarea rows="10" cols="25"> ...

Get Spring Into HTML and CSS 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.