title: Flask: where to put static javascript files in templates
body: <p>I'm developing a flask app with the following folder structure:</p>
  
  <pre><code>|--&gt;flask_app.py
      |--&gt;static
          |--&gt;css
              |--&gt;bootstrap.min.css
              |--&gt;styles.css
          |--&gt;js
              |--&gt;jquery-3.1.1.min.js
              |--&gt;bootstrap.min.js
              |--&gt;script.js
      |--&gt;templates
          |--&gt;index.html
  </code></pre>
  
  <p>What is the proper way to link to these css and js files in <code>index.html</code> and what parameters do I need associated with them?</p>
  
  <p>My CSS links look like this and are located in the header:</p>
  
  <pre><code>&lt;link rel="stylesheet" href="{{ url_for('static', filename='css/styles.css') }}"&gt;
  </code></pre>
  
  <p>And my JS links look like this and are located at the end of the body tag:</p>
  
  <pre><code>&lt;script src="{{ url_for('static', filename='js/script.js') }}"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>Is this the correct syntax? Are they located in the correct spots in my templates (I'm sure there's flexibility here)? And are there any other parameters I should pass in (e.g. type="text/css", type="text/javascript", media="screen")?</p>
  
  <p>Everything is working as expected but I want to follow recommended practice if there is any.</p>