Back to Freecodecamp

Step 6

curriculum/challenges/english/blocks/workshop-tailwind-pricing-component/686386e76197458b7dfd52ef.md

latest1.6 KB
Original Source

--description--

Now you'll create a CTA button. A Call to Action (CTA) is a button or link designed to prompt a user to take a specific action, in this case, to start listening.

Outside the innermost div, create an anchor element with an href of # and the text Start listening.

That concludes the HTML for the first pricing card.

--hints--

You should create an anchor element.

js
assert.exists(document.querySelector("a"))

Your anchor element should have an href set to #.

js
const link = document.querySelector("a")
assert.equal(link?.getAttribute("href"), "#")

Your anchor element should have the text Start listening.

js
assert.equal(document.querySelector("a")?.textContent, "Start listening")

--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>Music App Pricing</title>
    <script src="https://cdn.tailwindcss.com"></script>
  </head>
  <body>
    <main>
      <h1>Choose your listening plan</h1>
      <div>
        <div>
          <div>
            <h2>Listener</h2>
            <p>$0<span>/month</span></p>
            <p>
              Start exploring millions of songs with basic features and ads.
            </p>
            <ul>
              <li><span>&#10003;</span>Ad-supported streaming</li>
              <li><span>&#10003;</span>Curated playlists</li>
            </ul>
          </div>
          --fcc-editable-region--
          
          --fcc-editable-region-- 
        </div>
      </div>
    </main>
  </body>
</html>