Slip 28 - B) Design a HTML form for Bus Ticket Reservation consisting of fields for Name, Address, contact no, source station(Dropdown list), Destination station, Date of booking, date of journey, no of passenger, name of passenger, gender of passenger etc. You should provide button to submit as well as reset the form contents. (Use proper alignment)

Solution:

<html>

<body>

  <form style="padding:50px; border:10; border-style: solid;">

<Table  height="70%" width="80%">

<font face="arial" size="5" align="center"> Bus Ticket Reservation From </font>

 <tr>

<td>Name: </td>

<td><input type="text" name="First Name"></td>

</tr>

 <tr>

<td>Address: </td>

<td><input type="text" name="First Name"></td>

</tr>

 <tr>

<td>Contact no. </td>

<td><input type="text" name="contact no."></td></tr>

 <tr><td>Station:</td>

<td>

<select>

<option value="Mumbai">Mumbai</option>

<option value="New Delhi">New Delhi</option>

<option value="Bangalore">Bangalore</option>

<option value="London">London</option>

</select></td>

</tr>

 <tr><td>Destination Station: </td>

<td><input type="text" name="First Name"></td></tr>

</tr>

 <tr><td>Date of booking :</td>

<td><input type="date-local"></td></tr>

 <tr><td>Date of Journey :</td>

<td><input type="date-local"></td></tr>

 <tr><td>No. of Passenger: </td>

<td><input type="text" name="contact no."></td></tr>

 <tr><td>Name of Passenger: </td>

<td><input type="text" name="First Name"></td>

</tr>

 <tr><td>Gender: </td>

<td><input type="radio" name="gender" value="male" checked> Male

<input type="radio" name="gender" value="male"> Female</td>

</tr>

 <tr><td>Suggestions</td><td><textarea name="message"></td></tr>

<input type="submit" value="submit" style=" target:submit;">

 </table>

</form>

</body>

</html>

Post a Comment

0 Comments