0

Refere to <p>

If <p> is an element. Why dont we refere to it with # on css. #p ( )

6th Jul 2020, 2:05 PM
Younes Said
3 Réponses
+ 3
The #p selector selects all elements with id p. Use p{ } to select all p elements.
6th Jul 2020, 2:10 PM
Arnesh
Arnesh - avatar
+ 1
In CSS # is used as id selecter. As you know <p> is an element so if you want to select p you need to use p { //do styling here } If u want to select any element using # you need to create an unique id for that element In HTML: <p id="demo"></p> In CSS: #demo{ }
6th Jul 2020, 2:49 PM
Shobhith J B
Shobhith J B - avatar
0
Thanks thats clear
7th Jul 2020, 2:02 AM
Younes Said