polgee Posted September 20, 2013 Share Posted September 20, 2013 I am an absolute beginner at HTML. I was doing OK I until I had tried to include an image sourced on my computer. I have used the address of the source file on my computer, but the browser only shows a small square icon. What am I doing wrong? I am saving the file as .html (all files) ANSI. Another question. When files are uploaded to a website containing files housed on my computer, how does the browser locate the files when they are addressed to my computer? Link to comment Share on other sites More sharing options...
newseed Posted September 20, 2013 Share Posted September 20, 2013 You should path your image relatively and not absolute. Relative path = src="images/filename.jpg" Absolute path = src="C:/win7/user/default/webfolder/images/filename.jpg" Where ever html file is you should path it from that perspective. Ideally you should move or copy your images to a images folder. Link to comment Share on other sites More sharing options...
davej Posted September 20, 2013 Share Posted September 20, 2013 Getting the path correct is a common problem. You have to experiment until it finds the file. In Linux the path is case-sensitive. Link to comment Share on other sites More sharing options...
thescientist Posted October 2, 2013 Share Posted October 2, 2013 (edited) agree with having an images folder as some sort to container. It's important that all your html, css, image, etc files are all bundled in a common parent directory. If you upload these files to a server, and you're referencing files on your local filesystem using absolute paths, it won't work. Relative paths with all files under a common parent directory is the preferred convention for uploading/deploying websites/apps. Edited October 2, 2013 by thescientist Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now