Your should have a pink-text CSS class with its color set to pink.
no. u should.
what did u try?
Which challenge are you doing exactly? I think I know, but just want to be sure.
I supose where you got stucked. Try to do this:
-
Create a class in the CSS style sheet called
pink-text
. -
To set the color of the text, you may put the
color
property inside the class. Setpink
as its value. -
Then add the
pink-text
to your HTML element (I don´t know which element it is, but it should be a<p>
or<h1>
, maybe a<div>
)
Anyways, better copy your full code, it will be more easy to help you.
I have code like this
body {
background-color: black;
font-family: Monospace;
color: pink;
}
.pink-text:{color: pink;}
Hello World!
but it doesn't work.Did you add the pink-text
class to your paragraph element? The code you show above is correct, you defined the pink-text correctly in the style element. You still need to add it to the opening <p>
element, you don’t show the code for your paragraph element, but I am pretty sure that’s what the problem is.
Try this:
<h1 class="pink-text">Hello World!</h1>
Look back at this exercise to refresh yourself on how to define and assign classes.
I have the exact same problem.
I dit exactly what you said PerryChalmers and it still doesn’t work
Ok guys I just find what was wrong : I just forgot the “;” in the class putting
.pink-text:{color;pink} instead of .pink-text{color:pink;} (with ; at the end)
Sorry for bothering guys thanks from France !
you shouldn’t have colon :
before curly braces