Definition

The color property can define the color of text,images and also links.

Its typically used to change the color of the text within a webpage more often than changing the color of an image.

When coding CSS, you will often need to define a color for an HTML element. For example, you might need to create a red font, a yellow background, or a blue border.

In CSS, you define colors either the hexadecimal color codes or the actual color name. A benefit of using hexadecimal color codes is that you have many more options than just supplying a color name.

Color codes can also be referred to as hexadecimal colors, hex colors codes, color values and many other terms. Hexadecimal color values is probably the most accurate term as they are made up of hexadecimal numbers.

Below is a chart covering 216 hexidecimal color values.

Example

css

.color_example{ color : red } will turn the text any element with the class .color_example to red

html

< p class="color_example">This text will be red</p>

css

a:link {color: blue} this will turn all unvisited links on a webpage blue


Page Information

  • 10 months ago [history]
  • View page source
  • You're not logged in
  • No tags yet learn more

Wiki Information

Recent PBwiki Blog Posts