CSS Font Properties

Fonts

Property

Description

Values

Sample Code

font

Sets multiple font properties

font-family
font-size
font-weight
font-style
font-variant

 

font-family

Sets font names

family-name
generic-family

p {font-family: verdana,arial}
p {font-size: 10pt; font-family: arial}

font-size

Sets the size of the text

smaller
larger
xx-small
x-small
small
medium
large
x-large
xx-large

P {font: 12pt arial}
P {font: 70% sans-serif}
P {font: bold italic large Verdana}

font-weight

Sets the weight of the text normal

bold
bolder
lighter
100
200
300
400
500
600
700
800
900

p{font-weight: bold}

font-style

Sets the style of the text

normal
italic
oblique

p{font-style: italic}

font-variant

Sets the font variant

normal
small caps

h2 {font-variant: small-caps}

Sample

Code:

Result:

CSS font properties




This website is hosted for free by Freewebs.com - free website. Get your own Free Website now!