Browser user agent style sheet margin 8px

浪子不回头ぞ 提交于 2019-12-04 02:27:40

Browsers add their own stylesheet with their proper rules to show how the web page should be rendered normally good looking for eg. some reason you'd not add css rules for headers then how it should be displayed in the browsers?

To answer the question browsers add their rules to show the web page headers how would normally look like.

Like that the browsers using margin:8px; in body to show a web page in a cleaner visual way as pointed out by @Quentin is as writing in a paper.

So, we are the developer and how should be the page rendered?

To answer this we add our own stylesheet and make our own way for visual effect on the page.


There are a lot of rules in the stylesheet added by browsers in default by different browsers. You can see them here for different browsers.

And you may find several css reset stylesheet googling.

It is there because text that touches the border of the window is hard to read. i.e. for the same reason that we use margins when writing on paper.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!