Problem with CSS Exercise

Problem with CSS Exercise
0

#1

I feel like I did what the exercise asked for but the header is not appearing. If there’s a problem with my work here I don’t see it. Can someone please point me in the right direction?


#2

Only CSS selectors and classes should be in the style element. You put an h2 element in it. Look at the example on the left side of your screenshot. That is an h2 selector defining text color of red for h2 elements. Your code has an h2 element in the style section, but not an h2 selector. There is a big difference.

HTML elements which are not style elements belong below the <style> and </style> tags and not inside them. Below is correct syntax:

<style>

</style>
<h2>My H2 Element</h2>

An h2 CSS selector would go between the style tags like:

<style>
  h2 {
    color: blue;
  }
</style>

#3

Thanks a lot Randell. Let me try that real quick.


#4

@randelldawson I’m not getting it. I tried by your example and it didn’t work. Is there a support team I should talk to?


#5

The forum is the support team. Can you please post all of your code (not a screenshot), so I can take a look at what you have tried?

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make easier to read.

Note: Backticks are not single quotes.

See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.


#6

I went home, thought about it, reread the instructions and saw what I was doing wrong. You had it right to begin with.

Thanks for your help