HTML download Attribute (original) (raw)
Last Updated : 12 Jul, 2025
The **HTML download Attribute is used to download the element when the user clicks on the hyperlink. It is used only when the 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 the original filename is used.
**Syntax:
**Uses: It is used in ****** **and****** Elements.
**Attribute Values: It contains a single value **filename which is optional. It specifies the new filename for the downloaded file.
**Example: The below example illustrates the use of the download attribute in an anchor Element.
html `
HTML a download AttributeClick on image to download
`
**Output:
