Loading Dev Articles Topics...
Loading Forum Links...
Loading Dev Shed Topics...
Loading ASP Free Topics...
Loading SEO Topics...
...
We last left off discussing text in CSS. In this article we will finish this discussion, and cover how to manipulate fonts as well. And if time permits, we will also go over tables in CSS. It's a lot of ground to cover, so let's jump right in.
You can set the style of your font using font-style. Here is how!
<html>
<head>
<style type="text/css">
h1 {font-style: italic}
h2 {font-style: normal}
p {font-style: oblique}
</style>
</head>
<body>
<h1>I like to eat meatballs</h1>
<h2>I'm pretty normal</h2>
<p>I don't know what oblique means</p>
</body>
</html>
Setting the Variant of a Font
You can set the variant of a font like this:
p.normal {font-variant: normal}
p.smallcaps {font-variant: small-caps}
<p class="normal">This is normal</p>
<p class="smallcaps">This is small caps...</p>