Using  instead of other tag types (, , etc)
The div element, short for division, is a block element mostly used to group larger chunks of HTML, to create CSS-styled layouts.

On the other hand, the span element is an inline element, mostly used to group and stylize text/images. It makes it easy to apply custom styles without changing the general layout.

Also, a div element takes all available width while the span only takes as much width as necessary.

It is certainly not illegal (since HTML5) what you're doing, but to follow semantics I'd use span for what you are trying to achieve.