HTML: Problem with attribute to create internal elements

<a href="#footer">Jump to Bottom</a>
<h2 id="footer"> footer</h2>

The program said to me: “the footer tag must have an id attribute set to “footer””

I don’t understand what it’s wrong…

Do you have a <footer> element? Is its id set to “footer”?

Captura de pantalla 2022-01-09 a las 23.15.36

Captura de pantalla 2022-01-09 a las 23.15.52

That’s a link to the element with id="footer". Do you actually have a <footer> element on the page with this id? An <h2> element is not a <footer> element.

Thanks. It didn’t have a <footer> element, just <h2> element (I though I was doing a <footer> element.

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).

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