Color part 2
The color Property
Another way of defining colors is using hexadecimal values and RGB.
Hexadecimal form is a pound sign (#) followed by at most, 6 hex values (0-F).
RGB defines the individual values for Red, Green, and Blue.
In the example below, we use hexadecimal value to set the heading color to blue, and RGB form to make the paragraph red.
The HTML:<h1>This is a heading</h1>
<p class="example">This is a paragraph</p>
The CSS:
Result:
Tap Try It Yourself to play around with the code!
Comments
Post a Comment