Download File


Go to main Page

Download file in HTML

In this tutorial we are going to add download file functionality in webpage.

How to Download file on click in HTML

Code


<!DOCTYPE html>
<html>
<head>
    <title></title>
</head>
<style type="text/css">
    *{
        margin: 0;
        padding: 0;

    }
    body{
        text-align: center;
    }
    button{
        width: 150px;
        height: 30px;
        background-color: orangered;
        color:white;
        border:2px solid orangered;
        font-size: 18px;
        font-family: sans-serif;
        border-radius: 5px;
    }
    button:hover{
        background-color: transparent;
        color:orangered;

    }
</style>
<body>
<br><br>
<a href="webpage.zip"><button>Download Now</button></a>
</body>
</html>