https://www.codecademy.com/courses/learn-html-css/lessons/common-elements/exercises/link-at-will?action=resume
I’m getting an error saying “Did you wrap the image element with an anchor tag”.I can’t find the error.Could anyone say why I’m getting this and how I could move on to the next lesson.
I had tried what people suggested, it didn’t work. Please help me. I’ve been stucked for long time. >"<
<a href="https://en.wikipedia.org/wiki/Brown_bear" target="_blank">
<img src="#" alt="A brown bear" /></a>
Try, by adding an extra-SPACE-character before self-closing the <img />
-tag
like
<a href="https://en.wikipedia.org/wiki/Brown_bear" target="_blank"><img src="https://s3.amazonaws.com/codecademy-content/courses/web-101/web101-image_brownbear.jpg" alt="A brown bear" /></a>
1 Like
Thanks for your advice. But it still doesn’t work. I can’t figure out it.
Could you provide the FULL HTML code you are using…
That is not the FULL code…!!!
sorry to disturb. I’m not sure what the corrected thing.Could you plz for example.
I wnat to see something like
<!DOCTYPE html>
<html>
<head>
<title> </title>
</head>
<body>
<!-- here you insert your HTML-code -->
</body>
</html>
but then with all your code…
1 Like
Try to use the <a><img /></a>
in a different position
like
<!DOCTYPE html>
<html>
<head>
<title>Animals Around the World</title>
</head>
<body>
<!-- anywhere -->
<h1>The Brown Bear</h1>
<p>The brown bear (Ursus arctos) is native to parts of northern Eurasia and North America. Its conservation status is currently "Least Concern." There are many subspecies within the brown bear species, including the Atlas bear and the Himalayan brown bear.</p>
<p>The following are subspecies of bears:</p>
<ul>
<li>Arctos</li>
<li>Collarus</li>
<li>Horribilis</li>
<li>Nelsoni</li>
</ul>
<ol>
<li>Russia</li>
<li>United States</li>
<li>Canada</li>
</ol>
<p>populations</p>
<a href="https://en.wikipedia.org/wiki/Brown_bear
" target="_blank"><img src="https://s3.amazonaws.com/codecademy-content/courses/web-101/web101-image_brownbear.jpg
" alt="A bear" /></a>
</body>
</html>
1 Like
Is there any possibility that the system is error? >"<
Then do the following
-1 make a copy of your code
-2 =click= on the -Reset- button (located on the right-hand-side of the RUN button)
-3 reset your Browser using the F5-keyboard-key
-4 if there is no code, paste-in the code you saved in point 1
-5 use the RUN button.
Thank you so much. I tried, but It’s no use.
hey man instead of moving the img code up to the link up top move the link code down to where you coded the image in.
Animals Around the World
The Brown Bear
The brown bear (Ursus arctos) is native to parts of northern Eurasia and North America. Its conservation status is currently "Least Concern." There are many subspecies within the brown bear species, including the Atlas bear and the Himalayan brown bear.
Learn More
The following are subspecies of bears:
- Arctos
- Collarus
- Horribilis
- Nelsoni (extinct)
The following countries have the largest populations of brown bears:
- Russia
- United States
- Canada
1 Like
The test fails if you remove the other link instead of copying it.
1 Like
You must delete what you already have and start with this.
Good Luck! Do you se what it just did? it gave me the end result. From the example given on the left screen, copy that and paste that right under where a brown bear ends. staying aligned with <img then run. It should work.
I had a similar problem but solved it by adding a space between the end of the link to the Wikipedia site and the word target, as per: <img
Sorry that did not come out as I wanted it. The space between <a href=“https://en.wikipedia.org/wiki/Brown_Bear” and the next word which is target="_blank"