How do I embed a link in an image?

How do you embed an image into HTML source?

  • I'll be more clear. I do not want to use the standard img src to link to the image file. I want to embed the image file as data in the HTML so that no external files must be used.

  • Answer:

    if you are talking about ascii images you need to create those by hand. Standard GIF and JPEG images (and the other types) cannot be "embedded" in HTML using the HTML standard. Some browsers may be able to do funky things, but you cannot include binary data in standard text html, its a simple problem of MIME types.

albo8888... at Yahoo! Answers Visit the source

Was this solution helpful to you?

Other answers

html doesn't work that way, sorry.

WhiteHat

That's not how HTML works. HTML is just text - you can't embed anything in it. You can only link. EDIT Ok Einstein, you've got ten people telling you that it either can't be done or there's no reason to. Now's the time to either research it yourself or stfu.

thepenismightier

Other than the old trick of creating an image using standard characters, you are pretty much out of luck. Even if this was possible, I can think of half a dozen reasons why you would not want to do it.

Interested Dude

Not sure if this is what you want but.. you can try using <body background="picture.gif"> look up background image on yahoo.

jason m

insert webcomponent html, then enter code.

Silly chick

You would have to use javascript to draw the image. It could be done, but yuck!

lenny

....r u making a new program???? hit me back when u got it going!

babiboi013

You can use CSS with divs to create simple images. Think of them like tanagrams. Here is an example: http://www.superflippy.net/temp/slanty2.html

Super Flippy

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.