- CSS Tutorial
- CSS - Home
- CSS - Introduction
- CSS - Syntax
- CSS - Inclusion
- CSS - Measurement Units
- CSS - Colors
- CSS - Backgrounds
- CSS - Fonts
- CSS - Text
- CSS - Images
- CSS - Links
- CSS - Tables
- CSS - Borders
- CSS - Margins
- CSS - Lists
- CSS - Padding
- CSS - Cursors
- CSS - Outlines
- CSS - Dimension
- CSS - Scrollbars
- CSS Advanced
- CSS - Visibility
- CSS - Positioning
- CSS - Layers
- CSS - Pseudo Classes
- CSS - Pseudo Elements
- CSS - @ Rules
- CSS - Text Effects
- CSS - Media Types
- CSS - Paged Media
- CSS - Aural Media
- CSS - Printing
- CSS - Layouts
- CSS - Validations
- CSS3 Tutorial
- CSS3 - Tutorial
- CSS3 - Rounded Corner
- CSS3 - Border Images
- CSS3 - Multi Background
- CSS3 - Color
- CSS3 - Gradients
- CSS3 - Shadow
- CSS3 - Text
- CSS3 - Web font
- CSS3 - 2d transform
- CSS3 - 3d transform
- CSS3 - Animation
- CSS3 - Multi columns
- CSS3 - User Interface
- CSS3 - Box Sizing
- CSS Responsive
- CSS - Responsive Web Design
- CSS References
- CSS - Questions and Answers
- CSS - Quick Guide
- CSS - References
- CSS - Color References
- CSS - Web browser References
- CSS - Web safe fonts
- CSS - Units
- CSS - Animation
- CSS Resources
- CSS - Useful Resources
- CSS - Discussion
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
CSS Mock Test
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.
CSS Mock Test I
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.
Answer : D
Explanation
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.
Answer : D
Explanation
All of the above options are correct.
Q 3 - Which of the following is a component of CSS style rule?
Answer : D
Explanation
All of the above options are correct.
Q 4 - Which of the following selector matches all elements of a type?
Answer : A
Explanation
The Type Selector selects all elements of a type.
Q 5 - Which of the following selector matches the name of any element type?
Answer : B
Explanation
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?
Answer : C
Explanation
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?
Answer : D
Explanation
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?
Answer : A
Explanation
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?
Answer : A
Explanation
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"?
Answer : B
Explanation
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"?
Answer : C
Explanation
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-"?
Answer : D
Explanation
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.
Answer : D
Explanation
All of the above.
Q 16 - Which of the following defines a measurement as a percentage relative to another value, typically an enclosing element?
Answer : A
Explanation
% − Defines a measurement as a percentage relative to another value, typically an enclosing element.
Answer : B
Explanation
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?
Answer : C
Explanation
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?
Answer : D
Explanation
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.
Answer : A
Explanation
in − Defines a measurement in inches.
Answer : B
Explanation
mm − Defines a measurement in millimeters.
Answer : C
Explanation
pc − Defines a measurement in picas. A pica is equivalent to 12 points; thus, there are 6 picas per inch.
Answer : D
Explanation
pt − Defines a measurement in points. A point is defined as 1/72nd of an inch.
Answer : A
Explanation
px − Defines a measurement in screen pixels.
Answer : B
Explanation
vh − 1% of viewport height.
Answer Sheet
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 |