If I have an HTML <header> element and apply some fields to this HTML5 element via CSS as:
header{ margin:10px 0; }
The <header> element is not 10 px from the rest of the elements. But if I change my CSS rule as shown below:
header{ margin:10px 0; display:block; }
then the <header> element is spaced accordingly.
So my question here is that I need to manually set display:block; to set fields / paddings for HTML5 elements like <header> ?
PS: clarify, this is not part of the production code / website. I'm just experimenting with HTML5 tags. :)
Veera source share