HTML & CSS · Junior · Question 6 of 75

How does display: inline-block differ from inline?

Explanation

inline-block is a hybrid: on the outside it behaves like an inline element (sits on the same line as its neighbors and respects vertical-align), and on the inside like a block (width, height, padding and vertical margin work). It's block that starts on a new line, not inline-block.

Further reading

Problem with a question

HTML & CSS · Junior · question 6

Test yourself

Take the HTML & CSS · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz