How to set the name of the file downloaded from the browser with HTML?

Spread the love

To set the name of the file downloaded from the browser with HTML, we set the download attribute.

For instance, we write

<a href="path/to/file" download="renamed.txt">Download</a>

to set the download attribute to the name of the downloaded file.

Leave a Reply

Your email address will not be published. Required fields are marked *