**CSS Setup and Selectors**

I want to practice what I had learnt, so I created my own HTML and CSS files on my computer. However, the CSS style markup are not seen. I have the files in the same folder but they are not linking. code below is my html file.

<!DOCTYPE html>
<title>Continuation  learning to Code Webpages with CSS Markups
<link href="style.css" type="text/css" rel="stylesheet"/>

Do you have a LINK element in the HEAD with an href set to styles.css?

Yes, I do. I have even tried renaming the .css file a different name

So your index.html and styles.css file are in the same directory? Can you show us your link tag, please?

<link href=“style.css” type=“text/css” rel=“stylesheet”/>

Be sure to use standard quotes. The above look like smart quotes (or whatever they’re called).

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

I am not sure I understand, I’m using Notepad++ to write the code.

The smart quotes I’m referring to look like word processor characters, not the standard vertical ones. It might be they got changed when you posted the code. Use four spaces to post a single line of code that preserves formatting.

That being the case, I see nothing wrong with your tag. Just so long as the name matches the file, and the file is in the same directory as index.html.

Add a line to your CSS just to see if it takes…

body { background-color: green; }

save and refresh the page. Does the background change to green? If so, your file is linked and loaded as we would expect.

No it did not change

I got the file to work be copying the first few line from an html I had written earlier that worked. I cannot identify the difference.

thank you for trying to help.

1 Like

Just pointing out that the link element it inside the title element. That won’t work. The link element needs to be below the title element - in the head element - not the title.