How do I do Can you Swing it?

I am confused as to how to do the Can you Swing it? lesson, can someone help me?

Hey!

As you haven't posted much information, I can only assume that you want to know what the correct code is, so here's my:

HTML:



	
		
		Ultimate Text Challenge
	
	
		

Introduction: Cascading with CSS

Synopsis: When you set a property of a selector like 'p' to a certain value, that value applies to all p tags. If, however, you change that same property to a different value for a more specific instance of p, that change will override the 'general rule'.

  • If you say p { font-family: Garamond}, all 'p's will have the font Garamond.

  • BUT if you say li p {font-family: Verdana}, 'p's outside of 'li's will be in Garamond, and 'p's INSIDE 'li's will be in Verdana.

  • The more specific your selectors are, the higher importance CSS gives to the styling you apply!

Summary: Greater specificity makes CSS prioritize that particular styling.

CSS:

/*Add your CSS below!*/
p {
    font-family: Garamond;
}

body p {
    font-weight: bold;
}

div p {
    color:#7ac5cd;
    text-decoration: underline;
}

li p {
    color: #000000;
    text-decoration:underline;
}

Hope that helps!

Thank you! It really helped!

No problem, I’m happy to help :slight_smile:

Do you also understand why this solution work? Which imho is far more important then having the solution

Yes, I understand. :smiley: