Please visit our sponsors !
The font-size property
The font-size property sets the size of a font.
Inherited: Yes
Example
body
{
font-size: x-large
}p
{
font-size: 10px
}
|
Possible Values
Value |
Description |
NN |
IE |
xx-small
x-small
small
medium
large
x-large
xx-large |
Sets the size of the font to different sizes, from xx-small
to xx-large |
4.0 |
3.0 |
smaller |
Sets the font-size to a smaller size than the parent
element |
4.0 |
4.0 |
larger |
Sets the font-size to a larger size than the parent element |
4.0 |
4.0 |
length |
Sets the font-size to a fixed size |
4.0 |
3.0 |
% |
Sets the font-size to a % of the parent element |
4.0 |
3.0 |
Browser Notes
Note in IE 4.0+:
- Default value of this property is "small", not "medium" as
it should be according to the W3C specification
Notes in Netscape 4.0+:
- Default value of this property is "small", not "medium"
as it should be according to the W3C specification
- Do not use % values under 100%. It can change color of the text or
make the text difficult to read
|
Jump to: Top of Page
or HOME or
Printer friendly page
Search W3Schools:
What Others Say About Us
Does the world know about us? Check out these places:
Dogpile
Alta Vista
MSN
Google
Excite
Lycos
Yahoo
Ask Jeeves
We Help You For Free. You Can Help Us!
W3Schools is for training only. We do not warrant its correctness or its fitness for use.
The risk of using it remains entirely with the user. While using this site, you agree to have read and accepted our
terms of use and
privacy policy.
Copyright 1999-2002 by Refsnes Data. All Rights Reserved
|