Квиз по HTML & CSS: Modern CSS

This CSS quiz covers features that now work in every major browser: :has(), container queries, native nesting, clamp(), aspect-ratio, logical properties and cascade layers. The questions focus on the details that trip people up in real code.

Сложный 10 вопроса ~8 минуты Проходной балл: 80%

Выберите режим

Вы играете как гость: войдите, чтобы сохранить XP и серию.

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

Вопрос 1 из 10

Which elements does this selector match?

.card:has(img) { padding: 0; }
Показать ответ

C. Cards that contain an img anywhere inside them :has() matches the element before it when the selector inside matches relative to it, here any descendant img. The style applies to the card, not the image. :has() is supported in all major browsers.

Что проверяет этот квиз

  • The :has() relational selector
  • Container queries and container-type
  • Native CSS nesting and how it differs from Sass
  • clamp() and aspect-ratio calculations
  • Logical properties, inset and @layer

Частые вопросы

Нужен ли аккаунт?

Нет. Играть может любой. Войдите, чтобы сохранять XP, серию, значки и историю.

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

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