TRAVEL RESERVATION FORM IN HTML

 

Question:

Create a travel reservation form as indicated in the snapshot below:

The specifications that needs to be adhered to are:

1. Heading of type <h1> should be present with value “Travel Reservation Form”.

2. Heading of type <h3> should be present with the value “*” denotes mandatory.

S.NOElement NameConstraints
1passengername It should be an input field with the type as ‘text’ and the default value (placeholder) should be  “Name” .
2mobileIs a mandatory input field.  The default value (placeholder) should be  “*Mobile Number” . Do not use text field or number field instead use HTML5 feature ‘tel’ field type.
3mailIdIt is a mandatory input field. The default text (placeholder) is “*Email ID”.  Use the input field type as  HTML5 Feature ’email’.
4travelmonthThis should be a ‘select’ field which should contains a list of dates in the format “MonYYYY” i.e: Aug2018. “Month of Travel” should be the default value. Provide 9 values excluding the default value.
5packageIt is a mandatory ‘select’ field. “*Origin” should be displayed by default.
6destinationIt should be an input field with type as ‘text’ and the text “Destination” should be displayed by default (placeholder).
7submitIt should be an input field for the submit button.  Set the type of the field as  ‘submit’ and the value as  “Get A Call”.
8clearIt should be an input field for the reset/clear button.  Set the type of the field as ‘reset’ and the value as  “Clear”.

The options for the ‘select’ component with the name “package” is as follows: GOA,MUMBAI,KERALA,TAMILNADU,KOLKATA.

Use the same values while coding.

SAMPLE FORM

CODE:

<html>
    <centre>
        <h1> TRAVEL RESERVATION FORM</h1><br>
        <h3> * denotes mandatory </h3>
        <hr>
        <input type="text" name="passengername" placeholder="Name">
        <input type="tel" name="mobile" required placeholder="*Mobile Number"><br>
        <input type="email" name="mailId" placeholder="*Email ID" required>
        <select name="travelmonth">
            <option value="month of travel">Month of Travel</option>
            <option value="aug2018">Aug2018</option>
            <option value="sep2018">Sep2018</option>
            <option value="oct2018">Oct2018</option>
            <option value="nov2018">Nov2018</option>
            <option value="dec2018">Dec2018</option>
            <option value="jan2019">Jan2019</option>
            <option value="feb2019">Feb2019</option>
            <option value="mar2018">Mar2018</option>
            <option value="apr2018">Apr2018</option>
        </select>
        <br>
        <select name="package" required>
            <option value="origin"> *Origin</option>
        </select>
        <input type="text" name=destination placeholder="Destination"><br>
        <input type="submit" name="submit" value="Get A Call">
        <input type="reset" name="clear" value="Clear">
    </centre> 
</html>
Previous
Next Post »