<div style="width: 300px;"> <div style="float: left;width: 100px;"> 我是div </div> <span style=""> span </span> <span> span </span> </div>
?The following is the difference between the two of them:
? is a block-level (block-level) element, and the elements it surrounds will Automatic line wrapping. And span is just an inline element (inline element), there will be no line breaks before and after it. There is no structural meaning, it is purely applied style, and can be used when other inline elements are not suitable. It should be noted that the mark can be included in the mark and become its child element, but the reverse is not true, that is, the mark cannot contain the mark
The above introduces the float:left and span tags of div, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.