create two files named:
- index.html
- style.css
Html Code:(index.html)
<!DOCTYPE html>
<html>
<title>Student registration form</title>
<link rel="stylesheet" href="style.css">
<head>
</head>
<body>
<div>
<h2>Student Registration Form</h2>
<form action="#" name="StudentRegistration" onSubmit="return(validate());">
<table>
<tr>
<td><label>Your Name</label></td>
<td><input type="text" name="" value="" /></td>
</tr>
<tr>
<td><label>Father Name</label></td>
<td><input type="text" name="" value="" /></td>
</tr>
<tr>
<td><label>Postal Address</label></td>
<td><textarea></textarea></td>
</tr>
<tr>
<td><label>Personal Address</label></td>
<td><textarea></textarea></td>
</tr>
<tr>
<td><label>gender</label></td>
<td><input type="radio" name="gender" id="male"><label for="male">Male</label><input type="radio" name="gender" id="female" /><label for="female">Female</label></td>
</tr>
<tr>
<td><label>City</label></td>
<td><select name="City">
<option value="-1" selected>select..</option>
<option value="raw">rawalpindi</option>
<option value="lah">lahore</option>
<option value="kh">karachi</option>
<option value="isl">islamabad</option>
</select></td>
</tr>
<tr>
<td><label>Course</label></td>
<td><select name="Course">
<option value="-1" selected>select..</option>
<option value="B.Tech">BSCS</option>
<option value="MCA">BSSE</option>
<option value="MBA">BBA</option>
<option value="BCA">BSIT</option>
</select></td>
</tr>
<tr>
<td><label>District</label></td>
<td><select name="District">
<option value="-1" selected>select..</option>
<option value="jh">jhelum</option>
<option value="raw">rawalpindi</option>
<option value="sar">sargodha</option>
<option value="gujran">gujranwala</option>
</select></td>
</tr>
<tr>
<td><label>province</label></td>
<td><select Name="State">
<option value="-1" selected>select..</option>
<option value="New Delhi">punjab</option>
<option value="Mumbai">sindh</option>
<option value="Goa">KPK</option>
<option value="Bihar">bolachistan</option>
<option value="Bihar">golgit baltistan</option>
<option value="Bihar">azad kashmir</option>
<option value="Bihar">FATA</option>
</select></td>
</tr>
<tr>
<td><label>postal code</label></td>
<td><input type="number" name="" value=""></td>
</tr>
<tr>
<td><label>Email Id</label></td>
<td><input type="email" name="" id=""></td>
</tr>
<tr>
<td><label>birthday</label></td>
<td><input type="date" name="dob"></td>
</tr>
<tr>
<td><label>MobileNo</label></td>
<td><input type="tel" name="mobileno"></td>
</tr>
</table>
<input type="reset"><input type="submit" value="Submit Form" />
</form>
</div>
</body>
</html>
Css Code:(style.css)
body { background-color: red; font-family: arial; } div { border: 2px solid black; width: 500px; margin: 0 auto; padding: 20px; background-color: pink; font-weight: bold; } h2 { text-align: center; }
0 Comments