Ans:
Ans:
Ans:
Ans:
Ans:
Ans:
Ans:
Ans:
Ans:
Ans:
Ans:
Ans:
Ans:
Ans:
Ans:
Ans:
Ans:
Ans:
Ans:
Ans:
An HTML form is a part of a webpage that allows users to type or choose information, so websites can collect data from users.
Login pages and registration (signup) pages commonly use forms.
Websites use forms to get input, feedback, or data from users to make the site interactive.
Name and email address can be collected using HTML forms.
The <form> tag is the container for form elements.
The 'action' attribute specifies the URL or location where the form data will be sent after submission.
The 'method' attribute controls how the form data will be sent to the server, like using GET or POST.
GET shows form data in the address bar of the browser.
POST is safer for sending passwords because data is not visible in the URL.
<input type="text" name="username">
Radio buttons should be used for selecting only one option out of multiple choices.
A checkbox allows multiple selections, while a radio button lets the user pick only one option from a group.
<input type="checkbox" name="hobby" value="music">
The <textarea> tag provides a multi-line text box for entering longer text, like comments or messages.
<input type="submit" value="Send">
It is used to upload files or images through the form.
<select name="country">
<option value="in">India</option>
<option value="us">USA</option>
</select>
It clears all the fields in the form and resets them to their original values.
Real-life uses of forms include online feedback, search boxes, and order forms for shopping.
Forms are important because they allow users to input information, making websites interactive and useful for many purposes.