Today is


CSS - Cascading Style Sheets (Page 3)

Previous Next

Text Properties

Using text property we can set the appearance of text in an element. The mostly used attributes are color, text-align, text-decoration, text indent, letter and word spacing.

Property use Value
color used to set the text color color
direction sets the text direction . useful for languages(eg. urdu) which are written from right to left. Default value is left to write
  • ltr     (left to right)
  • rtl (right to left)
  • letter-spacing sets the spaces between letters (the value can be specified in in (inches), cm(centimeters), mm(millimeters), pt(points), picas(pc), em(ems), ex (x-height), px (pixels))
  • normal
  • spacing 
  • text-align aligns the text in an element
  • left
  • right
  • center
  • justify
  • text-decoration adds styles like underline etc to the text
  • none
  • underline
  •  
  • overline
  •  
  • line-through
  •  
  • blink
  • text-indent indents the first line of the element. Useful for paragraphs which take the newspaper type layout. It can take length in pixels or in percentage.
  • length
  • %
  •  
    text-shadow used to display shadow for the text
  • none
  • color
  •  
  • length
  • text-transform controls the letters in an element
  • none
  • capitalize
  •  
  • uppercase
  •  
  • lowercase
  • white-space sets how white space insdie an element is handled
  • normal
  • pre
  • nowrap 
  • word-spacing increases or decreased the space between words
  • normal
  • length
  •  

     

     

    Next


    © 2005. All rights reserved.