CSS not linked to html
P粉488464731
P粉488464731 2024-04-02 08:45:27
0
1
342

I'm trying to change the background color of a web page. To do this, I link

style.css externally to index.html using href:
<!DOCTYPE html>
<html>
    <head>
        <!-- <meta charset="utf-8"> -->
        <!-- <link rel="stylesheet" href="css/style.css" media=”screen”/> -->
    </head>
    <body>
        <!-- body of...body -->
    </body>
</html>

My CSS is simple:

body
{
    background-color: aqua;
}

My project structure is:

NOTE index.html resides alone in the project folder (freebookz), while style.css resides in a dedicated folder (css). This is why

href="css/style.css"

The problem is that CSS has no links. I'm using Vscode and I've also tried copying the project in Notepad but the CSS still doesn't work. I tried using SHIFT CTRL R to force a page reload with no success.

Can someone point out my mistake? I have exhausted all my efforts to make this work.

P粉488464731
P粉488464731

reply all(1)
P粉893457026

Check your media attributes in your markup, you are using the Unicode character """ (U 201D) instead of double quotes.

This is my code, paste it into your code and it will work.

Let me know if it works?

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template