Cascading Style Sheets Tutorial

CSS primary entry: text attributes

  CSS primary entry: text attributes - Welcome to the CSS software tutorial area天极 


  Text attribute 

  Text attribute is you can set the text color, size, font, size, and so on. 

  Source code 

<STYLE>
  SPAN.c1 (color: red; position: relative; font-size: 12px; font-family: Arial; font-weight: 700) 
  SPAN.c2 (color: blue) 
  SPAN.c3 (color: green) 
  SPAN.c4 (color: pink) 
  </ STYLE> 

  <SPAN CLASS=c1> A </ SPAN> 
  <SPAN CLASS=c2> B </ SPAN> 
  <SPAN CLASS=c3> C </ SPAN> 
  <SPAN CLASS=c4> D </ SPAN> 

  A Show results 
B
C
D

  Color text) (COLOR 

  Grammar: (COLOR: (color)) 

  Source code <STYLE> 
  SPAN.test (color: red) 
  </ STYLE> 

  <SPAN CLASS=test> ABC D </ SPAN> ABCD Show results 

  [Categories) (FONT 

  Set font style, and variations in case, the thickness, size, text ranks high, fonts 

  Grammar: (FONT: (font-style) ︱ (font-variant) ︱ (font-weight) ︱ (font-size) ︱ (font-family) ︱ / (line-height)) 

  Source code <STYLE> 
  SPAN.test (FONT: ITALIC BOLD 12pt/18pt) 
  </ STYLE> 

  <SPAN CLASS=test> ABC D </ SPAN> ABCD Show results 

  Download font () @ FONT-FACE 

  Syntax: @ FONT-FACE (FONT-FAMILY: (font-family); SRC: URL (url)) 

  Source code <STYLE> 
  FONT-FACE @ (FONT-FAMILY: (undetermined); SRC: URL (URL)) 
  </ STYLE> The results show no results 

  [H) (FONT-FAMILY 

  Grammar: (FONT-FAMILY: (font-name) ︱ (generic-family)) 

  Source code <STYLE> 
  SPAN.test (FONT-FAMILY: "Arial Black") 
  </ STYLE> 

  <SPAN CLASS=test> ABC D </ SPAN> ABCD Show results 


  Text Size) (FONT-SIZE 

  Font size settings (based unit attributes: point pt, in inches, centimeters cm, pixel px, Percentage) 

  Grammar: (FONT-SIZE: LARGE MEDIUM ︱ ︱ SMALLER ︱ (length) ︱ (percentage)) 

  Source code <STYLE> 
  SPAN.test1 (FONT-SIZE: LARGE) 
  SPAN.test2 (FONT-SIZE: 10pt) 
  SPAN.test3 (FONT-SIZE: 50%) 
  </ STYLE> 

  <SPAN CLASS=test> ABC D </ SPAN> 
  <SPAN CLASS=test1> EFG H </ SPAN> 
  <SPAN CLASS=test2> IJK L </ SPAN> ABCD Show results 
EFGH
IJKL

  Text Style) (FONT-STYLE 

  Set font style (divided into four groups: normal, italic) 

  Grammar: (FONT-STYLE: NORMAL ︱ ITALIC) 

  Source code <STYLE> 
  SPAN.test1 (FONT-STYLE: ITALIC) 
  </ STYLE> 

  <SPAN CLASS=test> ABC D </ SPAN> ABCD Show results 

  Change text) (FONT-VARIANT 

  Change font settings (divided into four groups: normal, small fonts) 

  Grammar: (FONT-VARIANT: NORMAL ︱ SMALL-CAPS) 

  Source code <STYLE> 
  SPAN.test1 (FONT-VARIANT: SMALL-CAPS) 
  </ STYLE> 

  <SPAN CLASS=test> ABC D </ SPAN> ABCD Show results 

  Text size) (FONT-WEIGHT 

  Font size settings (divided into four groups: normal, crude fonts) 

  Grammar: (FONT-WEIGHT: NORMAL ︱ BOLD) 

  Source code <STYLE> 
  SPAN.test1 (FONT-WEIGHT: BOLD) 
  </ STYLE> 

  <SPAN CLASS=test> ABC D </ SPAN> ABCD Show results 

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • DotNetKicks
  • DZone

Tags: css attributes, Text Alignment, Text Decoration, Text Indentation, Text Transformation, xhtml attributes

Releated Posts

  • Colorful words (Multi Colored Text) attributes the production Clip
  • CSS syntax Manual (2) Text Attributes
  • Several basic CSS text filter effects
  • Css achieve with the text automatically hide
  • CSS design with high user experience web text size

This entry was posted on Thursday, February 7th, 2008 at 12:00 am and is filed under CSS Properties. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

« CSS cascading style sheet with the completion of the flashing effect can be controlled
The CSS »

Leave a Reply

  • Categories

    • CSS Properties (491)
    • CSS Tutorial (1154)
    • CSS Tutorial By Examples (1201)
    • Css+Div Web Design (3274)
    • Xhtml and Web Design (1797)
  • Archives

    • February 2008
    • January 2008
    • December 2007
    • November 2007
    • October 2007
    • September 2007
    • August 2007
    • July 2007
    • June 2007
    • May 2007
    • April 2007
    • March 2007
    • February 2007
    • January 2007
  • Pages

    • About us

Cascading Style Sheets Tutorial