Support Forum
Welcome to our community! Browse the forums, share a tip, give your feedback, ask a question, and search to find answers.

What is the best unit to use to declare font-size on the web?

Use em or px for font sizesBut there is a good reason to use neither pt nor any other absolute unit and only use em and px . If the first four lines all look the same (or if the 0.5pt line is missing), you are probably looking at a computer monitor that cannot display dots smaller than 1px.

Fonty Fonts

2replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • The best unit to declare font-size on the web is often considered to be "em" or "rem." These relative units allow for scalable and flexible typography. "Em" is relative to the font size of the parent element, while "rem" is relative to the font size of the root element, providing a consistent base for sizing throughout the document. Using relative units facilitates better responsiveness and accessibility, allowing font sizes to adjust proportionally based on the user's preferences or the device's characteristics

    Like
  • Hey Carmel Charlie , thank you for submitting to our Ucraft Forum! 

    When choosing font sizes for web design, it's recommended to use "em" or "px" units for flexibility and consistency across devices. "Em" units provide scalability relative to the parent element, while "px" units offer precise control.

    Avoid using "pt" units designed for print, as they may not scale well on digital displays.

    Keep in mind that some monitors may struggle to display dots smaller than 1px, impacting fine details. Choose the unit that aligns with your design needs and consider the limitations of the display device for optimal readability.

    Like
Like Follow
  • Status Answered
  • 2 mths agoLast active
  • 2Replies
  • 13Views
  • 3 Following