# How to specify that the target will be downloaded when a user clicks on the hyperlink in HTML?

HTMLWeb DevelopmentFront End Technology

Use the download attribute to set the file to download on click of the hyperlink. Set the value of the attribute to the name of the downloaded file, for example, image.

## Example

<!DOCTYPE html>
<html>
<body>
<h3>if statement in Java</h3>
<p>The following is an image explaining the concept if <b>if-statmement in Java</b> (Click to download):<p>

</html>