Page 104 - 2611_SmartGPT Pro V(5.0) C-6
P. 104
REVISIT
▶ CSS stands for Cascading Style Sheets that can change the colour, font, size and layout of elements to make a web
page more engaging.
▶ A selector identifies the HTML element for CSS rules.
▶ A property defines the style to apply, such as COLOR, FONT-SIZE or BACKGROUND-COLOR.
▶ An inline CSS is used to apply a unique style for a single element.
▶ CSS background properties style and control element backgrounds.
▶ Font properties control text appearance, including family, size, style and weight.
▶ In CSS, border properties are used to control the appearance of the edges around elements.
▶ In CSS, margin properties are used to create space around elements, outside of their borders.
1. Tick ( ) the correct option.
a. Which component of the CSS syntax is a combination of a property and its value?
(i) Declaration (ii) Properties
(iii) Selector (iv) Declaration Block
b. Identify the correct result of the given CSS code snippet:
H1, H2, P { COLOR: GREEN; }
(i) Only <H1> text turns green (ii) Only <H2> text turns green
(iii) <H1>, <H2> and <P> texts turn green (iv) Only <P> text turns green
c. Pick the background property that sets an image as the background of an element.
(i) BACKGROUND-COLOR (ii) BACKGROUND-IMAGE
(iii) BACKGROUND-REPEAT (iv) BACKGROUND-SIZE
d. Select the margin property that sets the space on the top side of an element.
(i) MARGIN-RIGHT (ii) MARGIN-BOTTOM
(iii) MARGIN-TOP (iv) MARGIN-LEFT
e. Choose the CSS property that adds a shadow effect to text.
(i) TEXT-SHADOW (ii) TEXT-DECORATION
(iii) TEXT-ALIGN (iv) TEXT-TRANSFORM
2. Write ‘T’ for true and ‘F’ for false.
a. CSS improves performance by separating design, reducing code and speeding load times.
102 Computer Science (V5.0)-VI

