Chapter 12
Beginner
7 min read
Forms & Input
Select, Textarea & Button
Master dropdown menus, multi-line text areas, and the versatile button element for rich HTML forms.
🎯 What you'll learn
✓Create dropdown menus with
<select>
✓Use <textarea> for
multi-line input
✓Understand button type
differences
✓Group options with
<optgroup>
Introduction to Select, Textarea & Button
This chapter covers Select, Textarea & Button in depth. Understanding this topic is essential for writing clean, modern HTML. Use the live editor below to experiment as you read.
💡 In This Chapter
You will see real code examples, clear
explanations, and
a live editor to practice immediately — no setup needed.
Select
Dropdown list.
HTML
<select name="city">
<option value="surat">Surat</option>
<option value="ahmedabad">Ahmedabad</option>
</select>
Textarea & Button
Multi-line and buttons.
HTML
<textarea rows="4" cols="40">Your message here</textarea>
<button type="submit">Submit</button>
<button type="reset">Reset</button>
Try It Yourself
Edit the code below and click ▶ Run to see your changes live.
Live Editor
✎ Editor
👁 Preview
❓ Quick Check — Chapter 12
Which HTML element creates a multi-line text input?
📄 Chapter Summary
- Create dropdown menus with <select>
- Use <textarea> for multi-line input
- Understand button type differences
- Group options with <optgroup>