Learn HTML by Building a Cat Photo App - Step 6 - pls I could not solve the step 6, i.e adding spaces, kindly guide me

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

  **Your code so far**
<html>
<body>
  <h1>CatPhotoApp</h1>
  
  <main>
   <ul> <h2>Cat Photos</h2>
        
     <!-- TODO: Add link             cat photos -->
    <p>Click here to view more cat photos.</p></ul>
  </main>
</body>
</html>
  **Your browser information:**

User Agent is: Mozilla/5.0 (Linux; Android 4.4.4; SM-T561) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36

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

Link to the challenge:

I think you just got a little confused on the question. Look again at the question. Do you need to follow everything or just do a couple little things? Do you have extra elements or do you need to change positioning of things? What is the question really trying to teach you?

It said i should add spaces to the nested elementsnin the nain element and i did that using ul elements but still marking me wrong.

It also said i should not use the ul/li element from the example

Okay I’ll spoil a little bit more.
So the whole point of the exercise wasn’t to actually make anything different on the screen appear or even optimizations to make it run faster. It was readiability.

Readability is important on large scale projects when multiple people are working on them and have to see your code and understand it. For a single developer it is just as important to remember what you did and how to read it. Here is an example of me formatting an html code file.

<!DOCTYPE html>
<html>
<!-->Parent Elements or elements on top are closest to the left<-->
  <main>
  <!-->Main is to the right by two spaces to show that it is 
  nested within the parent HTML element<-->
  </main>
</html>

If you still have trouble, I can give you my solution to help you notice and see what you did wrong.

Hope this helps you.

Edit: If your code is really messy and you just want to restart, you can just hit the check button enough that it will say Restart Step if you just want a clean slate.

3 Likes

still trying to figure out even you already give us a hint, can you please give an easier hint or give a me a solution for this?

Thanks i am done with html

1 Like