General HTML/Web Design Programming Q`s/font


QUESTION: If I do this
<p style="font-family:Times New Roman;

I know my text will be set to mediume but if I do thie
<p style="font-family:Times New Roman;

Is this set what 20 Pixals or 20 point size?

I do not understand the diferance?

ANSWER: 1 point is equivalent to 1/72th of an inch.  But this is based not on screen size but what the measurement would be upon printing the page out on paper.  Its best only to use this font styling when you want to be precise on how the page would appear if printed.  But although this is the case, most people ignore this and use it for virtually everything in some websites.  So 72pt would be about an inch.

A pixel is just as stated.  It's just a pixel.  But this gets a little tricky now since we have retina display.  In this case, a pixel will still equal one pixel but when using images, retina display will multiply these in half for more details.  In other words, you'll size a 100x100 image 200px by 200px and then add it to a page using width="100px" Height="100" so that retina display devices will display the full details.  But text sizing remains the same because the retina display devices will display them properly based on the device.

In other words, for text that you would like to be very precise in measurement when printed, you would use points.  Otherwise, use pixels.

font size="20" is neither pixels nor points.  When you don’t put a specific size attribute to the font size, it uses "relative" sizes that are controlled by your browser (many browsers being different).  The number actually only goes up to 7.  In other words, font size="7" would be the same size as font size="20".  The browser will control the size of the font.  Size 7 (or up) in IE would be equivalent to 30 points on PC or 34 points on Mac.

I hope this answers your question.  Thanks.

---------- FOLLOW-UP ----------

QUESTION: Ok thanks for the help so I will stick with doing
<font size="4"> and so on.

But when I go into my browser iE9 and look at the Font size it is set to display it says FONT 16 but you say browsers only go up to 7??

You misunderstood what I was saying.  The browser settings are not limited to font size 7.  The code itself does not make font size any larger if the number is above "7" ...unless it has an attribute such as pixels or points placed to it.

The browser setting for font size is controlled with the font settings "medium", "small", etc.  If you were to set your font size to "medium", this would make the font size set to whatever the browser default size is.

Ive displayed an example on this page:

Notice that once the size reaches "7", no matter what number you put there "8 through 15", it's the same size as seven?  This is what I mean by it only goes up to "7".

General HTML/Web Design Programming Q`s

All Answers

Answers by Expert:

Ask Experts


John Martin


I am able to answer any web design related questions including but not limited to html, dhtml, xml, wml, css, php, flash, swf and WAP. I have computers and electronics experience dating before the Military where I served as a tactical telecommunication com center operator in Military Intelligence during Desert Storm (and Desert Shield). I have a total of 22 consecutive years of computer experience (since age 14) and also teach computer classes locally. I also know little known secrets to making money online and SEO.


22 years of consecutive computer related jobs, hobbies and Military operations.

Personal experience, US Military Intelligence experience, Schooling and Signal Corp. Training as well.

Awards and Honors
Army accommodation medal and a two week advancement in A.I.T. training due to already existent computer knowledge at the time.

©2016 All rights reserved.