/ Code Css :first-child | Résultat du code Css :first-child | Copie d'écran / J'ai vu une erreur dans cette page

Exemple de code du sélecteur CSS :first-child.

<style type="text/css">
div.firstchild  {
  border:1px solid red; 
}
div.firstchilda span {
  border:1px solid red; 
}
</style>
<div class="firstchild">Du texte <div>Premier child</div> <div>Second child</div> <div>Troisième child</div> Quatrième child ?</div>
<br><div class="firstchild">
<div>Du texte <span>Premier child</span> <span>Second child <b>Premier child du Second child</b></span> <span>Troisième child</span><span>Troisième child</span></div>
<div>Du texte <span>Premier child</span> <span>Second child</span> <span>Troisième child</span></div>
<div>Du texte <i>Premier child</i> <span>Second child</span> <span>Troisième child</span> <span><u>Premier child  du Quatrième child</u> <span>Second child du Quatrième child</span></span>
</div> Quatrième child ?</div>
<br>
<br><div class="firstchilda">
<div>Du texte <span>Premier child</span> <span>Second child <b>Premier child du Second child</b></span> <span>Troisième child</span><span>Troisième child</span></div>
<div>Du texte <span>Premier child</span> <span>Second child</span> <span>Troisième child</span></div>
<div>Du texte <i>Premier child</i> <span>Second child</span> <span>Troisième child</span> <span><u>Premier child  du Quatrième child</u> <span>Second child du Quatrième child</span></span>
</div> Quatrième child ?</div>

Interprétation du code du sélecteur :first-child CSS par votre navigateur.

Du texte
Premier child
Second child
Troisième child
Quatrième child ?

Du texte Premier child Second child Premier child du Second child Troisième childTroisième child
Du texte Premier child Second child Troisième child
Du texte Premier child Second child Troisième child Premier child du Quatrième child Second child du Quatrième child
Quatrième child ?


Du texte Premier child Second child Premier child du Second child Troisième childTroisième child
Du texte Premier child Second child Troisième child
Du texte Premier child Second child Troisième child Premier child du Quatrième child Second child du Quatrième child
Quatrième child ?

Interprétation normale du code du sélecteur CSS :first-child (copie d'écran).

copie d'écran de l'affichage du sélecteur CSS :first-child