Difference between DIV as-is and a SPAN with display:block

前端 未结 4 1349
夕颜
夕颜 2020-12-09 08:06

Is

different from in any way?

They render just fine the same. Any semantic difference b

4条回答
  •  不知归路
    2020-12-09 08:21

    Yes. They can contain different things and are allowed in different places.

    They will also be rendered differently in environments where CSS is not available (e.g. in some email systems)

提交回复
热议问题