Key Concepts

Review core concepts you need to learn to master this subject

CSS unit em

.nav-container { font-size: 10px; } .nav-container span { font-size: 1.5em; /* 10 x 1.5 = 15px */ }

em is a CSS unit used to create relatively-sized content. 1 em unit represents the base font size of the current element.

In the example code block, <span> elements nested inside of elements with class nav-container will have a font size of 15px.

Sizing Elements
Lesson 1 of 2

What you'll create

Portfolio projects that showcase your new skills

Pro Logo

How you'll master it

Stress-test your knowledge with quizzes that help commit syntax to memory

Pro Logo