Form fields: Textarea

Textarea is a form field that can contain multi-line text.

You add a textarea using the <textarea> tag.

Unlike <input />, this tag requires an opening and closing tag:


Inside it, we can add a value for the content displayed:


We can set the size of the textarea using HTML attributes:

  • rows sets the number of rows
  • cols sets the number of columns
<textarea rows='13' cols='40'></textarea>

As usual to send data to the server we add a name attribute to it.

Lessons in this unit:

0: Introduction
1: Form submit field
2: Specialized input fields
3: Checkboxes
4: Radio buttons
5: File input fields
6: ▶︎ Textarea
7: Select
8: Autocompleting form fields
Are you intimidated by Git? Can’t figure out merge vs rebase? Are you afraid of screwing up something any time you have to do something in Git? Do you rely on ChatGPT or random people’s answer on StackOverflow to fix your problems? Your coworkers are tired of explaining Git to you all the time? Git is something we all need to use, but few of us really master it. I created this course to improve your Git (and GitHub) knowledge at a radical level. Launching May 21, 2024. Join the waiting list!