HTML Forms
HTML Forms
• Eg
• <input type="radio" name=“mode" value="yes">Yes
<input type="radio" name=“mode" value="no">No
Checkboxes
• Allows a user to select multiple options
• <INPUT TYPE="checkbox" NAME=“ID" VALUE="yes">Text<BR>
• Eg
• <INPUT TYPE="checkbox" NAME="music" VALUE="yes">Music<BR>
Drop down list
• Allows a user to select an option from predefined values
• The <select> element defines a drop-down list
• <select id=“id" name=“name">
• <option value="value1">Value1</option>
• <option value=“value2">value2</option>
• <option value=“value3">value3</option>
• <option value=value4">value4 </option>
• </select>
Buttons
• Allows some action to be performed when clicked by a user
• The <button> element defines a clickable button
• <button type="button" onclick="alert(‘Leave page')">Exit</button>
Submit and reset buttons
• The submit button is used to send user input to the URL specified in
the action attribute of the <form> element using the specified
method i.e post/ get
• The reset button is used to clear user input from the form
• <input type=“submit” value= “send”>
• <input type=“submit” value= “send”>
Research on the other Form elements
• <fieldset>
• <legend>
• <datalist>
• <output>
• <optgroup>
• <article>