CSS Interview Questions

This CSS quiz covers the questions you are most likely to hear in a front-end interview: the box model, specificity, positioning, em vs rem, hiding elements and the cascade keywords. Small snippets let you prove the answer instead of guessing.

Media 10 preguntas ~6 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

With the default box-sizing: content-box, how wide is this box on screen (border included)?

.box {
  width: 200px;
  padding: 20px;
  border: 5px solid;
}
Ver la respuesta

D. 250px With content-box, width is only the content: 200 + 20 * 2 padding + 5 * 2 border = 250px. With box-sizing: border-box the box would be exactly 200px.

Qué cubre este quiz

  • The box model and box-sizing
  • Specificity, !important and initial
  • Positioning, z-index and margin collapsing
  • em vs rem calculations
  • Hiding elements: display, visibility, opacity

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.