CSS Questions & Answers – Measurements in CSS

This set of CSS Quiz focuses on “Measurements in CSS”.

1. Which of the following measurement defines a measurement in centimeters?
a) c
b) cm
c) centi
d) centimeter
View Answer

Answer: b
Explanation:

Example: div {margin-bottom: 1cm;}

2. Which of the following measurement defines a measurement relative to the height of a font in em spaces?
a) px
b) in
c) em
d) pt
View Answer

Answer: c
Explanation: Defines a measurement relative to 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.
advertisement
advertisement

3. Which of the following measurement defines a measurement in points?
a) px
b) in
c) em
d) pt
View Answer

Answer: d
Explanation: Defines a measurement in points. A point is defined as 1/72nd of an inch. A point does not equate to a pixel unless there are 72 pixels per inch onscreen.

4. Which of the following measurement defines a measurement in inches?
a) px
b) in
c) em
d) pt
View Answer

Answer: b
Explanation:

Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!
Example: p {word-spacing: .25in;}

5. Which of the following measurement defines a measurement in pixels?
a) px
b) in
c) em
d) pt
View Answer

Answer: a
Explanation: None.
advertisement

6. Which of the following measurement defines a measurement relative to a font’s x-height?
a) e
b) xh
c) ex
d) rxh
View Answer

Answer: c
Explanation: 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.

7. Which of the following measurement is relative to 1percentage of viewport’s larger dimension?
a) vw
b) vmax
c) vmin
d) ch
View Answer

Answer: b
Explanation: None.
advertisement

8. Which of the following measurement is relative to 1percentage of the width of the viewport?
a) vw
b) vmax
c) vmin
d) ch
View Answer

Answer: a
Explanation: None.

9. Which of the following measurement is relative to 1% of the height of the viewport?
a) ch
b) rem
c) %
d) vh
View Answer

Answer: d
Explanation: None.

10. Which of the following measurement is relative to font-size of the root element?
a) rem
b) kd
c) rr
d) hx
View Answer

Answer: a
Explanation: None.

Sanfoundry Global Education & Learning Series – CSS.

To practice all areas of CSS for Quizzes, here is complete set of 1000+ Multiple Choice Questions and Answers.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.