Newbie Linking Problem CSS and HTML in Atom


Hey all,
Just getting into coding and trying to link a css file to an html file through atom. The css stylings do not appear when I open the HTML file in google chrome. Here’s a snapshot of the code… any help would be GREATLY appreciated. DO i need to download css? I just saved the other file as .css and assumed it would fly. Thanks again!




I did some research and can now successfully link the files by adding “…” right after the{ href="…}… can anyone explain how and why this works? thanks.


If a path starts with /, the browser will read that as an instruction to look in the root directory. If you were working with a server, the instruction would be to look at the top level of the server and it would probably work, but since (I presume) you’re just opening the file in your browser, it’s looking at the root level of your system’s file tree, and not finding any CSS files. .. is shorthand for “the folder above this one”.

There’s another issue I can see from your screenshots: you have an extra " on line 7 of your HTML file, and it’s throwing off the highlighting of the rest of the file as well as messing up that particular <link> tag.


You’re awesome! I did find a few sloppy errors and was able to correct the
problem… a lot to do about properly closing arguements. Thanks SO MUCH for
the support! You are appreciated.