CSS style sheet not linking to my HTML

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • LouDog
    New Member
    • May 2013
    • 1

    CSS style sheet not linking to my HTML

    I am new to CSS and HTML. I am studying an online tutorial that provides a sample HTML and CSS style sheet. When I save these two files to my computer in the proper format they do work. However, when I go into the CSS style sheet and change the color from #FF0000 to "blue" I get no results in the HTML. Any help is appreciated. Below are the two sets of HTML and CSS code
    Code:
    HTML:
    <html> <head> <title>My document</title> <link rel="stylesheet" type="text/css" href="http://bytes.com/style.css" /> </head> <body> <h1>My first stylesheet</h1> </body> </html>
    
    CSS:
    body {
    	  background-color: #FF0000;
    	}
    Last edited by Rabbit; May 19 '13, 08:02 PM. Reason: Please use code tags when posting code.
  • vijay6
    New Member
    • Mar 2010
    • 158

    #2
    Hey LouDog, replace href attribute value by the location of your 'style.css' file in line number 2 in your code. For example href="style.css " (if both the files are in same folder).

    Comment

    • shadowstrike
      New Member
      • Aug 2013
      • 21

      #3
      Hey make sure the path is correct.....sup pose if you have maintained different folders for your css,js and images then make sure the path is correct.....

      For instance,if you have a folder in your desktop and within that folder you have various subfolders like css,images or js,then add these code to your html page:-
      <link rel="stylesheet " type="text/css" href="css/your-css.css">

      Hope this helps :)

      Comment

      Working...