What is Css?
Cascading Style sheets

In the early days of formatting html it was done in the tags. There was not as many tags then so this was not too much of a problem. But as browsers evolved and started to add more html tags and attributes to the original specification, it started to get hard to keep the html content separated from the presentation layer.


To get around this the World Wide Web Consortium created styles, these are supported by all major browsers. Style sheets set out the way the Html page is to be displayed. Css can be placed into the html file or as a separate file that is linked to from the Html document. It is good practice to use external css files as apposed to on page styling. If the styling was on page it would need to be added to every page in the site, on a large site this would be almost impossible to keep up with, every change to the style would need doing multiple times. By keeping the styling external you only ever need to have the one.

Css is a web designers dream come true, it gives them the tools to control the style over multiple pages in one go.

That gives you a basic idea of what Css is, now let’s try some out. In order to do this you will have to have completed the Hello World page from the (what is Html article) as we will be adding style to it now.


Writing a Css file.

We will firstly place the link in the Html file to our new Css file we are about to do. Add the following text to your file, it needs to be placed between the head tags.



Now lets write the css file. Open notepad and type in the following code.


Save the file as first.css in the same location as your Hello World file. Now open the Hello World Html file, and see your handy work.