Help - Search - Members - Calendar
Full Version: Image insertion
HTMLHelp Forums > Web Authoring > Markup (HTML, XHTML, XML)
OverseasPlanners
Click to view attachmentHi, I am a beginner in HTML. I want to insert an image to my webpage which is saved on my desktop. Which tag should I use? I used <IMG SRC=desktop/(image name)> but it didn't work. Please assist.
Barons
If you are doing it in html

http://www.goldcoastwebdesigns.com/12.shtml

If you are using css

http://www.htmlcodes.me/image-codes/css-image-code.cfm

Hope that helps
Frederiek
I wouldn't entirely trust that first link, as they only talk of absolute image URL's. And other explanations are either inconsistent or even wrong.

The second link again uses only absolute image URL's. This time the url to the image needs to be relative to the file in which the CSS is defined.

See http://htmlhelp.com/faq/html/basics.html#relative-url .

So, looking at the code in the attached file, if your HTML file is on the Desktop and the image is in the folder Pictures, which in turn is contained in the folder Madhav_ji, then your img tag should look like this:

<img src="Madhav_ji/Pictures/620443.jpeg" alt="">
pandy
QUOTE(OverseasPlanners @ Feb 20 2011, 07:47 AM) *

Click to view attachmentHi, I am a beginner in HTML. I want to insert an image to my webpage which is saved on my desktop. Which tag should I use? I used <IMG SRC=desktop/(image name)> but it didn't work. Please assist.


The URL isn't right (probably ). For that to work the HTML file must be one folder up from the desktop. You can read here about relative URLs.
http://htmlhelp.com/faq/html/basics.html#relative-url

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2018 Invision Power Services, Inc.