+ 1
why #intro P ?! the article didnt say to use P after #id ...
I am talking about the test
6 Réponses
+ 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.
+ 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! :)
+ 1
thnq Guys! got it now! <3
+ 1
p#intro {} this also work right??
0
#intro p{color:red;}
0
#intro selects only the element with id intro. #intro p selects all paragraphs that are in the element with id intro.