GIFs can display anything up to 256 colors. You can use image editing software (such as Adobe Photoshop or GIMP) to manipulate each individual color to provide you with a nice crisp image. You can also reduce the number of colors so that the image is smaller and loads faster on your web page.
GIFs have a file extension of .GIF.
JPEGs, as opposed to GIFs, can display millions of colors and therefore are better for images such as photographs. You can also manipulate JPEGs with image editing software, however rather than manipulating each color, you adjust the level of compression that will determine the end file size.
If you incorrectly save an image in JPEG format, you might notice that it's not as clean as it could be. If you go back and save the original image in GIF format, you will notice that it becomes much cleaner. This is particularly obvious when your image contains text.
JPEGs have a file extension of .JPEG, .JPG, or .JPE.