Pictures in HTML?

Joined
May 24, 2009
Messages
84
Reaction score
0
Points
6
Your Mac's Specs
eMac OS X 10.4.11 1.25GB RAM 40GB original hard drive,
Hi,
When I'm making a web-page using Textedit, and add the code for an image, it never works. Even when I'm using an image I know the computer can display, and has before.
Here's exactly what I type.

<img border="3"src="/sun_euv19.gif"width="304" height="228"/>

and also this...

<img src="sun_euv19.gif"/img>

Which just ends up looking like this.
 
Joined
Jun 18, 2006
Messages
191
Reaction score
5
Points
18
Location
Minneapolis
Your Mac's Specs
MacBook Pro
<img border="3"src="/sun_euv19.gif"width="304" height="228"/>

Make sure you have it coded correctly.
<img border="3" src="sun_euv19.gif" width="304" height="228"/>

Make sure you have the correct path to the image
<img border="3" src="sun_euv19.gif" width="304" height="228"/>
This says the image is in the same folder as the html file.

<img border="3" src="images/sun_euv19.gif" width="304" height="228"/>
This says the image is in the folder images

<img border="3" src="../images/sun_euv19.gif" width="304" height="228"/>
This says the images folder is up one level from the html file

Check out W3Schools Online Web Tutorials
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
Try <img border="3" src="/sun_euv19.gif" width="304" height="228"/> and <img src="sun_euv19.gif" />
 

CrimsonRequiem


Retired Staff
Joined
Jul 24, 2008
Messages
6,003
Reaction score
125
Points
63
Your Mac's Specs
MBP 2.3 Ghz 4GB RAM 860 GB SSD, iMac 3.4 GHz Intel Core i7 32GB RAM, Fusion Drive 1TB
Make sure that the picture name is typed out correctly with the correct file extension, also check that the HTML file and the picture is in the same/correct directory.
 
OP
L
Joined
May 24, 2009
Messages
84
Reaction score
0
Points
6
Your Mac's Specs
eMac OS X 10.4.11 1.25GB RAM 40GB original hard drive,
Okay, I got the image from here and I had the image saved to my desktop in a desktop shortcut. Then because of what was said here:

,Make sure you have the correct path to the image
<img border="3" src="sun_euv19.gif" width="304" height="228"/>
This says the image is in the same folder as the html file.

I dragged the image shortcut into the same folder as my html file and typed exactly what was said above, but still nothing.
I also tried this:

<img border="3" src="images/sun_euv19.gif" width="304" height="228"/>
This says the image is in the folder images

But still nothing.

Can somebody just me give a safe, known to work image, that has for sure already been uploaded to the internet and worked, that I could just copy and paste from this forum? Please??
 
Joined
Jan 27, 2009
Messages
531
Reaction score
4
Points
18
Location
New York, NY
Your Mac's Specs
17" MacBook Pro, 2.5 GHz Intel Core 2 Duo Processor, 2 GB 667 MHz DDR2 SDRAM, not unibody
As far as I know, TextEdit doesn't view pictures normally. I've never tried HTML, though.
 
OP
L
Joined
May 24, 2009
Messages
84
Reaction score
0
Points
6
Your Mac's Specs
eMac OS X 10.4.11 1.25GB RAM 40GB original hard drive,
I just tried copying and pasting directly from the image on the internet to my HTML code, instead of saving it to a file of my own and then trying to paste from the file, and it worked!! :D

I'll let you guys know if I have any other problems.
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
<img src="http://www.mac-forums.com/forums/images/avatars/avatar76.gif" />

That links to your avatar image. Tested and it works.
 
Joined
Jul 18, 2007
Messages
3,184
Reaction score
93
Points
48
Location
Central California
Your Mac's Specs
2.16GHz C2D MacBook w/ 2GB RAM & 120GB HD. HTC Droid Incredible.
Of course it worked because its pointing to a image online already. It wasn't showing before probably because it wasn't uploaded online and the path was messed up somewhere.
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
Of course it worked because its pointing to a image online already. It wasn't showing before probably because it wasn't uploaded online and the path was messed up somewhere.
Agreed but since I don't have the directory structure, I can't really give a working example other than of an online image.

Can you tell us what the directory structure looks like?

Let me give you an example from my site of a working image. I have a directory called "images". In there, I have a picture called "chromium_04232009.png". To link to this image, I use this code: <img src="images/chromium_04232009.png" />
 
OP
L
Joined
May 24, 2009
Messages
84
Reaction score
0
Points
6
Your Mac's Specs
eMac OS X 10.4.11 1.25GB RAM 40GB original hard drive,
I tried this
<img src="http://www.mac-forums.com/forums/images/avatars/avatar76.gif" />
and it didn't work, it didn't even have the question mark icon.
Hmmmm?
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
Can you post the code to the page? That code does work because I tested it here locally.
 
OP
L
Joined
May 24, 2009
Messages
84
Reaction score
0
Points
6
Your Mac's Specs
eMac OS X 10.4.11 1.25GB RAM 40GB original hard drive,
Can you post the code to the page? That code does work because I tested it here locally.

What exactly do you mean?
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
Post the code from your page here so we can see it.
 
Joined
Mar 11, 2009
Messages
469
Reaction score
9
Points
18
You know, it sounds like your images directory doesn't have the proper permissions assigned to it that would allow you to access it.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top