Learn HTML by Building a Cat Photo App - Step 17

Tell us what’s happening:
I used the closing tag for a section Element but cannot figure out the opening tag

Your code so far

<<<

CatPhotoApp

  <section>
    <h2>Cat Photos</h2>
    <!-- TODO: Add link to cat photos -->
    <p>See more <a target="_blank" href="https://freecatphotoapp.com">cat photos</a> in our gallery.</p>
    <a href="https://freecatphotoapp.com"><img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back."></a>
</main>
```html

CatPhotoApp

  <section>
    <h2>Cat Photos</h2>
    <!-- TODO: Add link to cat photos -->
    <p>See more <a target="_blank" href="https://freecatphotoapp.com">cat photos</a> in our gallery.</p>
    <a href="https://freecatphotoapp.com"><img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back."></a>
</main>
```

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.5.2 Safari/605.1.15

Challenge: Learn HTML by Building a Cat Photo App - Step 17

Link to the challenge:

Hello and welcome to the community :smiley:!
opening tags look like this:

<elementName>

And closing tags began with a / closing dash:

</elementName>

You have already added a section element in a previous step. What did you use for the opening tag for that section?

thank you! so much i have tried like that but my code still wrong

hello thank you for replaying i used like this:

but still is not working

If you make changes to your HTML and it is still not working then you need to paste your updated HTML in here using the method below so we can see what you did.

To display your code in here you need to wrap it in triple back ticks. On a line by itself type three back ticks. Then on the first line below the three back ticks paste in your code. Then below your code on a new line type three more back ticks. The back tick on my keyboard is in the upper left just above the Tab key and below the Esc key. You may also be able to use Ctrl+e to automatically give you the triple back ticks while you are typing in the this editor and the cursor is on a line by itself. Alternatively, with the cursor on a line by itself, you can use the </> button above the editor to add the triple back ticks.

1 Like

Make sure that your opening tag comes before your closing tag:

<elementName> </elementName>

sorry I was not able to copy and paste the code with the changes but still is not working adding the new section element.

Your code so far

<html>
  <body>
    <main>
      <h1>CatPhotoApp</h1>

<!-- User Editable Region -->

      <section>
        <h2>Cat Photos</h2>
        <!-- TODO: Add link to cat photos -->
        <p>See more <a target="_blank" href="https://freecatphotoapp.com">cat photos</a> in our gallery.</p>
        <a href="https://freecatphotoapp.com"><img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back."></a>
<section>
</section>

<!-- User Editable Region -->

    </main>
  </body>
</html>

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.5.2 Safari/605.1.15

Challenge: Learn HTML by Building a Cat Photo App - Step 17

Link to the challenge:

Before you add a new section element make sure that your previous section element has a closing tag:

You can also click on the </> button and paste your code in the```` marks that appear:

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.