ExamBank Scot · N5 Computing Science question bank · All N5 Computing Science questions
7 marks · Cascading Style Sheets
Complete the table below to identify how this code would display the ‘Italian food’ and ‘Welcome to our restaurant’ text in a browser. ‘Italian food’ ‘Welcome to our restaurant’ Font Text size Background colour Text alignment The restaurant wants to add a link to one of their supplier’s website. ‘www.lowdensuppliers.com’ State the type of addressing required. The restaurant has added an audio file to the website using the following code. <audio controls> <source src="food.wav" type="audio/wav"> </audio> The file is converted to an MP3 file and replaces the audio file on the website. Describe one benefit and one drawback of this change to the website user. Benefit Drawback A restaurant has a website. The HTML and CSS code for the home page is shown below. HTML code … <body> <div> <h1> Bella Restaurant </h1> <h2> The best restaurant in town </h2> <p> Welcome to our restaurant </p> </div> <div id ="menu"> <h2> Italian food </h2> <p> Pasta</p> <p> Pizza</p> </div> … CSS code div{background-color:green;text-align:center;} p{font-size:18px;font-family:verdana;} #menu{background-color:red;text-align:right;} body{background-color:blue;font-family:arial; font-size:20px;}
See solution below. Award 1 mark per row. ‘Italian food’ ‘Welcome to our restaurant’ Font Arial Verdana Text size 20px 18px Background colour red green Text alignment right center Absolute Benefit: • reduce load time for the webpage • better compatibility with browser Drawback: • sound quality is reduced • compression technique will lose original data Award 1 mark for any one benefit. Award 1 mark for any one drawback. Drawback: • Lossy compression/Original data cannot be retrieved • Reduced High-Frequency Detail: You may notice a slight "muffled" quality, loss of "air" in vocals, or less crisp cymbal crashes and high hats