Form Controls in HTML: Multiple Lines Text Input

<text area ></textarea >

The <textarea> element allows you to display a control that allows users to enter multiple lines of plain text, as opposed to the single line allowed by the text-input types discussed earlier. Table 5.12 lists the attributes that it supports, and Figures 5.40 and 5.41 show how it is used and also show the result.

In the example, the dirname attribute is used only to explain how it works. It changes nothing, because it specifies the default directionality setting. It works as follows: when the form is submitted, its value, together with the directionality setting for the element, is sent as a name-value pair to the server. This means that the name-value pair sent for setting directionality is comment.dir=ltr. The directionality value “ltr” means left to right, which is the default. Directionality can be set using the dir attribute, a global attribute. The other value it takes is rlt (right to left).

Source: Sklar David (2016), HTML: A Gentle Introduction to the Web’s Most Popular Language, O’Reilly Media; 1st edition.

Leave a Reply

Your email address will not be published. Required fields are marked *