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>

Attribute values

All possible values of download attribute

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 download attribute

<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?