Styling paragraphs in css (beginner)

Hi guys, I have a question about styling paragraphs in css.

What if I have 3000 paragraphs in html code and I want to color half red and the other half blue (styling in css)? if I go through classes, the solution will take longer.If anyone knows the simpless solution, please answer :smiley:

If you have that much paragraphs, you might have a back-end. So maybe the template engine can help?

If it needs to be done in pure css, nth-child could help:

:nth-child() - CSS: Cascading Style Sheets | MDN

The command I was looking for is nth-child.
Thank you!

1 Like