Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Web Technology by (20.3k points)

I have this text input in a form:

<input type="text"

       cols="40" 

       rows="5" 

       style="width:200px; height:50px;" 

       name="Text1" 

       id="Text1" 

       value="" />

I am trying to get it to take multiple lines of input. The width and height make the box to be bigger, but the user can enter text all (s)he wants yet it fills one line only.

How do I make the input more like a textarea?

1 Answer

0 votes
by (40.7k points)

You just have to use a textarea to get multiline handling like this:

<textarea name="Text1" cols="40" rows="5"></textarea>

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

1.2k questions

2.7k answers

501 comments

693 users

Browse Categories

...