Learn HTML &CSS Part 1: 2 HTML Content -10 Linking at Will HELP


I Have listed the exercise that I am stuck with in the title, I can not seem to wrap my head around it, I have tried many different ways to get it to work. The code that I am adding is just the base code that was given for the exercise. I was hoping if someone could help me find out how I suppose to complete this and also a detailed explanation would be greatly appreciated, please bare in mind, I do have some understanding of coding terminology, but am not the greatest with it.

<!DOCTYPE html>
  <title>Animals Around the World</title>
  <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>
  <a href="https://en.wikipedia.org/wiki/Brown_bear" target="_blank"> alt="Brown Bear"/>
  <p>The following are subspecies of bears:</p>
    <li>Nelsoni (extinct)</li>
  <p>The following countries have the largest populations of brown bears:</p>
    <li>United States</li>
  <img src="https://s3.amazonaws.com/codecademy-content/courses/web-101/web101-image_brownbear.jpg" alt="A brown bear"/>


Instruction says:

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.

So, you have <img> element which you need wrap by <a></a> element. It means that <img> should be inside <a></a>:


Also tag <a> must have attribute target="_blank". The target attribute specifies where to open the linked document. In your case _blank opens the linked document in a new tab. More info: HTML target Attribute

Note, for demonstration I wrote my example without any attributes, so you need to fill in it.


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