How to Use the 'download' Attribute For Your Websites - HTML5 Tutorial
HTML-код
- Опубликовано: 28 авг 2019
- In this video I'll be showing you how to create "download" links for use on your websites or web applications. This is done using the new HTML5 "download" attribute.
Support me on Patreon:
/ dcode - with enough funding I plan to develop a website of some sort with a new developer experience!
For your reference, check this out:
developer.mozilla.org/en-US/d...
Follow me on Twitter @dcodeyt!
If this video helped you out and you'd like to see more, make sure to leave a like and subscribe to dcode!
not working with me
it just opens the file in da browser:/
Wow, i didn't expect it to be this easy! THANKS A LOT MAN!!
This is waaaay easier than I would’ve thought
YOU ARE AWESOME!! Thank you so much for teaching me how to do this. I watched countless videos and searched for a while on the internet and couldn't find a way until I came across your video. This unfortunately was not taught in my class either. I liked your video and subscribed!
I thought that I would have to add complex JavaScript code... But it was as simple as the "required" attribute used in html form.... Thanks 😊
this does exactly what I wanted, thank you for the awesome tip!
Nice. You're welcome
@@dcode-software hey, where can i find HTML?
I thought it was used by a very long javascript but it was used in html. I was shocked. Thank you for this video. I liked it very much.
You're welcome!
Bro me too
Awesome Man! This was way easier than I had thought !
Man, how can I xpress my feelings. I am too happy. Thanks very much. Love from India. I think 🤔 u are a British man
So helpful. Works perfectly. Thanks for the video
This is simply perfect. Thank you a lot!
it is awesome dear you explain in one line.thnx alot man
wow..thank you so very much. Subscribed.
Thank you for this tutorial but I still have a doubt related to this that how can I make a download button for an image using HTML and CSS? As soon as it is clicked image will start downloading.
loved the method nice
Excellent tutorial good job
Thanks ..
its helpful
new subscriber
Nice video thank you 🙂
Thanks for help, subed!
wow thanks man, this was awesomee
Hi, is it possible to change the download path? For example, will create a folder named "Sample" and all the downloads from that site will be placed there instead of default "Downloads" folder. Thanks in advance!
Is there a way to use the download attribute if you only have an html file without a folder with the files you want to be downloaded? So that anyone can download a file from it without already having the file on your device. Do I have to use something like Google Drive for that?
How would this work for downloading an app? Would you link to the folder containing the project in some way? I just tried this using a UE5 game im working on and its not downloading it.
Thats nice bro
please help mp4 video and mp3 audio not download chrome and opera browser
Does this work with folders as well?
Thank you so much 😍❤❤
I did the same thing, i dont understand why it opens the file instead of downloading it
Hi
I tried this in chrome but not getting download it just viewing the image
DOWNLOAD
Help me
me too
Same
same
You have to do it in a localhost server
Maybe because you have it on your computer already?
Can I also make this when I want to upload a pdf file on my website to make the user download it ??
how an i able to code a downloadable link for audio files please let me know
I am editing in notepad and i have a file in the same folder as my html file, but if i type that with my filename, then it will just open in newtab, even with the download attribute
Was there no same-origin restriction back in 2019?
thanks a lot
Thanks Bro 😀😀😀👍👍👍
Thank you sir
Not working for image file. it will preview the image not directly download it. can you show me how to do it?
Thx bro
What font have you used for the title?
What is the name of Font your are in your html site please tell??
wow. Thanks Man
thank you ☺🙂
Thank you
How do you make it work with iPhone and internet explore?
thank you for share
Thanks, sir
Most welcome
How do I make it so the file name has a random number in it?
Can we Download videos and audios ... Please reply...
Which software did u use for executing the html file?
Just open it in a browser.
Thanks.
it didn´t work because it´s open the file on the site. Please
help me!!! THANKS!
Not working for PDF files from PC it stills lead me to a new tab
Please help me., How can I do my website to show number of downloads? Please I need your help people..
Thx live saver
You are welcome!
Im trying to download a MP3 file. I did exactly what he said. Thisis my code: Download . I tried opening this in Microsoft Edge but it would just pull up the song in a different tab. Where did i go wrong?
i did it with an image, and getting the same error as you.
You should put it in a .zip or .rar file ...etc
@@ieee7546 i did the same exactly download and its giving me the tab not downloading it... what did I do wrong..
wait does it only work by .zip and .rar
@@ContentBombingyeeeeeee! thank you very much bro😘
Hi I've tried this in chrome but it opens the file instead of downloading it ... any tips ?
same
It dont work with .bat files?
thanks thanks thanks thanks thanks thanks
Thank you for sharing 💕💓❤️♥️♥️♥️♥️💓😊😘🥰❤️😍💙💙💙💙💙💙💙
How to add download button for image website
Can we change filename
How can you do this if you want to upload an other file type
If you don't want to download a .txt file, and you want to, say, download a windows installer, then at the end of your name, put ".msi" for it to be a windows installer. Basically what I'm saying is if you want to download different files put .msi .inf etc.
Sir it is opening the document either downloading
It doesn't work, it just opens the image
I have the same problem :/
@@Kevinproducciones2 I don't know how to completely help the problem, but I do know that if you make a zip file of the image, you can download it.
Run it using a server... such as localhost...
@@yoursinger4014 Thanks it helped me a lot
Thanks a lot it working properly...
i can't see hyperlink in my website halp
I tried it but it's not working for me
did not work brother. just takes me to new tab. what should i do, or am doing wrong?
same for me
@@bernalmina6792 hey I figured out the problem if you are interested, just ignore the new tab because once you publish your website to the web it will work 👍
@@Ncs14770 oh i see.. thanks nick ^^
uh what do i do with this? file:alternate/1528000/1528775_alternate_113347_r88.zip
Why is it not working...
how to download e-paper using attribute? kindly answe mer!!!!
You cannot place "button" between "a"
but you can design the a like button
for some reason it doesnt work for me help
What if we need to download pdf
Will this work for downloading audio??
For downloading audio files, yes
@@dcode-software bro it doesnt work
Is this only work using localhost? Bcoz in live it doesn't work.
can this be used in buttons
yes
Will this method work for EXE file?
yeah just tried it
doesnt work for me, maybe im doing something wrong?
sir, It is not working. It only displays the image. Please advise.
Try using the latest version of Web Browser.
You need ur website to be online hosted
People what didnt put this in http server: bro it dont wotk
It's still doesn't working
♥️♥️♥️
mine is not working
dont work for me, why?
❤❤❤
i get about:blank#blocked
not found
❤️👍
😊😊😊👌👌👌
its not working
I do the same but its not working
dont work!
🙏🙏🙏👌👌👌🖖🖖🖖🖖
up
if download attribute is not working check this out i have done it by watching this video ruclips.net/video/azssOhJsLEw/видео.html
💀
how to get free domain
it not going to work if you don't run an HTTP server! This is the shortest video to see how to do it ruclips.net/video/vnPemSnnJYY/видео.html. You are welcome!
very bad man
I've tried man but no it's not working for me I don't know the reason but I did some research and It suppose to work on chrome but , it still work as an a viewer , it's not working.
and so here's an exemple I've tested:
Sorry for my french
pour telecharger le fichier clickez surTélécharger
thanks a lot