Die Eigenschaft font bestimmt die Schrift des Elments.
font: [ [ <'font-style'> || <'font-variant'> || <'font-weight'> ]? <'font-size'> [ / <'line-height'> ]? <'font-family'> ] | caption | icon | menu | message-box | small-caption | status-bar | inherit
Die Werte font-size und font-family müssen immer angegeben werden und am Ende stehen. Will man einen Wert für line-height angeben so schreibt man ihn hinter den Wert für font-size, mit einem / getrennt.
| Ergebnis | Quelltext |
| Testtext | font:15px sans-serif |
| Testtext | font:15px/10px sans-serif |
| Testtext | font:italic 20px fantasy |
| Testtext | font:small-caps bold 15px 'Arial Black' |
| Testtext | font:icon |
| Browser | Internet Explorer | Netscape | Opera | Firefox | Konqueror | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Version | 4 | 5 | 6 | 7 | 4 | 5 | 6 | 7 | 3 | 4 | 5 | 6 | 7 | 8 | 1 | 2 | 3 | 3.5.x |
| wird unterstützt | Ja | Ja | Ja | Ja | Ja | Ja | Ja | Ja | Ja * | Ja | Ja | Ja | Ja | Ja | Ja | Ja | Ja | Ja |
text-decoration, font-style, font-variant, font-weight, font-size, line-height, font-family
Page last modified 13:45, 10 Aug 2007 by Michael2402