Modern browsers support download attribute for anchor elements which is used to specify the name of the file as it will be downloaded:. Create and download data in CSV format using plain JavaScript. CSV. There can be cases, examples/js/download_csv.html.