I am having problem in this code

I am having problem in this code
0.0 0

#1

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


#2

Have you added an id to an element before?


#3

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


#4

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>

#5

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.


#6

Could you show us your code?


#7

code

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


#8

And what about the code for the href?


#9

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


#10

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:

<footer>

and

<a href>


#11

Yes i see what @addy10532 did there.


#12

thank you
now it is clear to me.


#13

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


#14

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


#15

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: