Forms and Input Fields

1. Form Structure

Forms collect user input using <form>:

<form action="submit.php" method="post">
    <label for="name">Name:</label>
    <input type="text" id="name" name="name" required>
    <input type="submit" value="Submit">
</form>

2. Input Types

text: Single-line text input

email: Email address input

password: Hidden password input

date: Date picker

checkbox: Checkable options

radio: Select one from multiple options