+ 3

difference between 'px' and '%'

What is the difference between 'px' and '%' in HTML? And what preferable should I use between this two?

21st Oct 2017, 8:25 AM
A.J. Velasco
A.J. Velasco - avatar
2 Answers
+ 9
px stands for pixel units. It is a measurement unit you use, like centimeters but smaller. % stands for percentage, which means which percentage of the page/font/size.
21st Oct 2017, 8:32 AM
Learnsolo
+ 9
In addition to what Learnsolo said, it is better to use % if you need to make responsible web pages...
21st Oct 2017, 9:40 AM
Ledio Deda
Ledio Deda - avatar