If you look at [evernote](http://evernote.com/) or use their [web clipper browser addon](http://evernote.com/webclipper/), it can save a webpage completely with all styles and images of page clipped. So for example if I save this very page with it, it will be saved as is.

Does any one have an idea of how evernote does it? I want to do it with either PHP or JavaScript but am not sure how to save a webpage with all styles and images. I know about Internet Explorer's **mht** format but that's not what evernote does.

So basically it would be great if one can save a webpage with **all styles and images (excluding dynamic content such as JS) in single file and be able to open it in any major browser** ? Any pointer to such script would also be helpful.

I have also noticed similar thing in **Gmail**, when you copy any part of page and paste that in Gmail Compose, it renders it as it was or same happens in **MS Word** too.

Thanks for your help and hints :)