Back to Freecodecamp

Step 35

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

latest2.4 KB
Original Source

--description--

The footer element is used to define a footer for a document or section. A footer typically contains information about the author of the document, copyright data, links to terms of use, contact information, and more.

After the main element, add a footer element.

--hints--

You have either deleted the main element or it is missing an opening tag or closing tag.

js
assert.exists(document.querySelector('main'));
assert.match(code, /<\/main>/);

Your footer element should have an opening tag. Opening tags have the following syntax: <elementName>.

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

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

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

Your footer element should be below the closing main element tag. You have put it somewhere else.

js
assert.equal(document.querySelector('main')?.nextElementSibling.nodeName, 'FOOTER');

--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>
        <ul>
          <li>catnip</li>
          <li>laser pointers</li>
          <li>lasagna</li>
        </ul>
        <figure>
          
          <figcaption>Cats <em>love</em> lasagna.</figcaption>  
        </figure>
        <h3>Top 3 things cats hate:</h3>
        <ol>
          <li>flea treatment</li>
          <li>thunder</li>
          <li>other cats</li>
        </ol>
        <figure>
          
          <figcaption>Cats <strong>hate</strong> other cats.</figcaption>  
        </figure>
      </section>
    </main>
--fcc-editable-region--
    
--fcc-editable-region--
  </body>
</html>