Can you swing it?


I'm doing this exercice :
But, I can't find solution.

/*Add your CSS below!*/

p {
    font-family: Garamond;

div > p {
    color: #7AC5CD;   

ul li {
    color: #000000;
    text-decoration: none;

HTML is exactly the same.


you still need to target the introduction and summary paragraph, which are a direct child of body. Also, ul li should be ul li p, i don't agree with this, but the instructions explicitly state that paragraph should be part of the css selector


Here's how I did it, but I didn't quite understand what they meant by > (Do NOT use the universal selector for this! There's a better way; see the Hint for help.).
p {
font-family: Garamond;
body > p {
font-weight: bold;
div > p {
color: #7AC5CD;
li > p {
color: #000000;
text-decoration: underline;


> will only affect direct children:

  <p>i am affected</p>
    <p>i am not</p>

p or body p will affect all paragraphs nested somewhere inside body. Where as body > p will only affect paragraphs which have body as direct parent. In the above code, that is only the first paragraph, the second paragraph has div as direct parent.


Thank you. But I do actually understand CSS selectors. I was referring to what they said in the lesson about the universal selector, and tried to quote a text from the actual lesson, but this discussion software isn't being conventional when it comes to formatting. I had the text I was trying to quote pasted and selected then I clicked the 'Blockquote' icon in the toolbar.. This added the >in front of the selected text instead of formatting it as a quoted piece. Here's what I was referring to when I wrote "but I didn't quite understand what they meant by.." (this time quoted using the quote tags):

Why would we use the universal selector, which uses an asterix and affects all Ps, when we could simply use



no, the catch is that if people read all they might think they need the universal selector (*) while you should NOT use it. The universal selector would more then just the paragraphs, which is why p is the better solution


Why would I need the > if "div p" or "body p" have worked for me previously? Also does < make a difference?


> will only affect direct children, that is a huge difference. That is why you need it. < isn't anything


But I don't get why when you do:
font-weight: bold;

it doesn't bold everything. Or just the introduction.


omg dude thanks so much that helped a lot as well explain what was going on lol.


body > p will only affect the direct children inside body, the introduction and summary paragraph. The synopsis paragraph isn't a direct child of body, it is inside a div


Shame on Codeacademy for putting out such a terribly written question.


The catch is that you are confusing people by providing redundant information in the question.