Learn Basic CSS by Building a Cafe Menu - Step 12

Tell us what’s happening:
Describe your issue in detail here.
After adding this i am unable to go on further step instead of completing this step

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

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

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

Link to the challenge:

this is not how you can add style to an element

reset your code,

write your css following the instructions inside the style element

I didn’t get solution, Please write that code for me

did you try something else? what have you tried to fix your code?

I am actually confused that how to write h1 selector in *style * element

the example is

element {
 property: value;

where in this case element is h1

1 Like

<h1{text-align: center;}
no, I have tried all the possible ways, it doesn’t worked

let’s take a moment to take a longer look at the difference between element name and tag

the tag is the one with the brackets, < and >, it can be opening (<>) or closing (</>)
inside the tag you put the tag name, like for example img, or p
some elements are self-closing, meaning they have only the opening tag, like for example the img element has only one tag: <img>

the element name appear in the opening and the closing tags, so the p element has a <p> opening tag and a </p> closing tag

to select an element in css you write the element name, so for example to select the img element you would write img {...}

1 Like

Thank you soo much, Finally I came out from this hurdle.