Back to Freecodecamp

Step 4

curriculum/challenges/english/blocks/workshop-greeting-card/6720bbb38f697e2364f41c0e.md

latest1.4 KB
Original Source

--description--

Now it's time for some color. Give the body a background-color of brown and also give the .card a background-color of white.

--hints--

The body element should have a background-color of brown.

js
assert.oneOf(new __helpers.CSSHelp(document).getStyle("body")?.getPropertyValue("background-color").toUpperCase(), ["BROWN", "#A52A2A", "RGB(165, 42, 42)", "HSL(0, 59%, 41%)"]);

You should have a .card selector.

js
assert.exists(new __helpers.CSSHelp(document).getStyle(".card"));

The .card element should have a background-color of white.

js
assert.oneOf(new __helpers.CSSHelp(document).getStyle(".card")?.getPropertyValue("background-color").toLowerCase(), ["white", "#fff", "#ffffff", "rgb(255, 255, 255)", "hsl(0, 0%, 100%)"]);

--seed--

--seed-contents--

html
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Greeting Card</title>
    <link href="styles.css" rel="stylesheet">
  </head>
  <body>
    <div class="card" id="greeting-card">
      <h1>Happy Birthday!</h1>
      <p class="message">
        Wishing you all the happiness and joy on your special day!
      </p>
  	</div>
  </body>
</html>
css
body {
  font-family: Arial, sans-serif;
  padding: 40px;
  text-align: center;
--fcc-editable-region--
  
}

--fcc-editable-region--