There are currently no frequently asked questions associated with this exercise – that’s where you come in! You can contribute to this section by offering your own questions, answers, or clarifications on this exercise. Ask or answer a question by clicking reply () below.
If you’ve had an “aha” moment about the concepts, formatting, syntax, or anything else with this exercise, consider sharing those insights! Teaching others and answering their questions is one of the best ways to learn and stay sharp.
Join the Discussion. Help a fellow learner on their journey.
Ask or answer a question about this exercise by clicking reply () below!
You can also find further discussion and get answers to your questions over in Language Help.
Agree with a comment or answer? Like () to up-vote the contribution!
It says I got it wrong and I looked at the solution and I found out that it was wrong because of the double quotations around the values and needed single quotations. Is there a difference if I use double quotations VS single quotations in HTML? Does the IDE give an error if I don’t use the right quotations around values?
Does anyone here know why the type selector color was used in this exercise rather than the more specific id selector? I thought the id selector would override any other selector already in place.
Amendment: Even though my code was marked as accurate for this exercise, the color changed to yellow, not cornflower blue. Perhaps it is a browser problem?
Hi, Ingrid, I had this impression at first as well. But when I looked again I noticed that what is in yellow (in my case) is the heading ‘Top Attractions’, which is an H5, hence the type selector’s color.
Scrolling up, though, I found that the ‘By: Stacy Gray’ byline right under the main title/H1 was cornflower blue as expected.
Sorry if the suggestion sounds dumb, but as it happened to me, I thought it might help
Thank you for your response. I found out that my Dark Reader browser extension was changing most of the colors in the exercises and therefore causing them to be marked wrong.
Your suggestion definitely does not sound dumb, I did the same thing in a later exercise.
@chrismurill , as far as I know, single-quotes vs double-quotes for HTML attributes is a matter of personal preference, and generally people seem to prefer double quotes.
In fact, if you open the dev tools on this very forum you’ll see it’s all double quotes:
However the examples for these exercises all use single quotes (presumably the author’s preference!). It seems like the automated tests only accept single quotes as well. IMO the tests should accept either since they are both perfectly valid, seems a bit poor form on the part of the author not to, but who knows, maybe that was difficult to implement.
Hello, pls I need help, I dont know the reason why my code is not bringing out any color despite the fact that i carried out all the instructions correctly, I mean right from lesson 1 of this chapter.
I would be very happy if someone can help me out with the solution. THANKS
For specificity within a page, why would you go the route of creating an id="" in css versus just doing an an a[*href]. Is the a[*href] exclusively for links to external references so for coloring the link?
Hey, during the “selectors - Specify” section, a question came to my mind. In this chapter, we are told that the lowest order of specificity is a type, then comes the class and then the id selector. But there is a 4th selector which was not covered in that order ranking. The type attribute selector like
a[href*=‘codecadamy’] {
}
i wanted to test it with an img type and realised, that this kind of selector doesnt work with the src attribute. does anyone know why that is the case?
this is the selector i tried to use
i cant upload multiple media in one post yet so i cant show you the img element i tried to change the appearance of
Try adding an i at the end of it. Outside of the quotes but inside the brackets. That will make it case insensitive. And I do not see anywhere in the lesson about using those on images.
You are right, it wasn’t specifically in the lessons or one of the exercises to use that kind of selector with an image attribute, i just tried it out to test something. I tried it in a different lesson and it worked perfectly so i’m not sure why it didnt work in the example shown. But the information, that you can add an i to make it case insensitive is interesting, thank you.
I do not know if this will help as I also have been having problems with this and other sections. If I spend more that a few minutes on a problem and do not get it correct I go to get unstuck, solutions, see the difference between my solution and the correct answer. I then work backwards and re-read the directions. Most of my problems is correctly reading and understanding the directions. It is also very important to go to the forum of every page and read the questions and answer. The forums often make clear to me the directions.