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
0

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:09 PM
Shritan Khammamkar
Shritan Khammamkar - avatar
1 Answer
0
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:47 PM
S C