My problem is i can’t link the css file to the html there is an index.html file in the templates folder of my repl and i want to link a style.css file in the same folder to the html what should i enter in the src attributes
https://msite-django.sharonsharo98.repl.co
```
code snippet
```
You haven’t gotten that far yet. The HTML page doesn’t work yet. Here’s what happens when I run this Repl.
src
? I know this is confusing but <link>
tags for css only use href
, not src
To link a CSS file, you need to create a <link>
tag like so:
<link rel='stylesheet' href="/PATH/TO/CSS_FILE">
(replace the “PATH/TO/CSS_FILE” to your CSS file path)
It is best to put the <link>
tag above everything else so that it loads first.
3 Likes
And you can also use a URL for the CSS (so as to pull it from the web). Replit has several good CSS themes. Personally, I use a modified version of Bookie0’s bounceCSS
.
1 Like