Downloading text file when button is pressed html

Or maybe a *.htm or *.html file by pushing a button? Can you save the results of a