What is html forms?
An HTML forms are elements used to collect input from users on a webpage . Forms are created using the
. Text Input
Used to collect short text such as names or usernames.
<input type="text" name="username">
- Password Input
Masks the entered text for security.
<input type="password" name="password">
- Email Input
Ensures the entered value follows a valid email format.
- Number Input cccepts only numeric values.
<input type="number" name="age">
- Radio Buttons
Allows users to select only one option from a group.Allows users to select multiple options.
<input type="radio" name="gender" value="male"> Male
<input type="radio" name="gender" value="female"> Female
- Checkboxes
HTML
CSS
- Dropdown List
<select name="country">
<option>India</option>
<option>USA</option>
<option>Canada</option>
</select>
- Textarea
Used for longer text input, such as comments or feedback.
- Submit Button
Sends the form data to the server.
Top comments (0)