htmlinput

How do I make the input box bigger?


I'm trying to make this comment box bigger but can't seem to figure out how. This is what I've tried:

<form action="" target="_blank">
  <br>
  First name:<br>
  <input type="text" name="firstname" value="">
  <br>
  Last name:<br>
  <input type="text" name="lastname" value="">
  <br><br>
  Comment:<br>
  <input type="text" rows="4" cols="50" name="comment" value="">
  <br><br>
  <input type="submit" value="Submit">
</form> 


Solution

  • You'll want to use the textarea attribute for that kind of larger, multi-line text field.

    <form action="" target="_blank">
      <br>
      First name:<br>
      <input type="text" name="firstname" value="">
      <br>
      Last name:<br>
      <input type="text" name="lastname" value="">
      <br><br>
      Comment:<br>
      <textarea rows="4" cols="50" name="comment"></textarea>
      <br><br>
      <input type="submit" value="Submit">
    </form>