Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML area download property

HTML download property

HTML area Tag Reference HTML tag

Example

An image with a clickable download area:

Planets Sun Mercury Venus

Try it »


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Currently only Firefox and Chrome support the download property.


Definition and Usage

The download property specifies the address of the download link.

The download property only needs to be specified when the href property is used.

This property can also specify the name of the downloaded file. The file name is not restricted; the browser will automatically add the downloaded file's extension (.img, .pdf, .txt, .html, etc.) at the end of the file name.


Differences between HTML 4.01 and HTML5

The download attribute is new for the tag in HTML5.


Syntax

Attribute values

Value Description
filename Specify the file name.

HTML area Tag Reference HTML tag