Квиз по 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 и серию.

Пример вопроса

Вопрос 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, серию, значки и историю.

Можно пройти ещё раз?

Да. Лучший результат сохраняется, а вопросы и ответы каждый раз перемешиваются.