In CSS, how do I make two different paragraphs different font sizes and colors? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

In CSS, how do I make two different paragraphs different font sizes and colors?

When I do another setup, it's not doing anything to the HTML Output Text.

18th Jul 2017, 4:10 PM
Shritan Khammamkar
Shritan Khammamkar - avatar
2 Answers
+ 15
Add class(es) or an Id to both of them. Remember, the ID's must be different (unique). For example : <p id="para1">This is a paragraph</p> <p id="para2">This is a paragraph</p> Now, you're able to give them different properties using CSS : #para1 { font-color: red; font-size: 12px; } #para2 { font-color: green; font-size: 20px; }
18th Jul 2017, 4:16 PM
Dev
Dev - avatar
0
Thanks!
10th Aug 2017, 2:37 AM
Shritan Khammamkar
Shritan Khammamkar - avatar