FAQ: Learn CSS Selectors Visual Rules - CSS Setup Selectors - Specificity

This community-built FAQ covers the “Specificity” exercise in Codecademy’s CSS lessons.

FAQs on the CSS exercise Specificity

Join the Discussion. We Want to Hear From You!

Have a new question or can answer someone else’s? Reply (reply) to an existing thread!

Agree with a comment or answer? Like (like) to up-vote the contribution!

Need broader help or resources about CSS in general? Go here!

Want to take the conversation in a totally different direction? Join our wider discussions.

Learn more about how to use this guide.

Found a bug? Report it!

Have a question about your account, billing, Pro, or Pro Intensive? Reach out to our support team!

None of the above? Find out where to ask other questions here!

Other FAQs

The following are links to additional questions that our community has asked about this exercise:

  • This list will contain other frequently asked questions that aren’t quite as popular as the ones above.
  • Currently there have not been enough questions asked and answered about this exercise to populate this FAQ section.
  • This FAQ is built and maintained by you, the Codecademy community – help yourself and other learners like you by contributing!

Not seeing your question? It may still have been asked before – try searching for it by clicking the spyglass icon (search) in the top-right of this page. Still can’t find it? Ask it below by hitting the reply button below this post (reply).

Why are we using specific design classes like cursive and capitalize on the HTML? If you wanted to change the skin or design of this document you will have to change the HTML as well and change those classes, as opposed to giving them sections and only touch the CSS to give it a different look? Isn’t it better to just give HTML sections IDs and change what they look with ease on the CSS instead of changing the HTML?

1 Like

How come the h1 font is changing to comic sans in part 5 of this exercise, not cursive? I entered the css class selector of
.cursive {
font-family: cursive;
and the HTML element for h1 contains class=“title cursive capitalize”
but the h1 text changes to what looks like comic sans, definitely not cursive. BUT I’m getting a check mark as though I’ve done it correctly…??

1 Like

A little late on the reply but it doesn’t change to cursive for me either. My guess is that font isn’t recognized anymore for some reason.

So in chapter 11 i.e, Specificity the 4th instruction tells us to add “.captalize” class which has text-transform: capitalize;

What is this command actually doing, because I can’t see any dchanges in the page text after running this command.

You simply styled a class that wasn’t assigned to any element that is why you didn’t see any changes.

In instruction no.5 you are assigning the class to an element so you should see changes at this step.

I meant in the 5th step itself, if you observe the instruction states that the text become capital.But the text was already in the same format even before we gave the command. So what is the difference after giving that command.

In step five you were commanded to replace uppercase with capitalize

The text should have been like this because of the uppercase: TOP VACATION SPOTS
Capitalize would look like this: Top Vacation Spots

I do note that the original text in HTML follows the rules of capitalize which isn’t the best way to show an example, I will it forward to change it.

<h1 class="title uppercase">Top Vacation Spots</h1> 

When style gets over-ridden with another style that takes precedence, does it over-ride everything, or just the attributes that are changed? say a class selector specifies a color and font size, and an id selector for the same specifies a new color, does the class-level font size remain?


Why would anyone use one ID selector to override another ID selector? Wouldn’t it be better to just modify the first ID selector’s declarations?

I just did the testings. It doesn’t override everything, just the propety values (not attributes).

In other words, the class-level font-size would remain.

Note: you called them attributes, but they are property values. Attributes are from HTML, not CSS. You can check the CSS syntax here:

1 Like

Is there a list or document from which we can pick available color, font, and other styling for CSS?

Thank you! This part of the lesson was throwing me for a loop. I kept getting errors not understanding what it was asking.

Why does the content in a .cursive{} selector get indented while the content in a .capitalize{} selector stay in-line?

Can a class only have one attribute? Because we’re using a lot of classes that we’re only going to use in the title of the article, when we could just do a .article-title class with all of the attributes that we’re using