0

Isn't the height and width of<body> element same as the viewport's height and width?

22nd Aug 2025, 9:59 AM
Golu Kumar
2 Respuestas
+ 2
not necessarily. browsers often apply a default margin or padding, so the body width is actually smaller than the viewport width. and the height is 0 if the body is empty. that's why we often use css reset to start everything at a predictable default. https://sololearn.com/compiler-playground/WXmhoUrJJolF/?ref=app
22nd Aug 2025, 10:29 AM
Bob_Li
Bob_Li - avatar
+ 1
Thank you Bob
22nd Aug 2025, 12:44 PM
Golu Kumar
En tendencia hoy
.
1 Votes
What?
0 Votes
HTML
0 Votes
Web
0 Votes
Quiz duel
0 Votes
FRC Coding?
1 Votes
AI
2 Votes
help
0 Votes
APIs
1 Votes