Jump to content

why wont my image appear in my web page?

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
7 replies to this topic

#1
dcord

dcord

    Newbie

  • Members
  • PipPip
  • 25 posts
<!DOCTYPE html
 PUBLIC "-//w3c//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<html xmlns=http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"
<head>
<meta http-equiv"content-type" content="text/html; charset=utf-8" />
<title>Hunger Fight</title>
</head>
<body>
<h1 style="color: #3D60B1">Fight Against World Hunger </h1>
<div>
<img src="hungerfightlogo.jpg" width="763" height="210" alt="hunger fight logo" />
</div>
<p> Our School and schools around the world have recently joined forces to fight against world hunger. The office for the Fight Against World Hunger team is located next to the bookstore. You can drop off food and money donations there. We also have donation drop-off locations at participating grocery stores. See the list of stores as well as additional information on the bulleten board outside out team office.</p>
<hr />
<h2 style="color: #3D60B1">What you can do to help </h2>
<ul style="font-style: italic">
 <li>Join the school's Fight Against World Hunger team with a $10 donation</li>
 <li>Buy requested food at perticipating grocery stores and leave at drop-off locations</li>
 <li>Volunteer to collect money and donations around the community</li>
</ul>
</body>
</html>

Edited by Alexander, 17 October 2010 - 10:33 PM.
Please add [code] or [html] tags around your code


#2
so1i

so1i

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 312 posts
Make sure it's in the same directory as the web page. You could try putting in the full URL, see if that works.

Also, when posting code, use the code tags! It makes life a lot easier :D
My Company - My Homepage - My Twitter - My Google+ - My LinkedIn

"Things don’t have to change the world to be important.” - Steve Jobs

#3
gokuajmes

gokuajmes

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 518 posts
if your documents is laid out like so
-----------------------------------------------------
!  index.html                                   
!   |->Images                                 
!              |->1.jpg                         
!---------------------------------------------------!
then you will have to reference your image like below
<img src="Images/1.jpg" alt="" title=""></img>


#4
Fae

Fae

    Learning Programmer

  • Members
  • PipPipPip
  • 80 posts
Do you need to close <IMG> tags? Whenever I do, I get an 'unmatched </IMG> tag' error, even if the </IMG> directly follows <IMG>.
I'll ask a lot of questions (most of them probably stupid stuff). Bear with me, i'm still learning! ^_^ Also, I'll try to answer as many questions as I can as well, but I'm not very good yet. I'm sure I'll be of more use once I get better :)

#5
Some1

Some1

    Newbie

  • Members
  • Pip
  • 7 posts
In xml u have to close it with "/>" inside <img ..... /> expression.U have to close each expression else its wrong.

@regarding post --> make sure that extension of your picture is not in caps // example tag :<img src="pic.jpg"> will not show picture on web if it has extension in caps " pic.JPG ".so change extension to pic.jpg if u haven`t already

#6
SoN9ne

SoN9ne

    Programmer

  • Members
  • PipPipPipPip
  • 129 posts
img is using a self closing tag, hence the " />"

It would seem that the first two posts would resolve this issue.
"Life would be so much easier if we only had the source code."

#7
dcord

dcord

    Newbie

  • Members
  • PipPip
  • 25 posts
well I guess I figured it out about my image not apearing. first I used ACDsee to create a jpg to insert into my web page. I changed the image using microsoft office picture manager, placed it in the root folder of the web page and added an e to my jpg=jpeg and it appeared.
Thank you for all your posts. I'll be back with more stupid questions seeing as I am just learning this stuff

Hve a great day

#8
dcord

dcord

    Newbie

  • Members
  • PipPip
  • 25 posts
you know what? I had the exact same experience. since then I have remo ed ACDsee from my system. same project with the hunger jpg and everything. took me hours to figure out to open the pic in a different program and re-save it. worked well for me too, glad you were able to figure that out.