- Esecutori
-
Impara
Impara Python Esempi eseguibili, NumPy, pandas e altro Impara l'IA / Machine LearningReti neurali, ML e LLM da zero Impara C e C++ Puntatori, memoria, STL e C++ moderno Impara C#Fondamenti, OOP, LINQ, async ed esercizi .NET Impara MatplotlibGrafici a linee, barre, dispersione e torta con visualizzatori Impara RustOwnership, trait, gestione degli errori e thread Impara GoSlice, interfacce, goroutine e canali Algoritmi Python Ricerca, ordinamento, ricorsione e visualizzazioni O(n) Algoritmi C e C++ Confronta le implementazioni in C e C++ Programmazione per bambini Impara a programmare giocando!
- QuizNuovo
- SfideNuovo
- Per docentiNuovo
- Aggiornamenti
- Offrimi un caffè
Quiz di HTML & CSS: Specificity & the Cascade
This CSS quiz is about the cascade, the algorithm the browser uses to choose one value when several rules set the same property. Expect tricky cases with specificity counting, source order, !important, inheritance, :is() and :where(), and cascade layers.
Domanda di esempio
Domanda 1 di 10What color is the paragraph?
<style>
#intro { color: red; }
p.lead.big { color: blue; }
</style>
<p id="intro" class="lead big">Hello</p>
Mostra la risposta
B. red #intro has specificity (1, 0, 0) and p.lead.big has (0, 2, 1). Columns are compared left to right, so one id beats any number of classes.
Cosa copre questo quiz
- Counting specificity as (ids, classes, types)
- Source order when specificity ties
- Inline styles and
!important - Inherited values vs rules that target the element
:is(),:where(),:not()and@layer
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.