Home > Article > Web Front-end > Default margin_html/css_WEB-ITnose for body in CSS
The default margin of the body in CSS
In general browsers, the default margin setting for the body tag is 8px. Of course, different browsers will set it to different values. , it is provided by the user-agent-stylesheet of the browser. The user-agent-stylesheet of some browsers can be modified by the user, but some browsers cannot, so developers cannot rely on this to modify the browser. Default setting. If we want to modify the default value of the body, just overwrite its css style:
body { margin: 0px; padding: 0px; ...}
If we want to set the same default value on different browsers, we can use normalize.css to keep it consistent .
Copyright Statement: This article is an original article by the blogger and may not be reproduced without the blogger's permission.