Learn HTML by Building a Cat Photo App - Step 6

Tell us what’s happening:
Describe your issue in detail here.

  **Your code so far**
<html>
<body>
  <h1>CatPhotoApp</h1>
  
  <h2>Cat Photos</h2>
          <main>
       <!-- TODO: Add link to cat photos -->
     <p>Click here to view more cat photos.</p>
  </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/103.0.0.0 Safari/537.36

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

Link to the challenge:

Hello. Something odd has happened here. First, the <main> element should contain the <h2> element. Second, your comment, <p> and <h2> elements should all be at the same distance from the left border of the window, because they are all nested inside the same element and are its direct children. I’m unsure how to explain this, so here is an example:

<html>
  <head>
    <title>Title</title>
  </head>
  <body>
    <p>Text!</p>
    <p>More text!</p>
  </body>
</html>

Reading this code you can easily tell what element is nested where, where an element begins and ends… It is much more readable than if it had no indents. Now, what I was going to explain: as you can see, the <head> element is contained within the <html> element, just like the <body> element. This is why they are at the same indent level, so to speak. However, even though the <title> and <p> elements are also contained within the <html> element, they are at a different level because they’re at a lower level in the hierarchy, so to speak. Since they are not direct children of <html>, but rather, children of its children, they’re one level more to the right. And you add in more levels according to how deep down a ‘family’ you go, e.g.:

<html>
  <body>
    <main>
      <section>
        <h1>
...

oh! this is so kind of you. your explanation is clear.

guess what! i got it. i’m on step 7 now. once again thanks

Good morning, please can you help check step 55 for me? i’m stocked there and its seriously draining my energy. you can just arrange it in the right order for me. thanks

Hi,

If you have searched the forums, and online and are still stuck on the step, please make a new topic post in the forum. Posting a reply to an old unrelated topic to get help on another topic is not good forum etiquette.

Do this by clicking ‘new topic’ on the forum front page or ‘ask for help’ on the lesson.

1 Like

Alright though i have just solved that step and i’m excited about it. thanks

2 Likes

Thanks a million for your response though its coming at a time that i had passed the step. I’m done with cat photos, just being introduced to cafe menu and there’s a greater challenge at step 3. i have spent over 48hrs trying to pass that step alone still to no avail. please, i don’t want much narratives again just drop the answer let me pick my fault and move on. that step has drained so much of patience. thanks for your quick response.

Hi,

Please make a new forum topic to ask for help. It will make it easier for people to help you. Use the ‘new topic’ button on the forum, or the ‘ask for help’ button on the lesson. Again, please do not post on older forum threads about different lesson problems, please make a new forum topic post.

Also solutions to the lessons are not allowed on the forum, it does not help people long term and we as mods will remove solutions from the forum.

Alright, thanks a million for the guide.

1 Like