• 4
name Punditsdkoslkdosdkoskdo

Numerous lines of input in <input type=“text” />

I have this text input in a form:

<input type="text"
       style="width:200px; height:50px;" 
       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?

Use the textarea

<textarea name="textarea" style="width:250px;height:150px;"></textarea>

don't leave any space between the opening and closing tags Or Else This will leave some empty lines or spaces.

  • 0
Reply Report

It is possible to make a text-input multi-line by giving it the word-break: break-word; attribute. (Only tested this in Chrome)

  • 0
Reply Report