Question: I need to link a CSS sheet, but I cannot get it to work. Can someone help?
Repl link: https://replit.com/@Esb678/Personal-Website
Within your header element, don’t put <style src="style.css"></style>
, use <href="style.css" rel="stylesheet" type="text/css"/>
, it may be counterintuitive but it’s just how HTML works.
Where do I put it? When I do it in the head tag, it does nothing.
In the <head>
element
I did that, and it did not work.
Are you sure it didnt work? Open it in a new tab, press “CTRL+ALT+I”, switch the the “Network” tab then refresh, it will have all of the resources that loaded
You can copy the CSS and paste it all in <style>
tags and see if the CSS is the problem here. If you want to actually link a stylesheet, you do this:
<link rel="stylesheet" href="https://link.com/file.css"`>
or
<link rel="stylesheet" href="/path/to/file.css"`>
in your HTML file. Put it in tags but it generally shouldn’t matter where you put it IIRC.
Nope. Still didn’t work.
Are you sure, can you send me a screenshot of the network tab?
@Esb678 I forked your project and fixed it. You forgot the “link” part. To test, I made the background blue, and it works.
https://replit.com/@doxr/let-us-see
You can check the head part.