I created 2 files in notepad 'index.html' and 'style1.css' these types of file can be written in a '.txt' file and saved with the '.html' or'.css' extension.
I quickly realised that CSS is mainly used for formatting content in html files. This is very useful to use to format the whole style of the site from a separate external file. This means that several pages can be formatted from a single file, helping to retain a certain style throughout the site.
Here is the html for the page i want to affect with CSS.

Here is how the page appears in a browser.
Using CSS, the design styles of the site can be edited within a separate document, this makes it easy for designers to edit the design of the site separately from the content. (A whole site could be redesigned by only editing the CSS file.)


No comments:
Post a Comment