What is a Form?
The fundamental truth is that a website isn't just a brochure for you to read. For the web to be useful, it needs a way to collect information from the user and send it back to the server.
Without form, you couldn't log in, search for a video, buy a product, post a comment, or send a message. The web would be a read-only library.
< form > Tag
It is a container tag for our form.
The < input > Element: The Box for Your Stuff
This is the most common form tag. It's a self-closing tag that creates an input field. Its behavior changes based on its type attribute.
input tag have many type attribute value like text,tel,date,radio,checkbox etc. Most important ones are discussed below.
The Need for Meaning - The < label >
- A < label > is a tag that names or describes an input field in a form.
- It tells the user what to type in that box.
- It also makes the form easier to use and more accessible (screen readers, clicking on text to focus the input).
To learn more about HTML Forms refer the link below:
HTML Forms