Margin and Padding of <Body> Tag

后端 未结 4 1595
-上瘾入骨i
-上瘾入骨i 2021-01-01 15:46

I am writing a very simple HTML code which is listed below. Written in notepad and opening in IE-8 and Firefox (OS: Window Vista).



         


        
4条回答
  •  一向
    一向 (楼主)
    2021-01-01 16:14

    Browsers have built-in "sane defaults" for the CSS of most HTML elements - this just prevents your page looking completely unreadable if you have pure HTML without CSS, but they are of course intended to be overridden by your own CSS.

    The default browser styles are typically referred to as a "User Agent Style Sheet" - the following site is a good reference of the various peculiar UA sheets IE has had over the years and also provides ones for other browsers at the bottom:

    http://www.iecss.com/

    One method a lot of people use to "normalise" the defaults so you have the same starting point in all browsers is a "CSS Reset" - this is just a snippet of CSS that you place before your own CSS that sets all of the UA styles to the same thing. This is a well known one:

    http://necolas.github.com/normalize.css/

提交回复
热议问题