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; }

8th May 2024, 5:26 PM
charles mccarthhy
charles mccarthhy - avatar
3 ответов
+ 2
Thats almost correct. It is p.blog p is the element selector .blog is the class selector
8th May 2024, 5:37 PM
Chris Coder
Chris Coder - avatar
+ 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.
7th Nov 2024, 8:53 PM
Chris Coder
Chris Coder - avatar
0
Can't you use .blog p { text-align: center; } ?
7th Nov 2024, 2:10 PM
Joshua Clifford
Joshua Clifford - avatar