Question:

Help with CSS Font Styling

by  |  earlier

0 LIKES UnLike

In my html I have font tags such as <font size=2>. I am trying to start getting rid of all the font tags and move more to css. What do I put under size in the css to equal <font size=2>? Do I want to use px or pt? Help!

p.fontsize2 {

font-family: Georgia;

font-size: 10pt;

line-height: normal;

}

 Tags:

   Report

3 ANSWERS


  1. p.fontsize2 {

    font-family: Georgia;

    font-size: 10pt;

    line-height: normal;

    }

    I&#039;m assuming that you are trying to duplicate the old html 4.01 font size attributes and convert them to css formatting. So the p.fontsize2 part would look like  p id= &quot; fontsize2 &quot; &gt; some text /p&gt;in your Html.

    Your code is perfect for that purpose.  You can Forget using html 4.01 font sizes and concentrate on using pt sizes (never smaller than 10pt because people need to see it before they can read it)  The px (pixel) size actually comes out a bit smaller than pts and doesn&#039;t print as well.  


  2. It varies by browser, but (I believe) the pixel approximations are:

    font-

    size...pixels

    1.......10px

    2.......13px

    3.......16px

    4.......18px

    5.......24px

    6.......32px

  3. I&#039;m not sure exactly what font-size would equal size=2, but really you should just play around and see what you prefer, and what is most legible for your users.

    For most pages that I code, I use 12px. Between 11-14px is usually good.

Question Stats

Latest activity: earlier.
This question has 3 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.
Unanswered Questions