This element displayed in different ways depend on type. Type may be text,password,email,number,checkbox,radio button,file or button etc.
<form>Name :<input type="text" name="name">
Note: If type is forgeted, negeleted, leaved or not given, default type will be text.
This element displayed in drop down list. The option element is used to show list.
<label>Fever Medicine :</label><select name="medicine">
<option value="panadol">Panadol</option>
<option value="paracetamol">Paracetamol</option>
<option value="brofin">Brofin</option>
</select>
Note: By default first element in drop down list will be selected.
To select predefined option add selected attribute in option.
<label>Fever Medicine :</label><select name="medicine">
<option value="panadol">Panadol</option>
<option value="paracetamol" selected>Paracetamol</option>
<option value="brofin">Brofin</option>
</select>
You can visible any number of options by size attribute.
<label>Fever Medicine :</label><select name="medicine" size="2">
<option value="panadol">Panadol</option>
<option value="paracetamol">Paracetamol</option>
<option value="brofin">Brofin</option>
</select>
You can select multiple options by multiple attribute.
<label>Fever Medicine :</label><select name="medicine" multiple>
<option value="panadol">Panadol</option>
<option value="paracetamol">Paracetamol</option>
<option value="brofin">Brofin</option>
</select>
Tip Ctrl+Alt+click right mouse button options to select.
Textarea element is much like the text input field but textarea allows for multiple rows of data to be shown and entered.
<form><textarea rows="3" cols="70" name="description" >Enter description here...</textarea>
</from>
row attribute is to show number of rows in that area. cols attribute is to show width of that area.
It defines predefined option for an input.
<label>Fever Medicine :</label><input list="medicine">
<datalist id="medicine">
<option value="Panadol">
<option value="Paracetamol">
<option value="Calpol">
</datalist>