Step 6. Cat photo app

Really struggling with step 6 on the cat photo app. The task is:

In the previous step, you nested the h2 element, comment, and p element within the main element. A nested element is a child of its parent element. It should be indented two more spaces than its parent element to improve readability, like this:

<ul> 
  <li> Child Element 1 </li>
  <li> Child Element 2 </li>
</ul>

Add two spaces in front of the three child elements of main so your HTML is more readable.

  **Your code so far**
<html>
<body>
<h1>CatPhotoApp</h1>
    <main> 
    <h2>Cat Photos</h2>
    <!-- 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/102.0.5005.63 Safari/537.36 Edg/102.0.1245.39

Challenge: Step 6

Link to the challenge:

Can you elaborate a little more on what you are struggling with regarding these instructions?

Also, I would restart the step so you get the default formatting back in place. Then only make changes to the three child elements of main, nothing else.

Think im struggling to understand the task more than anything. as it says Your h2 element should be below the main element’s opening tag and its opening tag should start 6 spaces over from the start of the line.

I am doing that but still seems to be wrong.

I’m not trying to argue with you here, so don’t take anything I say below as argument. I’m just trying to figure out why people are having so much trouble with this step because it is definitely one of the biggest issues people are posting to the forum.

I’m not seeing where is says this in the instructions for this step. You did put the h2 in the main in the previous step. Is that what you are referring to? OK, I take that back, the first sentence does say “In the previous step, you nested the h2 element, comment, and p element within the main element.” And you are basically replacing “nested” with “below”.

Again, I’m not seeing “6 spaces” in the instructions. I’m seeing “add two spaces” which is intended to mean that you “add two additional spaces to what is already there to each of the three child elements in main”. Is how I just phrased that clearer?

UPDATE: I see where you are getting this now, it’s in the hint. My apologies. I was only looking a the instructions. I still think it’s important that the initial instructions be clear enough so you get it right on the first try. So if you think there is something that can be clearer in the instructions please let us know.

1 Like

try this
Mod Edit : SOLUTION REDACTED

It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.

We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.

Concerning your answer and the hint:

“Your h2 element should be below the main element’s opening tag and its opening tag should start 6 spaces over from the start of the line.”

I think you would agree that your p element is not aligned with the other two children, so you definitely have an error there. Also, the other two children (h2 and the comment) are lined up with main and they are all only indented four spaces. Serious question, I’m not trying to argue with you or make fun of you, do you see that these are only four spaces from the beginning of the line?

Thank you, thats made it clearer now. my bad, I should of stated I was getting confused with the hint saying 6 spaces and the instruction saying 2. Thank you for the help.

This is great feedback. Thank you.

It should be indented two more spaces .
Cada elemento denro de main

same here i don’t know what to do

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