For the span element, it is an inline element and does not have width and height attributes by default. But when the span element is set to float, it will become a floating box of a block-level element. At this time, its width will be adjusted according to the width of the content, and the content will expand the height of the element. Therefore, the span element that is floated will have width and height attributes.
For the span element, it is an inline element and does not have width and height attributes by default. But when the span element is set to float, it will become a floating box of a block-level element. At this time, its width will be adjusted according to the width of the content, and the content will expand the height of the element. Therefore, the span element that is floated will have width and height attributes.