In short: don't use "float: left/right" for anything besides real floating images.
In this case a "display: flex" on the <a> element would be a much better solution.
replies(1):
In this case a "display: flex" on the <a> element would be a much better solution.
That particular UI element of google search has been around decades, so might predate css flex...
And clearing your floats was part of the absolute basics. Of course, we still forgot to now and then.