CSS Font Property Tutorials

CSS font properties are used to define the font size, font family, boldness of a text and the style of a text.

font-size Property

The font-size property is used to control the size of fonts.

The CSS rule below is an example that shows you how to specify the size of a font.

p { font-size:24px; }

font-family Property

The font-family property is used to specify fonts.

The CSS rule below is an example that shows you how to specify the font of a text.

p { font-family:arial, "trebuchet ms", sans-serif; }

font-weight Property

The font-weight property is used to specify the boldness of a font.

The CSS rule below is an example that shows you how to specify the boldness of a text.

p { font-weight:bold; }

font-style Property

The font-style property is used to specify wether a font should be normal, italic or oblique.

The CSS rule below is an example that shows you how to specify that the font style of a text.

p { font-style:italic; }