Files
freeCodeCamp/curriculum/challenges/english/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/671141feba228a35cefba82d.md
2024-10-21 07:57:40 -07:00

1.5 KiB

id, title, challengeType, dashedName
id title challengeType dashedName
671141feba228a35cefba82d Step 14 0 step-14

--description--

Turn the text cute cats into an anchor elements that links to https://cdn.freecodecamp.org/curriculum/cat-photo-app/running-cats.jpg.

--hints--

There should be a new anchor element in the first p element.

assert.exists(document.querySelector('p')?.querySelector('a'));

The anchor text should be cute cats.

assert.strictEqual(document.querySelector('a')?.innerText, "cute cats");

The href attrivute of the new anchor element should be https://cdn.freecodecamp.org/curriculum/cat-photo-app/running-cats.jpg.

assert.strictEqual(document.querySelector('a')?.href, "https://cdn.freecodecamp.org/curriculum/cat-photo-app/running-cats.jpg");

The text of the p element should still be Everyone loves cute cats online!.

assert.strictEqual(document.querySelector('p')?.innerText, "Everyone loves cute cats online!");

--seed--

--seed-contents--

<html>
  <body>
    <main>
      <h1>CatPhotoApp</h1>
      <h2>Cat Photos</h2>
      <!-- TODO: Add link to cat photos -->
--fcc-editable-region--
      <p>Everyone loves cute cats online!</p>
--fcc-editable-region--
      <p>See more <a href="https://freecatphotoapp.com">cat photos</a> in our gallery.</p>
      <img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back.">
    </main>
  </body>
</html>