
HTML
HTML Head
HTML Forms
HTML Graphics
HTML Media
HTML APIs
HTML Forms
HTML forms are interactive web page units that collect user data and submit it to the server. It comprises various interactive controls such as text fields, checkboxes, email, password, radio buttons, and more. Through HTML forms, users provide personal details, fill out online survey forms, share customer feedback, search queries, etc.
HTML Form Elements
Various HTML elements can be used to collect user input. These include:
HTML <form> Element
The form element is a container that has other form elements. It creates a form for user input. It can be a text field, submit button, or radio button.
HTML <input> Element
The input tag creates a form that gathers user input from a webpage. This input could be an email, text, or password.
HTML <label> Element
The label elements tag or create a label for form elements in the user’s interface. These elements add a label to the form to perform a specific function. They include text, textarea, checkbox, radio button, and many more.
HTML <select> Element
To create a dropdown option in the HTML forms, the <select> tag is used. You can make a dropdown option anywhere in the HTML form using this element.
HTML <button> Element
To create an interactive button within HTML, the <button> tag is used. It is clickable and controls other elements of HTML form.
HTML <fieldset> Element
The field set is used to group related data within a webpage and combine several controls, making them easy for the end user to understand.
HTML <legend> Element
This tag defines a caption or title for the <fieldset> tag.
HTML <datalist> Element
It contains a pre-defined list for users to pick from all the available options. The <datalist> tag adds recommended options as input control.
HTML <output> Element
It is a flexible element that shows the output of calculations. It is related to the results.
HTML <option> Element
It either contains options in a dropdown list for users to select from or an autocomplete data list.
HTML <textarea> Element
To add editing control in long text content.
HTML forms provide interactive controls to collect user input on a website. Understanding these elements is essential to create effective and user-friendly HTML forms.