Back to Freecodecamp

Step 14

curriculum/challenges/english/blocks/workshop-tailwind-cta-component/6858e6408a0999603b2a4fee.md

latest1.5 KB
Original Source

--description--

For the h1, add the classes font-bold and text-4xl. This will make the text bolder, bigger, and also give it more line spacing.

Also, add the class my-4 to increase the top and bottom margin of the h1 by 16 pixels, or 1rem.

--hints--

Your h1 element should have the utility class font-bold.

js
const h1El = document.querySelector("h1");
assert.isTrue(h1El.classList.contains("font-bold"));

Your h1 element should have the utility class text-4xl.

js
const h1El = document.querySelector("h1");
assert.isTrue(h1El.classList.contains("text-4xl"));

Your h1 element should have the utility class my-4.

js
const h1El = document.querySelector("h1");
assert.isTrue(h1El.classList.contains("my-4"));

--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>CTA component</title>
    <script src="https://cdn.tailwindcss.com"></script>
  </head>
  <body>
    <div class="bg-indigo-600 text-white mt-8 p-4 md:w-1/2 mx-auto flex flex-col lg:flex-row justify-around items-center rounded-md">
      <div>
        <span class="uppercase">Soundflow</span>
         --fcc-editable-region--
        <h1>Discover New Music</h1>
         --fcc-editable-region--
        <p>Stream your favorite tracks and discover new artists.</p>
      </div>
       <div>
        <a href="#">Learn more</a>
        <a href="#">Start listening</a>
      </div>
    </div>
  </body>
</html>