title: Have a file get downloaded instead of opening it in a new tab to view in web browser
body: <p>Right now Im creating a website that gets the href from another page that contains all of our data. however instead of downloading the .dat file when I click the link, it just opens it in the current tab or a new tab as plain text. </p>
  
  <p>this is the line of code that I am using</p>
  
  <p><code>&lt;a href='https://www.[I dont want to put the actual web address]/$namehref' download&gt;$size&lt;/a&gt;</code></p>
  
  <p>$namehref is just the name of the file that is to be downloaded.</p>
  
  <p>this worked when we had a .tar file but doesnt want to work for files that can be open and read within the webpage itself.</p>