Learn Basic CSS by Building a Cafe Menu - Step 11

Tell us what’s happening:

You should have an h1 selector in your style element.
I don’t understand what’s the error in my code.

Your code so far

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

<!-- User Editable Region -->

    <style>{ <h1>property:text-align  value;center

<!-- User Editable Region -->

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

Your browser information:

User Agent is: Mozilla/5.0 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36

Challenge Information:

Learn Basic CSS by Building a Cafe Menu - Step 11

You can add style to an element by specifying it in the style element 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.

Hi, @xuanying717, welcome to the forum.
This is how CSS selectors are structured when selecting an element:

element {
   property: value;

Computers already know that text-align is a property, and that center is its value; we don’t input that in the editor. The lesson shows property and value in place of the property and value, respectively. Hope that helps! :v:

1 Like

hello @xuanying717 correct your code like this.

Hello @lamanirmal27 welcome to our forum.
I have edited your reply and removed the solution you provided. Do not give out answers directly, instead use hints, links and references.


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