EN
HTML - multiline input (textarea)
3
points
In this article, we would like to show you how to create multiline input in HTML.
There is not available multiline input in HTML, as multiline input we need to use textarea
.
Quick solution:
// ONLINE-RUNNER:browser;
<textarea name="textarea-name" cols="30" rows="3"></textarea>
Where:
cols
- number of visible characters width of thetextarea
- it is average characters width (if not specified, the default value is 20),rows
- number of visible text lines.
Practical example
cols
and rows
attributes are optional and we can use CSS style with width
and height
values.
// ONLINE-RUNNER:browser;
<!doctype html>
<html>
<body>
<textarea name="textarea" cols="30" rows="5">Type something here...</textarea>
</body>
</html>