Wrap the text of each list item in the unordered list in an `anchor` element

Hi folks (first time posting).
I am stuck on exercise 10/14 in the Lesson: HTML Document Standards.
Here’s what I have been asked to do:

“Wrap the text of each list item in the unordered list in an anchor element. Each anchor tag should link to the corresponding <div> on the page (The <a> element that contains the text “Introduction” links to #introduction ).”

I don’t understand what I am doing wrong.
I also read someone else here at the forum having the same problem. But the answer received, did not help.

Any help would be very much appreciated.

You picked #Top, #Middle, #Bottom as values for href, but there are no HTML elements in the exercise with these ids.

In the explanatory text, an example has been given in which there are two elements: a p element with an id of top and an h1 with id of bottom. Therefore the href values are picked accordingly href = "#top" and href = "#bottom".

However, in the exercise the elements we wish to target don’t have ids of top or bottom. Instead, the three div’s we want to target have the ids introduction, habitat and media. The href values must match the ids exactly both in spelling and in case (uppercase/lowercase should be same as id). The only difference is that the href values are prepended with #. The href values should therefore be href="#introduction", href="#habitat" and href="#media".

2 Likes

Thank you! your suggestion worked. Man, oh, man! I was going crazy trying to figure things out on my own:)

1 Like