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

stylesheet does not apply to html files

I’ve run my css through a validator (nothing is wrong)

My header looks as following (with irrelevant pieces removed)

<head>
     <link href="https://fonts.googleapis.com/css2?family=Lato:wght@400&display=swap" rel="Stylesheet">
     <title>Projekter</title>
     <link rel="Stylesheet" href="Stylesheet.css">
</head>

and my stylesheet is named Stylesheet.css in the following folder hierachy

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

What could possibly be wrong here?
What could possibly be wrong here?

Please do tell me if I’m missing giving some relevant information.

>Solution :

The stylesheet call path is invalid.

The index.html file is in the HTML folder and Stylesheet.css is outside the HTML folder.

Please correct it as follows.

     <link rel="stylesheet" href="../Stylesheet.css">

Chrome DevTools makes it easier to determine the cause.

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