Back to Freecodecamp

Step 9

curriculum/challenges/english/blocks/workshop-greeting-card/672e410ddd98b409594890b6.md

latest1.5 KB
Original Source

--description--

Add two section elements, one after the other. The first should have an id of send, the second one should have an id of share.

--hints--

You should have two section elements.

js
assert.lengthOf(document.querySelectorAll("section"), 2);

The first section should have an id of send.

js
assert.strictEqual(document.querySelectorAll("section")[0].id, "send");

The second section should have an id of share.

js
assert.strictEqual(document.querySelectorAll("section")[1].id, "share");

--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 class="card-links">
        <a href="#send" class="send-link">Send Card</a>
        <a href="#share" class="share-link">Share on Social Media</a>
      </div>
  	</div>
    --fcc-editable-region--
    
    --fcc-editable-region--
  </body>
</html>
css
body {
  font-family: Arial, sans-serif;
  padding: 40px;
  text-align: center;
  background-color: brown;
}

.card {
  background-color: white;
  max-width: 400px;
  padding: 40px;
  margin: 0 auto;
  border-radius: 10px;
  box-shadow: 0 4px 8px gray;
}