ExamBank Scot · Higher Computing Science question bank · All Higher Computing Science questions
11 marks · Website structure
When the site is loaded, there are pages that allow users to create an account, list their car or to search for cars. There is also a page to provide details on car leasing. From the search page there are pages for new cars, used cars and electric cars. Draw the navigational structure for this website. When creating a listing to sell a car, the user must enter the age and price of the car. Cars can be listed with a price between £200 and £75,000. The HTML code below allows the user to enter the car’s age and price. <form> … <p>Enter the age of the car:</p> <input type="number" name="age"> <br> <p>Enter listing price:</p> <input type="number" name="price"> … </form> Re-write the line of HTML code to ensure that the price of the car is entered and is a valid price. When listing a car, the user has to choose between Silver or Gold packages. The following HTML and CSS code is implemented. HTML CSS <h1>Listing Choice</h1> <section id="silver"> <h1>Silver Package</h1> <ul> <li>Item 1</li> ... </ul> </section> <section id="gold"> <h1>Gold Package</h1> <ul> <li>Item 1</li> ... </ul> </section> <div> <p>Please select ....</p> </div> section {width: 150px;} #silver {background-color: red; float:left;} #gold {background-color: blue; float:left;} The intended layout is shown below. When tested the text is displayed to the right instead of below. Complete the CSS rule below to make this change. div{ } The text in both the ‘Silver Package’ and ‘Gold Package’ sections should be Arial. Complete the CSS rule below to apply this property. {font-family: Arial;} When viewing the details of a car there should be four images shown in a grid. 10 pixels space all images must be 600 pixels wide carImage1.png carImage2.png 10 pixels space carImage3.png carImage4.png 1210 pixels space The HTML and CSS code below is written to implement this. … <style> img {width: 600px; display: block; float:left; margin: 10px;} div {width: 1210px;} </style> </head> <body> … <div> <img src="carImage1.png"> <img src="carImage2.png"> </div> <div> <img src="carImage3.png"> <img src="carImage4.png"> </div> … Explain why the code above is not fit for purpose even when the page is viewed in a full screen browser. The code from part (i) is corrected. However, during compatibility testing, users report that when viewing the site on their smartphone it still does not display as intended. Explain why the issue may still exist when viewing the site using a browser on a smartphone. An extract from one of the pages is shown below. Thank you for visiting our site! See you again. If you want to know more about us please visit our social media page here. The following HTML is used. <p>Thank you for visiting our site!</p> <p>See you again.</p> <p>If you want to know more about us please visit our social media page <a href = http://instapage.com/AberCars>here.</a> </p> Explain why the paragraph elements appear on different lines, but the anchor element is displayed on the same line as the paragraph element. A website allows people to buy and sell cars online.
• level 1 pages • level 2 pages • required attribute • min and max values <input type="number" name="price" min = “200” max = “75000” required> clear:both #silver,#gold Accept use of grouping appropriate descendent selectors, for example: section h1,section ul/li Do not award if candidate writes additional CSS rule. • there is margin added to each side of the image • this makes the width of the div smaller than the two images/ takes the width of the content to 1240 pixels • so the images will be displayed vertically Award 1 mark for each bullet. Maximum 2 marks. Smartphones may not have the screen resolution/number of pixels required. Any reference to size must reference resolution/number of pixels. • paragraphs are block elements/take up the whole width of its container • anchors are inline element/do not start on a new line and only take up as much width as necessary
Previous question: Higher Computing Science 2025 Question 17