I need help with this. Can somebody help me figure this issue out? Learn Basic CSS by Building a Cafe Menu - Step 13

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

Your code so far

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <title>Cafe Menu</title>
    <style>
    h1 <selector1> property: value;
   </style>
  </head>
  <body>
    <main>
      <h1>CAMPER CAFE</h1>
      <p>Est. 2020</p>
      <section>
        <h2>Coffee</h2>
      </section>
    </main>
  </body>
</html>

Your mobile information:

iPhone - iOS16.6

Challenge: Learn Basic CSS by Building a Cafe Menu - Step 13

Link to the challenge:

This is not the syntax you are asked to use.

Take a look at the code before you edit it:

h1 {
  text-align: center;
}

Comparing this to the instructions, h1 would be the selector1, text-align would be the property, and center would be the value.

Could you add an h2 selector (which would be selector2) to that CSS?

1 Like

Yes. I will try that. Thank you so much for your help. I am new to coding. My dad is a software engineer and he helps me when I am at home.

I did that. But it keeps giving me an error message. Forgive me for this being the first time coding.

Why are you writing <selector1>? That is not what the instructions ask for.

Sorry. Im just really confused about this step.

Maybe a more direct example could help?

Here I have two selectors, for a elements and span elements:

a {
  color: red;
}
span {
  color: red;
}

Because the styles are the same for each element, I can combine the rules:

a, span {
  color: red;
}

You need to combine your h1, h2, and p rules.

How do I combine the rules?

You were given an example of how to combine in the last post

This combines the a, and span. So how would you combine the rules you need to?

It’s telling me you have to center it. I keep forgetting how to center coding.

The original code has the CSS in place to centre the text. You are asked to combine the selectors, so you do not need to write any new style properties.

Ok. Thank you. Now I think I understand this. Thank you everyone for your patience. Have a blessed day.

1 Like

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