Introduction to CSS (Cascading Style Sheets)

In addition to describing HTML, this section also provides an introduction to CSS. While HTML allows great control over the structure and layout of your web pages, using it to control the presentation and formatting of your pages can be difficult. For example, while it's easy to use HTML to structure a block of text into paragraphs, it's not as easy to use it to control the formatting and presentation of those paragraphs if you want to display them in different fonts, font sizes, text colors etc.

This problem can be overcome by using CSS (Cascading Style Sheets). CSS allows you to write and structure your pages in HTML, and then apply formatting rules in CSS which specify how the page is presented in a browser. This separation of structure (HTML) and formatting (CSS) allows you to specify the presentation rules for your site once, which means that you can change the look and feel of your entire site in one go, without having to update each separate HTML file.

As with HTML, you don't need any special tools to write CSS - any basic text editor (Notepad, Wordpad etc.) will do. You can simply write your CSS as plain text, and save it with the file extension .css.

Again as with HTML, CSS is well-structured and intuitive, so you can pick up the basics quickly and easily. It's also very easy to experiment, since all you need is a text editor and a browser to view the results. So once you have a grasp of the basics, the best way to learn more is through trial and error.

<-- Previous Page

Elements, Tags and Attributes

Next Page -->

CSS Structure