How to create a download link with HTML?

HTMLWeb DevelopmentFront End Technology

To create a download link with HTML, the code is as follows −

Example

 Live Demo

<!DOCTYPE html>
<html>
<body>
<h1>Download Link example</h1>
<a href="https://i.picsum.photos/id/225/800/800.jpg" download>
<img src="https://i.picsum.photos/id/225/800/800.jpg" style="width: 300px;height: 300px;" >
</a>
<h2>Click on the image above to download it</h2>
</head>
<body>

Output

The above code will produce the following output −

raja
Published on 08-May-2020 17:45:28
Advertisements