![]() | MSc-IT Study Material June 2010 Edition Computer Science Department, University of Cape Town |
Notice in the given example how each rule is separated by a semi-colon (;). If your code is not working, ensure that the semi-colons are present.
There are three ways to apply the above CSS rules to an HTML file:
add them in-line to the HTML file itself, attached directly to the relevant HTML tag.
embed the rules into the HTML file
link the CSS file to the HTML file
The next section will look at each of these methods.
Add a style sheet property to the given example to change the text color to dark red. You can find the solution at the end of the chapter.