HTML Forms
What are Forms?
HTML forms are used to collect user input.
Example
<form> <label>Name:</label><br> <input type="text" placeholder="Enter your name"><br><br> <label>Email:</label><br> <input type="email" placeholder="Enter email"><br><br> <label>Password:</label><br> <input type="password" placeholder="Enter password"><br><br> <button type="submit">Submit</button> </form>
<form>
Form container
<input>
User input field
<button>
Submit button
Live Preview
Summary
- Forms collect user data
- Uses input, button, label tags
- Used in login, signup, search