Select, Textarea, and Button

Use <select> for choosing from predefined options, <textarea> for multiline text, and <button> for actions. Buttons should have an explicit or contextually correct type such as submit, button, or reset.

Common Form Controls
<label for="country">Country</label>\n<select id="country" name="country">\n  <option value="in">India</option>\n  <option value="us">United States</option>\n</select>\n\n<label for="message">Message</label>\n<textarea id="message" name="message" rows="5"></textarea>\n\n<button type="submit">Send</button>
💡 These controls provide native semantics and keyboard interaction.
Key Takeaways
  • Use button for actions instead of clickable div elements.
  • Give form controls meaningful names when their values need to be submitted.
Knowledge Check

Which element is intended for multiline user input?