Learn Basic CSS by Building a Cafe Menu - Step 12

Tell us what’s happening:
Describe your issue in detail here.
I am stuck here,[ You can add style to an element by specifying it in the style element and setting a property for it like this]:

  **Your code so far**
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8" />
  <title>Cafe Menu</title>
  <style> h1{ property: value;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/103.0.0.0 Safari/537.36

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

Link to the challenge:

Hello,

“property” and “value” describes the elements of the css styling within the curly brackets, you don’'t have to write them out.

The property in your task is “text-align”, the value is “center”.

Hope it helps.

Hey! it looks like the problem is on this line,

the syntax or the way you’re supposed to write styles for an HTML element is this:


button {
    color: red;
}

// if we try to understand each part individually, 
// we get.

//selector  
     | 
   button{

//property-name    value
     |               |
    color :         red;
}
  1. selector: it is the element you’re trying to target (add any html element name, CSS class or an ID name here).

  2. property name: this is the particular property of that element that you want to change (this would be the color, background color or even width and height) basically anything to do with the presentation of that element.

  3. value: this is the value you want to give to the property name, for example, if the property name is set to color, then the value could be any color. if it set to height or width, then the value could be 10px or 100% or any of the values available to you.

Hope this helps! :smile:

1 Like

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