Learn Basic CSS by Building a Cafe Menu - Step 11

How do I get the h1 onto the page? It won’t sit anywhere but it keeps telling me that I need to put the h1 in. Where does it go?

You can add style to an element by specifying it in the styleelement and setting a property for it like this:

element {
 property: value;

Center your h1 element by setting its text-align property to the value center.

Your code so far

<!DOCTYPE html>
<html lang="en">
    <meta charset="utf-8" />
    <title>Cafe Menu</title>

<!-- User Editable Region -->

    <h1><style> {text-align: center;}

<!-- User Editable Region -->

      <h1>CAMPER CAFE</h1>
      <p>Est. 2020</p>

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.4 Safari/605.1.15

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

Link to the challenge:

the h1 selector should be inside the style tag and then you write h1 and open curly brackets and align your text

1 Like

hello and welcome to fcc forum :slight_smile:

  • syntax error
  • in css when targeting “html” elements such as this, you are only supposed to use “element” without any html syntax (i.e body{color: stone;})
  • usual css rule example is selector {prop: value;} i.e. *{color: stone;}

address those changes and it should be alright, happy learning :slight_smile:

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