0% found this document useful (0 votes)
10 views11 pages

Form Elements in HTML

HTML forms are used to collect user input and consist of various input elements such as text fields, checkboxes, radio buttons, and dropdowns. A basic form structure includes elements like <form>, <input>, <textarea>, and <select>. These components are essential for creating interactive web applications.

Uploaded by

THEJAS KUMAR
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views11 pages

Form Elements in HTML

HTML forms are used to collect user input and consist of various input elements such as text fields, checkboxes, radio buttons, and dropdowns. A basic form structure includes elements like <form>, <input>, <textarea>, and <select>. These components are essential for creating interactive web applications.

Uploaded by

THEJAS KUMAR
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 11

Form Elements in HTML

A Guide to HTML Forms and Input


Elements
Introduction to Forms in HTML
• Forms in HTML are used to collect user input.
They contain input elements like text fields,
checkboxes, radio buttons, and more.
Basic Form Structure
• Example:
• <form action="submit.php" method="post">
• <input type="text" name="username"
placeholder="Enter Name">
• <input type="submit" value="Submit">
• </form>
Text Input Element
• <input type="text" name="name"
placeholder="Enter your name">
Password Input
• <input type="password" name="password"
placeholder="Enter password">
Radio Buttons
• <input type="radio" name="gender"
value="male"> Male
• <input type="radio" name="gender"
value="female"> Female
Checkboxes
• <input type="checkbox" name="subscribe"
value="yes"> Subscribe to newsletter
Dropdown (Select Element)
• <select name="country">
• <option value="india">India</option>
• <option value="usa">USA</option>
• </select>
Submit & Reset Buttons
• <input type="submit" value="Submit">
• <input type="reset" value="Reset">
Textarea and File Upload
• <textarea name="message" rows="4"
cols="50">Enter message...</textarea>
• <input type="file" name="file">
Conclusion
• HTML forms are essential for user input. They
include text fields, checkboxes, radio buttons,
dropdowns, and more.

You might also like