|
Free
computer Tutorials
|
![]() |
HOME
|
Stay at Home and Learn | ||||
|
Cascading Style Sheets Adding Styles to your HTML |
|||||
|
Change the Text Background Colur
We'll now use the HTML Editor to add a style that changes the background colour behind some text. This will demonstrate the how the Class Selector works. With your HTML Editor, adding a Class Selector Style is a two step process:
Step One - Setting up the Class Selector
<STYLE> .BackTextColour Note the name of the Class Selector - BackTextColour. This will be used in Step Two.
Step Two - Applying the Class SelectorTo apply the Class selector, do this:
<SPAN Class = BackTextColour> Background Colour</SPAN>
It should look like the text below:
Text With The Background Colour Changed ExerciseOn the Add > Style menu of your Editor, there is an item called Change Font Style. This is another Class Selector, and works in the same way as the one above. Use the two step process to apply the Font Style to your web page.
<-- Back One Page Move on to the Next Part --> <--Back to the Style Sheets Contents Page View all our Home Study Computer Courses
|