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 preguntas ~8 minutos Se aprueba con 80%

Elige un modo

Juegas como invitado: inicia sesión para guardar tu XP y tu racha.

Pregunta de ejemplo

Pregunta 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">
Ver la respuesta

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.

Qué cubre este 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

Preguntas frecuentes

¿Necesito una cuenta?

No. Cualquiera puede jugar. Inicia sesión para guardar tu XP, racha, insignias e historial.

¿Puedo repetirlo?

Sí. Se guarda tu mejor puntuación, y las preguntas y respuestas se mezclan cada vez.