Back to Freecodecamp

Step 22

curriculum/challenges/english/blocks/workshop-cat-photo-app/5dfa37b9eacea3f48c6300b0.md

latest1.5 KB
Original Source

--description--

To create an unordered list of items, you can use the ul element.

After the h3 element with the Things cats love: text, add an unordered list (ul) element. Note that nothing will be displayed at this point.

--hints--

Your ul element should have an opening tag. Opening tags have this syntax: <elementName>.

js
assert.exists(document.querySelector('ul'));

Your ul element should have a closing tag. Closing tags have a / just after the < character.

js
assert.match(code, /<\/ul>/);

The ul element should be above the second section element's closing tag.

js
const secondSectionLastElemNode =
  document.querySelectorAll('main > section')[1]?.lastElementChild;
assert.equal(secondSectionLastElemNode?.nodeName, 'UL');

--seed--

--seed-contents--

html
<html>
  <body>
    <main>
      <h1>CatPhotoApp</h1>
      <section>
        <h2>Cat Photos</h2>
        <p>Everyone loves <a href="https://cdn.freecodecamp.org/curriculum/cat-photo-app/running-cats.jpg">cute cats</a> online!</p>
        <p>See more <a target="_blank" href="https://freecatphotoapp.com">cat photos</a> in our gallery.</p>
        <a href="https://freecatphotoapp.com"></a>
      </section>
      <section>
        <h2>Cat Lists</h2>
        <h3>Things cats love:</h3>
--fcc-editable-region--
        
--fcc-editable-region--
      </section>
    </main>
  </body>
</html>