migroo Posted July 13, 2009 Share Posted July 13, 2009 Hi, I am learning to program using W3schools and am having some problems with images here is the code I use:<img src="http://www.aerospaceguide.net/spacepictures/shuttle_endeavour.jpg"width="200" height="600" /> Now this will display but its not hosted by me its hosted on another website. So I have had to upload images to another website and then cut and past the url.All the examples that are given in the tutorials look like this:<img src="shuttle2.jpg"width="200" height="600" />Now where do I need to upload the image too for this to work I am using FileZilla to upload to my server.I Just don't know what folder I should upload to or if I should make a new folder or what? Any Help would be appreciated.Thanks Link to comment Share on other sites More sharing options...
Ingolme Posted July 14, 2009 Share Posted July 14, 2009 Hi, I am learning to program using W3schools and am having some problems with images here is the code I use:<img src="http://www.aerospaceguide.net/spacepictures/shuttle_endeavour.jpg"width="200" height="600" /> Now this will display but its not hosted by me its hosted on another website. So I have had to upload images to another website and then cut and past the url.All the examples that are given in the tutorials look like this:<img src="shuttle2.jpg"width="200" height="600" />Now where do I need to upload the image too for this to work I am using FileZilla to upload to my server.I Just don't know what folder I should upload to or if I should make a new folder or what? Any Help would be appreciated.ThanksYou need to understand how URIs ad URLs work.If there is nothing but a filename (file.jpg), it means the file is in the exact same location as the HTML file that's calling it.[file.jpg]Root | +- file.html | +- file.jpg If there is a word and a slash preceding the file name (images/file.jpg), it's in a folder directly under the location of the current file. [images/file.jpg]Root | +- file.html | +- images | +- file.jpg This also works for having folders inside folders: [images/other/file.jpg]Root | +- file.html | +- images | +- other | +- file.jpg Two dots (..) means a parent folder: [../file.jpg]Root | +- documents | | | +- file.html | +- file.jpg It also works with several levels of folders: [../images/file.jpg]Root | +- documents | | | +- file.html | +- images | +- file.jpg Finally, when a URI is preceded by a slash, everything that follows is relative to the Root [/images/file.jpg]or[../../images/file.jpg]Root | +- documents | | | +- HTML | | | +- file.html | +- images | +- file.jpg Link to comment Share on other sites More sharing options...
migroo Posted July 14, 2009 Author Share Posted July 14, 2009 Thank you I will try that and thanks so much. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.