ExamBank Scot · Higher Computing Science question bank · All Higher Computing Science questions
9 marks · Wireframes and prototyping
One of the pages of the website should allow users to request further information about holidays. Users will enter all of the following details: • e-mail • departure date • number of nights (between 1 and 14) • holiday type (either self-catering, bed and breakfast, or all inclusive) • number of people in the party (minimum of 1). Using the information above, draw a wireframe design for this web page. When a user searches for hotels, information is shown as below. These hotels match your search criteria Dundee Arms This is a lovely little local hotel Price Double rooms from £80 per night. Rating 4/5 + More details <style> … section p {background-color: DarkGrey;} … </style> … <p>These hotels match your search criteria </p> <section id="hotel1"> <h2>Dundee Arms</h2> <img src="hotel.png"> <p>This is a lovely little local hotel</p> <h3>Price</h3> <p>Double rooms from £80 per night.</p> <h3>Rating 4/5</h3> <h3>+ More details</h3> <div id="info1"> <p>Additional hotel info.....</p> </div> </section> The text ‘This is a lovely . . .’ and ‘Double rooms . . .’ have a dark grey background. State the type of selector in the CSS rule below. section p {background-color: DarkGrey;} Describe the effect of the CSS rule in part (i). The ‘More details’ section is hidden when the page is viewed in a browser. A user should be able to view more details about the hotel by clicking on the text ‘More Details’. If it is clicked on again then the text in the ‘More details’ section is hidden. The page is updated as shown below. When ‘More details’ is clicked once When ‘More details’ is clicked again Dundee Arms Dundee Arms This is a lovely little local hotel This is a lovely little local hotel Price Price Double rooms from £80 per night. Double rooms from £80 per night. Rating 4/5 Rating 4/5 + More details + More details The Dundee Arms is a newly constructed hotel with excellent views of the Tay. When implemented the code below is used to show or hide the more details text. Complete the missing JavaScript code to ensure that the specified element is displayed. function toggleDisplay(DivToShow) { var x = document.getElementById(DivToShow); if (x.style.display === "none") { x.style.display = ; } else { x.style.display = "none"; } } The function to display the additional information for Dundee Arms from part (i) has been implemented. <section id="hotel1"> <h2>Dundee Arms</h2> … <h3>Rating 4/5</h3> <h3 A >+ More details</h3> <div id="info1"> <p>Additional hotel info...</p> </div> </section> Write the code required at position ‘A’ to call the function when the heading ‘More details’ is clicked. A holiday booking website is being developed.
• labelled fields for email, date, number of nights, type, number of people • validation of number of nights and people in party. Email being required • drop down or option buttons for holiday type • submit button Accept all fields being required. Descendant Targets p elements that are contained in a section element Must refer to <p> and <section> block • onclick event with function • correct parameter supplied to function onclick = "toggleDisplay('info1')"
Previous question: Higher Computing Science 2025 Question 16