Introduction

There are a lot of size units to choose from when styling HTML with CSS. These units help determine how big or small text appears, how wide a container is, or how much space is between columns. Each of the various units has functional strengths that are valuable to a developer and the design of a website. Knowing which unit will work best for a situation will help you write websites that are flexible and accessible.

In this tutorial you will learn about the pixel (px), percent (%), em, and rem units. You will use these units in conjunction with several properties, including font-sizepaddingbordermarginwidth, and max-width to learn the differences and strengths of each unit.

#css #units

How To Use Common Units in CSS
1.20 GEEK