CSS Font
CSS font properties enable you to change the look of your text. For example, you can assign a font family, apply bold or italic formatting, change the size and more.
CSS Font Family
The font-family property allows you to set the font family.
| Code | Result |
|---|---|
|
|
This text is rendered in either georgia, garamond, or the default serif font (depending on which font the user's system has). |
CSS Font Size
Enables you to set the size of the text. For info on the possible values, see the font-size page.
| Code | Result |
|---|---|
|
|
This text is using a font size of 20 pixels. |
CSS Font Size Adjust
This property enables you to adjust the x-height to make fonts more legible. For more info, see the font-size-adjust page.
| Code | Result |
|---|---|
|
|
This text is using a font-size-adjust value. |
CSS Font Stretch
This property relies on the user's computer to have an expanded or condensed version of the font being used. For all possible values, see the font-stretch page.
| Code | Result |
|---|---|
|
|
If your computer has an expanded version of the font being used, this text will be stretched. |
CSS Font Style
The font-style property is used for specifying italic text.
| Code | Result |
|---|---|
|
|
This text is in italics. |
CSS Font Variant
Enables you to set your text to use small caps. See font-variant.
| Code | Result |
|---|---|
|
|
This Text Is Using Small Caps. |
CSS Font Weight
Enables you to set your text to bold. For more info, see font-weight.
| Code | Result |
|---|---|
|
|
This text is bold. |
CSS Font Property
The font property is a shorthand property that enables you to set all font properties in one go.
| Code | Result |
|---|---|
|
|
The styles for this text has been specified with the 'font' shorthand property. |

