Collected by Elizabeth Janson Home Page |
|
Named colours that are defined are:
Aqua, Black, Blue, Fuchsia, Gray, Green, Lime, Maroon, Navy, Olive, Purple, Red, Silver, Teal, White, Yellow
Other 'color' names are not supported by the W3C standards.![]() The browser-safe HEX colour codes have pairs of 'digits' in the order red, green, blue. |
Foreground ColourThe 'color' property changes the foreground colour of a section, which is usually text. So, to change the 'color' of some text: This text is plain, <SPAN style="color:#ff6600">and this makes me think of oranges....</SPAN>, fun isn't it?
Giving - SPAN is explained in section 2, page 3, SPAN. Horizontal LinesTry with a <HR style="color:blue"> Now try a onmouseover line <HR style="color:red" onmouseover="this.style.color='green'" onmouseout="this.style.color='gold'"> IE5 also allows <hr color=blue> Background ColourThe 'background-color' property will let you add a colour behind most items. You can add it to text like this: <SPAN style="background-color:yellow">My background is yellow!</SPAN> Giving - My background is yellow! Also, you can use this in tables:
<TABLE style="background-color:#ff9900" border="1"> Getting -
And how about a form box? Of course!
<FORM>
<HEAD>
<STYLE TYPE="text/css"> <P><DIV
ID="col1"> <P><DIV
ID="col2">
Then, for one paragraph (gray background) you
would use the following in the body of your document:
Your text here ...
For the other paragraph (green background), use
this in the body:
Your text here ...
|
CSS begins here |
|
This page is part of Elizabeth Janson's web site
http://www.geocities.com/elizatk/index.html
Tetbury residents in the Eighteenth Century my Australian Family History and Barrie, our Family Poet. |