+ 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.
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}
+ 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
+ 1
Thanks @Alberuni Azad
0
You are welcome :)
0
i think using ID is more intelligent here
0
<p style="color:red;"> THis is paragraph 1 </p>
<p style="color:green;"> THis is paragraph 2 </p>