Text areas of this kind are used for comments, blogs, memos or any other purpose that requires an expression space.
<textarea>Welcome to University of Hackers!</textarea>
Output
Text areas and size
To change the standard size of a text area use columns & lines, with their HTML usage, cols & rows. Those will have numerical values. The bigger their value will be, the bigger the text area will be.
Input
<textarea cols="50" rows="2">Text area!</textarea>
<textarea cols="40" rows="5">Text area!</textarea>
<textarea cols="20" rows="10">Text area!</textarea>
Output
The wrap attribute
This attribute of the <textarea> tag will establish the way in which the text will react when it will reach the end of the line. Wrap have one of the three values:
Hard: will place an enter at the end of every line and will send the text in the same format it was introduced
Soft: will place an enter at the end of every line, but unlike the Hard one it will send the text in a free format.
Off: This will not format the text in any way, letting the text in a single continuous line.
The Hard/Soft attribute
<textarea cols="20" rows="5"wrap="hard"> Hard will place an enter at the end of every line and will send the text in the same format it was introduced.
Output
The Attribute off
<textarea cols="20" rows="5"wrap="off"> This will not format the text in any way, letting the text in a single continuous line.
</textarea>
Output
The 'readonly' attribute
Input
<textarea cols="20" rows="5" wrap="hard"readonly="yes"> This text cannot be modified. In the case in which the 'no' value would be chosen the opposite result would be obtained.
</textarea>
Output
The disabled attribute
The disabled attribute text will be shown in gray, disabling at the same time the possibility of modifying the text that text area contains.
Input
<textarea cols="20" rows="5" wrap="hard"disabled="yes"> The disabled attribute text will be shown in gray, disabling at the same time the possibility of modifying the text that text area contains.
</textarea>
Output
<textarea>Welcome to University of Hackers!</textarea>
Output
Text areas and size
To change the standard size of a text area use columns & lines, with their HTML usage, cols & rows. Those will have numerical values. The bigger their value will be, the bigger the text area will be.
Input
<textarea cols="50" rows="2">Text area!</textarea>
<textarea cols="40" rows="5">Text area!</textarea>
<textarea cols="20" rows="10">Text area!</textarea>
Output
The wrap attribute
This attribute of the <textarea> tag will establish the way in which the text will react when it will reach the end of the line. Wrap have one of the three values:
Hard: will place an enter at the end of every line and will send the text in the same format it was introduced
Soft: will place an enter at the end of every line, but unlike the Hard one it will send the text in a free format.
Off: This will not format the text in any way, letting the text in a single continuous line.
The Hard/Soft attribute
<textarea cols="20" rows="5"wrap="hard"> Hard will place an enter at the end of every line and will send the text in the same format it was introduced.
Output
The Attribute off
<textarea cols="20" rows="5"wrap="off"> This will not format the text in any way, letting the text in a single continuous line.
</textarea>
Output
The 'readonly' attribute
Input
<textarea cols="20" rows="5" wrap="hard"readonly="yes"> This text cannot be modified. In the case in which the 'no' value would be chosen the opposite result would be obtained.
</textarea>
Output
The disabled attribute
The disabled attribute text will be shown in gray, disabling at the same time the possibility of modifying the text that text area contains.
Input
<textarea cols="20" rows="5" wrap="hard"disabled="yes"> The disabled attribute text will be shown in gray, disabling at the same time the possibility of modifying the text that text area contains.
</textarea>
Output