Building a Web Page

Joined
Nov 30, 2005
Messages
14
Reaction score
0
Points
1
This is probably a dumb question, but I just can't figure this out. I'm coding a web site for my Computer Science course and the images I've added never load when I preview the .html file. I have the right html instruction and my source is just the folder and jpg file on my computer. Can anyone help me out with this?
 

cwa107


Retired Staff
Joined
Dec 20, 2006
Messages
27,042
Reaction score
812
Points
113
Location
Lake Mary, Florida
Your Mac's Specs
14" MacBook Pro M1 Pro, 16GB RAM, 1TB SSD
I've seen this happen before when hand-coding HTML. In my case, I didn't match the case correctly of the image file names. Some web servers are case-sensitive, so make sure your stated paths match the actual case of the files. Just a guess....
 
Joined
Feb 2, 2004
Messages
12,455
Reaction score
604
Points
113
Location
PA
Your Mac's Specs
MacBook
This is probably a dumb question, but I just can't figure this out. I'm coding a web site for my Computer Science course and the images I've added never load when I preview the .html file. I have the right html instruction and my source is just the folder and jpg file on my computer. Can anyone help me out with this?
What browser are you using to preview your page?

Is the index.html file in the same location as the images?

Can you attach your index.html file as a .txt to a post so we can get a better idea of how you have it set up?
 
Joined
Dec 3, 2007
Messages
13
Reaction score
0
Points
1
Sometimes when I apply css background-image I have real troubles getting them to show up while testing on my hardrive.

Although, I suspect your file path is fudged.
 
Joined
Mar 14, 2005
Messages
443
Reaction score
3
Points
18
Location
Atlanta, GA
Your Mac's Specs
17" Macbook Pro Unibody 2.66 Ghz and Powerbook G4 1.67 GHz 2.0GB RAM
Copy and paste some of the code here. We'll help you.
 
Joined
Mar 19, 2007
Messages
1,814
Reaction score
137
Points
63
Location
NY USA
Your Mac's Specs
iMac 5.1 | iMac 7.1 | iMac 12.1 | iMac 19.1 | iPhone 11 Pro | Watch s5
use relative paths, and make sure the case is correct everywhere. something like:

src="../media/pHoTo.JPEG"
 

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