Jump to content

linking/adding image from desktop


jasika

Recommended Posts

can anyone please suggest how to add an image in a html file from the desktop.

i would like to tell that i am working on html4

also someone suggested the code snippet

<img src="C:UsersaldiazDesktopDynamicsTest1.jpg" style="height:200px;width:100px;float:left">

 

can you please explain me the same

thank you...

Edited by jasika
Link to comment
Share on other sites

I don't see a point in linking to an image on the desktop. If the HTML file itself is on the desktop just put the name of the image file and it will work. Websites are eventually intended to be put on a web server, so using a local filesystem URI isn't really useful.

  • Like 1
Link to comment
Share on other sites

The URL you would use in the src attribute would be something like this:Windows XP:

  • file:///C:Documents and Settings[username]Desktopfile.jpg

Windows Vista / Windows 7:

  • file:///C:Users[username]Desktopfile.jpg

Link to comment
Share on other sites

look in your error console. it will tell you where the browser is trying to look for the file, and you can match that against the path that it is actually located on the filesystem. Compare the two to try and see where the deviation is.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...