I am using notepad for coding html. I was writing a code to download an image of a flower. I have done everything correctly. I used tag 'a' and also used the attributes href and download. But it is only opening the link not downloading it. here is the source code and output i am getting.
<!DOCTYPE HTML>
<html>
<title>first website</title>
<body text = 'white', bgcolor = 'orange'>
<h2 align = 'center'>
<!--here i am using tag a to open the wikipedia page of flowers when clicked on the image-->
<a href = 'https://en.wikipedia.org/wiki/Flower' target = _blank><img src = 'https://www.gardeningknowhow.com/wp-content/uploads/2021/07/sulfur-cosmos-mexican-aster-flowers.jpg' height = 20% width = 10% alt = "Not found"></a><br><br><br>
<!--here i am using it for downloading the image when clicked on the link-->
<a href = 'https://www.gardeningknowhow.com/wp-content/uploads/2021/07/sulfur-cosmos-mexican-aster-flowers.jpg' download>click here </a>to download the image above
If you click in that flower image wikipedia page of flowers will appear. And if you click that link, the above image of flower will download. That is what I intended to do. It is opening the wikipedia page when clicked on the image, But it is not downloading when clicked on the link. instead it is showing like this.
It is not downloading. Instead it is just showing like this. could anyone tell me what is the problem here and how to solve it.