elibraryportal Logo

CSS Text Example

CSS provides several properties for formatting text.


Text Color

The color property change the colour of your text.

  • Color name :- "red"
  • HEX value :- "#ff0000"
  • RGB value :- "rgb(255,0,0)"

Example:-

Test it Now

Color Text and Background Color

We are define both background-color property and the color property:

Example:-

Test it Now

CSS Text Alignment

The text-align property is used to set the horizontal alignment of a text that is.

Example:-

Test it Now

CSS Text Decoration

To usetext-decoration property set or remove decorations from text.

Example:-

Test it Now

CSS Text Transformation

To Use thetext-transform for uppercase and lowercase letters in a text.

Example:-

Test it Now
Next TopicCSS Fonts