Sometimes, we want to accept multiple lines of input in a text input with HTML.
In this article, we’ll look at how to accept multiple lines of input in a text input with HTML.
How to accept multiple lines of input in a text input with HTML?
To accept multiple lines of input in a text input with HTML, we can use the textarea
element.
For instance, we write
<textarea name="Text1" cols="40" rows="5"></textarea>
to add a textarea
element, which is an input that accepts multiple lines of text.
We set the rows
and cols
attributes to the number of rows and columns the text area accepts.
Conclusion
To accept multiple lines of input in a text input with HTML, we can use the textarea
element.