Tuesday, 10 June 2014

Lecture # 04

Following Topics were covered in Fourth Lecture:
  • Forms

Example:

<!DOCTYPE html>
<html>
<form>
First Name : <input type="text" name="fname"> </br>
Last Name : <input type="text" name="lname"> </br>

Password : <input type="password" name="pwd"> </br>

Gender : 
<input type="radio" name="gender" value="male"> Male
<input type="radio" name="gender" value="female"> Female </br>

Hobbies :
<input type="checkbox" name="hoby" value="cricket">Cricket
<input type="checkbox" name="hoby" value="cooking">Cooking
<input type="checkbox" name="hoby" value="chitchat">Chatting
<input type="checkbox" name="hoby" value="swimming">Swimming
<input type="checkbox" name="hoby" value="hacking">Hacking </br>

Where do u live? <select name="city">
<option name="karachi"> Karachi </option>
<option name="lahore"> Lahore </option>
<option name="islamabad"> Islamabad </option>
<option name="rawalpindi" selected> Rawalpindi </option>
</select> </br>

<textarea rows="10" cols="30">
This is text area.
</textarea> </br>

<fieldset>
<legend> Personal Information </legend>
Name : <input type="text"> </br>
School/College : <input type="text"> </br>
Address : <input type="text"> </br>
Cell # <input type="text"> </br>
</fieldset>

<fieldset>
<legend> Friend's Information </legend>
Name : <input type="text"> </br>
School/College : <input type="text"> </br>
Address : <input type="text"> </br>
Cell # <input type="text"> </br>
</fieldset>

<select>
<optgroup label="Pakistan">
<option> Karachi </option>
<option> Lahore </option>
</optgroup>
<optgroup label="USA">
<option> New York </option>
<option> Washington </option>
</optgroup>
<optgroup label="Autralia">
<option> Sydney </option>
<option> Livepool </option>
</optgroup>
</select> </br>


<input list="country" name="country">
<datalist id="country">
<option> Pakistan </option>
<option> Austrlia </option>
<option> India </option>
<option> China </option>
<option> Japan </option>
<option> Russia </option>
<option> Iran </option>
</datalist></br>

<input type="button" Value="Papu">
<input type="submit" value="Submit">

</form>
</html>

No comments:

Post a Comment