Back to Freecodecamp

Step 13

curriculum/challenges/english/blocks/workshop-cat-photo-app/671141f948cbab359e74cc93.md

latest1.1 KB
Original Source

--description--

Add p tags to turn See more <a href="https://freecatphotoapp.com">cat photos</a> in our gallery. into a paragraph.

--hints--

You should add a p element around See more <a href="https://freecatphotoapp.com">cat photos</a> in our gallery.

js
const P = document.querySelectorAll('p')[1];
assert.exists(P);
assert.strictEqual(P.innerText?.replace(/\s+/g, ' ').trim(), "See more cat photos in our gallery.");

You should still have the anchor element inside the new paragraph.

js
const P = document.querySelectorAll('p')[1];
assert.exists(P?.querySelector('a'));

--seed--

--seed-contents--

html
<html>
  <body>
    <main>
      <h1>CatPhotoApp</h1>
      <h2>Cat Photos</h2>
      <!-- TODO: Add link to cat photos -->
      <p>Everyone loves cute cats online!</p>
--fcc-editable-region--
      See more <a href="https://freecatphotoapp.com">cat photos</a> in our gallery.
--fcc-editable-region--
      
    </main>
  </body>
</html>