Anyone who spends any time at all browsing the Internet will by now have heard something about this cool new web designing tool called 'Cascading Style Sheets'. This tutorial is aimed to give a basic overview of Style Sheets and how to use them in your web pages. There are many advantages to using Style Sheets, one of the most important is the ability to produce a consistent style throughout your web pages and to be able to change them simultaneously by editing one piece of text. There are several ways to incorporate this new code in your web pages:
In the above cases the code: h3 { font-family: comic sans ms; color: blue; font-style: italic } tells the browser how to display every <h3> heading, i.e. in comic sans ms font, italic and blue, and: em { color: red; font-size: 14pt } ensures that all text tagged as italic, <em>, is red and 14pt in size. Hence you can see that just by changing the colour of the h3 code to color: yellow; you would change every <h3> heading in your page to yellow. Details of the attributes will be covered in the following sections. |