Learn HTML by Building a Cat Photo App - Step 5

Tell us what’s happening:
Describe your issue in detail here.
I’m confused about this code. Any suggestions would greatly help.

  **Your code so far**

<h1><main>CatPhotoApp</main></h1>

  **Your browser information:**

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

Link to the challenge:

this should help you

Thank you. So basically the hint keeps saying “the mainelement's opening tag should be above theh2` element. You have them in the wrong order.” I keep entering my code like this < h1 > catphoto app < main > Catphotoapp what am I doing wrong?

Can you show us your all your html code?

Enclose it using triple backticks like so:

```html

paste code here

```

A post was split to a new topic: Learn HTML by Building a Cat Photo App - Step 5

your have it in the wrong order.

The challenge said after the h1 element not within it.
it should be

<h1>CatPhotoApp</h1>
<main>....
1 Like

The code I’m entering keeps getting denied. It keeps saying it’s in the wrong order.

I’m trying to show the code I have but it’s not working.

Hi, this might help you format your code so others can see it.

When you enter a code block into a forum post, precede it with a separate line of three backticks and follow it with a separate line of three backticks. This will format the code.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

As a mod I can format any code you paste into the forum for you, but please try to format it yourself if possible. :slight_smile:

Hello,
Thank you for the visual. That helped me alot I am definitely a visual learner!
This is the code I’ve been entering. It says that it is in the wrong order.

<h1>CatPhotoApp</h1> <main>CatPhotoApp</main>
1 Like

In this lesson, you should only add the main element to the code. You should not remove any elements.

You also should not change the text of any elements.

I would recommend resetting the lesson by pressing the ‘restart step’ button and starting again.

Then please show me your new code if you are still stuck.

Thank you so much! Your advice finally clicked. I finally passed with flying colors!

1 Like

I’m stuck on how to do step 5. it says that it’s in the wrong order.

Hi. Welcome to the forum!

Please create your own topic when you have specific questions about your own challenge code. Only respond to another thread when you want to provide help to the original poster of the other thread or have follow up questions concerning other replies given to the original poster.

The easiest way to create a topic for help with your own solution is to click the Ask for Help button located on each challenge. This will automatically import your code in a readable format and pull in the challenge url while still allowing you to ask any question about the challenge or your code.

Thank you.

The challenge is broken. I’ve entered the tag correctly multiple times after resetting the exercise, I’ve even copy and pasted the code from challenge 6, which is exactly what it is meant to be looking for and it didn’t pass. Whoever has gotten it to pass has actually entered incorrect code to do so. I don’t know the process to get fcc to fix it but they need to sort it out their end. we can’t do anything about it.

However, if anyone has completed the task, it would be nice if they posted the code so everyone else can pass the bugged challenge and not be held up having to wait for a fix.

FYI - I already have the responsive web design certification, I am just resitting the tasks to refresh my memory. So no, I am not just trying to get the answer lol.

correct code should be

   <main>
      <h1>CatPhotoApp</h1>
      <h2>Cat Photos</h2>
      <!-- TODO: Add link to cat photos -->
    <p>See more cat photos in our gallery.</p>
   </main>

but this does not pass the challenge. I hope I have saved you some time, not wasting it trying to pass a bugged challenge.

1 Like

Your solution works from my end. Please try one of the following steps to move forward.

Click on the “Restart Step” button and force a refresh of your page with CTRL + F5 then try to paste the code in again.

or - Try the step in incognito or private mode.

or - Disable any/all extensions that interface with the freeCodeCamp website (such as Dark Mode, Ad Blockers, or Spellcheckers), and set your browser zoom level to 100%. Both of these factors can cause tests to fail erroneously.

or - Ensure your browser is up-to-date or try a different browser.

I hope one of these will work for you.

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