HTML download attribute

download attribute makes the linked file to download in the local file system for the user.


<a href="files/demo.html" download="list of items"> download file </a>
Try </>

The name of the downloaded file will be the value of download attribute i.e. a list of items in the local systems.

download attribute value

The value is plain text. The value of download attribute gives default name to the downloaded file in the local file systems.

In the above example, the value of download attribute is the name of the downloaded file.

But if you omit the value of download attribute then the file will be downloaded with the original name.

An author should be cautioned in labeling the downloaded file name and should take into consideration the punctuation rules in file names.

Related Tags

The tags that support this attribute are as follows.

<a> tag

This element represents the hyperlink of the the linked file.

<a href="address of linked document" download="name of the downloaded file"> file </a>

<area> tag

This element represents the area to be downloaded.


<area alt="circle" title="circle" href="circ.html" shape="circle" coords="196,89,33" download="circle">


Was this article helpful?




Get the newsletter