Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

CSS file not linking to HTML file (same folder)

I have this:

<head>
<title>1</title>
<link rel=“stylesheet” type="text/css" href=“style1.css”>
<script src="script.js"></script>
</head>

I’ve tried many things. removing the type, adding a / at the end, adding a ./ before style1.css, etc. Both the html file and the css file are in the same folder. The html works. here is the css:

p {
    color: red;
}

h1 {
    color:blue;
}

where did I go wrong ?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

check your quotations around your attribute value, just replace your link with below, and hopefully, this should work:

<link rel="stylesheet" type="text/css" href="./style1.css" />
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading