+ 1

why #intro P ?! the article didnt say to use P after #id ...

I am talking about the test

13th Sep 2016, 4:58 PM
Ali Fathi
Ali Fathi - avatar
6 Answers
+ 3
You should read the Descendant Selectors lesson again. #intro selects only the element with id intro. #intro p selects all paragraphs that are in the element with id intro.
13th Sep 2016, 5:04 PM
Zen
Zen - avatar
+ 2
"p" means that the code inserted into {} will only work for items wich have "p" in the #intro object. Example: #mycontainer a { color:red; } This code means that every link in my "#mycontainer" ID will have the red color as default. a { color:red; } This code means that every link in my page is going to be red as default. If you have any other doubt, just ask! :)
13th Sep 2016, 5:06 PM
Scotti
Scotti - avatar
+ 1
thnq Guys! got it now! <3
13th Sep 2016, 5:08 PM
Ali Fathi
Ali Fathi - avatar
+ 1
p#intro {} this also work right??
16th Sep 2016, 3:40 PM
Fluffy Rabbit
Fluffy Rabbit - avatar
0
#intro p{color:red;}
14th Sep 2016, 7:28 AM
Fatima Zainab
Fatima Zainab - avatar
0
#intro selects only the element with id intro. #intro p selects all paragraphs that are in the element with id intro.
23rd Sep 2016, 2:47 PM
Niranjan Hindurao Jadhav
Niranjan Hindurao Jadhav - avatar