I am having problem in this code

I am having problem in this code
0.0 0


The footer tag should have an id attribute set to “footer”.
this is needed. how it will be solve?


Have you added an id to an element before?


no, i am new here.
i just started HTML coding


An id is an attribute that you can add to any element. Look at the example provided by the lesson:

<a href="#contacts-header">Contacts</a>
<h2 id="contacts-header">Contacts</h2>


i have written the code in the same way like the example says,but i have to put this code in the footer.
and when i am running the code, it is giving message like i have discussed before.


Could you show us your code?



it is a code about=Link to Internal Sections of a Page with Anchor Elements


And what about the code for the href?


Your code is almost correct. But you are putting the id = “footer” inside the h2 tag, not the footer tag.


You are correct. I was trying to avoid saying it that way, and wanted to see the href because there might be an issue there as well.

@addy10532 you do not add h2 to the footer. You are only dealing with:



<a href>


Yes i see what @addy10532 did there.


thank you
now it is clear to me.


ya, i was doing wrong.
now it is clear.
thank you.


i still can’t solve it can you share a screen shot or whole page code.


The footer tag needs to be at the last.
As seen in this screenshot, it is inside the main tag before the<img> tag, and it does not have a closing tag.
Try to keep the <footer> tag at the end of the code.
Hope thi shelps :slight_smile: