Momentum LogoMomentum Foundations
Momentum LogoMomentum Foundations
    • Intro
      • Welcome to Foundations!
    • Setup
      • Setting Up Your Mac
      • Setting Up Your Windows Machine
      • Setting Up Your Chromebook
      • Setup survey
    • Developer Mindset
      • The Developer Mindset
    • HTML
      • What is HTML?
      • What does HTML look like?
      • Tags and Elements
      • Tags for Body Content
      • Document Structure
      • Put This Page Together!
      • Video: HTML Crash Course
      • HTML survey
    • CSS
      • What is CSS?
      • Our first style
      • CSS Selectors
      • Exercise: Practice CSS Selectors
      • Styling Text
      • CSS Colors
      • CSS Fonts
      • CSS Measurement
      • Connecting HTML and CSS
      • Exercise - Make a Personal Page
      • CSS survey
    • Shell
      • Introduction to the Command Line
      • Command Line Usage
    • Exit Survey
      • End of Foundations survey

    CSS Measurement

    The units of measure we have in CSS are:

    • px: pixels; an absolute unit. Basically, one little dot of light on your screen.
    • rem: a number multiplied by the root element's font size. The root element is your body tag, so relative to that. If your body's font size is 16px, 1.5rem would be the same as 24px (16px * 1.5rem).
    • %: With fonts, this is a percentage of the current font-size (not the root element's font size!)

    Read More#

    • CSS Values and Units on Mozilla Developer Network
    Edit this page
    Previous
    « CSS Fonts
    Next
    Connecting HTML and CSS »
    • Read More

    Docs

    • HTML
    • CSS
    • Command Line

    Community

    • Facebook
    • LinkedIn
    • Twitter
    • Instagram

    More

    • Momentum Homepage
    Copyright © 2021 Momentum.