CSS 2 Example 17

>> English << | česky | Português ZVON > Tutorials > CSS2 tutorial
Intro / Search / ZVON
>> Example 17 << | Prev | Next | Index | Contents

In previous examples colors were used to distinguish elements. Property color describes the foreground color of the element's text content, background-color the color of containing box. The color can be described in several ways one of them is through usage of 16 keyword color names defined by HTML 4.0: aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, white, and yellow. (1).

XML SourceCSS stylesheetExample link
(1)
<AAA>
<aqua>aqua</aqua>
<black>black</black>
<blue>blue</blue>
<fuchsia>fuchsia</fuchsia>
<gray>gray</gray>
<green>green</green>
<lime>lime</lime>
<maroon>maroon</maroon>
<navy>navy</navy>
<olive>olive</olive>
<purple>purple</purple>
<red>red</red>
<silver>silver</silver>
<teal>teal</teal>
<white>white</white>
<yellow>yellow</yellow>
</AAA>

AAA {background-color:#AAAAAA}
aqua {color:aqua}
black {color:black}
blue {color:blue}
fuchsia {color:fuchsia}
gray {color:gray}
green {color:green}
lime {color:lime}
maroon {color:maroon}
navy {color:navy}
olive {color:olive}
purple {color:purple}
red {color:red}
silver {color:silver}
teal {color:teal}
white {color:white}
yellow {color:yellow}
View output

AltStyle によって変換されたページ (->オリジナル) /