+ 2

What did I do wrong in the img tag?

Cant figure out what I did wrong in the img tag. Any takers? Help is much appreciated. https://code.sololearn.com/WL69y4wzB7Zf/?ref=app

18th Feb 2018, 1:50 AM
jacksonofgames 28
jacksonofgames 28 - avatar
20 Réponses
18th Feb 2018, 8:17 PM
Faisal
Faisal - avatar
+ 3
I'm currently on mobile, so it may be a little different from desktop. Once I got to the image, I just pressed down on it until a pop up screen appeared, where there was an option for viewing the image. Once I pressed that, it brought me to the image in a separate tab so I just copied the URL and posted it here.
18th Feb 2018, 8:21 PM
Faisal
Faisal - avatar
+ 2
First off, nice code. d: You didn't do anything wrong with the image tag per se, it's just the source that doesn't seem to work. Because the value of the src attribute leads to the actual Amazon page and not the image itself, it's not being recognized as an image and is therefore not being displayed. Try changing it to this instead - https://images-na.ssl-images-amazon.com/images/I/51InVIt3OIL._AC_UY700_.jpg
18th Feb 2018, 2:22 AM
Faisal
Faisal - avatar
+ 2
Thank you, for both the code comment and the help!
18th Feb 2018, 2:24 AM
jacksonofgames 28
jacksonofgames 28 - avatar
+ 2
Head to the page that has the image you're wanting, right click the image and press view image in new tab. This should bring you to just that image alone, so copy the URL at the search bar and the link should work as the source.
18th Feb 2018, 7:57 PM
Faisal
Faisal - avatar
+ 2
If that's the case, try looking to see if there's an option labeled view image or open in new tab (something along the lines of viewing the image).
18th Feb 2018, 8:08 PM
Faisal
Faisal - avatar
+ 2
Huh, that's really weird, I've never had that happen before :/ Could you send a link to the website, just so I could see if it works for me?
18th Feb 2018, 8:13 PM
Faisal
Faisal - avatar
+ 2
How'd you do that?
18th Feb 2018, 8:17 PM
jacksonofgames 28
jacksonofgames 28 - avatar
+ 1
Oh also, the align = center attribute doesn't seem to work with the img tag? Is there another way to center it? Sorry for all the questions, html is not my main language
18th Feb 2018, 2:37 AM
jacksonofgames 28
jacksonofgames 28 - avatar
+ 1
Oh, thanks!
18th Feb 2018, 3:07 AM
jacksonofgames 28
jacksonofgames 28 - avatar
+ 1
How did you get that link? I'm having trouble finding the direct link to some of the other images
18th Feb 2018, 7:51 PM
jacksonofgames 28
jacksonofgames 28 - avatar
+ 1
Oh that was what I was missing. Thanks man
18th Feb 2018, 8:00 PM
jacksonofgames 28
jacksonofgames 28 - avatar
+ 1
Wait, the image I want doesn't have that option
18th Feb 2018, 8:05 PM
jacksonofgames 28
jacksonofgames 28 - avatar
+ 1
I see that option when I right click it in Google, but that just takes me to the website. When I right click on it in the website the only options that come up are to save the picture
18th Feb 2018, 8:10 PM
jacksonofgames 28
jacksonofgames 28 - avatar
+ 1
Sure, give me a minute
18th Feb 2018, 8:14 PM
jacksonofgames 28
jacksonofgames 28 - avatar
18th Feb 2018, 8:15 PM
jacksonofgames 28
jacksonofgames 28 - avatar
+ 1
Huh, I wonder why my computer is acting up like that
18th Feb 2018, 8:23 PM
jacksonofgames 28
jacksonofgames 28 - avatar
+ 1
It works for me on my phone too
18th Feb 2018, 8:30 PM
jacksonofgames 28
jacksonofgames 28 - avatar
+ 1
It must just be something with the computer
18th Feb 2018, 8:30 PM
jacksonofgames 28
jacksonofgames 28 - avatar
0
No need to apologize, this is what the Q&A section is for! In HTML5, the align attribute of any object is no longer supported. I find that the best way to center something is to surround it in the <center> tag, which will move it to the middle of the screen. For example, your image tag would look something like this: <center> <img src = "https://images-na.ssl-images-amazon.com/images/I/51InVIt3OIL._AC_UY700_.jpg"> </center>
18th Feb 2018, 2:46 AM
Faisal
Faisal - avatar