HTML & CSS Quiz: Units & Colors

This CSS quiz covers the units and color formats you use in almost every stylesheet. You will work out what em, rem, %, vw and vh resolve to, and read colors written as hex, rgb(), hsl() and named keywords.

आसान 10 सवाल ~5 मिनट पास होने के लिए 80%

मोड चुनें

आप गेस्ट के तौर पर खेल रहे हैं: XP और streak सेव रखने के लिए साइन इन करें।

सैंपल सवाल

सवाल 1 / 10

The root <html> element has the default font-size: 16px. What is 2rem in pixels?

जवाब दिखाएं

B. 32px rem is relative to the root element's font size, so 2rem = 2 x 16 = 32px wherever it is used. The parent's font size matters for em, not rem.

इस क्विज़ में क्या है

  • Absolute px vs relative em and rem
  • Percentages and viewport units vw and vh
  • Hex colors, short hex and alpha in hex
  • rgb() and hsl() with transparency
  • currentColor and unitless line-height

अक्सर पूछे जाने वाले सवाल

क्या अकाउंट ज़रूरी है?

नहीं। कोई भी खेल सकता है। XP, streak, badge और हिस्ट्री सेव रखने के लिए साइन इन करें।

क्या मैं इसे दोबारा दे सकता हूं?

हां। आपका बेस्ट स्कोर सेव रहता है, और हर बार सवाल और जवाब शफ़ल होते हैं।