Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

amtjb

macrumors member
Original poster
Jan 5, 2011
46
0
I'am in the process of designing a website. When I try to insert an image into my web page using my Safari v8.0.2 browser. I get a question mark in a blue box with my "alt" text. I have checked for capitals(case sesitive) letters. They matches all letters are lower case. I have a root folder. In the root folder. I have my images folder with my image inside, and css folder. Will someone tell me how to resolve this problem so my image appears?

Here is the code:

Code:
<!DOCTYPE html>
<html lang=“en”>
<head>
<meta charset=“UTF-8” /> 
<title>Information web site</title>
<link rel=“stylesheet” type=“text/css” href=“../css/style.css” />
</head>
<body>
<h1>Image won't load</h1>
<img src=“images/hundred.jpeg” alt= “bill” width=“300” height=300” />
<p>Within the next year.</p>
<h2>Time is money</h2>
<p>It will be done.</p>

</body>
</html>

My image name is:
hundred.jpeg

I've tried:

“images/hundred.jpeg”
"./images/hundred.jpeg”
"../images/hundred.jpeg”
/images/hundred.jpeg”
 
Last edited by a moderator:

chown33

Moderator
Staff member
Aug 9, 2009
10,751
8,424
A sea of green
All the HTML you posted contains "curly" quotes. I don't know if those appear in the original file or not, but if they do, you need to change them to straight " or ' quotes.

If you can't see what I mean, change to 24-point or larger font, or zoom in to at least a 200% view, and compare the quotes I used above (which are all straight) with the quotes that appear in your post.

You also have some unmatched quotes, such as the missing one after the height attribute in your img tag. There may be others; I didn't check thoroughly.


What text editor are you using? Turn off "smart quotes" in it.

You might also have Text Substitution turned on. Turn it off:
System Preferences > Language and Text > Text
 

amtjb

macrumors member
Original poster
Jan 5, 2011
46
0
Image won't load

All the HTML you posted contains "curly" quotes. I don't know if those appear in the original file or not, but if they do, you need to change them to straight " or ' quotes.

If you can't see what I mean, change to 24-point or larger font, or zoom in to at least a 200% view, and compare the quotes I used above (which are all straight) with the quotes that appear in your post.

You also have some unmatched quotes, such as the missing one after the height attribute in your img tag. There may be others; I didn't check thoroughly.


What text editor are you using? Turn off "smart quotes" in it.

You might also have Text Substitution turned on. Turn it off:
System Preferences > Language and Text > Text

Thank you for the help. The Image is loading now! This is literately going on my 3rd day I was trying to figure this problem out. Your help even resolved my problem with my html page not changing after I saved css file with new coding.

I am using textEdit for my editor. It came bundle with the Mac OS. I was thinking about getting BBEdit because I am going to be making several web pages in the future.
 
Last edited:

Flood123

macrumors 6502a
Mar 28, 2009
624
62
Living Stateside
Thank you for the help. The Image is loading now! This is literately going on my 3rd day I was trying to figure this problem out. Your help even resolved my problem with my html page not changing after I saved css file with new coding.

I am using textEdit for my editor. It came bundle with the Mac OS. I was thinking about getting BBEdit because I am going to be making several web pages in the future.

Try sublime text 2 which has an indefinite free evaluation mode or atom from atom.io that is completely free.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.