To answer 2,3, you need to know the replacement and non-replacement elements in the HTML.
The replacement element refers to an element that is a point character as a different content. such as IMG. A non-replacement element is an element that contains content in a document, such as span.
Discusses whether Margin-top and Margin-bottom have an effect on inline elements, which are discussed separately for inline substitution elements and inline non-replacement elements.
It is possible to apply margin to inline elements, but when applying margin to non-replacement elements, the row height is not affected, and margin is actually transparent, so margin-top and margin-bottom do not have any visual effects. Applying Margin-left and Margin-right to non-replacement elements is an influence.
Setting margin-top and Margin-bottom for inline substitution elements may increase or decrease the row height, depending on the values of Margin-top and Margin-bottom. Margin-left and margin-right have the same effect on inline substitution and non-replacement elements.
For inline elements, setting padding-left and Padding-right is visible, and after setting Padding-top and Padding-bottom, for inline non-replacement elements, Padding-top and Padding-bottom are useless, do not affect their row height, and do not open the parent element. For inline substitution elements, padding-top and padding-bottom open the parent element.
Inline elements (exactly non-replaceable inline elements) cannot set margin and padding in the vertical direction, as specified by the CSS standard.
In short, the inline element, the width of the height is invalid, margin,padding only the left and right margin valid, upper and lower invalid.