Controlling Font Size With CSS
CSGNetwork FREE Source Code, Javascript Source, and Code Snippets!
CSGNetwork Custom Search
     Bookmark and Share
 
CSGNetwork
Snippets
Calculators
Top Free Apps
Home
Back



Right click this window and select "view source" in order to copy the source for this script.

Controlling Font Size With CSS


This is a CSS solution with no JavaScript.


Using this method it is simple to maintain control over the size of typography.


h1 set to 2.2em (22pt)



h2 set to 2.0em (20pt)



h3 set to 1.8em (18pt)



h4 set to 1.6em (16pt)



h5 set to 1.4em (14pt)


Paragraph tag set to 1.2em (12pt)






Controlling Font Size With CSS

This is an example of setting Headings and Paragraph tags by CSS. It demonsrates controling font size using ems. Works in most modern browses. Please view the source.



Bookmark and Share
Registered® Trademark™ and CopyrightŠ 1973 - CSG, Computer Support Group, Inc. and CSGNetwork.Com All Rights Reserved