p
and div
elements are block level elements where span
is an inline element and hence margin on span wont work. Alternatively you can make your span
a block level element by using CSS display: block;
or for span
I would prefer display: inline-block;
Apart from that, these elements have specific semantic meaning, div
is better referred for a block of content having different nested elements, p
which is used for paragraphs, and span
is nothing but an empty element, hence keeping SEO in mind, you need to use right tag for right thing, so for example wrapping the text inside div
element will be less semantic than wrapping it inside a p
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…