The instruction is
“In index.html, transform the image on your page into a link by wrapping the image element with an anchor element. Set the target attribute so that the link opens in a new window.”
I don’t really understand what I’m supposed to do…
Locate the anchor tag in the markup (around line 16) and add a
target attribute to it that reads,
Recall that HTML elements have a type, and they have attributes.
<a href="" target=""></a>
nodetype => a
attributes => href, target
There is Wikepedia link at around line 16 of the HTML. It will already have an
href attribute set to the URL of the Wikepedia page, and if I’m not mistaken it has a target attribute as well…
<a href="https://en.wikipedia.org/wiki/Brown_bear" target="_blank">Learn More</a>
above is an example to follow, only this time instead of the link text, use the image at around line 46.
<a href="https://en.wikipedia.org/wiki/Brown_bear" target="_blank"><img src=" ... "></a>
That will make the image clickable, and it will open to the same page as the
Learn More link…
Thank you for your time.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.