Quiz di 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.

Facile 10 domande ~5 minuti Superato con il 80%

Scegli una modalità

Stai giocando come ospite: accedi per salvare XP e serie.

Domanda di esempio

Domanda 1 di 10

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

Mostra la risposta

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.

Cosa copre questo quiz

  • 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

Domande frequenti

Serve un account?

No. Chiunque può giocare. Accedi per salvare XP, serie, badge e cronologia.

Posso rifarlo?

Sì. Il tuo miglior punteggio resta salvato, e domande e risposte vengono mescolate ogni volta.