This chapter describes all HTML form elements. <input> Elements
The most important form element is the <input> element.
Depending on the type attribute, <input> elements can be changed into multiple forms.
Note: The next chapter explains all HTML input types. <select> elements (drop down list)
<select> element definition Drop-down list: instance
<select name= "Cars" >
<option value= "Volvo" >Volvo</option>
<option value= "Saab" > saab</option>
<option value= "Fiat" >Fiat</option>
<option value= "Audi" >audi</ Option>
</select>
The <option> element defines the options to be selected.
The list usually displays the first option as the selected option.
You can define predefined options by adding the selected property. instance
<option value= "Fiat" selected>fiat</option>
<textarea> Elements
<textarea> element defines multiple-line input fields (text fields): instance
<textarea name= "message" rows= "ten" cols= ">" The
cat was playing in the garden.
</textarea>
The above HTML code appears in the browser as:
The cat is playing in the garden.
<button> Elements
<button> element Definition clickable button: instance
<button type= "button" onclick= "alert (' Hello world! ')" >click me!</button>
The above HTML code appears in the browser as: Click me! HTML5 table cell element
HTML5 adds the following form elements: <datalist> <keygen> <output>
Note: By default, the browser does not display unknown elements. The new element will not corrupt your page. HTML5 <datalist> Elements
<datalist> element provides a list of predefined options for the <input> element.
Users will see a drop-down list of predefined options when they enter data.
The list property of the <input> element must reference the id attribute of the <datalist> element. instance
To set the <input> element of a predefined value by <datalist>:
<form action= "action_page.php" >
<input list= "Browsers" >
<datalist id= "Browsers" >
<option value= "Internet Explorer" >
<option value= "Firefox" >
<option value= "Chrome" >
<option value= "Opera" >
<option value= "Safari" >
</datalist>
</form>