Learn HTML by Building a Cat Photo App - Step 5

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

Your code so far


<!-- User Editable Region -->

<mainelement>
      <h1></h1>
          <p></p>
                </mainelement>
    

<!-- User Editable Region -->

  </body>
</html>

Your browser information:

User Agent is: Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Mobile Safari/537.36

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

Link to the challenge:

I am stuck in step 5. Somebody tell me what should i do

First, you do not want to change any of the existing HTML on the page. You are only adding new HTML, not changing anything that is already there. So I would restart the step to get the original HTML back.

The instructions ask you to do two things:

  • add a <main> opening tag before the h1 element
  • add </main> closing tag after the p element

So you should only be adding two things, <main> and </main>. If you add or change anything else then you will not pass the tests.

1 Like


Still isn’t working?

You added new tags you weren’t supposed to add.

Again, you only want to add two things, an opening <main> tag and a closing </main> tag. If you add or change anything other than that then you will not pass.

Your closing </main> tag is in the right place. So you have done 50% of it. You just need to put the opening <main> tag before the h1 element.

Well’ i tried in every order but it isn’t passing can you plz type that code and send screenshot of it

You need to show us what you tried.

Restart the step to get the original HTML back. Add the <main> tag before the existing h1 element. Add the </main> tag after the existing p element.

That’s it.

Please try the above and if it doesn’t work then paste in all of the HTML here 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.

Ahh, I see, you are using a phone, so it might be kind of hard to copy/paste your HTML. I suppose an image will have to do.

What is wrong in this code
Identify the main section of this page by adding a opening tag before the h1 element, and a closing tag after the p element

1st. i type < main> before h1
2nd. and then i type < h1 >
3rd. and as it says write before closing


4th. then in last is </ main >

But still it is in wrong order

You added an additional h1 tag and p tag. You don’t want to add those. That’s why I suggested you restart the step to get the original HTML back.

Again, the only thing you want to add is the <main> and </main> tags. Make no other changes.

You don’t want to do this. The <main> tag goes before the existing h1 element.


You want to say like this?

From the instructions:

“add a <main> opening tag before the h1 element”

Where is the existing h1 element in the HTML? You want to put the opening <main> tag before it.

Bro i was 50% confused before then i saw your reply and now i am 100% confused
Thanks.

Do you not see the existing h1 element in the HTML. It has the text CatPhotoApp in it. You want to put the opening <main> tag above/before that element. I’m not sure I can explain it any simpler. If you are still confused you’ll need to give a very detailed description about what is confusing you.

Well’ thank you i passed

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