- Ejecutores
-
Aprender
Aprender Python Ejemplos ejecutables, NumPy, pandas y más Aprender IA / Machine LearningRedes neuronales, ML y LLM desde cero Aprender C y C++ Punteros, memoria, STL y C++ moderno Aprender C#Fundamentos, POO, LINQ, async y ejercicios de .NET Aprender MatplotlibGráficos de líneas, barras, dispersión y sectores con visualizadores Aprender RustOwnership, traits, manejo de errores e hilos Aprender GoSlices, interfaces, goroutines y canales Algoritmos en Python Búsqueda, ordenación, recursión y visualizadores O(n) Algoritmos en C y C++ Compara implementaciones en C y C++ Programación para niños ¡Aprende a programar jugando!
- QuizzesNuevo
- RetosNuevo
- Para docentesNuevo
- Actualizaciones
- Invítame a un café
Quiz de HTML & CSS: The Box Model
This CSS quiz makes you do the math the browser does for every box. You will compute rendered widths with box-sizing: content-box and border-box, resolve percentage padding, and predict when vertical margins collapse.
Pregunta de ejemplo
Pregunta 1 de 10How wide is the box on screen, from its left border edge to its right border edge?
.box {
width: 200px;
padding: 20px;
border: 5px solid black;
margin: 10px;
}
Ver la respuesta
B. 250px The default box-sizing: content-box applies width to the content only: 200 + 20 + 20 + 5 + 5 = 250px. Margin is outside the border, so it adds space around the box but not to its border-box width.
Qué cubre este quiz
- Content, padding, border and margin
box-sizing: content-boxvsborder-box- Percentage padding and margin
- Vertical margin collapsing between siblings and with parents
- Centering a block with
margin: 0 auto
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.