Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    Regular Coder
    Join Date
    May 2004
    Location
    The First State
    Posts
    233
    Thanks
    9
    Thanked 0 Times in 0 Posts

    font table of pt, px, em for header tags?

    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

  • #2
    The Apostate Apostropartheid's Avatar
    Join Date
    Oct 2007
    Posts
    3,215
    Thanks
    16
    Thanked 265 Times in 263 Posts
    Points in theory are an absolute measurement that should be equated by a length in centimetres.

  • #3
    Regular Coder
    Join Date
    May 2004
    Location
    The First State
    Posts
    233
    Thanks
    9
    Thanked 0 Times in 0 Posts
    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

  • #4
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Quote Originally Posted by finstah1 View Post
    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.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #5
    Regular Coder
    Join Date
    May 2004
    Location
    The First State
    Posts
    233
    Thanks
    9
    Thanked 0 Times in 0 Posts
    have you seen a chart somewhere that shows the default sizes?

  • #6
    The Apostate Apostropartheid's Avatar
    Join Date
    Oct 2007
    Posts
    3,215
    Thanks
    16
    Thanked 265 Times in 263 Posts
    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.

  • #7
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,665
    Thanks
    6
    Thanked 1,006 Times in 979 Posts
    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.

  • #8
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,639
    Thanks
    0
    Thanked 649 Times in 639 Posts
    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.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •