Articles → HTML 5 → Download attribute in HTML5

Download attribute in HTML5






Purpose





Syntax


<a download="file_to_be_downloaded"></a>



Example




<!DOCTYPE html>

<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />
    <title></title>
</head>
<body>
    <a href="#" download="jquery-3.1.1.js">Download</a>    
</body>
</html>



Output



Click to Enlarge


Browser support


Internet ExplorerFirefoxChromeSafariOperaEdge
13.020.014.010.115.0Yes



Video





Posted By  -  Karan Gupta
 
Posted On  -  Thursday, March 16, 2017
 
Updated On  -  Wednesday, January 09, 2019

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250