0

I am new in CSS so am practice it. I wrote a css file and a html file in order to see the effect of external CSS file on my html page but no change observed.

Here my codes

style.css

p {
  Color:red;    
} 

index.html

  <!DOCTYPE html>
    <html> 
      <head>
        <meta charset ="UTF-8">
        <title>Css Syntax </title>
        <link rel ="stylesheet" href="style.css" type="text/CSS">
      </head>
      <body> 
        <p>this is nirmal paragtne</p>
      </body>
    </html>
8
  • 4
    I can't reproduce your problem using that code. The most likely explanation is that you got the URL wrong. Commented Apr 26, 2017 at 8:46
  • I tested it here and came to the same conclusion as @Quentin. Your href is probably not linking to the correct path. Commented Apr 26, 2017 at 8:47
  • Does the index.html and style.css in the same directory? Commented Apr 26, 2017 at 8:47
  • @Tesseract yes in one directory Commented Apr 26, 2017 at 8:48
  • 1
    Let me rephrase, both file are in the same level within the directory? Commented Apr 26, 2017 at 8:52

2 Answers 2

1

Your code seems to be working fine for me.. If it's in the same directory maybe you could try checking your filenames if there's no typing error?

Sign up to request clarification or add additional context in comments.

Comments

0

I checked my code in firefox browser and it works fine

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.