Home HTML Lists Adding Images Style Tips Add Favicon Add Videos Add Background CSD Principles CSD Problem Solving Process

Visit http://www.csszengarden.com/ for some ideas on how to use colors and styles on your website.

Styling Text with CSS

Adding style using class

In css, add the following code:
.apples { color: red; }

In HTML, add the class “apples” to show text in red:
apples

Adding style using id

In css, add the following code for the id “summer”
#summer { color: yellow; }

In HTML, add the id “summer” to style the word to be yellow.

Summer

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.