HOME
MENU

How to add a gif download button or link to website - html download attribute

download birthday gif button link

The html5 download attribute can download gifs, pdfs, jpgs and other file formats either as a download button or download link on a webpage using the anchor tag.

Basic download link for a gif or any other file format

<a href="filename.gif" download="new-filename">DOWNLOAD GIF</a>
Where 'filename.gif' is the link to the gif and 'new-filename' renames the file, can be left blank if not required. The text 'DOWNLOAD GIF' appears on the webpage for the visitor to click.

Download gif button image

<a href="filename.gif" download="new-filename"><img src="download-button.png" alt="download button"></a>
As before 'filename.gif' is the link to the gif and 'new-filename' renames the file, 'download-button.png' is the link to the button image which appears on the webpage for the visitor to click.

Download gif button using fontawesome download icon

fontawesome download icon
<a href="filename.gif" download="new-filename"><i class="fas fa-download"></i></a>

As before 'filename.gif' is the link to the gif and 'new-filename' renames the file, 'fas fa-download' is the css class of the download icon which appears on the webpage for the visitor to click.

More details about using fontawesome icons can be fount at fontawesome.com