CSS3.com


CSS FONT

With CSS you are given great control over the way your text is displayed. You can change the size, color, style, and more. You probably already knew how to make text bold or underlined, but did you know you could resize the size of your font using percentages? Let us begin the lesson with an easy and important font attribute, color!

Example
p { font: 12px arial }      p { font: italic small-caps bold 12px arial }  p { font: oblique small-caps 900 12px/14px arial } p { font: menu }
Possible Values
font-style, font-variant, font-weight, font-size/line-height, font-family: Sets the properties for a font. The line-height value sets the space between lines. The value can be a number, a %, or a font size.
caption: Defines the font that are used by captioned controls (like buttons, drop-downs, etc.)
icon: Defines the fonts that are used by icon labels
menu: Defines the fonts that are used by dropdown menus
message-box: Defines the fonts that are used by dialog boxes
status-bar: Defines the fonts that are used by window status bars


Go Back