What is the default padding and/or margin for a p element (reset css)?

后端 未结 5 916
迷失自我
迷失自我 2020-11-22 12:18

I have been using a reset CSS set of styles for quite some time now and each time I got to create a new website, the reset the annoys me the most is the reseting of a p tag

5条回答
  •  北恋
    北恋 (楼主)
    2020-11-22 12:54

    The CSS 2.1 specification has an default style sheet for HTML 4. It’s just informative and not normative so browsers may use it but do not have to.

    Another resource could be the webdeveloper tools of the browsers. Most can show you the cascade of rules that were applied to a particular element. An example: Firefox and Safari (WebKit) seem to use margin: 1em 0px for p elements.

提交回复
热议问题