JPG file GIF file
PNG file (not supported by all browsers) GIF file with transparency (GIF89a)

As you can see there is not much difference in the quality of the images.

Generally, text graphics are small and a GIF format will suffice. An exception would be if you created larger text graphics with color gradations or some other multi-color treatment.