Unlike div, p tags which are Block Level elements which can take up margin on all sides, span tag cannot as it's an Inline element which takes up margins horizontally only.
To make margin-top and margin-bottom work for your span element, use display: inline-block; or display: block;.
display: inline-block; as it will be inline as well as block.
display: inline-block; making it block only and it will result your element to render on another line as block level elements.
© 2020 Digcode.com. All rights reserved.