Advertisements
Advertisements
Question
Write the HTML code to design the webpage with the form as shown below:

Please note the following specifications while writing the code:
- Specification 1: The text “Flight Reservation Form” should be in heading level 3.
- Specification 2: There should be a text box to accept name of the passenger.
- Specification 3: Two radio buttons to choose the seat type (Economy or Business) as shown above. Economy should be the default selected radio button.
- Specification 4: Passenger’s category to be chosen from a combo box having options as Child, Adult, and Senior Citizen.
Code Writing
Advertisements
Solution
<!DOCTYPE html>
<html>
<head>
<title>Flight Reservation Form</title>
</head>
<body>
<!-- Specification 1: Heading level 3 -->
<h3>Flight Reservation Form</h3>
<form>
<!-- Specification 2: Text box for passenger name -->
Enter Name : <input type="text" name="passenger_name"><br><br>
<!-- Specification 3: Radio buttons with Economy as default -->
Seat Type :
<input type="radio" name="seat" value="Economy" checked> Economy
<input type="radio" name="seat" value="Business"> Business<br><br>
<!-- Specification 4: Combo box (Select) with categories -->
Select Category :
<select name="category">
<option value="Child">Child</option>
<option value="Adult">Adult</option>
<option value="Senior Citizen">Senior Citizen</option>
</select>
</form>
</body>
</html>
shaalaa.com
Is there an error in this question or solution?
