You no longer need to be worried if you are taking the LinkedIn CSS Skill Quiz Exam and are unsure about the proper answer to the question “Using the :nth-child pseudo class, what would be the most efficient way to style every third item in a list, no matter how many items are present, starting with item 2?” I have provided the right answer to your question below.
Using the :nth-child pseudo class, what would be the most efficient way to style every third item in a list, no matter how many items are present, starting with item 2?
Options
- li:nth-child(3 + 2n) { margin: 0 5 px; }
- li:nth-child(3n + 2) { margin: 0 5 px; }
- li:nth-child(2), li:nth-child(5), li:nth-child(8) { margin: 0 5 px; }
- li:nth-child(2n + 3) { margin: 0 5 px; }
The Correct Answer Is:
- li:nth-child(3n + 2) { margin: 0 5 px; }
Conclusion
I believe I was successful in answering your query “Using the :nth-child pseudo class, what would be the most efficient way to style every third item in a list, no matter how many items are present, starting with item 2?”. I hope you easily pass the certification exam and get the certificate as soon as possible. Have a great time! Good luck!