- Does body have a margin?
- How do you get rid of margins on your body?
- How do you add margins to your body?
- Is margin a body attribute?
Does body have a margin?
Remember, by default the body element has 8px of margin on all sides.
How do you get rid of margins on your body?
All you need to do is give your HEADER tag a 1px border, aswell as setting the BODY MARGIN to zero, as shown below. You may also need to change the MARGIN to zero for any H1, H2, etc. elements you have within your HEADER div. This will get rid of any extra space which may show around the text.
How do you add margins to your body?
Use CSS instead
You can control the margins on the body using CSS. The CSS property for just the margin on the top of an element is margin-top (not topmargin ). However, it is usually a better idea to use padding on the <body> , rather than margin.
Is margin a body attribute?
A unique set of margin attributes are available to the body tag. These attributes work much like those of a word processing program, allowing you set pixel value margins for the left, right, top, or bottom of your website.