Neither is better or rather each as it benefits to the job at hand. For example, You have an image less than and/or 256 colours then I would say .gif would be the format of choice mainly because you will not benefit from any extra quality by using jpeg, you would also benefit from using .gif because of the lower filesize.. Also, if that image contains animations then .gif would be the format of choice because jpeg does not support animations. However, jpeg has it pros mainly for images that exceed 256 colours and by using jpeg images you would retain that quality whilst using .gif would result in colours looking of low quality.
The save for web feature is a very usefull tool as it allows you to tweak your format of choice and allows you to manage slices and save in any matte colour of choice and gain optimal performance from your saved images/projects.