0
Code a rule for all the paragraph elements that share the class blog { text-align: center; }
Code a rule for all the paragraph elements that share the class blog p blog{ text-align: center; }
3 Réponses
+ 2
Thats almost correct. It is
p.blog
p is the element selector
.blog is the class selector
+ 1
Joshua Clifford
p.blog applies to <p> elements that directly have the class blog.
.blog p applies to any <p> elements within an element that has the class blog, even if the <p> elements themselves do not have that class.
0
Can't you use
.blog p {
text-align: center;
}
?