HTML Form Elements
Form elements are HTML tags used inside a form to collect data.
Common Form Elements
<form>
<label for="name">Name:</label>
<input type="text" id="name">
<textarea name="message"></textarea>
<button type="submit">Send</button>
</form>
Form Elements Explained
<form>→ form container<label>→ label for input<input>→ user input field<textarea>→ multi-line text<button>→ action button
Important Notes
- Labels improve accessibility
- Elements must be inside
<form> - Each element has a specific purpose