Adding CSS/JS files to Html file not working

Sorry this question might look a little bit ugly but I am new to web dev.

I try to add some css/js files into my html and here is the structure.
May I understand where I get wrong for the path?
Thanks

Here is the stucture layout.
I have tried href="../assets/css/ud-styles.css" but still not working

>Solution :

In jinja2 templates that flask uses you need a "static" folder for you styles.
So you need to create a folder named "static" beside your template folder, inside this "static" folder you create a folder named "style" move the css folder inside this new "style" folder which is inside "static" and you link it using this:

<link rel= "stylesheet" type= "text/css" href= "{{ url_for('static',filename='style/css/ud-styles.css.css') }}">

Leave a Reply