Languages

CSS - em and ex values in font-size

0 points
Asked by:
Inayah-Alexander
437

What are em and ex values in CSS font-size?

Example:

.default { 
  font-size: 1em;
}
1 answer
0 points
Answered by:
Inayah-Alexander
437

The em is a unit related to the font size (a distance equal to the text size). In 5 pixel type em is equal to 5px, in 10 pixel type, it's 10px etc.

The ex is a rare unit, used usually when you want to express something related to the height of your lowercase letters (related to the lowercase x letter height).

CSS - ex unit
CSS - ex unit
0 comments Add comment
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join