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.

Difficile 10 domande ~8 minuti Superato con il 80%

Scegli una modalità

Stai giocando come ospite: accedi per salvare XP e serie.

Domanda di esempio

Domanda 1 di 10

Clicking the label does not focus the input. Why?

<label for="email">Email</label>
<input type="email" id="e-mail" name="email">
Mostra la risposta

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.

Cosa copre questo quiz

  • 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

Domande frequenti

Serve un account?

No. Chiunque può giocare. Accedi per salvare XP, serie, badge e cronologia.

Posso rifarlo?

Sì. Il tuo miglior punteggio resta salvato, e domande e risposte vengono mescolate ogni volta.