Web 110
Final Project

External CSS Files

Another way to use CSS is by having a seperate file. The typical naming convention is nameing the file "styles.css". Now that we have the name for the file, we can go ahead and link the file. Like embedding CSS in HTML, we are going to use the head to link our external file to the main HTML page.
In the head, we are going to type:
link rel="stylesheet" href="styles.css" of course with the "<>" around the link. Now in your new CSS file, we are able to type whatever and it will still transfer over to the HTML file. While we still do need to link it to every HTML file we make, it becomes a lot easier than other methods.

The Good Side:

  • CSS gets its own file
  • Less Cluttered on the HTML

  • The Bad Side:

  • Not necessary for small amounts of code

  • CSS All in One Place for Easy Access ---->

    picture of CSS file