Select, Textarea, and Buttons
Beyond input elements, forms use select dropdowns, textareas for longer text, and various button types.
Select Dropdowns
Select elements:
<select>- Dropdown container<option>- Individual choicesvalue- Submitted value (text shown if empty)
Option Groups
<optgroup> groups related options with a label.
Multiple Select
Attributes:
multiple- Allow multiple selectionssize- Visible options without scrolling
Textarea
Textarea attributes:
rows/cols- Size (better to use CSS)placeholder- Hint textmaxlength- Character limit- Content between tags is default value
Button Types
Button types:
submit- Submits the form (default)reset- Clears all fieldsbutton- No default action
Input vs Button Submit
Datalist for Autocomplete
Datalist provides autocomplete suggestions:
- Linked via
listattribute - User can type custom values
- Options appear as suggestions
Output Element
Exercise: Create Feedback Form
Create a feedback form with select, textarea, and buttons:
These elements provide rich user input options beyond simple text fields!
Up next · Lesson 23 of 32
Form Validation
2 min read
22 of 32 lessons done

Ask Byte about this lesson
A private chat about this lesson. Byte has read the whole lesson, answers in seconds, and shows the section each answer comes from. Ask follow-ups in any language.
Questions & Answers
Public questions about this lesson. The AI Tutor answers right away in your language, the FreeAcademy team checks answers, and every learner can read them.

