The
An HTML form contains form elements. Form elements are different types of input elements, like text fields, checkboxes, radio buttons, submit buttons, and more. The element is the most important form element. The element can be displayed in several ways, depending on the type attribute. Here are some examples: Type Description Defines a one-line text input field Defines a radio button (for selecting one of many choices) Defines a submit button (for submitting the form) ---------------------------------------------------------------------------------------- HTML5 form attributes There are 14 new attributes that we’ll be looking at in this article. placeholder autofocus required multiple formtarget formmethod formaction autocomplete pattern list novalidate formnovalidate form formenctype ------------------------------------------------------------------------------------------ Text Input ========== defines a one-line input field for text input: Example Radio Button Input ================== defines a radio button. Radio buttons let a user select ONE of a limited number of choices: Example The Submit Button ================= defines a button for submitting the form data to a form-handler. The form-handler is typically a server page with a script for processing input data. The form-handler is specified in the form's action attribute: Example The Action Attribute ==================== The action attribute defines the action to be performed when the form is submitted. Normally, the form data is sent to a web page on the server when the user clicks on the submit button. In the example above, the form data is sent to a page on the server called "action_page.php". This page contains a server-side script that handles the form data: -------------------------------------------------------------------------------------------------------------- The