http://www.htmlcodetutorial.com/imag...amsupp_59.html
That site will give you the nitty gritty of how to set that up. You can use thier code or build off it to come up with your own.
However, most web page design software will do all of this for you. Its not really necessary to do it all by hand.