<div class="question">
    <p class="black green">What will be the color of the text?</p>
</div>

CSS rules:
p.green { color:green; }

.question .black { color:black; }
Explanation
The answer is "Black" because .question .black has higher priority.

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Keep exploring
HTML & CSS quizzes
Cosmo
Sign Up Now
or Subscribe for future quizzes