Learn HTML by Building a Cat Photo App - Step 5

Tell us what’s happening:

Describe your issue in detail here.

Your code so far

<html>

<!-- User Editable Region -->

  <body>
 <main>h1p </main>


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

<!-- User Editable Region -->
<main>h1p </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/122.0.0.0 Safari/537.36

Challenge Information:

Learn HTML by Building a Cat Photo App - Step 5

You appear to have created this post without editing the template. Please edit your post to Tell us what’s happening in your own words.
Learning to describe problems is hard, but it is an important part of learning how to code.
Also, the more you say, the more we can help!

although I am right , it say I am wrong

Hi @hsumyatnoe2243 ,
Welcome to FFC.
:grinning: So the task says " Identify the main section of this page by adding a <main> opening tag before the h1 element, and a </main> closing tag after the p element."

  1. Add <main> tag opening before h1 tag. (remove the h1p </main> and the spaces before <h1>)

  2. Add its closing </main> after the p element.
    (remove the spaces after </p> and these <main>h1p)

Let me know if it works.
:+1: Happy coding.

An element in html consists of an opening tag, a closing tag, and the content in between those two, which may include other elements, whose opening tags, closing tags, and content are all within the parent element.

For example, the existing h1 element :

<h1>CatPhotoApp</h1>

Which consists of an opening tag <h1>, the content CatPhotoApp, and the closing tag, </h1>.

In your code, it looks like you have created a main element before the h1 element, containing the text “h1p”, and then another main element after the p element, containing the same text.

The instructions for this step ask you to enclose the h1, h2, and p elements that you have already created within a main element.

This simply means adding an opening <main> tag before the start of the content you wish to include in the main element, in this case , before the h1 element, and a closing </main> tag after the end of the content you wish to include, in this case, after the p element.

It is not working, because you created two main elements outside of the content you were supposed to enclose within a single main element, rather than creating one main element that includes that content.

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