Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6729533
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:18:06+00:00 2026-05-26T10:18:06+00:00

Various texts on the net claim that pt is the default font-size unit when

  • 0

Various texts on the net claim that “pt” is the default font-size unit when none is provided, however, my own testing seems to demonstrate otherwise. I have read many documents on W3C covering font-size for CSS 1-3, and I can’t seem to locate an actual reference to a default unit in any of the specifications.

I have tested this in both Chrome and IE9 and get the exact same results with each: the element lacking a unit is the smallest, the px element is in the middle, and the pt element is the largest. I attempted to match the size using many other units defined by the W3C (such as “mm”, “ex”, “pc”, etc.) but none of the test elements match up in size to the targeted element (the one lacking units).

Any insight would be appreciated.

<div style="font-size: 20;">20 size</div>
<div style="font-size: 20px;">20px size</div>
<div style="font-size: 20pt;">20pt size</div>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T10:18:06+00:00Added an answer on May 26, 2026 at 10:18 am

    Per the “CSS Fonts Module Level 3” the font-size property can have values that are:

    Value: <absolute-size> | <relative-size> | <length> | <percentage>

    <absolute-size>, <relative-size>, and <percentage> are defined in the same spec, and are all either keywords (e.x. small, larger, etc) or have percentage units.

    <length> being more generic is defined in “CSS Values and Units Module Level 3”:

    Lengths refer to distance measurements and are denoted by <length> in the property definitions. A length is a dimension. However, for zero lengths the unit identifier is optional (i.e. can be syntactically represented as the <number> 0).

    What this means is that unitless numbers for font-size are invalid, with an explicit exception for 0.


    With that said, what size is <div style="font-size: 20;">20 size</div> being rendered at?

    The rendered font-size of an element will depend on a lot of things. However, if we’re able to assume that

    • the user hasn’t customized their default font-size
    • the browser is using default styles
    • there are no parent elements that would otherwise change the font-size (e.x. <font>, <sub>, <h1>…yes it would be invalid markup to have those elements as parents, but it would still change the font-size)

    Then the default font-size in every modern browser that I’m aware of currently is 16px.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an asp.net application that has various text files it needs to load
From what I understand about what ASP.NET does and my own personal testing of
I have done various tests and I have found that the jQuery validate function
I am quantitatively studying various metrics associated with automated tests. Chrome seems to have
I'm writing some unit tests which are going to verify our handling of various
I am testing various methods to read (possibly large, with very frequent reads) XML
I want to extend the asp.net validators such that I can make one validator
I have an SSIS package with a Data Flow that takes an ADO.NET data
My application uses Lucene.NET to index various text files. Since each text file is
I'm writing a .NET web application in which administrators can customize the various data

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.