DEV Community

Cover image for Have you heard of the download html attribute?
Maciej Trzciński 🌱🇵🇱
Maciej Trzciński 🌱🇵🇱

Posted on


Have you heard of the download html attribute?

The download attribute specifies that the target will be downloaded after a user clicks.
Also, when you set value to download, the file after download will have this name, in my particular example the file will named Awesome-Company.pdf after download.

*  download - this is information for breowser that the link will download file
*  value - here you can set name for file
<a href="/uploads/company-info.pdf" download="Awesome-Company" />

Enter fullscreen mode Exit fullscreen mode

If you like this article, follow me on Twitter @MaciejDEV

Top comments (0)

Timeless DEV post...

Git Concepts I Wish I Knew Years Ago

The most used technology by developers is not Javascript.

It's not Python or HTML.

It hardly even gets mentioned in interviews or listed as a pre-requisite for jobs.

I'm talking about Git and version control of course.

One does not simply learn git