CSS Property Value How to - font: normal 1.2em Arial, Helvetica, sans-serif;








Question

We would like to know how to font: normal 1.2em Arial, Helvetica, sans-serif;.

Answer


<!DOCTYPE html>
<html lang="en">
<head>
<title>Example of CSS font property</title>
<style type="text/css">
h1 {<!--from ww  w.j  a v a 2s  .  c o m-->
  font: bold 2.5em "Times New Roman", Times, serif;
}

p {
  font: normal 1.2em Arial, Helvetica, sans-serif;
}
</style>
</head>
<body>
  <h1>This is a heading</h1>
  <p>This is a paragraph.</p>
</body>
</html>

The code above is rendered as follows: