New h2 selector [type selector to style]

error keeps saying You should add a new h2 selector but i did exactly the same style format.
It accepted h1 and p style format but rejects h2 style format

What am i doing wrong please?

Tell us what’s happening:
Describe your issue in detail here.

  **Your code so far**
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8" />
  <title>Cafe Menu</title>
  <style>
    h1 {
      text-align: center;
    }
  </style>
  <style>
    p {
      text-align: center;
    }
  </style>    
  <style>
    h2 {
      text-align: center;
    }
  </style>
</head>
<body>
  <header>
    <h1>CAMPER CAFE</h1>
    <p>Est. 2020</p>
  </header>
  <main>
    <section>
      <h2>Coffee</h2>
    </section>
  </main>
</body>
<html>
  **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36

Challenge: Step 13

Link to the challenge:

Tell us what’s happening:
Describe your issue in detail here.

  **Your code so far**
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8" />
  <title>Cafe Menu</title>
  <style>
    h1{text-align:center;}
  </style>
  <style>
    p{text-align:center;}
  </style>
  <style>
    h2{text-align:center;}
  </style>
</head>
<body>
  <header>
    <h1>CAMPER CAFE</h1>
    <p>Est. 2020</p>
  </header>
  <main>
    <section>
      <h2>Coffee</h2>
    </section>
  </main>
</body>
<html>

PLEASE HELP, I AM LOST!!!

  **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36

Challenge: Step 13

Link to the challenge:

Hi!

You dont need to add a new style tag for each selector. Try this instead:

<style>
      h1 {
        text-align: center;
      }

      h2 {
        text-align: center;
      }

      p {
        text-align: center;
      }
    </style>

Hope this helps! :slight_smile:

2 Likes

Thanks but no difference
Training instructions said to add a new style tag for each selector

Step 13

In the previous step, you used a type selector to style the h1 element. Go ahead and center the h2 and p elements with a new type selector for each one.

Test

Sorry, your code does not pass. Don’t give up.

Hint

You should add a new h2 selector.

Can you explain to me why h3 gets removed and replaced with p? The previous step has us typing h1-h3. Seems as if this is for no reason…