For most of my development career, I've only had to dabble in front-end, web based UI development. One thing has always bugged me is the constant need to reset browser-based styling "assumptions", which I've often forgotten until these defaults started effecting the layout of my pages.
The biggest assumption that most browsers make is that the HTML <body>
element should have a margin, which almost always is 8px.
What was the design decision for this defaulted margin?
In fact, this margin is so undesirable that it is essentially standard practice to include this type of styling in a .css file which is included with every page of a site:
html, body
{
margin: 0px; padding: 0px
}
IMHO, logic would dictate that most developers would want a full, blank slate that they can work with and format at their own discretion. With the browser defaulting a margin around the body element, the designer must remain conscientious of the spacing and add code to calculate correct layout for their inner elements if they don't reset the layout.
For what reason did the original developers of HTML browsers, or the initial HTML spec, decide to throw this default margin on all body elements?