SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Nov 2012
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Image into my web page

    I have written the code as follows

    <!DOCTYPE html>
    <html lang="en">
    <head>
    <title>Bubble Under-The diving club for south-west UK.</title>

    <meta charset="utf-8"/>


    </head>
    <body>

    <h1>Bubble Under.com</h1>
    <p>Diving club for south-west UK-Let's make a splash!</p>
    <h2>Welcome to our super-dooper Scuba site</h2>
    <p><img src="divers-circle.jpg" width="200" height="162"
    alt="A circle of divers practice their skills" /></p>
    <p>Glad you could drop in and share some air with us! You've passed your underwater navigation skills and successfully found your way to the start point - or in this case, our home page.</p>

    <h3>About Us</h3>
    <p>Bubble Under is a group of diving enthusiasts based in the south-west UK who meet up for diving trips in the summer months when the weather is good and the bacon rolls are flowing. We arrange weekends away as small groups to cut the cost of accommodation ans travel and to ensure everybody gets a trustworthy dive buddy.</p>

    <p>Although we're based in the south-west, wedon't stay on our own turf: past diving weekends away have included trips up toScapa Flow in Scotland and to Malta's numerous wreck sites.</p>

    <p>When we are not diving, we offen meet up in a local pub to talk about our recent adventures (any excuse eh?)</p>

    <h3>Contact Us</h3>
    <p>To find out more, contact Club Secretary Bob Dobalina on 01793 6411207 or <a href="mailto:bob@bubbleunder.com">email bob@bubbleunder.com</a></p>

    </body>
    </html>

    My problem is that I do not see the image in my web page. I only see a box with an X and "A circle of divers practice their skills" What I am doing wrong PS the image is in my web site file

  2. #2
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    Looking at post #1 the image: divers-circle.jpg SHOULD be placed into the exact same folder as that web page or it won't be able to load the image make sure that; *.jpg file is in the same directory as your: index.html file then it will load - else you will you see the ALT text for when the image isn't available/loaded. Also a good idea is to make sure you have saved the HTML file and refreshed the browser.

  3. #3
    SitePoint Member
    Join Date
    Dec 2012
    Location
    Malaysia
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Shabudin View Post
    I have written the code as follows
    ...
    My problem is that I do not see the image in my web page. I only see a box with an X and "A circle of divers practice their skills" What I am doing wrong PS the image is in my web site file
    the location of picture is not in the same directory of you index.html, you can solve it by moving the image to the same directory or use image path such as
    src="yourdomain.com/folder/imagename.jpg"

    or might be you image name and it extension is written in code is not same in the real image file. Re-check your spelling

  4. #4
    SitePoint Member polarbearman's Avatar
    Join Date
    Dec 2012
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Make sure the image filename 'divers-circle.jpg' is in the same folder as the HTML file.
    Eg.
    HTML file: C:/mysite/htmlfile.html
    Image file: C:/mysite/divers-circle.jpg

  5. #5
    SitePoint Wizard
    Join Date
    Jul 2003
    Location
    Kent
    Posts
    1,921
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    You'd also find it easier to manage your site if you put all the images in a folder to separate them from the html pages. How about calling that folder something like images/ ...
    And did you actually upload the image as well as the html file? That does not happen automatically, images are NOT embedded in an html file, they are called by it.
    Also on a Linux server, file names are CaseSENsitive.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •