How to add [id] to [footer]?

This HTML lesson:
https://learn.freecodecamp.org/responsive-web-design/basic-html-and-html5/link-to-internal-sections-of-a-page-with-anchor-elements/

Requires adding an id to a footer, but doesn’t show how. It only shows how to add it to h2.

1 Like

You just need to add it the same way you’ve added it to the h2 element.

You need to type id=“footer” in the footer tag in the same way as shown in the h2 example.

1 Like
<footer id="ID"></footer>
1 Like

This is not working.

This is perfectly working, you might be making some mistakes.

<footer id="ID"></footer>

The code above is totally correct, you can use ids or classes for the same but ids cannot be repeated. If you want to access the ID thought anchor tag then use the following code.

<a href="#id">Click</a>

for classes use [dot] before class name that’s it.