
Educators: Earn a free Gold upgrade by joining the PBwiki Back To School Challenge.
Description
The font-style property selects between normal (sometimes referred to as "roman" or "upright"), italic and oblique faces within a font family.
A value of 'normal' selects a font that is classified as 'normal' in the UA's font database, while 'oblique' selects a font that is labeled 'oblique'. A value of 'italic' selects a font that is labeled 'italic', or, if that is not available, one labeled 'oblique'.
These elements may be nested within one another
B (Boldface)
The <B> element specifies that the enclosed text should be displayed in a boldface
I (Italic)
The <I> element specifies that the enclosed text should be displayed in an italic font
U (Underline)
The <U> element specifies that the enclosed text should be displayed as underlined
S (Strike through)
The <S> element specifies that the enclosed text should be displayed with a horizontal line striking through the text
What it's used for
The font-style property is mainly used to bring the viewer's attention to the main points of the page or important information. It can also be used to add style to the page so that it's not boring.
Example #1
body
{
font-style: italic
}
The font will be italicized.
Example #2
h1, h2, h3 { font-style: italic }
h1 em { font-style: normal }
In the example above, emphasized text within 'h1' will appear in a normal face.
The information in "Description" and "What it's used for" is from www.w3.org
Page Information
|
Wiki Information |
Recent PBwiki Blog Posts |