The span, a and img elements have their display set to inline by default. These elements do not start on a new line and take up only as much space as required.
For inline elements, we cannot specify width or height. Also, vertical margins do not have any effect: