CSS provide three values for setting the font style of text:normal, oblique, and italic. The normal style display the text in upright and straight letters, oblique displays the text in slanting or learning letters, and italic display the text in italic letters.
For Example: HTML file name: fontstyle.html
<!doctype html>
<head>
<title>Working with font-style property </title>
<style>
body{background-color:green;}
p{font-size:50px;}
span.normal{font-style:normal;}
span.oblique{font-style:oblique;}
span.italic{font-style:italic;}
</style>
</head>
<body>
<h1>Font-Style property</h1>
<p><span class="normal">Normal Font Style</span><br>
<span class="oblique">Oblique Font Style</span><br>
<span class="italic">Italic Font Style</span><br></p>
</body>
</html>
Here we have used font-style property and specified different font style such as normal, oblique,italic on the text.
The Browser view of above Document :
For Example: HTML file name: fontstyle.html
<!doctype html>
<head>
<title>Working with font-style property </title>
<style>
body{background-color:green;}
p{font-size:50px;}
span.normal{font-style:normal;}
span.oblique{font-style:oblique;}
span.italic{font-style:italic;}
</style>
</head>
<body>
<h1>Font-Style property</h1>
<p><span class="normal">Normal Font Style</span><br>
<span class="oblique">Oblique Font Style</span><br>
<span class="italic">Italic Font Style</span><br></p>
</body>
</html>
Here we have used font-style property and specified different font style such as normal, oblique,italic on the text.
The Browser view of above Document :
No comments:
Post a Comment