This section presents you various set of Mock Tests related to CSS. You can download these sample mock tests at your local machine and solve offline at your convenience. Every mock test is supplied with a mock test key to let you verify the final score and grade yourself.
Q 1 - Which of the following is correct about CSS?
A - CSS is used to control the style of a web document in a simple and easy way.
B - CSS is the acronym for "Cascading Style Sheet".
C - You can write CSS once and then reuse same sheet in multiple HTML pages.
All of the above options are correct.
Q 2 - Which of the following is correct about CSS?
A - Style sheets allow content to be optimized for more than one type of device.
B - CSS can store web applications locally with the help of an offline catche.
All of the above options are correct.
Q 3 - Which of the following is a component of CSS style rule?
All of the above options are correct.
Q 4 - Which of the following selector matches all elements of a type?
The Type Selector selects all elements of a type.
Q 5 - Which of the following selector matches the name of any element type?
The Universal Selector matches the name of any element type.
Q 6 - Which of the following selector matches a particular element only when it lies inside a particular element?
The Descendant Selector matches a particular element only when it lies inside a particular element.
Q 7 - Which of the following selector matches a element based on its class attribute?
The Class Selector matches a element based on its class attribute.
Q 8 - Which of the following selector matches a element based on its id?
The Id Selector matches a element based on its id attribute.
Q 9 - Which of the following selector selects all paragraph elements with a lang attribute?
p[lang] − Selects all paragraph elements with a lang attribute.
Q 10 - Which of the following selector selects all paragraph elements whose lang attribute has a value of exactly "fr"?
p[lang="fr"] − Selects all paragraph elements whose lang attribute has a value of exactly "fr".
Q 11 - Which of the following selector selects all paragraph elements whose lang attribute contains the word "fr"?
p[lang~="fr"] − Selects all paragraph elements whose lang attribute contains the word "fr".
Q 12 - Which of the following selector selects all paragraph elements whose lang attribute contains values that are exactly "fr", or begin with "fr-"?
p[lang|="fr"] − Selects all paragraph elements whose lang attribute contains values that are exactly "fr", or begin with "fr-".
Q 13 - Which of the following is a way to associate styles with your HTML document?
A - Embedded CSS - The tags or rules defined in any external style sheet file.
B - Any rule defined in tags will override rules defined in any external style sheet file.
All of the above.
Q 16 - Which of the following defines a measurement as a percentage relative to another value, typically an enclosing element?
% − Defines a measurement as a percentage relative to another value, typically an enclosing element.
cm − Defines a measurement in centimeters.
Q 18 - Which of the following defines a relative measurement for the height of a font in em spaces?
em − A relative measurement for the height of a font in em spaces. Because an em unit is equivalent to the size of a given font, if you assign a font to 12pt, each "em" unit would be 12pt; thus, 2em would be 24pt.
Q 19 - Which of the following defines a measurement relative to a font's x-height?
ex − This value defines a measurement relative to a font's x-height. The x-height is determined by the height of the font's lowercase letter x.
in − Defines a measurement in inches.
mm − Defines a measurement in millimeters.
pc − Defines a measurement in picas. A pica is equivalent to 12 points; thus, there are 6 picas per inch.
pt − Defines a measurement in points. A point is defined as 1/72nd of an inch.
px − Defines a measurement in screen pixels.
vh − 1% of viewport height.
Question Number | Answer Key |
---|---|
1 | D |
2 | D |
3 | D |
4 | A |
5 | B |
6 | C |
7 | D |
8 | A |
9 | A |
10 | B |
11 | C |
12 | D |
13 | C |
14 | C |
15 | D |
16 | A |
17 | B |
18 | C |
19 | D |
20 | A |
21 | B |
22 | C |
23 | D |
24 | A |
25 | B |