Skip to content

Instantly share code, notes, and snippets.

@shrinkray
Last active November 15, 2019 23:18
Show Gist options
  • Select an option

  • Save shrinkray/609f6ad8a34cb0fc10d8ef5e2c74cae8 to your computer and use it in GitHub Desktop.

Select an option

Save shrinkray/609f6ad8a34cb0fc10d8ef5e2c74cae8 to your computer and use it in GitHub Desktop.
How to set a link to download a document
<!--
In this link, use the HTML download attribute to specify that the
target will be downloaded when a user clicks on the hyperlink.
The download attribute is only used if the href attribute is set.
-->
<a class="btn-conversion blue3 d-flex"
href="https://www.rootinc.com/pdfs/Gary_Speaker_Sheet.pdf"
download
target="_blank">Get the Info!</a>
<!--
On another project, I'd set download="https://.."
But that may not work.
-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment