It says that to add new p selector so where should i add it?

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;
    }
    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; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.61 Safari/537.36

Challenge: Step 13

Link to the challenge:

Hi,

You can add it under the h2 selector then the code should pass.

can you share how it can be written?

1 Like

Just write it in the exact same way you’ve written the h1 and h2 selectors, but with the p selector instead of h1 or h2.

can u write the code here ?

Giving away the solution isn’t helpful for learning, so I can’t give the solution code. I can give tips and hints to the answer though.
(Also the mods will delete posts that give away solutions for this reason.)

This is how you’ve written your h1 and h2 selectors.

h1 {
      text-align: center;
    }
    h2 {
      text-align: center;
   }

You need to write the p selector in the same way you’ve written these two selectors, with the same value of text-align:center; you’ve given the h1 and h2 selector.

Give it a try, even if you get it wrong it’ll help you figure it out.

this code is also showing error

Hi, did you copy and paste my code exactly? This will throw an error because it doesn’t contain the answer.

Again, I can only give hints to the answer, I won’t solve it for you.

If you did try to add the p value, please share that code and I’ll see if there are any errors and try to help you solve them.

no my code is same as you but the error is " You should add a new p selector."

My code doesn’t contain the solution. It was demonstrating how the h1 and h2 selectors are written so you could apply that to the p selector.

You still need to write the p selector into the code.

but where should i write the selector in the code?

Under the h2 selector you have written, where the arrow is pointing.

h1{
text-align:center;
}
h2{
text-align:center;
}

like this?

<p>
</p>
</style>

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 it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).

No. But I think I know what is going wrong now with your code.

The lesson is asking you to add a p selector. It looks like you’ve confused elements and selectors here.

An element is this

<p>I am an element</p>

A selector is this

p{
color:red;
}

Hope this helps!

2 Likes

it worked thanks for helping me

1 Like

Awesome job @Griff for helping @angry8797 with the challenge.
You are a positive influence on the community :slight_smile:

1 Like

Great! Glad I could help, you worked really hard to get this right so congratulations on passing the code!
:smiley:

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.