Hi,
Very new to coding here and have been stuck on this step for about 1 hour. Anyway, here is the challenge
To make HTML easier to read, indent the ‘h2’ element, the comment, and ‘p’ element exactly two spaces to indicate they are the children of the ‘main’ parent.
-Here is the code before I make any adjustments
<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>
I use the the TAB button to push the ‘h2’ element over 2 spaces, then I do the exact same for the comment and p element. Like this:
<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>
It tells me that I’m doing this incorrectly and gives me the following 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.”
Honestly, this confuses me even more. I was wondering if anyone would be willing to help walk me through this. I have read other solutions regarding this and they didn’t make sense.
Your h2, comment and the p elements are now 8 spaces away from the line instead of six.
You have to remove two spaces from them or just reset the lesson and select the h2, comment and the p and then push the tab key.
OR, individually add two spaces before the h2, comment and the p.