HTML Introduction to HTML and CSS HTML: The Structural Foundation of Web Pages and Applications Image Tags

Nick Evershed
Nick Evershed
6,296 Points

My image is not working on my website

So I just made a little test website, and my image is not loading, its coming up small with an X but I don't know what I have done wrong, please help

Zimri Leijen
Zimri Leijen
8,957 Points

Please share your code, we're not wizards.

Silvia Ramos
Silvia Ramos
4,445 Points

Hello!

Can you please write the code, or even better, share your workspace?

Nick Evershed
Nick Evershed
6,296 Points

But its not as simple as that, i'd have to show you my file paths, do you just want me to copy and paste my image tags?

6 Answers

Silvia Ramos
Silvia Ramos
4,445 Points

Is your image loading small or just like a faulty icon? Just to check, is your picture PNG? Ps. your tittle should go within your header, before the body, and the structure should be:

<!DOCTYPE html>
<html>
<head>
  <title></title>
</head>

<body>     
    <img src= "images/glg.png"> 
    <h6>Hello<h6/> 
</body>

</html>
Nick Evershed
Nick Evershed
6,296 Points

I moved the image out of the images folder and renamed it to google.png

<!DOCTYPE html/>

<body> <title></title> <img src= "google.png"'> <h6>Hello<h6/> </body>

Nick Evershed
Nick Evershed
6,296 Points

Im using notepad, im going to try with a new text editor, now the website isn't even updating when i refresh it

Nick Evershed
Nick Evershed
6,296 Points

it comes up as a broken image

Silvia Ramos
Silvia Ramos
4,445 Points

Oh GREAT! I also noticed that any small misspelling or error can mess the whole code. Glad to see it is all sorted now :))

Silvia Ramos
Silvia Ramos
4,445 Points

Thank you, happy coding :)))!

Silvia Ramos
Silvia Ramos
4,445 Points

treehouse workspaces allows you to share your work so it's easier for the rest of us to see what you have done and try to help. Without seeing your code it is difficult to help... if you don't want to do the above, maybe try to copy and paste your code and we can have a look.

Nick Evershed
Nick Evershed
6,296 Points

of course i can, but im not using workspaces, I don't have anymore left and I don't really like it

<!DOCTYPE html/>

<body> <title></title> <img src= 'images/glg.png'> <h6>Hello<h6/> </body>

Silvia Ramos
Silvia Ramos
4,445 Points

Have you tried with a different image by any chance?

Nick Evershed
Nick Evershed
6,296 Points

will do it now, also thanks for responding so fast!

Nick Evershed
Nick Evershed
6,296 Points

Just fixed it, turns out it was called google.png.png I accidently renamed it when it already had the png extention, hence why it wasn't found

Silvia Ramos
Silvia Ramos
4,445 Points

no worries, sorry i am not more helpful :( (i am stuck with my exercise too haha) let's see what happens when changing the picture.

Nick Evershed
Nick Evershed
6,296 Points

No you were very helpful, that was hard to detect dont worry