0
What is the difference between measurements in % and measurements in px?
5 Respuestas
+ 8
% - percent of the page
px - pixels
If you write <hr width=60% /> it will make a horizontal line with the width of 60% of the page.
If you write <hr width=90px> it will make a horizontal line with the width of 90 pixels.
P.S. If you don't understand something just try it in the code playground.
https://imgur.com/a/T04oo
- Dumitru
If this answer has helped you, give it a upvote by pressing the button that looks like an thumbs up (like).
+ 1
They are same, you can choose witch you like better.
0
%- Percentage
Px- pixel
If you write <hr width="50%"\> it will make an horizontal line with width of 50% of the page.
If you write <hr width="50px"\> it will make an Horizontal line with width of 50px look smaller on the page.
Note; there is different between the 2 tags..
Hit the like button if it answer your question.
0
in the case of % and PX. different pages like for phone and computer resolutions or display size was different. so if we use PX then it will result only to that pixel only. but in the case of % it will show the adjusted size of the computer or pc
0
px is absolute and % is relative