CSS cascading style sheets made simple with Style Studio, powerful CSS Editor / HTML Editor for professional webmasters (CSS Editor / HTML Editor / CSS Validator / CSS Tutorial)
Style Studio CSS Editor - CSS cascading style sheets made simple with Style Studio, powerful CSS Editor / HTML Editor for professional webmastersHome
Style Studio CSS Editor - CSS cascading style sheets made simple with Style Studio, powerful CSS Editor / HTML Editor for professional webmastersCSS Editor
SEO Report For Windows - The ultimate website ranking checker / search engine optimization toolkit!SEO Report (New)
Style Studio CSS Editor - CSS cascading style sheets made simple with Style Studio, powerful CSS Editor / HTML Editor for professional webmastersCSS Download
Style Studio CSS Editor - CSS cascading style sheets made simple with Style Studio, powerful CSS Editor / HTML Editor for professional webmastersOrder
Style Studio CSS Editor - CSS cascading style sheets made simple with Style Studio, powerful CSS Editor / HTML Editor for professional webmastersSupport
Style Studio CSS Editor - CSS cascading style sheets made simple with Style Studio, powerful CSS Editor / HTML Editor for professional webmastersNews
Style Studio CSS Editor - CSS cascading style sheets made simple with Style Studio, powerful CSS Editor / HTML Editor for professional webmastersAwards
Style Studio CSS Editor - CSS cascading style sheets made simple with Style Studio, powerful CSS Editor / HTML Editor for professional webmastersContact
Style Studio CSS Editor - CSS cascading style sheets made simple with Style Studio, powerful CSS Editor / HTML Editor for professional webmastersLinks
Style Studio CSS Editor - CSS cascading style sheets made simple with Style Studio, powerful CSS Editor / HTML Editor for professional webmastersAbout
Style Studio CSS Editor - CSS cascading style sheets made simple with Style Studio, powerful CSS Editor / HTML Editor for professional webmastersCSS Validator
CSS Cascading Style Sheets NewsgroupsCSS Forums
Style Studio CSS Editor - CSS cascading style sheets made simple with Style Studio, powerful CSS Editor / HTML Editor for professional webmastersCSS FAQ
Style Studio CSS Editor - CSS cascading style sheets made simple with Style Studio, powerful CSS Editor / HTML Editor for professional webmastersCSS Tutorial
Style Studio CSS Editor - CSS cascading style sheets made simple with Style Studio, powerful CSS Editor / HTML Editor for professional webmastersCSS Articles
Style Studio CSS Editor - CSS cascading style sheets made simple with Style Studio, powerful CSS Editor / HTML Editor for professional webmastersCSS Resources
Style Studio CSS Editor - CSS cascading style sheets made simple with Style Studio, powerful CSS Editor / HTML Editor for professional webmastersCSS Layouts
Style Studio CSS Editor - CSS cascading style sheets made simple with Style Studio, powerful CSS Editor / HTML Editor for professional webmastersHTML Tidy
Style Studio CSS Editor - CSS cascading style sheets made simple with Style Studio, powerful CSS Editor / HTML Editor for professional webmastersHTML Tutorial
   
Home » CSS Tutorial » CSS Properties » font-size

font-size



CSS Property Info :

Syntax: font-size: <absolute-size> | <relative-size> | <length> | <percentage>
Possible Values:
  • <absolute-size>
    • xx-small | x-small | small | medium | large | x-large | xx-large
  • <relative-size>
    • larger | smaller
  • <length>
  • <percentage> (in relation to parent element)
Initial Value: medium
Applies to: All elements
Inherited: Yes

CSS Browser Support :

Internet Explorer 3+
Netscape 4+
Opera 3.6+
W3C's CSS Level 1+
CSS Profile 1.0
Web TV


CSS Property Description :

The font-size property is used to modify the size of the displayed font. Absolute lengths (using units like pt and in) should be used sparingly due to their weakness in adapting to different browsing environments. Fonts with absolute lengths can very easily be too small or too large for a user.

Some example size assignments would be:

H1 { font-size: large }
P { font-size: 12pt }
LI { font-size: 90% }
STRONG { font-size: larger }


Note :
Authors should be aware that Microsoft Internet Explorer 3.x incorrectly treats em and ex units as pixels, which can easily make text using these units unreadable. The browser also incorrectly applies percentage values relative to its default font size for the selector, rather than relative to the parent element's font size. This makes rules like

H1 { font-size: 200% }

dangerous in that the size will be twice IE's default font size for level-one headings, rather than twice the parent element's font size. In this case, BODY would most likely be the parent element, and it would likely define a medium font size, whereas the default level-one heading font size imposed by IE would probably be considered xx-large.

Given these bugs, authors should take care in using percentage values for font-size, and should probably avoid em and ex units for this property.


CSS Bugs / Problems :

none




Adapted by style-sheets.com, maker of Style Studio, powerful CSS Editor for Windows.

Copyright © John Pozadzides and Liam Quinn. All rights reserved.

Top


Home » CSS Tutorial » CSS Properties » font-size

 

Related Links :


Acknowledgements    |    Site Map    |    FAQ    |    Website Ranking Checker    |    HighDots Forums
Copyright OverZone Software 2000-2008. All rights reserved.
Database Forums    |    Java Forums    |    C++ Forums    |    MySQL Forums    |    DotNET Forums

html 4.01 | css 2 (W3C) | css 2