Wrapping an element


#1

<a href="https://en.wikipedia.org/wiki/Brown_bear" target="https://en.wikipedia.org/wiki/Brown_bear"><img src="#" alt="A bear with a mountain behind it"/></a>

So this is the code I am entering whenever I do this I get a message that asks if I used an anchor tag? THe instructions for this exercise are "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." Some assistance would be greatly appreciated.

`


#2

Target is not an URL, but a viewport.

target="_blank"

which is the value to indicate a new window, or frame. This goes back to when frames were a popular way of dividing a page into components of the same overall window. <frameset></frameset> is not much in use anymore now that we have universal support of the CSS Box Model. Something to read up on if HTML history is of any interest.


#3

I too am on 10/15 on lesson "Learn HTML & CSS: Part I" and cannot get my image link to display. The following is the code I have (which carefully matches the example given):
Grizzly Bear

Well it is just showing the unavailable image when I post my code.. So first, how do I show raw code herein the discussion posts (LOL)?


#4

https://discuss.codecademy.com/t/how-to-use-the-codecademy-discuss-forums/78832


#5

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