Quiz de HTML & CSS: display & position

This CSS quiz checks how display and position shape the layout. You will predict which properties inline elements ignore, how display: none differs from visibility: hidden, and where relative, absolute, fixed and sticky elements are placed.

Médio 10 perguntas ~6 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

How wide is the <span>?

<style>
  span { width: 300px; height: 100px; background: gold; }
</style>
<p>Some <span>short</span> text.</p>
Mostrar a resposta

B. As wide as its text, because width and height do not apply to inline elements A <span> is display: inline by default, and non-replaced inline boxes ignore width and height. Use display: inline-block or block to size it.

O que este quiz cobre

  • block, inline and inline-block
  • display: none vs visibility: hidden
  • relative and absolute with the containing block
  • fixed and how transform changes it
  • sticky and why it sometimes does not stick

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.