+ 1

What if i want to use Css to style a parapraph A, and i want to use a different Css code to style paragraph B, how should i do it? is the question sensible.

12th Sep 2016, 4:33 PM
Arnold Gyan
Arnold Gyan - avatar
6 Respuestas
+ 9
You can give a class name in the both paragraph. For example: <p class="p1"> THis is paragraph 1 </p> <p class="p2"> THis is paragraph 2 </p> Then you can do the styling for both paragraph differently like as below. .p1{color:red} .p2{color:green}
12th Sep 2016, 5:01 PM
Alberuni Azad
Alberuni Azad - avatar
+ 4
you can give an ID="pA" and the other an Id="pB" know that if you use id you must give the style #pA or #pB { } like that
14th Sep 2016, 5:56 AM
mohamed aralle
mohamed aralle - avatar
+ 1
Thanks @Alberuni Azad
12th Sep 2016, 5:03 PM
Arnold Gyan
Arnold Gyan - avatar
0
You are welcome :)
12th Sep 2016, 6:04 PM
Alberuni Azad
Alberuni Azad - avatar
0
i think using ID is more intelligent here
18th Sep 2016, 5:33 PM
The Hunter
The Hunter - avatar
0
<p style="color:red;"> THis is paragraph 1 </p> <p style="color:green;"> THis is paragraph 2 </p>
25th Oct 2016, 3:15 PM
☮️Nitesh☮️
☮️Nitesh☮️ - avatar