Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Html - embed image directly in html (old school style)

Tags:

I know you can embed images in html today with:

<IMG SRC="data:image/gif;base64,RAAA...more data....."> 

But back in the day, when Netscape was a browser to implement for, there was another way of doing this. I can't remember.

Any suggestions would be appreciated.

like image 824
Stephane Grenier Avatar asked Jan 04 '10 20:01

Stephane Grenier


People also ask

Can you embed HTML in HTML?

Embedding an HTML file is simple. All we need to do is use the common „<link>“ element. Then we add the value „import“ to the „rel“ attribute. Using „href“ we attach the URL of the HTML file, just like we are used to when it comes to stylesheets and scripts.


1 Answers

I don't know any other way specific to Netscape (RIP) and a quick search showed me that "IMG SRC=data:" has been supported by Netscape already in 2003.

I found out some IE specific tags that look like yours, but never used them (not sure it will help):

<img datasrc="bar" datafld="foo"> 

Some more info on embeded images in sources here (can help readers unfamiliar with this topic): http://www.websiteoptimization.com/speed/tweak/inline-images/

Here is a way to use "IMG SRC=data:" under IE6: http://web.archive.org/web/20080702001125/http://ddzoom.net/jsimages/out.htm

like image 131
AlexV Avatar answered Oct 18 '22 19:10

AlexV