Html code to download files
Example Specify a value for the download attribute, which will be the new filename of the downloaded file "w3logo. Report Error. Your message has been sent to W3Schools. W3Schools is optimized for learning and training. Examples might be simplified to improve reading and learning. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content.
Welcome to GeeksforGeeks. Download Image. By clicking the download button. Recommended Articles. Article Contributed By :. Easy Normal Medium Hard Expert. Writing code in comment? Please use ide. Load Comments. What's New. Most popular in JavaScript. The optional value of the download attribute will be the new name of the file after it is downloaded. There are no restrictions on allowed values, and the browser will automatically detect the correct file extension and add it to the file.
Specify a value for the download attribute, which will be the new filename of the downloaded file "w3logo. We just launched W3Schools videos. Get certified by completing a course today!