The download attribute is only used if the href attribute is set. will automatically detect the correct file extension and add it to the file (.img, .pdf, .txt, .html, etc.). Learn how to embed PDF documents in HTML using the a and iframes tags, and need to add to the element is the URL or the reference link of your PDF file.