Typically, most browsers will automatically open the basic file types:
.txt, .gif, .jpg, .jpeg, .bmp
Anything that the browser doesn't recognize (or isn't told to recognize / handle) is then offered as a download.
If you would like to "force" a download, you may want to look at many of the user notes at the [man]header/man manual page. It tells you there how to do it, in many ways.