ExamBank Scot · Higher Computing Science question bank · All Higher Computing Science questions
13 marks · CSS rules and selectors
Describe the difference between an internal style sheet and an external style sheet. Explain why the use of external style sheets may result in optimal load times when compared to the use of internal style sheets. Joseph is using an external style sheet named “masterstyle”. Complete the HTML code that will successfully link to this stylesheet. <link rel = > type= “text/css” href= Joseph includes a rule in the external style sheet to make all the large headings appear in Tahoma font, blue and centred wherever they appear on each page. Write a CSS rule to manage these large headings. Searching for the ‘Glasburgh Safari’ or ‘pandas’ on the World Wide Web with a search engine does not give a prominent result for this site. Describe two ways that Joseph can improve this without incurring any further costs. Customers can purchase tickets via the website. Explain how the use of a database driven website would allow the safari park to display a message if there were only a small number of tickets left on a certain day. Joseph has been asked to develop a website for the Glasburgh Safari Park where visitors can go to see animals including pandas. Joseph often makes use of cascading style sheets which can be internal or external.
An internal style sheet is embedded within the HTML code for each page (1 mark) whereas an external style sheet is a separate file (that can be used by multiple pages) (1 mark). • An external style sheet would be loaded once and (cached locally for future use) (1 mark) • Internal style sheets would be downloaded every time the page is viewed again (1 mark) • Webpages have larger file sizes due to the embedded internal style sheets which take longer to download (1 mark) 1 mark for each bullet no need to reuse code can be viewed in line with bullet three. <link rel = “stylesheet” type= ”text/css” href= “masterstyle.css”> 1 mark for “stylesheet” 1 mark for “masterstyle.css” Also accept “masterstyle.css” / to allow for XHTML Do not penalise lack of quote marks. .css is needed for second mark. H1 {font-family:Tahoma; color:blue; text-align:center} • H1 (or H2) with { } • font-family:Tahoma; • color:blue; • text-align:center 1 mark for each bullet for a maximum of three marks. Order is not important. Do not accept colour or centre. Answer can be written on one line. • Make use of a keywords meta tag (to include the terms ‘Glasburgh Safari’ or ‘pandas’) (1 mark) • Make use of terms ‘Glasburgh Safari’ or ‘pandas’ throughout the body of the pages of the website • Include keywords eg (‘Glasburgh Safari’ or ‘pandas’) in the title tags (1 mark) • ALT tags on images • Create/submit a sitemap • Any other valid ‘Meta description tags’ are not relevant to search engines but provide an overview of content once a search has been returned. Not valid as a response. A query could be used to calculate how many tickets are available (1 mark) An appropriate message is generated from the result of the query (code is used to generate a message)(1 mark) 1 mark for query. 1 mark for decision to generate a message. Do not accept ‘displaying a message’ as this was stated in the question.
Previous question: Higher Computing Science 2015 Question 15 (CfE)
Next question: Higher Computing Science 2015 Question 17 (CfE)