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

Difícil 10 perguntas ~8 minutos Aprovação com 80%

Escolha um modo

Jogando como visitante: entre para guardar seu XP e sua sequência.

Pergunta de exemplo

Pergunta 1 de 10

Which elements does this selector match?

.card:has(img) { padding: 0; }
Mostrar a resposta

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.

O que este quiz cobre

  • 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

Perguntas frequentes

Preciso de uma conta?

Não. Qualquer pessoa pode jogar. Entre para guardar seu XP, sequência, badges e histórico.

Posso refazer?

Pode. Sua melhor nota fica salva, e as perguntas e respostas são embaralhadas a cada vez.