- 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: Pseudo-classes & Pseudo-elements
This CSS quiz tests pseudo-classes like :first-child, :nth-child(), :not() and :where(), and pseudo-elements like ::before, ::placeholder and ::marker. You will read short snippets and decide which elements match, which rule wins and why some generated content never shows up.
Domanda di esempio
Domanda 1 di 10Which paragraphs turn red?
<style>
p:first-child { color: red; }
</style>
<div>
<h2>Title</h2>
<p>One</p>
<p>Two</p>
</div>
Mostra la risposta
C. Neither paragraph p:first-child means a p that is the first child of its parent. Here the first child is the h2, so no paragraph matches. p:first-of-type would select "One".
Cosa copre questo quiz
:first-childvs:first-of-typeand:nth-child()formulas::before/::afterand thecontentproperty- Specificity of
:not(),:is()and:where() - Link and focus states:
:hover,:focus-visible - Styling parts of elements:
::placeholder,::marker
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.