Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App

Related Articles

HTML | <a> download Attribute

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

The download attribute is used to download the element when the user clicks on the hyperlink. It is used only when href attribute is set. The downloaded file name will be the value of the attribute. The value of the attribute will be the name of the downloaded file. If the value is removed then original filename used. 


<a download="filename">

Attribute Values: It contains single value filename which is optional. It specifies the new filename for the downloaded file. 



<!DOCTYPE html>
      HTML a download Attribute
    <p>Click on image to download
            <a href=
            <img src=



Supported Browsers: The browser supported by HTML <a> download Attribute are listed below:

  • Google Chrome 14.0
  • Edge 18.0
  • Firefox 20.0
  • Safari 10.1
  • Opera 15.0
My Personal Notes arrow_drop_up
Last Updated : 30 Mar, 2023
Like Article
Save Article
Similar Reads
Related Tutorials