Html Code To Create Download Link Average ratng: 4,8/5 9479 reviews
  1. Html Code To Create Download Link
  2. Html Create Download Link Video
  3. Html Create Download Link Pdf

i have html file with video and audio file. and i want to links file such as mp3 or mp4 using tag a href and download that file. My video and audio file stored in same folder with my html file.

i have tried this code :

Link

but not downloaded my file, just open a new tab with a play pause controls in the center.

If you check the code, you'll see that we've simply placed the code for an image inside the code for a normal link. In case you're not aware, to create a link in HTML, you use the element (the 'a' stands for 'anchor'). User can Right click or option-click the link and choose 'Save As.' To download this file. Using this download link, you can provide any type of files like pdf, mp3, text, zip etc. Download from your website.

from this question i get to add 'download' to my href tag, but it is for modern browser. How about for old browser?

how i can create a download link for my video/audio in html file and support for all browser (not only for modern browser)?


thanks in advance and sorry for my bad English.

Community
Yohanes AIYohanes AI

2 Answers

It depends of your browser settings and plugins however if you are using php you can do a script to download the file like this one:

Download

save it as download.php

then create a link like this one

It should work now, have a nice day.

ELavicountELavicount

You can try this. I've tried it, and it's working for me.

Emir DupovacEmir Dupovac

Not the answer you're looking for? Browse other questions tagged htmlaudiovideobrowserhref or ask your own question.