All Together Now - I Shot the Serif - HTML with Style | WebReference

All Together Now - I Shot the Serif - HTML with Style

Front Page123456789

I Shot the Serif

All Together Now


Property:font
Accepted values:style variant weight size/line-height family
Initial value:as per individual properties
Applies to:All Elements
Inherited:Yes

The font property is used to set all the font properties, as well as the line-height property, which you will learn about in a while. Any of the property values may be omitted, so you can specify only the values of those properties you want to change. The weight, style and variant can be specified in any order, followed by the size, followed by a slash and the line height, followed by the family.

<UL>
<LI><SPAN STYLE="font: bold italic 12pt/14pt Garamond, serif">
      Bold Italic 12pt Garamond</SPAN>
<LI><SPAN STYLE="font: bold small-caps 16pt Arial, sans-serif">
      Bold Small-Caps 16pt Arial</SPAN>
<LI><SPAN STYLE="font: italic 10pt Times, serif">
      Italic 10pt Times</SPAN>
<LI><SPAN STYLE="font: 'Courier New', Courier, monospace">
      Courier New</SPAN>
<LI><SPAN STYLE="font: 20pt Tahoma, fantasy">
      20pt Tahoma</SPAN>
</UL>
  • Bold Italic 12pt Garamond
  • Bold Small-Caps 16pt Arial
  • Italic 10pt Times
  • Courier New
  • 20pt Tahoma

I mentioned the line-height property a while back. This is one of the text properties, font properties closest relatives.

Front Page123456789

http://www.internet.com

Produced by Stephanos Piperoglou

All Rights Reserved. Legal Notices.

URL: http://www.webreference.com/html/tutorial8/
Created: Oct 20, 1998
Revised: Nov 3, 1998