Hello i cant understand pls someone explain.Add two spaces in front of the three child elements of main so your HTML is more readable

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

  **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.61 Safari/537.36

Challenge: Step 6

Link to the challenge:

1 Like

Here adding two spaces means something like this: -

<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>

as you can see in the above code body element is parent of all the elements that are inside it which are: - h1 , main, h2 and p.

  <h1>CatPhotoApp</h1>
  <main>
  <h2>Cat Photos</h2>
  <!-- TODO: Add link to cat photos -->
  <p>Click here to view more cat photos.</p>

  </main>

and in the first code in my reply shows you that after <body> tag when we go to next line and write a new tag we have left two spaces and then wrote <h1> because when have started writing the child elements so to make code readable and help us understand that these elements are child of body tag we have left two spaces. You have to leave two spaces as such before the child elements of <main> tag or in a simplified way tags enclosed inside the <main></main>

Hope now you comprehend better what needs to be done.

2 Likes