font-style:italic; assigns the constant value of italic to font-style. The font-style property also allows two other constant values: normal and oblique.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head><title>CSS Syntax</title>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<style><!-
body {
color:black;
font-style:italic;
}
</style>
</head>
<body>
<p>CSS syntax is <span style="font-style:italic;">EASY!</span></p>
</body>
</html>
Related examples in the same category