Columns and Rows

You can specify the number of cols and rows through the appropriate attributes. This changes the size of the displayed element, as well as how text will look when typed.

  • cols is the width of the textarea in character widths (i.e. this is the number of characters that will fit from left to right).
  • rows is the number of visible lines.
  Comments or Concerns:
  <textarea name="comments" id="test-textarea" cols="20" rows="4">Enter up to 500 characters...</textarea>

Please Enter:

Birth Year:

Net ID:


Comments or Concerns:

NOTE: Typically, and as is the case with many size parameters that you can set in HTML, you should override these parameters with CSS.