New to coding, needing assistance


#1

I am having trouble using html specifically with wrapping an image. Any help is great help, thank you!


#2

Please copy and paste you code and the question URL so we can have a look.


#3

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

This is mine Learn More

not quite understanding what exactly is wrong here since i followed the example pretty closely.


#4

You need to put your code into Preformatted text or else we cant see the raw code. When typing something in codcademy use the command Ctrl+Shift+C then copy and paste your code.

Your code should look like this.

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

If it already does and you are using chrome, try a different browser.

Let me know if this helped.


#5

 <a href="https://en.wikipedia.org/wiki/Brown_bear" target="_blank"><img src="#" alt="Learn More"/></a>

Thanks for the heads up noticed that after the fact.


#6

I`m pretty sure that I am either not doing an anchor tag correctly or not doing it at all the instructions for this section are "n 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."


#7

So I think I know whats wrong but am kind of stuck on how exactly to fix it. The problem is that i need to change the src to an image, how exactly do I do that?


#8

It says -
Set the target attribute so that the link opens in a new window.
Use the same URL as before: https://en.wikipedia.org/wiki/Brown_bear

So copy and paste that URL and replace It with the _blank in the target attribute.

target="_blank" => target="https://en.wikipedia.org/wiki/Brown_bear"

Let me know if that solved it.


#9

<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>

This is what I put in that time and it is still coming back with the question "Did you wrap the image element with an anchor tag?"


#10

Try using a different browser, the code passed fine for me in firefox.


#11

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