Back to Freecodecamp

Learn Block and Inline Lesson C

curriculum/challenges/english/blocks/top-learn-block-and-inline/6570447ee7b02272663824e1.md

latest895 B
Original Source

--description--

Padding is used to create space around an element's content, inside of any defined borders. With inline elements, padding adds space to the left, right, top, and bottom of the content. However, it's important to note that while padding does affect the space around the content, it does not affect the layout of other elements around the inline element. This means that horizontal padding (left and right) is respected, but vertical padding (top and bottom) does not cause other elements to move away.

--questions--

--text--

How does padding affect inline elements?

--answers--

Padding has no effect on inline elements.


Padding increases the width and height of inline elements.


Padding only affects the horizontal spacing of inline elements.


Padding only affects the vertical spacing of inline elements.

--video-solution--

3