p font: italic bold small-caps 24px sans-serif;
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en'>
<head>
<title>font</title>
<style type='text/css'>
body {
font: 16px sans-serif;
}
p.font1 {
font: bold 24px sans-serif;
}
p.font2 {
font: italic bold small-caps 24px sans-serif;
}
p.font3 {
font: 16px monospace;
}
</style>
</head>
<body>
<p>
The font shorthand property lets you combine up to six
different properties in one single property.
</p>
<p class='font1'>
You can make text that's bold, 24 pixels in size,
and sans-serif.
</p>
<p class='font2'>
You can make text that's italic, bold, small-caps,
24 pixel sans-serif, which looks like a comic
book font.
</p>
<p class='font3'>
Or you can just keep it simple, 16 pixels and
monospace.
</p>
</body>
</html>
Related examples in the same category