HTML5, CSS3, and JavaScript Fourth Edition

(Ben Green) #1

Chapter 7


Colors


Contents


7.1 How To Specify Colors............... 72
7.2 The RGB Additive Model............. 73
7.3 Layers and Transparency.............. 73
7.4 The Web Color Wheel............... 74
7.5 Gradients....................... 76
7.6 Tools.......................... 78
7.7 For Further Study.................. 78
7.8 The 140 Named Colors............... 79

Black and white: boring. Color: exciting. Color can attract our attention.
It can affect us emotionally. It can be memorable.


CSS allows us to apply color in several ways. We can color the lettering of
our webpage. We can color the background of all or part of our webpage. We
can color the borders of things. We can use gradients that blend smoothly
from one color to another.


Exam Question 111(p.343):What CSS attribute: sets the color of your
lettering?
Required Answer:color:


Exam Question 112(p.343):What CSS attribute: sets the color behind
your lettering?
Required Answer:background-color:


71

Free download pdf