Tell us what’s happening: hello i cant seem to get passed this lesson im pretty green but im sure im doing it right. this lesson is asking me to create a style block but when i do , im still not able to change my <h2 element blue. please help.
If you go back to the instructions and explanation, you’ll see you copies the inline formatting into the style brackets, but CSS has a different format, which is shown in the instructions for this challenge.
thankyou very much for your input but if you can please expain it to me as if it was my first day. For this lesson where would i put my color command? since it doesnt want me to do inline.
The above code would actually turn all h2 elements on the page blue, which probably isn’t what you’re trying to do.
Another way to add your CSS is using inline styling, which seems to be what you’re trying to do.
This sort of CSS gets tagged on as an attribute to the actual INDIVIDUAL elements in the page.
This would only turn that individual HTML element blue.
This code would only turn that particular HTML element blue.
This is called inline CSS.
You’re just starting out now, but eventually you’ll want to move away from doing inline CSS and start inserting all your CSS inside the “<style>” tag, and then target the h2 element directly with a class or a div. But don’t worry about that too much at the moment. Just giving you things to think about and google. Either one works– you just seemed to have gotten the two different ways mixed up.
Read this article from MDN on the subject if you ever forget about all this in the future. God knows I google and re-google simple stuff all the time as well.