images not working

0 wiliam pierce · September 19, 2015
im starting a new html5 page and have my images in file marked html5. Also in my html5 folder
is my html5 and css code. my images are also in the html5 folder under "images".
the following is what im using.
<IMG SRC="math.jpg" ALT="some.text" WIDTH=32 HEIGHT=32>
but its now working. ant ideas? thanks

Post a Reply

Replies

Oldest  Newest  Rating
0 Jagdeep Matharu · September 19, 2015
if you keep the html file and image in same folder then your image should display when you run, but you need to make sure if the image is in right form, means make sure if image is png then you use .png in image src.
or else you can try some image link from net.
0 Craig Charlton · September 19, 2015
wiliam pierce · 20 hours 3 minutes ago
im starting a new html5 page and have my images in file marked html5. Also in my html5 folder
is my html5 and css code. my images are also in the html5 folder under "images".


 not sure what you are saying here... "under images"??? does this mean they are in a seperate folder within your html5 folder.... if so as has been said the path should be...  images/math.jpg

Until you become a little more adept at file handling then do it this way...
Have one file with everything in it....  for each project (your projects will not be too large yet by the sound of it.

so your project file should look something like this.
index.html
main.css
math.jpg
another.jpg
onemore.jpg

then it is a direct link to each item.... as it is written... is as you type it....

one more note... your WIDTH and HEIGHT is set to 32.... 32 what??? this may be your problem......

 
0 Jagdeep Matharu · September 19, 2015
so if you have images under "images" folder then your file path to image is wrong,

it should be more like

<IMG SRC="images/math.jpg" ALT="some.text" WIDTH=32 HEIGHT=32>
0 uma singh · September 19, 2015
You can try this code using the paragraph <p>. May be your image will working properly and carefully use the file path.

<html>
<head>
<style>
img {
    display: inline-block;
}
</style>
</head>
<body>

<p>An img element is displayed like this:</p>

<p>Some text <img src="smiley.gif" alt="Smiley face" width="42" height="42"> some text.</p>

<p>Change the default CSS settings to see the effect.</p>

</body>
</html>
0 wiliam pierce · September 19, 2015
just tried but to no avail. I had an issue similar to this awhile ago.
I think what I did was put the image on my desktop and "open with" something
like" window photo view"or some thing like that but this is a new computer
and lost a lot of my old stuff. I had it on m,y old computer though
  • 1

HTML / CSS / Web Design

107,001 followers
About

Discuss, share, ask, learn and teach HTML5 and CSS3.

Links
Moderators