HTML Forms: A web
form or HTML form on a web page that allows users to enter data that is then sent to a server for processing. Forms may resemble database forms because website users fill out the forms using:
In this article, we are going to thoroughly discuss the key form elements.
<input>tag specifies an input field where the user can enter data. The
<input>element is the most important form element – it can be displayed in several ways, depending on the type attribute.
<select>element is used to create a drop-down list – it is most often used in forms to collect user input. The
<option>tags inside the
<select>element define the available options in the drop-down list.
check-boxis a square box that is ticked (checked) when activated. Checkboxes let users select one or more options from a limited number of choices.
radio buttonis a form element that allows the user to select one option from a range of options. Radio elements are created with the HTML
<input>tag. Radio buttons can be nested inside a
<form>element or they can stand alone.
<textarea>tag defines a multi-line text input control. A
textareacan hold an unlimited number of characters, and the text renders in a fixed-width font. The size of the
textareais specified by the
Submit button: The
submit button submits all form values to a form-handler. The form-handler is typically a server page with a script for processing input data.
Reset button: The
reset button resets all form values to their initial values.
View all Courses