Hi im new with html and css, and I was wondering if there is a way to make a bunch of paragraphs (20 to be exact)change color only by making the code for one that would apply to all of them? thanks.
I you would like all paragraphs to have the same color, you style the whole p element:
p{
color: red;
}
If you would like to style some lines, you can give the lines you would like to style a class:
<p class="red">text</p>
< ------- This will be red
<p>text</p>
<------ This will not be red
p.red{
color: red;
}
Thanks so much!
2 Likes