Learn Basic CSS by Building a Cafe Menu - Step 11

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>

<!-- User Editable Region -->

    <style> <h1>{ CAMPER-CAFE: center}
    </style>

<!-- User Editable Region -->

  </head>
  <body>
    <main>
      <h1>CAMPER CAFE</h1>
      <p>Est. 2020</p>
      <section>
        <h2>Coffee</h2>
      </section>
    </main>
  </body>
</html>

Your browser information:

User Agent is: Mozilla/5.0 (iPhone; CPU iPhone OS 16_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.4 Mobile/15E148 Safari/604.1

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

Link to the challenge:

Didn’t understand the question, stuck here hel please

The syntax is slightly different for CSS and HTML

HTML syntax looks like this:

<tag attribute="value"></tag>

CSS syntax looks like this:

element {
    property: value;
}

CSS can be writen between the <style></style> tags or in their own document.

Where it says ‘element’, this is where you put the name of the tag you are selecting

between the curly braces { } you state the styles you want to apply

for example:
If I have this HTML file,

<body>
   <p>Some dummy text in an example</p>
</body>

and wanted to make the background colour green,
I could select the ‘body’ element,
then set the property to ‘background-color’
using the value ‘green’

<style>
    body {
        background-color: green;
    }
</style>

The question asks you to select the h1,
set the property to text-align
with a value of center

1 Like

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