HTML & CSS: Find the Bug

In this quiz every snippet has one bug that breaks the intended result. You will find mismatched labels, selectors with a stray space, invalid nesting, ignored values and rules that lose the cascade, the kind of bugs that waste an afternoon in real HTML and CSS.

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

Clicking the label does not focus the input. Why?

<label for="email">Email</label>
<input type="email" id="e-mail" name="email">
Mostrar a resposta

C. for must match the input's id, but email and e-mail are different The for attribute points to an id, not a name. Fix it with id="email", or wrap the input inside the label so no for is needed.

O que este quiz cobre

  • Labels, IDs and case-sensitive selectors
  • Invalid HTML nesting the parser fixes for you
  • Selectors and declarations that silently do nothing
  • Media query order and the cascade
  • Centering, percentage heights and flex containers

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.