What is difference between pixel and percentage in html | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

What is difference between pixel and percentage in html

tell me

6th Feb 2018, 4:19 PM
Rohit
Rohit - avatar
3 Answers
+ 9
Mobile webpages. %'s rock for that. As it will (obviously) adjust to suit. However when you want a fixed width for say example an article of text that you want displayed in a certain way, px's is the winner. Both have many plus's and minus's over each other :)
6th Feb 2018, 4:21 PM
Scooby
Scooby - avatar
+ 4
I ll suggest also to take a look at vw and vh , it simplifies a lot of scaling issues in CSS for responsive designs. % takes the allocated portion of available width/height pixels as the name suggests , pixel by pixels
9th Feb 2018, 8:33 AM
Morpheus
Morpheus - avatar
+ 1
tnx
7th Feb 2018, 10:05 AM
Rohit
Rohit - avatar