Set font-family to monospace in HTML and CSS
Description
The following code shows how to set font-family to monospace.
Example
<html>
<head>
<style type='text/css'>
body {<!-- w ww . ja v a2 s . c om-->
font-family: monospace;
}
div {
font-weight: bolder;
}
</style>
</head>
<body>
This font is normal.
<div>
This font is bolder than the font for the <body> element.
</div>
</body>
</html>
The code above generates the following result.