Image won't load

Discussion in 'Web Design and Development' started by amtjb, Jan 6, 2015.

  1. amtjb, Jan 6, 2015
    Last edited by a moderator: Jan 6, 2015

    amtjb macrumors member

    Joined:
    Jan 5, 2011
    #1
    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”
     
  2. chown33 macrumors 604

    Joined:
    Aug 9, 2009
    #2
    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
     
  3. amtjb, Jan 6, 2015
    Last edited: Jan 6, 2015

    amtjb thread starter macrumors member

    Joined:
    Jan 5, 2011
    #3
    Image won't load

    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.
     
  4. chown33 macrumors 604

    Joined:
    Aug 9, 2009
    #4
    Try TextWrangler. It's from the same company, and it's free.
     
  5. Flood123 macrumors 6502a

    Flood123

    Joined:
    Mar 28, 2009
    Location:
    Living Stateside
    #5
    Try sublime text 2 which has an indefinite free evaluation mode or atom from atom.io that is completely free.
     
  6. sneakyllama macrumors newbie

    Joined:
    Jan 8, 2015
    #6
    Code Editor

    Just another recommendation for code editor. Get brackets at http://brackets.io/
     

Share This Page