21.3 Use stylesheets: past paper questions
Real questions on use stylesheets
The newest 19 of 19 written questions. Open one to see it on the real paper.
- 0417/13 · May/June 2026 · Q10a[4]
Explain the differences between attached stylesheets and inline style attributes.
See it on the paper → - 0417/31 · February/March 2025 · Q8[1]
Create a new stylesheet to meet the following specifications: Place a comment at the start of the stylesheet to contain your name, centre number and candidate number. Set a style for tables so that they are centre-aligned in the browser window. Set the table and cell borders so that they are white, visible and 2 pixels...
See it on the paper → - 0417/03 · October/November 2024 · Q13[1]
Open the stylesheet n24web.css in an editor. Add a new class called red that sets the font colour to the hexadecimal code for red when this class is applied. Add a new class called centre that centre-aligns text when the class is applied. Save your stylesheet. Take a screenshot to show the contents of your stylesheet a...
See it on the paper → - 0417/31 · May/June 2024 · Q19[14]
Create a new stylesheet so that: ...
See it on the paper → - 0417/12 · February/March 2024 · Q14a[3]
Explain the differences between a style and a class.
See it on the paper → - 0417/31 · February/March 2024 · Q8[1]
Open the stylesheet m24sbs.css in an editor. Add CSS to this stylesheet so that: ● ● ● ● ● ● ● ● ● your name, centre number and candidate number are set as a comment at the start of the stylesheet the table is centre-aligned within the browser window all table elements have the space between the borders set to 10 pixel...
See it on the paper → - 0417/03 · Specimen 2023 · Q3[23]
Open the stylesheet SpecStyle.css The specifications for this stylesheet are: All table borders and gridlines are visible table size 90 percent of the width of the browser window borders Not collapsed Width 2 pixels Solid Border colour 808000 table data cell padding Top 8 pixels Left and right 20 pixels Bottom 6 pixels...
See it on the paper → - 0417/03 · Specimen 2023 · Q4[2]
Open the web page SpecWebpage.htm in a suitable editing package. Replace the text A Candidate, ZZ999, 9999 with your name, centre number and candidate number. Attach the stylesheet SpecStyle1.css to this web page. Attach the stylesheet you edited in Step 3 to your web page so that it has a higher priority than the styl...
See it on the paper → - 0417/03 · October/November 2023 · Q7[16]
Open the stylesheet n23tgs.css and correct the mistake in the CSS. Edit this stylesheet to meet these specifications: Tables must be centre aligned within the browser window. Tables must fit 85% of the browser window. Table borders and gridlines must not be visible. Table cells must have padding of 20 pixels. The backg...
See it on the paper → - 0417/13 · May/June 2023 · Q12[2]
A web page has an attached stylesheet in the head section and also has an inline style attribute in the body section. Explain why the inline style attribute is used.
See it on the paper → - 0417/31 · May/June 2023 · Q12[6]
Create CSS to be added to an external stylesheet to meet these specifications: Set the font for h1, h2, h3 and the paragraph styles so that the browser selects and displays the font Calibri.
See it on the paper → - 0417/31 · February/March 2023 · Q10[13]
Create a new stylesheet in your TCC folder called m23tcc.css Add CSS to this stylesheet to meet these specifications: background colour blue component green component red component h1, h2, h3 and p font style Domino, but if this font is not available then Domino Regular, or if these fonts are not available, the browser...
See it on the paper → - 0417/11 · May/June 2022 · Q6a[2]
the term stylesheets when used in web pages.
See it on the paper → - 0417/11 · May/June 2022 · Q6b[4]
the differences between attached stylesheets and inline style attributes.
See it on the paper → - 0417/31 · May/June 2022 · Q6[1]
Place inline style attributes into the HTML so that each image, with its aspect ratio maintained, fits the width of the table cell.
See it on the paper → - 0417/31 · May/June 2022 · Q13[27]
Open and edit the stylesheet you saved in step 12 to meet the following specifications: Set the background for the web page so that it has a colour with a: • blue component of d2 • red component of 74 • green component of ab
See it on the paper → - 0417/32 · May/June 2022 · Q19[30]
Create a new stylesheet to meet the specifications: ...
See it on the paper → - 0417/11 · October/November 2020 · Q4c[2]
Explain the difference between a style and a class.
See it on the paper → - 0417/12 · February/March 2020 · Q13c[2]
He searches his company website to find a suitable image for his multimedia presentation. Part of the markup language from the web page to load the image is shown. <img src =''New_product.jpg'' alt=''company logo''> When the markup is run, the words ‘company logo’ are displayed and not the image. Explain why this may b...
See it on the paper →
What examiners said
Where candidates attempted this question, most created a new stylesheet saved with the specified file name. Some candidates included HTML within the stylesheet or did not produce a separate stylesheet and included the styles embedded within the head section of the web page which gained no credit. Most candidates correctly set the comment at the start of the stylesheet using /* and */. A small numb...
— Examiner report, February/March 2025, 0417/31 Q8 (Cambridge)
This was a challenging question for candidates to answer. The better answers were those that stated that classes are user-defined and styles are pre-defined. Other good answers were that classes start with a full stop and giving an example of a style, for example h1.
— Examiner report, February/March 2024, 0417/12 Q14(a) (Cambridge)
Most candidates opened the correct file and produced a stylesheet as specified. Some candidates included HTML within the stylesheet or did not produce a separate stylesheet and included the styles within the head section of the web page which gained no credit. The CSS comment was not always set using /* */ and was sometimes seen at the end of the stylesheet or after the body {} selector rather tha...
— Examiner report, February/March 2024, 0417/31 Q8 (Cambridge)
Past papers, syllabus and examiner reports © UCLES (Cambridge University Press & Assessment). Questions are matched to topics from the official syllabus. AssessPro is independent and not endorsed by Cambridge.