1. Computing
Advanced CSS
 

Part 3: Text Properties

There are many CSS properties to use in your style sheets. Here are the text properties and how to use them.

Text Properties
word-spacing - defines the amount of space between the words.

  • word-spacing : normal;
  • word-spacing : +15mm;
Specify the length as you would the height of your font with ems, pixels, picas, points, inches, centimeters, or milimeters. (Note: many browsers don't currently support this style tag.)

letter-spacing - defines the amount of space between each letter.

  • letter-spacing : normal;
  • letter-spacing : +1mm;
  • letter-spacing : -1px;
Specify the length as you would the height of your font with ems, pixels, picas, points, inches, centimeters, or milimeters. (Note: many browsers don't currently support this style tag.)

text-decoration - defines the decoration of the text.

  • text-decoration : none; (used on <a> tags to remove the underline.)
  • text-decoration : overline;
  • text-decoration : underline;
  • text-decoration : line-through;
  • text-decoration : blink;

text-transformation - defines the case of the text.

  • text-transform : capitalize;
  • text-transform : uppercase;
  • text-transform : lowercase;
  • text-transform : none;

text-align - defines how the text will be aligned on the page.

  • text-align : left;
  • text-align : right;
  • text-align : center;
  • text-align : justify;

text-indent defines how much the first line of the text should be indented.

  • text-indent : 15mm;
  • text-indent : 5%;
Specify the length as you would the height of your font with ems, pixels, picas, points, inches, centimeters, or milimeters.

line-height defines the amount of space between lines of text.

  • line-height : 1.5; (the number of lines)
  • line-height : 5mm;
  • line-height : 10%;

There are many more styles, but hopefully, these will get you started using style sheets.

First page > Taking Styles Further > Page 1, 2, 3

 ~ Jennifer Kyrnin
 

©2014 About.com. All rights reserved.