ควิซ HTML & CSS: 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, เหรียญตรา และประวัติ

ทำซ้ำได้ไหม?

ได้ ระบบเก็บคะแนนที่ดีที่สุดไว้ และสลับคำถามกับตัวเลือกใหม่ทุกครั้ง