Linking CSS doesn't work

enter image description here

So my CSS doesn't work for some reason. I have searched online and cannot find a problem with it but the CSS is not connecting to the HTML. Here is my code:

<!DOCTYPE html>
<html> <head> <link rel="stylesheet" type="text/css" href="yee.css">. </head> <body> <audio src="C:\Users\Jake Coffey\Downloads\yee.wav" preload="auto"></audio> <center><img src="" onclick="document.getElementById('yee').play();" /></center> </body>
</html>
2

4 Answers

This maybe... never mind... But I got this problem.

Try add / to your link tag end

<link rel="stylesheet" type="text/css" href="yee.css"/>
2

It's hard to answer because we can't see your file structure. This href you are using href="css/yee.css" is assuming that your files look like this.

/ project-folder index.html / css yee.css

The href tells your HTML file where to look for the CSS file. If your CSS file is in the same folder as your HTML file try changing the href to href="yee.css"

Hope that helps!

EDIT:

1

Make sure that you type the href correctly :

href="yourfolder/yourcssstylename.css"

Try to make the link the same level as index.html directed to the css folder.

<link rel="stylesheet" href="yourfolder/css/styles.css">

or only ...href="css/styles.css"> and make sure delete / before css file name.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like