Linking CSS to HTML


#1

After learning how to style a HTML page using CSS I decided to write my own code. I wrote two files, one saved as a html file and the other as a css file. I saved the files in the same folder on the desktop. Though I had properly linked the CSS file using the element, no styling seemed applied on the webpage when I run the html file. What could be the problem? At what point is the styling that has been done on the page become apparent?
This is the actual line that has the linkin my code:


#2

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


#3

Yeah, I have put that., but even after doing that the page that is loading on my browser is still a plain HTML


#4

Mind linking the html and css code (as screenshots), and the website itself?


#5

is the name of your css file style.css? If not, you need to change the value of the href attribute to the right filename


#6

Thanks guys, my code is running as intended. The problem was that I had put the href=“styles/css” rather than href=“style/css”. Thank you people! I think that must be what debugging is. One silly typo and my code could not work


#7

those are the same? i would style.css, i think you intended to type that

yep, this is debugging, one small thing can throw everything off


#8

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.