Wednesday, 19 March 2014

CSS FONT PROPERTIES



CSS Font

Font Family

·         The font family of a text is set with the font-family property.

Syntax:

P {font-family:"Times New Roman", Times, serif ;}

 

Font Style

·         The font-style property is mostly used to specify italic text.
This property has three values:
  • normal - The text is shown normally
  • italic - The text is shown in italics
  • oblique - The text is "leaning" (oblique is very similar to italic, but less supported)

Syntax:

p.normal {font-style: normal ;}
p.italic {font-style: italic ;}
p.oblique {font-style: oblique;}

 

Font Size

·         The font-size property sets the size of the text.

Syntax:

h1 {font-size: 40px ;}
h2 {font-size: 30px ;}
p {font-size: 14px ;}

No comments: