...

View Full Version : font table of pt, px, em for header tags?



finstah1
12-20-2007, 09:55 PM
Does anyone know of a table out on the web that shows the equivalents of each header?

For example (just and example these obviously are not correct:

h2 = 12pt = 12px = 1em
h3 = 10pt = 10px = 0.8em

Apostropartheid
12-20-2007, 09:58 PM
Points in theory are an absolute measurement that should be equated by a length in centimetres.

finstah1
12-20-2007, 10:01 PM
huh?

All I am looking for is a chart equivalent for the header tags if the css body tag is based on a size of 100%.

How many pixels, points, ems is an h2 tag?
How many pixels, points, ems is an h3 tag?

etc

Excavator
12-20-2007, 10:26 PM
huh?

All I am looking for is a chart equivalent for the header tags if the css body tag is based on a size of 100%.

How many pixels, points, ems is an h2 tag?
How many pixels, points, ems is an h3 tag?

etc

That' s a good question. If you don't specify then I always assumed it was the browsers default which could be different in each one.

finstah1
12-21-2007, 03:25 PM
have you seen a chart somewhere that shows the default sizes?

Apostropartheid
12-21-2007, 08:31 PM
The problem is, mate, the sizes vary. Else we wouldn't be using different measurements, would we?

Most browsers' default em measurement is 16px. Although it's a fairly safe presumption, it doesn't have to be this way.

Points--pts--are a print measurement that is at a ratio of 1pt:0.3528mm. You should only use these for print stylesheets.

VIPStephan
12-21-2007, 08:47 PM
Yeah, the thing with relative units like em or percent is that they are relative, and thus a different size on different occasions as the size always relates to the size of the parent element.

I.e. if a div had a font size of 20px an h1 with the font siize of 2em within that div would be a different size than an h1 outside of that div.

There is the practice to set the body font size to 62.5% which sets em sizes to equal to 10px. However, as I said it will vary as well with nested elements.

felgall
12-21-2007, 09:04 PM
I doubt anyone has compiled a list of the thousands of different default values that the different browsers use as their defaults, particularly since with some of those measurement systems the size will vary depending on the screen resolution of your visitor. That's why most people specify their own values in the stylesheet to override the unknown default.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum