Learn Basic CSS by Building a Cafe Menu - Step 12

Tell us what’s happening:
Describe your issue in detail here.
am not able to create a h1 selector in my style element, some pls help me out

  **Your code so far**
<!DOCTYPE html>
<html lang="en">
  <meta charset="utf-8" />
  <title>Cafe Menu</title>
  <style> <h1 element{ property:text-align="center";}>element{ property:text-align="center";}</h1>
    <h1>CAMPER CAFE</h1>
    <p>Est. 2020</p>
  **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 6.1; rv:103.0) Gecko/20100101 Firefox/103.0

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

Link to the challenge:

It looks like you’re using the wrong syntax for css which is causing this error.

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.


//property-name    value
      |             | 
    color :        red;

selector: it is the element you’re trying to target (add any html element name, CSS class or an ID name here).

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.

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:

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