Experimenting with Fonts

Styling with Font Families

The h1 and h2 text should be displaying in either Georgia, Times New Roman, Times or a default generic serif font. Since the body selector was defined with Verdana, Arial, Helvetica and sans-serif (generic), text contained in any tags other than h1 and h2 will inherit the style.

Font Styles

Both heading tags are defined with a font-style of italic; Did you notice that the strong element is also styled as italic too?

Font Weight

The h1 element is now styled with a normal weight. Notice that I typed a separate rule for the h1; the h2 tag will remain as bold.

Font Variant

I defined my h1 and strong tags with the value of small-caps. The h2 element remains normal.

How does this page look in your browser? Take a look at the source code.