Computer scienceFrontendCSSSelectors in Depth

Specificity

Color

Report a typo

What color will B (the second list item) have?

HTML:

<!-- the previous code -->

<body>
  <ol>
    <li>A</li>
    <li class="outstanding">B</li>
    <li>C</li>
  </ol>
</body>

<!-- the following code -->

CSS:

li.outstanding {
  color: blue;
}

.outstanding {
  color: purple;
}

li {
  color: red;
}
Enter a short text
___

Create a free account to access the full topic