Basic Form
<form action="/submit" method="post">
<label for="name">Name:</label>
<input type="text" id="name" name="name" required>
<label for="email">Email:</label>
<input type="email" id="email" name="email" required>
<label for="message">Message:</label>
<textarea id="message" name="message" rows="4"></textarea>
<button type="submit">Send</button>
</form>Common Input Types
| Type | Use for |
|---|---|
text | Single-line text |
email | Email address (validates format) |
password | Password (hides characters) |
number | Numeric input |
checkbox | Boolean on/off |
radio | Choose one from a group |
file | File upload |
submit | Submit button |
date | Date picker |
Always pair
<label> with <input> using matching for and id attributes — it makes forms accessible and expands the click area.