Slide 5.6: CSS fonts
Slide 5.8: CSS fonts (cont.)
Home

CSS Font (Cont.)


Font Style
The font-style property is mostly used to specify italic text. This property has three values: For example,
   p.normal  { font-style:normal; }
   p.italic  { font-style:italic; }
   p.oblique { font-style:oblique; }
Font Size
The font-size property sets the size of the text. Being able to manage the text size is important in web design. However, you should not use font size adjustments to make paragraphs look like headings, or headings look like paragraphs. Always use the proper HTML tags, like <h1><h6> for headings and <p> for paragraphs. The font-size value can be If you do not specify a font size, the default size for normal text, like paragraphs, is 16px (16px=1em).


Demonstration
The following demonstration shows how the script of HTML and CSS is displayed on the Web: