Learn HTML by Building a Cat Photo App - Step 16

Tell us what’s happening:
Describe your issue in detail here.
I wanted to take h2 , comment, p , and anchor (a ) elements and nest them in a section element.

Before adding a new content, and make use of a section element to separate the cat photos content from the future content. and this is my work below

Your code so far

<html>
  <body>
  
    <main>
      <h1>CatPhotoApp</h1>
        <main>  <h2>Cat Photos</h2>
      <!-- TODO: Add link to cat photos -->
      <p>Click here to view more <a target="_blank" href="https://freecatphotoapp.com">cat photos</a>.</p>  </main>
      <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>
  
  </body>
</html>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36

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

Link to the challenge:

I’m not seeing any section tags in your HTML. Did you try anything yet?

Yes, I did.
here is it,

<main>
      <h1>CatPhotoApp</h1>
      
       <main> <h2>Cat Photos</h2>
      <!-- TODO: Add link to cat photos -->
      <p>Click here to view more <a target="_blank" href="https://freecatphotoapp.com">cat photos</a>.</p>  </main>
      <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> </maim>
    </main>

I still don’t see opening and closing section tags. Section elements are different from main elements.

I use this
<main></main>
and all the stated elements are in between the nest.
Please enlighten me.

Thanks

These are not section tags.

Hi,
Also you should only have one main element, the uppermost opening tag and the closing tag on the bottom. Remove the closing main tag after the line with "Click here to view more cat photos, and the maim(?) closing tag after the line with the alt attribute.
Section tags use <> symbols, with the word section inside.

please, guide me for me to take note next time. Thanks

Thanks,
Please, can you simplify this step by step I’m just a learner.

Can you write a section tag? Can you show us what you think a section tag is.

Can it be it be this …alt?..
but I think the instruction was to separate the previous content from the new one. Pls Assist.

Thanks

That’s not a tag?

You wrote a main tag above. A section is just like that, but with the word ‘section’ instead of ‘main’

Please remove the main tag you have on the line with your h2 element and after the line with “click here for more cat photos”, and on the line with your img element .
Add an opening section tag below your the line with the h1 element. It looks like <> with the word section inside the symbols. Then add a closing section tag <> with /section inside the symbols directly above the main closing tag towards the bottom. By doing this, you nest the h2, comment, p, and a element inside of a section element.

Alright.

Please, have tried to put <main> at the beginning of h2 an at the end of a element with </main> but yet not give me the result. I think there is missed up

Could you please post your updated code?

Please read what we are saying.

THIS IS NOT A SECTION TAG

1 Like

Thank you so much!
Really grateful for your guidance, Its work

<main>
      <h1>CatPhotoApp</h1>
      <section> <h2>Cat Photos</h2>
      <!-- TODO: Add link to cat photos -->
      <p>Click here to view more <a target="_blank" href="https://freecatphotoapp.com">cat photos</a>.</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>
    </main>
2 Likes