ExamBank Scot · Higher Computing Science question bank · All Higher Computing Science questions

Higher Computing Science 2024 Question 17

7 marks · Website structure

The ‘Captains and Prefects’ web page has been created and is shown below. It does not match the navigational structure shown above. The Secondary School Home Pupils Parents/Carers Faculties Contact Captains and Prefects Page Captains and Prefects have various responsibilities such as supervising lunch and the playground, helping first year pupils settle into the school and supporting whole school events. SCHOOL CAPTAIN School Uniform School Day ©The Secondary School PREFECT Describe the difference between the navigational structure and the actual web page. Complete the CSS code to style the horizontal navigational bar so that: • no bullet points are shown • each list item is placed horizontally • when the cursor is placed over an anchor element, the background colour is white and the text colour is black. nav ul { :none;} nav ul li { ;width:180px;} nav ul li a {display:block;padding:6px;} nav ul li {background-color: white; color: black;} The wireframe for the ‘School Day’ web page is shown below. badge.jpg Faculties Contact Us mon.jpg tue.jpg wed.jpg thu.jpg fri.jpg Text revealed by putting mouse over graphic above School Day School Day Text Heading Home Pupils Parents/Carers Intro Text When the mouse is moved over the mon.jpg graphic, the Monday text should appear with information about Monday’s school day. The displayMon JavaScript event executes this feature. Part of the HTML code used for this web page is shown below. … <img src="mon.jpg"> … <section id="monText" style="display:none"> <h2>Monday</h2> <p>8.55am – 3.45pm</p> </section> … The HTML code shown above is not fit for purpose. Re‑write the line of code to correct the error. The function displayMon calls another JavaScript function named hideAllDays which hides the text for all of the days currently displayed, ensuring only the text for Monday is displayed. <script> function hideAllDays() { document.getElementById("monText").style.display="none"; … } function displayMon() { A document.getElementById("monText").style.display=" B "; } </script> Complete the missing JavaScript code for the function displayMon. A B The following diagram shows the navigational structure of a secondary school website. Home Pupils Parents/Carers Faculties Extra-Curricular School Uniform Clubs Computing and Business Captains and Prefects level Contact 1 Maths and English Health and level School Day Wellbeing 2 Humanities

Marking scheme

There are links to pages that should not be there (School Uniform and School Day) OR Links to School Uniform/School day should be on Parents/Carers page • list-style-type • float:left • a:hover nav ul {list-style- type:none} nav ul li {float:left;width:180px} nav ul li a {display:block;padding:6px} nav ul li a:hover {background- color:white;color:black} <img src="mon.jpg" onmouseover="displayMon()"> Accept displayMon(this) Must have brackets for function call A: hideAllDays(); B: block/inline Accept hideAllDays(this) Must have brackets for function call

Previous question: Higher Computing Science 2024 Question 16

Next question: Higher Computing Science 2024 Question 18