If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!
When you decide to use CSS, it is best to use and keep your CSS file separate from HTML. Doing that will give you the chance to see the difference between the content and design (CSS). External CSS contains just CSS code and is being saved in file extension. After that the CSS file is being referenced into your HTML just using <link> and not <style>. The following tutorial will explain everything for you.
Creation of the File
Now we are going to make the external CSS file. First open notepad.exe, and just type the following CSS code :
CSS code :
Save the file as CSS.file. Not .txt file, by default. Name it ‘work.css’. Now we will do the HTML file and will in with the code.
HTML code :
Make the saving as “index.html” in the same place where you have the CSS file. Then open the HTML file in the browser.
Why External CSS?
- You can have separate your design and content.
- It is much better if you have it separate file.
- You can make major changes to your web pages in few short changes of a CSS file.


