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

Higher Computing Science 2025 Question 15

1 mark · Horizontal navigation bars

A tourist office wants the navigation bar shown below on their website. The background colour should change to black and the font colour to white when the cursor moves over a link. Home Scotland England Wales The following CSS code is used to implement this. nav {height:30px; margin-bottom: 30px;} nav ul {list-style-type:none;} nav ul li {float:left; width:120px;} nav ul li a {display:inline; padding:10px;} nav:hover {background-color:black; color:white;} During testing the navigation bar is found not to be fit for purpose. Describe the change needed to the CSS code so that the navigation bar functions as intended.

Marking scheme

• the hover should apply to anchor element Candidate may rewrite code nav ul li a: hover

Previous question: Higher Computing Science 2025 Question 14

Next question: Higher Computing Science 2025 Question 16