On the web jpg's are best for photos. gif's or png's are best for graphics.
For the sharpest photos when saving in jpg format don't compress them - ie keep them at 100% quality. Compressing them reduces file size and quality. Resize photos as others have suggested - otherwise they will be auto resized.
Oliver just a quick correction....all Jpegs are compressed. You cant have a Jpeg that isnt compressed. and its lossy compression as you mentioned, only tiff allows you to compress a file and not lose quality.