0

HTML file

<!DOCTYPE html>

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

    <body>

       <p>Red</p>

    </body>

    </html>

CSS File

p {
   color: red;
}

The two files are in the same directory and the word 'Red' will not turn red. For some reason my CSS file isn't linking to the html file.

jpr1994
  • 1
  • 1
  • 1
    You must use straight quotes (`'…'` or `"…"`), not curly ones (`‘…’` nor `“…”`). – Oriol Jul 04 '15 at 01:27
  • The ANSWER might be duplicate but the question isn't. If you don't know what the problem is you will never find that other answer. – Lance Jul 04 '15 at 01:33
  • See more about relative css path here [http://stackoverflow.com/questions/17621324/relative-path-to-css-file](http://stackoverflow.com/questions/17621324/relative-path-to-css-file) – hienvd Jul 04 '15 at 01:39
  • 1
    @Lance True, if someone does not know the problem he won't be able to find the other answer. Therefore, I linked it for him. – Oriol Jul 04 '15 at 01:48

2 Answers2

0

From your browser inspect your code by press F12 or right click--> inspect

And make sure your CSS path and properties of style listed..

vijay kani
  • 140
  • 8
0

Yours:

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

Correct:

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

" is right.

“ is wrong.