Learn Basic CSS by Building a Cafe Menu - Step 19

Tell us what’s happening:
Describe your issue in detail here.
i added the color brown what seem too be the problem?

  **Your code so far**
/* file: index.html */
<!DOCTYPE html>
<html lang="en">
  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>Cafe Menu</title>
  <link href="styles.css" rel="stylesheet"/>
    <h1>CAMPER CAFE</h1>
    <p>Est. 2020</p>
/* file: styles.css */
style body, h1, h2, p {
text-align: center}
style body{text-align: background-color brown;}

  **Your browser information:**

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

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

Link to the challenge:

There are a number issues with your code here.

CSS consists of 3 different parts - a selector, a property, and a property value. The property and property value together make up what is called a declaration. We start with a selector followed by curly brackets. Inside the curly brackets we have the property followed by a colon, then we define the property value and end the declaration with a semicolon. It should look something like:

selector {
property: propertyValue;

After completing the previous challenge your css should have looked something like this:

h1, h2, p {
  text-align: center;

That is a complete rule. Now the challenge is asking you to create a new rule for body, making the background-color brown. So we know that our selector is going to be “body”, our property will be “background-color” and our property value will be “brown”.

To read more about CSS basics, check out this article on mdn: CSS basics - Learn web development | MDN

1 Like

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