+ 1

What unit of measurement should I use?

px or em?

12th Sep 2016, 2:07 PM
Ezra Dumanon
Ezra Dumanon - avatar
3 Answers
+ 2
both are good but px is best for better understanding for beginners all the best
12th Sep 2016, 2:41 PM
+ 1
Depends on what you are trying to do. As Ambuj said, px will be fine in most cases. px is an absolute size. So no matter what the font size or style is, it will use the number of pixels you define. em is used as a relative size value. So if your end user is able to adjust the font size, the amount of screen space taken up by the text will adjust with it. Here is a good link that will shed some more light: http://stackoverflow.com/questions/609517/why-em-instead-of-px
13th Sep 2016, 4:37 AM
Ryne - avatar
For a responsive website you will have to use all the measures in %. This way, you can open a website on a smartphone and see less problems than when using pixels size. Do not focus this now! Practicw your knowledge now and then go deep :)
13th Sep 2016, 5:15 PM
Scotti - avatar