Learn HTML & CSS: Part I, 10


#1

Instructions indicate: …transform the image on your page into a link by wrapping the image element with an anchor element...
Use the same URL as before:
"https://en.wikipedia.org/wiki/Brown_bear"

However, this URL is the URL for the text link created earlier in the course.

This next URL is the one that was given to use for the image portion of the course:
"really big bear" (I tried to get this show up here as just the typed code but failed, sorry)

I’ve tried both URLs and cannot make either one work. Which URL do I use?


https://www.codecademy.com/courses/learn-html-css/lessons/common-elements/exercises/link-at-will?action=lesson_resume

An error that shows up is:
Tag must be paired, no start tag: [ ]

but I have organized it so there is no error but I still cannot get the code to work.

<a <img src=https://s3.amazonaws.com/codecademy-content/courses/web-101/web101-image_brownbear.jpg target=_blank alt="really big bear"/></a>

#2

You need to make it so an image causes a redirect to a link...

To do this, you surround the img tag with <a> tags. Like this:

<a href="https://en.wikipedia.org/wiki/Brown_bear"><img src="https://s3.amazonaws.com/codecademy-content/courses/web-101/web101-image_brownbear.jpg"></a>

So this takes the image, and makes it so when you click it, it'll bring you to the link. It's just nesting tags, a concept you will need throughout HTML.


10: Linking at will- not registering anchor tag wrap around image
#3

You're missing href="" and the closing '>' from the first a tag. In other words...

This:
<a

Should be:
<a href="https://en.wikipedia.org/wiki/Brown_bear">

Also target=_blank should be in the a tag, not the image


#6